#! /bin/sh

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

# Defaults:
ac_help=
ac_default_prefix=/usr/local
# Any additions from configure.in:
ac_help="$ac_help
  --with-localdir=/usr/local An extra directory to look for stuff."
ac_help="$ac_help
  --with-threaded-stdout[=yes] Threaded stdout so the client doesn't block when gnu screen malfunctions."
ac_help="$ac_help
  --with-multiplex[=TYPE] Multiplexer type (select,poll,freebsd-kqueue,pthread,solaris-ports)"
ac_help="$ac_help
  --with-ssl[=PATH]       Include SSL support (DIR is OpenSSL's install dir)."
ac_help="$ac_help
  --with-termcap          Forcibly refuse to use terminfo/ncurses "
ac_help="$ac_help
  --with-ipv6             Include IPv6 support"
ac_help="$ac_help
  --with-socks[=PATH]     Compile with SOCKS firewall traversal support."
ac_help="$ac_help
  --with-socks5[=PATH]    Compile with SOCKS5 firewall traversal support."
ac_help="$ac_help
  --with-iconv[=PATH]       Include iconv support (DIR is eg /usr/local)."
ac_help="$ac_help
  --with-wserv       Include Wserv support for multiple screens"
ac_help="$ac_help
  --with-valgrind         Include support for Valgrind Memcheck "
ac_help="$ac_help
  --with-perl[=PATH_TO_PERL_EXE]       Compile with perl support."
ac_help="$ac_help
  --with-tcl[=PATH_TO_tclConfig.sh]      Compile with tcl support."
ac_help="$ac_help
  --with-ruby[=PATH_TO_RUBY_EXE]       Compile with ruby support."
ac_help="$ac_help
  --with-bc[=PATH_TO_GCC] You have bounds checking gcc and want to use it."
ac_help="$ac_help
  --with-warns            You wish to use FreeBSD WARNS-like compiler warnings."

# 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=
sitefile=
srcdir=
target=NONE
verbose=
x_includes=NONE
x_libraries=NONE
bindir='${exec_prefix}/bin'
sbindir='${exec_prefix}/sbin'
libexecdir='${exec_prefix}/libexec'
datadir='${prefix}/share'
sysconfdir='${prefix}/etc'
sharedstatedir='${prefix}/com'
localstatedir='${prefix}/var'
libdir='${exec_prefix}/lib'
includedir='${prefix}/include'
oldincludedir='/usr/include'
infodir='${prefix}/info'
mandir='${prefix}/man'

# Initialize some other variables.
subdirs=
MFLAGS= MAKEFLAGS=
SHELL=${CONFIG_SHELL-/bin/sh}
# Maximum number of lines to put in a shell here document.
ac_max_here_lines=12

ac_prev=
for ac_option
do

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

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

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

  case "$ac_option" in

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

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

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

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

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

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

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

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

  -help | --help | --hel | --he)
    # Omit some internal or obsolete options to make the list less imposing.
    # This message is too long to be a string in the A/UX 3.1 sh.
    cat << EOF
Usage: configure [options] [host]
Options: [defaults in brackets after descriptions]
Configuration:
  --cache-file=FILE       cache test results in FILE
  --help                  print this message
  --no-create             do not create output files
  --quiet, --silent       do not print \`checking...' messages
  --site-file=FILE        use FILE as the site file
  --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" ;;

  -site-file | --site-file | --site-fil | --site-fi | --site-f)
    ac_prev=sitefile ;;
  -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*)
    sitefile="$ac_optarg" ;;

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

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

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

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

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

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

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

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

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

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

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

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

  esac
done

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

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

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

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

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

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

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

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

# Find the source files, if location was not specified.
if test -z "$srcdir"; then
  ac_srcdir_defaulted=yes
  # Try the directory containing this script, then its parent.
  ac_prog=$0
  ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
  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 "$sitefile"; then
  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
else
  CONFIG_SITE="$sitefile"
fi
for ac_site_file in $CONFIG_SITE; do
  if test -r "$ac_site_file"; then
    echo "loading site script $ac_site_file"
    . "$ac_site_file"
  fi
done

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

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

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




unset GREP_OPTIONS


VERSION=`sed -n -e 's/";$//' -e '/const char irc_version.. = .EPIC.-/s///p' -e '/const char irc_version/q' < $srcdir/source/irc.c` 
echo this is EPIC5 version $VERSION
echo



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

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

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

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

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

cat > conftest.$ac_ext << EOF

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

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

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

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

if test $ac_cv_prog_gcc = yes; then
  GCC=yes
else
  GCC=
fi

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

fi

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

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

echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
echo "configure:882: checking for POSIXized ISC" >&5
if test -d /etc/conf/kconfig.d &&
  grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
then
  echo "$ac_t""yes" 1>&6
  ISC=yes # If later tests want to check for ISC.
  cat >> confdefs.h <<\EOF
#define _POSIX_SOURCE 1
EOF

  if test "$GCC" = yes; then
    CC="$CC -posix"
  else
    CC="$CC -Xp"
  fi
else
  echo "$ac_t""no" 1>&6
  ISC=
fi

echo $ac_n "checking for AIX""... $ac_c" 1>&6
echo "configure:903: checking for AIX" >&5
cat > conftest.$ac_ext <<EOF
#line 905 "configure"
#include "confdefs.h"
#ifdef _AIX
  yes
#endif

EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "yes" >/dev/null 2>&1; then
  rm -rf conftest*
  echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
#define _ALL_SOURCE 1
EOF

else
  rm -rf conftest*
  echo "$ac_t""no" 1>&6
fi
rm -f conftest*



echo $ac_n "checking for an extra library directory""... $ac_c" 1>&6
echo "configure:928: checking for an extra library directory" >&5
# Check whether --with-localdir or --without-localdir was given.
if test "${with_localdir+set}" = set; then
  withval="$with_localdir"
  
   if test "x$withval" = "x" ; then
      with_extra_libdir="no"
   elif test -d "$withval" ; then
      with_extra_libdir="yes"
      LIBS="-L$withval/lib $LIBS"
      CFLAGS="-I$withval/include/ $CFLAGS"
   else
      with_extra_libdir="no"
   fi

else
  
   with_extra_libdir="no"

fi

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


echo $ac_n "checking for solaris cc""... $ac_c" 1>&6
echo "configure:953: checking for solaris cc" >&5
( $CC -V 2>&1 | grep 'Sun C' > /dev/null ) && \
	sun_compiler="yes" \
	CFLAGS="$CFLAGS -erroff=E_ARG_INCOMPATIBLE_WITH_ARG,E_ASSIGNMENT_TYPE_MISMATCH"
echo "$ac_t""ok" 1>&6

if test -d /usr/ccs/lib; then
	LIBS="-L/usr/ccs/lib $LIBS"
fi

echo $ac_n "checking for setenv in -lcext""... $ac_c" 1>&6
echo "configure:964: checking for setenv in -lcext" >&5
ac_lib_var=`echo cext'_'setenv | 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="-lcext  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 972 "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 setenv();

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

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


echo $ac_n "checking for Macintosh OS X""... $ac_c" 1>&6
echo "configure:1005: checking for Macintosh OS X" >&5
( $CC --version 2>&1 | grep 'apple-darwin' > /dev/null ) && \
       apple_compiler="yes" \
       perl_arch_flags="$(perl -MExtUtils::Embed -e 'ccopts;print "\n"; ldopts' | grep -o -- '-arch -_0-9a-zA-Z*' | sort -u)" \
       CFLAGS="$CFLAGS $perl_arch_flags"
echo "$ac_t""ok" 1>&6



echo $ac_n "checking if you want threaded stdout""... $ac_c" 1>&6
echo "configure:1015: checking if you want threaded stdout" >&5
# Check whether --with-threaded-stdout or --without-threaded-stdout was given.
if test "${with_threaded_stdout+set}" = set; then
  withval="$with_threaded_stdout"
  
	if test "x$withval" = "x" ; then
		with_threaded_stdout="no"
	elif test "x$withval" = "xy" ; then
		with_threaded_stdout="yes"
		if  "x$sun_compiler" = "xyes"  ; then
			CFLAGS="CFLAGS -mt"
		else
			CFLAGS="$CFLAGS -pthread"
		fi
	elif test "x$withval" = "xY" ; then
		with_threaded_stdout="yes"
		if  "x$sun_compiler" = "xyes"  ; then
			CFLAGS="CFLAGS -mt"
		else
			CFLAGS="$CFLAGS -pthread"
		fi
	elif test "x$withval" = "xyes" ; then
		with_threaded_stdout="yes"
		if  "x$sun_compiler" = "xyes"  ; then
			CFLAGS="CFLAGS -mt"
		else
			CFLAGS="$CFLAGS -pthread"
		fi
	elif test "x$withval" = "xYES" ; then
		with_threaded_stdout="yes"
		if  "x$sun_compiler" = "xyes"  ; then
			CFLAGS="CFLAGS -mt"
		else
			CFLAGS="$CFLAGS -pthread"
		fi
	else
		with_threaded_stdout="no"
	fi

else
  
	with_threaded_stdout="no"

fi

