#! /bin/sh



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

# Defaults:
ac_help=
ac_default_prefix=/usr/local
# Any additions from configure.in:
ac_default_prefix=/usr/local
ac_help="$ac_help
  --with-uname            (default: from system path)"
ac_help="$ac_help
  --with-hostname         (default: from system path)"
ac_help="$ac_help
  --with-ispell           (default: from system path)"
ac_help="$ac_help
  --with-metamail         (default: from system path)"
ac_help="$ac_help
  --with-pgp              (default: from system path)"
ac_help="$ac_help
  --with-sum              (default: from system path)"
ac_help="$ac_help
  --disable-nntp          disable reading via NNTP (default: on)"
ac_help="$ac_help
  --enable-nntp-only      enable reading via NNTP only (default: off)"
ac_help="$ac_help
  --enable-debug          turn on debug/profiling/traces (default: off)"
ac_help="$ac_help
  --disable-echo          display \"compiling\" commands (default: on)"
ac_help="$ac_help
  --enable-prototypes     check for optional prototypes (default: off)"
ac_help="$ac_help
  --enable-warnings       turn on GCC compiler warnings (default: off)"
ac_help="$ac_help
  --with-libdir=PATH      news-library (default: /usr/lib/news)"
ac_help="$ac_help
  --with-spooldir=PATH    news spool-directory (default: /usr/spool/news)"
ac_help="$ac_help
  --with-nov-dir=PATH     news overview-directory (default: $SPOOLDIR)"
ac_help="$ac_help
  --with-nov-fname        specify names of overview files (default: .overview)"
ac_help="$ac_help
  --with-inews-dir=PATH   directory containing \"inews\" (default: $INEWSPATH)"
ac_help="$ac_help
  --with-inn-nntplib=PATH specify INN-NNTP library (default: empty)"
ac_help="$ac_help
  --with-ncurses          link with ncurses if available"
ac_help="$ac_help
  --enable-curses         use curses interface (default: off)"
ac_help="$ac_help
  --with-dbmalloc         use Conor Cahill's dbmalloc library"
ac_help="$ac_help
  --with-dmalloc          use Gray Watson's dmalloc library"
ac_help="$ac_help
  --with-domain-name     sets \$DOMAIN_NAME"
ac_help="$ac_help
  --with-nntp-default-server
                          (sets \$NNTP_DEFAULT_SERVER)
                          (default: news\$DOMAIN_NAME)"
ac_help="$ac_help
  --enable-mh-mail-handling
                          use MH style mail handling (default: off)"
ac_help="$ac_help
  --disable-color         disable ANSI-color support (default: on)"
ac_help="$ac_help
  --disable-etiquette     disable printing of posting-etiquette (default: on)"
ac_help="$ac_help
  --enable-break-long-lines
                          break long mime-encoded lines (default: off)"
ac_help="$ac_help
  --disable-mime-strict-charset
                          force MM_CHARSET obeyance (default: on)"
ac_help="$ac_help
  --with-mime-default-charset
                          fallback for \$MM_CHARSET (default: US-ASCII)"
ac_help="$ac_help
  --with-iso-to-ascii     ISO -> ASCII conversion (default: -1)"
ac_help="$ac_help
  --enable-forgery        enable forged cancel support (default: off)"
ac_help="$ac_help
  --disable-locale        disable locale support (default: on)"
ac_help="$ac_help
  --disable-piping        disable piping support (default: on)"
ac_help="$ac_help
  --disable-append-pid    disable appending .pid to tmp-files (default: on)"
ac_help="$ac_help
  --with-coffee           coffee support"

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

# Initialize some other variables.
subdirs=
MFLAGS= MAKEFLAGS=
# Maximum number of lines to put in a shell here document.
ac_max_here_lines=12

ac_prev=
for ac_option
do

  # If the previous option needs an argument, assign it.
  if test -n "$ac_prev"; then
    eval "$ac_prev=\$ac_option"
    ac_prev=
    continue
  fi

  case "$ac_option" in
  -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  *) ac_optarg= ;;
  esac

  # Accept the important Cygnus configure options, so we can diagnose typos.

  case "$ac_option" in

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

  -build | --build | --buil | --bui | --bu)
    ac_prev=build ;;
  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
    build="$ac_optarg" ;;

  -cache-file | --cache-file | --cache-fil | --cache-fi \
  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
    ac_prev=cache_file ;;
  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
    cache_file="$ac_optarg" ;;

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

  -disable-* | --disable-*)
    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
    # Reject names that are not valid shell variable names.
    if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
    fi
    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
    eval "enable_${ac_feature}=no" ;;

  -enable-* | --enable-*)
    ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
    # Reject names that are not valid shell variable names.
    if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
    fi
    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
    case "$ac_option" in
      *=*) ;;
      *) ac_optarg=yes ;;
    esac
    eval "enable_${ac_feature}='$ac_optarg'" ;;

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

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

  -help | --help | --hel | --he)
    # Omit some internal or obsolete options to make the list less imposing.
    # This message is too long to be a string in the A/UX 3.1 sh.
    cat << EOF
Usage: configure [options] [host]
Options: [defaults in brackets after descriptions]
Configuration:
  --cache-file=FILE       cache test results in FILE
  --help                  print this message
  --no-create             do not create output files
  --quiet, --silent       do not print \`checking...' messages
  --version               print the version of autoconf that created configure
Directory and file names:
  --prefix=PREFIX         install architecture-independent files in PREFIX
                          [$ac_default_prefix]
  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
                          [same as prefix]
  --bindir=DIR            user executables in DIR [EPREFIX/bin]
  --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
  --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
  --datadir=DIR           read-only architecture-independent data in DIR
                          [PREFIX/share]
  --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
  --sharedstatedir=DIR    modifiable architecture-independent data in DIR
                          [PREFIX/com]
  --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
  --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
  --includedir=DIR        C header files in DIR [PREFIX/include]
  --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
  --infodir=DIR           info documentation in DIR [PREFIX/info]
  --mandir=DIR            man documentation in DIR [PREFIX/man]
  --srcdir=DIR            find the sources in DIR [configure dir or ..]
  --program-prefix=PREFIX prepend PREFIX to installed program names
  --program-suffix=SUFFIX append SUFFIX to installed program names
  --program-transform-name=PROGRAM
                          run sed PROGRAM on installed program names
EOF
    cat << EOF
Host type:
  --build=BUILD           configure for building on BUILD [BUILD=HOST]
  --host=HOST             configure for HOST [guessed]
  --target=TARGET         configure for TARGET [TARGET=HOST]
Features and packages:
  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
  --x-includes=DIR        X include files are in DIR
  --x-libraries=DIR       X library files are in DIR
EOF
    if test -n "$ac_help"; then
      echo "--enable and --with options recognized:$ac_help"
    fi
    exit 0 ;;

  -host | --host | --hos | --ho)
    ac_prev=host ;;
  -host=* | --host=* | --hos=* | --ho=*)
    host="$ac_optarg" ;;

  -includedir | --includedir | --includedi | --included | --include \
  | --includ | --inclu | --incl | --inc)
    ac_prev=includedir ;;
  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
  | --includ=* | --inclu=* | --incl=* | --inc=*)
    includedir="$ac_optarg" ;;

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

  -libdir | --libdir | --libdi | --libd)
    ac_prev=libdir ;;
  -libdir=* | --libdir=* | --libdi=* | --libd=*)
    libdir="$ac_optarg" ;;

  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
  | --libexe | --libex | --libe)
    ac_prev=libexecdir ;;
  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
  | --libexe=* | --libex=* | --libe=*)
    libexecdir="$ac_optarg" ;;

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

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

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

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

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

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

  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
    ac_prev=prefix ;;
  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
    prefix="$ac_optarg" ;;

  -program-prefix | --program-prefix | --program-prefi | --program-pref \
  | --program-pre | --program-pr | --program-p)
    ac_prev=program_prefix ;;
  -program-prefix=* | --program-prefix=* | --program-prefi=* \
  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
    program_prefix="$ac_optarg" ;;

  -program-suffix | --program-suffix | --program-suffi | --program-suff \
  | --program-suf | --program-su | --program-s)
    ac_prev=program_suffix ;;
  -program-suffix=* | --program-suffix=* | --program-suffi=* \
  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
    program_suffix="$ac_optarg" ;;

  -program-transform-name | --program-transform-name \
  | --program-transform-nam | --program-transform-na \
  | --program-transform-n | --program-transform- \
  | --program-transform | --program-transfor \
  | --program-transfo | --program-transf \
  | --program-trans | --program-tran \
  | --progr-tra | --program-tr | --program-t)
    ac_prev=program_transform_name ;;
  -program-transform-name=* | --program-transform-name=* \
  | --program-transform-nam=* | --program-transform-na=* \
  | --program-transform-n=* | --program-transform-=* \
  | --program-transform=* | --program-transfor=* \
  | --program-transfo=* | --program-transf=* \
  | --program-trans=* | --program-tran=* \
  | --progr-tra=* | --program-tr=* | --program-t=*)
    program_transform_name="$ac_optarg" ;;

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

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

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

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

  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
    ac_prev=srcdir ;;
  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
    srcdir="$ac_optarg" ;;

  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
  | --syscon | --sysco | --sysc | --sys | --sy)
    ac_prev=sysconfdir ;;
  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
    sysconfdir="$ac_optarg" ;;

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

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

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

  -with-* | --with-*)
    ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
    # Reject names that are not valid shell variable names.
    if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
    fi
    ac_package=`echo $ac_package| sed 's/-/_/g'`
    case "$ac_option" in
      *=*) ;;
      *) ac_optarg=yes ;;
    esac
    eval "with_${ac_package}='$ac_optarg'" ;;

  -without-* | --without-*)
    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
    # Reject names that are not valid shell variable names.
    if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
    fi
    ac_package=`echo $ac_package| sed 's/-/_/g'`
    eval "with_${ac_package}=no" ;;

  --x)
    # Obsolete; use --with-x.
    with_x=yes ;;

  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
  | --x-incl | --x-inc | --x-in | --x-i)
    ac_prev=x_includes ;;
  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
    x_includes="$ac_optarg" ;;

  -x-libraries | --x-libraries | --x-librarie | --x-librari \
  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
    ac_prev=x_libraries ;;
  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
    x_libraries="$ac_optarg" ;;

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

  *)
    if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
      echo "configure: warning: $ac_option: invalid host type" 1>&2
    fi
    if test "x$nonopt" != xNONE; then
      { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
    fi
    nonopt="$ac_option"
    ;;

  esac
done

if test -n "$ac_prev"; then
  { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
fi

trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15

# File descriptor usage:
# 0 standard input
# 1 file creation
# 2 errors and warnings
# 3 some systems may open it to /dev/tty
# 4 used on the Kubota Titan
# 6 checking for... messages and results
# 5 compiler messages saved in config.log
if test "$silent" = yes; then
  exec 6>/dev/null
else
  exec 6>&1
fi
exec 5>./config.log

echo "\
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
" 1>&5

# Strip out --no-create and --no-recursion so they do not pile up.
# Also quote any args containing shell metacharacters.
ac_configure_args=
for ac_arg
do
  case "$ac_arg" in
  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  | --no-cr | --no-c) ;;
  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
  *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
  ac_configure_args="$ac_configure_args '$ac_arg'" ;;
  *) ac_configure_args="$ac_configure_args $ac_arg" ;;
  esac
done

# NLS nuisances.
# Only set these to C if already set.  These must not be set unconditionally
# because not all systems understand e.g. LANG=C (notably SCO).
# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
# Non-C LC_CTYPE values break the ctype check.
if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi

# confdefs.h avoids OS command line length limits that DEFS can exceed.
rm -rf conftest* confdefs.h
# AIX cpp loses on an empty file, so make sure it contains at least a newline.
echo > confdefs.h

# A filename unique to this package, relative to the directory that
# configure is in, which we can look for to find out if srcdir is correct.
ac_unique_file=include/tin.h

# Find the source files, if location was not specified.
if test -z "$srcdir"; then
  ac_srcdir_defaulted=yes
  # Try the directory containing this script, then its parent.
  ac_prog=$0
  ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
  srcdir=$ac_confdir
  if test ! -r $srcdir/$ac_unique_file; then
    srcdir=..
  fi
else
  ac_srcdir_defaulted=no
fi
if test ! -r $srcdir/$ac_unique_file; then
  if test "$ac_srcdir_defaulted" = yes; then
    { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
  else
    { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
  fi
fi
srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`

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

