#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by Autoconf 2.52.20231210.
#
# Copyright 2003-2022,2023	Thomas E. Dickey
# 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)
  --with-pkg-config[=CMD] enable/disable use of pkg-config and its name CMD
  --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
  --with-zlib             use zlib for COMPRESS DEFLATE
  --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-x                use the X Window System
  --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-pcre=PATH        use installed pcre versus bundled
  --with-pcre2-config=PATH use pcre2 in favour of pcre
  --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
  --with-canlock=PATH use installed canlock versus bundled
  --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-nntps=ssl        enable NNTPS, needs LibreSSL, OpenSSL or GnuTLS
	                  possible values: libtls, openssl, gnutls
  --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

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 2003-2022,2023	Thomas E. Dickey
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.20231210.  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:1004: 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:1015: 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:1023: 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:1039: 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:1043: 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:1049: 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:1051:   former value:  $ac_old_val" >&5
echo "$as_me:   former value:  $ac_old_val" >&2;}
        { echo "$as_me:1053:   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:1072: 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:1074: 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:1103: PATH=\".;.\"; conftest.sh") >&5
  (PATH=".;."; conftest.sh) 2>&5
  ac_status=$?
  echo "$as_me:1106: \$? = $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.6.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:1147: 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:1157: error: cannot run $ac_config_sub" >&5
echo "$as_me: error: cannot run $ac_config_sub" >&2;}
   { (exit 1); exit 1; }; }

echo "$as_me:1161: 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:1170: 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:1174: 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:1179: 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:1187: 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:1196: 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:1201: 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:1227: 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:1231: 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:1233: 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:1238: 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:1245: 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:1281: 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:1317: 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:1334: found $ac_dir/$ac_word" >&5
   break
fi
done

  ;;
esac
fi
XLC=$ac_cv_path_XLC

if test -n "$XLC"; then
  echo "$as_me:1345: result: $XLC" >&5
echo "${ECHO_T}$XLC" >&6
else
  echo "$as_me:1348: 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:1377: 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:1392: found $ac_dir/$ac_word" >&5
break
done

fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
  echo "$as_me:1400: result: $CC" >&5
echo "${ECHO_T}$CC" >&6
else
  echo "$as_me:1403: 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:1412: 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:1427: 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:1435: result: $ac_ct_CC" >&5
echo "${ECHO_T}$ac_ct_CC" >&6
else
  echo "$as_me:1438: 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:1451: 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:1466: found $ac_dir/$ac_word" >&5
break
done

fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
  echo "$as_me:1474: result: $CC" >&5
echo "${ECHO_T}$CC" >&6
else
  echo "$as_me:1477: 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:1486: 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:1501: 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:1509: result: $ac_ct_CC" >&5
echo "${ECHO_T}$ac_ct_CC" >&6
else
  echo "$as_me:1512: 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:1525: 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:1545: 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:1567: result: $CC" >&5
echo "${ECHO_T}$CC" >&6
else
  echo "$as_me:1570: 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:1581: 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:1596: found $ac_dir/$ac_word" >&5
break
done

fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
  echo "$as_me:1604: result: $CC" >&5
echo "${ECHO_T}$CC" >&6
else
  echo "$as_me:1607: 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:1620: 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:1635: 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:1643: result: $ac_ct_CC" >&5
echo "${ECHO_T}$ac_ct_CC" >&6
else
  echo "$as_me:1646: 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:1658: 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:1663:" \
     "checking for C compiler version" >&5
ac_compiler=`set X $ac_compile; echo "$2"`
{ (eval echo "$as_me:1666: \"$ac_compiler --version </dev/null >&5\"") >&5
  (eval $ac_compiler --version </dev/null >&5) 2>&5
  ac_status=$?
  echo "$as_me:1669: \$? = $ac_status" >&5
  (exit "$ac_status"); }
{ (eval echo "$as_me:1671: \"$ac_compiler -v </dev/null >&5\"") >&5
  (eval $ac_compiler -v </dev/null >&5) 2>&5
  ac_status=$?
  echo "$as_me:1674: \$? = $ac_status" >&5
  (exit "$ac_status"); }
{ (eval echo "$as_me:1676: \"$ac_compiler -V </dev/null >&5\"") >&5
  (eval $ac_compiler -V </dev/null >&5) 2>&5
  ac_status=$?
  echo "$as_me:1679: \$? = $ac_status" >&5
  (exit "$ac_status"); }

