#! /bin/sh

# Guess values for system-dependent variables and create Makefiles.
# Generated automatically using autoconf version 2.13 
# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
#
# This configure script is free software; the Free Software Foundation
# 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-client       do not build client stuff"
ac_help="$ac_help
  --without-server       do not build server 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-owner=USER       force ownership of files to USER [default == --with-user value]"
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-ftape-rawdevice=ARG raw device on tape server HOST's if using Linux ftape >=3.04d"
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-broken-fsf      only enable if tape fsf calls fail mid-file"
ac_help="$ac_help
  --with-gnutar[=PROG]      use PROG as GNU tar executable [default: looks for one]"
ac_help="$ac_help
  --with-smbclient[=PROG]   use PROG as Samba's smbclient executable [default: looks for one]"
ac_help="$ac_help
  --with-samba-user was deprecated"
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
  --without-amandahosts  use .rhosts instead of .amandahosts"
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-portrange=low,high  bind unreserved TCP server sockets to ports within this range [unlimited]"
ac_help="$ac_help
  --with-udpportrange=low,high  bind unreserved UDP server sockets to ports within this range [unlimited]"
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-tmpdir[=/temp/dir] area Amanda can use for temp files [/tmp/amanda]"
ac_help="$ac_help
  --with[out]-debugging[=/debug/dir] [do not] record runtime debugging information in specified directory [--with-tmpdir]"
ac_help="$ac_help
  --with-debug-days=NN    number of days to keep debugging files [default=4]"
ac_help="$ac_help
  --with-testing[=suffix] use alternate service names"
ac_help="$ac_help
  --enable-shared[=PKGS]  build shared libraries [default=no]"
ac_help="$ac_help
  --disable-libtool       build static libraries only, without libtool"
ac_help="$ac_help
  --with-dump-honor-nodump  if dump supports -h, use it for level0s too"
ac_help="$ac_help
  --enable-static[=PKGS]  build static libraries [default=yes]"
ac_help="$ac_help
  --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
ac_help="$ac_help
  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
ac_help="$ac_help
  --disable-libtool-lock  avoid locking (might break parallel builds)"

# 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=
SHELL=${CONFIG_SHELL-/bin/sh}
# Maximum number of lines to put in a shell here document.
ac_max_here_lines=12

ac_prev=
for ac_option
do

  # If the previous option needs an argument, assign it.
  if test -n "$ac_prev"; then
    eval "$ac_prev=\$ac_option"
    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.13"
    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${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross

ac_exeext=
ac_objext=o
if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
  # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
    ac_n= ac_c='
' ac_t='	'
  else
    ac_n=-n ac_c= ac_t=
  fi
else
  ac_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 ${CONFIG_SHELL-/bin/sh} $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:692: checking host system type" >&5

host_alias=$host
case "$host_alias" in
NONE)
  case $nonopt in
  NONE)
    if host_alias=`${CONFIG_SHELL-/bin/sh} $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=`${CONFIG_SHELL-/bin/sh} $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:713: 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=`${CONFIG_SHELL-/bin/sh} $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:731: 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=`${CONFIG_SHELL-/bin/sh} $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}-


  
  echo $ac_n "checking cached system tuple""... $ac_c" 1>&6
echo "configure:756: checking cached system tuple" >&5
  if { test x"${ac_cv_host_system_type+set}" = x"set" &&
       test x"$ac_cv_host_system_type" != x"$host"; } ||
     { test x"${ac_cv_build_system_type+set}" = x"set" &&
       test x"$ac_cv_build_system_type" != x"$build"; } ||
     { test x"${ac_cv_target_system_type+set}" = x"set" &&
       test x"$ac_cv_target_system_type" != x"$target"; }; then
      echo "$ac_t""different" 1>&6
      { echo "configure: error: remove config.cache and re-run configure" 1>&2; exit 1; }
  else
    echo "$ac_t""ok" 1>&6
  fi
  ac_cv_host_system_type="$host"
  ac_cv_build_system_type="$build"
  ac_cv_target_system_type="$target"

# 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
# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
# AFS /usr/afsws/bin/install, which mishandles nonexistent args
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
echo "configure:784: 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=":"
  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.
      # Don't use installbsd from OSF since it installs stuff as root
      # by default.
      for ac_prog in ginstall scoinst install; do
        if test -f $ac_dir/$ac_prog; then
	  if test $ac_prog = install &&
            grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
	    # AIX install.  It has an incompatible calling convention.
	    :
	  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_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'

test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'

echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
echo "configure:837: 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:894: 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.2p2

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:940: 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:953: 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:966: 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:979: 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:992: 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 -f "$srcdir/SNAPSHOT"; then
  cat < "$srcdir/SNAPSHOT"

  snapdate=`sed -n '/^Snapshot Date: \([0-9]*\)/ s//\1/p' < $srcdir/SNAPSHOT`

  test -z "$snapdate" || VERSION="$VERSION-$snapdate"
  SNAPSHOT_STAMP=SNAPSHOT
else
  SNAPSHOT_STAMP=
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 $LIBRARY_DIRS; 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


case "$target" in
    *-hp-*)
	CLIENT_SCRIPTS_OPT=amhpfixdevs
	;;
    *-sni-sysv4)
	CLIENT_SCRIPTS_OPT=amsinixfixdevs
	;;
    *)
	CLIENT_SCRIPTS_OPT=
	;;
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-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-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-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=false;;
	n | no) NO_RECOVER_MODE=true;;
	*)
	    { 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-owner or --without-owner was given.
if test "${with_owner+set}" = set; then
  withval="$with_owner"
  
        case "$withval" in
        "" | y | ye | yes | n | no)
            { echo "configure: error: *** You must supply an argument to the --with-owner option." 1>&2; exit 1; }
          ;;
        *) BINARY_OWNER="$withval"
          ;;
        esac
    

fi

if test "x${BINARY_OWNER+set}" != xset ; then
   BINARY_OWNER=$CLIENT_LOGIN
fi
cat >> confdefs.h <<EOF
#define BINARY_OWNER "$BINARY_OWNER"
EOF



# 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:1497: 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-ftape-raw-device or --without-ftape-raw-device was given.
if test "${with_ftape_raw_device+set}" = set; then
  withval="$with_ftape_raw_device"
  
	case "$withval" in
	"" | y | ye | yes | n | no)
	    { echo "configure: error: *** You must supply an argument to the --with-ftape-rawdevice option." 1>&2; exit 1; }
	  ;;
	*) DEFAULT_RAW_TAPE_DEVICE="$withval"
	  ;;
	esac
    
else
  
	if test -z "$DEFAULT_RAW_TAPE_DEVICE"; then
	    echo $ac_n "checking for raw ftape device""... $ac_c" 1>&6
echo "configure:1555: checking for raw ftape device" >&5
	    	    raw_tape_dev=/dev/null
				for num in 3 2 1 0 ; do
		    td=/dev/rawft${num}
		    if test -r $td; then
			raw_tape_dev=$td
		    fi
		done
	    DEFAULT_RAW_TAPE_DEVICE=$raw_tape_dev
	    echo "$ac_t""$DEFAULT_RAW_TAPE_DEVICE" 1>&6
	fi
    

fi


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

cat >> confdefs.h <<EOF
#define DEFAULT_RAW_TAPE_DEVICE "$DEFAULT_RAW_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-broken-fsf or --without-broken-fsf was given.
if test "${with_broken_fsf+set}" = set; then
  withval="$with_broken_fsf"
  HAVE_BROKEN_FSF=$withval
else
  : ${HAVE_BROKEN_FSF=no}

fi

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

  ;;
*) { echo "configure: error: *** You must not supply an argument to --with-broken-fsf 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";;
	    y|ye|yes) :;;
	    n|no) GNUTAR=;;
	    *)  { 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
	    /*) SAMBA_CLIENT="$withval";;
	    y|ye|yes) :;;
	    n|no) SAMBA_CLIENT=;;
	    *)  { echo "configure: error: *** You must supply a full pathname to --with-smbclient" 1>&2; exit 1; };;
	esac
    

fi


# Check whether --with-samba-user or --without-samba-user was given.
if test "${with_samba_user+set}" = set; then
  withval="$with_samba_user"
      { echo "configure: error: *** The samba-user option was deprecated, the username go in the amandapass" 1>&2; exit 1; }
   

fi


# 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=yes}

fi

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

    ;;
  esac
  ;;
*) { 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:1811: checking for Kerberos and Amanda kerberos4 bits" >&5
if test "${KRB4_SECURITY}" = yes -a -f  ${srcdir-.}/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

	    if test -d $dir/include/kerberosIV ; then
		#
		# This handles BSD/OS.
		#
	        KRB4INCLUDES=-I$dir/include/kerberosIV
	    else
		KRB4INCLUDES=-I$dir/include
	    fi
	    KRB4LDFLAGS=-L$dir/lib
	    KRB4LIBS="-lkrb -ldes"
	    break
	elif test -f ${dir}/lib/libkrb4.a &&
	     test -f ${dir}/lib/libcrypto.a &&
	     test -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
	    if test -f ${dir}/lib/libkrb5.a &&
               test -f ${dir}/lib/libcom_err.a; then
		KRB4LIBS="-lkrb4 -lkrb5 -lcrypto -ldes425 -lcom_err"
	    else
		KRB4LIBS="-lkrb4 -lcrypto -ldes425"
	    fi
	    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


# Assume it's either KEYFILE (defined in krb.h), or a string filename...
if test "$CLIENT_HOST_KEY_FILE" != "KEYFILE"; then
  CLIENT_HOST_KEY_FILE="\"$CLIENT_HOST_KEY_FILE\""
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-portrange or --without-portrange was given.
if test "${with_portrange+set}" = set; then
  withval="$with_portrange"
  
	PORTRANGE="$withval"
    

fi

if test x"${PORTRANGE+set}" = x"set"; then
    if test x`echo "$PORTRANGE" | sed 's/[0-9]*,[0-9]*//'` != x""; then
    	{ echo "configure: error: *** --with-portrange requires two comma-separated non-negative numbers" 1>&2; exit 1; }
    fi
    if echo "$PORTRANGE" | sed s/,/\ / | {
       read min max && test "$min" -le "$max"; }; then :
    else
	{ echo "configure: error: *** the second port number must be greater than the first one in --with-portrange" 1>&2; exit 1; }
    fi
    cat >> confdefs.h <<EOF
#define PORTRANGE $PORTRANGE
EOF

fi

# Check whether --with-udpportrange or --without-udpportrange was given.
if test "${with_udpportrange+set}" = set; then
  withval="$with_udpportrange"
  
	UDPPORTRANGE="$withval"
    

fi

if test x"${UDPPORTRANGE+set}" = x"set"; then
    if test x`echo "$UDPPORTRANGE" | sed 's/[0-9]*,[0-9]*//'` != x""; then
    	{ echo "configure: error: *** --with-udpportrange requires two comma-separated non-negative numbers" 1>&2; exit 1; }
    fi
    if echo "$UDPPORTRANGE" | sed s/,/\ / | {
       read min max && test "$min" -le "$max"; }; then :
    else
	{ echo "configure: error: *** the second port number must be greater than the first one in --with-udpportrange" 1>&2; exit 1; }
    fi
    cat >> confdefs.h <<EOF
#define UDPPORTRANGE $UDPPORTRANGE
EOF

fi

# 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-tmpdir or --without-tmpdir was given.
if test "${with_tmpdir+set}" = set; then
  withval="$with_tmpdir"
  tmpdir="$withval"
else
  : ${tmpdir=yes}

fi

tmpdir=`(
    test "x$prefix" = xNONE && prefix=$ac_default_prefix
    test "x$exec_prefix" = xNONE && exec_prefix=${prefix}
    eval echo "$tmpdir"
)`
case "$tmpdir" in
n | no) { echo "configure: error: *** --without-tmpdir is not allowed." 1>&2; exit 1; };;
y |  ye | yes)
	AMANDA_TMPDIR="/tmp/amanda";;