echo "$ac_t""$with_threaded_stdout" 1>&6
if test "x$with_threaded_stdout" = "xyes" ; then
	cat >> confdefs.h <<\EOF
#define WITH_THREADED_STDOUT 1
EOF

	threading=1
fi


echo $ac_n "checking which multiplexer function to use""... $ac_c" 1>&6
echo "configure:1071: checking which multiplexer function to use" >&5
# Check whether --with-multiplex or --without-multiplex was given.
if test "${with_multiplex+set}" = set; then
  withval="$with_multiplex"
  
	if test "x$withval" = "x"; then
		with_multiplex="select"
	elif test "x$withval" = "xselect"; then
		with_multiplex="select"
	elif test "x$withval" = "xpoll"; then
		with_multiplex="poll"
	elif test "x$withval" = "xfreebsd-kqueue"; then
		with_multiplex="kqueue"
	elif test "x$withval" = "xsolaris-ports"; then
		with_multiplex="port_create"
	elif test "x$withval" = "xpthread"; then
		with_multiplex="pthread_create"
		if  "x$sun_compiler" = "xyes"  ; then
			CFLAGS="CFLAGS -mt"
		else
			CFLAGS="$CFLAGS -pthread"
		fi
	else
		with_multiplex="select"
	fi

else
  
	with_multiplex="select"

fi

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

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_$with_multiplex) || defined (__stub___$with_multiplex)
choke me
#else
$with_multiplex();
#endif

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

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

		threading=0
	elif test "x$with_multiplex" = "xpoll" ; then
		cat >> confdefs.h <<\EOF
#define USE_POLL 1
EOF

		threading=0
	elif test "x$with_multiplex" = "xkqueue" ; then
		cat >> confdefs.h <<\EOF
#define USE_FREEBSD_KQUEUE 1
EOF

		threading=0
	elif test "x$with_multiplex" = "xport_create" ; then
		cat >> confdefs.h <<\EOF
#define USE_SOLARIS_PORTS 1
EOF

		threading=0
	elif test "x$with_multiplex" = "xpthread_create" ; then
		cat >> confdefs.h <<\EOF
#define USE_PTHREAD 1
EOF

		threading=1
	fi

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

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

	threading=0

fi




if test -z "$libsocket"; then
	echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
echo "configure:1196: 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  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 1204 "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:1215: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

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

fi

have_libarchive=""
orig_LIBS="$LIBS"
echo $ac_n "checking for archive_read_new in -larchive""... $ac_c" 1>&6
echo "configure:1240: checking for archive_read_new in -larchive" >&5
ac_lib_var=`echo archive'_'archive_read_new | 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="-larchive  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 1248 "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 archive_read_new();

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

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

echo $ac_n "checking whether libarchive works the way I expect""... $ac_c" 1>&6
echo "configure:1280: checking whether libarchive works the way I expect" >&5
cat > conftest.$ac_ext <<EOF
#line 1282 "configure"
#include "confdefs.h"
#include <archive.h>
int main() {

	struct archive *x; 
	const char *s = "bogus.zip";
	x = archive_read_new();
	archive_read_support_format_all(x);
	archive_read_open_file(x, s, 10240);

; return 0; }
EOF
if { (eval echo configure:1295: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  have_libarchive="yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
fi
rm -f conftest*
if test "x$have_libarchive" = "x"; then
	LIBS="$orig_LIBS"
	echo "$ac_t""no" 1>&6
else
	echo "$ac_t""yes" 1>&6
	cat >> confdefs.h <<\EOF
#define HAVE_LIBARCHIVE 1
EOF

fi

# Check whether --with-ssl or --without-ssl was given.
if test "${with_ssl+set}" = set; then
  withval="$with_ssl"
  
	if test -z "$withval"; then
		with_ssl="yes"
	fi

fi


echo $ac_n "checking whether to include SSL support""... $ac_c" 1>&6
echo "configure:1326: checking whether to include SSL support" >&5
if test "x$with_ssl" = "xno"; then
	echo "$ac_t""no" 1>&6
	{ echo "configure: error: You cannot explicitly turn off OpenSSL support any more.  This error is intentional.  Please remove --without-ssl and try again." 1>&2; exit 1; }
else
	saved_LIBS="$LIBS"
	saved_CFLAGS="$CFLAGS"

	# First, let's see if the user overrode the openssl location
	ssldir="$with_ssl"
	if test "x$ssldir" != "x" -a "x$ssldir" != "xyes"; then
	    if test -f "$ssldir/include/openssl/ssl.h" && 
			test -f "$ssldir/lib/libssl.a"; then
		LIBS="$saved_LIBS -L$ssldir/lib -lssl -lcrypto"
	        CFLAGS="$saved_CFLAGS -I$ssldir/include"
		cat > conftest.$ac_ext <<EOF
#line 1342 "configure"
#include "confdefs.h"
#include <openssl/ssl.h>
int main() {
SSL_accept(0);
; return 0; }
EOF
if { (eval echo configure:1349: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  have_ssl="yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
fi
rm -f conftest*
	    fi

	    if test "x$have_ssl" != "xyes"; then
		echo "$ac_t""no" 1>&6	
		{ echo "configure: error: I could not find the OpenSSL installed at $with_ssl you asked me to use with --with-ssl=$with_ssl.  Please ensure that directory contains the files 'include/openssl/ssl.h' and 'lib/libssl.a'.  If you are unsure, remove --with-ssl and just let me auto-detect it." 1>&2; exit 1; }
	    fi
	fi

	# Second, let's see if it just works by default
	LIBS="$saved_LIBS -lssl -lcrypto"
	CFLAGS="$saved_CFLAGS"
	cat > conftest.$ac_ext <<EOF
#line 1369 "configure"
#include "confdefs.h"
#include <openssl/ssl.h>
int main() {
SSL_accept(0);
; return 0; }
EOF
if { (eval echo configure:1376: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  have_ssl="yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
fi
rm -f conftest*

	# Otherwise, go hunting for it.
	if test "x$have_ssl" = "x" ; then
	    for ssldir in /usr/local/ssl /usr/local/openssl; do
		if test "x$have_ssl" != "x"; then
			break;
		fi

		if test "x$ssldir" = "x"; then
			continue;
		fi

		if test -f "$ssldir/include/openssl/ssl.h" &&
			test -f "$ssldir/lib/libssl.a"; then
		    CFLAGS="$saved_CFLAGS -I$ssldir/include"
		    LIBS="$saved_LIBS -L$ssldir/lib -lssl -lcrypto"
		    cat > conftest.$ac_ext <<EOF
#line 1401 "configure"
#include "confdefs.h"
#include <openssl/ssl.h>
int main() {
SSL_accept(0);
; return 0; }
EOF
if { (eval echo configure:1408: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  have_ssl="yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
fi
rm -f conftest*
		fi
	    done
	fi

	# If we found it somewhere, great!  Otherwise, revert.
	if test ! -n "$have_ssl"; then
		LIBS="$saved_LIBS"
		CFLAGS="$saved_CFLAGS"
		echo "$ac_t""no" 1>&6
		if test "x$with_ssl" != "x"; then
			{ echo "configure: error: You requested SSL support, but OpenSSL was not found. Please supply a pathname to OpenSSL" 1>&2; exit 1; }
		fi
		{ echo "configure: error: I was unable to find OpenSSL.  If it is not installed, please install it.  If it is installed, please help me find it using --with-ssl=/usr/local or similar." 1>&2; exit 1; }
	else
	    if test "x$threading" = "x1" ; then
		echo "$ac_t""yes" 1>&6
		echo $ac_n "checking whether your SSL is threading compatable""... $ac_c" 1>&6
echo "configure:1433: checking whether your SSL is threading compatable" >&5
		if test "$cross_compiling" = yes; then
  :
else
  cat > conftest.$ac_ext <<EOF
#line 1438 "configure"
#include "confdefs.h"

#define OPENSSL_THREAD_DEFINES
#include <openssl/opensslconf.h>
main ()
{
#if defined(THREADS)
        exit(0);
#else
        exit(1);
#endif
}

EOF
if { (eval echo configure:1453: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  echo "$ac_t""yes" 1>&6
		cat >> confdefs.h <<\EOF
#define HAVE_SSL 1
EOF

else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  echo "$ac_t""no. Your system can not do SSL with pthreads" 1>&6
fi
rm -fr conftest*
fi

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

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


if test -z "$libinet"; then
	echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
echo "configure:1482: checking for socket in -linet" >&5
ac_lib_var=`echo inet'_'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="-linet  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 1490 "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:1501: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

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

fi

if test -z "$libnsl"; then
	echo $ac_n "checking for gethostname in -lnsl""... $ac_c" 1>&6
echo "configure:1525: 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  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 1533 "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:1544: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

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

fi

echo $ac_n "checking for getpwnam in -lsun""... $ac_c" 1>&6
echo "configure:1567: checking for getpwnam in -lsun" >&5
ac_lib_var=`echo sun'_'getpwnam | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lsun  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 1575 "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 getpwnam();

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

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

echo $ac_n "checking for inet_addr in -ldgc""... $ac_c" 1>&6
echo "configure:1607: checking for inet_addr in -ldgc" >&5
ac_lib_var=`echo dgc'_'inet_addr | 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="-ldgc  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 1615 "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 inet_addr();

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

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