if test -r "$cache_file"; then
  echo "loading cache $cache_file"
  . $cache_file
else
  echo "creating cache $cache_file"
  > $cache_file
fi

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

if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
  # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
    ac_n= ac_c='
' ac_t='	'
  else
    ac_n=-n ac_c= ac_t=
  fi
else
  ac_n= ac_c='\c' ac_t=
fi






SYS_NAME=`(uname -s -r || uname -a || hostname) 2>/dev/null | sed 1q`
test -z "$SYS_NAME" && SYS_NAME=unknown
cat >> confdefs.h <<EOF
#define SYS_NAME "$SYS_NAME"
EOF


if eval "test \"`echo '$''{'cf_cv_system_name'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cf_cv_system_name="$SYS_NAME"
fi


if test ".$SYS_NAME" != ".$cf_cv_system_name" ; then
	echo "$ac_t"""Cached system name does not agree with actual"" 1>&6
	{ echo "configure: error: "Please remove config.cache and try again."" 1>&2; exit 1; }
fi
echo "Configuring `make version` for $SYS_NAME"

###	Checks for programs.
save_CFLAGS="$CFLAGS"
# 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:632: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$CC"; then
  ac_cv_prog_CC="$CC" # Let the user override the test.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  for ac_dir in $PATH; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_prog_CC="gcc"
      break
    fi
  done
  IFS="$ac_save_ifs"
fi
fi
CC="$ac_cv_prog_CC"
if test -n "$CC"; then
  echo "$ac_t""$CC" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

if test -z "$CC"; then
  # Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:661: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$CC"; then
  ac_cv_prog_CC="$CC" # Let the user override the test.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  ac_prog_rejected=no
  for ac_dir in $PATH; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
        ac_prog_rejected=yes
	continue
      fi
      ac_cv_prog_CC="cc"
      break
    fi
  done
  IFS="$ac_save_ifs"
if test $ac_prog_rejected = yes; then
  # We found a bogon in the path, so make sure we never use it.
  set dummy $ac_cv_prog_CC
  shift
  if test $# -gt 0; then
    # We chose a different compiler from the bogus one.
    # However, it has the same basename, so the bogon will be chosen
    # first if we set CC to just the basename; use the full file name.
    shift
    set dummy "$ac_dir/$ac_word" "$@"
    shift
    ac_cv_prog_CC="$@"
  fi
fi
fi
fi
CC="$ac_cv_prog_CC"
if test -n "$CC"; then
  echo "$ac_t""$CC" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

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

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

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

cat > conftest.$ac_ext <<EOF
#line 719 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
if { (eval echo configure:723: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  ac_cv_prog_cc_works=yes
  # If we can't run a trivial program, we are probably using a cross compiler.
  if (./conftest; exit) 2>/dev/null; then
    ac_cv_prog_cc_cross=no
  else
    ac_cv_prog_cc_cross=yes
  fi
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_prog_cc_works=no
fi
rm -fr conftest*

echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
if test $ac_cv_prog_cc_works = no; then
  { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
echo "configure:743: 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:748: 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:757: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
  ac_cv_prog_gcc=yes
else
  ac_cv_prog_gcc=no
fi
fi

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

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

fi

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

echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
echo "configure:800: 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 815 "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:821: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
  :
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  CPP="${CC-cc} -E -traditional-cpp"
  cat > conftest.$ac_ext <<EOF
#line 832 "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:838: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
  :
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  CPP=/lib/cpp
fi
rm -f conftest*
fi
rm -f conftest*
  ac_cv_prog_CPP="$CPP"
fi
  CPP="$ac_cv_prog_CPP"
else
  ac_cv_prog_CPP="$CPP"
fi
echo "$ac_t""$CPP" 1>&6

if test $ac_cv_prog_gcc = yes; then
    echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
echo "configure:862: 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 868 "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 886 "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 whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
echo "configure:908: 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

ac_aux_dir=
for ac_dir in $srcdir $srcdir/.. $srcdir/../..; 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 $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
fi
ac_config_guess=$ac_aux_dir/config.guess
ac_config_sub=$ac_aux_dir/config.sub
ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.

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

fi
  if test "${ac_cv_path_install+set}" = set; then
    INSTALL="$ac_cv_path_install"
  else
    # As a last resort, use the slow shell script.  We don't cache a
    # path for INSTALL within a source directory, because that will
    # break other packages using the cache if that directory is
    # removed, or if the path is relative.
    INSTALL="$ac_install_sh"
  fi
fi
echo "$ac_t""$INSTALL" 1>&6

# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
# It thinks the first close brace ends the variable substitution.
test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'

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

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:1018: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$YACC"; then
  ac_cv_prog_YACC="$YACC" # Let the user override the test.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  for ac_dir in $PATH; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_prog_YACC="$ac_prog"
      break
    fi
  done
  IFS="$ac_save_ifs"
fi
fi
YACC="$ac_cv_prog_YACC"
if test -n "$YACC"; then
  echo "$ac_t""$YACC" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

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


# Check whether --with-uname or --without-uname was given.
if test "${with_uname+set}" = set; then
  withval="$with_uname"
  case "$withval" in #(vi
  yes)
   echo 'configure: error: "--with-uname" requires value' 1>&2
   exit 1
   ;; #(vi
  no)
   ;; #(vi
  *)
   # user supplied option-value for "--with-uname=path"
   echo $ac_n "checking for uname""... $ac_c" 1>&6
echo "configure:1061: checking for uname" >&5
   ac_cv_path_PATH_UNAME="$withval"
   cat >> confdefs.h <<\EOF
#define HAVE_UNAME 1
EOF
   echo "$ac_t""$withval" 1>&6
   ;;
 esac
else
  
  # user did not specify "--with-uname"; do automatic check
  # Extract the first word of "uname", so it can be a program name with args.