cat >"conftest.$ac_ext" <<_ACEOF
#line 1683 "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:1699: 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:1702: \"$ac_link_default\"") >&5
  (eval $ac_link_default) 2>&5
  ac_status=$?
  echo "$as_me:1705: \$? = $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:1728: 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:1734: 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:1739: 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:1745: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:1748: \$? = $ac_status" >&5
  (exit "$ac_status"); }; }; then
    cross_compiling=no
  else
    if test "$cross_compiling" = maybe; then
	cross_compiling=yes
    else
	{ { echo "$as_me:1755: 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:1763: 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:1770: checking whether we are cross compiling" >&5
echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
echo "$as_me:1772: result: $cross_compiling" >&5
echo "${ECHO_T}$cross_compiling" >&6

echo "$as_me:1775: checking for executable suffix" >&5
echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
if { (eval echo "$as_me:1777: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:1780: \$? = $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:1796: 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:1802: 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:1808: 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 1814 "configure"
#include "confdefs.h"

int
main (void)
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.o conftest.obj
if { (eval echo "$as_me:1826: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:1829: \$? = $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:1841: 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:1848: result: $ac_cv_objext" >&5
echo "${ECHO_T}$ac_cv_objext" >&6
OBJEXT=$ac_cv_objext
ac_objext=$OBJEXT
echo "$as_me:1852: 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 1858 "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:1873: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:1876: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:1879: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:1882: \$? = $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:1894: 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:1900: 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 1906 "configure"
#include "confdefs.h"

int
main (void)
{

  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext"
if { (eval echo "$as_me:1918: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:1921: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:1924: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:1927: \$? = $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:1937: 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:1964: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:1967: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:1970: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:1973: \$? = $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 1985 "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:1998: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:2001: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:2004: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:2007: \$? = $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 2017 "configure"
#include "confdefs.h"
$ac_declaration
int
main (void)
{
exit (42);
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext"
if { (eval echo "$as_me:2029: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:2032: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:2035: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:2038: \$? = $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:2068: 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/^[^(]*([^)][^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
	test -z "$GCC_VERSION" && GCC_VERSION=unknown
	echo "$as_me:2072: result: $GCC_VERSION" >&5
echo "${ECHO_T}$GCC_VERSION" >&6
fi

INTEL_COMPILER=no

if test "$GCC" = yes ; then
	case "$host_os" in
	linux*|gnu*)
		echo "$as_me:2081: 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 2086 "configure"
#include "confdefs.h"

int
main (void)
{

#ifdef __INTEL_COMPILER
#else
#error __INTEL_COMPILER is not defined
#endif

  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext"
if { (eval echo "$as_me:2103: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:2106: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:2109: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:2112: \$? = $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:2123: result: $INTEL_COMPILER" >&5
echo "${ECHO_T}$INTEL_COMPILER" >&6
		;;
	esac
fi

CLANG_COMPILER=no

if test "$GCC" = yes ; then
	echo "$as_me:2132: 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"
	cat >"conftest.$ac_ext" <<_ACEOF
#line 2136 "configure"
#include "confdefs.h"

int
main (void)
{

#ifdef __clang__
#else
#error __clang__ is not defined
#endif

  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext"
if { (eval echo "$as_me:2153: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:2156: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:2159: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:2162: \$? = $ac_status" >&5
  (exit "$ac_status"); }; }; then
  CLANG_COMPILER=yes

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:2172: result: $CLANG_COMPILER" >&5
echo "${ECHO_T}$CLANG_COMPILER" >&6
fi

CLANG_VERSION=none

if test "x$CLANG_COMPILER" = "xyes" ; then
	case "$CC" in
	c[1-9][0-9]|*/c[1-9][0-9])
		{ echo "$as_me:2181: WARNING: replacing broken compiler alias $CC" >&5
echo "$as_me: WARNING: replacing broken compiler alias $CC" >&2;}
		CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`"
		CC=clang
		;;
	esac

	echo "$as_me:2188: checking version of $CC" >&5
echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
	CLANG_VERSION="`$CC --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(CLANG[^)]*) //' -e 's/^.*(Debian[^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
	test -z "$CLANG_VERSION" && CLANG_VERSION=unknown
	echo "$as_me:2192: result: $CLANG_VERSION" >&5
echo "${ECHO_T}$CLANG_VERSION" >&6

	for cf_clang_opt in \
		-Qunused-arguments \
		-Wno-error=implicit-function-declaration
	do
		echo "$as_me:2199: checking if option $cf_clang_opt works" >&5
echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6
		cf_save_CFLAGS="$CFLAGS"
		CFLAGS="$CFLAGS $cf_clang_opt"
		cat >"conftest.$ac_ext" <<_ACEOF
#line 2204 "configure"
#include "confdefs.h"

			#include <stdio.h>
int
main (void)
{

			printf("hello!\\n");
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext" "conftest$ac_exeext"
if { (eval echo "$as_me:2218: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:2221: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:2224: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:2227: \$? = $ac_status" >&5
  (exit "$ac_status"); }; }; then

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

			cf_clang_optok=no
fi
rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
		echo "$as_me:2238: result: $cf_clang_optok" >&5
echo "${ECHO_T}$cf_clang_optok" >&6
		CFLAGS="$cf_save_CFLAGS"
		if test "$cf_clang_optok" = yes; then
			test -n "$verbose" && echo "	adding option $cf_clang_opt" 1>&6

echo "${as_me:-configure}:2244: testing adding option $cf_clang_opt ..." 1>&5

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

		fi
	done
fi

echo "$as_me:2253: 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 2261 "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 (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:2308: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:2311: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:2314: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:2317: \$? = $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:2334: result: none needed" >&5
echo "${ECHO_T}none needed" >&6 ;;
  *)
    echo "$as_me:2337: 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:2345: checking \$CFLAGS variable" >&5
echo $ECHO_N "checking \$CFLAGS variable... $ECHO_C" >&6
case "x$CFLAGS" in
*-[IUD]*)
	echo "$as_me:2349: result: broken" >&5
echo "${ECHO_T}broken" >&6
	{ echo "$as_me:2351: 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:2459: result: ok" >&5
echo "${ECHO_T}ok" >&6
	;;
esac

echo "$as_me:2464: checking \$CC variable" >&5
echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
case "$CC" in
*[\ \	]-*)
	echo "$as_me:2468: result: broken" >&5
echo "${ECHO_T}broken" >&6
	{ echo "$as_me:2470: 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" | sed -e "s%^$cf_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}:2587: testing resulting CC: '$CC' ..." 1>&5

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

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

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

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

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

for ac_prog in ggrep grep
do
  # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo "$as_me:2608: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_GREP+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$GREP"; then
  ac_cv_prog_GREP="$GREP" # 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_GREP="$ac_prog"
echo "$as_me:2623: found $ac_dir/$ac_word" >&5
break
done

fi
fi
GREP=$ac_cv_prog_GREP
if test -n "$GREP"; then
  echo "$as_me:2631: result: $GREP" >&5
echo "${ECHO_T}$GREP" >&6
else
  echo "$as_me:2634: result: no" >&5
echo "${ECHO_T}no" >&6
fi

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

echo "$as_me:2642: checking for egrep" >&5
echo $ECHO_N "checking for egrep... $ECHO_C" >&6
if test "${ac_cv_path_EGREP+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
   then ac_cv_path_EGREP="$GREP -E"
   else
     for ac_prog in gegrep egrep
do
  # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo "$as_me:2654: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_path_EGREP+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $EGREP in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_EGREP="$EGREP" # 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_EGREP="$ac_dir/$ac_word"
   echo "$as_me:2671: found $ac_dir/$ac_word" >&5
   break
fi
done

  ;;
esac
fi
EGREP=$ac_cv_path_EGREP

if test -n "$EGREP"; then
  echo "$as_me:2682: result: $EGREP" >&5
echo "${ECHO_T}$EGREP" >&6
else
  echo "$as_me:2685: result: no" >&5
echo "${ECHO_T}no" >&6
fi

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

     test "x$ac_cv_path_EGREP" = "x:" && { { echo "$as_me:2693: error: cannot find workable egrep" >&5
echo "$as_me: error: cannot find workable egrep" >&2;}
   { (exit 1); exit 1; }; }
   fi
fi
echo "$as_me:2698: result: $ac_cv_path_EGREP" >&5
echo "${ECHO_T}$ac_cv_path_EGREP" >&6
 EGREP="$ac_cv_path_EGREP"

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:2708: 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 2729 "configure"
#include "confdefs.h"
#include <assert.h>
                     Syntax error
_ACEOF
if { (eval echo "$as_me:2734: \"$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:2740: \$? = $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 2763 "configure"
#include "confdefs.h"
#include <ac_nonexistent.h>
_ACEOF
if { (eval echo "$as_me:2767: \"$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:2773: \$? = $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:2810: 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 2820 "configure"
#include "confdefs.h"
#include <assert.h>
                     Syntax error
_ACEOF
if { (eval echo "$as_me:2825: \"$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:2831: \$? = $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 2854 "configure"
#include "confdefs.h"
#include <ac_nonexistent.h>
_ACEOF
if { (eval echo "$as_me:2858: \"$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:2864: \$? = $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:2892: 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:2905: 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 2912 "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 2927 "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:2940: 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:2947: 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:2967: result: yes" >&5
echo "${ECHO_T}yes" >&6
  SET_MAKE=
else
  echo "$as_me:2971: 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:2988: 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:3037: 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
%{
int yylex(void);
void yyerror(const char *s);
void yyerror(const char *s) { (void)s; }
%}
%token	NUMBER
%%
time	: NUMBER ':' NUMBER
	;
%%
int yylex(void) { return NUMBER; }
int main(void) { return yyparse(); }
EOF
  for cf_prog in 'bison -y' byacc yacc
  do
    rm -f y.tab.ch
    echo "$as_me:3072: 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:3076: \"$cf_command\"") >&5
  (eval $cf_command) 2>&5
  ac_status=$?
  echo "$as_me:3079: \$? = $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:3084: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:3087: \$? = $ac_status" >&5
  (exit "$ac_status"); } && test -s conftest ; then
          cf_result=yes
        fi
      else
        cf_result=yes
      fi
    fi
    echo "$as_me:3095: 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:3112: 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:3127: found $ac_dir/$ac_word" >&5
break
done

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

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

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
		;;
	*-msvc*)
		LIB_PREFIX=''
		;;
	*)	LIB_PREFIX='lib'
		;;
	esac
LIB_PREFIX=$LIB_PREFIX

echo "$as_me:3183: 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:3187: result: yes" >&5
echo "${ECHO_T}yes" >&6
else
  echo "$as_me:3190: 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:3213: 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:3228: 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:3236: result: $BUILD_CC" >&5
echo "${ECHO_T}$BUILD_CC" >&6
else
  echo "$as_me:3239: 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:3248: checking for native build C compiler" >&5
echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
	echo "$as_me:3250: result: $BUILD_CC" >&5
echo "${ECHO_T}$BUILD_CC" >&6

	echo "$as_me:3253: 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:3263: result: $BUILD_CPP" >&5
echo "${ECHO_T}$BUILD_CPP" >&6

	echo "$as_me:3266: 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:3274: result: $BUILD_CFLAGS" >&5
echo "${ECHO_T}$BUILD_CFLAGS" >&6

	echo "$as_me:3277: 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:3285: result: $BUILD_CPPFLAGS" >&5
echo "${ECHO_T}$BUILD_CPPFLAGS" >&6

	echo "$as_me:3288: 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:3296: result: $BUILD_LDFLAGS" >&5
echo "${ECHO_T}$BUILD_LDFLAGS" >&6

	echo "$as_me:3299: 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:3307: result: $BUILD_LIBS" >&5
echo "${ECHO_T}$BUILD_LIBS" >&6

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

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

	echo "$as_me:3316: checking if the build-compiler \"$BUILD_CC\" works" >&5
echo $ECHO_N "checking if the build-compiler \"$BUILD_CC\" works... $ECHO_C" >&6

	cf_save_crossed=$cross_compiling
	cf_save_ac_link=$ac_link
	cross_compiling=no
	cf_build_cppflags=$BUILD_CPPFLAGS
	test "$cf_build_cppflags" = "#" && cf_build_cppflags=
	ac_link='$BUILD_CC -o "conftest$ac_exeext" $BUILD_CFLAGS $cf_build_cppflags $BUILD_LDFLAGS "conftest.$ac_ext" $BUILD_LIBS >&5'

	if test "$cross_compiling" = yes; then
  cf_ok_build_cc=unknown
else
  cat >"conftest.$ac_ext" <<_ACEOF
#line 3330 "configure"
#include "confdefs.h"
#include <stdio.h>
		int main(int argc, char *argv[])
		{
			${cf_cv_main_return:-return}(argc < 0 || argv == 0 || argv[0] == 0);
		}

_ACEOF
rm -f "conftest$ac_exeext"
if { (eval echo "$as_me:3340: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:3343: \$? = $ac_status" >&5
  (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
  { (eval echo "$as_me:3345: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:3348: \$? = $ac_status" >&5
  (exit "$ac_status"); }; }; then
  cf_ok_build_cc=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_ok_build_cc=no
fi
rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
fi

	cross_compiling=$cf_save_crossed
	ac_link=$cf_save_ac_link

	echo "$as_me:3363: result: $cf_ok_build_cc" >&5
echo "${ECHO_T}$cf_ok_build_cc" >&6

	if test "$cf_ok_build_cc" != yes
	then
		{ { echo "$as_me:3368: 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

#### initialize $ac_includes_default
echo "$as_me:3387: 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 3393 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <float.h>

_ACEOF
if { (eval echo "$as_me:3401: \"$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:3407: \$? = $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 3429 "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 3447 "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 3468 "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:3494: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:3497: \$? = $ac_status" >&5
  (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
  { (eval echo "$as_me:3499: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:3502: \$? = $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:3515: 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

# 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:3531: 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 3537 "configure"
#include "confdefs.h"
$ac_includes_default
#include <$ac_header>
_ACEOF
rm -f "conftest.$ac_objext"
if { (eval echo "$as_me:3543: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:3546: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:3549: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:3552: \$? = $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:3562: 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:3572: checking whether exit is declared" >&5
echo $ECHO_N "checking whether exit is declared... $ECHO_C" >&6
if test "${ac_cv_have_decl_exit+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >"conftest.$ac_ext" <<_ACEOF
#line 3578 "configure"
#include "confdefs.h"
$ac_includes_default
int
main (void)
{
#ifndef exit
  (void) exit;
#endif

  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext"
if { (eval echo "$as_me:3593: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:3596: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:3599: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:3602: \$? = $ac_status" >&5
  (exit "$ac_status"); }; }; then
  ac_cv_have_decl_exit=yes
else
  echo "$as_me: failed program was:" >&5
cat "conftest.$ac_ext" >&5
ac_cv_have_decl_exit=no
fi
rm -f "conftest.$ac_objext" "conftest.$ac_ext"
fi
echo "$as_me:3612: result: $ac_cv_have_decl_exit" >&5
echo "${ECHO_T}$ac_cv_have_decl_exit" >&6

echo "$as_me:3615: checking if the POSIX test-macros are already defined" >&5
echo $ECHO_N "checking if the POSIX test-macros are already defined... $ECHO_C" >&6
if test "${cf_cv_posix_visible+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

cat >"conftest.$ac_ext" <<_ACEOF
#line 3622 "configure"
#include "confdefs.h"
#include <stdio.h>
int
main (void)
{

#if defined(__POSIX_VISIBLE) && ((__POSIX_VISIBLE - 0L) > 0) \
	&& defined(__XSI_VISIBLE) && ((__XSI_VISIBLE - 0L) > 0) \
	&& defined(__BSD_VISIBLE) && ((__BSD_VISIBLE - 0L) > 0) \
	&& defined(__ISO_C_VISIBLE) && ((__ISO_C_VISIBLE - 0L) > 0)
#error conflicting symbols found
#endif

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

fi
echo "$as_me:3661: result: $cf_cv_posix_visible" >&5
echo "${ECHO_T}$cf_cv_posix_visible" >&6

if test "$cf_cv_posix_visible" = no; then

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"
	;;
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*gnu|linux*gnuabi64|linux*gnuabin32|linux*gnueabi|linux*gnueabihf|linux*gnux32|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin|msys|mingw*|linux*uclibc)

cf_gnu_xopen_source=$cf_XOPEN_SOURCE

echo "$as_me:3703: 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 3710 "configure"
#include "confdefs.h"
#include <sys/types.h>
int
main (void)
{

	#if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
		return 0;
	#elif __NEWLIB__ > 0 && __NEWLIB_MINOR__ >= 0
		return 0;
	#else
	#	error not GNU C library
	#endif
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext"
if { (eval echo "$as_me:3729: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:3732: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:3735: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:3738: \$? = $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:3749: 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.  newlib incorporated the change about 4
	# years later.
	echo "$as_me:3757: 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 3769 "configure"
#include "confdefs.h"
#include <sys/types.h>
int
main (void)
{

			#if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
				return 0;
			#elif (__NEWLIB__ == 2 && __NEWLIB_MINOR__ >= 4) || (__GLIBC__ > 3)
				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:3788: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:3791: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:3794: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:3797: \$? = $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:3809: 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:3814: 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 3919 "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:3939: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:3942: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:3945: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:3948: \$? = $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:3959: 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:3968: 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 3975 "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:3990: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:3993: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:3996: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:3999: \$? = $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 4106 "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:4121: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:4124: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:4127: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:4130: \$? = $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:4145: 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:4150: 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 4160 "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:4175: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:4178: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:4181: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:4184: \$? = $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:4195: 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=

if test "$cf_cv_posix_visible" = no; then

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:4232: 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}:4238: testing if the symbol is already defined go no further ..." 1>&5

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

#ifndef _POSIX_C_SOURCE
#error _POSIX_C_SOURCE is not defined
#endif
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext"
if { (eval echo "$as_me:4256: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:4259: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:4262: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:4265: \$? = $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 4286 "configure"
#include "confdefs.h"
#include <sys/types.h>
int
main (void)
{

#ifdef _POSIX_SOURCE
#error _POSIX_SOURCE is defined
#endif
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext"
if { (eval echo "$as_me:4301: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:4304: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:4307: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:4310: \$? = $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}:4321: 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}:4329: testing if the second compile does not leave our definition intact error ..." 1>&5

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

#ifndef _POSIX_C_SOURCE
#error _POSIX_C_SOURCE is not defined
#endif
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext"
if { (eval echo "$as_me:4347: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:4350: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:4353: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:4356: \$? = $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:4372: 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

fi # cf_cv_posix_visible

	;;
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[6-9]*)
	# OpenBSD 6.x has broken locale support, both compile-time and runtime.
	# see https://www.mail-archive.com/bugs@openbsd.org/msg13200.html
	# Abusing the conformance level is a workaround.
	{ echo "$as_me:4489: WARNING: this system does not provide usable locale support" >&5
echo "$as_me: WARNING: this system does not provide usable locale support" >&2;}
	cf_xopen_source="-D_BSD_SOURCE"
	cf_XOPEN_SOURCE=700
	;;
openbsd[4-5]*)
	# 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:4521: 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 4528 "configure"
#include "confdefs.h"

$ac_includes_default

int
main (void)
{

#ifndef _XOPEN_SOURCE
#error _XOPEN_SOURCE is not defined
#endif

  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext"
if { (eval echo "$as_me:4546: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:4549: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:4552: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:4555: \$? = $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 4567 "configure"
#include "confdefs.h"

$ac_includes_default

int
main (void)
{

#ifndef _XOPEN_SOURCE
#error _XOPEN_SOURCE is not defined
#endif

  ;
  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_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:4609: 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"

for cf_add_cflags in $cf_temp_xopen_source
do
	case "x$cf_add_cflags" in
	x-[DU]*)

cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
while true
do
	cf_old_cflag=`echo "x$CFLAGS" | sed -e 's/^.//' -e 's/[ 	][ 	]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ 	][^ 	]*\\)\?%%" -e 's/^[ 	]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
	test "$CFLAGS" != "$cf_old_cflag" || break

	CFLAGS="$cf_old_cflag"
done

cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
while true
do
	cf_old_cflag=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/[ 	][ 	]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ 	][^ 	]*\\)\?%%" -e 's/^[ 	]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
	test "$CPPFLAGS" != "$cf_old_cflag" || break

	CPPFLAGS="$cf_old_cflag"
done

		;;
	esac

cf_fix_cppflags=no
cf_new_cflags=
cf_new_cppflags=
cf_new_extra_cppflags=

for cf_add_cflags in $cf_add_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

done

fi

	cf_save_xopen_cppflags="$CPPFLAGS"

if test "$cf_cv_posix_visible" = no; then

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:4769: 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}:4775: testing if the symbol is already defined go no further ..." 1>&5

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

#ifndef _POSIX_C_SOURCE
#error _POSIX_C_SOURCE is not defined
#endif
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext"
if { (eval echo "$as_me:4793: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:4796: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:4799: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:4802: \$? = $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 4823 "configure"
#include "confdefs.h"
#include <sys/types.h>
int
main (void)
{

#ifdef _POSIX_SOURCE
#error _POSIX_SOURCE is defined
#endif
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext"
if { (eval echo "$as_me:4838: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:4841: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:4844: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:4847: \$? = $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}:4858: 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}:4866: testing if the second compile does not leave our definition intact error ..." 1>&5

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

#ifndef _POSIX_C_SOURCE
#error _POSIX_C_SOURCE is not defined
#endif
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext"
if { (eval echo "$as_me:4884: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:4887: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:4890: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:4893: \$? = $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:4909: 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

fi # cf_cv_posix_visible

	# Some of these niche implementations use copy/paste, double-check...
	if test "$cf_cv_xopen_source" = no ; then
		test -n "$verbose" && echo "	checking if _POSIX_C_SOURCE interferes with _XOPEN_SOURCE" 1>&6

echo "${as_me:-configure}:5022: testing checking if _POSIX_C_SOURCE interferes with _XOPEN_SOURCE ..." 1>&5

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

$ac_includes_default

int
main (void)
{

#ifndef _XOPEN_SOURCE
#error _XOPEN_SOURCE is not defined
#endif

  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext"
if { (eval echo "$as_me:5043: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:5046: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:5049: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:5052: \$? = $ac_status" >&5
  (exit "$ac_status"); }; }; then
  :
else
  echo "$as_me: failed program was:" >&5
cat "conftest.$ac_ext" >&5

			{ echo "$as_me:5059: WARNING: _POSIX_C_SOURCE definition is not usable" >&5
echo "$as_me: WARNING: _POSIX_C_SOURCE definition is not usable" >&2;}
			CPPFLAGS="$cf_save_xopen_cppflags"
fi
rm -f "conftest.$ac_objext" "conftest.$ac_ext"
	fi
	;;
esac

if test -n "$cf_xopen_source" ; then

for cf_add_cflags in $cf_xopen_source
do
	case "x$cf_add_cflags" in
	x-[DU]*)

cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
while true
do
	cf_old_cflag=`echo "x$CFLAGS" | sed -e 's/^.//' -e 's/[ 	][ 	]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ 	][^ 	]*\\)\?%%" -e 's/^[ 	]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
	test "$CFLAGS" != "$cf_old_cflag" || break
	test -n "$verbose" && echo "	removing old option $cf_add_cflags from CFLAGS" 1>&6

echo "${as_me:-configure}:5082: testing removing old option $cf_add_cflags from CFLAGS ..." 1>&5

	CFLAGS="$cf_old_cflag"
done

cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
while true
do
	cf_old_cflag=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/[ 	][ 	]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ 	][^ 	]*\\)\?%%" -e 's/^[ 	]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
	test "$CPPFLAGS" != "$cf_old_cflag" || break
	test -n "$verbose" && echo "	removing old option $cf_add_cflags from CPPFLAGS" 1>&6

echo "${as_me:-configure}:5094: testing removing old option $cf_add_cflags from CPPFLAGS ..." 1>&5

	CPPFLAGS="$cf_old_cflag"
done

		;;
	esac

cf_fix_cppflags=no
cf_new_cflags=
cf_new_cppflags=
cf_new_extra_cppflags=

for cf_add_cflags in $cf_add_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}:5182: 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}:5192: 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}:5202: 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

done

fi

if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
	echo "$as_me:5214: 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 5217 "configure"
#include "confdefs.h"
#include <stdlib.h>
int
main (void)
{

#ifndef _XOPEN_SOURCE
#error _XOPEN_SOURCE is not defined
#endif
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext"
if { (eval echo "$as_me:5232: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:5235: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:5238: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:5241: \$? = $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:5250: 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 5255 "configure"
#include "confdefs.h"
#include <stdlib.h>
int
main (void)
{

#if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
#error (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
#endif
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext"
if { (eval echo "$as_me:5270: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:5273: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:5276: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:5279: \$? = $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:5290: WARNING: _XOPEN_SOURCE is lower than requested" >&5
echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
		fi
	else

echo "$as_me:5295: 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 5302 "configure"
#include "confdefs.h"

$ac_includes_default

int
main (void)
{

#ifndef _XOPEN_SOURCE
#error _XOPEN_SOURCE is not defined
#endif

  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext"
if { (eval echo "$as_me:5320: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:5323: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:5326: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:5329: \$? = $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 5341 "configure"
#include "confdefs.h"

$ac_includes_default

int
main (void)
{

#ifndef _XOPEN_SOURCE
#error _XOPEN_SOURCE is not defined
#endif

  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext"
if { (eval echo "$as_me:5359: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:5362: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:5365: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:5368: \$? = $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:5383: 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"

for cf_add_cflags in $cf_temp_xopen_source
do
	case "x$cf_add_cflags" in
	x-[DU]*)

cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
while true
do
	cf_old_cflag=`echo "x$CFLAGS" | sed -e 's/^.//' -e 's/[ 	][ 	]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ 	][^ 	]*\\)\?%%" -e 's/^[ 	]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
	test "$CFLAGS" != "$cf_old_cflag" || break

	CFLAGS="$cf_old_cflag"
done

cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
while true
do
	cf_old_cflag=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/[ 	][ 	]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ 	][^ 	]*\\)\?%%" -e 's/^[ 	]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
	test "$CPPFLAGS" != "$cf_old_cflag" || break

	CPPFLAGS="$cf_old_cflag"
done

		;;
	esac

cf_fix_cppflags=no
cf_new_cflags=
cf_new_cppflags=
cf_new_extra_cppflags=

for cf_add_cflags in $cf_add_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

done

fi

	fi
fi
fi # cf_cv_posix_visible

echo "$as_me:5530: 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 5537 "configure"
#include "confdefs.h"

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

int
main (void)
{
int x = SIGWINCH; (void)x
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext"
if { (eval echo "$as_me:5552: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:5555: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:5558: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:5561: \$? = $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 5568 "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; (void)x
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext"
if { (eval echo "$as_me:5586: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:5589: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:5592: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:5595: \$? = $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:5609: 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:5613: 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 5624 "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
#error SIGWINCH is not $cf_sigwinch
#endif
int x = SIGWINCH; (void)x
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext"
if { (eval echo "$as_me:5646: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:5649: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:5652: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:5655: \$? = $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:5669: 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

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:5680: 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:5695: found $ac_dir/$ac_word" >&5
break
done

fi
fi
RANLIB=$ac_cv_prog_RANLIB
if test -n "$RANLIB"; then
  echo "$as_me:5703: result: $RANLIB" >&5
echo "${ECHO_T}$RANLIB" >&6
else
  echo "$as_me:5706: 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:5715: 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:5730: 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:5739: result: $ac_ct_RANLIB" >&5
echo "${ECHO_T}$ac_ct_RANLIB" >&6
else
  echo "$as_me:5742: 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:5754: 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:5769: found $ac_dir/$ac_word" >&5
break
done

fi
fi
LD=$ac_cv_prog_LD
if test -n "$LD"; then
  echo "$as_me:5777: result: $LD" >&5
echo "${ECHO_T}$LD" >&6
else
  echo "$as_me:5780: 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:5789: 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:5804: 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:5813: result: $ac_ct_LD" >&5
echo "${ECHO_T}$ac_ct_LD" >&6
else
  echo "$as_me:5816: 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:5828: 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:5843: found $ac_dir/$ac_word" >&5
break
done

fi
fi
AR=$ac_cv_prog_AR
if test -n "$AR"; then
  echo "$as_me:5851: result: $AR" >&5
echo "${ECHO_T}$AR" >&6
else
  echo "$as_me:5854: 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:5863: 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:5878: 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:5887: result: $ac_ct_AR" >&5
echo "${ECHO_T}$ac_ct_AR" >&6
else
  echo "$as_me:5890: result: no" >&5
echo "${ECHO_T}no" >&6
fi

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

echo "$as_me:5899: 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

	case "$cf_cv_system_name" in
	*-msvc*)
		cf_cv_ar_flags=''
		cat >mk_static_lib.sh <<-EOF
		#!$SHELL
		MSVC_BIN="$AR"
		out="\$1"
		shift
		exec \$MSVC_BIN -out:"\$out" \$@
		EOF
		chmod +x mk_static_lib.sh
		AR=`pwd`/mk_static_lib.sh
		;;
	*)
		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 5936 "configure"
int	testdata[3] = { 123, 456, 789 };
EOF
			if { (eval echo "$as_me:5939: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:5942: \$? = $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}:5953: testing cannot compile test-program ..." 1>&5

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

fi
echo "$as_me:5963: 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

		;;
	# ISC Interactive Unix likewise
	i386:pc:isc*)	#(vi

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

esac

echo "$as_me:5997: 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:6014: 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:6021: 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 6027 "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:6058: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:6061: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:6064: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:6067: \$? = $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:6077: 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:6088: 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 6091 "configure"
#include "confdefs.h"

$ac_includes_default
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:6109: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:6112: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:6115: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:6118: \$? = $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:6127: 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}:6132: testing will use our own heapsort function ..." 1>&5

		EXTRAO_DEP=''
		EXTRAOBJS="\$(OBJDIR)/heapsort.o $EXTRAOBJS"
	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:6151: 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:6159: 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:6170: 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:6179: 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:6196: 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:6207: result: $PATH_ISPELL" >&5
echo "${ECHO_T}$PATH_ISPELL" >&6
else
  echo "$as_me:6210: 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:6230: 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:6238: 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:6249: 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:6258: 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:6275: 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:6286: result: $PATH_METAMAIL" >&5
echo "${ECHO_T}$PATH_METAMAIL" >&6
else
  echo "$as_me:6289: 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:6309: 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:6317: 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:6328: 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:6337: 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:6354: 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:6365: result: $PATH_SUM" >&5
echo "${ECHO_T}$PATH_SUM" >&6
else
  echo "$as_me:6368: 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:6385: 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:6392: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:6395: \$? = $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:6421: result: $ac_cv_prog_sum_r" >&5
echo "${ECHO_T}$ac_cv_prog_sum_r" >&6
fi

echo "$as_me:6425: 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:6437: 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:6454: 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:6471: 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:6483: result: $DEFAULT_EDITOR" >&5
echo "${ECHO_T}$DEFAULT_EDITOR" >&6
else
  echo "$as_me:6486: result: no" >&5
echo "${ECHO_T}no" >&6
fi

    fi
fi
echo "$as_me:6492: 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:6501: 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:6518: 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:6529: result: $DEFAULT_MAILER" >&5
echo "${ECHO_T}$DEFAULT_MAILER" >&6
else
  echo "$as_me:6532: 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:6545: 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:6557: 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:6574: 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:6585: result: $DEFAULT_MAILER" >&5
echo "${ECHO_T}$DEFAULT_MAILER" >&6
else
  echo "$as_me:6588: 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:6596: 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:6613: 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:6624: result: $DEFAULT_MAILER" >&5
echo "${ECHO_T}$DEFAULT_MAILER" >&6
else
  echo "$as_me:6627: result: no" >&5
echo "${ECHO_T}no" >&6
fi

fi
echo "$as_me:6632: 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:6655: result: $DEFAULT_MAILER" >&5
echo "${ECHO_T}$DEFAULT_MAILER" >&6

echo "$as_me:6658: 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:6670: 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:6702: result: $DEFAULT_MAILBOX" >&5
echo "${ECHO_T}$DEFAULT_MAILBOX" >&6

echo "$as_me:6705: 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:6715: 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:6727: 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:6744: 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:6755: result: $PKG_CONFIG" >&5
echo "${ECHO_T}$PKG_CONFIG" >&6
else
  echo "$as_me:6758: 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:6767: 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:6784: 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:6796: result: $ac_pt_PKG_CONFIG" >&5
echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
else
  echo "$as_me:6799: 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:6842: 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:6849: WARNING: pkg-config is not installed" >&5
echo "$as_me: WARNING: pkg-config is not installed" >&2;}
fi

## PGP Support
echo "$as_me:6854: 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:6871: 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:6880: 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:6888: 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:6899: 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:6908: 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:6925: 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:6936: result: $PATH_PGP" >&5
echo "${ECHO_T}$PATH_PGP" >&6
else
  echo "$as_me:6939: 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:6960: 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:6968: 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:6979: 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:6988: 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:7005: 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:7016: result: $PATH_PGPK" >&5
echo "${ECHO_T}$PATH_PGPK" >&6
else
  echo "$as_me:7019: 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:7040: 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:7048: 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:7059: 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:7068: 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:7085: 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:7096: result: $PATH_GPG" >&5
echo "${ECHO_T}$PATH_GPG" >&6
else
  echo "$as_me:7099: 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:7122: 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:7130: 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:7141: 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:7150: 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:7167: 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:7178: result: $PATH_SLRNFACE" >&5
echo "${ECHO_T}$PATH_SLRNFACE" >&6
else
  echo "$as_me:7181: 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="\$(OBJDIR)/xface.o $EXTRAOBJS"
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:7210: 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 7217 "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: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
  $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}:7254: 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}:7258: testing /etc/shells ..." 1>&5

	for cf_prog in $cf_shell_progs
	do
		case $cf_prog in
			/*)
				cf_pattern="^"$cf_prog"$"
				;;
			*/*)
				{ { echo "$as_me:7267: 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:7292: result: $DEFAULT_SHELL" >&5
echo "${ECHO_T}$DEFAULT_SHELL" >&6
else

echo "${as_me:-configure}:7296: 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:7302: 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:7319: 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:7330: result: $DEFAULT_SHELL" >&5
echo "${ECHO_T}$DEFAULT_SHELL" >&6
else
  echo "$as_me:7333: 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:7342: 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:7345: WARNING: Using /bin/false instead" >&5
echo "$as_me: WARNING: Using /bin/false instead" >&2;}
		DEFAULT_SHELL=/bin/false
	else
		{ { echo "$as_me:7349: 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:7360: 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:7377: result: $enableval" >&5
echo "${ECHO_T}$enableval" >&6

USE_SPOOLDIR=yes
if test "$USE_NNTP" = "yes" ; then
echo "$as_me:7382: 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:7411: result: $enableval" >&5
echo "${ECHO_T}$enableval" >&6

echo "$as_me:7414: checking if you want to use zlib for COMPRESS DEFLATE support" >&5
echo $ECHO_N "checking if you want to use zlib for COMPRESS DEFLATE support... $ECHO_C" >&6

# Check whether --with-zlib or --without-zlib was given.
if test "${with_zlib+set}" = set; then
  withval="$with_zlib"
  use_zlib=$withval
else
  use_zlib=yes
fi;
echo "$as_me:7424: result: $use_zlib" >&5
echo "${ECHO_T}$use_zlib" >&6

if test ".$use_zlib" != ".no" ; then

case "$use_zlib" in
no)
	;;
yes)
	;;
*)

for cf_searchpath in `echo "$use_zlib" | 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 7466 "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:7478: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:7481: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:7484: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:7487: \$? = $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}:7504: 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 7550 "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:7562: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:7565: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:7568: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:7571: \$? = $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}:7588: 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:7606: error: cannot find  under $use_zlib" >&5
echo "$as_me: error: cannot find  under $use_zlib" >&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}:7631: 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}:7660: testing adding $cf_add_libdir to library-path ..." 1>&5

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

	else
{ { echo "$as_me:7669: error: cannot find  under $use_zlib" >&5
echo "$as_me: error: cannot find  under $use_zlib" >&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_z=
cf_cv_library_path_z=

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

cf_save_LIBS="$LIBS"

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

#include <zlib.h>

int
main (void)
{

	gzopen("name","mode")

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

	cf_cv_find_linkage_z=yes
	cf_cv_header_path_z=/usr/include
	cf_cv_library_path_z=/usr/lib

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

LIBS="-lz  $cf_save_LIBS"

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

#include <zlib.h>

int
main (void)
{

	gzopen("name","mode")

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

	cf_cv_find_linkage_z=yes
	cf_cv_header_path_z=/usr/include
	cf_cv_library_path_z=/usr/lib
	cf_cv_library_file_z="-lz"

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

	cf_cv_find_linkage_z=no
	LIBS="$cf_save_LIBS"

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

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

echo "${as_me:-configure}:7771: testing Searching for headers in FIND_LINKAGE(z,zlib) ..." 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/zlib" &&       cf_search="$cf_search $cf_header_path/include/zlib"
	test -d "$cf_header_path/include/zlib/include" &&    cf_search="$cf_search $cf_header_path/include/zlib/include"
	test -d "$cf_header_path/zlib/include" &&       cf_search="$cf_search $cf_header_path/zlib/include"
	test -d "$cf_header_path/zlib/include/zlib" &&    cf_search="$cf_search $cf_header_path/zlib/include/zlib"
}

			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/zlib" &&       cf_search="$cf_search $prefix/include/zlib"
	test -d "$prefix/include/zlib/include" &&    cf_search="$cf_search $prefix/include/zlib/include"
	test -d "$prefix/zlib/include" &&       cf_search="$cf_search $prefix/zlib/include"
	test -d "$prefix/zlib/include/zlib" &&    cf_search="$cf_search $prefix/zlib/include/zlib"
}

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/zlib" &&       cf_search="$cf_search $cf_subdir_prefix/include/zlib"
	test -d "$cf_subdir_prefix/include/zlib/include" &&    cf_search="$cf_search $cf_subdir_prefix/include/zlib/include"
	test -d "$cf_subdir_prefix/zlib/include" &&       cf_search="$cf_search $cf_subdir_prefix/zlib/include"
	test -d "$cf_subdir_prefix/zlib/include/zlib" &&    cf_search="$cf_search $cf_subdir_prefix/zlib/include/zlib"
}

done

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

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

cf_search="$cf_search $cf_header_path_list"

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

echo "${as_me:-configure}:7862: testing ... testing $cf_cv_header_path_z ..." 1>&5

			CPPFLAGS="$cf_save_CPPFLAGS"

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

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

#include <zlib.h>

int
main (void)
{

	gzopen("name","mode")

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

				test -n "$verbose" && echo "	... found z headers in $cf_cv_header_path_z" 1>&6

echo "${as_me:-configure}:7900: testing ... found z headers in $cf_cv_header_path_z ..." 1>&5

				cf_cv_find_linkage_z=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_z" = maybe ; then

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

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

		CPPFLAGS="$cf_test_CPPFLAGS"
		LIBS="-lz  $cf_save_LIBS"
		cat >"conftest.$ac_ext" <<_ACEOF
#line 7926 "configure"
#include "confdefs.h"

#include <zlib.h>

int
main (void)
{

	gzopen("name","mode")

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

			test -n "$verbose" && echo "	... found z library in system" 1>&6

echo "${as_me:-configure}:7956: testing ... found z library in system ..." 1>&5

			cf_cv_find_linkage_z=yes
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"
			CPPFLAGS="$cf_save_CPPFLAGS"
			LIBS="$cf_save_LIBS"

		if test "$cf_cv_find_linkage_z" != 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/z" &&       cf_search="$cf_search $cf_library_path/lib/z"
	test -d "$cf_library_path/lib/z/lib" &&    cf_search="$cf_search $cf_library_path/lib/z/lib"
	test -d "$cf_library_path/z/lib" &&       cf_search="$cf_search $cf_library_path/z/lib"
	test -d "$cf_library_path/z/lib/z" &&    cf_search="$cf_search $cf_library_path/z/lib/z"
}

			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/z" &&       cf_search="$cf_search $prefix/lib/z"
	test -d "$prefix/lib/z/lib" &&    cf_search="$cf_search $prefix/lib/z/lib"
	test -d "$prefix/z/lib" &&       cf_search="$cf_search $prefix/z/lib"
	test -d "$prefix/z/lib/z" &&    cf_search="$cf_search $prefix/z/lib/z"
}

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/z" &&       cf_search="$cf_search $cf_subdir_prefix/lib/z"
	test -d "$cf_subdir_prefix/lib/z/lib" &&    cf_search="$cf_search $cf_subdir_prefix/lib/z/lib"
	test -d "$cf_subdir_prefix/z/lib" &&       cf_search="$cf_search $cf_subdir_prefix/z/lib"
	test -d "$cf_subdir_prefix/z/lib/z" &&    cf_search="$cf_search $cf_subdir_prefix/z/lib/z"
}

done

cf_search="$cf_library_path_list $cf_search"

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

echo "${as_me:-configure}:8037: testing ... testing $cf_cv_library_path_z ..." 1>&5

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

#include <zlib.h>

int
main (void)
{

	gzopen("name","mode")

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

					test -n "$verbose" && echo "	... found z library in $cf_cv_library_path_z" 1>&6

echo "${as_me:-configure}:8073: testing ... found z library in $cf_cv_library_path_z ..." 1>&5

					cf_cv_find_linkage_z=yes
					cf_cv_library_file_z="-lz"
					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_z=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_z" = yes ; then

if test -n "$cf_cv_header_path_z" ; then
  for cf_add_incdir in $cf_cv_header_path_z
  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 8135 "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:8147: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:8150: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:8153: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:8156: \$? = $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}:8173: 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_z" ; then
	for cf_add_libdir in $cf_cv_library_path_z
	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}:8209: testing adding $cf_add_libdir to library-path ..." 1>&5

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

cf_add_libs="$LIBS"
# reverse order
cf_add_0lib=
for cf_add_1lib in -lz; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
# filter duplicates
for cf_add_1lib in $cf_add_0lib; 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_1lib $cf_add_libs"
done
LIBS="$cf_add_libs"

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

for ac_func in \
	zError \

do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:8243: 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 8249 "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:8280: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:8283: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:8286: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:8289: \$? = $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:8299: 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

	test "x$cf_cv_find_linkage_z" = "xyes" &&
cat >>confdefs.h <<\EOF
#define USE_ZLIB 1
EOF

fi

fi

###	use option --enable-debug to compile-in test/development code
echo "$as_me:8319: 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:8340: result: $enableval" >&5
echo "${ECHO_T}$enableval" >&6

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

echo "$as_me:8345: 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:8379: result: $enableval" >&5
echo "${ECHO_T}$enableval" >&6

### use option --enable-prototypes to turn on optional prototypes
echo "$as_me:8383: 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:8400: 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:8407: 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:8424: result: $with_warnings" >&5
echo "${ECHO_T}$with_warnings" >&6
if test "$with_warnings" = "yes"
then
	with_ext_const=yes
	echo "$as_me:8429: 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/X11R7/include
/usr/X11R6/include
/usr/X11R5/include
/usr/X11R4/include

/opt/local/include
/opt/X11/include

/usr/include/X11
/usr/include/X11R7
/usr/include/X11R6
/usr/include/X11R5
/usr/include/X11R4

/usr/local/X11/include
/usr/local/X11R7/include
/usr/local/X11R6/include
/usr/local/X11R5/include
/usr/local/X11R4/include

/usr/local/include/X11
/usr/local/include/X11R7
/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 8533 "configure"
#include "confdefs.h"
#include <X11/Intrinsic.h>
_ACEOF
if { (eval echo "$as_me:8537: \"$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:8543: \$? = $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 8576 "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:8588: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:8591: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:8594: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:8597: \$? = $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:8635: 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:8645: 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:8672: 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 8676 "configure"
#include "confdefs.h"

int
main (void)
{

  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext" "conftest$ac_exeext"
if { (eval echo "$as_me:8688: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:8691: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:8694: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:8697: \$? = $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:8707: 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 8713 "configure"
#include "confdefs.h"

int
main (void)
{

  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext" "conftest$ac_exeext"
if { (eval echo "$as_me:8725: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:8728: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:8731: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:8734: \$? = $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:8744: result: yes" >&5
echo "${ECHO_T}yes" >&6
	  X_LIBS="$X_LIBS -R $x_libraries"
	else
	  echo "$as_me:8748: 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 8768 "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 (void);
int
main (void)
{
XOpenDisplay ();
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext" "conftest$ac_exeext"
if { (eval echo "$as_me:8787: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:8790: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:8793: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:8796: \$? = $ac_status" >&5
  (exit "$ac_status"); }; }; then
  :
else
  echo "$as_me: failed program was:" >&5
cat "conftest.$ac_ext" >&5
echo "$as_me:8802: 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 8810 "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 (void);
int
main (void)
{
dnet_ntoa ();
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext" "conftest$ac_exeext"
if { (eval echo "$as_me:8829: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:8832: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:8835: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:8838: \$? = $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:8849: 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:8856: 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 8864 "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 (void);
int
main (void)
{
dnet_ntoa ();
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext" "conftest$ac_exeext"
if { (eval echo "$as_me:8883: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:8886: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:8889: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:8892: \$? = $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:8903: 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:8922: 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 8928 "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:8959: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:8962: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:8965: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:8968: \$? = $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:8978: 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:8982: 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 8990 "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 (void);
int
main (void)
{
gethostbyname ();
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext" "conftest$ac_exeext"
if { (eval echo "$as_me:9009: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:9012: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:9015: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:9018: \$? = $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:9029: 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:9036: 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 9044 "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 (void);
int
main (void)
{
gethostbyname ();
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext" "conftest$ac_exeext"
if { (eval echo "$as_me:9063: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:9066: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:9069: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:9072: \$? = $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:9083: 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:9099: 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 9105 "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:9136: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:9139: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:9142: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:9145: \$? = $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:9155: 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:9159: 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 9167 "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 (void);
int
main (void)
{
connect ();
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext" "conftest$ac_exeext"
if { (eval echo "$as_me:9186: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:9189: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:9192: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:9195: \$? = $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:9206: 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:9215: 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 9221 "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:9252: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:9255: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:9258: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:9261: \$? = $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:9271: 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:9275: 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 9283 "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 (void);
int
main (void)
{
remove ();
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext" "conftest$ac_exeext"
if { (eval echo "$as_me:9302: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:9305: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:9308: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:9311: \$? = $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:9322: 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:9331: 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 9337 "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:9368: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:9371: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:9374: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:9377: \$? = $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:9387: 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:9391: 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 9399 "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 (void);
int
main (void)
{
shmat ();
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext" "conftest$ac_exeext"
if { (eval echo "$as_me:9418: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:9421: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:9424: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:9427: \$? = $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:9438: 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:9456: 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 9464 "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 (void);
int
main (void)
{
IceConnectionNumber ();
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext" "conftest$ac_exeext"
if { (eval echo "$as_me:9483: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:9486: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:9489: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:9492: \$? = $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:9503: 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

if test "x$have_x" = xyes; then

cf_save_LIBS_CF_CONST_X_STRING="$LIBS"
cf_save_CFLAGS_CF_CONST_X_STRING="$CFLAGS"
cf_save_CPPFLAGS_CF_CONST_X_STRING="$CPPFLAGS"
LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
for cf_X_CFLAGS in $X_CFLAGS
do
	case "x$cf_X_CFLAGS" in
	x-[IUD]*)
		CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
		;;
	*)
		CFLAGS="$CFLAGS $cf_X_CFLAGS"
		;;
	esac
done

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

#include <stdlib.h>
#include <X11/Intrinsic.h>

int
main (void)
{
String foo = malloc(1); free((void*)foo)
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext"
if { (eval echo "$as_me:9547: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:9550: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:9553: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:9556: \$? = $ac_status" >&5
  (exit "$ac_status"); }; }; then

echo "$as_me:9559: checking for X11/Xt const-feature" >&5
echo $ECHO_N "checking for X11/Xt const-feature... $ECHO_C" >&6
if test "${cf_cv_const_x_string+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

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

#undef  _CONST_X_STRING
#define _CONST_X_STRING	/* X11R7.8 (perhaps) */
#undef  XTSTRINGDEFINES	/* X11R5 and later */
#include <stdlib.h>
#include <X11/Intrinsic.h>

int
main (void)
{
String foo = malloc(1); *foo = 0
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext"
if { (eval echo "$as_me:9584: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:9587: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:9590: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:9593: \$? = $ac_status" >&5
  (exit "$ac_status"); }; }; then

			cf_cv_const_x_string=no

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

			cf_cv_const_x_string=yes

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

fi
echo "$as_me:9608: result: $cf_cv_const_x_string" >&5
echo "${ECHO_T}$cf_cv_const_x_string" >&6

LIBS="$cf_save_LIBS_CF_CONST_X_STRING"
CFLAGS="$cf_save_CFLAGS_CF_CONST_X_STRING"
CPPFLAGS="$cf_save_CPPFLAGS_CF_CONST_X_STRING"

case "$cf_cv_const_x_string" in
no)

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

	;;
*)

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

	;;
esac

else
  echo "$as_me: failed program was:" >&5
cat "conftest.$ac_ext" >&5
fi
rm -f "conftest.$ac_objext" "conftest.$ac_ext"
 fi
cat > "conftest.$ac_ext" <<EOF
#line 9637 "${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:9653: checking for $CC warning options..." >&5
echo "$as_me: checking for $CC warning options..." >&6;}
	cf_save_CFLAGS="$CFLAGS"
	EXTRA_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:9669: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:9672: \$? = $ac_status" >&5
  (exit "$ac_status"); }; then
			test -n "$verbose" && echo "$as_me:9674: 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 && test "$GCC_VERSION" != "unknown"
then
	{ echo "$as_me:9682: checking for $CC warning options..." >&5
echo "$as_me: checking for $CC warning options..." >&6;}
	cf_save_CFLAGS="$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 Wno-inline $cf_gcc_warnings $cf_warn_CONST
	do
		CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
		if { (eval echo "$as_me:9705: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:9708: \$? = $ac_status" >&5
  (exit "$ac_status"); }; then
			test -n "$verbose" && echo "$as_me:9710: result: ... -$cf_opt" >&5
echo "${ECHO_T}... -$cf_opt" >&6
			case "$cf_opt" in
			Winline)
				case "$GCC_VERSION" in
				[34].*)
					test -n "$verbose" && echo "	feature is broken in gcc $GCC_VERSION" 1>&6

echo "${as_me:-configure}:9718: 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}:9728: 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:9747: 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:9783: 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:9792: result: $NEWSLIBDIR" >&5
echo "${ECHO_T}$NEWSLIBDIR" >&6

	echo "$as_me:9795: 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:9831: 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:9840: result: $SPOOLDIR" >&5
echo "${ECHO_T}$SPOOLDIR" >&6

	echo "$as_me:9843: 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:9879: 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:9888: result: $NOVROOTDIR" >&5
echo "${ECHO_T}$NOVROOTDIR" >&6

	echo "$as_me:9891: 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:9903: 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:9916: 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:9929: 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:9965: 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:9975: 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:9980: 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:9997: 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:10009: result: $INEWS" >&5
echo "${ECHO_T}$INEWS" >&6
else
  echo "$as_me:10012: 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:10038: 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:10053: result: $cf_cv_use_libsocks" >&5
echo "${ECHO_T}$cf_cv_use_libsocks" >&6

echo "$as_me:10056: 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:10071: 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 10113 "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:10125: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:10128: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:10131: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:10134: \$? = $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}:10151: 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 10197 "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:10209: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:10212: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:10215: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:10218: \$? = $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}:10235: 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:10253: 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}:10278: 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}:10307: testing adding $cf_add_libdir to library-path ..." 1>&5

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

	else
{ { echo "$as_me:10316: 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}:10330: testing Starting FIND_LINKAGE(socks,) ..." 1>&5

cf_save_LIBS="$LIBS"

cat >"conftest.$ac_ext" <<_ACEOF
#line 10335 "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:10351: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:10354: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:10357: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:10360: \$? = $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 10374 "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:10390: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:10393: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:10396: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:10399: \$? = $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}:10416: testing find linkage for socks library ..." 1>&5

echo "${as_me:-configure}:10418: 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}:10509: 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 10517 "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:10533: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:10536: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:10539: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:10542: \$? = $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}:10547: 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}:10565: 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}:10640: 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 10646 "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:10662: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:10665: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:10668: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:10671: \$? = $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}:10676: 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 10738 "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:10750: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:10753: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:10756: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:10759: \$? = $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}:10776: 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}:10812: testing adding $cf_add_libdir to library-path ..." 1>&5

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

cf_add_libs="$LIBS"
# reverse order
cf_add_0lib=
for cf_add_1lib in -lsocks; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
# filter duplicates
for cf_add_1lib in $cf_add_0lib; 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_1lib $cf_add_libs"
done
LIBS="$cf_add_libs"

else
{ echo "$as_me:10837: 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:10880: 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:10889: 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:10896: 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:10908: 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 10914 "configure"
#include "confdefs.h"
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:10918: \"$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:10924: \$? = $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:10943: 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="$LIBS"
# reverse order
cf_add_0lib=
for cf_add_1lib in $cf_winsock_lib; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
# filter duplicates
for cf_add_1lib in $cf_add_0lib; 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_1lib $cf_add_libs"
done
LIBS="$cf_add_libs"

	cat >"conftest.$ac_ext" <<_ACEOF
#line 10978 "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:11005: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:11008: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:11011: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:11014: \$? = $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:11020: 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:11033: 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 11039 "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:11070: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:11073: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:11076: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:11079: \$? = $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:11089: 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:11098: 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 11106 "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 (void);
int
main (void)
{
gethostname ();
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext" "conftest$ac_exeext"
if { (eval echo "$as_me:11125: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:11128: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:11131: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:11134: \$? = $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:11145: 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:11162: 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 11170 "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 (void);
int
main (void)
{
gethostname ();
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext" "conftest$ac_exeext"
if { (eval echo "$as_me:11189: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:11192: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:11195: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:11198: \$? = $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:11209: 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:11233: 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 11241 "configure"
#include "confdefs.h"

int
main (void)
{
main ();
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext" "conftest$ac_exeext"
if { (eval echo "$as_me:11253: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:11256: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:11259: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:11262: \$? = $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:11273: 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:11284: 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 11290 "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:11321: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:11324: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:11327: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:11330: \$? = $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:11340: 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:11349: 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 11357 "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 (void);
int
main (void)
{
socket ();
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext" "conftest$ac_exeext"
if { (eval echo "$as_me:11376: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:11379: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:11382: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:11385: \$? = $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:11396: 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:11413: 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 11421 "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 (void);
int
main (void)
{
socket ();
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext" "conftest$ac_exeext"
if { (eval echo "$as_me:11440: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:11443: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:11446: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:11449: \$? = $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:11460: 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:11489: 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 11495 "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:11526: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:11529: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:11532: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:11535: \$? = $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:11545: 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:11554: 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 11562 "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 (void);
int
main (void)
{
gethostbyname ();
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext" "conftest$ac_exeext"
if { (eval echo "$as_me:11581: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:11584: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:11587: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:11590: \$? = $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:11601: 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:11626: 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 11632 "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:11663: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:11666: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:11669: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:11672: \$? = $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:11682: 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:11691: 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 11699 "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 (void);
int
main (void)
{
inet_ntoa ();
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext" "conftest$ac_exeext"
if { (eval echo "$as_me:11718: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:11721: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:11724: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:11727: \$? = $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:11738: 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:11763: 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 11769 "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:11800: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:11803: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:11806: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:11809: \$? = $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:11819: 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:11828: 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 11836 "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 (void);
int
main (void)
{
gethostbyname ();
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext" "conftest$ac_exeext"
if { (eval echo "$as_me:11855: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:11858: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:11861: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:11864: \$? = $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:11875: 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:11900: 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 11906 "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:11937: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:11940: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:11943: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:11946: \$? = $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:11956: 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:11965: 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 11973 "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 (void);
int
main (void)
{
strcasecmp ();
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext" "conftest$ac_exeext"
if { (eval echo "$as_me:11992: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:11995: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:11998: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:12001: \$? = $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:12012: 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="$LIBS"
# reverse order
cf_add_0lib=
for cf_add_1lib in $cf_cv_netlibs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
# filter duplicates
for cf_add_1lib in $cf_add_0lib; 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_1lib $cf_add_libs"
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 12106 "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:12118: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:12121: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:12124: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:12127: \$? = $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}:12144: 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 12190 "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:12202: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:12205: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:12208: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:12211: \$? = $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}:12228: 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:12246: 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}:12271: 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}:12300: testing adding $cf_add_libdir to library-path ..." 1>&5

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

	else
{ { echo "$as_me:12309: 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="$LIBS"
# reverse order
cf_add_0lib=
for cf_add_1lib in -lsocks5; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
# filter duplicates
for cf_add_1lib in $cf_add_0lib; 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_1lib $cf_add_libs"
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:12342: 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 12346 "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:12360: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:12363: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:12366: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:12369: \$? = $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 12381 "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:12393: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:12396: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:12399: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:12402: \$? = $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:12408: 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:12415: 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:12470: 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 12473 "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:12488: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:12491: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:12494: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:12497: \$? = $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:12506: 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:12523: 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 12529 "configure"
#include "confdefs.h"
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:12533: \"$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:12539: \$? = $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:12558: 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:12568: 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 12574 "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:12605: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:12608: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:12611: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:12614: \$? = $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:12624: result: $ac_cv_func_fcntl" >&5
echo "${ECHO_T}$ac_cv_func_fcntl" >&6

echo "$as_me:12627: 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 12633 "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:12664: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:12667: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:12670: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:12673: \$? = $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:12683: result: $ac_cv_func_lockf" >&5
echo "${ECHO_T}$ac_cv_func_lockf" >&6

echo "$as_me:12686: 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 12692 "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:12723: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:12726: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:12729: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:12732: \$? = $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:12742: result: $ac_cv_func_flock" >&5
echo "${ECHO_T}$ac_cv_func_flock" >&6

echo "$as_me:12745: 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 12758 "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);
	(void)rc;

  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext"
if { (eval echo "$as_me:12792: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:12795: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:12798: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:12801: \$? = $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 12813 "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);
	(void)block;
	(void)ret;

  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext"
if { (eval echo "$as_me:12840: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:12843: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:12846: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:12849: \$? = $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 12861 "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));
	(void)block;
	(void)ret;

  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext"
if { (eval echo "$as_me:12891: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:12894: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:12897: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:12900: \$? = $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:12916: result: $cf_cv_lockfile" >&5
echo "${ECHO_T}$cf_cv_lockfile" >&6

echo "$as_me:12919: 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:12972: 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:12982: result: none" >&5
echo "${ECHO_T}none" >&6;
	{ echo "$as_me:12984: WARNING: None of fcntl(), lockf(), flock() available" >&5
echo "$as_me: WARNING: None of fcntl(), lockf(), flock() available" >&2;}
fi

echo "$as_me:12988: 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:12998: result: $cf_with_screen" >&5
echo "${ECHO_T}$cf_with_screen" >&6

use_curses=no
use_ncurses=no

echo "$as_me:13004: 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:13014: 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:13045: 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 13081 "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:13093: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:13096: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:13099: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:13102: \$? = $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}:13119: 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}:13155: 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:13184: 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:13194: result: $use_ncurses" >&5
echo "${ECHO_T}$use_ncurses" >&6

	echo "$as_me:13197: 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:13214: 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

cf_ncuconfig_root=ncurses
cf_have_ncuconfig=no

if test "x${PKG_CONFIG:=none}" != xnone; then
	echo "$as_me:13232: 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:13235: result: yes" >&5
echo "${ECHO_T}yes" >&6

		echo "$as_me:13238: 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_CFLAGS="$CFLAGS"
		cf_save_CPPFLAGS="$CPPFLAGS"
		cf_save_LIBS="$LIBS"

		cf_pkg_cflags="`$PKG_CONFIG --cflags $cf_ncuconfig_root`"
		cf_pkg_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"

		# while -W for passing linker flags is prevalent, it is not "standard".
		# At least one wrapper for c89/c99 (in Apple's xcode) has its own
		# incompatible _and_ non-standard -W option which gives an error.  Work
		# around that pitfall.
		case "x${CC}@@${cf_pkg_libs}@${cf_pkg_cflags}" in
		x*c[89]9@@*-W*)

cf_fix_cppflags=no
cf_new_cflags=
cf_new_cppflags=
cf_new_extra_cppflags=

for cf_add_cflags in $cf_pkg_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="$LIBS"
# reverse order
cf_add_0lib=
for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
# filter duplicates
for cf_add_1lib in $cf_add_0lib; 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_1lib $cf_add_libs"
done
LIBS="$cf_add_libs"

			cat >"conftest.$ac_ext" <<_ACEOF
#line 13371 "configure"
#include "confdefs.h"
#include <${cf_cv_ncurses_header:-curses.h}>
int
main (void)
{
initscr(); mousemask(0,0); tigetstr((char *)0);
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext" "conftest$ac_exeext"
if { (eval echo "$as_me:13383: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:13386: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:13389: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:13392: \$? = $ac_status" >&5
  (exit "$ac_status"); }; }; then
  if test "$cross_compiling" = yes; then
  cf_test_ncuconfig=maybe
else
  cat >"conftest.$ac_ext" <<_ACEOF
#line 13398 "configure"
#include "confdefs.h"
#include <${cf_cv_ncurses_header:-curses.h}>
					int main(void)
					{ const char *xx = curses_version(); return (xx == 0); }
_ACEOF
rm -f "conftest$ac_exeext"
if { (eval echo "$as_me:13405: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:13408: \$? = $ac_status" >&5
  (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
  { (eval echo "$as_me:13410: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:13413: \$? = $ac_status" >&5
  (exit "$ac_status"); }; }; then
  cf_test_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_test_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_test_ncuconfig=no
fi
rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"

			CFLAGS="$cf_save_CFLAGS"
			CPPFLAGS="$cf_save_CPPFLAGS"
			LIBS="$cf_save_LIBS"

			if test "x$cf_test_ncuconfig" != xyes; then
				cf_temp=`echo "x$cf_pkg_cflags" | sed -e s/^x// -e 's/-W[^ 	]*//g'`
				cf_pkg_cflags="$cf_temp"
				cf_temp=`echo "x$cf_pkg_libs" | sed -e s/^x// -e 's/-W[^ 	]*//g'`
				cf_pkg_libs="$cf_temp"
			fi
			;;
		esac

for cf_add_cflags in $cf_pkg_cflags
do
	case "x$cf_add_cflags" in
	x-[DU]*)

cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
while true
do
	cf_old_cflag=`echo "x$CFLAGS" | sed -e 's/^.//' -e 's/[ 	][ 	]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ 	][^ 	]*\\)\?%%" -e 's/^[ 	]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
	test "$CFLAGS" != "$cf_old_cflag" || break

	CFLAGS="$cf_old_cflag"
done

cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
while true
do
	cf_old_cflag=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/[ 	][ 	]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ 	][^ 	]*\\)\?%%" -e 's/^[ 	]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
	test "$CPPFLAGS" != "$cf_old_cflag" || break

	CPPFLAGS="$cf_old_cflag"
done

		;;
	esac

cf_fix_cppflags=no
cf_new_cflags=
cf_new_cppflags=
cf_new_extra_cppflags=

for cf_add_cflags in $cf_add_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

done

cf_add_libs="$LIBS"
# reverse order
cf_add_0lib=
for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
# filter duplicates
for cf_add_1lib in $cf_add_0lib; 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_1lib $cf_add_libs"
done
LIBS="$cf_add_libs"

		cat >"conftest.$ac_ext" <<_ACEOF
#line 13587 "configure"
#include "confdefs.h"
#include <${cf_cv_ncurses_header:-curses.h}>
int
main (void)
{
initscr(); mousemask(0,0); tigetstr((char *)0);
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext" "conftest$ac_exeext"
if { (eval echo "$as_me:13599: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:13602: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:13605: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:13608: \$? = $ac_status" >&5
  (exit "$ac_status"); }; }; then
  if test "$cross_compiling" = yes; then
  cf_have_ncuconfig=maybe
else
  cat >"conftest.$ac_ext" <<_ACEOF
#line 13614 "configure"
#include "confdefs.h"
#include <${cf_cv_ncurses_header:-curses.h}>
				int main(void)
				{ const char *xx = curses_version(); return (xx == 0); }
_ACEOF
rm -f "conftest$ac_exeext"
if { (eval echo "$as_me:13621: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:13624: \$? = $ac_status" >&5
  (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
  { (eval echo "$as_me:13626: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:13629: \$? = $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:13646: 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:13662: 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 13680 "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; (void)x
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext"
if { (eval echo "$as_me:13695: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:13698: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:13701: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:13704: \$? = $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:13720: 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:13755: 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:13771: 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:13786: 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:13794: result: $NCURSES_CONFIG" >&5
echo "${ECHO_T}$NCURSES_CONFIG" >&6
else
  echo "$as_me:13797: 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:13810: 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:13825: 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:13833: result: $ac_ct_NCURSES_CONFIG" >&5
echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
else
  echo "$as_me:13836: 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

for cf_add_cflags in `$NCURSES_CONFIG --cflags`
do
	case "x$cf_add_cflags" in
	x-[DU]*)

cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
while true
do
	cf_old_cflag=`echo "x$CFLAGS" | sed -e 's/^.//' -e 's/[ 	][ 	]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ 	][^ 	]*\\)\?%%" -e 's/^[ 	]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
	test "$CFLAGS" != "$cf_old_cflag" || break

	CFLAGS="$cf_old_cflag"
done

cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
while true
do
	cf_old_cflag=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/[ 	][ 	]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ 	][^ 	]*\\)\?%%" -e 's/^[ 	]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
	test "$CPPFLAGS" != "$cf_old_cflag" || break

	CPPFLAGS="$cf_old_cflag"
done

		;;
	esac

cf_fix_cppflags=no
cf_new_cflags=
cf_new_cppflags=
cf_new_extra_cppflags=

for cf_add_cflags in $cf_add_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

done

cf_add_libs="$LIBS"
# reverse order
cf_add_0lib=
for cf_add_1lib in `$NCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
# filter duplicates
for cf_add_1lib in $cf_add_0lib; 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_1lib $cf_add_libs"
done
LIBS="$cf_add_libs"

		# even with config script, some packages use no-override for curses.h

echo "$as_me:13993: 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 14005 "configure"
#include "confdefs.h"
#include <${cf_header}>
int
main (void)
{
initscr(); endwin()
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext"
if { (eval echo "$as_me:14017: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:14020: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:14023: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:14026: \$? = $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:14037: 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:14041: 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:14051: 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 14057 "configure"
#include "confdefs.h"
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:14061: \"$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:14067: \$? = $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:14086: 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 14142 "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:14154: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:14157: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:14160: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:14163: \$? = $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}:14180: 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:14199: 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 14211 "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
	#error __NCURSES_H is not defined
#endif
#endif

  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext"
if { (eval echo "$as_me:14235: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:14238: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:14241: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:14244: \$? = $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:14259: 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:14266: 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 14387 "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:14399: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:14402: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:14405: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:14408: \$? = $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}:14425: 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 14448 "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
	#error __NCURSES_H is not defined
#endif
#endif

  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext"
if { (eval echo "$as_me:14472: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:14475: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:14478: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:14481: \$? = $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 $ECHO_N "	... found $ECHO_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:14502: error: not found" >&5
echo "$as_me: error: not found" >&2;}
   { (exit 1); exit 1; }; }

fi
echo "$as_me:14507: 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 14543 "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:14555: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:14558: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:14561: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:14564: \$? = $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}:14581: 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:14629: 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 14647 "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; (void)x
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext"
if { (eval echo "$as_me:14662: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:14665: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:14668: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:14671: \$? = $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:14687: 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:14725: 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:14751: \"$cf_try\"") >&5
  (eval $cf_try) 2>&5
  ac_status=$?
  echo "$as_me:14754: \$? = $ac_status" >&5
  (exit "$ac_status"); }
	if test -f conftest.out ; then
		cf_out=`sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%' conftest.out`
		test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
		rm -f conftest.out
	fi

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

$ac_includes_default

#include <${cf_cv_ncurses_header:-curses.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:14791: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:14794: \$? = $ac_status" >&5
  (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
  { (eval echo "$as_me:14796: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:14799: \$? = $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:14813: 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:14826: 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 14834 "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 (void);
int
main (void)
{
Gpm_Open ();
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext" "conftest$ac_exeext"
if { (eval echo "$as_me:14853: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:14856: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:14859: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:14862: \$? = $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:14873: 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:14876: 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 14884 "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 (void);
int
main (void)
{
initscr ();
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext" "conftest$ac_exeext"
if { (eval echo "$as_me:14903: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:14906: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:14909: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:14912: \$? = $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:14923: 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 is static).
	if test "$cf_nculib_root" = ncurses ; then
		echo "$as_me:14938: 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 14946 "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 (void);
int
main (void)
{
tgoto ();
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext" "conftest$ac_exeext"
if { (eval echo "$as_me:14965: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:14968: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:14971: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:14974: \$? = $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:14985: 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="$LIBS"
# reverse order
cf_add_0lib=
for cf_add_1lib in $cf_ncurses_LIBS; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
# filter duplicates
for cf_add_1lib in $cf_add_0lib; 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_1lib $cf_add_libs"
done
LIBS="$cf_add_libs"

if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
then

cf_add_libs="$LIBS"
# reverse order
cf_add_0lib=
for cf_add_1lib in -l$cf_nculib_root; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
# filter duplicates
for cf_add_1lib in $cf_add_0lib; 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_1lib $cf_add_libs"
done
LIBS="$cf_add_libs"

else

	eval 'cf_cv_have_lib_'"$cf_nculib_root"'=no'
	cf_libdir=""
	echo "$as_me:15034: 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 15040 "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:15071: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:15074: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:15077: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:15080: \$? = $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:15090: 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:15097: 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 15101 "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:15113: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:15116: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:15119: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:15122: \$? = $ac_status" >&5
  (exit "$ac_status"); }; }; then
  echo "$as_me:15124: 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:15131: 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:15199: 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 15203 "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:15215: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:15218: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:15221: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:15224: \$? = $ac_status" >&5
  (exit "$ac_status"); }; }; then
  echo "$as_me:15226: 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:15233: 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:15248: 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:15256: 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 15266 "configure"
#include "confdefs.h"
#include <${cf_cv_ncurses_header:-curses.h}>
int
main (void)
{
initscr(); mousemask(0,0); tigetstr((char *)0);
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext" "conftest$ac_exeext"
if { (eval echo "$as_me:15278: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:15281: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:15284: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:15287: \$? = $ac_status" >&5
  (exit "$ac_status"); }; }; then
  echo "$as_me:15289: result: yes" >&5
echo "${ECHO_T}yes" >&6
else
  echo "$as_me: failed program was:" >&5
cat "conftest.$ac_ext" >&5
echo "$as_me:15294: 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:15317: checking for $cf_hdr" >&5
echo $ECHO_N "checking for $cf_hdr... $ECHO_C" >&6
	cat >"conftest.$ac_ext" <<_ACEOF
#line 15320 "configure"
#include "confdefs.h"

#include <sys/types.h>
#include <$cf_hdr>

_ACEOF
if { (eval echo "$as_me:15327: \"$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:15333: \$? = $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:15351: 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:15364: 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 15370 "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:15429: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:15432: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:15435: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:15438: \$? = $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 15447 "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:15496: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:15499: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:15502: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:15505: \$? = $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:15520: 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:15542: 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:15545: result: yes" >&5
echo "${ECHO_T}yes" >&6

		echo "$as_me:15548: 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_CFLAGS="$CFLAGS"
		cf_save_CPPFLAGS="$CPPFLAGS"
		cf_save_LIBS="$LIBS"

		cf_pkg_cflags="`$PKG_CONFIG --cflags $cf_ncuconfig_root`"
		cf_pkg_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"

		# while -W for passing linker flags is prevalent, it is not "standard".
		# At least one wrapper for c89/c99 (in Apple's xcode) has its own
		# incompatible _and_ non-standard -W option which gives an error.  Work
		# around that pitfall.
		case "x${CC}@@${cf_pkg_libs}@${cf_pkg_cflags}" in
		x*c[89]9@@*-W*)

cf_fix_cppflags=no
cf_new_cflags=
cf_new_cppflags=
cf_new_extra_cppflags=

for cf_add_cflags in $cf_pkg_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="$LIBS"
# reverse order
cf_add_0lib=
for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
# filter duplicates
for cf_add_1lib in $cf_add_0lib; 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_1lib $cf_add_libs"
done
LIBS="$cf_add_libs"

			cat >"conftest.$ac_ext" <<_ACEOF
#line 15681 "configure"
#include "confdefs.h"
#include <${cf_cv_ncurses_header:-curses.h}>
int
main (void)
{
initscr(); mousemask(0,0); tigetstr((char *)0);
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext" "conftest$ac_exeext"
if { (eval echo "$as_me:15693: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:15696: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:15699: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:15702: \$? = $ac_status" >&5
  (exit "$ac_status"); }; }; then
  if test "$cross_compiling" = yes; then
  cf_test_ncuconfig=maybe
else
  cat >"conftest.$ac_ext" <<_ACEOF
#line 15708 "configure"
#include "confdefs.h"
#include <${cf_cv_ncurses_header:-curses.h}>
					int main(void)
					{ const char *xx = curses_version(); return (xx == 0); }
_ACEOF
rm -f "conftest$ac_exeext"
if { (eval echo "$as_me:15715: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:15718: \$? = $ac_status" >&5
  (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
  { (eval echo "$as_me:15720: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:15723: \$? = $ac_status" >&5
  (exit "$ac_status"); }; }; then
  cf_test_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_test_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_test_ncuconfig=no
fi
rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"

			CFLAGS="$cf_save_CFLAGS"
			CPPFLAGS="$cf_save_CPPFLAGS"
			LIBS="$cf_save_LIBS"

			if test "x$cf_test_ncuconfig" != xyes; then
				cf_temp=`echo "x$cf_pkg_cflags" | sed -e s/^x// -e 's/-W[^ 	]*//g'`
				cf_pkg_cflags="$cf_temp"
				cf_temp=`echo "x$cf_pkg_libs" | sed -e s/^x// -e 's/-W[^ 	]*//g'`
				cf_pkg_libs="$cf_temp"
			fi
			;;
		esac

for cf_add_cflags in $cf_pkg_cflags
do
	case "x$cf_add_cflags" in
	x-[DU]*)

cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
while true
do
	cf_old_cflag=`echo "x$CFLAGS" | sed -e 's/^.//' -e 's/[ 	][ 	]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ 	][^ 	]*\\)\?%%" -e 's/^[ 	]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
	test "$CFLAGS" != "$cf_old_cflag" || break

	CFLAGS="$cf_old_cflag"
done

cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
while true
do
	cf_old_cflag=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/[ 	][ 	]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ 	][^ 	]*\\)\?%%" -e 's/^[ 	]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
	test "$CPPFLAGS" != "$cf_old_cflag" || break

	CPPFLAGS="$cf_old_cflag"
done

		;;
	esac

cf_fix_cppflags=no
cf_new_cflags=
cf_new_cppflags=
cf_new_extra_cppflags=

for cf_add_cflags in $cf_add_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

done

cf_add_libs="$LIBS"
# reverse order
cf_add_0lib=
for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
# filter duplicates
for cf_add_1lib in $cf_add_0lib; 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_1lib $cf_add_libs"
done
LIBS="$cf_add_libs"

		cat >"conftest.$ac_ext" <<_ACEOF
#line 15897 "configure"
#include "confdefs.h"
#include <${cf_cv_ncurses_header:-curses.h}>
int
main (void)
{
initscr(); mousemask(0,0); tigetstr((char *)0);
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext" "conftest$ac_exeext"
if { (eval echo "$as_me:15909: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:15912: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:15915: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:15918: \$? = $ac_status" >&5
  (exit "$ac_status"); }; }; then
  if test "$cross_compiling" = yes; then
  cf_have_ncuconfig=maybe
else
  cat >"conftest.$ac_ext" <<_ACEOF
#line 15924 "configure"
#include "confdefs.h"
#include <${cf_cv_ncurses_header:-curses.h}>
				int main(void)
				{ const char *xx = curses_version(); return (xx == 0); }
_ACEOF
rm -f "conftest$ac_exeext"
if { (eval echo "$as_me:15931: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:15934: \$? = $ac_status" >&5
  (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
  { (eval echo "$as_me:15936: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:15939: \$? = $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:15956: 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:15972: 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 15990 "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; (void)x
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext"
if { (eval echo "$as_me:16005: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:16008: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:16011: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:16014: \$? = $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:16030: 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:16065: 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:16081: 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:16096: 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:16104: result: $NCURSES_CONFIG" >&5
echo "${ECHO_T}$NCURSES_CONFIG" >&6
else
  echo "$as_me:16107: 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:16120: 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:16135: 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:16143: result: $ac_ct_NCURSES_CONFIG" >&5
echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
else
  echo "$as_me:16146: 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

for cf_add_cflags in `$NCURSES_CONFIG --cflags`
do
	case "x$cf_add_cflags" in
	x-[DU]*)

cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
while true
do
	cf_old_cflag=`echo "x$CFLAGS" | sed -e 's/^.//' -e 's/[ 	][ 	]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ 	][^ 	]*\\)\?%%" -e 's/^[ 	]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
	test "$CFLAGS" != "$cf_old_cflag" || break

	CFLAGS="$cf_old_cflag"
done

cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
while true
do
	cf_old_cflag=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/[ 	][ 	]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ 	][^ 	]*\\)\?%%" -e 's/^[ 	]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
	test "$CPPFLAGS" != "$cf_old_cflag" || break

	CPPFLAGS="$cf_old_cflag"
done

		;;
	esac

cf_fix_cppflags=no
cf_new_cflags=
cf_new_cppflags=
cf_new_extra_cppflags=

for cf_add_cflags in $cf_add_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

done

cf_add_libs="$LIBS"
# reverse order
cf_add_0lib=
for cf_add_1lib in `$NCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
# filter duplicates
for cf_add_1lib in $cf_add_0lib; 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_1lib $cf_add_libs"
done
LIBS="$cf_add_libs"

		# even with config script, some packages use no-override for curses.h

echo "$as_me:16303: 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 16315 "configure"
#include "confdefs.h"
#include <${cf_header}>
int
main (void)
{
initscr(); endwin()
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext"
if { (eval echo "$as_me:16327: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:16330: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:16333: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:16336: \$? = $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:16347: 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:16351: 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:16361: 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 16367 "configure"
#include "confdefs.h"
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:16371: \"$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:16377: \$? = $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:16396: 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 16452 "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:16464: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:16467: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:16470: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:16473: \$? = $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}:16490: 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:16509: 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 16521 "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
	#error WACS_BSSB is not defined
#endif

printf("%s\\n", NCURSES_VERSION);
#else
#ifdef __NCURSES_H
printf("old\\n");
#else
	#error __NCURSES_H is not defined
#endif
#endif

  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext"
if { (eval echo "$as_me:16553: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:16556: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:16559: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:16562: \$? = $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:16577: 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:16584: 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 16705 "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:16717: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:16720: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:16723: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:16726: \$? = $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}:16743: 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 16766 "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
	#error __NCURSES_H is not defined
#endif
#endif

  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext"
if { (eval echo "$as_me:16790: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:16793: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:16796: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:16799: \$? = $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 $ECHO_N "	... found $ECHO_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:16820: error: not found" >&5
echo "$as_me: error: not found" >&2;}
   { (exit 1); exit 1; }; }

fi
echo "$as_me:16825: 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 16861 "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:16873: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:16876: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:16879: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:16882: \$? = $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}:16899: 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:16947: 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 16965 "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; (void)x
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext"
if { (eval echo "$as_me:16980: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:16983: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:16986: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:16989: \$? = $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:17005: 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:17043: 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:17069: \"$cf_try\"") >&5
  (eval $cf_try) 2>&5
  ac_status=$?
  echo "$as_me:17072: \$? = $ac_status" >&5
  (exit "$ac_status"); }
	if test -f conftest.out ; then
		cf_out=`sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%' conftest.out`
		test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
		rm -f conftest.out
	fi

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

$ac_includes_default

#include <${cf_cv_ncurses_header:-curses.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:17109: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:17112: \$? = $ac_status" >&5
  (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
  { (eval echo "$as_me:17114: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:17117: \$? = $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:17131: 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:17144: 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 17152 "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 (void);
int
main (void)
{
Gpm_Open ();
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext" "conftest$ac_exeext"
if { (eval echo "$as_me:17171: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:17174: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:17177: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:17180: \$? = $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:17191: 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:17194: 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 17202 "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 (void);
int
main (void)
{
initscr ();
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext" "conftest$ac_exeext"
if { (eval echo "$as_me:17221: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:17224: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:17227: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:17230: \$? = $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:17241: 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 is static).
	if test "$cf_nculib_root" = ncurses ; then
		echo "$as_me:17256: 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 17264 "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 (void);
int
main (void)
{
tgoto ();
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext" "conftest$ac_exeext"
if { (eval echo "$as_me:17283: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:17286: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:17289: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:17292: \$? = $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:17303: 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="$LIBS"
# reverse order
cf_add_0lib=
for cf_add_1lib in $cf_ncurses_LIBS; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
# filter duplicates
for cf_add_1lib in $cf_add_0lib; 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_1lib $cf_add_libs"
done
LIBS="$cf_add_libs"

if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
then

cf_add_libs="$LIBS"
# reverse order
cf_add_0lib=
for cf_add_1lib in -l$cf_nculib_root; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
# filter duplicates
for cf_add_1lib in $cf_add_0lib; 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_1lib $cf_add_libs"
done
LIBS="$cf_add_libs"

else

	eval 'cf_cv_have_lib_'"$cf_nculib_root"'=no'
	cf_libdir=""
	echo "$as_me:17352: 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 17358 "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:17389: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:17392: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:17395: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:17398: \$? = $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:17408: 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:17415: 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 17419 "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:17431: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:17434: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:17437: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:17440: \$? = $ac_status" >&5
  (exit "$ac_status"); }; }; then
  echo "$as_me:17442: 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:17449: 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:17517: 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 17521 "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:17533: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:17536: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:17539: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:17542: \$? = $ac_status" >&5
  (exit "$ac_status"); }; }; then
  echo "$as_me:17544: 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:17551: 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:17566: 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:17574: 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 17584 "configure"
#include "confdefs.h"
#include <${cf_cv_ncurses_header:-curses.h}>
int
main (void)
{
initscr(); mousemask(0,0); tigetstr((char *)0);
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext" "conftest$ac_exeext"
if { (eval echo "$as_me:17596: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:17599: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:17602: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:17605: \$? = $ac_status" >&5
  (exit "$ac_status"); }; }; then
  echo "$as_me:17607: result: yes" >&5
echo "${ECHO_T}yes" >&6
else
  echo "$as_me: failed program was:" >&5
cat "conftest.$ac_ext" >&5
echo "$as_me:17612: 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:17630: 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 17638 "configure"
#include "confdefs.h"

$ac_includes_default
#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_WIDECHAR
make an error	/* prefer to fall-through on the second checks */
#endif
	static char dummy[10];
	cchar_t check;
	int check2 = curs_set((int)sizeof(check));
	long x = winnstr(stdscr, dummy, 5);
	int x1, y1;
	(void)check2;
	getbegyx(stdscr, y1, x1);
	(void)x;
	(void)y1;
	(void)x1;

  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext" "conftest$ac_exeext"
if { (eval echo "$as_me:17671: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:17674: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:17677: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:17680: \$? = $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 17690 "configure"
#include "confdefs.h"

#define $cf_try_xopen_extension 1
$ac_includes_default
#include <${cf_cv_ncurses_header:-curses.h}>
int
main (void)
{

		static char dummy[10];
		cchar_t check;
		int check2 = curs_set((int)sizeof(check));
		long x = winnstr(stdscr, dummy, 5);
		int x1, y1;
		getbegyx(stdscr, y1, x1);
		(void)check2;
		(void)x;
		(void)y1;
		(void)x1;

  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext" "conftest$ac_exeext"
if { (eval echo "$as_me:17716: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:17719: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:17722: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:17725: \$? = $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:17739: 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:17751: 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:17757: 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:17783: 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:17793: 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 17805 "configure"
#include "confdefs.h"
#include <${cf_header}>
int
main (void)
{
initscr(); endwin()
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext"
if { (eval echo "$as_me:17817: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:17820: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:17823: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:17826: \$? = $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:17837: 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:17841: 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:17851: 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 17857 "configure"
#include "confdefs.h"
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:17861: \"$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:17867: \$? = $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:17886: 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:17896: 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 17914 "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; (void)x
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext"
if { (eval echo "$as_me:17929: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:17932: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:17935: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:17938: \$? = $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:17954: 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:17986: 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:18012: \"$cf_try\"") >&5
  (eval $cf_try) 2>&5
  ac_status=$?
  echo "$as_me:18015: \$? = $ac_status" >&5
  (exit "$ac_status"); }
	if test -f conftest.out ; then
		cf_out=`sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%' conftest.out`
		test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
		rm -f conftest.out
	fi

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

$ac_includes_default

#include <${cf_cv_ncurses_header:-curses.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:18052: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:18055: \$? = $ac_status" >&5
  (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
  { (eval echo "$as_me:18057: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:18060: \$? = $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:18074: 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:18081: 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 18084 "configure"
#include "confdefs.h"
#include <${cf_cv_ncurses_header:-curses.h}>
int
main (void)
{
initscr(); endwin()
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext" "conftest$ac_exeext"
if { (eval echo "$as_me:18096: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:18099: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:18102: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:18105: \$? = $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:18114: result: $cf_result" >&5
echo "${ECHO_T}$cf_result" >&6

if test "$cf_result" = no ; then
case "$host_os" in
freebsd*)
	echo "$as_me:18120: 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 18128 "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 (void);
int
main (void)
{
tgoto ();
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext" "conftest$ac_exeext"
if { (eval echo "$as_me:18147: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:18150: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:18153: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:18156: \$? = $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:18167: 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="$LIBS"
# reverse order
cf_add_0lib=
for cf_add_1lib in -lmytinfo; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
# filter duplicates
for cf_add_1lib in $cf_add_0lib; 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_1lib $cf_add_libs"
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:18197: 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 18205 "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 (void);
int
main (void)
{
initscr ();
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext" "conftest$ac_exeext"
if { (eval echo "$as_me:18224: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:18227: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:18230: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:18233: \$? = $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:18244: 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="$LIBS"
# reverse order
cf_add_0lib=
for cf_add_1lib in -lcur_colr; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
# filter duplicates
for cf_add_1lib in $cf_add_0lib; 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_1lib $cf_add_libs"
done
LIBS="$cf_add_libs"

			ac_cv_func_initscr=yes

else

		echo "$as_me:18268: 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 18276 "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 (void);
int
main (void)
{
initscr ();
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext" "conftest$ac_exeext"
if { (eval echo "$as_me:18295: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:18298: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:18301: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:18304: \$? = $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:18315: 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="$LIBS"
# reverse order
cf_add_0lib=
for cf_add_1lib in -lHcurses; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
# filter duplicates
for cf_add_1lib in $cf_add_0lib; 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_1lib $cf_add_libs"
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}:18373: 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}:18402: 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}:18433: 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}:18468: testing adding $cf_add_libdir to library-path ..." 1>&5

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

cf_add_libs="$LIBS"
# reverse order
cf_add_0lib=
for cf_add_1lib in -lcurses -ltermcap; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
# filter duplicates
for cf_add_1lib in $cf_add_0lib; 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_1lib $cf_add_libs"
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:18512: 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 18518 "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:18549: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:18552: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:18555: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:18558: \$? = $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:18568: 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:18577: 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 18585 "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 (void);
int
main (void)
{
tgoto ();
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext" "conftest$ac_exeext"
if { (eval echo "$as_me:18604: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:18607: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:18610: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:18613: \$? = $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:18624: 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:18647: 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 18650 "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:18662: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:18665: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:18668: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:18671: \$? = $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:18680: 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:18686: 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 18689 "configure"
#include "confdefs.h"
#include <${cf_cv_ncurses_header:-curses.h}>
int
main (void)
{
initscr(); endwin();
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext" "conftest$ac_exeext"
if { (eval echo "$as_me:18701: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:18704: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:18707: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:18710: \$? = $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 18719 "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:18731: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:18734: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:18737: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:18740: \$? = $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:18752: 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:18758: error: no curses library found" >&5
echo "$as_me: error: no curses library found" >&2;}
   { (exit 1); exit 1; }; }
fi
fi

echo "$as_me:18764: 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 18772 "configure"
#include "confdefs.h"

$ac_includes_default
#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_WIDECHAR
make an error	/* prefer to fall-through on the second checks */
#endif
	static char dummy[10];
	cchar_t check;
	int check2 = curs_set((int)sizeof(check));
	long x = winnstr(stdscr, dummy, 5);
	int x1, y1;
	(void)check2;
	getbegyx(stdscr, y1, x1);
	(void)x;
	(void)y1;
	(void)x1;

  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext" "conftest$ac_exeext"
if { (eval echo "$as_me:18805: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:18808: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:18811: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:18814: \$? = $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 18824 "configure"
#include "confdefs.h"

#define $cf_try_xopen_extension 1
$ac_includes_default
#include <${cf_cv_ncurses_header:-curses.h}>
int
main (void)
{

		static char dummy[10];
		cchar_t check;
		int check2 = curs_set((int)sizeof(check));
		long x = winnstr(stdscr, dummy, 5);
		int x1, y1;
		getbegyx(stdscr, y1, x1);
		(void)check2;
		(void)x;
		(void)y1;
		(void)x1;

  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext" "conftest$ac_exeext"
if { (eval echo "$as_me:18850: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:18853: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:18856: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:18859: \$? = $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:18873: 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:18890: 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:18900: result: $PCRE_HOME" >&5
echo "${ECHO_T}$PCRE_HOME" >&6

## Preliminary check for PCRE2
echo "$as_me:18904: checking if you want to use pcre2 in favour of pcre" >&5
echo $ECHO_N "checking if you want to use pcre2 in favour of pcre... $ECHO_C" >&6

# Check whether --with-pcre2-config or --without-pcre2-config was given.
if test "${with_pcre2_config+set}" = set; then
  withval="$with_pcre2_config"
  pcre2_config=$withval
else
  pcre2_config=no
fi;
echo "$as_me:18914: result: $pcre2_config" >&5
echo "${ECHO_T}$pcre2_config" >&6

if test "$PCRE_HOME" != no && test "$pcre2_config" != no ; then
	{ { echo "$as_me:18918: error: cannot use PCRE and PCRE2 at the same time" >&5
echo "$as_me: error: cannot use PCRE and PCRE2 at the same time" >&2;}
   { (exit 1); exit 1; }; }
fi

if test "$pcre2_config" != no ; then
	if test "$pcre2_config" != yes ; then
		PCRE2_CONFIG=$withval
	else

if test -n "$ac_tool_prefix"; then
  # Extract the first word of "${ac_tool_prefix}pcre2-config", so it can be a program name with args.
set dummy ${ac_tool_prefix}pcre2-config; ac_word=$2
echo "$as_me:18931: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_path_PCRE2_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $PCRE2_CONFIG in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_PCRE2_CONFIG="$PCRE2_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_PCRE2_CONFIG="$ac_dir/$ac_word"
   echo "$as_me:18948: found $ac_dir/$ac_word" >&5
   break
fi
done

  ;;
esac
fi
PCRE2_CONFIG=$ac_cv_path_PCRE2_CONFIG

if test -n "$PCRE2_CONFIG"; then
  echo "$as_me:18959: result: $PCRE2_CONFIG" >&5
echo "${ECHO_T}$PCRE2_CONFIG" >&6
else
  echo "$as_me:18962: result: no" >&5
echo "${ECHO_T}no" >&6
fi

fi
if test -z "$ac_cv_path_PCRE2_CONFIG"; then
  ac_pt_PCRE2_CONFIG=$PCRE2_CONFIG
  # Extract the first word of "pcre2-config", so it can be a program name with args.
set dummy pcre2-config; ac_word=$2
echo "$as_me:18971: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_path_ac_pt_PCRE2_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $ac_pt_PCRE2_CONFIG in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_ac_pt_PCRE2_CONFIG="$ac_pt_PCRE2_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_PCRE2_CONFIG="$ac_dir/$ac_word"
   echo "$as_me:18988: found $ac_dir/$ac_word" >&5
   break
fi
done

  test -z "$ac_cv_path_ac_pt_PCRE2_CONFIG" && ac_cv_path_ac_pt_PCRE2_CONFIG="none"
  ;;
esac
fi
ac_pt_PCRE2_CONFIG=$ac_cv_path_ac_pt_PCRE2_CONFIG

if test -n "$ac_pt_PCRE2_CONFIG"; then
  echo "$as_me:19000: result: $ac_pt_PCRE2_CONFIG" >&5
echo "${ECHO_T}$ac_pt_PCRE2_CONFIG" >&6
else
  echo "$as_me:19003: result: no" >&5
echo "${ECHO_T}no" >&6
fi

  PCRE2_CONFIG=$ac_pt_PCRE2_CONFIG
else
  PCRE2_CONFIG="$ac_cv_path_PCRE2_CONFIG"
fi

	fi

	if test "$PCRE2_CONFIG" != none && "$PCRE2_CONFIG" --version >/dev/null ; then
		PCRE2_LIBS=`$PCRE2_CONFIG --libs8`
		PCRE2_CFLAGS=`$PCRE2_CONFIG --cflags`
		if test -n "$PCRE2_LIBS" ; then
			LIBS="$LIBS $PCRE2_LIBS"
		fi
		if test -n "$PCRE2_CFLAGS" ; then
			CFLAGS="$CFLAGS $PCRE2_CFLAGS"
		fi

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

		# TODO: header / link checks?
	else
		{ echo "$as_me:19030: WARNING: pcre2-config not found or not working, trying fallback to pcre" >&5
echo "$as_me: WARNING: pcre2-config not found or not working, trying fallback to pcre" >&2;}
		pcre2_config=no
	fi
fi

PCRE_MAKEFILE=
if test "$pcre2_config" = no ; then

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

cf_save_CFLAGS="$CFLAGS"
cf_save_LIBS="$LIBS"
cf_find_PCRE=yes

if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "libpcre2"; then
	test -n "$verbose" && echo "	found package libpcre2" 1>&6

echo "${as_me:-configure}:19059: testing found package libpcre2 ..." 1>&5

	cf_pkgconfig_incs="`$PKG_CONFIG --cflags "libpcre2" 2>/dev/null`"
	cf_pkgconfig_libs="`$PKG_CONFIG --libs   "libpcre2" 2>/dev/null`"
	test -n "$verbose" && echo "	package libpcre2 CFLAGS: $cf_pkgconfig_incs" 1>&6

echo "${as_me:-configure}:19065: testing package libpcre2 CFLAGS: $cf_pkgconfig_incs ..." 1>&5

	test -n "$verbose" && echo "	package libpcre2 LIBS: $cf_pkgconfig_libs" 1>&6

echo "${as_me:-configure}:19069: testing package libpcre2 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="$LIBS"
# reverse order
cf_add_0lib=
for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
# filter duplicates
for cf_add_1lib in $cf_add_0lib; 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_1lib $cf_add_libs"
done
LIBS="$cf_add_libs"

	:
else
	cf_pkgconfig_incs=
	cf_pkgconfig_libs=

if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "libpcre"; then
	test -n "$verbose" && echo "	found package libpcre" 1>&6

echo "${as_me:-configure}:19193: testing found package libpcre ..." 1>&5

	cf_pkgconfig_incs="`$PKG_CONFIG --cflags "libpcre" 2>/dev/null`"
	cf_pkgconfig_libs="`$PKG_CONFIG --libs   "libpcre" 2>/dev/null`"
	test -n "$verbose" && echo "	package libpcre CFLAGS: $cf_pkgconfig_incs" 1>&6

echo "${as_me:-configure}:19199: testing package libpcre CFLAGS: $cf_pkgconfig_incs ..." 1>&5

	test -n "$verbose" && echo "	package libpcre LIBS: $cf_pkgconfig_libs" 1>&6

echo "${as_me:-configure}:19203: testing package libpcre 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="$LIBS"
# reverse order
cf_add_0lib=
for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
# filter duplicates
for cf_add_1lib in $cf_add_0lib; 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_1lib $cf_add_libs"
done
LIBS="$cf_add_libs"

	:
else
	cf_pkgconfig_incs=
	cf_pkgconfig_libs=

		echo "$as_me:19324: checking for pcre_compile in -lpcre" >&5
echo $ECHO_N "checking for pcre_compile in -lpcre... $ECHO_C" >&6
if test "${ac_cv_lib_pcre_pcre_compile+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lpcre  $LIBS"
cat >"conftest.$ac_ext" <<_ACEOF
#line 19332 "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 pcre_compile (void);
int
main (void)
{
pcre_compile ();
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext" "conftest$ac_exeext"
if { (eval echo "$as_me:19351: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:19354: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:19357: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:19360: \$? = $ac_status" >&5
  (exit "$ac_status"); }; }; then
  ac_cv_lib_pcre_pcre_compile=yes
else
  echo "$as_me: failed program was:" >&5
cat "conftest.$ac_ext" >&5
ac_cv_lib_pcre_pcre_compile=no
fi
rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:19371: result: $ac_cv_lib_pcre_pcre_compile" >&5
echo "${ECHO_T}$ac_cv_lib_pcre_pcre_compile" >&6
if test "$ac_cv_lib_pcre_pcre_compile" = yes; then

cf_add_libs="$LIBS"
# reverse order
cf_add_0lib=
for cf_add_1lib in -lpcre; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
# filter duplicates
for cf_add_1lib in $cf_add_0lib; 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_1lib $cf_add_libs"
done
LIBS="$cf_add_libs"

			echo "$as_me:19391: checking for regcomp in -lpcre2-posix" >&5
echo $ECHO_N "checking for regcomp in -lpcre2-posix... $ECHO_C" >&6
if test "${ac_cv_lib_pcre2_posix_regcomp+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lpcre2-posix  $LIBS"
cat >"conftest.$ac_ext" <<_ACEOF
#line 19399 "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 regcomp (void);
int
main (void)
{
regcomp ();
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext" "conftest$ac_exeext"
if { (eval echo "$as_me:19418: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:19421: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:19424: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:19427: \$? = $ac_status" >&5
  (exit "$ac_status"); }; }; then
  ac_cv_lib_pcre2_posix_regcomp=yes
else
  echo "$as_me: failed program was:" >&5
cat "conftest.$ac_ext" >&5
ac_cv_lib_pcre2_posix_regcomp=no
fi
rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:19438: result: $ac_cv_lib_pcre2_posix_regcomp" >&5
echo "${ECHO_T}$ac_cv_lib_pcre2_posix_regcomp" >&6
if test "$ac_cv_lib_pcre2_posix_regcomp" = yes; then

cf_add_libs="$LIBS"
# reverse order
cf_add_0lib=
for cf_add_1lib in -lpcre2-posix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
# filter duplicates
for cf_add_1lib in $cf_add_0lib; 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_1lib $cf_add_libs"
done
LIBS="$cf_add_libs"

else

					echo "$as_me:19460: checking for regcomp in -lpcreposix" >&5
echo $ECHO_N "checking for regcomp in -lpcreposix... $ECHO_C" >&6
if test "${ac_cv_lib_pcreposix_regcomp+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lpcreposix  $LIBS"
cat >"conftest.$ac_ext" <<_ACEOF
#line 19468 "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 regcomp (void);
int
main (void)
{
regcomp ();
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext" "conftest$ac_exeext"
if { (eval echo "$as_me:19487: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:19490: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:19493: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:19496: \$? = $ac_status" >&5
  (exit "$ac_status"); }; }; then
  ac_cv_lib_pcreposix_regcomp=yes
else
  echo "$as_me: failed program was:" >&5
cat "conftest.$ac_ext" >&5
ac_cv_lib_pcreposix_regcomp=no
fi
rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:19507: result: $ac_cv_lib_pcreposix_regcomp" >&5
echo "${ECHO_T}$ac_cv_lib_pcreposix_regcomp" >&6
if test "$ac_cv_lib_pcreposix_regcomp" = yes; then

cf_add_libs="$LIBS"
# reverse order
cf_add_0lib=
for cf_add_1lib in -lpcreposix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
# filter duplicates
for cf_add_1lib in $cf_add_0lib; 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_1lib $cf_add_libs"
done
LIBS="$cf_add_libs"

else

						cf_find_PCRE=no

fi

fi

else

				cf_find_PCRE=no

fi

fi

fi

CFLAGS="$cf_save_CFLAGS"
LIBS="$cf_save_LIBS"

cf_pcre_cppflags="$cf_pkgconfig_incs"
cf_pcre_libs="$cf_pkgconfig_libs"

if test "$cf_find_PCRE" = yes; then

			PCREDIR_MAKE='#'
			PCREDIR_LIBS="$cf_pcre_libs"
			PCREDIR_CPPFLAGS="$cf_pcre_cppflags"

else

			test -n "$verbose" && echo "	using bundled pcre because no installed pcre was found" 1>&6

echo "${as_me:-configure}:19561: testing using bundled pcre because no installed pcre was found ..." 1>&5

			cf_pcre_home=no

fi

	;;
.*)

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:19595: 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

	if test "$cf_pcre_home" = "no" ; then
		LINK_SIZE="-DLINK_SIZE=2"

		UTF8="-DSUPPORT_UTF8"
		UCP="-DSUPPORT_UCP"

		PCRE_MAKEFILE="$PCRE_MAKEFILE pcre/Makefile pcre/RunTest"
	fi
else
	PCREDIR_MAKE='#'
fi

## debugging libraries (do this after other libraries)
debug_malloc=none

echo "$as_me:19622: 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"
  case "x$withval" in
	x|xno) ;;
	*)
		: "${with_cflags:=-g}"
		: "${enable_leaks:=no}"
		with_dbmalloc=yes

cat >>confdefs.h <<EOF
#define USE_DBMALLOC 1
EOF

		;;
	esac
else
  with_dbmalloc=
fi;
echo "$as_me:19644: 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:19758: 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 19764 "configure"
#include "confdefs.h"
#include <dbmalloc.h>
_ACEOF
if { (eval echo "$as_me:19768: \"$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:19774: \$? = $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:19793: 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:19796: 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 19804 "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 (void);
int
main (void)
{
debug_malloc ();
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext" "conftest$ac_exeext"
if { (eval echo "$as_me:19823: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:19826: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:19829: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:19832: \$? = $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:19843: 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:19853: 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"
  case "x$withval" in
	x|xno) ;;
	*)
		: "${with_cflags:=-g}"
		: "${enable_leaks:=no}"
		with_dmalloc=yes

cat >>confdefs.h <<EOF
#define USE_DMALLOC 1
EOF

		;;
	esac
else
  with_dmalloc=
fi;
echo "$as_me:19875: 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:19989: 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 19995 "configure"
#include "confdefs.h"
#include <dmalloc.h>
_ACEOF
if { (eval echo "$as_me:19999: \"$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:20005: \$? = $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:20024: 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:20027: 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 20035 "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 (void);
int
main (void)
{
dmalloc_debug ();
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext" "conftest$ac_exeext"
if { (eval echo "$as_me:20054: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:20057: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:20060: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:20063: \$? = $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:20074: 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:20088: 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 20094 "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:20125: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:20128: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:20131: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:20134: \$? = $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:20144: 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:20155: 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 20163 "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 (void);
int
main (void)
{
_tracef ();
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext" "conftest$ac_exeext"
if { (eval echo "$as_me:20182: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:20185: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:20188: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:20191: \$? = $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:20202: 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="\$(OBJDIR)/trace.o $EXTRAOBJS"
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:20232: 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:20244: 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:20260: result: $DOMAIN_NAME" >&5
echo "${ECHO_T}$DOMAIN_NAME" >&6

if test "$USE_NNTP" = "yes" ; then
echo "$as_me:20264: 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:20276: 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:20304: 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:20333: 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:20350: result: $enableval" >&5
echo "${ECHO_T}$enableval" >&6

echo "$as_me:20353: 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
    :
	fi
else
  enableval=no
fi;
echo "$as_me:20366: result: $enableval" >&5
echo "${ECHO_T}$enableval" >&6
USE_CANLOCK=$enableval

if test "$USE_CANLOCK" = yes ; then
	echo "$as_me:20371: checking whether to use installed canlock rather than bundled" >&5
echo $ECHO_N "checking whether to use installed canlock rather than bundled... $ECHO_C" >&6

# Check whether --with-canlock or --without-canlock was given.
if test "${with_canlock+set}" = set; then
  withval="$with_canlock"
  CANLOCK_HOME=$withval
else
  CANLOCK_HOME=$USE_CANLOCK
fi;
	echo "$as_me:20381: result: $CANLOCK_HOME" >&5
echo "${ECHO_T}$CANLOCK_HOME" >&6

cf_canlock_home=$CANLOCK_HOME
CANDIR_MAKE=
CANLIBS=
CAN_CPPFLAGS=
CAN_MAKEFILE=

case .$cf_canlock_home in #(vi
.no) #(vi
	test -n "$verbose" && echo "	using bundled canlock" 1>&6

echo "${as_me:-configure}:20394: testing using bundled canlock ..." 1>&5

	CANLIBS='-L../libcanlock -lcanlock'
	CAN_CPPFLAGS='-I$(top_builddir)/libcanlock/include -I$(top_srcdir)/libcanlock/include'
	CAN_MAKEFILE='libcanlock/Makefile'
	;;
.yes) #(vi

cf_save_CFLAGS="$CFLAGS"
cf_save_LIBS="$LIBS"
cf_find_CANLOCK=yes

if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "libcanlock-3"; then
	test -n "$verbose" && echo "	found package libcanlock-3" 1>&6

echo "${as_me:-configure}:20409: testing found package libcanlock-3 ..." 1>&5

	cf_pkgconfig_incs="`$PKG_CONFIG --cflags "libcanlock-3" 2>/dev/null`"
	cf_pkgconfig_libs="`$PKG_CONFIG --libs   "libcanlock-3" 2>/dev/null`"
	test -n "$verbose" && echo "	package libcanlock-3 CFLAGS: $cf_pkgconfig_incs" 1>&6

echo "${as_me:-configure}:20415: testing package libcanlock-3 CFLAGS: $cf_pkgconfig_incs ..." 1>&5

	test -n "$verbose" && echo "	package libcanlock-3 LIBS: $cf_pkgconfig_libs" 1>&6

echo "${as_me:-configure}:20419: testing package libcanlock-3 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="$LIBS"
# reverse order
cf_add_0lib=
for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
# filter duplicates
for cf_add_1lib in $cf_add_0lib; 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_1lib $cf_add_libs"
done
LIBS="$cf_add_libs"

	:
else
	cf_pkgconfig_incs=
	cf_pkgconfig_libs=

if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "libcanlock"; then
	test -n "$verbose" && echo "	found package libcanlock" 1>&6

echo "${as_me:-configure}:20543: testing found package libcanlock ..." 1>&5

	cf_pkgconfig_incs="`$PKG_CONFIG --cflags "libcanlock" 2>/dev/null`"
	cf_pkgconfig_libs="`$PKG_CONFIG --libs   "libcanlock" 2>/dev/null`"
	test -n "$verbose" && echo "	package libcanlock CFLAGS: $cf_pkgconfig_incs" 1>&6

echo "${as_me:-configure}:20549: testing package libcanlock CFLAGS: $cf_pkgconfig_incs ..." 1>&5

	test -n "$verbose" && echo "	package libcanlock LIBS: $cf_pkgconfig_libs" 1>&6

echo "${as_me:-configure}:20553: testing package libcanlock 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="$LIBS"
# reverse order
cf_add_0lib=
for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
# filter duplicates
for cf_add_1lib in $cf_add_0lib; 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_1lib $cf_add_libs"
done
LIBS="$cf_add_libs"

	:
else
	cf_pkgconfig_incs=
	cf_pkgconfig_libs=

		cf_pkgconfig_incs=
		cf_pkgconfig_libs=
		for cf_canlock_lib in canlock3 canlock
		do
			as_ac_Lib=`echo "ac_cv_lib_$cf_canlock_lib''_cl_clear_secret" | $as_tr_sh`
echo "$as_me:20679: checking for cl_clear_secret in -l$cf_canlock_lib" >&5
echo $ECHO_N "checking for cl_clear_secret in -l$cf_canlock_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_canlock_lib  $LIBS"
cat >"conftest.$ac_ext" <<_ACEOF
#line 20687 "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 cl_clear_secret (void);
int
main (void)
{
cl_clear_secret ();
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext" "conftest$ac_exeext"
if { (eval echo "$as_me:20706: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:20709: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:20712: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:20715: \$? = $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:20726: 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_pkgconfig_libs="-l$cf_canlock_lib"
				break

fi

		done
		if test -z "$cf_pkgconfig_libs" ; then
			cf_find_CANLOCK=no
		else

for ac_header in libcanlock-3/canlock.h canlock.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
echo "$as_me:20743: 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 20749 "configure"
#include "confdefs.h"
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:20753: \"$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:20759: \$? = $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:20778: 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

fi

CFLAGS="$cf_save_CFLAGS"
LIBS="$cf_save_LIBS"

cf_canlock_cppflags="$cf_pkgconfig_incs"
cf_canlock_libs="$cf_pkgconfig_libs"

if test "$cf_find_CANLOCK" = yes; then

			CANDIR_MAKE='#'
			CANLIBS="$cf_canlock_libs"
			CAN_CPPFLAGS="$cf_canlock_cppflags"
			test -n "$verbose" && echo "	using installed canlock" 1>&6

echo "${as_me:-configure}:20807: testing using installed canlock ..." 1>&5

else

			test -n "$verbose" && echo "	using bundled canlock because no installed canlock was found" 1>&6

echo "${as_me:-configure}:20813: testing using bundled canlock because no installed canlock was found ..." 1>&5

			CANLIBS='-L../libcanlock -lcanlock'
			CAN_CPPFLAGS='-I$(top_builddir)/libcanlock/include -I$(top_srcdir)/libcanlock/include'
			CAN_MAKEFILE='libcanlock/Makefile'

fi

	;;
.*)

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

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

	CANDIR_MAKE='#'
	CANLIBS="-L${cf_canlock_home}/lib -lcanlock"
	CAN_CPPFLAGS="-I${cf_canlock_home}/include"
	test -n "$verbose" && echo "	using installed canlock $cf_canlock_home" 1>&6

echo "${as_me:-configure}:20860: testing using installed canlock $cf_canlock_home ..." 1>&5

	;;
esac

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

else
	CANDIR_MAKE='#'
fi

## gsasl - used for AUTH SASL PLAIN
gsasl=no
echo "$as_me:20875: 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 20881 "configure"
#include "confdefs.h"
#include <gsasl.h>
_ACEOF
if { (eval echo "$as_me:20885: \"$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:20891: \$? = $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:20910: 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:20913: 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 20921 "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 (void);
int
main (void)
{
gsasl_check_version ();
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext" "conftest$ac_exeext"
if { (eval echo "$as_me:20940: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:20943: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:20946: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:20949: \$? = $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:20960: 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:20998: 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:21022: result: $enableval" >&5
echo "${ECHO_T}$enableval" >&6

echo "$as_me:21025: 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:21039: result: $use_color" >&5
echo "${ECHO_T}$use_color" >&6

echo "$as_me:21042: 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:21059: result: $enableval" >&5
echo "${ECHO_T}$enableval" >&6

echo "$as_me:21062: 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:21086: result: $enableval" >&5
echo "${ECHO_T}$enableval" >&6

echo "$as_me:21089: 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:21113: result: $enableval" >&5
echo "${ECHO_T}$enableval" >&6

echo "$as_me:21116: 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:21128: 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:21139: result: $MM_CHARSET" >&5
echo "${ECHO_T}$MM_CHARSET" >&6

echo "$as_me:21142: 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:21154: 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:21165: result: $DEFAULT_ISO2ASC" >&5
echo "${ECHO_T}$DEFAULT_ISO2ASC" >&6

echo "$as_me:21168: 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:21185: result: $enableval" >&5
echo "${ECHO_T}$enableval" >&6

echo "$as_me:21188: 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:21205: result: $enableval" >&5
echo "${ECHO_T}$enableval" >&6

echo "$as_me:21208: 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:21225: result: $enableval" >&5
echo "${ECHO_T}$enableval" >&6

echo "$as_me:21228: 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:21245: result: $enableval" >&5
echo "${ECHO_T}$enableval" >&6

echo "$as_me:21248: 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:21265: result: $enableval" >&5
echo "${ECHO_T}$enableval" >&6

echo "$as_me:21268: 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:21285: result: $enableval" >&5
echo "${ECHO_T}$enableval" >&6

echo "$as_me:21288: 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:21305: result: $enableval" >&5
echo "${ECHO_T}$enableval" >&6

echo "$as_me:21308: 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:21332: result: $enableval" >&5
echo "${ECHO_T}$enableval" >&6

echo "$as_me:21335: 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:21359: result: $enableval" >&5
echo "${ECHO_T}$enableval" >&6

### bypass a bug in old versions of leafnode & NNTPcache
echo "$as_me:21363: 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:21380: result: $enableval" >&5
echo "${ECHO_T}$enableval" >&6

### on some old systems the WIFEXITED()/WEXITSTATUS() macros do not work
echo "$as_me:21384: 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:21401: result: $enableval" >&5
echo "${ECHO_T}$enableval" >&6

### checks for the location of the system-wide default setting file
echo "$as_me:21405: 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:21441: 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:21450: 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:21458: 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:21482: result: $enableval" >&5
echo "${ECHO_T}$enableval" >&6
if test "$enableval" = "yes"; then

echo "$as_me:21486: 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 21507 "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 21524 "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 21541 "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 21567 "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 21584 "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 21601 "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:21623: result: $cf_cv_ipv6type" >&5
echo "${ECHO_T}$cf_cv_ipv6type" >&6

cf_ipv6lib=none
cf_ipv6dir=none

echo "$as_me:21629: 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:21659: result: $cf_ipv6lib" >&5
echo "${ECHO_T}$cf_ipv6lib" >&6

if test "$cf_ipv6lib" != "none"; then

	cat >"conftest.$ac_ext" <<_ACEOF
#line 21665 "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:21681: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:21684: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:21687: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:21690: \$? = $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 21811 "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:21823: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:21826: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:21829: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:21832: \$? = $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}:21849: 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:21877: 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 21883 "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:21914: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:21917: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:21920: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:21923: \$? = $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:21933: 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:21940: 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 21944 "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:21960: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:21963: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:21966: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:21969: \$? = $ac_status" >&5
  (exit "$ac_status"); }; }; then
  echo "$as_me:21971: 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:21978: 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:22046: 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 22050 "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:22066: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:22069: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:22072: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:22075: \$? = $ac_status" >&5
  (exit "$ac_status"); }; }; then
  echo "$as_me:22077: 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:22084: 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:22099: 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:22107: 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 22117 "configure"
#include "confdefs.h"

$ac_includes_default

#include <netdb.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:22197: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:22200: \$? = $ac_status" >&5
  (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
  { (eval echo "$as_me:22202: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:22205: \$? = $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:22218: 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:22234: 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:22239: 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:22253: 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 22259 "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:22290: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:22293: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:22296: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:22299: \$? = $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:22309: 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:22322: 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:22339: result: $enableval" >&5
echo "${ECHO_T}$enableval" >&6

### TLS support
if test "$USE_NNTP" = "yes" ; then
echo "$as_me:22344: checking whether to enable NNTPS support" >&5
echo $ECHO_N "checking whether to enable NNTPS support... $ECHO_C" >&6

# Check whether --with-nntps or --without-nntps was given.
if test "${with_nntps+set}" = set; then
  withval="$with_nntps"
  enable_nntps=$withval
else
  enable_nntps="no"
fi;
echo "$as_me:22354: result: $enable_nntps" >&5
echo "${ECHO_T}$enable_nntps" >&6

# TODO: checklib for openssl in non pkg-config case
#       version checking in non pkg-config case for openssl
#       cleanup (duplicate code, messages, formatting, ...)
if test "$enable_nntps" != "no"; then
  if test "$enable_nntps" = "yes" || test "$enable_nntps" = "libtls"; then

echo "$as_me:22363: checking for LibreSSL" >&5
echo $ECHO_N "checking for LibreSSL... $ECHO_C" >&6

if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "libtls"; then
	test -n "$verbose" && echo "	found package libtls" 1>&6

echo "${as_me:-configure}:22369: testing found package libtls ..." 1>&5

	cf_pkgconfig_incs="`$PKG_CONFIG --cflags "libtls" 2>/dev/null`"
	cf_pkgconfig_libs="`$PKG_CONFIG --libs   "libtls" 2>/dev/null`"
	test -n "$verbose" && echo "	package libtls CFLAGS: $cf_pkgconfig_incs" 1>&6

echo "${as_me:-configure}:22375: testing package libtls CFLAGS: $cf_pkgconfig_incs ..." 1>&5

	test -n "$verbose" && echo "	package libtls LIBS: $cf_pkgconfig_libs" 1>&6

echo "${as_me:-configure}:22379: testing package libtls 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="$LIBS"
# reverse order
cf_add_0lib=
for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
# filter duplicates
for cf_add_1lib in $cf_add_0lib; 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_1lib $cf_add_libs"
done
LIBS="$cf_add_libs"

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

#include <tls.h>

int
main (void)
{

#if TLS_API < 20200120
#error "Please use LibreSSL TLS_API >= 20200120"
#endif /* TLS_API < 20200120 */

  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext"
if { (eval echo "$as_me:22514: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:22517: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:22520: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:22523: \$? = $ac_status" >&5
  (exit "$ac_status"); }; }; then
  have_libtls=yes
else
  echo "$as_me: failed program was:" >&5
cat "conftest.$ac_ext" >&5

have_libtls=no
echo "$as_me:22531: result: \tLibreSSL TLS_API too old (< 20200120)" >&5
echo "${ECHO_T}\tLibreSSL TLS_API too old (< 20200120)" >&6

fi
rm -f "conftest.$ac_objext" "conftest.$ac_ext"
else
	cf_pkgconfig_incs=
	cf_pkgconfig_libs=

echo "$as_me:22540: checking for tls_config_new in -ltls" >&5
echo $ECHO_N "checking for tls_config_new in -ltls... $ECHO_C" >&6
if test "${ac_cv_lib_tls_tls_config_new+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-ltls  $LIBS"
cat >"conftest.$ac_ext" <<_ACEOF
#line 22548 "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 tls_config_new (void);
int
main (void)
{
tls_config_new ();
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext" "conftest$ac_exeext"
if { (eval echo "$as_me:22567: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:22570: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:22573: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:22576: \$? = $ac_status" >&5
  (exit "$ac_status"); }; }; then
  ac_cv_lib_tls_tls_config_new=yes
else
  echo "$as_me: failed program was:" >&5
cat "conftest.$ac_ext" >&5
ac_cv_lib_tls_tls_config_new=no
fi
rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:22587: result: $ac_cv_lib_tls_tls_config_new" >&5
echo "${ECHO_T}$ac_cv_lib_tls_tls_config_new" >&6
if test "$ac_cv_lib_tls_tls_config_new" = yes; then

for ac_header in tls.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
echo "$as_me:22594: 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 22600 "configure"
#include "confdefs.h"
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:22604: \"$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:22610: \$? = $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:22629: 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

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

#include <tls.h>

int
main (void)
{

#if TLS_API < 20200120
#error "Please use LibreSSL TLS_API >= 20200120"
#endif /* TLS_API < 20200120 */

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

LIBS="$LIBS -ltls"
have_libtls=yes

else
  echo "$as_me: failed program was:" >&5
cat "conftest.$ac_ext" >&5
have_libtls=no
echo "$as_me:22674: result: \tLibreSSL TLS_API too old (< 20200120)" >&5
echo "${ECHO_T}\tLibreSSL TLS_API too old (< 20200120)" >&6

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

else
  have_libtls=no
fi
done

else

have_libtls=no
echo "$as_me:22688: result: $have_libtls" >&5
echo "${ECHO_T}$have_libtls" >&6

fi

fi

fi

	if test "$enable_nntps" = "yes" && test "$have_libtls" = "no" || test "$enable_nntps" = "openssl"; then

echo "$as_me:22699: checking for OpenSSL" >&5
echo $ECHO_N "checking for OpenSSL... $ECHO_C" >&6

if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "openssl"; then
	test -n "$verbose" && echo "	found package openssl" 1>&6

echo "${as_me:-configure}:22705: testing found package openssl ..." 1>&5

	cf_pkgconfig_incs="`$PKG_CONFIG --cflags "openssl" 2>/dev/null`"
	cf_pkgconfig_libs="`$PKG_CONFIG --libs   "openssl" 2>/dev/null`"
	test -n "$verbose" && echo "	package openssl CFLAGS: $cf_pkgconfig_incs" 1>&6

echo "${as_me:-configure}:22711: testing package openssl CFLAGS: $cf_pkgconfig_incs ..." 1>&5

	test -n "$verbose" && echo "	package openssl LIBS: $cf_pkgconfig_libs" 1>&6

echo "${as_me:-configure}:22715: testing package openssl 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="$LIBS"
# reverse order
cf_add_0lib=
for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
# filter duplicates
for cf_add_1lib in $cf_add_0lib; 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_1lib $cf_add_libs"
done
LIBS="$cf_add_libs"

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

#include <openssl/ssl.h>
#include <openssl/err.h>
#include <openssl/rand.h>

int
main (void)
{

#if OPENSSL_VERSION_NUMBER < 0x1010100fL
#error "Please use OpenSSL >= 1.1.1"
#endif /* OPENSSL_VERSION_NUMBER < 0x1010100fL */
#if defined(LIBRESSL_VERSION_NUMBER)
#error "Please use real OpenSSL >= 1.1.1"
#endif /* LIBRESSL pretending to be OPENSSL */

  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext"
if { (eval echo "$as_me:22855: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:22858: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:22861: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:22864: \$? = $ac_status" >&5
  (exit "$ac_status"); }; }; then
  have_openssl=yes
else
  echo "$as_me: failed program was:" >&5
cat "conftest.$ac_ext" >&5

have_openssl=no
echo "$as_me:22872: result: \tOpenSSL too old (< 1.1.1)" >&5
echo "${ECHO_T}\tOpenSSL too old (< 1.1.1)" >&6

fi
rm -f "conftest.$ac_objext" "conftest.$ac_ext"
else
	cf_pkgconfig_incs=
	cf_pkgconfig_libs=

have_openssl=no
echo "$as_me:22882: result: $have_openssl" >&5
echo "${ECHO_T}$have_openssl" >&6

fi

fi

	if test "$enable_nntps" = "yes" && test "$have_libtls" = "no" && test "$have_openssl" = "no" || test "$enable_nntps" = "gnutls"; then

echo "$as_me:22891: checking for GnuTLS" >&5
echo $ECHO_N "checking for GnuTLS... $ECHO_C" >&6

if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "gnutls"; then
	test -n "$verbose" && echo "	found package gnutls" 1>&6

echo "${as_me:-configure}:22897: testing found package gnutls ..." 1>&5

	cf_pkgconfig_incs="`$PKG_CONFIG --cflags "gnutls" 2>/dev/null`"
	cf_pkgconfig_libs="`$PKG_CONFIG --libs   "gnutls" 2>/dev/null`"
	test -n "$verbose" && echo "	package gnutls CFLAGS: $cf_pkgconfig_incs" 1>&6

echo "${as_me:-configure}:22903: testing package gnutls CFLAGS: $cf_pkgconfig_incs ..." 1>&5

	test -n "$verbose" && echo "	package gnutls LIBS: $cf_pkgconfig_libs" 1>&6

echo "${as_me:-configure}:22907: testing package gnutls 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="$LIBS"
# reverse order
cf_add_0lib=
for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
# filter duplicates
for cf_add_1lib in $cf_add_0lib; 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_1lib $cf_add_libs"
done
LIBS="$cf_add_libs"

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

#include <gnutls/gnutls.h>
#include <gnutls/x509.h>

int
main (void)
{

#if GNUTLS_VERSION_NUMBER < 0x030700
#error "Please use GnuTLS >= 3.7.0"
#endif /* GNUTLS_VERSION_NUMBER < 0x030700 */

  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext"
if { (eval echo "$as_me:23043: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:23046: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:23049: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:23052: \$? = $ac_status" >&5
  (exit "$ac_status"); }; }; then
  have_gnutls=yes
else
  echo "$as_me: failed program was:" >&5
cat "conftest.$ac_ext" >&5

echo "$as_me:23059: result: \tGnuTLS too old (< 3.7.0)" >&5
echo "${ECHO_T}\tGnuTLS too old (< 3.7.0)" >&6

fi
rm -f "conftest.$ac_objext" "conftest.$ac_ext"
else
	cf_pkgconfig_incs=
	cf_pkgconfig_libs=

echo "$as_me:23068: checking for gnutls_certificate_allocate_credentials in -lgnutls" >&5
echo $ECHO_N "checking for gnutls_certificate_allocate_credentials in -lgnutls... $ECHO_C" >&6
if test "${ac_cv_lib_gnutls_gnutls_certificate_allocate_credentials+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lgnutls  $LIBS"
cat >"conftest.$ac_ext" <<_ACEOF
#line 23076 "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 gnutls_certificate_allocate_credentials (void);
int
main (void)
{
gnutls_certificate_allocate_credentials ();
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext" "conftest$ac_exeext"
if { (eval echo "$as_me:23095: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:23098: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:23101: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:23104: \$? = $ac_status" >&5
  (exit "$ac_status"); }; }; then
  ac_cv_lib_gnutls_gnutls_certificate_allocate_credentials=yes
else
  echo "$as_me: failed program was:" >&5
cat "conftest.$ac_ext" >&5
ac_cv_lib_gnutls_gnutls_certificate_allocate_credentials=no
fi
rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:23115: result: $ac_cv_lib_gnutls_gnutls_certificate_allocate_credentials" >&5
echo "${ECHO_T}$ac_cv_lib_gnutls_gnutls_certificate_allocate_credentials" >&6
if test "$ac_cv_lib_gnutls_gnutls_certificate_allocate_credentials" = yes; then

for ac_header in gnutls/gnutls.h gnutls/x509.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
echo "$as_me:23122: 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 23128 "configure"
#include "confdefs.h"
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:23132: \"$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:23138: \$? = $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:23157: 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

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

#include <gnutls/gnutls.h>
#include <gnutls/x509.h>

int
main (void)
{

#if GNUTLS_VERSION_NUMBER < 0x030700
#error "Please use GnuTLS >= 3.7.0"
#endif /* GNUTLS_VERSION_NUMBER < 0x030700 */

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

LIBS="$LIBS -lgnutls"
have_gnutls=yes

else
  echo "$as_me: failed program was:" >&5
cat "conftest.$ac_ext" >&5
have_gnutls=no
echo "$as_me:23203: result: \tGnuTLS too old (< 3.7.0)" >&5
echo "${ECHO_T}\tGnuTLS too old (< 3.7.0)" >&6

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

else
  have_gnutls=no
fi
done

else

have_gnutls=no=no
echo "$as_me:23217: result: $have_gnutls" >&5
echo "${ECHO_T}$have_gnutls" >&6

fi

fi

fi

	if test "$have_libtls" != "yes" && test "$have_openssl" != "yes" && test "$have_gnutls" != "yes"; then
  { { echo "$as_me:23227: error: You requested NNTPS support but no usable TLS implementation was found" >&5
echo "$as_me: error: You requested NNTPS support but no usable TLS implementation was found" >&2;}
   { (exit 1); exit 1; }; }
else

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

		if test "$have_libtls" = "yes"; then

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

else
  if test "$have_openssl" = "yes"; then

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

else

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

fi

fi

fi

fi

### as the above is already complicated enough, the following will be dealt
### with separately
if test "$have_libtls" = "yes"; then

	echo "$as_me:23267: checking for libcrypto" >&5
echo $ECHO_N "checking for libcrypto... $ECHO_C" >&6

if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "crypto"; then
	test -n "$verbose" && echo "	found package crypto" 1>&6

echo "${as_me:-configure}:23273: testing found package crypto ..." 1>&5

	cf_pkgconfig_incs="`$PKG_CONFIG --cflags "crypto" 2>/dev/null`"
	cf_pkgconfig_libs="`$PKG_CONFIG --libs   "crypto" 2>/dev/null`"
	test -n "$verbose" && echo "	package crypto CFLAGS: $cf_pkgconfig_incs" 1>&6

echo "${as_me:-configure}:23279: testing package crypto CFLAGS: $cf_pkgconfig_incs ..." 1>&5

	test -n "$verbose" && echo "	package crypto LIBS: $cf_pkgconfig_libs" 1>&6

echo "${as_me:-configure}:23283: testing package crypto 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="$LIBS"
# reverse order
cf_add_0lib=
for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
# filter duplicates
for cf_add_1lib in $cf_add_0lib; 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_1lib $cf_add_libs"
done
LIBS="$cf_add_libs"

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

#include <openssl/ssl.h>

int
main (void)
{

BIO_free(NULL);

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

			have_libcrypto=yes

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

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

			have_libcrypto=no
			echo "$as_me:23439: result: $have_libcrypto" >&5
echo "${ECHO_T}$have_libcrypto" >&6

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

else
	cf_pkgconfig_incs=
	cf_pkgconfig_libs=

		echo "$as_me:23449: checking for BIO_free in -lcrypto" >&5
echo $ECHO_N "checking for BIO_free in -lcrypto... $ECHO_C" >&6
if test "${ac_cv_lib_crypto_BIO_free+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lcrypto  $LIBS"
cat >"conftest.$ac_ext" <<_ACEOF
#line 23457 "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 BIO_free (void);
int
main (void)
{
BIO_free ();
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext" "conftest$ac_exeext"
if { (eval echo "$as_me:23476: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:23479: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:23482: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:23485: \$? = $ac_status" >&5
  (exit "$ac_status"); }; }; then
  ac_cv_lib_crypto_BIO_free=yes
else
  echo "$as_me: failed program was:" >&5
cat "conftest.$ac_ext" >&5
ac_cv_lib_crypto_BIO_free=no
fi
rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:23496: result: $ac_cv_lib_crypto_BIO_free" >&5
echo "${ECHO_T}$ac_cv_lib_crypto_BIO_free" >&6
if test "$ac_cv_lib_crypto_BIO_free" = yes; then

for ac_header in openssl/ssl.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
echo "$as_me:23503: 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 23509 "configure"
#include "confdefs.h"
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:23513: \"$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:23519: \$? = $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:23538: 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

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

#include <openssl/ssl.h>

int
main (void)
{

BIO_free(NULL);

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

				LIBS="$LIBS -lcrypto"
				have_libcrypto=yes

for ac_header in openssl/asn1.h openssl/bio.h openssl/pem.h openssl/x509.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
echo "$as_me:23580: 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 23586 "configure"
#include "confdefs.h"
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:23590: \"$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:23596: \$? = $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:23615: 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 HAVE_LIB_CRYPTO 1
EOF

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

				have_libcrypto=no
				echo "$as_me:23634: result: $have_libcrypto" >&5
echo "${ECHO_T}$have_libcrypto" >&6

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

else
  have_libcrypto=no
fi
done

else

		have_libcrypto=no
		echo "$as_me:23648: result: $have_libcrypto" >&5
echo "${ECHO_T}$have_libcrypto" >&6

fi

fi

fi

fi

### checks for operator characteristics (should be the last option)
echo "$as_me:23660: 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:23668: 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:23677: result: no" >&5
echo "${ECHO_T}no" >&6
	;;
	esac
else
  echo "$as_me:23682: result: no" >&5
echo "${ECHO_T}no" >&6
fi;

### checks for compiler characteristics
echo "$as_me:23687: checking for fgrep" >&5
echo $ECHO_N "checking for fgrep... $ECHO_C" >&6
if test "${ac_cv_path_FGREP+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
   then ac_cv_path_FGREP="$GREP -F"
   else
     for ac_prog in gfgrep fgrep
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:23699: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_path_FGREP+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $FGREP in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_FGREP="$FGREP" # 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_FGREP="$ac_dir/$ac_word"
   echo "$as_me:23716: found $ac_dir/$ac_word" >&5
   break
fi
done

  ;;
esac
fi
FGREP=$ac_cv_path_FGREP

if test -n "$FGREP"; then
  echo "$as_me:23727: result: $FGREP" >&5
echo "${ECHO_T}$FGREP" >&6
else
  echo "$as_me:23730: result: no" >&5
echo "${ECHO_T}no" >&6
fi

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

     test "x$ac_cv_path_FGREP" = "x:" && { { echo "$as_me:23738: error: cannot find workable fgrep" >&5
echo "$as_me: error: cannot find workable fgrep" >&2;}
   { (exit 1); exit 1; }; }
   fi
fi
echo "$as_me:23743: result: $ac_cv_path_FGREP" >&5
echo "${ECHO_T}$ac_cv_path_FGREP" >&6
 FGREP="$ac_cv_path_FGREP"

echo "$as_me:23747: 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-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}:23777: testing given option \"$cf_option\",no match \"$cf_result\" ..." 1>&5

			;;
		esac
	done
	rm -f cf_makeflags.tmp

fi
echo "$as_me:23785: 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:23795: 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 23801 "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; (void)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}; (void)zero;
  /* 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;
	(void)s;
  }
  { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
    int x[] = {25, 17};
    const int *foo = &x[0];
    ++foo;
	(void)foo;
  }
  { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
    typedef const int *iptr;
    iptr p = 0;
    ++p;
	(void)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;
	(void)foo;
  }
#endif

  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext"
if { (eval echo "$as_me:23863: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:23866: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:23869: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:23872: \$? = $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:23882: 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:23892: 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 23900 "configure"
#include "confdefs.h"
#ifndef __cplusplus
static $ac_kw int static_foo (void) {return 0; }
$ac_kw int foo (void) {return 0; }
#endif

_ACEOF
rm -f "conftest.$ac_objext"
if { (eval echo "$as_me:23909: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:23912: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:23915: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:23918: \$? = $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:23929: 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:23944: 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 23951 "configure"
#include "confdefs.h"

#define string(n) #n
int
main (void)
{
const char *s = string(token); (void)s
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext"
if { (eval echo "$as_me:23964: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:23967: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:23970: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:23973: \$? = $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:23985: 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:23992: 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 23999 "configure"
#include "confdefs.h"

#define concat(a,b) a ## b
int
main (void)
{
static char *firstlast = "y";
	 const char *s = concat(first,last);
	 (void)s
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext"
if { (eval echo "$as_me:24014: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:24017: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:24020: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:24023: \$? = $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:24035: 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:24042: 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 24049 "configure"
#include "confdefs.h"

	extern void (*sigdisp(int sig, void (*func)(int sig)))(int sig);

int
main (void)
{

  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext"
if { (eval echo "$as_me:24063: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:24066: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:24069: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:24072: \$? = $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:24084: 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:24092: 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 24098 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <float.h>

_ACEOF
if { (eval echo "$as_me:24106: \"$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:24112: \$? = $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 24134 "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 24152 "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 24173 "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:24199: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:24202: \$? = $ac_status" >&5
  (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
  { (eval echo "$as_me:24204: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:24207: \$? = $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:24220: 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:24233: 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 24239 "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:24254: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:24257: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:24260: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:24263: \$? = $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:24273: 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:24286: 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 24294 "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 (void);
int
main (void)
{
opendir ();
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext" "conftest$ac_exeext"
if { (eval echo "$as_me:24313: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:24316: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:24319: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:24322: \$? = $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:24333: 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:24340: 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 24348 "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 (void);
int
main (void)
{
opendir ();
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext" "conftest$ac_exeext"
if { (eval echo "$as_me:24367: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:24370: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:24373: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:24376: \$? = $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:24387: 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:24395: 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 24401 "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:24417: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:24420: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:24423: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:24426: \$? = $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:24436: 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:24446: 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 24452 "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:24474: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:24477: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:24480: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:24483: \$? = $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:24493: 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 \
	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:24561: checking for $cf_hdr" >&5
echo $ECHO_N "checking for $cf_hdr... $ECHO_C" >&6
	cat >"conftest.$ac_ext" <<_ACEOF
#line 24564 "configure"
#include "confdefs.h"

#include <sys/types.h>
#include <$cf_hdr>

_ACEOF
if { (eval echo "$as_me:24571: \"$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:24577: \$? = $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:24595: 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:24619: 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 24625 "configure"
#include "confdefs.h"
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:24629: \"$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:24635: \$? = $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:24654: 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:24671: 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 24674 "configure"
#include "confdefs.h"
#include <termios.h>
int
main (void)
{
struct termios foo; int x = (int)(foo.c_iflag = 1); (void)x
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext"
if { (eval echo "$as_me:24686: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:24689: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:24692: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:24695: \$? = $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 24703 "configure"
#include "confdefs.h"

#define _POSIX_SOURCE
#include <termios.h>
int
main (void)
{
struct termios foo; int x = (int)(foo.c_iflag = 2); (void)x
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext"
if { (eval echo "$as_me:24717: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:24720: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (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
  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:24742: result: $termios_bad" >&5
echo "${ECHO_T}$termios_bad" >&6
	fi
fi

echo "$as_me:24747: 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 24768 "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 is 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 = 2;
	int x = win.ts_cols = 1;
	(void)y;
	(void)x;
#else
#ifdef TIOCGWINSZ
	struct winsize win;	/* everything else */
	int y = win.ws_row = 2;
	int x = win.ws_col = 1;
	(void)y;
	(void)x;
#else
	no TIOCGSIZE or TIOCGWINSZ
#endif /* TIOCGWINSZ */
#endif /* TIOCGSIZE */

  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext"
if { (eval echo "$as_me:24818: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:24821: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:24824: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:24827: \$? = $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:24846: 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:24864: 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 24873 "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; (void)foo
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext"
if { (eval echo "$as_me:24906: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:24909: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:24912: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:24915: \$? = $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:24929: 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:24936: 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 24943 "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:24960: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:24963: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:24966: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:24969: \$? = $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:24979: 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:24991: 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 24998 "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:25015: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:25018: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:25021: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:25024: \$? = $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:25034: 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:25046: 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 25053 "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:25070: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:25073: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:25076: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:25079: \$? = $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:25089: 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:25107: 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 25114 "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:25131: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:25134: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:25137: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:25140: \$? = $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:25150: 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:25155: 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 25162 "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:25179: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:25182: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:25185: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:25188: \$? = $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:25198: 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.
echo "$as_me:25210: 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 25216 "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:25231: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:25234: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:25237: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:25240: \$? = $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:25250: 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:25262: 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 25268 "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:25283: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:25286: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:25289: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:25292: \$? = $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:25302: 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:25314: 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 25320 "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:25335: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:25338: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:25341: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:25344: \$? = $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:25354: 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:25366: 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 25372 "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:25387: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:25390: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:25393: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:25396: \$? = $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:25406: 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:25418: 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 25424 "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:25439: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:25442: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:25445: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:25448: \$? = $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:25458: 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:25470: 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 25476 "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:25491: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:25494: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:25497: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:25500: \$? = $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:25510: 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:25522: 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 25528 "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:25543: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:25546: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:25549: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:25552: \$? = $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:25562: 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 25575 "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 25586 "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:25596: 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 25602 "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:25617: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:25620: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:25623: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:25626: \$? = $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:25636: 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:25654: 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 25660 "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:25674: 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:25688: checking for quad_t" >&5
echo $ECHO_N "checking for quad_t... $ECHO_C" >&6
cat >"conftest.$ac_ext" <<_ACEOF
#line 25691 "configure"
#include "confdefs.h"

$ac_includes_default

int
main (void)
{
quad_t x; x = 0; (void)x
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext"
if { (eval echo "$as_me:25705: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:25708: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:25711: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:25714: \$? = $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:25723: 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:25733: checking for long long" >&5
echo $ECHO_N "checking for long long... $ECHO_C" >&6
cat >"conftest.$ac_ext" <<_ACEOF
#line 25736 "configure"
#include "confdefs.h"

$ac_includes_default

int
main (void)
{
long long x; x = 0; (void)x
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext"
if { (eval echo "$as_me:25750: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:25753: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:25756: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:25759: \$? = $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:25768: 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:25778: checking for int_least64_t" >&5
echo $ECHO_N "checking for int_least64_t... $ECHO_C" >&6
cat >"conftest.$ac_ext" <<_ACEOF
#line 25781 "configure"
#include "confdefs.h"

$ac_includes_default

int
main (void)
{
int_least64_t x; x = 0; (void)x
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext"
if { (eval echo "$as_me:25795: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:25798: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:25801: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:25804: \$? = $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:25813: 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:25821: checking for INT64_C" >&5
echo $ECHO_N "checking for INT64_C... $ECHO_C" >&6
	cat >"conftest.$ac_ext" <<_ACEOF
#line 25824 "configure"
#include "confdefs.h"

$ac_includes_default

int
main (void)
{
int_least64_t x; x = INT64_C(0); (void)x
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext"
if { (eval echo "$as_me:25838: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:25841: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:25844: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:25847: \$? = $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:25856: 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:25867: checking for nl_item" >&5
echo $ECHO_N "checking for nl_item... $ECHO_C" >&6
cat >"conftest.$ac_ext" <<_ACEOF
#line 25870 "configure"
#include "confdefs.h"

$ac_includes_default
#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; (void)x
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext"
if { (eval echo "$as_me:25891: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:25894: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:25897: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:25900: \$? = $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:25909: 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:25922: 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 25930 "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 (void);
int
main (void)
{
UUInitialize ();
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext" "conftest$ac_exeext"
if { (eval echo "$as_me:25949: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:25952: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:25955: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:25958: \$? = $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:25969: 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:25972: 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 25978 "configure"
#include "confdefs.h"
#include <uudeview.h>
_ACEOF
if { (eval echo "$as_me:25982: \"$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:25988: \$? = $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:26007: 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()
# get $CFLAGS/$LDFLAGS from pkg-config icu-uc if possible
cf_try_icuuc="no"
cf_try_icuuc46="no"
echo "$as_me:26037: 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 26043 "configure"
#include "confdefs.h"
#include <unicode/unorm.h>
_ACEOF
if { (eval echo "$as_me:26047: \"$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:26053: \$? = $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:26072: 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:26076: 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 26082 "configure"
#include "confdefs.h"
#include <unicode/ustring.h>
_ACEOF
if { (eval echo "$as_me:26086: \"$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:26092: \$? = $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:26111: 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:26123: 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 26129 "configure"
#include "confdefs.h"
$ac_includes_default
			#include <unicode/unorm.h>
int
main (void)
{

			int32_t needed;
			const UChar *ustr = NULL;
 			UErrorCode status;
			needed = unorm_normalize(ustr, -1, UNORM_DEFAULT, 0, NULL, 0, &status);
			(void)needed
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext" "conftest$ac_exeext"
if { (eval echo "$as_me:26147: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:26150: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:26153: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:26156: \$? = $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:26171: result: $cf_try_icuuc" >&5
echo "${ECHO_T}$cf_try_icuuc" >&6
		cf_save_LIBS="$LIBS"
		echo "$as_me:26174: 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 26180 "configure"
#include "confdefs.h"
#include <unicode/uidna.h>
_ACEOF
if { (eval echo "$as_me:26184: \"$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:26190: \$? = $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:26209: 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:26219: 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 26222 "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:26240: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:26243: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:26246: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:26249: \$? = $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:26264: result: $cf_try_icuuc46" >&5
echo "${ECHO_T}$cf_try_icuuc46" >&6
		echo "$as_me:26266: 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 26272 "configure"
#include "confdefs.h"
#include <unicode/ubidi.h>
_ACEOF
if { (eval echo "$as_me:26276: \"$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:26282: \$? = $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:26301: 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:26316: 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 26322 "configure"
#include "confdefs.h"
#include <unicode/unorm2.h>
_ACEOF
if { (eval echo "$as_me:26326: \"$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:26332: \$? = $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:26351: 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:26363: 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 26369 "configure"
#include "confdefs.h"
#include <unitypes.h>
_ACEOF
if { (eval echo "$as_me:26373: \"$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:26379: \$? = $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:26398: 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:26402: 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 26408 "configure"
#include "confdefs.h"
#include <uninorm.h>
_ACEOF
if { (eval echo "$as_me:26412: \"$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:26418: \$? = $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:26437: 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:26449: 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 26455 "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:26470: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:26473: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:26476: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:26479: \$? = $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:26494: 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
#       get $CFLAGS/$LDFLAGS from pkg-config libidn[2] if possible
if test $cf_try_icuuc = no ; then
	echo "$as_me:26507: 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 26515 "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 (void);
int
main (void)
{
stringprep_check_version ();
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext" "conftest$ac_exeext"
if { (eval echo "$as_me:26534: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:26537: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:26540: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:26543: \$? = $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:26554: 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:26557: 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 26563 "configure"
#include "confdefs.h"
#include <stringprep.h>
_ACEOF
if { (eval echo "$as_me:26567: \"$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:26573: \$? = $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:26592: 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:26600: 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 26606 "configure"
#include "confdefs.h"
#include <idna.h>
_ACEOF
if { (eval echo "$as_me:26610: \"$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:26616: \$? = $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:26635: 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:26643: 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 26651 "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 (void);
int
main (void)
{
idna_to_unicode_lzlz ();
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext" "conftest$ac_exeext"
if { (eval echo "$as_me:26670: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:26673: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:26676: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:26679: \$? = $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:26690: 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:26698: 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 26701 "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:26713: result: yes" >&5
echo "${ECHO_T}yes" >&6
else
  echo "$as_me:26716: result: no" >&5
echo "${ECHO_T}no" >&6

fi
rm -rf conftest*

fi

				echo "$as_me:26724: 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 26732 "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 (void);
int
main (void)
{
idna_strerror ();
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext" "conftest$ac_exeext"
if { (eval echo "$as_me:26751: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:26754: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:26757: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:26760: \$? = $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:26771: 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:26796: 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 26804 "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 (void);
int
main (void)
{
idn_decodename ();
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext" "conftest$ac_exeext"
if { (eval echo "$as_me:26823: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:26826: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:26829: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:26832: \$? = $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:26843: 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:26847: 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 26853 "configure"
#include "confdefs.h"
#include <idn/api.h>
_ACEOF
if { (eval echo "$as_me:26857: \"$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:26863: \$? = $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:26882: 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:26886: 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 26891 "configure"
#include "confdefs.h"
#include <idn/api.h>
			#include <string.h>
int
main (void)
{

			idn_result_t rs;
			char in[255], out[255];
			const char *i = in;
			char *o = out;
			strcpy(in, "xn--brenfe-fta9a2q.de");
			rs = idn_decodename(IDN_DECODE_LOOKUP, i, o, 254);
			idn_result_tostring(rs);
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext" "conftest$ac_exeext"
if { (eval echo "$as_me:26911: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:26914: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:26917: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:26920: \$? = $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:26935: 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:26942: 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 26962 "configure"
#include "confdefs.h"
extern char *tgoto(const char*,int,int);
int
main (void)
{
char *x=tgoto("",0,0); (void)x;
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext" "conftest$ac_exeext"
if { (eval echo "$as_me:26974: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:26977: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:26980: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:26983: \$? = $ac_status" >&5
  (exit "$ac_status"); }; }; then
  cat >"conftest.$ac_ext" <<_ACEOF
#line 26986 "configure"
#include "confdefs.h"
extern char *tigetstr(const char *);
int
main (void)
{
char *x=tigetstr(""); (void)x;
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext" "conftest$ac_exeext"
if { (eval echo "$as_me:26998: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:27001: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:27004: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:27007: \$? = $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}:27018: 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:27033: 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 27036 "configure"
#include "confdefs.h"
extern char *$cf_func(const char *);
int
main (void)
{
char *x = $cf_func(""); (void)x
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext" "conftest$ac_exeext"
if { (eval echo "$as_me:27048: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:27051: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:27054: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:27057: \$? = $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:27066: 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:27083: 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 27091 "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 (void);
int
main (void)
{
initscr ();
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext" "conftest$ac_exeext"
if { (eval echo "$as_me:27110: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:27113: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:27116: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:27119: \$? = $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:27130: 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="$LIBS"
# reverse order
cf_add_0lib=
for cf_add_1lib in -lcurses; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
# filter duplicates
for cf_add_1lib in $cf_add_0lib; 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_1lib $cf_add_libs"
done
LIBS="$cf_add_libs"

fi

	echo "$as_me:27152: 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 27160 "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 (void);
int
main (void)
{
tgoto ();
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext" "conftest$ac_exeext"
if { (eval echo "$as_me:27179: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:27182: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:27185: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:27188: \$? = $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:27199: 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="$LIBS"
# reverse order
cf_add_0lib=
for cf_add_1lib in -ltermcap; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
# filter duplicates
for cf_add_1lib in $cf_add_0lib; 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_1lib $cf_add_libs"
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:27226: 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:27234: 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 27239 "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:27257: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:27260: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:27263: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:27266: \$? = $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:27275: 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:27283: 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 27304 "configure"
#include "confdefs.h"

#include <${cf_cv_ncurses_header:-curses.h}>
#include <${cf_header}>
int
main (void)
{
WINDOW *x; (void)x
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext"
if { (eval echo "$as_me:27318: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:27321: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:27324: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:27327: \$? = $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 27346 "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; (void)x
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext"
if { (eval echo "$as_me:27364: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:27367: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:27370: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:27373: \$? = $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:27388: 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:27415: 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"
	cf_tgoto_decl="
	extern char *tgoto(char*,int,int);"
	test -n "${cf_c_opts}${cf_t_opts}" && cf_tgoto_decl=

    cat >"conftest.$ac_ext" <<_ACEOF
#line 27437 "configure"
#include "confdefs.h"
/* $cf_c_opts $cf_t_opts */
$CHECK_DECL_HDRS $cf_tgoto_decl
int
main (void)
{
static char fmt[] = ""; char *x = tgoto(fmt); (void)x
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext" "conftest$ac_exeext"
if { (eval echo "$as_me:27450: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:27453: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:27456: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:27459: \$? = $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 27471 "configure"
#include "confdefs.h"

$CHECK_DECL_HDRS $cf_tgoto_decl
int
main (void)
{
static char fmt[] = ""; char *x = tgoto(fmt,0,0); (void)x
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext" "conftest$ac_exeext"
if { (eval echo "$as_me:27484: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:27487: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:27490: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:27493: \$? = $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:27530: 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:27568: 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}:27584: testing loop variables P:$P, Q:$Q, R:$R, S:$S ..." 1>&5

	cat >"conftest.$ac_ext" <<_ACEOF
#line 27587 "configure"
#include "confdefs.h"
$CHECK_DECL_HDRS
	extern $Q OutChar($R);
	extern $P tputs ($S char *string, int nlines, $Q (*_f)($R));
	static char fmt[] = "";
int
main (void)
{
tputs(fmt, 1, OutChar)
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext"
if { (eval echo "$as_me:27602: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:27605: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:27608: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:27611: \$? = $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:27630: 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 27669 "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:27681: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:27684: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:27687: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:27690: \$? = $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:27708: 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 27715 "configure"
#include "confdefs.h"

$ac_includes_default
#include <errno.h>
int
main (void)
{
int x = (int) errno; (void)x
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext"
if { (eval echo "$as_me:27729: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:27732: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:27735: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:27738: \$? = $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:27749: 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:27764: 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 27771 "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:27786: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:27789: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:27792: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:27795: \$? = $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:27806: 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:27822: 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 27828 "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:27859: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:27862: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:27865: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:27868: \$? = $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:27878: 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:27890: 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 27897 "configure"
#include "confdefs.h"

$ac_includes_default
#include <errno.h>
int
main (void)
{
int x = (int) sys_nerr; (void)x
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext"
if { (eval echo "$as_me:27911: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:27914: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:27917: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:27920: \$? = $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:27931: 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:27946: 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 27953 "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:27968: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:27971: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:27974: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:27977: \$? = $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:27988: 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:28001: 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 28008 "configure"
#include "confdefs.h"

$ac_includes_default
#include <errno.h>
int
main (void)
{
int x = (int) sys_errlist; (void)x
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext"
if { (eval echo "$as_me:28022: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:28025: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:28028: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:28031: \$? = $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:28042: 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:28057: 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 28064 "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:28079: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:28082: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:28085: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:28088: \$? = $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:28099: 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 \
	execlp \
	explicit_bzero \
	explicit_memset \
	fchmod \
	fcntl \
	fdopen \
	fork \
	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:28185: 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 28191 "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:28222: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:28225: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:28228: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:28231: \$? = $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:28241: 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:28251: 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 28257 "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:28288: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:28291: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:28294: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:28297: \$? = $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:28307: 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:28317: 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 28325 "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 (void);
int
main (void)
{
flock ();
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext" "conftest$ac_exeext"
if { (eval echo "$as_me:28344: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:28347: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:28350: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:28353: \$? = $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:28364: 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:28377: 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 28383 "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:28414: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:28417: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:28420: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:28423: \$? = $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:28433: 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:28443: 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 28451 "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 (void);
int
main (void)
{
clock_gettime ();
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext" "conftest$ac_exeext"
if { (eval echo "$as_me:28470: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:28473: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:28476: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:28479: \$? = $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:28490: 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:28503: checking for memset_s" >&5
echo $ECHO_N "checking for memset_s... $ECHO_C" >&6
if test "$cross_compiling" = yes; then
  echo "$as_me:28506: result: unknown" >&5
echo "${ECHO_T}unknown" >&6

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

/* Request C11 Annex K */
#define __STDC_WANT_LIB_EXT1__ 1
$ac_includes_default
#include <string.h>
int main(void)
{
	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:28526: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:28529: \$? = $ac_status" >&5
  (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
  { (eval echo "$as_me:28531: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:28534: \$? = $ac_status" >&5
  (exit "$ac_status"); }; }; then

		echo "$as_me:28537: 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:28548: 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:28554: 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 28560 "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:28619: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:28622: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:28625: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:28628: \$? = $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 28637 "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:28686: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:28689: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:28692: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:28695: \$? = $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:28710: 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:28728: 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 28731 "configure"
#include "confdefs.h"

$ac_includes_default
#if HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
int
main (void)
{
static struct timeval tv;
static struct timezone tz;
gettimeofday(&tv, &tz);
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext"
if { (eval echo "$as_me:28749: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:28752: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:28755: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:28758: \$? = $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:28767: 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:28777: 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 28783 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <signal.h>
#ifdef signal
# undef signal
#endif
extern void (*signal (int, void (*)(int)))(int);

int
main (void)
{
int i; (void) i
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext"
if { (eval echo "$as_me:28801: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:28804: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:28807: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:28810: \$? = $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:28820: 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:28827: 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 28837 "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:28850: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:28853: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:28856: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:28859: \$? = $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:28871: 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:28880: 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 28887 "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:28901: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:28904: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:28907: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:28910: \$? = $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:28921: 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:28929: 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 28936 "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:28959: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:28962: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:28965: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:28968: \$? = $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:28978: 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:28988: 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 28998 "configure"
#include "confdefs.h"

$ac_includes_default
int main(void)
{
	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:29010: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:29013: \$? = $ac_status" >&5
  (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
  { (eval echo "$as_me:29015: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:29018: \$? = $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:29031: 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:29037: 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 29043 "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:29074: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:29077: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:29080: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:29083: \$? = $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:29093: 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:29099: 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 29105 "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:29136: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:29139: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:29142: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:29145: \$? = $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:29155: 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:29159: 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 29169 "configure"
#include "confdefs.h"

$ac_includes_default

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:29185: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:29188: \$? = $ac_status" >&5
  (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
  { (eval echo "$as_me:29190: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:29193: \$? = $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:29206: 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:29229: 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 29232 "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:29243: result: yes" >&5
echo "${ECHO_T}yes" >&6
else
  echo "$as_me:29246: result: no" >&5
echo "${ECHO_T}no" >&6

fi
rm -rf conftest*

echo "$as_me:29252: 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 29261 "configure"
#include "confdefs.h"
$ac_includes_default
#include <$ac_header_dirent>
#ifndef __cplusplus
int closedir (DIR *);
#endif

int
main (void)
{
$ac_main_return (closedir (opendir (".")) != 0);
  ;
  return 0;
}
_ACEOF
rm -f "conftest$ac_exeext"
if { (eval echo "$as_me:29278: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:29281: \$? = $ac_status" >&5
  (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
  { (eval echo "$as_me:29283: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:29286: \$? = $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:29298: 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:29310: 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:29316: 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 29321 "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:29338: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:29341: \$? = $ac_status" >&5
  (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
  { (eval echo "$as_me:29343: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:29346: \$? = $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:29359: 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:29385: 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 29391 "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:29422: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:29425: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:29428: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:29431: \$? = $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:29441: 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:29451: 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 29458 "configure"
#include "confdefs.h"

#include <signal.h>
int
main (void)
{
sigaction_t x; (void)x
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext"
if { (eval echo "$as_me:29471: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:29474: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:29477: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:29480: \$? = $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:29491: 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:29498: 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 29505 "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:29532: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:29535: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:29538: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:29541: \$? = $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:29553: 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:29571: 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 29578 "configure"
#include "confdefs.h"

#include <pwd.h>

int
main (void)
{

	static struct passwd foo;
	char *bar = foo.pw_gecos;
	(void)bar
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext"
if { (eval echo "$as_me:29595: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:29598: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:29601: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:29604: \$? = $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:29614: 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:29621: 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 29628 "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)
{

	static struct tm foo;
	long bar = foo.tm_gmtoff; (void) bar
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext"
if { (eval echo "$as_me:29653: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:29656: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:29659: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:29662: \$? = $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:29673: 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:29680: 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:29719: 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:29732: 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 29738 "configure"
#include "confdefs.h"
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:29742: \"$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:29748: \$? = $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:29767: 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:29788: 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 29794 "configure"
#include "confdefs.h"
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:29798: \"$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:29804: \$? = $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:29823: 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:29836: 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 29842 "configure"
#include "confdefs.h"
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:29846: \"$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:29852: \$? = $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:29871: 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:29893: 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 29900 "configure"
#include "confdefs.h"
$cf_wait_headers
int
main (void)
{
static int x;
	 int y = WEXITSTATUS(x);
	 int z = WTERMSIG(x);
	 wait(&x);
	 (void)x;
	 (void)y;
	 (void)z;

  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext" "conftest$ac_exeext"
if { (eval echo "$as_me:29919: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:29922: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:29925: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:29928: \$? = $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 29938 "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);
	 (void)x;
#ifdef WEXITSTATUS
	 (void)y;
#endif
#ifdef WTERMSIG
	 (void)z;
#endif

  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext" "conftest$ac_exeext"
if { (eval echo "$as_me:29965: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:29968: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:29971: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:29974: \$? = $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:29989: 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:29996: 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 30006 "configure"
#include "confdefs.h"

$ac_includes_default

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

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

int main(void)
{
	/* 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:30041: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:30044: \$? = $ac_status" >&5
  (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
  { (eval echo "$as_me:30046: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:30049: \$? = $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 30060 "configure"
#include "confdefs.h"

$ac_includes_default

int main(void) { ${cf_cv_main_return:-return}(system("exit 23") != (23 << 8)); }
_ACEOF
rm -f "conftest$ac_exeext"
if { (eval echo "$as_me:30068: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:30071: \$? = $ac_status" >&5
  (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
  { (eval echo "$as_me:30073: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:30076: \$? = $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:30093: 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:30116: 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 30123 "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:30142: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:30145: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:30148: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:30151: \$? = $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:30163: 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:30166: 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:30176: 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 30183 "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:30203: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:30206: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:30209: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:30212: \$? = $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:30224: 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:30245: 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:30264: 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 30277 "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(void)
{
	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:30305: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:30308: \$? = $ac_status" >&5
  (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
  { (eval echo "$as_me:30310: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:30313: \$? = $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:30328: 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:30337: 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 30344 "configure"
#include "confdefs.h"

#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
	extern int compare(const void *, const void *);

int
main (void)
{
static char foo[] = "string";
	 qsort(foo, sizeof(foo)/sizeof(foo[0]), sizeof(foo), compare)
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext"
if { (eval echo "$as_me:30362: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:30365: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:30368: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:30371: \$? = $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:30383: 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:30399: 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 30409 "configure"
#include "confdefs.h"

$ac_includes_default
#include <signal.h>
#ifdef HAVE_SYS_WAIT_H
#include <sys/wait.h>
#endif
int found(void)
{
	struct stat sb;
	return ((stat("core", &sb) == 0			/* UNIX */
	   ||    stat("conftest.core", &sb) == 0	/* FreeBSD */
		)
		&& ((sb.st_mode & S_IFMT) == S_IFREG));
}
int main(void)
{
#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:30453: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:30456: \$? = $ac_status" >&5
  (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
  { (eval echo "$as_me:30458: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:30461: \$? = $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:30474: 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"
if test "$PCREDIR_MAKE" != "#" ; then
	CHECK_DECL_FLAG=$CHECK_DECL_FLAG" -I$srcdir/pcre"
fi
if test "$CANDIR_MAKE" != "#" ; then
	CHECK_DECL_FLAG=$CHECK_DECL_FLAG" -I$srcdir/libcanlock/include"
fi
CHECK_DECL_HDRS='
#undef __CPROTO__
#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:30512: 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}:30518: testing for missing "${ac_func}" external ..." 1>&5

cf_save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $CHECK_DECL_FLAG"
cat >"conftest.$ac_ext" <<_ACEOF
#line 30523 "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}(void);

int
main (void)
{

  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext" "conftest$ac_exeext"
if { (eval echo "$as_me:30541: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:30544: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:30547: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:30550: \$? = $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 30558 "configure"
#include "confdefs.h"

#define DECL_${cf_1_up}
$CHECK_DECL_HDRS

int
main (void)
{
long x = 0; (void)x
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext"
if { (eval echo "$as_me:30573: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:30576: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:30579: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:30582: \$? = $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:30606: 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:30627: 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}:30633: testing for missing "${ac_func}" external ..." 1>&5

cf_save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $CHECK_DECL_FLAG"
cat >"conftest.$ac_ext" <<_ACEOF
#line 30638 "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}(void);

int
main (void)
{

  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext" "conftest$ac_exeext"
if { (eval echo "$as_me:30656: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:30659: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:30662: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:30665: \$? = $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 30673 "configure"
#include "confdefs.h"

#define DECL_${cf_1_up}
$CHECK_DECL_HDRS

int
main (void)
{
long x = 0; (void)x
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext"
if { (eval echo "$as_me:30688: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:30691: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:30694: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:30697: \$? = $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:30721: 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:30740: 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}:30746: testing for missing "${ac_func}" external ..." 1>&5

cf_save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $CHECK_DECL_FLAG"
cat >"conftest.$ac_ext" <<_ACEOF
#line 30751 "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}(void);

int
main (void)
{

  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext" "conftest$ac_exeext"
if { (eval echo "$as_me:30769: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:30772: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:30775: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:30778: \$? = $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 30786 "configure"
#include "confdefs.h"

#define DECL_${cf_1_up}
$CHECK_DECL_HDRS

int
main (void)
{
long x = 0; (void)x
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext"
if { (eval echo "$as_me:30801: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:30804: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:30807: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:30810: \$? = $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:30834: 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:30910: 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}:30916: testing for missing "${ac_func}" external ..." 1>&5

cf_save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $CHECK_DECL_FLAG"
cat >"conftest.$ac_ext" <<_ACEOF
#line 30921 "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}(void);

int
main (void)
{

  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext" "conftest$ac_exeext"
if { (eval echo "$as_me:30939: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:30942: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:30945: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:30948: \$? = $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 30956 "configure"
#include "confdefs.h"

#define DECL_${cf_1_up}
$CHECK_DECL_HDRS

int
main (void)
{
long x = 0; (void)x
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext"
if { (eval echo "$as_me:30971: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:30974: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:30977: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:30980: \$? = $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:31004: 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:31020: 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}:31026: testing for missing "${ac_func}" external ..." 1>&5

cf_save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $CHECK_DECL_FLAG"
cat >"conftest.$ac_ext" <<_ACEOF
#line 31031 "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}(void);

int
main (void)
{

  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext" "conftest$ac_exeext"
if { (eval echo "$as_me:31049: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:31052: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:31055: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:31058: \$? = $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 31066 "configure"
#include "confdefs.h"

#define DECL_${cf_1_up}
$CHECK_DECL_HDRS

int
main (void)
{
long x = 0; (void)x
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext"
if { (eval echo "$as_me:31081: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:31084: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:31087: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:31090: \$? = $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:31114: 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:31134: 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}:31140: testing for missing "${ac_func}" external ..." 1>&5

cf_save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $CHECK_DECL_FLAG"
cat >"conftest.$ac_ext" <<_ACEOF
#line 31145 "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}(void);

int
main (void)
{

  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext" "conftest$ac_exeext"
if { (eval echo "$as_me:31163: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:31166: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:31169: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:31172: \$? = $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 31180 "configure"
#include "confdefs.h"

#define DECL_${cf_1_up}
$CHECK_DECL_HDRS

int
main (void)
{
long x = 0; (void)x
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext"
if { (eval echo "$as_me:31195: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:31198: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:31201: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:31204: \$? = $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:31228: 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:31238: 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 31250 "configure"
#include "confdefs.h"

$CHECK_DECL_HDRS
int main(void)
{
	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:31276: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:31279: \$? = $ac_status" >&5
  (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
  { (eval echo "$as_me:31281: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:31284: \$? = $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:31299: 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:31330: 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:31345: found $ac_dir/$ac_word" >&5
break
done

fi
fi
RANLIB=$ac_cv_prog_RANLIB
if test -n "$RANLIB"; then
  echo "$as_me:31353: result: $RANLIB" >&5
echo "${ECHO_T}$RANLIB" >&6
else
  echo "$as_me:31356: 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:31365: 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:31380: 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:31389: result: $ac_ct_RANLIB" >&5
echo "${ECHO_T}$ac_ct_RANLIB" >&6
else
  echo "$as_me:31392: 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:31403: 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 31409 "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:31421: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:31424: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:31427: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:31430: \$? = $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:31440: 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:31450: 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 31456 "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:31488: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:31491: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:31494: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:31497: \$? = $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:31507: 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:31528: 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 31534 "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:31552: 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:31557: 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 31563 "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:31594: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:31597: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:31600: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:31603: \$? = $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:31613: 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:31627: 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 31636 "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:31659: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:31662: \$? = $ac_status" >&5
  (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
  { (eval echo "$as_me:31664: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:31667: \$? = $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:31679: 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:31691: 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 31697 "configure"
#include "confdefs.h"
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:31701: \"$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:31707: \$? = $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:31726: 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:31739: 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 31745 "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:31776: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:31779: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:31782: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:31785: \$? = $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:31795: 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:31805: 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 31814 "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:31941: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:31944: \$? = $ac_status" >&5
  (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
  { (eval echo "$as_me:31946: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:31949: \$? = $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:31961: 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:31972: 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 31978 "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:31998: 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:32011: 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:32028: 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 32034 "configure"
#include "confdefs.h"
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:32038: \"$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:32044: \$? = $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:32063: 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:32078: 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 32084 "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:32115: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:32118: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:32121: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:32124: \$? = $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:32134: 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 32185 "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:32197: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:32200: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:32203: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:32206: \$? = $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}:32223: 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 32269 "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:32281: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:32284: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:32287: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:32290: \$? = $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}:32307: 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:32325: 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}:32350: 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}:32379: testing adding $cf_add_libdir to library-path ..." 1>&5

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

	else
{ { echo "$as_me:32388: 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:32399: 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}:32410: testing Starting FIND_LINKAGE(iconv,) ..." 1>&5

cf_save_LIBS="$LIBS"

cat >"conftest.$ac_ext" <<_ACEOF
#line 32415 "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:32434: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:32437: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:32440: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:32443: \$? = $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 32457 "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:32476: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:32479: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:32482: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:32485: \$? = $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}:32502: testing find linkage for iconv library ..." 1>&5

echo "${as_me:-configure}:32504: 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}:32595: 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 32603 "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:32622: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:32625: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:32628: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:32631: \$? = $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}:32636: 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}:32654: 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}:32729: 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 32735 "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:32754: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:32757: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:32760: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:32763: \$? = $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}:32768: 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:32808: 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:32817: 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 32824 "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:32849: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:32852: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:32855: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:32858: \$? = $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:32868: 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 32913 "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:32925: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:32928: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:32931: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:32934: \$? = $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}:32951: 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}:32990: 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:33001: 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 33007 "configure"
#include "confdefs.h"

$ac_includes_default
#include <langinfo.h>
int
main (void)
{
char* cs = nl_langinfo(CODESET); (void)cs
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext" "conftest$ac_exeext"
if { (eval echo "$as_me:33021: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:33024: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:33027: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:33030: \$? = $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:33041: 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:33052: 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 33058 "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:33070: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:33073: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:33076: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:33079: \$? = $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:33089: 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:33099: 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:33109: 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:33123: 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:33133: result: $nls_cv_force_use_gnu_gettext" >&5
echo "${ECHO_T}$nls_cv_force_use_gnu_gettext" >&6

        # Extract the first word of "msgfmt", so it can be a program name with args.

set dummy msgfmt; ac_word=$2
echo "$as_me:33139: 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:33166: result: $MSGFMT" >&5
echo "${ECHO_T}$MSGFMT" >&6
else
  echo "$as_me:33169: 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:33175: 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:33192: 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:33204: result: $GMSGFMT" >&5
echo "${ECHO_T}$GMSGFMT" >&6
else
  echo "$as_me:33207: 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:33214: 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:33241: result: $XGETTEXT" >&5
echo "${ECHO_T}$XGETTEXT" >&6
else
  echo "$as_me:33244: result: no" >&5
echo "${ECHO_T}no" >&6
fi

    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"

      cf_save_LIBS_1="$LIBS"

cf_add_libs="$LIBS"
# reverse order
cf_add_0lib=
for cf_add_1lib in $LIBICONV; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
# filter duplicates
for cf_add_1lib in $cf_add_0lib; 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_1lib $cf_add_libs"
done
LIBS="$cf_add_libs"

      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

# 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}:33382: testing Starting FIND_LINKAGE(intl,) ..." 1>&5

cf_save_LIBS="$LIBS"

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

#include <libintl.h>
extern int _nl_msg_cat_cntr;

int
main (void)
{

	bindtextdomain ("", "");
	return (gettext ("") != 0)

#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:33409: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:33412: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:33415: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:33418: \$? = $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 33432 "configure"
#include "confdefs.h"

#include <libintl.h>
extern int _nl_msg_cat_cntr;

int
main (void)
{

	bindtextdomain ("", "");
	return (gettext ("") != 0)

#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:33454: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:33457: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:33460: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:33463: \$? = $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}:33480: testing find linkage for intl library ..." 1>&5

echo "${as_me:-configure}:33482: 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}:33573: 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 33581 "configure"
#include "confdefs.h"

#include <libintl.h>
extern int _nl_msg_cat_cntr;

int
main (void)
{

	bindtextdomain ("", "");
	return (gettext ("") != 0)

#ifndef IGNORE_MSGFMT_HACK
			 + _nl_msg_cat_cntr
#endif

  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext"
if { (eval echo "$as_me:33603: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:33606: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:33609: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:33612: \$? = $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}:33617: 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}:33635: 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}:33710: 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 33716 "configure"
#include "confdefs.h"

#include <libintl.h>
extern int _nl_msg_cat_cntr;

int
main (void)
{

	bindtextdomain ("", "");
	return (gettext ("") != 0)

#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:33738: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:33741: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:33744: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:33747: \$? = $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}:33752: 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:33791: checking for libintl.h and gettext()" >&5
echo $ECHO_N "checking for libintl.h and gettext()... $ECHO_C" >&6
      echo "$as_me:33793: 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 33838 "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:33850: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:33853: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:33856: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:33859: \$? = $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}:33876: 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}:33915: 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:33931: 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 33937 "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:33968: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:33971: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:33974: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:33977: \$? = $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:33987: 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:34002: 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" || test -f "$srcdir/intl/libgnuintl.h" ; then

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

        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:34038: 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:34047: 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:34056: 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 byacc 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:34074: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_INTL_YACC+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$INTL_YACC"; then
  ac_cv_prog_INTL_YACC="$INTL_YACC" # 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_INTL_YACC="$ac_prog"
echo "$as_me:34089: found $ac_dir/$ac_word" >&5
break
done

fi
fi
INTL_YACC=$ac_cv_prog_INTL_YACC
if test -n "$INTL_YACC"; then
  echo "$as_me:34097: result: $INTL_YACC" >&5
echo "${ECHO_T}$INTL_YACC" >&6
else
  echo "$as_me:34100: result: no" >&5
echo "${ECHO_T}no" >&6
fi

  test -n "$INTL_YACC" && break
done

      if test -z "$INTL_YACC"; then
        ac_verc_fail=yes
      else
                echo "$as_me:34110: checking version of $INTL_YACC" >&5
echo $ECHO_N "checking version of $INTL_YACC... $ECHO_C" >&6
        ac_prog_version=`$INTL_YACC -V 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p;s/^\(byacc\) - \([0-9][0-9.]*\) \([0-9]*\).*$/\1-\2.\3/p'`
        case "$ac_prog_version" in
          byacc-[0-9].[0-9].20[1-9]*)
             ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
          '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
          1.2[6-9]*|1.[3-9][0-9]*|2.[0-3]*)
             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:34121: result: $ac_prog_version" >&5
echo "${ECHO_T}$ac_prog_version" >&6
      fi
      if test "$ac_verc_fail" = yes; then
        INTL_YACC=:
      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:34148: 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:34168: 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:34204: 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:34215: 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" != no ; 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:34257: 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 34263 "configure"
#include "confdefs.h"
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:34267: \"$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:34273: \$? = $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:34292: 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:34359: 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 34365 "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:34377: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:34380: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:34383: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:34386: \$? = $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:34396: 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:34406: 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 34412 "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:34444: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:34447: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:34450: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:34453: \$? = $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:34463: 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:34484: 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 34490 "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:34508: 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:34513: 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 34519 "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:34550: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:34553: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:34556: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:34559: \$? = $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:34569: 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:34583: 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 34592 "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:34615: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:34618: \$? = $ac_status" >&5
  (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
  { (eval echo "$as_me:34620: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:34623: \$? = $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:34635: 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

# if struct hostent contains h_addr_list or not (SunOS-3.5)
echo "$as_me:34664: checking for h_addr_list in struct hostent" >&5
echo $ECHO_N "checking for h_addr_list in struct hostent... $ECHO_C" >&6
cat >"conftest.$ac_ext" <<_ACEOF
#line 34667 "configure"
#include "confdefs.h"

$ac_includes_default
#ifdef HAVE_NETDB_H
#include <netdb.h>
#endif

int
main (void)
{

static struct hostent h;
h.h_addr_list[0] = malloc(1);

  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext"
if { (eval echo "$as_me:34687: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:34690: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:34693: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:34696: \$? = $ac_status" >&5
  (exit "$ac_status"); }; }; then
  ac_cv_hostent_h_addr_list=yes
else
  echo "$as_me: failed program was:" >&5
cat "conftest.$ac_ext" >&5
ac_cv_hostent_h_addr_list=no
fi
rm -f "conftest.$ac_objext" "conftest.$ac_ext"
echo "$as_me:34705: result: $ac_cv_hostent_h_addr_list" >&5
echo "${ECHO_T}$ac_cv_hostent_h_addr_list" >&6
if test $ac_cv_hostent_h_addr_list = yes; then

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

fi

for ac_header in X11/Xpoll.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
echo "$as_me:34718: 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 34724 "configure"
#include "confdefs.h"
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:34728: \"$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:34734: \$? = $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:34753: 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:34763: checking for declaration of fd_set" >&5
echo $ECHO_N "checking for declaration of fd_set... $ECHO_C" >&6
if test "${cf_cv_type_fd_set+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

echo "${as_me:-configure}:34769: testing sys/types alone ..." 1>&5

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

#include <sys/types.h>
int
main (void)
{
fd_set x; (void)x
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext"
if { (eval echo "$as_me:34785: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:34788: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:34791: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:34794: \$? = $ac_status" >&5
  (exit "$ac_status"); }; }; then
  cf_cv_type_fd_set=sys/types.h
else
  echo "$as_me: failed program was:" >&5
cat "conftest.$ac_ext" >&5

echo "${as_me:-configure}:34801: testing X11/Xpoll.h ..." 1>&5

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

#ifdef HAVE_X11_XPOLL_H
#include <X11/Xpoll.h>
#endif
int
main (void)
{
fd_set x; (void)x
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext"
if { (eval echo "$as_me:34819: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:34822: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:34825: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:34828: \$? = $ac_status" >&5
  (exit "$ac_status"); }; }; then
  cf_cv_type_fd_set=X11/Xpoll.h
else
  echo "$as_me: failed program was:" >&5
cat "conftest.$ac_ext" >&5

echo "${as_me:-configure}:34835: testing sys/select.h ..." 1>&5

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

#include <sys/types.h>
#include <sys/select.h>
int
main (void)
{
fd_set x; (void)x
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext"
if { (eval echo "$as_me:34852: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:34855: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:34858: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:34861: \$? = $ac_status" >&5
  (exit "$ac_status"); }; }; then
  cf_cv_type_fd_set=sys/select.h
else
  echo "$as_me: failed program was:" >&5
cat "conftest.$ac_ext" >&5
cf_cv_type_fd_set=unknown
fi
rm -f "conftest.$ac_objext" "conftest.$ac_ext"
fi
rm -f "conftest.$ac_objext" "conftest.$ac_ext"
fi
rm -f "conftest.$ac_objext" "conftest.$ac_ext"
fi
echo "$as_me:34875: result: $cf_cv_type_fd_set" >&5
echo "${ECHO_T}$cf_cv_type_fd_set" >&6
if test $cf_cv_type_fd_set = sys/select.h ; then

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

fi

echo "$as_me:34885: checking for fd_set macros" >&5
echo $ECHO_N "checking for fd_set macros... $ECHO_C" >&6
if test "${cf_cv_macros_fd_set+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

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

#include <sys/types.h>
#if USE_SYS_SELECT_H
# include <sys/select.h>
#else
# ifdef HAVE_SYS_TIME_H
#  include <sys/time.h>
#  ifdef TIME_WITH_SYS_TIME
#   include <time.h>
#  endif
# else
#  include <time.h>
# endif
#endif

int
main (void)
{

	fd_set read_bits;
	FD_ZERO(&read_bits);
	FD_SET(0, &read_bits);
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext"
if { (eval echo "$as_me:34921: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:34924: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:34927: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:34930: \$? = $ac_status" >&5
  (exit "$ac_status"); }; }; then
  cf_cv_macros_fd_set=yes
else
  echo "$as_me: failed program was:" >&5
cat "conftest.$ac_ext" >&5
cf_cv_macros_fd_set=no
fi
rm -f "conftest.$ac_objext" "conftest.$ac_ext"
fi
echo "$as_me:34940: result: $cf_cv_macros_fd_set" >&5
echo "${ECHO_T}$cf_cv_macros_fd_set" >&6
test $cf_cv_macros_fd_set = yes &&
cat >>confdefs.h <<\EOF
#define HAVE_TYPE_FD_SET 1
EOF

# tolower() is known to be broken on 4.2BSD by
# not checking if input is an uppercase letter
# /* #define tolower(c)	((c)-'A'+'a') */
echo "$as_me:34950: checking for working tolower()" >&5
echo $ECHO_N "checking for working tolower()... $ECHO_C" >&6
if test "$cross_compiling" = yes; then

                echo "$as_me:34954: result: unknown" >&5
echo "${ECHO_T}unknown" >&6

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

#include <ctype.h>
int main(void) {
	unsigned char str;

	for (str = 1; str < 127; str++) {
	        if ((char) tolower(str) != ((str >= 'A' && str <= 'Z') ? ((unsigned char) (str - 'A' + 'a')) : str))
			return 1;
	}
	return 0;
}
_ACEOF
rm -f "conftest$ac_exeext"
if { (eval echo "$as_me:34974: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:34977: \$? = $ac_status" >&5
  (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
  { (eval echo "$as_me:34979: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:34982: \$? = $ac_status" >&5
  (exit "$ac_status"); }; }; then

                echo "$as_me:34985: 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

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

                echo "$as_me:34997: result: no" >&5
echo "${ECHO_T}no" >&6

fi
rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
fi

# toupper is known to be broken on 4.2BSD by
# not checking if input is a lowercase letter
# /* #define toupper(c)	((c)-'a'+'A') */
echo "$as_me:35007: checking for working toupper()" >&5
echo $ECHO_N "checking for working toupper()... $ECHO_C" >&6
if test "$cross_compiling" = yes; then

		echo "$as_me:35011: result: unknown" >&5
echo "${ECHO_T}unknown" >&6

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

#include <ctype.h>
int main(void) {
	unsigned char str;

	for (str = 1; str < 127; str++) {
		if ((char) toupper(str) != ((str >= 'a' && str <= 'z') ? ((unsigned char) (str - 'a' + 'A')) : str))
			return 1;
	}
	return 0;
}
_ACEOF
rm -f "conftest$ac_exeext"
if { (eval echo "$as_me:35031: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:35034: \$? = $ac_status" >&5
  (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
  { (eval echo "$as_me:35036: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:35039: \$? = $ac_status" >&5
  (exit "$ac_status"); }; }; then

		echo "$as_me:35042: 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

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

		echo "$as_me:35054: 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:35061: checking for stdnoreturn.h" >&5
echo $ECHO_N "checking for stdnoreturn.h... $ECHO_C" >&6
if test "${ac_cv_header_stdnoreturn_h+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >"conftest.$ac_ext" <<_ACEOF
#line 35067 "configure"
#include "confdefs.h"
#include <stdnoreturn.h>
_ACEOF
if { (eval echo "$as_me:35071: \"$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:35077: \$? = $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_stdnoreturn_h=yes
else
  echo "$as_me: failed program was:" >&5
  cat "conftest.$ac_ext" >&5
  ac_cv_header_stdnoreturn_h=no
fi
rm -f conftest.err "conftest.$ac_ext"
fi
echo "$as_me:35096: result: $ac_cv_header_stdnoreturn_h" >&5
echo "${ECHO_T}$ac_cv_header_stdnoreturn_h" >&6
if test "$ac_cv_header_stdnoreturn_h" = yes; then

	echo "$as_me:35100: checking for C11 _Noreturn feature" >&5
echo $ECHO_N "checking for C11 _Noreturn feature... $ECHO_C" >&6
	cat >"conftest.$ac_ext" <<_ACEOF
#line 35103 "configure"
#include "confdefs.h"

$ac_includes_default
#include <stdnoreturn.h>
static _Noreturn void giveup(void) { exit(0);}
int
main (void)
{
if (feof(stdin)) giveup()
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext"
if { (eval echo "$as_me:35118: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:35121: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:35124: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:35127: \$? = $ac_status" >&5
  (exit "$ac_status"); }; }; then
  cf_cv_c11_noreturn=yes
	echo "$as_me:35130: result: $cf_cv_c11_noreturn" >&5
echo "${ECHO_T}$cf_cv_c11_noreturn" >&6
else
  echo "$as_me: failed program was:" >&5
cat "conftest.$ac_ext" >&5
cf_cv_c11_noreturn=no
	echo "$as_me:35136: result: $cf_cv_c11_noreturn" >&5
echo "${ECHO_T}$cf_cv_c11_noreturn" >&6
fi
rm -f "conftest.$ac_objext" "conftest.$ac_ext"

else
  cf_cv_c11_noreturn=no

fi

if test "$cf_cv_c11_noreturn" = yes; then

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

cat >>confdefs.h <<EOF
#define STDC_NORETURN _Noreturn
EOF

	HAVE_STDNORETURN_H=1
else
	HAVE_STDNORETURN_H=0
fi

for cf_hdr in iconv.h
do
	echo "$as_me:35163: checking for $cf_hdr" >&5
echo $ECHO_N "checking for $cf_hdr... $ECHO_C" >&6
	cat >"conftest.$ac_ext" <<_ACEOF
#line 35166 "configure"
#include "confdefs.h"

#include <sys/types.h>
#include <$cf_hdr>

_ACEOF
if { (eval echo "$as_me:35173: \"$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:35179: \$? = $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:35197: 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:35210: 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:35214: result: unknown" >&5
echo "${ECHO_T}unknown" >&6

else
  cat >"conftest.$ac_ext" <<_ACEOF
#line 35219 "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(void) {
	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:35237: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:35240: \$? = $ac_status" >&5
  (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
  { (eval echo "$as_me:35242: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:35245: \$? = $ac_status" >&5
  (exit "$ac_status"); }; }; then

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

		echo "$as_me:35252: 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:35260: 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:35298: 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 35304 "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:35335: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:35338: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:35341: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:35344: \$? = $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:35354: 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:35375: 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 35381 "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:35412: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:35415: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:35418: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:35421: \$? = $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:35431: 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

cf_x_athena=${cf_x_athena:-Xaw}

echo "$as_me:35446: 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:35457: result: yes" >&5
echo "${ECHO_T}yes" >&6
else
	echo "$as_me:35460: result: no" >&5
echo "${ECHO_T}no" >&6
fi

echo "$as_me:35464: 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:35475: result: yes" >&5
echo "${ECHO_T}yes" >&6
else
	echo "$as_me:35478: result: no" >&5
echo "${ECHO_T}no" >&6
fi

echo "$as_me:35482: 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:35493: result: yes" >&5
echo "${ECHO_T}yes" >&6
else
	echo "$as_me:35496: result: no" >&5
echo "${ECHO_T}no" >&6
fi

echo "$as_me:35500: 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:35511: result: yes" >&5
echo "${ECHO_T}yes" >&6
else
	echo "$as_me:35514: 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}:35534: 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}:35540: 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}:35544: 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="$LIBS"
# reverse order
cf_add_0lib=
for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
# filter duplicates
for cf_add_1lib in $cf_add_0lib; 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_1lib $cf_add_libs"
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}:35675: testing ..trimmed $LIBS ..." 1>&5

			;;
		esac
	done

echo "$as_me:35681: 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 35688 "configure"
#include "confdefs.h"

$ac_includes_default
#include <X11/Xmu/CharSet.h>

int
main (void)
{

int check = XmuCompareISOLatin1("big", "small");
(void)check;

  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext" "conftest$ac_exeext"
if { (eval echo "$as_me:35706: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:35709: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:35712: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:35715: \$? = $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:35725: 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}:35737: 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}:35745: 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}:35751: 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}:35755: 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="$LIBS"
# reverse order
cf_add_0lib=
for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
# filter duplicates
for cf_add_1lib in $cf_add_0lib; 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_1lib $cf_add_libs"
done
LIBS="$cf_add_libs"

							LIBS="$cf_save_xmu"

test -n "$verbose" && echo "	...before $LIBS" 1>&6

echo "${as_me:-configure}:35875: 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}:35880: testing ...after  $LIBS ..." 1>&5

else
	cf_pkgconfig_incs=
	cf_pkgconfig_libs=

test -n "$verbose" && echo "	...before $LIBS" 1>&6

echo "${as_me:-configure}:35888: 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}:35893: 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}:35904: 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}:35929: 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}:35935: 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}:35939: 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="$LIBS"
# reverse order
cf_add_0lib=
for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
# filter duplicates
for cf_add_1lib in $cf_add_0lib; 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_1lib $cf_add_libs"
done
LIBS="$cf_add_libs"

	:
else
	cf_pkgconfig_incs=
	cf_pkgconfig_libs=

	echo "$as_me:36060: 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 36068 "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 (void);
int
main (void)
{
XextCreateExtension ();
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext" "conftest$ac_exeext"
if { (eval echo "$as_me:36087: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:36090: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:36093: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:36096: \$? = $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:36107: 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="$LIBS"
# reverse order
cf_add_0lib=
for cf_add_1lib in -lXext; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
# filter duplicates
for cf_add_1lib in $cf_add_0lib; 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_1lib $cf_add_libs"
done
LIBS="$cf_add_libs"

fi

fi

# OSX is schizoid about who owns /usr/X11 (old) versus /opt/X11 (new) (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}:36143: 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}:36149: 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}:36153: 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="$LIBS"
# reverse order
cf_add_0lib=
for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
# filter duplicates
for cf_add_1lib in $cf_add_0lib; 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_1lib $cf_add_libs"
done
LIBS="$cf_add_libs"

	:
else
	cf_pkgconfig_incs=
	cf_pkgconfig_libs=
	{ echo "$as_me:36273: 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}:36280: 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}:36286: 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}:36290: 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="$LIBS"
# reverse order
cf_add_0lib=
for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
# filter duplicates
for cf_add_1lib in $cf_add_0lib; 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_1lib $cf_add_libs"
done
LIBS="$cf_add_libs"

	:
else
	cf_pkgconfig_incs=
	cf_pkgconfig_libs=
	{ echo "$as_me:36410: 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}:36417: 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}:36423: 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}:36427: 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="$LIBS"
# reverse order
cf_add_0lib=
for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
# filter duplicates
for cf_add_1lib in $cf_add_0lib; 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_1lib $cf_add_libs"
done
LIBS="$cf_add_libs"

	:
else
	cf_pkgconfig_incs=
	cf_pkgconfig_libs=
	{ echo "$as_me:36547: 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}:36554: 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}:36560: 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}:36564: 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="$LIBS"
# reverse order
cf_add_0lib=
for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
# filter duplicates
for cf_add_1lib in $cf_add_0lib; 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_1lib $cf_add_libs"
done
LIBS="$cf_add_libs"

	:
else
	cf_pkgconfig_incs=
	cf_pkgconfig_libs=
	{ echo "$as_me:36684: WARNING: unable to find Xt library" >&5
echo "$as_me: WARNING: unable to find Xt library" >&2;}
fi

else
	LIBS="$X_PRE_LIBS $LIBS $X_EXTRA_LIBS"
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}:36697: 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}:36703: 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}:36707: 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="$LIBS"
# reverse order
cf_add_0lib=
for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
# filter duplicates
for cf_add_1lib in $cf_add_0lib; 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_1lib $cf_add_libs"
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:36828: 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 36835 "configure"
#include "confdefs.h"

$ac_includes_default
#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:36855: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:36858: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:36861: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:36864: \$? = $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:36874: 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}:36880: 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}:36887: 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}:36893: 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}:36897: 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="$LIBS"
# reverse order
cf_add_0lib=
for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
# filter duplicates
for cf_add_1lib in $cf_add_0lib; 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_1lib $cf_add_libs"
done
LIBS="$cf_add_libs"

	:
else
	cf_pkgconfig_incs=
	cf_pkgconfig_libs=

test -n "$verbose" && echo "	...before $LIBS" 1>&6

echo "${as_me:-configure}:37020: 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}:37025: testing ...after  $LIBS ..." 1>&5

fi

		fi
		;;
	esac

echo "$as_me:37033: 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 37040 "configure"
#include "confdefs.h"

$ac_includes_default
#include <X11/Shell.h>

int
main (void)
{
int num = IceConnectionNumber(0); (void) num

  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext" "conftest$ac_exeext"
if { (eval echo "$as_me:37056: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:37059: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:37062: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:37065: \$? = $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:37075: 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}:37089: 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}:37094: 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}:37100: 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}:37104: 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="$LIBS"
# reverse order
cf_add_0lib=
for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
# filter duplicates
for cf_add_1lib in $cf_add_0lib; 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_1lib $cf_add_libs"
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}:37223: 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}:37229: 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}:37233: 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="$LIBS"
# reverse order
cf_add_0lib=
for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
# filter duplicates
for cf_add_1lib in $cf_add_0lib; 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_1lib $cf_add_libs"
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}:37362: 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}:37367: 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}:37387: 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}:37472: 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}:37482: 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}:37492: 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 37501 "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:37513: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:37516: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:37519: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:37522: \$? = $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}:37530: 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}:37535: testing but keeping change to \$CPPFLAGS ..." 1>&5

	 fi
	 CFLAGS="$cf_check_cflags"
fi
rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
fi

	echo "$as_me:37543: 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 37549 "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:37580: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:37583: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:37586: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:37589: \$? = $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:37599: 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:37605: 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  $LIBS"
cat >"conftest.$ac_ext" <<_ACEOF
#line 37613 "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 (void);
int
main (void)
{
XOpenDisplay ();
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext" "conftest$ac_exeext"
if { (eval echo "$as_me:37632: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:37635: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:37638: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:37641: \$? = $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:37652: 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="$LIBS"
# reverse order
cf_add_0lib=
for cf_add_1lib in -lX11; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
# filter duplicates
for cf_add_1lib in $cf_add_0lib; 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_1lib $cf_add_libs"
done
LIBS="$cf_add_libs"

fi

fi

	echo "$as_me:37676: 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 37682 "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:37713: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:37716: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:37719: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:37722: \$? = $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:37732: 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:37738: 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  $LIBS"
cat >"conftest.$ac_ext" <<_ACEOF
#line 37746 "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 (void);
int
main (void)
{
XtAppInitialize ();
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext" "conftest$ac_exeext"
if { (eval echo "$as_me:37765: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:37768: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:37771: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:37774: \$? = $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:37785: 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 $LIBS"
fi

fi

fi

if test "$cf_have_X_LIBS" = no ; then
	{ echo "$as_me:37802: 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_LIBS_CF_X_ATHENA_CPPFLAGS="$LIBS"
cf_save_CFLAGS_CF_X_ATHENA_CPPFLAGS="$CFLAGS"
cf_save_CPPFLAGS_CF_X_ATHENA_CPPFLAGS="$CPPFLAGS"
LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
for cf_X_CFLAGS in $X_CFLAGS
do
	case "x$cf_X_CFLAGS" in
	x-[IUD]*)
		CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
		;;
	*)
		CFLAGS="$CFLAGS $cf_X_CFLAGS"
		;;
	esac
done

		cf_test=X11/$cf_x_athena_root/SimpleMenu.h
		if test "$cf_path" != default ; then

	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
	CPPFLAGS="${CPPFLAGS}-I$cf_path/include"

			echo "$as_me:37843: 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:37846: checking for $cf_test" >&5
echo $ECHO_N "checking for $cf_test... $ECHO_C" >&6
		fi
		cat >"conftest.$ac_ext" <<_ACEOF
#line 37850 "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:37864: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:37867: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:37870: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:37873: \$? = $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:37882: result: $cf_result" >&5
echo "${ECHO_T}$cf_result" >&6

LIBS="$cf_save_LIBS_CF_X_ATHENA_CPPFLAGS"
CFLAGS="$cf_save_CFLAGS_CF_X_ATHENA_CPPFLAGS"
CPPFLAGS="$cf_save_CPPFLAGS_CF_X_ATHENA_CPPFLAGS"

		if test "$cf_result" = yes ; then
			test "$cf_path"  = default && cf_x_athena_inc=default
			test "$cf_path" != default && cf_x_athena_inc="$cf_path/include"
			break
		fi
	fi
done

if test -z "$cf_x_athena_inc" ; then
	{ echo "$as_me:37898: WARNING: Unable to find Athena header files" >&5
echo "$as_me: WARNING: Unable to find Athena header files" >&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
		test -n "$cf_x_athena_lib" && break

cf_save_LIBS_CF_X_ATHENA_LIBS="$LIBS"
cf_save_CFLAGS_CF_X_ATHENA_LIBS="$CFLAGS"
cf_save_CPPFLAGS_CF_X_ATHENA_LIBS="$CPPFLAGS"
LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
for cf_X_CFLAGS in $X_CFLAGS
do
	case "x$cf_X_CFLAGS" in
	x-[IUD]*)
		CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
		;;
	*)
		CFLAGS="$CFLAGS $cf_X_CFLAGS"
		;;
	esac
done

		cf_test=XawSimpleMenuAddGlobalActions
		test "$cf_path" != default && cf_libs="-L$cf_path/lib $cf_libs"

cf_add_libs="$LIBS"
# reverse order
cf_add_0lib=
for cf_add_1lib in $cf_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
# filter duplicates
for cf_add_1lib in $cf_add_0lib; 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_1lib $cf_add_libs"
done
LIBS="$cf_add_libs"

		echo "$as_me:37963: checking for $cf_test in $cf_libs" >&5
echo $ECHO_N "checking for $cf_test in $cf_libs... $ECHO_C" >&6
		cat >"conftest.$ac_ext" <<_ACEOF
#line 37966 "configure"
#include "confdefs.h"

$ac_includes_default
#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:37983: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:37986: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:37989: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:37992: \$? = $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:38001: result: $cf_result" >&5
echo "${ECHO_T}$cf_result" >&6

LIBS="$cf_save_LIBS_CF_X_ATHENA_LIBS"
CFLAGS="$cf_save_CFLAGS_CF_X_ATHENA_LIBS"
CPPFLAGS="$cf_save_CPPFLAGS_CF_X_ATHENA_LIBS"

		if test "$cf_result" = yes ; then
			cf_x_athena_lib="$cf_libs"
			break
		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:38018: 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_add_libs="$LIBS"
# reverse order
cf_add_0lib=
for cf_add_1lib in $cf_x_athena_lib; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
# filter duplicates
for cf_add_1lib in $cf_add_0lib; 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_1lib $cf_add_libs"
done
LIBS="$cf_add_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

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:38052: 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:38067: 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:38075: result: $XCURSES_CONFIG" >&5
echo "${ECHO_T}$XCURSES_CONFIG" >&6
else
  echo "$as_me:38078: 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:38091: 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:38106: 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:38114: result: $ac_ct_XCURSES_CONFIG" >&5
echo "${ECHO_T}$ac_ct_XCURSES_CONFIG" >&6
else
  echo "$as_me:38117: 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="$LIBS"
# reverse order
cf_add_0lib=
for cf_add_1lib in `$XCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
# filter duplicates
for cf_add_1lib in $cf_add_0lib; 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_1lib $cf_add_libs"
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}:38252: 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}:38337: 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}:38347: 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}:38357: 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 38366 "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:38378: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:38381: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:38384: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:38387: \$? = $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}:38395: 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}:38400: testing but keeping change to \$CPPFLAGS ..." 1>&5

	 fi
	 CFLAGS="$cf_check_cflags"
fi
rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
fi

echo "$as_me:38408: 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 38416 "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 (void);
int
main (void)
{
XOpenDisplay ();
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext" "conftest$ac_exeext"
if { (eval echo "$as_me:38435: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:38438: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:38441: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:38444: \$? = $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:38455: 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="$LIBS"
# reverse order
cf_add_0lib=
for cf_add_1lib in -lX11; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
# filter duplicates
for cf_add_1lib in $cf_add_0lib; 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_1lib $cf_add_libs"
done
LIBS="$cf_add_libs"

fi

echo "$as_me:38477: 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="$LIBS"
# reverse order
cf_add_0lib=
for cf_add_1lib in -lXCurses; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
# filter duplicates
for cf_add_1lib in $cf_add_0lib; 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_1lib $cf_add_libs"
done
LIBS="$cf_add_libs"

cat >"conftest.$ac_ext" <<_ACEOF
#line 38500 "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:38515: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:38518: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:38521: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:38524: \$? = $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:38535: 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:38550: 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 38556 "configure"
#include "confdefs.h"
#include <xcurses.h>
_ACEOF
if { (eval echo "$as_me:38560: \"$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:38566: \$? = $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:38585: 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:38596: error: Cannot link with XCurses" >&5
echo "$as_me: error: Cannot link with XCurses" >&2;}
   { (exit 1); exit 1; }; }
fi

fi

echo "$as_me:38603: checking for unctrl.h" >&5
echo $ECHO_N "checking for unctrl.h... $ECHO_C" >&6
if test "${cf_cv_unctrl_header+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

# If we found <ncurses/curses.h>, look for <ncurses/unctrl.h>, but always look
# for <unctrl.h> if we do not find the variant.

cf_header_list="unctrl.h ncurses/unctrl.h ncursesw/unctrl.h"

case "${cf_cv_ncurses_header:-curses.h}" in
*/*)
	cf_header_item=`echo "${cf_cv_ncurses_header:-curses.h}" | sed -e 's%\..*%%' -e 's%/.*%/%'`unctrl.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 38624 "configure"
#include "confdefs.h"

#include <${cf_cv_ncurses_header:-curses.h}>
#include <${cf_header}>
int
main (void)
{
WINDOW *x; (void)x
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext"
if { (eval echo "$as_me:38638: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:38641: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:38644: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:38647: \$? = $ac_status" >&5
  (exit "$ac_status"); }; }; then
  cf_cv_unctrl_header=$cf_header
	 break
else
  echo "$as_me: failed program was:" >&5
cat "conftest.$ac_ext" >&5
cf_cv_unctrl_header=no
fi
rm -f "conftest.$ac_objext" "conftest.$ac_ext"
done

fi
echo "$as_me:38660: result: $cf_cv_unctrl_header" >&5
echo "${ECHO_T}$cf_cv_unctrl_header" >&6

case "$cf_cv_unctrl_header" in
no)
	{ echo "$as_me:38665: WARNING: unctrl.h header not found" >&5
echo "$as_me: WARNING: unctrl.h header not found" >&2;}
	;;
esac

case "$cf_cv_unctrl_header" in
unctrl.h)

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

	;;
ncurses/unctrl.h)

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

	;;
ncursesw/unctrl.h)

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

	;;
esac

for cf_func in vw_printw get_wch wget_wch
do

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

	echo "$as_me:38699: checking for ${cf_func}" >&5
echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6

echo "${as_me:-configure}:38702: testing ${cf_func} ..." 1>&5

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

		eval cf_result='$ac_cv_func_'$cf_func
		if test ".$cf_result" != ".no"; then
			cat >"conftest.$ac_ext" <<_ACEOF
#line 38711 "configure"
#include "confdefs.h"

#ifdef HAVE_XCURSES
#include <xcurses.h>
char * XCursesProgramName = "test";
#else
#include <${cf_cv_ncurses_header:-curses.h}>
#if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
#include <ncursesw/term.h>
#elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
#include <ncurses/term.h>
#elif defined(HAVE_TERM_H)
#include <term.h>
#endif
#endif

int
main (void)
{

#ifndef ${cf_func}
long foo = (long)(&${cf_func});
fprintf(stderr, "testing linkage of $cf_func:%p\\n", (void *)foo);
if (foo + 1234L > 5678L)
	${cf_cv_main_return:-return}(foo != 0);
#endif

  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext" "conftest$ac_exeext"
if { (eval echo "$as_me:38744: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:38747: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:38750: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:38753: \$? = $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"
		fi
		eval 'cf_cv_func_'$cf_func'="$cf_result"'

fi

	# use the computed/retrieved cache-value:
	eval 'cf_result=$cf_cv_func_'$cf_func
	echo "$as_me:38769: result: $cf_result" >&5
echo "${ECHO_T}$cf_result" >&6
	if test "$cf_result" != no; then
		cat >>confdefs.h <<EOF
#define HAVE_${cf_tr_func} 1
EOF

	fi
done

### sum up warnings
if test "$cf_cv_termlib" = none ; then
	{ echo "$as_me:38781: 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:38785: 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:38789: 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 $CANLIBS $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:38920: 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.

me=\`echo "\$0" | sed -e 's,.*\\/,,'\`

debug=false
SHELL=\${CONFIG_SHELL-$SHELL}
ac_cs_invocation="\$0 \$@"

CLICOLOR_FORCE= GREP_OPTIONS=
unset CLICOLOR_FORCE GREP_OPTIONS
_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.20231210,
  with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"

Copyright 2003-2022,2023	Thomas E. Dickey
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:39101: 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:39120: 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.20231210, 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:39168: 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,@GREP@,$GREP,;t t
s,@EGREP@,$EGREP,;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,@PKG_CONFIG@,$PKG_CONFIG,;t t
s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;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,@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,@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,@NCURSES_CONFIG@,$NCURSES_CONFIG,;t t
s,@ac_ct_NCURSES_CONFIG@,$ac_ct_NCURSES_CONFIG,;t t
s,@PCRE2_CONFIG@,$PCRE2_CONFIG,;t t
s,@ac_pt_PCRE2_CONFIG@,$ac_pt_PCRE2_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,@CAN_CPPFLAGS@,$CAN_CPPFLAGS,;t t
s,@CAN_MAKEFILE@,$CAN_MAKEFILE,;t t
s,@TIN_DEFAULTS_DIR@,$TIN_DEFAULTS_DIR,;t t
s,@LIBOBJS@,$LIBOBJS,;t t
s,@FGREP@,$FGREP,;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,@INTL_YACC@,$INTL_YACC,;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,@HAVE_STDNORETURN_H@,$HAVE_STDNORETURN_H,;t t
s,@STDC_NORETURN@,$STDC_NORETURN,;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:39516: 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:39534: 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:39547: 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:39563: 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:39572: 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
EOF
test -n "${FGREP}" || FGREP="grep -F"
test -n "${EGREP}" || EGREP="grep -E"
cat >>"$CONFIG_STATUS" <<EOF
  test -n "\${FGREP}" || FGREP="$FGREP"
  test -n "\${EGREP}" || EGREP="$EGREP"
EOF
cat >>"$CONFIG_STATUS" <<\EOF
  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:39617: 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:39628: 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:39677: 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:39688: 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:39701: 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 '  test -n "${EGREP}" || EGREP="grep -E"' >>"$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 # grep' >>"$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:39820: $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