echo $ac_n "checking for gethostbyname in -lresolv""... $ac_c" 1>&6
echo "configure:1647: checking for gethostbyname in -lresolv" >&5
ac_lib_var=`echo resolv'_'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="-lresolv  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 1655 "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:1666: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

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

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

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

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

echo $ac_n "checking for pow in -lm""... $ac_c" 1>&6
echo "configure:1727: checking for pow in -lm" >&5
ac_lib_var=`echo m'_'pow | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lm  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 1735 "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 pow();

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

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

echo $ac_n "checking for clock_gettime in -lrt""... $ac_c" 1>&6
echo "configure:1767: checking for clock_gettime in -lrt" >&5
ac_lib_var=`echo rt'_'clock_gettime | 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="-lrt  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 1775 "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 clock_gettime();

int main() {
clock_gettime()
; return 0; }
EOF
if { (eval echo configure:1786: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_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 -lrt"
else
  echo "$ac_t""no" 1>&6
fi


termcap=0;
warn_again=0;
echo $ac_n "checking whether you want to use termcap""... $ac_c" 1>&6
echo "configure:1810: checking whether you want to use termcap" >&5
# Check whether --with-termcap or --without-termcap was given.
if test "${with_termcap+set}" = set; then
  withval="$with_termcap"
     echo "$ac_t""yes" 1>&6
    echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
echo "configure:1816: checking for tgetent in -ltermcap" >&5
ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-ltermcap  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 1824 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char tgetent();

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

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

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

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

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

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  termcap=1;LIBS="-lcurses $LIBS"
else
  echo "$ac_t""no" 1>&6
echo "configure: warning: I cant find tgetent.  Youll have to help me." 1>&2
fi

fi

fi

else
     echo "$ac_t""no" 1>&6
    echo $ac_n "checking for setupterm in -lncurses""... $ac_c" 1>&6
echo "configure:1939: checking for setupterm in -lncurses" >&5
ac_lib_var=`echo ncurses'_'setupterm | 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 1947 "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 setupterm();

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

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  LIBS="-lncurses $LIBS"
else
  echo "$ac_t""no" 1>&6
echo $ac_n "checking for setupterm in -ltinfo""... $ac_c" 1>&6
echo "configure:1977: checking for setupterm in -ltinfo" >&5
ac_lib_var=`echo tinfo'_'setupterm | 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="-ltinfo  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 1985 "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 setupterm();

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

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  LIBS="-ltinfo $LIBS"
else
  echo "$ac_t""no" 1>&6
echo $ac_n "checking for setupterm in -lcurses""... $ac_c" 1>&6
echo "configure:2015: checking for setupterm in -lcurses" >&5
ac_lib_var=`echo curses'_'setupterm | 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 2023 "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 setupterm();

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

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

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

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

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

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

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

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  termcap=1;LIBS="-ltermcap $LIBS"
else
  echo "$ac_t""no" 1>&6
echo "configure: warning: I cant find tgetent.  Youll have to help me." 1>&2
		  warn_again=1
fi

fi

fi

fi

fi

fi

fi



for ac_hdr in fcntl.h ieeefp.h inttypes.h math.h ndbm.h netdb.h regex.h stddef.h stdint.h sys/fcntl.h sys/file.h sys/filio.h sys/select.h sys/sysctl.h sys/syslimits.h sys/time.h sys/un.h sys/param.h termios.h sys/termios.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:2188: 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 2193 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2198: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
 
else
  echo "$ac_t""no" 1>&6
fi
done

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

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

fi

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

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_arc4random) || defined (__stub___arc4random)
choke me
#else
arc4random();
#endif

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

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

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

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

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_clock_gettime) || defined (__stub___clock_gettime)
choke me
#else
clock_gettime();
#endif

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

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

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

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

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_fchdir) || defined (__stub___fchdir)
choke me
#else
fchdir();
#endif

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

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

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

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

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_fpathconf) || defined (__stub___fpathconf)
choke me
#else
fpathconf();
#endif

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

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

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

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

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_getlogin) || defined (__stub___getlogin)
choke me
#else
getlogin();
#endif

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

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

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

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

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_getaddrinfo) || defined (__stub___getaddrinfo)
choke me
#else
getaddrinfo();
#endif

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

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

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

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

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_getnameinfo) || defined (__stub___getnameinfo)
choke me
#else
getnameinfo();
#endif

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

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

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

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

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_getpass) || defined (__stub___getpass)
choke me
#else
getpass();
#endif

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

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

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

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

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_getpgid) || defined (__stub___getpgid)
choke me
#else
getpgid();
#endif

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

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

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

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

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_getpgrp) || defined (__stub___getpgrp)
choke me
#else
getpgrp();
#endif

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

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

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

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

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

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

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

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


fi

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

fi

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

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

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_getservbyport) || defined (__stub___getservbyport)
choke me
#else
getservbyport();
#endif

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

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

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

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

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_gettimeofday) || defined (__stub___gettimeofday)
choke me
#else
gettimeofday();
#endif

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

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

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

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

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_killpg) || defined (__stub___killpg)
choke me
#else
killpg();
#endif

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

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

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

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

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_memmove) || defined (__stub___memmove)
choke me
#else
memmove();
#endif

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

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

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

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

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_nanosleep) || defined (__stub___nanosleep)
choke me
#else
nanosleep();
#endif

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

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

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

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

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_uname) || defined (__stub___uname)
choke me
#else
uname();
#endif

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

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

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

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

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_realpath) || defined (__stub___realpath)
choke me
#else
realpath();
#endif

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

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

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

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

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_setenv) || defined (__stub___setenv)
choke me
#else
setenv();
#endif

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

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

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

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

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_setsid) || defined (__stub___setsid)
choke me
#else
setsid();
#endif

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

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

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

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_tcsetpgrp) || defined (__stub___tcsetpgrp)
choke me
#else
tcsetpgrp();
#endif

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

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

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

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

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_setupterm) || defined (__stub___setupterm)
choke me
#else
setupterm();
#endif

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

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

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

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

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_snprintf) || defined (__stub___snprintf)
choke me
#else
snprintf();
#endif

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

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

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

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

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_strerror) || defined (__stub___strerror)
choke me
#else
strerror();
#endif

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

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

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

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

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_strlcat) || defined (__stub___strlcat)
choke me
#else
strlcat();
#endif

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

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

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

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

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_strlcpy) || defined (__stub___strlcpy)
choke me
#else
strlcpy();
#endif

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

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

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

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

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_strptime) || defined (__stub___strptime)
choke me
#else
strptime();
#endif

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

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

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

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

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_strtoul) || defined (__stub___strtoul)
choke me
#else
strtoul();
#endif

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

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

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

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

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_sysconf) || defined (__stub___sysconf)
choke me
#else
sysconf();
#endif

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

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

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

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

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_sysctlbyname) || defined (__stub___sysctlbyname)
choke me
#else
sysctlbyname();
#endif

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

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

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

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

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_unsetenv) || defined (__stub___unsetenv)
choke me
#else
unsetenv();
#endif

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

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

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

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

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_vsnprintf) || defined (__stub___vsnprintf)
choke me
#else
vsnprintf();
#endif

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

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

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

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

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_finite) || defined (__stub___finite)
choke me
#else
finite();
#endif

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

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

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

echo $ac_n "checking for isfinite macro in math.h""... $ac_c" 1>&6
echo "configure:4026: checking for isfinite macro in math.h" >&5
cat > conftest.$ac_ext <<EOF
#line 4028 "configure"
#include "confdefs.h"
#include <math.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "isfinite" >/dev/null 2>&1; then
  rm -rf conftest*
  cat >> confdefs.h <<\EOF
#define HAVE_ISFINITE 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 for tparm""... $ac_c" 1>&6
echo "configure:4046: checking for tparm" >&5
if eval "test \"`echo '$''{'ac_cv_func_tparm'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 4051 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char tparm(); 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 tparm();

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_tparm) || defined (__stub___tparm)
choke me
#else
tparm();
#endif

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

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

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


echo $ac_n "checking whether term.h works by itself""... $ac_c" 1>&6
echo "configure:4098: checking whether term.h works by itself" >&5
if test "$cross_compiling" = yes; then
  :
else
  cat > conftest.$ac_ext <<EOF
#line 4103 "configure"
#include "confdefs.h"

#include <term.h>

main ()
{
       exit(0);
}