set dummy uname; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1075: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_PATH_UNAME'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$PATH_UNAME" in
  /*)
  ac_cv_path_PATH_UNAME="$PATH_UNAME" # Let the user override the test with a path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  for ac_dir in $PATH; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_path_PATH_UNAME="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  ;;
esac
fi
PATH_UNAME="$ac_cv_path_PATH_UNAME"
if test -n "$PATH_UNAME"; then
  echo "$ac_t""$PATH_UNAME" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

  if test -n "$PATH_UNAME"; then
    cat >> confdefs.h <<EOF
#define PATH_UNAME "$PATH_UNAME"
EOF
    cat >> confdefs.h <<\EOF
#define HAVE_UNAME 1
EOF
  fi

fi


# Check whether --with-hostname or --without-hostname was given.
if test "${with_hostname+set}" = set; then
  withval="$with_hostname"
  case "$withval" in #(vi
  yes)
   echo 'configure: error: "--with-hostname" requires value' 1>&2
   exit 1
   ;; #(vi
  no)
   ;; #(vi
  *)
   # user supplied option-value for "--with-hostname=path"
   echo $ac_n "checking for hostname""... $ac_c" 1>&6
echo "configure:1128: checking for hostname" >&5
   ac_cv_path_PATH_HOSTNAME="$withval"
   cat >> confdefs.h <<\EOF
#define HAVE_HOSTNAME 1
EOF
   echo "$ac_t""$withval" 1>&6
   ;;
 esac
else
  
  # user did not specify "--with-hostname"; do automatic check
  # Extract the first word of "hostname", so it can be a program name with args.
set dummy hostname; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1142: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_PATH_HOSTNAME'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$PATH_HOSTNAME" in
  /*)
  ac_cv_path_PATH_HOSTNAME="$PATH_HOSTNAME" # Let the user override the test with a path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  for ac_dir in $PATH; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_path_PATH_HOSTNAME="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  ;;
esac
fi
PATH_HOSTNAME="$ac_cv_path_PATH_HOSTNAME"
if test -n "$PATH_HOSTNAME"; then
  echo "$ac_t""$PATH_HOSTNAME" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

  if test -n "$PATH_HOSTNAME"; then
    cat >> confdefs.h <<EOF
#define PATH_HOSTNAME "$PATH_HOSTNAME"
EOF
    cat >> confdefs.h <<\EOF
#define HAVE_HOSTNAME 1
EOF
  fi

fi


# Check whether --with-ispell or --without-ispell was given.
if test "${with_ispell+set}" = set; then
  withval="$with_ispell"
  case "$withval" in #(vi
  yes)
   echo 'configure: error: "--with-ispell" requires value' 1>&2
   exit 1
   ;; #(vi
  no)
   ;; #(vi
  *)
   # user supplied option-value for "--with-ispell=path"
   echo $ac_n "checking for ispell""... $ac_c" 1>&6
echo "configure:1195: checking for ispell" >&5
   ac_cv_path_PATH_ISPELL="$withval"
   cat >> confdefs.h <<\EOF
#define HAVE_ISPELL 1
EOF
   echo "$ac_t""$withval" 1>&6
   ;;
 esac
else
  
  # user did not specify "--with-ispell"; do automatic check
  # Extract the first word of "ispell", so it can be a program name with args.
set dummy ispell; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1209: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_PATH_ISPELL'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$PATH_ISPELL" in
  /*)
  ac_cv_path_PATH_ISPELL="$PATH_ISPELL" # Let the user override the test with a path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  for ac_dir in $PATH; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_path_PATH_ISPELL="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  ;;
esac
fi
PATH_ISPELL="$ac_cv_path_PATH_ISPELL"
if test -n "$PATH_ISPELL"; then
  echo "$ac_t""$PATH_ISPELL" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

  if test -n "$PATH_ISPELL"; then
    cat >> confdefs.h <<EOF
#define PATH_ISPELL "$PATH_ISPELL"
EOF
    cat >> confdefs.h <<\EOF
#define HAVE_ISPELL 1
EOF
  fi

fi


# Check whether --with-metamail or --without-metamail was given.
if test "${with_metamail+set}" = set; then
  withval="$with_metamail"
  case "$withval" in #(vi
  yes)
   echo 'configure: error: "--with-metamail" requires value' 1>&2
   exit 1
   ;; #(vi
  no)
   ;; #(vi
  *)
   # user supplied option-value for "--with-metamail=path"
   echo $ac_n "checking for metamail""... $ac_c" 1>&6
echo "configure:1262: checking for metamail" >&5
   ac_cv_path_PATH_METAMAIL="$withval"
   cat >> confdefs.h <<\EOF
#define HAVE_METAMAIL 1
EOF
   echo "$ac_t""$withval" 1>&6
   ;;
 esac
else
  
  # user did not specify "--with-metamail"; do automatic check
  # Extract the first word of "metamail", so it can be a program name with args.
set dummy metamail; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1276: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_PATH_METAMAIL'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$PATH_METAMAIL" in
  /*)
  ac_cv_path_PATH_METAMAIL="$PATH_METAMAIL" # Let the user override the test with a path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  for ac_dir in $PATH; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_path_PATH_METAMAIL="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  ;;
esac
fi
PATH_METAMAIL="$ac_cv_path_PATH_METAMAIL"
if test -n "$PATH_METAMAIL"; then
  echo "$ac_t""$PATH_METAMAIL" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

  if test -n "$PATH_METAMAIL"; then
    cat >> confdefs.h <<EOF
#define PATH_METAMAIL "$PATH_METAMAIL"
EOF
    cat >> confdefs.h <<\EOF
#define HAVE_METAMAIL 1
EOF
  fi

fi


# Check whether --with-pgp or --without-pgp was given.
if test "${with_pgp+set}" = set; then
  withval="$with_pgp"
  case "$withval" in #(vi
  yes)
   echo 'configure: error: "--with-pgp" requires value' 1>&2
   exit 1
   ;; #(vi
  no)
   ;; #(vi
  *)
   # user supplied option-value for "--with-pgp=path"
   echo $ac_n "checking for pgp""... $ac_c" 1>&6
echo "configure:1329: checking for pgp" >&5
   ac_cv_path_PATH_PGP="$withval"
   cat >> confdefs.h <<\EOF
#define HAVE_PGP 1
EOF
   echo "$ac_t""$withval" 1>&6
   ;;
 esac
else
  
  # user did not specify "--with-pgp"; do automatic check
  # Extract the first word of "pgp", so it can be a program name with args.
set dummy pgp; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1343: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_PATH_PGP'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$PATH_PGP" in
  /*)
  ac_cv_path_PATH_PGP="$PATH_PGP" # Let the user override the test with a path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  for ac_dir in $PATH; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_path_PATH_PGP="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  ;;
esac
fi
PATH_PGP="$ac_cv_path_PATH_PGP"
if test -n "$PATH_PGP"; then
  echo "$ac_t""$PATH_PGP" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

  if test -n "$PATH_PGP"; then
    cat >> confdefs.h <<EOF
#define PATH_PGP "$PATH_PGP"
EOF
    cat >> confdefs.h <<\EOF
#define HAVE_PGP 1
EOF
  fi

fi


# Check whether --with-sum or --without-sum was given.
if test "${with_sum+set}" = set; then
  withval="$with_sum"
  case "$withval" in #(vi
  yes)
   echo 'configure: error: "--with-sum" requires value' 1>&2
   exit 1
   ;; #(vi
  no)
   ;; #(vi
  *)
   # user supplied option-value for "--with-sum=path"
   echo $ac_n "checking for sum""... $ac_c" 1>&6
echo "configure:1396: checking for sum" >&5
   ac_cv_path_PATH_SUM="$withval"
   cat >> confdefs.h <<\EOF
#define HAVE_SUM 1
EOF
   echo "$ac_t""$withval" 1>&6
   ;;
 esac
else
  
  # user did not specify "--with-sum"; do automatic check
  # Extract the first word of "sum", so it can be a program name with args.
set dummy sum; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1410: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_PATH_SUM'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$PATH_SUM" in
  /*)
  ac_cv_path_PATH_SUM="$PATH_SUM" # Let the user override the test with a path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  for ac_dir in $PATH; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_path_PATH_SUM="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  ;;
esac
fi
PATH_SUM="$ac_cv_path_PATH_SUM"
if test -n "$PATH_SUM"; then
  echo "$ac_t""$PATH_SUM" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

  if test -n "$PATH_SUM"; then
    cat >> confdefs.h <<EOF
#define PATH_SUM "$PATH_SUM"
EOF
    cat >> confdefs.h <<\EOF
#define HAVE_SUM 1
EOF
  fi

fi


if test $ac_cv_path_PATH_SUM
then
echo $ac_n "checking if $ac_cv_path_PATH_SUM takes -r""... $ac_c" 1>&6
echo "configure:1453: checking if $ac_cv_path_PATH_SUM takes -r" >&5
if eval "test \"`echo '$''{'ac_cv_prog_sum_r'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
if { ac_try='$ac_cv_path_PATH_SUM -r config.log 1>&5'; { (eval echo configure:1458: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }
then
	ac_cv_prog_sum_r=yes
else
	ac_cv_prog_sum_r=no
fi

fi

if test $ac_cv_prog_sum_r = yes; then
	cat >> confdefs.h <<\EOF
#define SUM_TAKES_DASH_R 1
EOF

	cat >> confdefs.h <<EOF
#define PATH_SUM_R "$ac_cv_path_PATH_SUM -r"
EOF

else
	cat >> confdefs.h <<EOF
#define PATH_SUM_R "$ac_cv_path_PATH_SUM"
EOF

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


### check for this early, since it'll override several options
echo $ac_n "checking if NNTP-support will be used""... $ac_c" 1>&6
echo "configure:1488: checking if NNTP-support will be used" >&5
# Check whether --enable-nntp or --disable-nntp was given.
if test "${enable_nntp+set}" = set; then
  enableval="$enable_nntp"
  test "$enableval" != no && enableval=yes
  if test "$enableval" != "yes" ; then
    USE_NNTP=no 
  else
    USE_NNTP=yes
  fi
else
  enableval=yes 
  USE_NNTP=yes
  
fi

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

USE_SPOOLDIR=yes
if test "$USE_NNTP" = "yes" ; then
echo $ac_n "checking whether to be NNTP_ONLY""... $ac_c" 1>&6
echo "configure:1509: checking whether to be NNTP_ONLY" >&5
# Check whether --enable-nntp-only or --disable-nntp-only was given.
if test "${enable_nntp_only+set}" = set; then
  enableval="$enable_nntp_only"
  test "$enableval" != yes && enableval=no
  if test "$enableval" != "no" ; then
    cat >> confdefs.h <<\EOF
#define NNTP_ONLY 1
EOF

	 USE_SPOOLDIR=no 
  else
    cat >> confdefs.h <<\EOF
#define NNTP_ABLE 1
EOF

  fi
else
  enableval=no 
  cat >> confdefs.h <<\EOF
#define NNTP_ABLE 1
EOF

  
fi

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

###	use option --enable-debug to compile-in test/development code
echo $ac_n "checking if you want to compile-in debug support""... $ac_c" 1>&6
echo "configure:1540: checking if you want to compile-in debug support" >&5
# Check whether --enable-debug or --disable-debug was given.
if test "${enable_debug+set}" = set; then
  enableval="$enable_debug"
  test "$enableval" != yes && enableval=no
  if test "$enableval" != "no" ; then
    ENABLE_DEBUG=''
    CFLAGS="-g $CFLAGS"
    LDFLAGS="-g $LDFLAGS" 
  else
    ENABLE_DEBUG='#'
    test -z "$save_CFLAGS" && CFLAGS=`echo $CFLAGS|sed -e 's/-g //' -e 's/-g$//'`
  fi
else
  enableval=no 
  ENABLE_DEBUG='#'
    test -z "$save_CFLAGS" && CFLAGS=`echo $CFLAGS|sed -e 's/-g //' -e 's/-g$//'`
  
fi

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


###	use option --disable-echo to suppress full display compiling commands
echo $ac_n "checking if you want to see long compiling messages""... $ac_c" 1>&6
echo "configure:1565: checking if you want to see long compiling messages" >&5
# Check whether --enable-echo or --disable-echo was given.
if test "${enable_echo+set}" = set; then
  enableval="$enable_echo"
  test "$enableval" != no && enableval=yes
  if test "$enableval" != "yes" ; then
    SHOW_CC='	@echo compiling $@'
    ECHO_CC='@' 
  else
    SHOW_CC='# compiling'
    ECHO_CC=''
  fi
else
  enableval=yes 
  SHOW_CC='# compiling'
    ECHO_CC=''
  
fi

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



### use option --enable-prototypes to turn on optional prototypes
echo $ac_n "checking if you want to compile with fallback prototypes""... $ac_c" 1>&6
echo "configure:1590: checking if you want to compile with fallback prototypes" >&5
# Check whether --enable-prototypes or --disable-prototypes was given.
if test "${enable_prototypes+set}" = set; then
  enableval="$enable_prototypes"
  test "$enableval" != yes && enableval=no
  if test "$enableval" != "no" ; then
    with_decl_check=yes 
  else
    with_decl_check=no
  fi
else
  enableval=no 
  with_decl_check=no
  
fi

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

###	use option --enable-warnings to turn on all gcc warnings
EXTRA_CFLAGS=""
if test -n "$GCC"
then
echo $ac_n "checking if you want to turn on gcc warnings""... $ac_c" 1>&6
echo "configure:1613: checking if you want to turn on gcc warnings" >&5
# Check whether --enable-warnings or --disable-warnings was given.
if test "${enable_warnings+set}" = set; then
  enableval="$enable_warnings"
  test "$enableval" != yes && enableval=no
  if test "$enableval" != "no" ; then
    with_warnings=yes 
  else
    with_warnings=no
  fi
else
  enableval=no 
  with_warnings=no
  
fi

echo "$ac_t""$with_warnings" 1>&6
if test "$with_warnings" = "yes"
then
	EXTRA_CFLAGS=""
if test -n "$GCC"
then
		cat > conftest.$ac_ext <<EOF
#line 1636 "configure"
int main(int argc, char *argv[]) { return argv[argc-1] == 0; }
EOF
		echo "checking for gcc warning options" 1>&6
echo "configure:1640: checking for gcc warning options" >&5
	cf_save_CFLAGS="$CFLAGS"
	EXTRA_CFLAGS="-W -Wall"
	for cf_opt in \
		Wbad-function-cast \
		Wcast-align \
		Wcast-qual \
		Winline \
		Wmissing-declarations \
		Wmissing-prototypes \
		Wnested-externs \
		Wpointer-arith \
		Wwrite-strings \
		Wshadow \
		Wstrict-prototypes
	do
		CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
		if { (eval echo configure:1657: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
			test -n "$verbose" && echo "$ac_t""... -$cf_opt" 1>&6
			EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
		fi
	done
	rm -f conftest*
	CFLAGS="$cf_save_CFLAGS"
fi

fi
fi

## !NNTP_ONLY
if test "$USE_SPOOLDIR" = "yes"; then
	## options for directories
	echo $ac_n "checking for news-library path""... $ac_c" 1>&6
echo "configure:1673: checking for news-library path" >&5
	# Check whether --with-libdir or --without-libdir was given.
if test "${with_libdir+set}" = set; then
  withval="$with_libdir"
  :
else
  withval="${NEWSLIBDIR-/usr/lib/news}"
fi
case ".$withval" in #(vi
./*)
  ;; #(vi
*)
  echo 'configure: error: expected a pathname for NEWSLIBDIR' 1>&2
  exit 1
  ;;
esac
NEWSLIBDIR="$withval"

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

	echo $ac_n "checking for news spool-directory path""... $ac_c" 1>&6
echo "configure:1694: checking for news spool-directory path" >&5
	# Check whether --with-spooldir or --without-spooldir was given.
if test "${with_spooldir+set}" = set; then
  withval="$with_spooldir"
  :
else
  withval="${SPOOLDIR-/usr/spool/news}"
fi
case ".$withval" in #(vi
./*)
  ;; #(vi
*)
  echo 'configure: error: expected a pathname for SPOOLDIR' 1>&2
  exit 1
  ;;
esac
SPOOLDIR="$withval"

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

	echo $ac_n "checking for news overview-directory path""... $ac_c" 1>&6
echo "configure:1715: checking for news overview-directory path" >&5
	# Check whether --with-nov-dir or --without-nov-dir was given.
if test "${with_nov_dir+set}" = set; then
  withval="$with_nov_dir"
  :
else
  withval="${NOVROOTDIR-$SPOOLDIR}"
fi
case ".$withval" in #(vi
./*)
  ;; #(vi
*)
  echo 'configure: error: expected a pathname for NOVROOTDIR' 1>&2
  exit 1
  ;;
esac
NOVROOTDIR="$withval"

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

	echo $ac_n "checking for overview filename""... $ac_c" 1>&6
echo "configure:1736: checking for overview filename" >&5
	# Check whether --with-nov-fname or --without-nov-fname was given.
if test "${with_nov_fname+set}" = set; then
  withval="$with_nov_fname"
  :
else
  withval="${OVERVIEW_FILE-.overview}"
fi
test -z "$withval" && withval=no
case "$withval" in #(vi
yes) echo 'configure: error: expected a value for OVERVIEW_FILE' 1>&2
  exit 1
  ;; #(vi
no) withval=""
  ;;
esac
OVERVIEW_FILE="$withval"
cat >> confdefs.h <<EOF
#define OVERVIEW_FILE "$withval"
EOF

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

	INEWSPATH="$NEWSLIBDIR"
else
	NEWSLIBDIR=""
	SPOOLDIR=""
	NOVROOTDIR=""
	INEWSPATH="/usr/lib/news"
fi

echo $ac_n "checking for directory containing \"inews\"""... $ac_c" 1>&6
echo "configure:1768: checking for directory containing \"inews\"" >&5
# Check whether --with-inews-dir or --without-inews-dir was given.
if test "${with_inews_dir+set}" = set; then
  withval="$with_inews_dir"
  :
else
  withval="${INEWSDIR-$INEWSPATH}"
fi
case ".$withval" in #(vi
./*)
  ;; #(vi
*)
  echo 'configure: error: expected a pathname for INEWSDIR' 1>&2
  exit 1
  ;;
esac
INEWSDIR="$withval"

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

## !NNTP_ONLY
if test "$USE_SPOOLDIR" = "yes"; then
	## options for libraries
	echo $ac_n "checking for optional INN-NNTP library""... $ac_c" 1>&6
echo "configure:1792: checking for optional INN-NNTP library" >&5
	# Check whether --with-inn-nntplib or --without-inn-nntplib was given.
if test "${with_inn_nntplib+set}" = set; then
  withval="$with_inn_nntplib"
  :
else
  withval="${INN_NNTPLIB}"
fi
test -n "$withval" && \
case "$withval" in #(vi
yes) echo 'configure: error: expected a value for INN_NNTPLIB' 1>&2
  exit 1
  ;; #(vi
no) withval=""
  ;;
esac
INN_NNTPLIB="$withval"
cat >> confdefs.h <<EOF
#define INN_NNTPLIB "$withval"
EOF

	echo "$ac_t""$INN_NNTPLIB" 1>&6
else
	INN_NNTPLIB=""
fi


### Look for ncurses in the usual places, accommodating compilers that don't
### search /usr/local by default.
echo $ac_n "checking if you want ncurses library""... $ac_c" 1>&6
echo "configure:1822: checking if you want ncurses library" >&5
found_ncurses=no
# Check whether --with-ncurses or --without-ncurses was given.
if test "${with_ncurses+set}" = set; then
  withval="$with_ncurses"
  save_CPPFLAGS="$CPPFLAGS"
	found_headers=no
	echo "$ac_t""yes" 1>&6
	echo $ac_n "checking for ncurses headers""... $ac_c" 1>&6
echo "configure:1831: checking for ncurses headers" >&5
	for p in \
		. \
		/usr/include/ncurses \
		/usr/local/include \
		/usr/local/include/ncurses
	do
		CPPFLAGS="$save_CPPFLAGS -I$p"
		cat > conftest.$ac_ext <<EOF
#line 1840 "configure"
#include "confdefs.h"

#include <curses.h>
#ifdef NCURSES_VERSION
found-ncurses
#endif
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "found-ncurses" >/dev/null 2>&1; then
  rm -rf conftest*
  found_headers=yes
fi
rm -f conftest*

		if test $found_headers = yes ; then
			test $p = . \
				&& p=/usr/include
			echo "$ac_t""$p" 1>&6
			test $p != /usr/include \
				&& CPPFLAGS="-I$p $save_CPPFLAGS"
			test $p = /usr/local/include/ncurses \
				&& CPPFLAGS="-I/usr/local/include $save_CPPFLAGS"
			break
		fi
	done
	if test $found_headers = yes ; then
		save_LIBS="$LIBS"
		case $LIBS in #(vi
		*-lncurses*) ;; #(vi
		*)	case $p in #(vi
			/usr/local/*)
				LIBS="-L/usr/local/lib $LIBS -lncurses"
				;;
			*)
				LIBS="$LIBS -lncurses"
				;;
			esac
		esac
		echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
echo "configure:1880: checking for Gpm_Open in -lgpm" >&5
ac_lib_var=`echo gpm'_'Gpm_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="-lgpm  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 1888 "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 Gpm_Open();

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

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

  LIBS="-lgpm $LIBS"

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

		echo $ac_n "checking for trace in -lncurses""... $ac_c" 1>&6
echo "configure:1927: checking for trace in -lncurses" >&5
ac_lib_var=`echo ncurses'_'trace | 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 1935 "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 trace();

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

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

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


echo $ac_n "checking if you want curses""... $ac_c" 1>&6
echo "configure:1975: checking if you want curses" >&5
# Check whether --enable-curses or --disable-curses was given.
if test "${enable_curses+set}" = set; then
  enableval="$enable_curses"
  test "$enableval" != yes && enableval=no
  if test "$enableval" != "no" ; then
    cat >> confdefs.h <<\EOF
#define USE_CURSES 1
EOF
 
  fi
else
  enableval=no   
fi

echo "$ac_t""$enableval" 1>&6
use_curses=$enableval

## debugging libraries (do this after other libraries)
debug_malloc=none
# Check whether --with-dbmalloc or --without-dbmalloc was given.
if test "${with_dbmalloc+set}" = set; then
  withval="$with_dbmalloc"
  echo $ac_n "checking for debug_malloc in -ldbmalloc""... $ac_c" 1>&6
echo "configure:1999: checking for debug_malloc in -ldbmalloc" >&5
ac_lib_var=`echo dbmalloc'_'debug_malloc | 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="-ldbmalloc  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 2007 "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 debug_malloc();

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

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

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

fi


# Check whether --with-dmalloc or --without-dmalloc was given.
if test "${with_dmalloc+set}" = set; then
  withval="$with_dmalloc"
  echo $ac_n "checking for dmalloc_debug in -ldmalloc""... $ac_c" 1>&6
echo "configure:2077: checking for dmalloc_debug in -ldmalloc" >&5
ac_lib_var=`echo dmalloc'_'dmalloc_debug | 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="-ldmalloc  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 2085 "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 dmalloc_debug();

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

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

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

fi


## options for miscellaneous definitions
echo $ac_n "checking for domain-name""... $ac_c" 1>&6
echo "configure:2153: checking for domain-name" >&5
# Check whether --with-domain-name or --without-domain-name was given.
if test "${with_domain_name+set}" = set; then
  withval="$with_domain_name"
  DOMAIN_NAME=$withval
	if test "$DOMAIN_NAME" != ""; then
		cat >> confdefs.h <<EOF
#define DOMAIN_NAME "${withval}"
EOF

	fi
fi

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

if test "$USE_NNTP" = "yes" ; then
echo $ac_n "checking for NNTP default-server""... $ac_c" 1>&6
echo "configure:2170: checking for NNTP default-server" >&5
# Check whether --with-nntp-default-server or --without-nntp-default-server was given.
if test "${with_nntp_default_server+set}" = set; then
  withval="$with_nntp_default_server"
  NNTP_DEFAULT_SERVER=$withval
else
  if test "$DOMAIN_NAME" != "" ; then
		test -z "$NNTP_DEFAULT_SERVER" && case "$DOMAIN_NAME" in #(((
	 	/*)
			if test -r "$DOMAIN_NAME" ; then
				NNTP_DEFAULT_SERVER="news.`cat $DOMAIN_NAME`"
			else
				NNTP_DEFAULT_SERVER="news"
			fi
			;;
	 	*)
			NNTP_DEFAULT_SERVER="news.$DOMAIN_NAME"
			;;
	 	esac
	else
		NNTP_DEFAULT_SERVER="news"
	fi
fi

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

## These options are interdependent, so we delay defining them til now:
test -n "$NNTP_DEFAULT_SERVER" \
	&& cat >> confdefs.h <<EOF
#define NNTP_DEFAULT_SERVER "$NNTP_DEFAULT_SERVER"
EOF

test ".$INEWSDIR" != ".$NEWSLIBDIR" && cat >> confdefs.h <<EOF
#define INEWSDIR "$INEWSDIR"
EOF

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

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

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


## optional features
echo $ac_n "checking whether to use MH style mail handling""... $ac_c" 1>&6
echo "configure:2222: checking whether to use MH style mail handling" >&5
# Check whether --enable-mh-mail-handling or --disable-mh-mail-handling was given.
if test "${enable_mh_mail_handling+set}" = set; then
  enableval="$enable_mh_mail_handling"
  test "$enableval" != yes && enableval=no
  if test "$enableval" != "no" ; then
    cat >> confdefs.h <<\EOF
#define HAVE_MH_MAIL_HANDLING 1
EOF
 
  fi
else
  enableval=no   
fi

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

echo $ac_n "checking whether to enable ANSI-color""... $ac_c" 1>&6
echo "configure:2240: checking whether to enable ANSI-color" >&5
# Check whether --enable-color or --disable-color was given.
if test "${enable_color+set}" = set; then
  enableval="$enable_color"
  test "$enableval" != no && enableval=yes
  if test "$enableval" != "yes" ; then
    : 
  else
    cat >> confdefs.h <<\EOF
#define HAVE_COLOR 1
EOF

  fi
else
  enableval=yes 
  cat >> confdefs.h <<\EOF
#define HAVE_COLOR 1
EOF

  
fi

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

echo $ac_n "checking whether to enable posting-etiquette""... $ac_c" 1>&6
echo "configure:2265: checking whether to enable posting-etiquette" >&5
# Check whether --enable-etiquette or --disable-etiquette was given.
if test "${enable_etiquette+set}" = set; then
  enableval="$enable_etiquette"
  test "$enableval" != no && enableval=yes
  if test "$enableval" != "yes" ; then
    cat >> confdefs.h <<\EOF
#define NO_ETIQUETTE 1
EOF
 
  fi
else
  enableval=yes   
fi

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


echo $ac_n "checking whether to strictly observe RFC1522 and break long lines""... $ac_c" 1>&6
echo "configure:2284: checking whether to strictly observe RFC1522 and break long lines" >&5
# Check whether --enable-break-long-lines or --disable-break-long-lines was given.
if test "${enable_break_long_lines+set}" = set; then
  enableval="$enable_break_long_lines"
  test "$enableval" != yes && enableval=no
  if test "$enableval" != "no" ; then
    cat >> confdefs.h <<\EOF
#define MIME_BREAK_LONG_LINES 1
EOF
 
  fi
else
  enableval=no   
fi

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

echo $ac_n "checking whether to force MM_CHARSET obeyance when decoding mime""... $ac_c" 1>&6
echo "configure:2302: checking whether to force MM_CHARSET obeyance when decoding mime" >&5
# Check whether --enable-mime-strict-charset or --disable-mime-strict-charset was given.
if test "${enable_mime_strict_charset+set}" = set; then
  enableval="$enable_mime_strict_charset"
  test "$enableval" != no && enableval=yes
  if test "$enableval" != "yes" ; then
    : 
  else
    cat >> confdefs.h <<\EOF
#define MIME_STRICT_CHARSET 1
EOF

  fi
else
  enableval=yes 
  cat >> confdefs.h <<\EOF
#define MIME_STRICT_CHARSET 1
EOF

  
fi

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

echo $ac_n "checking for MIME character-set""... $ac_c" 1>&6
echo "configure:2327: checking for MIME character-set" >&5
# Check whether --with-mime-default-charset or --without-mime-default-charset was given.
if test "${with_mime_default_charset+set}" = set; then
  withval="$with_mime_default_charset"
  :
else
  withval="${MM_CHARSET-US-ASCII}"
fi
case "$withval" in #(vi
yes|no)
  echo 'configure: error: expected a value for MM_CHARSET' 1>&2
  exit 1
  ;;
esac
MM_CHARSET="$withval"
cat >> confdefs.h <<EOF
#define MM_CHARSET "$MM_CHARSET"
EOF

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

echo $ac_n "checking for default ISO/ASCII table""... $ac_c" 1>&6
echo "configure:2349: checking for default ISO/ASCII table" >&5
# Check whether --with-iso-to-ascii or --without-iso-to-ascii was given.
if test "${with_iso_to_ascii+set}" = set; then
  withval="$with_iso_to_ascii"
  :
else
  withval="${DEFAULT_ISO2ASC--1}"
fi
case "$withval" in #(vi
yes|no)
  echo 'configure: error: expected a value for DEFAULT_ISO2ASC' 1>&2
  exit 1
  ;;
esac
DEFAULT_ISO2ASC="$withval"
cat >> confdefs.h <<EOF
#define DEFAULT_ISO2ASC "$DEFAULT_ISO2ASC"
EOF

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

echo $ac_n "checking whether to enable forged cancels""... $ac_c" 1>&6
echo "configure:2371: checking whether to enable forged cancels" >&5
# Check whether --enable-forgery or --disable-forgery was given.
if test "${enable_forgery+set}" = set; then
  enableval="$enable_forgery"
  test "$enableval" != yes && enableval=no
  if test "$enableval" != "no" ; then
    cat >> confdefs.h <<\EOF
#define FORGERY 1
EOF
 
  fi
else
  enableval=no   
fi

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

echo $ac_n "checking whether to enable locale support""... $ac_c" 1>&6
echo "configure:2389: checking whether to enable locale support" >&5
# Check whether --enable-locale or --disable-locale was given.
if test "${enable_locale+set}" = set; then
  enableval="$enable_locale"
  test "$enableval" != no && enableval=yes
  if test "$enableval" != "yes" ; then
    cat >> confdefs.h <<\EOF
#define NO_LOCALE 1
EOF
 
  fi
else
  enableval=yes   
fi

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

echo $ac_n "checking whether to enable piping support""... $ac_c" 1>&6
echo "configure:2407: checking whether to enable piping support" >&5
# Check whether --enable-piping or --disable-piping was given.
if test "${enable_piping+set}" = set; then
  enableval="$enable_piping"
  test "$enableval" != no && enableval=yes
  if test "$enableval" != "yes" ; then
    cat >> confdefs.h <<\EOF
#define DONT_HAVE_PIPING 1
EOF
 
  fi
else
  enableval=yes   
fi

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

echo $ac_n "checking whether to unique tmp-files by appending .pid""... $ac_c" 1>&6
echo "configure:2425: checking whether to unique tmp-files by appending .pid" >&5
# Check whether --enable-append-pid or --disable-append-pid was given.
if test "${enable_append_pid+set}" = set; then
  enableval="$enable_append_pid"
  test "$enableval" != no && enableval=yes
  if test "$enableval" != "yes" ; then
    : 
  else
    cat >> confdefs.h <<\EOF
#define APPEND_PID 1
EOF

  fi
else
  enableval=yes 
  cat >> confdefs.h <<\EOF
#define APPEND_PID 1
EOF

  
fi

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

###	checks for operator characteristics (should be the last option)
echo $ac_n "checking whether to make a coffee while compiling""... $ac_c" 1>&6
echo "configure:2451: checking whether to make a coffee while compiling" >&5
# Check whether --with-coffee or --without-coffee was given.
if test "${with_coffee+set}" = set; then
  withval="$with_coffee"
   case "$withval" in
	yes)
	echo "$ac_t""yes - with milk - please!" 1>&6
	cat >> confdefs.h <<\EOF
#define HAVE_COFFEE 1
EOF

	;;
	*)
	echo "$ac_t""no" 1>&6
	;;
	esac
else
  echo "$ac_t""no" 1>&6
fi


###	checks for compiler characteristics

echo $ac_n "checking for makeflags variable""... $ac_c" 1>&6
echo "configure:2475: checking for makeflags variable" >&5
if eval "test \"`echo '$''{'cf_cv_makeflags'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
	cf_cv_makeflags=''
	for cf_option in '$(MFLAGS)' '-$(MAKEFLAGS)'
	do
		cat >cf_makeflags.tmp <<CF_EOF
all :
	echo '.$cf_option'
CF_EOF
		set cf_result=`${MAKE-make} -f cf_makeflags.tmp 2>/dev/null`
		if test "$cf_result" != "."
		then
			cf_cv_makeflags=$cf_option
			break
		fi
	done
	rm -f cf_makeflags.tmp
fi

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


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

echo $ac_n "checking for working const""... $ac_c" 1>&6
echo "configure:2508: 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 2513 "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:2562: \"$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 inline""... $ac_c" 1>&6
echo "configure:2583: checking for inline" >&5
if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_cv_c_inline=no
for ac_kw in inline __inline__ __inline; do
  cat > conftest.$ac_ext <<EOF
#line 2590 "configure"
#include "confdefs.h"

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

fi

echo "$ac_t""$ac_cv_c_inline" 1>&6
case "$ac_cv_c_inline" in
  inline | yes) ;;
  no) cat >> confdefs.h <<\EOF
#define inline 
EOF
 ;;
  *)  cat >> confdefs.h <<EOF
#define inline $ac_cv_c_inline
EOF
 ;;
esac


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

#define string(n) #n
int main() {
char *s = string(token)
; return 0; }
EOF
if { (eval echo configure:2638: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  cf_cv_ansi_assert=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  cf_cv_ansi_assert=no
fi
rm -f conftest*

fi

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



echo $ac_n "checking if nested parameters work""... $ac_c" 1>&6
echo "configure:2659: checking if nested parameters work" >&5
if eval "test \"`echo '$''{'cf_cv_nested_params'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
	cat > conftest.$ac_ext <<EOF
#line 2665 "configure"
#include "confdefs.h"

int main() {
extern void (*sigdisp(int sig, void (*func)(int sig)))(int sig)
; return 0; }
EOF
if { (eval echo configure:2672: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  cf_cv_nested_params=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  cf_cv_nested_params=no
fi
rm -f conftest*

fi

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



### check for alloca (only required for bison)
case "$YACC" in
bison*)
  # 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:2698: 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 2703 "configure"
#include "confdefs.h"
#include <alloca.h>
int main() {
char *p = alloca(2 * sizeof(int));
; return 0; }
EOF
if { (eval echo configure:2710: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  rm -rf conftest*
  ac_cv_header_alloca_h=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_header_alloca_h=no
fi
rm -f conftest*
fi

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

fi

echo $ac_n "checking for alloca""... $ac_c" 1>&6
echo "configure:2731: 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 2736 "configure"
#include "confdefs.h"

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

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

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

fi

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


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

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

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

done
fi

echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
echo "configure:2876: 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 2884 "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:2903: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
  ac_cv_c_stack_direction=1
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_c_stack_direction=-1
fi
rm -fr conftest*
fi

fi

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

fi

  ;;
*)
  ALLOCA=""
  
  ;;
esac

###	Checks for header files.
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
echo "configure:2933: 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 2938 "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:2946: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
  rm -rf conftest*
  ac_cv_header_stdc=yes
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_header_stdc=no
fi
rm -f conftest*

if test $ac_cv_header_stdc = yes; then
  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
#line 2963 "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 2981 "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 3002 "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:3013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
  :
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_header_stdc=no
fi
rm -fr conftest*
fi

fi
fi

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

fi

ac_header_dirent=no
for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
echo "configure:3041: 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 3046 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <$ac_hdr>
int main() {
DIR *dirp = 0;
; return 0; }
EOF
if { (eval echo configure:3054: \"$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:3079: 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 3087 "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:3098: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

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

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

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

fi

echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
echo "configure:3162: 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 3167 "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:3176: \"$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

echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
echo "configure:3197: checking for sys/wait.h that is POSIX.1 compatible" >&5
if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 3202 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/wait.h>
#ifndef WEXITSTATUS
#define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
#endif
#ifndef WIFEXITED
#define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
#endif
int main() {
int s;
wait (&s);
s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
; return 0; }
EOF
if { (eval echo configure:3218: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_header_sys_wait_h=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_header_sys_wait_h=no
fi
rm -f conftest*
fi

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

fi

for ac_hdr in \
	arpa/inet.h \
	curses.h \
	errno.h \
	fcntl.h \
	getopt.h \
	ioctl.h \
	libc.h \
	locale.h \
	malloc.h \
	netdb.h \
	netinet/in.h \
	netlib.h \
	poll.h \
	prototypes.h \
	pwd.h \
	sgtty.h \
	stddef.h \
	stdlib.h \
	string.h \
	strings.h \
	stropts.h \
	sys/bsdtypes.h \
	sys/ioctl.h \
	sys/param.h \
	sys/ptem.h \
	sys/pty.h \
	sys/select.h \
	sys/stream.h \
	sys/socket.h \
	sys/time.h \
	sys/timeb.h \
	sys/times.h \
	sys/utsname.h \
	term.h \
	termcap.h \
	termio.h \
	time.h \
	unistd.h \
	waitstatus.h \

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


# check for SCO.  this is a hack, and should be split into individual
# features -- the sys/time.h and select.h conflict, and the need for
# ptem.h due to winsize struct.
echo "checking for SCO by checking on /usr/bin/scosh" 1>&6
echo "configure:3323: checking for SCO by checking on /usr/bin/scosh" >&5
# Extract the first word of "scosh", so it can be a program name with args.
set dummy scosh; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:3327: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_COULD_BE_SCO'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$COULD_BE_SCO"; then
  ac_cv_prog_COULD_BE_SCO="$COULD_BE_SCO" # Let the user override the test.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  for ac_dir in $PATH; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_prog_COULD_BE_SCO="maybe"
      break
    fi
  done
  IFS="$ac_save_ifs"
  test -z "$ac_cv_prog_COULD_BE_SCO" && ac_cv_prog_COULD_BE_SCO="maybenot"
fi
fi
COULD_BE_SCO="$ac_cv_prog_COULD_BE_SCO"
if test -n "$COULD_BE_SCO"; then
  echo "$ac_t""$COULD_BE_SCO" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

if test "$COULD_BE_SCO" = "maybe"
then
	cat >> confdefs.h <<\EOF
#define SYSTEM_LOOKS_LIKE_SCO 1
EOF

fi

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

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

fi

echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
echo "configure:3396: 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 3401 "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:3418: \"$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



###	Checks for libraries.
found_tcap=no
if test $found_ncurses = yes ; then
	found_tcap=yes
else
	echo $ac_n "checking for tgoto in -ltermlib""... $ac_c" 1>&6
echo "configure:3443: checking for tgoto in -ltermlib" >&5
ac_lib_var=`echo termlib'_'tgoto | 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="-ltermlib  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 3451 "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 tgoto();

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

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

fi
if test "$found_tcap" != yes; then
	# allow curses library for broken AIX system.
	echo $ac_n "checking for initscr in -lcurses""... $ac_c" 1>&6
echo "configure:3486: checking for initscr in -lcurses" >&5
ac_lib_var=`echo curses'_'initscr | 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 3494 "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 initscr();

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

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

	echo $ac_n "checking for tgoto in -ltermcap""... $ac_c" 1>&6
echo "configure:3526: checking for tgoto in -ltermcap" >&5
ac_lib_var=`echo termcap'_'tgoto | 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 3534 "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 tgoto();

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

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

fi
if test "$found_tcap" != yes; then
	echo $ac_n "checking for tgoto in -ltermcap""... $ac_c" 1>&6
echo "configure:3568: checking for tgoto in -ltermcap" >&5
ac_lib_var=`echo termcap'_'tgoto | 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 3576 "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 tgoto();

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

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

fi
if test "$found_tcap" != yes; then
	echo "configure: warning: Can't find -ltermlib, -lcurses, or -ltermcap" 1>&2
fi
echo $ac_n "checking declaration of tputs 3rd param""... $ac_c" 1>&6
echo "configure:3612: checking declaration of tputs 3rd param" >&5
if eval "test \"`echo '$''{'cf_cv_type_outchar'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
cf_cv_type_outchar="int OutChar(int)"
cf_cv_found=no
for P in int void; do
for Q in int void; do
for R in int char; do
for S in "" const; do
	cat > conftest.$ac_ext <<EOF
#line 3624 "configure"
#include "confdefs.h"

#ifdef USE_TERMINFO
#include <curses.h>
#include <term.h>
#else
#if HAVE_CURSES_H
#include <curses.h>	/* FIXME: this should be included only for terminfo */
#endif
#if HAVE_TERMCAP_H
#include <termcap.h>
#endif
#endif 
int main() {
extern $Q OutChar($R);
	extern $P tputs ($S char *string, int nlines, $Q (*_f)($R));
	tputs("", 1, OutChar)
; return 0; }
EOF
if { (eval echo configure:3644: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  cf_cv_type_outchar="$Q OutChar($R)"
	 cf_cv_found=yes
	 break
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
fi
rm -f conftest*
done
	test $cf_cv_found = yes && break
done
	test $cf_cv_found = yes && break
done
	test $cf_cv_found = yes && break
done
	
fi

echo "$ac_t""$cf_cv_type_outchar" 1>&6
case $cf_cv_type_outchar in
int*)
	cat >> confdefs.h <<\EOF
#define OUTC_RETURN 1
EOF

	;;
esac
case $cf_cv_type_outchar in
*char*)
	cat >> confdefs.h <<\EOF
