#! /bin/sh

# From configure.in Revision: 1.56 # 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
  --disable-utf8          Disable UTF-8 (iconv) support"
ac_help="$ac_help
  --with-efence[=PATH]    Compile with the ElectricFence debugging library."
ac_help="$ac_help
  --with-paranoid         Sets the compile-time paranoid flag."
ac_help="$ac_help
  --with-default-server=SERVER[:PORT]     Connect to SERVER by default."
ac_help="$ac_help
  --with-socks            Compile with SOCKS firewall traversal support."
ac_help="$ac_help
  --with-socks5[=PATH]    Compile with SOCKS5 firewall traversal support."
ac_help="$ac_help
  --with-socks4[=PATH]    Compile with SOCKS4 firewall traversal support."
ac_help="$ac_help
  --enable-ipv6           Enable ipv6 (with ipv4) support"
ac_help="$ac_help
  --with-ssl[=PATH]       Prefix where GNU TLS is installed (optional)"
ac_help="$ac_help
  --with-openssl[=PATH]   Prefix where OpenSSL is installed (optional)"
ac_help="$ac_help
  --enable-regexp         Enable POSIX.2 regexp support"
ac_help="$ac_help
  --enable-fish           Enable FiSH encryption support"

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

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

ac_prev=
for ac_option
do

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

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

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

  case "$ac_option" in

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  esac
done

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

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

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

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

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

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

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

# A filename unique to this package, relative to the directory that
# configure is in, which we can look for to find out if srcdir is correct.
ac_unique_file=${srcdir}/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 "$CONFIG_SITE"; then
  if test "x$prefix" != xNONE; then
    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
  else
    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
  fi
fi
for ac_site_file in $CONFIG_SITE; do
  if test -r "$ac_site_file"; then
    echo "loading site script $ac_site_file"
    . "$ac_site_file"
  fi
done

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

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

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




# So many systems seem to need this that it is better do it here automatically.
if test "x$prefix" != xNONE; then
  if test -d "$prefix/lib"; then
    LIBS="-L${prefix}/lib $LIBS"
  fi
else
  if test -d "$ac_default_prefix/lib"; then
    LIBS="-L${ac_default_prefix}/lib $LIBS"
  fi
fi


VERSION=`sed -n -e 's/"$//' -e '/#define[ 	]*SCROLLZ_VERSION[ 	]*"/s///p' -e '/#define SCROLLZ_VERSION/q' < ${srcdir}/source/irc.c`
IRCIIVERSION=`sed -n -e 's/"[^"]*$//' -e '/^#define[ 	]*IRCII_VERSION[ 	]*"/s///p' -e '/^#define IRCII_VERSION/q' < ${srcdir}/source/irc.c` 
echo this is ScrollZ version $VERSION + ircII version $IRCIIVERSION
echo


CATEGORIES='build change-request doc pending runtime'


echo '$Id: configure.in,v 1.56 2009-12-21 14:56:02 f Exp $' > /dev/null


# 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:578: 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:608: 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:659: 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:691: 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 702 "configure"
#include "confdefs.h"

main(){return(0);}
EOF
if { (eval echo configure:707: \"$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:733: 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:738: 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:747: \"$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:766: checking whether ${CC-cc} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  echo 'void f(){}' > conftest.c
if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
  ac_cv_prog_cc_g=yes
else
  ac_cv_prog_cc_g=no
fi
rm -f conftest*

fi

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

echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
echo "configure:798: 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 813 "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:819: \"$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 830 "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:836: \"$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 847 "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:853: \"$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:878: 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


srcdir=`(cd $srcdir; pwd)`

objdir=`pwd`



echo $ac_n "checking for NeXT""... $ac_c" 1>&6
echo "configure:906: checking for NeXT" >&5
cat > conftest.$ac_ext <<EOF
#line 908 "configure"
#include "confdefs.h"
#if defined(NeXT) || defined(__NeXT) || defined(__NeXT__)
  yes
#endif

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


if test -n "$nextstep"; then
  echo "$ac_t""yes" 1>&6
else
  echo "$ac_t""no" 1>&6
fi


echo $ac_n "checking for AIX""... $ac_c" 1>&6
echo "configure:931: checking for AIX" >&5
cat > conftest.$ac_ext <<EOF
#line 933 "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
  aix=1
  cat >> confdefs.h <<\EOF
#define _ALL_SOURCE 1
EOF

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


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


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

  fi
fi

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

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

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

  LIBS="-lsun $LIBS"

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


echo $ac_n "checking for qnx""... $ac_c" 1>&6
echo "configure:1053: checking for qnx" >&5
case "`uname -s`" in
  QNX*)
    echo "$ac_t""yes" 1>&6
    if test -z "$GCC"; then
      LDFLAGS="-N256k -M"
      CFLAGS="-w4 -Otax -zc -Wc,-fr= -Wc,-wcd=121"
    fi
    ;;
  *)
    echo "$ac_t""no" 1>&6
esac

echo $ac_n "checking for solaris""... $ac_c" 1>&6
echo "configure:1067: checking for solaris" >&5
if /bin/sun 2> /dev/null
then
  uname=`uname -r`
  case "$uname" in
    4.*)
      echo "$ac_t""no" 1>&6 
      sunos4=1
      ;;
    5.*)
      svr4=1
      ;;
  esac
else
  echo "$ac_t""no" 1>&6
  echo $ac_n "checking for SVR4""... $ac_c" 1>&6
echo "configure:1083: checking for SVR4" >&5
  cat > conftest.$ac_ext <<EOF
#line 1085 "configure"
#include "confdefs.h"
#if defined(SVR4) || defined(__svr4__) || defined(__SVR4)
  yes
#endif

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

fi

if test -n "$svr4"
then
  echo "$ac_t""yes" 1>&6
  LIBS="-L/usr/ccs/lib $LIBS"
else
  if test ! -n "$sunos4"
  then
    echo "$ac_t""no" 1>&6
  fi
fi


echo $ac_n "checking for -I/usr/netinclude""... $ac_c" 1>&6
echo "configure:1114: checking for -I/usr/netinclude" >&5
if test -d /usr/netinclude; then
  echo "$ac_t""yes" 1>&6
  CFLAGS="$CFLAGS -I/usr/netinclude"
else
  echo "$ac_t""no" 1>&6
fi


echo $ac_n "checking for hpux version""... $ac_c" 1>&6
echo "configure:1124: checking for hpux version" >&5
if test -f /hp-ux -o -f /stand/vmunix; then
  echo "$ac_t""yes" 1>&6
  hpux=1
  uname=`uname -r` 2> /dev/null
  case $uname in
	A.09* | A.9* | a.9* | a.09* | 9* | 09* | B.09*)
		;;
	A.08* | A.8* | a.8* | a.08* | 8* | 08*)
		cat >> confdefs.h <<\EOF
#define HPUX8 1
EOF

		;;
	A.07* | A.B7* | A.7* | a.7* | a.07* | 7* | 07*)
		cat >> confdefs.h <<\EOF
#define HPUX7 1
EOF

		;;
	*)
		cat >> confdefs.h <<\EOF
#define HPUXUNKNOWN 1
EOF

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

echo $ac_n "checking for ultrix""... $ac_c" 1>&6
echo "configure:1156: checking for ultrix" >&5
cat > conftest.$ac_ext <<EOF
#line 1158 "configure"
#include "confdefs.h"
#if defined(ultrix) || defined(__ultrix) || defined(__ultrix)
  yes
#endif

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

if test -n "$ultrix"; then
  echo "$ac_t""yes" 1>&6
  test -z "$GCC" && CC="$CC -YBSD"
else
  echo "$ac_t""no" 1>&6
fi

echo $ac_n "checking for sequent/ptx""... $ac_c" 1>&6
echo "configure:1180: checking for sequent/ptx" >&5
cat > conftest.$ac_ext <<EOF
#line 1182 "configure"
#include "confdefs.h"
#ifdef _SEQUENT_
  yes