EOF
if { (eval echo configure:4114: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  echo "$ac_t""yes" 1>&6
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  echo "$ac_t""no" 1>&6
  echo $ac_n "checking whether term.h requires termio.h and curses.h""... $ac_c" 1>&6
echo "configure:4123: checking whether term.h requires termio.h and curses.h" >&5
  if test "$cross_compiling" = yes; then
  :
else
  cat > conftest.$ac_ext <<EOF
#line 4128 "configure"
#include "confdefs.h"

#include <termio.h>
#include <curses.h>
#include <term.h>

main ()
{
       exit(0);
}
  
EOF
if { (eval echo configure:4141: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  echo "$ac_t""yes" 1>&6
  cat >> confdefs.h <<\EOF
#define TERM_H_REQUIRES_CURSES_H 1
EOF

else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  echo "$ac_t""no" 1>&6
  cat >> confdefs.h <<\EOF
#define DONT_USE_TERM_H 1
EOF

fi
rm -fr conftest*
fi

fi
rm -fr conftest*
fi



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

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

fi
fi

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

fi

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

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:4311: 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 4316 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <$ac_hdr>
int main() {
DIR *dirp = 0;
; return 0; }
EOF
if { (eval echo configure:4324: \"$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:4349: 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 4357 "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:4368: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

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

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

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

fi

echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
echo "configure:4432: 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 4437 "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:4454: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_type_signal=void
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_type_signal=int
fi
rm -f conftest*
fi

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


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

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

fi

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

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

fi

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

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

fi

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

fi

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

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

fi

# 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:4608: 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 4613 "configure"
#include "confdefs.h"
#include <alloca.h>
int main() {
char *p = alloca(2 * sizeof(int));
; return 0; }
EOF
if { (eval echo configure:4620: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  ac_cv_header_alloca_h=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_header_alloca_h=no
fi
rm -f conftest*
fi

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

fi

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

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

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

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

fi

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


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

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

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

done
fi

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

fi

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

fi


have_intptr_t=""
echo $ac_n "checking for intptr_t in inttypes.h or stdint.h""... $ac_c" 1>&6
echo "configure:4842: checking for intptr_t in inttypes.h or stdint.h" >&5
cat > conftest.$ac_ext <<EOF
#line 4844 "configure"
#include "confdefs.h"
#include <inttypes.h>
int main() {
intptr_t x; x = 0;
; return 0; }
EOF
if { (eval echo configure:4851: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  cat >> confdefs.h <<\EOF
#define HAVE_INTPTR_T 1
EOF
 
				    have_intptr_t="yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
fi
rm -f conftest*
cat > conftest.$ac_ext <<EOF
#line 4864 "configure"
#include "confdefs.h"
#include <stdint.h>
int main() {
intptr_t x; x = 0;
; return 0; }
EOF
if { (eval echo configure:4871: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  cat >> confdefs.h <<\EOF
#define HAVE_INTPTR_T 1
EOF
 
				    have_intptr_t="yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
fi
rm -f conftest*
if test "x$have_intptr_t" = "x"; then
	echo "$ac_t""no" 1>&6
else
	echo "$ac_t""yes" 1>&6
fi

echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
echo "configure:4890: checking for socklen_t" >&5
cat > conftest.$ac_ext <<EOF
#line 4892 "configure"
#include "confdefs.h"
#include <sys/socket.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "socklen_t" >/dev/null 2>&1; then
  rm -rf conftest*
  echo "$ac_t""yes" 1>&6
  cat >> confdefs.h <<\EOF
#define HAVE_SOCKLEN_T 1
EOF

else
  rm -rf conftest*
  echo "$ac_t""no" 1>&6
fi
rm -f conftest*


echo $ac_n "checking whether sys/types.h defines fd_set""... $ac_c" 1>&6
echo "configure:4912: checking whether sys/types.h defines fd_set" >&5
cat > conftest.$ac_ext <<EOF
#line 4914 "configure"
#include "confdefs.h"
#include <sys/types.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "fd_set" >/dev/null 2>&1; then
  rm -rf conftest*
  echo "$ac_t""yes" 1>&6
else
  rm -rf conftest*
  echo "$ac_t""no" 1>&6
  echo $ac_n "checking whether sys/select.h defines fd_set""... $ac_c" 1>&6
echo "configure:4926: checking whether sys/select.h defines fd_set" >&5
  cat > conftest.$ac_ext <<EOF
#line 4928 "configure"
#include "confdefs.h"
#include <sys/select.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "fd_set" >/dev/null 2>&1; then
  rm -rf conftest*
  echo "$ac_t""yes" 1>&6
    cat >> confdefs.h <<\EOF
#define NEED_SYS_SELECT_H 1
EOF

else
  rm -rf conftest*
  echo "$ac_t""no. ugh." 1>&6
fi
rm -f conftest*

fi
rm -f conftest*
 


echo $ac_n "checking for struct linger""... $ac_c" 1>&6
echo "configure:4952: checking for struct linger" >&5
cat > conftest.$ac_ext <<EOF
#line 4954 "configure"
#include "confdefs.h"
#include <sys/socket.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "struct( |	)*linger" >/dev/null 2>&1; then
  rm -rf conftest*
  echo "$ac_t""yes" 1>&6
else
  rm -rf conftest*
  cat >> confdefs.h <<\EOF
#define NO_STRUCT_LINGER 1
EOF
 
  echo "$ac_t""no. ugh." 1>&6
fi
rm -f conftest*


echo $ac_n "checking for useful SO_SNDLOWAT""... $ac_c" 1>&6
echo "configure:4974: checking for useful SO_SNDLOWAT" >&5
if test "$cross_compiling" = yes; then
  :
else
  cat > conftest.$ac_ext <<EOF
#line 4979 "configure"
#include "confdefs.h"

#include <sys/types.h>
#include <sys/socket.h>
main ()
{
#ifndef SO_SNDLOWAT
        exit(1);
#else
        int d = socket(AF_INET, SOCK_STREAM, 0);
        int size = 256;
        if (setsockopt(d, SOL_SOCKET, SO_SNDLOWAT, &size, sizeof(size)) < 0)
                exit(1);
        exit (0);
#endif
}

EOF
if { (eval echo configure:4998: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  echo "$ac_t""yes" 1>&6
  cat >> confdefs.h <<\EOF
#define HAVE_SO_SNDLOWAT 1
EOF

else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  echo "$ac_t""no" 1>&6
fi
rm -fr conftest*
fi


echo $ac_n "checking for useful realpath""... $ac_c" 1>&6
echo "configure:5016: checking for useful realpath" >&5
if test "$cross_compiling" = yes; then
  :
else
  cat > conftest.$ac_ext <<EOF
#line 5021 "configure"
#include "confdefs.h"

#include <sys/param.h>
#include <stdlib.h>
main ()
{
	char resolved_path[PATH_MAX];

	if (realpath("/etc/filethatdoesnotexist", resolved_path) == 0)
		exit(1);
	exit(0);
}

EOF
if { (eval echo configure:5036: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  echo "$ac_t""yes" 1>&6
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  echo "$ac_t""no" 1>&6
  cat >> confdefs.h <<\EOF
#define HAVE_BROKEN_REALPATH 1
EOF

fi
rm -fr conftest*
fi



echo $ac_n "checking for sys_siglist declaration""... $ac_c" 1>&6
echo "configure:5055: checking for sys_siglist declaration" >&5
if test "$cross_compiling" = yes; then
  :
else
  cat > conftest.$ac_ext <<EOF
#line 5060 "configure"
#include "confdefs.h"

#include <sys/types.h>
#include <sys/signal.h>
#include <signal.h>
#include <unistd.h>
main()
{
	char *s = sys_siglist[0];
	exit(0);
}

EOF
if { (eval echo configure:5074: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  echo "$ac_t""yes" 1>&6 
  sys_siglist="1"
  cat >> confdefs.h <<\EOF
#define SYS_SIGLIST_DECLARED 1
EOF

else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  echo "$ac_t""no" 1>&6
fi
rm -fr conftest*
fi


if test x$sys_siglist != x1
then
echo "generating a list of signal names..."
set X `cat /usr/include/signal.h /usr/include/sys/signal.h /usr/include/linux/signal.h 2>&1 | sed 's/^#[	]*/#/' | awk '
$1 ~ /^#define$/ && $2 ~ /^SIG[A-Z0-9]*$/ && $3 ~ /^[1-9][0-9]*$/ {
  sig[$3] = substr($2,4,20)
  if (max < $3 && $3 < 60) {
	max = $3
  }
}

END {
  for (i=1; i<=max; i++) {
    if (sig[i] == "")
      printf "%d", i
    else
      printf "%s", sig[i]
    if (i < max)
      printf " "
  }
  printf "\n"
}
'`
shift
case $# in
0)
  if test -f /bin/csh; then
     set X `/bin/csh -cf 'kill -l'`
     shift
     case $* in
     0) 
       set HUP INT QUIT ILL TRAP ABRT EMT FPE KILL BUS SEGV SYS PIPE ALRM TERM
       ;;
    esac
  fi
  ;;
esac

sig_name="ZERO $*"
if test -f sig.inc; then
  /bin/rm -f sig.inc
fi
echo $sig_name | sed -e 's/$/"};/' -e 's/ /", "/g' -e 's/^/static char *sys_siglist[] = { "/' >> sig.inc
fi


have_intmax_t=""
have_strtoimax_t=""
echo $ac_n "checking for intmax_t in inttypes.h or stdint.h""... $ac_c" 1>&6
echo "configure:5141: checking for intmax_t in inttypes.h or stdint.h" >&5
cat > conftest.$ac_ext <<EOF
#line 5143 "configure"
#include "confdefs.h"
#include <inttypes.h>
int main() {
intmax_t x; x = 0;
; return 0; }
EOF
if { (eval echo configure:5150: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  have_intmax_t="yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
fi
rm -f conftest*
cat > conftest.$ac_ext <<EOF
#line 5159 "configure"
#include "confdefs.h"
#include <stdint.h>
int main() {
intmax_t x; x = 0;
; return 0; }
EOF
if { (eval echo configure:5166: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  have_intmax_t="yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
fi
rm -f conftest*
if test "x$have_intmax_t" = "x"; then
	echo "$ac_t""no" 1>&6
else
	echo "$ac_t""yes" 1>&6
fi

echo $ac_n "checking for strtoimax in inttypes.h or stdint.h""... $ac_c" 1>&6
echo "configure:5181: checking for strtoimax in inttypes.h or stdint.h" >&5
cat > conftest.$ac_ext <<EOF
#line 5183 "configure"
#include "confdefs.h"
#include <inttypes.h>
int main() {
char *ptr="1";strtoimax(ptr, &ptr, 10)
; return 0; }
EOF
if { (eval echo configure:5190: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  have_strtoimax="yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
fi
rm -f conftest*
cat > conftest.$ac_ext <<EOF
#line 5199 "configure"
#include "confdefs.h"
#include <stdint.h>
int main() {
char *ptr="1";strtoimax(ptr, &ptr, 10)
; return 0; }
EOF
if { (eval echo configure:5206: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  have_strtoimax="yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
fi
rm -f conftest*
if test "x$have_strtoimax" = "x"; then
	echo "$ac_t""no" 1>&6
else
	echo "$ac_t""yes" 1>&6
fi


echo $ac_n "checking whether I can use intmax_t for intmax_t""... $ac_c" 1>&6
echo "configure:5222: checking whether I can use intmax_t for intmax_t" >&5
if test "x$have_intmax_t" != "x" ; then
  if test "x$have_strtoimax" != "x" ; then
    cat >> confdefs.h <<\EOF
#define HAVE_STRTOIMAX 1
EOF

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

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

echo $ac_n "checking size of long long""... $ac_c" 1>&6
echo "configure:5242: checking size of long long" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_sizeof_long_long=0
else
  cat > conftest.$ac_ext <<EOF
#line 5250 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
{
  FILE *f=fopen("conftestval", "w");
  if (!f) exit(1);
  fprintf(f, "%d\n", sizeof(long long));
  exit(0);
}
EOF
if { (eval echo configure:5261: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  ac_cv_sizeof_long_long=`cat conftestval`
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_sizeof_long_long=0
fi
rm -fr conftest*
fi

fi
echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
cat >> confdefs.h <<EOF
#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
EOF


if test "$ac_cv_sizeof_long_long" != 0; then
   cat >> confdefs.h <<\EOF
#define HAVE_INTMAX_LONG_LONG 1
EOF

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

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_strtoll) || defined (__stub___strtoll)
choke me
#else
strtoll();
#endif

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

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

else
  echo "$ac_t""no" 1>&6
cat >> confdefs.h <<\EOF
#define NEED_STRTOLL 1
EOF

fi

fi

echo $ac_n "checking size of quad_t""... $ac_c" 1>&6
echo "configure:5343: checking size of quad_t" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_quad_t'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_sizeof_quad_t=0
else
  cat > conftest.$ac_ext <<EOF
#line 5351 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
{
  FILE *f=fopen("conftestval", "w");
  if (!f) exit(1);
  fprintf(f, "%d\n", sizeof(quad_t));
  exit(0);
}
EOF
if { (eval echo configure:5362: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  ac_cv_sizeof_quad_t=`cat conftestval`
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_sizeof_quad_t=0
fi
rm -fr conftest*
fi

fi
echo "$ac_t""$ac_cv_sizeof_quad_t" 1>&6
cat >> confdefs.h <<EOF
#define SIZEOF_QUAD_T $ac_cv_sizeof_quad_t
EOF


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

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_strtoq) || defined (__stub___strtoq)
choke me
#else
strtoq();
#endif

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

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

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

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

fi

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



echo $ac_n "checking size of unsigned int""... $ac_c" 1>&6
echo "configure:5446: checking size of unsigned int" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_unsigned_int'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_sizeof_unsigned_int=4
else
  cat > conftest.$ac_ext <<EOF
#line 5454 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
{
  FILE *f=fopen("conftestval", "w");
  if (!f) exit(1);
  fprintf(f, "%d\n", sizeof(unsigned int));
  exit(0);
}
EOF
if { (eval echo configure:5465: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  ac_cv_sizeof_unsigned_int=`cat conftestval`
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_sizeof_unsigned_int=0
fi
rm -fr conftest*
fi

fi
echo "$ac_t""$ac_cv_sizeof_unsigned_int" 1>&6
cat >> confdefs.h <<EOF
#define SIZEOF_UNSIGNED_INT $ac_cv_sizeof_unsigned_int
EOF


if test "$ac_cv_sizeof_unsigned_int" = 4; then
	cat >> confdefs.h <<\EOF
#define UNSIGNED_INT32 1
EOF

else
	echo $ac_n "checking size of unsigned long""... $ac_c" 1>&6
echo "configure:5491: checking size of unsigned long" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_unsigned_long'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_sizeof_unsigned_long=4
else
  cat > conftest.$ac_ext <<EOF
#line 5499 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
{
  FILE *f=fopen("conftestval", "w");
  if (!f) exit(1);
  fprintf(f, "%d\n", sizeof(unsigned long));
  exit(0);
}
EOF
if { (eval echo configure:5510: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  ac_cv_sizeof_unsigned_long=`cat conftestval`
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_sizeof_unsigned_long=0
fi
rm -fr conftest*
fi

fi
echo "$ac_t""$ac_cv_sizeof_unsigned_long" 1>&6
cat >> confdefs.h <<EOF
#define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
EOF


	if test "$ac_cv_sizeof_unsigned_long" = 4; then
		cat >> confdefs.h <<\EOF
#define UNSIGNED_LONG32 1
EOF

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

	fi
fi


echo $ac_n "checking to see if your struct sockaddr includes a length field""... $ac_c" 1>&6
echo "configure:5544: checking to see if your struct sockaddr includes a length field" >&5
if test "$cross_compiling" = yes; then
  :
else
  cat > conftest.$ac_ext <<EOF
#line 5549 "configure"
#include "confdefs.h"

#include <sys/types.h>
#include <sys/socket.h>
main()
{
	struct sockaddr sa;
	sa.sa_len = 0;
	exit(0);
}

EOF
if { (eval echo configure:5562: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  cat >> confdefs.h <<\EOF
#define HAVE_SA_LEN 1
EOF

  echo "$ac_t""yes" 1>&6
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  echo "$ac_t""no" 1>&6
fi
rm -fr conftest*
fi



echo $ac_n "checking whether to support ipv6""... $ac_c" 1>&6
echo "configure:5581: checking whether to support ipv6" >&5
# Check whether --with-ipv6 or --without-ipv6 was given.
if test "${with_ipv6+set}" = set; then
  withval="$with_ipv6"
  
	if test "x$withval" = "xno" ; then
		echo "$ac_t""no" 1>&6
		cat >> confdefs.h <<\EOF
#define DO_NOT_USE_IPV6 1
EOF

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

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


echo $ac_n "checking for struct sockaddr_storage""... $ac_c" 1>&6
echo "configure:5602: checking for struct sockaddr_storage" >&5
cat > conftest.$ac_ext <<EOF
#line 5604 "configure"
#include "confdefs.h"
#include <sys/socket.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "struct( |	)*sockaddr_storage" >/dev/null 2>&1; then
  rm -rf conftest*
  echo "$ac_t""yes" 1>&6 
  cat >> confdefs.h <<\EOF
#define HAVE_STRUCT_SOCKADDR_STORAGE 1
EOF

else
  rm -rf conftest*
  echo "$ac_t""no" 1>&6
fi
rm -f conftest*


echo $ac_n "checking for struct sockaddr_in6""... $ac_c" 1>&6
echo "configure:5624: checking for struct sockaddr_in6" >&5
cat > conftest.$ac_ext <<EOF
#line 5626 "configure"
#include "confdefs.h"
#include <netinet/in.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "struct( |	)*sockaddr_in6" >/dev/null 2>&1; then
  rm -rf conftest*
  echo "$ac_t""yes" 1>&6
  cat >> confdefs.h <<\EOF
#define HAVE_STRUCT_SOCKADDR_IN6 1
EOF

else
  rm -rf conftest*
  echo "$ac_t""no" 1>&6
fi
rm -f conftest*


echo $ac_n "checking for struct addrinfo""... $ac_c" 1>&6
echo "configure:5646: checking for struct addrinfo" >&5
cat > conftest.$ac_ext <<EOF
#line 5648 "configure"
#include "confdefs.h"
#include <netdb.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "struct( |	)*addrinfo" >/dev/null 2>&1; then
  rm -rf conftest*
  echo "$ac_t""yes" 1>&6
  cat >> confdefs.h <<\EOF
#define HAVE_STRUCT_ADDRINFO 1
EOF

else
  rm -rf conftest*
  echo "$ac_t""no" 1>&6
fi
rm -f conftest*



echo $ac_n "checking to see if your getaddrinfo supports AF_UNIX""... $ac_c" 1>&6
echo "configure:5669: checking to see if your getaddrinfo supports AF_UNIX" >&5
if test "$cross_compiling" = yes; then
  :
else
  cat > conftest.$ac_ext <<EOF
#line 5674 "configure"
#include "confdefs.h"

#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
#include <sys/un.h>
#include <stdlib.h>

main()
{
	struct addrinfo hints;
	struct addrinfo *results;
	int	retval;

	memset(&hints, 0, sizeof(hints));
	hints.ai_flags = 0;
	hints.ai_family = AF_UNIX;
	hints.ai_socktype = SOCK_STREAM;
	hints.ai_protocol = 0;

	retval = getaddrinfo(0, "/tmp/.ircd/6667", &hints, &results);
	if (retval != 0)
		exit(1);
	else
		exit(0);
}

EOF
if { (eval echo configure:5703: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  echo "$ac_t""yes" 1>&6
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  cat >> confdefs.h <<\EOF
#define GETADDRINFO_DOES_NOT_DO_AF_UNIX 1
EOF

  echo "$ac_t""no. ugh" 1>&6
fi
rm -fr conftest*
fi



echo $ac_n "checking whether to support SOCKS""... $ac_c" 1>&6
echo "configure:5722: checking whether to support SOCKS" >&5
# Check whether --with-socks or --without-socks was given.
if test "${with_socks+set}" = set; then
  withval="$with_socks"
   case "$withval" in
  no)
	echo "$ac_t""no" 1>&6
	;;
  *)
	if test "x$withval" != "xyes"; then
		LIBS="$LIBS -L$withval"
	fi

	echo "$ac_t""yes" 1>&6
	LIBS="$LIBS -lsocks"
	cat >> confdefs.h <<\EOF
#define SOCKS 1
EOF

	cat >> confdefs.h <<\EOF
#define connect Rconnect
EOF

	cat >> confdefs.h <<\EOF
#define getsockname Rgetsockname
EOF

	cat >> confdefs.h <<\EOF
#define bind Rbind
EOF

	cat >> confdefs.h <<\EOF
#define accept Raccept
EOF

	cat >> confdefs.h <<\EOF
#define listen Rlisten
EOF

	cat >> confdefs.h <<\EOF
#define select Rselect
EOF

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

fi


echo $ac_n "checking whether to support SOCKS5""... $ac_c" 1>&6
echo "configure:5774: checking whether to support SOCKS5" >&5
# Check whether --with-socks5 or --without-socks5 was given.
if test "${with_socks5+set}" = set; then
  withval="$with_socks5"
   case "$withval" in
  no)
	echo "$ac_t""no" 1>&6
	;;
  *)
	if test "x$withval" != "xyes"; then
		LIBS="$LIBS -L$withval"
		CFLAGS="$CFLAGS -I$withval/../include/"
	fi

	echo "$ac_t""yes" 1>&6
	LIBS="$LIBS -lsocks5"
	cat >> confdefs.h <<\EOF
#define SOCKS 1
EOF

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

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

fi



# Check whether --with-iconv or --without-iconv was given.
if test "${with_iconv+set}" = set; then
  withval="$with_iconv"
  
	if test -z "$withval"; then
		with_iconv="/usr"
	fi

fi


echo $ac_n "checking whether to include iconv support""... $ac_c" 1>&6
echo "configure:5819: checking whether to include iconv support" >&5
if test "x$with_iconv" = "xno"; then
	echo "$ac_t""Iconv support is required; I'm afraid I must insist." 1>&6
	echo $ac_n "checking whether to include iconv support""... $ac_c" 1>&6
echo "configure:5823: checking whether to include iconv support" >&5
	with_iconv=yes
fi

	saved_LIBS="$LIBS"
	saved_CFLAGS="$CFLAGS"

		cat > conftest.$ac_ext <<EOF
#line 5831 "configure"
#include "confdefs.h"
#include <iconv.h>
int main() {
iconv_open(0, 0);
; return 0; }
EOF
if { (eval echo configure:5838: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  have_iconv="yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
fi
rm -f conftest*

		if test "x$have_iconv" = "x"; then
	   LIBS="$saved_LIBS -liconv"
	   CFLAGS="$saved_CFLAGS"
	   cat > conftest.$ac_ext <<EOF
#line 5851 "configure"
#include "confdefs.h"
#include <iconv.h>
int main() {
iconv_open(0, 0);
; return 0; }
EOF
if { (eval echo configure:5858: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  have_iconv="yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
fi
rm -f conftest*
	fi

		if test "x$with_iconv" = "xyes" ; then
		unset with_iconv
	fi

		if test "x$have_iconv" = "x"; then
	    for iconvdir in "$with_iconv" "$prefix" /usr/local /opt /usr/opt; do
		if test "x$have_iconv" != "x"; then
			break
		fi

		if test "x$iconvdir" = "x"; then
			continue
		fi

		if test -f "$iconvdir/include/iconv.h" ; then
		    CFLAGS="$saved_CFLAGS -I$iconvdir/include"
		    LIBS="$saved_LIBS -L$iconvdir/lib -liconv"
		    cat > conftest.$ac_ext <<EOF
#line 5886 "configure"
#include "confdefs.h"
#include <iconv.h>
int main() {
iconv_open(0, 0);
; return 0; }
EOF
if { (eval echo configure:5893: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  have_iconv="yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
fi
rm -f conftest*
		fi

		if test "x$with_iconv" != "x"; then
			break
		fi
	    done
	fi

# If we found it somewhere, great!  Otherwise, revert.
if test "x$have_iconv" = "x"; then
	LIBS="$saved_LIBS"
	CFLAGS="$saved_CFLAGS"
	echo "$ac_t""looked but did not find it" 1>&6
	if test "x$with_iconv" != "x" ; then
		{ echo "configure: error: You specified --with-iconv=$with_iconv but that directory did not contain files include/iconv.h and lib/iconv.a.  Either specify a different directory or let me auto-detect it for you" 1>&2; exit 1; }
	else
		{ echo "configure: error: Iconv support is required.  I could not find your system's iconv support.  If you have iconv installed, please re-run configure with the --with-iconv=/path/to/dir option where include/iconv.h and lib/iconv.a exist." 1>&2; exit 1; }
	fi
else
	echo "$ac_t""yes" 1>&6
	cat >> confdefs.h <<\EOF
#define HAVE_ICONV 1
EOF

fi



echo $ac_n "checking whether you have posix-like job control""... $ac_c" 1>&6
echo "configure:5930: checking whether you have posix-like job control" >&5
if test "x$ac_cv_func_tcsetpgrp" = "xyes" -a "x$ac_cv_func_setsid" = "xyes"; then
	echo "$ac_t""yes" 1>&6
else
	echo "$ac_t""no" 1>&6
	cat >> confdefs.h <<\EOF
#define NO_JOB_CONTROL 1
EOF

	no_job_control=1
fi

echo $ac_n "checking whether to include wserv support""... $ac_c" 1>&6
echo "configure:5943: checking whether to include wserv support" >&5
include_wserv="yes"
# Check whether --with-wserv or --without-wserv was given.
if test "${with_wserv+set}" = set; then
  withval="$with_wserv"
  
	if test -z "$withval"; then
		include_wserv="yes"
	else
		include_wserv="$withval"
	fi

fi

if test "x$no_job_control" = "x1" ; then
	include_wserv="no"
fi
echo "$ac_t""$include_wserv" 1>&6
if test "x$include_wserv" = "xyes" ; then
	WSERV_BIN="wserv4"
	WSERV_INSTALL="installwserv4"
fi

echo $ac_n "checking whether to include Valgrind Memcheck support""... $ac_c" 1>&6
echo "configure:5967: checking whether to include Valgrind Memcheck support" >&5
# Check whether --with-valgrind or --without-valgrind was given.
if test "${with_valgrind+set}" = set; then
  withval="$with_valgrind"
  :
else
  with_valgrind=no
fi

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

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


# Check whether --with-perl or --without-perl was given.
if test "${with_perl+set}" = set; then
  withval="$with_perl"
   
	perlexe=$withval

else
  perlexe=yes

fi


if test "x$perlexe" = "xyes"; then
	perlexe=perl
fi

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

	echo $ac_n "checking whether to support Perl""... $ac_c" 1>&6
echo "configure:6075: checking whether to support Perl" >&5
	if test $PERLPROG != "yes" ; then 
		echo "$ac_t""no" 1>&6
	else
		echo "$ac_t""yes" 1>&6
		PERLCFLAGS=`$perlexe -MExtUtils::Embed -e ccopts`
		PERLLDFLAGS=`$perlexe -MExtUtils::Embed -e ldopts`

		echo $ac_n "checking whether embedded perl works the way I expect""... $ac_c" 1>&6
echo "configure:6084: checking whether embedded perl works the way I expect" >&5
		have_embedded_perl="no"
		old_CFLAGS="$CFLAGS"
		old_LDFLAGS="$LDFLAGS"
		CFLAGS="$CFLAGS $PERLCFLAGS"
		LDFLAGS="$LDFLAGS $PERLLDFLAGS"
		if test "$cross_compiling" = yes; then
  :
else
  cat > conftest.$ac_ext <<EOF
#line 6094 "configure"
#include "confdefs.h"

#include <EXTERN.h>
#include <perl.h>
#include <XSUB.h>
int dummy_retval = -1;

/* I "borrowed" this from the perlembed(1) man page */
PerlInterpreter *my_perl;
int startup_perl(int argc, char **argv, char **env)
{
	char *embedding[] = {"", "-e", "0" };

	my_perl = perl_alloc();
	perl_construct(my_perl);
	PL_exit_flags |= PERL_EXIT_DESTRUCT_END;
	perl_parse(my_perl, NULL, 3, embedding, NULL);
	if (SvTRUE(ERRSV))
	   (void)SvPV_nolen(ERRSV);
	perl_run(my_perl);
	if (SvTRUE(ERRSV))
	   (void)SvPV_nolen(ERRSV);
	perl_destruct(my_perl);
	perl_free(my_perl);
	PERL_SYS_TERM();
	dummy_retval = 0;
	return 0;
}
int main (int argc, char **argv, char **environ)
{
	startup_perl(argc, argv, environ);
	exit(dummy_retval);
}

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


		CFLAGS="$old_CFLAGS"
		LDFLAGS="$old_LDFLAGS"
		if test $have_embedded_perl = "yes" ; then
			echo "$ac_t""yes" 1>&6
			cat >> confdefs.h <<\EOF
#define HAVE_PERL 1
EOF

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

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

			PERLDOTOH="perl.o"
		else
			PERLCFLAGS=""
			PERLLDFLAGS=""
			echo "$ac_t""no" 1>&6
			PERLCFLAGS=""
			PERLLDFLAGS=""
		fi
	fi
fi

# Check whether --with-tcl or --without-tcl was given.
if test "${with_tcl+set}" = set; then
  withval="$with_tcl"
  
	tclconfig=$withval

else
  tclconfig="yes"

fi


if test "x$tclconfig" = "xyes" ; then
	for i in /usr/lib /usr/local/lib /usr/local/lib/tcl8.4 ; do
		if test -r $i/tclConfig.sh ; then
			tclconfig=$i/tclConfig.sh
			break;
		fi
	done
fi

echo $ac_n "checking whether to support TCL""... $ac_c" 1>&6
echo "configure:6192: checking whether to support TCL" >&5
if test "x$tclconfig" = "xno"; then
	echo "$ac_t""no" 1>&6
else
	if test ! -r $tclconfig ; then
		echo "$ac_t""no" 1>&6
	else
		echo "$ac_t""yes" 1>&6
		TCLCFLAGS=`(. $tclconfig && echo $TCL_INCLUDE_SPEC)`
		TCLLDFLAGS1=`(. $tclconfig && echo $TCL_LIB_SPEC)`
		TCLLDFLAGS2=`(. $tclconfig && echo $TCL_LIBS)`
		TCLLDFLAGS=$(eval echo "$TCLLDFLAGS1 $TCLLDFLAGS2")
		TCLDOTOH="tcl.o"

		echo $ac_n "checking whether embedded tcl works the way I expect""... $ac_c" 1>&6
echo "configure:6207: checking whether embedded tcl works the way I expect" >&5
		have_embedded_tcl="no"
		old_CFLAGS="$CFLAGS"
		old_LDFLAGS="$LDFLAGS"
		CFLAGS="$CFLAGS $TCLCFLAGS"
		LDFLAGS="$LDFLAGS $TCLLDFLAGS"
		cat > conftest.$ac_ext <<EOF
#line 6214 "configure"
#include "confdefs.h"

#include <tcl.h>
	   Tcl_Interp *my_tcl;
	   int Tcl_echoCmd (ClientData clientData, Tcl_Interp *interp, int objc, const char **objv)
	   {
		return TCL_OK;
	   }

int main() {

	my_tcl = Tcl_CreateInterp();
	Tcl_Init(my_tcl);
	Tcl_CreateCommand(my_tcl, "echo", Tcl_echoCmd,
		(ClientData)NULL, (void (*)()) NULL);
	Tcl_DeleteInterp(my_tcl);

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

		CFLAGS="$old_CFLAGS"
		LDFLAGS="$old_LDFLAGS"
		if test $have_embedded_tcl = "yes" ; then
		    echo "$ac_t""yes" 1>&6
		    cat >> confdefs.h <<\EOF
#define HAVE_TCL 1
EOF

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

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

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

# Check whether --with-ruby or --without-ruby was given.
if test "${with_ruby+set}" = set; then
  withval="$with_ruby"
   
	rubyexe=$withval

else
  rubyexe=yes

fi


if test "x$rubyexe" = "xyes"; then
	rubyexe=ruby
fi

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

	echo $ac_n "checking whether to support Ruby""... $ac_c" 1>&6
echo "configure:6317: checking whether to support Ruby" >&5
	if test $RUBYPROG != "yes" ; then 
	    echo "$ac_t""no" 1>&6
	else
	    echo "$ac_t""yes" 1>&6

	    incdir=`$rubyexe -rrbconfig -e 'puts Config::CONFIG["archdir"]'`
	    rubylibs=`$rubyexe -rrbconfig -e 'puts Config::CONFIG["LIBRUBYARG"]'`
	    extralibs=`$rubyexe -rrbconfig -e 'puts Config::CONFIG["LIBS"]'`
	    RUBYCFLAGS="-I$incdir"
	    RUBYLDFLAGS="$rubylibs $extralibs"
	    RUBYDOTOH="ruby.o"

	    echo $ac_n "checking whether embedded ruby works the way I expect""... $ac_c" 1>&6
echo "configure:6331: checking whether embedded ruby works the way I expect" >&5
	    have_embedded_ruby="no"
	    old_CFLAGS="$CFLAGS"
	    old_LDFLAGS="$LDFLAGS"
	    CFLAGS="$CFLAGS $RUBYCFLAGS"
	    LDFLAGS="$LDFLAGS $RUBYLDFLAGS"
	    cat > conftest.$ac_ext <<EOF
#line 6338 "configure"
#include "confdefs.h"

#include <ruby.h>
    VALUE epic_echo (VALUE module, VALUE string)
    {
	VALUE x;
	char *my_string;
	x = rb_obj_as_string(string);
	my_string = STR2CSTR(x);
	return Qnil;
    }

int main() {

	VALUE rubyclass;

	ruby_init();
	ruby_init_loadpath();
	rubyclass = rb_define_class("EPIC", rb_cObject);
	rb_define_singleton_method(rubyclass, "echo", epic_echo, 1);
	rb_gc_register_address(&rubyclass);

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

	    if ! test $have_embedded_ruby = "yes" ; then
		echo "$ac_t""no" 1>&6
		echo $ac_n "checking whether ruby requires -pthread to link""... $ac_c" 1>&6
echo "configure:6375: checking whether ruby requires -pthread to link" >&5
		RUBYCFLAGS="$RUBYCFLAGS -pthread"
		RUBYLDFLAGS="$RUBYLDFLAGS -pthread"
		CFLAGS="$CFLAGS $RUBYCFLAGS"
		LDFLAGS="$LDFLAGS $RUBYLDFLAGS"

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

#include <ruby.h>
    VALUE epic_echo (VALUE module, VALUE string)
    {
	VALUE x;
	char *my_string;
	x = rb_obj_as_string(string);
	my_string = STR2CSTR(x);
	return Qnil;
    }

int main() {

	VALUE rubyclass;

	ruby_init();
	ruby_init_loadpath();
	rubyclass = rb_define_class("EPIC", rb_cObject);
	rb_define_singleton_method(rubyclass, "echo", epic_echo, 1);
	rb_gc_register_address(&rubyclass);

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

	    fi

	    CFLAGS="$old_CFLAGS"
	    LDFLAGS="$old_LDFLAGS"
	    if test $have_embedded_ruby = "yes" ; then
		echo "$ac_t""yes" 1>&6
		cat >> confdefs.h <<\EOF
#define HAVE_RUBY 1
EOF

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

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

	    else
	        RUBYDOTOH=""
		HAVE_RUBY=""
		RUBYCFLAGS=""
		RUBYLDFLAGS=""
		echo "$ac_t""no" 1>&6
	    fi
	fi
fi




if test -z "$CFLAGS"; then CFLAGS="-g -O"; fi
if test -z "$LDFLAGS"; then LDFLAGS= ; fi
if test -z "$PERLDOTOH"; then PERLDOTOH= ; fi
if test -z "$TCLDOTOH"; then TCLDOTOH= ; fi
if test -z "$RUBYDOTOH"; then RUBYDOTOH= ; fi
if test -z "$WSERV_BIN"; then WSERV_BIN= ; fi
if test -z "$WSERV_INSTALL"; then WSERV_INSTALL= ; fi
if test -z "$bindir"; then bindir=\${prefix}/bin; fi
if test -z "$libdir"; then libdir=\${prefix}/lib; fi
if test -z "$irclibdir"; then irclibdir=\${libdir}/irc; fi
if test -z "$libexecdir"; then libexecdir=\${prefix}/libexec; fi

epic5=`echo "epic5" | sed -e "$program_transform_name"`
if test "$program_prefix" = "NONE" ; then
	program_prefix=
fi

echo $ac_n "checking whether to support bounds checking gcc""... $ac_c" 1>&6
echo "configure:6465: checking whether to support bounds checking gcc" >&5
# Check whether --with-bc or --without-bc was given.
if test "${with_bc+set}" = set; then
  withval="$with_bc"
     case "$withval" in
   no)
        echo "$ac_t""no" 1>&6;
        ;;
   *)
        if test "x$withval" != "xyes" ; then
                CC="$withval"
        fi

        CFLAGS="$CFLAGS -Wall -fbounds-checking"
        LDFLAGS="$LDFLAGS -static"
        echo "$ac_t""yes" 1>&6
        ;;
   esac 
else
  echo "$ac_t""no" 1>&6

fi


echo $ac_n "checking whether to turn on FreeBSD WARNS-like compiler warnings""... $ac_c" 1>&6
echo "configure:6490: checking whether to turn on FreeBSD WARNS-like compiler warnings" >&5
# Check whether --with-warns or --without-warns was given.
if test "${with_warns+set}" = set; then
  withval="$with_warns"
     case "$withval" in
   no)
        echo "$ac_t""no" 1>&6;
        ;;
   *)
        if test "x$withval" != "xyes" ; then
                CFLAGS="$CFLAGS $withval"
        fi

        CFLAGS="$CFLAGS -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wuninitialized -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wformat-extra-args -Wno-unused -ansi -fno-builtin"
        echo "$ac_t""yes" 1>&6
        ;;
   esac 
else
  echo "$ac_t""no" 1>&6

fi


echo $ac_n "checking whether your compiler supports -Wno-pointer-sign""... $ac_c" 1>&6
echo "configure:6514: checking whether your compiler supports -Wno-pointer-sign" >&5
old_cflags="$CFLAGS"
CFLAGS="$CFLAGS -Wno-pointer-sign"
cat > conftest.$ac_ext <<EOF
#line 6518 "configure"
#include "confdefs.h"

int main() {
exit(0);
; return 0; }
EOF
if { (eval echo configure:6525: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  echo "$ac_t""yes" 1>&6
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  echo "$ac_t""no" 1>&6
	CFLAGS="$old_cflags"

fi
rm -f conftest*

echo $ac_n "checking whether your compiler supports -fno-strict-aliasing""... $ac_c" 1>&6
echo "configure:6539: checking whether your compiler supports -fno-strict-aliasing" >&5
old_cflags="$CFLAGS"
CFLAGS="$CFLAGS -fno-strict-aliasing"
cat > conftest.$ac_ext <<EOF
#line 6543 "configure"
#include "confdefs.h"

int main() {
exit(0);
; return 0; }
EOF
if { (eval echo configure:6550: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  echo "$ac_t""yes" 1>&6
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  echo "$ac_t""no" 1>&6
	CFLAGS="$old_cflags"

fi
rm -f conftest*
























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

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

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

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

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

DEFS=-DHAVE_CONFIG_H

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

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

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

ac_given_srcdir=$srcdir

trap 'rm -fr `echo "Makefile source/Makefile source/info.c.sh include/defs.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
EOF
cat >> $CONFIG_STATUS <<EOF

# Protect against being on the right side of a sed subst in config.status.
sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
$ac_vpsub
$extrasub
s%@SHELL@%$SHELL%g
s%@CFLAGS@%$CFLAGS%g
s%@CPPFLAGS@%$CPPFLAGS%g
s%@CXXFLAGS@%$CXXFLAGS%g
s%@FFLAGS@%$FFLAGS%g
s%@DEFS@%$DEFS%g
s%@LDFLAGS@%$LDFLAGS%g
s%@LIBS@%$LIBS%g
s%@exec_prefix@%$exec_prefix%g
s%@prefix@%$prefix%g
s%@program_transform_name@%$program_transform_name%g
s%@bindir@%$bindir%g
s%@sbindir@%$sbindir%g
s%@libexecdir@%$libexecdir%g
s%@datadir@%$datadir%g
s%@sysconfdir@%$sysconfdir%g
s%@sharedstatedir@%$sharedstatedir%g
s%@localstatedir@%$localstatedir%g
s%@libdir@%$libdir%g
s%@includedir@%$includedir%g
s%@oldincludedir@%$oldincludedir%g
s%@infodir@%$infodir%g
s%@mandir@%$mandir%g
s%@VERSION@%$VERSION%g
s%@CC@%$CC%g
s%@CPP@%$CPP%g
s%@ALLOCA@%$ALLOCA%g
s%@PERLPROG@%$PERLPROG%g
s%@RUBYPROG@%$RUBYPROG%g
s%@RUBYDOTOH@%$RUBYDOTOH%g
s%@RUBYCFLAGS@%$RUBYCFLAGS%g
s%@RUBYLDFLAGS@%$RUBYLDFLAGS%g
s%@TCLDOTOH@%$TCLDOTOH%g
s%@TCLCFLAGS@%$TCLCFLAGS%g
s%@TCLLDFLAGS@%$TCLLDFLAGS%g
s%@PERLDOTOH@%$PERLDOTOH%g
s%@PERLCFLAGS@%$PERLCFLAGS%g
s%@PERLLDFLAGS@%$PERLLDFLAGS%g
s%@WSERV_BIN@%$WSERV_BIN%g
s%@WSERV_INSTALL@%$WSERV_INSTALL%g
s%@irclibdir@%$irclibdir%g
s%@srcdir@%$srcdir%g
s%@epic5@%$epic5%g
s%@program_prefix@%$program_prefix%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 source/Makefile source/info.c.sh"}
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


  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
" $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/defs.h"
EOF
cat >> $CONFIG_STATUS <<\EOF
fi
for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
  case "$ac_file" in
  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  *) ac_file_in="${ac_file}.in" ;;
  esac

  echo creating $ac_file

  rm -f conftest.frag conftest.in conftest.out
  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
  cat $ac_file_inputs > conftest.in

EOF

# Transform confdefs.h into a sed script conftest.vals that substitutes
# the proper values into config.h.in to produce config.h.  And first:
# Protect against being on the right side of a sed subst in config.status.
# Protect against being in an unquoted here document in config.status.
rm -f conftest.vals
cat > conftest.hdr <<\EOF
s/[\\&%]/\\&/g
s%[\\$`]%\\&%g
s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
s%ac_d%ac_u%gp
s%ac_u%ac_e%gp
EOF
sed -n -f conftest.hdr confdefs.h > conftest.vals
rm -f conftest.hdr

# This sed command replaces #undef with comments.  This is necessary, for
# example, in the case of _POSIX_SOURCE, which is predefined and required
# on some systems where configure will not decide to define it.
cat >> conftest.vals <<\EOF
s%^[ 	]*#[ 	]*undef[ 	][ 	]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
EOF

# Break up conftest.vals because some shells have a limit on
# the size of here documents, and old seds have small limits too.

rm -f conftest.tail
while :
do
  ac_lines=`grep -c . conftest.vals`
  # grep -c gives empty output for an empty file on some AIX systems.
  if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
  # Write a limited-size here document to conftest.frag.
  echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
  sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
  echo 'CEOF
  sed -f conftest.frag conftest.in > conftest.out
  rm -f conftest.in
  mv conftest.out conftest.in
' >> $CONFIG_STATUS
  sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
  rm -f conftest.vals
  mv conftest.tail conftest.vals
done
rm -f conftest.vals

cat >> $CONFIG_STATUS <<\EOF
  rm -f conftest.frag conftest.h
  echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
  cat conftest.in >> conftest.h
  rm -f conftest.in
  if cmp -s $ac_file conftest.h 2>/dev/null; then
    echo "$ac_file is unchanged"
    rm -f conftest.h
  else
    # Remove last slash and all that follows it.  Not all systems have dirname.
      ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
      if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
      # The file is in a subdirectory.
      test ! -d "$ac_dir" && mkdir "$ac_dir"
    fi
    rm -f $ac_file
    mv conftest.h $ac_file
  fi
fi; done

EOF
cat >> $CONFIG_STATUS <<EOF

EOF
cat >> $CONFIG_STATUS <<\EOF

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


if test -f sig.inc ; then
    mv sig.inc include/
fi



echo
echo "There you go.  Look at include/config.h for any options that "
echo "you might want to change before you 'make'.  Don't forget to "
echo "do a 'make install' before you're done."
echo 

if test "x$warn_again" != "x0" ; then
   echo '@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@'
   echo '@@@              IMPORTANT WARNING!                 @@@'
   echo '@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@'
   echo ''
   echo 'I was unable to find tgetent() which means the build will fail.'
   echo 'If you are using linux, you _MUST_ install the ncurses-dev'
   echo 'or ncurses-devel package and then "make distclean" and '
   echo 'then run configure again.'
   echo ''
   echo '@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@'
   echo '@@@              IMPORTANT WARNING!                 @@@'
   echo '@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@'
fi