/*)
	AMANDA_TMPDIR="$tmpdir";;
*) { echo "configure: error: *** You must supply a full pathname to --with-tmpdir option." 1>&2; exit 1; };;
esac
cat >> confdefs.h <<EOF
#define AMANDA_TMPDIR "$AMANDA_TMPDIR"
EOF



# 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) AMANDA_DBGDIR="";;
y |  ye | yes) AMANDA_DBGDIR="$AMANDA_TMPDIR" ;;
/*) AMANDA_DBGDIR="$debugging" ;;
*) { echo "configure: error: *** You must supply a full pathname to --with-debugging option." 1>&2; exit 1; }
  ;;
esac
case "$AMANDA_DBGDIR" in
"") :;;
*) cat >> confdefs.h <<\EOF
#define DEBUG_CODE 1
EOF

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

   ;;
esac

# Check whether --with-debug_days or --without-debug_days was given.
if test "${with_debug_days+set}" = set; then
  withval="$with_debug_days"
  debug_days="$withval"
else
  : ${debug_days=4}

fi

case "$debug_days" in
n | no) AMANDA_DEBUG_DAYS=0 ;;
y |  ye | yes) AMANDA_DEBUG_DAYS=4 ;;
[0-9] | [0-9][0-9] | [0-9][0-9][0-9]) AMANDA_DEBUG_DAYS="$debug_days" ;;
*) { echo "configure: error: *** --with-debug-days value not numeric or out of range." 1>&2; exit 1; }
  ;;
esac
cat >> confdefs.h <<EOF
#define AMANDA_DEBUG_DAYS $AMANDA_DEBUG_DAYS
EOF



# 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-shared or --disable-shared was given.
if test "${enable_shared+set}" = set; then
  enableval="$enable_shared"
  p=${PACKAGE-default}
case "$enableval" in
yes) enable_shared=yes ;;
no) enable_shared=no ;;
*)
  enable_shared=no
  # Look at the argument we got.  We use all the common list separators.
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
  for pkg in $enableval; do
    if test "X$pkg" = "X$p"; then
      enable_shared=yes
    fi
  done
  IFS="$ac_save_ifs"
  ;;
esac
else
  enable_shared=no
fi
 # 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 | y |  ye | yes) : ;;
*) { echo "configure: error: *** You must not supply an argument to --enable-libtool" 1>&2; exit 1; }
esac


if test x"$USE_LIBTOOL" = x"yes"; then
  WANT_LIBTOOL_TRUE=
  WANT_LIBTOOL_FALSE='#'
else
  WANT_LIBTOOL_TRUE='#'
  WANT_LIBTOOL_FALSE=
fi

(
    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:2348: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$CC"; then
  ac_cv_prog_CC="$CC" # Let the user override the test.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_prog_CC="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:2378: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$CC"; then
  ac_cv_prog_CC="$CC" # Let the user override the test.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_prog_rejected=no
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
        ac_prog_rejected=yes
	continue
      fi
      ac_cv_prog_CC="cc"
      break
    fi
  done
  IFS="$ac_save_ifs"
if test $ac_prog_rejected = yes; then
  # We found a bogon in the path, so make sure we never use it.
  set dummy $ac_cv_prog_CC
  shift
  if test $# -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

  if test -z "$CC"; then
    case "`uname -s`" in
    *win32* | *WIN32*)
      # Extract the first word of "cl", so it can be a program name with args.
set dummy cl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2429: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$CC"; then
  ac_cv_prog_CC="$CC" # Let the user override the test.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_prog_CC="cl"
      break
    fi
  done
  IFS="$ac_save_ifs"
fi
fi
CC="$ac_cv_prog_CC"
if test -n "$CC"; then
  echo "$ac_t""$CC" 1>&6
else
  echo "$ac_t""no" 1>&6
fi
 ;;
    esac
  fi
  test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
fi

echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
echo "configure:2461: 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${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross

cat > conftest.$ac_ext << EOF

#line 2472 "configure"
#include "confdefs.h"

main(){return(0);}
EOF
if { (eval echo configure:2477: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  ac_cv_prog_cc_works=yes
  # If we can't run a trivial program, we are probably using a cross compiler.
  if (./conftest; exit) 2>/dev/null; then
    ac_cv_prog_cc_cross=no
  else
    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*
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross

echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
if test $ac_cv_prog_cc_works = no; then
  { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
echo "configure:2503: 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:2508: 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:2517: \"$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
else
  GCC=
fi

ac_test_CFLAGS="${CFLAGS+set}"
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
echo "configure:2536: 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
  if test "$GCC" = yes; then
    CFLAGS="-g -O2"
  else
    CFLAGS="-g"
  fi
else
  if test "$GCC" = yes; then
    CFLAGS="-O2"
  else
    CFLAGS=
  fi
fi

echo $ac_n "checking for object suffix""... $ac_c" 1>&6
echo "configure:2568: checking for object suffix" >&5
if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  rm -f conftest*
echo 'int i = 1;' > conftest.$ac_ext
if { (eval echo configure:2574: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  for ac_file in conftest.*; do
    case $ac_file in
    *.c) ;;
    *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
    esac
  done
else
  { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
fi
rm -f conftest*
fi

echo "$ac_t""$ac_cv_objext" 1>&6
OBJEXT=$ac_cv_objext
ac_objext=$ac_cv_objext

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

int main() {

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

echo "$ac_t""$ac_cv_cygwin" 1>&6
CYGWIN=
test "$ac_cv_cygwin" = yes && CYGWIN=yes
echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
echo "configure:2625: checking for mingw32 environment" >&5
if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 2630 "configure"
#include "confdefs.h"

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

echo "$ac_t""$ac_cv_mingw32" 1>&6
MINGW32=
test "$ac_cv_mingw32" = yes && MINGW32=yes


echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
echo "configure:2656: checking for executable suffix" >&5
if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
  ac_cv_exeext=.exe
else
  rm -f conftest*
  echo 'int main () { return 0; }' > conftest.$ac_ext
  ac_cv_exeext=
  if { (eval echo configure:2666: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
    for file in conftest.*; do
      case $file in
      *.c | *.o | *.obj) ;;
      *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
      esac
    done
  else
    { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
  fi
  rm -f conftest*
  test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
fi
fi

EXEEXT=""
test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
echo "$ac_t""${ac_cv_exeext}" 1>&6
ac_exeext=$EXEEXT


DUMP_PROGRAMS="ufsdump dump backup"
GETCONF_LFS="LFS"

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

			;;
    *-dg-*)
			DUMP_PROGRAMS="dump "$DUMP_PROGRAMS
			: ${USE_RUNDUMP=yes}
			dump_returns_1=yes
			;;
    *-netbsd*)
			;;
    *-freebsd*)
			;;
    *-openbsd*)
			;;
    *-hp-*)
			MT_FILE_FLAG="-t"
			GETCONF_LFS="XBS5_ILP32_OFFBIG"
			case "$CC" in
			    *gcc*)
				AMANDA_CPPFLAGS="-D__STDC_EXT__ $AMANDA_CPPFLAGS"
				;;
			    *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-*)
			;;
  sparc*-*-linux-*)
			;;
  powerpc-*-linux-*)
			;;
  *-sgi-irix3*)
						CC=gcc
			;;
  *-sgi-irix4*)
			;;
  *-sgi-irix5*)
			;;
  *-sgi-irix6*)
			;;
  *-solaris2*)
			;;
  *-sun-sunos4.1*)
			;;
  *-ultrix*)
			: ${USE_RUNDUMP=yes}
			cat >> confdefs.h <<\EOF
#define STATFS_ULTRIX 1
EOF

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

			;;
  *-sco3.2v5*)
			xenix_tapeio=yes
			cat >> confdefs.h <<\EOF
#define STATFS_SCO_OS5 1
EOF

			;;
  i386-pc-isc4*)
			xenix_tapeio=yes
			;;
  *-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 -n "$dump_returns_1"; then
  cat >> confdefs.h <<\EOF
#define DUMP_RETURNS_1 1
EOF

fi

if test -n "$xenix_tapeio"; then
  cat >> confdefs.h <<\EOF
#define XENIX_TAPEIO 1
EOF

fi

AMANDA_CFLAGS="$AMANDA_CFLAGS $KRB4INCLUDES"
AMANDA_CPPFLAGS="$AMANDA_CPPFLAGS $KRB4INCLUDES"
AMANDA_LDFLAGS="$AMANDA_LDFLAGS $KRB4LDFLAGS"
AMANDA_LIBS="$KRB4LIBS $AMANDA_LIBS"
CFLAGS="$CFLAGS $AMANDA_CFLAGS"
CPPFLAGS="$CPPFLAGS $AMANDA_CPPFLAGS"
LDFLAGS="$LDFLAGS $AMANDA_LDFLAGS"
LIBS="$AMANDA_LIBS $LIBS"


: ${MT_FILE_FLAG="-f"}

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


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:2838: 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.
  ;;
  ?:/*)			 
  ac_cv_path_AR="$AR" # Let the user override the test with a dos path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$LOCSYSPATH"
  for ac_dir in $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


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:2879: 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=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_prog_AWK="$ac_prog"
      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:2911: 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
    NO_AMPLOT_MODE=true
    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:2960: 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=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_prog_YACC="$ac_prog"
      break
    fi
  done
  IFS="$ac_save_ifs"
fi
fi
YACC="$ac_cv_prog_YACC"
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:2995: 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.
  ;;
  ?:/*)			 
  ac_cv_path_CAT="$CAT" # Let the user override the test with a dos path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$LOCSYSPATH"
  for ac_dir in $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:3038: 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.
  ;;
  ?:/*)			 
  ac_cv_path_COMPRESS="$COMPRESS" # Let the user override the test with a dos path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$LOCSYSPATH"
  for ac_dir in $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:3078: 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.
  ;;
  ?:/*)			 
  ac_cv_path_DD="$DD" # Let the user override the test with a dos path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$LOCSYSPATH"
  for ac_dir in $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:3118: 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.
  ;;
  ?:/*)			 
  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a dos path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$LOCSYSPATH"
  for ac_dir in $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:3158: 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.
  ;;
  ?:/*)			 
  ac_cv_path_GETCONF="$GETCONF" # Let the user override the test with a dos path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$SYSPATH"
  for ac_dir in $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:3199: 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.
  ;;
  ?:/*)			 
  ac_cv_path_GNUPLOT="$GNUPLOT" # Let the user override the test with a dos path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$LOCSYSPATH"
  for ac_dir in $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
    NO_AMPLOT_MODE=true
    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:3244: 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.
  ;;
  ?:/*)			 
  ac_cv_path_GREP="$GREP" # Let the user override the test with a dos path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$LOCSYSPATH"
  for ac_dir in $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:3292: 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.
  ;;
  ?:/*)			 
  ac_cv_path_GNUTAR="$GNUTAR" # Let the user override the test with a dos path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$LOCSYSPATH"
  for ac_dir in $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 ! -z "$GNUTAR"; then
  case "`\"$GNUTAR\" --version 2>&1`" in
   *GNU*tar* | *Free*paxutils* )
		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 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:3347: 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.
  ;;
  ?:/*)			 
  ac_cv_path_SAMBA_CLIENT="$SAMBA_CLIENT" # Let the user override the test with a dos path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$LOCSYSPATH"
  for ac_dir in $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
  case "`\"$SAMBA_CLIENT\" '\\\\not.a.host.name\\notashare' -U nosuchuser -N -Tx /dev/null 2>&1`" in
  *"Unknown host"*)
		smbversion=1
		;;
  *"Connection to not.a.host.name failed"*)
		smbversion=2
		;;
  *)
		echo "configure: warning: *** $SAMBA_CLIENT does not seem to be smbclient, so it will not be used." 1>&2
		SAMBA_CLIENT=
		;;
  esac
  if test -n "$SAMBA_CLIENT"; then
    cat >> confdefs.h <<EOF
#define SAMBA_CLIENT "$SAMBA_CLIENT"
EOF

    cat >> confdefs.h <<EOF
#define SAMBA_VERSION $smbversion
EOF

  fi

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:3414: 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.
  ;;
  ?:/*)			 
  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a dos path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$LOCSYSPATH"
  for ac_dir in $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

    COMPRESS_PATH="$GZIP"
    COMPRESS_SUFFIX=".gz"
    COMPRESS_FAST_OPT="--fast"
    COMPRESS_BEST_OPT="--best"
    UNCOMPRESS_PATH="$GZIP"
    UNCOMPRESS_OPT="-dc"
else
    if test "$COMPRESS"; then
	COMPRESS_PATH="$COMPRESS"
	COMPRESS_SUFFIX=".Z"
	COMPRESS_FAST_OPT="-f"
	COMPRESS_BEST_OPT="-f"
	UNCOMPRESS_PATH="$COMPRESS"
	UNCOMPRESS_OPT="-dc"
    else
				echo "configure: warning: *** Cannot find either gzip or compress.  Using cat. ***" 1>&2
	COMPRESS_PATH="$CAT"
	COMPRESS_SUFFIX=""
	COMPRESS_FAST_OPT=""
	COMPRESS_BEST_OPT=""
	UNCOMPRESS_PATH="$CAT"
	UNCOMPRESS_OPT=""
    fi
fi
cat >> confdefs.h <<EOF
#define COMPRESS_PATH "$COMPRESS_PATH"
EOF

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

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

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

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

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


for ac_prog in Mail mailx mail
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:3508: 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.
  ;;
  ?:/*)			 
  ac_cv_path_MAILER="$MAILER" # Let the user override the test with a dos path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do 
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_path_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 -z "$MAILER"; then
    if $NO_SERVER_MODE; then
	MAILER="NONE"
	echo "configure: warning: *** WARNING: Amanda cannot send mail reports without these programs." 1>&2
    else
	{ echo "configure: error: Set MAILER to some program that accepts -s subject user < message_file." 1>&2; exit 1; }
    fi
fi
cat >> confdefs.h <<EOF
#define MAILER "$MAILER"
EOF


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:3561: 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.
  ;;
  ?:/*)			 
  ac_cv_path_MT="$MT" # Let the user override the test with a dos path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$LOCSYSPATH"
  for ac_dir in $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
test -n "$MT" || MT="mt"


for ac_prog in chio
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:3603: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_CHIO'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$CHIO" in
  /*)
  ac_cv_path_CHIO="$CHIO" # Let the user override the test with a path.
  ;;
  ?:/*)			 
  ac_cv_path_CHIO="$CHIO" # Let the user override the test with a dos path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$LOCSYSPATH"
  for ac_dir in $ac_dummy; do 
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_path_CHIO="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  ;;
esac
fi
CHIO="$ac_cv_path_CHIO"
if test -n "$CHIO"; then
  echo "$ac_t""$CHIO" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

test -n "$CHIO" && break
done
test -n "$CHIO" || CHIO="chio"


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:3645: 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.
  ;;
  ?:/*)			 
  ac_cv_path_CHS="$CHS" # Let the user override the test with a dos path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$LOCSYSPATH"
  for ac_dir in $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
test -n "$CHS" || CHS="chs"


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:3687: 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.
  ;;
  ?:/*)			 
  ac_cv_path_MTX="$MTX" # Let the user override the test with a dos path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$LOCSYSPATH"
  for ac_dir in $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
test -n "$MTX" || MTX="mtx"


for ac_prog in lpr lp
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:3729: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_PRINT'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$PRINT" in
  /*)
  ac_cv_path_PRINT="$PRINT" # Let the user override the test with a path.
  ;;
  ?:/*)			 
  ac_cv_path_PRINT="$PRINT" # Let the user override the test with a dos path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do 
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_path_PRINT="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  ;;
esac
fi
PRINT="$ac_cv_path_PRINT"
if test -n "$PRINT"; then
  echo "$ac_t""$PRINT" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

test -n "$PRINT" && break
done

if test ! -z "$PRINT"; then
    cat >> confdefs.h <<EOF
#define LPRCMD "$PRINT"
EOF

    echo $ac_n "checking which flag to use to select a printer""... $ac_c" 1>&6
echo "configure:3770: checking which flag to use to select a printer" >&5
if eval "test \"`echo '$''{'amanda_cv_printer_flag'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
	amanda_cv_printer_flag=$PRINTER_FLAG
	case "$PRINT" in
	lpr|*/lpr) amanda_cv_printer_flag="-P";;
	lp|*/lp) amanda_cv_printer_flag="-d";;
	esac
    