#endif

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


echo $ac_n "checking whether to enable UTF-8 (iconv) support""... $ac_c" 1>&6
echo "configure:1201: checking whether to enable UTF-8 (iconv) support" >&5
# Check whether --enable-utf8 or --disable-utf8 was given.
if test "${enable_utf8+set}" = set; then
  enableval="$enable_utf8"
   case "$enableval" in
  no) echo "$ac_t""no" 1>&6
      ;;
  *) echo "$ac_t""yes" 1>&6
     ;;
  esac 
else
   echo "$ac_t""yes" 1>&6
  enable_utf8=yes

fi


echo $ac_n "checking for FreeBSD""... $ac_c" 1>&6
echo "configure:1219: checking for FreeBSD" >&5
case "`uname -s`" in
  FreeBSD*)
    echo "$ac_t""yes" 1>&6
    CFLAGS="$CFLAGS -I/usr/local/include"
    CPPFLAGS="$CPPFLAGS -I/usr/local/include"
    LIBS="$LIBS -L/usr/local/lib"
    freebsd=1
    ;;
  *)
    echo "$ac_t""no" 1>&6
esac

echo $ac_n "checking for IRIX""... $ac_c" 1>&6
echo "configure:1233: checking for IRIX" >&5
case "`uname -s`" in
  IRIX*)
    echo "$ac_t""yes" 1>&6
    CFLAGS="$CFLAGS -I/usr/nekoware/include"
    CPPFLAGS="$CPPFLAGS -I/usr/nekoware/include"
    LIBS="$LIBS -L/usr/nekoware/lib"
    freebsd=1
    ;;
  *)
    echo "$ac_t""no" 1>&6
esac

if test "x$enable_utf8" = "xyes" ; then
  if test -n "$freebsd"; then
     case "`uname -r`" in
       10.*)
         ;;
       *)
         LIBS="$LIBS -liconv"
         ;;
     esac
  fi
fi

for ac_hdr in sys/un.h sys/select.h sys/fcntl.h sys/ioctl.h sys/file.h sys/time.h sys/wait.h sys/twg_config.h sys/ptem.h sys/uio.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:1262: 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 1267 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1272: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
 
else
  echo "$ac_t""no" 1>&6
fi
done
for ac_hdr in unistd.h fcntl.h string.h memory.h netdb.h limits.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:1301: 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 1306 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1311: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
 
else
  echo "$ac_t""no" 1>&6
fi
done
for ac_hdr in stdarg.h varargs.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:1340: 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 1345 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1350: \"$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
 break
else
  echo "$ac_t""no" 1>&6
fi
done
for ac_hdr in process.h termcap.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:1379: 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 1384 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1389: \"$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 "x$enable_utf8" = "xyes" ; then
for ac_hdr in iconv.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:1420: 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 1425 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1430: \"$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

if test -n "$ultrix" -o -n "$nextstep"; then
  # POSIX termios is broken on Ultrix so don't look for it.
  # NEXTSTEP POSIX is broken so don't look for it.
  for ac_hdr in termio.h sgtty.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:1465: 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 1470 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1475: \"$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
 break
else
  echo "$ac_t""no" 1>&6
fi
done
else
  for ac_hdr in termios.h termio.h sgtty.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:1505: 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 1510 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1515: \"$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
 break
else
  echo "$ac_t""no" 1>&6
fi
done
fi

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

int main() {

/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_fchmod) || defined (__stub___fchmod)
choke me
#else
fchmod();
#endif

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

if eval "test \"`echo '$ac_cv_func_'fchmod`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  :
else
  echo "$ac_t""no" 1>&6
cat >> confdefs.h <<\EOF
#define NEED_FCHMOD 1
EOF

fi

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

int main() {

/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_getcwd) || defined (__stub___getcwd)
choke me
#else
getcwd();
#endif

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

if eval "test \"`echo '$ac_cv_func_'getcwd`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  :
else
  echo "$ac_t""no" 1>&6
cat >> confdefs.h <<\EOF
#define NEED_GETCWD 1
EOF

fi

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

int main() {

/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_getsid) || defined (__stub___getsid)
choke me
#else
getsid();
#endif

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

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

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

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

int main() {

/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_getloadavg) || defined (__stub___getloadavg)
choke me
#else
getloadavg();
#endif

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

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

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

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

int main() {

/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_scandir) || defined (__stub___scandir)
choke me
#else
scandir();
#endif

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

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

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

echo $ac_n "checking for setsid""... $ac_c" 1>&6
echo "configure:1902: 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 1907 "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:1930: \"$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 strerror""... $ac_c" 1>&6
echo "configure:1953: 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 1958 "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:1981: \"$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
  :
else
  echo "$ac_t""no" 1>&6
cat >> confdefs.h <<\EOF
#define NEED_STRERROR 1
EOF

fi

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

int main() {

/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_strftime) || defined (__stub___strftime)
choke me
#else
strftime();
#endif

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

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

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

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

int main() {

/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_writev) || defined (__stub___writev)
choke me
#else
writev();
#endif

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

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

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

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

int main() {

/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_vasprintf) || defined (__stub___vasprintf)
choke me
#else
vasprintf();
#endif

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

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

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

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

int main() {

/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_fputc) || defined (__stub___fputc)
choke me
#else
fputc();
#endif

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

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

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

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

int main() {

/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_fwrite) || defined (__stub___fwrite)
choke me
#else
fwrite();
#endif

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

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

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

echo $ac_n "checking for snprintf""... $ac_c" 1>&6
echo "configure:2311: 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 2316 "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:2339: \"$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 vsnprintf""... $ac_c" 1>&6
echo "configure:2362: 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 2367 "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:2390: \"$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


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

int main() {

/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_iconv_open) || defined (__stub___iconv_open)
choke me
#else
iconv_open();
#endif

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

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

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

fi

echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
echo "configure:2468: 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 2473 "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:2481: \"$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 2498 "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 2516 "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 2537 "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:2548: \"$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:2572: 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 2577 "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:2586: \"$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:2611: 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 2616 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <$ac_hdr>
int main() {
DIR *dirp = 0;
; return 0; }
EOF
if { (eval echo configure:2624: \"$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:2649: 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 2657 "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:2668: \"$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:2690: 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 2698 "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:2709: \"$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:2733: 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 2738 "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:2755: \"$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:2774: 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 2779 "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:2807: 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 2812 "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:2840: 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 2845 "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:2873: 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 2878 "configure"
#include "confdefs.h"
#include <sys/types.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "uid_t" >/dev/null 2>&1; then
  rm -rf conftest*
  ac_cv_type_uid_t=yes
else
  rm -rf conftest*
  ac_cv_type_uid_t=no
fi
rm -f conftest*

fi

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

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

fi

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

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

fi


if test x$ac_cv_header_sys_twg_config_h = xyes
then
  cat >> confdefs.h <<\EOF
#define WINS 1
EOF

fi

if test x$ac_cv_func_snprintf != xyes || test x$ac_cv_func_vsnprintf != xyes
then
  EXTRA_OBJECTS=snprintf.o
  EXTRA_SOURCES=snprintf.c
else
  EXTRA_OBJECTS=
  EXTRA_SOURCES=
fi




echo $ac_n "checking for struct linger""... $ac_c" 1>&6
echo "configure:2961: checking for struct linger" >&5
cat > conftest.$ac_ext <<EOF
#line 2963 "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" 1>&6
fi
rm -f conftest*



if test x$ac_cv_func_getsid != xyes && test x$ac_cv_func_getpgid != xyes
then
  echo $ac_n "checking if getpgrp takes an argument""... $ac_c" 1>&6
echo "configure:2985: checking if getpgrp takes an argument" >&5
  if test "$cross_compiling" = yes; then
  :
else
  cat > conftest.$ac_ext <<EOF
#line 2990 "configure"
#include "confdefs.h"

main()
{
  int pid;
  int pgid;

  pid = fork();

  if (0 == pid)
  {
#ifdef HAVE_SETSID
    setsid();
#else
    setpgrp(0, getpid());
#endif /* HAVE_SETSID */
    sleep(10);
  }
  else
  {
    sleep(2);
    pgid = getpgrp(pid);
    kill(pid,9);
    if (pid != pgid)
      exit(1);
  }
  exit(0);
}

EOF
if { (eval echo configure:3021: \"$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 your getpgrp is painful" 1>&6
  cat >> confdefs.h <<\EOF
#define BROKEN_GETPGRP 1
EOF

fi
rm -fr conftest*
fi

fi


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

int main() {

/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_waitpid) || defined (__stub___waitpid)
choke me
#else
waitpid();
#endif

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

if eval "test \"`echo '$ac_cv_func_'waitpid`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  :
else
  echo "$ac_t""no" 1>&6
echo "$ac_t""no" 1>&6
  echo $ac_n "checking for bsd wait""... $ac_c" 1>&6
echo "configure:3088: checking for bsd wait" >&5
  cat > conftest.$ac_ext <<EOF
#line 3090 "configure"
#include "confdefs.h"

#include <sys/types.h>
#include <sys/wait.h>

int main() {

  union wait x;
  int y;
#ifdef WEXITSTATUS
  y = WEXITSTATUS(x);
#endif

; return 0; }
EOF
if { (eval echo configure:3106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  cat >> confdefs.h <<\EOF
#define BSDWAIT 1
EOF

    bsdwait=1
    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
    cat >> confdefs.h <<\EOF
#define NEED_WAITPID 1
EOF

fi
rm -f conftest*
fi



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

int main() {

/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_select) || defined (__stub___select)
choke me
#else
select();
#endif

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

if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  :
else
  echo "$ac_t""no" 1>&6
echo $ac_n "checking for select in -lsocket""... $ac_c" 1>&6
echo "configure:3177: checking for select in -lsocket" >&5
ac_lib_var=`echo socket'_'select | 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 3185 "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 select();

int main() {
select()
; return 0; }
EOF
if { (eval echo configure:3196: \"$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
echo $ac_n "checking for select in -lnsl""... $ac_c" 1>&6
echo "configure:3215: checking for select in -lnsl" >&5
ac_lib_var=`echo nsl'_'select | 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 3223 "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 select();

int main() {
select()
; return 0; }
EOF
if { (eval echo configure:3234: \"$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
echo $ac_n "checking for select in -linet""... $ac_c" 1>&6
echo "configure:3253: checking for select in -linet" >&5
ac_lib_var=`echo inet'_'select | 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 3261 "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 select();

int main() {
select()
; return 0; }
EOF
if { (eval echo configure:3272: \"$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 -linet"
else
  echo "$ac_t""no" 1>&6
echo $ac_n "checking for select in -lcposix""... $ac_c" 1>&6
echo "configure:3291: checking for select in -lcposix" >&5
ac_lib_var=`echo cposix'_'select | 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="-lcposix  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 3299 "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 select();

int main() {
select()
; return 0; }
EOF
if { (eval echo configure:3310: \"$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 -lcposix"
else
  echo "$ac_t""no" 1>&6
echo $ac_n "checking for select in -lnet""... $ac_c" 1>&6
echo "configure:3329: checking for select in -lnet" >&5
ac_lib_var=`echo net'_'select | 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="-lnet  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 3337 "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 select();

int main() {
select()
; return 0; }
EOF
if { (eval echo configure:3348: \"$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 -lnet"
else
  echo "$ac_t""no" 1>&6
echo "configure: warning: i can not find select.  you might need to help me" 1>&2
fi

fi

fi

fi

fi

fi


if test x$aix = x1
then
  LIBS="-lcurses $LIBS"
  cat >> confdefs.h <<\EOF
#define INCLUDE_CURSES_H 1
EOF

else
  olibs="$LIBS"
  case "`uname -s`" in
    Linux*)
      if test -d /usr/include/ncurses; then
	CFLAGS="-I/usr/include/ncurses $CFLAGS"
      fi
      ;;
  esac
  echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
echo "configure:3397: 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 3405 "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:3416: \"$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="-ltermcap $olibs"
else
  echo "$ac_t""no" 1>&6
echo $ac_n "checking for tgetent in -ltinfo""... $ac_c" 1>&6
echo "configure:3435: checking for tgetent in -ltinfo" >&5
ac_lib_var=`echo tinfo'_'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="-ltinfo  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 3443 "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:3454: \"$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 $olibs"
else
  echo "$ac_t""no" 1>&6
echo $ac_n "checking for tgetent in -ltermlib""... $ac_c" 1>&6
echo "configure:3473: 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 3481 "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:3492: \"$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="-ltermlib $olibs"
else
  echo "$ac_t""no" 1>&6
echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
echo "configure:3511: 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 3519 "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:3530: \"$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 $olibs"
else
  echo "$ac_t""no" 1>&6
echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
echo "configure:3549: checking for tgetent in -lncurses" >&5
ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lncurses  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 3557 "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:3568: \"$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 $olibs"
else
  echo "$ac_t""no" 1>&6
echo $ac_n "checking for tgetent in -lxtermcap""... $ac_c" 1>&6
echo "configure:3587: checking for tgetent in -lxtermcap" >&5
ac_lib_var=`echo xtermcap'_'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="-lxtermcap  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 3595 "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:3606: \"$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="-lxtermcap $olibs"
else
  echo "$ac_t""no" 1>&6
{ echo "configure: error: Can not find curses or termcap library. Installing package libncurses5-dev or ncurses-devel usually fixes this problem." 1>&2; exit 1; }
fi

fi

fi

fi

fi

fi

  echo $ac_n "checking for tputs in curses.h""... $ac_c" 1>&6
echo "configure:3638: checking for tputs in curses.h" >&5
  cat > conftest.$ac_ext <<EOF
#line 3640 "configure"
#include "confdefs.h"
#include <curses.h>

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

fi

if test "x$enable_utf8" = "xyes" ; then
if test -n "$svr4" -a -n "$GCC"
then
  echo $ac_n "checking for iconv_open in -liconv""... $ac_c" 1>&6
echo "configure:3664: checking for iconv_open in -liconv" >&5
ac_lib_var=`echo iconv'_'iconv_open | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-liconv  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 3672 "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 iconv_open();

int main() {
iconv_open()
; return 0; }
EOF
if { (eval echo configure:3683: \"$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 -liconv"
else
  echo "$ac_t""no" 1>&6
fi

fi
fi




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

int main() {

/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_sigaction) || defined (__stub___sigaction)
choke me
#else
sigaction();
#endif

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

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

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

int main() {

/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_sigset) || defined (__stub___sigset)
choke me
#else
sigset();
#endif

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

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

  echo using ok system v signals
  
else
  echo "$ac_t""no" 1>&6
echo checking for reliable signals
if test "$cross_compiling" = yes; then
  you lose.

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

#include <sys/types.h>
#include <signal.h>

#ifndef SIGCHLD
# define SIGCHLD SIGCLD
#endif
#ifdef USE_SIGSET
# define signal sigset
#endif

int got;

#ifdef SIGVOID
void
#endif
hand()
{
  got++;
}

main()
{
  (void)signal(SIGCHLD, hand);
  kill(getpid(), SIGCHLD);
  kill(getpid(), SIGCHLD);
  if (got < 2)
    exit(1);
  exit(0);
}

EOF
if { (eval echo configure:3853: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  echo using bsd signals

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

echo using system v signals
fi
rm -fr conftest*
fi

fi

fi


if test x$bsdwait = x1
then
  echo $ac_n "checking for wait3 declaration""... $ac_c" 1>&6
echo "configure:3878: checking for wait3 declaration" >&5
  cat > conftest.$ac_ext <<EOF
#line 3880 "configure"
#include "confdefs.h"
#include <sys/types.h> dnl )
#include <signal.h>
#include <sys/wait.h>

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

else
  echo $ac_n "checking for waitpid declaration""... $ac_c" 1>&6
echo "configure:3902: checking for waitpid declaration" >&5
  cat > conftest.$ac_ext <<EOF
#line 3904 "configure"
#include "confdefs.h"
#include <sys/types.h> dnl )
#include <signal.h>
#include <sys/wait.h>

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

fi


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

#include <sys/types.h>
#include <errno.h>
main()
{
  int i = errno;
  exit(0);
}

EOF
if { (eval echo configure:3945: \"$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 ERRNO_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



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

#include <sys/types.h>
#include <stdio.h>
#include <errno.h>
main()
{
  char *s = sys_errlist[0];
  exit(0);
}

EOF
if { (eval echo configure:3982: \"$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 SYS_ERRLIST_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$enable_utf8" = "xyes" ; then
echo $ac_n "checking for const iconv 2nd argument""... $ac_c" 1>&6
echo "configure:4002: checking for const iconv 2nd argument" >&5
cat > conftest.$ac_ext <<EOF
#line 4004 "configure"
#include "confdefs.h"
#include <iconv.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "\\<iconv\\>.*\\(.*const" >/dev/null 2>&1; then
  rm -rf conftest*
  echo "$ac_t""yes" 1>&6
  cat >> confdefs.h <<\EOF
#define ICONV_CONST_ARG2 1
EOF

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

fi


echo $ac_n "checking for a 32 bit integer""... $ac_c" 1>&6
echo "configure:4026: checking for a 32 bit integer" >&5
if test "$cross_compiling" = yes; then
  :
else
  cat > conftest.$ac_ext <<EOF
#line 4031 "configure"
#include "confdefs.h"

main()
{
  if (4 == sizeof(unsigned long))
    exit(0);
  exit(1);
}

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

else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  if test "$cross_compiling" = yes; then
  :
else
  cat > conftest.$ac_ext <<EOF
#line 4057 "configure"
#include "confdefs.h"

main()
{
  if (4 == sizeof(unsigned int))
    exit(0);
  exit(1);
}

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

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

fi
rm -fr conftest*
fi

fi
rm -fr conftest*
fi



if test ! -n "$libsocket"; then
	echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
echo "configure:4096: 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 4104 "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:4115: \"$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
if test ! -n "$libinet"; then
	echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
echo "configure:4138: 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 4146 "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:4157: \"$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
echo $ac_n "checking for gethostname""... $ac_c" 1>&6
echo "configure:4179: checking for gethostname" >&5
if eval "test \"`echo '$''{'ac_cv_func_gethostname'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 4184 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char gethostname(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char gethostname();

int main() {

/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_gethostname) || defined (__stub___gethostname)
choke me
#else
gethostname();
#endif

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

if eval "test \"`echo '$ac_cv_func_'gethostname`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  :
else
  echo "$ac_t""no" 1>&6
echo $ac_n "checking for gethostname in -lnsl""... $ac_c" 1>&6
echo "configure:4225: 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 4233 "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:4244: \"$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 inet_addr in -ldgc""... $ac_c" 1>&6
echo "configure:4267: 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 4275 "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:4286: \"$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:4307: 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 4315 "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:4326: \"$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
  olibs=$LIBS
  LIBS="$LIBS -lresolv"
  if test "$cross_compiling" = yes; then
  :
else
  cat > conftest.$ac_ext <<EOF
#line 4347 "configure"
#include "confdefs.h"

#include <netdb.h>
main()
{
  struct hostent *hp;

  hp = gethostbyname("`uname -n`");
  exit(0);
}

EOF
if { (eval echo configure:4360: \"$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*
  LIBS=$olibs
fi
rm -fr conftest*
fi

else
  echo "$ac_t""no" 1>&6
echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
echo "configure:4375: checking for gethostbyname in -lnsl" >&5
ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lnsl  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 4383 "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:4394: \"$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
  olibs=$LIBS
    LIBS="$LIBS -lnsl"
else
  echo "$ac_t""no" 1>&6
fi

fi

echo $ac_n "checking for inet_aton in -lresolv""... $ac_c" 1>&6
echo "configure:4418: checking for inet_aton in -lresolv" >&5
ac_lib_var=`echo resolv'_'inet_aton | 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 4426 "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_aton();

int main() {
inet_aton()
; return 0; }
EOF
if { (eval echo configure:4437: \"$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 non-blocking""... $ac_c" 1>&6
echo "configure:4459: checking for non-blocking" >&5

precode='#include <sys/types.h>
#include <sys/socket.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <sys/file.h>
#include <signal.h>

alarmed()
{
	exit(1);
}

main()
{
	char b[12], x[32];
	int f, l = sizeof(x);
	f = socket(AF_INET, SOCK_DGRAM, 0);
	if (f >= 0 && (fcntl(f, F_SETFL,'
postcode=') != -1)) {
		signal(SIGALRM, alarmed);
		alarm(3);
		recvfrom(f, b, 12, 0, (struct sockaddr *)x, &l);
		alarm(0);
		exit(0);
	}
	exit(1);
}'


code="$precode O_NONBLOCK $postcode"

if test "$cross_compiling" = yes; then
  :
else
  cat > conftest.$ac_ext <<EOF
#line 4496 "configure"
#include "confdefs.h"
$code
EOF
if { (eval echo configure:4500: \"$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 NBLOCK_POSIX 1
EOF

  echo "$ac_t""posix" 1>&6
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  code="$precode O_NDELAY $postcode"
  if test "$cross_compiling" = yes; then
  :
else
  cat > conftest.$ac_ext <<EOF
#line 4516 "configure"
#include "confdefs.h"
$code
EOF
if { (eval echo configure:4520: \"$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 NBLOCK_BSD 1
EOF

    echo "$ac_t""bsd" 1>&6
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  code="$precode FIONBIO $postcode"
    if test "$cross_compiling" = yes; then
  :
else
  cat > conftest.$ac_ext <<EOF
#line 4536 "configure"
#include "confdefs.h"
$code
EOF
if { (eval echo configure:4540: \"$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 NBLOCK_SYSV 1
EOF

      echo "$ac_t""system v" 1>&6
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  echo "configure: warning: i can't find a working non blocking system" 1>&2
fi
rm -fr conftest*
fi

fi
rm -fr conftest*
fi

fi
rm -fr conftest*
fi


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)
  set X `kill -l 2> /dev/null`
  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
  ;;
esac

sig_name="ZERO $*"
if test -f source/sig.inc; then
  /bin/rm -f source/sig.inc
fi

echo $sig_name | sed -e 's/$/"};/' -e 's/ /", "/g' -e 's/^/char *signals[] = { "/' -e 's/};/, NULL};/' >> source/sig.inc


echo $ac_n "checking for unix mail directory""... $ac_c" 1>&6
echo "configure:4616: checking for unix mail directory" >&5

for foo in /var/spool/mail /usr/spool/mail /var/mail /usr/mail
do
  if test -d $foo; then
    mdir=$foo
    break
  fi
done

if test -n "$mdir"; then
  UNIX_MAIL=\"$mdir\"
  echo "$ac_t""$mdir" 1>&6
  cat >> confdefs.h <<EOF
#define UNIX_MAIL "$mdir"
EOF

else
  echo "$ac_t""none" 1>&6
  echo $ac_n "checking for AMS mail""... $ac_c" 1>&6
echo "configure:4636: checking for AMS mail" >&5
  if test "x$HOME" != "/" -o -z "x$HOME" && test -d "$HOME/Mailbox"; then
    echo "$ac_t""using Mailbox" 1>&6
    cat >> confdefs.h <<EOF
#define AMS_MAIL "Mailbox"
EOF

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


if test -z "$CFLAGS"; then CFLAGS=-O ; fi
if test -z "$LDFLAGS"; then LDFLAGS= ; fi
RM="rm -f"
LN="ln -s"

if test ! -n "$bindir";
then
	bindir=\${exec_prefix}/bin
fi


if test ! -n "$IRCLIB";
then
	IRCLIB=\${datadir}/scrollz
fi


if test "x$exec_prefix" = "xNONE"; then
  if test "x$prefix" = "xNONE"; then
    libdir="$ac_default_prefix/lib"
  else
    if test "x$libdir" = "xNONE"; then
      libdir="$prefix/lib"
    fi
  fi
else
  libdir="$exec_prefix/lib"
fi

echo $ac_n "checking for ElectricFence library""... $ac_c" 1>&6
echo "configure:4679: checking for ElectricFence library" >&5
# Check whether --with-efence or --without-efence was given.
if test "${with_efence+set}" = set; then
  withval="$with_efence"
   case "$withval" in
  no)
    echo "$ac_t""no" 1>&6
    ;;		
  *)
    echo "$ac_t""yes" 1>&6
    if test "x$withval" = xyes; then
      withval="-lefence"
    else
      if test -d "$withval"; then
        if test -d "$withval/lib"; then
	  withval="-L$withval/lib -lefence"
	else
	  withval="-L$withval -lefence"
	fi
      fi
    fi
    LIBS="$withval $LIBS"
    ;;
  esac 
else
  echo "$ac_t""no" 1>&6

fi


echo $ac_n "checking paranoia status""... $ac_c" 1>&6
echo "configure:4710: checking paranoia status" >&5
# Check whether --with-paranoid or --without-paranoid was given.
if test "${with_paranoid+set}" = set; then
  withval="$with_paranoid"
   echo "$ac_t""yes" 1>&6
  cat >> confdefs.h <<EOF
#define PARANOID 1
EOF
 
else
  echo "$ac_t""none" 1>&6

fi


echo $ac_n "checking for /dev/urandom""... $ac_c" 1>&6
echo "configure:4726: checking for /dev/urandom" >&5
if test -c /dev/urandom; then
  echo "$ac_t""yes" 1>&6
  cat >> confdefs.h <<EOF
#define HAVE_DEV_RANDOM 1
EOF

  cat >> confdefs.h <<EOF
#define DEV_RANDOM_PATH "/dev/urandom"
EOF

else
  echo "$ac_t""no" 1>&6
  echo $ac_n "checking for /dev/random""... $ac_c" 1>&6
echo "configure:4740: checking for /dev/random" >&5
  if test -c /dev/random; then
    echo "$ac_t""yes" 1>&6
    cat >> confdefs.h <<EOF
#define HAVE_DEV_RANDOM 1
EOF

    cat >> confdefs.h <<EOF
#define DEV_RANDOM_PATH "/dev/random"
EOF

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

echo $ac_n "checking for default server""... $ac_c" 1>&6
echo "configure:4757: checking for default server" >&5
# Check whether --with-default-server or --without-default-server was given.
if test "${with_default_server+set}" = set; then
  withval="$with_default_server"
   if test "$withval"; then
    echo "$ac_t""$withval" 1>&6
    cat >> confdefs.h <<EOF
#define DEFAULT_SERVER "$withval"
EOF

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

fi


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

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

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

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

     LIBS="-lcrypt $LIBS"
else
  echo "$ac_t""no" 1>&6
echo $ac_n "checking for des in -ldes""... $ac_c" 1>&6
echo "configure:4861: checking for des in -ldes" >&5
ac_lib_var=`echo des'_'des | 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="-ldes  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 4869 "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 des();

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

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

       LIBS="-ldes $LIBS"
else
  echo "$ac_t""no" 1>&6
fi

fi

fi


echo $ac_n "checking whether to support SOCKS""... $ac_c" 1>&6
echo "configure:4910: 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
    ;;
  yes)
    echo "$ac_t""yes" 1>&6
    echo $ac_n "checking for SOCKSconnect in -lsocks5""... $ac_c" 1>&6
echo "configure:4921: checking for SOCKSconnect in -lsocks5" >&5
ac_lib_var=`echo socks5'_'SOCKSconnect | 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="-lsocks5  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 4929 "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 SOCKSconnect();

int main() {
SOCKSconnect()
; return 0; }
EOF
if { (eval echo configure:4940: \"$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
  
	    socks=5
	    LIBS="-lsocks5 $LIBS"
else
  echo "$ac_t""no" 1>&6

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

int main() {
Rconnect()
; return 0; }
EOF
if { (eval echo configure:4981: \"$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
  
	    socks=4
	    LIBS="-lsocks $LIBS"
else
  echo "$ac_t""no" 1>&6

		{ echo "configure: error: Could not find socks library.  You must first install socks." 1>&2; exit 1; }  
fi
  
fi

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

fi


if test "x$socks" = "x"; then
	echo $ac_n "checking whether to support SOCKS5""... $ac_c" 1>&6
echo "configure:5017: 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
	    ;;
	  *)
	    echo "$ac_t""yes" 1>&6
	    socks=5
	    if test "x$withval" = "xyes"; then
	      withval="-lsocks5"
	    else
	      if test -d "$withval"; then
		if test -d "$withval/include"; then
		  CFLAGS="$CFLAGS -I$withval/include"
		else
		  CFLAGS="$CFLAGS -I$withval"
		fi
	        if test -d "$withval/lib"; then
		  withval="-L$withval/lib -lsocks5"
		else
		  withval="-L$withval -lsocks5"
		fi
	      fi
	    fi
	    LIBS="$withval $LIBS"
	    # If Socks was compiled with Kerberos support, we will need
	    # to link against kerberos libraries.  Temporarily append
	    # to LIBS.  This is harmless if there is no kerberos support.
	    TMPLIBS="$LIBS"
	    LIBS="$LIBS $KERBEROS_LIBS"
	    cat > conftest.$ac_ext <<EOF
#line 5051 "configure"
#include "confdefs.h"

int main() {
 SOCKSconnect(); 
; return 0; }
EOF
if { (eval echo configure:5058: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  :
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
   { echo "configure: error: Could not find the $withval library.  You must first install socks5." 1>&2; exit 1; } 
fi
rm -f conftest*
	    LIBS="$TMPLIBS"
	    ;;
	  esac 
else
  echo "$ac_t""no" 1>&6
	
fi

fi

if test "x$socks" = "x"; then
	echo $ac_n "checking whether to support SOCKS4""... $ac_c" 1>&6
echo "configure:5079: checking whether to support SOCKS4" >&5
	# Check whether --with-socks4 or --without-socks4 was given.
if test "${with_socks4+set}" = set; then
  withval="$with_socks4"
   case "$withval" in
	  no)
	    echo "$ac_t""no" 1>&6
	    ;;
	  *)
	    echo "$ac_t""yes" 1>&6
	    socks=4
	    if test "x$withval" = "xyes"; then
	      withval="-lsocks"
	    else
	      if test -d "$withval"; then
	        withval="-L$withval -lsocks"
	      fi
	    fi
	    LIBS="$withval $LIBS"
	    cat > conftest.$ac_ext <<EOF
#line 5099 "configure"
#include "confdefs.h"

int main() {
 Rconnect(); 
; return 0; }
EOF
if { (eval echo configure:5106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  :
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
   { echo "configure: error: Could not find the $withval library.  You must first install socks." 1>&2; exit 1; } 
fi
rm -f conftest*
	    ;;
	  esac 
else
  echo "$ac_t""no" 1>&6
	
fi

fi



if test "x$socks" = "x4"; then
    cat >> confdefs.h <<\EOF
#define SOCKS 1
EOF

    cat >> confdefs.h <<\EOF
#define SOCKS4 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

fi

if test "x$socks" = "x5"; then
    cat >> confdefs.h <<\EOF
#define SOCKS 1
EOF

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

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

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

    cat >> confdefs.h <<\EOF
#define getpeername SOCKSgetpeername
EOF

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

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

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

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

    cat >> confdefs.h <<\EOF
#define recvfrom SOCKSrecvfrom
EOF

    cat >> confdefs.h <<\EOF
#define sendto SOCKSsendto
EOF

    cat >> confdefs.h <<\EOF
#define recv SOCKSrecv
EOF

    cat >> confdefs.h <<\EOF
#define send SOCKSsend
EOF

    cat >> confdefs.h <<\EOF
#define read SOCKSread
EOF

    cat >> confdefs.h <<\EOF
#define write SOCKSwrite
EOF

    cat >> confdefs.h <<\EOF
#define rresvport SOCKSrresvport
EOF

    cat >> confdefs.h <<\EOF
#define shutdown SOCKSshutdown
EOF

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

    cat >> confdefs.h <<\EOF
#define close SOCKSclose
EOF

    cat >> confdefs.h <<\EOF
#define dup SOCKSdup
EOF

    cat >> confdefs.h <<\EOF
#define dup2 SOCKSdup2
EOF

    cat >> confdefs.h <<\EOF
#define fclose SOCKSfclose
EOF

    cat >> confdefs.h <<\EOF
#define gethostbyname SOCKSgethostbyname
EOF

fi

echo $ac_n "checking whether to enable ipv6""... $ac_c" 1>&6
echo "configure:5257: checking whether to enable ipv6" >&5
if test "x$socks" = "x4" -o "x$socks" = "x5"; then
echo "$ac_t""no" 1>&6
else
# Check whether --enable-ipv6 or --disable-ipv6 was given.
if test "${enable_ipv6+set}" = set; then
  enableval="$enable_ipv6"
   case "$enableval" in
  yes) echo "$ac_t""yes" 1>&6
       cat >> confdefs.h <<\EOF
#define INET6 1
EOF

       ipv6=yes
       ;;
  esac 
fi

if test "x$ipv6" = "xno" -o "x$ipv6" = "x" ; then
       echo "$ac_t""no" 1>&6
       ipv6=no
fi

ipv6type=unknown
ipv6lib=none
ipv6trylibc=no

if test "x$ipv6" = "xyes"; then
        echo $ac_n "checking ipv6 stack type""... $ac_c" 1>&6
echo "configure:5286: checking ipv6 stack type" >&5
        for i in inria kame linux-glibc linux-libinet6 toshiba v6d zeta; do
                case $i in
                inria)
                                                cat > conftest.$ac_ext <<EOF
#line 5291 "configure"
#include "confdefs.h"
dnl
#include <netinet/in.h>
#ifdef IPV6_INRIA_VERSION
yes
#endif
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "yes" >/dev/null 2>&1; then
  rm -rf conftest*
  ipv6type=$i;
				cat >> confdefs.h <<\EOF
#define INET6 1
EOF

fi
rm -f conftest*

                        ;;
                kame)
                                                cat > conftest.$ac_ext <<EOF
#line 5313 "configure"
#include "confdefs.h"
dnl
#include <netinet/in.h>
#ifdef __KAME__
yes
#endif
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "yes" >/dev/null 2>&1; then
  rm -rf conftest*
  ipv6type=$i;
                                ipv6lib=inet6;
                                ipv6libdir=/usr/local/v6/lib;
                                ipv6trylibc=yes;
				cat >> confdefs.h <<\EOF
#define INET6 1
EOF

fi
rm -f conftest*

                        ;;
                linux-glibc)
                                                cat > conftest.$ac_ext <<EOF
#line 5338 "configure"
#include "confdefs.h"
dnl
#include <features.h>
#if defined(__GLIBC__) && __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 1
yes
#endif
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "yes" >/dev/null 2>&1; then
  rm -rf conftest*
  ipv6type=$i;
				cat >> confdefs.h <<\EOF
#define INET6 1
EOF

fi
rm -f conftest*

                        ;;
                linux-libinet6)
                                                if test -d /usr/inet6 -a -f /usr/include/netinet/ip6.h; then
                                ipv6type=$i
                                ipv6lib=inet6
                                ipv6libdir=/usr/inet6/lib
                                ipv6trylibc=yes;
                                CFLAGS="-I/usr/inet6/include $CFLAGS"
				cat >> confdefs.h <<\EOF
#define INET6 1
EOF

                        fi
                        ;;
                toshiba)
                        cat > conftest.$ac_ext <<EOF
#line 5373 "configure"
#include "confdefs.h"
dnl
#include <sys/param.h>
#ifdef _TOSHIBA_INET6
yes
#endif
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "yes" >/dev/null 2>&1; then
  rm -rf conftest*
  ipv6type=$i;
                                ipv6lib=inet6;
                                ipv6libdir=/usr/local/v6/lib;
				cat >> confdefs.h <<\EOF
#define INET6 1
EOF

fi
rm -f conftest*

                        ;;
                v6d)
                        cat > conftest.$ac_ext <<EOF
#line 5397 "configure"
#include "confdefs.h"
dnl
#include </usr/local/v6/include/sys/v6config.h>
#ifdef __V6D__
yes
#endif
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "yes" >/dev/null 2>&1; then
  rm -rf conftest*
  ipv6type=$i;
                                ipv6lib=v6;
                                ipv6libdir=/usr/local/v6/lib;
                                CFLAGS="-I/usr/local/v6/include $CFLAGS"
fi
rm -f conftest*

                        ;;
                zeta)
                        cat > conftest.$ac_ext <<EOF
#line 5418 "configure"
#include "confdefs.h"
dnl
#include <sys/param.h>
#ifdef _ZETA_MINAMI_INET6
yes
#endif
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "yes" >/dev/null 2>&1; then
  rm -rf conftest*
  ipv6type=$i;
                                ipv6lib=inet6;
                                ipv6libdir=/usr/local/v6/lib;
				cat >> confdefs.h <<\EOF
#define INET6 1
EOF

fi
rm -f conftest*

                        ;;
                esac
                if test "x$ipv6type" != "xunknown"; then
                        break
                fi
        done
        echo "$ac_t""$ipv6type" 1>&6
fi
if test "x$ipv6" = "xyes" -a "x$ipv6lib" != "xnone"; then
        if test -d "$ipv6libdir" -a -f "$ipv6libdir/lib$ipv6lib.a"; then
                LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
                echo "$ac_t""You have $ipv6lib library" 1>&6
        else
                if test "x$ipv6trylibc" = "xyes"; then
                        echo "$ac_t""You do not have (need) $ipv6lib library, using libc" 1>&6
                else
                        { echo "configure: error: Fatal: no $ipv6lib library found.  cannot continue.
You need to fetch lib$ipv6lib.a from appropriate
ipv6 kit and compile beforehand." 1>&2; exit 1; }
                fi
        fi
fi
echo $ac_n "checking getaddrinfo bug""... $ac_c" 1>&6
echo "configure:5462: checking getaddrinfo bug" >&5
if test "$cross_compiling" = yes; then
  echo "$ac_t""buggy" 1>&6
buggygetaddrinfo=yes
else
  cat > conftest.$ac_ext <<EOF
#line 5468 "configure"
#include "confdefs.h"

#include <sys/types.h>
#include <netdb.h>
#include <string.h>
#include <sys/socket.h>
#include <netinet/in.h>

main()
{
  int passive, gaierr, inet4 = 0, inet6 = 0;
  struct addrinfo hints, *ai, *aitop;
  char straddr[INET6_ADDRSTRLEN], strport[16];

  for (passive = 0; passive <= 1; passive++) {
    memset(&hints, 0, sizeof(hints));
    hints.ai_family = AF_UNSPEC;
    hints.ai_flags = passive ? AI_PASSIVE : 0;
    hints.ai_socktype = SOCK_STREAM;
    if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
      (void)gai_strerror(gaierr);
      goto bad;
    }
    for (ai = aitop; ai; ai = ai->ai_next) {
      if (ai->ai_addr == NULL ||
          ai->ai_addrlen == 0 ||
          getnameinfo(ai->ai_addr, ai->ai_addrlen,
                      straddr, sizeof(straddr), strport, sizeof(strport),
                      NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
        goto bad;
      }
      switch (ai->ai_family) {
      case AF_INET:
        if (strcmp(strport, "54321") != 0) {
          goto bad;
        }
        if (passive) {
          if (strcmp(straddr, "0.0.0.0") != 0) {
            goto bad;
          }
        } else {
          if (strcmp(straddr, "127.0.0.1") != 0) {
            goto bad;
          }
        }
        inet4++;
        break;
      case AF_INET6:
        if (strcmp(strport, "54321") != 0) {
          goto bad;
        }
        if (passive) {
          if (strcmp(straddr, "::") != 0) {
            goto bad;
          }
        } else {
          if (strcmp(straddr, "::1") != 0) {
            goto bad;
          }
        }
        inet6++;
        break;
      case AF_UNSPEC:
        goto bad;
        break;
      default:
        /* another family support? */
        break;
      }
    }
  }

  if (inet4 != 0 && inet4 != 2)
    goto bad;
  if (inet6 != 0 && inet6 != 2)
    goto bad;

  if (aitop)
    freeaddrinfo(aitop);
  exit(0);

 bad:
  if (aitop)
    freeaddrinfo(aitop);
  exit(1);
}

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

fi

if test "x$buggygetaddrinfo" = "xyes"; then
        if test "x$ipv6" = "xyes" -a "x$ipv6type" != "xlinux"; then
                { echo "configure: error: Fatal: You must get working getaddrinfo() function." 1>&2; exit 1; }
                { echo "configure: error: or you can specify "--disable-ipv6"." 1>&2; exit 1; }
                exit 1
        elif test "x$ipv6type" = "xlinux"; then
                { echo "configure: error: Warning: getaddrinfo() implementation on your system seems be buggy." 1>&2; exit 1; }
                { echo "configure: error: Better upgreade your system library to newest version" 1>&2; exit 1; }
                { echo "configure: error:          of GNU C library (aka glibc)." 1>&2; exit 1; }
        fi
fi

echo $ac_n "checking for struct sockaddr's sa_len""... $ac_c" 1>&6
echo "configure:5586: checking for struct sockaddr's sa_len" >&5
cat > conftest.$ac_ext <<EOF
#line 5588 "configure"
#include "confdefs.h"

#include <sys/types.h>
#include <sys/socket.h>

int main() {

  struct sockaddr sa;
  int i;

  i = sa.sa_len;
  exit(0);

; return 0; }
EOF
if { (eval echo configure:5604: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  cat >> confdefs.h <<\EOF
#define HAVE_SOCKADDR_SA_LEN 1
EOF

  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
fi
rm -f conftest*

echo $ac_n "checking whether to enable SSL""... $ac_c" 1>&6
echo "configure:5620: checking whether to enable SSL" >&5
# Check whether --with-ssl or --without-ssl was given.
if test "${with_ssl+set}" = set; then
  withval="$with_ssl"
   case "$withval" in
  no)  echo "$ac_t""no" 1>&6
       ;;		
  *) echo "$ac_t""yes" 1>&6
     olibs="$LIBS"
     ocflags="$CFLAGS"
     if test "x$withval" = "xyes";
     then
       gnutls_prefix=""
     else
       gnutls_prefix="$withval"
     fi
     echo $ac_n "checking for GNU TLS""... $ac_c" 1>&6
echo "configure:5637: checking for GNU TLS" >&5
     pkg-config --exists gnutls >/dev/null 2>&1
     if test $? -ne 0;
     then
         echo "$ac_t""no" 1>&6
         ssl=no
     else
         if test -d "$gnutls_prefix/include" -a -n "$gnutls_prefix"; then
           CFLAGS="-I$gnutls_prefix/include"
         else
           CFLAGS="$ocflags `pkg-config --cflags gnutls`"
         fi
         if test -d "$gnutls_prefix/lib" -a -n "$gnutls_prefix"; then
           LIBS="$olibs -L$gnutls_prefix/lib -lgnutls"
         else
           LIBS="$olibs `pkg-config --libs gnutls`"
         fi
         cat > conftest.$ac_ext <<EOF
#line 5655 "configure"
#include "confdefs.h"

#include <gnutls/gnutls.h>
    
int main() {
 gnutls_check_version(NULL); 
; return 0; }
EOF
if { (eval echo configure:5664: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
   echo "$ac_t""yes" 1>&6
         cat >> confdefs.h <<\EOF
#define HAVE_SSL 1
EOF

         ssl=yes 
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
   echo "$ac_t""no" 1>&6
         LIBS="$olibs"
         CFLAGS="$ocflags"
         ssl=no 
fi
rm -f conftest*
    fi
  esac 
else
  echo "$ac_t""no" 1>&6

fi


echo $ac_n "checking whether to enable OpenSSL""... $ac_c" 1>&6
echo "configure:5691: checking whether to enable OpenSSL" >&5
if test "x$ssl" = "xyes"; then
echo "$ac_t""no (you enabled GNU TLS support)" 1>&6
else
# Check whether --with-openssl or --without-openssl was given.
if test "${with_openssl+set}" = set; then
  withval="$with_openssl"
   case "$withval" in
  no)  echo "$ac_t""no" 1>&6
       ;;		
  *) echo "$ac_t""yes" 1>&6
     olibs="$LIBS"
     ocflags="$CFLAGS"
     if test "x$withval" = "xyes";
     then
       openssl_prefix=""
     else
       openssl_prefix="$withval"
     fi
     echo $ac_n "checking for OpenSSL""... $ac_c" 1>&6
echo "configure:5711: checking for OpenSSL" >&5
     if test -d "$openssl_prefix/include" -a -n "$openssl_prefix"; then
       CFLAGS="-I$openssl_prefix/include $CFLAGS"
     fi
     if test -d "$openssl_prefix/lib" -a -n "$openssl_prefix"; then
       LIBS="-L$openssl_prefix/lib $LIBS -lssl -lcrypto"
     else
       LIBS="$LIBS -lssl -lcrypto"
     fi
     cat > conftest.$ac_ext <<EOF
#line 5721 "configure"
#include "confdefs.h"

#include <openssl/opensslv.h>

int main() {
 return OPENSSL_VERSION_NUMBER; 
; return 0; }
EOF
if { (eval echo configure:5730: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
   echo "$ac_t""yes" 1>&6
     cat >> confdefs.h <<\EOF
#define HAVE_OPENSSL 1
EOF

     openssl=yes 
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
   echo "$ac_t""no" 1>&6
     LIBS="$olibs"
     CFLAGS="$ocflags"
     openssl=no 
fi
rm -f conftest*
     ;;
  esac 
else
  echo "$ac_t""no" 1>&6

fi

fi

echo $ac_n "checking whether to enable regexp support""... $ac_c" 1>&6
echo "configure:5758: checking whether to enable regexp support" >&5
# Check whether --enable-regexp or --disable-regexp was given.
if test "${enable_regexp+set}" = set; then
  enableval="$enable_regexp"
   case "$enableval" in
  yes) cat > conftest.$ac_ext <<EOF
#line 5764 "configure"
#include "confdefs.h"

#include <sys/types.h>
#include <regex.h>

int main() {
 int rc;
       regex_t preg;
       rc = regcomp(&preg, "blah", REG_EXTENDED);
       if (rc != 0) return 1;
       else return 0; 
; return 0; }
EOF
if { (eval echo configure:5778: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
   echo "$ac_t""yes" 1>&6
     cat >> confdefs.h <<\EOF
#define HAVE_REGCOMP 1
EOF

     regexp=yes 
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
   echo "$ac_t""no" 1>&6
     LIBS="$ac_save_LIBS"
     regexp=no 
fi
rm -f conftest*
     ;;
  esac 
fi

if test "x$regexp" = "xno" -o "x$regexp" = "x" ; then
    echo "$ac_t""no" 1>&6
    regexp=no
fi

echo $ac_n "checking whether to enable FiSH support""... $ac_c" 1>&6
echo "configure:5805: checking whether to enable FiSH support" >&5
# Check whether --enable-fish or --disable-fish was given.
if test "${enable_fish+set}" = set; then
  enableval="$enable_fish"
   case "$enableval" in
  yes) olibs="$LIBS"
       LIBS="$LIBS -lgmp"
       cat > conftest.$ac_ext <<EOF
#line 5813 "configure"
#include "confdefs.h"

#include <sys/types.h>
#include <gmp.h>

int main() {
 int rc;
       mpz_t val;
       mpz_init(val);
       return 0; 
; return 0; }
EOF
if { (eval echo configure:5826: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
   echo "$ac_t""yes" 1>&6
     cat >> confdefs.h <<\EOF
#define HAVE_GMP 1
EOF

     fish=yes 
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
   LIBS="$olibs"
       fish=no 
fi
rm -f conftest*
     ;;
  esac 
fi

if test "x$fish" = "xno" -o "x$fish" = "x" ; then
    echo "$ac_t""no" 1>&6
    fish=no
fi

if test -n "$hpux"
then
	# HP-UX's pax is broken
	for ac_prog in tar cpio
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:5859: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_COPY_DIRECTORY'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$COPY_DIRECTORY"; then
  ac_cv_prog_COPY_DIRECTORY="$COPY_DIRECTORY" # 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_COPY_DIRECTORY="$ac_prog"
      break
    fi
  done
  IFS="$ac_save_ifs"
fi
fi
COPY_DIRECTORY="$ac_cv_prog_COPY_DIRECTORY"
if test -n "$COPY_DIRECTORY"; then
  echo "$ac_t""$COPY_DIRECTORY" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

test -n "$COPY_DIRECTORY" && break
done

else
	for ac_prog in pax tar cpio
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:5894: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_COPY_DIRECTORY'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$COPY_DIRECTORY"; then
  ac_cv_prog_COPY_DIRECTORY="$COPY_DIRECTORY" # 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_COPY_DIRECTORY="$ac_prog"
      break
    fi
  done
  IFS="$ac_save_ifs"
fi
fi
COPY_DIRECTORY="$ac_cv_prog_COPY_DIRECTORY"
if test -n "$COPY_DIRECTORY"; then
  echo "$ac_t""$COPY_DIRECTORY" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

test -n "$COPY_DIRECTORY" && break
done

fi
if test "x$COPY_DIRECTORY" = "xpax";
then
    INSTALL_HELP_CMD='cd help; pax -r -w -s ";.*/\.?CVS$$;;" -s ";.*/\.?CVS/.*;;" . $(DESTDIR)/$(HELP_DIR)'
else
    if test "x$COPY_DIRECTORY" = "xtar";
    then
	INSTALL_HELP_CMD='cd help; tar -cf - . | ( cd $(DESTDIR)/$(HELP_DIR); tar -xf - )'
    else
	if test "x$COPY_DIRECTORY" = "xcpio";
	then
	    INSTALL_HELP_CMD='cd help; find . -print | cpio -pdu $(DESTDIR)/$(HELP_DIR)'
	else
	    INSTALL_HELP_CMD="@echo \"I couldn't figure out a way to install the help files.\""
	fi
    fi
fi

if test "x$COPY_DIRECTORY" = "xpax";
then
    INSTALL_TRANSLATION_CMD='cd translation; pax -r -w -s ";.*/\.?CVS$$;;" -s ";.*/\.?CVS/.*;;" . $(DESTDIR)/$(TRANS_PATH)'
else
    if test "x$COPY_DIRECTORY" = "xtar";
    then
	INSTALL_TRANSLATION_CMD='cd translation; tar -cf - . | ( cd $(DESTDIR)/$(TRANS_PATH); tar -xf - )'
    else
	if test "x$COPY_DIRECTORY" = "xcpio";
	then
	    INSTALL_TRANSLATION_CMD='cd translation; find . -print | cpio -pdu $(DESTDIR)/$(TRANS_PATH)'
	else
	    INSTALL_TRANSLATION_CMD="@echo \"I couldn't figure out a way to install the translation files.\""
	fi
    fi
fi


for ac_prog in gzcat zcat gunzip gzip uncompress uncompress
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:5964: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_ZCAT'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$ZCAT"; then
  ac_cv_prog_ZCAT="$ZCAT" # 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_ZCAT="$ac_prog"
      break
    fi
  done
  IFS="$ac_save_ifs"
fi
fi
ZCAT="$ac_cv_prog_ZCAT"
if test -n "$ZCAT"; then
  echo "$ac_t""$ZCAT" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

test -n "$ZCAT" && break
done

case "x$ZCAT" in
  xgzcat)
    ZSUFFIX=".gz"
    ZARGS=
    ;;
  xzcat)
    ZSUFFIX=".Z"
    ZARGS=
    ;;
  xgunzip)
    ZSUFFIX=".gz"
    ZARGS="-c"
    ;;
  xgzip)
    ZSUFFIX=".gz"
    ZARGS="-dc"
    ;;
  xuncompress)
    ZSUFFIX=".Z"
    ZARGS="-c"
    ;;
  xcompress)
    ZSUFFIX=".Z"
    ZARGS="-dc"
    ;;
esac
cat >> confdefs.h <<EOF
#define ZCAT "$ZCAT"
EOF

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

if test x"$ZARGS" != x; then
  cat >> confdefs.h <<EOF
#define ZARGS "$ZARGS"
EOF

fi

if test x/usr/sbin:/usr/lib:/usr/ucblib = x; then _PATH=$PATH; else _PATH=/usr/sbin:/usr/lib:/usr/ucblib; fi
if test -z "$SENDMAIL"; then
  # Extract the first word of `sendmail', so it can be a program name with args.
  set dummy sendmail; word=$2
  echo $ac_n "checking for $word""... $ac_c" 1>&6
echo "configure:6039: checking for $word" >&5
  IFS="${IFS= 	}"; saveifs="$IFS"; IFS="${IFS}:"
  for dir in $_PATH; do
    test -z "$dir" && dir=.
    if test -f $dir/$word; then
      SENDMAIL=$dir/$word
      break
    fi
  done
  IFS="$saveifs"
fi
echo "$ac_t""$SENDMAIL" 1>&6




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 ircbug 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%@CATEGORIES@%$CATEGORIES%g
s%@CC@%$CC%g
s%@CPP@%$CPP%g
s%@srcdir@%$srcdir%g
s%@objdir@%$objdir%g
s%@EXTRA_OBJECTS@%$EXTRA_OBJECTS%g
s%@EXTRA_SOURCES@%$EXTRA_SOURCES%g
s%@IRCLIB@%$IRCLIB%g
s%@COPY_DIRECTORY@%$COPY_DIRECTORY%g
s%@INSTALL_HELP_CMD@%$INSTALL_HELP_CMD%g
s%@INSTALL_TRANSLATION_CMD@%$INSTALL_TRANSLATION_CMD%g
s%@ZCAT@%$ZCAT%g
s%@SENDMAIL@%$SENDMAIL%g
s%@RM@%$RM%g
s%@LN@%$LN%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 ircbug"}
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 config.h; then
#  cp ${srcdir}/include/config.h.dist config.h
#fi

echo
echo well there we are, you now might want to look in config.h and 
echo see if there is anything you might want to tune, else you can
echo just run a make here..  good luck!
echo