#define OUTC_ARGS char
EOF

	;;
esac


###	Checks for external-data

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

#include <errno.h>
int main() {
int x = errno
; return 0; }
EOF
if { (eval echo configure:3700: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  cf_cv_extern_errno=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  cf_cv_extern_errno=no
fi
rm -f conftest*
fi

echo "$ac_t""$cf_cv_extern_errno" 1>&6
test $cf_cv_extern_errno = no && cat >> confdefs.h <<\EOF
#define DECL_ERRNO 1
EOF



echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
echo "configure:3720: checking declaration of sys_errlist" >&5
if eval "test \"`echo '$''{'cf_cv_dcl_sys_errlist'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
	cat > conftest.$ac_ext <<EOF
#line 3726 "configure"
#include "confdefs.h"

#include <stdio.h>
#include <sys/types.h>
#include <errno.h> 
int main() {
char *c = (char *) *sys_errlist
; return 0; }
EOF
if { (eval echo configure:3736: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  cf_cv_dcl_sys_errlist=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  cf_cv_dcl_sys_errlist=no
fi
rm -f conftest*
fi

echo "$ac_t""$cf_cv_dcl_sys_errlist" 1>&6
test $cf_cv_dcl_sys_errlist = no && cat >> confdefs.h <<\EOF
#define DECL_SYS_ERRLIST 1
EOF



###	Checks for library functions.
for ac_func in \
	atoi \
	atol \
	ftime \
	getcwd \
	is_xterm \
	memcmp \
	memcpy \
	memset \
	mkdir \
	poll \
	putenv \
	rewinddir \
	select \
	setegid \
	seteuid \
	setgid \
	setlocale \
	setpgrp \
	setregid \
	setreuid \
	setuid \
	sigaction \
	strchr \
	strerror \
	strftime \
	strpbrk \
	strstr \
	strtol \
	tzset \
	uname \
	unlink \

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

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


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

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


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



for ac_func in \
	errno \
	getenv \
	gethostbyname \
	getlogin \
	getpwnam \
	getservbyname \
	inet_ntoa \
	popen \
	strchr \
	tgetstr \
	tgoto \

do

ac_tr_func=`echo $ac_func | tr '[a-z]' '[A-Z]'`


echo $ac_n "checking for missing "${ac_func}" extern""... $ac_c" 1>&6
echo "configure:3904: checking for missing "${ac_func}" extern" >&5
if eval "test \"`echo '$''{'cf_cv_func_${ac_func}'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
echo "(line 3909) testing for missing "${ac_func}" external ..." 1>&5

cat > conftest.$ac_ext <<EOF
#line 3912 "configure"
#include "confdefs.h"

#include <stdio.h>
#include <sys/types.h>
#include <signal.h>
#ifdef HAVE_ERRNO_H
#	include <errno.h>
#else
#	include <sys/errno.h>
#endif
#ifdef HAVE_LIBC_H
#	include <libc.h>
#endif
#ifdef HAVE_UNISTD_H
#	include <unistd.h>
#endif
#ifdef HAVE_STDARG_H
#	include <stdarg.h>
#else
#	ifdef HAVE_VARARGS_H
#		include <varargs.h>
#	endif
#endif
#ifdef HAVE_UNISTD_H
#	include <unistd.h>
#endif
#ifdef HAVE_STDLIB_H
#	include <stdlib.h>
#endif
#ifdef HAVE_STDDEF_H
#	include <stddef.h>
#endif
#ifdef HAVE_PWD_H
#	include <pwd.h>
#endif
#ifdef HAVE_NETDB_H
#	include <netdb.h>
#endif
#ifdef HAVE_ARPA_INET_H
#	include <arpa/inet.h>
#endif

#if STDC_HEADERS || HAVE_STRING_H
#	include <string.h>
  /* An ANSI string.h and pre-ANSI memory.h might conflict.  */
#	if !STDC_HEADERS && HAVE_MEMORY_H
#		include <memory.h>
#	endif /* not STDC_HEADERS and HAVE_MEMORY_H */
#else /* not STDC_HEADERS and not HAVE_STRING_H */
#	if HAVE_STRINGS_H
#		include <strings.h>
  /* memory.h and strings.h conflict on some systems */
#	endif
#endif /* not STDC_HEADERS and not HAVE_STRING_H */

/* unistd.h defines _POSIX_VERSION on POSIX.1 systems.  */
#if defined(HAVE_DIRENT_H) || defined(_POSIX_VERSION)
#	include <dirent.h>
#else /* not (HAVE_DIRENT_H or _POSIX_VERSION) */
#	ifdef HAVE_SYS_NDIR_H
#		include <sys/ndir.h>
#	endif /* HAVE_SYS_NDIR_H */
#	ifdef HAVE_SYS_DIR_H
#		include <sys/dir.h>
#	endif /* HAVE_SYS_DIR_H */
#	ifdef HAVE_NDIR_H
#		include <ndir.h>
#	endif /* HAVE_NDIR_H */
#endif /* not (HAVE_DIRENT_H or _POSIX_VERSION) */

#ifdef HAVE_SYS_FILE_H
#	include <sys/file.h>
#endif
#ifdef HAVE_SYS_STAT_H
#	include <sys/stat.h>
#endif

#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

#ifdef HAVE_SYS_TIMES_H
#	include <sys/times.h>
#endif
#ifdef HAVE_SYS_PARAM_H
#	include <sys/param.h>
#endif
#ifdef HAVE_SYS_WAIT_H
#	include <sys/wait.h>
#endif
#ifdef HAVE_SYS_SELECT_H
#	include <sys/select.h>
#endif

#ifdef HAVE_CURSES_H
#	include <curses.h>
#endif

#if 0	/* FIXME: this has prototypes, but creates new problems */
#ifdef HAVE_TERM_H
#	include <term.h>
#endif
#endif

#ifdef HAVE_TERMCAP_H
#	include <termcap.h>
#endif

#ifdef HAVE_IOCTL_H
#	include <ioctl.h>
#else
#	ifdef HAVE_SYS_IOCTL_H
#		include <sys/ioctl.h>
#	endif
#endif

#undef ${ac_func}
struct zowie { int a; double b; struct zowie *c; char d; };
extern struct zowie *${ac_func}();

int main() {


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

eval 'cf_result=$cf_cv_func_'${ac_func}
echo "$ac_t""$cf_result" 1>&6
test $cf_result = yes && cat >> confdefs.h <<EOF
#define DECL_${ac_tr_func} 1
EOF

done


if test $with_decl_check = yes; then
for ac_func in \
	_flsbuf \
	atoi \
	atol \
	bcopy \
	bzero \
	calloc \
	fclose \
	fdopen \
	fileno \
	fflush \
	fprintf \
	fputc \
	fputs \
	fread \
	free \
	fseek \
	fwrite \
	getcwd \
	gethostname \
	getopt \
	ioctl \
	malloc \
	memset \
	mktemp \
	pclose \
	perror \
	printf \
	putenv \
	qsort \
	realloc \
	rewind \
	select \
	setegid \
	seteuid \
	setpgrp \
	setregid \
	setreuid \
	socket \
	sscanf \
	strcasecmp \
	strftime \
	strncasecmp \
	strtol \
	system \
	tgetent \
	tgetflag \
	tgetnum \
	time \
	tolower \
	toupper \
	tputs \

do

ac_tr_func=`echo $ac_func | tr '[a-z]' '[A-Z]'`


echo $ac_n "checking for missing "${ac_func}" extern""... $ac_c" 1>&6
echo "configure:4126: checking for missing "${ac_func}" extern" >&5
if eval "test \"`echo '$''{'cf_cv_func_${ac_func}'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
echo "(line 4131) testing for missing "${ac_func}" external ..." 1>&5

cat > conftest.$ac_ext <<EOF
#line 4134 "configure"
#include "confdefs.h"

#include <stdio.h>
#include <sys/types.h>
#include <signal.h>
#ifdef HAVE_ERRNO_H
#	include <errno.h>
#else
#	include <sys/errno.h>
#endif
#ifdef HAVE_LIBC_H
#	include <libc.h>
#endif
#ifdef HAVE_UNISTD_H
#	include <unistd.h>
#endif
#ifdef HAVE_STDARG_H
#	include <stdarg.h>
#else
#	ifdef HAVE_VARARGS_H
#		include <varargs.h>
#	endif
#endif
#ifdef HAVE_UNISTD_H
#	include <unistd.h>
#endif
#ifdef HAVE_STDLIB_H
#	include <stdlib.h>
#endif
#ifdef HAVE_STDDEF_H
#	include <stddef.h>
#endif
#ifdef HAVE_PWD_H
#	include <pwd.h>
#endif
#ifdef HAVE_NETDB_H
#	include <netdb.h>
#endif
#ifdef HAVE_ARPA_INET_H
#	include <arpa/inet.h>
#endif

#if STDC_HEADERS || HAVE_STRING_H
#	include <string.h>
  /* An ANSI string.h and pre-ANSI memory.h might conflict.  */
#	if !STDC_HEADERS && HAVE_MEMORY_H
#		include <memory.h>
#	endif /* not STDC_HEADERS and HAVE_MEMORY_H */
#else /* not STDC_HEADERS and not HAVE_STRING_H */
#	if HAVE_STRINGS_H
#		include <strings.h>
  /* memory.h and strings.h conflict on some systems */
#	endif
#endif /* not STDC_HEADERS and not HAVE_STRING_H */

/* unistd.h defines _POSIX_VERSION on POSIX.1 systems.  */
#if defined(HAVE_DIRENT_H) || defined(_POSIX_VERSION)
#	include <dirent.h>
#else /* not (HAVE_DIRENT_H or _POSIX_VERSION) */
#	ifdef HAVE_SYS_NDIR_H
#		include <sys/ndir.h>
#	endif /* HAVE_SYS_NDIR_H */
#	ifdef HAVE_SYS_DIR_H
#		include <sys/dir.h>
#	endif /* HAVE_SYS_DIR_H */
#	ifdef HAVE_NDIR_H
#		include <ndir.h>
#	endif /* HAVE_NDIR_H */
#endif /* not (HAVE_DIRENT_H or _POSIX_VERSION) */

#ifdef HAVE_SYS_FILE_H
#	include <sys/file.h>
#endif
#ifdef HAVE_SYS_STAT_H
#	include <sys/stat.h>
#endif

#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

#ifdef HAVE_SYS_TIMES_H
#	include <sys/times.h>
#endif
#ifdef HAVE_SYS_PARAM_H
#	include <sys/param.h>
#endif
#ifdef HAVE_SYS_WAIT_H
#	include <sys/wait.h>
#endif
#ifdef HAVE_SYS_SELECT_H
#	include <sys/select.h>
#endif

#ifdef HAVE_CURSES_H
#	include <curses.h>
#endif

#if 0	/* FIXME: this has prototypes, but creates new problems */
#ifdef HAVE_TERM_H
#	include <term.h>
#endif
#endif

#ifdef HAVE_TERMCAP_H
#	include <termcap.h>
#endif

#ifdef HAVE_IOCTL_H
#	include <ioctl.h>
#else
#	ifdef HAVE_SYS_IOCTL_H
#		include <sys/ioctl.h>
#	endif
#endif

#undef ${ac_func}
struct zowie { int a; double b; struct zowie *c; char d; };
extern struct zowie *${ac_func}();

int main() {


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

eval 'cf_result=$cf_cv_func_'${ac_func}
echo "$ac_t""$cf_result" 1>&6
test $cf_result = yes && cat >> confdefs.h <<EOF
#define DECL_${ac_tr_func} 1
EOF

done

fi

echo $ac_n "checking if select expects int * arguments""... $ac_c" 1>&6
echo "configure:4290: checking if select expects int * arguments" >&5
cat > conftest.$ac_ext <<EOF
#line 4292 "configure"
#include "confdefs.h"
#include <time.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "select\(.*, *int *\*," >/dev/null 2>&1; then
  rm -rf conftest*
  cat >> confdefs.h <<\EOF
#define HAVE_SELECT_INTP 1
EOF
 echo "$ac_t""yes" 1>&6
else
  rm -rf conftest*
  echo "$ac_t""no" 1>&6
fi
rm -f conftest*


echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6
echo "configure:4311: 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 4319 "configure"
#include "confdefs.h"

/*
 * If this system has a BSD-style setpgrp, which takes arguments, exit
 * successfully.
 */
main()
{
    if (setpgrp(1,1) == -1)
	exit(0);
    else
	exit(1);
}

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


fi

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

fi


NETLIBS=""
echo $ac_n "checking for gethostname""... $ac_c" 1>&6
echo "configure:4361: checking for gethostname" >&5
if eval "test \"`echo '$''{'ac_cv_func_gethostname'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 4366 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char gethostname(); 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 gethostname();

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_gethostname) || defined (__stub___gethostname)
choke me
#else
gethostname();
#endif

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

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

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

	echo $ac_n "checking for gethostname in -lnsl""... $ac_c" 1>&6
echo "configure:4411: checking for gethostname in -lnsl" >&5
ac_lib_var=`echo nsl'_'gethostname | 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 $NETLIBS $LIBS"
cat > conftest.$ac_ext <<EOF
#line 4419 "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 gethostname();

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

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  cat >> confdefs.h <<\EOF
#define HAVE_GETHOSTNAME 1
EOF

		NETLIBS="-lnsl $NETLIBS"
else
  echo "$ac_t""no" 1>&6
fi

fi

echo $ac_n "checking for socket""... $ac_c" 1>&6
echo "configure:4457: checking for socket" >&5
if eval "test \"`echo '$''{'ac_cv_func_socket'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 4462 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char socket(); 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 socket();

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_socket) || defined (__stub___socket)
choke me
#else
socket();
#endif

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

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

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

	echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
echo "configure:4507: checking for socket in -lsocket" >&5
ac_lib_var=`echo socket'_'socket | 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 $NETLIBS $LIBS"
cat > conftest.$ac_ext <<EOF
#line 4515 "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 socket();

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

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  cat >> confdefs.h <<\EOF
#define HAVE_SOCKET 1
EOF

		NETLIBS="-lsocket $NETLIBS"
else
  echo "$ac_t""no" 1>&6
echo $ac_n "checking for socket in -lbsd""... $ac_c" 1>&6
echo "configure:4549: checking for socket in -lbsd" >&5
ac_lib_var=`echo bsd'_'socket | 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="-lbsd  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 4557 "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 socket();

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

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  cat >> confdefs.h <<\EOF
#define HAVE_SOCKET 1
EOF

			NETLIBS="-lbsd $NETLIBS"
else
  echo "$ac_t""no" 1>&6
fi

fi

fi

echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
echo "configure:4597: checking for gethostbyname" >&5
if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 4602 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char gethostbyname(); 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 gethostbyname();

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_gethostbyname) || defined (__stub___gethostbyname)
choke me
#else
gethostbyname();
#endif

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

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

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

	echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
echo "configure:4647: checking for gethostbyname in -lnsl" >&5
ac_lib_var=`echo nsl'_'gethostbyname | 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 $NETLIBS $LIBS"
cat > conftest.$ac_ext <<EOF
#line 4655 "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 gethostbyname();

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

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  cat >> confdefs.h <<\EOF
#define HAVE_GETHOSTBYNAME 1
EOF

		NETLIBS="-lnsl $NETLIBS"
else
  echo "$ac_t""no" 1>&6
fi

fi

echo $ac_n "checking for strcasecmp""... $ac_c" 1>&6
echo "configure:4693: checking for strcasecmp" >&5
if eval "test \"`echo '$''{'ac_cv_func_strcasecmp'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 4698 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char strcasecmp(); 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 strcasecmp();

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_strcasecmp) || defined (__stub___strcasecmp)
choke me
#else
strcasecmp();
#endif

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

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

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

	echo $ac_n "checking for strcasecmp in -lresolv""... $ac_c" 1>&6
echo "configure:4743: checking for strcasecmp in -lresolv" >&5
ac_lib_var=`echo resolv'_'strcasecmp | 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="-lresolv $NETLIBS $LIBS"
cat > conftest.$ac_ext <<EOF
#line 4751 "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 strcasecmp();

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

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  cat >> confdefs.h <<\EOF
#define HAVE_STRCASECMP 1
EOF

		NETLIBS="-lresolv $NETLIBS"
else
  echo "$ac_t""no" 1>&6
fi

fi

LIBS="$LIBS $NETLIBS"

###	Checks for network library functions.
for ac_func in \
	getservbyname \
	inet_addr \
	inet_ntoa \
	strncasecmp \

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

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


if test $ac_cv_func_sigaction = yes; then
echo $ac_n "checking whether sigaction needs _POSIX_SOURCE""... $ac_c" 1>&6
echo "configure:4854: checking whether sigaction needs _POSIX_SOURCE" >&5
cat > conftest.$ac_ext <<EOF
#line 4856 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <signal.h>
int main() {
struct sigaction act;
; return 0; }
EOF
if { (eval echo configure:4864: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  sigact_bad=no
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  sigact_bad=yes cat >> confdefs.h <<\EOF
#define SVR4_ACTION 1
EOF

fi
rm -f conftest*
fi
echo "$ac_t""$sigact_bad" 1>&6


echo $ac_n "checking for setuid-like functions""... $ac_c" 1>&6
echo "configure:4882: checking for setuid-like functions" >&5
if eval "test \"`echo '$''{'cf_cv_setuid_funcs'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
if test -n "${ac_cv_func_setuid}${ac_cv_func_seteuid}${ac_cv_func_setreuid}"; then
	cf_cv_setuid_funcs=yes
else
	cf_cv_setuid_funcs=no
fi

fi

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



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

#include <signal.h>
int main() {
sigaction_t x
; return 0; }
EOF
if { (eval echo configure:4917: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  cf_cv_type_sigaction=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  cf_cv_type_sigaction=no
fi
rm -f conftest*
fi

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



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

#ifdef HAVE_IOCTL_H
#	include <ioctl.h>
#else
#	ifdef HAVE_SYS_IOCTL_H
#		include <sys/ioctl.h>
#	endif
#endif

#if !defined(sun) || !defined(NL0)
#include <termios.h>
#endif

int main() {

	struct termios save_tty;
	(void) tcsetattr (0, TCSANOW, &save_tty);
	(void) tcgetattr (0, &save_tty)
; return 0; }
EOF
if { (eval echo configure:4965: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  rm -rf conftest*
  cf_cv_use_termios_h=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  cf_cv_use_termios_h=no
fi
rm -f conftest*

fi

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

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

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

fi


echo $ac_n "checking for tm.tm_gmtoff""... $ac_c" 1>&6
echo "configure:4996: checking for tm.tm_gmtoff" >&5
if eval "test \"`echo '$''{'cf_cv_tm_gmtoff'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
	cat > conftest.$ac_ext <<EOF
#line 5002 "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 tm foo;
	long bar = foo.tm_gmtoff
; return 0; }
EOF
if { (eval echo configure:5022: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  cf_cv_tm_gmtoff=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  cf_cv_tm_gmtoff=no
fi
rm -f conftest*
fi

echo "$ac_t""$cf_cv_tm_gmtoff" 1>&6
test $cf_cv_tm_gmtoff = no && cat >> confdefs.h <<\EOF
#define DONT_HAVE_TM_GMTOFF 1
EOF



echo $ac_n "checking for long file names""... $ac_c" 1>&6
echo "configure:5042: checking for long file names" >&5
if eval "test \"`echo '$''{'ac_cv_sys_long_file_names'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_cv_sys_long_file_names=yes
# Test for long file names in all the places we know might matter:
#      .		the current directory, where building will happen
#      $prefix/lib	where we will be installing things
#      $exec_prefix/lib	likewise
# eval it to expand exec_prefix.
#      $TMPDIR		if set, where it might want to write temporary files
# if $TMPDIR is not set:
#      /tmp		where it might want to write temporary files
#      /var/tmp		likewise
#      /usr/tmp		likewise
if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
  ac_tmpdirs="$TMPDIR"
else
  ac_tmpdirs='/tmp /var/tmp /usr/tmp'
fi
for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
  test -d $ac_dir || continue
  test -w $ac_dir || continue # It is less confusing to not echo anything here.
  (echo 1 > $ac_dir/conftest9012345) 2>/dev/null
  (echo 2 > $ac_dir/conftest9012346) 2>/dev/null
  val=`cat $ac_dir/conftest9012345 2>/dev/null`
  if test ! -f $ac_dir/conftest9012345 || test "$val" != 1; then
    ac_cv_sys_long_file_names=no
    rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
    break
  fi
  rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
done
fi

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

fi


echo $ac_n "checking declaration of signal arguments""... $ac_c" 1>&6
echo "configure:5087: checking declaration of signal arguments" >&5
if eval "test \"`echo '$''{'cf_cv_sig_args'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
cf_cv_sig_args=
for cf_test in "int sig" "int sig, ..."
do
	cat > conftest.$ac_ext <<EOF
#line 5096 "configure"
#include "confdefs.h"

#include <signal.h>
int main() {
extern RETSIGTYPE catch($cf_test); signal(SIGINT, catch)
; return 0; }
EOF
if { (eval echo configure:5104: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  cf_cv_sig_args="$cf_test";break
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
fi
rm -f conftest*
done

fi

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



echo $ac_n "checking if the system function returns usable child-status""... $ac_c" 1>&6
echo "configure:5124: checking if the system function returns usable child-status" >&5
if eval "test \"`echo '$''{'cf_cv_system_status'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
	if test "$cross_compiling" = yes; then
  cf_cv_system_status=unknown
else
  cat > conftest.$ac_ext <<EOF
#line 5133 "configure"
#include "confdefs.h"

	int main() { exit(system("exit 23") != (23 << 8)); }
	
EOF
if { (eval echo configure:5139: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
  cf_cv_system_status=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  
	if test "$cross_compiling" = yes; then
  cf_cv_system_status=unknown
else
  cat > conftest.$ac_ext <<EOF
#line 5151 "configure"
#include "confdefs.h"

#include <stdio.h>
#include <signal.h>
#if HAVE_SYS_WAIT_H
#include <sys/wait.h>
#endif

RETSIGTYPE signal_handler (int sig)
{
#if HAVE_TYPE_UNIONWAIT
	union wait wait_status;
#else
	int wait_status = 1;
#endif
	int system_status;
	wait (&wait_status);
	system_status = WEXITSTATUS(wait_status); /* should be nonzero */
	exit(system_status == 0);
}

int main()
{
	/* this looks weird, but apparently the SIGCHLD gets there first on
	 * machines where 'system()' doesn't return a usable code, so ...
	 */
	signal (SIGCHLD, signal_handler);
	system("exit 23");
	exit(1);
}

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

fi
rm -fr conftest*
fi


fi

echo "$ac_t""$cf_cv_system_status" 1>&6
test $cf_cv_system_status = no && cat >> confdefs.h <<\EOF
#define USE_SYSTEM_STATUS 1
EOF



# GCC and Apollo compilers are quite noisy about signal constants (quiet them).
if test -n "$GCC"; then
  check_sig_const=yes
elif test -f /sys/dm/dm ; then
  check_sig_const=yes
elif test -f /sys/dm/spm ; then
  check_sig_const=yes
else
  check_sig_const=no
fi

if test $check_sig_const = yes ; then
  

echo $ac_n "checking for redefinable signal constants""... $ac_c" 1>&6
echo "configure:5225: checking for redefinable signal constants" >&5
if eval "test \"`echo '$''{'cf_cv_sig_const'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
cf_cv_sig_const=no
if test -n "$cf_cv_sig_args"; then
	cf_test=`echo $cf_cv_sig_args|sed -e s/sig//`
	if test "$cross_compiling" = yes; then
  cf_cv_sig_const=unknown
else
  cat > conftest.$ac_ext <<EOF
#line 5237 "configure"
#include "confdefs.h"

#define NEW_DFL	((RETSIGTYPE (*)($cf_test))0)
#define NEW_IGN	((RETSIGTYPE (*)($cf_test))1)
#define NEW_ERR	((RETSIGTYPE (*)($cf_test))-1)

#include <signal.h>

int main()
{
	if (NEW_DFL != SIG_DFL
	 || NEW_IGN != SIG_IGN
	 || NEW_ERR != SIG_ERR
	 /* at least one system won't let me redefine these! */
#undef SIG_DFL
#undef SIG_IGN
#undef SIG_ERR
#define SIG_DFL NEW_DFL
#define SIG_IGN NEW_IGN
#define SIG_ERR NEW_ERR
	 || NEW_DFL != SIG_DFL)
	 	exit(1);
	signal(SIGINT, SIG_DFL);
	exit(0);
}
EOF
if { (eval echo configure:5264: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
  cf_cv_sig_const=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  cf_cv_sig_const=no
fi
rm -fr conftest*
fi

fi

fi

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


fi


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

#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
int main() {
extern int compare(const void *, const void *);
	 char *foo = "string";
	 qsort(foo, sizeof(foo)/sizeof(*foo), sizeof(*foo), compare)
; return 0; }
EOF
if { (eval echo configure:5308: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  cf_cv_comptype=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  cf_cv_comptype=no
fi
rm -f conftest*

fi

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

else
	cat >> confdefs.h <<\EOF
#define HAVE_COMPTYPE_CHAR 1
EOF

fi


echo $ac_n "checking if application can dump core""... $ac_c" 1>&6
echo "configure:5336: checking if application can dump core" >&5
if eval "test \"`echo '$''{'cf_cv_corefile'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
	if test "$cross_compiling" = yes; then
  cf_cv_corefile=unknown
else
  cat > conftest.$ac_ext <<EOF
#line 5345 "configure"
#include "confdefs.h"

#include <signal.h>
#include <sys/types.h>
#include <sys/stat.h>
int found()
{
	struct stat sb;
	return ((stat("core", &sb) == 0			/* UNIX */
	   ||    stat("conftest.core", &sb) == 0	/* FreeBSD */
		)
		&& ((sb.st_mode & S_IFMT) == S_IFREG));
}
int main()
{
#ifdef __amiga__
/* Nicholas d'Alterio (nagd@ic.ac.uk) reports that the check for ability to
 * core dump causes the machine to crash - reason unknown (gcc 2.7.2)
 */
	exit(1);
#else
	int	pid, status;
	if (found())
		unlink("core");
	if (found())
		exit(1);
	if ((pid = fork()) != 0) {
		while (wait(&status) <= 0)
			;
	} else {
		abort();	/* this will dump core, if anything will */
	}
	if (found()) {
		unlink("core");
		exit(0);
	}
	exit(1);
#endif
}
EOF
if { (eval echo configure:5386: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
  cf_cv_corefile=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  cf_cv_corefile=no
fi
rm -fr conftest*
fi

fi

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



### test this last, since it uses a partly-built autoconf.h

echo $ac_n "checking for working TIOCGWINSZ""... $ac_c" 1>&6
echo "configure:5410: checking for working TIOCGWINSZ" >&5
if eval "test \"`echo '$''{'cf_cv_use_tiocgwinsz'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
	cf_save="$CFLAGS"
	CFLAGS="-I. -I$srcdir/include -DHAVE_CONFIG_H -D__CPROTO__ $CFLAGS"
	rm -f autoconf.h
	echo > autoconf.h
	if test "$cross_compiling" = yes; then
  cf_cv_use_tiocgwinsz=unknown
else
  cat > conftest.$ac_ext <<EOF
#line 5423 "configure"
#include "confdefs.h"

#ifndef M_UNIX
#define M_UNIX
#endif
#include <tin.h>
int main()
{
	int fd;
	for (fd = 0; fd <= 2; fd++) {	/* try in/out/err in case redirected */
#ifdef TIOCGSIZE
		struct ttysize size;
		if (ioctl (0, TIOCGSIZE, &size) == 0
		 && size.ts_lines > 0
		 && size.ts_cols > 0)
			exit(0);
#else
		struct winsize size;
		if (ioctl(0, TIOCGWINSZ, &size) == 0
		 && size.ws_row > 0
		 && size.ws_col > 0)
			exit(0);
#endif
	}
	exit(0);	/* we cannot guarantee this is run interactively */
}
EOF
if { (eval echo configure:5451: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
  cf_cv_use_tiocgwinsz=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  cf_cv_use_tiocgwinsz=no
fi
rm -fr conftest*
fi

		rm -f autoconf.h
		CFLAGS="$cf_save"
fi

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



### append special libraries that get in the way of testing
case $debug_malloc in
DBMALLOC)
	cat >> confdefs.h <<\EOF
#define USE_DBMALLOC 1
EOF

	LIBS="$LIBS -ldbmalloc"
	;;
DMALLOC)
	cat >> confdefs.h <<\EOF
#define USE_DMALLOC 1
EOF

	LIBS="$LIBS -ldmalloc"
	;;
esac

### Finally, build autoconf.h and the makefiles
CFLAGS="$CFLAGS $EXTRA_CFLAGS"
trap '' 1 2 15
cat > confcache <<\EOF
# This file is a shell script that caches the results of configure
# tests run on this system so they can be shared between configure
# scripts and configure runs.  It is not useful on other systems.
# If it contains results you don't want to keep, you may remove or edit it.
#
# By default, configure uses ./config.cache as the cache file,
# creating it if it does not exist already.  You can give configure
# the --cache-file=FILE option to use a different cache file; that is
# what configure does when it calls configure scripts in
# subdirectories, so they share the cache.
# Giving --cache-file=/dev/null disables caching, for debugging configure.
# config.status only pays attention to the cache file if you give it the
# --recheck option to rerun configure.
#
EOF
# The following way of writing the cache mishandles newlines in values,
# but we know of no workaround that is simple, portable, and efficient.
# So, don't put newlines in cache variables' values.
# Ultrix sh set writes to stderr and can't be redirected directly,
# and sets the high bit in the cache file unless we assign to the vars.
(set) 2>&1 |
  case `(ac_space=' '; set) 2>&1` in
  *ac_space=\ *)
    # `set' does not quote correctly, so add quotes (double-quote substitution
    # turns \\\\ into \\, and sed turns \\ into \).
    sed -n \
      -e "s/'/'\\\\''/g" \
      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
    ;;
  *)
    # `set' quotes correctly as required by POSIX, so do not add quotes.
    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
    ;;
  esac >> confcache
if cmp -s $cache_file confcache; then
  :
else
  if test -w $cache_file; then
    echo "updating cache $cache_file"
    cat confcache > $cache_file
  else
    echo "not updating unwritable cache $cache_file"
  fi
fi
rm -f confcache

trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15

test "x$prefix" = xNONE && prefix=$ac_default_prefix
# Let make expand exec_prefix.
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'

# Any assignment to VPATH causes Sun make to only execute
# the first set of double-colon rules, so remove it if not needed.
# If there is a colon in the path, we need to keep it.
if test "x$srcdir" = x.; then
  ac_vpsub='/^[ 	]*VPATH[ 	]*=[^:]*$/d'
fi

trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15

DEFS=-DHAVE_CONFIG_H

# Without the "./", some shells look in PATH for config.status.
: ${CONFIG_STATUS=./config.status}

echo creating $CONFIG_STATUS
rm -f $CONFIG_STATUS
cat > $CONFIG_STATUS <<EOF
#! /bin/sh
# Generated automatically by configure.
# Run this file to recreate the current configuration.
# This directory was configured as follows,
# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
#
# $0 $ac_configure_args
#
# Compiler output produced by configure, useful for debugging
# configure, is in ./config.log if it exists.

ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
for ac_option
do
  case "\$ac_option" in
  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
    echo "$CONFIG_STATUS generated by autoconf version 2.12"
    exit 0 ;;
  -help | --help | --hel | --he | --h)
    echo "\$ac_cs_usage"; exit 0 ;;
  *) echo "\$ac_cs_usage"; exit 1 ;;
  esac
done

ac_given_srcdir=$srcdir
ac_given_INSTALL="$INSTALL"

trap 'rm -fr `echo "makefile src/Makefile include/autoconf.h:include/autoconf.hin" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
EOF
cat >> $CONFIG_STATUS <<EOF

# Protect against being on the right side of a sed subst in config.status.
sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
$ac_vpsub
$extrasub
s%@CFLAGS@%$CFLAGS%g
s%@CPPFLAGS@%$CPPFLAGS%g
s%@CXXFLAGS@%$CXXFLAGS%g
s%@DEFS@%$DEFS%g
s%@LDFLAGS@%$LDFLAGS%g
s%@LIBS@%$LIBS%g
s%@exec_prefix@%$exec_prefix%g
s%@prefix@%$prefix%g
s%@program_transform_name@%$program_transform_name%g
s%@bindir@%$bindir%g
s%@sbindir@%$sbindir%g
s%@libexecdir@%$libexecdir%g
s%@datadir@%$datadir%g
s%@sysconfdir@%$sysconfdir%g
s%@sharedstatedir@%$sharedstatedir%g
s%@localstatedir@%$localstatedir%g
s%@libdir@%$libdir%g
s%@includedir@%$includedir%g
s%@oldincludedir@%$oldincludedir%g
s%@infodir@%$infodir%g
s%@mandir@%$mandir%g
s%@CC@%$CC%g
s%@CPP@%$CPP%g
s%@SET_MAKE@%$SET_MAKE%g
s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
s%@INSTALL_DATA@%$INSTALL_DATA%g
s%@YACC@%$YACC%g
s%@PATH_UNAME@%$PATH_UNAME%g
s%@PATH_HOSTNAME@%$PATH_HOSTNAME%g
s%@PATH_ISPELL@%$PATH_ISPELL%g
s%@PATH_METAMAIL@%$PATH_METAMAIL%g
s%@PATH_PGP@%$PATH_PGP%g
s%@PATH_SUM@%$PATH_SUM%g
s%@ENABLE_DEBUG@%$ENABLE_DEBUG%g
s%@SHOW_CC@%$SHOW_CC%g
s%@ECHO_CC@%$ECHO_CC%g
s%@NEWSLIBDIR@%$NEWSLIBDIR%g
s%@SPOOLDIR@%$SPOOLDIR%g
s%@NOVROOTDIR@%$NOVROOTDIR%g
s%@INEWSDIR@%$INEWSDIR%g
s%@INN_NNTPLIB@%$INN_NNTPLIB%g
s%@cf_cv_makeflags@%$cf_cv_makeflags%g
s%@ALLOCA@%$ALLOCA%g
s%@COULD_BE_SCO@%$COULD_BE_SCO%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-"makefile src/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="include/autoconf.h:include/autoconf.hin"
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

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