fi

echo "$ac_t""$amanda_cv_printer_flag" 1>&6
    if test ! -z "$amanda_cv_printer_flag"; then
	cat >> confdefs.h <<EOF
#define LPRFLAG "$amanda_cv_printer_flag"
EOF

    else
	echo "configure: warning: *** WARNING: amanda will always print to the default printer" 1>&2
    fi
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:3799: 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.
  ;;
  ?:/*)			 
  ac_cv_path_PCAT="$PCAT" # Let the user override the test with a dos path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$LOCSYSPATH"
  for ac_dir in $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:3839: 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.
  ;;
  ?:/*)			 
  ac_cv_path_PERL="$PERL" # Let the user override the test with a dos path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$LOCSYSPATH"
  for ac_dir in $ac_dummy; do 
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_path_PERL="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  ;;
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


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:3881: 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.
  ;;
  ?:/*)			 
  ac_cv_path_SHELL="$SHELL" # Let the user override the test with a dos path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$LOCSYSPATH"
  for ac_dir in $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:3922: 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.
  ;;
  ?:/*)			 
  ac_cv_path_DUMP="$DUMP" # Let the user override the test with a dos path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$SYSLOCPATH"
  for ac_dir in $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

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:3962: 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.
  ;;
  ?:/*)			 
  ac_cv_path_RESTORE="$RESTORE" # Let the user override the test with a dos path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$SYSLOCPATH"
  for ac_dir in $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 "$DUMP" -a "$RESTORE"; then
    cat >> confdefs.h <<EOF
#define DUMP "$DUMP"
EOF

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

    if test -x $DUMP; then
        echo $ac_n "checking whether $DUMP supports -E or -S for estimates""... $ac_c" 1>&6
echo "configure:4008: checking whether $DUMP supports -E or -S 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)
		    { ac_try='$DUMP 9Ef /dev/null /dev/null/invalid/fs 2>&1
		        | $GREP -v Dumping
			| $GREP -v Date
			| $GREP -v Label >conftest.d-E 2>&1'; { (eval echo configure:4018: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }
		    cat conftest.d-E >&5
		    { ac_try='$DUMP 9Sf /dev/null /dev/null/invalid/fs 2>&1
		        | $GREP -v Dumping
			| $GREP -v Date
		        | $GREP -v Label >conftest.d-S 2>&1'; { (eval echo configure:4023: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }
		    cat conftest.d-S >&5
		    { ac_try='$DUMP 9f /dev/null /dev/null/invalid/fs 2>&1
		        | $GREP -v Dumping
			| $GREP -v Date
		        | $GREP -v Label >conftest.d 2>&1'; { (eval echo configure:4028: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }
		    cat conftest.d >&5
		    if { ac_try='cmp conftest.d-E conftest.d 1>&2'; { (eval echo configure:4030: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
		        amanda_cv_dump_estimate=E
		    elif { ac_try='cmp conftest.d-S conftest.d 1>&2'; { (eval echo configure:4032: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
			amanda_cv_dump_estimate=S
		    else
		        amanda_cv_dump_estimate=no
		    fi
		    rm -f conftest.d conftest.d-E conftest.d-S
	          ;;
	        *) amanda_cv_dump_estimate=no
	          ;;
	        esac
	    
fi

echo "$ac_t""$amanda_cv_dump_estimate" 1>&6
    else
	echo "configure: warning: *** $DUMP is not executable, cannot run -E/-S test" 1>&2
	amanda_cv_dump_estimate=no
    fi
    if test "$amanda_cv_dump_estimate" != no; then
	cat >> confdefs.h <<EOF
#define HAVE_DUMP_ESTIMATE "$amanda_cv_dump_estimate"
EOF

    fi

    # Check whether --with-dump-honor-nodump or --without-dump-honor-nodump was given.
if test "${with_dump_honor_nodump+set}" = set; then
  withval="$with_dump_honor_nodump"
   if test -x $DUMP; then
        echo $ac_n "checking whether $DUMP supports -h (honor nodump flag)""... $ac_c" 1>&6
echo "configure:4062: checking whether $DUMP supports -h (honor nodump flag)" >&5
if eval "test \"`echo '$''{'amanda_cv_honor_nodump'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
	    case "$DUMP" in
	    *dump)
		{ ac_try='$DUMP 9hf 0 /dev/null /dev/null/invalid/fs 2>&1
		    | $GREP -v Dumping
		    | $GREP -v Date
		    | $GREP -v Label >conftest.d-h 2>&1'; { (eval echo configure:4072: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }
		cat conftest.d-h >&5
		{ ac_try='$DUMP 9f /dev/null /dev/null/invalid/fs 2>&1
		    | $GREP -v Dumping
		    | $GREP -v Date
		    | $GREP -v Label >conftest.d 2>&1'; { (eval echo configure:4077: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }
		cat conftest.d >&5
		if { ac_try='diff conftest.d-h conftest.d 1>&2'; { (eval echo configure:4079: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
		    amanda_cv_honor_nodump=yes
		else
		    amanda_cv_honor_nodump=no
		fi
		rm -f conftest.d conftest.d-h
	      ;;
	    *) amanda_cv_honor_nodump=no
	      ;;
	    esac
	  
fi

echo "$ac_t""$amanda_cv_honor_nodump" 1>&6
      else
	echo "configure: warning: *** $DUMP is not executable, cannot run -h test" 1>&2
	amanda_cv_honor_nodump=no
      fi
      if test "$amanda_cv_honor_nodump" = yes; then
	cat >> confdefs.h <<\EOF
#define HAVE_HONOR_NODUMP 1
EOF

      fi
    
fi

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:4113: 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.
  ;;
  ?:/*)			 
  ac_cv_path_XFSDUMP="$XFSDUMP" # Let the user override the test with a dos path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$SYSLOCPATH"
  for ac_dir in $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

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:4153: 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.
  ;;
  ?:/*)			 
  ac_cv_path_XFSRESTORE="$XFSRESTORE" # Let the user override the test with a dos path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$SYSLOCPATH"
  for ac_dir in $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 "$XFSDUMP" -a "$XFSRESTORE"; then
    cat >> confdefs.h <<EOF
#define XFSDUMP "$XFSDUMP"
EOF

    cat >> confdefs.h <<EOF
#define XFSRESTORE "$XFSRESTORE"
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

VXSYSLOCPATH="$SYSLOCPATH:/usr/lib/fs/vxfs"
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:4207: 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.
  ;;
  ?:/*)			 
  ac_cv_path_VXDUMP="$VXDUMP" # Let the user override the test with a dos path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$VXSYSLOCPATH"
  for ac_dir in $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

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:4247: 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.
  ;;
  ?:/*)			 
  ac_cv_path_VXRESTORE="$VXRESTORE" # Let the user override the test with a dos path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$VXSYSLOCPATH"
  for ac_dir in $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 "$VXDUMP" -a "$VXRESTORE"; then
    cat >> confdefs.h <<EOF
#define VXDUMP "$VXDUMP"
EOF

    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:4298: 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.
  ;;
  ?:/*)			 
  ac_cv_path_VDUMP="$VDUMP" # Let the user override the test with a dos path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$SYSLOCPATH"
  for ac_dir in $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

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:4338: 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.
  ;;
  ?:/*)			 
  ac_cv_path_VRESTORE="$VRESTORE" # Let the user override the test with a dos path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$SYSLOCPATH"
  for ac_dir in $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 "$VDUMP" -a "$VRESTORE"; then
    cat >> confdefs.h <<EOF
#define VDUMP "$VDUMP"
EOF

    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=

need_resetofs=yes
echo $ac_n "checking for large file compilation CFLAGS""... $ac_c" 1>&6
echo "configure:4410: 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 ${GETCONF_LFS}_CFLAGS >/dev/null 2>&1; then
		amanda_cv_LFS_CFLAGS=`$GETCONF ${GETCONF_LFS}_CFLAGS 2>/dev/null`
		need_resetofs=no
	    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:4428: 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 ${GETCONF_LFS}_LDFLAGS >/dev/null 2>&1; then
		amanda_cv_LFS_LDFLAGS=`$GETCONF ${GETCONF_LFS}_LDFLAGS 2>/dev/null`
		need_resetofs=no
	    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:4446: 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 ${GETCONF_LFS}_LIBS >/dev/null 2>&1; then
		amanda_cv_LFS_LIBS=`$GETCONF ${GETCONF_LFS}_LIBS 2>/dev/null`
		need_resetofs=no
	    fi
	fi
    

fi

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

fi
CFLAGS="$amanda_cv_LFS_CFLAGS $CFLAGS"
CPPFLAGS="$amanda_cv_LFS_CFLAGS $CPPFLAGS"
LDFLAGS="$amanda_cv_LFS_LDFLAGS $LDFLAGS"
LIBS="$amanda_cv_LFS_LIBS $LIBS"

# Check whether --enable-static or --disable-static was given.
if test "${enable_static+set}" = set; then
  enableval="$enable_static"
  p=${PACKAGE-default}
case "$enableval" in
yes) enable_static=yes ;;
no) enable_static=no ;;
*)
  enable_static=no
  # Look at the argument we got.  We use all the common list separators.
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
  for pkg in $enableval; do
    if test "X$pkg" = "X$p"; then
      enable_static=yes
    fi
  done
  IFS="$ac_save_ifs"
  ;;
esac
else
  enable_static=yes
fi

# Check whether --enable-fast-install or --disable-fast-install was given.
if test "${enable_fast_install+set}" = set; then
  enableval="$enable_fast_install"
  p=${PACKAGE-default}
case "$enableval" in
yes) enable_fast_install=yes ;;
no) enable_fast_install=no ;;
*)
  enable_fast_install=no
  # Look at the argument we got.  We use all the common list separators.
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
  for pkg in $enableval; do
    if test "X$pkg" = "X$p"; then
      enable_fast_install=yes
    fi
  done
  IFS="$ac_save_ifs"
  ;;
esac
else
  enable_fast_install=yes
fi

# 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:4523: 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=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_prog_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

# 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:4562: checking for ld used by GCC" >&5
  ac_prog=`($CC -print-prog-name=ld) 2>&5`
  case "$ac_prog" in
    # Accept absolute paths.
    [\\/]* | [A-Za-z]:[\\/]*)
      re_direlt='/[^/][^/]*/\.\./'
      # Canonicalize the path of ld
      ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
	ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
      done
      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:4586: checking for GNU ld" >&5
