#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by Autoconf 2.52.20181006.
#
# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
# Free Software Foundation, Inc.
# This configure script is free software; the Free Software Foundation
# gives unlimited permission to copy, distribute and modify it.

# Avoid depending upon Character Ranges.
as_cr_letters='abcdefghijklmnopqrstuvwxyz'
as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
as_cr_Letters=$as_cr_letters$as_cr_LETTERS
as_cr_digits='0123456789'
as_cr_alnum=$as_cr_Letters$as_cr_digits

# Sed expression to map a string onto a valid variable name.
as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"

# Sed expression to map a string onto a valid CPP name.
as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"

# Be Bourne compatible
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
  emulate sh
  NULLCMD=:
elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
  set -o posix
fi

# Name of the executable.
as_me=`echo "$0" |sed 's,.*[\\/],,'`

if expr a : '\(a\)' >/dev/null 2>&1; then
  as_expr=expr
else
  as_expr=false
fi

rm -f conf$$ conf$$.exe conf$$.file
echo >conf$$.file
if ln -s conf$$.file conf$$ 2>/dev/null; then
  # We could just check for DJGPP; but this test a) works b) is more generic
  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
  if test -f conf$$.exe; then
    # Don't use ln at all; we don't have any links
    as_ln_s='cp -p'
  else
    as_ln_s='ln -s'
  fi
elif ln conf$$.file conf$$ 2>/dev/null; then
  as_ln_s=ln
else
  as_ln_s='cp -p'
fi
rm -f conf$$ conf$$.exe conf$$.file

as_executable_p="test -f"

# Support unset when possible.
if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
  as_unset=unset
else
  as_unset=false
fi

# NLS nuisances.
$as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
$as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
$as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
$as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
$as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
$as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
$as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
$as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }

# IFS
# We need space, tab and new line, in precisely that order.
as_nl='
'
IFS=" 	$as_nl"

# CDPATH.
$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }

# Name of the host.
# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
# so uname gets run too.
ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`

exec 6>&1

#
# Initializations.
#
ac_default_prefix=/usr/local
cross_compiling=no
subdirs=
MFLAGS= MAKEFLAGS=
SHELL=${CONFIG_SHELL-/bin/sh}

# Maximum number of lines to put in a shell here document.
# This variable seems obsolete.  It should probably be removed, and
# only ac_max_sed_lines should be used.
: ${ac_max_here_lines=38}

ac_unique_file="include/tin.h"
ac_default_prefix=/usr/local
# Factoring default headers for most tests.
ac_includes_default="\
#include <stdio.h>
#if HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#if HAVE_SYS_STAT_H
# include <sys/stat.h>
#endif
#if STDC_HEADERS
# include <stdlib.h>
# include <stddef.h>
#else
# if HAVE_STDLIB_H
#  include <stdlib.h>
# endif
#endif
#if HAVE_STRING_H
# if !STDC_HEADERS && HAVE_MEMORY_H
#  include <memory.h>
# endif
# include <string.h>
#endif
#if HAVE_STRINGS_H
# include <strings.h>
#endif
#if HAVE_INTTYPES_H
# include <inttypes.h>
#else
# if HAVE_STDINT_H
#  include <stdint.h>
# endif
#endif
#if HAVE_UNISTD_H
# include <unistd.h>
#endif"

# Initialize some variables set by options.
ac_init_help=
ac_init_version=false
# The variables have the same names as the options, with
# dashes changed to underlines.
cache_file=/dev/null
exec_prefix=NONE
no_create=
no_recursion=
prefix=NONE
program_prefix=NONE
program_suffix=NONE
program_transform_name=s,x,x,
silent=
site=
srcdir=
verbose=
x_includes=NONE
x_libraries=NONE

# Installation directory options.
# These are left unexpanded so users can "make install exec_prefix=/foo"
# and all the variables that are supposed to be based on exec_prefix
# by default will actually change.
# Use braces instead of parens because sh, perl, etc. also accept them.
bindir='${exec_prefix}/bin'
sbindir='${exec_prefix}/sbin'
libexecdir='${exec_prefix}/libexec'
datarootdir='${prefix}/share'
datadir='${datarootdir}'
sysconfdir='${prefix}/etc'
sharedstatedir='${prefix}/com'
localstatedir='${prefix}/var'
runstatedir='${localstatedir}/run'
libdir='${exec_prefix}/lib'
includedir='${prefix}/include'
oldincludedir='/usr/include'
infodir='${datarootdir}/info'
mandir='${datarootdir}/man'

# Identity of this package.
PACKAGE_NAME=
PACKAGE_TARNAME=
PACKAGE_VERSION=
PACKAGE_STRING=
PACKAGE_BUGREPORT=

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

  ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`

  # 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_alias ;;
  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
    build_alias=$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 ;;

  --config-cache | -C)
    cache_file=config.cache ;;

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

  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
  | --dataroo | --dataro | --datar)
    ac_prev=datarootdir ;;
  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
    datarootdir=$ac_optarg ;;

  -disable-* | --disable-*)
    ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
    # Reject names that are not valid shell variable names.
    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
   { (exit 1); exit 1; }; }
    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
    eval "enable_$ac_feature=no" ;;

  -enable-* | --enable-*)
    ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
    # Reject names that are not valid shell variable names.
    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
   { (exit 1); exit 1; }; }
    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
    case $ac_option in
      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
      *) 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 | -h)
    ac_init_help=long ;;
  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
    ac_init_help=recursive ;;
  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
    ac_init_help=short ;;

  -host | --host | --hos | --ho)
    ac_prev=host_alias ;;
  -host=* | --host=* | --hos=* | --ho=*)
    host_alias=$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 ;;

  -runstatedir | --runstatedir | --runstatedi | --runstated \
  | --runstate | --runstat | --runsta | --runst \
  | --runs | --run | --ru)
    ac_prev=runstatedir ;;
  -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
  | --runstate=* | --runstat=* | --runsta=* | --runst=* \
  | --runs=* | --run=* | --ru=*)
    runstatedir=$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_alias ;;
  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
    target_alias=$ac_optarg ;;

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

  -version | --version | --versio | --versi | --vers | -V)
    ac_init_version=: ;;

  -with-* | --with-*)
    ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
    # Reject names that are not valid shell variable names.
    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
      { echo "$as_me: error: invalid package name: $ac_package" >&2
   { (exit 1); exit 1; }; }
    ac_package=`echo $ac_package| sed 's/-/_/g'`
    case $ac_option in
      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
      *) ac_optarg=yes ;;
    esac
    eval "with_$ac_package='$ac_optarg'" ;;

  -without-* | --without-*)
    ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
    # Reject names that are not valid shell variable names.
    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
      { echo "$as_me: error: invalid package name: $ac_package" >&2
   { (exit 1); exit 1; }; }
    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 "$as_me: error: unrecognized option: $ac_option
Try \`$0 --help' for more information." >&2
   { (exit 1); exit 1; }; }
    ;;

  *=*)
    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
    # Reject names that are not valid shell variable names.
    expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
      { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
   { (exit 1); exit 1; }; }
    ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
    eval "$ac_envvar='$ac_optarg'"
    export $ac_envvar ;;

  *)
    # FIXME: should be removed in autoconf 3.0.
    echo "$as_me: WARNING: you should use --build, --host, --target" >&2
    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
      echo "$as_me: WARNING: invalid host type: $ac_option" >&2
    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
    ;;

  esac
done

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

# Be sure to have absolute paths.
for ac_var in exec_prefix prefix
do
  eval ac_val=$`echo $ac_var`
  case $ac_val in
    [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
    *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
   { (exit 1); exit 1; }; };;
  esac
done

# Be sure to have absolute paths.
for ac_var in bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir \
              localstatedir libdir includedir oldincludedir infodir mandir
do
  eval ac_val=$`echo $ac_var`
  case $ac_val in
    [\\/$]* | ?:[\\/]* ) ;;
    *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
   { (exit 1); exit 1; }; };;
  esac
done

# There might be people who depend on the old broken behavior: `$host'
# used to hold the argument of --host etc.
build=$build_alias
host=$host_alias
target=$target_alias

# FIXME: should be removed in autoconf 3.0.
if test "x$host_alias" != x; then
  if test "x$build_alias" = x; then
    cross_compiling=maybe
    echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
    If a cross compiler is detected then cross compile mode will be used." >&2
  elif test "x$build_alias" != "x$host_alias"; then
    cross_compiling=yes
  fi
fi

ac_tool_prefix=
test -n "$host_alias" && ac_tool_prefix=$host_alias-

test "$silent" = yes && exec 6>/dev/null

# 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 "$as_me: error: cannot find sources in $ac_confdir or .." >&2
   { (exit 1); exit 1; }; }
  else
    { echo "$as_me: error: cannot find sources in $srcdir" >&2
   { (exit 1); exit 1; }; }
  fi
fi
srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
ac_env_build_alias_set=${build_alias+set}
ac_env_build_alias_value=$build_alias
ac_cv_env_build_alias_set=${build_alias+set}
ac_cv_env_build_alias_value=$build_alias
ac_env_host_alias_set=${host_alias+set}
ac_env_host_alias_value=$host_alias
ac_cv_env_host_alias_set=${host_alias+set}
ac_cv_env_host_alias_value=$host_alias
ac_env_target_alias_set=${target_alias+set}
ac_env_target_alias_value=$target_alias
ac_cv_env_target_alias_set=${target_alias+set}
ac_cv_env_target_alias_value=$target_alias
ac_env_CC_set=${CC+set}
ac_env_CC_value=$CC
ac_cv_env_CC_set=${CC+set}
ac_cv_env_CC_value=$CC
ac_env_CFLAGS_set=${CFLAGS+set}
ac_env_CFLAGS_value=$CFLAGS
ac_cv_env_CFLAGS_set=${CFLAGS+set}
ac_cv_env_CFLAGS_value=$CFLAGS
ac_env_LDFLAGS_set=${LDFLAGS+set}
ac_env_LDFLAGS_value=$LDFLAGS
ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
ac_cv_env_LDFLAGS_value=$LDFLAGS
ac_env_CPPFLAGS_set=${CPPFLAGS+set}
ac_env_CPPFLAGS_value=$CPPFLAGS
ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
ac_cv_env_CPPFLAGS_value=$CPPFLAGS
ac_env_CPP_set=${CPP+set}
ac_env_CPP_value=$CPP
ac_cv_env_CPP_set=${CPP+set}
ac_cv_env_CPP_value=$CPP

#
# Report the --help message.
#
if test "$ac_init_help" = "long"; then
  # 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
\`configure' configures this package to adapt to many kinds of systems.

Usage: $0 [OPTION]... [VAR=VALUE]...

To assign environment variables (e.g., CC, CFLAGS...), specify them as
VAR=VALUE.  See below for descriptions of some of the useful variables.

Defaults for the options are specified in brackets.

Configuration:
  -h, --help              display this help and exit
      --help=short        display options specific to this package
      --help=recursive    display the short help of all the included packages
  -V, --version           display version information and exit
  -q, --quiet, --silent   do not print \`checking...' messages
      --cache-file=FILE   cache test results in FILE [disabled]
  -C, --config-cache      alias for \`--cache-file=config.cache'
  -n, --no-create         do not create output files
      --srcdir=DIR        find the sources in DIR [configure dir or \`..']

EOF

  cat <<EOF
Installation directories:
  --prefix=PREFIX         install architecture-independent files in PREFIX
                          [$ac_default_prefix]
  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
                          [PREFIX]

By default, \`make install' will install all the files in
\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
an installation prefix other than \`$ac_default_prefix' using \`--prefix',
for instance \`--prefix=\$HOME'.

For better control, use the options below.

Fine tuning of the installation directories:
  --bindir=DIR            user executables [EPREFIX/bin]
  --sbindir=DIR           system admin executables [EPREFIX/sbin]
  --libexecdir=DIR        program executables [EPREFIX/libexec]
  --datarootdir=DIR       read-only architecture-independent data [PREFIX/share]
  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
  --runstatedir=DIR       extra definition of runtime data [LOCALSTATEDIR/run]
  --libdir=DIR            object code libraries [EPREFIX/lib]
  --includedir=DIR        C header files [PREFIX/include]
  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
  --infodir=DIR           info documentation [DATAROOTDIR/info]
  --mandir=DIR            man documentation [DATAROOTDIR/man]
EOF

  cat <<\EOF

Program names:
  --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

X features:
  --x-includes=DIR    X include files are in DIR
  --x-libraries=DIR   X library files are in DIR

System types:
  --build=BUILD           configure for building on BUILD [guessed]
  --host=HOST       build programs to run on HOST [BUILD]
EOF
fi

if test -n "$ac_init_help"; then

  cat <<\EOF

Optional Packages:
  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)

Optional Features:
  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]

  --with-install-prefix   prefixes actual install location (default: /)
  --with-build-cc=XXX     the build C compiler ($BUILD_CC)
  --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
  --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
  --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
  --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
  --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
  --disable-heapsort      disable heapsort() as alternative to qsort
  --with-ispell           (default: from system path)
  --with-metamail         (default: from system path)
  --with-sum              (default: from system path)
  --with-editor=PROG      specify editor (default: vi)
  --with-mailer=PROG      specify default mailer-program (default: mailx)
  --with-mailbox=DIR      directory for incoming mailboxes (default: empty)
  --disable-pgp-gpg       disable PGP/GPG Support
  --with-pgp              (default: from system path)
  --with-pgpk             (default: from system path)
  --with-gpg              (default: from system path)
  --with-slrnface         (default: from system path)
  --with-shell=PROG       default $SHELL program (default: sh)
  --disable-nntp          disable reading via NNTP
  --enable-nntp-only      enable reading via NNTP only
  --enable-debug          turn on debug support
  --disable-echo          do not display "compiling" commands
  --enable-prototypes     check for optional prototypes
  --enable-warnings       turn on GCC compiler warnings
  --with-libdir=PATH      news-library (default: /usr/lib/news)
  --with-spooldir=PATH    news spool-directory (default: /var/spool/news)
  --with-nov-dir=PATH     news overview-directory (default: $SPOOLDIR)
  --with-nov-fname        specify names of overview files (default: .overview)
  --with-inews-dir=PATH   directory containing "inews" (default: $INEWSPATH)
  --with-socks=path       link with socks library if available
  --with-socks5=path      link with socks5 library if available
  --disable-fcntl         disable fcntl() locking
  --enable-lockf          enable lockf() locking
  --enable-flock          enable flock() locking
  --with-screen=xxx       specify screen type, which must be one of:
                          termcap, terminfo, curses, ncurses, ncursesw, or
                          pdcurses (replaces options --enable-curses and
                          --with-ncurses)
  --with-curses-dir=DIR   directory in which (n)curses is installed
  --with-ncurses          link with ncurses if available (deprecated)
  --enable-curses         use curses interface (deprecated)
  --with-pkg-config{=path} enable/disable use of pkg-config
  --with-pcre=PATH        use installed pcre versus bundled
  --with-dbmalloc         test: use Conor Cahill's dbmalloc library
  --with-dmalloc          test: use Gray Watson's dmalloc library
  --with-trace            use debugging/traces for screen output
  --with-domain-name      sets $DOMAIN_NAME (default: empty)
  --with-nntp-default-server
                          (sets NNTP_DEFAULT_SERVER)
                          (default: news.$DOMAIN_NAME)
  --enable-mh-mail-handling
                          use MH style mail handling for mailgroups
  --enable-cancel-locks   enable creation of Cancel-Locks
  --disable-gsasl         don't use GNU SASL
  --disable-8bit-keys     disable 8-bit keycode support
  --disable-color         disable ANSI-color support
  --disable-etiquette     disable printing of posting-etiquette
  --disable-break-long-lines
                          don't break long mime-encoded lines
  --disable-mime-strict-charset
                          force MM_CHARSET obeyance
  --with-mime-default-charset=CHARSET
                          fallback for $MM_CHARSET (default: US-ASCII)
  --with-iso-to-ascii     ISO -> ASCII conversion (default: -1)
  --disable-locale        disable locale support
  --disable-posting       disable posting
  --disable-shell-escape  disable shell escape
  --enable-fascist-newsadmin
                          have fascist newsadmin
  --disable-inverse-video disable inverse video and highlighting
  --disable-piping        disable piping support
  --disable-printing      disable printer support
  --disable-append-pid    disable appending .pid to tmp-files
  --disable-xhdr-xref     disable XHDR XREF fallback
  --enable-broken-listgroup-fix
                          send extra GROUP command before LISTGROUP
  --enable-broken-system-fix
                          ignore system()s return value
  --with-defaults-dir=PATH
                          directory containing tin.defaults file
                          (default: /etc/tin)
  --disable-ipv6          disable IPv6 support (default: enabled)
  --enable-long-article-numbers
                          enable long article numbers (default: disabled)
  --with-coffee           coffee support
  --with-libiconv-prefix=DIR
                          search for libiconv in DIR/include and DIR/lib
  --disable-nls           do not use Native Language Support
  --with-included-gettext use the GNU gettext library included here
  --with-textdomain=PKG   NLS text-domain (default is package name)
  --disable-included-msgs use included messages, for i18n support
  --with-Xaw3d            link with Xaw 3d library
  --with-Xaw3dxft         link with Xaw 3d xft library
  --with-neXtaw           link with neXT Athena library
  --with-XawPlus          link with Athena-Plus library
  --with-x                use the X Window System

Some influential environment variables:
  CC          C compiler command
  CFLAGS      C compiler flags
  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
              nonstandard directory <lib dir>
  CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
              headers in a nonstandard directory <include dir>
  CPP         C preprocessor

Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.

EOF
fi

if test "$ac_init_help" = "recursive"; then
  # If there are subdirs, report their specific --help.
  ac_popdir=`pwd`
  for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
    cd $ac_subdir
    # A "../" for each directory in /$ac_subdir.
    ac_dots=`echo $ac_subdir |
             sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`

    case $srcdir in
    .) # No --srcdir option.  We are building in place.
      ac_sub_srcdir=$srcdir ;;
    [\\/]* | ?:[\\/]* ) # Absolute path.
      ac_sub_srcdir=$srcdir/$ac_subdir ;;
    *) # Relative path.
      ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
    esac

    # Check for guested configure; otherwise get Cygnus style configure.
    if test -f $ac_sub_srcdir/configure.gnu; then
      echo
      $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
    elif test -f $ac_sub_srcdir/configure; then
      echo
      $SHELL $ac_sub_srcdir/configure  --help=recursive
    elif test -f $ac_sub_srcdir/configure.ac ||
           test -f $ac_sub_srcdir/configure.in; then
      echo
      $ac_configure --help
    else
      echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
    fi
    cd $ac_popdir
  done
fi

test -n "$ac_init_help" && exit 0
if $ac_init_version; then
  cat <<\EOF

Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it.
EOF
  exit 0
fi
exec 5>config.log
cat >&5 <<EOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by $as_me, which was
generated by GNU Autoconf 2.52.20181006.  Invocation command line was

  $ $0 $@

EOF
{
cat <<_ASUNAME
## ---------- ##
## Platform.  ##
## ---------- ##

hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
uname -m = `(uname -m) 2>/dev/null || echo unknown`
uname -r = `(uname -r) 2>/dev/null || echo unknown`
uname -s = `(uname -s) 2>/dev/null || echo unknown`
uname -v = `(uname -v) 2>/dev/null || echo unknown`

/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`

/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`

PATH = $PATH

_ASUNAME
} >&5

cat >&5 <<EOF
## ------------ ##
## Core tests.  ##
## ------------ ##

EOF

# Keep a trace of the command line.
# Strip out --no-create and --no-recursion so they do not pile up.
# Also quote any args containing shell meta-characters.
ac_configure_args=
ac_sep=
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_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
    ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
    ac_sep=" " ;;
  *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
     ac_sep=" " ;;
  esac
  # Get rid of the leading space.
done

# When interrupted or exit'd, cleanup temporary files, and complete
# config.log.  We remove comments because anyway the quotes in there
# would cause problems or look ugly.
trap 'exit_status=$?
  # Save into config.log some information that might help in debugging.
  echo >&5
  echo "## ----------------- ##" >&5
  echo "## Cache variables.  ##" >&5
  echo "## ----------------- ##" >&5
  echo >&5
  # The following way of writing the cache mishandles newlines in values,
{
  (set) 2>&1 |
    case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
    *ac_space=\ *)
      sed -n \
        "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
    	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
      ;;
    *)
      sed -n \
        "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
      ;;
    esac;
} >&5
  sed "/^$/d" confdefs.h >conftest.log
  if test -s conftest.log; then
    echo >&5
    echo "## ------------ ##" >&5
    echo "## confdefs.h.  ##" >&5
    echo "## ------------ ##" >&5
    echo >&5
    cat conftest.log >&5
  fi
  (echo; echo) >&5
  test "$ac_signal" != 0 &&
    echo "$as_me: caught signal $ac_signal" >&5
  echo "$as_me: exit $exit_status" >&5
  rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
    exit $exit_status
     ' 0
for ac_signal in 1 2 13 15; do
  trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
done
ac_signal=0

# 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

# Let the site file select an alternate cache file if it wants to.
# 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 "$as_me:996: loading site script $ac_site_file" >&5
echo "$as_me: loading site script $ac_site_file" >&6;}
    cat "$ac_site_file" >&5
    . "$ac_site_file"
  fi
done

if test -r "$cache_file"; then
  # Some versions of bash will fail to source /dev/null (special
  # files actually), so we avoid doing that.
  if test -f "$cache_file"; then
    { echo "$as_me:1007: loading cache $cache_file" >&5
echo "$as_me: loading cache $cache_file" >&6;}
    case $cache_file in
      [\\/]* | ?:[\\/]* ) . $cache_file;;
      *)                      . ./$cache_file;;
    esac
  fi
else
  { echo "$as_me:1015: creating cache $cache_file" >&5
echo "$as_me: creating cache $cache_file" >&6;}
  >$cache_file
fi

# Check that the precious variables saved in the cache have kept the same
# value.
ac_cache_corrupted=false
for ac_var in `(set) 2>&1 |
               sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
  eval ac_old_set=\$ac_cv_env_${ac_var}_set
  eval ac_new_set=\$ac_env_${ac_var}_set
  eval ac_old_val="\$ac_cv_env_${ac_var}_value"
  eval ac_new_val="\$ac_env_${ac_var}_value"
  case $ac_old_set,$ac_new_set in
    set,)
      { echo "$as_me:1031: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
      ac_cache_corrupted=: ;;
    ,set)
      { echo "$as_me:1035: error: \`$ac_var' was not set in the previous run" >&5
echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
      ac_cache_corrupted=: ;;
    ,);;
    *)
      if test "x$ac_old_val" != "x$ac_new_val"; then
        { echo "$as_me:1041: error: \`$ac_var' has changed since the previous run:" >&5
echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
        { echo "$as_me:1043:   former value:  $ac_old_val" >&5
echo "$as_me:   former value:  $ac_old_val" >&2;}
        { echo "$as_me:1045:   current value: $ac_new_val" >&5
echo "$as_me:   current value: $ac_new_val" >&2;}
        ac_cache_corrupted=:
      fi;;
  esac
  # Pass precious variables to config.status.  It doesn't matter if
  # we pass some twice (in addition to the command line arguments).
  if test "$ac_new_set" = set; then
    case $ac_new_val in
    *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
      ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
      ac_configure_args="$ac_configure_args '$ac_arg'"
      ;;
    *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
       ;;
    esac
  fi
done
if $ac_cache_corrupted; then
  { echo "$as_me:1064: error: changes in the environment can compromise the build" >&5
echo "$as_me: error: changes in the environment can compromise the build" >&2;}
  { { echo "$as_me:1066: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
   { (exit 1); exit 1; }; }
fi

ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
ac_main_return=return

case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
  *c*,-n*) ECHO_N= ECHO_C=	# newlines do not sed ;-) only broken shells would use this case anyway
		   ECHO_T='	' ;;
  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
  *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
esac
echo "#! $SHELL" >conftest.sh
echo  "exit 0"   >>conftest.sh
chmod +x conftest.sh
if { (echo "$as_me:1087: PATH=\".;.\"; conftest.sh") >&5
  (PATH=".;."; conftest.sh) 2>&5
  ac_status=$?
  echo "$as_me:1090: \$? = $ac_status" >&5
  (exit $ac_status); }; then
  ac_path_separator=';'
else
  ac_path_separator=:
fi
PATH_SEPARATOR="$ac_path_separator"
rm -f conftest.sh

ac_config_headers="$ac_config_headers include/autoconf.h:include/autoconf.hin"

PACKAGE=tin
VERSION=2.4.3
cat >>confdefs.h <<EOF
#define PACKAGE "$PACKAGE"
EOF

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

EXTRAO_DEP='#'

ac_aux_dir=
for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
  if test -f $ac_dir/install-sh; then
    ac_aux_dir=$ac_dir
    ac_install_sh="$ac_aux_dir/install-sh -c"
    break
  elif test -f $ac_dir/install.sh; then
    ac_aux_dir=$ac_dir
    ac_install_sh="$ac_aux_dir/install.sh -c"
    break
  elif test -f $ac_dir/shtool; then
    ac_aux_dir=$ac_dir
    ac_install_sh="$ac_aux_dir/shtool install -c"
    break
  fi
done
if test -z "$ac_aux_dir"; then
  { { echo "$as_me:1130: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
   { (exit 1); exit 1; }; }
fi
ac_config_guess="$SHELL $ac_aux_dir/config.guess"
ac_config_sub="$SHELL $ac_aux_dir/config.sub"
ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.

# Make sure we can run config.sub.
$ac_config_sub sun4 >/dev/null 2>&1 ||
  { { echo "$as_me:1140: error: cannot run $ac_config_sub" >&5
echo "$as_me: error: cannot run $ac_config_sub" >&2;}
   { (exit 1); exit 1; }; }

echo "$as_me:1144: checking build system type" >&5
echo $ECHO_N "checking build system type... $ECHO_C" >&6
if test "${ac_cv_build+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_cv_build_alias=$build_alias
test -z "$ac_cv_build_alias" &&
  ac_cv_build_alias=`$ac_config_guess`
test -z "$ac_cv_build_alias" &&
  { { echo "$as_me:1153: error: cannot guess build type; you must specify one" >&5
echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
   { (exit 1); exit 1; }; }
ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
  { { echo "$as_me:1157: error: $ac_config_sub $ac_cv_build_alias failed." >&5
echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
   { (exit 1); exit 1; }; }

fi
echo "$as_me:1162: result: $ac_cv_build" >&5
echo "${ECHO_T}$ac_cv_build" >&6
build=$ac_cv_build
build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`

if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
	echo "$as_me:1170: checking host system type" >&5
echo $ECHO_N "checking host system type... $ECHO_C" >&6
if test "${ac_cv_host+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_cv_host_alias=$host_alias
test -z "$ac_cv_host_alias" &&
  ac_cv_host_alias=$ac_cv_build_alias
ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
  { { echo "$as_me:1179: error: $ac_config_sub $ac_cv_host_alias failed" >&5
echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
   { (exit 1); exit 1; }; }

fi
echo "$as_me:1184: result: $ac_cv_host" >&5
echo "${ECHO_T}$ac_cv_host" >&6
host=$ac_cv_host
host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`

	system_name="$host_os"
else
	system_name="`(uname -s -r) 2>/dev/null`"
	if test -z "$system_name" ; then
		system_name="`(hostname) 2>/dev/null`"
	fi
fi
test -n "$system_name" &&
cat >>confdefs.h <<EOF
#define SYSTEM_NAME "$system_name"
EOF

if test "${cf_cv_system_name+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cf_cv_system_name="$system_name"
fi

test -z "$system_name" && system_name="$cf_cv_system_name"
test -n "$cf_cv_system_name" && echo "$as_me:1210: result: Configuring for $cf_cv_system_name" >&5
echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6

if test ".$system_name" != ".$cf_cv_system_name" ; then
	echo "$as_me:1214: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
	{ { echo "$as_me:1216: error: \"Please remove config.cache and try again.\"" >&5
echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
   { (exit 1); exit 1; }; }
fi

	echo "$as_me:1221: checking for PATH separator" >&5
echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
	case $cf_cv_system_name in
	(os2*)	PATH_SEPARATOR=';'  ;;
	(*)	${PATH_SEPARATOR:=':'}  ;;
	esac

	echo "$as_me:1228: result: $PATH_SEPARATOR" >&5
echo "${ECHO_T}$PATH_SEPARATOR" >&6

# Check whether --with-install-prefix or --without-install-prefix was given.
if test "${with_install_prefix+set}" = set; then
  withval="$with_install_prefix"

else
  withval="${DESTDIR:-/}"
fi; if true ; then

if test "x$prefix" != xNONE; then
	cf_path_syntax="$prefix"
else
	cf_path_syntax="$ac_default_prefix"
fi

case ".$withval" in
(.\$\(*\)*|.\'*\'*)
	;;
(..|./*|.\\*)
	;;
(.[a-zA-Z]:[\\/]*) # OS/2 EMX
	;;
(.\${*prefix}*|.\${*dir}*)
	eval withval="$withval"
	case ".$withval" in
	(.NONE/*)
		withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
		;;
	esac
	;;
(.no|.NONE/*)
	withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
	;;
(*)
	{ { echo "$as_me:1264: error: expected a pathname, not \"$withval\"" >&5
echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
   { (exit 1); exit 1; }; }
	;;
esac

fi
eval DESTDIR="$withval"

case ".$DESTDIR" in # (vi
./)	DESTDIR=
	;; # (vi
./*/)	;; # (vi
./*)	DESTDIR="$DESTDIR/"
	;;
esac

test "$program_prefix" != NONE &&
  program_transform_name="s,^,$program_prefix,;$program_transform_name"
# Use a double $ so make ignores it.
test "$program_suffix" != NONE &&
  program_transform_name="s,\$,$program_suffix,;$program_transform_name"
# Double any \ or $.  echo might interpret backslashes.
# By default was `s,x,x', remove it if useless.
cat <<\_ACEOF >conftest.sed
s/[\\$]/&&/g;s/;s,x,x,$//
_ACEOF
program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
rm conftest.sed

###	Compiler/options that autoconf doesn't get right
case "$host_os" in
	aix*)	#(vi
		if test "$CC" = ""; then
			# Extract the first word of "xlc", so it can be a program name with args.
set dummy xlc; ac_word=$2
echo "$as_me:1300: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_path_XLC+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $XLC in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_XLC="$XLC" # Let the user override the test with a path.
  ;;
  *)
  ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  if $as_executable_p "$ac_dir/$ac_word"; then
   ac_cv_path_XLC="$ac_dir/$ac_word"
   echo "$as_me:1317: found $ac_dir/$ac_word" >&5
   break
fi
done

  ;;
esac
fi
XLC=$ac_cv_path_XLC

if test -n "$XLC"; then
  echo "$as_me:1328: result: $XLC" >&5
echo "${ECHO_T}$XLC" >&6
else
  echo "$as_me:1331: result: no" >&5
echo "${ECHO_T}no" >&6
fi

			if test "$ac_cv_path_XLC" != ""; then
				CC="$ac_cv_path_XLC"
			fi
		fi
		;;
	hpux*)	#(vi
		test "$CC" != "cc" && test -z "$CFLAGS" && CFLAGS="-O"
		;;
esac

### Native Language Support
ALL_LINGUAS="da de en_GB es et fr ru sv tr zh_CN zh_TW"

### Checks for programs
save_CFLAGS="$CFLAGS"

ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
ac_main_return=return
if test -n "$ac_tool_prefix"; then
  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
set dummy ${ac_tool_prefix}gcc; ac_word=$2
echo "$as_me:1360: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_CC+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$CC"; then
  ac_cv_prog_CC="$CC" # Let the user override the test.
else
  ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  $as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_CC="${ac_tool_prefix}gcc"
echo "$as_me:1375: found $ac_dir/$ac_word" >&5
break
done

fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
  echo "$as_me:1383: result: $CC" >&5
echo "${ECHO_T}$CC" >&6
else
  echo "$as_me:1386: result: no" >&5
echo "${ECHO_T}no" >&6
fi

fi
if test -z "$ac_cv_prog_CC"; then
  ac_ct_CC=$CC
  # Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo "$as_me:1395: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_CC"; then
  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
else
  ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  $as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_ac_ct_CC="gcc"
echo "$as_me:1410: found $ac_dir/$ac_word" >&5
break
done

fi
fi
ac_ct_CC=$ac_cv_prog_ac_ct_CC
if test -n "$ac_ct_CC"; then
  echo "$as_me:1418: result: $ac_ct_CC" >&5
echo "${ECHO_T}$ac_ct_CC" >&6
else
  echo "$as_me:1421: result: no" >&5
echo "${ECHO_T}no" >&6
fi

  CC=$ac_ct_CC
else
  CC="$ac_cv_prog_CC"
fi

if test -z "$CC"; then
  if test -n "$ac_tool_prefix"; then
  # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
set dummy ${ac_tool_prefix}cc; ac_word=$2
echo "$as_me:1434: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_CC+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$CC"; then
  ac_cv_prog_CC="$CC" # Let the user override the test.
else
  ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  $as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_CC="${ac_tool_prefix}cc"
echo "$as_me:1449: found $ac_dir/$ac_word" >&5
break
done

fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
  echo "$as_me:1457: result: $CC" >&5
echo "${ECHO_T}$CC" >&6
else
  echo "$as_me:1460: result: no" >&5
echo "${ECHO_T}no" >&6
fi

fi
if test -z "$ac_cv_prog_CC"; then
  ac_ct_CC=$CC
  # Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
echo "$as_me:1469: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_CC"; then
  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
else
  ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  $as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_ac_ct_CC="cc"
echo "$as_me:1484: found $ac_dir/$ac_word" >&5
break
done

fi
fi
ac_ct_CC=$ac_cv_prog_ac_ct_CC
if test -n "$ac_ct_CC"; then
  echo "$as_me:1492: result: $ac_ct_CC" >&5
echo "${ECHO_T}$ac_ct_CC" >&6
else
  echo "$as_me:1495: result: no" >&5
echo "${ECHO_T}no" >&6
fi

  CC=$ac_ct_CC
else
  CC="$ac_cv_prog_CC"
fi

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 "$as_me:1508: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_CC+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$CC"; then
  ac_cv_prog_CC="$CC" # Let the user override the test.
else
  ac_prog_rejected=no
  ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  $as_executable_p "$ac_dir/$ac_word" || continue
if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
  ac_prog_rejected=yes
  continue
fi
ac_cv_prog_CC="cc"
echo "$as_me:1528: found $ac_dir/$ac_word" >&5
break
done

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 $# != 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" ${1+"$@"}
    shift
    ac_cv_prog_CC="$@"
  fi
fi
fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
  echo "$as_me:1550: result: $CC" >&5
echo "${ECHO_T}$CC" >&6
else
  echo "$as_me:1553: result: no" >&5
echo "${ECHO_T}no" >&6
fi

fi
if test -z "$CC"; then
  if test -n "$ac_tool_prefix"; then
  for ac_prog in cl
  do
    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
set dummy $ac_tool_prefix$ac_prog; ac_word=$2
echo "$as_me:1564: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_CC+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$CC"; then
  ac_cv_prog_CC="$CC" # Let the user override the test.
else
  ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  $as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
echo "$as_me:1579: found $ac_dir/$ac_word" >&5
break
done

fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
  echo "$as_me:1587: result: $CC" >&5
echo "${ECHO_T}$CC" >&6
else
  echo "$as_me:1590: result: no" >&5
echo "${ECHO_T}no" >&6
fi

    test -n "$CC" && break
  done
fi
if test -z "$CC"; then
  ac_ct_CC=$CC
  for ac_prog in cl
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 "$as_me:1603: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_CC"; then
  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
else
  ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  $as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_ac_ct_CC="$ac_prog"
echo "$as_me:1618: found $ac_dir/$ac_word" >&5
break
done

fi
fi
ac_ct_CC=$ac_cv_prog_ac_ct_CC
if test -n "$ac_ct_CC"; then
  echo "$as_me:1626: result: $ac_ct_CC" >&5
echo "${ECHO_T}$ac_ct_CC" >&6
else
  echo "$as_me:1629: result: no" >&5
echo "${ECHO_T}no" >&6
fi

  test -n "$ac_ct_CC" && break
done

  CC=$ac_ct_CC
fi

fi

test -z "$CC" && { { echo "$as_me:1641: error: no acceptable cc found in \$PATH" >&5
echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
   { (exit 1); exit 1; }; }

# Provide some information about the compiler.
echo "$as_me:1646:" \
     "checking for C compiler version" >&5
ac_compiler=`set X $ac_compile; echo $2`
{ (eval echo "$as_me:1649: \"$ac_compiler --version </dev/null >&5\"") >&5
  (eval $ac_compiler --version </dev/null >&5) 2>&5
  ac_status=$?
  echo "$as_me:1652: \$? = $ac_status" >&5
  (exit $ac_status); }
{ (eval echo "$as_me:1654: \"$ac_compiler -v </dev/null >&5\"") >&5
  (eval $ac_compiler -v </dev/null >&5) 2>&5
  ac_status=$?
  echo "$as_me:1657: \$? = $ac_status" >&5
  (exit $ac_status); }
{ (eval echo "$as_me:1659: \"$ac_compiler -V </dev/null >&5\"") >&5
  (eval $ac_compiler -V </dev/null >&5) 2>&5
  ac_status=$?
  echo "$as_me:1662: \$? = $ac_status" >&5
  (exit $ac_status); }

cat >conftest.$ac_ext <<_ACEOF
#line 1666 "configure"
#include "confdefs.h"

int
main (void)
{

  ;
  return 0;
}
_ACEOF
ac_clean_files_save=$ac_clean_files
ac_clean_files="$ac_clean_files a.out a.exe"
# Try to create an executable without -o first, disregard a.out.
# It will help us diagnose broken compilers, and finding out an intuition
# of exeext.
echo "$as_me:1682: checking for C compiler default output" >&5
echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
if { (eval echo "$as_me:1685: \"$ac_link_default\"") >&5
  (eval $ac_link_default) 2>&5
  ac_status=$?
  echo "$as_me:1688: \$? = $ac_status" >&5
  (exit $ac_status); }; then
  # Find the output, starting from the most likely.  This scheme is
# not robust to junk in `.', hence go to wildcards (a.*) only as a last
# resort.
for ac_file in `ls a.exe conftest.exe 2>/dev/null;
                ls a.out conftest 2>/dev/null;
                ls a.* conftest.* 2>/dev/null`; do
  case $ac_file in
    *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
    a.out ) # We found the default executable, but exeext='' is most
            # certainly right.
            break;;
    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
          # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
          export ac_cv_exeext
          break;;
    * ) break;;
  esac
done
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
{ { echo "$as_me:1711: error: C compiler cannot create executables" >&5
echo "$as_me: error: C compiler cannot create executables" >&2;}
   { (exit 77); exit 77; }; }
fi

ac_exeext=$ac_cv_exeext
echo "$as_me:1717: result: $ac_file" >&5
echo "${ECHO_T}$ac_file" >&6

# Check the compiler produces executables we can run.  If not, either
# the compiler is broken, or we cross compile.
echo "$as_me:1722: checking whether the C compiler works" >&5
echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
# If not cross compiling, check that we can run a simple program.
if test "$cross_compiling" != yes; then
  if { ac_try='./$ac_file'
  { (eval echo "$as_me:1728: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:1731: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
    cross_compiling=no
  else
    if test "$cross_compiling" = maybe; then
	cross_compiling=yes
    else
	{ { echo "$as_me:1738: error: cannot run C compiled programs.
If you meant to cross compile, use \`--host'." >&5
echo "$as_me: error: cannot run C compiled programs.
If you meant to cross compile, use \`--host'." >&2;}
   { (exit 1); exit 1; }; }
    fi
  fi
fi
echo "$as_me:1746: result: yes" >&5
echo "${ECHO_T}yes" >&6

rm -f a.out a.exe conftest$ac_cv_exeext
ac_clean_files=$ac_clean_files_save
# Check the compiler produces executables we can run.  If not, either
# the compiler is broken, or we cross compile.
echo "$as_me:1753: checking whether we are cross compiling" >&5
echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
echo "$as_me:1755: result: $cross_compiling" >&5
echo "${ECHO_T}$cross_compiling" >&6

echo "$as_me:1758: checking for executable suffix" >&5
echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
if { (eval echo "$as_me:1760: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:1763: \$? = $ac_status" >&5
  (exit $ac_status); }; then
  # If both `conftest.exe' and `conftest' are `present' (well, observable)
# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
# work properly (i.e., refer to `conftest.exe'), while it won't with
# `rm'.
for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
  case $ac_file in
    *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
          export ac_cv_exeext
          break;;
    * ) break;;
  esac
done
else
  { { echo "$as_me:1779: error: cannot compute EXEEXT: cannot compile and link" >&5
echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
   { (exit 1); exit 1; }; }
fi

rm -f conftest$ac_cv_exeext
echo "$as_me:1785: result: $ac_cv_exeext" >&5
echo "${ECHO_T}$ac_cv_exeext" >&6

rm -f conftest.$ac_ext
EXEEXT=$ac_cv_exeext
ac_exeext=$EXEEXT
echo "$as_me:1791: checking for object suffix" >&5
echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
if test "${ac_cv_objext+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 1797 "configure"
#include "confdefs.h"

int
main (void)
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.o conftest.obj
if { (eval echo "$as_me:1809: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:1812: \$? = $ac_status" >&5
  (exit $ac_status); }; then
  for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
  case $ac_file in
    *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
       break;;
  esac
done
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
{ { echo "$as_me:1824: error: cannot compute OBJEXT: cannot compile" >&5
echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
   { (exit 1); exit 1; }; }
fi

rm -f conftest.$ac_cv_objext conftest.$ac_ext
fi
echo "$as_me:1831: result: $ac_cv_objext" >&5
echo "${ECHO_T}$ac_cv_objext" >&6
OBJEXT=$ac_cv_objext
ac_objext=$OBJEXT
echo "$as_me:1835: checking whether we are using the GNU C compiler" >&5
echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
if test "${ac_cv_c_compiler_gnu+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 1841 "configure"
#include "confdefs.h"

int
main (void)
{
#ifndef __GNUC__
       choke me
#endif

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:1856: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:1859: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:1862: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:1865: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_compiler_gnu=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_compiler_gnu=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
ac_cv_c_compiler_gnu=$ac_compiler_gnu

fi
echo "$as_me:1877: result: $ac_cv_c_compiler_gnu" >&5
echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
GCC=`test $ac_compiler_gnu = yes && echo yes`
ac_test_CFLAGS=${CFLAGS+set}
ac_save_CFLAGS=$CFLAGS
CFLAGS="-g"
echo "$as_me:1883: checking whether $CC accepts -g" >&5
echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
if test "${ac_cv_prog_cc_g+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 1889 "configure"
#include "confdefs.h"

int
main (void)
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:1901: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:1904: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:1907: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:1910: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_prog_cc_g=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_prog_cc_g=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:1920: result: $ac_cv_prog_cc_g" >&5
echo "${ECHO_T}$ac_cv_prog_cc_g" >&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
# Some people use a C++ compiler to compile C.  Since we use `exit',
# in C++ we need to declare it.  In case someone uses the same compiler
# for both compiling C and C++ we need to have the C++ compiler decide
# the declaration of exit, since it's the most demanding environment.
cat >conftest.$ac_ext <<_ACEOF
#ifndef __cplusplus
  choke me
#endif
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:1947: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:1950: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:1953: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:1956: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  for ac_declaration in \
   ''\
   '#include <stdlib.h>' \
   'extern "C" void std::exit (int) throw (); using std::exit;' \
   'extern "C" void std::exit (int); using std::exit;' \
   'extern "C" void exit (int) throw ();' \
   'extern "C" void exit (int);' \
   'void exit (int);'
do
  cat >conftest.$ac_ext <<_ACEOF
#line 1968 "configure"
#include "confdefs.h"
#include <stdlib.h>
$ac_declaration
int
main (void)
{
exit (42);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:1981: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:1984: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:1987: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:1990: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  :
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
continue
fi
rm -f conftest.$ac_objext conftest.$ac_ext
  cat >conftest.$ac_ext <<_ACEOF
#line 2000 "configure"
#include "confdefs.h"
$ac_declaration
int
main (void)
{
exit (42);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:2012: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:2015: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:2018: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:2021: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  break
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest.$ac_objext conftest.$ac_ext
done
rm -rf conftest*
if test -n "$ac_declaration"; then
  echo '#ifdef __cplusplus' >>confdefs.h
  echo $ac_declaration      >>confdefs.h
  echo '#endif'             >>confdefs.h
fi

else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest.$ac_objext conftest.$ac_ext
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
ac_main_return=return

GCC_VERSION=none
if test "$GCC" = yes ; then
	echo "$as_me:2051: checking version of $CC" >&5
echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
	GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC[^)]*) //' -e 's/^.*(Debian[^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
	test -z "$GCC_VERSION" && GCC_VERSION=unknown
	echo "$as_me:2055: result: $GCC_VERSION" >&5
echo "${ECHO_T}$GCC_VERSION" >&6
fi

echo "$as_me:2059: checking for $CC option to accept ANSI C" >&5
echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
if test "${ac_cv_prog_cc_stdc+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_cv_prog_cc_stdc=no
ac_save_CC=$CC
cat >conftest.$ac_ext <<_ACEOF
#line 2067 "configure"
#include "confdefs.h"
#include <stdarg.h>
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
struct buf { int x; };
FILE * (*rcsopen) (struct buf *, struct stat *, int);
static char *e (p, i)
     char **p;
     int i;
{
  return p[i];
}
static char *f (char * (*g) (char **, int), char **p, ...)
{
  char *s;
  va_list v;
  va_start (v,p);
  s = g (p, va_arg (v,int));
  va_end (v);
  return s;
}
int test (int i, double x);
struct s1 {int (*f) (int a);};
struct s2 {int (*f) (double a);};
int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
int argc;
char **argv;
int
main (void)
{
return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
  ;
  return 0;
}
_ACEOF
# Don't try gcc -ansi; that turns off useful extensions and
# breaks some systems' header files.
# AIX			-qlanglvl=ansi
# Ultrix and OSF/1	-std1
# HP-UX 10.20 and later	-Ae
# HP-UX older versions	-Aa -D_HPUX_SOURCE
# SVR4			-Xc -D__EXTENSIONS__
for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
do
  CC="$ac_save_CC $ac_arg"
  rm -f conftest.$ac_objext
if { (eval echo "$as_me:2116: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:2119: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:2122: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:2125: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_prog_cc_stdc=$ac_arg
break
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest.$ac_objext
done
rm -f conftest.$ac_ext conftest.$ac_objext
CC=$ac_save_CC

fi

case "x$ac_cv_prog_cc_stdc" in
  x|xno)
    echo "$as_me:2142: result: none needed" >&5
echo "${ECHO_T}none needed" >&6 ;;
  *)
    echo "$as_me:2145: result: $ac_cv_prog_cc_stdc" >&5
echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
    CC="$CC $ac_cv_prog_cc_stdc" ;;
esac

# This should have been defined by AC_PROG_CC
: ${CC:=cc}

echo "$as_me:2153: checking \$CFLAGS variable" >&5
echo $ECHO_N "checking \$CFLAGS variable... $ECHO_C" >&6
case "x$CFLAGS" in
(*-[IUD]*)
	echo "$as_me:2157: result: broken" >&5
echo "${ECHO_T}broken" >&6
	{ echo "$as_me:2159: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&5
echo "$as_me: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&2;}
	cf_flags="$CFLAGS"
	CFLAGS=
	for cf_arg in $cf_flags
	do

cf_fix_cppflags=no
cf_new_cflags=
cf_new_cppflags=
cf_new_extra_cppflags=

for cf_add_cflags in $cf_arg
do
case $cf_fix_cppflags in
(no)
	case $cf_add_cflags in
	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
		case $cf_add_cflags in
		(-D*)
			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`

			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
				&& test -z "${cf_tst_cflags}" \
				&& cf_fix_cppflags=yes

			if test $cf_fix_cppflags = yes ; then

	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"

				continue
			elif test "${cf_tst_cflags}" = "\"'" ; then

	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"

				continue
			fi
			;;
		esac
		case "$CPPFLAGS" in
		(*$cf_add_cflags)
			;;
		(*)
			case $cf_add_cflags in
			(-D*)
				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`

CPPFLAGS=`echo "$CPPFLAGS" | \
	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`

				;;
			esac

	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"

			;;
		esac
		;;
	(*)

	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"

		;;
	esac
	;;
(yes)

	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"

	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`

	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
		&& test -z "${cf_tst_cflags}" \
		&& cf_fix_cppflags=no
	;;
esac
done

if test -n "$cf_new_cflags" ; then

	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
	CFLAGS="${CFLAGS}$cf_new_cflags"

fi

if test -n "$cf_new_cppflags" ; then

	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"

fi

if test -n "$cf_new_extra_cppflags" ; then

	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"

fi

	done
	;;
(*)
	echo "$as_me:2267: result: ok" >&5
echo "${ECHO_T}ok" >&6
	;;
esac

echo "$as_me:2272: checking \$CC variable" >&5
echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
case "$CC" in
(*[\ \	]-*)
	echo "$as_me:2276: result: broken" >&5
echo "${ECHO_T}broken" >&6
	{ echo "$as_me:2278: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
echo "$as_me: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
	# humor him...
	cf_prog=`echo "$CC" | sed -e 's/	/ /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
	cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", substr($0,1+length(prog))); }'`
	CC="$cf_prog"
	for cf_arg in $cf_flags
	do
		case "x$cf_arg" in
		(x-[IUDfgOW]*)

cf_fix_cppflags=no
cf_new_cflags=
cf_new_cppflags=
cf_new_extra_cppflags=

for cf_add_cflags in $cf_arg
do
case $cf_fix_cppflags in
(no)
	case $cf_add_cflags in
	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
		case $cf_add_cflags in
		(-D*)
			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`

			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
				&& test -z "${cf_tst_cflags}" \
				&& cf_fix_cppflags=yes

			if test $cf_fix_cppflags = yes ; then

	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"

				continue
			elif test "${cf_tst_cflags}" = "\"'" ; then

	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"

				continue
			fi
			;;
		esac
		case "$CPPFLAGS" in
		(*$cf_add_cflags)
			;;
		(*)
			case $cf_add_cflags in
			(-D*)
				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`

CPPFLAGS=`echo "$CPPFLAGS" | \
	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`

				;;
			esac

	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"

			;;
		esac
		;;
	(*)

	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"

		;;
	esac
	;;
(yes)

	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"

	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`

	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
		&& test -z "${cf_tst_cflags}" \
		&& cf_fix_cppflags=no
	;;
esac
done

if test -n "$cf_new_cflags" ; then

	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
	CFLAGS="${CFLAGS}$cf_new_cflags"

fi

if test -n "$cf_new_cppflags" ; then

	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"

fi

if test -n "$cf_new_extra_cppflags" ; then

	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"

fi

			;;
		(*)
			CC="$CC $cf_arg"
			;;
		esac
	done
	test -n "$verbose" && echo "	resulting CC: '$CC'" 1>&6

echo "${as_me:-configure}:2395: testing resulting CC: '$CC' ..." 1>&5

	test -n "$verbose" && echo "	resulting CFLAGS: '$CFLAGS'" 1>&6

echo "${as_me:-configure}:2399: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5

	test -n "$verbose" && echo "	resulting CPPFLAGS: '$CPPFLAGS'" 1>&6

echo "${as_me:-configure}:2403: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5

	;;
(*)
	echo "$as_me:2407: result: ok" >&5
echo "${ECHO_T}ok" >&6
	;;
esac

ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
ac_main_return=return
echo "$as_me:2418: checking how to run the C preprocessor" >&5
echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
  CPP=
fi
if test -z "$CPP"; then
  if test "${ac_cv_prog_CPP+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
      # Double quotes because CPP needs to be expanded
    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
    do
      ac_preproc_ok=false
for ac_c_preproc_warn_flag in '' yes
do
  # Use a header file that comes with gcc, so configuring glibc
  # with a fresh cross-compiler works.
  # On the NeXT, cc -E runs the code through the compiler's parser,
  # not just through cpp. "Syntax error" is here to catch this case.
  cat >conftest.$ac_ext <<_ACEOF
#line 2439 "configure"
#include "confdefs.h"
#include <assert.h>
                     Syntax error
_ACEOF
if { (eval echo "$as_me:2444: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  egrep -v '^ *\+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:2450: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  :
else
  echo "$as_me: failed program was:" >&5
  cat conftest.$ac_ext >&5
  # Broken: fails on valid input.
continue
fi
rm -f conftest.err conftest.$ac_ext

  # OK, works on sane cases.  Now check whether non-existent headers
  # can be detected and how.
  cat >conftest.$ac_ext <<_ACEOF
#line 2473 "configure"
#include "confdefs.h"
#include <ac_nonexistent.h>
_ACEOF
if { (eval echo "$as_me:2477: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  egrep -v '^ *\+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:2483: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  # Broken: success on invalid input.
continue
else
  echo "$as_me: failed program was:" >&5
  cat conftest.$ac_ext >&5
  # Passes both tests.
ac_preproc_ok=:
break
fi
rm -f conftest.err conftest.$ac_ext

done
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
rm -f conftest.err conftest.$ac_ext
if $ac_preproc_ok; then
  break
fi

    done
    ac_cv_prog_CPP=$CPP

fi
  CPP=$ac_cv_prog_CPP
else
  ac_cv_prog_CPP=$CPP
fi
echo "$as_me:2520: result: $CPP" >&5
echo "${ECHO_T}$CPP" >&6
ac_preproc_ok=false
for ac_c_preproc_warn_flag in '' yes
do
  # Use a header file that comes with gcc, so configuring glibc
  # with a fresh cross-compiler works.
  # On the NeXT, cc -E runs the code through the compiler's parser,
  # not just through cpp. "Syntax error" is here to catch this case.
  cat >conftest.$ac_ext <<_ACEOF
#line 2530 "configure"
#include "confdefs.h"
#include <assert.h>
                     Syntax error
_ACEOF
if { (eval echo "$as_me:2535: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  egrep -v '^ *\+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:2541: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  :
else
  echo "$as_me: failed program was:" >&5
  cat conftest.$ac_ext >&5
  # Broken: fails on valid input.
continue
fi
rm -f conftest.err conftest.$ac_ext

  # OK, works on sane cases.  Now check whether non-existent headers
  # can be detected and how.
  cat >conftest.$ac_ext <<_ACEOF
#line 2564 "configure"
#include "confdefs.h"
#include <ac_nonexistent.h>
_ACEOF
if { (eval echo "$as_me:2568: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  egrep -v '^ *\+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:2574: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  # Broken: success on invalid input.
continue
else
  echo "$as_me: failed program was:" >&5
  cat conftest.$ac_ext >&5
  # Passes both tests.
ac_preproc_ok=:
break
fi
rm -f conftest.err conftest.$ac_ext

done
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
rm -f conftest.err conftest.$ac_ext
if $ac_preproc_ok; then
  :
else
  { { echo "$as_me:2602: error: C preprocessor \"$CPP\" fails sanity check" >&5
echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
   { (exit 1); exit 1; }; }
fi

ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
ac_main_return=return

if test $ac_cv_c_compiler_gnu = yes; then
    echo "$as_me:2615: checking whether $CC needs -traditional" >&5
echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
if test "${ac_cv_prog_gcc_traditional+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
    ac_pattern="Autoconf.*'x'"
  cat >conftest.$ac_ext <<_ACEOF
#line 2622 "configure"
#include "confdefs.h"
#include <sgtty.h>
int Autoconf = TIOCGETP;
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "$ac_pattern" >/dev/null 2>&1; then
  ac_cv_prog_gcc_traditional=yes
else
  ac_cv_prog_gcc_traditional=no
fi
rm -rf conftest*

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

  fi
fi
echo "$as_me:2650: result: $ac_cv_prog_gcc_traditional" >&5
echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
  if test $ac_cv_prog_gcc_traditional = yes; then
    CC="$CC -traditional"
  fi
fi

echo "$as_me:2657: checking whether ${MAKE-make} sets \${MAKE}" >&5
echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.make <<\EOF
all:
	@echo 'ac_maketemp="${MAKE}"'
EOF
# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
if test -n "$ac_maketemp"; then
  eval ac_cv_prog_make_${ac_make}_set=yes
else
  eval ac_cv_prog_make_${ac_make}_set=no
fi
rm -f conftest.make
fi
if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
  echo "$as_me:2677: result: yes" >&5
echo "${ECHO_T}yes" >&6
  SET_MAKE=
else
  echo "$as_me:2681: result: no" >&5
echo "${ECHO_T}no" >&6
  SET_MAKE="MAKE=${MAKE-make}"
fi

# Find a good install program.  We prefer a C program (faster),
# so one script is as good as another.  But avoid the broken or
# incompatible versions:
# SysV /etc/install, /usr/sbin/install
# SunOS /usr/etc/install
# IRIX /sbin/install
# AIX /bin/install
# AmigaOS /C/install, which installs bootblocks on floppy discs
# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
# AFS /usr/afsws/bin/install, which mishandles nonexistent args
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo "$as_me:2698: checking for a BSD compatible install" >&5
echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
if test -z "$INSTALL"; then
if test "${ac_cv_path_install+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
    ac_save_IFS=$IFS; IFS=$ac_path_separator
  for ac_dir in $PATH; do
    IFS=$ac_save_IFS
    # Account for people who put trailing slashes in PATH elements.
    case $ac_dir/ in
    / | ./ | .// | /cC/* \
    | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
    | /usr/ucb/* ) ;;
    *)
      # OSF1 and SCO ODT 3.0 have their own names for install.
      # Don't use installbsd from OSF since it installs stuff as root
      # by default.
      for ac_prog in ginstall scoinst install; do
        if $as_executable_p "$ac_dir/$ac_prog"; then
	  if test $ac_prog = install &&
            grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
	    # AIX install.  It has an incompatible calling convention.
	    :
	  elif test $ac_prog = install &&
	    grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
	    # program-specific install script used by HP pwplus--don't use.
	    :
	  else
	    ac_cv_path_install="$ac_dir/$ac_prog -c"
	    break 2
	  fi
	fi
      done
      ;;
    esac
  done

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

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

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

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

if test "${cf_cv_prog_YACC+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

if test -n "$YACC" ; then
  cf_cv_prog_YACC="$YACC" # Let the user override the test.
else
cat >conftest.y <<EOF
%{
void yyerror(s) char *s; { }
%}
%token	NUMBER
%%
time	: NUMBER ':' NUMBER
	;
%%
int yylex() { return NUMBER; }
int main() { return yyparse(); }
EOF
  for cf_prog in 'bison -y' byacc yacc
  do
    rm -f y.tab.ch
    echo "$as_me:2780: checking for $cf_prog" >&5
echo $ECHO_N "checking for $cf_prog... $ECHO_C" >&6
    cf_command="$cf_prog conftest.y"
    cf_result=no
    if { (eval echo "$as_me:2784: \"$cf_command\"") >&5
  (eval $cf_command) 2>&5
  ac_status=$?
  echo "$as_me:2787: \$? = $ac_status" >&5
  (exit $ac_status); } && test -s y.tab.c ; then
      mv y.tab.c conftest.c
      rm -f y.tab.h
      if test "$cf_prog" = 'bison -y' ; then
        if { (eval echo "$as_me:2792: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:2795: \$? = $ac_status" >&5
  (exit $ac_status); } && test -s conftest ; then
          cf_result=yes
        fi
      else
        cf_result=yes
      fi
    fi
    echo "$as_me:2803: result: $cf_result" >&5
echo "${ECHO_T}$cf_result" >&6
    if test $cf_result = yes ; then
      cf_cv_prog_YACC="$cf_prog"
      break
    fi
  done
fi

fi

YACC="$cf_cv_prog_YACC"

for ac_prog in lint alint lclint tdlint splint
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 "$as_me:2820: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_LINT+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$LINT"; then
  ac_cv_prog_LINT="$LINT" # Let the user override the test.
else
  ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  $as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_LINT="$ac_prog"
echo "$as_me:2835: found $ac_dir/$ac_word" >&5
break
done

fi
fi
LINT=$ac_cv_prog_LINT
if test -n "$LINT"; then
  echo "$as_me:2843: result: $LINT" >&5
echo "${ECHO_T}$LINT" >&6
else
  echo "$as_me:2846: result: no" >&5
echo "${ECHO_T}no" >&6
fi

  test -n "$LINT" && break
done
test -n "$LINT" || LINT=":"

cf_XOPEN_SOURCE=500
cf_POSIX_C_SOURCE=199506L
cf_xopen_source=

case $host_os in
(aix[4-7]*)
	cf_xopen_source="-D_ALL_SOURCE"
	;;
(msys)
	cf_XOPEN_SOURCE=600
	;;
(darwin[0-8].*)
	cf_xopen_source="-D_APPLE_C_SOURCE"
	;;
(darwin*)
	cf_xopen_source="-D_DARWIN_C_SOURCE"
	cf_XOPEN_SOURCE=
	;;
(freebsd*|dragonfly*|midnightbsd*)
	# 5.x headers associate
	#	_XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
	#	_XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
	cf_POSIX_C_SOURCE=200112L
	cf_XOPEN_SOURCE=600
	cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
	;;
(hpux11*)
	cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
	;;
(hpux*)
	cf_xopen_source="-D_HPUX_SOURCE"
	;;
(irix[56].*)
	cf_xopen_source="-D_SGI_SOURCE"
	cf_XOPEN_SOURCE=
	;;
(linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)

cf_gnu_xopen_source=$cf_XOPEN_SOURCE

echo "$as_me:2894: checking if this is the GNU C library" >&5
echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
if test "${cf_cv_gnu_library+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

cat >conftest.$ac_ext <<_ACEOF
#line 2901 "configure"
#include "confdefs.h"
#include <sys/types.h>
int
main (void)
{

	#if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
		return 0;
	#else
	#	error not GNU C library
	#endif
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:2918: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:2921: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:2924: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:2927: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  cf_cv_gnu_library=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
cf_cv_gnu_library=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext

fi
echo "$as_me:2938: result: $cf_cv_gnu_library" >&5
echo "${ECHO_T}$cf_cv_gnu_library" >&6

if test x$cf_cv_gnu_library = xyes; then

	# With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
	# was changed to help a little...
	echo "$as_me:2945: checking if _DEFAULT_SOURCE can be used as a basis" >&5
echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
if test "${cf_cv_gnu_library_219+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

		cf_save="$CPPFLAGS"

	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
	CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"

		cat >conftest.$ac_ext <<_ACEOF
#line 2957 "configure"
#include "confdefs.h"
#include <sys/types.h>
int
main (void)
{

			#if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
				return 0;
			#else
			#	error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
			#endif
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:2974: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:2977: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:2980: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:2983: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  cf_cv_gnu_library_219=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
cf_cv_gnu_library_219=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
		CPPFLAGS="$cf_save"

fi
echo "$as_me:2995: result: $cf_cv_gnu_library_219" >&5
echo "${ECHO_T}$cf_cv_gnu_library_219" >&6

	if test "x$cf_cv_gnu_library_219" = xyes; then
		cf_save="$CPPFLAGS"
		echo "$as_me:3000: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

cf_fix_cppflags=no
cf_new_cflags=
cf_new_cppflags=
cf_new_extra_cppflags=

for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
do
case $cf_fix_cppflags in
(no)
	case $cf_add_cflags in
	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
		case $cf_add_cflags in
		(-D*)
			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`

			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
				&& test -z "${cf_tst_cflags}" \
				&& cf_fix_cppflags=yes

			if test $cf_fix_cppflags = yes ; then

	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"

				continue
			elif test "${cf_tst_cflags}" = "\"'" ; then

	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"

				continue
			fi
			;;
		esac
		case "$CPPFLAGS" in
		(*$cf_add_cflags)
			;;
		(*)
			case $cf_add_cflags in
			(-D*)
				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`

CPPFLAGS=`echo "$CPPFLAGS" | \
	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`

				;;
			esac

	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"

			;;
		esac
		;;
	(*)

	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"

		;;
	esac
	;;
(yes)

	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"

	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`

	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
		&& test -z "${cf_tst_cflags}" \
		&& cf_fix_cppflags=no
	;;
esac
done

if test -n "$cf_new_cflags" ; then

	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
	CFLAGS="${CFLAGS}$cf_new_cflags"

fi

if test -n "$cf_new_cppflags" ; then

	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"

fi

if test -n "$cf_new_extra_cppflags" ; then

	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"

fi

			cat >conftest.$ac_ext <<_ACEOF
#line 3105 "configure"
#include "confdefs.h"

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

int
main (void)
{

				#if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
					return 0;
				#else
				#	error GNU C library is too old
				#endif
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:3125: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:3128: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:3131: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:3134: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  cf_cv_gnu_dftsrc_219=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
cf_cv_gnu_dftsrc_219=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext

fi
echo "$as_me:3145: result: $cf_cv_gnu_dftsrc_219" >&5
echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
		test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
	else
		cf_cv_gnu_dftsrc_219=maybe
	fi

	if test "x$cf_cv_gnu_dftsrc_219" != xyes; then

		echo "$as_me:3154: checking if we must define _GNU_SOURCE" >&5
echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
if test "${cf_cv_gnu_source+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

		cat >conftest.$ac_ext <<_ACEOF
#line 3161 "configure"
#include "confdefs.h"
#include <sys/types.h>
int
main (void)
{

			#ifndef _XOPEN_SOURCE
			#error	expected _XOPEN_SOURCE to be defined
			#endif
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:3176: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:3179: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:3182: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:3185: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  cf_cv_gnu_source=no
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
cf_save="$CPPFLAGS"

cf_fix_cppflags=no
cf_new_cflags=
cf_new_cppflags=
cf_new_extra_cppflags=

for cf_add_cflags in -D_GNU_SOURCE
do
case $cf_fix_cppflags in
(no)
	case $cf_add_cflags in
	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
		case $cf_add_cflags in
		(-D*)
			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`

			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
				&& test -z "${cf_tst_cflags}" \
				&& cf_fix_cppflags=yes

			if test $cf_fix_cppflags = yes ; then

	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"

				continue
			elif test "${cf_tst_cflags}" = "\"'" ; then

	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"

				continue
			fi
			;;
		esac
		case "$CPPFLAGS" in
		(*$cf_add_cflags)
			;;
		(*)
			case $cf_add_cflags in
			(-D*)
				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`

CPPFLAGS=`echo "$CPPFLAGS" | \
	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`

				;;
			esac

	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"

			;;
		esac
		;;
	(*)

	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"

		;;
	esac
	;;
(yes)

	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"

	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`

	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
		&& test -z "${cf_tst_cflags}" \
		&& cf_fix_cppflags=no
	;;
esac
done

if test -n "$cf_new_cflags" ; then

	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
	CFLAGS="${CFLAGS}$cf_new_cflags"

fi

if test -n "$cf_new_cppflags" ; then

	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"

fi

if test -n "$cf_new_extra_cppflags" ; then

	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"

fi

			 cat >conftest.$ac_ext <<_ACEOF
#line 3292 "configure"
#include "confdefs.h"
#include <sys/types.h>
int
main (void)
{

				#ifdef _XOPEN_SOURCE
				#error	expected _XOPEN_SOURCE to be undefined
				#endif
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:3307: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:3310: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:3313: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:3316: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  cf_cv_gnu_source=no
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
cf_cv_gnu_source=yes
fi
rm -f conftest.$ac_objext conftest.$ac_ext
			CPPFLAGS="$cf_save"

fi
rm -f conftest.$ac_objext conftest.$ac_ext

fi
echo "$as_me:3331: result: $cf_cv_gnu_source" >&5
echo "${ECHO_T}$cf_cv_gnu_source" >&6

		if test "$cf_cv_gnu_source" = yes
		then
		echo "$as_me:3336: checking if we should also define _DEFAULT_SOURCE" >&5
echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
if test "${cf_cv_default_source+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
	CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"

			cat >conftest.$ac_ext <<_ACEOF
#line 3346 "configure"
#include "confdefs.h"
#include <sys/types.h>
int
main (void)
{

				#ifdef _DEFAULT_SOURCE
				#error	expected _DEFAULT_SOURCE to be undefined
				#endif
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:3361: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:3364: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:3367: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:3370: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  cf_cv_default_source=no
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
cf_cv_default_source=yes
fi
rm -f conftest.$ac_objext conftest.$ac_ext

fi
echo "$as_me:3381: result: $cf_cv_default_source" >&5
echo "${ECHO_T}$cf_cv_default_source" >&6
			if test "$cf_cv_default_source" = yes
			then

	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
	CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"

			fi
		fi
	fi

fi

	;;
(minix*)
	cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
	;;
(mirbsd*)
	# setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
	cf_XOPEN_SOURCE=

cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE

cf_save_CFLAGS="$CFLAGS"
cf_save_CPPFLAGS="$CPPFLAGS"

cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
	sed	-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
		-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?$//g'`

cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
	sed	-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
		-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?$//g'`

echo "$as_me:3416: checking if we should define _POSIX_C_SOURCE" >&5
echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
if test "${cf_cv_posix_c_source+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

echo "${as_me:-configure}:3422: testing if the symbol is already defined go no further ..." 1>&5

	cat >conftest.$ac_ext <<_ACEOF
#line 3425 "configure"
#include "confdefs.h"
#include <sys/types.h>
int
main (void)
{

#ifndef _POSIX_C_SOURCE
make an error
#endif
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:3440: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:3443: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:3446: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:3449: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  cf_cv_posix_c_source=no
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
cf_want_posix_source=no
	 case .$cf_POSIX_C_SOURCE in
	 (.[12]??*)
		cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
		;;
	 (.2)
		cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
		cf_want_posix_source=yes
		;;
	 (.*)
		cf_want_posix_source=yes
		;;
	 esac
	 if test "$cf_want_posix_source" = yes ; then
		cat >conftest.$ac_ext <<_ACEOF
#line 3470 "configure"
#include "confdefs.h"
#include <sys/types.h>
int
main (void)
{

#ifdef _POSIX_SOURCE
make an error
#endif
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:3485: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:3488: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:3491: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:3494: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  :
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
fi
rm -f conftest.$ac_objext conftest.$ac_ext
	 fi

echo "${as_me:-configure}:3505: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5

	 CFLAGS="$cf_trim_CFLAGS"
	 CPPFLAGS="$cf_trim_CPPFLAGS"

	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
	CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"

echo "${as_me:-configure}:3513: testing if the second compile does not leave our definition intact error ..." 1>&5

	 cat >conftest.$ac_ext <<_ACEOF
#line 3516 "configure"
#include "confdefs.h"
#include <sys/types.h>
int
main (void)
{

#ifndef _POSIX_C_SOURCE
make an error
#endif
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:3531: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:3534: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:3537: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:3540: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  :
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
cf_cv_posix_c_source=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
	 CFLAGS="$cf_save_CFLAGS"
	 CPPFLAGS="$cf_save_CPPFLAGS"

fi
rm -f conftest.$ac_objext conftest.$ac_ext

fi
echo "$as_me:3556: result: $cf_cv_posix_c_source" >&5
echo "${ECHO_T}$cf_cv_posix_c_source" >&6

if test "$cf_cv_posix_c_source" != no ; then
	CFLAGS="$cf_trim_CFLAGS"
	CPPFLAGS="$cf_trim_CPPFLAGS"

cf_fix_cppflags=no
cf_new_cflags=
cf_new_cppflags=
cf_new_extra_cppflags=

for cf_add_cflags in $cf_cv_posix_c_source
do
case $cf_fix_cppflags in
(no)
	case $cf_add_cflags in
	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
		case $cf_add_cflags in
		(-D*)
			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`

			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
				&& test -z "${cf_tst_cflags}" \
				&& cf_fix_cppflags=yes

			if test $cf_fix_cppflags = yes ; then

	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"

				continue
			elif test "${cf_tst_cflags}" = "\"'" ; then

	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"

				continue
			fi
			;;
		esac
		case "$CPPFLAGS" in
		(*$cf_add_cflags)
			;;
		(*)
			case $cf_add_cflags in
			(-D*)
				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`

CPPFLAGS=`echo "$CPPFLAGS" | \
	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`

				;;
			esac

	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"

			;;
		esac
		;;
	(*)

	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"

		;;
	esac
	;;
(yes)

	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"

	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`

	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
		&& test -z "${cf_tst_cflags}" \
		&& cf_fix_cppflags=no
	;;
esac
done

if test -n "$cf_new_cflags" ; then

	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
	CFLAGS="${CFLAGS}$cf_new_cflags"

fi

if test -n "$cf_new_cppflags" ; then

	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"

fi

if test -n "$cf_new_extra_cppflags" ; then

	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"

fi

fi

	;;
(netbsd*)
	cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
	;;
(openbsd[4-9]*)
	# setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
	cf_xopen_source="-D_BSD_SOURCE"
	cf_XOPEN_SOURCE=600
	;;
(openbsd*)
	# setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
	;;
(osf[45]*)
	cf_xopen_source="-D_OSF_SOURCE"
	;;
(nto-qnx*)
	cf_xopen_source="-D_QNX_SOURCE"
	;;
(sco*)
	# setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
	;;
(solaris2.*)
	cf_xopen_source="-D__EXTENSIONS__"
	cf_cv_xopen_source=broken
	;;
(sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
	cf_XOPEN_SOURCE=
	cf_POSIX_C_SOURCE=
	;;
(*)

echo "$as_me:3694: checking if we should define _XOPEN_SOURCE" >&5
echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
if test "${cf_cv_xopen_source+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

	cat >conftest.$ac_ext <<_ACEOF
#line 3701 "configure"
#include "confdefs.h"

#include <stdlib.h>
#include <string.h>
#include <sys/types.h>

int
main (void)
{

#ifndef _XOPEN_SOURCE
make an error
#endif
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:3720: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:3723: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:3726: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:3729: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  cf_cv_xopen_source=no
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
cf_save="$CPPFLAGS"

	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
	CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"

	 cat >conftest.$ac_ext <<_ACEOF
#line 3741 "configure"
#include "confdefs.h"

#include <stdlib.h>
#include <string.h>
#include <sys/types.h>

int
main (void)
{

#ifdef _XOPEN_SOURCE
make an error
#endif
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:3760: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:3763: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:3766: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:3769: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  cf_cv_xopen_source=no
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
cf_cv_xopen_source=$cf_XOPEN_SOURCE
fi
rm -f conftest.$ac_objext conftest.$ac_ext
	CPPFLAGS="$cf_save"

fi
rm -f conftest.$ac_objext conftest.$ac_ext

fi
echo "$as_me:3784: result: $cf_cv_xopen_source" >&5
echo "${ECHO_T}$cf_cv_xopen_source" >&6

if test "$cf_cv_xopen_source" != no ; then

CFLAGS=`echo "$CFLAGS" | \
	sed	-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
		-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?$//g'`

CPPFLAGS=`echo "$CPPFLAGS" | \
	sed	-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
		-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?$//g'`

	cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"

cf_fix_cppflags=no
cf_new_cflags=
cf_new_cppflags=
cf_new_extra_cppflags=

for cf_add_cflags in $cf_temp_xopen_source
do
case $cf_fix_cppflags in
(no)
	case $cf_add_cflags in
	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
		case $cf_add_cflags in
		(-D*)
			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`

			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
				&& test -z "${cf_tst_cflags}" \
				&& cf_fix_cppflags=yes

			if test $cf_fix_cppflags = yes ; then

	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"

				continue
			elif test "${cf_tst_cflags}" = "\"'" ; then

	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"

				continue
			fi
			;;
		esac
		case "$CPPFLAGS" in
		(*$cf_add_cflags)
			;;
		(*)
			case $cf_add_cflags in
			(-D*)
				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`

CPPFLAGS=`echo "$CPPFLAGS" | \
	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`

				;;
			esac

	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"

			;;
		esac
		;;
	(*)

	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"

		;;
	esac
	;;
(yes)

	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"

	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`

	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
		&& test -z "${cf_tst_cflags}" \
		&& cf_fix_cppflags=no
	;;
esac
done

if test -n "$cf_new_cflags" ; then

	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
	CFLAGS="${CFLAGS}$cf_new_cflags"

fi

if test -n "$cf_new_cppflags" ; then

	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"

fi

if test -n "$cf_new_extra_cppflags" ; then

	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"

fi

fi

cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE

cf_save_CFLAGS="$CFLAGS"
cf_save_CPPFLAGS="$CPPFLAGS"

cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
	sed	-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
		-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?$//g'`

cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
	sed	-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
		-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?$//g'`

echo "$as_me:3912: checking if we should define _POSIX_C_SOURCE" >&5
echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
if test "${cf_cv_posix_c_source+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

echo "${as_me:-configure}:3918: testing if the symbol is already defined go no further ..." 1>&5

	cat >conftest.$ac_ext <<_ACEOF
#line 3921 "configure"
#include "confdefs.h"
#include <sys/types.h>
int
main (void)
{

#ifndef _POSIX_C_SOURCE
make an error
#endif
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:3936: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:3939: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:3942: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:3945: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  cf_cv_posix_c_source=no
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
cf_want_posix_source=no
	 case .$cf_POSIX_C_SOURCE in
	 (.[12]??*)
		cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
		;;
	 (.2)
		cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
		cf_want_posix_source=yes
		;;
	 (.*)
		cf_want_posix_source=yes
		;;
	 esac
	 if test "$cf_want_posix_source" = yes ; then
		cat >conftest.$ac_ext <<_ACEOF
#line 3966 "configure"
#include "confdefs.h"
#include <sys/types.h>
int
main (void)
{

#ifdef _POSIX_SOURCE
make an error
#endif
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:3981: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:3984: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:3987: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:3990: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  :
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
fi
rm -f conftest.$ac_objext conftest.$ac_ext
	 fi

echo "${as_me:-configure}:4001: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5

	 CFLAGS="$cf_trim_CFLAGS"
	 CPPFLAGS="$cf_trim_CPPFLAGS"

	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
	CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"

echo "${as_me:-configure}:4009: testing if the second compile does not leave our definition intact error ..." 1>&5

	 cat >conftest.$ac_ext <<_ACEOF
#line 4012 "configure"
#include "confdefs.h"
#include <sys/types.h>
int
main (void)
{

#ifndef _POSIX_C_SOURCE
make an error
#endif
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:4027: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:4030: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:4033: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:4036: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  :
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
cf_cv_posix_c_source=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
	 CFLAGS="$cf_save_CFLAGS"
	 CPPFLAGS="$cf_save_CPPFLAGS"

fi
rm -f conftest.$ac_objext conftest.$ac_ext

fi
echo "$as_me:4052: result: $cf_cv_posix_c_source" >&5
echo "${ECHO_T}$cf_cv_posix_c_source" >&6

if test "$cf_cv_posix_c_source" != no ; then
	CFLAGS="$cf_trim_CFLAGS"
	CPPFLAGS="$cf_trim_CPPFLAGS"

cf_fix_cppflags=no
cf_new_cflags=
cf_new_cppflags=
cf_new_extra_cppflags=

for cf_add_cflags in $cf_cv_posix_c_source
do
case $cf_fix_cppflags in
(no)
	case $cf_add_cflags in
	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
		case $cf_add_cflags in
		(-D*)
			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`

			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
				&& test -z "${cf_tst_cflags}" \
				&& cf_fix_cppflags=yes

			if test $cf_fix_cppflags = yes ; then

	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"

				continue
			elif test "${cf_tst_cflags}" = "\"'" ; then

	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"

				continue
			fi
			;;
		esac
		case "$CPPFLAGS" in
		(*$cf_add_cflags)
			;;
		(*)
			case $cf_add_cflags in
			(-D*)
				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`

CPPFLAGS=`echo "$CPPFLAGS" | \
	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`

				;;
			esac

	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"

			;;
		esac
		;;
	(*)

	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"

		;;
	esac
	;;
(yes)

	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"

	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`

	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
		&& test -z "${cf_tst_cflags}" \
		&& cf_fix_cppflags=no
	;;
esac
done

if test -n "$cf_new_cflags" ; then

	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
	CFLAGS="${CFLAGS}$cf_new_cflags"

fi

if test -n "$cf_new_cppflags" ; then

	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"

fi

if test -n "$cf_new_extra_cppflags" ; then

	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"

fi

fi

	;;
esac

if test -n "$cf_xopen_source" ; then

cf_fix_cppflags=no
cf_new_cflags=
cf_new_cppflags=
cf_new_extra_cppflags=

for cf_add_cflags in $cf_xopen_source
do
case $cf_fix_cppflags in
(no)
	case $cf_add_cflags in
	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
		case $cf_add_cflags in
		(-D*)
			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`

			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
				&& test -z "${cf_tst_cflags}" \
				&& cf_fix_cppflags=yes

			if test $cf_fix_cppflags = yes ; then

	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"

				continue
			elif test "${cf_tst_cflags}" = "\"'" ; then

	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"

				continue
			fi
			;;
		esac
		case "$CPPFLAGS" in
		(*$cf_add_cflags)
			;;
		(*)
			case $cf_add_cflags in
			(-D*)
				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`

CPPFLAGS=`echo "$CPPFLAGS" | \
	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`

				;;
			esac

	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"

			;;
		esac
		;;
	(*)

	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"

		;;
	esac
	;;
(yes)

	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"

	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`

	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
		&& test -z "${cf_tst_cflags}" \
		&& cf_fix_cppflags=no
	;;
esac
done

if test -n "$cf_new_cflags" ; then
	test -n "$verbose" && echo "	add to \$CFLAGS $cf_new_cflags" 1>&6

echo "${as_me:-configure}:4244: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5

	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
	CFLAGS="${CFLAGS}$cf_new_cflags"

fi

if test -n "$cf_new_cppflags" ; then
	test -n "$verbose" && echo "	add to \$CPPFLAGS $cf_new_cppflags" 1>&6

echo "${as_me:-configure}:4254: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5

	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"

fi

if test -n "$cf_new_extra_cppflags" ; then
	test -n "$verbose" && echo "	add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6

echo "${as_me:-configure}:4264: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5

	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"

fi

fi

if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
	echo "$as_me:4274: checking if _XOPEN_SOURCE really is set" >&5
echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
	cat >conftest.$ac_ext <<_ACEOF
#line 4277 "configure"
#include "confdefs.h"
#include <stdlib.h>
int
main (void)
{

#ifndef _XOPEN_SOURCE
make an error
#endif
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:4292: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:4295: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:4298: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:4301: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  cf_XOPEN_SOURCE_set=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
cf_XOPEN_SOURCE_set=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
	echo "$as_me:4310: result: $cf_XOPEN_SOURCE_set" >&5
echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
	if test $cf_XOPEN_SOURCE_set = yes
	then
		cat >conftest.$ac_ext <<_ACEOF
#line 4315 "configure"
#include "confdefs.h"
#include <stdlib.h>
int
main (void)
{

#if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
make an error
#endif
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:4330: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:4333: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:4336: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:4339: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  cf_XOPEN_SOURCE_set_ok=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
cf_XOPEN_SOURCE_set_ok=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
		if test $cf_XOPEN_SOURCE_set_ok = no
		then
			{ echo "$as_me:4350: WARNING: _XOPEN_SOURCE is lower than requested" >&5
echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
		fi
	else

echo "$as_me:4355: checking if we should define _XOPEN_SOURCE" >&5
echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
if test "${cf_cv_xopen_source+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

	cat >conftest.$ac_ext <<_ACEOF
#line 4362 "configure"
#include "confdefs.h"

#include <stdlib.h>
#include <string.h>
#include <sys/types.h>

int
main (void)
{

#ifndef _XOPEN_SOURCE
make an error
#endif
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:4381: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:4384: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:4387: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:4390: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  cf_cv_xopen_source=no
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
cf_save="$CPPFLAGS"

	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
	CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"

	 cat >conftest.$ac_ext <<_ACEOF
#line 4402 "configure"
#include "confdefs.h"

#include <stdlib.h>
#include <string.h>
#include <sys/types.h>

int
main (void)
{

#ifdef _XOPEN_SOURCE
make an error
#endif
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:4421: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:4424: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:4427: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:4430: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  cf_cv_xopen_source=no
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
cf_cv_xopen_source=$cf_XOPEN_SOURCE
fi
rm -f conftest.$ac_objext conftest.$ac_ext
	CPPFLAGS="$cf_save"

fi
rm -f conftest.$ac_objext conftest.$ac_ext

fi
echo "$as_me:4445: result: $cf_cv_xopen_source" >&5
echo "${ECHO_T}$cf_cv_xopen_source" >&6

if test "$cf_cv_xopen_source" != no ; then

CFLAGS=`echo "$CFLAGS" | \
	sed	-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
		-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?$//g'`

CPPFLAGS=`echo "$CPPFLAGS" | \
	sed	-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
		-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?$//g'`

	cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"

cf_fix_cppflags=no
cf_new_cflags=
cf_new_cppflags=
cf_new_extra_cppflags=

for cf_add_cflags in $cf_temp_xopen_source
do
case $cf_fix_cppflags in
(no)
	case $cf_add_cflags in
	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
		case $cf_add_cflags in
		(-D*)
			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`

			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
				&& test -z "${cf_tst_cflags}" \
				&& cf_fix_cppflags=yes

			if test $cf_fix_cppflags = yes ; then

	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"

				continue
			elif test "${cf_tst_cflags}" = "\"'" ; then

	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"

				continue
			fi
			;;
		esac
		case "$CPPFLAGS" in
		(*$cf_add_cflags)
			;;
		(*)
			case $cf_add_cflags in
			(-D*)
				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`

CPPFLAGS=`echo "$CPPFLAGS" | \
	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`

				;;
			esac

	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"

			;;
		esac
		;;
	(*)

	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"

		;;
	esac
	;;
(yes)

	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"

	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`

	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
		&& test -z "${cf_tst_cflags}" \
		&& cf_fix_cppflags=no
	;;
esac
done

if test -n "$cf_new_cflags" ; then

	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
	CFLAGS="${CFLAGS}$cf_new_cflags"

fi

if test -n "$cf_new_cppflags" ; then

	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"

fi

if test -n "$cf_new_extra_cppflags" ; then

	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"

fi

fi

	fi
fi

echo "$as_me:4563: checking if SIGWINCH is defined" >&5
echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
if test "${cf_cv_define_sigwinch+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

	cat >conftest.$ac_ext <<_ACEOF
#line 4570 "configure"
#include "confdefs.h"

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

int
main (void)
{
int x = SIGWINCH
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:4585: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:4588: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:4591: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:4594: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  cf_cv_define_sigwinch=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
cat >conftest.$ac_ext <<_ACEOF
#line 4601 "configure"
#include "confdefs.h"

#undef _XOPEN_SOURCE
#undef _POSIX_SOURCE
#undef _POSIX_C_SOURCE
#include <sys/types.h>
#include <sys/signal.h>

int
main (void)
{
int x = SIGWINCH
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:4619: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:4622: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:4625: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:4628: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  cf_cv_define_sigwinch=maybe
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
cf_cv_define_sigwinch=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext

fi
rm -f conftest.$ac_objext conftest.$ac_ext

fi
echo "$as_me:4642: result: $cf_cv_define_sigwinch" >&5
echo "${ECHO_T}$cf_cv_define_sigwinch" >&6

if test "$cf_cv_define_sigwinch" = maybe ; then
echo "$as_me:4646: checking for actual SIGWINCH definition" >&5
echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
if test "${cf_cv_fixup_sigwinch+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

cf_cv_fixup_sigwinch=unknown
cf_sigwinch=32
while test $cf_sigwinch != 1
do
	cat >conftest.$ac_ext <<_ACEOF
#line 4657 "configure"
#include "confdefs.h"

#undef _XOPEN_SOURCE
#undef _POSIX_SOURCE
#undef _POSIX_C_SOURCE
#include <sys/types.h>
#include <sys/signal.h>

int
main (void)
{

#if SIGWINCH != $cf_sigwinch
make an error
#endif
int x = SIGWINCH
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:4679: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:4682: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:4685: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:4688: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  cf_cv_fixup_sigwinch=$cf_sigwinch
	 break
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest.$ac_objext conftest.$ac_ext

cf_sigwinch=`expr $cf_sigwinch - 1`
done

fi
echo "$as_me:4702: result: $cf_cv_fixup_sigwinch" >&5
echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6

	if test "$cf_cv_fixup_sigwinch" != unknown ; then
		CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
	fi
fi

case $cf_cv_system_name in
(os2*)
	CFLAGS="$CFLAGS -Zmt"

	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
	CPPFLAGS="${CPPFLAGS}-D__ST_MT_ERRNO__"

	CXXFLAGS="$CXXFLAGS -Zmt"
	# autoconf's macro sets -Zexe and suffix both, which conflict:w
	LDFLAGS="$LDFLAGS -Zmt -Zcrtdll"
	ac_cv_exeext=.exe
	;;
esac

PROG_EXT="$EXEEXT"

test -n "$PROG_EXT" &&
cat >>confdefs.h <<EOF
#define PROG_EXT "$PROG_EXT"
EOF

	case $cf_cv_system_name in
	(OS/2*|os2*)
		if test "$DFT_LWR_MODEL" = libtool; then
			LIB_PREFIX='lib'
		else
			LIB_PREFIX=''
		fi
		;;
	(*)	LIB_PREFIX='lib'
		;;
	esac
LIB_PREFIX=$LIB_PREFIX

echo "$as_me:4744: checking whether ln -s works" >&5
echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
LN_S=$as_ln_s
if test "$LN_S" = "ln -s"; then
  echo "$as_me:4748: result: yes" >&5
echo "${ECHO_T}yes" >&6
else
  echo "$as_me:4751: result: no, using $LN_S" >&5
echo "${ECHO_T}no, using $LN_S" >&6
fi

if test "$cross_compiling" = yes ; then

	# defaults that we might want to override
	: ${BUILD_CFLAGS:=''}
	: ${BUILD_CPPFLAGS:='-I$(INCDIR)'}
	: ${BUILD_LDFLAGS:=''}
	: ${BUILD_LIBS:=''}
	: ${BUILD_EXEEXT:='$x'}
	: ${BUILD_OBJEXT:='o'}

# Check whether --with-build-cc or --without-build-cc was given.
if test "${with_build_cc+set}" = set; then
  withval="$with_build_cc"
  BUILD_CC="$withval"
else
  for ac_prog in gcc clang c99 c89 cc cl
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 "$as_me:4774: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_BUILD_CC+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$BUILD_CC"; then
  ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
else
  ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  $as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_BUILD_CC="$ac_prog"
echo "$as_me:4789: found $ac_dir/$ac_word" >&5
break
done

fi
fi
BUILD_CC=$ac_cv_prog_BUILD_CC
if test -n "$BUILD_CC"; then
  echo "$as_me:4797: result: $BUILD_CC" >&5
echo "${ECHO_T}$BUILD_CC" >&6
else
  echo "$as_me:4800: result: no" >&5
echo "${ECHO_T}no" >&6
fi

  test -n "$BUILD_CC" && break
done
test -n "$BUILD_CC" || BUILD_CC="none"

fi;
	echo "$as_me:4809: checking for native build C compiler" >&5
echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
	echo "$as_me:4811: result: $BUILD_CC" >&5
echo "${ECHO_T}$BUILD_CC" >&6

	echo "$as_me:4814: checking for native build C preprocessor" >&5
echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6

# Check whether --with-build-cpp or --without-build-cpp was given.
if test "${with_build_cpp+set}" = set; then
  withval="$with_build_cpp"
  BUILD_CPP="$withval"
else
  BUILD_CPP='${BUILD_CC} -E'
fi;
	echo "$as_me:4824: result: $BUILD_CPP" >&5
echo "${ECHO_T}$BUILD_CPP" >&6

	echo "$as_me:4827: checking for native build C flags" >&5
echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6

# Check whether --with-build-cflags or --without-build-cflags was given.
if test "${with_build_cflags+set}" = set; then
  withval="$with_build_cflags"
  BUILD_CFLAGS="$withval"
fi;
	echo "$as_me:4835: result: $BUILD_CFLAGS" >&5
echo "${ECHO_T}$BUILD_CFLAGS" >&6

	echo "$as_me:4838: checking for native build C preprocessor-flags" >&5
echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6

# Check whether --with-build-cppflags or --without-build-cppflags was given.
if test "${with_build_cppflags+set}" = set; then
  withval="$with_build_cppflags"
  BUILD_CPPFLAGS="$withval"
fi;
	echo "$as_me:4846: result: $BUILD_CPPFLAGS" >&5
echo "${ECHO_T}$BUILD_CPPFLAGS" >&6

	echo "$as_me:4849: checking for native build linker-flags" >&5
echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6

# Check whether --with-build-ldflags or --without-build-ldflags was given.
if test "${with_build_ldflags+set}" = set; then
  withval="$with_build_ldflags"
  BUILD_LDFLAGS="$withval"
fi;
	echo "$as_me:4857: result: $BUILD_LDFLAGS" >&5
echo "${ECHO_T}$BUILD_LDFLAGS" >&6

	echo "$as_me:4860: checking for native build linker-libraries" >&5
echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6

# Check whether --with-build-libs or --without-build-libs was given.
if test "${with_build_libs+set}" = set; then
  withval="$with_build_libs"
  BUILD_LIBS="$withval"
fi;
	echo "$as_me:4868: result: $BUILD_LIBS" >&5
echo "${ECHO_T}$BUILD_LIBS" >&6

	# this assumes we're on Unix.
	BUILD_EXEEXT=
	BUILD_OBJEXT=o

	: ${BUILD_CC:='${CC}'}

	if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
		{ { echo "$as_me:4878: error: Cross-build requires two compilers.
Use --with-build-cc to specify the native compiler." >&5
echo "$as_me: error: Cross-build requires two compilers.
Use --with-build-cc to specify the native compiler." >&2;}
   { (exit 1); exit 1; }; }
	fi

else
	: ${BUILD_CC:='${CC}'}
	: ${BUILD_CPP:='${CPP}'}
	: ${BUILD_CFLAGS:='${CFLAGS}'}
	: ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
	: ${BUILD_LDFLAGS:='${LDFLAGS}'}
	: ${BUILD_LIBS:='${LIBS}'}
	: ${BUILD_EXEEXT:='$x'}
	: ${BUILD_OBJEXT:='o'}
fi

if test -n "$ac_tool_prefix"; then
  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
set dummy ${ac_tool_prefix}ranlib; ac_word=$2
echo "$as_me:4899: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_RANLIB+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$RANLIB"; then
  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
else
  ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  $as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
echo "$as_me:4914: found $ac_dir/$ac_word" >&5
break
done

fi
fi
RANLIB=$ac_cv_prog_RANLIB
if test -n "$RANLIB"; then
  echo "$as_me:4922: result: $RANLIB" >&5
echo "${ECHO_T}$RANLIB" >&6
else
  echo "$as_me:4925: result: no" >&5
echo "${ECHO_T}no" >&6
fi

fi
if test -z "$ac_cv_prog_RANLIB"; then
  ac_ct_RANLIB=$RANLIB
  # Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo "$as_me:4934: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_RANLIB"; then
  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
else
  ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  $as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_ac_ct_RANLIB="ranlib"
echo "$as_me:4949: found $ac_dir/$ac_word" >&5
break
done

  test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
fi
fi
ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
if test -n "$ac_ct_RANLIB"; then
  echo "$as_me:4958: result: $ac_ct_RANLIB" >&5
echo "${ECHO_T}$ac_ct_RANLIB" >&6
else
  echo "$as_me:4961: result: no" >&5
echo "${ECHO_T}no" >&6
fi

  RANLIB=$ac_ct_RANLIB
else
  RANLIB="$ac_cv_prog_RANLIB"
fi

if test -n "$ac_tool_prefix"; then
  # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
set dummy ${ac_tool_prefix}ld; ac_word=$2
echo "$as_me:4973: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_LD+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$LD"; then
  ac_cv_prog_LD="$LD" # Let the user override the test.
else
  ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  $as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_LD="${ac_tool_prefix}ld"
echo "$as_me:4988: found $ac_dir/$ac_word" >&5
break
done

fi
fi
LD=$ac_cv_prog_LD
if test -n "$LD"; then
  echo "$as_me:4996: result: $LD" >&5
echo "${ECHO_T}$LD" >&6
else
  echo "$as_me:4999: result: no" >&5
echo "${ECHO_T}no" >&6
fi

fi
if test -z "$ac_cv_prog_LD"; then
  ac_ct_LD=$LD
  # Extract the first word of "ld", so it can be a program name with args.
set dummy ld; ac_word=$2
echo "$as_me:5008: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_LD"; then
  ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
else
  ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  $as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_ac_ct_LD="ld"
echo "$as_me:5023: found $ac_dir/$ac_word" >&5
break
done

  test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
fi
fi
ac_ct_LD=$ac_cv_prog_ac_ct_LD
if test -n "$ac_ct_LD"; then
  echo "$as_me:5032: result: $ac_ct_LD" >&5
echo "${ECHO_T}$ac_ct_LD" >&6
else
  echo "$as_me:5035: result: no" >&5
echo "${ECHO_T}no" >&6
fi

  LD=$ac_ct_LD
else
  LD="$ac_cv_prog_LD"
fi

if test -n "$ac_tool_prefix"; then
  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
set dummy ${ac_tool_prefix}ar; ac_word=$2
echo "$as_me:5047: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_AR+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$AR"; then
  ac_cv_prog_AR="$AR" # Let the user override the test.
else
  ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  $as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_AR="${ac_tool_prefix}ar"
echo "$as_me:5062: found $ac_dir/$ac_word" >&5
break
done

fi
fi
AR=$ac_cv_prog_AR
if test -n "$AR"; then
  echo "$as_me:5070: result: $AR" >&5
echo "${ECHO_T}$AR" >&6
else
  echo "$as_me:5073: result: no" >&5
echo "${ECHO_T}no" >&6
fi

fi
if test -z "$ac_cv_prog_AR"; then
  ac_ct_AR=$AR
  # Extract the first word of "ar", so it can be a program name with args.
set dummy ar; ac_word=$2
echo "$as_me:5082: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_AR"; then
  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
else
  ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  $as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_ac_ct_AR="ar"
echo "$as_me:5097: found $ac_dir/$ac_word" >&5
break
done

  test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
fi
fi
ac_ct_AR=$ac_cv_prog_ac_ct_AR
if test -n "$ac_ct_AR"; then
  echo "$as_me:5106: result: $ac_ct_AR" >&5
echo "${ECHO_T}$ac_ct_AR" >&6
else
  echo "$as_me:5109: result: no" >&5
echo "${ECHO_T}no" >&6
fi

  AR=$ac_ct_AR
else
  AR="$ac_cv_prog_AR"
fi

echo "$as_me:5118: checking for options to update archives" >&5
echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
if test "${cf_cv_ar_flags+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

	cf_cv_ar_flags=unknown
	for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
	do

		# check if $ARFLAGS already contains this choice
		if test "x$ARFLAGS" != "x" ; then
			cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
			if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
				cf_cv_ar_flags=
				break
			fi
		fi

		rm -f conftest.$ac_cv_objext
		rm -f conftest.a

		cat >conftest.$ac_ext <<EOF
#line 5141 "configure"
int	testdata[3] = { 123, 456, 789 };
EOF
		if { (eval echo "$as_me:5144: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:5147: \$? = $ac_status" >&5
  (exit $ac_status); } ; then
			echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
			$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
			if test -f conftest.a ; then
				cf_cv_ar_flags=$cf_ar_flags
				break
			fi
		else
			test -n "$verbose" && echo "	cannot compile test-program" 1>&6

echo "${as_me:-configure}:5158: testing cannot compile test-program ..." 1>&5

			break
		fi
	done
	rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext

fi
echo "$as_me:5166: result: $cf_cv_ar_flags" >&5
echo "${ECHO_T}$cf_cv_ar_flags" >&6

if test -n "$ARFLAGS" ; then
	if test -n "$cf_cv_ar_flags" ; then
		ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
	fi
else
	ARFLAGS=$cf_cv_ar_flags
fi

case "$host_cpu:$host_vendor:$host_os" in
	# check for cygwin environment
	# -DSTATIC is needed for pcre
	*:*:*cygwin*)	#(vi
		PCRE_DEFINES="$PCRE_DEFINES -DSTATIC"
		;;
	# SEIUX doesn't have any useful preprocessor symbol
	mips:sei:seiux*)	#(vi
		cat >>confdefs.h <<\EOF
#define SEIUX 1
EOF

		;;
esac

echo "$as_me:5192: checking if you would like to use heapsort" >&5
echo $ECHO_N "checking if you would like to use heapsort... $ECHO_C" >&6

# Check whether --enable-heapsort or --disable-heapsort was given.
if test "${enable_heapsort+set}" = set; then
  enableval="$enable_heapsort"
  test "$enableval" != no && enableval=yes
	if test "$enableval" != "yes" ; then
    cf_use_heapsort=no
	else
		cf_use_heapsort=yes
	fi
else
  enableval=yes
	cf_use_heapsort=yes

fi;
echo "$as_me:5209: result: $cf_use_heapsort" >&5
echo "${ECHO_T}$cf_use_heapsort" >&6
if test "x$cf_use_heapsort" = xyes; then

for ac_func in heapsort
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:5216: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 5222 "configure"
#include "confdefs.h"
#define $ac_func autoconf_temporary
#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
#undef $ac_func

#ifdef __cplusplus
extern "C"
#endif

/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char $ac_func (void);

int
main (void)
{

/* The GNU C library defines stubs for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
#error found stub for $ac_func
#endif

	return $ac_func ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:5253: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:5256: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:5259: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:5262: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:5272: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF

fi
done

	if test x"$ac_cv_func_heapsort" = xyes; then
		echo "$as_me:5283: checking if its prototype is compatible with qsort" >&5
echo $ECHO_N "checking if its prototype is compatible with qsort... $ECHO_C" >&6
		cat >conftest.$ac_ext <<_ACEOF
#line 5286 "configure"
#include "confdefs.h"

#include <stdlib.h>
#include <sys/types.h>
extern int my_compare(const void *, const void *);

int
main (void)
{

	char *base = 0;
	heapsort((void *)0, 1, 2, my_compare);

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:5305: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:5308: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:5311: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:5314: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  :
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
cf_use_heapsort=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext;
		echo "$as_me:5323: result: $cf_use_heapsort" >&5
echo "${ECHO_T}$cf_use_heapsort" >&6
	else
		test -n "$verbose" && echo "	will use our own heapsort function" 1>&6

echo "${as_me:-configure}:5328: testing will use our own heapsort function ..." 1>&5

		EXTRAO_DEP=''
		EXTRAOBJS="$EXTRAOBJS \$(OBJDIR)/heapsort.o"
	fi
fi
if test "x$cf_use_heapsort" = xyes; then
	cat >>confdefs.h <<\EOF
#define USE_HEAPSORT 1
EOF

fi

# Check whether --with-ispell or --without-ispell was given.
if test "${with_ispell+set}" = set; then
  withval="$with_ispell"
  case "$withval" in #(vi
  yes)
   { { echo "$as_me:5346: error: expected a value for --with-ispell" >&5
echo "$as_me: error: expected a value for --with-ispell" >&2;}
   { (exit 1); exit 1; }; }
   ;; #(vi
  no)
   ;; #(vi
  *)
   # user supplied option-value for "--with-ispell=path"
   echo "$as_me:5354: checking for ispell" >&5
echo $ECHO_N "checking for ispell... $ECHO_C" >&6
   ac_cv_path_PATH_ISPELL="$withval"
   cat >>confdefs.h <<EOF
#define PATH_ISPELL "$withval"
EOF
   cat >>confdefs.h <<\EOF
#define HAVE_ISPELL 1
EOF
   echo "$as_me:5363: result: $withval" >&5
echo "${ECHO_T}$withval" >&6
   ;;
 esac
else

  # user did not specify "--with-ispell"; do automatic check
  # Extract the first word of "ispell", so it can be a program name with args.
set dummy ispell; ac_word=$2
echo "$as_me:5372: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_path_PATH_ISPELL+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $PATH_ISPELL in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_PATH_ISPELL="$PATH_ISPELL" # Let the user override the test with a path.
  ;;
  *)
  ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  if $as_executable_p "$ac_dir/$ac_word"; then
   ac_cv_path_PATH_ISPELL="$ac_dir/$ac_word"
   echo "$as_me:5389: found $ac_dir/$ac_word" >&5
   break
fi
done

  ;;
esac
fi
PATH_ISPELL=$ac_cv_path_PATH_ISPELL

if test -n "$PATH_ISPELL"; then
  echo "$as_me:5400: result: $PATH_ISPELL" >&5
echo "${ECHO_T}$PATH_ISPELL" >&6
else
  echo "$as_me:5403: result: no" >&5
echo "${ECHO_T}no" >&6
fi

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

fi;

# Check whether --with-metamail or --without-metamail was given.
if test "${with_metamail+set}" = set; then
  withval="$with_metamail"
  case "$withval" in #(vi
  yes)
   { { echo "$as_me:5423: error: expected a value for --with-metamail" >&5
echo "$as_me: error: expected a value for --with-metamail" >&2;}
   { (exit 1); exit 1; }; }
   ;; #(vi
  no)
   ;; #(vi
  *)
   # user supplied option-value for "--with-metamail=path"
   echo "$as_me:5431: checking for metamail" >&5
echo $ECHO_N "checking for metamail... $ECHO_C" >&6
   ac_cv_path_PATH_METAMAIL="$withval"
   cat >>confdefs.h <<EOF
#define PATH_METAMAIL "$withval"
EOF
   cat >>confdefs.h <<\EOF
#define HAVE_METAMAIL 1
EOF
   echo "$as_me:5440: result: $withval" >&5
echo "${ECHO_T}$withval" >&6
   ;;
 esac
else

  # user did not specify "--with-metamail"; do automatic check
  # Extract the first word of "metamail", so it can be a program name with args.
set dummy metamail; ac_word=$2
echo "$as_me:5449: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_path_PATH_METAMAIL+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $PATH_METAMAIL in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_PATH_METAMAIL="$PATH_METAMAIL" # Let the user override the test with a path.
  ;;
  *)
  ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  if $as_executable_p "$ac_dir/$ac_word"; then
   ac_cv_path_PATH_METAMAIL="$ac_dir/$ac_word"
   echo "$as_me:5466: found $ac_dir/$ac_word" >&5
   break
fi
done

  ;;
esac
fi
PATH_METAMAIL=$ac_cv_path_PATH_METAMAIL

if test -n "$PATH_METAMAIL"; then
  echo "$as_me:5477: result: $PATH_METAMAIL" >&5
echo "${ECHO_T}$PATH_METAMAIL" >&6
else
  echo "$as_me:5480: result: no" >&5
echo "${ECHO_T}no" >&6
fi

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

fi;

# Check whether --with-sum or --without-sum was given.
if test "${with_sum+set}" = set; then
  withval="$with_sum"
  case "$withval" in #(vi
  yes)
   { { echo "$as_me:5500: error: expected a value for --with-sum" >&5
echo "$as_me: error: expected a value for --with-sum" >&2;}
   { (exit 1); exit 1; }; }
   ;; #(vi
  no)
   ;; #(vi
  *)
   # user supplied option-value for "--with-sum=path"
   echo "$as_me:5508: checking for sum" >&5
echo $ECHO_N "checking for sum... $ECHO_C" >&6
   ac_cv_path_PATH_SUM="$withval"
   cat >>confdefs.h <<EOF
#define PATH_SUM "$withval"
EOF
   cat >>confdefs.h <<\EOF
#define HAVE_SUM 1
EOF
   echo "$as_me:5517: result: $withval" >&5
echo "${ECHO_T}$withval" >&6
   ;;
 esac
else

  # user did not specify "--with-sum"; do automatic check
  # Extract the first word of "sum", so it can be a program name with args.
set dummy sum; ac_word=$2
echo "$as_me:5526: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_path_PATH_SUM+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $PATH_SUM in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_PATH_SUM="$PATH_SUM" # Let the user override the test with a path.
  ;;
  *)
  ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  if $as_executable_p "$ac_dir/$ac_word"; then
   ac_cv_path_PATH_SUM="$ac_dir/$ac_word"
   echo "$as_me:5543: found $ac_dir/$ac_word" >&5
   break
fi
done

  ;;
esac
fi
PATH_SUM=$ac_cv_path_PATH_SUM

if test -n "$PATH_SUM"; then
  echo "$as_me:5554: result: $PATH_SUM" >&5
echo "${ECHO_T}$PATH_SUM" >&6
else
  echo "$as_me:5557: result: no" >&5
echo "${ECHO_T}no" >&6
fi

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

fi;

if test $ac_cv_path_PATH_SUM
then
echo "$as_me:5574: checking if $ac_cv_path_PATH_SUM takes -r" >&5
echo $ECHO_N "checking if $ac_cv_path_PATH_SUM takes -r... $ECHO_C" >&6
if test "${ac_cv_prog_sum_r+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

if { ac_try='$ac_cv_path_PATH_SUM -r config.log 1>&5'
  { (eval echo "$as_me:5581: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:5584: \$? = $ac_status" >&5
  (exit $ac_status); }; }
then
	ac_cv_prog_sum_r=yes
else
	ac_cv_prog_sum_r=no
fi

fi

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

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

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

fi
echo "$as_me:5609: result: $ac_cv_prog_sum_r" >&5
echo "${ECHO_T}$ac_cv_prog_sum_r" >&6
fi

echo "$as_me:5613: checking for default editor" >&5
echo $ECHO_N "checking for default editor... $ECHO_C" >&6

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

else
  withval="${DEFAULT_EDITOR}"
fi; test -n "$withval" && \
case "$withval" in #(vi
yes)
  { { echo "$as_me:5625: error: expected a value for --with-editor" >&5
echo "$as_me: error: expected a value for --with-editor" >&2;}
   { (exit 1); exit 1; }; }
  ;; #(vi
no) withval=""
  ;;
esac
DEFAULT_EDITOR="$withval"

if test -z "$DEFAULT_EDITOR" ; then
    if test -n "$EDITOR" ; then
    	DEFAULT_EDITOR="$EDITOR"
    elif test -n "$VISUAL" ; then
    	DEFAULT_EDITOR="$VISUAL"
    else
	# Extract the first word of "vi", so it can be a program name with args.
set dummy vi; ac_word=$2
echo "$as_me:5642: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_path_DEFAULT_EDITOR+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $DEFAULT_EDITOR in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_DEFAULT_EDITOR="$DEFAULT_EDITOR" # Let the user override the test with a path.
  ;;
  *)
  ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$PATH:/usr/bin:/usr/ucb"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  if $as_executable_p "$ac_dir/$ac_word"; then
   ac_cv_path_DEFAULT_EDITOR="$ac_dir/$ac_word"
   echo "$as_me:5659: found $ac_dir/$ac_word" >&5
   break
fi
done

  test -z "$ac_cv_path_DEFAULT_EDITOR" && ac_cv_path_DEFAULT_EDITOR="vi"
  ;;
esac
fi
DEFAULT_EDITOR=$ac_cv_path_DEFAULT_EDITOR

if test -n "$DEFAULT_EDITOR"; then
  echo "$as_me:5671: result: $DEFAULT_EDITOR" >&5
echo "${ECHO_T}$DEFAULT_EDITOR" >&6
else
  echo "$as_me:5674: result: no" >&5
echo "${ECHO_T}no" >&6
fi

    fi
fi
echo "$as_me:5680: result: $DEFAULT_EDITOR" >&5
echo "${ECHO_T}$DEFAULT_EDITOR" >&6
cat >>confdefs.h <<EOF
#define DEFAULT_EDITOR "$DEFAULT_EDITOR"
EOF

# Extract the first word of "sendmail", so it can be a program name with args.
set dummy sendmail; ac_word=$2
echo "$as_me:5688: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_path_DEFAULT_MAILER+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $DEFAULT_MAILER in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_DEFAULT_MAILER="$DEFAULT_MAILER" # Let the user override the test with a path.
  ;;
  *)
  ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$PATH:/usr/sbin:/usr/lib"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  if $as_executable_p "$ac_dir/$ac_word"; then
   ac_cv_path_DEFAULT_MAILER="$ac_dir/$ac_word"
   echo "$as_me:5705: found $ac_dir/$ac_word" >&5
   break
fi
done

  ;;
esac
fi
DEFAULT_MAILER=$ac_cv_path_DEFAULT_MAILER

if test -n "$DEFAULT_MAILER"; then
  echo "$as_me:5716: result: $DEFAULT_MAILER" >&5
echo "${ECHO_T}$DEFAULT_MAILER" >&6
else
  echo "$as_me:5719: result: no" >&5
echo "${ECHO_T}no" >&6
fi

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

else
  withval="${DEFAULT_MAILER}"
fi; test -n "$withval" && \
case "$withval" in #(vi
yes)
  { { echo "$as_me:5732: error: expected a value for --with-mailer" >&5
echo "$as_me: error: expected a value for --with-mailer" >&2;}
   { (exit 1); exit 1; }; }
  ;; #(vi
no) withval=""
  ;;
esac
DEFAULT_MAILER="$withval"

if test -z "$DEFAULT_MAILER" ; then
# Extract the first word of "mailx", so it can be a program name with args.
set dummy mailx; ac_word=$2
echo "$as_me:5744: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_path_DEFAULT_MAILER+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $DEFAULT_MAILER in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_DEFAULT_MAILER="$DEFAULT_MAILER" # Let the user override the test with a path.
  ;;
  *)
  ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$PATH:/usr/bin"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  if $as_executable_p "$ac_dir/$ac_word"; then
   ac_cv_path_DEFAULT_MAILER="$ac_dir/$ac_word"
   echo "$as_me:5761: found $ac_dir/$ac_word" >&5
   break
fi
done

  ;;
esac
fi
DEFAULT_MAILER=$ac_cv_path_DEFAULT_MAILER

if test -n "$DEFAULT_MAILER"; then
  echo "$as_me:5772: result: $DEFAULT_MAILER" >&5
echo "${ECHO_T}$DEFAULT_MAILER" >&6
else
  echo "$as_me:5775: result: no" >&5
echo "${ECHO_T}no" >&6
fi

fi
if test -z "$DEFAULT_MAILER" ; then
# Extract the first word of "mail", so it can be a program name with args.
set dummy mail; ac_word=$2
echo "$as_me:5783: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_path_DEFAULT_MAILER+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $DEFAULT_MAILER in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_DEFAULT_MAILER="$DEFAULT_MAILER" # Let the user override the test with a path.
  ;;
  *)
  ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$PATH:/usr/bin"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  if $as_executable_p "$ac_dir/$ac_word"; then
   ac_cv_path_DEFAULT_MAILER="$ac_dir/$ac_word"
   echo "$as_me:5800: found $ac_dir/$ac_word" >&5
   break
fi
done

  ;;
esac
fi
DEFAULT_MAILER=$ac_cv_path_DEFAULT_MAILER

if test -n "$DEFAULT_MAILER"; then
  echo "$as_me:5811: result: $DEFAULT_MAILER" >&5
echo "${ECHO_T}$DEFAULT_MAILER" >&6
else
  echo "$as_me:5814: result: no" >&5
echo "${ECHO_T}no" >&6
fi

fi
echo "$as_me:5819: checking for default mailer" >&5
echo $ECHO_N "checking for default mailer... $ECHO_C" >&6
if test -n "$DEFAULT_MAILER" ; then

case $cf_cv_system_name in #(vi
os2*|cygwin*)
	ac_cv_path_DEFAULT_MAILER=`echo "$ac_cv_path_DEFAULT_MAILER" | sed -e 's%\\\\%/%g'`
	;;
esac

case $cf_cv_system_name in #(vi
os2*|cygwin*)
	DEFAULT_MAILER=`echo "$DEFAULT_MAILER" | sed -e 's%\\\\%/%g'`
	;;
esac

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

else
	DEFAULT_MAILER=none
fi
echo "$as_me:5842: result: $DEFAULT_MAILER" >&5
echo "${ECHO_T}$DEFAULT_MAILER" >&6

echo "$as_me:5845: checking for incoming-mail directory" >&5
echo $ECHO_N "checking for incoming-mail directory... $ECHO_C" >&6

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

else
  withval="${DEFAULT_MAILBOX}"
fi; test -n "$withval" && \
case "$withval" in #(vi
yes)
  { { echo "$as_me:5857: error: expected a value for --with-mailbox" >&5
echo "$as_me: error: expected a value for --with-mailbox" >&2;}
   { (exit 1); exit 1; }; }
  ;; #(vi
no) withval=""
  ;;
esac
DEFAULT_MAILBOX="$withval"

if test -z "$DEFAULT_MAILBOX" ; then
for cf_dir in \
	/var/spool/mail \
	/usr/spool/mail \
	/var/mail \
	/usr/mail \
	/mail
    do
    	if test -d $cf_dir ; then
	    DEFAULT_MAILBOX=$cf_dir
	    break
	fi
    done
fi
if test -n "$DEFAULT_MAILBOX" ; then
	cat >>confdefs.h <<EOF
#define DEFAULT_MAILBOX "$DEFAULT_MAILBOX"
EOF

else
	DEFAULT_MAILBOX=none
fi
echo "$as_me:5888: result: $DEFAULT_MAILBOX" >&5
echo "${ECHO_T}$DEFAULT_MAILBOX" >&6

## PGP Support
echo "$as_me:5892: checking if you want PGP/GPG-Support" >&5
echo $ECHO_N "checking if you want PGP/GPG-Support... $ECHO_C" >&6

# Check whether --enable-pgp-gpg or --disable-pgp-gpg was given.
if test "${enable_pgp_gpg+set}" = set; then
  enableval="$enable_pgp_gpg"
  test "$enableval" != no && enableval=yes
	if test "$enableval" != "yes" ; then
    USE_PGP_GPG=no
	else
		USE_PGP_GPG=yes
	fi
else
  enableval=yes
	USE_PGP_GPG=yes

fi;
echo "$as_me:5909: result: $enableval" >&5
echo "${ECHO_T}$enableval" >&6
if test "$USE_PGP_GPG" = "yes" ; then

# Check whether --with-pgp or --without-pgp was given.
if test "${with_pgp+set}" = set; then
  withval="$with_pgp"
  case "$withval" in #(vi
  yes)
   { { echo "$as_me:5918: error: expected a value for --with-pgp" >&5
echo "$as_me: error: expected a value for --with-pgp" >&2;}
   { (exit 1); exit 1; }; }
   ;; #(vi
  no)
   ;; #(vi
  *)
   # user supplied option-value for "--with-pgp=path"
   echo "$as_me:5926: checking for pgp" >&5
echo $ECHO_N "checking for pgp... $ECHO_C" >&6
   ac_cv_path_PATH_PGP="$withval"
   cat >>confdefs.h <<EOF
#define PATH_PGP "$withval"
EOF
   cat >>confdefs.h <<\EOF
#define HAVE_PGP 1
EOF
   echo "$as_me:5935: result: $withval" >&5
echo "${ECHO_T}$withval" >&6
   ;;
 esac
else

  # user did not specify "--with-pgp"; do automatic check
  # Extract the first word of "pgp", so it can be a program name with args.
set dummy pgp; ac_word=$2
echo "$as_me:5944: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_path_PATH_PGP+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $PATH_PGP in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_PATH_PGP="$PATH_PGP" # Let the user override the test with a path.
  ;;
  *)
  ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  if $as_executable_p "$ac_dir/$ac_word"; then
   ac_cv_path_PATH_PGP="$ac_dir/$ac_word"
   echo "$as_me:5961: found $ac_dir/$ac_word" >&5
   break
fi
done

  ;;
esac
fi
PATH_PGP=$ac_cv_path_PATH_PGP

if test -n "$PATH_PGP"; then
  echo "$as_me:5972: result: $PATH_PGP" >&5
echo "${ECHO_T}$PATH_PGP" >&6
else
  echo "$as_me:5975: result: no" >&5
echo "${ECHO_T}no" >&6
fi

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

fi;
	# FIXME: check if pgp is pgp2 or pgp6

# Check whether --with-pgpk or --without-pgpk was given.
if test "${with_pgpk+set}" = set; then
  withval="$with_pgpk"
  case "$withval" in #(vi
  yes)
   { { echo "$as_me:5996: error: expected a value for --with-pgpk" >&5
echo "$as_me: error: expected a value for --with-pgpk" >&2;}
   { (exit 1); exit 1; }; }
   ;; #(vi
  no)
   ;; #(vi
  *)
   # user supplied option-value for "--with-pgpk=path"
   echo "$as_me:6004: checking for pgpk" >&5
echo $ECHO_N "checking for pgpk... $ECHO_C" >&6
   ac_cv_path_PATH_PGPK="$withval"
   cat >>confdefs.h <<EOF
#define PATH_PGPK "$withval"
EOF
   cat >>confdefs.h <<\EOF
#define HAVE_PGPK 1
EOF
   echo "$as_me:6013: result: $withval" >&5
echo "${ECHO_T}$withval" >&6
   ;;
 esac
else

  # user did not specify "--with-pgpk"; do automatic check
  # Extract the first word of "pgpk", so it can be a program name with args.
set dummy pgpk; ac_word=$2
echo "$as_me:6022: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_path_PATH_PGPK+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $PATH_PGPK in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_PATH_PGPK="$PATH_PGPK" # Let the user override the test with a path.
  ;;
  *)
  ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  if $as_executable_p "$ac_dir/$ac_word"; then
   ac_cv_path_PATH_PGPK="$ac_dir/$ac_word"
   echo "$as_me:6039: found $ac_dir/$ac_word" >&5
   break
fi
done

  ;;
esac
fi
PATH_PGPK=$ac_cv_path_PATH_PGPK

if test -n "$PATH_PGPK"; then
  echo "$as_me:6050: result: $PATH_PGPK" >&5
echo "${ECHO_T}$PATH_PGPK" >&6
else
  echo "$as_me:6053: result: no" >&5
echo "${ECHO_T}no" >&6
fi

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

fi;
	# FIXME: remove tailing k

# Check whether --with-gpg or --without-gpg was given.
if test "${with_gpg+set}" = set; then
  withval="$with_gpg"
  case "$withval" in #(vi
  yes)
   { { echo "$as_me:6074: error: expected a value for --with-gpg" >&5
echo "$as_me: error: expected a value for --with-gpg" >&2;}
   { (exit 1); exit 1; }; }
   ;; #(vi
  no)
   ;; #(vi
  *)
   # user supplied option-value for "--with-gpg=path"
   echo "$as_me:6082: checking for gpg" >&5
echo $ECHO_N "checking for gpg... $ECHO_C" >&6
   ac_cv_path_PATH_GPG="$withval"
   cat >>confdefs.h <<EOF
#define PATH_GPG "$withval"
EOF
   cat >>confdefs.h <<\EOF
#define HAVE_GPG 1
EOF
   echo "$as_me:6091: result: $withval" >&5
echo "${ECHO_T}$withval" >&6
   ;;
 esac
else

  # user did not specify "--with-gpg"; do automatic check
  # Extract the first word of "gpg", so it can be a program name with args.
set dummy gpg; ac_word=$2
echo "$as_me:6100: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_path_PATH_GPG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $PATH_GPG in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_PATH_GPG="$PATH_GPG" # Let the user override the test with a path.
  ;;
  *)
  ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  if $as_executable_p "$ac_dir/$ac_word"; then
   ac_cv_path_PATH_GPG="$ac_dir/$ac_word"
   echo "$as_me:6117: found $ac_dir/$ac_word" >&5
   break
fi
done

  ;;
esac
fi
PATH_GPG=$ac_cv_path_PATH_GPG

if test -n "$PATH_GPG"; then
  echo "$as_me:6128: result: $PATH_GPG" >&5
echo "${ECHO_T}$PATH_GPG" >&6
else
  echo "$as_me:6131: result: no" >&5
echo "${ECHO_T}no" >&6
fi

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

fi;
fi

## slrnface

# Check whether --with-slrnface or --without-slrnface was given.
if test "${with_slrnface+set}" = set; then
  withval="$with_slrnface"
  case "$withval" in #(vi
  yes)
   { { echo "$as_me:6154: error: expected a value for --with-slrnface" >&5
echo "$as_me: error: expected a value for --with-slrnface" >&2;}
   { (exit 1); exit 1; }; }
   ;; #(vi
  no)
   ;; #(vi
  *)
   # user supplied option-value for "--with-slrnface=path"
   echo "$as_me:6162: checking for slrnface" >&5
echo $ECHO_N "checking for slrnface... $ECHO_C" >&6
   ac_cv_path_PATH_SLRNFACE="$withval"
   cat >>confdefs.h <<EOF
#define PATH_SLRNFACE "$withval"
EOF
   cat >>confdefs.h <<\EOF
#define HAVE_SLRNFACE 1
EOF
   echo "$as_me:6171: result: $withval" >&5
echo "${ECHO_T}$withval" >&6
   ;;
 esac
else

  # user did not specify "--with-slrnface"; do automatic check
  # Extract the first word of "slrnface", so it can be a program name with args.
set dummy slrnface; ac_word=$2
echo "$as_me:6180: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_path_PATH_SLRNFACE+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $PATH_SLRNFACE in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_PATH_SLRNFACE="$PATH_SLRNFACE" # Let the user override the test with a path.
  ;;
  *)
  ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  if $as_executable_p "$ac_dir/$ac_word"; then
   ac_cv_path_PATH_SLRNFACE="$ac_dir/$ac_word"
   echo "$as_me:6197: found $ac_dir/$ac_word" >&5
   break
fi
done

  ;;
esac
fi
PATH_SLRNFACE=$ac_cv_path_PATH_SLRNFACE

if test -n "$PATH_SLRNFACE"; then
  echo "$as_me:6208: result: $PATH_SLRNFACE" >&5
echo "${ECHO_T}$PATH_SLRNFACE" >&6
else
  echo "$as_me:6211: result: no" >&5
echo "${ECHO_T}no" >&6
fi

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

fi;
if test -n "$ac_cv_path_PATH_SLRNFACE"; then
	EXTRAO_DEP=""
	EXTRAOBJS="$EXTRAOBJS \$(OBJDIR)/xface.o"
fi

## Default shell

# Check whether --with-shell or --without-shell was given.
if test "${with_shell+set}" = set; then
  withval="$with_shell"
  cf_cv_default_shell=$withval
else
  cf_cv_default_shell=
fi;

echo "$as_me:6240: checking for the default shell program" >&5
echo $ECHO_N "checking for the default shell program... $ECHO_C" >&6
cf_shell_progs="$cf_cv_default_shell"
if test -z "$cf_shell_progs" ; then
	cf_shell_progs="sh ksh bash zsh pdksh mksh jsh keysh ash dash"
	# TIN preferred default shell for BSD systems is csh. Others are sh.
	cat >conftest.$ac_ext <<_ACEOF
#line 6247 "configure"
#include "confdefs.h"

#include <sys/params.h>
int
main (void)
{

#if (defined(BSD) && (BSD >= 199103))
#else
make an error
#endif

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:6265: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:6268: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:6271: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:6274: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  $cf_shell_progs="csh tcsh $cf_shell_progs"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi

echo "${as_me:-configure}:6284: testing paths of shell programs: $cf_shell_progs ..." 1>&5

if test -s /etc/shells && test `egrep -c -v '^(#| |    |$)' /etc/shells` -gt 0; then

echo "${as_me:-configure}:6288: testing /etc/shells ..." 1>&5

	for cf_prog in $cf_shell_progs
	do
		case $cf_prog in
			/*)
				cf_pattern="^"$cf_prog"$"
				;;
			*/*)
				{ { echo "$as_me:6297: error: Program name must be absolute or filename: $cf_prog" >&5
echo "$as_me: error: Program name must be absolute or filename: $cf_prog" >&2;}
   { (exit 1); exit 1; }; }
				;;
			*)
				cf_pattern="/"$cf_prog"$"
				;;
		esac
		cf_path=`egrep $cf_pattern /etc/shells 2>/dev/null`
		if test -n "$cf_path"
		then
			for cf_shell in $cf_path
			do
				if test -f "$cf_shell"
				then
					DEFAULT_SHELL="$cf_shell"
					break
				fi
			done
		fi
		if test -n "$DEFAULT_SHELL"
		then
			break
		fi
	done
	echo "$as_me:6322: result: $DEFAULT_SHELL" >&5
echo "${ECHO_T}$DEFAULT_SHELL" >&6
else

echo "${as_me:-configure}:6326: testing $PATH ..." 1>&5

for ac_prog in $cf_shell_progs
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 "$as_me:6332: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_path_DEFAULT_SHELL+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $DEFAULT_SHELL in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_DEFAULT_SHELL="$DEFAULT_SHELL" # Let the user override the test with a path.
  ;;
  *)
  ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$PATH:/bin:/usr/bin:/usr/xpg4/bin:/bin/posix:/usr/bin/posix:/usr/old/bin:/usr/local/bin"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  if $as_executable_p "$ac_dir/$ac_word"; then
   ac_cv_path_DEFAULT_SHELL="$ac_dir/$ac_word"
   echo "$as_me:6349: found $ac_dir/$ac_word" >&5
   break
fi
done

  ;;
esac
fi
DEFAULT_SHELL=$ac_cv_path_DEFAULT_SHELL

if test -n "$DEFAULT_SHELL"; then
  echo "$as_me:6360: result: $DEFAULT_SHELL" >&5
echo "${ECHO_T}$DEFAULT_SHELL" >&6
else
  echo "$as_me:6363: result: no" >&5
echo "${ECHO_T}no" >&6
fi

  test -n "$DEFAULT_SHELL" && break
done

fi
if test -z "$DEFAULT_SHELL" ; then
	{ echo "$as_me:6372: WARNING: Cannot find the default shell you specified: $cf_shell_progs" >&5
echo "$as_me: WARNING: Cannot find the default shell you specified: $cf_shell_progs" >&2;}
	if test -f /bin/false ; then
		{ echo "$as_me:6375: WARNING: Using /bin/false instead" >&5
echo "$as_me: WARNING: Using /bin/false instead" >&2;}
		DEFAULT_SHELL=/bin/false
	else
		{ { echo "$as_me:6379: error: Cannot use /bin/false because it does not exist" >&5
echo "$as_me: error: Cannot use /bin/false because it does not exist" >&2;}
   { (exit 1); exit 1; }; }
	fi
fi
cat >>confdefs.h <<EOF
#define DEFAULT_SHELL "$DEFAULT_SHELL"
EOF

### check for this early, since it'll override several options
echo "$as_me:6389: checking if NNTP-support will be used" >&5
echo $ECHO_N "checking if NNTP-support will be used... $ECHO_C" >&6

# Check whether --enable-nntp or --disable-nntp was given.
if test "${enable_nntp+set}" = set; then
  enableval="$enable_nntp"
  test "$enableval" != no && enableval=yes
	if test "$enableval" != "yes" ; then
    USE_NNTP=no
	else
		USE_NNTP=yes
	fi
else
  enableval=yes
	USE_NNTP=yes

fi;
echo "$as_me:6406: result: $enableval" >&5
echo "${ECHO_T}$enableval" >&6

USE_SPOOLDIR=yes
if test "$USE_NNTP" = "yes" ; then
echo "$as_me:6411: checking whether to be NNTP_ONLY" >&5
echo $ECHO_N "checking whether to be NNTP_ONLY... $ECHO_C" >&6

# Check whether --enable-nntp-only or --disable-nntp-only was given.
if test "${enable_nntp_only+set}" = set; then
  enableval="$enable_nntp_only"
  test "$enableval" != yes && enableval=no
	if test "$enableval" != "no" ; then
    cat >>confdefs.h <<\EOF
#define NNTP_ONLY 1
EOF

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

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

fi;
echo "$as_me:6437: result: $enableval" >&5
echo "${ECHO_T}$enableval" >&6
fi

###	use option --enable-debug to compile-in test/development code
echo "$as_me:6442: checking if you want to compile-in debug support" >&5
echo $ECHO_N "checking if you want to compile-in debug support... $ECHO_C" >&6

# Check whether --enable-debug or --disable-debug was given.
if test "${enable_debug+set}" = set; then
  enableval="$enable_debug"
  test "$enableval" != yes && enableval=no
	if test "$enableval" != "no" ; then
    ENABLE_DEBUG=''
	CFLAGS="-g $CFLAGS"
	LDFLAGS="-g $LDFLAGS"
	else
		ENABLE_DEBUG='#'
	test -z "$save_CFLAGS" && CFLAGS=`echo $CFLAGS|sed -e 's/-g //' -e 's/-g$//'`
	fi
else
  enableval=no
	ENABLE_DEBUG='#'
	test -z "$save_CFLAGS" && CFLAGS=`echo $CFLAGS|sed -e 's/-g //' -e 's/-g$//'`

fi;
echo "$as_me:6463: result: $enableval" >&5
echo "${ECHO_T}$enableval" >&6

###	use option --disable-echo to suppress full display compiling commands

echo "$as_me:6468: checking if you want to see long compiling messages" >&5
echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6

# Check whether --enable-echo or --disable-echo was given.
if test "${enable_echo+set}" = set; then
  enableval="$enable_echo"
  test "$enableval" != no && enableval=yes
	if test "$enableval" != "yes" ; then

	ECHO_LT='--silent'
	ECHO_LD='@echo linking $@;'
	RULE_CC='@echo compiling $<'
	SHOW_CC='@echo compiling $@'
	ECHO_CC='@'

	else

	ECHO_LT=''
	ECHO_LD=''
	RULE_CC=''
	SHOW_CC=''
	ECHO_CC=''

	fi
else
  enableval=yes

	ECHO_LT=''
	ECHO_LD=''
	RULE_CC=''
	SHOW_CC=''
	ECHO_CC=''

fi;
echo "$as_me:6502: result: $enableval" >&5
echo "${ECHO_T}$enableval" >&6

### use option --enable-prototypes to turn on optional prototypes
echo "$as_me:6506: checking if you want to compile with fallback prototypes" >&5
echo $ECHO_N "checking if you want to compile with fallback prototypes... $ECHO_C" >&6

# Check whether --enable-prototypes or --disable-prototypes was given.
if test "${enable_prototypes+set}" = set; then
  enableval="$enable_prototypes"
  test "$enableval" != yes && enableval=no
	if test "$enableval" != "no" ; then
    with_decl_check=yes
	else
		with_decl_check=no
	fi
else
  enableval=no
	with_decl_check=no

fi;
echo "$as_me:6523: result: $enableval" >&5
echo "${ECHO_T}$enableval" >&6

###	use option --enable-warnings to turn on all gcc warnings
EXTRA_CFLAGS=""
if test -n "$GCC"
then
echo "$as_me:6530: checking if you want to turn on gcc warnings" >&5
echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6

# Check whether --enable-warnings or --disable-warnings was given.
if test "${enable_warnings+set}" = set; then
  enableval="$enable_warnings"
  test "$enableval" != yes && enableval=no
	if test "$enableval" != "no" ; then
    with_warnings=yes
	else
		with_warnings=no
	fi
else
  enableval=no
	with_warnings=no

fi;
echo "$as_me:6547: result: $with_warnings" >&5
echo "${ECHO_T}$with_warnings" >&6
if test "$with_warnings" = "yes"
then
	with_ext_const=yes

INTEL_COMPILER=no

if test "$GCC" = yes ; then
	case $host_os in
	(linux*|gnu*)
		echo "$as_me:6558: checking if this is really Intel C compiler" >&5
echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
		cf_save_CFLAGS="$CFLAGS"
		CFLAGS="$CFLAGS -no-gcc"
		cat >conftest.$ac_ext <<_ACEOF
#line 6563 "configure"
#include "confdefs.h"

int
main (void)
{

#ifdef __INTEL_COMPILER
#else
make an error
#endif

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:6580: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:6583: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:6586: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:6589: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  INTEL_COMPILER=yes
cf_save_CFLAGS="$cf_save_CFLAGS -we147"

else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest.$ac_objext conftest.$ac_ext
		CFLAGS="$cf_save_CFLAGS"
		echo "$as_me:6600: result: $INTEL_COMPILER" >&5
echo "${ECHO_T}$INTEL_COMPILER" >&6
		;;
	esac
fi

CLANG_COMPILER=no

if test "$GCC" = yes ; then
	echo "$as_me:6609: checking if this is really Clang C compiler" >&5
echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
	cf_save_CFLAGS="$CFLAGS"
	CFLAGS="$CFLAGS -Qunused-arguments"
	cat >conftest.$ac_ext <<_ACEOF
#line 6614 "configure"
#include "confdefs.h"

int
main (void)
{

#ifdef __clang__
#else
make an error
#endif

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:6631: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:6634: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:6637: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:6640: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  CLANG_COMPILER=yes
cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"

else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest.$ac_objext conftest.$ac_ext
	CFLAGS="$cf_save_CFLAGS"
	echo "$as_me:6651: result: $CLANG_COMPILER" >&5
echo "${ECHO_T}$CLANG_COMPILER" >&6
fi

cat > conftest.$ac_ext <<EOF
#line 6656 "${as_me:-configure}"
int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
EOF

if test "$INTEL_COMPILER" = yes
then
# The "-wdXXX" options suppress warnings:
# remark #1419: external declaration in primary source file
# remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
# remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
# remark #193: zero used for undefined preprocessing identifier
# remark #593: variable "curs_sb_left_arrow" was set but never used
# remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
# remark #869: parameter "tw" was never referenced
# remark #981: operands are evaluated in unspecified order
# warning #279: controlling expression is constant

	{ echo "$as_me:6673: checking for $CC warning options..." >&5
echo "$as_me: checking for $CC warning options..." >&6;}
	cf_save_CFLAGS="$CFLAGS"
	EXTRA_CFLAGS="-Wall"
	for cf_opt in \
		wd1419 \
		wd1683 \
		wd1684 \
		wd193 \
		wd593 \
		wd279 \
		wd810 \
		wd869 \
		wd981
	do
		CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
		if { (eval echo "$as_me:6689: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:6692: \$? = $ac_status" >&5
  (exit $ac_status); }; then
			test -n "$verbose" && echo "$as_me:6694: result: ... -$cf_opt" >&5
echo "${ECHO_T}... -$cf_opt" >&6
			EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
		fi
	done
	CFLAGS="$cf_save_CFLAGS"

elif test "$GCC" = yes
then
	{ echo "$as_me:6703: checking for $CC warning options..." >&5
echo "$as_me: checking for $CC warning options..." >&6;}
	cf_save_CFLAGS="$CFLAGS"
	EXTRA_CFLAGS=
	cf_warn_CONST=""
	test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
	cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
	test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
	for cf_opt in W Wall \
		Wbad-function-cast \
		Wcast-align \
		Wcast-qual \
		Wdeclaration-after-statement \
		Wextra \
		Winline \
		Wmissing-declarations \
		Wmissing-prototypes \
		Wnested-externs \
		Wpointer-arith \
		Wshadow \
		Wstrict-prototypes \
		Wundef $cf_gcc_warnings $cf_warn_CONST
	do
		CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
		if { (eval echo "$as_me:6727: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:6730: \$? = $ac_status" >&5
  (exit $ac_status); }; then
			test -n "$verbose" && echo "$as_me:6732: result: ... -$cf_opt" >&5
echo "${ECHO_T}... -$cf_opt" >&6
			case $cf_opt in
			(Wcast-qual)

	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
	CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"

				;;
			(Winline)
				case $GCC_VERSION in
				([34].*)
					test -n "$verbose" && echo "	feature is broken in gcc $GCC_VERSION" 1>&6

echo "${as_me:-configure}:6746: testing feature is broken in gcc $GCC_VERSION ..." 1>&5

					continue;;
				esac
				;;
			(Wpointer-arith)
				case $GCC_VERSION in
				([12].*)
					test -n "$verbose" && echo "	feature is broken in gcc $GCC_VERSION" 1>&6

echo "${as_me:-configure}:6756: testing feature is broken in gcc $GCC_VERSION ..." 1>&5

					continue;;
				esac
				;;
			esac
			EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
		fi
	done
	CFLAGS="$cf_save_CFLAGS"
fi
rm -rf conftest*

fi
fi

## !NNTP_ONLY
if test "$USE_SPOOLDIR" = "yes"; then
	## options for directories
	echo "$as_me:6775: checking for news-library path" >&5
echo $ECHO_N "checking for news-library path... $ECHO_C" >&6

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

else
  withval="${NEWSLIBDIR:-/usr/lib/news}"
fi; if true ; then

if test "x$prefix" != xNONE; then
	cf_path_syntax="$prefix"
else
	cf_path_syntax="$ac_default_prefix"
fi

case ".$withval" in
(.\$\(*\)*|.\'*\'*)
	;;
(..|./*|.\\*)
	;;
(.[a-zA-Z]:[\\/]*) # OS/2 EMX
	;;
(.\${*prefix}*|.\${*dir}*)
	eval withval="$withval"
	case ".$withval" in
	(.NONE/*)
		withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
		;;
	esac
	;;
(.no|.NONE/*)
	withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
	;;
(*)
	{ { echo "$as_me:6811: error: expected a pathname, not \"$withval\"" >&5
echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
   { (exit 1); exit 1; }; }
	;;
esac

fi
eval NEWSLIBDIR="$withval"

	echo "$as_me:6820: result: $NEWSLIBDIR" >&5
echo "${ECHO_T}$NEWSLIBDIR" >&6

	echo "$as_me:6823: checking for news spool-directory path" >&5
echo $ECHO_N "checking for news spool-directory path... $ECHO_C" >&6

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

else
  withval="${SPOOLDIR:-/var/spool/news}"
fi; if true ; then

if test "x$prefix" != xNONE; then
	cf_path_syntax="$prefix"
else
	cf_path_syntax="$ac_default_prefix"
fi

case ".$withval" in
(.\$\(*\)*|.\'*\'*)
	;;
(..|./*|.\\*)
	;;
(.[a-zA-Z]:[\\/]*) # OS/2 EMX
	;;
(.\${*prefix}*|.\${*dir}*)
	eval withval="$withval"
	case ".$withval" in
	(.NONE/*)
		withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
		;;
	esac
	;;
(.no|.NONE/*)
	withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
	;;
(*)
	{ { echo "$as_me:6859: error: expected a pathname, not \"$withval\"" >&5
echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
   { (exit 1); exit 1; }; }
	;;
esac

fi
eval SPOOLDIR="$withval"

	echo "$as_me:6868: result: $SPOOLDIR" >&5
echo "${ECHO_T}$SPOOLDIR" >&6

	echo "$as_me:6871: checking for news overview-directory path" >&5
echo $ECHO_N "checking for news overview-directory path... $ECHO_C" >&6

# Check whether --with-nov-dir or --without-nov-dir was given.
if test "${with_nov_dir+set}" = set; then
  withval="$with_nov_dir"

else
  withval="${NOVROOTDIR:-$SPOOLDIR}"
fi; if true ; then

if test "x$prefix" != xNONE; then
	cf_path_syntax="$prefix"
else
	cf_path_syntax="$ac_default_prefix"
fi

case ".$withval" in
(.\$\(*\)*|.\'*\'*)
	;;
(..|./*|.\\*)
	;;
(.[a-zA-Z]:[\\/]*) # OS/2 EMX
	;;
(.\${*prefix}*|.\${*dir}*)
	eval withval="$withval"
	case ".$withval" in
	(.NONE/*)
		withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
		;;
	esac
	;;
(.no|.NONE/*)
	withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
	;;
(*)
	{ { echo "$as_me:6907: error: expected a pathname, not \"$withval\"" >&5
echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
   { (exit 1); exit 1; }; }
	;;
esac

fi
eval NOVROOTDIR="$withval"

	echo "$as_me:6916: result: $NOVROOTDIR" >&5
echo "${ECHO_T}$NOVROOTDIR" >&6

	echo "$as_me:6919: checking for overview filename" >&5
echo $ECHO_N "checking for overview filename... $ECHO_C" >&6

# Check whether --with-nov-fname or --without-nov-fname was given.
if test "${with_nov_fname+set}" = set; then
  withval="$with_nov_fname"

else
  withval="${OVERVIEW_FILE-.overview}"
fi; test -z "$withval" && withval=no
case "$withval" in #(vi
yes)
  { { echo "$as_me:6931: error: expected a value for --with-nov-fname" >&5
echo "$as_me: error: expected a value for --with-nov-fname" >&2;}
   { (exit 1); exit 1; }; }
  ;; #(vi
no) withval=""
  ;;
esac
OVERVIEW_FILE="$withval"

 cat >>confdefs.h <<EOF
#define OVERVIEW_FILE "$withval"
EOF

	echo "$as_me:6944: result: $OVERVIEW_FILE" >&5
echo "${ECHO_T}$OVERVIEW_FILE" >&6

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

## TODO: kick the --with-inews-dir= stuff, the check below should be enough
## (requires some code rework in tin)
echo "$as_me:6957: checking for directory containing \"inews\"" >&5
echo $ECHO_N "checking for directory containing \"inews\"... $ECHO_C" >&6

# Check whether --with-inews-dir or --without-inews-dir was given.
if test "${with_inews_dir+set}" = set; then
  withval="$with_inews_dir"

else
  withval="${INEWSDIR:-$INEWSPATH}"
fi; if true ; then

if test "x$prefix" != xNONE; then
	cf_path_syntax="$prefix"
else
	cf_path_syntax="$ac_default_prefix"
fi

case ".$withval" in
(.\$\(*\)*|.\'*\'*)
	;;
(..|./*|.\\*)
	;;
(.[a-zA-Z]:[\\/]*) # OS/2 EMX
	;;
(.\${*prefix}*|.\${*dir}*)
	eval withval="$withval"
	case ".$withval" in
	(.NONE/*)
		withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
		;;
	esac
	;;
(.no|.NONE/*)
	withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
	;;
(*)
	{ { echo "$as_me:6993: error: expected a pathname, not \"$withval\"" >&5
echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
   { (exit 1); exit 1; }; }
	;;
esac

fi
eval INEWSDIR="$withval"

INEWSDIR=`echo $INEWSDIR |sed -e 's,/$,,'`
echo "$as_me:7003: result: $INEWSDIR" >&5
echo "${ECHO_T}$INEWSDIR" >&6

# Extract the first word of "inews", so it can be a program name with args.
set dummy inews; ac_word=$2
echo "$as_me:7008: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_path_INEWS+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $INEWS in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_INEWS="$INEWS" # Let the user override the test with a path.
  ;;
  *)
  ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$INEWSDIR:/news/bin:/usr/lib/news/bin:$INEWSPATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  if $as_executable_p "$ac_dir/$ac_word"; then
   ac_cv_path_INEWS="$ac_dir/$ac_word"
   echo "$as_me:7025: found $ac_dir/$ac_word" >&5
   break
fi
done

  test -z "$ac_cv_path_INEWS" && ac_cv_path_INEWS="--internal"
  ;;
esac
fi
INEWS=$ac_cv_path_INEWS

if test -n "$INEWS"; then
  echo "$as_me:7037: result: $INEWS" >&5
echo "${ECHO_T}$INEWS" >&6
else
  echo "$as_me:7040: result: no" >&5
echo "${ECHO_T}no" >&6
fi

if test "$ac_cv_path_INEWS" != ""; then
	if test "$ac_cv_path_INEWS" = "--internal"; then

cf_define=`echo "$INEWS"|sed -e 's/\\\\/\\\\134/g' -e 's/^[ 	]\\+//' -e 's/[ 	]\\+$//' -e 's/"/\\\\042/g'`
cat >>confdefs.h <<EOF
#define PATH_INEWS "$cf_define"
EOF

	else

cf_define=`echo "$INEWS -h"|sed -e 's/\\\\/\\\\134/g' -e 's/^[ 	]\\+//' -e 's/[ 	]\\+$//' -e 's/"/\\\\042/g'`
cat >>confdefs.h <<EOF
#define PATH_INEWS "$cf_define"
EOF

	fi
fi

### Look for network libraries first, since some functions (such as gethostname)
### are used in a lot of places.
echo "$as_me:7064: checking if you want socks library" >&5
echo $ECHO_N "checking if you want socks library... $ECHO_C" >&6
if test "${cf_cv_use_libsocks+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

# Check whether --with-socks or --without-socks was given.
if test "${with_socks+set}" = set; then
  withval="$with_socks"
  cf_cv_use_libsocks=$withval
else
  cf_cv_use_libsocks=no
fi;

fi
echo "$as_me:7079: result: $cf_cv_use_libsocks" >&5
echo "${ECHO_T}$cf_cv_use_libsocks" >&6

echo "$as_me:7082: checking if you want socks5 library" >&5
echo $ECHO_N "checking if you want socks5 library... $ECHO_C" >&6
if test "${cf_cv_use_libsocks5+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

# Check whether --with-socks5 or --without-socks5 was given.
if test "${with_socks5+set}" = set; then
  withval="$with_socks5"
  cf_cv_use_libsocks5=$withval
else
  cf_cv_use_libsocks5=no
fi;

fi
echo "$as_me:7097: result: $cf_cv_use_libsocks5" >&5
echo "${ECHO_T}$cf_cv_use_libsocks5" >&6

if test "x$cf_cv_use_libsocks" != xno ; then

case "$cf_cv_use_libsocks" in
(no)
	;;
(yes)
	;;
(*)

for cf_searchpath in `echo "$cf_cv_use_libsocks" | tr $PATH_SEPARATOR ' '`; do
	if test -d $cf_searchpath/include; then

if test -n "$cf_searchpath/include" ; then
  for cf_add_incdir in $cf_searchpath/include
  do
	while test $cf_add_incdir != /usr/include
	do
	  if test -d $cf_add_incdir
	  then
		cf_have_incdir=no
		if test -n "$CFLAGS$CPPFLAGS" ; then
		  # a loop is needed to ensure we can add subdirs of existing dirs
		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
			  cf_have_incdir=yes; break
			fi
		  done
		fi

		if test "$cf_have_incdir" = no ; then
		  if test "$cf_add_incdir" = /usr/local/include ; then
			if test "$GCC" = yes
			then
			  cf_save_CPPFLAGS=$CPPFLAGS

	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
	CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"

			  cat >conftest.$ac_ext <<_ACEOF
#line 7139 "configure"
#include "confdefs.h"
#include <stdio.h>
int
main (void)
{
printf("Hello")
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:7151: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:7154: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:7157: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:7160: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  :
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
cf_have_incdir=yes
fi
rm -f conftest.$ac_objext conftest.$ac_ext
			  CPPFLAGS=$cf_save_CPPFLAGS
			fi
		  fi
		fi

		if test "$cf_have_incdir" = no ; then
		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6

echo "${as_me:-configure}:7177: testing adding $cf_add_incdir to include-path ..." 1>&5

		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"

		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
		  test "$cf_top_incdir" = "$cf_add_incdir" && break
		  cf_add_incdir="$cf_top_incdir"
		else
		  break
		fi
	  else
		break
	  fi
	done
  done
fi

	elif test -d $cf_searchpath/../include ; then

if test -n "$cf_searchpath/../include" ; then
  for cf_add_incdir in $cf_searchpath/../include
  do
	while test $cf_add_incdir != /usr/include
	do
	  if test -d $cf_add_incdir
	  then
		cf_have_incdir=no
		if test -n "$CFLAGS$CPPFLAGS" ; then
		  # a loop is needed to ensure we can add subdirs of existing dirs
		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
			  cf_have_incdir=yes; break
			fi
		  done
		fi

		if test "$cf_have_incdir" = no ; then
		  if test "$cf_add_incdir" = /usr/local/include ; then
			if test "$GCC" = yes
			then
			  cf_save_CPPFLAGS=$CPPFLAGS

	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
	CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"

			  cat >conftest.$ac_ext <<_ACEOF
#line 7223 "configure"
#include "confdefs.h"
#include <stdio.h>
int
main (void)
{
printf("Hello")
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:7235: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:7238: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:7241: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:7244: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  :
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
cf_have_incdir=yes
fi
rm -f conftest.$ac_objext conftest.$ac_ext
			  CPPFLAGS=$cf_save_CPPFLAGS
			fi
		  fi
		fi

		if test "$cf_have_incdir" = no ; then
		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6

echo "${as_me:-configure}:7261: testing adding $cf_add_incdir to include-path ..." 1>&5

		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"

		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
		  test "$cf_top_incdir" = "$cf_add_incdir" && break
		  cf_add_incdir="$cf_top_incdir"
		else
		  break
		fi
	  else
		break
	  fi
	done
  done
fi

	else
{ { echo "$as_me:7279: error: cannot find socks library under $cf_cv_use_libsocks" >&5
echo "$as_me: error: cannot find socks library under $cf_cv_use_libsocks" >&2;}
   { (exit 1); exit 1; }; }
	fi
	if test -d $cf_searchpath/lib; then

if test -n "$cf_searchpath/lib" ; then
	for cf_add_libdir in $cf_searchpath/lib
	do
		if test $cf_add_libdir = /usr/lib ; then
			:
		elif test -d $cf_add_libdir
		then
			cf_have_libdir=no
			if test -n "$LDFLAGS$LIBS" ; then
				# a loop is needed to ensure we can add subdirs of existing dirs
				for cf_test_libdir in $LDFLAGS $LIBS ; do
					if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
						cf_have_libdir=yes; break
					fi
				done
			fi
			if test "$cf_have_libdir" = no ; then
				test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6

echo "${as_me:-configure}:7304: testing adding $cf_add_libdir to library-path ..." 1>&5

				LDFLAGS="-L$cf_add_libdir $LDFLAGS"
			fi
		fi
	done
fi

	elif test -d $cf_searchpath ; then

if test -n "$cf_searchpath" ; then
	for cf_add_libdir in $cf_searchpath
	do
		if test $cf_add_libdir = /usr/lib ; then
			:
		elif test -d $cf_add_libdir
		then
			cf_have_libdir=no
			if test -n "$LDFLAGS$LIBS" ; then
				# a loop is needed to ensure we can add subdirs of existing dirs
				for cf_test_libdir in $LDFLAGS $LIBS ; do
					if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
						cf_have_libdir=yes; break
					fi
				done
			fi
			if test "$cf_have_libdir" = no ; then
				test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6

echo "${as_me:-configure}:7333: testing adding $cf_add_libdir to library-path ..." 1>&5

				LDFLAGS="-L$cf_add_libdir $LDFLAGS"
			fi
		fi
	done
fi

	else
{ { echo "$as_me:7342: error: cannot find socks library under $cf_cv_use_libsocks" >&5
echo "$as_me: error: cannot find socks library under $cf_cv_use_libsocks" >&2;}
   { (exit 1); exit 1; }; }
	fi
done

	;;
esac

# If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
# will be set on completion of the AC_TRY_LINK below.
cf_cv_header_path_socks=
cf_cv_library_path_socks=

echo "${as_me:-configure}:7356: testing Starting FIND_LINKAGE(socks,) ..." 1>&5

cf_save_LIBS="$LIBS"

cat >conftest.$ac_ext <<_ACEOF
#line 7361 "configure"
#include "confdefs.h"

#include <stdio.h>

int
main (void)
{

      Raccept((char *)0)

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:7377: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:7380: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:7383: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:7386: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then

	cf_cv_find_linkage_socks=yes
	cf_cv_header_path_socks=/usr/include
	cf_cv_library_path_socks=/usr/lib

else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5

LIBS="-lsocks  $cf_save_LIBS"

cat >conftest.$ac_ext <<_ACEOF
#line 7400 "configure"
#include "confdefs.h"

#include <stdio.h>

int
main (void)
{

      Raccept((char *)0)

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:7416: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:7419: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:7422: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:7425: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then

	cf_cv_find_linkage_socks=yes
	cf_cv_header_path_socks=/usr/include
	cf_cv_library_path_socks=/usr/lib
	cf_cv_library_file_socks="-lsocks"

else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5

	cf_cv_find_linkage_socks=no
	LIBS="$cf_save_LIBS"

	test -n "$verbose" && echo "	find linkage for socks library" 1>&6

echo "${as_me:-configure}:7442: testing find linkage for socks library ..." 1>&5

echo "${as_me:-configure}:7444: testing Searching for headers in FIND_LINKAGE(socks,) ..." 1>&5

	cf_save_CPPFLAGS="$CPPFLAGS"
	cf_test_CPPFLAGS="$CPPFLAGS"

cf_search=

# collect the current set of include-directories from compiler flags
cf_header_path_list=""
if test -n "${CFLAGS}${CPPFLAGS}" ; then
	for cf_header_path in $CPPFLAGS $CFLAGS
	do
		case $cf_header_path in
		(-I*)
			cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`

test "x$cf_header_path" != "xNONE" && \
test -d "$cf_header_path" && \
 {
	test -n "$verbose" && echo "	... testing for include-directories under $cf_header_path"
	test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
	test -d $cf_header_path/include/socks &&       cf_search="$cf_search $cf_header_path/include/socks"
	test -d $cf_header_path/include/socks/include &&    cf_search="$cf_search $cf_header_path/include/socks/include"
	test -d $cf_header_path/socks/include &&       cf_search="$cf_search $cf_header_path/socks/include"
	test -d $cf_header_path/socks/include/socks &&    cf_search="$cf_search $cf_header_path/socks/include/socks"
}

			cf_header_path_list="$cf_header_path_list $cf_search"
			;;
		esac
	done
fi

# add the variations for the package we are looking for

cf_search=

test "x$prefix" != "xNONE" && \
test -d "$prefix" && \
 {
	test -n "$verbose" && echo "	... testing for include-directories under $prefix"
	test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
	test -d $prefix/include/socks &&       cf_search="$cf_search $prefix/include/socks"
	test -d $prefix/include/socks/include &&    cf_search="$cf_search $prefix/include/socks/include"
	test -d $prefix/socks/include &&       cf_search="$cf_search $prefix/socks/include"
	test -d $prefix/socks/include/socks &&    cf_search="$cf_search $prefix/socks/include/socks"
}

for cf_subdir_prefix in \
	/usr \
	/usr/local \
	/usr/pkg \
	/opt \
	/opt/local \
	$HOME
do

test "x$cf_subdir_prefix" != "x$prefix" && \
test -d "$cf_subdir_prefix" && \
(test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
	test -n "$verbose" && echo "	... testing for include-directories under $cf_subdir_prefix"
	test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
	test -d $cf_subdir_prefix/include/socks &&       cf_search="$cf_search $cf_subdir_prefix/include/socks"
	test -d $cf_subdir_prefix/include/socks/include &&    cf_search="$cf_search $cf_subdir_prefix/include/socks/include"
	test -d $cf_subdir_prefix/socks/include &&       cf_search="$cf_search $cf_subdir_prefix/socks/include"
	test -d $cf_subdir_prefix/socks/include/socks &&    cf_search="$cf_search $cf_subdir_prefix/socks/include/socks"
}

done

test "$includedir" != NONE && \
test "$includedir" != "/usr/include" && \
test -d "$includedir" && {
	test -d $includedir &&    cf_search="$cf_search $includedir"
	test -d $includedir/socks && cf_search="$cf_search $includedir/socks"
}

test "$oldincludedir" != NONE && \
test "$oldincludedir" != "/usr/include" && \
test -d "$oldincludedir" && {
	test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
	test -d $oldincludedir/socks && cf_search="$cf_search $oldincludedir/socks"
}

cf_search="$cf_search $cf_header_path_list"

	for cf_cv_header_path_socks in $cf_search
	do
		if test -d $cf_cv_header_path_socks ; then
			test -n "$verbose" && echo "	... testing $cf_cv_header_path_socks" 1>&6

echo "${as_me:-configure}:7535: testing ... testing $cf_cv_header_path_socks ..." 1>&5

			CPPFLAGS="$cf_save_CPPFLAGS"

	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
	CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_socks"

			cat >conftest.$ac_ext <<_ACEOF
#line 7543 "configure"
#include "confdefs.h"

#include <stdio.h>

int
main (void)
{

      Raccept((char *)0)

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:7559: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:7562: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:7565: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:7568: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then

				test -n "$verbose" && echo "	... found socks headers in $cf_cv_header_path_socks" 1>&6

echo "${as_me:-configure}:7573: testing ... found socks headers in $cf_cv_header_path_socks ..." 1>&5

				cf_cv_find_linkage_socks=maybe
				cf_test_CPPFLAGS="$CPPFLAGS"
				break
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5

				CPPFLAGS="$cf_save_CPPFLAGS"

fi
rm -f conftest.$ac_objext conftest.$ac_ext
		fi
	done

	if test "$cf_cv_find_linkage_socks" = maybe ; then

echo "${as_me:-configure}:7591: testing Searching for socks library in FIND_LINKAGE(socks,) ..." 1>&5

		cf_save_LIBS="$LIBS"
		cf_save_LDFLAGS="$LDFLAGS"

		if test "$cf_cv_find_linkage_socks" != yes ; then

cf_search=
cf_library_path_list=""
if test -n "${LDFLAGS}${LIBS}" ; then
	for cf_library_path in $LDFLAGS $LIBS
	do
		case $cf_library_path in
		(-L*)
			cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`

test "x$cf_library_path" != "xNONE" && \
test -d "$cf_library_path" && \
 {
	test -n "$verbose" && echo "	... testing for lib-directories under $cf_library_path"
	test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
	test -d $cf_library_path/lib/socks &&       cf_search="$cf_search $cf_library_path/lib/socks"
	test -d $cf_library_path/lib/socks/lib &&    cf_search="$cf_search $cf_library_path/lib/socks/lib"
	test -d $cf_library_path/socks/lib &&       cf_search="$cf_search $cf_library_path/socks/lib"
	test -d $cf_library_path/socks/lib/socks &&    cf_search="$cf_search $cf_library_path/socks/lib/socks"
}

			cf_library_path_list="$cf_library_path_list $cf_search"
			;;
		esac
	done
fi

cf_search=

test "x$prefix" != "xNONE" && \
test -d "$prefix" && \
 {
	test -n "$verbose" && echo "	... testing for lib-directories under $prefix"
	test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
	test -d $prefix/lib/socks &&       cf_search="$cf_search $prefix/lib/socks"
	test -d $prefix/lib/socks/lib &&    cf_search="$cf_search $prefix/lib/socks/lib"
	test -d $prefix/socks/lib &&       cf_search="$cf_search $prefix/socks/lib"
	test -d $prefix/socks/lib/socks &&    cf_search="$cf_search $prefix/socks/lib/socks"
}

for cf_subdir_prefix in \
	/usr \
	/usr/local \
	/usr/pkg \
	/opt \
	/opt/local \
	$HOME
do

test "x$cf_subdir_prefix" != "x$prefix" && \
test -d "$cf_subdir_prefix" && \
(test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
	test -n "$verbose" && echo "	... testing for lib-directories under $cf_subdir_prefix"
	test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
	test -d $cf_subdir_prefix/lib/socks &&       cf_search="$cf_search $cf_subdir_prefix/lib/socks"
	test -d $cf_subdir_prefix/lib/socks/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/socks/lib"
	test -d $cf_subdir_prefix/socks/lib &&       cf_search="$cf_search $cf_subdir_prefix/socks/lib"
	test -d $cf_subdir_prefix/socks/lib/socks &&    cf_search="$cf_search $cf_subdir_prefix/socks/lib/socks"
}

done

cf_search="$cf_library_path_list $cf_search"

			for cf_cv_library_path_socks in $cf_search
			do
				if test -d $cf_cv_library_path_socks ; then
					test -n "$verbose" && echo "	... testing $cf_cv_library_path_socks" 1>&6

echo "${as_me:-configure}:7666: testing ... testing $cf_cv_library_path_socks ..." 1>&5

					CPPFLAGS="$cf_test_CPPFLAGS"
					LIBS="-lsocks  $cf_save_LIBS"
					LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_socks"
					cat >conftest.$ac_ext <<_ACEOF
#line 7672 "configure"
#include "confdefs.h"

#include <stdio.h>

int
main (void)
{

      Raccept((char *)0)

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:7688: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:7691: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:7694: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:7697: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then

					test -n "$verbose" && echo "	... found socks library in $cf_cv_library_path_socks" 1>&6

echo "${as_me:-configure}:7702: testing ... found socks library in $cf_cv_library_path_socks ..." 1>&5

					cf_cv_find_linkage_socks=yes
					cf_cv_library_file_socks="-lsocks"
					break
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5

					CPPFLAGS="$cf_save_CPPFLAGS"
					LIBS="$cf_save_LIBS"
					LDFLAGS="$cf_save_LDFLAGS"

fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
				fi
			done
			CPPFLAGS="$cf_save_CPPFLAGS"
			LDFLAGS="$cf_save_LDFLAGS"
		fi

	else
		cf_cv_find_linkage_socks=no
	fi

fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext

fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext

LIBS="$cf_save_LIBS"

if test "$cf_cv_find_linkage_socks" = yes ; then

if test -n "$cf_cv_header_path_socks" ; then
  for cf_add_incdir in $cf_cv_header_path_socks
  do
	while test $cf_add_incdir != /usr/include
	do
	  if test -d $cf_add_incdir
	  then
		cf_have_incdir=no
		if test -n "$CFLAGS$CPPFLAGS" ; then
		  # a loop is needed to ensure we can add subdirs of existing dirs
		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
			  cf_have_incdir=yes; break
			fi
		  done
		fi

		if test "$cf_have_incdir" = no ; then
		  if test "$cf_add_incdir" = /usr/local/include ; then
			if test "$GCC" = yes
			then
			  cf_save_CPPFLAGS=$CPPFLAGS

	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
	CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"

			  cat >conftest.$ac_ext <<_ACEOF
#line 7764 "configure"
#include "confdefs.h"
#include <stdio.h>
int
main (void)
{
printf("Hello")
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:7776: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:7779: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:7782: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:7785: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  :
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
cf_have_incdir=yes
fi
rm -f conftest.$ac_objext conftest.$ac_ext
			  CPPFLAGS=$cf_save_CPPFLAGS
			fi
		  fi
		fi

		if test "$cf_have_incdir" = no ; then
		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6

echo "${as_me:-configure}:7802: testing adding $cf_add_incdir to include-path ..." 1>&5

		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"

		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
		  test "$cf_top_incdir" = "$cf_add_incdir" && break
		  cf_add_incdir="$cf_top_incdir"
		else
		  break
		fi
	  else
		break
	  fi
	done
  done
fi

if test -n "$cf_cv_library_path_socks" ; then
	for cf_add_libdir in $cf_cv_library_path_socks
	do
		if test $cf_add_libdir = /usr/lib ; then
			:
		elif test -d $cf_add_libdir
		then
			cf_have_libdir=no
			if test -n "$LDFLAGS$LIBS" ; then
				# a loop is needed to ensure we can add subdirs of existing dirs
				for cf_test_libdir in $LDFLAGS $LIBS ; do
					if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
						cf_have_libdir=yes; break
					fi
				done
			fi
			if test "$cf_have_libdir" = no ; then
				test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6

echo "${as_me:-configure}:7838: testing adding $cf_add_libdir to library-path ..." 1>&5

				LDFLAGS="-L$cf_add_libdir $LDFLAGS"
			fi
		fi
	done
fi

cf_add_libs="-lsocks"
# Filter out duplicates - this happens with badly-designed ".pc" files...
for cf_add_1lib in $LIBS
do
	for cf_add_2lib in $cf_add_libs
	do
		if test "x$cf_add_1lib" = "x$cf_add_2lib"
		then
			cf_add_1lib=
			break
		fi
	done
	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
done
LIBS="$cf_add_libs"

else
{ echo "$as_me:7863: WARNING: Cannot find socks library" >&5
echo "$as_me: WARNING: Cannot find socks library" >&2;}
fi

  if test "x$cf_cv_find_linkage_socks" = "xyes" ; then

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

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

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

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

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

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

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

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

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

  else
    { { echo "$as_me:7906: error: cannot link with socks library" >&5
echo "$as_me: error: cannot link with socks library" >&2;}
   { (exit 1); exit 1; }; }
  fi

else

cf_test_netlibs=no

echo "$as_me:7915: checking for network libraries" >&5
echo $ECHO_N "checking for network libraries... $ECHO_C" >&6

if test "${cf_cv_netlibs+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

echo "$as_me:7922: result: working..." >&5
echo "${ECHO_T}working..." >&6

cf_cv_netlibs=""
cf_test_netlibs=yes

case $host_os in
(mingw*)

for ac_header in windows.h winsock.h winsock2.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
echo "$as_me:7934: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 7940 "configure"
#include "confdefs.h"
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:7944: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  egrep -v '^ *\+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:7950: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  eval "$as_ac_Header=yes"
else
  echo "$as_me: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$as_ac_Header=no"
fi
rm -f conftest.err conftest.$ac_ext
fi
echo "$as_me:7969: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
if test `eval echo '${'$as_ac_Header'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
EOF

fi
done

	if test "$ac_cv_header_winsock2_h" = "yes" ; then
		cf_winsock_lib="-lws2_32"
	elif test "$ac_cv_header_winsock_h" = "yes" ; then
		cf_winsock_lib="-lwsock32"
	fi

	cf_save_LIBS="$LIBS"

cf_add_libs="$cf_winsock_lib"
# Filter out duplicates - this happens with badly-designed ".pc" files...
for cf_add_1lib in $LIBS
do
	for cf_add_2lib in $cf_add_libs
	do
		if test "x$cf_add_1lib" = "x$cf_add_2lib"
		then
			cf_add_1lib=
			break
		fi
	done
	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
done
LIBS="$cf_add_libs"

	cat >conftest.$ac_ext <<_ACEOF
#line 8004 "configure"
#include "confdefs.h"

#ifdef HAVE_WINDOWS_H
#undef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#ifdef HAVE_WINSOCK2_H
#include <winsock2.h>
#else
#ifdef HAVE_WINSOCK_H
#include <winsock.h>
#endif
#endif
#endif

int
main (void)
{

	char buffer[1024];
	gethostname(buffer, sizeof(buffer));
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:8031: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:8034: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:8037: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:8040: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  cf_cv_netlibs="$cf_winsock_lib $cf_cv_netlibs"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
{ { echo "$as_me:8046: error: Cannot link against winsock library" >&5
echo "$as_me: error: Cannot link against winsock library" >&2;}
   { (exit 1); exit 1; }; }
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext

	LIBS="$cf_save_LIBS"
	;;
(*)

for ac_func in gethostname
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:8059: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 8065 "configure"
#include "confdefs.h"
#define $ac_func autoconf_temporary
#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
#undef $ac_func

#ifdef __cplusplus
extern "C"
#endif

/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char $ac_func (void);

int
main (void)
{

/* The GNU C library defines stubs for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
#error found stub for $ac_func
#endif

	return $ac_func ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:8096: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:8099: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:8102: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:8105: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:8115: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF

else

echo "$as_me:8124: checking for gethostname in -lnsl" >&5
echo $ECHO_N "checking for gethostname in -lnsl... $ECHO_C" >&6
if test "${ac_cv_lib_nsl_gethostname+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lnsl $cf_cv_netlibs $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 8132 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* 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 (void)
{
gethostname ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:8151: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:8154: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:8157: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:8160: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_nsl_gethostname=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_nsl_gethostname=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:8171: result: $ac_cv_lib_nsl_gethostname" >&5
echo "${ECHO_T}$ac_cv_lib_nsl_gethostname" >&6
if test $ac_cv_lib_nsl_gethostname = yes; then

cf_tr_func=`echo "gethostname" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`

	cat >>confdefs.h <<EOF
#define HAVE_$cf_tr_func 1
EOF

	ac_cv_func_gethostname=yes
	if test "$cf_used_lib_nsl" != yes ; then cf_used_lib_nsl=yes; cf_cv_netlibs="-lnsl $cf_cv_netlibs"; fi
else

	ac_cv_func_gethostname=unknown
	unset ac_cv_func_gethostname 2>/dev/null

echo "$as_me:8188: checking for gethostname in -lsocket" >&5
echo $ECHO_N "checking for gethostname in -lsocket... $ECHO_C" >&6
if test "${ac_cv_lib_socket_gethostname+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lsocket $cf_cv_netlibs $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 8196 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* 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 (void)
{
gethostname ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:8215: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:8218: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:8221: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:8224: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_socket_gethostname=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_socket_gethostname=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:8235: result: $ac_cv_lib_socket_gethostname" >&5
echo "${ECHO_T}$ac_cv_lib_socket_gethostname" >&6
if test $ac_cv_lib_socket_gethostname = yes; then

cf_tr_func=`echo "gethostname" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`

	cat >>confdefs.h <<EOF
#define HAVE_$cf_tr_func 1
EOF

	ac_cv_func_gethostname=yes
	if test "$cf_used_lib_socket" != yes ; then cf_used_lib_socket=yes; cf_cv_netlibs="-lsocket $cf_cv_netlibs"; fi
else

	ac_cv_func_gethostname=unknown
	unset ac_cv_func_gethostname 2>/dev/null

fi

fi

fi
done

	echo "$as_me:8259: checking for main in -linet" >&5
echo $ECHO_N "checking for main in -linet... $ECHO_C" >&6
if test "${ac_cv_lib_inet_main+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-linet  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 8267 "configure"
#include "confdefs.h"

int
main (void)
{
main ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:8279: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:8282: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:8285: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:8288: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_inet_main=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_inet_main=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:8299: result: $ac_cv_lib_inet_main" >&5
echo "${ECHO_T}$ac_cv_lib_inet_main" >&6
if test $ac_cv_lib_inet_main = yes; then
  cf_cv_netlibs="-linet $cf_cv_netlibs"
fi

	if test "$ac_cv_func_lsocket" != no ; then

for ac_func in socket
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:8310: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 8316 "configure"
#include "confdefs.h"
#define $ac_func autoconf_temporary
#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
#undef $ac_func

#ifdef __cplusplus
extern "C"
#endif

/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char $ac_func (void);

int
main (void)
{

/* The GNU C library defines stubs for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
#error found stub for $ac_func
#endif

	return $ac_func ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:8347: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:8350: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:8353: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:8356: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:8366: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF

else

echo "$as_me:8375: checking for socket in -lsocket" >&5
echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6
if test "${ac_cv_lib_socket_socket+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lsocket $cf_cv_netlibs $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 8383 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* 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 (void)
{
socket ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:8402: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:8405: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:8408: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:8411: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_socket_socket=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_socket_socket=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:8422: result: $ac_cv_lib_socket_socket" >&5
echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6
if test $ac_cv_lib_socket_socket = yes; then

cf_tr_func=`echo "socket" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`

	cat >>confdefs.h <<EOF
#define HAVE_$cf_tr_func 1
EOF

	ac_cv_func_socket=yes
	if test "$cf_used_lib_socket" != yes ; then cf_used_lib_socket=yes; cf_cv_netlibs="-lsocket $cf_cv_netlibs"; fi
else

	ac_cv_func_socket=unknown
	unset ac_cv_func_socket 2>/dev/null

echo "$as_me:8439: checking for socket in -lbsd" >&5
echo $ECHO_N "checking for socket in -lbsd... $ECHO_C" >&6
if test "${ac_cv_lib_bsd_socket+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lbsd $cf_cv_netlibs $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 8447 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* 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 (void)
{
socket ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:8466: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:8469: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:8472: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:8475: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_bsd_socket=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_bsd_socket=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:8486: result: $ac_cv_lib_bsd_socket" >&5
echo "${ECHO_T}$ac_cv_lib_bsd_socket" >&6
if test $ac_cv_lib_bsd_socket = yes; then

cf_tr_func=`echo "socket" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`

	cat >>confdefs.h <<EOF
#define HAVE_$cf_tr_func 1
EOF

	ac_cv_func_socket=yes
	if test "$cf_used_lib_bsd" != yes ; then cf_used_lib_bsd=yes; cf_cv_netlibs="-lbsd $cf_cv_netlibs"; fi
else

	ac_cv_func_socket=unknown
	unset ac_cv_func_socket 2>/dev/null

fi

fi

fi
done

	fi

for ac_func in gethostbyname
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:8515: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 8521 "configure"
#include "confdefs.h"
#define $ac_func autoconf_temporary
#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
#undef $ac_func

#ifdef __cplusplus
extern "C"
#endif

/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char $ac_func (void);

int
main (void)
{

/* The GNU C library defines stubs for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
#error found stub for $ac_func
#endif

	return $ac_func ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:8552: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:8555: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:8558: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:8561: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:8571: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF

else

echo "$as_me:8580: checking for gethostbyname in -lnsl" >&5
echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lnsl $cf_cv_netlibs $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 8588 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* 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 (void)
{
gethostbyname ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:8607: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:8610: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:8613: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:8616: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_nsl_gethostbyname=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_nsl_gethostbyname=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:8627: result: $ac_cv_lib_nsl_gethostbyname" >&5
echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
if test $ac_cv_lib_nsl_gethostbyname = yes; then

cf_tr_func=`echo "gethostbyname" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`

	cat >>confdefs.h <<EOF
#define HAVE_$cf_tr_func 1
EOF

	ac_cv_func_gethostbyname=yes
	if test "$cf_used_lib_nsl" != yes ; then cf_used_lib_nsl=yes; cf_cv_netlibs="-lnsl $cf_cv_netlibs"; fi
else

	ac_cv_func_gethostbyname=unknown
	unset ac_cv_func_gethostbyname 2>/dev/null

fi

fi
done

for ac_func in inet_ntoa
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:8652: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 8658 "configure"
#include "confdefs.h"
#define $ac_func autoconf_temporary
#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
#undef $ac_func

#ifdef __cplusplus
extern "C"
#endif

/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char $ac_func (void);

int
main (void)
{

/* The GNU C library defines stubs for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
#error found stub for $ac_func
#endif

	return $ac_func ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:8689: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:8692: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:8695: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:8698: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:8708: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF

else

echo "$as_me:8717: checking for inet_ntoa in -lnsl" >&5
echo $ECHO_N "checking for inet_ntoa in -lnsl... $ECHO_C" >&6
if test "${ac_cv_lib_nsl_inet_ntoa+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lnsl $cf_cv_netlibs $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 8725 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char inet_ntoa ();
int
main (void)
{
inet_ntoa ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:8744: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:8747: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:8750: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:8753: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_nsl_inet_ntoa=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_nsl_inet_ntoa=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:8764: result: $ac_cv_lib_nsl_inet_ntoa" >&5
echo "${ECHO_T}$ac_cv_lib_nsl_inet_ntoa" >&6
if test $ac_cv_lib_nsl_inet_ntoa = yes; then

cf_tr_func=`echo "inet_ntoa" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`

	cat >>confdefs.h <<EOF
#define HAVE_$cf_tr_func 1
EOF

	ac_cv_func_inet_ntoa=yes
	if test "$cf_used_lib_nsl" != yes ; then cf_used_lib_nsl=yes; cf_cv_netlibs="-lnsl $cf_cv_netlibs"; fi
else

	ac_cv_func_inet_ntoa=unknown
	unset ac_cv_func_inet_ntoa 2>/dev/null

fi

fi
done

for ac_func in gethostbyname
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:8789: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 8795 "configure"
#include "confdefs.h"
#define $ac_func autoconf_temporary
#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
#undef $ac_func

#ifdef __cplusplus
extern "C"
#endif

/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char $ac_func (void);

int
main (void)
{

/* The GNU C library defines stubs for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
#error found stub for $ac_func
#endif

	return $ac_func ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:8826: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:8829: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:8832: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:8835: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:8845: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF

else

echo "$as_me:8854: checking for gethostbyname in -lnetwork" >&5
echo $ECHO_N "checking for gethostbyname in -lnetwork... $ECHO_C" >&6
if test "${ac_cv_lib_network_gethostbyname+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lnetwork $cf_cv_netlibs $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 8862 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* 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 (void)
{
gethostbyname ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:8881: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:8884: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:8887: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:8890: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_network_gethostbyname=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_network_gethostbyname=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:8901: result: $ac_cv_lib_network_gethostbyname" >&5
echo "${ECHO_T}$ac_cv_lib_network_gethostbyname" >&6
if test $ac_cv_lib_network_gethostbyname = yes; then

cf_tr_func=`echo "gethostbyname" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`

	cat >>confdefs.h <<EOF
#define HAVE_$cf_tr_func 1
EOF

	ac_cv_func_gethostbyname=yes
	if test "$cf_used_lib_network" != yes ; then cf_used_lib_network=yes; cf_cv_netlibs="-lnetwork $cf_cv_netlibs"; fi
else

	ac_cv_func_gethostbyname=unknown
	unset ac_cv_func_gethostbyname 2>/dev/null

fi

fi
done

for ac_func in strcasecmp
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:8926: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 8932 "configure"
#include "confdefs.h"
#define $ac_func autoconf_temporary
#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
#undef $ac_func

#ifdef __cplusplus
extern "C"
#endif

/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char $ac_func (void);

int
main (void)
{

/* The GNU C library defines stubs for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
#error found stub for $ac_func
#endif

	return $ac_func ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:8963: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:8966: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:8969: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:8972: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:8982: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF

else

echo "$as_me:8991: checking for strcasecmp in -lresolv" >&5
echo $ECHO_N "checking for strcasecmp in -lresolv... $ECHO_C" >&6
if test "${ac_cv_lib_resolv_strcasecmp+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lresolv $cf_cv_netlibs $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 8999 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char strcasecmp ();
int
main (void)
{
strcasecmp ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:9018: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:9021: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:9024: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:9027: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_resolv_strcasecmp=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_resolv_strcasecmp=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:9038: result: $ac_cv_lib_resolv_strcasecmp" >&5
echo "${ECHO_T}$ac_cv_lib_resolv_strcasecmp" >&6
if test $ac_cv_lib_resolv_strcasecmp = yes; then

cf_tr_func=`echo "strcasecmp" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`

	cat >>confdefs.h <<EOF
#define HAVE_$cf_tr_func 1
EOF

	ac_cv_func_strcasecmp=yes
	if test "$cf_used_lib_resolv" != yes ; then cf_used_lib_resolv=yes; cf_cv_netlibs="-lresolv $cf_cv_netlibs"; fi
else

	ac_cv_func_strcasecmp=unknown
	unset ac_cv_func_strcasecmp 2>/dev/null

fi

fi
done

	;;
esac

fi

case $cf_cv_netlibs in
(*ws2_32*)

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

	;;
esac

cf_add_libs="$cf_cv_netlibs"
# Filter out duplicates - this happens with badly-designed ".pc" files...
for cf_add_1lib in $LIBS
do
	for cf_add_2lib in $cf_add_libs
	do
		if test "x$cf_add_1lib" = "x$cf_add_2lib"
		then
			cf_add_1lib=
			break
		fi
	done
	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
done
LIBS="$cf_add_libs"

test $cf_test_netlibs = no && echo "$cf_cv_netlibs" >&6

	if test "x$cf_cv_use_libsocks5" != xno ; then

case "$cf_cv_use_libsocks5" in
(no)
	;;
(yes)
	;;
(*)

for cf_searchpath in `echo "$cf_cv_use_libsocks5" | tr $PATH_SEPARATOR ' '`; do
	if test -d $cf_searchpath/include; then

if test -n "$cf_searchpath/include" ; then
  for cf_add_incdir in $cf_searchpath/include
  do
	while test $cf_add_incdir != /usr/include
	do
	  if test -d $cf_add_incdir
	  then
		cf_have_incdir=no
		if test -n "$CFLAGS$CPPFLAGS" ; then
		  # a loop is needed to ensure we can add subdirs of existing dirs
		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
			  cf_have_incdir=yes; break
			fi
		  done
		fi

		if test "$cf_have_incdir" = no ; then
		  if test "$cf_add_incdir" = /usr/local/include ; then
			if test "$GCC" = yes
			then
			  cf_save_CPPFLAGS=$CPPFLAGS

	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
	CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"

			  cat >conftest.$ac_ext <<_ACEOF
#line 9132 "configure"
#include "confdefs.h"
#include <stdio.h>
int
main (void)
{
printf("Hello")
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:9144: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:9147: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:9150: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:9153: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  :
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
cf_have_incdir=yes
fi
rm -f conftest.$ac_objext conftest.$ac_ext
			  CPPFLAGS=$cf_save_CPPFLAGS
			fi
		  fi
		fi

		if test "$cf_have_incdir" = no ; then
		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6

echo "${as_me:-configure}:9170: testing adding $cf_add_incdir to include-path ..." 1>&5

		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"

		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
		  test "$cf_top_incdir" = "$cf_add_incdir" && break
		  cf_add_incdir="$cf_top_incdir"
		else
		  break
		fi
	  else
		break
	  fi
	done
  done
fi

	elif test -d $cf_searchpath/../include ; then

if test -n "$cf_searchpath/../include" ; then
  for cf_add_incdir in $cf_searchpath/../include
  do
	while test $cf_add_incdir != /usr/include
	do
	  if test -d $cf_add_incdir
	  then
		cf_have_incdir=no
		if test -n "$CFLAGS$CPPFLAGS" ; then
		  # a loop is needed to ensure we can add subdirs of existing dirs
		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
			  cf_have_incdir=yes; break
			fi
		  done
		fi

		if test "$cf_have_incdir" = no ; then
		  if test "$cf_add_incdir" = /usr/local/include ; then
			if test "$GCC" = yes
			then
			  cf_save_CPPFLAGS=$CPPFLAGS

	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
	CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"

			  cat >conftest.$ac_ext <<_ACEOF
#line 9216 "configure"
#include "confdefs.h"
#include <stdio.h>
int
main (void)
{
printf("Hello")
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:9228: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:9231: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:9234: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:9237: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  :
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
cf_have_incdir=yes
fi
rm -f conftest.$ac_objext conftest.$ac_ext
			  CPPFLAGS=$cf_save_CPPFLAGS
			fi
		  fi
		fi

		if test "$cf_have_incdir" = no ; then
		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6

echo "${as_me:-configure}:9254: testing adding $cf_add_incdir to include-path ..." 1>&5

		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"

		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
		  test "$cf_top_incdir" = "$cf_add_incdir" && break
		  cf_add_incdir="$cf_top_incdir"
		else
		  break
		fi
	  else
		break
	  fi
	done
  done
fi

	else
{ { echo "$as_me:9272: error: cannot find socks5 library under $cf_cv_use_libsocks5" >&5
echo "$as_me: error: cannot find socks5 library under $cf_cv_use_libsocks5" >&2;}
   { (exit 1); exit 1; }; }
	fi
	if test -d $cf_searchpath/lib; then

if test -n "$cf_searchpath/lib" ; then
	for cf_add_libdir in $cf_searchpath/lib
	do
		if test $cf_add_libdir = /usr/lib ; then
			:
		elif test -d $cf_add_libdir
		then
			cf_have_libdir=no
			if test -n "$LDFLAGS$LIBS" ; then
				# a loop is needed to ensure we can add subdirs of existing dirs
				for cf_test_libdir in $LDFLAGS $LIBS ; do
					if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
						cf_have_libdir=yes; break
					fi
				done
			fi
			if test "$cf_have_libdir" = no ; then
				test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6

echo "${as_me:-configure}:9297: testing adding $cf_add_libdir to library-path ..." 1>&5

				LDFLAGS="-L$cf_add_libdir $LDFLAGS"
			fi
		fi
	done
fi

	elif test -d $cf_searchpath ; then

if test -n "$cf_searchpath" ; then
	for cf_add_libdir in $cf_searchpath
	do
		if test $cf_add_libdir = /usr/lib ; then
			:
		elif test -d $cf_add_libdir
		then
			cf_have_libdir=no
			if test -n "$LDFLAGS$LIBS" ; then
				# a loop is needed to ensure we can add subdirs of existing dirs
				for cf_test_libdir in $LDFLAGS $LIBS ; do
					if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
						cf_have_libdir=yes; break
					fi
				done
			fi
			if test "$cf_have_libdir" = no ; then
				test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6

echo "${as_me:-configure}:9326: testing adding $cf_add_libdir to library-path ..." 1>&5

				LDFLAGS="-L$cf_add_libdir $LDFLAGS"
			fi
		fi
	done
fi

	else
{ { echo "$as_me:9335: error: cannot find socks5 library under $cf_cv_use_libsocks5" >&5
echo "$as_me: error: cannot find socks5 library under $cf_cv_use_libsocks5" >&2;}
   { (exit 1); exit 1; }; }
	fi
done

	;;
esac

cf_add_libs="-lsocks5"
# Filter out duplicates - this happens with badly-designed ".pc" files...
for cf_add_1lib in $LIBS
do
	for cf_add_2lib in $cf_add_libs
	do
		if test "x$cf_add_1lib" = "x$cf_add_2lib"
		then
			cf_add_1lib=
			break
		fi
	done
	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
done
LIBS="$cf_add_libs"

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

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

echo "$as_me:9368: checking if the socks library uses socks4 prefix" >&5
echo $ECHO_N "checking if the socks library uses socks4 prefix... $ECHO_C" >&6
cf_use_socks4=error
cat >conftest.$ac_ext <<_ACEOF
#line 9372 "configure"
#include "confdefs.h"

#include <socks.h>
int
main (void)
{

	Rinit((char *)0)
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:9386: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:9389: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:9392: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:9395: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then

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

	 cf_use_socks4=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
cat >conftest.$ac_ext <<_ACEOF
#line 9407 "configure"
#include "confdefs.h"
#include <socks.h>
int
main (void)
{
SOCKSinit((char *)0)
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:9419: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:9422: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:9425: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:9428: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  cf_use_socks4=no
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
{ { echo "$as_me:9434: error: Cannot link with socks5 library" >&5
echo "$as_me: error: Cannot link with socks5 library" >&2;}
   { (exit 1); exit 1; }; }
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
echo "$as_me:9441: result: $cf_use_socks4" >&5
echo "${ECHO_T}$cf_use_socks4" >&6

if test "$cf_use_socks4" = "yes" ; then
	cat >>confdefs.h <<\EOF
#define accept Raccept
EOF

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

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

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

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

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

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

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

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

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

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

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

fi

echo "$as_me:9496: checking if socks5p.h is available" >&5
echo $ECHO_N "checking if socks5p.h is available... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
#line 9499 "configure"
#include "confdefs.h"

#define INCLUDE_PROTOTYPES
#include <socks.h>
int
main (void)
{

	init((char *)0)
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:9514: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:9517: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:9520: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:9523: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  cf_use_socks5p_h=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
cf_use_socks5p_h=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
echo "$as_me:9532: result: $cf_use_socks5p_h" >&5
echo "${ECHO_T}$cf_use_socks5p_h" >&6

test "$cf_use_socks5p_h" = yes &&
cat >>confdefs.h <<\EOF
#define INCLUDE_PROTOTYPES 1
EOF

	fi
fi

### which locking method should be used for mailbox locking
### first look for all available locking methods

for ac_header in unistd.h fcntl.h sys/file.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
echo "$as_me:9549: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 9555 "configure"
#include "confdefs.h"
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:9559: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  egrep -v '^ *\+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:9565: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  eval "$as_ac_Header=yes"
else
  echo "$as_me: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$as_ac_Header=no"
fi
rm -f conftest.err conftest.$ac_ext
fi
echo "$as_me:9584: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
if test `eval echo '${'$as_ac_Header'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
EOF

fi
done

echo "$as_me:9594: checking for fcntl" >&5
echo $ECHO_N "checking for fcntl... $ECHO_C" >&6
if test "${ac_cv_func_fcntl+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 9600 "configure"
#include "confdefs.h"
#define fcntl autoconf_temporary
#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
#undef fcntl

#ifdef __cplusplus
extern "C"
#endif

/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char fcntl (void);

int
main (void)
{

/* The GNU C library defines stubs for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_fcntl) || defined (__stub___fcntl)
#error found stub for fcntl
#endif

	return fcntl ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:9631: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:9634: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:9637: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:9640: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_func_fcntl=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_func_fcntl=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:9650: result: $ac_cv_func_fcntl" >&5
echo "${ECHO_T}$ac_cv_func_fcntl" >&6

echo "$as_me:9653: checking for lockf" >&5
echo $ECHO_N "checking for lockf... $ECHO_C" >&6
if test "${ac_cv_func_lockf+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 9659 "configure"
#include "confdefs.h"
#define lockf autoconf_temporary
#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
#undef lockf

#ifdef __cplusplus
extern "C"
#endif

/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char lockf (void);

int
main (void)
{

/* The GNU C library defines stubs for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_lockf) || defined (__stub___lockf)
#error found stub for lockf
#endif

	return lockf ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:9690: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:9693: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:9696: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:9699: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_func_lockf=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_func_lockf=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:9709: result: $ac_cv_func_lockf" >&5
echo "${ECHO_T}$ac_cv_func_lockf" >&6

echo "$as_me:9712: checking for flock" >&5
echo $ECHO_N "checking for flock... $ECHO_C" >&6
if test "${ac_cv_func_flock+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 9718 "configure"
#include "confdefs.h"
#define flock autoconf_temporary
#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
#undef flock

#ifdef __cplusplus
extern "C"
#endif

/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char flock (void);

int
main (void)
{

/* The GNU C library defines stubs for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_flock) || defined (__stub___flock)
#error found stub for flock
#endif

	return flock ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:9749: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:9752: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:9755: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:9758: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_func_flock=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_func_flock=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:9768: result: $ac_cv_func_flock" >&5
echo "${ECHO_T}$ac_cv_func_flock" >&6

echo "$as_me:9771: checking for file-locking functions" >&5
echo $ECHO_N "checking for file-locking functions... $ECHO_C" >&6
if test "${cf_cv_lockfile+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

cf_cv_lockfile=
for cf_lock in fcntl lockf flock
do
if eval 'test ${ac_cv_func_'$cf_lock'+set} = set'; then
	case $cf_lock in #(vi
	fcntl) #(vi
		cat >conftest.$ac_ext <<_ACEOF
#line 9784 "configure"
#include "confdefs.h"

#include <stdio.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#ifdef HAVE_FCNTL_H
#include <fcntl.h>
#endif

int
main (void)
{

	struct flock flk;
	int block = 1;
	int fd = 0;
	int rc;

	flk.l_type = F_WRLCK;
	flk.l_whence = SEEK_SET;
	flk.l_start = 0;
	flk.l_len = 0;
	rc = fcntl(fd, block ? F_SETLKW : F_SETLK, &flk)
	&& fcntl(fd, F_GETLK, &flk)
	&& fcntl(fd, F_SETLK, &flk);

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:9817: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:9820: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:9823: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:9826: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  :
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
continue
fi
rm -f conftest.$ac_objext conftest.$ac_ext
		;;
	lockf) #(vi
		cat >conftest.$ac_ext <<_ACEOF
#line 9838 "configure"
#include "confdefs.h"

#include <stdio.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#ifdef HAVE_FCNTL_H
#include <fcntl.h>
#endif

int
main (void)
{

	int block = 1, fd = 0;
	int ret = lockf(fd, block ? F_LOCK : F_TLOCK, 0L)
	 && lockf(fd, F_TEST, 0L)
	 && lockf(fd, F_ULOCK, 0L);

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:9863: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:9866: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:9869: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:9872: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  :
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
continue
fi
rm -f conftest.$ac_objext conftest.$ac_ext
		;;
	flock)
		cat >conftest.$ac_ext <<_ACEOF
#line 9884 "configure"
#include "confdefs.h"

#include <stdio.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#ifdef HAVE_FCNTL_H
#include <fcntl.h>
#endif
#ifdef HAVE_SYS_FILE_H
#include <sys/file.h>
#endif

int
main (void)
{

	int block = 1, fd = 0;
	int ret = flock(fd, (LOCK_EX|LOCK_NB))
	 && flock(fd, LOCK_UN)
	 && flock(fd, block ? LOCK_EX : (LOCK_EX | LOCK_NB));

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:9912: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:9915: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:9918: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:9921: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  :
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
continue
fi
rm -f conftest.$ac_objext conftest.$ac_ext
		;;
	esac
	cf_cv_lockfile="$cf_cv_lockfile $cf_lock"
fi
done

fi
echo "$as_me:9937: result: $cf_cv_lockfile" >&5
echo "${ECHO_T}$cf_cv_lockfile" >&6

echo "$as_me:9940: checking which locking method will be used" >&5
echo $ECHO_N "checking which locking method will be used... $ECHO_C" >&6
### fcntl() is preferred, if the user just disables fcntl()
### without specifying an alternative lockf() is preferred

# Check whether --enable-fcntl or --disable-fcntl was given.
if test "${enable_fcntl+set}" = set; then
  enableval="$enable_fcntl"
  test "$enableval" != no && enableval=yes
	if test "$enableval" != "yes" ; then
    requested_lock="lockf"
	else
		requested_lock="fcntl"
	fi
else
  enableval=yes
	requested_lock="fcntl"

fi;

# Check whether --enable-lockf or --disable-lockf was given.
if test "${enable_lockf+set}" = set; then
  enableval="$enable_lockf"
  test "$enableval" != yes && enableval=no
	if test "$enableval" != "no" ; then
    requested_lock="lockf"
	fi
else
  enableval=no
fi;

# Check whether --enable-flock or --disable-flock was given.
if test "${enable_flock+set}" = set; then
  enableval="$enable_flock"
  test "$enableval" != yes && enableval=no
	if test "$enableval" != "no" ; then
    requested_lock="flock"
	fi
else
  enableval=no
fi;
### now check the users wishes against available locking methods
if test -n "$cf_cv_lockfile"; then
	for lock in $cf_cv_lockfile; do
		if test "$lock" = "$requested_lock"; then
			used_locking=$lock
			break
		fi
	done
### if none of them matched use the one with the highest priority
	if test "x$used_locking" = "x"; then
		used_locking=`echo $cf_cv_lockfile|sed -e 's/^\([^ ]\+\).*/\1/g'`
	fi
	echo "$as_me:9993: result: $used_locking" >&5
echo "${ECHO_T}$used_locking" >&6

used_locking=`echo "$used_locking" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`

	cat >>confdefs.h <<EOF
#define USE_$used_locking 1
EOF

else
	echo "$as_me:10003: result: none" >&5
echo "${ECHO_T}none" >&6;
	{ echo "$as_me:10005: WARNING: None of fcntl(), lockf(), flock() available" >&5
echo "$as_me: WARNING: None of fcntl(), lockf(), flock() available" >&2;}
fi

echo "$as_me:10009: checking for screen type" >&5
echo $ECHO_N "checking for screen type... $ECHO_C" >&6

# Check whether --with-screen or --without-screen was given.
if test "${with_screen+set}" = set; then
  withval="$with_screen"
  cf_with_screen=$withval
else
  cf_with_screen=none
fi;
echo "$as_me:10019: result: $cf_with_screen" >&5
echo "${ECHO_T}$cf_with_screen" >&6

use_curses=no
use_ncurses=no

echo "$as_me:10025: checking for specific curses-directory" >&5
echo $ECHO_N "checking for specific curses-directory... $ECHO_C" >&6

# Check whether --with-curses-dir or --without-curses-dir was given.
if test "${with_curses_dir+set}" = set; then
  withval="$with_curses_dir"
  cf_cv_curses_dir=$withval
else
  cf_cv_curses_dir=no
fi;
echo "$as_me:10035: result: $cf_cv_curses_dir" >&5
echo "${ECHO_T}$cf_cv_curses_dir" >&6

if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
then

if test "x$prefix" != xNONE; then
	cf_path_syntax="$prefix"
else
	cf_path_syntax="$ac_default_prefix"
fi

case ".$withval" in
(.\$\(*\)*|.\'*\'*)
	;;
(..|./*|.\\*)
	;;
(.[a-zA-Z]:[\\/]*) # OS/2 EMX
	;;
(.\${*prefix}*|.\${*dir}*)
	eval withval="$withval"
	case ".$withval" in
	(.NONE/*)
		withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
		;;
	esac
	;;
(.no|.NONE/*)
	withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
	;;
(*)
	{ { echo "$as_me:10066: error: expected a pathname, not \"$withval\"" >&5
echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
   { (exit 1); exit 1; }; }
	;;
esac

	if test -d "$cf_cv_curses_dir"
	then

if test -n "$cf_cv_curses_dir/include" ; then
  for cf_add_incdir in $cf_cv_curses_dir/include
  do
	while test $cf_add_incdir != /usr/include
	do
	  if test -d $cf_add_incdir
	  then
		cf_have_incdir=no
		if test -n "$CFLAGS$CPPFLAGS" ; then
		  # a loop is needed to ensure we can add subdirs of existing dirs
		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
			  cf_have_incdir=yes; break
			fi
		  done
		fi

		if test "$cf_have_incdir" = no ; then
		  if test "$cf_add_incdir" = /usr/local/include ; then
			if test "$GCC" = yes
			then
			  cf_save_CPPFLAGS=$CPPFLAGS

	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
	CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"

			  cat >conftest.$ac_ext <<_ACEOF
#line 10102 "configure"
#include "confdefs.h"
#include <stdio.h>
int
main (void)
{
printf("Hello")
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:10114: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:10117: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:10120: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:10123: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  :
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
cf_have_incdir=yes
fi
rm -f conftest.$ac_objext conftest.$ac_ext
			  CPPFLAGS=$cf_save_CPPFLAGS
			fi
		  fi
		fi

		if test "$cf_have_incdir" = no ; then
		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6

echo "${as_me:-configure}:10140: testing adding $cf_add_incdir to include-path ..." 1>&5

		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"

		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
		  test "$cf_top_incdir" = "$cf_add_incdir" && break
		  cf_add_incdir="$cf_top_incdir"
		else
		  break
		fi
	  else
		break
	  fi
	done
  done
fi

if test -n "$cf_cv_curses_dir/lib" ; then
	for cf_add_libdir in $cf_cv_curses_dir/lib
	do
		if test $cf_add_libdir = /usr/lib ; then
			:
		elif test -d $cf_add_libdir
		then
			cf_have_libdir=no
			if test -n "$LDFLAGS$LIBS" ; then
				# a loop is needed to ensure we can add subdirs of existing dirs
				for cf_test_libdir in $LDFLAGS $LIBS ; do
					if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
						cf_have_libdir=yes; break
					fi
				done
			fi
			if test "$cf_have_libdir" = no ; then
				test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6

echo "${as_me:-configure}:10176: testing adding $cf_add_libdir to library-path ..." 1>&5

				LDFLAGS="-L$cf_add_libdir $LDFLAGS"
			fi
		fi
	done
fi

	fi
fi

case $cf_with_screen in #(vi
termcap|terminfo) #(we will determine which it really is
	;;
curses) #(vi
	use_curses=yes
	;;
ncurses) #(vi
	use_curses=yes
	use_ncurses=yes
	;;
ncursesw) #(vi
	use_curses=yes
	use_ncurses=yes
	;;
pdcurses) #(vi
	use_curses=yes
	;;
none)
	echo "$as_me:10205: checking if you want to use ncurses library" >&5
echo $ECHO_N "checking if you want to use ncurses library... $ECHO_C" >&6

# Check whether --with-ncurses or --without-ncurses was given.
if test "${with_ncurses+set}" = set; then
  withval="$with_ncurses"
  use_ncurses=$withval
else
  use_ncurses=no
fi;
	echo "$as_me:10215: result: $use_ncurses" >&5
echo "${ECHO_T}$use_ncurses" >&6

	echo "$as_me:10218: checking if you want curses rather than termcap interface" >&5
echo $ECHO_N "checking if you want curses rather than termcap interface... $ECHO_C" >&6

# Check whether --enable-curses or --disable-curses was given.
if test "${enable_curses+set}" = set; then
  enableval="$enable_curses"
  test "$enableval" != yes && enableval=no
	if test "$enableval" != "no" ; then
    cf_with_screen=curses;  use_curses=$withval
	else
		cf_with_screen=termcap; use_curses=no
	fi
else
  enableval=no
	cf_with_screen=termcap; use_curses=no

fi;
	echo "$as_me:10235: result: $enableval" >&5
echo "${ECHO_T}$enableval" >&6
	;;
esac

if test $use_curses != no ; then
	cat >>confdefs.h <<\EOF
#define USE_CURSES 1
EOF

	case $cf_with_screen in #(vi
	ncurses) #(vi

echo "$as_me:10248: checking if you want to use pkg-config" >&5
echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6

# Check whether --with-pkg-config or --without-pkg-config was given.
if test "${with_pkg_config+set}" = set; then
  withval="$with_pkg_config"
  cf_pkg_config=$withval
else
  cf_pkg_config=yes
fi;
echo "$as_me:10258: result: $cf_pkg_config" >&5
echo "${ECHO_T}$cf_pkg_config" >&6

case $cf_pkg_config in
(no)
	PKG_CONFIG=none
	;;
(yes)

if test -n "$ac_tool_prefix"; then
  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
echo "$as_me:10270: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $PKG_CONFIG in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
  ;;
  *)
  ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  if $as_executable_p "$ac_dir/$ac_word"; then
   ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
   echo "$as_me:10287: found $ac_dir/$ac_word" >&5
   break
fi
done

  ;;
esac
fi
PKG_CONFIG=$ac_cv_path_PKG_CONFIG

if test -n "$PKG_CONFIG"; then
  echo "$as_me:10298: result: $PKG_CONFIG" >&5
echo "${ECHO_T}$PKG_CONFIG" >&6
else
  echo "$as_me:10301: result: no" >&5
echo "${ECHO_T}no" >&6
fi

fi
if test -z "$ac_cv_path_PKG_CONFIG"; then
  ac_pt_PKG_CONFIG=$PKG_CONFIG
  # Extract the first word of "pkg-config", so it can be a program name with args.
set dummy pkg-config; ac_word=$2
echo "$as_me:10310: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $ac_pt_PKG_CONFIG in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
  ;;
  *)
  ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  if $as_executable_p "$ac_dir/$ac_word"; then
   ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
   echo "$as_me:10327: found $ac_dir/$ac_word" >&5
   break
fi
done

  test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
  ;;
esac
fi
ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG

if test -n "$ac_pt_PKG_CONFIG"; then
  echo "$as_me:10339: result: $ac_pt_PKG_CONFIG" >&5
echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
else
  echo "$as_me:10342: result: no" >&5
echo "${ECHO_T}no" >&6
fi

  PKG_CONFIG=$ac_pt_PKG_CONFIG
else
  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
fi

	;;
(*)
	PKG_CONFIG=$withval
	;;
esac

test -z "$PKG_CONFIG" && PKG_CONFIG=none
if test "$PKG_CONFIG" != none ; then

if test "x$prefix" != xNONE; then
	cf_path_syntax="$prefix"
else
	cf_path_syntax="$ac_default_prefix"
fi

case ".$PKG_CONFIG" in
(.\$\(*\)*|.\'*\'*)
	;;
(..|./*|.\\*)
	;;
(.[a-zA-Z]:[\\/]*) # OS/2 EMX
	;;
(.\${*prefix}*|.\${*dir}*)
	eval PKG_CONFIG="$PKG_CONFIG"
	case ".$PKG_CONFIG" in
	(.NONE/*)
		PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
		;;
	esac
	;;
(.no|.NONE/*)
	PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
	;;
(*)
	{ { echo "$as_me:10385: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
   { (exit 1); exit 1; }; }
	;;
esac

elif test "x$cf_pkg_config" != xno ; then
	{ echo "$as_me:10392: WARNING: pkg-config is not installed" >&5
echo "$as_me: WARNING: pkg-config is not installed" >&2;}
fi

cf_ncuconfig_root=ncurses
cf_have_ncuconfig=no

if test "x${PKG_CONFIG:=none}" != xnone; then
	echo "$as_me:10400: checking pkg-config for $cf_ncuconfig_root" >&5
echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
	if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
		echo "$as_me:10403: result: yes" >&5
echo "${ECHO_T}yes" >&6

		echo "$as_me:10406: checking if the $cf_ncuconfig_root package files work" >&5
echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
		cf_have_ncuconfig=unknown

		cf_save_CPPFLAGS="$CPPFLAGS"
		cf_save_LIBS="$LIBS"

cf_fix_cppflags=no
cf_new_cflags=
cf_new_cppflags=
cf_new_extra_cppflags=

for cf_add_cflags in `$PKG_CONFIG --cflags $cf_ncuconfig_root`
do
case $cf_fix_cppflags in
(no)
	case $cf_add_cflags in
	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
		case $cf_add_cflags in
		(-D*)
			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`

			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
				&& test -z "${cf_tst_cflags}" \
				&& cf_fix_cppflags=yes

			if test $cf_fix_cppflags = yes ; then

	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"

				continue
			elif test "${cf_tst_cflags}" = "\"'" ; then

	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"

				continue
			fi
			;;
		esac
		case "$CPPFLAGS" in
		(*$cf_add_cflags)
			;;
		(*)
			case $cf_add_cflags in
			(-D*)
				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`

CPPFLAGS=`echo "$CPPFLAGS" | \
	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`

				;;
			esac

	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"

			;;
		esac
		;;
	(*)

	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"

		;;
	esac
	;;
(yes)

	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"

	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`

	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
		&& test -z "${cf_tst_cflags}" \
		&& cf_fix_cppflags=no
	;;
esac
done

if test -n "$cf_new_cflags" ; then

	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
	CFLAGS="${CFLAGS}$cf_new_cflags"

fi

if test -n "$cf_new_cppflags" ; then

	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"

fi

if test -n "$cf_new_extra_cppflags" ; then

	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"

fi

cf_add_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
# Filter out duplicates - this happens with badly-designed ".pc" files...
for cf_add_1lib in $LIBS
do
	for cf_add_2lib in $cf_add_libs
	do
		if test "x$cf_add_1lib" = "x$cf_add_2lib"
		then
			cf_add_1lib=
			break
		fi
	done
	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
done
LIBS="$cf_add_libs"

		cat >conftest.$ac_ext <<_ACEOF
#line 10528 "configure"
#include "confdefs.h"
#include <${cf_cv_ncurses_header:-curses.h}>
int
main (void)
{
initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:10540: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:10543: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:10546: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:10549: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  if test "$cross_compiling" = yes; then
  cf_have_ncuconfig=maybe
else
  cat >conftest.$ac_ext <<_ACEOF
#line 10555 "configure"
#include "confdefs.h"
#include <${cf_cv_ncurses_header:-curses.h}>
				int main(void)
				{ char *xx = curses_version(); return (xx == 0); }
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:10562: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:10565: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:10567: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:10570: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  cf_have_ncuconfig=yes
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
cf_have_ncuconfig=no
fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
cf_have_ncuconfig=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
		echo "$as_me:10587: result: $cf_have_ncuconfig" >&5
echo "${ECHO_T}$cf_have_ncuconfig" >&6
		test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
		if test "$cf_have_ncuconfig" != "yes"
		then
			CPPFLAGS="$cf_save_CPPFLAGS"
			LIBS="$cf_save_LIBS"
			NCURSES_CONFIG_PKG=none
		else

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

			NCURSES_CONFIG_PKG=$cf_ncuconfig_root

echo "$as_me:10603: checking for terminfo header" >&5
echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
if test "${cf_cv_term_header+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

case ${cf_cv_ncurses_header} in
(*/ncurses.h|*/ncursesw.h)
	cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
	;;
(*)
	cf_term_header=term.h
	;;
esac

for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
do
cat >conftest.$ac_ext <<_ACEOF
#line 10621 "configure"
#include "confdefs.h"
#include <stdio.h>
#include <${cf_cv_ncurses_header:-curses.h}>
#include <$cf_test>

int
main (void)
{
int x = auto_left_margin
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:10636: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:10639: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:10642: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:10645: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then

	cf_cv_term_header="$cf_test"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5

	cf_cv_term_header=unknown

fi
rm -f conftest.$ac_objext conftest.$ac_ext
	test "$cf_cv_term_header" != unknown && break
done

fi
echo "$as_me:10661: result: $cf_cv_term_header" >&5
echo "${ECHO_T}$cf_cv_term_header" >&6

# Set definitions to allow ifdef'ing to accommodate subdirectories

case $cf_cv_term_header in
(*term.h)

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

	;;
esac

case $cf_cv_term_header in
(ncurses/term.h)

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

	;;
(ncursesw/term.h)

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

	;;
esac

		fi

	else
		echo "$as_me:10696: result: no" >&5
echo "${ECHO_T}no" >&6
		NCURSES_CONFIG_PKG=none
	fi
else
	NCURSES_CONFIG_PKG=none
fi

if test "x$cf_have_ncuconfig" = "xno"; then
	cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"

if test -n "$ac_tool_prefix"; then
  for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
  do
    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
set dummy $ac_tool_prefix$ac_prog; ac_word=$2
echo "$as_me:10712: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$NCURSES_CONFIG"; then
  ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
else
  ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  $as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
echo "$as_me:10727: found $ac_dir/$ac_word" >&5
break
done

fi
fi
NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
if test -n "$NCURSES_CONFIG"; then
  echo "$as_me:10735: result: $NCURSES_CONFIG" >&5
echo "${ECHO_T}$NCURSES_CONFIG" >&6
else
  echo "$as_me:10738: result: no" >&5
echo "${ECHO_T}no" >&6
fi

    test -n "$NCURSES_CONFIG" && break
  done
fi
if test -z "$NCURSES_CONFIG"; then
  ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
  for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
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 "$as_me:10751: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_NCURSES_CONFIG"; then
  ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
else
  ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  $as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
echo "$as_me:10766: found $ac_dir/$ac_word" >&5
break
done

fi
fi
ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
if test -n "$ac_ct_NCURSES_CONFIG"; then
  echo "$as_me:10774: result: $ac_ct_NCURSES_CONFIG" >&5
echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
else
  echo "$as_me:10777: result: no" >&5
echo "${ECHO_T}no" >&6
fi

  test -n "$ac_ct_NCURSES_CONFIG" && break
done
test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"

  NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
fi

	if test "$NCURSES_CONFIG" != none ; then

cf_fix_cppflags=no
cf_new_cflags=
cf_new_cppflags=
cf_new_extra_cppflags=

for cf_add_cflags in `$NCURSES_CONFIG --cflags`
do
case $cf_fix_cppflags in
(no)
	case $cf_add_cflags in
	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
		case $cf_add_cflags in
		(-D*)
			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`

			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
				&& test -z "${cf_tst_cflags}" \
				&& cf_fix_cppflags=yes

			if test $cf_fix_cppflags = yes ; then

	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"

				continue
			elif test "${cf_tst_cflags}" = "\"'" ; then

	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"

				continue
			fi
			;;
		esac
		case "$CPPFLAGS" in
		(*$cf_add_cflags)
			;;
		(*)
			case $cf_add_cflags in
			(-D*)
				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`

CPPFLAGS=`echo "$CPPFLAGS" | \
	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`

				;;
			esac

	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"

			;;
		esac
		;;
	(*)

	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"

		;;
	esac
	;;
(yes)

	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"

	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`

	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
		&& test -z "${cf_tst_cflags}" \
		&& cf_fix_cppflags=no
	;;
esac
done

if test -n "$cf_new_cflags" ; then

	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
	CFLAGS="${CFLAGS}$cf_new_cflags"

fi

if test -n "$cf_new_cppflags" ; then

	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"

fi

if test -n "$cf_new_extra_cppflags" ; then

	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"

fi

cf_add_libs="`$NCURSES_CONFIG --libs`"
# Filter out duplicates - this happens with badly-designed ".pc" files...
for cf_add_1lib in $LIBS
do
	for cf_add_2lib in $cf_add_libs
	do
		if test "x$cf_add_1lib" = "x$cf_add_2lib"
		then
			cf_add_1lib=
			break
		fi
	done
	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
done
LIBS="$cf_add_libs"

		# even with config script, some packages use no-override for curses.h

echo "$as_me:10906: checking if we have identified curses headers" >&5
echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
if test "${cf_cv_ncurses_header+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

cf_cv_ncurses_header=none
for cf_header in \
	ncurses.h ncurses/ncurses.h \
	curses.h ncurses/curses.h
do
cat >conftest.$ac_ext <<_ACEOF
#line 10918 "configure"
#include "confdefs.h"
#include <${cf_header}>
int
main (void)
{
initscr(); tgoto("?", 0,0)
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:10930: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:10933: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:10936: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:10939: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  cf_cv_ncurses_header=$cf_header; break
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest.$ac_objext conftest.$ac_ext
done

fi
echo "$as_me:10950: result: $cf_cv_ncurses_header" >&5
echo "${ECHO_T}$cf_cv_ncurses_header" >&6

if test "$cf_cv_ncurses_header" = none ; then
	{ { echo "$as_me:10954: error: No curses header-files found" >&5
echo "$as_me: error: No curses header-files found" >&2;}
   { (exit 1); exit 1; }; }
fi

# cheat, to get the right #define's for HAVE_NCURSES_H, etc.

for ac_header in $cf_cv_ncurses_header
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
echo "$as_me:10964: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 10970 "configure"
#include "confdefs.h"
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:10974: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  egrep -v '^ *\+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:10980: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  eval "$as_ac_Header=yes"
else
  echo "$as_me: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$as_ac_Header=no"
fi
rm -f conftest.err conftest.$ac_ext
fi
echo "$as_me:10999: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
if test `eval echo '${'$as_ac_Header'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
EOF

fi
done

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

cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`

		cat >>confdefs.h <<EOF
#define $cf_nculib_ROOT 1
EOF

				cf_cv_ncurses_version=`$NCURSES_CONFIG --version`

	else

cf_ncuhdr_root=ncurses

test -n "$cf_cv_curses_dir" && \
test "$cf_cv_curses_dir" != "no" && { \

if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
  for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
  do
	while test $cf_add_incdir != /usr/include
	do
	  if test -d $cf_add_incdir
	  then
		cf_have_incdir=no
		if test -n "$CFLAGS$CPPFLAGS" ; then
		  # a loop is needed to ensure we can add subdirs of existing dirs
		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
			  cf_have_incdir=yes; break
			fi
		  done
		fi

		if test "$cf_have_incdir" = no ; then
		  if test "$cf_add_incdir" = /usr/local/include ; then
			if test "$GCC" = yes
			then
			  cf_save_CPPFLAGS=$CPPFLAGS

	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
	CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"

			  cat >conftest.$ac_ext <<_ACEOF
#line 11055 "configure"
#include "confdefs.h"
#include <stdio.h>
int
main (void)
{
printf("Hello")
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:11067: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:11070: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:11073: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:11076: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  :
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
cf_have_incdir=yes
fi
rm -f conftest.$ac_objext conftest.$ac_ext
			  CPPFLAGS=$cf_save_CPPFLAGS
			fi
		  fi
		fi

		if test "$cf_have_incdir" = no ; then
		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6

echo "${as_me:-configure}:11093: testing adding $cf_add_incdir to include-path ..." 1>&5

		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"

		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
		  test "$cf_top_incdir" = "$cf_add_incdir" && break
		  cf_add_incdir="$cf_top_incdir"
		else
		  break
		fi
	  else
		break
	  fi
	done
  done
fi

}

echo "$as_me:11112: checking for $cf_ncuhdr_root header in include-path" >&5
echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
if test "${cf_cv_ncurses_h+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

	cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
	( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
	for cf_header in $cf_header_list
	do

	cat >conftest.$ac_ext <<_ACEOF
#line 11124 "configure"
#include "confdefs.h"

#include <$cf_header>
int
main (void)
{

#ifdef NCURSES_VERSION

printf("%s\n", NCURSES_VERSION);
#else
#ifdef __NCURSES_H
printf("old\n");
#else
	make an error
#endif
#endif

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:11148: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:11151: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:11154: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:11157: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  cf_cv_ncurses_h=$cf_header

else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
cf_cv_ncurses_h=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext

		test "$cf_cv_ncurses_h" != no && break
	done

fi
echo "$as_me:11172: result: $cf_cv_ncurses_h" >&5
echo "${ECHO_T}$cf_cv_ncurses_h" >&6

if test "$cf_cv_ncurses_h" != no ; then
	cf_cv_ncurses_header=$cf_cv_ncurses_h
else

echo "$as_me:11179: checking for $cf_ncuhdr_root include-path" >&5
echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
if test "${cf_cv_ncurses_h2+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

	test -n "$verbose" && echo

cf_search=

# collect the current set of include-directories from compiler flags
cf_header_path_list=""
if test -n "${CFLAGS}${CPPFLAGS}" ; then
	for cf_header_path in $CPPFLAGS $CFLAGS
	do
		case $cf_header_path in
		(-I*)
			cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`

test "x$cf_header_path" != "xNONE" && \
test -d "$cf_header_path" && \
 {
	test -n "$verbose" && echo "	... testing for include-directories under $cf_header_path"
	test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
	test -d $cf_header_path/include/$cf_ncuhdr_root &&       cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
	test -d $cf_header_path/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
	test -d $cf_header_path/$cf_ncuhdr_root/include &&       cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
	test -d $cf_header_path/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
}

			cf_header_path_list="$cf_header_path_list $cf_search"
			;;
		esac
	done
fi

# add the variations for the package we are looking for

cf_search=

test "x$prefix" != "xNONE" && \
test -d "$prefix" && \
 {
	test -n "$verbose" && echo "	... testing for include-directories under $prefix"
	test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
	test -d $prefix/include/$cf_ncuhdr_root &&       cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
	test -d $prefix/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
	test -d $prefix/$cf_ncuhdr_root/include &&       cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
	test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
}

for cf_subdir_prefix in \
	/usr \
	/usr/local \
	/usr/pkg \
	/opt \
	/opt/local \
	$HOME
do

test "x$cf_subdir_prefix" != "x$prefix" && \
test -d "$cf_subdir_prefix" && \
(test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
	test -n "$verbose" && echo "	... testing for include-directories under $cf_subdir_prefix"
	test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
	test -d $cf_subdir_prefix/include/$cf_ncuhdr_root &&       cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
	test -d $cf_subdir_prefix/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
	test -d $cf_subdir_prefix/$cf_ncuhdr_root/include &&       cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
	test -d $cf_subdir_prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
}

done

test "$includedir" != NONE && \
test "$includedir" != "/usr/include" && \
test -d "$includedir" && {
	test -d $includedir &&    cf_search="$cf_search $includedir"
	test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
}

test "$oldincludedir" != NONE && \
test "$oldincludedir" != "/usr/include" && \
test -d "$oldincludedir" && {
	test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
	test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
}

cf_search="$cf_search $cf_header_path_list"

	test -n "$verbose" && echo search path $cf_search
	cf_save2_CPPFLAGS="$CPPFLAGS"
	for cf_incdir in $cf_search
	do

if test -n "$cf_incdir" ; then
  for cf_add_incdir in $cf_incdir
  do
	while test $cf_add_incdir != /usr/include
	do
	  if test -d $cf_add_incdir
	  then
		cf_have_incdir=no
		if test -n "$CFLAGS$CPPFLAGS" ; then
		  # a loop is needed to ensure we can add subdirs of existing dirs
		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
			  cf_have_incdir=yes; break
			fi
		  done
		fi

		if test "$cf_have_incdir" = no ; then
		  if test "$cf_add_incdir" = /usr/local/include ; then
			if test "$GCC" = yes
			then
			  cf_save_CPPFLAGS=$CPPFLAGS

	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
	CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"

			  cat >conftest.$ac_ext <<_ACEOF
#line 11300 "configure"
#include "confdefs.h"
#include <stdio.h>
int
main (void)
{
printf("Hello")
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:11312: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:11315: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:11318: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:11321: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  :
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
cf_have_incdir=yes
fi
rm -f conftest.$ac_objext conftest.$ac_ext
			  CPPFLAGS=$cf_save_CPPFLAGS
			fi
		  fi
		fi

		if test "$cf_have_incdir" = no ; then
		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6

echo "${as_me:-configure}:11338: testing adding $cf_add_incdir to include-path ..." 1>&5

		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"

		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
		  test "$cf_top_incdir" = "$cf_add_incdir" && break
		  cf_add_incdir="$cf_top_incdir"
		else
		  break
		fi
	  else
		break
	  fi
	done
  done
fi

		for cf_header in \
			ncurses.h \
			curses.h
		do

	cat >conftest.$ac_ext <<_ACEOF
#line 11361 "configure"
#include "confdefs.h"

#include <$cf_header>
int
main (void)
{

#ifdef NCURSES_VERSION

printf("%s\n", NCURSES_VERSION);
#else
#ifdef __NCURSES_H
printf("old\n");
#else
	make an error
#endif
#endif

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:11385: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:11388: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:11391: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:11394: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  cf_cv_ncurses_h2=$cf_header

else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
cf_cv_ncurses_h2=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext

			if test "$cf_cv_ncurses_h2" != no ; then
				cf_cv_ncurses_h2=$cf_incdir/$cf_header
				test -n "$verbose" && echo $ac_n "	... found $ac_c" 1>&6
				break
			fi
			test -n "$verbose" && echo "	... tested $cf_incdir/$cf_header" 1>&6
		done
		CPPFLAGS="$cf_save2_CPPFLAGS"
		test "$cf_cv_ncurses_h2" != no && break
	done
	test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:11415: error: not found" >&5
echo "$as_me: error: not found" >&2;}
   { (exit 1); exit 1; }; }

fi
echo "$as_me:11420: result: $cf_cv_ncurses_h2" >&5
echo "${ECHO_T}$cf_cv_ncurses_h2" >&6

	cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
	cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
	if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
		cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
	fi

if test -n "$cf_1st_incdir" ; then
  for cf_add_incdir in $cf_1st_incdir
  do
	while test $cf_add_incdir != /usr/include
	do
	  if test -d $cf_add_incdir
	  then
		cf_have_incdir=no
		if test -n "$CFLAGS$CPPFLAGS" ; then
		  # a loop is needed to ensure we can add subdirs of existing dirs
		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
			  cf_have_incdir=yes; break
			fi
		  done
		fi

		if test "$cf_have_incdir" = no ; then
		  if test "$cf_add_incdir" = /usr/local/include ; then
			if test "$GCC" = yes
			then
			  cf_save_CPPFLAGS=$CPPFLAGS

	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
	CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"

			  cat >conftest.$ac_ext <<_ACEOF
#line 11456 "configure"
#include "confdefs.h"
#include <stdio.h>
int
main (void)
{
printf("Hello")
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:11468: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:11471: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:11474: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:11477: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  :
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
cf_have_incdir=yes
fi
rm -f conftest.$ac_objext conftest.$ac_ext
			  CPPFLAGS=$cf_save_CPPFLAGS
			fi
		  fi
		fi

		if test "$cf_have_incdir" = no ; then
		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6

echo "${as_me:-configure}:11494: testing adding $cf_add_incdir to include-path ..." 1>&5

		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"

		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
		  test "$cf_top_incdir" = "$cf_add_incdir" && break
		  cf_add_incdir="$cf_top_incdir"
		else
		  break
		fi
	  else
		break
	  fi
	done
  done
fi

fi

# Set definitions to allow ifdef'ing for ncurses.h

case $cf_cv_ncurses_header in
(*ncurses.h)

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

	;;
esac

case $cf_cv_ncurses_header in
(ncurses/curses.h|ncurses/ncurses.h)

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

	;;
(ncursesw/curses.h|ncursesw/ncurses.h)

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

	;;
esac

echo "$as_me:11542: checking for terminfo header" >&5
echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
if test "${cf_cv_term_header+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

case ${cf_cv_ncurses_header} in
(*/ncurses.h|*/ncursesw.h)
	cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
	;;
(*)
	cf_term_header=term.h
	;;
esac

for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
do
cat >conftest.$ac_ext <<_ACEOF
#line 11560 "configure"
#include "confdefs.h"
#include <stdio.h>
#include <${cf_cv_ncurses_header:-curses.h}>
#include <$cf_test>

int
main (void)
{
int x = auto_left_margin
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:11575: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:11578: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:11581: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:11584: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then

	cf_cv_term_header="$cf_test"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5

	cf_cv_term_header=unknown

fi
rm -f conftest.$ac_objext conftest.$ac_ext
	test "$cf_cv_term_header" != unknown && break
done

fi
echo "$as_me:11600: result: $cf_cv_term_header" >&5
echo "${ECHO_T}$cf_cv_term_header" >&6

# Set definitions to allow ifdef'ing to accommodate subdirectories

case $cf_cv_term_header in
(*term.h)

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

	;;
esac

case $cf_cv_term_header in
(ncurses/term.h)

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

	;;
(ncursesw/term.h)

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

	;;
esac

# some applications need this, but should check for NCURSES_VERSION

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

echo "$as_me:11638: checking for ncurses version" >&5
echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
if test "${cf_cv_ncurses_version+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

	cf_cv_ncurses_version=no
	cf_tempfile=out$$
	rm -f $cf_tempfile
	if test "$cross_compiling" = yes; then

	# This will not work if the preprocessor splits the line after the
	# Autoconf token.  The 'unproto' program does that.
	cat > conftest.$ac_ext <<EOF
#include <${cf_cv_ncurses_header:-curses.h}>
#undef Autoconf
#ifdef NCURSES_VERSION
Autoconf NCURSES_VERSION
#else
#ifdef __NCURSES_H
Autoconf "old"
#endif
;
#endif
EOF
	cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
	{ (eval echo "$as_me:11664: \"$cf_try\"") >&5
  (eval $cf_try) 2>&5
  ac_status=$?
  echo "$as_me:11667: \$? = $ac_status" >&5
  (exit $ac_status); }
	if test -f conftest.out ; then
		cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
		test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
		rm -f conftest.out
	fi

else
  cat >conftest.$ac_ext <<_ACEOF
#line 11677 "configure"
#include "confdefs.h"

#include <${cf_cv_ncurses_header:-curses.h}>
#include <stdio.h>
int main(void)
{
	FILE *fp = fopen("$cf_tempfile", "w");
#ifdef NCURSES_VERSION
# ifdef NCURSES_VERSION_PATCH
	fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
# else
	fprintf(fp, "%s\n", NCURSES_VERSION);
# endif
#else
# ifdef __NCURSES_H
	fprintf(fp, "old\n");
# else
	make an error
# endif
#endif
	${cf_cv_main_return:-return}(0);
}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:11702: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:11705: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:11707: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:11710: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then

	cf_cv_ncurses_version=`cat $cf_tempfile`
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
	rm -f $cf_tempfile

fi
echo "$as_me:11724: result: $cf_cv_ncurses_version" >&5
echo "${ECHO_T}$cf_cv_ncurses_version" >&6
test "$cf_cv_ncurses_version" = no ||
cat >>confdefs.h <<\EOF
#define NCURSES 1
EOF

cf_nculib_root=ncurses
	# This works, except for the special case where we find gpm, but
	# ncurses is in a nonstandard location via $LIBS, and we really want
	# to link gpm.
cf_ncurses_LIBS=""
cf_ncurses_SAVE="$LIBS"
echo "$as_me:11737: checking for Gpm_Open in -lgpm" >&5
echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lgpm  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 11745 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char Gpm_Open ();
int
main (void)
{
Gpm_Open ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:11764: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:11767: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:11770: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:11773: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_gpm_Gpm_Open=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_gpm_Gpm_Open=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:11784: result: $ac_cv_lib_gpm_Gpm_Open" >&5
echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
if test $ac_cv_lib_gpm_Gpm_Open = yes; then
  echo "$as_me:11787: checking for initscr in -lgpm" >&5
echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
if test "${ac_cv_lib_gpm_initscr+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lgpm  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 11795 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char initscr ();
int
main (void)
{
initscr ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:11814: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:11817: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:11820: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:11823: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_gpm_initscr=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_gpm_initscr=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:11834: result: $ac_cv_lib_gpm_initscr" >&5
echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
if test $ac_cv_lib_gpm_initscr = yes; then
  LIBS="$cf_ncurses_SAVE"
else
  cf_ncurses_LIBS="-lgpm"
fi

fi

case $host_os in
(freebsd*)
	# This is only necessary if you are linking against an obsolete
	# version of ncurses (but it should do no harm, since it's static).
	if test "$cf_nculib_root" = ncurses ; then
		echo "$as_me:11849: checking for tgoto in -lmytinfo" >&5
echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lmytinfo  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 11857 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char tgoto ();
int
main (void)
{
tgoto ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:11876: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:11879: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:11882: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:11885: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_mytinfo_tgoto=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_mytinfo_tgoto=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:11896: result: $ac_cv_lib_mytinfo_tgoto" >&5
echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
if test $ac_cv_lib_mytinfo_tgoto = yes; then
  cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
fi

	fi
	;;
esac

cf_add_libs="$cf_ncurses_LIBS"
# Filter out duplicates - this happens with badly-designed ".pc" files...
for cf_add_1lib in $LIBS
do
	for cf_add_2lib in $cf_add_libs
	do
		if test "x$cf_add_1lib" = "x$cf_add_2lib"
		then
			cf_add_1lib=
			break
		fi
	done
	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
done
LIBS="$cf_add_libs"

if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
then

cf_add_libs="-l$cf_nculib_root"
# Filter out duplicates - this happens with badly-designed ".pc" files...
for cf_add_1lib in $LIBS
do
	for cf_add_2lib in $cf_add_libs
	do
		if test "x$cf_add_1lib" = "x$cf_add_2lib"
		then
			cf_add_1lib=
			break
		fi
	done
	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
done
LIBS="$cf_add_libs"

else

	eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
	cf_libdir=""
	echo "$as_me:11945: checking for initscr" >&5
echo $ECHO_N "checking for initscr... $ECHO_C" >&6
if test "${ac_cv_func_initscr+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 11951 "configure"
#include "confdefs.h"
#define initscr autoconf_temporary
#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
#undef initscr

#ifdef __cplusplus
extern "C"
#endif

/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char initscr (void);

int
main (void)
{

/* The GNU C library defines stubs for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_initscr) || defined (__stub___initscr)
#error found stub for initscr
#endif

	return initscr ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:11982: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:11985: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:11988: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:11991: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_func_initscr=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_func_initscr=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:12001: result: $ac_cv_func_initscr" >&5
echo "${ECHO_T}$ac_cv_func_initscr" >&6
if test $ac_cv_func_initscr = yes; then
  eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
else

		cf_save_LIBS="$LIBS"
		echo "$as_me:12008: checking for initscr in -l$cf_nculib_root" >&5
echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
		LIBS="-l$cf_nculib_root $LIBS"
		cat >conftest.$ac_ext <<_ACEOF
#line 12012 "configure"
#include "confdefs.h"
#include <${cf_cv_ncurses_header:-curses.h}>
int
main (void)
{
initscr()
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:12024: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:12027: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:12030: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:12033: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  echo "$as_me:12035: result: yes" >&5
echo "${ECHO_T}yes" >&6
			 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'

else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
echo "$as_me:12042: result: no" >&5
echo "${ECHO_T}no" >&6

cf_search=
cf_library_path_list=""
if test -n "${LDFLAGS}${LIBS}" ; then
	for cf_library_path in $LDFLAGS $LIBS
	do
		case $cf_library_path in
		(-L*)
			cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`

test "x$cf_library_path" != "xNONE" && \
test -d "$cf_library_path" && \
 {
	test -n "$verbose" && echo "	... testing for lib-directories under $cf_library_path"
	test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
	test -d $cf_library_path/lib/$cf_nculib_root &&       cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
	test -d $cf_library_path/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
	test -d $cf_library_path/$cf_nculib_root/lib &&       cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
	test -d $cf_library_path/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib/$cf_nculib_root"
}

			cf_library_path_list="$cf_library_path_list $cf_search"
			;;
		esac
	done
fi

cf_search=

test "x$prefix" != "xNONE" && \
test -d "$prefix" && \
 {
	test -n "$verbose" && echo "	... testing for lib-directories under $prefix"
	test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
	test -d $prefix/lib/$cf_nculib_root &&       cf_search="$cf_search $prefix/lib/$cf_nculib_root"
	test -d $prefix/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
	test -d $prefix/$cf_nculib_root/lib &&       cf_search="$cf_search $prefix/$cf_nculib_root/lib"
	test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
}

for cf_subdir_prefix in \
	/usr \
	/usr/local \
	/usr/pkg \
	/opt \
	/opt/local \
	$HOME
do

test "x$cf_subdir_prefix" != "x$prefix" && \
test -d "$cf_subdir_prefix" && \
(test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
	test -n "$verbose" && echo "	... testing for lib-directories under $cf_subdir_prefix"
	test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
	test -d $cf_subdir_prefix/lib/$cf_nculib_root &&       cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
	test -d $cf_subdir_prefix/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
	test -d $cf_subdir_prefix/$cf_nculib_root/lib &&       cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
	test -d $cf_subdir_prefix/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib/$cf_nculib_root"
}

done

cf_search="$cf_library_path_list $cf_search"

			for cf_libdir in $cf_search
			do
				echo "$as_me:12110: checking for -l$cf_nculib_root in $cf_libdir" >&5
echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
				LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
				cat >conftest.$ac_ext <<_ACEOF
#line 12114 "configure"
#include "confdefs.h"
#include <${cf_cv_ncurses_header:-curses.h}>
int
main (void)
{
initscr()
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:12126: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:12129: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:12132: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:12135: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  echo "$as_me:12137: result: yes" >&5
echo "${ECHO_T}yes" >&6
			 		 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
					 break
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
echo "$as_me:12144: result: no" >&5
echo "${ECHO_T}no" >&6
					 LIBS="$cf_save_LIBS"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
			done

fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext

fi

eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root

if test $cf_found_library = no ; then
	{ { echo "$as_me:12159: error: Cannot link $cf_nculib_root library" >&5
echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
   { (exit 1); exit 1; }; }
fi

fi

if test -n "$cf_ncurses_LIBS" ; then
	echo "$as_me:12167: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
	cf_ncurses_SAVE="$LIBS"
	for p in $cf_ncurses_LIBS ; do
		q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
		if test "$q" != "$LIBS" ; then
			LIBS="$q"
		fi
	done
	cat >conftest.$ac_ext <<_ACEOF
#line 12177 "configure"
#include "confdefs.h"
#include <${cf_cv_ncurses_header:-curses.h}>
int
main (void)
{
initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:12189: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:12192: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:12195: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:12198: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  echo "$as_me:12200: result: yes" >&5
echo "${ECHO_T}yes" >&6
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
echo "$as_me:12205: result: no" >&5
echo "${ECHO_T}no" >&6
		 LIBS="$cf_ncurses_SAVE"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi

cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`

cat >>confdefs.h <<EOF
#define $cf_nculib_ROOT 1
EOF

	fi
else
	NCURSES_CONFIG=none
fi

		;;
	ncursesw) #(vi

for cf_hdr in stdlib.h wchar.h wctype.h
do
	echo "$as_me:12228: checking for $cf_hdr" >&5
echo $ECHO_N "checking for $cf_hdr... $ECHO_C" >&6
	cat >conftest.$ac_ext <<_ACEOF
#line 12231 "configure"
#include "confdefs.h"

#include <sys/types.h>
#include <$cf_hdr>

_ACEOF
if { (eval echo "$as_me:12238: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  egrep -v '^ *\+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:12244: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  cf_found=yes
else
  echo "$as_me: failed program was:" >&5
  cat conftest.$ac_ext >&5
  cf_found=no
fi
rm -f conftest.err conftest.$ac_ext
echo "$as_me:12262: result: $cf_found" >&5
echo "${ECHO_T}$cf_found" >&6
if test $cf_found = yes ; then

cf_tr_hdr=`echo "$cf_hdr" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`

	cat >>confdefs.h <<EOF
#define HAVE_${cf_tr_hdr} 1
EOF

fi
done

  echo "$as_me:12275: checking for wide char and multibyte support" >&5
echo $ECHO_N "checking for wide char and multibyte support... $ECHO_C" >&6
if test "${am_cv_multibyte_able+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 12281 "configure"
#include "confdefs.h"
#include <stdio.h>
#ifdef HAVE_STDLIB_H
#	include <stdlib.h>
#endif /* HAVE_STDLIB_H */
#ifdef HAVE_WCHAR_H
#	include <wchar.h>
#endif /* HAVE_WCHAR_H */
#ifdef HAVE_WCTYPE_H
#	include <wctype.h>
#endif /* HAVE_WCTYPE_H */

int
main (void)
{
const char icb[5] = {0xa4, 0xa4, 0xa4, 0xe5, 0x00};
      char ocb[5];
      wchar_t wcb[5];
      wchar_t wcb2[5];
      wchar_t format[3];

      putwc(0, 0);
      fputwc(0, 0);
      fwide(0, 0);
      mbtowc(wcb, icb, MB_CUR_MAX);
      mbstowcs(wcb, icb, 5);
      (void) iswalnum((wint_t) wcb[0]);
      (void) iswcntrl((wint_t) wcb[0]);
      (void) iswdigit((wint_t) wcb[0]);
      (void) iswgraph((wint_t) wcb[0]);
      (void) iswprint((wint_t) wcb[0]);
      (void) iswspace((wint_t) wcb[0]);
      (void) towupper((wint_t) wcb[0]);
      /* (void) iswupper((wint_t) wcb[0]); */
      /* (void) towlower((wint_t) wcb[0]); */
      /* (void) iswlower((wint_t) wcb[0]); */
      (void) iswalpha((wint_t) wcb[0]);
      /* (void) iswblank((wint_t) wcb[0]); */
      /* (void) iswpunct((wint_t) wcb[0]); */
      /* (void) iswxdigit((wint_t) wcb[0]); */
      /* (void) iswctype((wint_t) wcb[0], wctype("print")); */
      /* (void) towctranse((wint_t) wcb[0], wctrans("toupper")); */
      (void) wcslen(wcb);
      /* (void) wcsnlen(wcb, 4); */
      wcwidth((wint_t) wcb[0]);
      wcswidth(wcb, 5);
      wcstombs(ocb, wcb, 5);
      wctomb(ocb, wcb[0]);
      wcscat(wcb2, wcb);
      wcscpy(wcb2, wcb);
      mbstowcs(format, "%s", 2);
      swprintf(wcb, 5, format, "test");
      wcsncat(wcb2, wcb, 5);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:12340: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:12343: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:12346: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:12349: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  am_cv_multibyte_able=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
cf_save_LIBS="$LIBS"
      LIBS="-lutf8 $LIBS"
      cat >conftest.$ac_ext <<_ACEOF
#line 12358 "configure"
#include "confdefs.h"
#include <libutf8.h>
int
main (void)
{
const char icb[5] = {0xa4, 0xa4, 0xa4, 0xe5, 0x00};
        char ocb[5];
        wchar_t wcb[5];
        wchar_t wcb2[5];
        wchar_t format[3];

        putwc(0, 0);
        fputwc(0, 0);
        fwide(0, 0);
        mbtowc(wcb, icb, MB_CUR_MAX);
        mbstowcs(wcb, icb, 5);
        (void) iswalnum((wint_t) wcb[0]);
        (void) iswcntrl((wint_t) wcb[0]);
        (void) iswdigit((wint_t) wcb[0]);
        (void) iswgraph((wint_t) wcb[0]);
        (void) iswprint((wint_t) wcb[0]);
        (void) iswspace((wint_t) wcb[0]);
        (void) towupper((wint_t) wcb[0]);
        /* (void) iswupper((wint_t) wcb[0]); */
        /* (void) towlower((wint_t) wcb[0]); */
        /* (void) iswlower((wint_t) wcb[0]); */
        (void) iswalpha((wint_t) wcb[0]);
        /* (void) iswblank((wint_t) wcb[0]); */
        /* (void) iswpunct((wint_t) wcb[0]); */
        /* (void) iswxdigit((wint_t) wcb[0]); */
        /* (void) iswctype((wint_t) wcb[0], wctype("print")); */
        /* (void) towctranse((wint_t) wcb[0], wctrans("toupper")); */
        (void) wcslen(wcb);
        /* (void) wcsnlen(wcb, 4); */
        wcwidth((wint_t) wcb[0]);
        wcswidth(wcb, 5);
        wcstombs(ocb, wcb, 5);
        wctomb(ocb, wcb[0]);
        wcscat(wcb2, wcb);
        wcscpy(wcb2, wcb);
        mbstowcs(format, "%s", 2);
        swprintf(wcb, 5, format, "test");
        wcsncat(wcb2, wcb, 5);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:12407: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:12410: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:12413: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:12416: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  am_cv_multibyte_able=libutf8
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
am_cv_multibyte_able=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
      LIBS="$cf_save_LIBS"

fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext

fi
echo "$as_me:12431: result: $am_cv_multibyte_able" >&5
echo "${ECHO_T}$am_cv_multibyte_able" >&6
  if test "$am_cv_multibyte_able" != no; then
    if test "$am_cv_multibyte_able" = libutf8; then
      cat >>confdefs.h <<\EOF
#define HAVE_LIBUTF8_H 1
EOF

      LIBS="-lutf8 $LIBS"
    fi

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

  fi

cf_ncuconfig_root=ncursesw
cf_have_ncuconfig=no

if test "x${PKG_CONFIG:=none}" != xnone; then
	echo "$as_me:12452: checking pkg-config for $cf_ncuconfig_root" >&5
echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
	if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
		echo "$as_me:12455: result: yes" >&5
echo "${ECHO_T}yes" >&6

		echo "$as_me:12458: checking if the $cf_ncuconfig_root package files work" >&5
echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
		cf_have_ncuconfig=unknown

		cf_save_CPPFLAGS="$CPPFLAGS"
		cf_save_LIBS="$LIBS"

cf_fix_cppflags=no
cf_new_cflags=
cf_new_cppflags=
cf_new_extra_cppflags=

for cf_add_cflags in `$PKG_CONFIG --cflags $cf_ncuconfig_root`
do
case $cf_fix_cppflags in
(no)
	case $cf_add_cflags in
	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
		case $cf_add_cflags in
		(-D*)
			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`

			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
				&& test -z "${cf_tst_cflags}" \
				&& cf_fix_cppflags=yes

			if test $cf_fix_cppflags = yes ; then

	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"

				continue
			elif test "${cf_tst_cflags}" = "\"'" ; then

	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"

				continue
			fi
			;;
		esac
		case "$CPPFLAGS" in
		(*$cf_add_cflags)
			;;
		(*)
			case $cf_add_cflags in
			(-D*)
				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`

CPPFLAGS=`echo "$CPPFLAGS" | \
	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`

				;;
			esac

	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"

			;;
		esac
		;;
	(*)

	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"

		;;
	esac
	;;
(yes)

	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"

	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`

	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
		&& test -z "${cf_tst_cflags}" \
		&& cf_fix_cppflags=no
	;;
esac
done

if test -n "$cf_new_cflags" ; then

	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
	CFLAGS="${CFLAGS}$cf_new_cflags"

fi

if test -n "$cf_new_cppflags" ; then

	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"

fi

if test -n "$cf_new_extra_cppflags" ; then

	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"

fi

cf_add_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
# Filter out duplicates - this happens with badly-designed ".pc" files...
for cf_add_1lib in $LIBS
do
	for cf_add_2lib in $cf_add_libs
	do
		if test "x$cf_add_1lib" = "x$cf_add_2lib"
		then
			cf_add_1lib=
			break
		fi
	done
	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
done
LIBS="$cf_add_libs"

		cat >conftest.$ac_ext <<_ACEOF
#line 12580 "configure"
#include "confdefs.h"
#include <${cf_cv_ncurses_header:-curses.h}>
int
main (void)
{
initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:12592: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:12595: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:12598: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:12601: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  if test "$cross_compiling" = yes; then
  cf_have_ncuconfig=maybe
else
  cat >conftest.$ac_ext <<_ACEOF
#line 12607 "configure"
#include "confdefs.h"
#include <${cf_cv_ncurses_header:-curses.h}>
				int main(void)
				{ char *xx = curses_version(); return (xx == 0); }
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:12614: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:12617: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:12619: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:12622: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  cf_have_ncuconfig=yes
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
cf_have_ncuconfig=no
fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
cf_have_ncuconfig=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
		echo "$as_me:12639: result: $cf_have_ncuconfig" >&5
echo "${ECHO_T}$cf_have_ncuconfig" >&6
		test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
		if test "$cf_have_ncuconfig" != "yes"
		then
			CPPFLAGS="$cf_save_CPPFLAGS"
			LIBS="$cf_save_LIBS"
			NCURSES_CONFIG_PKG=none
		else

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

			NCURSES_CONFIG_PKG=$cf_ncuconfig_root

echo "$as_me:12655: checking for terminfo header" >&5
echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
if test "${cf_cv_term_header+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

case ${cf_cv_ncurses_header} in
(*/ncurses.h|*/ncursesw.h)
	cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
	;;
(*)
	cf_term_header=term.h
	;;
esac

for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
do
cat >conftest.$ac_ext <<_ACEOF
#line 12673 "configure"
#include "confdefs.h"
#include <stdio.h>
#include <${cf_cv_ncurses_header:-curses.h}>
#include <$cf_test>

int
main (void)
{
int x = auto_left_margin
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:12688: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:12691: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:12694: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:12697: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then

	cf_cv_term_header="$cf_test"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5

	cf_cv_term_header=unknown

fi
rm -f conftest.$ac_objext conftest.$ac_ext
	test "$cf_cv_term_header" != unknown && break
done

fi
echo "$as_me:12713: result: $cf_cv_term_header" >&5
echo "${ECHO_T}$cf_cv_term_header" >&6

# Set definitions to allow ifdef'ing to accommodate subdirectories

case $cf_cv_term_header in
(*term.h)

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

	;;
esac

case $cf_cv_term_header in
(ncurses/term.h)

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

	;;
(ncursesw/term.h)

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

	;;
esac

		fi

	else
		echo "$as_me:12748: result: no" >&5
echo "${ECHO_T}no" >&6
		NCURSES_CONFIG_PKG=none
	fi
else
	NCURSES_CONFIG_PKG=none
fi

if test "x$cf_have_ncuconfig" = "xno"; then
	cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"

if test -n "$ac_tool_prefix"; then
  for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
  do
    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
set dummy $ac_tool_prefix$ac_prog; ac_word=$2
echo "$as_me:12764: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$NCURSES_CONFIG"; then
  ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
else
  ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  $as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
echo "$as_me:12779: found $ac_dir/$ac_word" >&5
break
done

fi
fi
NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
if test -n "$NCURSES_CONFIG"; then
  echo "$as_me:12787: result: $NCURSES_CONFIG" >&5
echo "${ECHO_T}$NCURSES_CONFIG" >&6
else
  echo "$as_me:12790: result: no" >&5
echo "${ECHO_T}no" >&6
fi

    test -n "$NCURSES_CONFIG" && break
  done
fi
if test -z "$NCURSES_CONFIG"; then
  ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
  for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
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 "$as_me:12803: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_NCURSES_CONFIG"; then
  ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
else
  ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  $as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
echo "$as_me:12818: found $ac_dir/$ac_word" >&5
break
done

fi
fi
ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
if test -n "$ac_ct_NCURSES_CONFIG"; then
  echo "$as_me:12826: result: $ac_ct_NCURSES_CONFIG" >&5
echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
else
  echo "$as_me:12829: result: no" >&5
echo "${ECHO_T}no" >&6
fi

  test -n "$ac_ct_NCURSES_CONFIG" && break
done
test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"

  NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
fi

	if test "$NCURSES_CONFIG" != none ; then

cf_fix_cppflags=no
cf_new_cflags=
cf_new_cppflags=
cf_new_extra_cppflags=

for cf_add_cflags in `$NCURSES_CONFIG --cflags`
do
case $cf_fix_cppflags in
(no)
	case $cf_add_cflags in
	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
		case $cf_add_cflags in
		(-D*)
			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`

			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
				&& test -z "${cf_tst_cflags}" \
				&& cf_fix_cppflags=yes

			if test $cf_fix_cppflags = yes ; then

	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"

				continue
			elif test "${cf_tst_cflags}" = "\"'" ; then

	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"

				continue
			fi
			;;
		esac
		case "$CPPFLAGS" in
		(*$cf_add_cflags)
			;;
		(*)
			case $cf_add_cflags in
			(-D*)
				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`

CPPFLAGS=`echo "$CPPFLAGS" | \
	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`

				;;
			esac

	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"

			;;
		esac
		;;
	(*)

	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"

		;;
	esac
	;;
(yes)

	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"

	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`

	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
		&& test -z "${cf_tst_cflags}" \
		&& cf_fix_cppflags=no
	;;
esac
done

if test -n "$cf_new_cflags" ; then

	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
	CFLAGS="${CFLAGS}$cf_new_cflags"

fi

if test -n "$cf_new_cppflags" ; then

	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"

fi

if test -n "$cf_new_extra_cppflags" ; then

	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"

fi

cf_add_libs="`$NCURSES_CONFIG --libs`"
# Filter out duplicates - this happens with badly-designed ".pc" files...
for cf_add_1lib in $LIBS
do
	for cf_add_2lib in $cf_add_libs
	do
		if test "x$cf_add_1lib" = "x$cf_add_2lib"
		then
			cf_add_1lib=
			break
		fi
	done
	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
done
LIBS="$cf_add_libs"

		# even with config script, some packages use no-override for curses.h

echo "$as_me:12958: checking if we have identified curses headers" >&5
echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
if test "${cf_cv_ncurses_header+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

cf_cv_ncurses_header=none
for cf_header in \
	ncurses.h ncursesw/ncurses.h \
	curses.h ncursesw/curses.h
do
cat >conftest.$ac_ext <<_ACEOF
#line 12970 "configure"
#include "confdefs.h"
#include <${cf_header}>
int
main (void)
{
initscr(); tgoto("?", 0,0)
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:12982: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:12985: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:12988: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:12991: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  cf_cv_ncurses_header=$cf_header; break
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest.$ac_objext conftest.$ac_ext
done

fi
echo "$as_me:13002: result: $cf_cv_ncurses_header" >&5
echo "${ECHO_T}$cf_cv_ncurses_header" >&6

if test "$cf_cv_ncurses_header" = none ; then
	{ { echo "$as_me:13006: error: No curses header-files found" >&5
echo "$as_me: error: No curses header-files found" >&2;}
   { (exit 1); exit 1; }; }
fi

# cheat, to get the right #define's for HAVE_NCURSES_H, etc.

for ac_header in $cf_cv_ncurses_header
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
echo "$as_me:13016: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 13022 "configure"
#include "confdefs.h"
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:13026: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  egrep -v '^ *\+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:13032: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  eval "$as_ac_Header=yes"
else
  echo "$as_me: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$as_ac_Header=no"
fi
rm -f conftest.err conftest.$ac_ext
fi
echo "$as_me:13051: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
if test `eval echo '${'$as_ac_Header'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
EOF

fi
done

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

cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`

		cat >>confdefs.h <<EOF
#define $cf_nculib_ROOT 1
EOF

				cf_cv_ncurses_version=`$NCURSES_CONFIG --version`

	else

cf_ncuhdr_root=ncursesw

test -n "$cf_cv_curses_dir" && \
test "$cf_cv_curses_dir" != "no" && { \

if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
  for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
  do
	while test $cf_add_incdir != /usr/include
	do
	  if test -d $cf_add_incdir
	  then
		cf_have_incdir=no
		if test -n "$CFLAGS$CPPFLAGS" ; then
		  # a loop is needed to ensure we can add subdirs of existing dirs
		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
			  cf_have_incdir=yes; break
			fi
		  done
		fi

		if test "$cf_have_incdir" = no ; then
		  if test "$cf_add_incdir" = /usr/local/include ; then
			if test "$GCC" = yes
			then
			  cf_save_CPPFLAGS=$CPPFLAGS

	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
	CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"

			  cat >conftest.$ac_ext <<_ACEOF
#line 13107 "configure"
#include "confdefs.h"
#include <stdio.h>
int
main (void)
{
printf("Hello")
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:13119: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:13122: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:13125: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:13128: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  :
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
cf_have_incdir=yes
fi
rm -f conftest.$ac_objext conftest.$ac_ext
			  CPPFLAGS=$cf_save_CPPFLAGS
			fi
		  fi
		fi

		if test "$cf_have_incdir" = no ; then
		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6

echo "${as_me:-configure}:13145: testing adding $cf_add_incdir to include-path ..." 1>&5

		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"

		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
		  test "$cf_top_incdir" = "$cf_add_incdir" && break
		  cf_add_incdir="$cf_top_incdir"
		else
		  break
		fi
	  else
		break
	  fi
	done
  done
fi

}

echo "$as_me:13164: checking for $cf_ncuhdr_root header in include-path" >&5
echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
if test "${cf_cv_ncurses_h+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

	cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
	( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
	for cf_header in $cf_header_list
	do

	cat >conftest.$ac_ext <<_ACEOF
#line 13176 "configure"
#include "confdefs.h"

#define _XOPEN_SOURCE_EXTENDED
#undef  HAVE_LIBUTF8_H	/* in case we used CF_UTF8_LIB */
#define HAVE_LIBUTF8_H	/* to force ncurses' header file to use cchar_t */

#include <$cf_header>
int
main (void)
{

#ifdef NCURSES_VERSION

#ifndef WACS_BSSB
	make an error
#endif

printf("%s\n", NCURSES_VERSION);
#else
#ifdef __NCURSES_H
printf("old\n");
#else
	make an error
#endif
#endif

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:13208: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:13211: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:13214: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:13217: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  cf_cv_ncurses_h=$cf_header

else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
cf_cv_ncurses_h=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext

		test "$cf_cv_ncurses_h" != no && break
	done

fi
echo "$as_me:13232: result: $cf_cv_ncurses_h" >&5
echo "${ECHO_T}$cf_cv_ncurses_h" >&6

if test "$cf_cv_ncurses_h" != no ; then
	cf_cv_ncurses_header=$cf_cv_ncurses_h
else

echo "$as_me:13239: checking for $cf_ncuhdr_root include-path" >&5
echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
if test "${cf_cv_ncurses_h2+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

	test -n "$verbose" && echo

cf_search=

# collect the current set of include-directories from compiler flags
cf_header_path_list=""
if test -n "${CFLAGS}${CPPFLAGS}" ; then
	for cf_header_path in $CPPFLAGS $CFLAGS
	do
		case $cf_header_path in
		(-I*)
			cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`

test "x$cf_header_path" != "xNONE" && \
test -d "$cf_header_path" && \
 {
	test -n "$verbose" && echo "	... testing for include-directories under $cf_header_path"
	test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
	test -d $cf_header_path/include/$cf_ncuhdr_root &&       cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
	test -d $cf_header_path/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
	test -d $cf_header_path/$cf_ncuhdr_root/include &&       cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
	test -d $cf_header_path/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
}

			cf_header_path_list="$cf_header_path_list $cf_search"
			;;
		esac
	done
fi

# add the variations for the package we are looking for

cf_search=

test "x$prefix" != "xNONE" && \
test -d "$prefix" && \
 {
	test -n "$verbose" && echo "	... testing for include-directories under $prefix"
	test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
	test -d $prefix/include/$cf_ncuhdr_root &&       cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
	test -d $prefix/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
	test -d $prefix/$cf_ncuhdr_root/include &&       cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
	test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
}

for cf_subdir_prefix in \
	/usr \
	/usr/local \
	/usr/pkg \
	/opt \
	/opt/local \
	$HOME
do

test "x$cf_subdir_prefix" != "x$prefix" && \
test -d "$cf_subdir_prefix" && \
(test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
	test -n "$verbose" && echo "	... testing for include-directories under $cf_subdir_prefix"
	test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
	test -d $cf_subdir_prefix/include/$cf_ncuhdr_root &&       cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
	test -d $cf_subdir_prefix/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
	test -d $cf_subdir_prefix/$cf_ncuhdr_root/include &&       cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
	test -d $cf_subdir_prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
}

done

test "$includedir" != NONE && \
test "$includedir" != "/usr/include" && \
test -d "$includedir" && {
	test -d $includedir &&    cf_search="$cf_search $includedir"
	test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
}

test "$oldincludedir" != NONE && \
test "$oldincludedir" != "/usr/include" && \
test -d "$oldincludedir" && {
	test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
	test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
}

cf_search="$cf_search $cf_header_path_list"

	test -n "$verbose" && echo search path $cf_search
	cf_save2_CPPFLAGS="$CPPFLAGS"
	for cf_incdir in $cf_search
	do

if test -n "$cf_incdir" ; then
  for cf_add_incdir in $cf_incdir
  do
	while test $cf_add_incdir != /usr/include
	do
	  if test -d $cf_add_incdir
	  then
		cf_have_incdir=no
		if test -n "$CFLAGS$CPPFLAGS" ; then
		  # a loop is needed to ensure we can add subdirs of existing dirs
		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
			  cf_have_incdir=yes; break
			fi
		  done
		fi

		if test "$cf_have_incdir" = no ; then
		  if test "$cf_add_incdir" = /usr/local/include ; then
			if test "$GCC" = yes
			then
			  cf_save_CPPFLAGS=$CPPFLAGS

	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
	CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"

			  cat >conftest.$ac_ext <<_ACEOF
#line 13360 "configure"
#include "confdefs.h"
#include <stdio.h>
int
main (void)
{
printf("Hello")
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:13372: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:13375: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:13378: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:13381: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  :
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
cf_have_incdir=yes
fi
rm -f conftest.$ac_objext conftest.$ac_ext
			  CPPFLAGS=$cf_save_CPPFLAGS
			fi
		  fi
		fi

		if test "$cf_have_incdir" = no ; then
		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6

echo "${as_me:-configure}:13398: testing adding $cf_add_incdir to include-path ..." 1>&5

		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"

		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
		  test "$cf_top_incdir" = "$cf_add_incdir" && break
		  cf_add_incdir="$cf_top_incdir"
		else
		  break
		fi
	  else
		break
	  fi
	done
  done
fi

		for cf_header in \
			ncurses.h \
			curses.h
		do

	cat >conftest.$ac_ext <<_ACEOF
#line 13421 "configure"
#include "confdefs.h"

#include <$cf_header>
int
main (void)
{

#ifdef NCURSES_VERSION

printf("%s\n", NCURSES_VERSION);
#else
#ifdef __NCURSES_H
printf("old\n");
#else
	make an error
#endif
#endif

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:13445: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:13448: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:13451: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:13454: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  cf_cv_ncurses_h2=$cf_header

else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
cf_cv_ncurses_h2=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext

			if test "$cf_cv_ncurses_h2" != no ; then
				cf_cv_ncurses_h2=$cf_incdir/$cf_header
				test -n "$verbose" && echo $ac_n "	... found $ac_c" 1>&6
				break
			fi
			test -n "$verbose" && echo "	... tested $cf_incdir/$cf_header" 1>&6
		done
		CPPFLAGS="$cf_save2_CPPFLAGS"
		test "$cf_cv_ncurses_h2" != no && break
	done
	test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:13475: error: not found" >&5
echo "$as_me: error: not found" >&2;}
   { (exit 1); exit 1; }; }

fi
echo "$as_me:13480: result: $cf_cv_ncurses_h2" >&5
echo "${ECHO_T}$cf_cv_ncurses_h2" >&6

	cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
	cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
	if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
		cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
	fi

if test -n "$cf_1st_incdir" ; then
  for cf_add_incdir in $cf_1st_incdir
  do
	while test $cf_add_incdir != /usr/include
	do
	  if test -d $cf_add_incdir
	  then
		cf_have_incdir=no
		if test -n "$CFLAGS$CPPFLAGS" ; then
		  # a loop is needed to ensure we can add subdirs of existing dirs
		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
			  cf_have_incdir=yes; break
			fi
		  done
		fi

		if test "$cf_have_incdir" = no ; then
		  if test "$cf_add_incdir" = /usr/local/include ; then
			if test "$GCC" = yes
			then
			  cf_save_CPPFLAGS=$CPPFLAGS

	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
	CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"

			  cat >conftest.$ac_ext <<_ACEOF
#line 13516 "configure"
#include "confdefs.h"
#include <stdio.h>
int
main (void)
{
printf("Hello")
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:13528: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:13531: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:13534: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:13537: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  :
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
cf_have_incdir=yes
fi
rm -f conftest.$ac_objext conftest.$ac_ext
			  CPPFLAGS=$cf_save_CPPFLAGS
			fi
		  fi
		fi

		if test "$cf_have_incdir" = no ; then
		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6

echo "${as_me:-configure}:13554: testing adding $cf_add_incdir to include-path ..." 1>&5

		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"

		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
		  test "$cf_top_incdir" = "$cf_add_incdir" && break
		  cf_add_incdir="$cf_top_incdir"
		else
		  break
		fi
	  else
		break
	  fi
	done
  done
fi

fi

# Set definitions to allow ifdef'ing for ncurses.h

case $cf_cv_ncurses_header in
(*ncurses.h)

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

	;;
esac

case $cf_cv_ncurses_header in
(ncurses/curses.h|ncurses/ncurses.h)

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

	;;
(ncursesw/curses.h|ncursesw/ncurses.h)

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

	;;
esac

echo "$as_me:13602: checking for terminfo header" >&5
echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
if test "${cf_cv_term_header+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

case ${cf_cv_ncurses_header} in
(*/ncurses.h|*/ncursesw.h)
	cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
	;;
(*)
	cf_term_header=term.h
	;;
esac

for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
do
cat >conftest.$ac_ext <<_ACEOF
#line 13620 "configure"
#include "confdefs.h"
#include <stdio.h>
#include <${cf_cv_ncurses_header:-curses.h}>
#include <$cf_test>

int
main (void)
{
int x = auto_left_margin
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:13635: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:13638: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:13641: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:13644: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then

	cf_cv_term_header="$cf_test"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5

	cf_cv_term_header=unknown

fi
rm -f conftest.$ac_objext conftest.$ac_ext
	test "$cf_cv_term_header" != unknown && break
done

fi
echo "$as_me:13660: result: $cf_cv_term_header" >&5
echo "${ECHO_T}$cf_cv_term_header" >&6

# Set definitions to allow ifdef'ing to accommodate subdirectories

case $cf_cv_term_header in
(*term.h)

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

	;;
esac

case $cf_cv_term_header in
(ncurses/term.h)

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

	;;
(ncursesw/term.h)

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

	;;
esac

# some applications need this, but should check for NCURSES_VERSION

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

echo "$as_me:13698: checking for ncurses version" >&5
echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
if test "${cf_cv_ncurses_version+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

	cf_cv_ncurses_version=no
	cf_tempfile=out$$
	rm -f $cf_tempfile
	if test "$cross_compiling" = yes; then

	# This will not work if the preprocessor splits the line after the
	# Autoconf token.  The 'unproto' program does that.
	cat > conftest.$ac_ext <<EOF
#include <${cf_cv_ncurses_header:-curses.h}>
#undef Autoconf
#ifdef NCURSES_VERSION
Autoconf NCURSES_VERSION
#else
#ifdef __NCURSES_H
Autoconf "old"
#endif
;
#endif
EOF
	cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
	{ (eval echo "$as_me:13724: \"$cf_try\"") >&5
  (eval $cf_try) 2>&5
  ac_status=$?
  echo "$as_me:13727: \$? = $ac_status" >&5
  (exit $ac_status); }
	if test -f conftest.out ; then
		cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
		test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
		rm -f conftest.out
	fi

else
  cat >conftest.$ac_ext <<_ACEOF
#line 13737 "configure"
#include "confdefs.h"

#include <${cf_cv_ncurses_header:-curses.h}>
#include <stdio.h>
int main(void)
{
	FILE *fp = fopen("$cf_tempfile", "w");
#ifdef NCURSES_VERSION
# ifdef NCURSES_VERSION_PATCH
	fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
# else
	fprintf(fp, "%s\n", NCURSES_VERSION);
# endif
#else
# ifdef __NCURSES_H
	fprintf(fp, "old\n");
# else
	make an error
# endif
#endif
	${cf_cv_main_return:-return}(0);
}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:13762: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:13765: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:13767: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:13770: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then

	cf_cv_ncurses_version=`cat $cf_tempfile`
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
	rm -f $cf_tempfile

fi
echo "$as_me:13784: result: $cf_cv_ncurses_version" >&5
echo "${ECHO_T}$cf_cv_ncurses_version" >&6
test "$cf_cv_ncurses_version" = no ||
cat >>confdefs.h <<\EOF
#define NCURSES 1
EOF

cf_nculib_root=ncursesw
	# This works, except for the special case where we find gpm, but
	# ncurses is in a nonstandard location via $LIBS, and we really want
	# to link gpm.
cf_ncurses_LIBS=""
cf_ncurses_SAVE="$LIBS"
echo "$as_me:13797: checking for Gpm_Open in -lgpm" >&5
echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lgpm  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 13805 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char Gpm_Open ();
int
main (void)
{
Gpm_Open ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:13824: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:13827: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:13830: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:13833: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_gpm_Gpm_Open=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_gpm_Gpm_Open=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:13844: result: $ac_cv_lib_gpm_Gpm_Open" >&5
echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
if test $ac_cv_lib_gpm_Gpm_Open = yes; then
  echo "$as_me:13847: checking for initscr in -lgpm" >&5
echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
if test "${ac_cv_lib_gpm_initscr+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lgpm  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 13855 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char initscr ();
int
main (void)
{
initscr ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:13874: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:13877: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:13880: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:13883: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_gpm_initscr=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_gpm_initscr=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:13894: result: $ac_cv_lib_gpm_initscr" >&5
echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
if test $ac_cv_lib_gpm_initscr = yes; then
  LIBS="$cf_ncurses_SAVE"
else
  cf_ncurses_LIBS="-lgpm"
fi

fi

case $host_os in
(freebsd*)
	# This is only necessary if you are linking against an obsolete
	# version of ncurses (but it should do no harm, since it's static).
	if test "$cf_nculib_root" = ncurses ; then
		echo "$as_me:13909: checking for tgoto in -lmytinfo" >&5
echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lmytinfo  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 13917 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char tgoto ();
int
main (void)
{
tgoto ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:13936: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:13939: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:13942: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:13945: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_mytinfo_tgoto=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_mytinfo_tgoto=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:13956: result: $ac_cv_lib_mytinfo_tgoto" >&5
echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
if test $ac_cv_lib_mytinfo_tgoto = yes; then
  cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
fi

	fi
	;;
esac

cf_add_libs="$cf_ncurses_LIBS"
# Filter out duplicates - this happens with badly-designed ".pc" files...
for cf_add_1lib in $LIBS
do
	for cf_add_2lib in $cf_add_libs
	do
		if test "x$cf_add_1lib" = "x$cf_add_2lib"
		then
			cf_add_1lib=
			break
		fi
	done
	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
done
LIBS="$cf_add_libs"

if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
then

cf_add_libs="-l$cf_nculib_root"
# Filter out duplicates - this happens with badly-designed ".pc" files...
for cf_add_1lib in $LIBS
do
	for cf_add_2lib in $cf_add_libs
	do
		if test "x$cf_add_1lib" = "x$cf_add_2lib"
		then
			cf_add_1lib=
			break
		fi
	done
	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
done
LIBS="$cf_add_libs"

else

	eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
	cf_libdir=""
	echo "$as_me:14005: checking for initscr" >&5
echo $ECHO_N "checking for initscr... $ECHO_C" >&6
if test "${ac_cv_func_initscr+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 14011 "configure"
#include "confdefs.h"
#define initscr autoconf_temporary
#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
#undef initscr

#ifdef __cplusplus
extern "C"
#endif

/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char initscr (void);

int
main (void)
{

/* The GNU C library defines stubs for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_initscr) || defined (__stub___initscr)
#error found stub for initscr
#endif

	return initscr ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:14042: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:14045: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:14048: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:14051: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_func_initscr=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_func_initscr=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:14061: result: $ac_cv_func_initscr" >&5
echo "${ECHO_T}$ac_cv_func_initscr" >&6
if test $ac_cv_func_initscr = yes; then
  eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
else

		cf_save_LIBS="$LIBS"
		echo "$as_me:14068: checking for initscr in -l$cf_nculib_root" >&5
echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
		LIBS="-l$cf_nculib_root $LIBS"
		cat >conftest.$ac_ext <<_ACEOF
#line 14072 "configure"
#include "confdefs.h"
#include <${cf_cv_ncurses_header:-curses.h}>
int
main (void)
{
initscr()
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:14084: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:14087: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:14090: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:14093: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  echo "$as_me:14095: result: yes" >&5
echo "${ECHO_T}yes" >&6
			 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'

else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
echo "$as_me:14102: result: no" >&5
echo "${ECHO_T}no" >&6

cf_search=
cf_library_path_list=""
if test -n "${LDFLAGS}${LIBS}" ; then
	for cf_library_path in $LDFLAGS $LIBS
	do
		case $cf_library_path in
		(-L*)
			cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`

test "x$cf_library_path" != "xNONE" && \
test -d "$cf_library_path" && \
 {
	test -n "$verbose" && echo "	... testing for lib-directories under $cf_library_path"
	test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
	test -d $cf_library_path/lib/$cf_nculib_root &&       cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
	test -d $cf_library_path/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
	test -d $cf_library_path/$cf_nculib_root/lib &&       cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
	test -d $cf_library_path/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib/$cf_nculib_root"
}

			cf_library_path_list="$cf_library_path_list $cf_search"
			;;
		esac
	done
fi

cf_search=

test "x$prefix" != "xNONE" && \
test -d "$prefix" && \
 {
	test -n "$verbose" && echo "	... testing for lib-directories under $prefix"
	test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
	test -d $prefix/lib/$cf_nculib_root &&       cf_search="$cf_search $prefix/lib/$cf_nculib_root"
	test -d $prefix/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
	test -d $prefix/$cf_nculib_root/lib &&       cf_search="$cf_search $prefix/$cf_nculib_root/lib"
	test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
}

for cf_subdir_prefix in \
	/usr \
	/usr/local \
	/usr/pkg \
	/opt \
	/opt/local \
	$HOME
do

test "x$cf_subdir_prefix" != "x$prefix" && \
test -d "$cf_subdir_prefix" && \
(test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
	test -n "$verbose" && echo "	... testing for lib-directories under $cf_subdir_prefix"
	test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
	test -d $cf_subdir_prefix/lib/$cf_nculib_root &&       cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
	test -d $cf_subdir_prefix/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
	test -d $cf_subdir_prefix/$cf_nculib_root/lib &&       cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
	test -d $cf_subdir_prefix/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib/$cf_nculib_root"
}

done

cf_search="$cf_library_path_list $cf_search"

			for cf_libdir in $cf_search
			do
				echo "$as_me:14170: checking for -l$cf_nculib_root in $cf_libdir" >&5
echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
				LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
				cat >conftest.$ac_ext <<_ACEOF
#line 14174 "configure"
#include "confdefs.h"
#include <${cf_cv_ncurses_header:-curses.h}>
int
main (void)
{
initscr()
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:14186: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:14189: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:14192: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:14195: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  echo "$as_me:14197: result: yes" >&5
echo "${ECHO_T}yes" >&6
			 		 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
					 break
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
echo "$as_me:14204: result: no" >&5
echo "${ECHO_T}no" >&6
					 LIBS="$cf_save_LIBS"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
			done

fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext

fi

eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root

if test $cf_found_library = no ; then
	{ { echo "$as_me:14219: error: Cannot link $cf_nculib_root library" >&5
echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
   { (exit 1); exit 1; }; }
fi

fi

if test -n "$cf_ncurses_LIBS" ; then
	echo "$as_me:14227: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
	cf_ncurses_SAVE="$LIBS"
	for p in $cf_ncurses_LIBS ; do
		q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
		if test "$q" != "$LIBS" ; then
			LIBS="$q"
		fi
	done
	cat >conftest.$ac_ext <<_ACEOF
#line 14237 "configure"
#include "confdefs.h"
#include <${cf_cv_ncurses_header:-curses.h}>
int
main (void)
{
initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:14249: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:14252: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:14255: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:14258: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  echo "$as_me:14260: result: yes" >&5
echo "${ECHO_T}yes" >&6
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
echo "$as_me:14265: result: no" >&5
echo "${ECHO_T}no" >&6
		 LIBS="$cf_ncurses_SAVE"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi

cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`

cat >>confdefs.h <<EOF
#define $cf_nculib_ROOT 1
EOF

	fi
else
	NCURSES_CONFIG=none
fi

echo "$as_me:14283: checking definition to turn on extended curses functions" >&5
echo $ECHO_N "checking definition to turn on extended curses functions... $ECHO_C" >&6
if test "${cf_cv_need_xopen_extension+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

cf_cv_need_xopen_extension=unknown
cat >conftest.$ac_ext <<_ACEOF
#line 14291 "configure"
#include "confdefs.h"

#include <stdlib.h>
#include <${cf_cv_ncurses_header:-curses.h}>
int
main (void)
{

#if defined(NCURSES_VERSION_PATCH)
#if (NCURSES_VERSION_PATCH < 20100501) && (NCURSES_VERSION_PATCH >= 20100403)
	make an error
#endif
#endif
#ifdef NCURSES_VERSION
	cchar_t check;
	int check2 = curs_set((int)sizeof(check));
#endif
	long x = winnstr(stdscr, "", 0);
	int x1, y1;
	getbegyx(stdscr, y1, x1)
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:14317: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:14320: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:14323: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:14326: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  cf_cv_need_xopen_extension=none
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5

	for cf_try_xopen_extension in _XOPEN_SOURCE_EXTENDED NCURSES_WIDECHAR
	do
		cat >conftest.$ac_ext <<_ACEOF
#line 14336 "configure"
#include "confdefs.h"

#define $cf_try_xopen_extension 1
#include <stdlib.h>
#include <${cf_cv_ncurses_header:-curses.h}>
int
main (void)
{

#ifdef NCURSES_VERSION
		cchar_t check;
		int check2 = curs_set((int)sizeof(check));
#endif
		long x = winnstr(stdscr, "", 0);
		int x1, y1;
		getbegyx(stdscr, y1, x1)
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:14358: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:14361: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:14364: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:14367: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  cf_cv_need_xopen_extension=$cf_try_xopen_extension; break
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
	done

fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext

fi
echo "$as_me:14381: result: $cf_cv_need_xopen_extension" >&5
echo "${ECHO_T}$cf_cv_need_xopen_extension" >&6

case $cf_cv_need_xopen_extension in
(*_*)

	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
	CPPFLAGS="${CPPFLAGS}-D$cf_cv_need_xopen_extension"

	;;
esac

		test "$cf_cv_need_xopen_extension" = unknown && { { echo "$as_me:14393: error: X/Open curses not found" >&5
echo "$as_me: error: X/Open curses not found" >&2;}
   { (exit 1); exit 1; }; }
		;;
	curses) #(vi

echo "$as_me:14399: checking for extra include directories" >&5
echo $ECHO_N "checking for extra include directories... $ECHO_C" >&6
if test "${cf_cv_curses_incdir+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

cf_cv_curses_incdir=no
case $host_os in
(hpux10.*)
	if test "x$cf_cv_screen" = "xcurses_colr"
	then
		test -d /usr/include/curses_colr && \
		cf_cv_curses_incdir="-I/usr/include/curses_colr"
	fi
	;;
(sunos3*|sunos4*)
	if test "x$cf_cv_screen" = "xcurses_5lib"
	then
		test -d /usr/5lib && \
		test -d /usr/5include && \
		cf_cv_curses_incdir="-I/usr/5include"
	fi
	;;
esac

fi
echo "$as_me:14425: result: $cf_cv_curses_incdir" >&5
echo "${ECHO_T}$cf_cv_curses_incdir" >&6
if test "$cf_cv_curses_incdir" != no
then

	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
	CPPFLAGS="${CPPFLAGS}$cf_cv_curses_incdir"

fi

echo "$as_me:14435: checking if we have identified curses headers" >&5
echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
if test "${cf_cv_ncurses_header+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

cf_cv_ncurses_header=none
for cf_header in \
	ncurses.h  \
	curses.h  ncurses/ncurses.h ncurses/curses.h
do
cat >conftest.$ac_ext <<_ACEOF
#line 14447 "configure"
#include "confdefs.h"
#include <${cf_header}>
int
main (void)
{
initscr(); tgoto("?", 0,0)
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:14459: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:14462: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:14465: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:14468: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  cf_cv_ncurses_header=$cf_header; break
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest.$ac_objext conftest.$ac_ext
done

fi
echo "$as_me:14479: result: $cf_cv_ncurses_header" >&5
echo "${ECHO_T}$cf_cv_ncurses_header" >&6

if test "$cf_cv_ncurses_header" = none ; then
	{ { echo "$as_me:14483: error: No curses header-files found" >&5
echo "$as_me: error: No curses header-files found" >&2;}
   { (exit 1); exit 1; }; }
fi

# cheat, to get the right #define's for HAVE_NCURSES_H, etc.

for ac_header in $cf_cv_ncurses_header
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
echo "$as_me:14493: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 14499 "configure"
#include "confdefs.h"
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:14503: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  egrep -v '^ *\+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:14509: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  eval "$as_ac_Header=yes"
else
  echo "$as_me: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$as_ac_Header=no"
fi
rm -f conftest.err conftest.$ac_ext
fi
echo "$as_me:14528: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
if test `eval echo '${'$as_ac_Header'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
EOF

fi
done

echo "$as_me:14538: checking for terminfo header" >&5
echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
if test "${cf_cv_term_header+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

case ${cf_cv_ncurses_header} in
(*/ncurses.h|*/ncursesw.h)
	cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
	;;
(*)
	cf_term_header=term.h
	;;
esac

for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
do
cat >conftest.$ac_ext <<_ACEOF
#line 14556 "configure"
#include "confdefs.h"
#include <stdio.h>
#include <${cf_cv_ncurses_header:-curses.h}>
#include <$cf_test>

int
main (void)
{
int x = auto_left_margin
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:14571: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:14574: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:14577: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:14580: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then

	cf_cv_term_header="$cf_test"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5

	cf_cv_term_header=unknown

fi
rm -f conftest.$ac_objext conftest.$ac_ext
	test "$cf_cv_term_header" != unknown && break
done

fi
echo "$as_me:14596: result: $cf_cv_term_header" >&5
echo "${ECHO_T}$cf_cv_term_header" >&6

# Set definitions to allow ifdef'ing to accommodate subdirectories

case $cf_cv_term_header in
(*term.h)

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

	;;
esac

case $cf_cv_term_header in
(ncurses/term.h)

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

	;;
(ncursesw/term.h)

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

	;;
esac

echo "$as_me:14628: checking for ncurses version" >&5
echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
if test "${cf_cv_ncurses_version+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

	cf_cv_ncurses_version=no
	cf_tempfile=out$$
	rm -f $cf_tempfile
	if test "$cross_compiling" = yes; then

	# This will not work if the preprocessor splits the line after the
	# Autoconf token.  The 'unproto' program does that.
	cat > conftest.$ac_ext <<EOF
#include <${cf_cv_ncurses_header:-curses.h}>
#undef Autoconf
#ifdef NCURSES_VERSION
Autoconf NCURSES_VERSION
#else
#ifdef __NCURSES_H
Autoconf "old"
#endif
;
#endif
EOF
	cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
	{ (eval echo "$as_me:14654: \"$cf_try\"") >&5
  (eval $cf_try) 2>&5
  ac_status=$?
  echo "$as_me:14657: \$? = $ac_status" >&5
  (exit $ac_status); }
	if test -f conftest.out ; then
		cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
		test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
		rm -f conftest.out
	fi

else
  cat >conftest.$ac_ext <<_ACEOF
#line 14667 "configure"
#include "confdefs.h"

#include <${cf_cv_ncurses_header:-curses.h}>
#include <stdio.h>
int main(void)
{
	FILE *fp = fopen("$cf_tempfile", "w");
#ifdef NCURSES_VERSION
# ifdef NCURSES_VERSION_PATCH
	fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
# else
	fprintf(fp, "%s\n", NCURSES_VERSION);
# endif
#else
# ifdef __NCURSES_H
	fprintf(fp, "old\n");
# else
	make an error
# endif
#endif
	${cf_cv_main_return:-return}(0);
}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:14692: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:14695: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:14697: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:14700: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then

	cf_cv_ncurses_version=`cat $cf_tempfile`
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
	rm -f $cf_tempfile

fi
echo "$as_me:14714: result: $cf_cv_ncurses_version" >&5
echo "${ECHO_T}$cf_cv_ncurses_version" >&6
test "$cf_cv_ncurses_version" = no ||
cat >>confdefs.h <<\EOF
#define NCURSES 1
EOF

echo "$as_me:14721: checking if we have identified curses libraries" >&5
echo $ECHO_N "checking if we have identified curses libraries... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
#line 14724 "configure"
#include "confdefs.h"
#include <${cf_cv_ncurses_header:-curses.h}>
int
main (void)
{
initscr(); tgoto("?", 0,0)
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:14736: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:14739: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:14742: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:14745: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  cf_result=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
cf_result=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
echo "$as_me:14754: result: $cf_result" >&5
echo "${ECHO_T}$cf_result" >&6

if test "$cf_result" = no ; then
case $host_os in
(freebsd*)
	echo "$as_me:14760: checking for tgoto in -lmytinfo" >&5
echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lmytinfo  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 14768 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char tgoto ();
int
main (void)
{
tgoto ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:14787: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:14790: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:14793: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:14796: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_mytinfo_tgoto=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_mytinfo_tgoto=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:14807: result: $ac_cv_lib_mytinfo_tgoto" >&5
echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
if test $ac_cv_lib_mytinfo_tgoto = yes; then

cf_add_libs="-lmytinfo"
# Filter out duplicates - this happens with badly-designed ".pc" files...
for cf_add_1lib in $LIBS
do
	for cf_add_2lib in $cf_add_libs
	do
		if test "x$cf_add_1lib" = "x$cf_add_2lib"
		then
			cf_add_1lib=
			break
		fi
	done
	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
done
LIBS="$cf_add_libs"

fi

	;;
(hpux10.*)
	# Looking at HPUX 10.20, the Hcurses library is the oldest (1997), cur_colr
	# next (1998), and xcurses "newer" (2000).  There is no header file for
	# Hcurses; the subdirectory curses_colr has the headers (curses.h and
	# term.h) for cur_colr
	if test "x$cf_cv_screen" = "xcurses_colr"
	then
		echo "$as_me:14837: checking for initscr in -lcur_colr" >&5
echo $ECHO_N "checking for initscr in -lcur_colr... $ECHO_C" >&6
if test "${ac_cv_lib_cur_colr_initscr+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lcur_colr  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 14845 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char initscr ();
int
main (void)
{
initscr ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:14864: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:14867: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:14870: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:14873: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_cur_colr_initscr=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_cur_colr_initscr=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:14884: result: $ac_cv_lib_cur_colr_initscr" >&5
echo "${ECHO_T}$ac_cv_lib_cur_colr_initscr" >&6
if test $ac_cv_lib_cur_colr_initscr = yes; then

cf_add_libs="-lcur_colr"
# Filter out duplicates - this happens with badly-designed ".pc" files...
for cf_add_1lib in $LIBS
do
	for cf_add_2lib in $cf_add_libs
	do
		if test "x$cf_add_1lib" = "x$cf_add_2lib"
		then
			cf_add_1lib=
			break
		fi
	done
	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
done
LIBS="$cf_add_libs"

			ac_cv_func_initscr=yes

else

		echo "$as_me:14908: checking for initscr in -lHcurses" >&5
echo $ECHO_N "checking for initscr in -lHcurses... $ECHO_C" >&6
if test "${ac_cv_lib_Hcurses_initscr+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lHcurses  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 14916 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char initscr ();
int
main (void)
{
initscr ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:14935: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:14938: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:14941: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:14944: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_Hcurses_initscr=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_Hcurses_initscr=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:14955: result: $ac_cv_lib_Hcurses_initscr" >&5
echo "${ECHO_T}$ac_cv_lib_Hcurses_initscr" >&6
if test $ac_cv_lib_Hcurses_initscr = yes; then

			# HP's header uses __HP_CURSES, but user claims _HP_CURSES.

cf_add_libs="-lHcurses"
# Filter out duplicates - this happens with badly-designed ".pc" files...
for cf_add_1lib in $LIBS
do
	for cf_add_2lib in $cf_add_libs
	do
		if test "x$cf_add_1lib" = "x$cf_add_2lib"
		then
			cf_add_1lib=
			break
		fi
	done
	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
done
LIBS="$cf_add_libs"

	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
	CPPFLAGS="${CPPFLAGS}-D__HP_CURSES -D_HP_CURSES"

			ac_cv_func_initscr=yes

fi

fi

	fi
	;;
(linux*)
	case `arch 2>/dev/null` in
	(x86_64)
		if test -d /lib64
		then

if test -n "/lib64" ; then
	for cf_add_libdir in /lib64
	do
		if test $cf_add_libdir = /usr/lib ; then
			:
		elif test -d $cf_add_libdir
		then
			cf_have_libdir=no
			if test -n "$LDFLAGS$LIBS" ; then
				# a loop is needed to ensure we can add subdirs of existing dirs
				for cf_test_libdir in $LDFLAGS $LIBS ; do
					if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
						cf_have_libdir=yes; break
					fi
				done
			fi
			if test "$cf_have_libdir" = no ; then
				test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6

echo "${as_me:-configure}:15013: testing adding $cf_add_libdir to library-path ..." 1>&5

				LDFLAGS="-L$cf_add_libdir $LDFLAGS"
			fi
		fi
	done
fi

		else

if test -n "/lib" ; then
	for cf_add_libdir in /lib
	do
		if test $cf_add_libdir = /usr/lib ; then
			:
		elif test -d $cf_add_libdir
		then
			cf_have_libdir=no
			if test -n "$LDFLAGS$LIBS" ; then
				# a loop is needed to ensure we can add subdirs of existing dirs
				for cf_test_libdir in $LDFLAGS $LIBS ; do
					if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
						cf_have_libdir=yes; break
					fi
				done
			fi
			if test "$cf_have_libdir" = no ; then
				test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6

echo "${as_me:-configure}:15042: testing adding $cf_add_libdir to library-path ..." 1>&5

				LDFLAGS="-L$cf_add_libdir $LDFLAGS"
			fi
		fi
	done
fi

		fi
		;;
	(*)

if test -n "/lib" ; then
	for cf_add_libdir in /lib
	do
		if test $cf_add_libdir = /usr/lib ; then
			:
		elif test -d $cf_add_libdir
		then
			cf_have_libdir=no
			if test -n "$LDFLAGS$LIBS" ; then
				# a loop is needed to ensure we can add subdirs of existing dirs
				for cf_test_libdir in $LDFLAGS $LIBS ; do
					if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
						cf_have_libdir=yes; break
					fi
				done
			fi
			if test "$cf_have_libdir" = no ; then
				test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6

echo "${as_me:-configure}:15073: testing adding $cf_add_libdir to library-path ..." 1>&5

				LDFLAGS="-L$cf_add_libdir $LDFLAGS"
			fi
		fi
	done
fi

		;;
	esac
	;;
(sunos3*|sunos4*)
	if test "x$cf_cv_screen" = "xcurses_5lib"
	then
		if test -d /usr/5lib ; then

if test -n "/usr/5lib" ; then
	for cf_add_libdir in /usr/5lib
	do
		if test $cf_add_libdir = /usr/lib ; then
			:
		elif test -d $cf_add_libdir
		then
			cf_have_libdir=no
			if test -n "$LDFLAGS$LIBS" ; then
				# a loop is needed to ensure we can add subdirs of existing dirs
				for cf_test_libdir in $LDFLAGS $LIBS ; do
					if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
						cf_have_libdir=yes; break
					fi
				done
			fi
			if test "$cf_have_libdir" = no ; then
				test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6

echo "${as_me:-configure}:15108: testing adding $cf_add_libdir to library-path ..." 1>&5

				LDFLAGS="-L$cf_add_libdir $LDFLAGS"
			fi
		fi
	done
fi

cf_add_libs="-lcurses -ltermcap"
# Filter out duplicates - this happens with badly-designed ".pc" files...
for cf_add_1lib in $LIBS
do
	for cf_add_2lib in $cf_add_libs
	do
		if test "x$cf_add_1lib" = "x$cf_add_2lib"
		then
			cf_add_1lib=
			break
		fi
	done
	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
done
LIBS="$cf_add_libs"

		fi
	fi
	ac_cv_func_initscr=yes
	;;
esac

if test ".$ac_cv_func_initscr" != .yes ; then
	cf_save_LIBS="$LIBS"

	if test ".${cf_cv_ncurses_version:-no}" != .no
	then
		cf_check_list="ncurses curses cursesX"
	else
		cf_check_list="cursesX curses ncurses"
	fi

	# Check for library containing tgoto.  Do this before curses library
	# because it may be needed to link the test-case for initscr.
	if test "x$cf_term_lib" = x
	then
		echo "$as_me:15152: checking for tgoto" >&5
echo $ECHO_N "checking for tgoto... $ECHO_C" >&6
if test "${ac_cv_func_tgoto+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 15158 "configure"
#include "confdefs.h"
#define tgoto autoconf_temporary
#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
#undef tgoto

#ifdef __cplusplus
extern "C"
#endif

/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char tgoto (void);

int
main (void)
{

/* The GNU C library defines stubs for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_tgoto) || defined (__stub___tgoto)
#error found stub for tgoto
#endif

	return tgoto ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:15189: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:15192: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:15195: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:15198: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_func_tgoto=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_func_tgoto=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:15208: result: $ac_cv_func_tgoto" >&5
echo "${ECHO_T}$ac_cv_func_tgoto" >&6
if test $ac_cv_func_tgoto = yes; then
  cf_term_lib=predefined
else

			for cf_term_lib in $cf_check_list otermcap termcap tinfo termlib unknown
			do
				as_ac_Lib=`echo "ac_cv_lib_$cf_term_lib''_tgoto" | $as_tr_sh`
echo "$as_me:15217: checking for tgoto in -l$cf_term_lib" >&5
echo $ECHO_N "checking for tgoto in -l$cf_term_lib... $ECHO_C" >&6
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-l$cf_term_lib  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 15225 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char tgoto ();
int
main (void)
{
tgoto ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:15244: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:15247: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:15250: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:15253: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_Lib=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_Lib=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:15264: result: `eval echo '${'$as_ac_Lib'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
if test `eval echo '${'$as_ac_Lib'}'` = yes; then

					: ${cf_nculib_root:=$cf_term_lib}
					break

fi

			done

fi

	fi

	# Check for library containing initscr
	test "$cf_term_lib" != predefined && test "$cf_term_lib" != unknown && LIBS="-l$cf_term_lib $cf_save_LIBS"
	if test "x$cf_curs_lib" = x
	then
		for cf_curs_lib in $cf_check_list xcurses jcurses pdcurses unknown
		do
			LIBS="-l$cf_curs_lib $cf_save_LIBS"
			if test "$cf_term_lib" = unknown || test "$cf_term_lib" = "$cf_curs_lib" ; then
				echo "$as_me:15287: checking if we can link with $cf_curs_lib library" >&5
echo $ECHO_N "checking if we can link with $cf_curs_lib library... $ECHO_C" >&6
				cat >conftest.$ac_ext <<_ACEOF
#line 15290 "configure"
#include "confdefs.h"
#include <${cf_cv_ncurses_header:-curses.h}>
int
main (void)
{
initscr()
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:15302: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:15305: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:15308: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:15311: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  cf_result=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
cf_result=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
				echo "$as_me:15320: result: $cf_result" >&5
echo "${ECHO_T}$cf_result" >&6
				test $cf_result = yes && break
			elif test "$cf_curs_lib" = "$cf_term_lib" ; then
				cf_result=no
			elif test "$cf_term_lib" != predefined ; then
				echo "$as_me:15326: checking if we need both $cf_curs_lib and $cf_term_lib libraries" >&5
echo $ECHO_N "checking if we need both $cf_curs_lib and $cf_term_lib libraries... $ECHO_C" >&6
				cat >conftest.$ac_ext <<_ACEOF
#line 15329 "configure"
#include "confdefs.h"
#include <${cf_cv_ncurses_header:-curses.h}>
int
main (void)
{
initscr(); tgoto((char *)0, 0, 0);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:15341: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:15344: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:15347: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:15350: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  cf_result=no
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5

					LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS"
					cat >conftest.$ac_ext <<_ACEOF
#line 15359 "configure"
#include "confdefs.h"
#include <${cf_cv_ncurses_header:-curses.h}>
int
main (void)
{
initscr()
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:15371: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:15374: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:15377: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:15380: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  cf_result=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
cf_result=error
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext

fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
				echo "$as_me:15392: result: $cf_result" >&5
echo "${ECHO_T}$cf_result" >&6
				test $cf_result != error && break
			fi
		done
	fi
	test $cf_curs_lib = unknown && { { echo "$as_me:15398: error: no curses library found" >&5
echo "$as_me: error: no curses library found" >&2;}
   { (exit 1); exit 1; }; }
fi
fi

echo "$as_me:15404: checking definition to turn on extended curses functions" >&5
echo $ECHO_N "checking definition to turn on extended curses functions... $ECHO_C" >&6
if test "${cf_cv_need_xopen_extension+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

cf_cv_need_xopen_extension=unknown
cat >conftest.$ac_ext <<_ACEOF
#line 15412 "configure"
#include "confdefs.h"

#include <stdlib.h>
#include <${cf_cv_ncurses_header:-curses.h}>
int
main (void)
{

#if defined(NCURSES_VERSION_PATCH)
#if (NCURSES_VERSION_PATCH < 20100501) && (NCURSES_VERSION_PATCH >= 20100403)
	make an error
#endif
#endif
#ifdef NCURSES_VERSION
	cchar_t check;
	int check2 = curs_set((int)sizeof(check));
#endif
	long x = winnstr(stdscr, "", 0);
	int x1, y1;
	getbegyx(stdscr, y1, x1)
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:15438: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:15441: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:15444: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:15447: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  cf_cv_need_xopen_extension=none
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5

	for cf_try_xopen_extension in _XOPEN_SOURCE_EXTENDED NCURSES_WIDECHAR
	do
		cat >conftest.$ac_ext <<_ACEOF
#line 15457 "configure"
#include "confdefs.h"

#define $cf_try_xopen_extension 1
#include <stdlib.h>
#include <${cf_cv_ncurses_header:-curses.h}>
int
main (void)
{

#ifdef NCURSES_VERSION
		cchar_t check;
		int check2 = curs_set((int)sizeof(check));
#endif
		long x = winnstr(stdscr, "", 0);
		int x1, y1;
		getbegyx(stdscr, y1, x1)
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:15479: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:15482: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:15485: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:15488: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  cf_cv_need_xopen_extension=$cf_try_xopen_extension; break
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
	done

fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext

fi
echo "$as_me:15502: result: $cf_cv_need_xopen_extension" >&5
echo "${ECHO_T}$cf_cv_need_xopen_extension" >&6

case $cf_cv_need_xopen_extension in
(*_*)

	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
	CPPFLAGS="${CPPFLAGS}-D$cf_cv_need_xopen_extension"

	;;
esac

		;;
	esac
fi

## substitute externally-installed PCRE library for our bundled version
echo "$as_me:15519: checking if you want to use installed version of pcre" >&5
echo $ECHO_N "checking if you want to use installed version of pcre... $ECHO_C" >&6

# Check whether --with-pcre or --without-pcre was given.
if test "${with_pcre+set}" = set; then
  withval="$with_pcre"
  PCRE_HOME=$withval
else
  PCRE_HOME=no
fi;
echo "$as_me:15529: result: $PCRE_HOME" >&5
echo "${ECHO_T}$PCRE_HOME" >&6

cf_pcre_home=$PCRE_HOME
PCREDIR_MAKE=
PCREDIR_LIBS=
PCREDIR_CPPFLAGS=
case .$cf_pcre_home in #(vi
.no) #(vi
	# setup to compile the bundled PCRE:
#	. $srcdir/pcre/version.sh

	;;
.yes) #(vi
	PCREDIR_MAKE='#'
	PCREDIR_LIBS="-lpcre"
	;;
.*)

if test "x$prefix" != xNONE; then
	cf_path_syntax="$prefix"
else
	cf_path_syntax="$ac_default_prefix"
fi

case ".$cf_pcre_home" in
(.\$\(*\)*|.\'*\'*)
	;;
(..|./*|.\\*)
	;;
(.[a-zA-Z]:[\\/]*) # OS/2 EMX
	;;
(.\${*prefix}*|.\${*dir}*)
	eval cf_pcre_home="$cf_pcre_home"
	case ".$cf_pcre_home" in
	(.NONE/*)
		cf_pcre_home=`echo $cf_pcre_home | sed -e s%NONE%$cf_path_syntax%`
		;;
	esac
	;;
(.no|.NONE/*)
	cf_pcre_home=`echo $cf_pcre_home | sed -e s%NONE%$cf_path_syntax%`
	;;
(*)
	{ { echo "$as_me:15573: error: expected a pathname, not \"$cf_pcre_home\"" >&5
echo "$as_me: error: expected a pathname, not \"$cf_pcre_home\"" >&2;}
   { (exit 1); exit 1; }; }
	;;
esac

	PCREDIR_MAKE='#'
	PCREDIR_LIBS="-L${cf_pcre_home}/lib -lpcre"
	PCREDIR_CPPFLAGS="-I${cf_pcre_home}/include"
	;;
esac

PCRE_MAKEFILE=
if test "$PCRE_HOME" = "no" ; then
	LINK_SIZE="-DLINK_SIZE=2"

	UTF8="-DSUPPORT_UTF8"
	UCP="-DSUPPORT_UCP"

	PCRE_MAKEFILE="$PCRE_MAKEFILE pcre/Makefile pcre/RunTest"
fi

## debugging libraries (do this after other libraries)
debug_malloc=none

echo "$as_me:15598: checking if you want to use dbmalloc for testing" >&5
echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6

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

cat >>confdefs.h <<EOF
#define USE_DBMALLOC 1
EOF

	: ${with_cflags:=-g}
	: ${with_no_leaks:=yes}
	 with_dbmalloc=yes
else
  with_dbmalloc=
fi;
echo "$as_me:15615: result: ${with_dbmalloc:-no}" >&5
echo "${ECHO_T}${with_dbmalloc:-no}" >&6

case .$with_cflags in
(.*-g*)
	case .$CFLAGS in
	(.*-g*)
		;;
	(*)

cf_fix_cppflags=no
cf_new_cflags=
cf_new_cppflags=
cf_new_extra_cppflags=

for cf_add_cflags in -g
do
case $cf_fix_cppflags in
(no)
	case $cf_add_cflags in
	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
		case $cf_add_cflags in
		(-D*)
			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`

			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
				&& test -z "${cf_tst_cflags}" \
				&& cf_fix_cppflags=yes

			if test $cf_fix_cppflags = yes ; then

	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"

				continue
			elif test "${cf_tst_cflags}" = "\"'" ; then

	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"

				continue
			fi
			;;
		esac
		case "$CPPFLAGS" in
		(*$cf_add_cflags)
			;;
		(*)
			case $cf_add_cflags in
			(-D*)
				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`

CPPFLAGS=`echo "$CPPFLAGS" | \
	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`

				;;
			esac

	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"

			;;
		esac
		;;
	(*)

	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"

		;;
	esac
	;;
(yes)

	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"

	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`

	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
		&& test -z "${cf_tst_cflags}" \
		&& cf_fix_cppflags=no
	;;
esac
done

if test -n "$cf_new_cflags" ; then

	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
	CFLAGS="${CFLAGS}$cf_new_cflags"

fi

if test -n "$cf_new_cppflags" ; then

	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"

fi

if test -n "$cf_new_extra_cppflags" ; then

	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"

fi

		;;
	esac
	;;
esac

if test "$with_dbmalloc" = yes ; then
	echo "$as_me:15729: checking for dbmalloc.h" >&5
echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
if test "${ac_cv_header_dbmalloc_h+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 15735 "configure"
#include "confdefs.h"
#include <dbmalloc.h>
_ACEOF
if { (eval echo "$as_me:15739: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  egrep -v '^ *\+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:15745: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  ac_cv_header_dbmalloc_h=yes
else
  echo "$as_me: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_header_dbmalloc_h=no
fi
rm -f conftest.err conftest.$ac_ext
fi
echo "$as_me:15764: result: $ac_cv_header_dbmalloc_h" >&5
echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
if test $ac_cv_header_dbmalloc_h = yes; then
  echo "$as_me:15767: checking for debug_malloc in -ldbmalloc" >&5
echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-ldbmalloc  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 15775 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char debug_malloc ();
int
main (void)
{
debug_malloc ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:15794: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:15797: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:15800: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:15803: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_dbmalloc_debug_malloc=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_dbmalloc_debug_malloc=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:15814: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
  debug_malloc=DBMALLOC
fi

fi

fi

echo "$as_me:15824: checking if you want to use dmalloc for testing" >&5
echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6

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

cat >>confdefs.h <<EOF
#define USE_DMALLOC 1
EOF

	: ${with_cflags:=-g}
	: ${with_no_leaks:=yes}
	 with_dmalloc=yes
else
  with_dmalloc=
fi;
echo "$as_me:15841: result: ${with_dmalloc:-no}" >&5
echo "${ECHO_T}${with_dmalloc:-no}" >&6

case .$with_cflags in
(.*-g*)
	case .$CFLAGS in
	(.*-g*)
		;;
	(*)

cf_fix_cppflags=no
cf_new_cflags=
cf_new_cppflags=
cf_new_extra_cppflags=

for cf_add_cflags in -g
do
case $cf_fix_cppflags in
(no)
	case $cf_add_cflags in
	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
		case $cf_add_cflags in
		(-D*)
			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`

			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
				&& test -z "${cf_tst_cflags}" \
				&& cf_fix_cppflags=yes

			if test $cf_fix_cppflags = yes ; then

	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"

				continue
			elif test "${cf_tst_cflags}" = "\"'" ; then

	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"

				continue
			fi
			;;
		esac
		case "$CPPFLAGS" in
		(*$cf_add_cflags)
			;;
		(*)
			case $cf_add_cflags in
			(-D*)
				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`

CPPFLAGS=`echo "$CPPFLAGS" | \
	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`

				;;
			esac

	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"

			;;
		esac
		;;
	(*)

	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"

		;;
	esac
	;;
(yes)

	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"

	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`

	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
		&& test -z "${cf_tst_cflags}" \
		&& cf_fix_cppflags=no
	;;
esac
done

if test -n "$cf_new_cflags" ; then

	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
	CFLAGS="${CFLAGS}$cf_new_cflags"

fi

if test -n "$cf_new_cppflags" ; then

	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"

fi

if test -n "$cf_new_extra_cppflags" ; then

	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"

fi

		;;
	esac
	;;
esac

if test "$with_dmalloc" = yes ; then
	echo "$as_me:15955: checking for dmalloc.h" >&5
echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
if test "${ac_cv_header_dmalloc_h+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 15961 "configure"
#include "confdefs.h"
#include <dmalloc.h>
_ACEOF
if { (eval echo "$as_me:15965: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  egrep -v '^ *\+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:15971: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  ac_cv_header_dmalloc_h=yes
else
  echo "$as_me: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_header_dmalloc_h=no
fi
rm -f conftest.err conftest.$ac_ext
fi
echo "$as_me:15990: result: $ac_cv_header_dmalloc_h" >&5
echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
if test $ac_cv_header_dmalloc_h = yes; then
  echo "$as_me:15993: checking for dmalloc_debug in -ldmalloc" >&5
echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-ldmalloc  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 16001 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char dmalloc_debug ();
int
main (void)
{
dmalloc_debug ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:16020: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:16023: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:16026: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:16029: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_dmalloc_dmalloc_debug=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_dmalloc_dmalloc_debug=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:16040: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
  debug_malloc=DMALLOC
fi

fi

fi

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

	echo "$as_me:16054: checking for _tracef" >&5
echo $ECHO_N "checking for _tracef... $ECHO_C" >&6
if test "${ac_cv_func__tracef+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 16060 "configure"
#include "confdefs.h"
#define _tracef autoconf_temporary
#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
#undef _tracef

#ifdef __cplusplus
extern "C"
#endif

/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char _tracef (void);

int
main (void)
{

/* The GNU C library defines stubs for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub__tracef) || defined (__stub____tracef)
#error found stub for _tracef
#endif

	return _tracef ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:16091: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:16094: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:16097: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:16100: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_func__tracef=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_func__tracef=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:16110: result: $ac_cv_func__tracef" >&5
echo "${ECHO_T}$ac_cv_func__tracef" >&6
if test $ac_cv_func__tracef = yes; then
  cat >>confdefs.h <<\EOF
#define HAVE__TRACEF 1
EOF

else

	as_ac_Lib=`echo "ac_cv_lib_${cf_with_screen}_g''__tracef" | $as_tr_sh`
echo "$as_me:16120: checking for _tracef in -l${cf_with_screen}_g" >&5
echo $ECHO_N "checking for _tracef in -l${cf_with_screen}_g... $ECHO_C" >&6
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-l${cf_with_screen}_g  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 16128 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char _tracef ();
int
main (void)
{
_tracef ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:16147: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:16150: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:16153: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:16156: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_Lib=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_Lib=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:16167: result: `eval echo '${'$as_ac_Lib'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
  cat >>confdefs.h <<\EOF
#define HAVE__TRACEF 1
EOF

		 LIBS=`echo "$LIBS" | sed -e s/-l${cf_with_screen}// -e s/-lcurses//`
		 LIBS="-l${cf_with_screen}_g $LIBS"
		 use_trace=yes
		 cat >>confdefs.h <<\EOF
#define USE_TRACE 1
EOF

		 EXTRAO_DEP=''
		 EXTRAOBJS="$EXTRAOBJS \$(OBJDIR)/trace.o"
else
  use_trace=no
fi

fi

else
  use_trace=no
fi;
#AC_MSG_CHECKING(if you want debugging-trace)
#AC_MSG_RESULT($use_trace)

## options for miscellaneous definitions
echo "$as_me:16196: checking for domain-name" >&5
echo $ECHO_N "checking for domain-name... $ECHO_C" >&6

# Check whether --with-domain-name or --without-domain-name was given.
if test "${with_domain_name+set}" = set; then
  withval="$with_domain_name"

else
  withval="${DOMAIN_NAME}"
fi; test -n "$withval" && \
case "$withval" in #(vi
yes)
  { { echo "$as_me:16208: error: expected a value for --with-domain-name" >&5
echo "$as_me: error: expected a value for --with-domain-name" >&2;}
   { (exit 1); exit 1; }; }
  ;; #(vi
no) withval=""
  ;;
esac
DOMAIN_NAME="$withval"

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

fi
echo "$as_me:16223: result: $DOMAIN_NAME" >&5
echo "${ECHO_T}$DOMAIN_NAME" >&6

if test "$USE_NNTP" = "yes" ; then
echo "$as_me:16227: checking for NNTP default-server" >&5
echo $ECHO_N "checking for NNTP default-server... $ECHO_C" >&6

# Check whether --with-nntp-default-server or --without-nntp-default-server was given.
if test "${with_nntp_default_server+set}" = set; then
  withval="$with_nntp_default_server"

else
  withval="${NNTP_DEFAULT_SERVER-news.$DOMAIN_NAME}"
fi; test -z "$withval" && withval=no
case "$withval" in #(vi
yes)
  { { echo "$as_me:16239: error: expected a value for --with-nntp-default-server" >&5
echo "$as_me: error: expected a value for --with-nntp-default-server" >&2;}
   { (exit 1); exit 1; }; }
  ;; #(vi
no) withval=""
  ;;
esac
NNTP_DEFAULT_SERVER="$withval"

    if test "$NNTP_DEFAULT_SERVER" = "" ; then
	if test "$DOMAIN_NAME" != "" ; then
		test -z "$NNTP_DEFAULT_SERVER" && case "$DOMAIN_NAME" in #(((
	 	/*)
			if test -r "$DOMAIN_NAME" ; then
				NNTP_DEFAULT_SERVER="news.`cat $DOMAIN_NAME`"
			else
				NNTP_DEFAULT_SERVER="news"
			fi
			;;
	 	*)
			NNTP_DEFAULT_SERVER="news.$DOMAIN_NAME"
			;;
	 	esac
	else
		NNTP_DEFAULT_SERVER="news"
	fi
    fi
echo "$as_me:16266: result: $NNTP_DEFAULT_SERVER" >&5
echo "${ECHO_T}$NNTP_DEFAULT_SERVER" >&6
fi

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

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

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

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

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

## optional features
echo "$as_me:16293: checking whether to use MH style mail handling for mailgroups" >&5
echo $ECHO_N "checking whether to use MH style mail handling for mailgroups... $ECHO_C" >&6

# Check whether --enable-mh-mail-handling or --disable-mh-mail-handling was given.
if test "${enable_mh_mail_handling+set}" = set; then
  enableval="$enable_mh_mail_handling"
  test "$enableval" != yes && enableval=no
	if test "$enableval" != "no" ; then
    cat >>confdefs.h <<\EOF
#define HAVE_MH_MAIL_HANDLING 1
EOF

	fi
else
  enableval=no
fi;
echo "$as_me:16309: result: $enableval" >&5
echo "${ECHO_T}$enableval" >&6

CAN_MAKEFILE=
CANDIR_MAKE=
echo "$as_me:16314: checking whether to use Cancel-Locks" >&5
echo $ECHO_N "checking whether to use Cancel-Locks... $ECHO_C" >&6

# Check whether --enable-cancel-locks or --disable-cancel-locks was given.
if test "${enable_cancel_locks+set}" = set; then
  enableval="$enable_cancel_locks"
  test "$enableval" != yes && enableval=no
	if test "$enableval" != "no" ; then
    CANLIBS='-L../libcanlock -lcanlock'
	CAN_MAKEFILE="libcanlock/Makefile"
	cat >>confdefs.h <<\EOF
#define USE_CANLOCK 1
EOF

	else
		CANDIR_MAKE='#'
	CANLIBS=''
	fi
else
  enableval=no
	CANDIR_MAKE='#'
	CANLIBS=''

fi;
echo "$as_me:16338: result: $enableval" >&5
echo "${ECHO_T}$enableval" >&6

## gsasl - used for AUTH SASL PLAIN
gsasl=no
echo "$as_me:16343: checking for gsasl.h" >&5
echo $ECHO_N "checking for gsasl.h... $ECHO_C" >&6
if test "${ac_cv_header_gsasl_h+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 16349 "configure"
#include "confdefs.h"
#include <gsasl.h>
_ACEOF
if { (eval echo "$as_me:16353: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  egrep -v '^ *\+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:16359: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  ac_cv_header_gsasl_h=yes
else
  echo "$as_me: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_header_gsasl_h=no
fi
rm -f conftest.err conftest.$ac_ext
fi
echo "$as_me:16378: result: $ac_cv_header_gsasl_h" >&5
echo "${ECHO_T}$ac_cv_header_gsasl_h" >&6
if test $ac_cv_header_gsasl_h = yes; then
  echo "$as_me:16381: checking for gsasl_check_version in -lgsasl" >&5
echo $ECHO_N "checking for gsasl_check_version in -lgsasl... $ECHO_C" >&6
if test "${ac_cv_lib_gsasl_gsasl_check_version+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lgsasl  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 16389 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char gsasl_check_version ();
int
main (void)
{
gsasl_check_version ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:16408: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:16411: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:16414: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:16417: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_gsasl_gsasl_check_version=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_gsasl_gsasl_check_version=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:16428: result: $ac_cv_lib_gsasl_gsasl_check_version" >&5
echo "${ECHO_T}$ac_cv_lib_gsasl_gsasl_check_version" >&6
if test $ac_cv_lib_gsasl_gsasl_check_version = yes; then
  gsasl=yes
fi

fi

if test "$gsasl" = "yes"; then

# Check whether --enable-gsasl or --disable-gsasl was given.
if test "${enable_gsasl+set}" = set; then
  enableval="$enable_gsasl"
  test "$enableval" != no && enableval=yes
	if test "$enableval" != "yes" ; then
    USE_SASL=no
	else
		USE_SASL=yes

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

		LIBS="$LIBS -lgsasl"
	fi
else
  enableval=yes
	USE_SASL=yes

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

		LIBS="$LIBS -lgsasl"

fi;
fi

echo "$as_me:16466: checking whether to enable 8-bit keycodes" >&5
echo $ECHO_N "checking whether to enable 8-bit keycodes... $ECHO_C" >&6

# Check whether --enable-8bit-keys or --disable-8bit-keys was given.
if test "${enable_8bit_keys+set}" = set; then
  enableval="$enable_8bit_keys"
  test "$enableval" != no && enableval=yes
	if test "$enableval" != "yes" ; then
    :
	else
		cat >>confdefs.h <<\EOF
#define HAVE_KEY_PREFIX 1
EOF

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

fi;
echo "$as_me:16488: result: $enableval" >&5
echo "${ECHO_T}$enableval" >&6

echo "$as_me:16491: checking whether to enable ANSI-color" >&5
echo $ECHO_N "checking whether to enable ANSI-color... $ECHO_C" >&6

# Check whether --enable-color or --disable-color was given.
if test "${enable_color+set}" = set; then
  enableval="$enable_color"
  test "$enableval" != no && enableval=yes
	if test "$enableval" != "yes" ; then
    :
	fi
else
  enableval=yes
fi;
use_color=$enableval
echo "$as_me:16505: result: $use_color" >&5
echo "${ECHO_T}$use_color" >&6

echo "$as_me:16508: checking whether to enable posting-etiquette" >&5
echo $ECHO_N "checking whether to enable posting-etiquette... $ECHO_C" >&6

# Check whether --enable-etiquette or --disable-etiquette was given.
if test "${enable_etiquette+set}" = set; then
  enableval="$enable_etiquette"
  test "$enableval" != no && enableval=yes
	if test "$enableval" != "yes" ; then
    cat >>confdefs.h <<\EOF
#define NO_ETIQUETTE 1
EOF

	fi
else
  enableval=yes
fi;
echo "$as_me:16524: result: $enableval" >&5
echo "${ECHO_T}$enableval" >&6

echo "$as_me:16527: checking whether to strictly observe RFC2047 and break long lines" >&5
echo $ECHO_N "checking whether to strictly observe RFC2047 and break long lines... $ECHO_C" >&6

# Check whether --enable-break-long-lines or --disable-break-long-lines was given.
if test "${enable_break_long_lines+set}" = set; then
  enableval="$enable_break_long_lines"
  test "$enableval" != no && enableval=yes
	if test "$enableval" != "yes" ; then
    :
	else
		cat >>confdefs.h <<\EOF
#define MIME_BREAK_LONG_LINES 1
EOF

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

fi;
echo "$as_me:16549: result: $enableval" >&5
echo "${ECHO_T}$enableval" >&6

echo "$as_me:16552: checking whether to force MM_CHARSET obeyance when decoding mime" >&5
echo $ECHO_N "checking whether to force MM_CHARSET obeyance when decoding mime... $ECHO_C" >&6

# Check whether --enable-mime-strict-charset or --disable-mime-strict-charset was given.
if test "${enable_mime_strict_charset+set}" = set; then
  enableval="$enable_mime_strict_charset"
  test "$enableval" != no && enableval=yes
	if test "$enableval" != "yes" ; then
    :
	else
		cat >>confdefs.h <<\EOF
#define MIME_STRICT_CHARSET 1
EOF

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

fi;
echo "$as_me:16574: result: $enableval" >&5
echo "${ECHO_T}$enableval" >&6

echo "$as_me:16577: checking for MIME character-set" >&5
echo $ECHO_N "checking for MIME character-set... $ECHO_C" >&6

# Check whether --with-mime-default-charset or --without-mime-default-charset was given.
if test "${with_mime_default_charset+set}" = set; then
  withval="$with_mime_default_charset"

else
  withval="${MM_CHARSET-US-ASCII}"
fi; case "$withval" in #(vi
yes|no)
  { { echo "$as_me:16588: error: expected a value for --with-mime-default-charset" >&5
echo "$as_me: error: expected a value for --with-mime-default-charset" >&2;}
   { (exit 1); exit 1; }; }
  ;;
esac
MM_CHARSET="$withval"
cat >>confdefs.h <<EOF
#define MM_CHARSET "$MM_CHARSET"
EOF

echo "$as_me:16598: result: $MM_CHARSET" >&5
echo "${ECHO_T}$MM_CHARSET" >&6

echo "$as_me:16601: checking for default ISO/ASCII table" >&5
echo $ECHO_N "checking for default ISO/ASCII table... $ECHO_C" >&6

# Check whether --with-iso-to-ascii or --without-iso-to-ascii was given.
if test "${with_iso_to_ascii+set}" = set; then
  withval="$with_iso_to_ascii"

else
  withval="${DEFAULT_ISO2ASC--1}"
fi; case "$withval" in #(vi
yes|no)
  { { echo "$as_me:16612: error: expected a value for --with-iso-to-ascii" >&5
echo "$as_me: error: expected a value for --with-iso-to-ascii" >&2;}
   { (exit 1); exit 1; }; }
  ;;
esac
DEFAULT_ISO2ASC="$withval"
cat >>confdefs.h <<EOF
#define DEFAULT_ISO2ASC "$DEFAULT_ISO2ASC"
EOF

echo "$as_me:16622: result: $DEFAULT_ISO2ASC" >&5
echo "${ECHO_T}$DEFAULT_ISO2ASC" >&6

echo "$as_me:16625: checking whether to enable locale support" >&5
echo $ECHO_N "checking whether to enable locale support... $ECHO_C" >&6

# Check whether --enable-locale or --disable-locale was given.
if test "${enable_locale+set}" = set; then
  enableval="$enable_locale"
  test "$enableval" != no && enableval=yes
	if test "$enableval" != "yes" ; then
    cat >>confdefs.h <<\EOF
#define NO_LOCALE 1
EOF

	fi
else
  enableval=yes
fi;
echo "$as_me:16641: result: $enableval" >&5
echo "${ECHO_T}$enableval" >&6

echo "$as_me:16644: checking whether to enable posting" >&5
echo $ECHO_N "checking whether to enable posting... $ECHO_C" >&6

# Check whether --enable-posting or --disable-posting was given.
if test "${enable_posting+set}" = set; then
  enableval="$enable_posting"
  test "$enableval" != no && enableval=yes
	if test "$enableval" != "yes" ; then
    cat >>confdefs.h <<\EOF
#define NO_POSTING 1
EOF

	fi
else
  enableval=yes
fi;
echo "$as_me:16660: result: $enableval" >&5
echo "${ECHO_T}$enableval" >&6

echo "$as_me:16663: checking whether to enable shell escape" >&5
echo $ECHO_N "checking whether to enable shell escape... $ECHO_C" >&6

# Check whether --enable-shell-escape or --disable-shell-escape was given.
if test "${enable_shell_escape+set}" = set; then
  enableval="$enable_shell_escape"
  test "$enableval" != no && enableval=yes
	if test "$enableval" != "yes" ; then
    cat >>confdefs.h <<\EOF
#define NO_SHELL_ESCAPE 1
EOF

	fi
else
  enableval=yes
fi;
echo "$as_me:16679: result: $enableval" >&5
echo "${ECHO_T}$enableval" >&6

echo "$as_me:16682: checking whether to have fascist newsadmin" >&5
echo $ECHO_N "checking whether to have fascist newsadmin... $ECHO_C" >&6

# Check whether --enable-fascist-newsadmin or --disable-fascist-newsadmin was given.
if test "${enable_fascist_newsadmin+set}" = set; then
  enableval="$enable_fascist_newsadmin"
  test "$enableval" != yes && enableval=no
	if test "$enableval" != "no" ; then
    cat >>confdefs.h <<\EOF
#define HAVE_FASCIST_NEWSADMIN 1
EOF

	fi
else
  enableval=no
fi;
echo "$as_me:16698: result: $enableval" >&5
echo "${ECHO_T}$enableval" >&6

echo "$as_me:16701: checking whether to enable inverse video and highlighting" >&5
echo $ECHO_N "checking whether to enable inverse video and highlighting... $ECHO_C" >&6

# Check whether --enable-inverse-video or --disable-inverse-video was given.
if test "${enable_inverse_video+set}" = set; then
  enableval="$enable_inverse_video"
  test "$enableval" != no && enableval=yes
	if test "$enableval" != "yes" ; then
    cat >>confdefs.h <<\EOF
#define USE_INVERSE_HACK 1
EOF

	fi
else
  enableval=yes
fi;
echo "$as_me:16717: result: $enableval" >&5
echo "${ECHO_T}$enableval" >&6

echo "$as_me:16720: checking whether to enable piping support" >&5
echo $ECHO_N "checking whether to enable piping support... $ECHO_C" >&6

# Check whether --enable-piping or --disable-piping was given.
if test "${enable_piping+set}" = set; then
  enableval="$enable_piping"
  test "$enableval" != no && enableval=yes
	if test "$enableval" != "yes" ; then
    cat >>confdefs.h <<\EOF
#define DONT_HAVE_PIPING 1
EOF

	fi
else
  enableval=yes
fi;
echo "$as_me:16736: result: $enableval" >&5
echo "${ECHO_T}$enableval" >&6

echo "$as_me:16739: checking whether to enable printer support" >&5
echo $ECHO_N "checking whether to enable printer support... $ECHO_C" >&6

# Check whether --enable-printing or --disable-printing was given.
if test "${enable_printing+set}" = set; then
  enableval="$enable_printing"
  test "$enableval" != no && enableval=yes
	if test "$enableval" != "yes" ; then
    cat >>confdefs.h <<\EOF
#define DISABLE_PRINTING 1
EOF

	fi
else
  enableval=yes
fi;
echo "$as_me:16755: result: $enableval" >&5
echo "${ECHO_T}$enableval" >&6

echo "$as_me:16758: checking whether to unique tmp-files by appending .pid" >&5
echo $ECHO_N "checking whether to unique tmp-files by appending .pid... $ECHO_C" >&6

# Check whether --enable-append-pid or --disable-append-pid was given.
if test "${enable_append_pid+set}" = set; then
  enableval="$enable_append_pid"
  test "$enableval" != no && enableval=yes
	if test "$enableval" != "yes" ; then
    :
	else
		cat >>confdefs.h <<\EOF
#define APPEND_PID 1
EOF

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

fi;
echo "$as_me:16780: result: $enableval" >&5
echo "${ECHO_T}$enableval" >&6

echo "$as_me:16783: checking whether to fallback to XHDR XREF if XOVER isn't supported" >&5
echo $ECHO_N "checking whether to fallback to XHDR XREF if XOVER isn't supported... $ECHO_C" >&6

# Check whether --enable-xhdr-xref or --disable-xhdr-xref was given.
if test "${enable_xhdr_xref+set}" = set; then
  enableval="$enable_xhdr_xref"
  test "$enableval" != no && enableval=yes
	if test "$enableval" != "yes" ; then
    :
	else
		cat >>confdefs.h <<\EOF
#define XHDR_XREF 1
EOF

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

fi;
echo "$as_me:16805: result: $enableval" >&5
echo "${ECHO_T}$enableval" >&6

### bypass a bug in old versions of leafnode & NNTPcache
echo "$as_me:16809: checking whether to send a GROUP command before a LISTGROUP" >&5
echo $ECHO_N "checking whether to send a GROUP command before a LISTGROUP... $ECHO_C" >&6

# Check whether --enable-broken-listgroup-fix or --disable-broken-listgroup-fix was given.
if test "${enable_broken_listgroup_fix+set}" = set; then
  enableval="$enable_broken_listgroup_fix"
  test "$enableval" != yes && enableval=no
	if test "$enableval" != "no" ; then
    cat >>confdefs.h <<\EOF
#define BROKEN_LISTGROUP 1
EOF

	fi
else
  enableval=no
fi;
echo "$as_me:16825: result: $enableval" >&5
echo "${ECHO_T}$enableval" >&6

### on some old systems the WIFEXITED()/WEXITSTATUS() macros do not work
echo "$as_me:16829: checking whether to ignore system()s return value" >&5
echo $ECHO_N "checking whether to ignore system()s return value... $ECHO_C" >&6

# Check whether --enable-broken-system-fix or --disable-broken-system-fix was given.
if test "${enable_broken_system_fix+set}" = set; then
  enableval="$enable_broken_system_fix"
  test "$enableval" != yes && enableval=no
	if test "$enableval" != "no" ; then
    cat >>confdefs.h <<\EOF
#define IGNORE_SYSTEM_STATUS 1
EOF

	fi
else
  enableval=no
fi;
echo "$as_me:16845: result: $enableval" >&5
echo "${ECHO_T}$enableval" >&6

### checks for the location of the system-wide default setting file
echo "$as_me:16849: checking for directory containing tin.defaults file" >&5
echo $ECHO_N "checking for directory containing tin.defaults file... $ECHO_C" >&6

# Check whether --with-defaults-dir or --without-defaults-dir was given.
if test "${with_defaults_dir+set}" = set; then
  withval="$with_defaults_dir"

else
  withval="${TIN_DEFAULTS_DIR:-/etc/tin}"
fi; if true ; then

if test "x$prefix" != xNONE; then
	cf_path_syntax="$prefix"
else
	cf_path_syntax="$ac_default_prefix"
fi

case ".$withval" in
(.\$\(*\)*|.\'*\'*)
	;;
(..|./*|.\\*)
	;;
(.[a-zA-Z]:[\\/]*) # OS/2 EMX
	;;
(.\${*prefix}*|.\${*dir}*)
	eval withval="$withval"
	case ".$withval" in
	(.NONE/*)
		withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
		;;
	esac
	;;
(.no|.NONE/*)
	withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
	;;
(*)
	{ { echo "$as_me:16885: error: expected a pathname, not \"$withval\"" >&5
echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
   { (exit 1); exit 1; }; }
	;;
esac

fi
eval TIN_DEFAULTS_DIR="$withval"

echo "$as_me:16894: result: $TIN_DEFAULTS_DIR" >&5
echo "${ECHO_T}$TIN_DEFAULTS_DIR" >&6
cat >>confdefs.h <<EOF
#define TIN_DEFAULTS_DIR "$TIN_DEFAULTS_DIR"
EOF

### check for ipv6 support
echo "$as_me:16901: checking whether to enable IPv6" >&5
echo $ECHO_N "checking whether to enable IPv6... $ECHO_C" >&6

# Check whether --enable-ipv6 or --disable-ipv6 was given.
if test "${enable_ipv6+set}" = set; then
  enableval="$enable_ipv6"
  test "$enableval" != no && enableval=yes
	if test "$enableval" != "yes" ; then
    :
	else
		cat >>confdefs.h <<\EOF
#define ENABLE_IPV6 1
EOF

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

fi;
echo "$as_me:16923: result: $enableval" >&5
echo "${ECHO_T}$enableval" >&6
if test "$enableval" = "yes"; then

echo "$as_me:16927: checking ipv6 stack type" >&5
echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6
if test "${cf_cv_ipv6type+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

cf_cv_ipv6type=unknown
for i in solaris inria kame linux-glibc linux-libinet6 toshiba v6d zeta
do
	case $i in
	(solaris)
		if test "SunOS" = "`uname -s`"
		then
		  if test -f /usr/include/netinet/ip6.h
		  then
			cf_cv_ipv6type=$i
		  fi
		fi
		;;
	(inria)
				cat >conftest.$ac_ext <<_ACEOF
#line 16948 "configure"
#include "confdefs.h"

#include <netinet/in.h>
#ifdef IPV6_INRIA_VERSION
yes
#endif
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "yes" >/dev/null 2>&1; then
  cf_cv_ipv6type=$i
fi
rm -rf conftest*

		;;
	(kame)
				cat >conftest.$ac_ext <<_ACEOF
#line 16965 "configure"
#include "confdefs.h"

#include <netinet/in.h>
#ifdef __KAME__
yes
#endif
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "yes" >/dev/null 2>&1; then
  cf_cv_ipv6type=$i
fi
rm -rf conftest*

		;;
	(linux-glibc)
				cat >conftest.$ac_ext <<_ACEOF
#line 16982 "configure"
#include "confdefs.h"

#include <features.h>
#if defined(__GLIBC__) && __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 1
yes
#endif
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "yes" >/dev/null 2>&1; then
  cf_cv_ipv6type=$i
fi
rm -rf conftest*

		;;
	(linux-libinet6)
				if test -d /usr/inet6
		then
			cf_cv_ipv6type=$i
		elif test -f /usr/include/netinet/ip6.h
		then
			cf_cv_ipv6type=$i
		fi
		;;
	(toshiba)
		cat >conftest.$ac_ext <<_ACEOF
#line 17008 "configure"
#include "confdefs.h"

#include <sys/param.h>
#ifdef _TOSHIBA_INET6
yes
#endif
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "yes" >/dev/null 2>&1; then
  cf_cv_ipv6type=$i
fi
rm -rf conftest*

		;;
	(v6d)
		cat >conftest.$ac_ext <<_ACEOF
#line 17025 "configure"
#include "confdefs.h"

#include </usr/local/v6/include/sys/v6config.h>
#ifdef __V6D__
yes
#endif
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "yes" >/dev/null 2>&1; then
  cf_cv_ipv6type=$i
fi
rm -rf conftest*

		;;
	(zeta)
		cat >conftest.$ac_ext <<_ACEOF
#line 17042 "configure"
#include "confdefs.h"

#include <sys/param.h>
#ifdef _ZETA_MINAMI_INET6
yes
#endif
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "yes" >/dev/null 2>&1; then
  cf_cv_ipv6type=$i
fi
rm -rf conftest*

		;;
	esac
	if test "$cf_cv_ipv6type" != "unknown"; then
		break
	fi
done

fi
echo "$as_me:17064: result: $cf_cv_ipv6type" >&5
echo "${ECHO_T}$cf_cv_ipv6type" >&6

cf_ipv6lib=none
cf_ipv6dir=none

echo "$as_me:17070: checking for IPv6 library if required" >&5
echo $ECHO_N "checking for IPv6 library if required... $ECHO_C" >&6
case $cf_cv_ipv6type in
(solaris)
	;;
(inria)
	;;
(kame)
		cf_ipv6lib=inet6
	cf_ipv6dir=v6
	;;
(linux-glibc)
	;;
(linux-libinet6)
		cf_ipv6lib=inet6
	cf_ipv6dir=inet6
	;;
(toshiba)
	cf_ipv6lib=inet6
	cf_ipv6dir=v6
	;;
(v6d)
	cf_ipv6lib=v6
	cf_ipv6dir=v6
	;;
(zeta)
	cf_ipv6lib=inet6
	cf_ipv6dir=v6
	;;
esac
echo "$as_me:17100: result: $cf_ipv6lib" >&5
echo "${ECHO_T}$cf_ipv6lib" >&6

if test "$cf_ipv6lib" != "none"; then

	cat >conftest.$ac_ext <<_ACEOF
#line 17106 "configure"
#include "confdefs.h"

#include <sys/types.h>
#include <netdb.h>
#include <netinet/in.h>
#include <netinet/ip6.h>
int
main (void)
{
getaddrinfo(0, 0, 0, 0)
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:17122: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:17125: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:17128: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:17131: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  :
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5

cf_search=

# collect the current set of include-directories from compiler flags
cf_header_path_list=""
if test -n "${CFLAGS}${CPPFLAGS}" ; then
	for cf_header_path in $CPPFLAGS $CFLAGS
	do
		case $cf_header_path in
		(-I*)
			cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`

test "x$cf_header_path" != "xNONE" && \
test -d "$cf_header_path" && \
 {
	test -n "$verbose" && echo "	... testing for include-directories under $cf_header_path"
	test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
	test -d $cf_header_path/include/$cf_ipv6dir &&       cf_search="$cf_search $cf_header_path/include/$cf_ipv6dir"
	test -d $cf_header_path/include/$cf_ipv6dir/include &&    cf_search="$cf_search $cf_header_path/include/$cf_ipv6dir/include"
	test -d $cf_header_path/$cf_ipv6dir/include &&       cf_search="$cf_search $cf_header_path/$cf_ipv6dir/include"
	test -d $cf_header_path/$cf_ipv6dir/include/$cf_ipv6dir &&    cf_search="$cf_search $cf_header_path/$cf_ipv6dir/include/$cf_ipv6dir"
}

			cf_header_path_list="$cf_header_path_list $cf_search"
			;;
		esac
	done
fi

# add the variations for the package we are looking for

cf_search=

test "x$prefix" != "xNONE" && \
test -d "$prefix" && \
 {
	test -n "$verbose" && echo "	... testing for include-directories under $prefix"
	test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
	test -d $prefix/include/$cf_ipv6dir &&       cf_search="$cf_search $prefix/include/$cf_ipv6dir"
	test -d $prefix/include/$cf_ipv6dir/include &&    cf_search="$cf_search $prefix/include/$cf_ipv6dir/include"
	test -d $prefix/$cf_ipv6dir/include &&       cf_search="$cf_search $prefix/$cf_ipv6dir/include"
	test -d $prefix/$cf_ipv6dir/include/$cf_ipv6dir &&    cf_search="$cf_search $prefix/$cf_ipv6dir/include/$cf_ipv6dir"
}

for cf_subdir_prefix in \
	/usr \
	/usr/local \
	/usr/pkg \
	/opt \
	/opt/local \
	$HOME
do

test "x$cf_subdir_prefix" != "x$prefix" && \
test -d "$cf_subdir_prefix" && \
(test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
	test -n "$verbose" && echo "	... testing for include-directories under $cf_subdir_prefix"
	test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
	test -d $cf_subdir_prefix/include/$cf_ipv6dir &&       cf_search="$cf_search $cf_subdir_prefix/include/$cf_ipv6dir"
	test -d $cf_subdir_prefix/include/$cf_ipv6dir/include &&    cf_search="$cf_search $cf_subdir_prefix/include/$cf_ipv6dir/include"
	test -d $cf_subdir_prefix/$cf_ipv6dir/include &&       cf_search="$cf_search $cf_subdir_prefix/$cf_ipv6dir/include"
	test -d $cf_subdir_prefix/$cf_ipv6dir/include/$cf_ipv6dir &&    cf_search="$cf_search $cf_subdir_prefix/$cf_ipv6dir/include/$cf_ipv6dir"
}

done

test "$includedir" != NONE && \
test "$includedir" != "/usr/include" && \
test -d "$includedir" && {
	test -d $includedir &&    cf_search="$cf_search $includedir"
	test -d $includedir/$cf_ipv6dir && cf_search="$cf_search $includedir/$cf_ipv6dir"
}

test "$oldincludedir" != NONE && \
test "$oldincludedir" != "/usr/include" && \
test -d "$oldincludedir" && {
	test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
	test -d $oldincludedir/$cf_ipv6dir && cf_search="$cf_search $oldincludedir/$cf_ipv6dir"
}

cf_search="$cf_search $cf_header_path_list"

	for cf_incdir in $cf_search
	do
		cf_header=$cf_incdir/netinet/ip6.h
		if test -f $cf_header
		then

if test -n "$cf_incdir" ; then
  for cf_add_incdir in $cf_incdir
  do
	while test $cf_add_incdir != /usr/include
	do
	  if test -d $cf_add_incdir
	  then
		cf_have_incdir=no
		if test -n "$CFLAGS$CPPFLAGS" ; then
		  # a loop is needed to ensure we can add subdirs of existing dirs
		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
			  cf_have_incdir=yes; break
			fi
		  done
		fi

		if test "$cf_have_incdir" = no ; then
		  if test "$cf_add_incdir" = /usr/local/include ; then
			if test "$GCC" = yes
			then
			  cf_save_CPPFLAGS=$CPPFLAGS

	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
	CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"

			  cat >conftest.$ac_ext <<_ACEOF
#line 17252 "configure"
#include "confdefs.h"
#include <stdio.h>
int
main (void)
{
printf("Hello")
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:17264: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:17267: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:17270: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:17273: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  :
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
cf_have_incdir=yes
fi
rm -f conftest.$ac_objext conftest.$ac_ext
			  CPPFLAGS=$cf_save_CPPFLAGS
			fi
		  fi
		fi

		if test "$cf_have_incdir" = no ; then
		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6

echo "${as_me:-configure}:17290: testing adding $cf_add_incdir to include-path ..." 1>&5

		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"

		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
		  test "$cf_top_incdir" = "$cf_add_incdir" && break
		  cf_add_incdir="$cf_top_incdir"
		else
		  break
		fi
	  else
		break
	  fi
	done
  done
fi

			test -n "$verbose" && echo "	... found $cf_header" 1>&6
			break
		fi
		test -n "$verbose" && echo "	... tested $cf_header" 1>&6
	done

fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext

	eval 'cf_cv_have_lib_'$cf_ipv6lib'=no'
	cf_libdir=""
	echo "$as_me:17318: checking for getaddrinfo" >&5
echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6
if test "${ac_cv_func_getaddrinfo+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 17324 "configure"
#include "confdefs.h"
#define getaddrinfo autoconf_temporary
#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
#undef getaddrinfo

#ifdef __cplusplus
extern "C"
#endif

/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char getaddrinfo (void);

int
main (void)
{

/* The GNU C library defines stubs for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_getaddrinfo) || defined (__stub___getaddrinfo)
#error found stub for getaddrinfo
#endif

	return getaddrinfo ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:17355: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:17358: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:17361: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:17364: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_func_getaddrinfo=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_func_getaddrinfo=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:17374: result: $ac_cv_func_getaddrinfo" >&5
echo "${ECHO_T}$ac_cv_func_getaddrinfo" >&6
if test $ac_cv_func_getaddrinfo = yes; then
  eval 'cf_cv_have_lib_'$cf_ipv6lib'=yes'
else

		cf_save_LIBS="$LIBS"
		echo "$as_me:17381: checking for getaddrinfo in -l$cf_ipv6lib" >&5
echo $ECHO_N "checking for getaddrinfo in -l$cf_ipv6lib... $ECHO_C" >&6
		LIBS="-l$cf_ipv6lib $LIBS"
		cat >conftest.$ac_ext <<_ACEOF
#line 17385 "configure"
#include "confdefs.h"

#include <sys/types.h>
#include <netdb.h>
#include <netinet/in.h>
#include <netinet/ip6.h>
int
main (void)
{
getaddrinfo(0, 0, 0, 0)
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:17401: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:17404: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:17407: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:17410: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  echo "$as_me:17412: result: yes" >&5
echo "${ECHO_T}yes" >&6
			 eval 'cf_cv_have_lib_'$cf_ipv6lib'=yes'

else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
echo "$as_me:17419: result: no" >&5
echo "${ECHO_T}no" >&6

cf_search=
cf_library_path_list=""
if test -n "${LDFLAGS}${LIBS}" ; then
	for cf_library_path in $LDFLAGS $LIBS
	do
		case $cf_library_path in
		(-L*)
			cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`

test "x$cf_library_path" != "xNONE" && \
test -d "$cf_library_path" && \
 {
	test -n "$verbose" && echo "	... testing for lib-directories under $cf_library_path"
	test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
	test -d $cf_library_path/lib/$cf_ipv6dir &&       cf_search="$cf_search $cf_library_path/lib/$cf_ipv6dir"
	test -d $cf_library_path/lib/$cf_ipv6dir/lib &&    cf_search="$cf_search $cf_library_path/lib/$cf_ipv6dir/lib"
	test -d $cf_library_path/$cf_ipv6dir/lib &&       cf_search="$cf_search $cf_library_path/$cf_ipv6dir/lib"
	test -d $cf_library_path/$cf_ipv6dir/lib/$cf_ipv6dir &&    cf_search="$cf_search $cf_library_path/$cf_ipv6dir/lib/$cf_ipv6dir"
}

			cf_library_path_list="$cf_library_path_list $cf_search"
			;;
		esac
	done
fi

cf_search=

test "x$prefix" != "xNONE" && \
test -d "$prefix" && \
 {
	test -n "$verbose" && echo "	... testing for lib-directories under $prefix"
	test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
	test -d $prefix/lib/$cf_ipv6dir &&       cf_search="$cf_search $prefix/lib/$cf_ipv6dir"
	test -d $prefix/lib/$cf_ipv6dir/lib &&    cf_search="$cf_search $prefix/lib/$cf_ipv6dir/lib"
	test -d $prefix/$cf_ipv6dir/lib &&       cf_search="$cf_search $prefix/$cf_ipv6dir/lib"
	test -d $prefix/$cf_ipv6dir/lib/$cf_ipv6dir &&    cf_search="$cf_search $prefix/$cf_ipv6dir/lib/$cf_ipv6dir"
}

for cf_subdir_prefix in \
	/usr \
	/usr/local \
	/usr/pkg \
	/opt \
	/opt/local \
	$HOME
do

test "x$cf_subdir_prefix" != "x$prefix" && \
test -d "$cf_subdir_prefix" && \
(test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
	test -n "$verbose" && echo "	... testing for lib-directories under $cf_subdir_prefix"
	test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
	test -d $cf_subdir_prefix/lib/$cf_ipv6dir &&       cf_search="$cf_search $cf_subdir_prefix/lib/$cf_ipv6dir"
	test -d $cf_subdir_prefix/lib/$cf_ipv6dir/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/$cf_ipv6dir/lib"
	test -d $cf_subdir_prefix/$cf_ipv6dir/lib &&       cf_search="$cf_search $cf_subdir_prefix/$cf_ipv6dir/lib"
	test -d $cf_subdir_prefix/$cf_ipv6dir/lib/$cf_ipv6dir &&    cf_search="$cf_search $cf_subdir_prefix/$cf_ipv6dir/lib/$cf_ipv6dir"
}

done

cf_search="$cf_library_path_list $cf_search"

			for cf_libdir in $cf_search
			do
				echo "$as_me:17487: checking for -l$cf_ipv6lib in $cf_libdir" >&5
echo $ECHO_N "checking for -l$cf_ipv6lib in $cf_libdir... $ECHO_C" >&6
				LIBS="-L$cf_libdir -l$cf_ipv6lib $cf_save_LIBS"
				cat >conftest.$ac_ext <<_ACEOF
#line 17491 "configure"
#include "confdefs.h"

#include <sys/types.h>
#include <netdb.h>
#include <netinet/in.h>
#include <netinet/ip6.h>
int
main (void)
{
getaddrinfo(0, 0, 0, 0)
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:17507: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:17510: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:17513: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:17516: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  echo "$as_me:17518: result: yes" >&5
echo "${ECHO_T}yes" >&6
			 		 eval 'cf_cv_have_lib_'$cf_ipv6lib'=yes'
					 break
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
echo "$as_me:17525: result: no" >&5
echo "${ECHO_T}no" >&6
					 LIBS="$cf_save_LIBS"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
			done

fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext

fi

eval 'cf_found_library=$cf_cv_have_lib_'$cf_ipv6lib

	if test $cf_found_library = no ; then
		{ { echo "$as_me:17540: error: No $cf_ipv6lib library found, cannot continue.  You must fetch lib$cf_ipv6lib.a
from an appropriate IPv6 kit and compile beforehand." >&5
echo "$as_me: error: No $cf_ipv6lib library found, cannot continue.  You must fetch lib$cf_ipv6lib.a
from an appropriate IPv6 kit and compile beforehand." >&2;}
   { (exit 1); exit 1; }; }
	fi
fi

echo "$as_me:17548: checking working getaddrinfo" >&5
echo $ECHO_N "checking working getaddrinfo... $ECHO_C" >&6
if test "${cf_cv_getaddrinfo+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

if test "$cross_compiling" = yes; then
  cf_cv_getaddrinfo=unknown
else
  cat >conftest.$ac_ext <<_ACEOF
#line 17558 "configure"
#include "confdefs.h"

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

#define expect(a,b) if (strcmp(a,b) != 0) goto bad

int main(void)
{
   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:
         expect(strport, "54321");
         if (passive) {
           expect(straddr, "0.0.0.0");
         } else {
           expect(straddr, "127.0.0.1");
         }
         inet4++;
         break;
       case AF_INET6:
         expect(strport, "54321");
         if (passive) {
           expect(straddr, "::");
         } else {
           expect(straddr, "::1");
         }
         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);
   ${cf_cv_main_return:-return}(0);

  bad:
   if (aitop)
     freeaddrinfo(aitop);
   ${cf_cv_main_return:-return}(1);
}

_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:17638: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:17641: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:17643: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:17646: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  cf_cv_getaddrinfo=yes
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
cf_cv_getaddrinfo=no
fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi

fi
echo "$as_me:17659: result: $cf_cv_getaddrinfo" >&5
echo "${ECHO_T}$cf_cv_getaddrinfo" >&6
if test "$cf_cv_getaddrinfo" = yes ; then

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

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

fi

if test "$cf_cv_getaddrinfo" != "yes"; then
	if test "$cf_cv_ipv6type" != "linux"; then
		{ echo "$as_me:17675: WARNING: You must get working getaddrinfo() function,
or you can specify \"--disable-ipv6\"" >&5
echo "$as_me: WARNING: You must get working getaddrinfo() function,
or you can specify \"--disable-ipv6\"" >&2;}
	else
		{ echo "$as_me:17680: WARNING: The getaddrinfo() implementation on your system seems be buggy.
You should upgrade your system library to the newest version
of GNU C library (aka glibc)." >&5
echo "$as_me: WARNING: The getaddrinfo() implementation on your system seems be buggy.
You should upgrade your system library to the newest version
of GNU C library (aka glibc)." >&2;}
	fi
fi

fi

for ac_func in getaddrinfo getnameinfo
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:17694: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 17700 "configure"
#include "confdefs.h"
#define $ac_func autoconf_temporary
#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
#undef $ac_func

#ifdef __cplusplus
extern "C"
#endif

/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char $ac_func (void);

int
main (void)
{

/* The GNU C library defines stubs for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
#error found stub for $ac_func
#endif

	return $ac_func ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:17731: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:17734: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:17737: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:17740: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:17750: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF

else
  LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
fi
done

### should we use 64 bit article numbers if possible?
echo "$as_me:17763: checking whether to enable long article numbers" >&5
echo $ECHO_N "checking whether to enable long article numbers... $ECHO_C" >&6

# Check whether --enable-long-article-numbers or --disable-long-article-numbers was given.
if test "${enable_long_article_numbers+set}" = set; then
  enableval="$enable_long_article_numbers"
  test "$enableval" != yes && enableval=no
	if test "$enableval" != "no" ; then
    cat >>confdefs.h <<\EOF
#define ENABLE_LONG_ARTICLE_NUMBERS 1
EOF

	fi
else
  enableval=no
fi;
echo "$as_me:17779: result: $enableval" >&5
echo "${ECHO_T}$enableval" >&6

### checks for operator characteristics (should be the last option)
echo "$as_me:17783: checking whether to make a coffee while compiling" >&5
echo $ECHO_N "checking whether to make a coffee while compiling... $ECHO_C" >&6

# Check whether --with-coffee or --without-coffee was given.
if test "${with_coffee+set}" = set; then
  withval="$with_coffee"
   case "$withval" in
	yes)
	echo "$as_me:17791: result: yes - with milk - please!" >&5
echo "${ECHO_T}yes - with milk - please!" >&6
	cat >>confdefs.h <<\EOF
#define HAVE_COFFEE 1
EOF

	;;
	*)
	echo "$as_me:17799: result: no" >&5
echo "${ECHO_T}no" >&6
	;;
	esac
else
  echo "$as_me:17804: result: no" >&5
echo "${ECHO_T}no" >&6
fi;

### checks for compiler characteristics

echo "$as_me:17810: checking for makeflags variable" >&5
echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
if test "${cf_cv_makeflags+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

	cf_cv_makeflags=''
	for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
	do
		cat >cf_makeflags.tmp <<CF_EOF
SHELL = $SHELL
all :
	@ echo '.$cf_option'
CF_EOF
		cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[ 	]*$,,'`
		case "$cf_result" in
		(.*k|.*kw)
			cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
			case "$cf_result" in
			(.*CC=*)	cf_cv_makeflags=
				;;
			(*)	cf_cv_makeflags=$cf_option
				;;
			esac
			break
			;;
		(.-)
			;;
		(*)

echo "${as_me:-configure}:17840: testing given option \"$cf_option\",no match \"$cf_result\" ..." 1>&5

			;;
		esac
	done
	rm -f cf_makeflags.tmp

fi
echo "$as_me:17848: result: $cf_cv_makeflags" >&5
echo "${ECHO_T}$cf_cv_makeflags" >&6

ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
ac_main_return=return

echo "$as_me:17858: checking for an ANSI C-conforming const" >&5
echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
if test "${ac_cv_c_const+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 17864 "configure"
#include "confdefs.h"

int
main (void)
{
/* FIXME: Include the comments suggested by Paul. */
#ifndef __cplusplus
  /* Ultrix mips cc rejects this.  */
  typedef int charset[2];
  const charset x;
  /* SunOS 4.1.1 cc rejects this.  */
  char const *const *ccp;
  char **p;
  /* NEC SVR4.0.2 mips cc rejects this.  */
  struct point {int x, y;};
  static struct point const zero = {0,0};
  /* AIX XL C 1.02.0.0 rejects this.
     It does not let you subtract one const X* pointer from another in
     an arm of an if-expression whose if-part is not a constant
     expression */
  const char *g = "string";
  ccp = &g + (g ? g-g : 0);
  /* HPUX 7.0 cc rejects these. */
  ++ccp;
  p = (char**) ccp;
  ccp = (char const *const *) p;
  { /* SCO 3.2v4 cc rejects this.  */
    char *t;
    char const *s = 0 ? (char *) 0 : (char const *) 0;

    *t++ = 0;
  }
  { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
    int x[] = {25, 17};
    const int *foo = &x[0];
    ++foo;
  }
  { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
    typedef const int *iptr;
    iptr p = 0;
    ++p;
  }
  { /* AIX XL C 1.02.0.0 rejects this saying
       "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
    struct s { int j; const int *ap[3]; };
    struct s *b; b->j = 5;
  }
  { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
    const int foo = 10;
  }
#endif

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:17922: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:17925: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:17928: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:17931: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_c_const=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_c_const=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:17941: result: $ac_cv_c_const" >&5
echo "${ECHO_T}$ac_cv_c_const" >&6
if test $ac_cv_c_const = no; then

cat >>confdefs.h <<\EOF
#define const
EOF

fi

echo "$as_me:17951: checking for inline" >&5
echo $ECHO_N "checking for inline... $ECHO_C" >&6
if test "${ac_cv_c_inline+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_cv_c_inline=no
for ac_kw in inline __inline__ __inline; do
  cat >conftest.$ac_ext <<_ACEOF
#line 17959 "configure"
#include "confdefs.h"
#ifndef __cplusplus
static $ac_kw int static_foo () {return 0; }
$ac_kw int foo () {return 0; }
#endif

_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:17968: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:17971: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:17974: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:17977: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_c_inline=$ac_kw; break
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest.$ac_objext conftest.$ac_ext
done

fi
echo "$as_me:17988: result: $ac_cv_c_inline" >&5
echo "${ECHO_T}$ac_cv_c_inline" >&6
case $ac_cv_c_inline in
  inline | yes) ;;
  no)
cat >>confdefs.h <<\EOF
#define inline
EOF
 ;;
  *)  cat >>confdefs.h <<EOF
#define inline $ac_cv_c_inline
EOF
 ;;
esac

echo "$as_me:18003: checking for ansi token expansion/substitution" >&5
echo $ECHO_N "checking for ansi token expansion/substitution... $ECHO_C" >&6
if test "${cf_cv_cpp_expands+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

	cat >conftest.$ac_ext <<_ACEOF
#line 18010 "configure"
#include "confdefs.h"

#define string(n) #n
int
main (void)
{
char *s = string(token)
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:18023: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:18026: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:18029: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:18032: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  cf_cv_cpp_expands=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
cf_cv_cpp_expands=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext

fi

echo "$as_me:18044: result: $cf_cv_cpp_expands" >&5
echo "${ECHO_T}$cf_cv_cpp_expands" >&6
test $cf_cv_cpp_expands = yes && cat >>confdefs.h <<\EOF
#define CPP_DOES_EXPAND 1
EOF

echo "$as_me:18050: checking for ansi token concatenation" >&5
echo $ECHO_N "checking for ansi token concatenation... $ECHO_C" >&6
if test "${cf_cv_cpp_concats+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

	cat >conftest.$ac_ext <<_ACEOF
#line 18057 "configure"
#include "confdefs.h"

#define concat(a,b) a ## b
int
main (void)
{
char *firstlast = "y", *s = concat(first,last)
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:18070: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:18073: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:18076: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:18079: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  cf_cv_cpp_concats=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
cf_cv_cpp_concats=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext

fi

echo "$as_me:18091: result: $cf_cv_cpp_concats" >&5
echo "${ECHO_T}$cf_cv_cpp_concats" >&6
test $cf_cv_cpp_concats = yes && cat >>confdefs.h <<\EOF
#define CPP_DOES_CONCAT 1
EOF

echo "$as_me:18097: checking if nested parameters work" >&5
echo $ECHO_N "checking if nested parameters work... $ECHO_C" >&6
if test "${cf_cv_nested_params+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

	cat >conftest.$ac_ext <<_ACEOF
#line 18104 "configure"
#include "confdefs.h"

int
main (void)
{
extern void (*sigdisp(int sig, void (*func)(int sig)))(int sig)
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:18116: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:18119: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:18122: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:18125: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  cf_cv_nested_params=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
cf_cv_nested_params=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext

fi

echo "$as_me:18137: result: $cf_cv_nested_params" >&5
echo "${ECHO_T}$cf_cv_nested_params" >&6
test $cf_cv_nested_params = yes && cat >>confdefs.h <<\EOF
#define HAVE_NESTED_PARAMS 1
EOF

###	Checks for header files.
echo "$as_me:18144: checking for ANSI C header files" >&5
echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
if test "${ac_cv_header_stdc+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 18150 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <float.h>

_ACEOF
if { (eval echo "$as_me:18158: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  egrep -v '^ *\+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:18164: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  ac_cv_header_stdc=yes
else
  echo "$as_me: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_header_stdc=no
fi
rm -f conftest.err conftest.$ac_ext

if test $ac_cv_header_stdc = yes; then
  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
  cat >conftest.$ac_ext <<_ACEOF
#line 18186 "configure"
#include "confdefs.h"
#include <string.h>

_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "memchr" >/dev/null 2>&1; then
  :
else
  ac_cv_header_stdc=no
fi
rm -rf 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 <<_ACEOF
#line 18204 "configure"
#include "confdefs.h"
#include <stdlib.h>

_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "free" >/dev/null 2>&1; then
  :
else
  ac_cv_header_stdc=no
fi
rm -rf 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 <<_ACEOF
#line 18225 "configure"
#include "confdefs.h"
#include <ctype.h>
#if ((' ' & 0x0FF) == 0x020)
# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
#else
# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
                     || ('j' <= (c) && (c) <= 'r') \
                     || ('s' <= (c) && (c) <= 'z'))
# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
#endif

#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
int
main (void)
{
  int i;
  for (i = 0; i < 256; i++)
    if (XOR (islower (i), ISLOWER (i))
        || toupper (i) != TOUPPER (i))
      $ac_main_return(2);
  $ac_main_return (0);
}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:18251: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:18254: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:18256: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:18259: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  :
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_header_stdc=no
fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
fi
echo "$as_me:18272: result: $ac_cv_header_stdc" >&5
echo "${ECHO_T}$ac_cv_header_stdc" >&6
if test $ac_cv_header_stdc = yes; then

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

fi

ac_header_dirent=no
for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
  as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
echo "$as_me:18285: checking for $ac_hdr that defines DIR" >&5
echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 18291 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <$ac_hdr>

int
main (void)
{
if ((DIR *) 0)
return 0;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:18306: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:18309: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:18312: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:18315: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_Header=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_Header=no"
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:18325: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
if test `eval echo '${'$as_ac_Header'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
EOF

ac_header_dirent=$ac_hdr; break
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 "$as_me:18338: checking for opendir in -ldir" >&5
echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
if test "${ac_cv_lib_dir_opendir+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-ldir  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 18346 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* 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 (void)
{
opendir ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:18365: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:18368: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:18371: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:18374: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_dir_opendir=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_dir_opendir=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:18385: result: $ac_cv_lib_dir_opendir" >&5
echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
if test $ac_cv_lib_dir_opendir = yes; then
  LIBS="$LIBS -ldir"
fi

else
  echo "$as_me:18392: checking for opendir in -lx" >&5
echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
if test "${ac_cv_lib_x_opendir+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lx  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 18400 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* 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 (void)
{
opendir ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:18419: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:18422: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:18425: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:18428: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_x_opendir=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_x_opendir=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:18439: result: $ac_cv_lib_x_opendir" >&5
echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
if test $ac_cv_lib_x_opendir = yes; then
  LIBS="$LIBS -lx"
fi

fi

echo "$as_me:18447: checking whether time.h and sys/time.h may both be included" >&5
echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
if test "${ac_cv_header_time+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 18453 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/time.h>
#include <time.h>

int
main (void)
{
if ((struct tm *) 0)
return 0;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:18469: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:18472: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:18475: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:18478: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_header_time=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_header_time=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:18488: result: $ac_cv_header_time" >&5
echo "${ECHO_T}$ac_cv_header_time" >&6
if test $ac_cv_header_time = yes; then

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

fi

echo "$as_me:18498: checking for sys/wait.h that is POSIX.1 compatible" >&5
echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6
if test "${ac_cv_header_sys_wait_h+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 18504 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/wait.h>
#ifndef WEXITSTATUS
# define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
#endif
#ifndef WIFEXITED
# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
#endif

int
main (void)
{
  int s;
  wait (&s);
  s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:18526: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:18529: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:18532: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:18535: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_header_sys_wait_h=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_header_sys_wait_h=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:18545: result: $ac_cv_header_sys_wait_h" >&5
echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6
if test $ac_cv_header_sys_wait_h = yes; then

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

fi

for cf_hdr in \
	argz.h \
	arpa/inet.h \
	curses.h \
	errno.h \
	fcntl.h \
	getopt.h \
	ioctl.h \
	inttypes.h \
	langinfo.h \
	libc.h \
	locale.h \
	malloc.h \
	net/socket.h \
	netdb.h \
	netinet/in.h \
	netlib.h \
	nl_types.h \
	nomacros.h \
	paths.h	\
	poll.h \
	prototypes.h \
	pwd.h \
	sgtty.h \
	socket.h \
	stdarg.h \
	stdbool.h \
	stddef.h \
	stdint.h \
	stdlib.h \
	string.h \
	strings.h \
	stropts.h \
	sys/bsdtypes.h \
	sys/errno.h \
	sys/file.h \
	sys/ioctl.h \
	sys/param.h \
	sys/poll.h \
	sys/ptem.h \
	sys/pty.h \
	sys/select.h \
	sys/stat.h \
	sys/stream.h \
	sys/socket.h \
	sys/time.h \
	sys/timeb.h \
	sys/times.h \
	sys/types.h \
	sys/utsname.h \
	term.h \
	termio.h \
	time.h \
	unistd.h \
	varargs.h \
	wchar.h \
	wctype.h \

do
	echo "$as_me:18614: checking for $cf_hdr" >&5
echo $ECHO_N "checking for $cf_hdr... $ECHO_C" >&6
	cat >conftest.$ac_ext <<_ACEOF
#line 18617 "configure"
#include "confdefs.h"

#include <sys/types.h>
#include <$cf_hdr>

_ACEOF
if { (eval echo "$as_me:18624: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  egrep -v '^ *\+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:18630: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  cf_found=yes
else
  echo "$as_me: failed program was:" >&5
  cat conftest.$ac_ext >&5
  cf_found=no
fi
rm -f conftest.err conftest.$ac_ext
echo "$as_me:18648: result: $cf_found" >&5
echo "${ECHO_T}$cf_found" >&6
if test $cf_found = yes ; then

cf_tr_hdr=`echo "$cf_hdr" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`

	cat >>confdefs.h <<EOF
#define HAVE_${cf_tr_hdr} 1
EOF

fi
done

###	Checks that depend on existence-checks for headers

for ac_header in \
termio.h \
termios.h \
unistd.h \
sys/ioctl.h \
sys/termio.h \

do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
echo "$as_me:18672: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 18678 "configure"
#include "confdefs.h"
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:18682: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  egrep -v '^ *\+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:18688: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  eval "$as_ac_Header=yes"
else
  echo "$as_me: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$as_ac_Header=no"
fi
rm -f conftest.err conftest.$ac_ext
fi
echo "$as_me:18707: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
if test `eval echo '${'$as_ac_Header'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
EOF

fi
done

if test "$ac_cv_header_termios_h" = yes ; then
	case "$CFLAGS $CPPFLAGS" in
	(*-D_POSIX_SOURCE*)
		termios_bad=dunno ;;
	(*)	termios_bad=maybe ;;
	esac
	if test "$termios_bad" = maybe ; then
	echo "$as_me:18724: checking whether termios.h needs _POSIX_SOURCE" >&5
echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
	cat >conftest.$ac_ext <<_ACEOF
#line 18727 "configure"
#include "confdefs.h"
#include <termios.h>
int
main (void)
{
struct termios foo; int x = foo.c_iflag
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:18739: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:18742: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:18745: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:18748: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  termios_bad=no
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5

		cat >conftest.$ac_ext <<_ACEOF
#line 18756 "configure"
#include "confdefs.h"

#define _POSIX_SOURCE
#include <termios.h>
int
main (void)
{
struct termios foo; int x = foo.c_iflag
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:18770: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:18773: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:18776: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:18779: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  termios_bad=unknown
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
termios_bad=yes
cat >>confdefs.h <<\EOF
#define _POSIX_SOURCE 1
EOF

fi
rm -f conftest.$ac_objext conftest.$ac_ext

fi
rm -f conftest.$ac_objext conftest.$ac_ext
	echo "$as_me:18795: result: $termios_bad" >&5
echo "${ECHO_T}$termios_bad" >&6
	fi
fi

echo "$as_me:18800: checking declaration of size-change" >&5
echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
if test "${cf_cv_sizechange+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

	cf_cv_sizechange=unknown
	cf_save_CPPFLAGS="$CPPFLAGS"

for cf_opts in "" "NEED_PTEM_H"
do

	CPPFLAGS="$cf_save_CPPFLAGS"
	if test -n "$cf_opts"
	then

	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
	CPPFLAGS="${CPPFLAGS}-D$cf_opts"

	fi
	cat >conftest.$ac_ext <<_ACEOF
#line 18821 "configure"
#include "confdefs.h"
#include <sys/types.h>
#ifdef HAVE_TERMIOS_H
#include <termios.h>
#else
#ifdef HAVE_TERMIO_H
#include <termio.h>
#endif
#endif

#ifdef NEED_PTEM_H
/* This is a workaround for SCO:  they neglected to define struct winsize in
 * termios.h -- it's only in termio.h and ptem.h
 */
#include <sys/stream.h>
#include <sys/ptem.h>
#endif

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

int
main (void)
{

#ifdef TIOCGSIZE
	struct ttysize win;	/* SunOS 3.0... */
	int y = win.ts_lines;
	int x = win.ts_cols;
#else
#ifdef TIOCGWINSZ
	struct winsize win;	/* everything else */
	int y = win.ws_row;
	int x = win.ws_col;
#else
	no TIOCGSIZE or TIOCGWINSZ
#endif /* TIOCGWINSZ */
#endif /* TIOCGSIZE */

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:18867: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:18870: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:18873: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:18876: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  cf_cv_sizechange=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
cf_cv_sizechange=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext

	CPPFLAGS="$cf_save_CPPFLAGS"
	if test "$cf_cv_sizechange" = yes ; then
		echo "size-change succeeded ($cf_opts)" >&5
		test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
		break
	fi
done

fi
echo "$as_me:18895: result: $cf_cv_sizechange" >&5
echo "${ECHO_T}$cf_cv_sizechange" >&6
if test "$cf_cv_sizechange" != no ; then

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

	case $cf_cv_sizechange in
	(NEED*)
		cat >>confdefs.h <<EOF
#define $cf_cv_sizechange  1
EOF

		;;
	esac
fi

echo "$as_me:18913: checking if sys/time.h conflicts with sys/select.h" >&5
echo $ECHO_N "checking if sys/time.h conflicts with sys/select.h... $ECHO_C" >&6
if test "${cf_cv_sys_select_timeval+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

for cf_opts in no yes
do
cat >conftest.$ac_ext <<_ACEOF
#line 18922 "configure"
#include "confdefs.h"

#define yes 1
#define no 0
#if $cf_opts
#define timeval fake_timeval
#endif
#include <sys/types.h>
#ifdef TIME_WITH_SYS_TIME
#	include <sys/time.h>
#	include <time.h>
#else
#	ifdef HAVE_SYS_TIME_H
#		include <sys/time.h>
#	else
#		include <time.h>
#	endif
#endif
#undef timeval
#ifdef HAVE_SYS_SELECT_H
#	include <sys/select.h>
#endif

int
main (void)
{
struct timeval foo
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:18955: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:18958: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:18961: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:18964: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  cf_cv_sys_select_timeval=$cf_opts
	 break
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
cf_cv_sys_select_timeval=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
done

fi

echo "$as_me:18978: result: $cf_cv_sys_select_timeval" >&5
echo "${ECHO_T}$cf_cv_sys_select_timeval" >&6
test $cf_cv_sys_select_timeval = yes && cat >>confdefs.h <<\EOF
#define NEED_TIMEVAL_FIX 1
EOF

echo "$as_me:18984: checking for va_copy" >&5
echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
if test "${cf_cv_have_va_copy+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

cat >conftest.$ac_ext <<_ACEOF
#line 18991 "configure"
#include "confdefs.h"

#include <stdarg.h>

int
main (void)
{

	static va_list dst;
	static va_list src;
	va_copy(dst, src)
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:19008: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:19011: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:19014: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:19017: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  cf_cv_have_va_copy=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
cf_cv_have_va_copy=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:19027: result: $cf_cv_have_va_copy" >&5
echo "${ECHO_T}$cf_cv_have_va_copy" >&6

if test "$cf_cv_have_va_copy" = yes;
then

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

else # !cf_cv_have_va_copy

echo "$as_me:19039: checking for __va_copy" >&5
echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
if test "${cf_cv_have___va_copy+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

cat >conftest.$ac_ext <<_ACEOF
#line 19046 "configure"
#include "confdefs.h"

#include <stdarg.h>

int
main (void)
{

	static va_list dst;
	static va_list src;
	__va_copy(dst, src)
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:19063: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:19066: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:19069: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:19072: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  cf_cv_have___va_copy=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
cf_cv_have___va_copy=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:19082: result: $cf_cv_have___va_copy" >&5
echo "${ECHO_T}$cf_cv_have___va_copy" >&6

if test "$cf_cv_have___va_copy" = yes
then

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

else # !cf_cv_have___va_copy

echo "$as_me:19094: checking for __builtin_va_copy" >&5
echo $ECHO_N "checking for __builtin_va_copy... $ECHO_C" >&6
if test "${cf_cv_have___builtin_va_copy+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

cat >conftest.$ac_ext <<_ACEOF
#line 19101 "configure"
#include "confdefs.h"

#include <stdarg.h>

int
main (void)
{

	static va_list dst;
	static va_list src;
	__builtin_va_copy(dst, src)
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:19118: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:19121: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:19124: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:19127: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  cf_cv_have___builtin_va_copy=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
cf_cv_have___builtin_va_copy=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:19137: result: $cf_cv_have___builtin_va_copy" >&5
echo "${ECHO_T}$cf_cv_have___builtin_va_copy" >&6

test "$cf_cv_have___builtin_va_copy" = yes &&

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

fi # cf_cv_have___va_copy

fi # cf_cv_have_va_copy

case "${cf_cv_have_va_copy}${cf_cv_have___va_copy}${cf_cv_have___builtin_va_copy}" in
(*yes*)
	;;

(*)
	echo "$as_me:19155: checking if we can simply copy va_list" >&5
echo $ECHO_N "checking if we can simply copy va_list... $ECHO_C" >&6
if test "${cf_cv_pointer_va_list+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

cat >conftest.$ac_ext <<_ACEOF
#line 19162 "configure"
#include "confdefs.h"

#include <stdarg.h>

int
main (void)
{

	va_list dst;
	va_list src;
	dst = src
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:19179: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:19182: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:19185: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:19188: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  cf_cv_pointer_va_list=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
cf_cv_pointer_va_list=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:19198: result: $cf_cv_pointer_va_list" >&5
echo "${ECHO_T}$cf_cv_pointer_va_list" >&6

	if test "$cf_cv_pointer_va_list" = no
	then
		echo "$as_me:19203: checking if we can copy va_list indirectly" >&5
echo $ECHO_N "checking if we can copy va_list indirectly... $ECHO_C" >&6
if test "${cf_cv_array_va_list+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

cat >conftest.$ac_ext <<_ACEOF
#line 19210 "configure"
#include "confdefs.h"

#include <stdarg.h>

int
main (void)
{

	va_list dst;
	va_list src;
	*dst = *src
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:19227: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:19230: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:19233: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:19236: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  cf_cv_array_va_list=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
cf_cv_array_va_list=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:19246: result: $cf_cv_array_va_list" >&5
echo "${ECHO_T}$cf_cv_array_va_list" >&6
		test "$cf_cv_array_va_list" = yes &&
cat >>confdefs.h <<\EOF
#define ARRAY_VA_LIST 1
EOF

	fi
	;;
esac

###	Checks for Datatypes.
# On IRIX 5.3, sys/types and inttypes.h are conflicting.

for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
                  inttypes.h stdint.h unistd.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
echo "$as_me:19264: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 19270 "configure"
#include "confdefs.h"
$ac_includes_default
#include <$ac_header>
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:19276: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:19279: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:19282: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:19285: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_Header=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_Header=no"
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:19295: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
if test `eval echo '${'$as_ac_Header'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
EOF

fi
done

echo "$as_me:19305: checking for gid_t" >&5
echo $ECHO_N "checking for gid_t... $ECHO_C" >&6
if test "${ac_cv_type_gid_t+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 19311 "configure"
#include "confdefs.h"
$ac_includes_default
int
main (void)
{
if ((gid_t *) 0)
  return 0;
if (sizeof (gid_t))
  return 0;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:19326: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:19329: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:19332: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:19335: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_type_gid_t=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_type_gid_t=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:19345: result: $ac_cv_type_gid_t" >&5
echo "${ECHO_T}$ac_cv_type_gid_t" >&6
if test $ac_cv_type_gid_t = yes; then
  :
else

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

fi

echo "$as_me:19357: checking for mode_t" >&5
echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
if test "${ac_cv_type_mode_t+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 19363 "configure"
#include "confdefs.h"
$ac_includes_default
int
main (void)
{
if ((mode_t *) 0)
  return 0;
if (sizeof (mode_t))
  return 0;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:19378: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:19381: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:19384: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:19387: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_type_mode_t=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_type_mode_t=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:19397: result: $ac_cv_type_mode_t" >&5
echo "${ECHO_T}$ac_cv_type_mode_t" >&6
if test $ac_cv_type_mode_t = yes; then
  :
else

cat >>confdefs.h <<EOF
#define mode_t int
EOF

fi

echo "$as_me:19409: checking for off_t" >&5
echo $ECHO_N "checking for off_t... $ECHO_C" >&6
if test "${ac_cv_type_off_t+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 19415 "configure"
#include "confdefs.h"
$ac_includes_default
int
main (void)
{
if ((off_t *) 0)
  return 0;
if (sizeof (off_t))
  return 0;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:19430: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:19433: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:19436: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:19439: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_type_off_t=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_type_off_t=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:19449: result: $ac_cv_type_off_t" >&5
echo "${ECHO_T}$ac_cv_type_off_t" >&6
if test $ac_cv_type_off_t = yes; then
  :
else

cat >>confdefs.h <<EOF
#define off_t long
EOF

fi

echo "$as_me:19461: checking for pid_t" >&5
echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
if test "${ac_cv_type_pid_t+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 19467 "configure"
#include "confdefs.h"
$ac_includes_default
int
main (void)
{
if ((pid_t *) 0)
  return 0;
if (sizeof (pid_t))
  return 0;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:19482: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:19485: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:19488: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:19491: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_type_pid_t=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_type_pid_t=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:19501: result: $ac_cv_type_pid_t" >&5
echo "${ECHO_T}$ac_cv_type_pid_t" >&6
if test $ac_cv_type_pid_t = yes; then
  :
else

cat >>confdefs.h <<EOF
#define pid_t int
EOF

fi

echo "$as_me:19513: checking for size_t" >&5
echo $ECHO_N "checking for size_t... $ECHO_C" >&6
if test "${ac_cv_type_size_t+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 19519 "configure"
#include "confdefs.h"
$ac_includes_default
int
main (void)
{
if ((size_t *) 0)
  return 0;
if (sizeof (size_t))
  return 0;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:19534: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:19537: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:19540: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:19543: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_type_size_t=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_type_size_t=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:19553: result: $ac_cv_type_size_t" >&5
echo "${ECHO_T}$ac_cv_type_size_t" >&6
if test $ac_cv_type_size_t = yes; then
  :
else

cat >>confdefs.h <<EOF
#define size_t unsigned
EOF

fi

echo "$as_me:19565: checking for ssize_t" >&5
echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
if test "${ac_cv_type_ssize_t+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 19571 "configure"
#include "confdefs.h"
$ac_includes_default
int
main (void)
{
if ((ssize_t *) 0)
  return 0;
if (sizeof (ssize_t))
  return 0;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:19586: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:19589: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:19592: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:19595: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_type_ssize_t=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_type_ssize_t=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:19605: result: $ac_cv_type_ssize_t" >&5
echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
if test $ac_cv_type_ssize_t = yes; then
  :
else

cat >>confdefs.h <<EOF
#define ssize_t int
EOF

fi

echo "$as_me:19617: checking for time_t" >&5
echo $ECHO_N "checking for time_t... $ECHO_C" >&6
if test "${ac_cv_type_time_t+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 19623 "configure"
#include "confdefs.h"
$ac_includes_default
int
main (void)
{
if ((time_t *) 0)
  return 0;
if (sizeof (time_t))
  return 0;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:19638: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:19641: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:19644: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:19647: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_type_time_t=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_type_time_t=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:19657: result: $ac_cv_type_time_t" >&5
echo "${ECHO_T}$ac_cv_type_time_t" >&6
if test $ac_cv_type_time_t = yes; then
  :
else

cat >>confdefs.h <<EOF
#define time_t long
EOF

fi

cat >conftest.$ac_ext <<_ACEOF
#line 19670 "configure"
#include "confdefs.h"
#include <netinet/in.h>

_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "in_addr_t" >/dev/null 2>&1; then
  :
else

	cat >conftest.$ac_ext <<_ACEOF
#line 19681 "configure"
#include "confdefs.h"
#include <sys/endian.h>

_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "in_addr_t" >/dev/null 2>&1; then
  :
else

		echo "$as_me:19691: checking for in_addr_t" >&5
echo $ECHO_N "checking for in_addr_t... $ECHO_C" >&6
if test "${ac_cv_type_in_addr_t+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 19697 "configure"
#include "confdefs.h"
$ac_includes_default
int
main (void)
{
if ((in_addr_t *) 0)
  return 0;
if (sizeof (in_addr_t))
  return 0;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:19712: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:19715: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:19718: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:19721: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_type_in_addr_t=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_type_in_addr_t=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:19731: result: $ac_cv_type_in_addr_t" >&5
echo "${ECHO_T}$ac_cv_type_in_addr_t" >&6
if test $ac_cv_type_in_addr_t = yes; then
  :
else

cat >>confdefs.h <<EOF
#define in_addr_t unsigned long
EOF

fi

fi
rm -rf conftest*

fi
rm -rf conftest*

echo "$as_me:19749: checking for uid_t in sys/types.h" >&5
echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
if test "${ac_cv_type_uid_t+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 19755 "configure"
#include "confdefs.h"
#include <sys/types.h>

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

fi
echo "$as_me:19769: result: $ac_cv_type_uid_t" >&5
echo "${ECHO_T}$ac_cv_type_uid_t" >&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 "$as_me:19783: checking for quad_t" >&5
echo $ECHO_N "checking for quad_t... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
#line 19786 "configure"
#include "confdefs.h"

#include <sys/types.h>
#if 0
#include <stdlib.h>
#include <stddef.h>
#endif /* 0 */

int
main (void)
{
quad_t x; x = 0
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:19804: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:19807: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:19810: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:19813: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_quad_t=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_quad_t=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
echo "$as_me:19822: result: $ac_cv_quad_t" >&5
echo "${ECHO_T}$ac_cv_quad_t" >&6
if test $ac_cv_quad_t = yes; then
	cat >>confdefs.h <<\EOF
#define HAVE_QUAD_T 1
EOF

fi

echo "$as_me:19831: checking for long long" >&5
echo $ECHO_N "checking for long long... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
#line 19834 "configure"
#include "confdefs.h"

#include <sys/types.h>

int
main (void)
{
long long x; x = 0
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:19848: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:19851: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:19854: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:19857: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_long_long=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_long_long=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
echo "$as_me:19866: result: $ac_cv_long_long" >&5
echo "${ECHO_T}$ac_cv_long_long" >&6
if test $ac_cv_long_long = yes; then
	cat >>confdefs.h <<\EOF
#define HAVE_LONG_LONG 1
EOF

fi

echo "$as_me:19875: checking for int_least64_t" >&5
echo $ECHO_N "checking for int_least64_t... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
#line 19878 "configure"
#include "confdefs.h"

#ifdef HAVE_STDINT_H
#include <stdint.h>
#endif
#ifdef HAVE_HAVE_INTTYPES_H
#include <inttypes.h>
#endif

int
main (void)
{
int_least64_t x; x = 0
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:19897: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:19900: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:19903: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:19906: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_int_least64_t=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_int_least64_t=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
echo "$as_me:19915: result: $ac_cv_int_least64_t" >&5
echo "${ECHO_T}$ac_cv_int_least64_t" >&6
if test $ac_cv_int_least64_t = yes; then
	cat >>confdefs.h <<\EOF
#define HAVE_INT_LEAST64_T 1
EOF

	echo "$as_me:19922: checking for INT64_C" >&5
echo $ECHO_N "checking for INT64_C... $ECHO_C" >&6
	cat >conftest.$ac_ext <<_ACEOF
#line 19925 "configure"
#include "confdefs.h"

#ifdef HAVE_STDINT_H
#include <stdint.h>
#endif
#ifdef HAVE_HAVE_INTTYPES_H
#include <inttypes.h>
#endif

int
main (void)
{
int_least64_t x; x = INT64_C(0)
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:19944: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:19947: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:19950: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:19953: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_int64_c=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_int64_c=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
	echo "$as_me:19962: result: $ac_cv_int64_c" >&5
echo "${ECHO_T}$ac_cv_int64_c" >&6
	if test $ac_cv_int64_c = yes; then
		cat >>confdefs.h <<\EOF
#define HAVE_INT64_C 1
EOF

	fi
fi

echo "$as_me:19972: checking for nl_item" >&5
echo $ECHO_N "checking for nl_item... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
#line 19975 "configure"
#include "confdefs.h"

#ifdef HAVE_LANGINFO_H
#include <langinfo.h>
#else
#ifdef HAVE_NL_TYPES_H
#include <nl_types.h>
#endif
#endif

int
main (void)
{
nl_item x; x = 0
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:19995: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:19998: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:20001: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:20004: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_nl_item=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_nl_item=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
echo "$as_me:20013: result: $ac_cv_nl_item" >&5
echo "${ECHO_T}$ac_cv_nl_item" >&6
if test $ac_cv_nl_item = yes; then
        cat >>confdefs.h <<\EOF
#define HAVE_NL_ITEM 1
EOF

fi

###	Checks for libraries.
# libuu/uudeview
# only define HAVE_LIBUU and HAVE_UUDEVIEW_H if both are found
echo "$as_me:20025: checking for UUInitialize in -luu" >&5
echo $ECHO_N "checking for UUInitialize in -luu... $ECHO_C" >&6
if test "${ac_cv_lib_uu_UUInitialize+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-luu  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 20033 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char UUInitialize ();
int
main (void)
{
UUInitialize ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:20052: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:20055: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:20058: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:20061: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_uu_UUInitialize=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_uu_UUInitialize=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:20072: result: $ac_cv_lib_uu_UUInitialize" >&5
echo "${ECHO_T}$ac_cv_lib_uu_UUInitialize" >&6
if test $ac_cv_lib_uu_UUInitialize = yes; then
  echo "$as_me:20075: checking for uudeview.h" >&5
echo $ECHO_N "checking for uudeview.h... $ECHO_C" >&6
if test "${ac_cv_header_uudeview_h+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 20081 "configure"
#include "confdefs.h"
#include <uudeview.h>
_ACEOF
if { (eval echo "$as_me:20085: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  egrep -v '^ *\+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:20091: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  ac_cv_header_uudeview_h=yes
else
  echo "$as_me: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_header_uudeview_h=no
fi
rm -f conftest.err conftest.$ac_ext
fi
echo "$as_me:20110: result: $ac_cv_header_uudeview_h" >&5
echo "${ECHO_T}$ac_cv_header_uudeview_h" >&6
if test $ac_cv_header_uudeview_h = yes; then
  cat >>confdefs.h <<\EOF
#define HAVE_LIBUU 1
EOF

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

		LIBS="$LIBS -luu"

fi

fi

# ICU - International Components for Unicode
# TODO: do separate checks for
#  - unorm_normalize() # deprecated since ICU 56
#  - uidna_IDNToUnicode() # deprecated since ICU 56
#  - ubidi_open()
# and for IDNA2008
#  - uidna_openUTS46()
#  - uidna_nameToUnicode()
#  - unorm2_normalize()
cf_try_icuuc="no"
cf_try_icuuc46="no"
echo "$as_me:20138: checking for unicode/unorm.h" >&5
echo $ECHO_N "checking for unicode/unorm.h... $ECHO_C" >&6
if test "${ac_cv_header_unicode_unorm_h+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 20144 "configure"
#include "confdefs.h"
#include <unicode/unorm.h>
_ACEOF
if { (eval echo "$as_me:20148: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  egrep -v '^ *\+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:20154: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  ac_cv_header_unicode_unorm_h=yes
else
  echo "$as_me: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_header_unicode_unorm_h=no
fi
rm -f conftest.err conftest.$ac_ext
fi
echo "$as_me:20173: result: $ac_cv_header_unicode_unorm_h" >&5
echo "${ECHO_T}$ac_cv_header_unicode_unorm_h" >&6
if test $ac_cv_header_unicode_unorm_h = yes; then

	echo "$as_me:20177: checking for unicode/ustring.h" >&5
echo $ECHO_N "checking for unicode/ustring.h... $ECHO_C" >&6
if test "${ac_cv_header_unicode_ustring_h+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 20183 "configure"
#include "confdefs.h"
#include <unicode/ustring.h>
_ACEOF
if { (eval echo "$as_me:20187: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  egrep -v '^ *\+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:20193: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  ac_cv_header_unicode_ustring_h=yes
else
  echo "$as_me: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_header_unicode_ustring_h=no
fi
rm -f conftest.err conftest.$ac_ext
fi
echo "$as_me:20212: result: $ac_cv_header_unicode_ustring_h" >&5
echo "${ECHO_T}$ac_cv_header_unicode_ustring_h" >&6
if test $ac_cv_header_unicode_ustring_h = yes; then

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

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

		echo "$as_me:20224: checking for unorm_normalize in libicuuc" >&5
echo $ECHO_N "checking for unorm_normalize in libicuuc... $ECHO_C" >&6
		cf_save_LIBS="$LIBS"
		cf_try_icuuc="no"
		LIBS="$LIBS -licuuc"
		cat >conftest.$ac_ext <<_ACEOF
#line 20230 "configure"
#include "confdefs.h"
#include <unicode/unorm.h>
int
main (void)
{

			int32_t needed, ustr = NULL;
 			UErrorCode status;
			needed = unorm_normalize(ustr, -1, UNORM_DEFAULT, 0, NULL, 0, &status);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:20245: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:20248: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:20251: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:20254: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then

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

			cf_try_icuuc="yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
LIBS=$cf_save_LIBS

fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
		echo "$as_me:20269: result: $cf_try_icuuc" >&5
echo "${ECHO_T}$cf_try_icuuc" >&6
		cf_save_LIBS="$LIBS"
		echo "$as_me:20272: checking for unicode/uidna.h" >&5
echo $ECHO_N "checking for unicode/uidna.h... $ECHO_C" >&6
if test "${ac_cv_header_unicode_uidna_h+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 20278 "configure"
#include "confdefs.h"
#include <unicode/uidna.h>
_ACEOF
if { (eval echo "$as_me:20282: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  egrep -v '^ *\+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:20288: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  ac_cv_header_unicode_uidna_h=yes
else
  echo "$as_me: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_header_unicode_uidna_h=no
fi
rm -f conftest.err conftest.$ac_ext
fi
echo "$as_me:20307: result: $ac_cv_header_unicode_uidna_h" >&5
echo "${ECHO_T}$ac_cv_header_unicode_uidna_h" >&6
if test $ac_cv_header_unicode_uidna_h = yes; then

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

fi

		echo "$as_me:20317: checking for uidna_nameToUnicode in libicuuc" >&5
echo $ECHO_N "checking for uidna_nameToUnicode in libicuuc... $ECHO_C" >&6
		cat >conftest.$ac_ext <<_ACEOF
#line 20320 "configure"
#include "confdefs.h"
#include <unicode/uidna.h>
			#include <unicode/unorm.h>
int
main (void)
{

			UErrorCode status = U_ZERO_ERROR;
			UIDNAInfo info = UIDNA_INFO_INITIALIZER;
			UIDNA *uts46;
			uidna_openUTS46(UNORM_DEFAULT, &status);
			uidna_nameToUnicode(uts46, NULL, 0, NULL, 0, &info, &status);
			uidna_close(uts46);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:20339: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:20342: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:20345: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:20348: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then

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

			cf_try_icuuc46="yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
LIBS=$cf_save_LIBS

fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
		echo "$as_me:20363: result: $cf_try_icuuc46" >&5
echo "${ECHO_T}$cf_try_icuuc46" >&6
		echo "$as_me:20365: checking for unicode/ubidi.h" >&5
echo $ECHO_N "checking for unicode/ubidi.h... $ECHO_C" >&6
if test "${ac_cv_header_unicode_ubidi_h+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 20371 "configure"
#include "confdefs.h"
#include <unicode/ubidi.h>
_ACEOF
if { (eval echo "$as_me:20375: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  egrep -v '^ *\+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:20381: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  ac_cv_header_unicode_ubidi_h=yes
else
  echo "$as_me: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_header_unicode_ubidi_h=no
fi
rm -f conftest.err conftest.$ac_ext
fi
echo "$as_me:20400: result: $ac_cv_header_unicode_ubidi_h" >&5
echo "${ECHO_T}$ac_cv_header_unicode_ubidi_h" >&6
if test $ac_cv_header_unicode_ubidi_h = yes; then

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

fi

fi

fi

# IDNA2008
echo "$as_me:20415: checking for unicode/unorm2.h" >&5
echo $ECHO_N "checking for unicode/unorm2.h... $ECHO_C" >&6
if test "${ac_cv_header_unicode_unorm2_h+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 20421 "configure"
#include "confdefs.h"
#include <unicode/unorm2.h>
_ACEOF
if { (eval echo "$as_me:20425: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  egrep -v '^ *\+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:20431: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  ac_cv_header_unicode_unorm2_h=yes
else
  echo "$as_me: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_header_unicode_unorm2_h=no
fi
rm -f conftest.err conftest.$ac_ext
fi
echo "$as_me:20450: result: $ac_cv_header_unicode_unorm2_h" >&5
echo "${ECHO_T}$ac_cv_header_unicode_unorm2_h" >&6
if test $ac_cv_header_unicode_unorm2_h = yes; then

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

fi

# without icuuc try GNU libunistring for normalization
if test $cf_try_icuuc = no ; then
	echo "$as_me:20462: checking for unitypes.h" >&5
echo $ECHO_N "checking for unitypes.h... $ECHO_C" >&6
if test "${ac_cv_header_unitypes_h+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 20468 "configure"
#include "confdefs.h"
#include <unitypes.h>
_ACEOF
if { (eval echo "$as_me:20472: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  egrep -v '^ *\+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:20478: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  ac_cv_header_unitypes_h=yes
else
  echo "$as_me: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_header_unitypes_h=no
fi
rm -f conftest.err conftest.$ac_ext
fi
echo "$as_me:20497: result: $ac_cv_header_unitypes_h" >&5
echo "${ECHO_T}$ac_cv_header_unitypes_h" >&6
if test $ac_cv_header_unitypes_h = yes; then

		echo "$as_me:20501: checking for uninorm.h" >&5
echo $ECHO_N "checking for uninorm.h... $ECHO_C" >&6
if test "${ac_cv_header_uninorm_h+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 20507 "configure"
#include "confdefs.h"
#include <uninorm.h>
_ACEOF
if { (eval echo "$as_me:20511: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  egrep -v '^ *\+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:20517: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  ac_cv_header_uninorm_h=yes
else
  echo "$as_me: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_header_uninorm_h=no
fi
rm -f conftest.err conftest.$ac_ext
fi
echo "$as_me:20536: result: $ac_cv_header_uninorm_h" >&5
echo "${ECHO_T}$ac_cv_header_uninorm_h" >&6
if test $ac_cv_header_uninorm_h = yes; then

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

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

			echo "$as_me:20548: checking for u8_normalize in libunistring" >&5
echo $ECHO_N "checking for u8_normalize in libunistring... $ECHO_C" >&6
			cf_save_LIBS="$LIBS"
			cf_try_unistring="no"
			LIBS="$LIBS -lunistring"
			cat >conftest.$ac_ext <<_ACEOF
#line 20554 "configure"
#include "confdefs.h"
#include <unitypes.h>
				#include <uninorm.h>
int
main (void)
{

				size_t ol = 0;
				u8_normalize(UNINORM_NFC, (uint8_t *) "x", 2, NULL, &ol);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:20569: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:20572: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:20575: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:20578: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then

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

				cf_try_unistring="yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
LIBS=$cf_save_LIBS

fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
			echo "$as_me:20593: result: $cf_try_unistring" >&5
echo "${ECHO_T}$cf_try_unistring" >&6

fi

fi

fi

# without icuuc try libidn for Internationalized Domain Names / IDN 2003
# TODO: check for libidn2
if test $cf_try_icuuc = no ; then
	echo "$as_me:20605: checking for stringprep_check_version in -lidn" >&5
echo $ECHO_N "checking for stringprep_check_version in -lidn... $ECHO_C" >&6
if test "${ac_cv_lib_idn_stringprep_check_version+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lidn  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 20613 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char stringprep_check_version ();
int
main (void)
{
stringprep_check_version ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:20632: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:20635: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:20638: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:20641: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_idn_stringprep_check_version=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_idn_stringprep_check_version=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:20652: result: $ac_cv_lib_idn_stringprep_check_version" >&5
echo "${ECHO_T}$ac_cv_lib_idn_stringprep_check_version" >&6
if test $ac_cv_lib_idn_stringprep_check_version = yes; then
  echo "$as_me:20655: checking for stringprep.h" >&5
echo $ECHO_N "checking for stringprep.h... $ECHO_C" >&6
if test "${ac_cv_header_stringprep_h+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 20661 "configure"
#include "confdefs.h"
#include <stringprep.h>
_ACEOF
if { (eval echo "$as_me:20665: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  egrep -v '^ *\+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:20671: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  ac_cv_header_stringprep_h=yes
else
  echo "$as_me: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_header_stringprep_h=no
fi
rm -f conftest.err conftest.$ac_ext
fi
echo "$as_me:20690: result: $ac_cv_header_stringprep_h" >&5
echo "${ECHO_T}$ac_cv_header_stringprep_h" >&6
if test $ac_cv_header_stringprep_h = yes; then

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

			echo "$as_me:20698: checking for idna.h" >&5
echo $ECHO_N "checking for idna.h... $ECHO_C" >&6
if test "${ac_cv_header_idna_h+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 20704 "configure"
#include "confdefs.h"
#include <idna.h>
_ACEOF
if { (eval echo "$as_me:20708: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  egrep -v '^ *\+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:20714: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  ac_cv_header_idna_h=yes
else
  echo "$as_me: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_header_idna_h=no
fi
rm -f conftest.err conftest.$ac_ext
fi
echo "$as_me:20733: result: $ac_cv_header_idna_h" >&5
echo "${ECHO_T}$ac_cv_header_idna_h" >&6
if test $ac_cv_header_idna_h = yes; then

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

				echo "$as_me:20741: checking for idna_to_unicode_lzlz in -lidn" >&5
echo $ECHO_N "checking for idna_to_unicode_lzlz in -lidn... $ECHO_C" >&6
if test "${ac_cv_lib_idn_idna_to_unicode_lzlz+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lidn  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 20749 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char idna_to_unicode_lzlz ();
int
main (void)
{
idna_to_unicode_lzlz ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:20768: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:20771: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:20774: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:20777: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_idn_idna_to_unicode_lzlz=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_idn_idna_to_unicode_lzlz=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:20788: result: $ac_cv_lib_idn_idna_to_unicode_lzlz" >&5
echo "${ECHO_T}$ac_cv_lib_idn_idna_to_unicode_lzlz" >&6
if test $ac_cv_lib_idn_idna_to_unicode_lzlz = yes; then

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

					echo "$as_me:20796: checking for IDNA_USE_STD3_ASCII_RULES" >&5
echo $ECHO_N "checking for IDNA_USE_STD3_ASCII_RULES... $ECHO_C" >&6
					cat >conftest.$ac_ext <<_ACEOF
#line 20799 "configure"
#include "confdefs.h"
#include <idna.h>

_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "IDNA_USE_STD3_ASCII_RULES" >/dev/null 2>&1; then

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

						echo "$as_me:20811: result: yes" >&5
echo "${ECHO_T}yes" >&6
else
  echo "$as_me:20814: result: no" >&5
echo "${ECHO_T}no" >&6

fi
rm -rf conftest*

fi

				echo "$as_me:20822: checking for idna_strerror in -lidn" >&5
echo $ECHO_N "checking for idna_strerror in -lidn... $ECHO_C" >&6
if test "${ac_cv_lib_idn_idna_strerror+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lidn  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 20830 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char idna_strerror ();
int
main (void)
{
idna_strerror ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:20849: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:20852: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:20855: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:20858: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_idn_idna_strerror=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_idn_idna_strerror=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:20869: result: $ac_cv_lib_idn_idna_strerror" >&5
echo "${ECHO_T}$ac_cv_lib_idn_idna_strerror" >&6
if test $ac_cv_lib_idn_idna_strerror = yes; then

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

fi

fi

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

			LIBS="$LIBS -lidn"

fi

fi

fi

# libidnkit - Internationalized Domain Names / IDN 2008
echo "$as_me:20894: checking for idn_decodename in -lidnkit" >&5
echo $ECHO_N "checking for idn_decodename in -lidnkit... $ECHO_C" >&6
if test "${ac_cv_lib_idnkit_idn_decodename+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lidnkit  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 20902 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char idn_decodename ();
int
main (void)
{
idn_decodename ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:20921: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:20924: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:20927: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:20930: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_idnkit_idn_decodename=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_idnkit_idn_decodename=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:20941: result: $ac_cv_lib_idnkit_idn_decodename" >&5
echo "${ECHO_T}$ac_cv_lib_idnkit_idn_decodename" >&6
if test $ac_cv_lib_idnkit_idn_decodename = yes; then

	echo "$as_me:20945: checking for idn/api.h" >&5
echo $ECHO_N "checking for idn/api.h... $ECHO_C" >&6
if test "${ac_cv_header_idn_api_h+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 20951 "configure"
#include "confdefs.h"
#include <idn/api.h>
_ACEOF
if { (eval echo "$as_me:20955: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  egrep -v '^ *\+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:20961: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  ac_cv_header_idn_api_h=yes
else
  echo "$as_me: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_header_idn_api_h=no
fi
rm -f conftest.err conftest.$ac_ext
fi
echo "$as_me:20980: result: $ac_cv_header_idn_api_h" >&5
echo "${ECHO_T}$ac_cv_header_idn_api_h" >&6
if test $ac_cv_header_idn_api_h = yes; then

		echo "$as_me:20984: checking for IDN_DECODE_LOOKUP" >&5
echo $ECHO_N "checking for IDN_DECODE_LOOKUP... $ECHO_C" >&6
		cf_save_LIBS="$LIBS"
		LIBS="$LIBS -lidnkit"
		cat >conftest.$ac_ext <<_ACEOF
#line 20989 "configure"
#include "confdefs.h"
#include <idn/api.h>
			#include <string.h>
int
main (void)
{

			idn_result_t rs;
			char in[255], out[255];
			strcpy(in, "xn--brenfe-fta9a2q.de");
			rs = idn_decodename(IDN_DECODE_LOOKUP, &in, &out, 254);
			idn_result_tostring(rs);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:21007: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:21010: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:21013: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:21016: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then

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

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

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

			echo "$as_me:21031: result: yes" >&5
echo "${ECHO_T}yes" >&6
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5

			LIBS=$cf_save_LIBS
			echo "$as_me:21038: result: no" >&5
echo "${ECHO_T}no" >&6

fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext

fi

fi

if test $use_curses != no ; then
	cf_cv_termlib=$cf_with_screen
else

if test "${cf_cv_termlib+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

cf_cv_termlib=none
cat >conftest.$ac_ext <<_ACEOF
#line 21058 "configure"
#include "confdefs.h"

int
main (void)
{
char *x=(char*)tgoto("",0,0)
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:21070: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:21073: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:21076: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:21079: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  cat >conftest.$ac_ext <<_ACEOF
#line 21082 "configure"
#include "confdefs.h"

int
main (void)
{
int x=tigetstr("")
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:21094: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:21097: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:21100: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:21103: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  cf_cv_termlib=terminfo
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
cf_cv_termlib=termcap
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
	test -n "$verbose" && echo "	using functions in predefined $cf_cv_termlib LIBS" 1>&6

echo "${as_me:-configure}:21114: testing using functions in predefined $cf_cv_termlib LIBS ..." 1>&5

else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5

if test "$cf_cv_termlib" = none; then
	# FreeBSD's linker gives bogus results for AC_CHECK_LIB, saying that
	# tgetstr lives in -lcurses when it is only an unsatisfied extern.
	cf_save_LIBS="$LIBS"
	for cf_lib in tinfo curses ncurses termlib termcap
	do
		LIBS="-l$cf_lib $cf_save_LIBS"
		for cf_func in tigetstr tgetstr
		do
			echo "$as_me:21129: checking for $cf_func in -l$cf_lib" >&5
echo $ECHO_N "checking for $cf_func in -l$cf_lib... $ECHO_C" >&6
			cat >conftest.$ac_ext <<_ACEOF
#line 21132 "configure"
#include "confdefs.h"

int
main (void)
{
int x=$cf_func("")
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:21144: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:21147: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:21150: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:21153: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  cf_result=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
cf_result=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
			echo "$as_me:21162: result: $cf_result" >&5
echo "${ECHO_T}$cf_result" >&6
			if test "$cf_result" = yes ; then
				if test "$cf_func" = tigetstr ; then
					cf_cv_termlib=terminfo
				else
					cf_cv_termlib=termcap
				fi
				break
			fi
		done
		test "$cf_result" = yes && break
	done
	test "$cf_result" = no && LIBS="$cf_save_LIBS"
fi
if test "$cf_cv_termlib" = none; then
	# allow curses library for broken AIX system.
	echo "$as_me:21179: checking for initscr in -lcurses" >&5
echo $ECHO_N "checking for initscr in -lcurses... $ECHO_C" >&6
if test "${ac_cv_lib_curses_initscr+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lcurses  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 21187 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char initscr ();
int
main (void)
{
initscr ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:21206: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:21209: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:21212: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:21215: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_curses_initscr=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_curses_initscr=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:21226: result: $ac_cv_lib_curses_initscr" >&5
echo "${ECHO_T}$ac_cv_lib_curses_initscr" >&6
if test $ac_cv_lib_curses_initscr = yes; then

cf_add_libs="-lcurses"
# Filter out duplicates - this happens with badly-designed ".pc" files...
for cf_add_1lib in $LIBS
do
	for cf_add_2lib in $cf_add_libs
	do
		if test "x$cf_add_1lib" = "x$cf_add_2lib"
		then
			cf_add_1lib=
			break
		fi
	done
	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
done
LIBS="$cf_add_libs"

fi

	echo "$as_me:21248: checking for tgoto in -ltermcap" >&5
echo $ECHO_N "checking for tgoto in -ltermcap... $ECHO_C" >&6
if test "${ac_cv_lib_termcap_tgoto+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-ltermcap  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 21256 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char tgoto ();
int
main (void)
{
tgoto ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:21275: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:21278: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:21281: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:21284: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_termcap_tgoto=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_termcap_tgoto=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:21295: result: $ac_cv_lib_termcap_tgoto" >&5
echo "${ECHO_T}$ac_cv_lib_termcap_tgoto" >&6
if test $ac_cv_lib_termcap_tgoto = yes; then

cf_add_libs="-ltermcap"
# Filter out duplicates - this happens with badly-designed ".pc" files...
for cf_add_1lib in $LIBS
do
	for cf_add_2lib in $cf_add_libs
	do
		if test "x$cf_add_1lib" = "x$cf_add_2lib"
		then
			cf_add_1lib=
			break
		fi
	done
	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
done
LIBS="$cf_add_libs"
 cf_cv_termlib=termcap
fi

fi

fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
if test "$cf_cv_termlib" = none; then
	{ echo "$as_me:21322: WARNING: Cannot find -ltermlib, -lcurses, or -ltermcap" >&5
echo "$as_me: WARNING: Cannot find -ltermlib, -lcurses, or -ltermcap" >&2;}
fi

fi

	# terminfo-based termcap interfaces may be prototyped in <curses.h>,
	# which may/may not be compatible with <termcap.h>
	echo "$as_me:21330: checking if we should include termcap.h" >&5
echo $ECHO_N "checking if we should include termcap.h... $ECHO_C" >&6
	cf_save_CFLAGS="$CFLAGS"
	CFLAGS="$CFLAGS -I$srcdir/include"
	cat >conftest.$ac_ext <<_ACEOF
#line 21335 "configure"
#include "confdefs.h"

#define HAVE_TERMCAP_H 1
#include <tcurses.h>
int
main (void)
{

#ifdef NCURSES_VERSION
make an error
#endif

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:21353: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:21356: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:21359: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:21362: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  cf_result=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
cf_result=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
	echo "$as_me:21371: result: $cf_result" >&5
echo "${ECHO_T}$cf_result" >&6
	CFLAGS="$cf_save_CFLAGS"
	test $cf_result = yes && cat >>confdefs.h <<\EOF
#define HAVE_TERMCAP_H 1
EOF

echo "$as_me:21378: checking for term.h" >&5
echo $ECHO_N "checking for term.h... $ECHO_C" >&6
if test "${cf_cv_term_header+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

# If we found <ncurses/curses.h>, look for <ncurses/term.h>, but always look
# for <term.h> if we do not find the variant.

cf_header_list="term.h ncurses/term.h ncursesw/term.h"

case ${cf_cv_ncurses_header:-curses.h} in
(*/*)
	cf_header_item=`echo ${cf_cv_ncurses_header:-curses.h} | sed -e 's%\..*%%' -e 's%/.*%/%'`term.h
	cf_header_list="$cf_header_item $cf_header_list"
	;;
esac

for cf_header in $cf_header_list
do
	cat >conftest.$ac_ext <<_ACEOF
#line 21399 "configure"
#include "confdefs.h"

#include <${cf_cv_ncurses_header:-curses.h}>
#include <${cf_header}>
int
main (void)
{
WINDOW *x
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:21413: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:21416: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:21419: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:21422: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  cf_cv_term_header=$cf_header
	 break
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
cf_cv_term_header=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
done

case $cf_cv_term_header in
(no)
	# If curses is ncurses, some packagers still mess it up by trying to make
	# us use GNU termcap.  This handles the most common case.
	for cf_header in ncurses/term.h ncursesw/term.h
	do
		cat >conftest.$ac_ext <<_ACEOF
#line 21441 "configure"
#include "confdefs.h"

#include <${cf_cv_ncurses_header:-curses.h}>
#ifdef NCURSES_VERSION
#include <${cf_header}>
#else
make an error
#endif
int
main (void)
{
WINDOW *x
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:21459: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:21462: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:21465: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:21468: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  cf_cv_term_header=$cf_header
			 break
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
cf_cv_term_header=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
	done
	;;
esac

fi
echo "$as_me:21483: result: $cf_cv_term_header" >&5
echo "${ECHO_T}$cf_cv_term_header" >&6

case $cf_cv_term_header in
(term.h)

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

	;;
(ncurses/term.h)

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

	;;
(ncursesw/term.h)

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

	;;
esac

echo "$as_me:21510: checking if we should include curses.h or termcap.h" >&5
echo $ECHO_N "checking if we should include curses.h or termcap.h... $ECHO_C" >&6
if test "${cf_cv_need_curses_h+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

cf_save_CPPFLAGS="$CPPFLAGS"
cf_cv_need_curses_h=no

for cf_t_opts in "" "NEED_TERMCAP_H"
do
for cf_c_opts in "" "NEED_CURSES_H"
do

    CPPFLAGS="$cf_save_CPPFLAGS $CHECK_DECL_FLAG"
    test -n "$cf_c_opts" && CPPFLAGS="$CPPFLAGS -D$cf_c_opts"
    test -n "$cf_t_opts" && CPPFLAGS="$CPPFLAGS -D$cf_t_opts"

    cat >conftest.$ac_ext <<_ACEOF
#line 21529 "configure"
#include "confdefs.h"
/* $cf_c_opts $cf_t_opts */
$CHECK_DECL_HDRS
int
main (void)
{
char *x = (char *)tgoto("")
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:21542: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:21545: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:21548: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:21551: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  test "$cf_cv_need_curses_h" = no && {
	     cf_cv_need_curses_h=maybe
	     cf_ok_c_opts=$cf_c_opts
	     cf_ok_t_opts=$cf_t_opts
	}
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
echo "Recompiling with corrected call (C:$cf_c_opts, T:$cf_t_opts)" >&5
	cat >conftest.$ac_ext <<_ACEOF
#line 21563 "configure"
#include "confdefs.h"

$CHECK_DECL_HDRS
int
main (void)
{
char *x = (char *)tgoto("",0,0)
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:21576: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:21579: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:21582: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:21585: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  cf_cv_need_curses_h=yes
	 cf_ok_c_opts=$cf_c_opts
	 cf_ok_t_opts=$cf_t_opts
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext

	CPPFLAGS="$cf_save_CPPFLAGS"
	test "$cf_cv_need_curses_h" = yes && break
done
	test "$cf_cv_need_curses_h" = yes && break
done

if test "$cf_cv_need_curses_h" != no ; then
	echo "Curses/termcap test = $cf_cv_need_curses_h (C:$cf_ok_c_opts, T:$cf_ok_t_opts)" >&5
	if test -n "$cf_ok_c_opts" ; then
		if test -n "$cf_ok_t_opts" ; then
			cf_cv_need_curses_h=both
		else
			cf_cv_need_curses_h=curses.h
		fi
	elif test -n "$cf_ok_t_opts" ; then
		cf_cv_need_curses_h=termcap.h
	elif test "$cf_cv_term_header" != no ; then
		cf_cv_need_curses_h=term.h
	else
		cf_cv_need_curses_h=no
	fi
fi

fi
echo "$as_me:21622: result: $cf_cv_need_curses_h" >&5
echo "${ECHO_T}$cf_cv_need_curses_h" >&6

case $cf_cv_need_curses_h in
(both)

cat >>confdefs.h <<EOF
#define NEED_CURSES_H 1
EOF

cat >>confdefs.h <<EOF
#define NEED_TERMCAP_H 1
EOF

	;;
(curses.h)

cat >>confdefs.h <<EOF
#define NEED_CURSES_H 1
EOF

	;;
(term.h)

cat >>confdefs.h <<EOF
#define NEED_TERM_H 1
EOF

	;;
(termcap.h)

cat >>confdefs.h <<EOF
#define NEED_TERMCAP_H 1
EOF

	;;
esac

echo "$as_me:21660: checking declaration of tputs 3rd param" >&5
echo $ECHO_N "checking declaration of tputs 3rd param... $ECHO_C" >&6
if test "${cf_cv_type_outchar+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

cf_cv_type_outchar="int OutChar(int)"
cf_cv_found=no
cf_save_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $CHECK_DECL_FLAG"

for P in int void; do
for Q in int void; do
for R in int char; do
for S in "" const; do

echo "${as_me:-configure}:21676: testing loop variables P:$P, Q:$Q, R:$R, S:$S ..." 1>&5

	cat >conftest.$ac_ext <<_ACEOF
#line 21679 "configure"
#include "confdefs.h"
$CHECK_DECL_HDRS
int
main (void)
{
extern $Q OutChar($R);
	extern $P tputs ($S char *string, int nlines, $Q (*_f)($R));
	tputs("", 1, OutChar)
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:21693: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:21696: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:21699: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:21702: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  cf_cv_type_outchar="$Q OutChar($R)"
	 cf_cv_found=yes
	 break
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest.$ac_objext conftest.$ac_ext
done
	test $cf_cv_found = yes && break
done
	test $cf_cv_found = yes && break
done
	test $cf_cv_found = yes && break
done

fi
echo "$as_me:21721: result: $cf_cv_type_outchar" >&5
echo "${ECHO_T}$cf_cv_type_outchar" >&6

case $cf_cv_type_outchar in
(int*)

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

	;;
esac
case $cf_cv_type_outchar in
(*char*)

cat >>confdefs.h <<\EOF
#define OUTC_ARGS char c
EOF

	;;
esac

CPPFLAGS="$cf_save_CPPFLAGS"

fi

cf_tc_funcs=
cf_tc_externs=
if test ".$cf_cv_termlib" = .terminfo ; then
	cat >>confdefs.h <<\EOF
#define USE_TERMINFO 1
EOF

	cf_tc_funcs="tigetint tigetnum tparam tparm"
	cf_tc_externs="$cf_tc_funcs tgoto tigetstr tputs tigetflag"
elif test ".$cf_cv_termlib" = .termcap ; then
	# BSD 'tputs()' may need 'PC' to be set.
	cat >conftest.$ac_ext <<_ACEOF
#line 21759 "configure"
#include "confdefs.h"

int
main (void)
{
extern char PC; PC = 0
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:21771: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:21774: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:21777: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:21780: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  cat >>confdefs.h <<\EOF
#define HAVE_EXTERN_TCAP_PC 1
EOF

else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
	cf_tc_funcs="tgetint tgetnum tparam tparm"
	cf_tc_externs="$cf_tc_funcs tgoto tgetstr tputs tgetent tgetflag"
fi

###	Checks for external-data

echo "$as_me:21797: checking if external errno is declared" >&5
echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
if test "${cf_cv_dcl_errno+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

	cat >conftest.$ac_ext <<_ACEOF
#line 21804 "configure"
#include "confdefs.h"

#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
#include <stdio.h>
#include <sys/types.h>
#include <errno.h>
int
main (void)
{
int x = (int) errno
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:21822: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:21825: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:21828: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:21831: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  cf_cv_dcl_errno=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
cf_cv_dcl_errno=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext

fi
echo "$as_me:21842: result: $cf_cv_dcl_errno" >&5
echo "${ECHO_T}$cf_cv_dcl_errno" >&6

if test "$cf_cv_dcl_errno" = no ; then

cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`

	cat >>confdefs.h <<EOF
#define $cf_result 1
EOF

fi

# It's possible (for near-UNIX clones) that the data doesn't exist

echo "$as_me:21857: checking if external errno exists" >&5
echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
if test "${cf_cv_have_errno+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

	cat >conftest.$ac_ext <<_ACEOF
#line 21864 "configure"
#include "confdefs.h"

#undef errno
extern int errno;

int
main (void)
{
errno = 2
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:21879: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:21882: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:21885: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:21888: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  cf_cv_have_errno=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
cf_cv_have_errno=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext

fi
echo "$as_me:21899: result: $cf_cv_have_errno" >&5
echo "${ECHO_T}$cf_cv_have_errno" >&6

if test "$cf_cv_have_errno" = yes ; then

cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`

	cat >>confdefs.h <<EOF
#define $cf_result 1
EOF

fi

for ac_func in strerror
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:21915: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 21921 "configure"
#include "confdefs.h"
#define $ac_func autoconf_temporary
#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
#undef $ac_func

#ifdef __cplusplus
extern "C"
#endif

/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char $ac_func (void);

int
main (void)
{

/* The GNU C library defines stubs for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
#error found stub for $ac_func
#endif

	return $ac_func ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:21952: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:21955: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:21958: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:21961: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:21971: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF
 cat >>confdefs.h <<\EOF
#define HAVE_STRERROR 1
EOF

else

echo "$as_me:21983: checking if external sys_nerr is declared" >&5
echo $ECHO_N "checking if external sys_nerr is declared... $ECHO_C" >&6
if test "${cf_cv_dcl_sys_nerr+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

	cat >conftest.$ac_ext <<_ACEOF
#line 21990 "configure"
#include "confdefs.h"

#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
#include <stdio.h>
#include <sys/types.h>
#include <errno.h>
int
main (void)
{
int x = (int) sys_nerr
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:22008: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:22011: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:22014: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:22017: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  cf_cv_dcl_sys_nerr=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
cf_cv_dcl_sys_nerr=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext

fi
echo "$as_me:22028: result: $cf_cv_dcl_sys_nerr" >&5
echo "${ECHO_T}$cf_cv_dcl_sys_nerr" >&6

if test "$cf_cv_dcl_sys_nerr" = no ; then

cf_result=`echo "decl_sys_nerr" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`

	cat >>confdefs.h <<EOF
#define $cf_result 1
EOF

fi

# It's possible (for near-UNIX clones) that the data doesn't exist

echo "$as_me:22043: checking if external sys_nerr exists" >&5
echo $ECHO_N "checking if external sys_nerr exists... $ECHO_C" >&6
if test "${cf_cv_have_sys_nerr+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

	cat >conftest.$ac_ext <<_ACEOF
#line 22050 "configure"
#include "confdefs.h"

#undef sys_nerr
extern int sys_nerr;

int
main (void)
{
sys_nerr = 2
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:22065: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:22068: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:22071: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:22074: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  cf_cv_have_sys_nerr=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
cf_cv_have_sys_nerr=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext

fi
echo "$as_me:22085: result: $cf_cv_have_sys_nerr" >&5
echo "${ECHO_T}$cf_cv_have_sys_nerr" >&6

if test "$cf_cv_have_sys_nerr" = yes ; then

cf_result=`echo "have_sys_nerr" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`

	cat >>confdefs.h <<EOF
#define $cf_result 1
EOF

fi

echo "$as_me:22098: checking if external sys_errlist is declared" >&5
echo $ECHO_N "checking if external sys_errlist is declared... $ECHO_C" >&6
if test "${cf_cv_dcl_sys_errlist+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

	cat >conftest.$ac_ext <<_ACEOF
#line 22105 "configure"
#include "confdefs.h"

#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
#include <stdio.h>
#include <sys/types.h>
#include <errno.h>
int
main (void)
{
int x = (int) sys_errlist
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:22123: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:22126: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:22129: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:22132: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  cf_cv_dcl_sys_errlist=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
cf_cv_dcl_sys_errlist=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext

fi
echo "$as_me:22143: result: $cf_cv_dcl_sys_errlist" >&5
echo "${ECHO_T}$cf_cv_dcl_sys_errlist" >&6

if test "$cf_cv_dcl_sys_errlist" = no ; then

cf_result=`echo "decl_sys_errlist" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`

	cat >>confdefs.h <<EOF
#define $cf_result 1
EOF

fi

# It's possible (for near-UNIX clones) that the data doesn't exist

echo "$as_me:22158: checking if external sys_errlist exists" >&5
echo $ECHO_N "checking if external sys_errlist exists... $ECHO_C" >&6
if test "${cf_cv_have_sys_errlist+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

	cat >conftest.$ac_ext <<_ACEOF
#line 22165 "configure"
#include "confdefs.h"

#undef sys_errlist
extern int sys_errlist;

int
main (void)
{
sys_errlist = 2
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:22180: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:22183: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:22186: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:22189: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  cf_cv_have_sys_errlist=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
cf_cv_have_sys_errlist=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext

fi
echo "$as_me:22200: result: $cf_cv_have_sys_errlist" >&5
echo "${ECHO_T}$cf_cv_have_sys_errlist" >&6

if test "$cf_cv_have_sys_errlist" = yes ; then

cf_result=`echo "have_sys_errlist" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`

	cat >>confdefs.h <<EOF
#define $cf_result 1
EOF

fi

fi
done

###	Checks for library functions.

for ac_func in \
	alarm \
	atoi \
	atol \
	atoll \
	atoq \
	bcopy \
	chmod \
	closesocket \
	execlp \
	explicit_bzero \
	explicit_memset \
	fcntl \
	fdopen \
	fork \
	ftime \
	ftruncate \
	fsync \
	getcwd \
	gettimeofday \
	getwd \
	inet_aton \
	is_xterm \
	isascii \
	lockf \
	memcmp \
	memcpy \
	memmove \
	memset \
	mkdir \
	mkfifo \
	mktemp \
	mkstemp \
	nl_langinfo \
	poll \
	putenv \
	rewinddir \
	resizeterm \
	select \
	setenv \
	setlocale \
	settz \
	setvbuf \
	sigaction \
	snprintf \
	stpcpy \
	strchr \
	strcasecmp \
	strcasestr \
	strdup \
	strftime \
	strpbrk \
	strrchr \
	strrstr \
	strsep \
	strstr \
	strtol \
	strtoll \
	tmpfile \
	tzset \
	uname \
	unlink \
	use_default_colors \
	usleep \
	vsnprintf \
	waitpid \
$cf_tc_funcs
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:22287: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 22293 "configure"
#include "confdefs.h"
#define $ac_func autoconf_temporary
#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
#undef $ac_func

#ifdef __cplusplus
extern "C"
#endif

/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char $ac_func (void);

int
main (void)
{

/* The GNU C library defines stubs for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
#error found stub for $ac_func
#endif

	return $ac_func ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:22324: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:22327: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:22330: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:22333: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:22343: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF

fi
done

echo "$as_me:22353: checking for flock" >&5
echo $ECHO_N "checking for flock... $ECHO_C" >&6
if test "${ac_cv_func_flock+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 22359 "configure"
#include "confdefs.h"
#define flock autoconf_temporary
#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
#undef flock

#ifdef __cplusplus
extern "C"
#endif

/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char flock (void);

int
main (void)
{

/* The GNU C library defines stubs for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_flock) || defined (__stub___flock)
#error found stub for flock
#endif

	return flock ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:22390: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:22393: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:22396: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:22399: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_func_flock=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_func_flock=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:22409: result: $ac_cv_func_flock" >&5
echo "${ECHO_T}$ac_cv_func_flock" >&6
if test $ac_cv_func_flock = yes; then
  cat >>confdefs.h <<\EOF
#define HAVE_FLOCK 1
EOF

else

	echo "$as_me:22418: checking for flock in -lbsd" >&5
echo $ECHO_N "checking for flock in -lbsd... $ECHO_C" >&6
if test "${ac_cv_lib_bsd_flock+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lbsd  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 22426 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char flock ();
int
main (void)
{
flock ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:22445: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:22448: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:22451: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:22454: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_bsd_flock=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_bsd_flock=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:22465: result: $ac_cv_lib_bsd_flock" >&5
echo "${ECHO_T}$ac_cv_lib_bsd_flock" >&6
if test $ac_cv_lib_bsd_flock = yes; then
  cat >>confdefs.h <<\EOF
#define HAVE_FLOCK 1
EOF

		LIBS="$LIBS -lbsd"
fi

fi

# clock_gettime() / librt
echo "$as_me:22478: checking for clock_gettime" >&5
echo $ECHO_N "checking for clock_gettime... $ECHO_C" >&6
if test "${ac_cv_func_clock_gettime+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 22484 "configure"
#include "confdefs.h"
#define clock_gettime autoconf_temporary
#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
#undef clock_gettime

#ifdef __cplusplus
extern "C"
#endif

/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char clock_gettime (void);

int
main (void)
{

/* The GNU C library defines stubs for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_clock_gettime) || defined (__stub___clock_gettime)
#error found stub for clock_gettime
#endif

	return clock_gettime ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:22515: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:22518: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:22521: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:22524: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_func_clock_gettime=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_func_clock_gettime=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:22534: result: $ac_cv_func_clock_gettime" >&5
echo "${ECHO_T}$ac_cv_func_clock_gettime" >&6
if test $ac_cv_func_clock_gettime = yes; then
  cat >>confdefs.h <<\EOF
#define HAVE_CLOCK_GETTIME 1
EOF

else

		echo "$as_me:22543: checking for clock_gettime in -lrt" >&5
echo $ECHO_N "checking for clock_gettime in -lrt... $ECHO_C" >&6
if test "${ac_cv_lib_rt_clock_gettime+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lrt  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 22551 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char clock_gettime ();
int
main (void)
{
clock_gettime ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:22570: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:22573: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:22576: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:22579: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_rt_clock_gettime=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_rt_clock_gettime=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:22590: result: $ac_cv_lib_rt_clock_gettime" >&5
echo "${ECHO_T}$ac_cv_lib_rt_clock_gettime" >&6
if test $ac_cv_lib_rt_clock_gettime = yes; then
  cat >>confdefs.h <<\EOF
#define HAVE_CLOCK_GETTIME 1
EOF

			LIBS="$LIBS -lrt"

fi

fi

echo "$as_me:22603: checking for memset_s" >&5
echo $ECHO_N "checking for memset_s... $ECHO_C" >&6
if test "$cross_compiling" = yes; then
  echo "$as_me:22606: result: unknown" >&5
echo "${ECHO_T}unknown" >&6

else
  cat >conftest.$ac_ext <<_ACEOF
#line 22611 "configure"
#include "confdefs.h"

/* Request C11 Annex K */
#define __STDC_WANT_LIB_EXT1__ 1
#include <string.h>
#include <stddef.h>
int main()
{
	char buf[10] = { 1 };
	if (memset_s((void*) buf, (size_t) 100, 0, (size_t) 1))
		return(-1);
}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:22626: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:22629: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:22631: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:22634: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then

		echo "$as_me:22637: result: yes" >&5
echo "${ECHO_T}yes" >&6
		cat >>confdefs.h <<\EOF
#define HAVE_MEMSET_S 1
EOF

else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
echo "$as_me:22647: result: no" >&5
echo "${ECHO_T}no" >&6
fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi

  echo "$as_me:22653: checking for wide char and multibyte support" >&5
echo $ECHO_N "checking for wide char and multibyte support... $ECHO_C" >&6
if test "${am_cv_multibyte_able+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 22659 "configure"
#include "confdefs.h"
#include <stdio.h>
#ifdef HAVE_STDLIB_H
#	include <stdlib.h>
#endif /* HAVE_STDLIB_H */
#ifdef HAVE_WCHAR_H
#	include <wchar.h>
#endif /* HAVE_WCHAR_H */
#ifdef HAVE_WCTYPE_H
#	include <wctype.h>
#endif /* HAVE_WCTYPE_H */

int
main (void)
{
const char icb[5] = {0xa4, 0xa4, 0xa4, 0xe5, 0x00};
      char ocb[5];
      wchar_t wcb[5];
      wchar_t wcb2[5];
      wchar_t format[3];

      putwc(0, 0);
      fputwc(0, 0);
      fwide(0, 0);
      mbtowc(wcb, icb, MB_CUR_MAX);
      mbstowcs(wcb, icb, 5);
      (void) iswalnum((wint_t) wcb[0]);
      (void) iswcntrl((wint_t) wcb[0]);
      (void) iswdigit((wint_t) wcb[0]);
      (void) iswgraph((wint_t) wcb[0]);
      (void) iswprint((wint_t) wcb[0]);
      (void) iswspace((wint_t) wcb[0]);
      (void) towupper((wint_t) wcb[0]);
      /* (void) iswupper((wint_t) wcb[0]); */
      /* (void) towlower((wint_t) wcb[0]); */
      /* (void) iswlower((wint_t) wcb[0]); */
      (void) iswalpha((wint_t) wcb[0]);
      /* (void) iswblank((wint_t) wcb[0]); */
      /* (void) iswpunct((wint_t) wcb[0]); */
      /* (void) iswxdigit((wint_t) wcb[0]); */
      /* (void) iswctype((wint_t) wcb[0], wctype("print")); */
      /* (void) towctranse((wint_t) wcb[0], wctrans("toupper")); */
      (void) wcslen(wcb);
      /* (void) wcsnlen(wcb, 4); */
      wcwidth((wint_t) wcb[0]);
      wcswidth(wcb, 5);
      wcstombs(ocb, wcb, 5);
      wctomb(ocb, wcb[0]);
      wcscat(wcb2, wcb);
      wcscpy(wcb2, wcb);
      mbstowcs(format, "%s", 2);
      swprintf(wcb, 5, format, "test");
      wcsncat(wcb2, wcb, 5);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:22718: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:22721: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:22724: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:22727: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  am_cv_multibyte_able=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
cf_save_LIBS="$LIBS"
      LIBS="-lutf8 $LIBS"
      cat >conftest.$ac_ext <<_ACEOF
#line 22736 "configure"
#include "confdefs.h"
#include <libutf8.h>
int
main (void)
{
const char icb[5] = {0xa4, 0xa4, 0xa4, 0xe5, 0x00};
        char ocb[5];
        wchar_t wcb[5];
        wchar_t wcb2[5];
        wchar_t format[3];

        putwc(0, 0);
        fputwc(0, 0);
        fwide(0, 0);
        mbtowc(wcb, icb, MB_CUR_MAX);
        mbstowcs(wcb, icb, 5);
        (void) iswalnum((wint_t) wcb[0]);
        (void) iswcntrl((wint_t) wcb[0]);
        (void) iswdigit((wint_t) wcb[0]);
        (void) iswgraph((wint_t) wcb[0]);
        (void) iswprint((wint_t) wcb[0]);
        (void) iswspace((wint_t) wcb[0]);
        (void) towupper((wint_t) wcb[0]);
        /* (void) iswupper((wint_t) wcb[0]); */
        /* (void) towlower((wint_t) wcb[0]); */
        /* (void) iswlower((wint_t) wcb[0]); */
        (void) iswalpha((wint_t) wcb[0]);
        /* (void) iswblank((wint_t) wcb[0]); */
        /* (void) iswpunct((wint_t) wcb[0]); */
        /* (void) iswxdigit((wint_t) wcb[0]); */
        /* (void) iswctype((wint_t) wcb[0], wctype("print")); */
        /* (void) towctranse((wint_t) wcb[0], wctrans("toupper")); */
        (void) wcslen(wcb);
        /* (void) wcsnlen(wcb, 4); */
        wcwidth((wint_t) wcb[0]);
        wcswidth(wcb, 5);
        wcstombs(ocb, wcb, 5);
        wctomb(ocb, wcb[0]);
        wcscat(wcb2, wcb);
        wcscpy(wcb2, wcb);
        mbstowcs(format, "%s", 2);
        swprintf(wcb, 5, format, "test");
        wcsncat(wcb2, wcb, 5);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:22785: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:22788: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:22791: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:22794: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  am_cv_multibyte_able=libutf8
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
am_cv_multibyte_able=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
      LIBS="$cf_save_LIBS"

fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext

fi
echo "$as_me:22809: result: $am_cv_multibyte_able" >&5
echo "${ECHO_T}$am_cv_multibyte_able" >&6
  if test "$am_cv_multibyte_able" != no; then
    if test "$am_cv_multibyte_able" = libutf8; then
      cat >>confdefs.h <<\EOF
#define HAVE_LIBUTF8_H 1
EOF

      LIBS="-lutf8 $LIBS"
    fi

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

  fi

echo "$as_me:22826: checking if gettimeofday takes two arguments" >&5
echo $ECHO_N "checking if gettimeofday takes two arguments... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
#line 22829 "configure"
#include "confdefs.h"

#if HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
int
main (void)
{
struct timeval *tv;
struct timezone *tz;
gettimeofday(&tv, &tz);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:22846: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:22849: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:22852: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:22855: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_func_gettimeofday_2args=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_func_gettimeofday_2args=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
echo "$as_me:22864: result: $ac_cv_func_gettimeofday_2args" >&5
echo "${ECHO_T}$ac_cv_func_gettimeofday_2args" >&6
if test $ac_cv_func_gettimeofday_2args = yes; then
	cat >>confdefs.h <<\EOF
#define GETTIMEOFDAY_2ARGS 1
EOF

fi

echo "$as_me:22873: checking return type of signal handlers" >&5
echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
if test "${ac_cv_type_signal+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 22879 "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 (void)
{
int i;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:22901: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:22904: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:22907: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:22910: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_type_signal=void
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_type_signal=int
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:22920: result: $ac_cv_type_signal" >&5
echo "${ECHO_T}$ac_cv_type_signal" >&6

cat >>confdefs.h <<EOF
#define RETSIGTYPE $ac_cv_type_signal
EOF

echo "$as_me:22927: checking declaration of signal arguments" >&5
echo $ECHO_N "checking declaration of signal arguments... $ECHO_C" >&6
if test "${cf_cv_sig_args+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

cf_cv_sig_args=
for cf_test in "int sig" "int sig, ..."
do
	cat >conftest.$ac_ext <<_ACEOF
#line 22937 "configure"
#include "confdefs.h"

#include <signal.h>
int
main (void)
{
extern RETSIGTYPE catch($cf_test); signal(SIGINT, catch)
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:22950: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:22953: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:22956: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:22959: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  cf_cv_sig_args="$cf_test";break
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest.$ac_objext conftest.$ac_ext
done

fi

echo "$as_me:22971: result: $cf_cv_sig_args" >&5
echo "${ECHO_T}$cf_cv_sig_args" >&6
cat >>confdefs.h <<EOF
#define SIG_ARGS $cf_cv_sig_args
EOF

if test "$ac_cv_func_sigaction" = yes; then

echo "$as_me:22979: checking whether sigaction needs _POSIX_SOURCE" >&5
echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
if test "${cf_cv_sigact_bad+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

cat >conftest.$ac_ext <<_ACEOF
#line 22986 "configure"
#include "confdefs.h"

#include <sys/types.h>
#include <signal.h>
int
main (void)
{
struct sigaction act
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:23000: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:23003: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:23006: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:23009: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  cf_cv_sigact_bad=no
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
cf_cv_sigact_bad=yes
fi
rm -f conftest.$ac_objext conftest.$ac_ext

fi
echo "$as_me:23020: result: $cf_cv_sigact_bad" >&5
echo "${ECHO_T}$cf_cv_sigact_bad" >&6

test "$cf_cv_sigact_bad" = yes && cat >>confdefs.h <<\EOF
#define SVR4_ACTION 1
EOF

echo "$as_me:23027: checking if we have sigaction/related functions" >&5
echo $ECHO_N "checking if we have sigaction/related functions... $ECHO_C" >&6
if test "${cf_cv_sigaction_funcs+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

cat >conftest.$ac_ext <<_ACEOF
#line 23034 "configure"
#include "confdefs.h"

#ifdef SVR4_ACTION
#define _POSIX_SOURCE
#endif
#include <sys/types.h>
#include <signal.h>
int
main (void)
{

    RETSIGTYPE (*func)(SIG_ARGS) = SIG_IGN;
    struct sigaction sa, osa;
    sa.sa_handler = func;
    sa.sa_flags = 0;
    sigemptyset (&sa.sa_mask);
    sigaction (SIGBUS,&sa,&osa);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:23057: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:23060: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:23063: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:23066: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  cf_cv_sigaction_funcs=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
cf_cv_sigaction_funcs=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:23076: result: $cf_cv_sigaction_funcs" >&5
echo "${ECHO_T}$cf_cv_sigaction_funcs" >&6

test "$cf_cv_sigaction_funcs" = yes && cat >>confdefs.h <<\EOF
#define HAVE_POSIX_JC 1
EOF

fi

echo "$as_me:23085: checking for fork" >&5
echo $ECHO_N "checking for fork... $ECHO_C" >&6
if test "${cf_cv_func_fork+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

if test "$cross_compiling" = yes; then
  cf_cv_func_fork=unknown
else
  cat >conftest.$ac_ext <<_ACEOF
#line 23095 "configure"
#include "confdefs.h"

int main()
{
	if (fork() < 0)
		${cf_cv_main_return:-return}(1);
	${cf_cv_main_return:-return}(0);
}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:23106: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:23109: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:23111: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:23114: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  cf_cv_func_fork=yes
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
cf_cv_func_fork=no
fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi

fi
echo "$as_me:23127: result: $cf_cv_func_fork" >&5
echo "${ECHO_T}$cf_cv_func_fork" >&6
test $cf_cv_func_fork = yes && cat >>confdefs.h <<\EOF
#define HAVE_FORK 1
EOF

echo "$as_me:23133: checking for memmove" >&5
echo $ECHO_N "checking for memmove... $ECHO_C" >&6
if test "${ac_cv_func_memmove+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 23139 "configure"
#include "confdefs.h"
#define memmove autoconf_temporary
#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
#undef memmove

#ifdef __cplusplus
extern "C"
#endif

/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char memmove (void);

int
main (void)
{

/* The GNU C library defines stubs for functions which it 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)
#error found stub for memmove
#endif

	return memmove ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:23170: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:23173: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:23176: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:23179: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_func_memmove=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_func_memmove=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:23189: result: $ac_cv_func_memmove" >&5
echo "${ECHO_T}$ac_cv_func_memmove" >&6
if test $ac_cv_func_memmove = yes; then
  :
else

echo "$as_me:23195: checking for bcopy" >&5
echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
if test "${ac_cv_func_bcopy+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 23201 "configure"
#include "confdefs.h"
#define bcopy autoconf_temporary
#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
#undef bcopy

#ifdef __cplusplus
extern "C"
#endif

/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char bcopy (void);

int
main (void)
{

/* The GNU C library defines stubs for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_bcopy) || defined (__stub___bcopy)
#error found stub for bcopy
#endif

	return bcopy ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:23232: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:23235: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:23238: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:23241: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_func_bcopy=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_func_bcopy=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:23251: result: $ac_cv_func_bcopy" >&5
echo "${ECHO_T}$ac_cv_func_bcopy" >&6
if test $ac_cv_func_bcopy = yes; then

	echo "$as_me:23255: checking if bcopy does overlapping moves" >&5
echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
if test "${cf_cv_good_bcopy+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

		if test "$cross_compiling" = yes; then
  cf_cv_good_bcopy=unknown
else
  cat >conftest.$ac_ext <<_ACEOF
#line 23265 "configure"
#include "confdefs.h"

int main(void) {
	static char data[] = "abcdefghijklmnopqrstuwwxyz";
	char temp[40];
	bcopy(data, temp, sizeof(data));
	bcopy(temp+10, temp, 15);
	bcopy(temp+5, temp+15, 10);
	${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
}

_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:23279: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:23282: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:23284: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:23287: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  cf_cv_good_bcopy=yes
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
cf_cv_good_bcopy=no
fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi

fi
echo "$as_me:23300: result: $cf_cv_good_bcopy" >&5
echo "${ECHO_T}$cf_cv_good_bcopy" >&6

else
  cf_cv_good_bcopy=no
fi

	if test "$cf_cv_good_bcopy" = yes ; then

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

	else

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

	fi

fi

echo "$as_me:23323: checking if select expects int * arguments" >&5
echo $ECHO_N "checking if select expects int * arguments... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
#line 23326 "configure"
#include "confdefs.h"
#include <time.h>

_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "select\(.*, *int *\*," >/dev/null 2>&1; then
  cat >>confdefs.h <<\EOF
#define HAVE_SELECT_INTP 1
EOF
 echo "$as_me:23336: result: yes" >&5
echo "${ECHO_T}yes" >&6
else
  echo "$as_me:23339: result: no" >&5
echo "${ECHO_T}no" >&6

fi
rm -rf conftest*

echo "$as_me:23345: checking whether closedir returns void" >&5
echo $ECHO_N "checking whether closedir returns void... $ECHO_C" >&6
if test "${ac_cv_func_closedir_void+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_func_closedir_void=yes
else
  cat >conftest.$ac_ext <<_ACEOF
#line 23354 "configure"
#include "confdefs.h"
$ac_includes_default
#include <$ac_header_dirent>
#ifndef __cplusplus
int closedir ();
#endif

int
main (void)
{
$ac_main_return (closedir (opendir (".")) != 0);
  ;
  return 0;
}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:23371: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:23374: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:23376: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:23379: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_func_closedir_void=no
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_func_closedir_void=yes
fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
echo "$as_me:23391: result: $ac_cv_func_closedir_void" >&5
echo "${ECHO_T}$ac_cv_func_closedir_void" >&6
if test $ac_cv_func_closedir_void = yes; then

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

fi

# autoconf 2.5x assumes setvbuf is not reversed when cross-compiling
if test "$cross_compiling" != yes ; then
	echo "$as_me:23403: checking whether setvbuf arguments are reversed" >&5
echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test "$cross_compiling" = yes; then
  { { echo "$as_me:23409: error: cannot run test program while cross compiling" >&5
echo "$as_me: error: cannot run test program while cross compiling" >&2;}
   { (exit 1); exit 1; }; }
else
  cat >conftest.$ac_ext <<_ACEOF
#line 23414 "configure"
#include "confdefs.h"
#include <stdio.h>
/* If setvbuf has the reversed format, exit 0. */
int
main (void)
{
  /* This call has the arguments reversed.
     A reversed system may check and see that the address of main
     is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
  if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
    $ac_main_return(1);
  putc('\r', stdout);
  $ac_main_return(0);			/* Non-reversed systems segv here.  */
}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:23431: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:23434: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:23436: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:23439: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_func_setvbuf_reversed=yes
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_func_setvbuf_reversed=no
fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
rm -f core core.* *.core
fi
echo "$as_me:23452: result: $ac_cv_func_setvbuf_reversed" >&5
echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
if test $ac_cv_func_setvbuf_reversed = yes; then

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

fi

fi

###	Checks for network library functions.

for ac_func in \
	gai_strerror \
	getaddrinfo \
	gethostname \
	gethostbyname \
	getservbyname \
	inet_addr \
	inet_ntoa \
	strncasecmp \

do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:23478: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 23484 "configure"
#include "confdefs.h"
#define $ac_func autoconf_temporary
#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
#undef $ac_func

#ifdef __cplusplus
extern "C"
#endif

/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char $ac_func (void);

int
main (void)
{

/* The GNU C library defines stubs for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
#error found stub for $ac_func
#endif

	return $ac_func ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:23515: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:23518: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:23521: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:23524: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:23534: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF

fi
done

echo "$as_me:23544: checking for type sigaction_t" >&5
echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
if test "${cf_cv_type_sigaction+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

	cat >conftest.$ac_ext <<_ACEOF
#line 23551 "configure"
#include "confdefs.h"

#include <signal.h>
int
main (void)
{
sigaction_t x
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:23564: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:23567: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:23570: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:23573: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  cf_cv_type_sigaction=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
cf_cv_type_sigaction=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi

echo "$as_me:23584: result: $cf_cv_type_sigaction" >&5
echo "${ECHO_T}$cf_cv_type_sigaction" >&6
test "$cf_cv_type_sigaction" = yes &&
cat >>confdefs.h <<\EOF
#define HAVE_TYPE_SIGACTION 1
EOF

echo "$as_me:23591: checking for nonconflicting termios.h" >&5
echo $ECHO_N "checking for nonconflicting termios.h... $ECHO_C" >&6
if test "${cf_cv_use_termios_h+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

	cat >conftest.$ac_ext <<_ACEOF
#line 23598 "configure"
#include "confdefs.h"

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

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

int
main (void)
{

	struct termios save_tty;
	(void) tcsetattr (0, TCSANOW, &save_tty);
	(void) tcgetattr (0, &save_tty)
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:23625: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:23628: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:23631: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:23634: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  cf_cv_use_termios_h=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
cf_cv_use_termios_h=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext

fi

echo "$as_me:23646: result: $cf_cv_use_termios_h" >&5
echo "${ECHO_T}$cf_cv_use_termios_h" >&6
if test $cf_cv_use_termios_h = yes; then
	cat >>confdefs.h <<\EOF
#define HAVE_TERMIOS_H 1
EOF

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

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

fi

echo "$as_me:23663: checking for passwd.pw_gecos" >&5
echo $ECHO_N "checking for passwd.pw_gecos... $ECHO_C" >&6
if test "${cf_cv_pw_gecos+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

	cat >conftest.$ac_ext <<_ACEOF
#line 23670 "configure"
#include "confdefs.h"

#include <pwd.h>

int
main (void)
{

	struct passwd foo;
	char bar = foo.pw_gecos
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:23686: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:23689: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:23692: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:23695: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  cf_cv_pw_gecos=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
cf_cv_pw_gecos=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:23705: result: $cf_cv_pw_gecos" >&5
echo "${ECHO_T}$cf_cv_pw_gecos" >&6
test $cf_cv_pw_gecos = no && cat >>confdefs.h <<\EOF
#define DONT_HAVE_PW_GECOS 1
EOF

echo "$as_me:23711: checking for tm.tm_gmtoff" >&5
echo $ECHO_N "checking for tm.tm_gmtoff... $ECHO_C" >&6
if test "${cf_cv_tm_gmtoff+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

	cat >conftest.$ac_ext <<_ACEOF
#line 23718 "configure"
#include "confdefs.h"

#ifdef TIME_WITH_SYS_TIME
#	include <sys/time.h>
#	include <time.h>
#else
#	ifdef HAVE_SYS_TIME_H
#		include <sys/time.h>
#	else
#		include <time.h>
#	endif
#endif

int
main (void)
{

	struct tm foo;
	long bar = foo.tm_gmtoff
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:23743: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:23746: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:23749: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:23752: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  cf_cv_tm_gmtoff=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
cf_cv_tm_gmtoff=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi

echo "$as_me:23763: result: $cf_cv_tm_gmtoff" >&5
echo "${ECHO_T}$cf_cv_tm_gmtoff" >&6
test $cf_cv_tm_gmtoff = no &&
cat >>confdefs.h <<\EOF
#define DONT_HAVE_TM_GMTOFF 1
EOF

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

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

fi

for ac_header in sys/wait.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
echo "$as_me:23822: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 23828 "configure"
#include "confdefs.h"
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:23832: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  egrep -v '^ *\+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:23838: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  eval "$as_ac_Header=yes"
else
  echo "$as_me: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$as_ac_Header=no"
fi
rm -f conftest.err conftest.$ac_ext
fi
echo "$as_me:23857: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
if test `eval echo '${'$as_ac_Header'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
EOF

fi
done

cf_wait_headers="#include <sys/types.h>
"
if test $ac_cv_header_sys_wait_h = yes; then
cf_wait_headers="$cf_wait_headers
#include <sys/wait.h>
"
else

for ac_header in wait.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
echo "$as_me:23878: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 23884 "configure"
#include "confdefs.h"
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:23888: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  egrep -v '^ *\+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:23894: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  eval "$as_ac_Header=yes"
else
  echo "$as_me: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$as_ac_Header=no"
fi
rm -f conftest.err conftest.$ac_ext
fi
echo "$as_me:23913: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
if test `eval echo '${'$as_ac_Header'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
EOF

fi
done

for ac_header in waitstatus.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
echo "$as_me:23926: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 23932 "configure"
#include "confdefs.h"
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:23936: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  egrep -v '^ *\+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:23942: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  eval "$as_ac_Header=yes"
else
  echo "$as_me: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$as_ac_Header=no"
fi
rm -f conftest.err conftest.$ac_ext
fi
echo "$as_me:23961: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
if test `eval echo '${'$as_ac_Header'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
EOF

fi
done

if test $ac_cv_header_wait_h = yes; then
cf_wait_headers="$cf_wait_headers
#include <wait.h>
"
fi
if test $ac_cv_header_waitstatus_h = yes; then
cf_wait_headers="$cf_wait_headers
#include <waitstatus.h>
"
fi
fi

echo "$as_me:23983: checking for union wait" >&5
echo $ECHO_N "checking for union wait... $ECHO_C" >&6
if test "${cf_cv_type_unionwait+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

	cat >conftest.$ac_ext <<_ACEOF
#line 23990 "configure"
#include "confdefs.h"
$cf_wait_headers
int
main (void)
{
int x;
	 int y = WEXITSTATUS(x);
	 int z = WTERMSIG(x);
	 wait(&x);

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:24006: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:24009: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:24012: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:24015: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  cf_cv_type_unionwait=no
	 echo compiles ok w/o union wait 1>&5

else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5

	cat >conftest.$ac_ext <<_ACEOF
#line 24025 "configure"
#include "confdefs.h"
$cf_wait_headers
int
main (void)
{
union wait x;
#ifdef WEXITSTATUS
	 int y = WEXITSTATUS(x);
#endif
#ifdef WTERMSIG
	 int z = WTERMSIG(x);
#endif
	 wait(&x);

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:24045: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:24048: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:24051: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:24054: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  cf_cv_type_unionwait=yes
	 echo compiles ok with union wait and possibly macros too 1>&5

else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
cf_cv_type_unionwait=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi

echo "$as_me:24069: result: $cf_cv_type_unionwait" >&5
echo "${ECHO_T}$cf_cv_type_unionwait" >&6
test $cf_cv_type_unionwait = yes &&
cat >>confdefs.h <<\EOF
#define HAVE_TYPE_UNIONWAIT 1
EOF

echo "$as_me:24076: checking if the system function returns usable child-status" >&5
echo $ECHO_N "checking if the system function returns usable child-status... $ECHO_C" >&6
if test "${cf_cv_system_status+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

	if test "$cross_compiling" = yes; then
  cf_cv_system_status=unknown
else
  cat >conftest.$ac_ext <<_ACEOF
#line 24086 "configure"
#include "confdefs.h"

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

RETSIGTYPE signal_handler (int sig)
{
#if HAVE_TYPE_UNIONWAIT
	union wait wait_status;
#else
	int wait_status = 1;
#endif
	int system_status;
	wait (&wait_status);
	system_status = WEXITSTATUS(wait_status); /* should be nonzero */
	${cf_cv_main_return:-return}(system_status != 23);
}

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

_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:24120: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:24123: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:24125: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:24128: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  cf_cv_system_status=no
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
if test "$cross_compiling" = yes; then
  cf_cv_system_status=unknown
else
  cat >conftest.$ac_ext <<_ACEOF
#line 24139 "configure"
#include "confdefs.h"
int main() { ${cf_cv_main_return:-return}(system("exit 23") != (23 << 8)); }
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:24144: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:24147: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:24149: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:24152: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  cf_cv_system_status=yes
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
cf_cv_system_status=unknown
fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi

fi

echo "$as_me:24169: result: $cf_cv_system_status" >&5
echo "${ECHO_T}$cf_cv_system_status" >&6
test $cf_cv_system_status = no && cat >>confdefs.h <<\EOF
#define USE_SYSTEM_STATUS 1
EOF

# Check if we are trying to use curses+color, but cannot
if test $use_color = yes ; then
	if test $use_curses = no ; then
		cat >>confdefs.h <<\EOF
#define HAVE_COLOR 1
EOF

	elif test $cf_with_screen = pdcurses ; then
		cat >>confdefs.h <<\EOF
#define HAVE_COLOR 1
EOF

	else

if test "$cf_cv_ncurses_version" != no ; then
echo "$as_me:24190: checking for obsolete/broken version of ncurses" >&5
echo $ECHO_N "checking for obsolete/broken version of ncurses... $ECHO_C" >&6
if test "${cf_cv_ncurses_broken+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

cat >conftest.$ac_ext <<_ACEOF
#line 24197 "configure"
#include "confdefs.h"

#include <${cf_cv_ncurses_header:-curses.h}>
int
main (void)
{

#if defined(NCURSES_VERSION) && defined(wgetbkgd)
	make an error
#else
	int x = 1
#endif

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:24216: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:24219: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:24222: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:24225: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  cf_cv_ncurses_broken=no
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
cf_cv_ncurses_broken=yes
fi
rm -f conftest.$ac_objext conftest.$ac_ext

fi

echo "$as_me:24237: result: $cf_cv_ncurses_broken" >&5
echo "${ECHO_T}$cf_cv_ncurses_broken" >&6
if test "$cf_cv_ncurses_broken" = yes ; then
	{ echo "$as_me:24240: WARNING: hmm... you should get an up-to-date version of ncurses" >&5
echo "$as_me: WARNING: hmm... you should get an up-to-date version of ncurses" >&2;}

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

fi
fi

echo "$as_me:24250: checking if curses supports color attributes" >&5
echo $ECHO_N "checking if curses supports color attributes... $ECHO_C" >&6
if test "${cf_cv_color_curses+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

	cat >conftest.$ac_ext <<_ACEOF
#line 24257 "configure"
#include "confdefs.h"

#include <${cf_cv_ncurses_header:-curses.h}>

int
main (void)
{
chtype x = COLOR_BLUE;
	 has_colors();
	 start_color();
#ifndef NCURSES_BROKEN
	 wbkgd(curscr, getbkgd(stdscr)); /* X/Open XPG4 aka SVr4 Curses */
#endif

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:24277: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:24280: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:24283: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:24286: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  cf_cv_color_curses=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
cf_cv_color_curses=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext

fi

echo "$as_me:24298: result: $cf_cv_color_curses" >&5
echo "${ECHO_T}$cf_cv_color_curses" >&6
if test $cf_cv_color_curses = yes ; then

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

	test ".$cf_cv_ncurses_broken" != .yes &&
cat >>confdefs.h <<\EOF
#define HAVE_GETBKGD 1
EOF

fi

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

		else
			{ echo "$as_me:24319: WARNING: This curses library does not support color" >&5
echo "$as_me: WARNING: This curses library does not support color" >&2;}
		fi
	fi
fi

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

if test $check_sig_const = yes ; then

echo "$as_me:24338: checking for redefinable signal constants" >&5
echo $ECHO_N "checking for redefinable signal constants... $ECHO_C" >&6
if test "${cf_cv_sig_const+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

cf_cv_sig_const=no
if test -n "$cf_cv_sig_args"; then
	cf_test=`echo $cf_cv_sig_args|sed -e s/sig//`
	if test "$cross_compiling" = yes; then
  cf_cv_sig_const=unknown
else
  cat >conftest.$ac_ext <<_ACEOF
#line 24351 "configure"
#include "confdefs.h"

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

#include <signal.h>

int main()
{
	if (NEW_DFL != SIG_DFL
	 || NEW_IGN != SIG_IGN
	 || NEW_ERR != SIG_ERR
	 /* at least one system won't let me redefine these! */
#undef SIG_DFL
#undef SIG_IGN
#undef SIG_ERR
#define SIG_DFL NEW_DFL
#define SIG_IGN NEW_IGN
#define SIG_ERR NEW_ERR
	 || NEW_DFL != SIG_DFL)
	 	${cf_cv_main_return:-return}(1);
	signal(SIGINT, SIG_DFL);
	${cf_cv_main_return:-return}(0);
}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:24379: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:24382: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:24384: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:24387: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  cf_cv_sig_const=yes
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
cf_cv_sig_const=no
fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi

fi

echo "$as_me:24402: result: $cf_cv_sig_const" >&5
echo "${ECHO_T}$cf_cv_sig_const" >&6
test "$cf_cv_sig_const" = yes && cat >>confdefs.h <<\EOF
#define DECL_SIG_CONST 1
EOF

fi

echo "$as_me:24410: checking for ANSI qsort" >&5
echo $ECHO_N "checking for ANSI qsort... $ECHO_C" >&6
if test "${cf_cv_comptype+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

	cat >conftest.$ac_ext <<_ACEOF
#line 24417 "configure"
#include "confdefs.h"

#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
int
main (void)
{
extern int compare(const void *, const void *);
	 char *foo = "string";
	 qsort(foo, sizeof(foo)/sizeof(*foo), sizeof(*foo), compare)
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:24434: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:24437: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:24440: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:24443: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  cf_cv_comptype=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
cf_cv_comptype=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext

fi

echo "$as_me:24455: result: $cf_cv_comptype" >&5
echo "${ECHO_T}$cf_cv_comptype" >&6
if test $cf_cv_comptype = yes; then
	cat >>confdefs.h <<\EOF
#define HAVE_COMPTYPE_VOID 1
EOF

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

fi

echo "$as_me:24469: checking if application can dump core" >&5
echo $ECHO_N "checking if application can dump core... $ECHO_C" >&6
if test "${cf_cv_corefile+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

	if test "$cross_compiling" = yes; then
  cf_cv_corefile=unknown
else
  cat >conftest.$ac_ext <<_ACEOF
#line 24479 "configure"
#include "confdefs.h"

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

echo "$as_me:24542: result: $cf_cv_corefile" >&5
echo "${ECHO_T}$cf_cv_corefile" >&6
test $cf_cv_corefile = yes && cat >>confdefs.h <<\EOF
#define HAVE_COREFILE 1
EOF

### test this last, since it uses a partly-built autoconf.h
# Setup includes for test-program to verify declarations
CHECK_DECL_FLAG="-I$srcdir/include -I$srcdir/pcre"
CHECK_DECL_HDRS='
#define M_UNIX
#define __CPROTO__
#define HAVE_CONFDEFS_H
#include <tin.h>'
TIN_DECL_HDRS="$CHECK_DECL_HDRS"

for ac_func in \
	errno \
	getenv \
	getlogin \
	getpwnam \
	popen \
	strchr \
	strcasestr \
	strsep \
	tmpfile \

do

ac_tr_func=`echo "$ac_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`

echo "$as_me:24573: checking for missing \"${ac_func}\" extern" >&5
echo $ECHO_N "checking for missing \"${ac_func}\" extern... $ECHO_C" >&6
if eval "test \"\${cf_cv_func_${ac_func}+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

echo "${as_me:-configure}:24579: testing for missing "${ac_func}" external ..." 1>&5

cf_save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $CHECK_DECL_FLAG"
cat >conftest.$ac_ext <<_ACEOF
#line 24584 "configure"
#include "confdefs.h"

$CHECK_DECL_HDRS

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

int
main (void)
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:24602: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:24605: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:24608: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:24611: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  if test -n "$CHECK_DECL_HDRS" ; then
# try to work around system headers which are infested with non-standard syntax

cf_1_up=`echo "${ac_func}" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`

cat >conftest.$ac_ext <<_ACEOF
#line 24619 "configure"
#include "confdefs.h"

#define DECL_${cf_1_up}
$CHECK_DECL_HDRS

int
main (void)
{
long x = 0
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:24634: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:24637: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:24640: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:24643: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval 'cf_cv_func_'${ac_func}'=yes'
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval 'cf_cv_func_'${ac_func}'=no'
fi
rm -f conftest.$ac_objext conftest.$ac_ext
else
eval 'cf_cv_func_'${ac_func}'=yes'
fi

else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval 'cf_cv_func_'${ac_func}'=no'
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
CFLAGS="$cf_save_CFLAGS"

fi

eval 'cf_result=$cf_cv_func_'${ac_func}
echo "$as_me:24667: result: $cf_result" >&5
echo "${ECHO_T}$cf_result" >&6
test $cf_result = yes && cat >>confdefs.h <<EOF
#define DECL_${ac_tr_func} 1
EOF

done

CHECK_DECL_HDRS="$TIN_DECL_HDRS
#include <tnntp.h>"
for ac_func in \
	gethostbyname \
	getservbyname \
	inet_aton \
	inet_ntoa \
	socket \

do

ac_tr_func=`echo "$ac_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`

echo "$as_me:24688: checking for missing \"${ac_func}\" extern" >&5
echo $ECHO_N "checking for missing \"${ac_func}\" extern... $ECHO_C" >&6
if eval "test \"\${cf_cv_func_${ac_func}+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

echo "${as_me:-configure}:24694: testing for missing "${ac_func}" external ..." 1>&5

cf_save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $CHECK_DECL_FLAG"
cat >conftest.$ac_ext <<_ACEOF
#line 24699 "configure"
#include "confdefs.h"

$CHECK_DECL_HDRS

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

int
main (void)
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:24717: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:24720: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:24723: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:24726: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  if test -n "$CHECK_DECL_HDRS" ; then
# try to work around system headers which are infested with non-standard syntax

cf_1_up=`echo "${ac_func}" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`

cat >conftest.$ac_ext <<_ACEOF
#line 24734 "configure"
#include "confdefs.h"

#define DECL_${cf_1_up}
$CHECK_DECL_HDRS

int
main (void)
{
long x = 0
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:24749: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:24752: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:24755: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:24758: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval 'cf_cv_func_'${ac_func}'=yes'
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval 'cf_cv_func_'${ac_func}'=no'
fi
rm -f conftest.$ac_objext conftest.$ac_ext
else
eval 'cf_cv_func_'${ac_func}'=yes'
fi

else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval 'cf_cv_func_'${ac_func}'=no'
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
CFLAGS="$cf_save_CFLAGS"

fi

eval 'cf_result=$cf_cv_func_'${ac_func}
echo "$as_me:24782: result: $cf_result" >&5
echo "${ECHO_T}$cf_result" >&6
test $cf_result = yes && cat >>confdefs.h <<EOF
#define DECL_${ac_tr_func} 1
EOF

done

if test $use_curses = no ; then
CHECK_DECL_HDRS="$TIN_DECL_HDRS
#include <tcurses.h>"
for ac_func in \
	tgetstr \
	tgoto \

do

ac_tr_func=`echo "$ac_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`

echo "$as_me:24801: checking for missing \"${ac_func}\" extern" >&5
echo $ECHO_N "checking for missing \"${ac_func}\" extern... $ECHO_C" >&6
if eval "test \"\${cf_cv_func_${ac_func}+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

echo "${as_me:-configure}:24807: testing for missing "${ac_func}" external ..." 1>&5

cf_save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $CHECK_DECL_FLAG"
cat >conftest.$ac_ext <<_ACEOF
#line 24812 "configure"
#include "confdefs.h"

$CHECK_DECL_HDRS

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

int
main (void)
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:24830: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:24833: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:24836: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:24839: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  if test -n "$CHECK_DECL_HDRS" ; then
# try to work around system headers which are infested with non-standard syntax

cf_1_up=`echo "${ac_func}" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`

cat >conftest.$ac_ext <<_ACEOF
#line 24847 "configure"
#include "confdefs.h"

#define DECL_${cf_1_up}
$CHECK_DECL_HDRS

int
main (void)
{
long x = 0
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:24862: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:24865: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:24868: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:24871: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval 'cf_cv_func_'${ac_func}'=yes'
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval 'cf_cv_func_'${ac_func}'=no'
fi
rm -f conftest.$ac_objext conftest.$ac_ext
else
eval 'cf_cv_func_'${ac_func}'=yes'
fi

else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval 'cf_cv_func_'${ac_func}'=no'
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
CFLAGS="$cf_save_CFLAGS"

fi

eval 'cf_result=$cf_cv_func_'${ac_func}
echo "$as_me:24895: result: $cf_result" >&5
echo "${ECHO_T}$cf_result" >&6
test $cf_result = yes && cat >>confdefs.h <<EOF
#define DECL_${ac_tr_func} 1
EOF

done

fi

if test $with_decl_check = yes; then
CHECK_DECL_HDRS="$TIN_DECL_HDRS"
for ac_func in \
	_flsbuf \
	alarm \
	atoi \
	atol \
	atoll \
	atoq \
	bcopy \
	bzero \
	calloc \
	fchmod \
	fclose \
	fdopen \
	fflush \
	fgetc \
	fileno \
	fprintf \
	fputc \
	fputs \
	fread \
	free \
	fseek \
	fwrite \
	getcwd \
	getopt \
	getwd \
	heapsort \
	ioctl \
	isascii \
	kill \
	malloc \
	memset \
	mkstemp \
	mktemp \
	pclose \
	perror \
	printf \
	putenv \
	qsort \
	realloc \
	rename \
	rewind \
	select \
	setenv \
	snprintf \
	sscanf \
	strcasecmp \
	strftime \
	strncasecmp \
	strtol \
	strtoll \
	system \
	time \
	tolower \
	toupper \
	ungetc \
	usleep \
	vsprintf \
	vsnprintf \

do

ac_tr_func=`echo "$ac_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`

echo "$as_me:24971: checking for missing \"${ac_func}\" extern" >&5
echo $ECHO_N "checking for missing \"${ac_func}\" extern... $ECHO_C" >&6
if eval "test \"\${cf_cv_func_${ac_func}+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

echo "${as_me:-configure}:24977: testing for missing "${ac_func}" external ..." 1>&5

cf_save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $CHECK_DECL_FLAG"
cat >conftest.$ac_ext <<_ACEOF
#line 24982 "configure"
#include "confdefs.h"

$CHECK_DECL_HDRS

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

int
main (void)
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:25000: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:25003: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:25006: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:25009: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  if test -n "$CHECK_DECL_HDRS" ; then
# try to work around system headers which are infested with non-standard syntax

cf_1_up=`echo "${ac_func}" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`

cat >conftest.$ac_ext <<_ACEOF
#line 25017 "configure"
#include "confdefs.h"

#define DECL_${cf_1_up}
$CHECK_DECL_HDRS

int
main (void)
{
long x = 0
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:25032: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:25035: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:25038: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:25041: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval 'cf_cv_func_'${ac_func}'=yes'
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval 'cf_cv_func_'${ac_func}'=no'
fi
rm -f conftest.$ac_objext conftest.$ac_ext
else
eval 'cf_cv_func_'${ac_func}'=yes'
fi

else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval 'cf_cv_func_'${ac_func}'=no'
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
CFLAGS="$cf_save_CFLAGS"

fi

eval 'cf_result=$cf_cv_func_'${ac_func}
echo "$as_me:25065: result: $cf_result" >&5
echo "${ECHO_T}$cf_result" >&6
test $cf_result = yes && cat >>confdefs.h <<EOF
#define DECL_${ac_tr_func} 1
EOF

done

if test $use_curses = no ; then
CHECK_DECL_HDRS="$TIN_DECL_HDRS
#include <tcurses.h>"
for ac_func in $cf_tc_externs
do

ac_tr_func=`echo "$ac_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`

echo "$as_me:25081: checking for missing \"${ac_func}\" extern" >&5
echo $ECHO_N "checking for missing \"${ac_func}\" extern... $ECHO_C" >&6
if eval "test \"\${cf_cv_func_${ac_func}+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

echo "${as_me:-configure}:25087: testing for missing "${ac_func}" external ..." 1>&5

cf_save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $CHECK_DECL_FLAG"
cat >conftest.$ac_ext <<_ACEOF
#line 25092 "configure"
#include "confdefs.h"

$CHECK_DECL_HDRS

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

int
main (void)
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:25110: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:25113: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:25116: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:25119: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  if test -n "$CHECK_DECL_HDRS" ; then
# try to work around system headers which are infested with non-standard syntax

cf_1_up=`echo "${ac_func}" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`

cat >conftest.$ac_ext <<_ACEOF
#line 25127 "configure"
#include "confdefs.h"

#define DECL_${cf_1_up}
$CHECK_DECL_HDRS

int
main (void)
{
long x = 0
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:25142: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:25145: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:25148: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:25151: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval 'cf_cv_func_'${ac_func}'=yes'
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval 'cf_cv_func_'${ac_func}'=no'
fi
rm -f conftest.$ac_objext conftest.$ac_ext
else
eval 'cf_cv_func_'${ac_func}'=yes'
fi

else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval 'cf_cv_func_'${ac_func}'=no'
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
CFLAGS="$cf_save_CFLAGS"

fi

eval 'cf_result=$cf_cv_func_'${ac_func}
echo "$as_me:25175: result: $cf_result" >&5
echo "${ECHO_T}$cf_result" >&6
test $cf_result = yes && cat >>confdefs.h <<EOF
#define DECL_${ac_tr_func} 1
EOF

done

fi

CHECK_DECL_HDRS="$TIN_DECL_HDRS
#include <tnntp.h>"
for ac_func in \
	connect \
	gethostname \

do

ac_tr_func=`echo "$ac_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`

echo "$as_me:25195: checking for missing \"${ac_func}\" extern" >&5
echo $ECHO_N "checking for missing \"${ac_func}\" extern... $ECHO_C" >&6
if eval "test \"\${cf_cv_func_${ac_func}+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

echo "${as_me:-configure}:25201: testing for missing "${ac_func}" external ..." 1>&5

cf_save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $CHECK_DECL_FLAG"
cat >conftest.$ac_ext <<_ACEOF
#line 25206 "configure"
#include "confdefs.h"

$CHECK_DECL_HDRS

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

int
main (void)
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:25224: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:25227: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:25230: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:25233: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  if test -n "$CHECK_DECL_HDRS" ; then
# try to work around system headers which are infested with non-standard syntax

cf_1_up=`echo "${ac_func}" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`

cat >conftest.$ac_ext <<_ACEOF
#line 25241 "configure"
#include "confdefs.h"

#define DECL_${cf_1_up}
$CHECK_DECL_HDRS

int
main (void)
{
long x = 0
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:25256: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:25259: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:25262: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:25265: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval 'cf_cv_func_'${ac_func}'=yes'
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval 'cf_cv_func_'${ac_func}'=no'
fi
rm -f conftest.$ac_objext conftest.$ac_ext
else
eval 'cf_cv_func_'${ac_func}'=yes'
fi

else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval 'cf_cv_func_'${ac_func}'=no'
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
CFLAGS="$cf_save_CFLAGS"

fi

eval 'cf_result=$cf_cv_func_'${ac_func}
echo "$as_me:25289: result: $cf_result" >&5
echo "${ECHO_T}$cf_result" >&6
test $cf_result = yes && cat >>confdefs.h <<EOF
#define DECL_${ac_tr_func} 1
EOF

done

fi

echo "$as_me:25299: checking for working TIOCGWINSZ" >&5
echo $ECHO_N "checking for working TIOCGWINSZ... $ECHO_C" >&6
if test "${cf_cv_use_tiocgwinsz+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

	cf_save_CFLAGS="$CFLAGS"
	CFLAGS="$CFLAGS -D__CPROTO__ $CHECK_DECL_FLAG"
	if test "$cross_compiling" = yes; then
  cf_cv_use_tiocgwinsz=unknown
else
  cat >conftest.$ac_ext <<_ACEOF
#line 25311 "configure"
#include "confdefs.h"

$CHECK_DECL_HDRS
int main()
{
	int fd;
	for (fd = 0; fd <= 2; fd++) {	/* try in/out/err in case redirected */
#ifdef TIOCGSIZE
		struct ttysize size;
		if (ioctl (0, TIOCGSIZE, &size) == 0
		 && size.ts_lines > 0
		 && size.ts_cols > 0)
			${cf_cv_main_return:-return}(0);
#else
		struct winsize size;
		if (ioctl(0, TIOCGWINSZ, &size) == 0
		 && size.ws_row > 0
		 && size.ws_col > 0)
			${cf_cv_main_return:-return}(0);
#endif
	}
	${cf_cv_main_return:-return}(0);	/* we cannot guarantee this is run interactively */
}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:25337: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:25340: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:25342: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:25345: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  cf_cv_use_tiocgwinsz=yes
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
cf_cv_use_tiocgwinsz=no
fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
		rm -f autoconf.h
		CFLAGS="$cf_save_CFLAGS"
fi

echo "$as_me:25360: result: $cf_cv_use_tiocgwinsz" >&5
echo "${ECHO_T}$cf_cv_use_tiocgwinsz" >&6
test $cf_cv_use_tiocgwinsz != yes && cat >>confdefs.h <<\EOF
#define DONT_HAVE_SIGWINCH 1
EOF

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

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

	LIBS="$LIBS -ldmalloc"
	;;
esac

### Use gettext
### this also calls AM_LANGINFO_CODESET and AM_ICONV
### so we don't need to do the tests ourselves.
if test -n "$ac_tool_prefix"; then
  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
set dummy ${ac_tool_prefix}ranlib; ac_word=$2
echo "$as_me:25390: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_RANLIB+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$RANLIB"; then
  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
else
  ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  $as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
echo "$as_me:25405: found $ac_dir/$ac_word" >&5
break
done

fi
fi
RANLIB=$ac_cv_prog_RANLIB
if test -n "$RANLIB"; then
  echo "$as_me:25413: result: $RANLIB" >&5
echo "${ECHO_T}$RANLIB" >&6
else
  echo "$as_me:25416: result: no" >&5
echo "${ECHO_T}no" >&6
fi

fi
if test -z "$ac_cv_prog_RANLIB"; then
  ac_ct_RANLIB=$RANLIB
  # Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo "$as_me:25425: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_RANLIB"; then
  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
else
  ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  $as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_ac_ct_RANLIB="ranlib"
echo "$as_me:25440: found $ac_dir/$ac_word" >&5
break
done

  test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
fi
fi
ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
if test -n "$ac_ct_RANLIB"; then
  echo "$as_me:25449: result: $ac_ct_RANLIB" >&5
echo "${ECHO_T}$ac_ct_RANLIB" >&6
else
  echo "$as_me:25452: result: no" >&5
echo "${ECHO_T}no" >&6
fi

  RANLIB=$ac_ct_RANLIB
else
  RANLIB="$ac_cv_prog_RANLIB"
fi

# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
# for constant arguments.  Useless!
echo "$as_me:25463: checking for working alloca.h" >&5
echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6
if test "${ac_cv_working_alloca_h+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 25469 "configure"
#include "confdefs.h"
#include <alloca.h>
int
main (void)
{
char *p = (char *) alloca (2 * sizeof (int));
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:25481: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:25484: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:25487: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:25490: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_working_alloca_h=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_working_alloca_h=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:25500: result: $ac_cv_working_alloca_h" >&5
echo "${ECHO_T}$ac_cv_working_alloca_h" >&6
if test $ac_cv_working_alloca_h = yes; then

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

fi

echo "$as_me:25510: checking for alloca" >&5
echo $ECHO_N "checking for alloca... $ECHO_C" >&6
if test "${ac_cv_func_alloca_works+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 25516 "configure"
#include "confdefs.h"
#ifdef __GNUC__
# define alloca __builtin_alloca
#else
# ifdef _MSC_VER
#  include <malloc.h>
#  define alloca _alloca
# else
#  if HAVE_ALLOCA_H
#   include <alloca.h>
#  else
#   ifdef _AIX
 #pragma alloca
#   else
#    ifndef alloca /* predefined by HP cc +Olibcalls */
char *alloca ();
#    endif
#   endif
#  endif
# endif
#endif

int
main (void)
{
char *p = (char *) alloca (1);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:25548: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:25551: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:25554: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:25557: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_func_alloca_works=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_func_alloca_works=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:25567: result: $ac_cv_func_alloca_works" >&5
echo "${ECHO_T}$ac_cv_func_alloca_works" >&6

if test $ac_cv_func_alloca_works = yes; then

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

else
  # The SVR3 libPW and SVR4 libucb both contain incompatible functions
# that cause trouble.  Some versions do not even contain alloca or
# contain a buggy version.  If you still want to use their alloca,
# use ar to extract alloca.o from them instead of compiling alloca.c.

ALLOCA=alloca.$ac_objext

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

echo "$as_me:25588: checking whether \`alloca.c' needs Cray hooks" >&5
echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6
if test "${ac_cv_os_cray+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 25594 "configure"
#include "confdefs.h"
#if defined(CRAY) && ! defined(CRAY2)
webecray
#else
wenotbecray
#endif

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

fi
echo "$as_me:25612: result: $ac_cv_os_cray" >&5
echo "${ECHO_T}$ac_cv_os_cray" >&6
if test $ac_cv_os_cray = yes; then
  for ac_func in _getb67 GETB67 getb67; do
    as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:25617: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 25623 "configure"
#include "confdefs.h"
#define $ac_func autoconf_temporary
#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
#undef $ac_func

#ifdef __cplusplus
extern "C"
#endif

/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char $ac_func (void);

int
main (void)
{

/* The GNU C library defines stubs for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
#error found stub for $ac_func
#endif

	return $ac_func ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:25654: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:25657: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:25660: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:25663: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:25673: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then

cat >>confdefs.h <<EOF
#define CRAY_STACKSEG_END $ac_func
EOF

    break
fi

  done
fi

echo "$as_me:25687: checking stack direction for C alloca" >&5
echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6
if test "${ac_cv_c_stack_direction+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_c_stack_direction=0
else
  cat >conftest.$ac_ext <<_ACEOF
#line 25696 "configure"
#include "confdefs.h"
int
find_stack_direction (void)
{
  static char *addr = 0;
  auto char dummy;
  if (addr == 0)
    {
      addr = &dummy;
      return find_stack_direction ();
    }
  else
    return (&dummy > addr) ? 1 : -1;
}

int
main (void)
{
  $ac_main_return (find_stack_direction () < 0);
}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:25719: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:25722: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:25724: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:25727: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_c_stack_direction=1
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_c_stack_direction=-1
fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
echo "$as_me:25739: result: $ac_cv_c_stack_direction" >&5
echo "${ECHO_T}$ac_cv_c_stack_direction" >&6

cat >>confdefs.h <<EOF
#define STACK_DIRECTION $ac_cv_c_stack_direction
EOF

fi

for ac_header in stdlib.h unistd.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
echo "$as_me:25751: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 25757 "configure"
#include "confdefs.h"
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:25761: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  egrep -v '^ *\+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:25767: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  eval "$as_ac_Header=yes"
else
  echo "$as_me: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$as_ac_Header=no"
fi
rm -f conftest.err conftest.$ac_ext
fi
echo "$as_me:25786: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
if test `eval echo '${'$as_ac_Header'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
EOF

fi
done

for ac_func in getpagesize
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:25799: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 25805 "configure"
#include "confdefs.h"
#define $ac_func autoconf_temporary
#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
#undef $ac_func

#ifdef __cplusplus
extern "C"
#endif

/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char $ac_func (void);

int
main (void)
{

/* The GNU C library defines stubs for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
#error found stub for $ac_func
#endif

	return $ac_func ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:25836: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:25839: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:25842: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:25845: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:25855: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF

fi
done

echo "$as_me:25865: checking for working mmap" >&5
echo $ECHO_N "checking for working mmap... $ECHO_C" >&6
if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_func_mmap_fixed_mapped=no
else
  cat >conftest.$ac_ext <<_ACEOF
#line 25874 "configure"
#include "confdefs.h"
$ac_includes_default
/* Thanks to Mike Haertel and Jim Avera for this test.
   Here is a matrix of mmap possibilities:
	mmap private not fixed
	mmap private fixed at somewhere currently unmapped
	mmap private fixed at somewhere already mapped
	mmap shared not fixed
	mmap shared fixed at somewhere currently unmapped
	mmap shared fixed at somewhere already mapped
   For private mappings, we should verify that changes cannot be read()
   back from the file, nor mmap's back from the file at a different
   address.  (There have been systems where private was not correctly
   implemented like the infamous i386 svr4.0, and systems where the
   VM page cache was not coherent with the file system buffer cache
   like early versions of FreeBSD and possibly contemporary NetBSD.)
   For shared mappings, we should conversely verify that changes get
   propagated back to all the places they're supposed to be.

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

#include <fcntl.h>
#include <sys/mman.h>

#if !STDC_HEADERS && !HAVE_STDLIB_H
char *malloc ();
#endif

/* This mess was copied from the GNU getpagesize.h.  */
#if !HAVE_GETPAGESIZE
/* Assume that all systems that can run configure have sys/param.h.  */
# if !HAVE_SYS_PARAM_H
#  define HAVE_SYS_PARAM_H 1
# endif

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

#endif /* no HAVE_GETPAGESIZE */

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

  pagesize = getpagesize ();

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

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

  /* Finally, make sure that changes to the mapped area do not
     percolate back to the file as seen by read().  (This is a bug on
     some variants of i386 svr4.0.)  */
  for (i = 0; i < pagesize; ++i)
    *(data2 + i) = *(data2 + i) + 1;
  data3 = (char *) malloc (pagesize);
  if (!data3)
    $ac_main_return (1);
  if (read (fd, data3, pagesize) != pagesize)
    $ac_main_return (1);
  for (i = 0; i < pagesize; ++i)
    if (*(data + i) != *(data3 + i))
      $ac_main_return (1);
  close (fd);
  $ac_main_return (0);
}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:26001: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:26004: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:26006: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:26009: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_func_mmap_fixed_mapped=yes
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_func_mmap_fixed_mapped=no
fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
echo "$as_me:26021: result: $ac_cv_func_mmap_fixed_mapped" >&5
echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6
if test $ac_cv_func_mmap_fixed_mapped = yes; then

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

fi
rm -f conftest.mmap

echo "$as_me:26032: checking whether we are using the GNU C Library 2.1 or newer" >&5
echo $ECHO_N "checking whether we are using the GNU C Library 2.1 or newer... $ECHO_C" >&6
if test "${ac_cv_gnu_library_2_1+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 26038 "configure"
#include "confdefs.h"

#include <features.h>
#ifdef __GNU_LIBRARY__
 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
  Lucky GNU user
 #endif
#endif

_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "Lucky GNU user" >/dev/null 2>&1; then
  ac_cv_gnu_library_2_1=yes
else
  ac_cv_gnu_library_2_1=no
fi
rm -rf conftest*

fi
echo "$as_me:26058: result: $ac_cv_gnu_library_2_1" >&5
echo "${ECHO_T}$ac_cv_gnu_library_2_1" >&6

	GLIBC21="$ac_cv_gnu_library_2_1"

cf_makefile=Makefile

test -z "$ALL_LINGUAS" && ALL_LINGUAS=`test -d $srcdir/po && cd $srcdir/po && echo *.po|sed -e 's/\.po//g' -e 's/*//'`

# Allow override of "config.h" definition:
: ${CONFIG_H:=config.h}

if test -z "$PACKAGE" ; then
	{ { echo "$as_me:26071: error: CF_BUNDLED_INTL used without setting PACKAGE variable" >&5
echo "$as_me: error: CF_BUNDLED_INTL used without setting PACKAGE variable" >&2;}
   { (exit 1); exit 1; }; }
fi

if test -z "$VERSION" ; then
if test -f $srcdir/VERSION ; then
	VERSION=`sed -e '2,$d' $srcdir/VERSION|cut -f1`
else
	VERSION=unknown
fi
fi

for ac_header in argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
stdlib.h string.h unistd.h sys/param.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
echo "$as_me:26088: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 26094 "configure"
#include "confdefs.h"
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:26098: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  egrep -v '^ *\+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:26104: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  eval "$as_ac_Header=yes"
else
  echo "$as_me: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$as_ac_Header=no"
fi
rm -f conftest.err conftest.$ac_ext
fi
echo "$as_me:26123: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
if test `eval echo '${'$as_ac_Header'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
EOF

fi
done

for ac_func in feof_unlocked fgets_unlocked getcwd getegid geteuid \
getgid getuid mempcpy munmap putenv setenv setlocale stpcpy strchr strcasecmp \
strdup strtoul tsearch __argz_count __argz_stringify __argz_next
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:26138: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 26144 "configure"
#include "confdefs.h"
#define $ac_func autoconf_temporary
#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
#undef $ac_func

#ifdef __cplusplus
extern "C"
#endif

/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char $ac_func (void);

int
main (void)
{

/* The GNU C library defines stubs for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
#error found stub for $ac_func
#endif

	return $ac_func ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:26175: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:26178: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:26181: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:26184: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:26194: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF

fi
done

# Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
if test "${with_libiconv_prefix+set}" = set; then
  withval="$with_libiconv_prefix"

case "$withval" in
(no)
	;;
(yes)
	;;
(*)

for cf_searchpath in `echo "$withval" | tr $PATH_SEPARATOR ' '`; do
	if test -d $cf_searchpath/include; then

if test -n "$cf_searchpath/include" ; then
  for cf_add_incdir in $cf_searchpath/include
  do
	while test $cf_add_incdir != /usr/include
	do
	  if test -d $cf_add_incdir
	  then
		cf_have_incdir=no
		if test -n "$CFLAGS$CPPFLAGS" ; then
		  # a loop is needed to ensure we can add subdirs of existing dirs
		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
			  cf_have_incdir=yes; break
			fi
		  done
		fi

		if test "$cf_have_incdir" = no ; then
		  if test "$cf_add_incdir" = /usr/local/include ; then
			if test "$GCC" = yes
			then
			  cf_save_CPPFLAGS=$CPPFLAGS

	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
	CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"

			  cat >conftest.$ac_ext <<_ACEOF
#line 26245 "configure"
#include "confdefs.h"
#include <stdio.h>
int
main (void)
{
printf("Hello")
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:26257: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:26260: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:26263: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:26266: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  :
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
cf_have_incdir=yes
fi
rm -f conftest.$ac_objext conftest.$ac_ext
			  CPPFLAGS=$cf_save_CPPFLAGS
			fi
		  fi
		fi

		if test "$cf_have_incdir" = no ; then
		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6

echo "${as_me:-configure}:26283: testing adding $cf_add_incdir to include-path ..." 1>&5

		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"

		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
		  test "$cf_top_incdir" = "$cf_add_incdir" && break
		  cf_add_incdir="$cf_top_incdir"
		else
		  break
		fi
	  else
		break
	  fi
	done
  done
fi

	elif test -d $cf_searchpath/../include ; then

if test -n "$cf_searchpath/../include" ; then
  for cf_add_incdir in $cf_searchpath/../include
  do
	while test $cf_add_incdir != /usr/include
	do
	  if test -d $cf_add_incdir
	  then
		cf_have_incdir=no
		if test -n "$CFLAGS$CPPFLAGS" ; then
		  # a loop is needed to ensure we can add subdirs of existing dirs
		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
			  cf_have_incdir=yes; break
			fi
		  done
		fi

		if test "$cf_have_incdir" = no ; then
		  if test "$cf_add_incdir" = /usr/local/include ; then
			if test "$GCC" = yes
			then
			  cf_save_CPPFLAGS=$CPPFLAGS

	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
	CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"

			  cat >conftest.$ac_ext <<_ACEOF
#line 26329 "configure"
#include "confdefs.h"
#include <stdio.h>
int
main (void)
{
printf("Hello")
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:26341: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:26344: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:26347: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:26350: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  :
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
cf_have_incdir=yes
fi
rm -f conftest.$ac_objext conftest.$ac_ext
			  CPPFLAGS=$cf_save_CPPFLAGS
			fi
		  fi
		fi

		if test "$cf_have_incdir" = no ; then
		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6

echo "${as_me:-configure}:26367: testing adding $cf_add_incdir to include-path ..." 1>&5

		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"

		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
		  test "$cf_top_incdir" = "$cf_add_incdir" && break
		  cf_add_incdir="$cf_top_incdir"
		else
		  break
		fi
	  else
		break
	  fi
	done
  done
fi

	else
{ { echo "$as_me:26385: error: cannot find libiconv under $withval" >&5
echo "$as_me: error: cannot find libiconv under $withval" >&2;}
   { (exit 1); exit 1; }; }
	fi
	if test -d $cf_searchpath/lib; then

if test -n "$cf_searchpath/lib" ; then
	for cf_add_libdir in $cf_searchpath/lib
	do
		if test $cf_add_libdir = /usr/lib ; then
			:
		elif test -d $cf_add_libdir
		then
			cf_have_libdir=no
			if test -n "$LDFLAGS$LIBS" ; then
				# a loop is needed to ensure we can add subdirs of existing dirs
				for cf_test_libdir in $LDFLAGS $LIBS ; do
					if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
						cf_have_libdir=yes; break
					fi
				done
			fi
			if test "$cf_have_libdir" = no ; then
				test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6

echo "${as_me:-configure}:26410: testing adding $cf_add_libdir to library-path ..." 1>&5

				LDFLAGS="-L$cf_add_libdir $LDFLAGS"
			fi
		fi
	done
fi

	elif test -d $cf_searchpath ; then

if test -n "$cf_searchpath" ; then
	for cf_add_libdir in $cf_searchpath
	do
		if test $cf_add_libdir = /usr/lib ; then
			:
		elif test -d $cf_add_libdir
		then
			cf_have_libdir=no
			if test -n "$LDFLAGS$LIBS" ; then
				# a loop is needed to ensure we can add subdirs of existing dirs
				for cf_test_libdir in $LDFLAGS $LIBS ; do
					if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
						cf_have_libdir=yes; break
					fi
				done
			fi
			if test "$cf_have_libdir" = no ; then
				test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6

echo "${as_me:-configure}:26439: testing adding $cf_add_libdir to library-path ..." 1>&5

				LDFLAGS="-L$cf_add_libdir $LDFLAGS"
			fi
		fi
	done
fi

	else
{ { echo "$as_me:26448: error: cannot find libiconv under $withval" >&5
echo "$as_me: error: cannot find libiconv under $withval" >&2;}
   { (exit 1); exit 1; }; }
	fi
done

	;;
esac

fi;

  echo "$as_me:26459: checking for iconv" >&5
echo $ECHO_N "checking for iconv... $ECHO_C" >&6
if test "${am_cv_func_iconv+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

# If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
# will be set on completion of the AC_TRY_LINK below.
cf_cv_header_path_iconv=
cf_cv_library_path_iconv=

echo "${as_me:-configure}:26470: testing Starting FIND_LINKAGE(iconv,) ..." 1>&5

cf_save_LIBS="$LIBS"

cat >conftest.$ac_ext <<_ACEOF
#line 26475 "configure"
#include "confdefs.h"

#include <stdlib.h>
#include <iconv.h>

int
main (void)
{

	iconv_t cd = iconv_open("","");
	iconv(cd,NULL,NULL,NULL,NULL);
	iconv_close(cd);

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:26494: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:26497: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:26500: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:26503: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then

	cf_cv_find_linkage_iconv=yes
	cf_cv_header_path_iconv=/usr/include
	cf_cv_library_path_iconv=/usr/lib

else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5

LIBS="-liconv  $cf_save_LIBS"

cat >conftest.$ac_ext <<_ACEOF
#line 26517 "configure"
#include "confdefs.h"

#include <stdlib.h>
#include <iconv.h>

int
main (void)
{

	iconv_t cd = iconv_open("","");
	iconv(cd,NULL,NULL,NULL,NULL);
	iconv_close(cd);

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:26536: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:26539: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:26542: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:26545: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then

	cf_cv_find_linkage_iconv=yes
	cf_cv_header_path_iconv=/usr/include
	cf_cv_library_path_iconv=/usr/lib
	cf_cv_library_file_iconv="-liconv"

else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5

	cf_cv_find_linkage_iconv=no
	LIBS="$cf_save_LIBS"

	test -n "$verbose" && echo "	find linkage for iconv library" 1>&6

echo "${as_me:-configure}:26562: testing find linkage for iconv library ..." 1>&5

echo "${as_me:-configure}:26564: testing Searching for headers in FIND_LINKAGE(iconv,) ..." 1>&5

	cf_save_CPPFLAGS="$CPPFLAGS"
	cf_test_CPPFLAGS="$CPPFLAGS"

cf_search=

# collect the current set of include-directories from compiler flags
cf_header_path_list=""
if test -n "${CFLAGS}${CPPFLAGS}" ; then
	for cf_header_path in $CPPFLAGS $CFLAGS
	do
		case $cf_header_path in
		(-I*)
			cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`

test "x$cf_header_path" != "xNONE" && \
test -d "$cf_header_path" && \
 {
	test -n "$verbose" && echo "	... testing for include-directories under $cf_header_path"
	test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
	test -d $cf_header_path/include/iconv &&       cf_search="$cf_search $cf_header_path/include/iconv"
	test -d $cf_header_path/include/iconv/include &&    cf_search="$cf_search $cf_header_path/include/iconv/include"
	test -d $cf_header_path/iconv/include &&       cf_search="$cf_search $cf_header_path/iconv/include"
	test -d $cf_header_path/iconv/include/iconv &&    cf_search="$cf_search $cf_header_path/iconv/include/iconv"
}

			cf_header_path_list="$cf_header_path_list $cf_search"
			;;
		esac
	done
fi

# add the variations for the package we are looking for

cf_search=

test "x$prefix" != "xNONE" && \
test -d "$prefix" && \
 {
	test -n "$verbose" && echo "	... testing for include-directories under $prefix"
	test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
	test -d $prefix/include/iconv &&       cf_search="$cf_search $prefix/include/iconv"
	test -d $prefix/include/iconv/include &&    cf_search="$cf_search $prefix/include/iconv/include"
	test -d $prefix/iconv/include &&       cf_search="$cf_search $prefix/iconv/include"
	test -d $prefix/iconv/include/iconv &&    cf_search="$cf_search $prefix/iconv/include/iconv"
}

for cf_subdir_prefix in \
	/usr \
	/usr/local \
	/usr/pkg \
	/opt \
	/opt/local \
	$HOME
do

test "x$cf_subdir_prefix" != "x$prefix" && \
test -d "$cf_subdir_prefix" && \
(test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
	test -n "$verbose" && echo "	... testing for include-directories under $cf_subdir_prefix"
	test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
	test -d $cf_subdir_prefix/include/iconv &&       cf_search="$cf_search $cf_subdir_prefix/include/iconv"
	test -d $cf_subdir_prefix/include/iconv/include &&    cf_search="$cf_search $cf_subdir_prefix/include/iconv/include"
	test -d $cf_subdir_prefix/iconv/include &&       cf_search="$cf_search $cf_subdir_prefix/iconv/include"
	test -d $cf_subdir_prefix/iconv/include/iconv &&    cf_search="$cf_search $cf_subdir_prefix/iconv/include/iconv"
}

done

test "$includedir" != NONE && \
test "$includedir" != "/usr/include" && \
test -d "$includedir" && {
	test -d $includedir &&    cf_search="$cf_search $includedir"
	test -d $includedir/iconv && cf_search="$cf_search $includedir/iconv"
}

test "$oldincludedir" != NONE && \
test "$oldincludedir" != "/usr/include" && \
test -d "$oldincludedir" && {
	test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
	test -d $oldincludedir/iconv && cf_search="$cf_search $oldincludedir/iconv"
}

cf_search="$cf_search $cf_header_path_list"

	for cf_cv_header_path_iconv in $cf_search
	do
		if test -d $cf_cv_header_path_iconv ; then
			test -n "$verbose" && echo "	... testing $cf_cv_header_path_iconv" 1>&6

echo "${as_me:-configure}:26655: testing ... testing $cf_cv_header_path_iconv ..." 1>&5

			CPPFLAGS="$cf_save_CPPFLAGS"

	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
	CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_iconv"

			cat >conftest.$ac_ext <<_ACEOF
#line 26663 "configure"
#include "confdefs.h"

#include <stdlib.h>
#include <iconv.h>

int
main (void)
{

	iconv_t cd = iconv_open("","");
	iconv(cd,NULL,NULL,NULL,NULL);
	iconv_close(cd);

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:26682: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:26685: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:26688: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:26691: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then

				test -n "$verbose" && echo "	... found iconv headers in $cf_cv_header_path_iconv" 1>&6

echo "${as_me:-configure}:26696: testing ... found iconv headers in $cf_cv_header_path_iconv ..." 1>&5

				cf_cv_find_linkage_iconv=maybe
				cf_test_CPPFLAGS="$CPPFLAGS"
				break
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5

				CPPFLAGS="$cf_save_CPPFLAGS"

fi
rm -f conftest.$ac_objext conftest.$ac_ext
		fi
	done

	if test "$cf_cv_find_linkage_iconv" = maybe ; then

echo "${as_me:-configure}:26714: testing Searching for iconv library in FIND_LINKAGE(iconv,) ..." 1>&5

		cf_save_LIBS="$LIBS"
		cf_save_LDFLAGS="$LDFLAGS"

		if test "$cf_cv_find_linkage_iconv" != yes ; then

cf_search=
cf_library_path_list=""
if test -n "${LDFLAGS}${LIBS}" ; then
	for cf_library_path in $LDFLAGS $LIBS
	do
		case $cf_library_path in
		(-L*)
			cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`

test "x$cf_library_path" != "xNONE" && \
test -d "$cf_library_path" && \
 {
	test -n "$verbose" && echo "	... testing for lib-directories under $cf_library_path"
	test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
	test -d $cf_library_path/lib/iconv &&       cf_search="$cf_search $cf_library_path/lib/iconv"
	test -d $cf_library_path/lib/iconv/lib &&    cf_search="$cf_search $cf_library_path/lib/iconv/lib"
	test -d $cf_library_path/iconv/lib &&       cf_search="$cf_search $cf_library_path/iconv/lib"
	test -d $cf_library_path/iconv/lib/iconv &&    cf_search="$cf_search $cf_library_path/iconv/lib/iconv"
}

			cf_library_path_list="$cf_library_path_list $cf_search"
			;;
		esac
	done
fi

cf_search=

test "x$prefix" != "xNONE" && \
test -d "$prefix" && \
 {
	test -n "$verbose" && echo "	... testing for lib-directories under $prefix"
	test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
	test -d $prefix/lib/iconv &&       cf_search="$cf_search $prefix/lib/iconv"
	test -d $prefix/lib/iconv/lib &&    cf_search="$cf_search $prefix/lib/iconv/lib"
	test -d $prefix/iconv/lib &&       cf_search="$cf_search $prefix/iconv/lib"
	test -d $prefix/iconv/lib/iconv &&    cf_search="$cf_search $prefix/iconv/lib/iconv"
}

for cf_subdir_prefix in \
	/usr \
	/usr/local \
	/usr/pkg \
	/opt \
	/opt/local \
	$HOME
do

test "x$cf_subdir_prefix" != "x$prefix" && \
test -d "$cf_subdir_prefix" && \
(test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
	test -n "$verbose" && echo "	... testing for lib-directories under $cf_subdir_prefix"
	test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
	test -d $cf_subdir_prefix/lib/iconv &&       cf_search="$cf_search $cf_subdir_prefix/lib/iconv"
	test -d $cf_subdir_prefix/lib/iconv/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/iconv/lib"
	test -d $cf_subdir_prefix/iconv/lib &&       cf_search="$cf_search $cf_subdir_prefix/iconv/lib"
	test -d $cf_subdir_prefix/iconv/lib/iconv &&    cf_search="$cf_search $cf_subdir_prefix/iconv/lib/iconv"
}

done

cf_search="$cf_library_path_list $cf_search"

			for cf_cv_library_path_iconv in $cf_search
			do
				if test -d $cf_cv_library_path_iconv ; then
					test -n "$verbose" && echo "	... testing $cf_cv_library_path_iconv" 1>&6

echo "${as_me:-configure}:26789: testing ... testing $cf_cv_library_path_iconv ..." 1>&5

					CPPFLAGS="$cf_test_CPPFLAGS"
					LIBS="-liconv  $cf_save_LIBS"
					LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_iconv"
					cat >conftest.$ac_ext <<_ACEOF
#line 26795 "configure"
#include "confdefs.h"

#include <stdlib.h>
#include <iconv.h>

int
main (void)
{

	iconv_t cd = iconv_open("","");
	iconv(cd,NULL,NULL,NULL,NULL);
	iconv_close(cd);

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:26814: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:26817: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:26820: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:26823: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then

					test -n "$verbose" && echo "	... found iconv library in $cf_cv_library_path_iconv" 1>&6

echo "${as_me:-configure}:26828: testing ... found iconv library in $cf_cv_library_path_iconv ..." 1>&5

					cf_cv_find_linkage_iconv=yes
					cf_cv_library_file_iconv="-liconv"
					break
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5

					CPPFLAGS="$cf_save_CPPFLAGS"
					LIBS="$cf_save_LIBS"
					LDFLAGS="$cf_save_LDFLAGS"

fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
				fi
			done
			CPPFLAGS="$cf_save_CPPFLAGS"
			LDFLAGS="$cf_save_LDFLAGS"
		fi

	else
		cf_cv_find_linkage_iconv=no
	fi

fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext

fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext

LIBS="$cf_save_LIBS"

if test "$cf_cv_find_linkage_iconv" = yes ; then
am_cv_func_iconv=yes
else
am_cv_func_iconv="no, consider installing GNU libiconv"
fi

fi
echo "$as_me:26868: result: $am_cv_func_iconv" >&5
echo "${ECHO_T}$am_cv_func_iconv" >&6

  if test "$am_cv_func_iconv" = yes; then

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

    echo "$as_me:26877: checking if the declaration of iconv() needs const." >&5
echo $ECHO_N "checking if the declaration of iconv() needs const.... $ECHO_C" >&6
if test "${am_cv_proto_iconv_const+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

      cat >conftest.$ac_ext <<_ACEOF
#line 26884 "configure"
#include "confdefs.h"

#include <stdlib.h>
#include <iconv.h>

extern
#ifdef __cplusplus
"C"
#endif
#if defined(__STDC__) || defined(__cplusplus)
size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
#else
size_t iconv();
#endif

int
main (void)
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:26909: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:26912: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:26915: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:26918: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  am_cv_proto_iconv_const=no
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
am_cv_proto_iconv_const=yes
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:26928: result: $am_cv_proto_iconv_const" >&5
echo "${ECHO_T}$am_cv_proto_iconv_const" >&6

    if test "$am_cv_proto_iconv_const" = yes ; then
      am_cv_proto_iconv_arg1="const"
    else
      am_cv_proto_iconv_arg1=""
    fi

cat >>confdefs.h <<EOF
#define ICONV_CONST $am_cv_proto_iconv_arg1
EOF

  fi

  LIBICONV=
  if test "$cf_cv_find_linkage_iconv" = yes; then

if test -n "$cf_cv_header_path_iconv" ; then
  for cf_add_incdir in $cf_cv_header_path_iconv
  do
	while test $cf_add_incdir != /usr/include
	do
	  if test -d $cf_add_incdir
	  then
		cf_have_incdir=no
		if test -n "$CFLAGS$CPPFLAGS" ; then
		  # a loop is needed to ensure we can add subdirs of existing dirs
		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
			  cf_have_incdir=yes; break
			fi
		  done
		fi

		if test "$cf_have_incdir" = no ; then
		  if test "$cf_add_incdir" = /usr/local/include ; then
			if test "$GCC" = yes
			then
			  cf_save_CPPFLAGS=$CPPFLAGS

	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
	CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"

			  cat >conftest.$ac_ext <<_ACEOF
#line 26973 "configure"
#include "confdefs.h"
#include <stdio.h>
int
main (void)
{
printf("Hello")
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:26985: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:26988: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:26991: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:26994: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  :
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
cf_have_incdir=yes
fi
rm -f conftest.$ac_objext conftest.$ac_ext
			  CPPFLAGS=$cf_save_CPPFLAGS
			fi
		  fi
		fi

		if test "$cf_have_incdir" = no ; then
		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6

echo "${as_me:-configure}:27011: testing adding $cf_add_incdir to include-path ..." 1>&5

		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"

		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
		  test "$cf_top_incdir" = "$cf_add_incdir" && break
		  cf_add_incdir="$cf_top_incdir"
		else
		  break
		fi
	  else
		break
	  fi
	done
  done
fi

    if test -n "$cf_cv_library_file_iconv" ; then
      LIBICONV="-liconv"

if test -n "$cf_cv_library_path_iconv" ; then
	for cf_add_libdir in $cf_cv_library_path_iconv
	do
		if test $cf_add_libdir = /usr/lib ; then
			:
		elif test -d $cf_add_libdir
		then
			cf_have_libdir=no
			if test -n "$LDFLAGS$LIBS" ; then
				# a loop is needed to ensure we can add subdirs of existing dirs
				for cf_test_libdir in $LDFLAGS $LIBS ; do
					if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
						cf_have_libdir=yes; break
					fi
				done
			fi
			if test "$cf_have_libdir" = no ; then
				test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6

echo "${as_me:-configure}:27050: testing adding $cf_add_libdir to library-path ..." 1>&5

				LDFLAGS="-L$cf_add_libdir $LDFLAGS"
			fi
		fi
	done
fi

    fi
  fi

echo "$as_me:27061: checking for nl_langinfo and CODESET" >&5
echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
if test "${am_cv_langinfo_codeset+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 27067 "configure"
#include "confdefs.h"
#include <langinfo.h>
int
main (void)
{
char* cs = nl_langinfo(CODESET);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:27079: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:27082: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:27085: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:27088: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  am_cv_langinfo_codeset=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
am_cv_langinfo_codeset=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext

fi
echo "$as_me:27099: result: $am_cv_langinfo_codeset" >&5
echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
	if test $am_cv_langinfo_codeset = yes; then

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

	fi

   if test $ac_cv_header_locale_h = yes; then
	echo "$as_me:27110: checking for LC_MESSAGES" >&5
echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6
if test "${am_cv_val_LC_MESSAGES+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 27116 "configure"
#include "confdefs.h"
#include <locale.h>
int
main (void)
{
return LC_MESSAGES
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:27128: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:27131: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:27134: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:27137: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  am_cv_val_LC_MESSAGES=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
am_cv_val_LC_MESSAGES=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:27147: result: $am_cv_val_LC_MESSAGES" >&5
echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6
	if test $am_cv_val_LC_MESSAGES = yes; then

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

	fi
fi
   echo "$as_me:27157: checking whether NLS is requested" >&5
echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6

# Check whether --enable-nls or --disable-nls was given.
if test "${enable_nls+set}" = set; then
  enableval="$enable_nls"
  USE_NLS=$enableval
else
  USE_NLS=yes
fi;
  echo "$as_me:27167: result: $USE_NLS" >&5
echo "${ECHO_T}$USE_NLS" >&6

  BUILD_INCLUDED_LIBINTL=no
  USE_INCLUDED_LIBINTL=no
  INTLLIBS=

    if test "$USE_NLS" = "yes"; then
        POSUB=po

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

    echo "$as_me:27181: checking whether included gettext is requested" >&5
echo $ECHO_N "checking whether included gettext is requested... $ECHO_C" >&6

# Check whether --with-included-gettext or --without-included-gettext was given.
if test "${with_included_gettext+set}" = set; then
  withval="$with_included_gettext"
  nls_cv_force_use_gnu_gettext=$withval
else
  nls_cv_force_use_gnu_gettext=no
fi;
    echo "$as_me:27191: result: $nls_cv_force_use_gnu_gettext" >&5
echo "${ECHO_T}$nls_cv_force_use_gnu_gettext" >&6

    nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
    if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
                        CATOBJEXT=NONE

                                          cf_save_msgfmt_path="$MSGFMT"
      cf_save_xgettext_path="$XGETTEXT"

            # Extract the first word of "msgfmt", so it can be a program name with args.

set dummy msgfmt; ac_word=$2
echo "$as_me:27204: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_path_MSGFMT+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case "$MSGFMT" in
  ([\\/]*|?:[\\/]*)
  ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
  ;;
  (*)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
  for ac_dir in $PATH; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word$ac_exeext; then
      if $ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1; then
	ac_cv_path_MSGFMT="$ac_dir/$ac_word$ac_exeext"
	break
      fi
    fi
  done
  IFS="$ac_save_ifs"
  test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
  ;;
esac
fi
MSGFMT="$ac_cv_path_MSGFMT"
if test "$MSGFMT" != ":"; then
  echo "$as_me:27231: result: $MSGFMT" >&5
echo "${ECHO_T}$MSGFMT" >&6
else
  echo "$as_me:27234: result: no" >&5
echo "${ECHO_T}no" >&6
fi

      # Extract the first word of "gmsgfmt", so it can be a program name with args.
set dummy gmsgfmt; ac_word=$2
echo "$as_me:27240: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_path_GMSGFMT+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $GMSGFMT in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
  ;;
  *)
  ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  if $as_executable_p "$ac_dir/$ac_word"; then
   ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
   echo "$as_me:27257: found $ac_dir/$ac_word" >&5
   break
fi
done

  test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
  ;;
esac
fi
GMSGFMT=$ac_cv_path_GMSGFMT

if test -n "$GMSGFMT"; then
  echo "$as_me:27269: result: $GMSGFMT" >&5
echo "${ECHO_T}$GMSGFMT" >&6
else
  echo "$as_me:27272: result: no" >&5
echo "${ECHO_T}no" >&6
fi

            # Extract the first word of "xgettext", so it can be a program name with args.

set dummy xgettext; ac_word=$2
echo "$as_me:27279: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_path_XGETTEXT+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case "$XGETTEXT" in
  ([\\/]*|?:[\\/]*)
  ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
  ;;
  (*)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
  for ac_dir in $PATH; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word$ac_exeext; then
      if $ac_dir/$ac_word --omit-header /dev/null >/dev/null 2>&1; then
	ac_cv_path_XGETTEXT="$ac_dir/$ac_word$ac_exeext"
	break
      fi
    fi
  done
  IFS="$ac_save_ifs"
  test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
  ;;
esac
fi
XGETTEXT="$ac_cv_path_XGETTEXT"
if test "$XGETTEXT" != ":"; then
  echo "$as_me:27306: result: $XGETTEXT" >&5
echo "${ECHO_T}$XGETTEXT" >&6
else
  echo "$as_me:27309: result: no" >&5
echo "${ECHO_T}no" >&6
fi

      cf_save_OPTS_1="$CPPFLAGS"
      if test "x$cf_save_msgfmt_path" = "x$MSGFMT" && \
         test "x$cf_save_xgettext_path" = "x$XGETTEXT" ; then

cf_fix_cppflags=no
cf_new_cflags=
cf_new_cppflags=
cf_new_extra_cppflags=

for cf_add_cflags in -DIGNORE_MSGFMT_HACK
do
case $cf_fix_cppflags in
(no)
	case $cf_add_cflags in
	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
		case $cf_add_cflags in
		(-D*)
			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`

			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
				&& test -z "${cf_tst_cflags}" \
				&& cf_fix_cppflags=yes

			if test $cf_fix_cppflags = yes ; then

	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"

				continue
			elif test "${cf_tst_cflags}" = "\"'" ; then

	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"

				continue
			fi
			;;
		esac
		case "$CPPFLAGS" in
		(*$cf_add_cflags)
			;;
		(*)
			case $cf_add_cflags in
			(-D*)
				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`

CPPFLAGS=`echo "$CPPFLAGS" | \
	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`

				;;
			esac

	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"

			;;
		esac
		;;
	(*)

	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"

		;;
	esac
	;;
(yes)

	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"

	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`

	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
		&& test -z "${cf_tst_cflags}" \
		&& cf_fix_cppflags=no
	;;
esac
done

if test -n "$cf_new_cflags" ; then

	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
	CFLAGS="${CFLAGS}$cf_new_cflags"

fi

if test -n "$cf_new_cppflags" ; then

	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"

fi

if test -n "$cf_new_extra_cppflags" ; then

	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"

fi

      fi

      cf_save_LIBS_1="$LIBS"

cf_add_libs="$LIBICONV"
# Filter out duplicates - this happens with badly-designed ".pc" files...
for cf_add_1lib in $LIBS
do
	for cf_add_2lib in $cf_add_libs
	do
		if test "x$cf_add_1lib" = "x$cf_add_2lib"
		then
			cf_add_1lib=
			break
		fi
	done
	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
done
LIBS="$cf_add_libs"

# If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
# will be set on completion of the AC_TRY_LINK below.
cf_cv_header_path_intl=
cf_cv_library_path_intl=

echo "${as_me:-configure}:27440: testing Starting FIND_LINKAGE(intl,) ..." 1>&5

cf_save_LIBS="$LIBS"

cat >conftest.$ac_ext <<_ACEOF
#line 27445 "configure"
#include "confdefs.h"

#include <libintl.h>
extern int _nl_msg_cat_cntr;

int
main (void)
{

	bindtextdomain ("", "");
	return (int) gettext ("")

#ifndef IGNORE_MSGFMT_HACK
			 + _nl_msg_cat_cntr
#endif

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:27467: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:27470: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:27473: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:27476: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then

	cf_cv_find_linkage_intl=yes
	cf_cv_header_path_intl=/usr/include
	cf_cv_library_path_intl=/usr/lib

else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5

LIBS="-lintl  $cf_save_LIBS"

cat >conftest.$ac_ext <<_ACEOF
#line 27490 "configure"
#include "confdefs.h"

#include <libintl.h>
extern int _nl_msg_cat_cntr;

int
main (void)
{

	bindtextdomain ("", "");
	return (int) gettext ("")

#ifndef IGNORE_MSGFMT_HACK
			 + _nl_msg_cat_cntr
#endif

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:27512: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:27515: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:27518: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:27521: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then

	cf_cv_find_linkage_intl=yes
	cf_cv_header_path_intl=/usr/include
	cf_cv_library_path_intl=/usr/lib
	cf_cv_library_file_intl="-lintl"

else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5

	cf_cv_find_linkage_intl=no
	LIBS="$cf_save_LIBS"

	test -n "$verbose" && echo "	find linkage for intl library" 1>&6

echo "${as_me:-configure}:27538: testing find linkage for intl library ..." 1>&5

echo "${as_me:-configure}:27540: testing Searching for headers in FIND_LINKAGE(intl,) ..." 1>&5

	cf_save_CPPFLAGS="$CPPFLAGS"
	cf_test_CPPFLAGS="$CPPFLAGS"

cf_search=

# collect the current set of include-directories from compiler flags
cf_header_path_list=""
if test -n "${CFLAGS}${CPPFLAGS}" ; then
	for cf_header_path in $CPPFLAGS $CFLAGS
	do
		case $cf_header_path in
		(-I*)
			cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`

test "x$cf_header_path" != "xNONE" && \
test -d "$cf_header_path" && \
 {
	test -n "$verbose" && echo "	... testing for include-directories under $cf_header_path"
	test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
	test -d $cf_header_path/include/intl &&       cf_search="$cf_search $cf_header_path/include/intl"
	test -d $cf_header_path/include/intl/include &&    cf_search="$cf_search $cf_header_path/include/intl/include"
	test -d $cf_header_path/intl/include &&       cf_search="$cf_search $cf_header_path/intl/include"
	test -d $cf_header_path/intl/include/intl &&    cf_search="$cf_search $cf_header_path/intl/include/intl"
}

			cf_header_path_list="$cf_header_path_list $cf_search"
			;;
		esac
	done
fi

# add the variations for the package we are looking for

cf_search=

test "x$prefix" != "xNONE" && \
test -d "$prefix" && \
 {
	test -n "$verbose" && echo "	... testing for include-directories under $prefix"
	test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
	test -d $prefix/include/intl &&       cf_search="$cf_search $prefix/include/intl"
	test -d $prefix/include/intl/include &&    cf_search="$cf_search $prefix/include/intl/include"
	test -d $prefix/intl/include &&       cf_search="$cf_search $prefix/intl/include"
	test -d $prefix/intl/include/intl &&    cf_search="$cf_search $prefix/intl/include/intl"
}

for cf_subdir_prefix in \
	/usr \
	/usr/local \
	/usr/pkg \
	/opt \
	/opt/local \
	$HOME
do

test "x$cf_subdir_prefix" != "x$prefix" && \
test -d "$cf_subdir_prefix" && \
(test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
	test -n "$verbose" && echo "	... testing for include-directories under $cf_subdir_prefix"
	test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
	test -d $cf_subdir_prefix/include/intl &&       cf_search="$cf_search $cf_subdir_prefix/include/intl"
	test -d $cf_subdir_prefix/include/intl/include &&    cf_search="$cf_search $cf_subdir_prefix/include/intl/include"
	test -d $cf_subdir_prefix/intl/include &&       cf_search="$cf_search $cf_subdir_prefix/intl/include"
	test -d $cf_subdir_prefix/intl/include/intl &&    cf_search="$cf_search $cf_subdir_prefix/intl/include/intl"
}

done

test "$includedir" != NONE && \
test "$includedir" != "/usr/include" && \
test -d "$includedir" && {
	test -d $includedir &&    cf_search="$cf_search $includedir"
	test -d $includedir/intl && cf_search="$cf_search $includedir/intl"
}

test "$oldincludedir" != NONE && \
test "$oldincludedir" != "/usr/include" && \
test -d "$oldincludedir" && {
	test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
	test -d $oldincludedir/intl && cf_search="$cf_search $oldincludedir/intl"
}

cf_search="$cf_search $cf_header_path_list"

	for cf_cv_header_path_intl in $cf_search
	do
		if test -d $cf_cv_header_path_intl ; then
			test -n "$verbose" && echo "	... testing $cf_cv_header_path_intl" 1>&6

echo "${as_me:-configure}:27631: testing ... testing $cf_cv_header_path_intl ..." 1>&5

			CPPFLAGS="$cf_save_CPPFLAGS"

	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
	CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_intl"

			cat >conftest.$ac_ext <<_ACEOF
#line 27639 "configure"
#include "confdefs.h"

#include <libintl.h>
extern int _nl_msg_cat_cntr;

int
main (void)
{

	bindtextdomain ("", "");
	return (int) gettext ("")

#ifndef IGNORE_MSGFMT_HACK
			 + _nl_msg_cat_cntr
#endif

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:27661: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:27664: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:27667: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:27670: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then

				test -n "$verbose" && echo "	... found intl headers in $cf_cv_header_path_intl" 1>&6

echo "${as_me:-configure}:27675: testing ... found intl headers in $cf_cv_header_path_intl ..." 1>&5

				cf_cv_find_linkage_intl=maybe
				cf_test_CPPFLAGS="$CPPFLAGS"
				break
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5

				CPPFLAGS="$cf_save_CPPFLAGS"

fi
rm -f conftest.$ac_objext conftest.$ac_ext
		fi
	done

	if test "$cf_cv_find_linkage_intl" = maybe ; then

echo "${as_me:-configure}:27693: testing Searching for intl library in FIND_LINKAGE(intl,) ..." 1>&5

		cf_save_LIBS="$LIBS"
		cf_save_LDFLAGS="$LDFLAGS"

		if test "$cf_cv_find_linkage_intl" != yes ; then

cf_search=
cf_library_path_list=""
if test -n "${LDFLAGS}${LIBS}" ; then
	for cf_library_path in $LDFLAGS $LIBS
	do
		case $cf_library_path in
		(-L*)
			cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`

test "x$cf_library_path" != "xNONE" && \
test -d "$cf_library_path" && \
 {
	test -n "$verbose" && echo "	... testing for lib-directories under $cf_library_path"
	test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
	test -d $cf_library_path/lib/intl &&       cf_search="$cf_search $cf_library_path/lib/intl"
	test -d $cf_library_path/lib/intl/lib &&    cf_search="$cf_search $cf_library_path/lib/intl/lib"
	test -d $cf_library_path/intl/lib &&       cf_search="$cf_search $cf_library_path/intl/lib"
	test -d $cf_library_path/intl/lib/intl &&    cf_search="$cf_search $cf_library_path/intl/lib/intl"
}

			cf_library_path_list="$cf_library_path_list $cf_search"
			;;
		esac
	done
fi

cf_search=

test "x$prefix" != "xNONE" && \
test -d "$prefix" && \
 {
	test -n "$verbose" && echo "	... testing for lib-directories under $prefix"
	test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
	test -d $prefix/lib/intl &&       cf_search="$cf_search $prefix/lib/intl"
	test -d $prefix/lib/intl/lib &&    cf_search="$cf_search $prefix/lib/intl/lib"
	test -d $prefix/intl/lib &&       cf_search="$cf_search $prefix/intl/lib"
	test -d $prefix/intl/lib/intl &&    cf_search="$cf_search $prefix/intl/lib/intl"
}

for cf_subdir_prefix in \
	/usr \
	/usr/local \
	/usr/pkg \
	/opt \
	/opt/local \
	$HOME
do

test "x$cf_subdir_prefix" != "x$prefix" && \
test -d "$cf_subdir_prefix" && \
(test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
	test -n "$verbose" && echo "	... testing for lib-directories under $cf_subdir_prefix"
	test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
	test -d $cf_subdir_prefix/lib/intl &&       cf_search="$cf_search $cf_subdir_prefix/lib/intl"
	test -d $cf_subdir_prefix/lib/intl/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/intl/lib"
	test -d $cf_subdir_prefix/intl/lib &&       cf_search="$cf_search $cf_subdir_prefix/intl/lib"
	test -d $cf_subdir_prefix/intl/lib/intl &&    cf_search="$cf_search $cf_subdir_prefix/intl/lib/intl"
}

done

cf_search="$cf_library_path_list $cf_search"

			for cf_cv_library_path_intl in $cf_search
			do
				if test -d $cf_cv_library_path_intl ; then
					test -n "$verbose" && echo "	... testing $cf_cv_library_path_intl" 1>&6

echo "${as_me:-configure}:27768: testing ... testing $cf_cv_library_path_intl ..." 1>&5

					CPPFLAGS="$cf_test_CPPFLAGS"
					LIBS="-lintl  $cf_save_LIBS"
					LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_intl"
					cat >conftest.$ac_ext <<_ACEOF
#line 27774 "configure"
#include "confdefs.h"

#include <libintl.h>
extern int _nl_msg_cat_cntr;

int
main (void)
{

	bindtextdomain ("", "");
	return (int) gettext ("")

#ifndef IGNORE_MSGFMT_HACK
			 + _nl_msg_cat_cntr
#endif

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:27796: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:27799: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:27802: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:27805: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then

					test -n "$verbose" && echo "	... found intl library in $cf_cv_library_path_intl" 1>&6

echo "${as_me:-configure}:27810: testing ... found intl library in $cf_cv_library_path_intl ..." 1>&5

					cf_cv_find_linkage_intl=yes
					cf_cv_library_file_intl="-lintl"
					break
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5

					CPPFLAGS="$cf_save_CPPFLAGS"
					LIBS="$cf_save_LIBS"
					LDFLAGS="$cf_save_LDFLAGS"

fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
				fi
			done
			CPPFLAGS="$cf_save_CPPFLAGS"
			LDFLAGS="$cf_save_LDFLAGS"
		fi

	else
		cf_cv_find_linkage_intl=no
	fi

fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext

fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext

LIBS="$cf_save_LIBS"

if test "$cf_cv_find_linkage_intl" = yes ; then
cf_cv_func_gettext=yes
else
cf_cv_func_gettext=no
fi

      echo "$as_me:27849: checking for libintl.h and gettext()" >&5
echo $ECHO_N "checking for libintl.h and gettext()... $ECHO_C" >&6
      echo "$as_me:27851: result: $cf_cv_func_gettext" >&5
echo "${ECHO_T}$cf_cv_func_gettext" >&6

      LIBS="$cf_save_LIBS_1"
      CPPFLAGS="$cf_save_OPTS_1"

      if test "$cf_cv_func_gettext" = yes ; then

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

                                        if test "$PACKAGE" != gettext; then

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

if test -n "$cf_cv_header_path_intl" ; then
  for cf_add_incdir in $cf_cv_header_path_intl
  do
	while test $cf_add_incdir != /usr/include
	do
	  if test -d $cf_add_incdir
	  then
		cf_have_incdir=no
		if test -n "$CFLAGS$CPPFLAGS" ; then
		  # a loop is needed to ensure we can add subdirs of existing dirs
		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
			  cf_have_incdir=yes; break
			fi
		  done
		fi

		if test "$cf_have_incdir" = no ; then
		  if test "$cf_add_incdir" = /usr/local/include ; then
			if test "$GCC" = yes
			then
			  cf_save_CPPFLAGS=$CPPFLAGS

	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
	CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"

			  cat >conftest.$ac_ext <<_ACEOF
#line 27896 "configure"
#include "confdefs.h"
#include <stdio.h>
int
main (void)
{
printf("Hello")
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:27908: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:27911: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:27914: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:27917: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  :
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
cf_have_incdir=yes
fi
rm -f conftest.$ac_objext conftest.$ac_ext
			  CPPFLAGS=$cf_save_CPPFLAGS
			fi
		  fi
		fi

		if test "$cf_have_incdir" = no ; then
		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6

echo "${as_me:-configure}:27934: testing adding $cf_add_incdir to include-path ..." 1>&5

		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"

		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
		  test "$cf_top_incdir" = "$cf_add_incdir" && break
		  cf_add_incdir="$cf_top_incdir"
		else
		  break
		fi
	  else
		break
	  fi
	done
  done
fi

          if test -n "$cf_cv_library_file_intl" ; then
                                                INTLLIBS="$cf_cv_library_file_intl $LIBICONV"

if test -n "$cf_cv_library_path_intl" ; then
	for cf_add_libdir in $cf_cv_library_path_intl
	do
		if test $cf_add_libdir = /usr/lib ; then
			:
		elif test -d $cf_add_libdir
		then
			cf_have_libdir=no
			if test -n "$LDFLAGS$LIBS" ; then
				# a loop is needed to ensure we can add subdirs of existing dirs
				for cf_test_libdir in $LDFLAGS $LIBS ; do
					if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
						cf_have_libdir=yes; break
					fi
				done
			fi
			if test "$cf_have_libdir" = no ; then
				test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6

echo "${as_me:-configure}:27973: testing adding $cf_add_libdir to library-path ..." 1>&5

				INTLLIBS="-L$cf_add_libdir $INTLLIBS"
			fi
		fi
	done
fi

          fi

          gt_save_LIBS="$LIBS"
          LIBS="$LIBS $INTLLIBS"

for ac_func in dcgettext
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:27989: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 27995 "configure"
#include "confdefs.h"
#define $ac_func autoconf_temporary
#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
#undef $ac_func

#ifdef __cplusplus
extern "C"
#endif

/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char $ac_func (void);

int
main (void)
{

/* The GNU C library defines stubs for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
#error found stub for $ac_func
#endif

	return $ac_func ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:28026: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:28029: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:28032: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:28035: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:28045: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF

fi
done

          LIBS="$gt_save_LIBS"

          CATOBJEXT=.gmo
        fi
      elif test -z "$MSGFMT" || test -z "$XGETTEXT" ; then
        { echo "$as_me:28060: WARNING: disabling NLS feature" >&5
echo "$as_me: WARNING: disabling NLS feature" >&2;}
        sed -e /ENABLE_NLS/d confdefs.h >confdefs.tmp
        mv confdefs.tmp confdefs.h
        ALL_LINGUAS=
        CATOBJEXT=.ignored
        MSGFMT=":"
        GMSGFMT=":"
        XGETTEXT=":"
        POSUB=
        BUILD_INCLUDED_LIBINTL=no
        USE_INCLUDED_LIBINTL=no
        USE_NLS=no
        nls_cv_use_gnu_gettext=no
      fi

      if test "$CATOBJEXT" = "NONE"; then
                        nls_cv_use_gnu_gettext=maybe
      fi
    fi

    if test "$nls_cv_use_gnu_gettext" != "no"; then
      CATOBJEXT=.gmo
      if test -f $srcdir/intl/libintl.h ; then
                INTLOBJS="\$(GETTOBJS)"
        BUILD_INCLUDED_LIBINTL=yes
        USE_INCLUDED_LIBINTL=yes
        INTLLIBS="\$(top_builddir)/intl/libintl.a $LIBICONV"
        LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
      elif test "$nls_cv_use_gnu_gettext" = "yes"; then
        nls_cv_use_gnu_gettext=no
        { echo "$as_me:28091: WARNING: no NLS library is packaged with this application" >&5
echo "$as_me: WARNING: no NLS library is packaged with this application" >&2;}
      fi
    fi

        if test "$GMSGFMT" != ":"; then
      if $GMSGFMT --statistics /dev/null >/dev/null 2>&1; then
        : ;
      else
        { echo "$as_me:28100: WARNING: found msgfmt program is not GNU msgfmt" >&5
echo "$as_me: WARNING: found msgfmt program is not GNU msgfmt" >&2;}
      fi
    fi

        if test "$XGETTEXT" != ":"; then
      if $XGETTEXT --omit-header /dev/null >/dev/null 2>&1; then
        : ;
      else
        { echo "$as_me:28109: WARNING: found xgettext program is not GNU xgettext" >&5
echo "$as_me: WARNING: found xgettext program is not GNU xgettext" >&2;}
      fi
    fi
  fi

  if test "$XGETTEXT" != ":"; then
    ac_config_commands="$ac_config_commands default-1"

            if test "$PACKAGE" = gettext; then
      BUILD_INCLUDED_LIBINTL=yes
    fi

                                            if test "$nls_cv_use_gnu_gettext" = "yes"; then
      for ac_prog in bison
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 "$as_me:28127: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_INTLBISON+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$INTLBISON"; then
  ac_cv_prog_INTLBISON="$INTLBISON" # Let the user override the test.
else
  ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  $as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_INTLBISON="$ac_prog"
echo "$as_me:28142: found $ac_dir/$ac_word" >&5
break
done

fi
fi
INTLBISON=$ac_cv_prog_INTLBISON
if test -n "$INTLBISON"; then
  echo "$as_me:28150: result: $INTLBISON" >&5
echo "${ECHO_T}$INTLBISON" >&6
else
  echo "$as_me:28153: result: no" >&5
echo "${ECHO_T}no" >&6
fi

  test -n "$INTLBISON" && break
done

      if test -z "$INTLBISON"; then
        ac_verc_fail=yes
      else
                echo "$as_me:28163: checking version of bison" >&5
echo $ECHO_N "checking version of bison... $ECHO_C" >&6
        ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
        case $ac_prog_version in
          ('') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
          (1.2[6-9]*|1.[3-9][0-9]*|[2-9].*)
             ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
          (*) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
        esac
      echo "$as_me:28172: result: $ac_prog_version" >&5
echo "${ECHO_T}$ac_prog_version" >&6
      fi
      if test $ac_verc_fail = yes; then
        INTLBISON=:
      fi
    fi

                for lang in $ALL_LINGUAS; do
      GMOFILES="$GMOFILES $lang.gmo"
      POFILES="$POFILES $lang.po"
    done
  fi

    nls_cv_header_intl=
  nls_cv_header_libgt=

    DATADIRNAME=share

    INSTOBJEXT=.mo

    GENCAT=gencat

   if test "x$CATOBJEXT" != "x"; then
     if test "x$ALL_LINGUAS" = "x"; then
       LINGUAS=
     else
       echo "$as_me:28199: checking for catalogs to be installed" >&5
echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6
       NEW_LINGUAS=
       for presentlang in $ALL_LINGUAS; do
         useit=no
         for desiredlang in ${LINGUAS-$ALL_LINGUAS}; do
           # Use the presentlang catalog if desiredlang is
           #   a. equal to presentlang, or
           #   b. a variant of presentlang (because in this case,
           #      presentlang can be used as a fallback for messages
           #      which are not translated in the desiredlang catalog).
           case "$desiredlang" in
             ("$presentlang"*) useit=yes;;
           esac
         done
         if test $useit = yes; then
           NEW_LINGUAS="$NEW_LINGUAS $presentlang"
         fi
       done
       LINGUAS=$NEW_LINGUAS
       echo "$as_me:28219: result: $LINGUAS" >&5
echo "${ECHO_T}$LINGUAS" >&6
     fi

          if test -n "$LINGUAS"; then
       for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
     fi
   fi

      INTL_LIBTOOL_SUFFIX_PREFIX=

if test "$USE_NLS" = yes ; then

# Check whether --with-textdomain or --without-textdomain was given.
if test "${with_textdomain+set}" = set; then
  withval="$with_textdomain"
  NLS_TEXTDOMAIN=$withval
else
  NLS_TEXTDOMAIN=$PACKAGE
fi;

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

fi

INTLDIR_MAKE=
MSG_DIR_MAKE=
SUB_MAKEFILE=

cf_makefile=Makefile

use_our_messages=no
if test "$USE_NLS" = yes ; then
if test -d $srcdir/po ; then
echo "$as_me:28255: checking if we should use included message-library" >&5
echo $ECHO_N "checking if we should use included message-library... $ECHO_C" >&6

# Check whether --enable-included-msgs or --disable-included-msgs was given.
if test "${enable_included_msgs+set}" = set; then
  enableval="$enable_included_msgs"
  use_our_messages=$enableval
else
  use_our_messages=yes
fi;
fi
echo "$as_me:28266: result: $use_our_messages" >&5
echo "${ECHO_T}$use_our_messages" >&6
fi

MSG_DIR_MAKE="#"
if test "$use_our_messages" = yes
then
	SUB_MAKEFILE="$SUB_MAKEFILE po/$cf_makefile.in:$srcdir/po/$cf_makefile.inn"
	MSG_DIR_MAKE=
fi

if test "$USE_INCLUDED_LIBINTL" = yes ; then
	if test "$nls_cv_force_use_gnu_gettext" = yes ; then
		:
	elif test "$nls_cv_use_gnu_gettext" = yes ; then
		:
	else
		INTLDIR_MAKE="#"
	fi
	if test -z "$INTLDIR_MAKE"; then

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

		for cf_makefile in \
			$srcdir/intl/Makefile.in \
			$srcdir/intl/makefile.in
		do
			if test -f "$cf_makefile" ; then
				SUB_MAKEFILE="$SUB_MAKEFILE `echo \"${cf_makefile}\"|sed -e 's,^'$srcdir/',,' -e 's/\.in$//'`:${cf_makefile}"
				break
			fi
		done
	fi
else
	INTLDIR_MAKE="#"
	if test "$USE_NLS" = yes ; then

for ac_header in libintl.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
echo "$as_me:28308: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 28314 "configure"
#include "confdefs.h"
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:28318: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  egrep -v '^ *\+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:28324: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  eval "$as_ac_Header=yes"
else
  echo "$as_me: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$as_ac_Header=no"
fi
rm -f conftest.err conftest.$ac_ext
fi
echo "$as_me:28343: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
if test `eval echo '${'$as_ac_Header'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
EOF

fi
done

	fi
fi

if test -z "$INTLDIR_MAKE" ; then

	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
	CPPFLAGS="${CPPFLAGS}-I../intl"

fi

if test "$BUILD_INCLUDED_LIBINTL" = yes ; then
	GT_YES="#"
	GT_NO=
else
	GT_YES=
	GT_NO="#"
fi

if test "$USE_INCLUDED_LIBINTL" = yes ; then
	if test "$nls_cv_force_use_gnu_gettext" = yes ; then

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

	elif test "$nls_cv_use_gnu_gettext" = yes ; then

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

	fi
	if test -n "$nls_cv_header_intl" ; then

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

	fi
fi

LIBS="$LIBS $LIBICONV"

### check for alloca (required for bison and/or intl/*)
case "$YACC" in
bison*)
	use_alloca=yes
	;;
*)
	use_alloca=$USE_INCLUDED_LIBINTL
	;;
esac

if test ".$use_alloca" = .yes ; then

# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
# for constant arguments.  Useless!
echo "$as_me:28410: checking for working alloca.h" >&5
echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6
if test "${ac_cv_working_alloca_h+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 28416 "configure"
#include "confdefs.h"
#include <alloca.h>
int
main (void)
{
char *p = (char *) alloca (2 * sizeof (int));
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:28428: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:28431: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:28434: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:28437: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_working_alloca_h=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_working_alloca_h=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:28447: result: $ac_cv_working_alloca_h" >&5
echo "${ECHO_T}$ac_cv_working_alloca_h" >&6
if test $ac_cv_working_alloca_h = yes; then

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

fi

echo "$as_me:28457: checking for alloca" >&5
echo $ECHO_N "checking for alloca... $ECHO_C" >&6
if test "${ac_cv_func_alloca_works+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 28463 "configure"
#include "confdefs.h"
#ifdef __GNUC__
# define alloca __builtin_alloca
#else
# ifdef _MSC_VER
#  include <malloc.h>
#  define alloca _alloca
# else
#  if HAVE_ALLOCA_H
#   include <alloca.h>
#  else
#   ifdef _AIX
 #pragma alloca
#   else
#    ifndef alloca /* predefined by HP cc +Olibcalls */
char *alloca ();
#    endif
#   endif
#  endif
# endif
#endif

int
main (void)
{
char *p = (char *) alloca (1);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:28495: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:28498: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:28501: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:28504: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_func_alloca_works=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_func_alloca_works=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:28514: result: $ac_cv_func_alloca_works" >&5
echo "${ECHO_T}$ac_cv_func_alloca_works" >&6

if test $ac_cv_func_alloca_works = yes; then

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

else
  # The SVR3 libPW and SVR4 libucb both contain incompatible functions
# that cause trouble.  Some versions do not even contain alloca or
# contain a buggy version.  If you still want to use their alloca,
# use ar to extract alloca.o from them instead of compiling alloca.c.

ALLOCA=alloca.$ac_objext

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

echo "$as_me:28535: checking whether \`alloca.c' needs Cray hooks" >&5
echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6
if test "${ac_cv_os_cray+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 28541 "configure"
#include "confdefs.h"
#if defined(CRAY) && ! defined(CRAY2)
webecray
#else
wenotbecray
#endif

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

fi
echo "$as_me:28559: result: $ac_cv_os_cray" >&5
echo "${ECHO_T}$ac_cv_os_cray" >&6
if test $ac_cv_os_cray = yes; then
  for ac_func in _getb67 GETB67 getb67; do
    as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:28564: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 28570 "configure"
#include "confdefs.h"
#define $ac_func autoconf_temporary
#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
#undef $ac_func

#ifdef __cplusplus
extern "C"
#endif

/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char $ac_func (void);

int
main (void)
{

/* The GNU C library defines stubs for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
#error found stub for $ac_func
#endif

	return $ac_func ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:28601: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:28604: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:28607: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:28610: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:28620: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then

cat >>confdefs.h <<EOF
#define CRAY_STACKSEG_END $ac_func
EOF

    break
fi

  done
fi

echo "$as_me:28634: checking stack direction for C alloca" >&5
echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6
if test "${ac_cv_c_stack_direction+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_c_stack_direction=0
else
  cat >conftest.$ac_ext <<_ACEOF
#line 28643 "configure"
#include "confdefs.h"
int
find_stack_direction (void)
{
  static char *addr = 0;
  auto char dummy;
  if (addr == 0)
    {
      addr = &dummy;
      return find_stack_direction ();
    }
  else
    return (&dummy > addr) ? 1 : -1;
}

int
main (void)
{
  $ac_main_return (find_stack_direction () < 0);
}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:28666: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:28669: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:28671: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:28674: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_c_stack_direction=1
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_c_stack_direction=-1
fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
echo "$as_me:28686: result: $ac_cv_c_stack_direction" >&5
echo "${ECHO_T}$ac_cv_c_stack_direction" >&6

cat >>confdefs.h <<EOF
#define STACK_DIRECTION $ac_cv_c_stack_direction
EOF

fi

case $host_os in
linux*|gnu*)
	# workaround for bison 1.875c (compound breakage in Linux stdlib.h
	# and bison's output make bison try to use alloca()).
	if test -z "$GCC" ; then
		CPPFLAGS="$CPPFLAGS -DYYSTACK_USE_ALLOCA=0"
		ALLOCA=""
	elif test "$INTEL_COMPILER" = yes ; then
		CPPFLAGS="$CPPFLAGS -DYYSTACK_USE_ALLOCA=0"
		ALLOCA=""
	fi
	;;
esac

else
	ALLOCA=""

fi

for cf_hdr in iconv.h
do
	echo "$as_me:28716: checking for $cf_hdr" >&5
echo $ECHO_N "checking for $cf_hdr... $ECHO_C" >&6
	cat >conftest.$ac_ext <<_ACEOF
#line 28719 "configure"
#include "confdefs.h"

#include <sys/types.h>
#include <$cf_hdr>

_ACEOF
if { (eval echo "$as_me:28726: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  egrep -v '^ *\+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:28732: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  cf_found=yes
else
  echo "$as_me: failed program was:" >&5
  cat conftest.$ac_ext >&5
  cf_found=no
fi
rm -f conftest.err conftest.$ac_ext
echo "$as_me:28750: result: $cf_found" >&5
echo "${ECHO_T}$cf_found" >&6
if test $cf_found = yes ; then

cf_tr_hdr=`echo "$cf_hdr" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`

	cat >>confdefs.h <<EOF
#define HAVE_${cf_tr_hdr} 1
EOF

fi
done

echo "$as_me:28763: checking for iconv_open() //TRANSLIT extension" >&5
echo $ECHO_N "checking for iconv_open() //TRANSLIT extension... $ECHO_C" >&6
if test "$cross_compiling" = yes; then

		echo "$as_me:28767: result: unknown" >&5
echo "${ECHO_T}unknown" >&6

else
  cat >conftest.$ac_ext <<_ACEOF
#line 28772 "configure"
#include "confdefs.h"

#ifdef HAVE_ICONV_H
#	include <iconv.h>
#endif /* HAVE_ICONV_H */
#ifdef HAVE_STDLIB_H
#	include <stdlib.h>
#endif /* HAVE_STDLIB_H */
int main() {
	iconv_t cd;

	if ((cd = iconv_open("US-ASCII//TRANSLIT", "ISO-8859-1")) == (iconv_t) (-1))
		exit(1);
	exit(0);
}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:28790: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:28793: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:28795: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:28798: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then

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

		echo "$as_me:28805: result: yes" >&5
echo "${ECHO_T}yes" >&6

else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5

		echo "$as_me:28813: result: no" >&5
echo "${ECHO_T}no" >&6

fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi

# FIXME / TESTME
# locale is broken on cygwin < 1.7.0
# group/other bits don't work on cygwin < 1.7.0
# locking doesn't work on cygwin < 2.0 as link(2) is detected but doesn't work
case "$host_os" in
	*cygwin*)
		case `uname -r | sed 's,(.*,,'` in
			B*|1.0-6].*)
				# multiple defects
				cat >>confdefs.h <<\EOF
#define NO_LOCALE 1
EOF

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

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

				;;
			1.7.*)
				# link does not work
				cat >>confdefs.h <<\EOF
#define NO_LOCKING 1
EOF

				;;
			*)
				echo "$as_me:28850: checking for link" >&5
echo $ECHO_N "checking for link... $ECHO_C" >&6
if test "${ac_cv_func_link+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 28856 "configure"
#include "confdefs.h"
#define link autoconf_temporary
#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
#undef link

#ifdef __cplusplus
extern "C"
#endif

/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char link (void);

int
main (void)
{

/* The GNU C library defines stubs for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_link) || defined (__stub___link)
#error found stub for link
#endif

	return link ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:28887: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:28890: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:28893: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:28896: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_func_link=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_func_link=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:28906: result: $ac_cv_func_link" >&5
echo "${ECHO_T}$ac_cv_func_link" >&6
if test $ac_cv_func_link = yes; then
  cat >>confdefs.h <<\EOF
#define HAVE_LINK 1
EOF

fi

				;;
			esac
		;;
	*haiku*)
		# link does not work
		cat >>confdefs.h <<\EOF
#define NO_LOCKING 1
EOF

		;;
	*)
		echo "$as_me:28926: checking for link" >&5
echo $ECHO_N "checking for link... $ECHO_C" >&6
if test "${ac_cv_func_link+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 28932 "configure"
#include "confdefs.h"
#define link autoconf_temporary
#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
#undef link

#ifdef __cplusplus
extern "C"
#endif

/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char link (void);

int
main (void)
{

/* The GNU C library defines stubs for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_link) || defined (__stub___link)
#error found stub for link
#endif

	return link ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:28963: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:28966: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:28969: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:28972: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_func_link=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_func_link=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:28982: result: $ac_cv_func_link" >&5
echo "${ECHO_T}$ac_cv_func_link" >&6
if test $ac_cv_func_link = yes; then
  cat >>confdefs.h <<\EOF
#define HAVE_LINK 1
EOF

fi

esac

if test "$cf_cv_termlib" = pdcurses ; then
	echo "$as_me:28994: checking for X" >&5
echo $ECHO_N "checking for X... $ECHO_C" >&6

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

fi;
# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
if test "x$with_x" = xno; then
  # The user explicitly disabled X.
  have_x=disabled
else
  if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
    # Both variables are already set.
    have_x=yes
  else
    if test "${ac_cv_have_x+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  # One or both of the vars are not set, and there is no cached value.
ac_x_includes=no ac_x_libraries=no
rm -fr conftest.dir
if mkdir conftest.dir; then
  cd conftest.dir
  # Make sure to not put "make" in the Imakefile rules, since we grep it out.
  cat >Imakefile <<'EOF'
acfindx:
	@echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
EOF
  if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
    # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
    eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
    for ac_extension in a so sl dylib dll; do
      if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
         test -f $ac_im_libdir/libX11.$ac_extension; then
        ac_im_usrlibdir=$ac_im_libdir; break
      fi
    done
    # Screen out bogus values from the imake configuration.  They are
    # bogus both because they are the default anyway, and because
    # using them would break gcc on systems where it needs fixed includes.
    case $ac_im_incroot in
	/usr/include) ;;
	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
    esac
    case $ac_im_usrlibdir in
	/usr/lib | /lib) ;;
	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
    esac
  fi
  cd ..
  rm -fr conftest.dir
fi

# Standard set of common directories for X headers.
# Check X11 before X11Rn because it is often a symlink to the current release.
ac_x_header_dirs='
/usr/X11/include
/usr/X11R6/include
/usr/X11R5/include
/usr/X11R4/include

/usr/include/X11
/usr/include/X11R6
/usr/include/X11R5
/usr/include/X11R4

/usr/local/X11/include
/usr/local/X11R6/include
/usr/local/X11R5/include
/usr/local/X11R4/include

/usr/local/include/X11
/usr/local/include/X11R6
/usr/local/include/X11R5
/usr/local/include/X11R4

/usr/X386/include
/usr/x386/include
/usr/XFree86/include/X11

/usr/include
/usr/local/include
/usr/unsupported/include
/usr/athena/include
/usr/local/x11r5/include
/usr/lpp/Xamples/include

/usr/openwin/include
/usr/openwin/share/include'

if test "$ac_x_includes" = no; then
  # Guess where to find include files, by looking for Intrinsic.h.
  # First, try using that file with no special directory specified.
  cat >conftest.$ac_ext <<_ACEOF
#line 29091 "configure"
#include "confdefs.h"
#include <X11/Intrinsic.h>
_ACEOF
if { (eval echo "$as_me:29095: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  egrep -v '^ *\+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:29101: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  # We can compile using X headers with no special include directory.
ac_x_includes=
else
  echo "$as_me: failed program was:" >&5
  cat conftest.$ac_ext >&5
  for ac_dir in $ac_x_header_dirs; do
  if test -r "$ac_dir/X11/Intrinsic.h"; then
    ac_x_includes=$ac_dir
    break
  fi
done
fi
rm -f conftest.err conftest.$ac_ext
fi # $ac_x_includes = no

if test "$ac_x_libraries" = no; then
  # Check for the libraries.
  # See if we find them without any special options.
  # Don't add to $LIBS permanently.
  ac_save_LIBS=$LIBS
  LIBS="-lXt $LIBS"
  cat >conftest.$ac_ext <<_ACEOF
#line 29134 "configure"
#include "confdefs.h"
#include <X11/Intrinsic.h>
int
main (void)
{
XtMalloc (0)
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:29146: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:29149: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:29152: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:29155: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  LIBS=$ac_save_LIBS
# We can link X programs with no special library path.
ac_x_libraries=
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
LIBS=$ac_save_LIBS
for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
do
  # Don't even attempt the hair of trying to link an X program!
  for ac_extension in a so sl dylib dll; do
    if test -r $ac_dir/libXt.$ac_extension; then
      ac_x_libraries=$ac_dir
      break 2
    fi
  done
done
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi # $ac_x_libraries = no

if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
  # Didn't find X anywhere.  Cache the known absence of X.
  ac_cv_have_x="have_x=no"
else
  # Record where we found X for the cache.
  ac_cv_have_x="have_x=yes \
	        ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
fi
fi

  fi
  eval "$ac_cv_have_x"
fi # $with_x != no

if test "$have_x" != yes; then
  echo "$as_me:29193: result: $have_x" >&5
echo "${ECHO_T}$have_x" >&6
  no_x=yes
else
  # If each of the values was on the command line, it overrides each guess.
  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
  # Update the cache value to reflect the command line values.
  ac_cv_have_x="have_x=yes \
		ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
  echo "$as_me:29203: result: libraries $x_libraries, headers $x_includes" >&5
echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
fi

if test "$no_x" = yes; then
  # Not all programs may use this symbol, but it does not hurt to define it.

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

  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
else
  if test -n "$x_includes"; then
    X_CFLAGS="$X_CFLAGS -I$x_includes"
  fi

  # It would also be nice to do this for all -L options, not just this one.
  if test -n "$x_libraries"; then
    X_LIBS="$X_LIBS -L$x_libraries"
    # For Solaris; some versions of Sun CC require a space after -R and
    # others require no space.  Words are not sufficient . . . .
    case `(uname -sr) 2>/dev/null` in
    "SunOS 5"*)
      echo "$as_me:29227: checking whether -R must be followed by a space" >&5
echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6
      ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
      cat >conftest.$ac_ext <<_ACEOF
#line 29231 "configure"
#include "confdefs.h"

int
main (void)
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:29243: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:29246: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:29249: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:29252: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_R_nospace=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_R_nospace=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
      if test $ac_R_nospace = yes; then
	echo "$as_me:29262: result: no" >&5
echo "${ECHO_T}no" >&6
	X_LIBS="$X_LIBS -R$x_libraries"
      else
	LIBS="$ac_xsave_LIBS -R $x_libraries"
	cat >conftest.$ac_ext <<_ACEOF
#line 29268 "configure"
#include "confdefs.h"

int
main (void)
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:29280: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:29283: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:29286: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:29289: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_R_space=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_R_space=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
	if test $ac_R_space = yes; then
	  echo "$as_me:29299: result: yes" >&5
echo "${ECHO_T}yes" >&6
	  X_LIBS="$X_LIBS -R $x_libraries"
	else
	  echo "$as_me:29303: result: neither works" >&5
echo "${ECHO_T}neither works" >&6
	fi
      fi
      LIBS=$ac_xsave_LIBS
    esac
  fi

  # Check for system-dependent libraries X programs must link with.
  # Do this before checking for the system-independent R6 libraries
  # (-lICE), since we may need -lsocket or whatever for X linking.

  if test "$ISC" = yes; then
    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
  else
    # Martyn Johnson says this is needed for Ultrix, if the X
    # libraries were built with DECnet support.  And Karl Berry says
    # the Alpha needs dnet_stub (dnet does not exist).
    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
    cat >conftest.$ac_ext <<_ACEOF
#line 29323 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char XOpenDisplay ();
int
main (void)
{
XOpenDisplay ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:29342: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:29345: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:29348: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:29351: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  :
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
echo "$as_me:29357: checking for dnet_ntoa in -ldnet" >&5
echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-ldnet  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 29365 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char dnet_ntoa ();
int
main (void)
{
dnet_ntoa ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:29384: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:29387: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:29390: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:29393: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_dnet_dnet_ntoa=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_dnet_dnet_ntoa=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:29404: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
fi

    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
      echo "$as_me:29411: checking for dnet_ntoa in -ldnet_stub" >&5
echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6
if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-ldnet_stub  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 29419 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char dnet_ntoa ();
int
main (void)
{
dnet_ntoa ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:29438: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:29441: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:29444: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:29447: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_dnet_stub_dnet_ntoa=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_dnet_stub_dnet_ntoa=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:29458: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6
if test $ac_cv_lib_dnet_stub_dnet_ntoa = yes; then
  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
fi

    fi
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
    LIBS="$ac_xsave_LIBS"

    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
    # to get the SysV transport functions.
    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
    # needs -lnsl.
    # The nsl library prevents programs from opening the X display
    # on Irix 5.2, according to T.E. Dickey.
    # The functions gethostbyname, getservbyname, and inet_addr are
    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
    echo "$as_me:29477: checking for gethostbyname" >&5
echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6
if test "${ac_cv_func_gethostbyname+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 29483 "configure"
#include "confdefs.h"
#define gethostbyname autoconf_temporary
#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
#undef gethostbyname

#ifdef __cplusplus
extern "C"
#endif

/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char gethostbyname (void);

int
main (void)
{

/* The GNU C library defines stubs for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
#error found stub for gethostbyname
#endif

	return gethostbyname ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:29514: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:29517: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:29520: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:29523: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_func_gethostbyname=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_func_gethostbyname=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:29533: result: $ac_cv_func_gethostbyname" >&5
echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6

    if test $ac_cv_func_gethostbyname = no; then
      echo "$as_me:29537: checking for gethostbyname in -lnsl" >&5
echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lnsl  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 29545 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* 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 (void)
{
gethostbyname ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:29564: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:29567: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:29570: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:29573: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_nsl_gethostbyname=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_nsl_gethostbyname=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:29584: result: $ac_cv_lib_nsl_gethostbyname" >&5
echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
if test $ac_cv_lib_nsl_gethostbyname = yes; then
  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
fi

      if test $ac_cv_lib_nsl_gethostbyname = no; then
        echo "$as_me:29591: checking for gethostbyname in -lbsd" >&5
echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6
if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lbsd  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 29599 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* 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 (void)
{
gethostbyname ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:29618: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:29621: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:29624: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:29627: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_bsd_gethostbyname=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_bsd_gethostbyname=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:29638: result: $ac_cv_lib_bsd_gethostbyname" >&5
echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6
if test $ac_cv_lib_bsd_gethostbyname = yes; then
  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
fi

      fi
    fi

    # lieder@skyler.mavd.honeywell.com says without -lsocket,
    # socket/setsockopt and other routines are undefined under SCO ODT
    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
    # on later versions), says Simon Leinen: it contains gethostby*
    # variants that don't use the nameserver (or something).  -lsocket
    # must be given before -lnsl if both are needed.  We assume that
    # if connect needs -lnsl, so does gethostbyname.
    echo "$as_me:29654: checking for connect" >&5
echo $ECHO_N "checking for connect... $ECHO_C" >&6
if test "${ac_cv_func_connect+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 29660 "configure"
#include "confdefs.h"
#define connect autoconf_temporary
#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
#undef connect

#ifdef __cplusplus
extern "C"
#endif

/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char connect (void);

int
main (void)
{

/* The GNU C library defines stubs for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_connect) || defined (__stub___connect)
#error found stub for connect
#endif

	return connect ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:29691: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:29694: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:29697: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:29700: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_func_connect=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_func_connect=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:29710: result: $ac_cv_func_connect" >&5
echo "${ECHO_T}$ac_cv_func_connect" >&6

    if test $ac_cv_func_connect = no; then
      echo "$as_me:29714: checking for connect in -lsocket" >&5
echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6
if test "${ac_cv_lib_socket_connect+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 29722 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char connect ();
int
main (void)
{
connect ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:29741: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:29744: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:29747: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:29750: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_socket_connect=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_socket_connect=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:29761: result: $ac_cv_lib_socket_connect" >&5
echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6
if test $ac_cv_lib_socket_connect = yes; then
  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
fi

    fi

    # Guillermo Gomez says -lposix is necessary on A/UX.
    echo "$as_me:29770: checking for remove" >&5
echo $ECHO_N "checking for remove... $ECHO_C" >&6
if test "${ac_cv_func_remove+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 29776 "configure"
#include "confdefs.h"
#define remove autoconf_temporary
#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
#undef remove

#ifdef __cplusplus
extern "C"
#endif

/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char remove (void);

int
main (void)
{

/* The GNU C library defines stubs for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_remove) || defined (__stub___remove)
#error found stub for remove
#endif

	return remove ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:29807: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:29810: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:29813: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:29816: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_func_remove=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_func_remove=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:29826: result: $ac_cv_func_remove" >&5
echo "${ECHO_T}$ac_cv_func_remove" >&6

    if test $ac_cv_func_remove = no; then
      echo "$as_me:29830: checking for remove in -lposix" >&5
echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6
if test "${ac_cv_lib_posix_remove+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lposix  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 29838 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char remove ();
int
main (void)
{
remove ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:29857: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:29860: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:29863: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:29866: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_posix_remove=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_posix_remove=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:29877: result: $ac_cv_lib_posix_remove" >&5
echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6
if test $ac_cv_lib_posix_remove = yes; then
  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
fi

    fi

    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
    echo "$as_me:29886: checking for shmat" >&5
echo $ECHO_N "checking for shmat... $ECHO_C" >&6
if test "${ac_cv_func_shmat+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 29892 "configure"
#include "confdefs.h"
#define shmat autoconf_temporary
#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
#undef shmat

#ifdef __cplusplus
extern "C"
#endif

/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char shmat (void);

int
main (void)
{

/* The GNU C library defines stubs for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_shmat) || defined (__stub___shmat)
#error found stub for shmat
#endif

	return shmat ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:29923: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:29926: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:29929: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:29932: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_func_shmat=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_func_shmat=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:29942: result: $ac_cv_func_shmat" >&5
echo "${ECHO_T}$ac_cv_func_shmat" >&6

    if test $ac_cv_func_shmat = no; then
      echo "$as_me:29946: checking for shmat in -lipc" >&5
echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6
if test "${ac_cv_lib_ipc_shmat+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lipc  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 29954 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char shmat ();
int
main (void)
{
shmat ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:29973: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:29976: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:29979: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:29982: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_ipc_shmat=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_ipc_shmat=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:29993: result: $ac_cv_lib_ipc_shmat" >&5
echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6
if test $ac_cv_lib_ipc_shmat = yes; then
  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
fi

    fi
  fi

  # Check for libraries that X11R6 Xt/Xaw programs need.
  ac_save_LDFLAGS=$LDFLAGS
  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
  # check for ICE first), but we must link in the order -lSM -lICE or
  # we get undefined symbols.  So assume we have SM if we have ICE.
  # These have to be linked with before -lX11, unlike the other
  # libraries we check for below, so use a different variable.
  # John Interrante, Karl Berry
  echo "$as_me:30011: checking for IceConnectionNumber in -lICE" >&5
echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6
if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lICE $X_EXTRA_LIBS $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 30019 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char IceConnectionNumber ();
int
main (void)
{
IceConnectionNumber ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:30038: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:30041: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:30044: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:30047: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_ICE_IceConnectionNumber=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_ICE_IceConnectionNumber=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:30058: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6
if test $ac_cv_lib_ICE_IceConnectionNumber = yes; then
  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
fi

  LDFLAGS=$ac_save_LDFLAGS

fi

cf_x_athena=${cf_x_athena:-Xaw}

echo "$as_me:30070: checking if you want to link with Xaw 3d library" >&5
echo $ECHO_N "checking if you want to link with Xaw 3d library... $ECHO_C" >&6
withval=

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

fi;
if test "$withval" = yes ; then
	cf_x_athena=Xaw3d
	echo "$as_me:30081: result: yes" >&5
echo "${ECHO_T}yes" >&6
else
	echo "$as_me:30084: result: no" >&5
echo "${ECHO_T}no" >&6
fi

echo "$as_me:30088: checking if you want to link with Xaw 3d xft library" >&5
echo $ECHO_N "checking if you want to link with Xaw 3d xft library... $ECHO_C" >&6
withval=

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

fi;
if test "$withval" = yes ; then
	cf_x_athena=Xaw3dxft
	echo "$as_me:30099: result: yes" >&5
echo "${ECHO_T}yes" >&6
else
	echo "$as_me:30102: result: no" >&5
echo "${ECHO_T}no" >&6
fi

echo "$as_me:30106: checking if you want to link with neXT Athena library" >&5
echo $ECHO_N "checking if you want to link with neXT Athena library... $ECHO_C" >&6
withval=

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

fi;
if test "$withval" = yes ; then
	cf_x_athena=neXtaw
	echo "$as_me:30117: result: yes" >&5
echo "${ECHO_T}yes" >&6
else
	echo "$as_me:30120: result: no" >&5
echo "${ECHO_T}no" >&6
fi

echo "$as_me:30124: checking if you want to link with Athena-Plus library" >&5
echo $ECHO_N "checking if you want to link with Athena-Plus library... $ECHO_C" >&6
withval=

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

fi;
if test "$withval" = yes ; then
	cf_x_athena=XawPlus
	echo "$as_me:30135: result: yes" >&5
echo "${ECHO_T}yes" >&6
else
	echo "$as_me:30138: result: no" >&5
echo "${ECHO_T}no" >&6
fi

cf_x_athena_lib=""

if test "$PKG_CONFIG" != none ; then
	cf_athena_list=
	test "$cf_x_athena" = Xaw && cf_athena_list="xaw8 xaw7 xaw6"
	for cf_athena_pkg in \
		$cf_athena_list \
		${cf_x_athena} \
		${cf_x_athena}-devel \
		lib${cf_x_athena} \
		lib${cf_x_athena}-devel
	do

if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists $cf_athena_pkg; then
	test -n "$verbose" && echo "	found package $cf_athena_pkg" 1>&6

echo "${as_me:-configure}:30158: testing found package $cf_athena_pkg ..." 1>&5

	cf_pkgconfig_incs="`$PKG_CONFIG --cflags $cf_athena_pkg 2>/dev/null`"
	cf_pkgconfig_libs="`$PKG_CONFIG --libs   $cf_athena_pkg 2>/dev/null`"
	test -n "$verbose" && echo "	package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs" 1>&6

echo "${as_me:-configure}:30164: testing package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs ..." 1>&5

	test -n "$verbose" && echo "	package $cf_athena_pkg LIBS: $cf_pkgconfig_libs" 1>&6

echo "${as_me:-configure}:30168: testing package $cf_athena_pkg LIBS: $cf_pkgconfig_libs ..." 1>&5

cf_fix_cppflags=no
cf_new_cflags=
cf_new_cppflags=
cf_new_extra_cppflags=

for cf_add_cflags in $cf_pkgconfig_incs
do
case $cf_fix_cppflags in
(no)
	case $cf_add_cflags in
	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
		case $cf_add_cflags in
		(-D*)
			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`

			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
				&& test -z "${cf_tst_cflags}" \
				&& cf_fix_cppflags=yes

			if test $cf_fix_cppflags = yes ; then

	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"

				continue
			elif test "${cf_tst_cflags}" = "\"'" ; then

	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"

				continue
			fi
			;;
		esac
		case "$CPPFLAGS" in
		(*$cf_add_cflags)
			;;
		(*)
			case $cf_add_cflags in
			(-D*)
				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`

CPPFLAGS=`echo "$CPPFLAGS" | \
	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`

				;;
			esac

	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"

			;;
		esac
		;;
	(*)

	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"

		;;
	esac
	;;
(yes)

	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"

	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`

	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
		&& test -z "${cf_tst_cflags}" \
		&& cf_fix_cppflags=no
	;;
esac
done

if test -n "$cf_new_cflags" ; then

	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
	CFLAGS="${CFLAGS}$cf_new_cflags"

fi

if test -n "$cf_new_cppflags" ; then

	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"

fi

if test -n "$cf_new_extra_cppflags" ; then

	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"

fi

cf_add_libs="$cf_pkgconfig_libs"
# Filter out duplicates - this happens with badly-designed ".pc" files...
for cf_add_1lib in $LIBS
do
	for cf_add_2lib in $cf_add_libs
	do
		if test "x$cf_add_1lib" = "x$cf_add_2lib"
		then
			cf_add_1lib=
			break
		fi
	done
	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
done
LIBS="$cf_add_libs"

			cf_x_athena_lib="$cf_pkgconfig_libs"

cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`

			cat >>confdefs.h <<EOF
#define $cf_x_athena_LIBS 1
EOF

	for cf_trim_lib in Xmu Xt X11
	do
		case "$LIBS" in
		(*-l$cf_trim_lib\ *-l$cf_trim_lib*)
			LIBS=`echo "$LIBS " | sed -e 's/  / /g' -e 's%-l'"$cf_trim_lib"' %%' -e 's/ $//'`
			test -n "$verbose" && echo "	..trimmed $LIBS" 1>&6

echo "${as_me:-configure}:30299: testing ..trimmed $LIBS ..." 1>&5

			;;
		esac
	done

echo "$as_me:30305: checking for usable $cf_x_athena/Xmu package" >&5
echo $ECHO_N "checking for usable $cf_x_athena/Xmu package... $ECHO_C" >&6
if test "${cf_cv_xaw_compat+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

cat >conftest.$ac_ext <<_ACEOF
#line 30312 "configure"
#include "confdefs.h"

#include <X11/Xmu/CharSet.h>

int
main (void)
{

int check = XmuCompareISOLatin1("big", "small")

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:30328: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:30331: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:30334: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:30337: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  cf_cv_xaw_compat=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
cf_cv_xaw_compat=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:30347: result: $cf_cv_xaw_compat" >&5
echo "${ECHO_T}$cf_cv_xaw_compat" >&6

			if test "$cf_cv_xaw_compat" = no
			then
				# workaround for broken ".pc" files...
				case "$cf_x_athena_lib" in
				(*-lXmu*)
					;;
				(*)
					test -n "$verbose" && echo "	work around broken package" 1>&6

echo "${as_me:-configure}:30359: testing work around broken package ..." 1>&5

					cf_save_xmu="$LIBS"
					cf_first_lib=`echo "$cf_save_xmu" | sed -e 's/^  *//' -e 's/ .*//'`

if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xmu; then
	test -n "$verbose" && echo "	found package xmu" 1>&6

echo "${as_me:-configure}:30367: testing found package xmu ..." 1>&5

	cf_pkgconfig_incs="`$PKG_CONFIG --cflags xmu 2>/dev/null`"
	cf_pkgconfig_libs="`$PKG_CONFIG --libs   xmu 2>/dev/null`"
	test -n "$verbose" && echo "	package xmu CFLAGS: $cf_pkgconfig_incs" 1>&6

echo "${as_me:-configure}:30373: testing package xmu CFLAGS: $cf_pkgconfig_incs ..." 1>&5

	test -n "$verbose" && echo "	package xmu LIBS: $cf_pkgconfig_libs" 1>&6

echo "${as_me:-configure}:30377: testing package xmu LIBS: $cf_pkgconfig_libs ..." 1>&5

cf_fix_cppflags=no
cf_new_cflags=
cf_new_cppflags=
cf_new_extra_cppflags=

for cf_add_cflags in $cf_pkgconfig_incs
do
case $cf_fix_cppflags in
(no)
	case $cf_add_cflags in
	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
		case $cf_add_cflags in
		(-D*)
			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`

			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
				&& test -z "${cf_tst_cflags}" \
				&& cf_fix_cppflags=yes

			if test $cf_fix_cppflags = yes ; then

	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"

				continue
			elif test "${cf_tst_cflags}" = "\"'" ; then

	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"

				continue
			fi
			;;
		esac
		case "$CPPFLAGS" in
		(*$cf_add_cflags)
			;;
		(*)
			case $cf_add_cflags in
			(-D*)
				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`

CPPFLAGS=`echo "$CPPFLAGS" | \
	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`

				;;
			esac

	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"

			;;
		esac
		;;
	(*)

	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"

		;;
	esac
	;;
(yes)

	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"

	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`

	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
		&& test -z "${cf_tst_cflags}" \
		&& cf_fix_cppflags=no
	;;
esac
done

if test -n "$cf_new_cflags" ; then

	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
	CFLAGS="${CFLAGS}$cf_new_cflags"

fi

if test -n "$cf_new_cppflags" ; then

	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"

fi

if test -n "$cf_new_extra_cppflags" ; then

	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"

fi

cf_add_libs="$cf_pkgconfig_libs"
# Filter out duplicates - this happens with badly-designed ".pc" files...
for cf_add_1lib in $LIBS
do
	for cf_add_2lib in $cf_add_libs
	do
		if test "x$cf_add_1lib" = "x$cf_add_2lib"
		then
			cf_add_1lib=
			break
		fi
	done
	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
done
LIBS="$cf_add_libs"

							LIBS="$cf_save_xmu"

test -n "$verbose" && echo "	...before $LIBS" 1>&6

echo "${as_me:-configure}:30497: testing ...before $LIBS ..." 1>&5

LIBS=`echo "$LIBS" | sed -e "s/[ 	][ 	]*/ /g" -e "s%$cf_first_lib %$cf_first_lib $cf_pkgconfig_libs %" -e 's%  % %g'`
test -n "$verbose" && echo "	...after  $LIBS" 1>&6

echo "${as_me:-configure}:30502: testing ...after  $LIBS ..." 1>&5

else
	cf_pkgconfig_incs=
	cf_pkgconfig_libs=

test -n "$verbose" && echo "	...before $LIBS" 1>&6

echo "${as_me:-configure}:30510: testing ...before $LIBS ..." 1>&5

LIBS=`echo "$LIBS" | sed -e "s/[ 	][ 	]*/ /g" -e "s%$cf_first_lib %$cf_first_lib -lXmu %" -e 's%  % %g'`
test -n "$verbose" && echo "	...after  $LIBS" 1>&6

echo "${as_me:-configure}:30515: testing ...after  $LIBS ..." 1>&5

fi

	for cf_trim_lib in Xmu Xt X11
	do
		case "$LIBS" in
		(*-l$cf_trim_lib\ *-l$cf_trim_lib*)
			LIBS=`echo "$LIBS " | sed -e 's/  / /g' -e 's%-l'"$cf_trim_lib"' %%' -e 's/ $//'`
			test -n "$verbose" && echo "	..trimmed $LIBS" 1>&6

echo "${as_me:-configure}:30526: testing ..trimmed $LIBS ..." 1>&5

			;;
		esac
	done

					;;
				esac
			fi

			break
else
	cf_pkgconfig_incs=
	cf_pkgconfig_libs=
	:
fi

	done
fi

if test -z "$cf_x_athena_lib" ; then

if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists Xext; then
	test -n "$verbose" && echo "	found package Xext" 1>&6

echo "${as_me:-configure}:30551: testing found package Xext ..." 1>&5

	cf_pkgconfig_incs="`$PKG_CONFIG --cflags Xext 2>/dev/null`"
	cf_pkgconfig_libs="`$PKG_CONFIG --libs   Xext 2>/dev/null`"
	test -n "$verbose" && echo "	package Xext CFLAGS: $cf_pkgconfig_incs" 1>&6

echo "${as_me:-configure}:30557: testing package Xext CFLAGS: $cf_pkgconfig_incs ..." 1>&5

	test -n "$verbose" && echo "	package Xext LIBS: $cf_pkgconfig_libs" 1>&6

echo "${as_me:-configure}:30561: testing package Xext LIBS: $cf_pkgconfig_libs ..." 1>&5

cf_fix_cppflags=no
cf_new_cflags=
cf_new_cppflags=
cf_new_extra_cppflags=

for cf_add_cflags in $cf_pkgconfig_incs
do
case $cf_fix_cppflags in
(no)
	case $cf_add_cflags in
	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
		case $cf_add_cflags in
		(-D*)
			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`

			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
				&& test -z "${cf_tst_cflags}" \
				&& cf_fix_cppflags=yes

			if test $cf_fix_cppflags = yes ; then

	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"

				continue
			elif test "${cf_tst_cflags}" = "\"'" ; then

	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"

				continue
			fi
			;;
		esac
		case "$CPPFLAGS" in
		(*$cf_add_cflags)
			;;
		(*)
			case $cf_add_cflags in
			(-D*)
				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`

CPPFLAGS=`echo "$CPPFLAGS" | \
	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`

				;;
			esac

	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"

			;;
		esac
		;;
	(*)

	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"

		;;
	esac
	;;
(yes)

	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"

	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`

	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
		&& test -z "${cf_tst_cflags}" \
		&& cf_fix_cppflags=no
	;;
esac
done

if test -n "$cf_new_cflags" ; then

	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
	CFLAGS="${CFLAGS}$cf_new_cflags"

fi

if test -n "$cf_new_cppflags" ; then

	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"

fi

if test -n "$cf_new_extra_cppflags" ; then

	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"

fi

cf_add_libs="$cf_pkgconfig_libs"
# Filter out duplicates - this happens with badly-designed ".pc" files...
for cf_add_1lib in $LIBS
do
	for cf_add_2lib in $cf_add_libs
	do
		if test "x$cf_add_1lib" = "x$cf_add_2lib"
		then
			cf_add_1lib=
			break
		fi
	done
	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
done
LIBS="$cf_add_libs"

	:
else
	cf_pkgconfig_incs=
	cf_pkgconfig_libs=

	echo "$as_me:30682: checking for XextCreateExtension in -lXext" >&5
echo $ECHO_N "checking for XextCreateExtension in -lXext... $ECHO_C" >&6
if test "${ac_cv_lib_Xext_XextCreateExtension+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lXext  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 30690 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char XextCreateExtension ();
int
main (void)
{
XextCreateExtension ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:30709: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:30712: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:30715: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:30718: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_Xext_XextCreateExtension=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_Xext_XextCreateExtension=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:30729: result: $ac_cv_lib_Xext_XextCreateExtension" >&5
echo "${ECHO_T}$ac_cv_lib_Xext_XextCreateExtension" >&6
if test $ac_cv_lib_Xext_XextCreateExtension = yes; then

cf_add_libs="-lXext"
# Filter out duplicates - this happens with badly-designed ".pc" files...
for cf_add_1lib in $LIBS
do
	for cf_add_2lib in $cf_add_libs
	do
		if test "x$cf_add_1lib" = "x$cf_add_2lib"
		then
			cf_add_1lib=
			break
		fi
	done
	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
done
LIBS="$cf_add_libs"

fi

fi

# OSX is schizoid about who owns /usr/X11 (old) versus /opt/X11 (new), and (and
# in some cases has installed dummy files in the former, other cases replaced
# it with a link to the new location).  This complicates the configure script.
# Check for that pitfall, and recover using pkg-config
#
# If none of these are set, the configuration is almost certainly broken.
if test -z "${X_CFLAGS}${X_PRE_LIBS}${X_LIBS}${X_EXTRA_LIBS}"
then

if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists x11; then
	test -n "$verbose" && echo "	found package x11" 1>&6

echo "${as_me:-configure}:30765: testing found package x11 ..." 1>&5

	cf_pkgconfig_incs="`$PKG_CONFIG --cflags x11 2>/dev/null`"
	cf_pkgconfig_libs="`$PKG_CONFIG --libs   x11 2>/dev/null`"
	test -n "$verbose" && echo "	package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6

echo "${as_me:-configure}:30771: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5

	test -n "$verbose" && echo "	package x11 LIBS: $cf_pkgconfig_libs" 1>&6

echo "${as_me:-configure}:30775: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5

cf_fix_cppflags=no
cf_new_cflags=
cf_new_cppflags=
cf_new_extra_cppflags=

for cf_add_cflags in $cf_pkgconfig_incs
do
case $cf_fix_cppflags in
(no)
	case $cf_add_cflags in
	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
		case $cf_add_cflags in
		(-D*)
			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`

			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
				&& test -z "${cf_tst_cflags}" \
				&& cf_fix_cppflags=yes

			if test $cf_fix_cppflags = yes ; then

	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"

				continue
			elif test "${cf_tst_cflags}" = "\"'" ; then

	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"

				continue
			fi
			;;
		esac
		case "$CPPFLAGS" in
		(*$cf_add_cflags)
			;;
		(*)
			case $cf_add_cflags in
			(-D*)
				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`

CPPFLAGS=`echo "$CPPFLAGS" | \
	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`

				;;
			esac

	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"

			;;
		esac
		;;
	(*)

	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"

		;;
	esac
	;;
(yes)

	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"

	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`

	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
		&& test -z "${cf_tst_cflags}" \
		&& cf_fix_cppflags=no
	;;
esac
done

if test -n "$cf_new_cflags" ; then

	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
	CFLAGS="${CFLAGS}$cf_new_cflags"

fi

if test -n "$cf_new_cppflags" ; then

	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"

fi

if test -n "$cf_new_extra_cppflags" ; then

	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"

fi

cf_add_libs="$cf_pkgconfig_libs"
# Filter out duplicates - this happens with badly-designed ".pc" files...
for cf_add_1lib in $LIBS
do
	for cf_add_2lib in $cf_add_libs
	do
		if test "x$cf_add_1lib" = "x$cf_add_2lib"
		then
			cf_add_1lib=
			break
		fi
	done
	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
done
LIBS="$cf_add_libs"

	:
else
	cf_pkgconfig_incs=
	cf_pkgconfig_libs=
	{ echo "$as_me:30895: WARNING: unable to find X11 library" >&5
echo "$as_me: WARNING: unable to find X11 library" >&2;}
fi

if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists ice; then
	test -n "$verbose" && echo "	found package ice" 1>&6

echo "${as_me:-configure}:30902: testing found package ice ..." 1>&5

	cf_pkgconfig_incs="`$PKG_CONFIG --cflags ice 2>/dev/null`"
	cf_pkgconfig_libs="`$PKG_CONFIG --libs   ice 2>/dev/null`"
	test -n "$verbose" && echo "	package ice CFLAGS: $cf_pkgconfig_incs" 1>&6

echo "${as_me:-configure}:30908: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5

	test -n "$verbose" && echo "	package ice LIBS: $cf_pkgconfig_libs" 1>&6

echo "${as_me:-configure}:30912: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5

cf_fix_cppflags=no
cf_new_cflags=
cf_new_cppflags=
cf_new_extra_cppflags=

for cf_add_cflags in $cf_pkgconfig_incs
do
case $cf_fix_cppflags in
(no)
	case $cf_add_cflags in
	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
		case $cf_add_cflags in
		(-D*)
			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`

			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
				&& test -z "${cf_tst_cflags}" \
				&& cf_fix_cppflags=yes

			if test $cf_fix_cppflags = yes ; then

	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"

				continue
			elif test "${cf_tst_cflags}" = "\"'" ; then

	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"

				continue
			fi
			;;
		esac
		case "$CPPFLAGS" in
		(*$cf_add_cflags)
			;;
		(*)
			case $cf_add_cflags in
			(-D*)
				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`

CPPFLAGS=`echo "$CPPFLAGS" | \
	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`

				;;
			esac

	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"

			;;
		esac
		;;
	(*)

	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"

		;;
	esac
	;;
(yes)

	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"

	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`

	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
		&& test -z "${cf_tst_cflags}" \
		&& cf_fix_cppflags=no
	;;
esac
done

if test -n "$cf_new_cflags" ; then

	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
	CFLAGS="${CFLAGS}$cf_new_cflags"

fi

if test -n "$cf_new_cppflags" ; then

	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"

fi

if test -n "$cf_new_extra_cppflags" ; then

	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"

fi

cf_add_libs="$cf_pkgconfig_libs"
# Filter out duplicates - this happens with badly-designed ".pc" files...
for cf_add_1lib in $LIBS
do
	for cf_add_2lib in $cf_add_libs
	do
		if test "x$cf_add_1lib" = "x$cf_add_2lib"
		then
			cf_add_1lib=
			break
		fi
	done
	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
done
LIBS="$cf_add_libs"

	:
else
	cf_pkgconfig_incs=
	cf_pkgconfig_libs=
	{ echo "$as_me:31032: WARNING: unable to find ICE library" >&5
echo "$as_me: WARNING: unable to find ICE library" >&2;}
fi

if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists sm; then
	test -n "$verbose" && echo "	found package sm" 1>&6

echo "${as_me:-configure}:31039: testing found package sm ..." 1>&5

	cf_pkgconfig_incs="`$PKG_CONFIG --cflags sm 2>/dev/null`"
	cf_pkgconfig_libs="`$PKG_CONFIG --libs   sm 2>/dev/null`"
	test -n "$verbose" && echo "	package sm CFLAGS: $cf_pkgconfig_incs" 1>&6

echo "${as_me:-configure}:31045: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5

	test -n "$verbose" && echo "	package sm LIBS: $cf_pkgconfig_libs" 1>&6

echo "${as_me:-configure}:31049: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5

cf_fix_cppflags=no
cf_new_cflags=
cf_new_cppflags=
cf_new_extra_cppflags=

for cf_add_cflags in $cf_pkgconfig_incs
do
case $cf_fix_cppflags in
(no)
	case $cf_add_cflags in
	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
		case $cf_add_cflags in
		(-D*)
			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`

			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
				&& test -z "${cf_tst_cflags}" \
				&& cf_fix_cppflags=yes

			if test $cf_fix_cppflags = yes ; then

	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"

				continue
			elif test "${cf_tst_cflags}" = "\"'" ; then

	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"

				continue
			fi
			;;
		esac
		case "$CPPFLAGS" in
		(*$cf_add_cflags)
			;;
		(*)
			case $cf_add_cflags in
			(-D*)
				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`

CPPFLAGS=`echo "$CPPFLAGS" | \
	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`

				;;
			esac

	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"

			;;
		esac
		;;
	(*)

	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"

		;;
	esac
	;;
(yes)

	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"

	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`

	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
		&& test -z "${cf_tst_cflags}" \
		&& cf_fix_cppflags=no
	;;
esac
done

if test -n "$cf_new_cflags" ; then

	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
	CFLAGS="${CFLAGS}$cf_new_cflags"

fi

if test -n "$cf_new_cppflags" ; then

	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"

fi

if test -n "$cf_new_extra_cppflags" ; then

	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"

fi

cf_add_libs="$cf_pkgconfig_libs"
# Filter out duplicates - this happens with badly-designed ".pc" files...
for cf_add_1lib in $LIBS
do
	for cf_add_2lib in $cf_add_libs
	do
		if test "x$cf_add_1lib" = "x$cf_add_2lib"
		then
			cf_add_1lib=
			break
		fi
	done
	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
done
LIBS="$cf_add_libs"

	:
else
	cf_pkgconfig_incs=
	cf_pkgconfig_libs=
	{ echo "$as_me:31169: WARNING: unable to find SM library" >&5
echo "$as_me: WARNING: unable to find SM library" >&2;}
fi

if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xt; then
	test -n "$verbose" && echo "	found package xt" 1>&6

echo "${as_me:-configure}:31176: testing found package xt ..." 1>&5

	cf_pkgconfig_incs="`$PKG_CONFIG --cflags xt 2>/dev/null`"
	cf_pkgconfig_libs="`$PKG_CONFIG --libs   xt 2>/dev/null`"
	test -n "$verbose" && echo "	package xt CFLAGS: $cf_pkgconfig_incs" 1>&6

echo "${as_me:-configure}:31182: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5

	test -n "$verbose" && echo "	package xt LIBS: $cf_pkgconfig_libs" 1>&6

echo "${as_me:-configure}:31186: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5

cf_fix_cppflags=no
cf_new_cflags=
cf_new_cppflags=
cf_new_extra_cppflags=

for cf_add_cflags in $cf_pkgconfig_incs
do
case $cf_fix_cppflags in
(no)
	case $cf_add_cflags in
	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
		case $cf_add_cflags in
		(-D*)
			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`

			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
				&& test -z "${cf_tst_cflags}" \
				&& cf_fix_cppflags=yes

			if test $cf_fix_cppflags = yes ; then

	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"

				continue
			elif test "${cf_tst_cflags}" = "\"'" ; then

	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"

				continue
			fi
			;;
		esac
		case "$CPPFLAGS" in
		(*$cf_add_cflags)
			;;
		(*)
			case $cf_add_cflags in
			(-D*)
				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`

CPPFLAGS=`echo "$CPPFLAGS" | \
	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`

				;;
			esac

	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"

			;;
		esac
		;;
	(*)

	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"

		;;
	esac
	;;
(yes)

	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"

	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`

	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
		&& test -z "${cf_tst_cflags}" \
		&& cf_fix_cppflags=no
	;;
esac
done

if test -n "$cf_new_cflags" ; then

	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
	CFLAGS="${CFLAGS}$cf_new_cflags"

fi

if test -n "$cf_new_cppflags" ; then

	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"

fi

if test -n "$cf_new_extra_cppflags" ; then

	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"

fi

cf_add_libs="$cf_pkgconfig_libs"
# Filter out duplicates - this happens with badly-designed ".pc" files...
for cf_add_1lib in $LIBS
do
	for cf_add_2lib in $cf_add_libs
	do
		if test "x$cf_add_1lib" = "x$cf_add_2lib"
		then
			cf_add_1lib=
			break
		fi
	done
	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
done
LIBS="$cf_add_libs"

	:
else
	cf_pkgconfig_incs=
	cf_pkgconfig_libs=
	{ echo "$as_me:31306: WARNING: unable to find Xt library" >&5
echo "$as_me: WARNING: unable to find Xt library" >&2;}
fi

fi

cf_have_X_LIBS=no

if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xt; then
	test -n "$verbose" && echo "	found package xt" 1>&6

echo "${as_me:-configure}:31317: testing found package xt ..." 1>&5

	cf_pkgconfig_incs="`$PKG_CONFIG --cflags xt 2>/dev/null`"
	cf_pkgconfig_libs="`$PKG_CONFIG --libs   xt 2>/dev/null`"
	test -n "$verbose" && echo "	package xt CFLAGS: $cf_pkgconfig_incs" 1>&6

echo "${as_me:-configure}:31323: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5

	test -n "$verbose" && echo "	package xt LIBS: $cf_pkgconfig_libs" 1>&6

echo "${as_me:-configure}:31327: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5

cf_fix_cppflags=no
cf_new_cflags=
cf_new_cppflags=
cf_new_extra_cppflags=

for cf_add_cflags in $cf_pkgconfig_incs
do
case $cf_fix_cppflags in
(no)
	case $cf_add_cflags in
	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
		case $cf_add_cflags in
		(-D*)
			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`

			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
				&& test -z "${cf_tst_cflags}" \
				&& cf_fix_cppflags=yes

			if test $cf_fix_cppflags = yes ; then

	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"

				continue
			elif test "${cf_tst_cflags}" = "\"'" ; then

	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"

				continue
			fi
			;;
		esac
		case "$CPPFLAGS" in
		(*$cf_add_cflags)
			;;
		(*)
			case $cf_add_cflags in
			(-D*)
				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`

CPPFLAGS=`echo "$CPPFLAGS" | \
	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`

				;;
			esac

	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"

			;;
		esac
		;;
	(*)

	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"

		;;
	esac
	;;
(yes)

	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"

	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`

	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
		&& test -z "${cf_tst_cflags}" \
		&& cf_fix_cppflags=no
	;;
esac
done

if test -n "$cf_new_cflags" ; then

	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
	CFLAGS="${CFLAGS}$cf_new_cflags"

fi

if test -n "$cf_new_cppflags" ; then

	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"

fi

if test -n "$cf_new_extra_cppflags" ; then

	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"

fi

cf_add_libs="$cf_pkgconfig_libs"
# Filter out duplicates - this happens with badly-designed ".pc" files...
for cf_add_1lib in $LIBS
do
	for cf_add_2lib in $cf_add_libs
	do
		if test "x$cf_add_1lib" = "x$cf_add_2lib"
		then
			cf_add_1lib=
			break
		fi
	done
	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
done
LIBS="$cf_add_libs"

	case "x$LIBS" in
	(*-lX11*)
		;;
	(*)
# we have an "xt" package, but it may omit Xt's dependency on X11
echo "$as_me:31448: checking for usable X dependency" >&5
echo $ECHO_N "checking for usable X dependency... $ECHO_C" >&6
if test "${cf_cv_xt_x11_compat+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

cat >conftest.$ac_ext <<_ACEOF
#line 31455 "configure"
#include "confdefs.h"

#include <X11/Xlib.h>

int
main (void)
{

	int rc1 = XDrawLine((Display*) 0, (Drawable) 0, (GC) 0, 0, 0, 0, 0);
	int rc2 = XClearWindow((Display*) 0, (Window) 0);
	int rc3 = XMoveWindow((Display*) 0, (Window) 0, 0, 0);
	int rc4 = XMoveResizeWindow((Display*)0, (Window)0, 0, 0, 0, 0);

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:31474: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:31477: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:31480: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:31483: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  cf_cv_xt_x11_compat=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
cf_cv_xt_x11_compat=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:31493: result: $cf_cv_xt_x11_compat" >&5
echo "${ECHO_T}$cf_cv_xt_x11_compat" >&6
		if test "$cf_cv_xt_x11_compat" = no
		then
			test -n "$verbose" && echo "	work around broken X11 dependency" 1>&6

echo "${as_me:-configure}:31499: testing work around broken X11 dependency ..." 1>&5

			# 2010/11/19 - good enough until a working Xt on Xcb is delivered.

if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists x11; then
	test -n "$verbose" && echo "	found package x11" 1>&6

echo "${as_me:-configure}:31506: testing found package x11 ..." 1>&5

	cf_pkgconfig_incs="`$PKG_CONFIG --cflags x11 2>/dev/null`"
	cf_pkgconfig_libs="`$PKG_CONFIG --libs   x11 2>/dev/null`"
	test -n "$verbose" && echo "	package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6

echo "${as_me:-configure}:31512: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5

	test -n "$verbose" && echo "	package x11 LIBS: $cf_pkgconfig_libs" 1>&6

echo "${as_me:-configure}:31516: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5

cf_fix_cppflags=no
cf_new_cflags=
cf_new_cppflags=
cf_new_extra_cppflags=

for cf_add_cflags in $cf_pkgconfig_incs
do
case $cf_fix_cppflags in
(no)
	case $cf_add_cflags in
	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
		case $cf_add_cflags in
		(-D*)
			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`

			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
				&& test -z "${cf_tst_cflags}" \
				&& cf_fix_cppflags=yes

			if test $cf_fix_cppflags = yes ; then

	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"

				continue
			elif test "${cf_tst_cflags}" = "\"'" ; then

	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"

				continue
			fi
			;;
		esac
		case "$CPPFLAGS" in
		(*$cf_add_cflags)
			;;
		(*)
			case $cf_add_cflags in
			(-D*)
				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`

CPPFLAGS=`echo "$CPPFLAGS" | \
	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`

				;;
			esac

	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"

			;;
		esac
		;;
	(*)

	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"

		;;
	esac
	;;
(yes)

	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"

	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`

	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
		&& test -z "${cf_tst_cflags}" \
		&& cf_fix_cppflags=no
	;;
esac
done

if test -n "$cf_new_cflags" ; then

	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
	CFLAGS="${CFLAGS}$cf_new_cflags"

fi

if test -n "$cf_new_cppflags" ; then

	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"

fi

if test -n "$cf_new_extra_cppflags" ; then

	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"

fi

cf_add_libs="$cf_pkgconfig_libs"
# Filter out duplicates - this happens with badly-designed ".pc" files...
for cf_add_1lib in $LIBS
do
	for cf_add_2lib in $cf_add_libs
	do
		if test "x$cf_add_1lib" = "x$cf_add_2lib"
		then
			cf_add_1lib=
			break
		fi
	done
	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
done
LIBS="$cf_add_libs"

	:
else
	cf_pkgconfig_incs=
	cf_pkgconfig_libs=

test -n "$verbose" && echo "	...before $LIBS" 1>&6

echo "${as_me:-configure}:31639: testing ...before $LIBS ..." 1>&5

LIBS=`echo "$LIBS" | sed -e "s/[ 	][ 	]*/ /g" -e "s%-lXt %-lXt -lX11 %" -e 's%  % %g'`
test -n "$verbose" && echo "	...after  $LIBS" 1>&6

echo "${as_me:-configure}:31644: testing ...after  $LIBS ..." 1>&5

fi

		fi
		;;
	esac

echo "$as_me:31652: checking for usable X Toolkit package" >&5
echo $ECHO_N "checking for usable X Toolkit package... $ECHO_C" >&6
if test "${cf_cv_xt_ice_compat+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

cat >conftest.$ac_ext <<_ACEOF
#line 31659 "configure"
#include "confdefs.h"

#include <X11/Shell.h>

int
main (void)
{
int num = IceConnectionNumber(0)

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:31674: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:31677: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:31680: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:31683: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  cf_cv_xt_ice_compat=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
cf_cv_xt_ice_compat=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:31693: result: $cf_cv_xt_ice_compat" >&5
echo "${ECHO_T}$cf_cv_xt_ice_compat" >&6

	if test "$cf_cv_xt_ice_compat" = no
	then
		# workaround for broken ".pc" files used for X Toolkit.
		case "x$X_PRE_LIBS" in
		(*-lICE*)
			case "x$LIBS" in
			(*-lICE*)
				;;
			(*)
				test -n "$verbose" && echo "	work around broken ICE dependency" 1>&6

echo "${as_me:-configure}:31707: testing work around broken ICE dependency ..." 1>&5

if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists ice; then
	test -n "$verbose" && echo "	found package ice" 1>&6

echo "${as_me:-configure}:31712: testing found package ice ..." 1>&5

	cf_pkgconfig_incs="`$PKG_CONFIG --cflags ice 2>/dev/null`"
	cf_pkgconfig_libs="`$PKG_CONFIG --libs   ice 2>/dev/null`"
	test -n "$verbose" && echo "	package ice CFLAGS: $cf_pkgconfig_incs" 1>&6

echo "${as_me:-configure}:31718: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5

	test -n "$verbose" && echo "	package ice LIBS: $cf_pkgconfig_libs" 1>&6

echo "${as_me:-configure}:31722: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5

cf_fix_cppflags=no
cf_new_cflags=
cf_new_cppflags=
cf_new_extra_cppflags=

for cf_add_cflags in $cf_pkgconfig_incs
do
case $cf_fix_cppflags in
(no)
	case $cf_add_cflags in
	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
		case $cf_add_cflags in
		(-D*)
			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`

			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
				&& test -z "${cf_tst_cflags}" \
				&& cf_fix_cppflags=yes

			if test $cf_fix_cppflags = yes ; then

	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"

				continue
			elif test "${cf_tst_cflags}" = "\"'" ; then

	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"

				continue
			fi
			;;
		esac
		case "$CPPFLAGS" in
		(*$cf_add_cflags)
			;;
		(*)
			case $cf_add_cflags in
			(-D*)
				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`

CPPFLAGS=`echo "$CPPFLAGS" | \
	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`

				;;
			esac

	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"

			;;
		esac
		;;
	(*)

	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"

		;;
	esac
	;;
(yes)

	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"

	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`

	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
		&& test -z "${cf_tst_cflags}" \
		&& cf_fix_cppflags=no
	;;
esac
done

if test -n "$cf_new_cflags" ; then

	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
	CFLAGS="${CFLAGS}$cf_new_cflags"

fi

if test -n "$cf_new_cppflags" ; then

	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"

fi

if test -n "$cf_new_extra_cppflags" ; then

	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"

fi

cf_add_libs="$cf_pkgconfig_libs"
# Filter out duplicates - this happens with badly-designed ".pc" files...
for cf_add_1lib in $LIBS
do
	for cf_add_2lib in $cf_add_libs
	do
		if test "x$cf_add_1lib" = "x$cf_add_2lib"
		then
			cf_add_1lib=
			break
		fi
	done
	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
done
LIBS="$cf_add_libs"

if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists sm; then
	test -n "$verbose" && echo "	found package sm" 1>&6

echo "${as_me:-configure}:31841: testing found package sm ..." 1>&5

	cf_pkgconfig_incs="`$PKG_CONFIG --cflags sm 2>/dev/null`"
	cf_pkgconfig_libs="`$PKG_CONFIG --libs   sm 2>/dev/null`"
	test -n "$verbose" && echo "	package sm CFLAGS: $cf_pkgconfig_incs" 1>&6

echo "${as_me:-configure}:31847: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5

	test -n "$verbose" && echo "	package sm LIBS: $cf_pkgconfig_libs" 1>&6

echo "${as_me:-configure}:31851: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5

cf_fix_cppflags=no
cf_new_cflags=
cf_new_cppflags=
cf_new_extra_cppflags=

for cf_add_cflags in $cf_pkgconfig_incs
do
case $cf_fix_cppflags in
(no)
	case $cf_add_cflags in
	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
		case $cf_add_cflags in
		(-D*)
			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`

			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
				&& test -z "${cf_tst_cflags}" \
				&& cf_fix_cppflags=yes

			if test $cf_fix_cppflags = yes ; then

	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"

				continue
			elif test "${cf_tst_cflags}" = "\"'" ; then

	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"

				continue
			fi
			;;
		esac
		case "$CPPFLAGS" in
		(*$cf_add_cflags)
			;;
		(*)
			case $cf_add_cflags in
			(-D*)
				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`

CPPFLAGS=`echo "$CPPFLAGS" | \
	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`

				;;
			esac

	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"

			;;
		esac
		;;
	(*)

	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"

		;;
	esac
	;;
(yes)

	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"

	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`

	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
		&& test -z "${cf_tst_cflags}" \
		&& cf_fix_cppflags=no
	;;
esac
done

if test -n "$cf_new_cflags" ; then

	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
	CFLAGS="${CFLAGS}$cf_new_cflags"

fi

if test -n "$cf_new_cppflags" ; then

	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"

fi

if test -n "$cf_new_extra_cppflags" ; then

	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"

fi

cf_add_libs="$cf_pkgconfig_libs"
# Filter out duplicates - this happens with badly-designed ".pc" files...
for cf_add_1lib in $LIBS
do
	for cf_add_2lib in $cf_add_libs
	do
		if test "x$cf_add_1lib" = "x$cf_add_2lib"
		then
			cf_add_1lib=
			break
		fi
	done
	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
done
LIBS="$cf_add_libs"

	:
else
	cf_pkgconfig_incs=
	cf_pkgconfig_libs=
	:
fi

else
	cf_pkgconfig_incs=
	cf_pkgconfig_libs=

test -n "$verbose" && echo "	...before $LIBS" 1>&6

echo "${as_me:-configure}:31980: testing ...before $LIBS ..." 1>&5

LIBS=`echo "$LIBS" | sed -e "s/[ 	][ 	]*/ /g" -e "s%-lXt %-lXt $X_PRE_LIBS %" -e 's%  % %g'`
test -n "$verbose" && echo "	...after  $LIBS" 1>&6

echo "${as_me:-configure}:31985: testing ...after  $LIBS ..." 1>&5

fi

				;;
			esac
			;;
		esac
	fi

	cf_have_X_LIBS=yes

else
	cf_pkgconfig_incs=
	cf_pkgconfig_libs=

	LDFLAGS="$X_LIBS $LDFLAGS"

test -n "$verbose" && echo "	checking additions to CFLAGS" 1>&6

echo "${as_me:-configure}:32005: testing checking additions to CFLAGS ..." 1>&5

cf_check_cflags="$CFLAGS"
cf_check_cppflags="$CPPFLAGS"

cf_fix_cppflags=no
cf_new_cflags=
cf_new_cppflags=
cf_new_extra_cppflags=

for cf_add_cflags in $X_CFLAGS
do
case $cf_fix_cppflags in
(no)
	case $cf_add_cflags in
	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
		case $cf_add_cflags in
		(-D*)
			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`

			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
				&& test -z "${cf_tst_cflags}" \
				&& cf_fix_cppflags=yes

			if test $cf_fix_cppflags = yes ; then

	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"

				continue
			elif test "${cf_tst_cflags}" = "\"'" ; then

	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"

				continue
			fi
			;;
		esac
		case "$CPPFLAGS" in
		(*$cf_add_cflags)
			;;
		(*)
			case $cf_add_cflags in
			(-D*)
				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`

CPPFLAGS=`echo "$CPPFLAGS" | \
	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`

				;;
			esac

	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"

			;;
		esac
		;;
	(*)

	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"

		;;
	esac
	;;
(yes)

	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"

	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`

	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
		&& test -z "${cf_tst_cflags}" \
		&& cf_fix_cppflags=no
	;;
esac
done

if test -n "$cf_new_cflags" ; then
	test -n "$verbose" && echo "	add to \$CFLAGS $cf_new_cflags" 1>&6

echo "${as_me:-configure}:32090: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5

	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
	CFLAGS="${CFLAGS}$cf_new_cflags"

fi

if test -n "$cf_new_cppflags" ; then
	test -n "$verbose" && echo "	add to \$CPPFLAGS $cf_new_cppflags" 1>&6

echo "${as_me:-configure}:32100: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5

	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"

fi

if test -n "$cf_new_extra_cppflags" ; then
	test -n "$verbose" && echo "	add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6

echo "${as_me:-configure}:32110: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5

	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"

fi

if test "x$cf_check_cflags" != "x$CFLAGS" ; then
cat >conftest.$ac_ext <<_ACEOF
#line 32119 "configure"
#include "confdefs.h"
#include <stdio.h>
int
main (void)
{
printf("Hello world");
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:32131: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:32134: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:32137: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:32140: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  :
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
test -n "$verbose" && echo "	test-compile failed.  Undoing change to \$CFLAGS" 1>&6

echo "${as_me:-configure}:32148: testing test-compile failed.  Undoing change to \$CFLAGS ..." 1>&5

	 if test "x$cf_check_cppflags" != "x$CPPFLAGS" ; then
		 test -n "$verbose" && echo "	but keeping change to \$CPPFLAGS" 1>&6

echo "${as_me:-configure}:32153: testing but keeping change to \$CPPFLAGS ..." 1>&5

	 fi
	 CFLAGS="$cf_check_flags"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi

	echo "$as_me:32161: checking for XOpenDisplay" >&5
echo $ECHO_N "checking for XOpenDisplay... $ECHO_C" >&6
if test "${ac_cv_func_XOpenDisplay+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 32167 "configure"
#include "confdefs.h"
#define XOpenDisplay autoconf_temporary
#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
#undef XOpenDisplay

#ifdef __cplusplus
extern "C"
#endif

/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char XOpenDisplay (void);

int
main (void)
{

/* The GNU C library defines stubs for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_XOpenDisplay) || defined (__stub___XOpenDisplay)
#error found stub for XOpenDisplay
#endif

	return XOpenDisplay ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:32198: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:32201: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:32204: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:32207: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_func_XOpenDisplay=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_func_XOpenDisplay=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:32217: result: $ac_cv_func_XOpenDisplay" >&5
echo "${ECHO_T}$ac_cv_func_XOpenDisplay" >&6
if test $ac_cv_func_XOpenDisplay = yes; then
  :
else

	echo "$as_me:32223: checking for XOpenDisplay in -lX11" >&5
echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 32231 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char XOpenDisplay ();
int
main (void)
{
XOpenDisplay ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:32250: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:32253: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:32256: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:32259: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_X11_XOpenDisplay=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_X11_XOpenDisplay=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:32270: result: $ac_cv_lib_X11_XOpenDisplay" >&5
echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
if test $ac_cv_lib_X11_XOpenDisplay = yes; then

cf_add_libs="-lX11"
# Filter out duplicates - this happens with badly-designed ".pc" files...
for cf_add_1lib in $LIBS
do
	for cf_add_2lib in $cf_add_libs
	do
		if test "x$cf_add_1lib" = "x$cf_add_2lib"
		then
			cf_add_1lib=
			break
		fi
	done
	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
done
LIBS="$cf_add_libs"

fi

fi

	echo "$as_me:32294: checking for XtAppInitialize" >&5
echo $ECHO_N "checking for XtAppInitialize... $ECHO_C" >&6
if test "${ac_cv_func_XtAppInitialize+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 32300 "configure"
#include "confdefs.h"
#define XtAppInitialize autoconf_temporary
#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
#undef XtAppInitialize

#ifdef __cplusplus
extern "C"
#endif

/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char XtAppInitialize (void);

int
main (void)
{

/* The GNU C library defines stubs for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_XtAppInitialize) || defined (__stub___XtAppInitialize)
#error found stub for XtAppInitialize
#endif

	return XtAppInitialize ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:32331: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:32334: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:32337: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:32340: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_func_XtAppInitialize=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_func_XtAppInitialize=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:32350: result: $ac_cv_func_XtAppInitialize" >&5
echo "${ECHO_T}$ac_cv_func_XtAppInitialize" >&6
if test $ac_cv_func_XtAppInitialize = yes; then
  :
else

	echo "$as_me:32356: checking for XtAppInitialize in -lXt" >&5
echo $ECHO_N "checking for XtAppInitialize in -lXt... $ECHO_C" >&6
if test "${ac_cv_lib_Xt_XtAppInitialize+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 32364 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char XtAppInitialize ();
int
main (void)
{
XtAppInitialize ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:32383: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:32386: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:32389: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:32392: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_Xt_XtAppInitialize=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_Xt_XtAppInitialize=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:32403: result: $ac_cv_lib_Xt_XtAppInitialize" >&5
echo "${ECHO_T}$ac_cv_lib_Xt_XtAppInitialize" >&6
if test $ac_cv_lib_Xt_XtAppInitialize = yes; then

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

		 cf_have_X_LIBS=Xt
		 LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS"
fi

fi

fi

if test $cf_have_X_LIBS = no ; then
	{ echo "$as_me:32420: WARNING: Unable to successfully link X Toolkit library (-lXt) with
test program.  You will have to check and add the proper libraries by hand
to makefile." >&5
echo "$as_me: WARNING: Unable to successfully link X Toolkit library (-lXt) with
test program.  You will have to check and add the proper libraries by hand
to makefile." >&2;}
fi

cf_x_athena_root=$cf_x_athena
cf_x_athena_inc=""

for cf_path in default \
	/usr/contrib/X11R6 \
	/usr/contrib/X11R5 \
	/usr/lib/X11R5 \
	/usr/local
do
	if test -z "$cf_x_athena_inc" ; then
		cf_save="$CPPFLAGS"
		cf_test=X11/$cf_x_athena_root/SimpleMenu.h
		if test $cf_path != default ; then
			CPPFLAGS="$cf_save"

	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
	CPPFLAGS="${CPPFLAGS}-I$cf_path/include"

			echo "$as_me:32446: checking for $cf_test in $cf_path" >&5
echo $ECHO_N "checking for $cf_test in $cf_path... $ECHO_C" >&6
		else
			echo "$as_me:32449: checking for $cf_test" >&5
echo $ECHO_N "checking for $cf_test... $ECHO_C" >&6
		fi
		cat >conftest.$ac_ext <<_ACEOF
#line 32453 "configure"
#include "confdefs.h"

#include <X11/Intrinsic.h>
#include <$cf_test>
int
main (void)
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:32467: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:32470: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:32473: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:32476: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  cf_result=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
cf_result=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
		echo "$as_me:32485: result: $cf_result" >&5
echo "${ECHO_T}$cf_result" >&6
		if test "$cf_result" = yes ; then
			cf_x_athena_inc=$cf_path
			break
		else
			CPPFLAGS="$cf_save"
		fi
	fi
done

if test -z "$cf_x_athena_inc" ; then
	{ echo "$as_me:32497: WARNING: Unable to successfully find Athena header files with test program" >&5
echo "$as_me: WARNING: Unable to successfully find Athena header files with test program" >&2;}
elif test "$cf_x_athena_inc" != default ; then

	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
	CPPFLAGS="${CPPFLAGS}-I$cf_x_athena_inc"

fi

cf_x_athena_root=$cf_x_athena
cf_x_athena_lib=""

for cf_path in default \
	/usr/contrib/X11R6 \
	/usr/contrib/X11R5 \
	/usr/lib/X11R5 \
	/usr/local
do
	for cf_lib in \
		${cf_x_athena_root} \
		${cf_x_athena_root}7 \
		${cf_x_athena_root}6
	do
	for cf_libs in \
		"-l$cf_lib -lXmu" \
		"-l$cf_lib -lXpm -lXmu" \
		"-l${cf_lib}_s -lXmu_s"
	do
		if test -z "$cf_x_athena_lib" ; then
			cf_save="$LIBS"
			cf_test=XawSimpleMenuAddGlobalActions
			if test $cf_path != default ; then

cf_add_libs="-L$cf_path/lib $cf_libs"
# Filter out duplicates - this happens with badly-designed ".pc" files...
for cf_add_1lib in $LIBS
do
	for cf_add_2lib in $cf_add_libs
	do
		if test "x$cf_add_1lib" = "x$cf_add_2lib"
		then
			cf_add_1lib=
			break
		fi
	done
	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
done
LIBS="$cf_add_libs"

				echo "$as_me:32546: checking for $cf_libs in $cf_path" >&5
echo $ECHO_N "checking for $cf_libs in $cf_path... $ECHO_C" >&6
			else

cf_add_libs="$cf_libs"
# Filter out duplicates - this happens with badly-designed ".pc" files...
for cf_add_1lib in $LIBS
do
	for cf_add_2lib in $cf_add_libs
	do
		if test "x$cf_add_1lib" = "x$cf_add_2lib"
		then
			cf_add_1lib=
			break
		fi
	done
	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
done
LIBS="$cf_add_libs"

				echo "$as_me:32566: checking for $cf_test in $cf_libs" >&5
echo $ECHO_N "checking for $cf_test in $cf_libs... $ECHO_C" >&6
			fi
			cat >conftest.$ac_ext <<_ACEOF
#line 32570 "configure"
#include "confdefs.h"

#include <X11/Intrinsic.h>
#include <X11/$cf_x_athena_root/SimpleMenu.h>

int
main (void)
{

$cf_test((XtAppContext) 0)
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:32586: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:32589: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:32592: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:32595: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  cf_result=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
cf_result=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
			echo "$as_me:32604: result: $cf_result" >&5
echo "${ECHO_T}$cf_result" >&6
			if test "$cf_result" = yes ; then
				cf_x_athena_lib="$cf_libs"
				break
			fi
			LIBS="$cf_save"
		fi
	done # cf_libs
		test -n "$cf_x_athena_lib" && break
	done # cf_lib
done

if test -z "$cf_x_athena_lib" ; then
	{ { echo "$as_me:32618: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&5
echo "$as_me: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&2;}
   { (exit 1); exit 1; }; }
fi

cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`

cat >>confdefs.h <<EOF
#define $cf_x_athena_LIBS 1
EOF

fi

if test -n "$ac_tool_prefix"; then
  for ac_prog in xcurses-config
  do
    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
set dummy $ac_tool_prefix$ac_prog; ac_word=$2
echo "$as_me:32636: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_XCURSES_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$XCURSES_CONFIG"; then
  ac_cv_prog_XCURSES_CONFIG="$XCURSES_CONFIG" # Let the user override the test.
else
  ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  $as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_XCURSES_CONFIG="$ac_tool_prefix$ac_prog"
echo "$as_me:32651: found $ac_dir/$ac_word" >&5
break
done

fi
fi
XCURSES_CONFIG=$ac_cv_prog_XCURSES_CONFIG
if test -n "$XCURSES_CONFIG"; then
  echo "$as_me:32659: result: $XCURSES_CONFIG" >&5
echo "${ECHO_T}$XCURSES_CONFIG" >&6
else
  echo "$as_me:32662: result: no" >&5
echo "${ECHO_T}no" >&6
fi

    test -n "$XCURSES_CONFIG" && break
  done
fi
if test -z "$XCURSES_CONFIG"; then
  ac_ct_XCURSES_CONFIG=$XCURSES_CONFIG
  for ac_prog in xcurses-config
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 "$as_me:32675: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_ac_ct_XCURSES_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_XCURSES_CONFIG"; then
  ac_cv_prog_ac_ct_XCURSES_CONFIG="$ac_ct_XCURSES_CONFIG" # Let the user override the test.
else
  ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  $as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_ac_ct_XCURSES_CONFIG="$ac_prog"
echo "$as_me:32690: found $ac_dir/$ac_word" >&5
break
done

fi
fi
ac_ct_XCURSES_CONFIG=$ac_cv_prog_ac_ct_XCURSES_CONFIG
if test -n "$ac_ct_XCURSES_CONFIG"; then
  echo "$as_me:32698: result: $ac_ct_XCURSES_CONFIG" >&5
echo "${ECHO_T}$ac_ct_XCURSES_CONFIG" >&6
else
  echo "$as_me:32701: result: no" >&5
echo "${ECHO_T}no" >&6
fi

  test -n "$ac_ct_XCURSES_CONFIG" && break
done
test -n "$ac_ct_XCURSES_CONFIG" || ac_ct_XCURSES_CONFIG="none"

  XCURSES_CONFIG=$ac_ct_XCURSES_CONFIG
fi

if test "$XCURSES_CONFIG" != none ; then

cf_fix_cppflags=no
cf_new_cflags=
cf_new_cppflags=
cf_new_extra_cppflags=

for cf_add_cflags in `$XCURSES_CONFIG --cflags`
do
case $cf_fix_cppflags in
(no)
	case $cf_add_cflags in
	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
		case $cf_add_cflags in
		(-D*)
			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`

			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
				&& test -z "${cf_tst_cflags}" \
				&& cf_fix_cppflags=yes

			if test $cf_fix_cppflags = yes ; then

	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"

				continue
			elif test "${cf_tst_cflags}" = "\"'" ; then

	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"

				continue
			fi
			;;
		esac
		case "$CPPFLAGS" in
		(*$cf_add_cflags)
			;;
		(*)
			case $cf_add_cflags in
			(-D*)
				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`

CPPFLAGS=`echo "$CPPFLAGS" | \
	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`

				;;
			esac

	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"

			;;
		esac
		;;
	(*)

	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"

		;;
	esac
	;;
(yes)

	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"

	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`

	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
		&& test -z "${cf_tst_cflags}" \
		&& cf_fix_cppflags=no
	;;
esac
done

if test -n "$cf_new_cflags" ; then

	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
	CFLAGS="${CFLAGS}$cf_new_cflags"

fi

if test -n "$cf_new_cppflags" ; then

	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"

fi

if test -n "$cf_new_extra_cppflags" ; then

	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"

fi

cf_add_libs="`$XCURSES_CONFIG --libs`"
# Filter out duplicates - this happens with badly-designed ".pc" files...
for cf_add_1lib in $LIBS
do
	for cf_add_2lib in $cf_add_libs
	do
		if test "x$cf_add_1lib" = "x$cf_add_2lib"
		then
			cf_add_1lib=
			break
		fi
	done
	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
done
LIBS="$cf_add_libs"

cf_cv_lib_XCurses=yes

else

LDFLAGS="$LDFLAGS $X_LIBS"

test -n "$verbose" && echo "	checking additions to CFLAGS" 1>&6

echo "${as_me:-configure}:32836: testing checking additions to CFLAGS ..." 1>&5

cf_check_cflags="$CFLAGS"
cf_check_cppflags="$CPPFLAGS"

cf_fix_cppflags=no
cf_new_cflags=
cf_new_cppflags=
cf_new_extra_cppflags=

for cf_add_cflags in $X_CFLAGS
do
case $cf_fix_cppflags in
(no)
	case $cf_add_cflags in
	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
		case $cf_add_cflags in
		(-D*)
			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`

			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
				&& test -z "${cf_tst_cflags}" \
				&& cf_fix_cppflags=yes

			if test $cf_fix_cppflags = yes ; then

	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"

				continue
			elif test "${cf_tst_cflags}" = "\"'" ; then

	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"

				continue
			fi
			;;
		esac
		case "$CPPFLAGS" in
		(*$cf_add_cflags)
			;;
		(*)
			case $cf_add_cflags in
			(-D*)
				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`

CPPFLAGS=`echo "$CPPFLAGS" | \
	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`

				;;
			esac

	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"

			;;
		esac
		;;
	(*)

	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"

		;;
	esac
	;;
(yes)

	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"

	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`

	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
		&& test -z "${cf_tst_cflags}" \
		&& cf_fix_cppflags=no
	;;
esac
done

if test -n "$cf_new_cflags" ; then
	test -n "$verbose" && echo "	add to \$CFLAGS $cf_new_cflags" 1>&6

echo "${as_me:-configure}:32921: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5

	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
	CFLAGS="${CFLAGS}$cf_new_cflags"

fi

if test -n "$cf_new_cppflags" ; then
	test -n "$verbose" && echo "	add to \$CPPFLAGS $cf_new_cppflags" 1>&6

echo "${as_me:-configure}:32931: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5

	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"

fi

if test -n "$cf_new_extra_cppflags" ; then
	test -n "$verbose" && echo "	add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6

echo "${as_me:-configure}:32941: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5

	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"

fi

if test "x$cf_check_cflags" != "x$CFLAGS" ; then
cat >conftest.$ac_ext <<_ACEOF
#line 32950 "configure"
#include "confdefs.h"
#include <stdio.h>
int
main (void)
{
printf("Hello world");
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:32962: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:32965: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:32968: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:32971: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  :
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
test -n "$verbose" && echo "	test-compile failed.  Undoing change to \$CFLAGS" 1>&6

echo "${as_me:-configure}:32979: testing test-compile failed.  Undoing change to \$CFLAGS ..." 1>&5

	 if test "x$cf_check_cppflags" != "x$CPPFLAGS" ; then
		 test -n "$verbose" && echo "	but keeping change to \$CPPFLAGS" 1>&6

echo "${as_me:-configure}:32984: testing but keeping change to \$CPPFLAGS ..." 1>&5

	 fi
	 CFLAGS="$cf_check_flags"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi

echo "$as_me:32992: checking for XOpenDisplay in -lX11" >&5
echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 33000 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char XOpenDisplay ();
int
main (void)
{
XOpenDisplay ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:33019: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:33022: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:33025: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:33028: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_X11_XOpenDisplay=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_X11_XOpenDisplay=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:33039: result: $ac_cv_lib_X11_XOpenDisplay" >&5
echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
if test $ac_cv_lib_X11_XOpenDisplay = yes; then

cf_add_libs="-lX11"
# Filter out duplicates - this happens with badly-designed ".pc" files...
for cf_add_1lib in $LIBS
do
	for cf_add_2lib in $cf_add_libs
	do
		if test "x$cf_add_1lib" = "x$cf_add_2lib"
		then
			cf_add_1lib=
			break
		fi
	done
	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
done
LIBS="$cf_add_libs"

fi

echo "$as_me:33061: checking for XCurses library" >&5
echo $ECHO_N "checking for XCurses library... $ECHO_C" >&6
if test "${cf_cv_lib_XCurses+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

cf_add_libs="-lXCurses"
# Filter out duplicates - this happens with badly-designed ".pc" files...
for cf_add_1lib in $LIBS
do
	for cf_add_2lib in $cf_add_libs
	do
		if test "x$cf_add_1lib" = "x$cf_add_2lib"
		then
			cf_add_1lib=
			break
		fi
	done
	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
done
LIBS="$cf_add_libs"

cat >conftest.$ac_ext <<_ACEOF
#line 33084 "configure"
#include "confdefs.h"

#include <xcurses.h>
char *XCursesProgramName = "test";

int
main (void)
{
XCursesExit();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:33099: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:33102: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:33105: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:33108: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  cf_cv_lib_XCurses=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
cf_cv_lib_XCurses=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext

fi
echo "$as_me:33119: result: $cf_cv_lib_XCurses" >&5
echo "${ECHO_T}$cf_cv_lib_XCurses" >&6

fi

if test $cf_cv_lib_XCurses = yes ; then

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

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

	echo "$as_me:33134: checking for xcurses.h" >&5
echo $ECHO_N "checking for xcurses.h... $ECHO_C" >&6
if test "${ac_cv_header_xcurses_h+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 33140 "configure"
#include "confdefs.h"
#include <xcurses.h>
_ACEOF
if { (eval echo "$as_me:33144: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  egrep -v '^ *\+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:33150: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  ac_cv_header_xcurses_h=yes
else
  echo "$as_me: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_header_xcurses_h=no
fi
rm -f conftest.err conftest.$ac_ext
fi
echo "$as_me:33169: result: $ac_cv_header_xcurses_h" >&5
echo "${ECHO_T}$ac_cv_header_xcurses_h" >&6
if test $ac_cv_header_xcurses_h = yes; then

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

fi

else
	{ { echo "$as_me:33180: error: Cannot link with XCurses" >&5
echo "$as_me: error: Cannot link with XCurses" >&2;}
   { (exit 1); exit 1; }; }
fi

fi

for ac_func in vw_printw
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:33190: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 33196 "configure"
#include "confdefs.h"
#define $ac_func autoconf_temporary
#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
#undef $ac_func

#ifdef __cplusplus
extern "C"
#endif

/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char $ac_func (void);

int
main (void)
{

/* The GNU C library defines stubs for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
#error found stub for $ac_func
#endif

	return $ac_func ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:33227: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:33230: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:33233: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:33236: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:33246: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF

fi
done

### sum up warnings
if test "$cf_cv_termlib" = none ; then
	{ echo "$as_me:33258: WARNING: no term-lib found, you might run into trouble later." >&5
echo "$as_me: WARNING: no term-lib found, you might run into trouble later." >&2;}
fi
if test "$YACC" = "" ; then
	{ echo "$as_me:33262: WARNING: no yacc-parser found, you might run into trouble later." >&5
echo "$as_me: WARNING: no yacc-parser found, you might run into trouble later." >&2;}
fi
if test "$RANLIB" = "" ; then
	{ echo "$as_me:33266: WARNING: no library archive builder found, you might run into trouble later." >&5
echo "$as_me: WARNING: no library archive builder found, you might run into trouble later." >&2;}
fi

### Finally, build autoconf.h and the makefiles
CFLAGS="$CFLAGS $EXTRA_CFLAGS"

LINTFLAGS=$LINTFLAGS

cf_define=`echo "$CC"|sed -e 's/\\\\/\\\\134/g' -e 's/^[ 	]\\+//' -e 's/[ 	]\\+$//' -e 's/"/\\\\042/g'`
cat >>confdefs.h <<EOF
#define TIN_CC "$cf_define"
EOF

cf_define=`echo "$CFLAGS"|sed -e 's/\\\\/\\\\134/g' -e 's/^[ 	]\\+//' -e 's/[ 	]\\+$//' -e 's/"/\\\\042/g'`
cat >>confdefs.h <<EOF
#define TIN_CFLAGS "$cf_define"
EOF

cf_define=`echo "$CPP"|sed -e 's/\\\\/\\\\134/g' -e 's/^[ 	]\\+//' -e 's/[ 	]\\+$//' -e 's/"/\\\\042/g'`
cat >>confdefs.h <<EOF
#define TIN_CPP "$cf_define"
EOF

cf_define=`echo "$CPPFLAGS"|sed -e 's/\\\\/\\\\134/g' -e 's/^[ 	]\\+//' -e 's/[ 	]\\+$//' -e 's/"/\\\\042/g'`
cat >>confdefs.h <<EOF
#define TIN_CPPFLAGS "$cf_define"
EOF

cf_define=`echo "$CC"|sed -e 's/\\\\/\\\\134/g' -e 's/^[ 	]\\+//' -e 's/[ 	]\\+$//' -e 's/"/\\\\042/g'`
cat >>confdefs.h <<EOF
#define TIN_LD "$cf_define"
EOF

cf_define=`echo "$LDFLAGS"|sed -e 's/\\\\/\\\\134/g' -e 's/^[ 	]\\+//' -e 's/[ 	]\\+$//' -e 's/"/\\\\042/g'`
cat >>confdefs.h <<EOF
#define TIN_LDFLAGS "$cf_define"
EOF

cf_define=`echo "$PCREDIR_LIBS $LIBS"|sed -e 's/\\\\/\\\\134/g' -e 's/^[ 	]\\+//' -e 's/[ 	]\\+$//' -e 's/"/\\\\042/g'`
cat >>confdefs.h <<EOF
#define TIN_LIBS "$cf_define"
EOF

ac_config_files="$ac_config_files $PCRE_MAKEFILE $SUB_MAKEFILE $CAN_MAKEFILE src/Makefile"
cat >confcache <<\_ACEOF
# 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, see configure's option --config-cache.
# It is not useful on other systems.  If it contains results you don't
# want to keep, you may remove or edit it.
#
# config.status only pays attention to the cache file if you give it
# the --recheck option to rerun configure.
#
# `ac_cv_env_foo' variables (set or unset) will be overridden when
# loading this file, other *unset* `ac_cv_foo' will be assigned the
# following values.

_ACEOF

# 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 \
        "s/'/'\\\\''/g;
    	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
      ;;
    *)
      # `set' quotes correctly as required by POSIX, so do not add quotes.
      sed -n \
        "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
      ;;
    esac;
} |
  sed '
     t clear
     : clear
     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
     t end
     /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
     : end' >>confcache
if cmp -s $cache_file confcache; then :; else
  if test -w $cache_file; then
    test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
    cat confcache >$cache_file
  else
    echo "not updating unwritable cache $cache_file"
  fi
fi
rm -f confcache
test "x$prefix" = xNONE && prefix=$ac_default_prefix
# Let make expand exec_prefix.
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'

# VPATH may cause trouble with some makes, so we remove $(srcdir),
# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
# trailing colons and then remove the whole line if VPATH becomes empty
# (actually we leave an empty line to preserve line numbers).
if test "x$srcdir" = x.; then
  ac_vpsub='/^[ 	]*VPATH[ 	]*=/{
s/:*\$(srcdir):*/:/;
s/:*\${srcdir}:*/:/;
s/:*@srcdir@:*/:/;
s/^\([^=]*=[ 	]*\):*/\1/;
s/:*$//;
s/^[^=]*=[ 	]*$//;
}'
fi

DEFS=-DHAVE_CONFIG_H

: ${CONFIG_STATUS=./config.status}
ac_clean_files_save=$ac_clean_files
ac_clean_files="$ac_clean_files $CONFIG_STATUS"
{ echo "$as_me:33389: creating $CONFIG_STATUS" >&5
echo "$as_me: creating $CONFIG_STATUS" >&6;}
cat >$CONFIG_STATUS <<_ACEOF
#! $SHELL
# Generated automatically by configure.
# Run this file to recreate the current configuration.
# Compiler output produced by configure, useful for debugging
# configure, is in config.log if it exists.

debug=false
SHELL=\${CONFIG_SHELL-$SHELL}
ac_cs_invocation="\$0 \$@"

_ACEOF

cat >>$CONFIG_STATUS <<\_ACEOF
# Be Bourne compatible
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
  emulate sh
  NULLCMD=:
elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
  set -o posix
fi

# Name of the executable.
as_me=`echo "$0" |sed 's,.*[\\/],,'`

if expr a : '\(a\)' >/dev/null 2>&1; then
  as_expr=expr
else
  as_expr=false
fi

rm -f conf$$ conf$$.exe conf$$.file
echo >conf$$.file
if ln -s conf$$.file conf$$ 2>/dev/null; then
  # We could just check for DJGPP; but this test a) works b) is more generic
  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
  if test -f conf$$.exe; then
    # Don't use ln at all; we don't have any links
    as_ln_s='cp -p'
  else
    as_ln_s='ln -s'
  fi
elif ln conf$$.file conf$$ 2>/dev/null; then
  as_ln_s=ln
else
  as_ln_s='cp -p'
fi
rm -f conf$$ conf$$.exe conf$$.file

as_executable_p="test -f"

# Support unset when possible.
if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
  as_unset=unset
else
  as_unset=false
fi

# NLS nuisances.
$as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
$as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
$as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
$as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
$as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
$as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
$as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
$as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }

# IFS
# We need space, tab and new line, in precisely that order.
as_nl='
'
IFS=" 	$as_nl"

# CDPATH.
$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }

exec 6>&1

_ACEOF

# Files that config.status was made for.
if test -n "$ac_config_files"; then
  echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
fi

if test -n "$ac_config_headers"; then
  echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
fi

if test -n "$ac_config_links"; then
  echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
fi

if test -n "$ac_config_commands"; then
  echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
fi

cat >>$CONFIG_STATUS <<\EOF

ac_cs_usage="\
\`$as_me' instantiates files from templates according to the
current configuration.

Usage: $0 [OPTIONS] [FILE]...

  -h, --help       print this help, then exit
  -V, --version    print version number, then exit
  -d, --debug      don't remove temporary files
      --recheck    update $as_me by reconfiguring in the same conditions
  --file=FILE[:TEMPLATE]
                   instantiate the configuration file FILE
  --header=FILE[:TEMPLATE]
                   instantiate the configuration header FILE

Configuration files:
$config_files

Configuration headers:
$config_headers

Configuration commands:
$config_commands

Report bugs to <dickey@invisible-island.net>."
EOF

cat >>$CONFIG_STATUS <<EOF
ac_cs_version="\\
config.status
configured by $0, generated by GNU Autoconf 2.52.20181006,
  with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"

Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
Free Software Foundation, Inc.
This config.status script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it."
srcdir=$srcdir
INSTALL="$INSTALL"
EOF

cat >>$CONFIG_STATUS <<\EOF
# If no file are specified by the user, then we need to provide default
# value.  By we need to know if files were specified by the user.
ac_need_defaults=:
while test $# != 0
do
  case $1 in
  --*=*)
    ac_option=`expr "x$1" : 'x\([^=]*\)='`
    ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
    shift
    set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
    shift
    ;;
  -*);;
  *) # This is not an option, so the user has probably given explicit
     # arguments.
     ac_need_defaults=false;;
  esac

  case $1 in
  # Handling of the options.
EOF
cat >>$CONFIG_STATUS <<EOF
  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
    echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
    exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
EOF
cat >>$CONFIG_STATUS <<\EOF
  --version | --vers* | -V )
    echo "$ac_cs_version"; exit 0 ;;
  --he | --h)
    # Conflict between --help and --header
    { { echo "$as_me:33565: error: ambiguous option: $1
Try \`$0 --help' for more information." >&5
echo "$as_me: error: ambiguous option: $1
Try \`$0 --help' for more information." >&2;}
   { (exit 1); exit 1; }; };;
  --help | --hel | -h )
    echo "$ac_cs_usage"; exit 0 ;;
  --debug | --d* | -d )
    debug=: ;;
  --file | --fil | --fi | --f )
    shift
    CONFIG_FILES="$CONFIG_FILES $1"
    ac_need_defaults=false;;
  --header | --heade | --head | --hea )
    shift
    CONFIG_HEADERS="$CONFIG_HEADERS $1"
    ac_need_defaults=false;;

  # This is an error.
  -*) { { echo "$as_me:33584: error: unrecognized option: $1
Try \`$0 --help' for more information." >&5
echo "$as_me: error: unrecognized option: $1
Try \`$0 --help' for more information." >&2;}
   { (exit 1); exit 1; }; } ;;

  *) ac_config_targets="$ac_config_targets $1" ;;

  esac
  shift
done

exec 5>>config.log
cat >&5 << _ACEOF

## ----------------------- ##
## Running config.status.  ##
## ----------------------- ##

This file was extended by $as_me 2.52.20181006, executed with
  CONFIG_FILES    = $CONFIG_FILES
  CONFIG_HEADERS  = $CONFIG_HEADERS
  CONFIG_LINKS    = $CONFIG_LINKS
  CONFIG_COMMANDS = $CONFIG_COMMANDS
  > $ac_cs_invocation
on `(hostname || uname -n) 2>/dev/null | sed 1q`

_ACEOF
EOF

cat >>$CONFIG_STATUS <<EOF
#
# INIT-COMMANDS section.
#

EOF

cat >>$CONFIG_STATUS <<\EOF
for ac_config_target in $ac_config_targets
do
  case "$ac_config_target" in
  # Handling of arguments.
  "$PCRE_MAKEFILE" ) CONFIG_FILES="$CONFIG_FILES $PCRE_MAKEFILE" ;;
  "$SUB_MAKEFILE" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILE" ;;
  "$CAN_MAKEFILE" ) CONFIG_FILES="$CONFIG_FILES $CAN_MAKEFILE" ;;
  "src/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
  "default-1" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
  "include/autoconf.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/autoconf.h:include/autoconf.hin" ;;
  *) { { echo "$as_me:33632: error: invalid argument: $ac_config_target" >&5
echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
   { (exit 1); exit 1; }; };;
  esac
done

# If the user did not use the arguments to specify the items to instantiate,
# then the envvar interface is used.  Set only those that are not.
# We use the long form for the default assignment because of an extremely
# bizarre bug on SunOS 4.1.3.
if $ac_need_defaults; then
  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
  test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
fi

# Create a temporary directory, and hook for its removal unless debugging.
$debug ||
{
  trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
  trap '{ (exit 1); exit 1; }' 1 2 13 15
}

# Create a (secure) tmp directory for tmp files.
: ${TMPDIR=/tmp}
{
  tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
  test -n "$tmp" && test -d "$tmp"
}  ||
{
  tmp=$TMPDIR/cs$$-$RANDOM
  (umask 077 && mkdir $tmp)
} ||
{
   echo "$me: cannot create a temporary directory in $TMPDIR" >&2
   { (exit 1); exit 1; }
}

EOF

cat >>$CONFIG_STATUS <<EOF

#
# CONFIG_FILES section.
#

# No need to generate the scripts if there are no CONFIG_FILES.
# This happens for instance when ./config.status config.h
if test -n "\$CONFIG_FILES"; then
  # Protect against being on the right side of a sed subst in config.status.
  sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
   s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
s,@SHELL@,$SHELL,;t t
s,@exec_prefix@,$exec_prefix,;t t
s,@prefix@,$prefix,;t t
s,@program_transform_name@,$program_transform_name,;t t
s,@bindir@,$bindir,;t t
s,@sbindir@,$sbindir,;t t
s,@libexecdir@,$libexecdir,;t t
s,@datarootdir@,$datarootdir,;t t
s,@datadir@,$datadir,;t t
s,@sysconfdir@,$sysconfdir,;t t
s,@sharedstatedir@,$sharedstatedir,;t t
s,@localstatedir@,$localstatedir,;t t
s,@runstatedir@,$runstatedir,;t t
s,@libdir@,$libdir,;t t
s,@includedir@,$includedir,;t t
s,@oldincludedir@,$oldincludedir,;t t
s,@infodir@,$infodir,;t t
s,@mandir@,$mandir,;t t
s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
s,@build_alias@,$build_alias,;t t
s,@host_alias@,$host_alias,;t t
s,@target_alias@,$target_alias,;t t
s,@ECHO_C@,$ECHO_C,;t t
s,@ECHO_N@,$ECHO_N,;t t
s,@ECHO_T@,$ECHO_T,;t t
s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
s,@DEFS@,$DEFS,;t t
s,@LIBS@,$LIBS,;t t
s,@PACKAGE@,$PACKAGE,;t t
s,@VERSION@,$VERSION,;t t
s,@build@,$build,;t t
s,@build_cpu@,$build_cpu,;t t
s,@build_vendor@,$build_vendor,;t t
s,@build_os@,$build_os,;t t
s,@host@,$host,;t t
s,@host_cpu@,$host_cpu,;t t
s,@host_vendor@,$host_vendor,;t t
s,@host_os@,$host_os,;t t
s,@DESTDIR@,$DESTDIR,;t t
s,@XLC@,$XLC,;t t
s,@CC@,$CC,;t t
s,@CFLAGS@,$CFLAGS,;t t
s,@LDFLAGS@,$LDFLAGS,;t t
s,@CPPFLAGS@,$CPPFLAGS,;t t
s,@ac_ct_CC@,$ac_ct_CC,;t t
s,@EXEEXT@,$EXEEXT,;t t
s,@OBJEXT@,$OBJEXT,;t t
s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
s,@CPP@,$CPP,;t t
s,@SET_MAKE@,$SET_MAKE,;t t
s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
s,@INSTALL_DATA@,$INSTALL_DATA,;t t
s,@YACC@,$YACC,;t t
s,@LINT@,$LINT,;t t
s,@PROG_EXT@,$PROG_EXT,;t t
s,@LIB_PREFIX@,$LIB_PREFIX,;t t
s,@LN_S@,$LN_S,;t t
s,@BUILD_CC@,$BUILD_CC,;t t
s,@BUILD_CPP@,$BUILD_CPP,;t t
s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
s,@BUILD_LIBS@,$BUILD_LIBS,;t t
s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
s,@RANLIB@,$RANLIB,;t t
s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
s,@LD@,$LD,;t t
s,@ac_ct_LD@,$ac_ct_LD,;t t
s,@AR@,$AR,;t t
s,@ac_ct_AR@,$ac_ct_AR,;t t
s,@ARFLAGS@,$ARFLAGS,;t t
s,@PATH_ISPELL@,$PATH_ISPELL,;t t
s,@PATH_METAMAIL@,$PATH_METAMAIL,;t t
s,@PATH_SUM@,$PATH_SUM,;t t
s,@DEFAULT_EDITOR@,$DEFAULT_EDITOR,;t t
s,@DEFAULT_MAILER@,$DEFAULT_MAILER,;t t
s,@PATH_PGP@,$PATH_PGP,;t t
s,@PATH_PGPK@,$PATH_PGPK,;t t
s,@PATH_GPG@,$PATH_GPG,;t t
s,@PATH_SLRNFACE@,$PATH_SLRNFACE,;t t
s,@DEFAULT_SHELL@,$DEFAULT_SHELL,;t t
s,@ENABLE_DEBUG@,$ENABLE_DEBUG,;t t
s,@ECHO_LT@,$ECHO_LT,;t t
s,@ECHO_LD@,$ECHO_LD,;t t
s,@RULE_CC@,$RULE_CC,;t t
s,@SHOW_CC@,$SHOW_CC,;t t
s,@ECHO_CC@,$ECHO_CC,;t t
s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
s,@NEWSLIBDIR@,$NEWSLIBDIR,;t t
s,@SPOOLDIR@,$SPOOLDIR,;t t
s,@NOVROOTDIR@,$NOVROOTDIR,;t t
s,@INEWSDIR@,$INEWSDIR,;t t
s,@INEWS@,$INEWS,;t t
s,@PKG_CONFIG@,$PKG_CONFIG,;t t
s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
s,@NCURSES_CONFIG@,$NCURSES_CONFIG,;t t
s,@ac_ct_NCURSES_CONFIG@,$ac_ct_NCURSES_CONFIG,;t t
s,@PCRE_MAJOR@,$PCRE_MAJOR,;t t
s,@PCRE_MINOR@,$PCRE_MINOR,;t t
s,@PCRE_DATE@,$PCRE_DATE,;t t
s,@PCRE_DEFINES@,$PCRE_DEFINES,;t t
s,@PCREDIR_MAKE@,$PCREDIR_MAKE,;t t
s,@PCREDIR_LIBS@,$PCREDIR_LIBS,;t t
s,@PCREDIR_CPPFLAGS@,$PCREDIR_CPPFLAGS,;t t
s,@LINK_SIZE@,$LINK_SIZE,;t t
s,@UTF8@,$UTF8,;t t
s,@UCP@,$UCP,;t t
s,@EXTRAOBJS@,$EXTRAOBJS,;t t
s,@EXTRAO_DEP@,$EXTRAO_DEP,;t t
s,@CANDIR_MAKE@,$CANDIR_MAKE,;t t
s,@CANLIBS@,$CANLIBS,;t t
s,@TIN_DEFAULTS_DIR@,$TIN_DEFAULTS_DIR,;t t
s,@LIBOBJS@,$LIBOBJS,;t t
s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
s,@CONFIG_H@,$CONFIG_H,;t t
s,@ALLOCA@,$ALLOCA,;t t
s,@GLIBC21@,$GLIBC21,;t t
s,@LIBICONV@,$LIBICONV,;t t
s,@USE_NLS@,$USE_NLS,;t t
s,@MSGFMT@,$MSGFMT,;t t
s,@GMSGFMT@,$GMSGFMT,;t t
s,@XGETTEXT@,$XGETTEXT,;t t
s,@INTLBISON@,$INTLBISON,;t t
s,@BUILD_INCLUDED_LIBINTL@,$BUILD_INCLUDED_LIBINTL,;t t
s,@USE_INCLUDED_LIBINTL@,$USE_INCLUDED_LIBINTL,;t t
s,@CATALOGS@,$CATALOGS,;t t
s,@CATOBJEXT@,$CATOBJEXT,;t t
s,@GMOFILES@,$GMOFILES,;t t
s,@INTLLIBS@,$INTLLIBS,;t t
s,@INTLOBJS@,$INTLOBJS,;t t
s,@POFILES@,$POFILES,;t t
s,@POSUB@,$POSUB,;t t
s,@DATADIRNAME@,$DATADIRNAME,;t t
s,@INSTOBJEXT@,$INSTOBJEXT,;t t
s,@GENCAT@,$GENCAT,;t t
s,@INTL_LIBTOOL_SUFFIX_PREFIX@,$INTL_LIBTOOL_SUFFIX_PREFIX,;t t
s,@NLS_TEXTDOMAIN@,$NLS_TEXTDOMAIN,;t t
s,@MSG_DIR_MAKE@,$MSG_DIR_MAKE,;t t
s,@SUB_MAKEFILE@,$SUB_MAKEFILE,;t t
s,@INTLDIR_MAKE@,$INTLDIR_MAKE,;t t
s,@GT_YES@,$GT_YES,;t t
s,@GT_NO@,$GT_NO,;t t
s,@X_CFLAGS@,$X_CFLAGS,;t t
s,@X_PRE_LIBS@,$X_PRE_LIBS,;t t
s,@X_LIBS@,$X_LIBS,;t t
s,@X_EXTRA_LIBS@,$X_EXTRA_LIBS,;t t
s,@XCURSES_CONFIG@,$XCURSES_CONFIG,;t t
s,@ac_ct_XCURSES_CONFIG@,$ac_ct_XCURSES_CONFIG,;t t
s,@LINTFLAGS@,$LINTFLAGS,;t t
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_lines=48
  ac_sed_frag=1 # Number of current file.
  ac_beg=1 # First line for current file.
  ac_end=$ac_max_sed_lines # 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" $tmp/subs.sed >$tmp/subs.frag
    else
      sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
    fi
    if test ! -s $tmp/subs.frag; then
      ac_more_lines=false
    else
      # The purpose of the label and of the branching condition is to
      # speed up the sed processing (if there are no `@' at all, there
      # is no need to browse any of the substitutions).
      # These are the two extra sed commands mentioned above.
      (echo ':t
  /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
      # It is possible to make a multiline substitution using escaped newlines.
      # Ensure that we do not split the substitution between script fragments.
      ac_BEG=$ac_end
      ac_END=`expr $ac_end + $ac_max_sed_lines`
      sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
      if test -s $tmp/subs.next; then
        grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
        if test ! -s $tmp/subs.edit; then
          grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
          if test ! -s $tmp/subs.edit; then
            if test $ac_beg -gt 1; then
              ac_end=`expr $ac_end - 1`
              continue
            fi
          fi
        fi
      fi

      if test -z "$ac_sed_cmds"; then
        ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
      else
        ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
      fi
      ac_sed_frag=`expr $ac_sed_frag + 1`
      ac_beg=$ac_end
      ac_end=`expr $ac_end + $ac_max_sed_lines`
    fi
  done
  if test -z "$ac_sed_cmds"; then
    ac_sed_cmds=cat
  fi
fi # test -n "$CONFIG_FILES"

EOF
cat >>$CONFIG_STATUS <<\EOF
for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
  case $ac_file in
  - | *:- | *:-:* ) # input from stdin
        cat >$tmp/stdin
        ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
  * )   ac_file_in=$ac_file.in ;;
  esac

  # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
  ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
         X"$ac_file" : 'X\(//\)[^/]' \| \
         X"$ac_file" : 'X\(//\)$' \| \
         X"$ac_file" : 'X\(/\)' \| \
         .     : '\(.\)' 2>/dev/null ||
echo X"$ac_file" |
    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
  	  /^X\(\/\/\)$/{ s//\1/; q; }
  	  /^X\(\/\).*/{ s//\1/; q; }
  	  s/.*/./; q'`
  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
    { case "$ac_dir" in
  [\\/]* | ?:[\\/]* ) as_incr_dir=;;
  *)                      as_incr_dir=.;;
esac
as_dummy="$ac_dir"
for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
  case $as_mkdir_dir in
    # Skip DOS drivespec
    ?:) as_incr_dir=$as_mkdir_dir ;;
    *)
      as_incr_dir=$as_incr_dir/$as_mkdir_dir
      test -d "$as_incr_dir" || mkdir "$as_incr_dir"
    ;;
  esac
done; }

    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 $srcdir in
  .)  ac_srcdir=.
      if test -z "$ac_dots"; then
         ac_top_srcdir=.
      else
         ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
      fi ;;
  [\\/]* | ?:[\\/]* )
      ac_srcdir=$srcdir$ac_dir_suffix;
      ac_top_srcdir=$srcdir ;;
  *) # Relative path.
    ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
    ac_top_srcdir=$ac_dots$srcdir ;;
  esac

  case $INSTALL in
  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
  *) ac_INSTALL=$ac_dots$INSTALL ;;
  esac

  if test x"$ac_file" != x-; then
    { echo "$as_me:33971: creating $ac_file" >&5
echo "$as_me: creating $ac_file" >&6;}
    rm -f "$ac_file"
  fi
  # Let's still pretend it is `configure' which instantiates (i.e., don't
  # use $as_me), people would be surprised to read:
  #    /* config.h.  Generated automatically by config.status.  */
  configure_input="Generated automatically from `echo $ac_file_in |
                                                 sed 's,.*/,,'` by configure."

  # First look for the input files in the build tree, otherwise in the
  # src tree.
  ac_file_inputs=`IFS=:
    for f in $ac_file_in; do
      case $f in
      -) echo $tmp/stdin ;;
      [\\/$]*)
         # Absolute (can't be DOS-style, as IFS=:)
         test -f "$f" || { { echo "$as_me:33989: error: cannot find input file: $f" >&5
echo "$as_me: error: cannot find input file: $f" >&2;}
   { (exit 1); exit 1; }; }
         echo $f;;
      *) # Relative
         if test -f "$f"; then
           # Build tree
           echo $f
         elif test -f "$srcdir/$f"; then
           # Source tree
           echo $srcdir/$f
         else
           # /dev/null tree
           { { echo "$as_me:34002: error: cannot find input file: $f" >&5
echo "$as_me: error: cannot find input file: $f" >&2;}
   { (exit 1); exit 1; }; }
         fi;;
      esac
    done` || { (exit 1); exit 1; }
EOF
cat >>$CONFIG_STATUS <<\EOF
  ac_warn_datarootdir=no
  if test x"$ac_file" != x-; then
    for ac_item in $ac_file_inputs
    do
      ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
      if test -n "$ac_seen"; then
        ac_used=`grep '@datarootdir@' $ac_item`
        if test -z "$ac_used"; then
          { echo "$as_me:34018: WARNING: datarootdir was used implicitly but not set:
$ac_seen" >&5
echo "$as_me: WARNING: datarootdir was used implicitly but not set:
$ac_seen" >&2;}
          ac_warn_datarootdir=yes
        fi
      fi
      ac_seen=`grep '${datarootdir}' $ac_item`
      if test -n "$ac_seen"; then
        { echo "$as_me:34027: WARNING: datarootdir was used explicitly but not set:
$ac_seen" >&5
echo "$as_me: WARNING: datarootdir was used explicitly but not set:
$ac_seen" >&2;}
        ac_warn_datarootdir=yes
      fi
    done
  fi

if test "x$ac_warn_datarootdir" = xyes; then
  ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
fi

EOF
cat >>$CONFIG_STATUS <<EOF
  sed "$ac_vpsub
$extrasub
EOF
cat >>$CONFIG_STATUS <<\EOF
:t
/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
s,@configure_input@,$configure_input,;t t
s,@srcdir@,$ac_srcdir,;t t
s,@top_srcdir@,$ac_top_srcdir,;t t
s,@INSTALL@,$ac_INSTALL,;t t
" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
  rm -f $tmp/stdin
  if test x"$ac_file" != x-; then
    cp $tmp/out $ac_file

    for ac_name in prefix exec_prefix datarootdir
    do
        ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
        if test -n "$ac_seen"; then
            ac_init=`egrep '[ 	]*'$ac_name'[ 	]*=' $ac_file`
            if test -z "$ac_init"; then
              ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
              { echo "$as_me:34064: WARNING: Variable $ac_name is used but was not set:
$ac_seen" >&5
echo "$as_me: WARNING: Variable $ac_name is used but was not set:
$ac_seen" >&2;}
            fi
        fi
    done
    egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
    egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
    if test -s $tmp/out; then
      ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
      { echo "$as_me:34075: WARNING: Some variables may not be substituted:
$ac_seen" >&5
echo "$as_me: WARNING: Some variables may not be substituted:
$ac_seen" >&2;}
    fi
  else
    cat $tmp/out
  fi
  rm -f $tmp/out

done
EOF
cat >>$CONFIG_STATUS <<\EOF

#
# CONFIG_HEADER section.
#

# 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=' '
ac_dD=',;t'
# ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
ac_iA='s,^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
ac_iB='\([ 	]\),\1#\2define\3'
ac_iC=' '
ac_iD='\4,;t'
# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
ac_uA='s,^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
ac_uB='$,\1#\2define\3'
ac_uC=' '
ac_uD=',;t'

for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
  case $ac_file in
  - | *:- | *:-:* ) # input from stdin
        cat >$tmp/stdin
        ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
  * )   ac_file_in=$ac_file.in ;;
  esac

  test x"$ac_file" != x- && { echo "$as_me:34124: creating $ac_file" >&5
echo "$as_me: creating $ac_file" >&6;}

  # First look for the input files in the build tree, otherwise in the
  # src tree.
  ac_file_inputs=`IFS=:
    for f in $ac_file_in; do
      case $f in
      -) echo $tmp/stdin ;;
      [\\/$]*)
         # Absolute (can't be DOS-style, as IFS=:)
         test -f "$f" || { { echo "$as_me:34135: error: cannot find input file: $f" >&5
echo "$as_me: error: cannot find input file: $f" >&2;}
   { (exit 1); exit 1; }; }
         echo $f;;
      *) # Relative
         if test -f "$f"; then
           # Build tree
           echo $f
         elif test -f "$srcdir/$f"; then
           # Source tree
           echo $srcdir/$f
         else
           # /dev/null tree
           { { echo "$as_me:34148: error: cannot find input file: $f" >&5
echo "$as_me: error: cannot find input file: $f" >&2;}
   { (exit 1); exit 1; }; }
         fi;;
      esac
    done` || { (exit 1); exit 1; }
  # Remove the trailing spaces.
  sed 's/[ 	]*$//' $ac_file_inputs >$tmp/in

EOF

# Transform confdefs.h into two sed scripts, `conftest.defines' and
# `conftest.undefs', that substitutes the proper values into
# config.h.in to produce config.h.  The first handles `#define'
# templates, and the second `#undef' templates.
# 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.defines conftest.undefs
# Using a here document instead of a string reduces the quoting nightmare.
# Putting comments in sed scripts is not portable.
#
# `end' is used to avoid that the second main sed command (meant for
# 0-ary CPP macros) applies to n-ary macro definitions.
# See the Autoconf documentation for `clear'.
cat >confdef2sed.sed <<\EOF
s/[\\&,]/\\&/g
s,[\\$`],\\&,g
t clear
: clear
s,^[ 	]*#[ 	]*define[ 	][ 	]*\(\([^ 	(][^ 	(]*\)([^)]*)\)[ 	]*\(.*\)$,${ac_dA}\2${ac_dB}\1${ac_dC}\3${ac_dD},gp
t end
s,^[ 	]*#[ 	]*define[ 	][ 	]*\([^ 	][^ 	]*\)[ 	]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
: end
EOF
# If some macros were called several times there might be several times
# the same #defines, which is useless.  Nevertheless, we may not want to
# sort them, since we want the *last* AC-DEFINE to be honored.
uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
sed 's/ac_d/ac_i/g' conftest.defines >>conftest.undefs
rm -f confdef2sed.sed

# 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.undefs <<\EOF
s,^[ 	]*#[ 	]*undef[ 	][ 	]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
EOF

# Break up conftest.defines because some shells have a limit on the size
# of here documents, and old seds have small limits too (100 cmds).
echo '  # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
echo '  if egrep "^[ 	]*#[ 	]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
echo '  # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
echo '  :' >>$CONFIG_STATUS
rm -f conftest.tail
while grep . conftest.defines >/dev/null
do
  # Write a limited-size here document to $tmp/defines.sed.
  echo '  cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
  # Speed up: don't consider the non `#define' lines.
  echo '/^[ 	]*#[ 	]*define/!b' >>$CONFIG_STATUS
  # Work around the forget-to-reset-the-flag bug.
  echo 't clr' >>$CONFIG_STATUS
  echo ': clr' >>$CONFIG_STATUS
  sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
  echo 'CEOF
  sed -f $tmp/defines.sed $tmp/in >$tmp/out
  rm -f $tmp/in
  mv $tmp/out $tmp/in
' >>$CONFIG_STATUS
  sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
  rm -f conftest.defines
  mv conftest.tail conftest.defines
done
rm -f conftest.defines
echo '  fi # egrep' >>$CONFIG_STATUS
echo >>$CONFIG_STATUS

# Break up conftest.undefs because some shells have a limit on the size
# of here documents, and old seds have small limits too (100 cmds).
echo '  # Handle all the #undef templates' >>$CONFIG_STATUS
rm -f conftest.tail
while grep . conftest.undefs >/dev/null
do
  # Write a limited-size here document to $tmp/undefs.sed.
  echo '  cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
  # Speed up: don't consider the non `#undef'
  echo '/^[ 	]*#[ 	]*undef/!b' >>$CONFIG_STATUS
  # Work around the forget-to-reset-the-flag bug.
  echo 't clr' >>$CONFIG_STATUS
  echo ': clr' >>$CONFIG_STATUS
  sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
  echo 'CEOF
  sed -f $tmp/undefs.sed $tmp/in >$tmp/out
  rm -f $tmp/in
  mv $tmp/out $tmp/in
' >>$CONFIG_STATUS
  sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
  rm -f conftest.undefs
  mv conftest.tail conftest.undefs
done
rm -f conftest.undefs

cat >>$CONFIG_STATUS <<\EOF
  # Let's still pretend it is `configure' which instantiates (i.e., don't
  # use $as_me), people would be surprised to read:
  #    /* config.h.  Generated automatically by config.status.  */
  if test x"$ac_file" = x-; then
    echo "/* Generated automatically by configure.  */" >$tmp/config.h
  else
    echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
  fi
  cat $tmp/in >>$tmp/config.h
  rm -f $tmp/in
  if test x"$ac_file" != x-; then
    if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
      { echo "$as_me:34266: $ac_file is unchanged" >&5
echo "$as_me: $ac_file is unchanged" >&6;}
    else
      ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
         X"$ac_file" : 'X\(//\)[^/]' \| \
         X"$ac_file" : 'X\(//\)$' \| \
         X"$ac_file" : 'X\(/\)' \| \
         .     : '\(.\)' 2>/dev/null ||
echo X"$ac_file" |
    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
  	  /^X\(\/\/\)$/{ s//\1/; q; }
  	  /^X\(\/\).*/{ s//\1/; q; }
  	  s/.*/./; q'`
      if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
        { case "$ac_dir" in
  [\\/]* | ?:[\\/]* ) as_incr_dir=;;
  *)                      as_incr_dir=.;;
esac
as_dummy="$ac_dir"
for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
  case $as_mkdir_dir in
    # Skip DOS drivespec
    ?:) as_incr_dir=$as_mkdir_dir ;;
    *)
      as_incr_dir=$as_incr_dir/$as_mkdir_dir
      test -d "$as_incr_dir" || mkdir "$as_incr_dir"
    ;;
  esac
done; }

      fi
      rm -f $ac_file
      mv $tmp/config.h $ac_file
    fi
  else
    cat $tmp/config.h
    rm -f $tmp/config.h
  fi
done
EOF
cat >>$CONFIG_STATUS <<\EOF
#
# CONFIG_COMMANDS section.
#
for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
  ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
  ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`

  case $ac_dest in
    default-1 ) for ac_file in $CONFIG_FILES; do

        # Support "outfile[:infile[:infile...]]"
        case "$ac_file" in
          (*:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
        esac

        # PO directories have a Makefile.in generated from Makefile.inn.
        case "$ac_file" in
        (*/[Mm]akefile.in)
          # Adjust a relative srcdir.
          ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
          ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
          ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
          ac_base=`basename $ac_file .in`
          # In autoconf-2.13 it is called $ac_given_srcdir.
          # In autoconf-2.50 it is called $srcdir.
          test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"

          case "$ac_given_srcdir" in
            (.)  top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
            (/*) top_srcdir="$ac_given_srcdir" ;;
            (*)  top_srcdir="$ac_dots$ac_given_srcdir" ;;
          esac

          if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
            rm -f "$ac_dir/POTFILES"
            test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
            sed -e "/^#/d" -e "/^[ 	]*\$/d" -e "s,.*,     $top_srcdir/& \\\\," -e "\$s/\(.*\) \\\\/\1/" < "$ac_given_srcdir/$ac_dir/POTFILES.in" > "$ac_dir/POTFILES"
            test -n "$as_me" && echo "$as_me: creating $ac_dir/$ac_base" || echo "creating $ac_dir/$ac_base"
            sed -e "/POTFILES =/r $ac_dir/POTFILES" "$ac_dir/$ac_base.in" > "$ac_dir/$ac_base"
          fi
          ;;
        esac
      done ;;
  esac
done
EOF

cat >>$CONFIG_STATUS <<\EOF

{ (exit 0); exit 0; }
EOF
chmod +x $CONFIG_STATUS
ac_clean_files=$ac_clean_files_save

# configure is writing to config.log, and then calls config.status.
# config.status does its own redirection, appending to config.log.
# Unfortunately, on DOS this fails, as config.log is still kept open
# by configure, so config.status won't be able to write to it; its
# output is simply discarded.  So we exec the FD to /dev/null,
# effectively closing config.log, so it can be properly (re)opened and
# appended to by config.status.  When coming back to configure, we
# need to make the FD available again.
if test "$no_create" != yes; then
  ac_cs_success=:
  exec 5>/dev/null
  $SHELL $CONFIG_STATUS || ac_cs_success=false
  exec 5>>config.log
  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
  # would make configure fail if this is the last instruction.
  $ac_cs_success || { (exit 1); exit 1; }
fi