else
  echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
echo "configure:4589: 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}${PATH_SEPARATOR-:}"
  for ac_dir in $PATH; do
    test -z "$ac_dir" && ac_dir=.
    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; 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:4625: 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:4641: 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
  if test -n "$NM"; then
  # Let the user override the test.
  ac_cv_path_NM="$NM"
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
  for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
      # Check to see if the nm accepts a BSD-compat flag.
      # Adding the `sed 1q' prevents false positives on HP-UX, which says:
      #   nm: unknown option "B" ignored
      if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
	ac_cv_path_NM="$ac_dir/nm -B"
	break
      elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
	ac_cv_path_NM="$ac_dir/nm -p"
	break
      else
	ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
	continue # so that we can try to find one that supports BSD flags
      fi
    fi
  done
  IFS="$ac_save_ifs"
  test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
fi
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:4678: 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


# Check for any special flags to pass to ltconfig.
libtool_flags="--cache-file=$cache_file"
test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
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"


# Check whether --enable-libtool-lock or --disable-libtool-lock was given.
if test "${enable_libtool_lock+set}" = set; then
  enableval="$enable_libtool_lock"
  :
fi

test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"

# Some flags need to be propagated to the compiler or linker for good
# libtool support.
case "$host" in
*-*-irix6*)
  # Find out which ABI we are using.
  echo '#line 4722 "configure"' > conftest.$ac_ext
  if { (eval echo configure:4723: \"$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.
  SAVE_CFLAGS="$CFLAGS"
  CFLAGS="$CFLAGS -belf"
  echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
echo "configure:4744: checking whether the C compiler needs -belf" >&5
if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 4749 "configure"
#include "confdefs.h"

int main() {

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

echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
    CFLAGS="$SAVE_CFLAGS"
  fi
  ;;


esac


# Save cache, so that ltconfig can load it
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 | grep ac_space) 2>&1` in
  *ac_space=\ *)
    # `set' does not quote correctly, so add quotes (double-quote substitution
    # turns \\\\ into \\, and sed turns \\ into \).
    sed -n \
      -e "s/'/'\\\\''/g" \
      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
    ;;
  *)
    # `set' quotes correctly as required by POSIX, so do not add quotes.
    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
    ;;
  esac >> confcache
if cmp -s $cache_file confcache; then
  :
else
  if test -w $cache_file; then
    echo "updating cache $cache_file"
    cat confcache > $cache_file
  else
    echo "not updating unwritable cache $cache_file"
  fi
fi
rm -f confcache


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

# Reload cache, that may have been modified by ltconfig
if test -r "$cache_file"; then
  echo "loading cache $cache_file"
  . $cache_file
else
  echo "creating cache $cache_file"
  > $cache_file
fi


# This can be used to rebuild libtool when needed
LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"

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

# Redirect the config.log output again, so that the ltconfig log is not
# clobbered by the next message.
exec 5>>./config.log



echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
echo "configure:4860: 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 4875 "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:4881: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  :
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  CPP="${CC-cc} -E -traditional-cpp"
  cat > conftest.$ac_ext <<EOF
#line 4892 "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:4898: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  :
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  CPP="${CC-cc} -nologo -E"
  cat > conftest.$ac_ext <<EOF
#line 4909 "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:4915: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  :
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  CPP=/lib/cpp
fi
rm -f conftest*
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:4941: 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 4947 "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 4965 "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:4987: 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 4992 "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:5041: \"$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:5063: 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 5069 "configure"
#include "confdefs.h"

int main() {

			volatile int aaa = 0;
		    
; return 0; }
EOF
if { (eval echo configure:5078: \"$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:5104: 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 5110 "configure"
#include "confdefs.h"

		    
int main() {

			long l = 1ul;
		    
; return 0; }
EOF
if { (eval echo configure:5120: \"$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:5145: 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 5150 "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:5158: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  ac_cv_header_stdc=yes
else
  echo "$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 5175 "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 5193 "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 5214 "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:5225: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./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:5249: 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 5254 "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 "(^|[^a-zA-Z_0-9])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:5282: 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 5287 "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 "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
  rm -rf conftest*
  ac_cv_type_pid_t=yes
else
  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:5315: 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 5320 "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 "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
  rm -rf conftest*
  ac_cv_type_size_t=yes
else
  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 ssize_t""... $ac_c" 1>&6
echo "configure:5353: checking for ssize_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 5358 "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 "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
  rm -rf conftest*
  ac_cv_type_ssize_t=yes
else
  rm -rf conftest*
  ac_cv_type_ssize_t=no
fi
rm -f conftest*

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

fi






echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
echo "configure:5391: 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 5396 "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:5425: 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 5430 "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:5447: \"$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:5466: 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 5471 "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:5479: \"$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

missing_dir=`cd $ac_aux_dir && pwd`
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:5505: 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=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_prog_LEX="$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:5538: 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=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_prog_LEX="flex"
      break
    fi
  done
  IFS="$ac_save_ifs"
  test -z "$ac_cv_prog_LEX" && ac_cv_prog_LEX="lex"
fi
fi
LEX="$ac_cv_prog_LEX"
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:5572: 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 5580 "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:5591: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  LEXLIB="-l$ac_lib"
else
  echo "$ac_t""no" 1>&6
fi

fi

echo $ac_n "checking lex output file root""... $ac_c" 1>&6
echo "configure:5614: 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:5635: 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 5647 "configure"
#include "confdefs.h"
`cat $LEX_OUTPUT_ROOT.c`
int main() {

; return 0; }
EOF
if { (eval echo configure:5654: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; 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:5677: 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 5682 "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:5690: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  ac_cv_header_stdc=yes
else
  echo "$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 5707 "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 5725 "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 5746 "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:5757: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./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:5785: 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 5790 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <$ac_hdr>
int main() {
DIR *dirp = 0;
; return 0; }
EOF
if { (eval echo configure:5798: \"$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:5823: 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 5831 "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:5842: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  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:5864: 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 5872 "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:5883: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  LIBS="$LIBS -lx"
else
  echo "$ac_t""no" 1>&6
fi

fi



for ac_hdr in sys/wait.h wait.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:5911: 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 5916 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:5921: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$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 whether wait uses union wait""... $ac_c" 1>&6
echo "configure:5948: checking whether wait uses union wait" >&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 5953 "configure"
#include "confdefs.h"

#include <sys/types.h>

#if HAVE_SYS_WAIT_H
# include <sys/wait.h>
#else
# if HAVE_WAIT_H
#  include <wait.h>
# endif
#endif

#ifdef __STDC__
pid_t wait(union wait *);
#endif

int main() {

  union wait x; int i;
  wait(&x); i = WIFEXITED(x)

; return 0; }
EOF
if { (eval echo configure:5977: \"$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
if test $cf_cv_arg_union_wait = yes; then
	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:5998: 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 6003 "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:6012: \"$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 \
	camlib.h \
	chio.h \
	db.h \
	dbm.h \
	fcntl.h \
	fstab.h \
	grp.h \
	history.h \
	libc.h \
	limits.h \
	linux/ftape-header-segment.h \
	linux/ftape-vendors.h \
	linux/ftape.h \
	linux/zftape.h \
	mntent.h \
	mnttab.h \
	ndbm.h \
	netdb.h \
	netinet/in_systm.h \
	netinet/ip.h \
	readline.h \
	readline/history.h \
	readline/readline.h \
	scsi/sg.h \
	scsi/scsi_ioctl.h \
	stdlib.h \
	string.h \
	strings.h \
	sys/chio.h \
	sys/dsreq.h \
	sys/fcntl.h \
	sys/file.h \
	sys/ioctl.h \
	sys/ipc.h \
	sys/mman.h \
	sys/mntent.h \
	sys/mount.h \
	sys/mtio.h \
	sys/param.h \
	sys/scarray.h \
	sys/scsiio.h \
	sys/scsi.h \
	sys/scsi/impl/uscsi.h \
	sys/scsi/scsi/ioctl.h \
	sys/select.h \
	sys/shm.h \
	sys/stat.h \
	sys/statfs.h \
	sys/statvfs.h \
	sys/tape.h \
	sys/time.h \
	sys/types.h \
	sys/vfs.h \
	sys/vfstab.h \
	syslog.h \
	unistd.h \
	vtblc.h \

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


NO_SCSI_CHANGER_MODE=true
NO_CHIO_CHANGER_MODE=true

echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
echo "configure:6136: checking whether byte ordering is bigendian" >&5
if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_cv_c_bigendian=unknown
# See if sys/param.h defines the BYTE_ORDER macro.
cat > conftest.$ac_ext <<EOF
#line 6143 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/param.h>
int main() {

#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
 bogus endian macros
#endif
; return 0; }
EOF
if { (eval echo configure:6154: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  # It does; now see whether it defined to BIG_ENDIAN or not.
cat > conftest.$ac_ext <<EOF
#line 6158 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/param.h>
int main() {

#if BYTE_ORDER != BIG_ENDIAN
 not big endian
#endif
; return 0; }
EOF
if { (eval echo configure:6169: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_c_bigendian=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_c_bigendian=no
fi
rm -f conftest*
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
fi
rm -f conftest*
if test $ac_cv_c_bigendian = unknown; then
if test "$cross_compiling" = yes; then
    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
else
  cat > conftest.$ac_ext <<EOF
#line 6189 "configure"
#include "confdefs.h"
main () {
  /* Are we little or big endian?  From Harbison&Steele.  */
  union
  {
    long l;
    char c[sizeof (long)];
  } u;
  u.l = 1;
  exit (u.c[sizeof (long) - 1] == 1);
}
EOF
if { (eval echo configure:6202: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  ac_cv_c_bigendian=no
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_c_bigendian=yes
fi
rm -fr conftest*
fi

fi
fi

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

fi


if test x"$ac_cv_header_sys_scsi_h" = x"yes"; then
   echo $ac_n "checking for HP/UX-like scsi changer support""... $ac_c" 1>&6
echo "configure:6228: checking for HP/UX-like scsi changer support" >&5
if eval "test \"`echo '$''{'amanda_cv_hpux_scsi_chio'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 6233 "configure"
#include "confdefs.h"

#include <sys/scsi.h>

int main() {

	static struct element_addresses changer_info;
	int i = SIOC_ELEMENT_ADDRESSES;
	int j = SIOC_ELEMENT_STATUS;
	int k = SIOC_MOVE_MEDIUM;

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

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

	NO_SCSI_CHANGER_MODE=false
    fi
fi

if test x"$ac_cv_header_sys_mtio_h" = x"yes" &&
   test x"$ac_cv_header_scsi_scsi_ioctl_h" = x"yes"; then 
	echo $ac_n "checking for Linux like scsi support (ioctl)""... $ac_c" 1>&6
echo "configure:6272: checking for Linux like scsi support (ioctl)" >&5
if eval "test \"`echo '$''{'amanda_cv_linux_scsi'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 6277 "configure"
#include "confdefs.h"

#include <scsi/scsi_ioctl.h>
#include <sys/mtio.h>

int main() {

	int device;
	char *Command;
	ioctl(device, SCSI_IOCTL_SEND_COMMAND, Command);

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

echo "$ac_t""$amanda_cv_linux_scsi" 1>&6
fi

if test x"$ac_cv_header_sys_mtio_h" = x"yes" &&
   test x"$ac_cv_header_scsi_sg_h" = x"yes"; then 
	echo $ac_n "checking for Linux like scsi support (sg)""... $ac_c" 1>&6
echo "configure:6309: checking for Linux like scsi support (sg)" >&5
if eval "test \"`echo '$''{'amanda_cv_linux_sg_scsi'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 6314 "configure"
#include "confdefs.h"

#include <scsi/sg.h>
#include <sys/mtio.h>

int main() {

	int device;
	struct sg_header *psg_header;
	char *buffer;
	write(device, buffer, 1);

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

echo "$ac_t""$amanda_cv_linux_sg_scsi" 1>&6
fi

if test x"$amanda_cv_linux_scsi" = x"yes" ||
 test x"$amanda_cv_linux_sg_scsi" = x"yes";then
	cat >> confdefs.h <<\EOF
#define HAVE_LINUX_LIKE_SCSI 1
EOF

	NO_SCSI_CHANGER_MODE=false
fi

if test x"$ac_cv_header_sys_mtio_h" = x"yes" &&
   test x"$ac_cv_header_sys_scsi_h" = x"yes"; then 
	echo $ac_n "checking for HP-UX like scsi support""... $ac_c" 1>&6
echo "configure:6356: checking for HP-UX like scsi support" >&5
if eval "test \"`echo '$''{'amanda_cv_hpux_scsi'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 6361 "configure"
#include "confdefs.h"

#include <stdio.h>
#include <sys/ioctl.h>
#include <sys/scsi.h>
#include <sys/mtio.h>

int main() {

	int device;
	char *Command;
	ioctl(device, SIOC_IO, Command);

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

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

		NO_SCSI_CHANGER_MODE=false
		NO_CHIO_CHANGER_MODE=false
	fi
fi
if test x"$ac_cv_header_sys_mtio_h" = x"yes" &&
   test x"$ac_cv_header_sys_dsreq_h" = x"yes"; then 
	echo $ac_n "checking for Irix like scsi support""... $ac_c" 1>&6
echo "configure:6402: checking for Irix like scsi support" >&5
if eval "test \"`echo '$''{'amanda_cv_irix_scsi'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 6407 "configure"
#include "confdefs.h"

#include <sys/types.h>
#include <sys/dsreq.h>
#include <sys/mtio.h>

int main() {

	int device=1;
	char Command;
	ioctl(device, DS_ENTER, &Command);

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

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

		NO_SCSI_CHANGER_MODE=false
	fi
fi
if test x"$ac_cv_header_sys_mtio_h" = x"yes" &&
   test x"$ac_cv_header_sys_scsi_impl_uscsi_h" = x"yes"; then 
	echo $ac_n "checking for Solaris like scsi support""... $ac_c" 1>&6
echo "configure:6446: checking for Solaris like scsi support" >&5
if eval "test \"`echo '$''{'amanda_cv_solaris_scsi'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 6451 "configure"
#include "confdefs.h"

#include <sys/types.h>
#include <sys/scsi/impl/uscsi.h>
#include <sys/mtio.h>

int main() {

	int device;
	char *Command;
	ioctl(device, USCSICMD, Command);

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

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

		NO_SCSI_CHANGER_MODE=false
	fi
fi
if test x"$ac_cv_header_sys_tape_h" = x"yes" &&
   test x"$ac_cv_header_sys_scarray_h" = x"yes"; then 
	echo $ac_n "checking for AIX like scsi support""... $ac_c" 1>&6
echo "configure:6490: checking for AIX like scsi support" >&5
if eval "test \"`echo '$''{'amanda_cv_aix_scsi'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 6495 "configure"
#include "confdefs.h"

#include <sys/types.h>
#include <sys/scarray.h>
#include <sys/tape.h>

int main() {

	int device;
	char *Command;
	ioctl(device, STIOCMD, Command);

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

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

		NO_SCSI_CHANGER_MODE=false
	fi
fi
if test x"$ac_cv_header_sys_mtio_h" = x"yes" &&
   test x"$ac_cv_header_sys_scsiio_h" = x"yes"; then
    echo $ac_n "checking for BSD like scsi support""... $ac_c" 1>&6
echo "configure:6534: checking for BSD like scsi support" >&5
if eval "test \"`echo '$''{'amanda_cv_bsd_scsi'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 6539 "configure"
#include "confdefs.h"

#include <sys/types.h>
#include <sys/scsiio.h>
#include <sys/mtio.h>

int main() {

    int device=1;
    char Command;
    ioctl(device, SCIOCCOMMAND, &Command);

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

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

       NO_SCSI_CHANGER_MODE=false
    fi
fi

if test x"$ac_cv_header_chio_h" = x"yes" ||
   test x"$ac_cv_header_sys_chio_h" = x"yes"; then
         if test x"$ac_cv_header_camlib_h" != x"yes"; then
     if $NO_SCSI_CHANGER_MODE; then
       NO_SCSI_CHANGER_MODE=false
     else
       NO_CHIO_CHANGER_MODE=false
     fi
   fi
fi

echo $ac_n "checking for main in -lcur_colr""... $ac_c" 1>&6
echo "configure:6588: 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 6596 "configure"
#include "confdefs.h"

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

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    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:6632: 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 6640 "configure"
#include "confdefs.h"

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

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    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:6678: 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 6686 "configure"
#include "confdefs.h"

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

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    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:6723: 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 6731 "configure"
#include "confdefs.h"

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

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    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:6766: 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 6774 "configure"
#include "confdefs.h"

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

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    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:6809: 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 6817 "configure"
#include "confdefs.h"

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

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    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:6855: 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 6863 "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:6874: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    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:6903: 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 6911 "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:6922: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    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:6951: 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 6959 "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:6970: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    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:7003: 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 7011 "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:7022: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    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

if test "$ac_cv_header_linux_zftape_h" = yes; then
    if test "$ac_cv_header_vtblc_h" = yes; then
        echo $ac_n "checking for main in -lvtblc""... $ac_c" 1>&6
echo "configure:7059: checking for main in -lvtblc" >&5
ac_lib_var=`echo vtblc'_'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="-lvtblc  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 7067 "configure"
#include "confdefs.h"

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

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_lib=HAVE_LIB`echo vtblc | sed -e 's/[^a-zA-Z0-9_]/_/g' \
    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  cat >> confdefs.h <<EOF
#define $ac_tr_lib 1
EOF

  LIBS="-lvtblc $LIBS"

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

        if test "$ac_cv_lib_vtblc_main" != yes; then
            echo "configure: warning: *** vtblc library not found - no QIC volume table support!" 1>&2
        fi
    else
        echo "configure: warning: *** vtblc headers not found - no QIC volume table support!" 1>&2
    fi
fi

echo $ac_n "checking for modf in -lm""... $ac_c" 1>&6
echo "configure:7110: 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 7118 "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:7129: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    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:7163: 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 7171 "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:7182: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    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:7215: 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 7223 "configure"
#include "confdefs.h"

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

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    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:7259: 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 7267 "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:7278: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    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:7330: 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 7338 "configure"
#include "confdefs.h"

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

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    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:7374: 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 7382 "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:7393: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    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:7445: 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 7453 "configure"
#include "confdefs.h"

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

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    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:7489: 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 7497 "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:7508: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    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:7560: 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 7568 "configure"
#include "confdefs.h"

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

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    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:7604: 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 7612 "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:7623: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    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:7692: 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_GDBM_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:7714: 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 7720 "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:7741: \"$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:7774: 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 7779 "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:7809: 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 7814 "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:7844: 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 7849 "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:7879: 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 7884 "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_have_accept=no
for ac_func in accept
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:7918: 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 7923 "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:7946: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 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:7972: 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 7983 "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 7999 "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 HAVE_ACCEPT_DECL 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:8029: 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 8034 "configure"
#include "confdefs.h"
#include <alloca.h>
int main() {
char *p = alloca(2 * sizeof(int));
; return 0; }
EOF
if { (eval echo configure:8041: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; 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:8062: 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 8067 "configure"
#include "confdefs.h"

#ifdef __GNUC__
# define alloca __builtin_alloca
#else
# ifdef _MSC_VER
#  include <malloc.h>
#  define alloca _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
#endif

int main() {
char *p = (char *) alloca(1);
; return 0; }
EOF
if { (eval echo configure:8095: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; 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.${ac_objext}
  cat >> confdefs.h <<\EOF
#define C_ALLOCA 1
EOF


echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
echo "configure:8127: 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 8132 "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:8157: 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 8162 "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:8185: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  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:8212: 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 8220 "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:8239: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./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:8263: 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 8268 "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:8291: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 
else
  echo "$ac_t""no" 1>&6
fi
done


ice_have_atof=no
for ac_func in atof
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:8320: 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 8325 "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:8348: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 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:8374: 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 8385 "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 8401 "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 HAVE_ATOF_DECL 1
EOF

fi
fi

for ac_func in basename
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:8431: 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 8436 "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:8459: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 
else
  echo "$ac_t""no" 1>&6
fi
done


ice_have_bind=no
for ac_func in bind
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:8488: 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 8493 "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:8516: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 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:8542: 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 8553 "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 8569 "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 HAVE_BIND_DECL 1
EOF

fi
fi


ice_have_bcopy=no
for ac_func in bcopy
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:8601: 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 8606 "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:8629: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 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 stdlib.h""... $ac_c" 1>&6
echo "configure:8655: checking for bcopy declaration in string.h strings.h stdlib.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 stdlib.h; do
# Check for ordinary declaration
cat > conftest.$ac_ext <<EOF
#line 8666 "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 8682 "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 HAVE_BCOPY_DECL 1
EOF

fi
fi


ice_have_bzero=no
for ac_func in bzero
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:8714: 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 8719 "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:8742: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 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 stdlib.h""... $ac_c" 1>&6
echo "configure:8768: checking for bzero declaration in string.h strings.h stdlib.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 stdlib.h; do
# Check for ordinary declaration
cat > conftest.$ac_ext <<EOF
#line 8779 "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 8795 "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 HAVE_BZERO_DECL 1
EOF

fi
fi

echo $ac_n "checking whether closedir returns void""... $ac_c" 1>&6
echo "configure:8823: 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 8831 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <$ac_header_dirent>
int closedir(); main() { exit(closedir(opendir(".")) != 0); }
EOF
if { (eval echo configure:8837: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./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_have_closelog=no
for ac_func in closelog
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:8864: 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 8869 "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:8892: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 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:8918: 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 8929 "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 8945 "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 HAVE_CLOSELOG_DECL 1
EOF

fi
fi


ice_have_connect=no
for ac_func in connect
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:8977: 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 8982 "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:9005: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 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:9031: 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 9042 "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 9058 "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 HAVE_CONNECT_DECL 1
EOF

fi
fi


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:9090: 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 9095 "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:9118: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 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:9144: 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 9155 "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 9171 "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 HAVE_DBM_OPEN_DECL 1
EOF

fi
fi


ice_have_fclose=no
for ac_func in fclose
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:9203: 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 9208 "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:9231: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 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:9257: 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 9268 "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 9284 "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 HAVE_FCLOSE_DECL 1
EOF

fi
fi


ice_have_fflush=no
for ac_func in fflush
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:9316: 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 9321 "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:9344: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 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:9370: 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 9381 "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 9397 "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 HAVE_FFLUSH_DECL 1
EOF

fi
fi


ice_have_flock=no
for ac_func in flock
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:9429: 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 9434 "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:9457: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 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:9483: 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 9494 "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 9510 "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 HAVE_FLOCK_DECL 1
EOF

fi
fi


ice_have_fprintf=no
for ac_func in fprintf
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:9542: 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 9547 "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:9570: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 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:9596: 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 9607 "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 9623 "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 HAVE_FPRINTF_DECL 1
EOF

fi
fi


ice_have_fputc=no
for ac_func in fputc
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:9655: 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 9660 "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:9683: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 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:9709: 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 9720 "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 9736 "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 HAVE_FPUTC_DECL 1
EOF

fi
fi


ice_have_fputs=no
for ac_func in fputs
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:9768: 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 9773 "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:9796: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 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:9822: 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 9833 "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 9849 "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 HAVE_FPUTS_DECL 1
EOF

fi
fi


ice_have_fread=no
for ac_func in fread
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:9881: 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 9886 "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:9909: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 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 stdlib.h""... $ac_c" 1>&6
echo "configure:9935: checking for fread declaration in stdio.h stdlib.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 stdlib.h; do
# Check for ordinary declaration
cat > conftest.$ac_ext <<EOF
#line 9946 "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 9962 "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 HAVE_FREAD_DECL 1
EOF

fi
fi


ice_have_fseek=no
for ac_func in fseek
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:9994: 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 9999 "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:10022: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 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:10048: 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 10059 "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 10075 "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 HAVE_FSEEK_DECL 1
EOF

fi
fi


ice_have_fwrite=no
for ac_func in fwrite
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:10107: 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 10112 "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:10135: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 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 stdlib.h""... $ac_c" 1>&6
echo "configure:10161: checking for fwrite declaration in stdio.h stdlib.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 stdlib.h; do
# Check for ordinary declaration
cat > conftest.$ac_ext <<EOF
#line 10172 "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 10188 "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 HAVE_FWRITE_DECL 1
EOF

fi
fi

for ac_func in getcwd
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:10218: 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 10223 "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:10246: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 
else
  echo "$ac_t""no" 1>&6
LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
fi
done


for ac_func in getfsent
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:10275: 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 10280 "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:10303: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 
else
  echo "$ac_t""no" 1>&6
fi
done


ice_have_gethostname=no
for ac_func in gethostname
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:10332: 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 10337 "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:10360: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 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:10386: 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 10397 "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 10413 "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 HAVE_GETHOSTNAME_DECL 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:10442: 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 10450 "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:10461: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  LIBS="-lsun $LIBS"
else
  echo "$ac_t""no" 1>&6
echo $ac_n "checking for getmntent in -lseq""... $ac_c" 1>&6
echo "configure:10480: 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 10488 "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:10499: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  LIBS="-lseq $LIBS"
else
  echo "$ac_t""no" 1>&6
echo $ac_n "checking for getmntent in -lgen""... $ac_c" 1>&6
echo "configure:10518: 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 10526 "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:10537: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  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:10562: 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 10567 "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:10590: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; 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_have_getopt=no
for ac_func in getopt
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:10617: 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 10622 "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:10645: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 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:10671: 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 10682 "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 10698 "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 HAVE_GETOPT_DECL 1
EOF

fi
fi


ice_have_getpeername=no
for ac_func in getpeername
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:10730: 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 10735 "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:10758: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 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:10784: 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 10795 "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 10811 "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 HAVE_GETPEERNAME_DECL 1
EOF

fi
fi

for ac_func in getpgrp
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:10841: 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 10846 "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:10869: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 
else
  echo "$ac_t""no" 1>&6
fi
done

echo $ac_n "checking whether getpgrp takes no argument""... $ac_c" 1>&6
echo "configure:10894: checking whether getpgrp takes no argument" >&5
if eval "test \"`echo '$''{'ac_cv_func_getpgrp_void'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  { echo "configure: error: cannot check getpgrp if cross compiling" 1>&2; exit 1; }
else
  cat > conftest.$ac_ext <<EOF
#line 10902 "configure"
#include "confdefs.h"

/*
 * If this system has a BSD-style getpgrp(),
 * which takes a pid argument, exit unsuccessfully.
 *
 * Snarfed from Chet Ramey's bash pgrp.c test program
 */
#include <stdio.h>
#include <sys/types.h>

int     pid;
int     pg1, pg2, pg3, pg4;
int     ng, np, s, child;

main()
{
        pid = getpid();
        pg1 = getpgrp(0);
        pg2 = getpgrp();
        pg3 = getpgrp(pid);
        pg4 = getpgrp(1);

        /*
         * If all of these values are the same, it's pretty sure that
         * we're on a system that ignores getpgrp's first argument.
         */
        if (pg2 == pg4 && pg1 == pg3 && pg2 == pg3)
                exit(0);

        child = fork();
        if (child < 0)
                exit(1);
        else if (child == 0) {
                np = getpid();
                /*
                 * If this is Sys V, this will not work; pgrp will be
                 * set to np because setpgrp just changes a pgrp to be
                 * the same as the pid.
                 */
                setpgrp(np, pg1);
                ng = getpgrp(0);        /* Same result for Sys V and BSD */
                if (ng == pg1) {
                        exit(1);
                } else {
                        exit(0);
                }
        } else {
                wait(&s);
                exit(s>>8);
        }
}

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


fi

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

fi


ice_have_getsockname=no
for ac_func in getsockname
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:10985: 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 10990 "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:11013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 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:11039: 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 11050 "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 11066 "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 HAVE_GETSOCKNAME_DECL 1
EOF

fi
fi


ice_have_getsockopt=no
for ac_func in getsockopt
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:11098: 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 11103 "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:11126: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 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:11152: 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 11163 "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 11179 "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 HAVE_GETSOCKOPT_DECL 1
EOF

fi
fi


ice_have_gettimeofday=no
for ac_func in gettimeofday
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:11211: 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 11216 "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:11239: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 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:11265: 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 11276 "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 11292 "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 HAVE_GETTIMEOFDAY_DECL 1
EOF

fi
fi


	
	echo $ac_n "checking for gettimeofday number of arguments""... $ac_c" 1>&6
echo "configure:11322: 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 11328 "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:11350: \"$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 initgroups isascii
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:11377: 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 11382 "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:11405: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 
else
  echo "$ac_t""no" 1>&6
fi
done


ice_have_initgroups=no
for ac_func in initgroups
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:11434: 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 11439 "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:11462: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 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:11488: 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 11499 "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 11515 "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 HAVE_INITGROUPS_DECL 1
EOF

fi
fi


ice_have_ioctl=no
for ac_func in ioctl
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:11547: 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 11552 "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:11575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 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:11601: 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 11612 "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 11628 "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 HAVE_IOCTL_DECL 1
EOF

fi
fi


ice_have_listen=no
for ac_func in listen
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:11660: 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 11665 "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:11688: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 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:11714: 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 11725 "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 11741 "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 HAVE_LISTEN_DECL 1
EOF

fi
fi


ice_have_lstat=no
for ac_func in lstat
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:11773: 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 11778 "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:11801: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 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:11827: 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 11838 "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 11854 "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 HAVE_LSTAT_DECL 1
EOF

fi
fi


ice_have_malloc=no
for ac_func in malloc
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:11886: 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 11891 "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:11914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 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:11940: 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 11951 "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 11967 "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 HAVE_MALLOC_DECL 1
EOF

fi
fi

for ac_func in memmove
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:11997: 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 12002 "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:12025: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 
else
  echo "$ac_t""no" 1>&6
LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
fi
done



ice_have_memmove=no
for ac_func in memmove
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:12056: 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 12061 "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:12084: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 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 strings.h""... $ac_c" 1>&6
echo "configure:12110: checking for memmove declaration in string.h strings.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 strings.h; do
# Check for ordinary declaration
cat > conftest.$ac_ext <<EOF
#line 12121 "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 12137 "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 HAVE_MEMMOVE_DECL 1
EOF

fi
fi


ice_have_memset=no
for ac_func in memset
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:12169: 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 12174 "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:12197: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 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:12223: 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 12234 "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 12250 "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 HAVE_MEMSET_DECL 1
EOF

fi
fi

for ac_func in mkdir
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:12280: 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 12285 "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:12308: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 
else
  echo "$ac_t""no" 1>&6
fi
done


ice_have_mktemp=no
for ac_func in mktemp
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:12337: 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 12342 "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:12365: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 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:12391: 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 12402 "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 12418 "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 HAVE_MKTEMP_DECL 1
EOF

fi
fi

for ac_func in mktime
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:12448: 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 12453 "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:12476: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 
else
  echo "$ac_t""no" 1>&6
LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
fi
done



ice_have_mktime=no
for ac_func in mktime
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:12507: 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 12512 "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:12535: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 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:12561: 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 12572 "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 12588 "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 HAVE_MKTIME_DECL 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:12619: 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 12624 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:12629: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$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:12658: 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 12663 "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:12686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 
else
  echo "$ac_t""no" 1>&6
fi
done

echo $ac_n "checking for working mmap""... $ac_c" 1>&6
echo "configure:12711: 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 12719 "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:12859: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./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:12884: 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 12889 "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:12912: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 
else
  echo "$ac_t""no" 1>&6
fi
done


ice_have_openlog=no
for ac_func in openlog
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:12941: 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 12946 "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:12969: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 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:12995: 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 13006 "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 13022 "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 HAVE_OPENLOG_DECL 1
EOF

fi
fi


ice_have_pclose=no
for ac_func in pclose
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:13054: 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 13059 "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:13082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 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:13108: 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 13119 "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 13135 "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 HAVE_PCLOSE_DECL 1
EOF

fi
fi


ice_have_perror=no
for ac_func in perror
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:13167: 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 13172 "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:13195: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 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:13221: 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 13232 "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 13248 "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 HAVE_PERROR_DECL 1
EOF

fi
fi


ice_have_printf=no
for ac_func in printf
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:13280: 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 13285 "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:13308: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 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:13334: 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 13345 "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 13361 "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 HAVE_PRINTF_DECL 1
EOF

fi
fi

for ac_func in putenv
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:13391: 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 13396 "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:13419: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 
else
  echo "$ac_t""no" 1>&6
fi
done


ice_have_puts=no
for ac_func in puts
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:13448: 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 13453 "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:13476: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 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:13502: 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 13513 "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 13529 "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 HAVE_PUTS_DECL 1
EOF

fi
fi


ice_have_realloc=no
for ac_func in realloc
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:13561: 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 13566 "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:13589: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 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:13615: 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 13626 "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 13642 "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 HAVE_REALLOC_DECL 1
EOF

fi
fi


ice_have_recvfrom=no
for ac_func in recvfrom
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:13674: 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 13679 "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:13702: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 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:13728: 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 13739 "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 13755 "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 HAVE_RECVFROM_DECL 1
EOF

fi
fi


ice_have_remove=no
for ac_func in remove
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:13787: 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 13792 "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:13815: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 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:13841: 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 13852 "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 13868 "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 HAVE_REMOVE_DECL 1
EOF

fi
fi


ice_have_rename=no
for ac_func in rename
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:13900: 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 13905 "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:13928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 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:13954: 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 13965 "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 13981 "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 HAVE_RENAME_DECL 1
EOF

fi
fi


ice_have_rewind=no
for ac_func in rewind
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:14013: 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 14018 "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:14041: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 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:14067: 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 14078 "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 14094 "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 HAVE_REWIND_DECL 1
EOF

fi
fi

for ac_func in rmdir
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:14124: 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 14129 "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:14152: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 
else
  echo "$ac_t""no" 1>&6
fi
done


ice_have_ruserok=no
for ac_func in ruserok
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:14181: 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 14186 "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:14209: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 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:14235: 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 14246 "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 14262 "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 HAVE_RUSEROK_DECL 1
EOF

fi
fi


ice_have_select=no
for ac_func in select
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:14294: 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 14299 "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:14322: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 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:14348: 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 14359 "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 14375 "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 HAVE_SELECT_DECL 1
EOF

fi
fi


	echo $ac_n "checking for select() argument type""... $ac_c" 1>&6
echo "configure:14404: 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_have_sendto=no
for ac_func in sendto
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:14477: 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 14482 "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:14505: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 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:14531: 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 14542 "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 14558 "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 HAVE_SENDTO_DECL 1
EOF

fi
fi


ice_have_setegid=no
for ac_func in setegid
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:14590: 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 14595 "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:14618: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 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:14644: 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 14655 "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 14671 "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 HAVE_SETEGID_DECL 1
EOF

fi
fi


ice_have_seteuid=no
for ac_func in seteuid
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:14703: 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 14708 "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:14731: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 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:14757: 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 14768 "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 14784 "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 HAVE_SETEUID_DECL 1
EOF

fi
fi

for ac_func in setmntent
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:14814: 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 14819 "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:14842: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 
else
  echo "$ac_t""no" 1>&6
fi
done



ice_have_setresgid=no
for ac_func in setresgid
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:14872: 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 14877 "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:14900: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 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:14926: 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 14937 "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 14953 "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 HAVE_SETRESGID_DECL 1
EOF

fi
fi


ice_have_setresuid=no
for ac_func in setresuid
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:14985: 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 14990 "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:15013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 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:15039: 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 15050 "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 15066 "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 HAVE_SETRESUID_DECL 1
EOF

fi
fi


echo $ac_n "checking for setpgid""... $ac_c" 1>&6
echo "configure:15095: 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 15100 "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:15123: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; 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_have_setpgid=no
for ac_func in setpgid
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:15147: 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 15152 "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:15175: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 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:15201: 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 15212 "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 15228 "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 HAVE_SETPGID_DECL 1
EOF

fi
fi


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

echo $ac_n "checking for setpgrp""... $ac_c" 1>&6
echo "configure:15261: 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 15266 "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:15289: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; 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:15304: 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 15312 "configure"
#include "confdefs.h"

#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif

/*
 * 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:15332: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./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_have_setpgrp=no
for ac_func in setpgrp
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:15364: 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 15369 "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:15392: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 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:15418: 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 15429 "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 15445 "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 HAVE_SETPGRP_DECL 1
EOF

fi
fi



ice_have_setsockopt=no
for ac_func in setsockopt
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:15478: 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 15483 "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:15506: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 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:15532: 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 15543 "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 15559 "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 HAVE_SETSOCKOPT_DECL 1
EOF

fi
fi


for ac_func in shmget
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:15590: 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 15595 "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:15618: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 
	
	echo $ac_n "checking for shmdt() argument type""... $ac_c" 1>&6
echo "configure:15639: 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_have_shmat=no
for ac_func in shmat
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:15710: 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 15715 "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:15738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 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:15764: 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 15775 "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 15791 "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 HAVE_SHMAT_DECL 1
EOF

fi
fi


ice_have_shmctl=no
for ac_func in shmctl
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:15823: 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 15828 "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:15851: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 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:15877: 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 15888 "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 15904 "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 HAVE_SHMCTL_DECL 1
EOF

fi
fi


ice_have_shmdt=no
for ac_func in shmdt
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:15936: 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 15941 "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:15964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 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:15990: 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 16001 "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 16017 "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 HAVE_SHMDT_DECL 1
EOF

fi
fi


ice_have_shmget=no
for ac_func in shmget
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:16049: 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 16054 "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:16077: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 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:16103: 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 16114 "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 16130 "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 HAVE_SHMGET_DECL 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_have_snprintf=no
for ac_func in snprintf
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:16180: 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 16185 "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:16208: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 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:16234: 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 16245 "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 16261 "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 HAVE_SNPRINTF_DECL 1
EOF

fi
fi


ice_have_vsnprintf=no
for ac_func in vsnprintf
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:16293: 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 16298 "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:16321: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 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:16347: 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 16358 "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 16374 "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 HAVE_VSNPRINTF_DECL 1
EOF

fi
fi

if test x"$ice_have_snprintf" != x"yes" ||
   test x"$ice_have_vsnprintf" != x"yes"; then
    LIBOBJS="$LIBOBJS snprintf.${ac_objext}"
    if false; then :
		for ac_func in snprintf
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:16408: 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 16413 "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:16436: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 
else
  echo "$ac_t""no" 1>&6
LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
fi
done

 
    fi
fi

for ac_func in sigaction sigemptyset sigvec
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:16468: 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 16473 "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:16496: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 
else
  echo "$ac_t""no" 1>&6
fi
done


ice_have_socket=no
for ac_func in socket
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:16525: 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 16530 "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:16553: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 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:16579: 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 16590 "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 16606 "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 HAVE_SOCKET_DECL 1
EOF

fi
fi


ice_have_socketpair=no
for ac_func in socketpair
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:16638: 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 16643 "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:16666: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 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:16692: 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 16703 "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 16719 "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 HAVE_SOCKETPAIR_DECL 1
EOF

fi
fi


ice_have_sscanf=no
for ac_func in sscanf
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:16751: 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 16756 "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:16779: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 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:16805: 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 16816 "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 16832 "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 HAVE_SSCANF_DECL 1
EOF

fi
fi

for ac_func in statfs statvfs
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:16862: 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 16867 "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:16890: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 
else
  echo "$ac_t""no" 1>&6
fi
done

for ac_func in strerror
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:16917: 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 16922 "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:16945: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 
else
  echo "$ac_t""no" 1>&6
LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
fi
done



ice_have_strerror=no
for ac_func in strerror
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:16976: 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 16981 "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:17004: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 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:17030: 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 17041 "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 17057 "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 HAVE_STRERROR_DECL 1
EOF

fi
fi

echo $ac_n "checking for strftime""... $ac_c" 1>&6
echo "configure:17085: 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 17090 "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:17113: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; 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:17135: 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 17143 "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:17154: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  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:17183: 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 17188 "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:17211: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 
else
  echo "$ac_t""no" 1>&6
LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
fi
done



ice_have_strftime=no
for ac_func in strftime
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:17242: 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 17247 "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:17270: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 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:17296: 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 17307 "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 17323 "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 HAVE_STRFTIME_DECL 1
EOF

fi
fi

for ac_func in strncasecmp
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:17353: 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 17358 "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:17381: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 
else
  echo "$ac_t""no" 1>&6
LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
fi
done



ice_have_strncasecmp=no
for ac_func in strncasecmp
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:17412: 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 17417 "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:17440: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 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:17466: 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 17477 "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 17493 "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 HAVE_STRNCASECMP_DECL 1
EOF

fi
fi

for ac_func in strstr
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:17523: 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 17528 "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:17551: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 
else
  echo "$ac_t""no" 1>&6
LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
fi
done



ice_have_syslog=no
for ac_func in syslog
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:17582: 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 17587 "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:17610: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 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:17636: 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 17647 "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 17663 "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 HAVE_SYSLOG_DECL 1
EOF

fi
fi


ice_have_system=no
for ac_func in system
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:17695: 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 17700 "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:17723: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 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:17749: 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 17760 "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 17776 "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 HAVE_SYSTEM_DECL 1
EOF

fi
fi


ice_have_time=no
for ac_func in time
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:17808: 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 17813 "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:17836: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 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:17862: 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 17873 "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 17889 "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 HAVE_TIME_DECL 1
EOF

fi
fi


ice_have_tolower=no
for ac_func in tolower
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:17921: 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 17926 "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:17949: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 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:17975: 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 17986 "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 18002 "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 HAVE_TOLOWER_DECL 1
EOF

fi
fi


ice_have_toupper=no
for ac_func in toupper
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:18034: 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 18039 "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:18062: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 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:18088: 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 18099 "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 18115 "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 HAVE_TOUPPER_DECL 1
EOF

fi
fi


ice_have_ungetc=no
for ac_func in ungetc
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:18147: 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 18152 "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:18175: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 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:18201: 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 18212 "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 18228 "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 HAVE_UNGETC_DECL 1
EOF

fi
fi

echo $ac_n "checking for vprintf""... $ac_c" 1>&6
echo "configure:18256: 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 18261 "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:18284: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; 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:18308: 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 18313 "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:18336: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; 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_have_vfprintf=no
for ac_func in vfprintf
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:18365: 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 18370 "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:18393: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 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 stdlib.h""... $ac_c" 1>&6
echo "configure:18419: checking for vfprintf declaration in stdio.h stdlib.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 stdlib.h; do
# Check for ordinary declaration
cat > conftest.$ac_ext <<EOF
#line 18430 "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 18446 "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 HAVE_VFPRINTF_DECL 1
EOF

fi
fi


ice_have_vprintf=no
for ac_func in vprintf
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:18478: 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 18483 "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:18506: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 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 stdlib.h""... $ac_c" 1>&6
echo "configure:18532: checking for vprintf declaration in stdio.h stdlib.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 stdlib.h; do
# Check for ordinary declaration
cat > conftest.$ac_ext <<EOF
#line 18543 "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 18559 "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 HAVE_VPRINTF_DECL 1
EOF

fi
fi


ice_have_vsprintf=no
for ac_func in vsprintf
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:18591: 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 18596 "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:18619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 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 stdlib.h""... $ac_c" 1>&6
echo "configure:18645: checking for vsprintf declaration in stdio.h stdlib.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 stdlib.h; do
# Check for ordinary declaration
cat > conftest.$ac_ext <<EOF
#line 18656 "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 18672 "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 HAVE_VSPRINTF_DECL 1
EOF

fi
fi

echo $ac_n "checking for wait4""... $ac_c" 1>&6
echo "configure:18700: 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 18705 "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:18728: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; 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:18750: 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 18755 "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:18778: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 
else
  echo "$ac_t""no" 1>&6
LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
fi
done


for ac_func in strcasecmp
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:18807: 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 18812 "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:18835: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 
else
  echo "$ac_t""no" 1>&6
LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
fi
done



ice_have_strcasecmp=no
for ac_func in strcasecmp
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:18866: 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 18871 "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:18894: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 ice_have_strcasecmp=yes
else
  echo "$ac_t""no" 1>&6
fi
done

if test "${ice_have_strcasecmp}" = yes; then
echo $ac_n "checking for strcasecmp declaration in string.h""... $ac_c" 1>&6
echo "configure:18920: checking for strcasecmp declaration in string.h" >&5
if eval "test \"`echo '$''{'ice_cv_have_strcasecmp_decl'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
ice_cv_have_strcasecmp_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 18931 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}strcasecmp[ 	]*\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_strcasecmp_decl=yes
fi
rm -f conftest*

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

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

fi

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

fi
fi


echo $ac_n "checking disk device prefixes""... $ac_c" 1>&6
echo "configure:18976: 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 whether posix fcntl locking works""... $ac_c" 1>&6
echo "configure:19060: 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 19071 "configure"
#include "confdefs.h"

#undef  ASSERTIONS
#define CONFIGURE_TEST
#define USE_POSIX_FCNTL
#include "${srcdir-.}/common-src/amflock.c"

EOF
if { (eval echo configure:19080: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./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:19111: 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 19122 "configure"
#include "confdefs.h"

#undef  ASSERTIONS
#define CONFIGURE_TEST
#define USE_FLOCK
#include "${srcdir-.}/common-src/amflock.c"

EOF
if { (eval echo configure:19131: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./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:19163: 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 19174 "configure"
#include "confdefs.h"

#undef  ASSERTIONS
#define CONFIGURE_TEST
#define USE_LOCKF
#include "${srcdir-.}/common-src/amflock.c"

EOF
if { (eval echo configure:19183: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./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:19215: 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 19226 "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"

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








if test x"$NO_CLIENT_MODE" != x"true"; then
  WANT_CLIENT_TRUE=
  WANT_CLIENT_FALSE='#'
else
  WANT_CLIENT_TRUE='#'
  WANT_CLIENT_FALSE=
fi


if test ! -z "$SAMBA_CLIENT"; then
  WANT_SAMBA_TRUE=
  WANT_SAMBA_FALSE='#'
else
  WANT_SAMBA_TRUE='#'
  WANT_SAMBA_FALSE=
fi


if test x"$NO_RESTORE_MODE" != x"true"; then
  WANT_RESTORE_TRUE=
  WANT_RESTORE_FALSE='#'
else
  WANT_RESTORE_TRUE='#'
  WANT_RESTORE_FALSE=
fi


if test x"$NO_SERVER_MODE" != x"true"; then
  WANT_SERVER_TRUE=
  WANT_SERVER_FALSE='#'
else
  WANT_SERVER_TRUE='#'
  WANT_SERVER_FALSE=
fi


if test x"$NO_RECOVER_MODE" != x"true" && test x"$NO_CLIENT_MODE" != x"true"; then
  WANT_RECOVER_TRUE=
  WANT_RECOVER_FALSE='#'
else
  WANT_RECOVER_TRUE='#'
  WANT_RECOVER_FALSE=
fi


if test x"$NO_SERVER_MODE" != x"true" || test x"$NO_RESTORE_MODE" != x"true"; then
  WANT_TAPE_TRUE=
  WANT_TAPE_FALSE='#'
else
  WANT_TAPE_TRUE='#'
  WANT_TAPE_FALSE=
fi


if test x"$NO_AMPLOT_MODE" != x"true"; then
  WANT_AMPLOT_TRUE=
  WANT_AMPLOT_FALSE='#'
else
  WANT_AMPLOT_TRUE='#'
  WANT_AMPLOT_FALSE=
fi


if test x"$NO_SCSI_CHANGER_MODE" != x"true"; then
  WANT_CHG_SCSI_TRUE=
  WANT_CHG_SCSI_FALSE='#'
else
  WANT_CHG_SCSI_TRUE='#'
  WANT_CHG_SCSI_FALSE=
fi


if test x"$NO_CHIO_CHANGER_MODE" != x"true"; then
  WANT_CHIO_SCSI_TRUE=
  WANT_CHIO_SCSI_FALSE='#'
else
  WANT_CHIO_SCSI_TRUE='#'
  WANT_CHIO_SCSI_FALSE=
fi

case "${FORCE_USE_RUNDUMP-${USE_RUNDUMP}}" in
y |  ye | yes) cat >> confdefs.h <<\EOF
#define USE_RUNDUMP 1
EOF
;;
esac



LTLIBOBJS=`echo "$LIBOBJS" | sed 's/\.'"${ac_objext}"'/\.lo/g'`
LTALLOCA=`echo "$ALLOCA" | sed 's/\.'"${ac_objext}"'/\.lo/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 | grep ac_space) 2>&1` in
  *ac_space=\ *)
    # `set' does not quote correctly, so add quotes (double-quote substitution
    # turns \\\\ into \\, and sed turns \\ into \).
    sed -n \
      -e "s/'/'\\\\''/g" \
      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
    ;;
  *)
    # `set' quotes correctly as required by POSIX, so do not add quotes.
    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
    ;;
  esac >> confcache
if cmp -s $cache_file confcache; then
  :
else
  if test -w $cache_file; then
    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.13"
    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/chg-chio.pl		\
	changer-src/chg-zd-mtx.sh	changer-src/Makefile		\
									\
	client-src/patch-system.sh	client-src/Makefile		\
									\
	common-src/versuff.c		common-src/Makefile		\
									\
	example/amanda.conf		example/Makefile		\
	example/amanda.conf.chg-scsi	example/chg-scsi-linux.conf	\
	example/chg-scsi-solaris.conf	example/chg-scsi-hpux.conf	\
									\
	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			\
	man/amstatus.8			man/amreport.8			\
	man/amgetconf.8							\
									\
	docs/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		server-src/amstatus.pl		\
									\
	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%@SHELL@%$SHELL%g
s%@CFLAGS@%$CFLAGS%g
s%@CPPFLAGS@%$CPPFLAGS%g
s%@CXXFLAGS@%$CXXFLAGS%g
s%@FFLAGS@%$FFLAGS%g
s%@DEFS@%$DEFS%g
s%@LDFLAGS@%$LDFLAGS%g
s%@LIBS@%$LIBS%g
s%@exec_prefix@%$exec_prefix%g
s%@prefix@%$prefix%g
s%@program_transform_name@%$program_transform_name%g
s%@bindir@%$bindir%g
s%@sbindir@%$sbindir%g
s%@libexecdir@%$libexecdir%g
s%@datadir@%$datadir%g
s%@sysconfdir@%$sysconfdir%g
s%@sharedstatedir@%$sharedstatedir%g
s%@localstatedir@%$localstatedir%g
s%@libdir@%$libdir%g
s%@includedir@%$includedir%g
s%@oldincludedir@%$oldincludedir%g
s%@infodir@%$infodir%g
s%@mandir@%$mandir%g
s%@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_SCRIPT@%$INSTALL_SCRIPT%g
s%@INSTALL_DATA@%$INSTALL_DATA%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%@SNAPSHOT_STAMP@%$SNAPSHOT_STAMP%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%@CLIENT_SCRIPTS_OPT@%$CLIENT_SCRIPTS_OPT%g
s%@DEFAULT_SERVER@%$DEFAULT_SERVER%g
s%@CLIENT_LOGIN@%$CLIENT_LOGIN%g
s%@SETUID_GROUP@%$SETUID_GROUP%g
s%@BINARY_OWNER@%$BINARY_OWNER%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_RAW_TAPE_DEVICE@%$DEFAULT_RAW_TAPE_DEVICE%g
s%@DEFAULT_CHANGER_DEVICE@%$DEFAULT_CHANGER_DEVICE%g
s%@AMANDA_TMPDIR@%$AMANDA_TMPDIR%g
s%@AMANDA_DBGDIR@%$AMANDA_DBGDIR%g
s%@AMANDA_DEBUG_DAYS@%$AMANDA_DEBUG_DAYS%g
s%@SERVICE_SUFFIX@%$SERVICE_SUFFIX%g
s%@WANT_LIBTOOL_TRUE@%$WANT_LIBTOOL_TRUE%g
s%@WANT_LIBTOOL_FALSE@%$WANT_LIBTOOL_FALSE%g
s%@CC@%$CC%g
s%@OBJEXT@%$OBJEXT%g
s%@EXEEXT@%$EXEEXT%g
s%@MT_FILE_FLAG@%$MT_FILE_FLAG%g
s%@AR@%$AR%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%@SAMBA_CLIENT@%$SAMBA_CLIENT%g
s%@GZIP@%$GZIP%g
s%@MAILER@%$MAILER%g
s%@MT@%$MT%g
s%@CHIO@%$CHIO%g
s%@CHS@%$CHS%g
s%@MTX@%$MTX%g
s%@PRINT@%$PRINT%g
s%@PCAT@%$PCAT%g
s%@PERL@%$PERL%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%@RANLIB@%$RANLIB%g
s%@LD@%$LD%g
s%@NM@%$NM%g
s%@LN_S@%$LN_S%g
s%@LIBTOOL@%$LIBTOOL%g
s%@LIBTOOL_DEPS@%$LIBTOOL_DEPS%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
s%@WANT_CLIENT_TRUE@%$WANT_CLIENT_TRUE%g
s%@WANT_CLIENT_FALSE@%$WANT_CLIENT_FALSE%g
s%@WANT_SAMBA_TRUE@%$WANT_SAMBA_TRUE%g
s%@WANT_SAMBA_FALSE@%$WANT_SAMBA_FALSE%g
s%@WANT_RESTORE_TRUE@%$WANT_RESTORE_TRUE%g
s%@WANT_RESTORE_FALSE@%$WANT_RESTORE_FALSE%g
s%@WANT_SERVER_TRUE@%$WANT_SERVER_TRUE%g
s%@WANT_SERVER_FALSE@%$WANT_SERVER_FALSE%g
s%@WANT_RECOVER_TRUE@%$WANT_RECOVER_TRUE%g
s%@WANT_RECOVER_FALSE@%$WANT_RECOVER_FALSE%g
s%@WANT_TAPE_TRUE@%$WANT_TAPE_TRUE%g
s%@WANT_TAPE_FALSE@%$WANT_TAPE_FALSE%g
s%@WANT_AMPLOT_TRUE@%$WANT_AMPLOT_TRUE%g
s%@WANT_AMPLOT_FALSE@%$WANT_AMPLOT_FALSE%g
s%@WANT_CHG_SCSI_TRUE@%$WANT_CHG_SCSI_TRUE%g
s%@WANT_CHG_SCSI_FALSE@%$WANT_CHG_SCSI_FALSE%g
s%@WANT_CHIO_SCSI_TRUE@%$WANT_CHIO_SCSI_TRUE%g
s%@WANT_CHIO_SCSI_FALSE@%$WANT_CHIO_SCSI_FALSE%g
s%@LTLIBOBJS@%$LTLIBOBJS%g
s%@LTALLOCA@%$LTALLOCA%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/chg-chio.pl		\
	changer-src/chg-zd-mtx.sh	changer-src/Makefile		\
									\
	client-src/patch-system.sh	client-src/Makefile		\
									\
	common-src/versuff.c		common-src/Makefile		\
									\
	example/amanda.conf		example/Makefile		\
	example/amanda.conf.chg-scsi	example/chg-scsi-linux.conf	\
	example/chg-scsi-solaris.conf	example/chg-scsi-hpux.conf	\
									\
	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			\
	man/amstatus.8			man/amreport.8			\
	man/amgetconf.8							\
									\
	docs/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		server-src/amstatus.pl		\
									\
	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

