#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by Autoconf 2.52.20250126.
#
# 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="charproc.c"
# 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 ;;

  -*dir | -dvi* | -doc* | -html* | -local* | -pdf* | -ps* )
    echo "$as_me: WARNING: unsupported option: $ac_option" >&2
    ;;

  -*) { 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]
  --target=TARGET   configure for building compilers for TARGET [HOST]
EOF
fi

if test -n "$ac_init_help"; then

  cat <<\EOF

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

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

Compile/Install Options:
  --disable-full-tgetent  disable check for full tgetent function
  --with-app-class=XXX    override X applications class (default XTerm)
  --with-app-defaults=DIR directory in which to install resource files (EPREFIX/lib/X11/app-defaults)
  --with-system-type=XXX  test: override derived host system-type
  --with-icon-name[=XXX]  override icon name (default: mini.xterm)
  --with-icon-symlink[=XXX] make symbolic link for icon name (default: xterm)
  --with-pixmapdir=DIR    directory in which to install pixmaps (DATADIR/pixmaps)
  --with-icondir=DIR      directory in which to install icons for desktop
  --with-icon-theme[=XXX] install icons into desktop theme (hicolor)
  --disable-desktop       disable install of xterm desktop files
  --with-desktop-category=XXX  one or more desktop categories or auto
  --with-reference=XXX    program to use as permissions-reference
  --with-xterm-symlink[=XXX] make symbolic link to installed xterm
  --disable-openpty       disable openpty, prefer other interfaces
  --disable-setuid        disable setuid in xterm, do not install setuid/setgid
  --disable-setgid        disable setgid in xterm, do not install setuid/setgid
  --with-setuid[=XXX]     use the given setuid user
  --with-utmp-setgid[=XXX] use setgid to match utmp/utmpx file
  --with-utempter         use utempter library for access to utmp
  --with-utmp-path=XXX    use XXX rather than auto for utmp path
  --with-wtmp-path=XXX    use XXX rather than auto for wtmp path
  --with-tty-group[=XXX]  use XXX for the tty-group
  --with-x                use the X Window System
  --with-pkg-config[=CMD] enable/disable use of pkg-config and its name CMD
  --with-xpm[=DIR]        use Xpm library for colored icon, may specify path
  --without-xinerama      do not use Xinerama extension for multiscreen 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
  --disable-xcursor       disable cursorTheme resource
  --enable-narrowproto    enable narrow prototypes for X libraries
  --enable-imake          enable use of imake for definitions
  --with-man2html[=XXX]   use XXX rather than groff
Terminal Configuration:
  --with-terminal-id=V    set default decTerminalID (default: vt420)
  --with-terminal-type=T  set default $TERM (default: xterm)
  --enable-backarrow-key  set default backarrowKey resource (default: true)
  --enable-backarrow-is-erase set default backarrowKeyIsErase resource (default: false)
  --enable-delete-is-del  set default deleteIsDEL resource (default: maybe)
  --enable-pty-erase      set default ptyInitialErase resource (default: maybe)
  --enable-alt-sends-esc  set default altSendsEscape resource (default: no)
  --enable-meta-sends-esc set default metaSendsEscape resource (default: no)
  --with-own-terminfo[=P] set default $TERMINFO (default: from environment)
  --enable-env-terminfo   setenv $TERMINFO if --with-own-terminfo gives value
Optional Features:
  --disable-active-icon   disable X11R6.3 active-icon feature
  --disable-ansi-color    disable ANSI color
  --disable-16-color      disable 16-color support
  --disable-256-color     disable 256-color support
  --disable-direct-color  disable direct-color support
  --disable-88-color      disable 88-color support
  --disable-blink-cursor  disable support for blinking cursor
  --enable-block-select   meta-button1 begins block-selection
  --enable-broken-osc     allow broken Linux OSC-strings
  --disable-broken-st     disallow broken string-terminators
  --enable-builtin-xpms   compile-in icon data
  --disable-c1-print      disallow -k8 option for printable 128-159
  --disable-bold-color    disable PC-style mapping of bold colors
  --disable-color-class   disable separate color class resources
  --disable-color-mode    disable default colorMode resource
  --disable-highlighting  disable support for color highlighting
  --disable-doublechars   disable support for double-size chars
  --disable-boxchars      disable fallback-support for box chars
  --disable-exec-selection disable "exec-formatted" and "exec-selection" actions
  --enable-exec-xterm     enable "spawn-new-terminal" action
  --enable-double-buffer  enable double-buffering in default resources
  --disable-freetype      disable freetype library-support
  --with-freetype-config  configure script to use for FreeType
  --with-freetype-cflags  -D/-I options for compiling with FreeType
  --with-freetype-libs    -L/-l options to link FreeType
  --enable-hp-fkeys       enable support for HP-style function keys
  --enable-sco-fkeys      enable support for SCO-style function keys
  --disable-sun-fkeys     disable support for Sun-style function keys
  --disable-fifo-lines    disable FIFO-storage for saved-lines
  --disable-i18n          disable internationalization
  --disable-initial-erase disable setup for stty erase
  --disable-input-method  disable input-method
  --enable-load-vt-fonts  enable load-vt-fonts() action
  --enable-logging        enable logging
  --enable-logfile-exec   enable exec'd logfile filter
  --disable-maximize      disable actions for iconify/deiconify/maximize/restore
  --disable-num-lock      disable NumLock keypad support
  --disable-paste64       disable get/set base64 selection data
  --disable-pty-handshake disable pty-handshake support
  --disable-readline-mouse disable support for mouse in readline applications
  --disable-regex         disable regular-expression selections
  --with-pcre2            use PCRE2 for regular-expressions
  --with-pcre             use PCRE for regular-expressions
  --disable-rightbar      disable right-scrollbar support
  --disable-samename      disable check for redundant name-change
  --disable-selection-ops disable selection-action operations
  --disable-session-mgt   disable support for session management
  --enable-status-line    enable support for status-line
  --disable-tcap-fkeys    disable termcap function-keys support
  --disable-tcap-query    disable compiled-in termcap-query support
  --disable-tek4014       disable tek4014 emulation
  --enable-toolbar        compile-in toolbar for pulldown menus
  --disable-vt52          disable VT52 emulation
  --disable-wide-attrs    disable wide-attribute support
  --disable-wide-chars    disable wide-character support
  --enable-16bit-chars    enable 16-bit character support
  --enable-mini-luit      enable mini-luit (built-in Latin9 support)
  --disable-luit          enable luit filter (Unicode translation)
  --enable-dabbrev        enable dynamic-abbreviation support
  --enable-dec-locator    enable DECterm Locator support
  --disable-screen-dumps  disable XHTML and SVG screen dumps
  --enable-regis-graphics enable ReGIS graphics support
  --disable-sixel-graphics disable sixel graphics support
  --disable-print-graphics disable screen dump to sixel support
  --disable-rectangles    disable VT420 rectangle support
  --disable-ziconbeep     disable -ziconbeep option
Testing/development Options:
  --enable-trace          test: set to enable debugging traces
  --with-dmalloc          test: use Gray Watson's dmalloc library
  --with-dbmalloc         test: use Conor Cahill's dbmalloc library
  --with-valgrind         test: use valgrind
  --disable-leaks         test: free permanent memory, analyze leaks
  --disable-echo          do not display "compiling" commands
  --enable-xmc-glitch     test: enable xmc magic-cookie emulation
  --enable-warnings       test: turn on gcc compiler warnings
  --enable-stdnoreturn    enable C11 _Noreturn feature for diagnostics
  --disable-rpath-hack    don't add rpath options for additional libraries

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.20250126.  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:1029: 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:1040: 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:1048: 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:1064: 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:1068: 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:1074: 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:1076:   former value:  $ac_old_val" >&5
echo "$as_me:   former value:  $ac_old_val" >&2;}
        { echo "$as_me:1078:   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:1097: 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:1099: 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:1128: PATH=\".;.\"; conftest.sh") >&5
  (PATH=".;."; conftest.sh) 2>&5
  ac_status=$?
  echo "$as_me:1131: \$? = $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 xtermcfg.h:xtermcfg.hin"

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:1159: 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:1169: error: cannot run $ac_config_sub" >&5
echo "$as_me: error: cannot run $ac_config_sub" >&2;}
   { (exit 1); exit 1; }; }

echo "$as_me:1173: 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:1182: 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:1186: 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:1191: 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:1199: 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:1208: 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:1213: 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:1239: 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:1243: 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:1245: 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

###	checks for alternative programs

case "$host_os" in
(openedition)	: "${CFLAGS=\"-O2 -Wc,dll -Wl,EDIT=NO\"}"
		: "${CPPFLAGS=\"-D_ALL_SOURCE\"}"
		: "${LIBS=\"/usr/lib/Xaw.x /usr/lib/SM.x /usr/lib/ICE.x /usr/lib/X11.x\"}"
		: "${CC=c89}";;
(darwin*)
		: "${LDFLAGS}=\"${LDFLAGS} -Wl,-bind_at_load\"";;
esac

ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
ac_main_return="return"
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:1270: 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:1285: found $ac_dir/$ac_word" >&5
break
done

fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
  echo "$as_me:1293: result: $CC" >&5
echo "${ECHO_T}$CC" >&6
else
  echo "$as_me:1296: 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:1305: 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:1320: 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:1328: result: $ac_ct_CC" >&5
echo "${ECHO_T}$ac_ct_CC" >&6
else
  echo "$as_me:1331: 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:1344: 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:1359: found $ac_dir/$ac_word" >&5
break
done

fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
  echo "$as_me:1367: result: $CC" >&5
echo "${ECHO_T}$CC" >&6
else
  echo "$as_me:1370: 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:1379: 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:1394: 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:1402: result: $ac_ct_CC" >&5
echo "${ECHO_T}$ac_ct_CC" >&6
else
  echo "$as_me:1405: 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:1418: 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:1438: 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:1460: result: $CC" >&5
echo "${ECHO_T}$CC" >&6
else
  echo "$as_me:1463: 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:1474: 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:1489: found $ac_dir/$ac_word" >&5
break
done

fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
  echo "$as_me:1497: result: $CC" >&5
echo "${ECHO_T}$CC" >&6
else
  echo "$as_me:1500: 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:1513: 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:1528: 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:1536: result: $ac_ct_CC" >&5
echo "${ECHO_T}$ac_ct_CC" >&6
else
  echo "$as_me:1539: 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:1551: 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:1556:" \
     "checking for C compiler version" >&5
ac_compiler=`set X $ac_compile; echo "$2"`
{ (eval echo "$as_me:1559: \"$ac_compiler --version </dev/null >&5\"") >&5
  (eval $ac_compiler --version </dev/null >&5) 2>&5
  ac_status=$?
  echo "$as_me:1562: \$? = $ac_status" >&5
  (exit "$ac_status"); }
{ (eval echo "$as_me:1564: \"$ac_compiler -v </dev/null >&5\"") >&5
  (eval $ac_compiler -v </dev/null >&5) 2>&5
  ac_status=$?
  echo "$as_me:1567: \$? = $ac_status" >&5
  (exit "$ac_status"); }
{ (eval echo "$as_me:1569: \"$ac_compiler -V </dev/null >&5\"") >&5
  (eval $ac_compiler -V </dev/null >&5) 2>&5
  ac_status=$?
  echo "$as_me:1572: \$? = $ac_status" >&5
  (exit "$ac_status"); }

cat >"conftest.$ac_ext" <<_ACEOF
#line 1576 "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:1592: 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:1595: \"$ac_link_default\"") >&5
  (eval $ac_link_default) 2>&5
  ac_status=$?
  echo "$as_me:1598: \$? = $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:1621: 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:1627: 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:1632: 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:1638: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:1641: \$? = $ac_status" >&5
  (exit "$ac_status"); }; }; then
    cross_compiling=no
  else
    if test "$cross_compiling" = maybe; then
	cross_compiling=yes
    else
	{ { echo "$as_me:1648: 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:1656: 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:1663: checking whether we are cross compiling" >&5
echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
echo "$as_me:1665: result: $cross_compiling" >&5
echo "${ECHO_T}$cross_compiling" >&6

echo "$as_me:1668: checking for executable suffix" >&5
echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
if { (eval echo "$as_me:1670: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:1673: \$? = $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:1689: 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:1695: 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:1701: 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 1707 "configure"
#include "confdefs.h"

int
main (void)
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.o conftest.obj
if { (eval echo "$as_me:1719: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:1722: \$? = $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:1734: 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:1741: result: $ac_cv_objext" >&5
echo "${ECHO_T}$ac_cv_objext" >&6
OBJEXT=$ac_cv_objext
ac_objext=$OBJEXT
echo "$as_me:1745: 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 1751 "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:1766: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:1769: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:1772: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:1775: \$? = $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:1787: 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:1793: 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 1799 "configure"
#include "confdefs.h"

int
main (void)
{

  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext"
if { (eval echo "$as_me:1811: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:1814: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:1817: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:1820: \$? = $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:1830: 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:1857: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:1860: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:1863: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:1866: \$? = $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 1878 "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:1891: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:1894: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:1897: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:1900: \$? = $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 1910 "configure"
#include "confdefs.h"
$ac_declaration
int
main (void)
{
exit (42);
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext"
if { (eval echo "$as_me:1922: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:1925: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:1928: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:1931: \$? = $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:1961: 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:1965: 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:1974: 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 1979 "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:1996: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:1999: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:2002: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:2005: \$? = $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:2016: result: $INTEL_COMPILER" >&5
echo "${ECHO_T}$INTEL_COMPILER" >&6
		;;
	esac
fi

CLANG_COMPILER=no

if test "$GCC" = yes ; then
	echo "$as_me:2025: 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 2029 "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:2046: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:2049: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:2052: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:2055: \$? = $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:2065: 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:2074: 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:2081: 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:2085: 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:2092: 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 2097 "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:2111: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:2114: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:2117: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:2120: \$? = $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:2131: 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}:2137: testing adding option $cf_clang_opt ..." 1>&5

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

		fi
	done
fi

echo "$as_me:2146: 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 2154 "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:2201: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:2204: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:2207: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:2210: \$? = $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:2227: result: none needed" >&5
echo "${ECHO_T}none needed" >&6 ;;
  *)
    echo "$as_me:2230: 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:2238: checking \$CFLAGS variable" >&5
echo $ECHO_N "checking \$CFLAGS variable... $ECHO_C" >&6
case "x$CFLAGS" in
(*-[IUD]*)
	echo "$as_me:2242: result: broken" >&5
echo "${ECHO_T}broken" >&6
	{ echo "$as_me:2244: 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:2352: result: ok" >&5
echo "${ECHO_T}ok" >&6
	;;
esac

echo "$as_me:2357: checking \$CC variable" >&5
echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
case "$CC" in
(*[\ \	]-*)
	echo "$as_me:2361: result: broken" >&5
echo "${ECHO_T}broken" >&6
	{ echo "$as_me:2363: 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}:2480: testing resulting CC: '$CC' ..." 1>&5

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

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

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

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

	;;
(*)
	echo "$as_me:2492: 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:2501: 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:2516: found $ac_dir/$ac_word" >&5
break
done

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

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

echo "$as_me:2535: 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:2547: 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:2564: found $ac_dir/$ac_word" >&5
   break
fi
done

  ;;
esac
fi
EGREP=$ac_cv_path_EGREP

if test -n "$EGREP"; then
  echo "$as_me:2575: result: $EGREP" >&5
echo "${ECHO_T}$EGREP" >&6
else
  echo "$as_me:2578: 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:2586: error: cannot find workable egrep" >&5
echo "$as_me: error: cannot find workable egrep" >&2;}
   { (exit 1); exit 1; }; }
   fi
fi
echo "$as_me:2591: 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:2601: 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 2622 "configure"
#include "confdefs.h"
#include <assert.h>
                     Syntax error
_ACEOF
if { (eval echo "$as_me:2627: \"$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:2633: \$? = $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 2656 "configure"
#include "confdefs.h"
#include <ac_nonexistent.h>
_ACEOF
if { (eval echo "$as_me:2660: \"$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:2666: \$? = $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:2703: 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 2713 "configure"
#include "confdefs.h"
#include <assert.h>
                     Syntax error
_ACEOF
if { (eval echo "$as_me:2718: \"$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:2724: \$? = $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 2747 "configure"
#include "confdefs.h"
#include <ac_nonexistent.h>
_ACEOF
if { (eval echo "$as_me:2751: \"$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:2757: \$? = $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:2785: 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"

for ac_prog in mawk gawk nawk awk
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:2801: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_AWK+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$AWK"; then
  ac_cv_prog_AWK="$AWK" # 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_AWK="$ac_prog"
echo "$as_me:2816: found $ac_dir/$ac_word" >&5
break
done

fi
fi
AWK=$ac_cv_prog_AWK
if test -n "$AWK"; then
  echo "$as_me:2824: result: $AWK" >&5
echo "${ECHO_T}$AWK" >&6
else
  echo "$as_me:2827: result: no" >&5
echo "${ECHO_T}no" >&6
fi

  test -n "$AWK" && break
done

# 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:2846: 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:2895: 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'

echo "$as_me:2906: 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:2910: result: yes" >&5
echo "${ECHO_T}yes" >&6
else
  echo "$as_me:2913: result: no, using $LN_S" >&5
echo "${ECHO_T}no, using $LN_S" >&6
fi

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

for ac_prog in lint cppcheck 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:2934: 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:2949: found $ac_dir/$ac_word" >&5
break
done

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

  test -n "$LINT" && break
done

case "x$LINT" in
(xlint|x*/lint) # NetBSD 10
	test -z "$LINT_OPTS" && LINT_OPTS="-chapbrxzgFS -v -Ac11"
	;;
(xcppcheck|x*/cppcheck)
	test -z "$LINT_OPTS" && LINT_OPTS="--enable=all -D__CPPCHECK__"
	;;
esac

###	checks for compiler characteristics

echo "$as_me:2978: 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 2985 "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:3004: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:3007: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:3010: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:3013: \$? = $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:3024: 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=700
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:3066: 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 3073 "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:3092: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:3095: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:3098: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:3101: \$? = $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:3112: 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:3120: 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 3132 "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:3151: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:3154: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:3157: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:3160: \$? = $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:3172: 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:3177: 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 3282 "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:3302: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:3305: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:3308: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:3311: \$? = $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:3322: 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:3331: 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 3338 "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:3353: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:3356: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:3359: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:3362: \$? = $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 3469 "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:3484: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:3487: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:3490: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:3493: \$? = $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:3508: 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:3513: 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 3523 "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:3538: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:3541: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:3544: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:3547: \$? = $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:3558: 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

	;;
linux*musl)
	cf_xopen_source="-D_BSD_SOURCE"
	;;
(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:3598: 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}:3604: testing if the symbol is already defined go no further ..." 1>&5

	cat >"conftest.$ac_ext" <<_ACEOF
#line 3607 "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:3622: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:3625: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:3628: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:3631: \$? = $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 3652 "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:3667: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:3670: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:3673: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:3676: \$? = $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}:3687: 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}:3695: testing if the second compile does not leave our definition intact error ..." 1>&5

	 cat >"conftest.$ac_ext" <<_ACEOF
#line 3698 "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:3713: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:3716: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:3719: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:3722: \$? = $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:3738: 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:3855: 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:3887: 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 3894 "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:3912: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:3915: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:3918: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:3921: \$? = $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 3933 "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:3951: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:3954: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:3957: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:3960: \$? = $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:3975: 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:4135: 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}:4141: testing if the symbol is already defined go no further ..." 1>&5

	cat >"conftest.$ac_ext" <<_ACEOF
#line 4144 "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:4159: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:4162: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:4165: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:4168: \$? = $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 4189 "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:4204: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:4207: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:4210: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:4213: \$? = $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}:4224: 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}:4232: testing if the second compile does not leave our definition intact error ..." 1>&5

	 cat >"conftest.$ac_ext" <<_ACEOF
#line 4235 "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:4250: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:4253: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:4256: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:4259: \$? = $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:4275: 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}:4388: testing checking if _POSIX_C_SOURCE interferes with _XOPEN_SOURCE ..." 1>&5

		cat >"conftest.$ac_ext" <<_ACEOF
#line 4391 "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:4409: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:4412: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:4415: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:4418: \$? = $ac_status" >&5
  (exit "$ac_status"); }; }; then
  :
else
  echo "$as_me: failed program was:" >&5
cat "conftest.$ac_ext" >&5

			{ echo "$as_me:4425: 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}:4448: 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}:4460: 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}:4548: 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}:4558: 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}:4568: 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:4580: 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 4583 "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:4598: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:4601: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:4604: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:4607: \$? = $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:4616: 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 4621 "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:4636: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:4639: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:4642: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:4645: \$? = $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:4656: WARNING: _XOPEN_SOURCE is lower than requested" >&5
echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
		fi
	else

echo "$as_me:4661: 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 4668 "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:4686: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:4689: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:4692: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:4695: \$? = $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 4707 "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:4725: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:4728: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:4731: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:4734: \$? = $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:4749: 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:4896: 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 4903 "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:4918: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:4921: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:4924: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:4927: \$? = $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 4934 "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:4952: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:4955: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:4958: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:4961: \$? = $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:4975: 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:4979: 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 4990 "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:5012: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:5015: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:5018: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:5021: \$? = $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:5035: 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

###	checks for header files

echo "$as_me:5045: 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 5051 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <float.h>

_ACEOF
if { (eval echo "$as_me:5059: \"$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:5065: \$? = $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 5087 "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 5105 "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 5126 "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:5152: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:5155: \$? = $ac_status" >&5
  (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
  { (eval echo "$as_me:5157: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:5160: \$? = $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:5173: 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:5189: 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 5195 "configure"
#include "confdefs.h"
$ac_includes_default
#include <$ac_header>
_ACEOF
rm -f "conftest.$ac_objext"
if { (eval echo "$as_me:5201: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:5204: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:5207: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:5210: \$? = $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:5220: 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:5230: 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 5236 "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:5251: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:5254: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:5257: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:5260: \$? = $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:5270: result: $ac_cv_have_decl_exit" >&5
echo "${ECHO_T}$ac_cv_have_decl_exit" >&6

for ac_header in \
ncurses/curses.h \
ncurses/term.h \
sys/ptem.h \
sys/ttydefaults.h \
term.h \
termios.h \
wchar.h \

do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
echo "$as_me:5284: 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 5290 "configure"
#include "confdefs.h"
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:5294: \"$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:5300: \$? = $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:5319: 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:5329: 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 5335 "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:5351: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:5354: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:5357: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:5360: \$? = $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:5370: 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:5380: 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 5386 "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:5400: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:5403: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:5406: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:5409: \$? = $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:5420: 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

###	checks for typedefs

echo "$as_me:5432: checking for signal global datatype" >&5
echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
if test "${cf_cv_sig_atomic_t+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

	for cf_type in \
		"volatile sig_atomic_t" \
		"sig_atomic_t" \
		"int"
	do
	cat >"conftest.$ac_ext" <<_ACEOF
#line 5444 "configure"
#include "confdefs.h"

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

extern $cf_type x;
$cf_type x;
static void handler(int sig)
{
	(void)sig;
	x = 5;
}
int
main (void)
{
signal(SIGINT, handler);
		 x = 1
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext"
if { (eval echo "$as_me:5468: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:5471: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:5474: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:5477: \$? = $ac_status" >&5
  (exit "$ac_status"); }; }; then
  cf_cv_sig_atomic_t=$cf_type
else
  echo "$as_me: failed program was:" >&5
cat "conftest.$ac_ext" >&5
cf_cv_sig_atomic_t=no
fi
rm -f "conftest.$ac_objext" "conftest.$ac_ext"
		test "$cf_cv_sig_atomic_t" != no && break
	done

fi

echo "$as_me:5491: result: $cf_cv_sig_atomic_t" >&5
echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
test "$cf_cv_sig_atomic_t" != no &&
cat >>confdefs.h <<EOF
#define SIG_ATOMIC_T $cf_cv_sig_atomic_t
EOF

echo "$as_me:5498: 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 5504 "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:5519: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:5522: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:5525: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:5528: \$? = $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:5538: 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

echo "$as_me:5550: checking for cc_t in <termios.h> or <termio.h>" >&5
echo $ECHO_N "checking for cc_t in <termios.h> or <termio.h>... $ECHO_C" >&6
if test "${cf_cv_type_cc_t+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

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

#include <sys/types.h>
#if defined(HAVE_TERMIOS_H)
#include <termios.h>
#else
#include <termio.h>
#include <sys/ioctl.h>
#endif

int
main (void)
{
cc_t x; (void)x
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext"
if { (eval echo "$as_me:5577: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:5580: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:5583: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:5586: \$? = $ac_status" >&5
  (exit "$ac_status"); }; }; then
  cf_cv_type_cc_t=yes
else
  echo "$as_me: failed program was:" >&5
cat "conftest.$ac_ext" >&5
cf_cv_type_cc_t=no
fi
rm -f "conftest.$ac_objext" "conftest.$ac_ext"

fi

echo "$as_me:5598: result: $cf_cv_type_cc_t" >&5
echo "${ECHO_T}$cf_cv_type_cc_t" >&6
test $cf_cv_type_cc_t = no &&
cat >>confdefs.h <<\EOF
#define cc_t unsigned char
EOF

echo "$as_me:5605: checking for nfds_t in <poll.h>" >&5
echo $ECHO_N "checking for nfds_t in <poll.h>... $ECHO_C" >&6
if test "${cf_cv_type_nfds_t+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

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

$ac_includes_default
#include <poll.h>

int
main (void)
{
nfds_t x; (void)x
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext"
if { (eval echo "$as_me:5627: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:5630: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:5633: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:5636: \$? = $ac_status" >&5
  (exit "$ac_status"); }; }; then
  cf_cv_type_nfds_t=yes
else
  echo "$as_me: failed program was:" >&5
cat "conftest.$ac_ext" >&5
cf_cv_type_nfds_t=no
fi
rm -f "conftest.$ac_objext" "conftest.$ac_ext"

fi

echo "$as_me:5648: result: $cf_cv_type_nfds_t" >&5
echo "${ECHO_T}$cf_cv_type_nfds_t" >&6
test $cf_cv_type_nfds_t = no &&
cat >>confdefs.h <<\EOF
#define nfds_t unsigned
EOF

echo "$as_me:5655: 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 5661 "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:5676: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:5679: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:5682: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:5685: \$? = $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:5695: 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:5707: 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 5713 "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:5728: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:5731: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:5734: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:5737: \$? = $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:5747: 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:5759: 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 5765 "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:5779: 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:5793: 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 5799 "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:5814: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:5817: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:5820: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:5823: \$? = $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:5833: 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

###	checks for library functions

for ac_func in \
	gethostname \
	getusershell \
	endusershell \
	getlogin \
	initgroups \
	mkdtemp \
	putenv \
	unsetenv \
	sched_yield \
	setpgid \
	setsid \
	tcgetattr \
	waitpid \
	wcswidth \
	wcwidth
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:5865: 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 5871 "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:5902: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:5905: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:5908: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:5911: \$? = $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:5921: 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

cf_save_libs="$LIBS"
echo "$as_me:5932: 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 5938 "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:5969: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:5972: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:5975: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:5978: \$? = $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:5988: 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
  cf_cv_test_clock_gettime=yes
else
  echo "$as_me:5993: 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 6001 "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:6020: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:6023: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:6026: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:6029: \$? = $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:6040: 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
  LIBS="-lrt $LIBS"
		 cf_cv_test_clock_gettime=yes
else
  cf_cv_test_clock_gettime=no
fi

fi

if test "$cf_cv_test_clock_gettime" = yes ; then
echo "$as_me:6052: checking if clock_gettime links" >&5
echo $ECHO_N "checking if clock_gettime links... $ECHO_C" >&6
if test "${cf_cv_func_clock_gettime+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

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

$ac_includes_default
#include <time.h>

int
main (void)
{
struct timespec ts;
		int rc = clock_gettime(CLOCK_REALTIME, &ts)
			   + clock_gettime(CLOCK_MONOTONIC, &ts);
		 (void) rc; (void)ts
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext" "conftest$ac_exeext"
if { (eval echo "$as_me:6077: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:6080: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:6083: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:6086: \$? = $ac_status" >&5
  (exit "$ac_status"); }; }; then
  cf_cv_func_clock_gettime=yes
else
  echo "$as_me: failed program was:" >&5
cat "conftest.$ac_ext" >&5
cf_cv_func_clock_gettime=no
fi
rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"

fi
echo "$as_me:6097: result: $cf_cv_func_clock_gettime" >&5
echo "${ECHO_T}$cf_cv_func_clock_gettime" >&6
else
	cf_cv_func_clock_gettime=no
fi

if test "$cf_cv_func_clock_gettime" = yes
then

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

else
echo "$as_me:6111: checking for gettimeofday" >&5
echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
if test "${ac_cv_func_gettimeofday+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >"conftest.$ac_ext" <<_ACEOF
#line 6117 "configure"
#include "confdefs.h"
#define gettimeofday autoconf_temporary
#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
#undef gettimeofday

#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 gettimeofday (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_gettimeofday) || defined (__stub___gettimeofday)
#error found stub for gettimeofday
#endif

	return gettimeofday ();
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext" "conftest$ac_exeext"
if { (eval echo "$as_me:6148: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:6151: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:6154: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:6157: \$? = $ac_status" >&5
  (exit "$ac_status"); }; }; then
  ac_cv_func_gettimeofday=yes
else
  echo "$as_me: failed program was:" >&5
cat "conftest.$ac_ext" >&5
ac_cv_func_gettimeofday=no
fi
rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
fi
echo "$as_me:6167: result: $ac_cv_func_gettimeofday" >&5
echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
if test "$ac_cv_func_gettimeofday" = yes; then

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

else

echo "$as_me:6177: checking for gettimeofday in -lbsd" >&5
echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
if test "${ac_cv_lib_bsd_gettimeofday+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 6185 "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 gettimeofday (void);
int
main (void)
{
gettimeofday ();
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext" "conftest$ac_exeext"
if { (eval echo "$as_me:6204: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:6207: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:6210: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:6213: \$? = $ac_status" >&5
  (exit "$ac_status"); }; }; then
  ac_cv_lib_bsd_gettimeofday=yes
else
  echo "$as_me: failed program was:" >&5
cat "conftest.$ac_ext" >&5
ac_cv_lib_bsd_gettimeofday=no
fi
rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:6224: result: $ac_cv_lib_bsd_gettimeofday" >&5
echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
if test "$ac_cv_lib_bsd_gettimeofday" = yes; then

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

cf_add_libs="$LIBS"
# reverse order
cf_add_0lib=
for cf_add_1lib in -lbsd; 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
fi

echo "$as_me:6253: checking for strftime function" >&5
echo $ECHO_N "checking for strftime function... $ECHO_C" >&6
if test "${cf_cv_func_strftime+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

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

$ac_includes_default
#include <time.h>

int
main (void)
{

	time_t now = time((time_t*)0);
	struct tm *tm = localtime(&now);
	char buffer[80];
	size_t result = strftime(buffer, sizeof(buffer), "%c", tm);

	(void)result;
	(void)buffer;

  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext" "conftest$ac_exeext"
if { (eval echo "$as_me:6283: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:6286: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:6289: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:6292: \$? = $ac_status" >&5
  (exit "$ac_status"); }; }; then
  cf_cv_func_strftime=yes
else
  echo "$as_me: failed program was:" >&5
cat "conftest.$ac_ext" >&5
cf_cv_func_strftime=no
fi
rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"

fi
echo "$as_me:6303: result: $cf_cv_func_strftime" >&5
echo "${ECHO_T}$cf_cv_func_strftime" >&6

test "$cf_cv_func_strftime" = yes &&
cat >>confdefs.h <<\EOF
#define HAVE_STRFTIME 1
EOF

for ac_header in \
unistd.h \

do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
echo "$as_me:6316: 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 6322 "configure"
#include "confdefs.h"
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:6326: \"$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:6332: \$? = $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:6351: 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:6361: checking for working mkstemp" >&5
echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
if test "${cf_cv_func_mkstemp+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

rm -rf ./conftest*
if test "$cross_compiling" = yes; then
  cf_cv_func_mkstemp=maybe
else
  cat >"conftest.$ac_ext" <<_ACEOF
#line 6372 "configure"
#include "confdefs.h"

$ac_includes_default

int main(void)
{
	static char tmpl[] = "conftestXXXXXX";
	char name[2][80];
	int n;
	int result = 0;
	int fd;
	struct stat sb;

	umask(077);
	for (n = 0; n < 2; ++n) {
		strcpy(name[n], tmpl);
		if ((fd = mkstemp(name[n])) >= 0) {
			if (!strcmp(name[n], tmpl)
			 || stat(name[n], &sb) != 0
			 || (sb.st_mode & S_IFMT) != S_IFREG
			 || (sb.st_mode & 077) != 0) {
				result = 1;
			}
			close(fd);
		}
	}
	if (result == 0
	 && !strcmp(name[0], name[1]))
		result = 1;
	${cf_cv_main_return:-return}(result);
}

_ACEOF
rm -f "conftest$ac_exeext"
if { (eval echo "$as_me:6407: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:6410: \$? = $ac_status" >&5
  (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
  { (eval echo "$as_me:6412: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:6415: \$? = $ac_status" >&5
  (exit "$ac_status"); }; }; then
  cf_cv_func_mkstemp=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_mkstemp=no

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

fi
echo "$as_me:6430: result: $cf_cv_func_mkstemp" >&5
echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
if test "x$cf_cv_func_mkstemp" = xmaybe ; then
	echo "$as_me:6433: checking for mkstemp" >&5
echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
if test "${ac_cv_func_mkstemp+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >"conftest.$ac_ext" <<_ACEOF
#line 6439 "configure"
#include "confdefs.h"
#define mkstemp autoconf_temporary
#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
#undef mkstemp

#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 mkstemp (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_mkstemp) || defined (__stub___mkstemp)
#error found stub for mkstemp
#endif

	return mkstemp ();
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext" "conftest$ac_exeext"
if { (eval echo "$as_me:6470: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:6473: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:6476: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:6479: \$? = $ac_status" >&5
  (exit "$ac_status"); }; }; then
  ac_cv_func_mkstemp=yes
else
  echo "$as_me: failed program was:" >&5
cat "conftest.$ac_ext" >&5
ac_cv_func_mkstemp=no
fi
rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
fi
echo "$as_me:6489: result: $ac_cv_func_mkstemp" >&5
echo "${ECHO_T}$ac_cv_func_mkstemp" >&6

fi
if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then

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

fi

echo "$as_me:6501: checking if setitimer is available" >&5
echo $ECHO_N "checking if setitimer is available... $ECHO_C" >&6
if test "${cf_cv_func_setitimer+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

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

$ac_includes_default
#include <sys/time.h>

int
main (void)
{

    struct itimerval it;
    memset(&it, 0, sizeof(struct itimerval));
    it.it_value.tv_sec = 1;
    setitimer(ITIMER_REAL, &it, NULL);

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

fi
echo "$as_me:6548: result: $cf_cv_func_setitimer" >&5
echo "${ECHO_T}$cf_cv_func_setitimer" >&6
test "$cf_cv_func_setitimer" != no &&
cat >>confdefs.h <<\EOF
#define HAVE_SETITIMER 1
EOF

for ac_header in lastlog.h paths.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
echo "$as_me:6558: 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 6564 "configure"
#include "confdefs.h"
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:6568: \"$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:6574: \$? = $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:6593: 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:6603: checking for lastlog path" >&5
echo $ECHO_N "checking for lastlog path... $ECHO_C" >&6
if test "${cf_cv_path_lastlog+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

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

#include <sys/types.h>
#ifdef HAVE_LASTLOG_H
#include <lastlog.h>
#else
#ifdef HAVE_PATHS_H
#include <paths.h>
#endif
#endif
int
main (void)
{
static char path[] = _PATH_LASTLOG; (void)path
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext"
if { (eval echo "$as_me:6630: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:6633: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:6636: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:6639: \$? = $ac_status" >&5
  (exit "$ac_status"); }; }; then
  cf_cv_path_lastlog="_PATH_LASTLOG"
else
  echo "$as_me: failed program was:" >&5
cat "conftest.$ac_ext" >&5
if test -f /usr/adm/lastlog ; then
	 	cf_cv_path_lastlog=/usr/adm/lastlog
	else
		cf_cv_path_lastlog=no
	fi
fi
rm -f "conftest.$ac_objext" "conftest.$ac_ext"

fi
echo "$as_me:6654: result: $cf_cv_path_lastlog" >&5
echo "${ECHO_T}$cf_cv_path_lastlog" >&6
test "$cf_cv_path_lastlog" != no &&
cat >>confdefs.h <<\EOF
#define USE_LASTLOG 1
EOF

echo "$as_me:6661: checking for utmp implementation" >&5
echo $ECHO_N "checking for utmp implementation... $ECHO_C" >&6
if test "${cf_cv_have_utmp+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

	cf_cv_have_utmp=no
for cf_header in utmpx utmp ; do
cf_utmp_includes="
#include <sys/types.h>
#include <${cf_header}.h>
#define getutent getutxent
#ifdef USE_LASTLOG
#include <lastlog.h>	/* may conflict with utmpx.h on Linux */
#endif
"
	cat >"conftest.$ac_ext" <<_ACEOF
#line 6678 "configure"
#include "confdefs.h"
$cf_utmp_includes
int
main (void)
{
struct $cf_header x;
	 char *name = x.ut_name; /* utmp.h and compatible definitions */
	 (void)x;
	 (void)name;

  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext"
if { (eval echo "$as_me:6694: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:6697: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:6700: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:6703: \$? = $ac_status" >&5
  (exit "$ac_status"); }; }; then
  cf_cv_have_utmp=$cf_header
	 break
else
  echo "$as_me: failed program was:" >&5
cat "conftest.$ac_ext" >&5

	cat >"conftest.$ac_ext" <<_ACEOF
#line 6712 "configure"
#include "confdefs.h"
$cf_utmp_includes
int
main (void)
{
struct $cf_header x;
	 char *name = x.ut_user; /* utmpx.h must declare this */
	 (void)x;
	 (void)name;

  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext"
if { (eval echo "$as_me:6728: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:6731: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:6734: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:6737: \$? = $ac_status" >&5
  (exit "$ac_status"); }; }; then
  cf_cv_have_utmp=$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"
fi
rm -f "conftest.$ac_objext" "conftest.$ac_ext"
done

fi
echo "$as_me:6752: result: $cf_cv_have_utmp" >&5
echo "${ECHO_T}$cf_cv_have_utmp" >&6

if test "$cf_cv_have_utmp" != no ; then

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

	test "$cf_cv_have_utmp" = utmpx &&
cat >>confdefs.h <<\EOF
#define UTMPX_FOR_UTMP 1
EOF

if test "$cf_cv_have_utmp" != no ; then
echo "$as_me:6767: checking if ${cf_cv_have_utmp}.ut_host is declared" >&5
echo $ECHO_N "checking if ${cf_cv_have_utmp}.ut_host is declared... $ECHO_C" >&6
if test "${cf_cv_have_utmp_ut_host+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

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

#include <sys/types.h>
#include <${cf_cv_have_utmp}.h>
int
main (void)
{
struct $cf_cv_have_utmp x;
	 char *y = &x.ut_host[0];
	 (void)x;
	 (void)y
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext"
if { (eval echo "$as_me:6791: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:6794: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:6797: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:6800: \$? = $ac_status" >&5
  (exit "$ac_status"); }; }; then
  cf_cv_have_utmp_ut_host=yes
else
  echo "$as_me: failed program was:" >&5
cat "conftest.$ac_ext" >&5
cf_cv_have_utmp_ut_host=no
fi
rm -f "conftest.$ac_objext" "conftest.$ac_ext"

fi

echo "$as_me:6812: result: $cf_cv_have_utmp_ut_host" >&5
echo "${ECHO_T}$cf_cv_have_utmp_ut_host" >&6
test "$cf_cv_have_utmp_ut_host" != no &&
cat >>confdefs.h <<\EOF
#define HAVE_UTMP_UT_HOST 1
EOF

fi

if test "$cf_cv_have_utmp" != no ; then
echo "$as_me:6822: checking if ${cf_cv_have_utmp}.ut_syslen is declared" >&5
echo $ECHO_N "checking if ${cf_cv_have_utmp}.ut_syslen is declared... $ECHO_C" >&6
if test "${cf_cv_have_utmp_ut_syslen+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

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

#include <sys/types.h>
#include <${cf_cv_have_utmp}.h>
int
main (void)
{
struct $cf_cv_have_utmp x;
	 int y = x.ut_syslen;
	 (void)x;
	 (void)y
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext"
if { (eval echo "$as_me:6846: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:6849: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:6852: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:6855: \$? = $ac_status" >&5
  (exit "$ac_status"); }; }; then
  cf_cv_have_utmp_ut_syslen=yes
else
  echo "$as_me: failed program was:" >&5
cat "conftest.$ac_ext" >&5
cf_cv_have_utmp_ut_syslen=no
fi
rm -f "conftest.$ac_objext" "conftest.$ac_ext"

fi

echo "$as_me:6867: result: $cf_cv_have_utmp_ut_syslen" >&5
echo "${ECHO_T}$cf_cv_have_utmp_ut_syslen" >&6
test "$cf_cv_have_utmp_ut_syslen" != no &&
cat >>confdefs.h <<\EOF
#define HAVE_UTMP_UT_SYSLEN 1
EOF

fi

if test "$cf_cv_have_utmp" != no ; then
echo "$as_me:6877: checking if ${cf_cv_have_utmp}.ut_name is declared" >&5
echo $ECHO_N "checking if ${cf_cv_have_utmp}.ut_name is declared... $ECHO_C" >&6
if test "${cf_cv_have_utmp_ut_name+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

	cf_cv_have_utmp_ut_name=no
cf_utmp_includes="
#include <sys/types.h>
#include <${cf_cv_have_utmp}.h>
#define getutent getutxent
#ifdef USE_LASTLOG
#include <lastlog.h>		/* may conflict with utmpx.h on Linux */
#endif
"
for cf_header in ut_name ut_user ; do
	cat >"conftest.$ac_ext" <<_ACEOF
#line 6894 "configure"
#include "confdefs.h"
$cf_utmp_includes
int
main (void)
{
struct $cf_cv_have_utmp x;
	 char *name = x.$cf_header;
	 (void)x;
	 (void)name;

  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext"
if { (eval echo "$as_me:6910: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:6913: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:6916: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:6919: \$? = $ac_status" >&5
  (exit "$ac_status"); }; }; then
  cf_cv_have_utmp_ut_name=$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:6931: result: $cf_cv_have_utmp_ut_name" >&5
echo "${ECHO_T}$cf_cv_have_utmp_ut_name" >&6

case "$cf_cv_have_utmp_ut_name" in
(no)
	{ { echo "$as_me:6936: error: Cannot find declaration for ut.ut_name" >&5
echo "$as_me: error: Cannot find declaration for ut.ut_name" >&2;}
   { (exit 1); exit 1; }; }
	;;
(ut_user)

cat >>confdefs.h <<\EOF
#define ut_name ut_user
EOF

	;;
esac
fi

if test "$cf_cv_have_utmp" != no ; then
echo "$as_me:6951: checking for exit-status in $cf_cv_have_utmp" >&5
echo $ECHO_N "checking for exit-status in $cf_cv_have_utmp... $ECHO_C" >&6
if test "${cf_cv_have_utmp_ut_xstatus+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

for cf_result in \
	ut_exit.__e_exit \
	ut_exit.e_exit \
	ut_exit.ut_e_exit \
	ut_exit.ut_exit
do
cat >"conftest.$ac_ext" <<_ACEOF
#line 6964 "configure"
#include "confdefs.h"

#include <sys/types.h>
#include <${cf_cv_have_utmp}.h>
int
main (void)
{
struct $cf_cv_have_utmp x;
	 long y = x.$cf_result = 0;
	 (void)x;
	 (void)y
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext"
if { (eval echo "$as_me:6981: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:6984: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:6987: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:6990: \$? = $ac_status" >&5
  (exit "$ac_status"); }; }; then
  cf_cv_have_utmp_ut_xstatus=$cf_result
	 break
else
  echo "$as_me: failed program was:" >&5
cat "conftest.$ac_ext" >&5
cf_cv_have_utmp_ut_xstatus=no
fi
rm -f "conftest.$ac_objext" "conftest.$ac_ext"
done

fi
echo "$as_me:7003: result: $cf_cv_have_utmp_ut_xstatus" >&5
echo "${ECHO_T}$cf_cv_have_utmp_ut_xstatus" >&6
if test "$cf_cv_have_utmp_ut_xstatus" != no ; then

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

cat >>confdefs.h <<EOF
#define ut_xstatus $cf_cv_have_utmp_ut_xstatus
EOF

fi
fi

if test "$cf_cv_have_utmp" != no ; then
echo "$as_me:7019: checking if ${cf_cv_have_utmp}.ut_xtime is declared" >&5
echo $ECHO_N "checking if ${cf_cv_have_utmp}.ut_xtime is declared... $ECHO_C" >&6
if test "${cf_cv_have_utmp_ut_xtime+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

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

#include <sys/types.h>
#include <${cf_cv_have_utmp}.h>
int
main (void)
{
struct $cf_cv_have_utmp x;
	 long y = x.ut_xtime = 0;
	 (void)x;
	 (void)y
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext"
if { (eval echo "$as_me:7043: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:7046: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:7049: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:7052: \$? = $ac_status" >&5
  (exit "$ac_status"); }; }; then
  cf_cv_have_utmp_ut_xtime=yes
else
  echo "$as_me: failed program was:" >&5
cat "conftest.$ac_ext" >&5
cat >"conftest.$ac_ext" <<_ACEOF
#line 7059 "configure"
#include "confdefs.h"

#include <sys/types.h>
#include <${cf_cv_have_utmp}.h>
int
main (void)
{
struct $cf_cv_have_utmp x;
	 long y = x.ut_tv.tv_sec;
	 (void)x;
	 (void)y
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext"
if { (eval echo "$as_me:7076: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:7079: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:7082: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:7085: \$? = $ac_status" >&5
  (exit "$ac_status"); }; }; then
  cf_cv_have_utmp_ut_xtime=define
else
  echo "$as_me: failed program was:" >&5
cat "conftest.$ac_ext" >&5
cf_cv_have_utmp_ut_xtime=no
fi
rm -f "conftest.$ac_objext" "conftest.$ac_ext"

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

fi
echo "$as_me:7099: result: $cf_cv_have_utmp_ut_xtime" >&5
echo "${ECHO_T}$cf_cv_have_utmp_ut_xtime" >&6
if test "$cf_cv_have_utmp_ut_xtime" != no ; then

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

	if test "$cf_cv_have_utmp_ut_xtime" = define ; then

cat >>confdefs.h <<\EOF
#define ut_xtime ut_tv.tv_sec
EOF

	fi
fi
fi

if test "$cf_cv_have_utmp" != no ; then
echo "$as_me:7118: checking if ${cf_cv_have_utmp}.ut_session is declared" >&5
echo $ECHO_N "checking if ${cf_cv_have_utmp}.ut_session is declared... $ECHO_C" >&6
if test "${cf_cv_have_utmp_ut_session+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

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

#include <sys/types.h>
#include <${cf_cv_have_utmp}.h>
int
main (void)
{
static struct $cf_cv_have_utmp x;
	 long y = x.ut_session;
	 (void)x;
	 (void)y
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext"
if { (eval echo "$as_me:7142: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:7145: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:7148: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:7151: \$? = $ac_status" >&5
  (exit "$ac_status"); }; }; then
  cf_cv_have_utmp_ut_session=yes
else
  echo "$as_me: failed program was:" >&5
cat "conftest.$ac_ext" >&5
cf_cv_have_utmp_ut_session=no
fi
rm -f "conftest.$ac_objext" "conftest.$ac_ext"

fi
echo "$as_me:7162: result: $cf_cv_have_utmp_ut_session" >&5
echo "${ECHO_T}$cf_cv_have_utmp_ut_session" >&6
if test "$cf_cv_have_utmp_ut_session" != no ; then

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

fi
fi

echo "$as_me:7173: checking if $cf_cv_have_utmp is SYSV flavor" >&5
echo $ECHO_N "checking if $cf_cv_have_utmp is SYSV flavor... $ECHO_C" >&6
if test "${cf_cv_sysv_utmp+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

test "$cf_cv_have_utmp" = "utmp" && cf_prefix="ut" || cf_prefix="utx"
cat >"conftest.$ac_ext" <<_ACEOF
#line 7181 "configure"
#include "confdefs.h"

#include <sys/types.h>
#include <${cf_cv_have_utmp}.h>
int
main (void)
{

struct $cf_cv_have_utmp x;
	set${cf_prefix}ent ();
	get${cf_prefix}id(&x);
	put${cf_prefix}line(&x);
	end${cf_prefix}ent();
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext" "conftest$ac_exeext"
if { (eval echo "$as_me:7200: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:7203: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:7206: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:7209: \$? = $ac_status" >&5
  (exit "$ac_status"); }; }; then
  cf_cv_sysv_utmp=yes
else
  echo "$as_me: failed program was:" >&5
cat "conftest.$ac_ext" >&5
cf_cv_sysv_utmp=no
fi
rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"

fi
echo "$as_me:7220: result: $cf_cv_sysv_utmp" >&5
echo "${ECHO_T}$cf_cv_sysv_utmp" >&6
test "$cf_cv_sysv_utmp" = yes &&
cat >>confdefs.h <<\EOF
#define USE_SYSV_UTMP 1
EOF

fi

for ac_header in lastlog.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
echo "$as_me:7232: 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 7238 "configure"
#include "confdefs.h"
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:7242: \"$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:7248: \$? = $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:7267: 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:7277: checking for struct lastlog" >&5
echo $ECHO_N "checking for struct lastlog... $ECHO_C" >&6
if test "${cf_cv_struct_lastlog+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

if test "$cross_compiling" = yes; then

cf_cv_struct_lastlog=unknown
else
  cat >"conftest.$ac_ext" <<_ACEOF
#line 7288 "configure"
#include "confdefs.h"

$ac_includes_default

#include <time.h>
#include <lastlog.h>

int main(void)
{
	struct lastlog data;
	return (sizeof(data.ll_time) != sizeof(time_t));
}
_ACEOF
rm -f "conftest$ac_exeext"
if { (eval echo "$as_me:7303: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:7306: \$? = $ac_status" >&5
  (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
  { (eval echo "$as_me:7308: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:7311: \$? = $ac_status" >&5
  (exit "$ac_status"); }; }; then

cf_cv_struct_lastlog=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_struct_lastlog=no
fi
rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
fi
fi
echo "$as_me:7325: result: $cf_cv_struct_lastlog" >&5
echo "${ECHO_T}$cf_cv_struct_lastlog" >&6

test $cf_cv_struct_lastlog != no &&
cat >>confdefs.h <<\EOF
#define USE_STRUCT_LASTLOG 1
EOF

for ac_header in \
sys/param.h \

do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
echo "$as_me:7338: 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 7344 "configure"
#include "confdefs.h"
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:7348: \"$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:7354: \$? = $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:7373: 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:7383: checking if POSIX saved-ids are supported" >&5
echo $ECHO_N "checking if POSIX saved-ids are supported... $ECHO_C" >&6
if test "${cf_cv_posix_saved_ids+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

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

#include <unistd.h>
#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>		/* this may define "BSD" */
#endif

int
main (void)
{

#if defined(_POSIX_SAVED_IDS) && (_POSIX_SAVED_IDS > 0)
	int (*my_seteuid)(uid_t) = seteuid;
	int x = my_seteuid(geteuid());
	(void)x;
#elif defined(BSD) && (BSD >= 199103)
/* The BSD's may implement the runtime check - and it fails.
 * However, saved-ids work almost like POSIX (close enough for most uses).
 */
#else
#error no saved-ids found
#endif

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

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

if test "$cross_compiling" = yes; then
  cf_cv_posix_saved_ids=unknown
else
  cat >"conftest.$ac_ext" <<_ACEOF
#line 7440 "configure"
#include "confdefs.h"

$ac_includes_default

int main(void)
{
	void *p = (void *) seteuid;
	long code = sysconf(_SC_SAVED_IDS);
	(void)p;
	${cf_cv_main_return:-return}  ((code > 0) ? 0 : 1);
}
_ACEOF
rm -f "conftest$ac_exeext"
if { (eval echo "$as_me:7454: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:7457: \$? = $ac_status" >&5
  (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
  { (eval echo "$as_me:7459: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:7462: \$? = $ac_status" >&5
  (exit "$ac_status"); }; }; then
  cf_cv_posix_saved_ids=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_posix_saved_ids=no
fi
rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
fi

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

fi
echo "$as_me:7478: result: $cf_cv_posix_saved_ids" >&5
echo "${ECHO_T}$cf_cv_posix_saved_ids" >&6

test "$cf_cv_posix_saved_ids" = yes &&
cat >>confdefs.h <<\EOF
#define HAVE_POSIX_SAVED_IDS 1
EOF

# compute a reasonable value for $TERM to give tgetent(), since we may be
# running in 'screen', which sets $TERMCAP to a specific entry that is not
# necessarily in /etc/termcap - unsetenv is not portable, so we cannot simply
# discard $TERMCAP.
cf_TERMVAR=vt100
if test -n "$TERMCAP"
then
	cf_TERMCAP=`echo "$TERMCAP" | tr '\n' ' ' | sed -e 's/^..|//' -e 's/|.*//'`
	case "$cf_TERMCAP" in
	(screen*.*)
		;;
	(*)
		cf_TERMVAR="$cf_TERMCAP"
		;;
	esac
fi
test -z "$cf_TERMVAR" && cf_TERMVAR=vt100

# BSD termcap used no header file
# SVr4 provided termcap prototypes as a legacy feature in term.h
# GNU termcap provided termcap prototypes in termcap.h
# ncurses provides termcap prototypes in both term.h and termcap.h
#
# The terminfo-based termcap interfaces do not provide a full tgetent (i.e., do
# not return the text of the termcap entry in the buffer), but as a special
# case, FreeBSD provides ncurses' termcap.h with a modified termcap reader that
# returns the termcap text.

for ac_header in termcap.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
echo "$as_me:7517: 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 7523 "configure"
#include "confdefs.h"
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:7527: \"$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:7533: \$? = $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:7552: 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_termcap_h="\
#ifdef HAVE_TERMCAP_H
#include <termcap.h>
#else
extern int tgetent(char *, const char *);
#endif"

echo "$as_me:7569: checking if we want full tgetent function" >&5
echo $ECHO_N "checking if we want full tgetent function... $ECHO_C" >&6

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

fi;
echo "$as_me:7586: result: $cf_full_tgetent" >&5
echo "${ECHO_T}$cf_full_tgetent" >&6

if test "$cf_full_tgetent" = yes ; then
	cf_test_message="full tgetent"
else
	cf_test_message="tgetent"
fi

echo "$as_me:7595: checking for $cf_test_message function" >&5
echo $ECHO_N "checking for $cf_test_message function... $ECHO_C" >&6
if test "${cf_cv_lib_tgetent+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

cf_save_LIBS="$LIBS"
cf_cv_lib_tgetent=no
cf_TERMLIB="termlib ncursesw ncurses curses"
if test "$cf_full_tgetent" = yes ; then
	cf_TERMLIB="otermcap termcap $cf_TERMLIB"
	cf_TERMTST="buffer[0] == 0"
else
	cf_TERMLIB="tinfow tinfo $cf_TERMLIB"
	cf_TERMTST="0"
fi
for cf_termlib in '' $cf_TERMLIB ; do
	LIBS="$cf_save_LIBS"
	test -n "$cf_termlib" && {
cf_add_libs="$LIBS"
# reverse order
cf_add_0lib=
for cf_add_1lib in -l$cf_termlib; 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 "$cross_compiling" = yes; then
  echo "cross-compiling, cannot verify if a termcap/tgetent is present in $cf_termlib" 1>&5
else
  cat >"conftest.$ac_ext" <<_ACEOF
#line 7634 "configure"
#include "confdefs.h"

$cf_termcap_h

/* terminfo implementations ignore the buffer argument, making it useless for
 * the xterm application, which uses this information to make a new TERMCAP
 * environment variable.
 */
int main(void)
{
	char buffer[1024];
	buffer[0] = 0;
	tgetent(buffer, "$cf_TERMVAR");
	${cf_cv_main_return:-return} ($cf_TERMTST); }
_ACEOF
rm -f "conftest$ac_exeext"
if { (eval echo "$as_me:7651: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:7654: \$? = $ac_status" >&5
  (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
  { (eval echo "$as_me:7656: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:7659: \$? = $ac_status" >&5
  (exit "$ac_status"); }; }; then
  echo "yes, there is a termcap/tgetent in $cf_termlib" 1>&5
	 if test -n "$cf_termlib" ; then
	 	cf_cv_lib_tgetent="-l$cf_termlib"
	 else
	 	cf_cv_lib_tgetent=yes
	 fi
	 break
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat "conftest.$ac_ext" >&5
echo "no, there is no termcap/tgetent in $cf_termlib" 1>&5
fi
rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
fi
done
LIBS="$cf_save_LIBS"

fi
echo "$as_me:7680: result: $cf_cv_lib_tgetent" >&5
echo "${ECHO_T}$cf_cv_lib_tgetent" >&6

# If we found a working tgetent(), set LIBS and check for termcap.h.
# (LIBS cannot be set inside AC_CACHE_CHECK; the commands there should
# not have side effects other than setting the cache variable, because
# they are not executed when a cached value exists.)
if test "x$cf_cv_lib_tgetent" != xno ; then
	test "x$cf_cv_lib_tgetent" != xyes && {
cf_add_libs="$LIBS"
# reverse order
cf_add_0lib=
for cf_add_1lib in $cf_cv_lib_tgetent; 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_TERMCAP 1
EOF

	if test "$cf_full_tgetent" = no ; then
		cat >"conftest.$ac_ext" <<_ACEOF
#line 7712 "configure"
#include "confdefs.h"

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

#ifdef NCURSES_VERSION
#error do not use ncurses termcap.h
#endif
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext"
if { (eval echo "$as_me:7728: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:7731: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:7734: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:7737: \$? = $ac_status" >&5
  (exit "$ac_status"); }; }; then
  cat >>confdefs.h <<\EOF
#define HAVE_TERMCAP_H 1
EOF

else
  echo "$as_me: failed program was:" >&5
cat "conftest.$ac_ext" >&5
fi
rm -f "conftest.$ac_objext" "conftest.$ac_ext"
	fi
else
        # If we didn't find a tgetent() that supports the buffer
        # argument, look again to see whether we can find even
        # a crippled one.  A crippled tgetent() is still useful to
        # validate values for the TERM environment variable given to
        # child processes.
	echo "$as_me:7755: checking for partial tgetent function" >&5
echo $ECHO_N "checking for partial tgetent function... $ECHO_C" >&6
if test "${cf_cv_lib_part_tgetent+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

	cf_cv_lib_part_tgetent=no
	for cf_termlib in $cf_TERMLIB ; do
		LIBS="$cf_save_LIBS -l$cf_termlib"
		cat >"conftest.$ac_ext" <<_ACEOF
#line 7765 "configure"
#include "confdefs.h"
$cf_termcap_h
int
main (void)
{
tgetent(0, "$cf_TERMVAR")
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext" "conftest$ac_exeext"
if { (eval echo "$as_me:7777: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:7780: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:7783: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:7786: \$? = $ac_status" >&5
  (exit "$ac_status"); }; }; then
  echo "there is a terminfo/tgetent in $cf_termlib" 1>&5
			 cf_cv_lib_part_tgetent="-l$cf_termlib"
			 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
	LIBS="$cf_save_LIBS"

fi
echo "$as_me:7800: result: $cf_cv_lib_part_tgetent" >&5
echo "${ECHO_T}$cf_cv_lib_part_tgetent" >&6

	if test "$cf_cv_lib_part_tgetent" != no ; then

cf_add_libs="$LIBS"
# reverse order
cf_add_0lib=
for cf_add_1lib in $cf_cv_lib_part_tgetent; 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 this is linking against ncurses, we'll trigger the
                # ifdef in resize.c that turns the termcap stuff back off.

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

	fi
fi

echo "$as_me:7831: checking for X applications class" >&5
echo $ECHO_N "checking for X applications class... $ECHO_C" >&6

# Check whether --with-app-class or --without-app-class was given.
if test "${with_app_class+set}" = set; then
  withval="$with_app_class"
  APP_CLASS=$withval
else
  APP_CLASS=XTerm
fi;

case x$APP_CLASS in
(*[/@,%]*)
	{ echo "$as_me:7844: WARNING: X applications class cannot contain punctuation" >&5
echo "$as_me: WARNING: X applications class cannot contain punctuation" >&2;}
	APP_CLASS=XTerm
	;;
(x[A-Z]*)
	;;
(*)
	{ echo "$as_me:7851: WARNING: X applications class must start with capital, ignoring $APP_CLASS" >&5
echo "$as_me: WARNING: X applications class must start with capital, ignoring $APP_CLASS" >&2;}
	APP_CLASS=XTerm
	;;
esac

echo "$as_me:7857: result: $APP_CLASS" >&5
echo "${ECHO_T}$APP_CLASS" >&6

if test -f "$srcdir/config.guess" || test -f "$ac_aux_dir/config.guess" ; then
	echo "$as_me:7861: checking target system type" >&5
echo $ECHO_N "checking target system type... $ECHO_C" >&6
if test "${ac_cv_target+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_cv_target_alias=$target_alias
test "x$ac_cv_target_alias" = "x" &&
  ac_cv_target_alias=$ac_cv_host_alias
ac_cv_target=`$ac_config_sub "$ac_cv_target_alias"` ||
  { { echo "$as_me:7870: error: $ac_config_sub $ac_cv_target_alias failed" >&5
echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
   { (exit 1); exit 1; }; }

fi
echo "$as_me:7875: result: $ac_cv_target" >&5
echo "${ECHO_T}$ac_cv_target" >&6
target=$ac_cv_target
target_cpu=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
target_vendor=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
target_os=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`

# The aliases save the names the user supplied, while $host etc.
# will get canonicalized.
test -n "$target_alias" &&
  test "$program_prefix$program_suffix$program_transform_name" = \
    NONENONEs,x,x, &&
  program_prefix=${target_alias}-
	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:7907: 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:7911: 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:7913: 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

# Check whether --with-system-type or --without-system-type was given.
if test "${with_system_type+set}" = set; then
  withval="$with_system_type"
  { echo "$as_me:7921: WARNING: overriding system type to $withval" >&5
echo "$as_me: WARNING: overriding system type to $withval" >&2;}
	cf_cv_system_name=$withval
	host_os=$withval

fi;

case "$cf_cv_system_name" in
(cygwin*|msys*|mingw32*|mingw64|os2*)
	GLOB_FULLPATH_POSIX='/*'
	GLOB_FULLPATH_OTHER='[a-zA-Z]:[\\/]*'
	;;
(*)
	GLOB_FULLPATH_POSIX='/*'
	GLOB_FULLPATH_OTHER=$GLOB_FULLPATH_POSIX
	;;
esac

echo "$as_me:7939: checking for directory to install resource files" >&5
echo $ECHO_N "checking for directory to install resource files... $ECHO_C" >&6

# Check whether --with-app-defaults or --without-app-defaults was given.
if test "${with_app_defaults+set}" = set; then
  withval="$with_app_defaults"
  APPSDIR=$withval
else
  APPSDIR='${exec_prefix}/lib/X11/app-defaults'
fi;

if test "x$APPSDIR" = xauto
then
	APPSDIR='${exec_prefix}/lib/X11/app-defaults'
	for cf_path in \
		/opt/local/share/X11/app-defaults \
		/opt/X11/share/X11/app-defaults \
		/usr/share/X11/app-defaults \
		/usr/X11/share/X11/app-defaults \
		/usr/X11/lib/X11/app-defaults \
		/usr/lib/X11/app-defaults \
		/etc/X11/app-defaults \
		/usr/pkg/lib/X11/app-defaults \
		/usr/X11R7/lib/X11/app-defaults \
		/usr/X11R6/lib/X11/app-defaults \
		/usr/X11R5/lib/X11/app-defaults \
		/usr/X11R4/lib/X11/app-defaults \
		/usr/local/lib/X11/app-defaults \
		/usr/local/share/X11/app-defaults \
		/usr/lib64/X11/app-defaults
	do
		if test -d "$cf_path" ; then
			APPSDIR="$cf_path"
			break
		fi
	done
else
	cf_path=$APPSDIR

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

case "x$cf_path" in
(x\$\(*\)*|x\'*\'*)
	;;
(x.|x$GLOB_FULLPATH_POSIX|x$GLOB_FULLPATH_OTHER)
	;;
(x\$\{*prefix\}*|x\$\{*dir\}*)
	eval cf_path="$cf_path"
	case "x$cf_path" in
	(xNONE/*)
		cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
		;;
	esac
	;;
(xno|xNONE/*)
	cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
	;;
(*)
	{ { echo "$as_me:8001: error: expected a pathname, not \"$cf_path\"" >&5
echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
   { (exit 1); exit 1; }; }
	;;
esac

fi

echo "$as_me:8009: result: $APPSDIR" >&5
echo "${ECHO_T}$APPSDIR" >&6

no_appsdir=
if test "$APPSDIR" = no
then
	no_appsdir="#"
else
	EXTRA_INSTALL_DIRS="$EXTRA_INSTALL_DIRS \$(APPSDIR)"
fi

echo "$as_me:8020: checking for the icon name" >&5
echo $ECHO_N "checking for the icon name... $ECHO_C" >&6

# Check whether --with-icon-name or --without-icon-name was given.
if test "${with_icon_name+set}" = set; then
  withval="$with_icon_name"
  ICON_NAME="$withval"
else
  ICON_NAME=mini.xterm
fi;
case "x$ICON_NAME" in
(xyes|xno|x)
	ICON_NAME=mini.xterm
	;;
esac

echo "$as_me:8036: result: $ICON_NAME" >&5
echo "${ECHO_T}$ICON_NAME" >&6

echo "$as_me:8039: checking for icon symlink to use" >&5
echo $ECHO_N "checking for icon symlink to use... $ECHO_C" >&6

# Check whether --with-icon-symlink or --without-icon-symlink was given.
if test "${with_icon_symlink+set}" = set; then
  withval="$with_icon_symlink"
  ICON_SYMLINK="$withval"
else
  ICON_SYMLINK=NONE
fi;
case "x$ICON_SYMLINK" in
(xyes)
	ICON_SYMLINK=xterm
	;;
(xno|x)
	ICON_SYMLINK=NONE
	;;
esac

echo "$as_me:8058: result: $ICON_SYMLINK" >&5
echo "${ECHO_T}$ICON_SYMLINK" >&6

# Install all icons except for the overused "terminal".
cf_cv_icon_list=
for my_item in $srcdir/icons/*.svg
do
	test -f "$my_item" || continue
	cf_icon_name=`echo "$my_item" |sed -e "s,.svg,," -e "s,^$srcdir/,,"`
	case $cf_icon_name in
	(*_48x48)
		continue
		;;
	esac
	test -n "$verbose" && echo "	adding $cf_icon_name to icon-list" 1>&6

echo "${as_me:-configure}:8074: testing adding $cf_icon_name to icon-list ..." 1>&5

	cf_cv_icon_list="$cf_cv_icon_list $cf_icon_name"
	if test -f "${cf_icon_name}_48x48.png"
	then
		test -n "$verbose" && echo "	adding ${cf_icon_name}_48x48 to icon-list" 1>&6

echo "${as_me:-configure}:8081: testing adding ${cf_icon_name}_48x48 to icon-list ..." 1>&5

		cf_cv_icon_list="$cf_cv_icon_list ${cf_icon_name}_48x48"
	fi
done

echo "$as_me:8087: checking for directory to install pixmaps" >&5
echo $ECHO_N "checking for directory to install pixmaps... $ECHO_C" >&6

# Check whether --with-pixmapdir or --without-pixmapdir was given.
if test "${with_pixmapdir+set}" = set; then
  withval="$with_pixmapdir"
  PIXMAPDIR=$withval
else
  test -z "$PIXMAPDIR" && PIXMAPDIR='${datadir}/pixmaps'
fi;

if test "x$PIXMAPDIR" = xauto
then
	PIXMAPDIR='${datadir}/pixmaps'
	for cf_path in \
		/usr/share/pixmaps \
		/usr/X11R6/share/pixmaps
	do
		if test -d "$cf_path" ; then
			PIXMAPDIR="$cf_path"
			break
		fi
	done
else
	cf_path=$PIXMAPDIR

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

case "x$cf_path" in
(x\$\(*\)*|x\'*\'*)
	;;
(x.|x$GLOB_FULLPATH_POSIX|x$GLOB_FULLPATH_OTHER)
	;;
(x\$\{*prefix\}*|x\$\{*dir\}*)
	eval cf_path="$cf_path"
	case "x$cf_path" in
	(xNONE/*)
		cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
		;;
	esac
	;;
(xno|xNONE/*)
	cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
	;;
(*)
	{ { echo "$as_me:8136: error: expected a pathname, not \"$cf_path\"" >&5
echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
   { (exit 1); exit 1; }; }
	;;
esac

fi
echo "$as_me:8143: result: $PIXMAPDIR" >&5
echo "${ECHO_T}$PIXMAPDIR" >&6

no_pixmapdir=
if test "$PIXMAPDIR" = no
then
	no_pixmapdir="#"
else
	EXTRA_INSTALL_DIRS="$EXTRA_INSTALL_DIRS \$(PIXMAPDIR)"
fi

echo "$as_me:8154: checking for directory to install icons" >&5
echo $ECHO_N "checking for directory to install icons... $ECHO_C" >&6

# Check whether --with-icondir or --without-icondir was given.
if test "${with_icondir+set}" = set; then
  withval="$with_icondir"
  ICONDIR=$withval
else
  test -z "$ICONDIR" && ICONDIR=no
fi;

if test "x$ICONDIR" = xauto
then
	ICONDIR='${datadir}/icons'
	for cf_path in \
		/usr/share/icons \
		/usr/X11R6/share/icons
	do
		if test -d "$cf_path" ; then
			ICONDIR="$cf_path"
			break
		fi
	done
else
	cf_path=$ICONDIR

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

case "x$cf_path" in
(x\$\(*\)*|x\'*\'*)
	;;
(x.|x$GLOB_FULLPATH_POSIX|x$GLOB_FULLPATH_OTHER)
	;;
(x\$\{*prefix\}*|x\$\{*dir\}*)
	eval cf_path="$cf_path"
	case "x$cf_path" in
	(xNONE/*)
		cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
		;;
	esac
	;;
(xno|xNONE/*)
	cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
	;;
(*)
	{ { echo "$as_me:8203: error: expected a pathname, not \"$cf_path\"" >&5
echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
   { (exit 1); exit 1; }; }
	;;
esac

fi
echo "$as_me:8210: result: $ICONDIR" >&5
echo "${ECHO_T}$ICONDIR" >&6

no_icondir=
if test "$ICONDIR" = no
then
	no_icondir="#"
else
	EXTRA_INSTALL_DIRS="$EXTRA_INSTALL_DIRS \$(ICONDIR)"
fi

echo "$as_me:8221: checking if icon theme should be used" >&5
echo $ECHO_N "checking if icon theme should be used... $ECHO_C" >&6

# Check whether --with-icon-theme or --without-icon-theme was given.
if test "${with_icon_theme+set}" = set; then
  withval="$with_icon_theme"
  ICON_THEME=$withval
else
  ICON_THEME=no
fi;

case "x$ICON_THEME" in
(xno)
	;;
(x|xyes)
	ICON_THEME=hicolor
	;;
esac
echo "$as_me:8239: result: $ICON_THEME" >&5
echo "${ECHO_T}$ICON_THEME" >&6

if test "x$ICON_THEME" = xno
then
	if test "x$ICONDIR" != xno
	then
		test -n "$verbose" && echo "	ignoring icondir without theme" 1>&6

echo "${as_me:-configure}:8248: testing ignoring icondir without theme ..." 1>&5

		no_icondir="#"
	fi
else
	if test "x$ICONDIR" = xno
	then
		{ { echo "$as_me:8255: error: icondir must be set for icon theme" >&5
echo "$as_me: error: icondir must be set for icon theme" >&2;}
   { (exit 1); exit 1; }; }
	fi
fi

: ${ICON_FORMAT:=".svg .png .xpm"}

ICON_LIST=

if test "x$ICON_THEME" != xno
then
	cf_icon_list="$cf_cv_icon_list"
else
	cf_icon_list="icons/${ICON_NAME}_48x48"
fi

echo "$as_me:8272: checking for icon(s) to install" >&5
echo $ECHO_N "checking for icon(s) to install... $ECHO_C" >&6
for cf_name in $cf_icon_list
do
	test -n "$verbose" && echo "	using $ICON_FORMAT" 1>&6

echo "${as_me:-configure}:8278: testing using $ICON_FORMAT ..." 1>&5

	for cf_suffix in $ICON_FORMAT
	do
		cf_icon="${cf_name}${cf_suffix}"
		cf_left=`echo "$cf_icon" | sed -e 's/:.*//'`
		if test ! -f "${cf_left}"
		then
			if test "x$srcdir" != "x."
			then
				cf_icon="${srcdir}/${cf_left}"
				cf_left=`echo "$cf_icon" | sed -e 's/:.*//'`
				if test ! -f "${cf_left}"
				then
					continue
				fi
			else
				continue
			fi
		fi
		if test "x$ICON_THEME" != xno
		then
			cf_base=`basename "$cf_left"`
			cf_trim=`echo "$cf_base" | sed -e 's/_[0-9][0-9]x[0-9][0-9]\././'`
			case "x${cf_base}" in
			(*:*)
				cf_next=$cf_base
				# user-defined mapping
				;;
			(*.png)
				cf_size=`file "$cf_left"|sed -e 's/^[^:]*://' -e 's/^.*[^0-9]\([0-9][0-9]* x [0-9][0-9]*\)[^0-9].*$/\1/' -e 's/ //g'`
				if test -z "$cf_size"
				then
					{ echo "$as_me:8311: WARNING: cannot determine size of $cf_left" >&5
echo "$as_me: WARNING: cannot determine size of $cf_left" >&2;}
					continue
				fi
				cf_next="$cf_size/apps/$cf_trim"
				;;
			(*.svg)
				cf_next="scalable/apps/$cf_trim"
				;;
			(*.xpm)
				test -n "$verbose" && echo "	ignored XPM file in icon theme" 1>&6

echo "${as_me:-configure}:8323: testing ignored XPM file in icon theme ..." 1>&5

				continue
				;;
			(*_[0-9][0-9]*x[0-9][0-9]*.*)
				cf_size=`echo "$cf_left"|sed -e 's/^.*_\([0-9][0-9]*x[0-9][0-9]*\)\..*$/\1/'`
				cf_left=`echo "$cf_left"|sed -e 's/^\(.*\)_\([0-9][0-9]*x[0-9][0-9]*\)\(\..*\)$/\1\3/'`
				cf_next="$cf_size/apps/$cf_base"
				;;
			esac
			test -n "$verbose" && echo "	adding $cf_next" 1>&6

echo "${as_me:-configure}:8335: testing adding $cf_next ..." 1>&5

			cf_icon="${cf_icon}:${cf_next}"
		fi
		test -n "$ICON_LIST" && ICON_LIST="$ICON_LIST "
		ICON_LIST="$ICON_LIST${cf_icon}"
		if test -z "$ICON_NAME"
		then
			ICON_NAME=`basename "$cf_icon" | sed -e 's/[.:].*//'`
		fi
	done
done

if test -n "$verbose"
then
	echo "$as_me:8350: checking result" >&5
echo $ECHO_N "checking result... $ECHO_C" >&6
fi
echo "$as_me:8353: result: $ICON_LIST" >&5
echo "${ECHO_T}$ICON_LIST" >&6

if test -z "$ICON_LIST"
then
	{ { echo "$as_me:8358: error: no icons found" >&5
echo "$as_me: error: no icons found" >&2;}
   { (exit 1); exit 1; }; }
fi

echo "$as_me:8363: checking for icon name" >&5
echo $ECHO_N "checking for icon name... $ECHO_C" >&6
echo "$as_me:8365: result: $ICON_NAME" >&5
echo "${ECHO_T}$ICON_NAME" >&6

# Comment-out the install-desktop rule if the desktop-utils are not found.
echo "$as_me:8369: checking if you want to install desktop files" >&5
echo $ECHO_N "checking if you want to install desktop files... $ECHO_C" >&6

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

fi;
echo "$as_me:8386: result: $enable_desktop" >&5
echo "${ECHO_T}$enable_desktop" >&6

desktop_utils=
if test "$enable_desktop" = yes ; then
# Extract the first word of "desktop-file-install", so it can be a program name with args.
set dummy desktop-file-install; ac_word=$2
echo "$as_me:8393: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_desktop_utils+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$desktop_utils"; then
  ac_cv_prog_desktop_utils="$desktop_utils" # 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_desktop_utils="yes"
echo "$as_me:8408: found $ac_dir/$ac_word" >&5
break
done

  test -z "$ac_cv_prog_desktop_utils" && ac_cv_prog_desktop_utils="no"
fi
fi
desktop_utils=$ac_cv_prog_desktop_utils
if test -n "$desktop_utils"; then
  echo "$as_me:8417: result: $desktop_utils" >&5
echo "${ECHO_T}$desktop_utils" >&6
else
  echo "$as_me:8420: result: no" >&5
echo "${ECHO_T}no" >&6
fi

fi

test "$desktop_utils" = yes && desktop_utils= || desktop_utils="#"

if test -z "$desktop_utils"
then
	echo "$as_me:8430: checking for requested desktop-category" >&5
echo $ECHO_N "checking for requested desktop-category... $ECHO_C" >&6

# Check whether --with-desktop-category or --without-desktop-category was given.
if test "${with_desktop_category+set}" = set; then
  withval="$with_desktop_category"
  cf_desktop_want=$withval
else
  cf_desktop_want=auto
fi;
	echo "$as_me:8440: result: $cf_desktop_want" >&5
echo "${ECHO_T}$cf_desktop_want" >&6

	if test "$cf_desktop_want" = auto
	then
		rm -rf conftest*
		cf_desktop_also=
		for cf_desktop_dir in  \
			/usr/share/app-install \
			/usr/share/applications
		do
			if test -d $cf_desktop_dir
			then
				find $cf_desktop_dir -name '*.desktop' | \
				while true
				do
					read cf_desktop_path
					test -z "$cf_desktop_path" && break
					cf_desktop_name=`basename "$cf_desktop_path" .desktop`
					case $cf_desktop_name in
					(xterm|*-xterm|*rxvt*|*konsole|*[Tt]erminal)
						test -n "$verbose" && echo "	inspect $cf_desktop_path" 1>&6

echo "${as_me:-configure}:8463: testing inspect $cf_desktop_path ..." 1>&5

						${EGREP-egrep} '^Categories=' "$cf_desktop_path" | \
							tr ';' '\n' | \
							sed -e 's%^.*=%%' -e '/^$/d' >>conftest.1
						;;
					esac
				done
			fi
		done
		if test -s conftest.1
		then
			cf_desktop_last=
			sort conftest.1 | \
			while true
			do
				read cf_desktop_this
				test -z "$cf_desktop_this" && break
				if test -s conftest.2
				then
					grep -w "$cf_desktop_this" conftest.2 >/dev/null && continue
				elif test -s conftest.3
				then
					grep -w "$cf_desktop_this" conftest.3 >/dev/null && continue
				fi
				case "$cf_desktop_this" in
				(-*)
					;;
				(Qt*|*Xfce*|*[ABCDEFGHIJKLMNOPQRSTUVWXYZ][ABCDEFGHIJKLMNOPQRSTUVWXYZ]*)
					test -n "$verbose" && echo "	ignored $cf_desktop_this" 1>&6

echo "${as_me:-configure}:8494: testing ignored $cf_desktop_this ..." 1>&5

					echo "$cf_desktop_this" >> conftest.3
					;;
				(System|TerminalEmulator|*)
					test -n "$verbose" && echo "	applied $cf_desktop_this" 1>&6

echo "${as_me:-configure}:8501: testing applied $cf_desktop_this ..." 1>&5

					test "x$cf_desktop_last" != "x$cf_desktop_this" && echo "$cf_desktop_this" >>conftest.2
					;;
				esac
				cf_desktop_last=$cf_desktop_this
			done
			cf_desktop_want="`tr '\n' ';' < conftest.2`"
		fi
		if test -n "$cf_desktop_want"
		then
			if test "$cf_desktop_want" = auto
			then
				cf_desktop_want=
			else
				# do a sanity check on the semicolon-separated list, ignore on failure
				cf_desktop_test=`echo "$cf_desktop_want" | sed -e 's/[^;]//g'`
				test -z "$cf_desktop_test" && cf_desktop_want=
				cf_desktop_test=`echo "$cf_desktop_want" | sed -e 's/^.*;$/./g'`
				test -z "$cf_desktop_test" && cf_desktop_want=
			fi
		fi
		if test -z "$cf_desktop_want"
		then
			cf_desktop_want="`echo "System|TerminalEmulator|*" | sed -e 's/\*//g' -e 's/|/;/g' -e 's/;*$/;/g'`"
			test -n "$verbose" && echo "	no usable value found for desktop category" 1>&6

echo "${as_me:-configure}:8528: testing no usable value found for desktop category ..." 1>&5

		fi
	fi
	DESKTOP_CATEGORY=`echo "$cf_desktop_want" | sed -e 's/[ ,]/;/g'`
	test -n "$verbose" && echo "	will use Categories=$DESKTOP_CATEGORY" 1>&6

echo "${as_me:-configure}:8535: testing will use Categories=$DESKTOP_CATEGORY ..." 1>&5

fi

echo "$as_me:8539: checking for install-permissions reference" >&5
echo $ECHO_N "checking for install-permissions reference... $ECHO_C" >&6

# Check whether --with-reference or --without-reference was given.
if test "${with_reference+set}" = set; then
  withval="$with_reference"
  with_reference=$withval
else
  with_reference=xterm
fi;
echo "$as_me:8549: result: $with_reference" >&5
echo "${ECHO_T}$with_reference" >&6

with_full_paths=yes

	echo "$as_me:8554: 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:8561: result: $PATH_SEPARATOR" >&5
echo "${ECHO_T}$PATH_SEPARATOR" >&6

test -z "$XTERM_PATH" && XTERM_PATH="$with_reference"
for ac_prog in $XTERM_PATH $with_reference
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:8569: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_path_XTERM_PATH+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $XTERM_PATH in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_XTERM_PATH="$XTERM_PATH" # 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_XTERM_PATH="$ac_dir/$ac_word"
   echo "$as_me:8586: found $ac_dir/$ac_word" >&5
   break
fi
done

  ;;
esac
fi
XTERM_PATH=$ac_cv_path_XTERM_PATH

if test -n "$XTERM_PATH"; then
  echo "$as_me:8597: result: $XTERM_PATH" >&5
echo "${ECHO_T}$XTERM_PATH" >&6
else
  echo "$as_me:8600: result: no" >&5
echo "${ECHO_T}no" >&6
fi

  test -n "$XTERM_PATH" && break
done
test -n "$XTERM_PATH" || XTERM_PATH="$XTERM_PATH"

cf_path_prog=""
cf_path_args=""
IFS="${IFS:- 	}"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
for cf_temp in $ac_cv_path_XTERM_PATH
do
	if test -z "$cf_path_prog" ; then
		if test "$with_full_paths" = yes ; then

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

case "x$cf_temp" in
(x\$\(*\)*|x\'*\'*)
	;;
(x.|x$GLOB_FULLPATH_POSIX|x$GLOB_FULLPATH_OTHER)
	;;
(x\$\{*prefix\}*|x\$\{*dir\}*)
	eval cf_temp="$cf_temp"
	case "x$cf_temp" in
	(xNONE/*)
		cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
		;;
	esac
	;;
(xno|xNONE/*)
	cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
	;;
(*)
	break
	;;
esac

			cf_path_prog="$cf_temp"
		else
			cf_path_prog="`basename "$cf_temp"`"
		fi
	elif test -z "$cf_path_args" ; then
		cf_path_args="$cf_temp"
	else
		cf_path_args="$cf_path_args $cf_temp"
	fi
done
IFS="$cf_save_ifs"

if test -n "$cf_path_prog" ; then

echo "${as_me:-configure}:8657: testing defining path for ${cf_path_prog} ..." 1>&5

cat >>confdefs.h <<EOF
#define XTERM_PATH_PATH "$cf_path_prog"
EOF

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

fi

# If any of --program-prefix, --program-suffix or --program-transform-name is
# given, accept an option tell the makefile to create a symbolic link, e.g.,
# to "xterm" on install.
XTERM_SYMLINK=NONE

if test "$program_transform_name" != "'s,,,'" ; then
cf_name=`echo "$program_transform_name" | sed -e 's,\\$\\$,$,g'`
cf_name=`echo xterm |sed -e "$cf_name"`
echo "$as_me:8678: checking for symbolic link to create to $cf_name" >&5
echo $ECHO_N "checking for symbolic link to create to $cf_name... $ECHO_C" >&6

# Check whether --with-xterm-symlink or --without-xterm-symlink was given.
if test "${with_xterm_symlink+set}" = set; then
  withval="$with_xterm_symlink"
  with_symlink=$withval
else
  with_symlink=xterm
fi;
echo "$as_me:8688: result: $with_symlink" >&5
echo "${ECHO_T}$with_symlink" >&6
test "$with_symlink" = yes && with_symlink=xterm
test -n "$with_symlink" && \
	test "$with_symlink" != no && \
	test "$with_symlink" != "$cf_name" && \
	XTERM_SYMLINK="$with_symlink"
fi

echo "$as_me:8697: checking if you want to disable openpty" >&5
echo $ECHO_N "checking if you want to disable openpty... $ECHO_C" >&6

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

fi;
echo "$as_me:8714: result: $disable_openpty" >&5
echo "${ECHO_T}$disable_openpty" >&6

echo "$as_me:8717: checking if you want to disable setuid" >&5
echo $ECHO_N "checking if you want to disable setuid... $ECHO_C" >&6

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

fi;
echo "$as_me:8734: result: $disable_setuid" >&5
echo "${ECHO_T}$disable_setuid" >&6

echo "$as_me:8737: checking if you want to disable setgid" >&5
echo $ECHO_N "checking if you want to disable setgid... $ECHO_C" >&6

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

fi;
echo "$as_me:8754: result: $disable_setgid" >&5
echo "${ECHO_T}$disable_setgid" >&6

echo "$as_me:8757: checking if you want to run xterm setuid to a given user" >&5
echo $ECHO_N "checking if you want to run xterm setuid to a given user... $ECHO_C" >&6

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

if test "$use_given_setuid" != no ; then
	if test "$use_given_setuid" = yes ; then
		cf_cv_given_setuid=root
	else
		cf_cv_given_setuid=$use_given_setuid
	fi
	# inherit SINSTALL_OPTS from environment to allow packager to customize it.
	SINSTALL_OPTS="$SINSTALL_OPTS u+s -u $cf_cv_given_setuid"
fi

echo "$as_me:8780: checking if you want to run xterm setgid to match utmp/utmpx file" >&5
echo $ECHO_N "checking if you want to run xterm setgid to match utmp/utmpx file... $ECHO_C" >&6

# Check whether --with-utmp-setgid or --without-utmp-setgid was given.
if test "${with_utmp_setgid+set}" = set; then
  withval="$with_utmp_setgid"
  use_utmp_setgid=$withval
else
  use_utmp_setgid=no
fi;
echo "$as_me:8790: result: $use_utmp_setgid" >&5
echo "${ECHO_T}$use_utmp_setgid" >&6

if test "$use_utmp_setgid" != no ; then
	if test "$use_utmp_setgid" = yes ; then

if test $cf_cv_have_utmp != no ; then
echo "$as_me:8797: checking for utmp/utmpx group" >&5
echo $ECHO_N "checking for utmp/utmpx group... $ECHO_C" >&6
if test "${cf_cv_utmp_group+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

for cf_utmp_path in /var/adm /var/run
do
	for cf_utmp_file in utmpx utmp
	do
		if test -f $cf_utmp_path/$cf_utmp_file
		then
			cf_cv_utmp_group=root

			cf_option="-lL"

			# Expect listing to have fields like this:
			#-r--r--r--   1 user      group       34293 Jul 18 16:29 pathname
			ls "$cf_option" "$cf_utmp_path/$cf_utmp_file" >conftest
			read cf_mode cf_links cf_usr cf_grp cf_size cf_date1 cf_date2 cf_date3 cf_rest <conftest
			if test -z "$cf_rest" ; then
				cf_option="${cf_option}g"
				ls "$cf_option" "$cf_utmp_path/$cf_utmp_file" >conftest
				read cf_mode cf_links cf_usr cf_grp cf_size cf_date1 cf_date2 cf_date3 cf_rest <conftest
			fi
			rm -f conftest

			# If we have a pathname, and the date fields look right, assume we've
			# captured the group as well.
			if test -n "$cf_rest" ; then
				cf_test=`echo "${cf_date2}${cf_date3}" | sed -e 's/[0-9:]//g'`
				if test -z "$cf_test" ; then
					cf_cv_utmp_group=$cf_grp;
				fi
			fi
			break
		fi
	done
	test -n "$cf_cv_utmp_group" && break
done

fi
echo "$as_me:8839: result: $cf_cv_utmp_group" >&5
echo "${ECHO_T}$cf_cv_utmp_group" >&6
else
	{ { echo "$as_me:8842: error: cannot find utmp group" >&5
echo "$as_me: error: cannot find utmp group" >&2;}
   { (exit 1); exit 1; }; }
fi

	else
		cf_cv_utmp_group=$use_utmp_setgid
	fi
	if test "$cf_cv_posix_saved_ids" != yes ; then
		{ { echo "$as_me:8851: error: Your system does not support POSIX saved-ids" >&5
echo "$as_me: error: Your system does not support POSIX saved-ids" >&2;}
   { (exit 1); exit 1; }; }
	fi

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

	SINSTALL_OPTS="$SINSTALL_OPTS g+s -g $cf_cv_utmp_group"
fi

echo "$as_me:8863: checking if you want to link with utempter" >&5
echo $ECHO_N "checking if you want to link with utempter... $ECHO_C" >&6

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

if test "$use_utempter" = yes ; then

echo "$as_me:8878: checking if we can link with utempter library" >&5
echo $ECHO_N "checking if we can link with utempter library... $ECHO_C" >&6
if test "${cf_cv_have_utempter+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

cf_save_LIBS="$LIBS"

cf_add_libs="$LIBS"
# reverse order
cf_add_0lib=
for cf_add_1lib in -lutempter; 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 8903 "configure"
#include "confdefs.h"

#include <utempter.h>

int
main (void)
{

	addToUtmp("/dev/tty", 0, 1);
	removeFromUtmp();

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

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

	cf_cv_have_utempter=no
fi
rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
LIBS="$cf_save_LIBS"

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

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

cf_add_libs="$LIBS"
# reverse order
cf_add_0lib=
for cf_add_1lib in -lutempter; 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

	test "$cf_cv_have_utempter" != yes && use_utempter=no
else
	use_utempter=no
fi

# Some configurations permit (or require) either setuid or setgid mode.
# Let the user decide.
if test "$use_utempter" = yes ; then
	if test "${enable_setuid+set}" != set ; then
		disable_setuid=yes
		test -n "$verbose" && echo "	No --disable-setuid option given, force to yes" 1>&6

echo "${as_me:-configure}:8981: testing No --disable-setuid option given, force to yes ..." 1>&5

	fi
fi

# We use these for the manpage:

# Check whether --with-utmp-path or --without-utmp-path was given.
if test "${with_utmp_path+set}" = set; then
  withval="$with_utmp_path"
  cf_utmp_path=$withval
else
  cf_utmp_path=auto
fi;
if test "$cf_utmp_path" = auto ; then
	for cf_utmp_path in /etc/utmp /var/adm/utmp /var/log/utmp /var/run/utmp
	do
		if test -f ${cf_utmp_path}x ; then
			cf_utmp_path=${cf_utmp_path}x
			break
		elif test -f $cf_utmp_path ; then
			break
		fi
	done
else

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

case "x$cf_utmp_path" in
(x\$\(*\)*|x\'*\'*)
	;;
(x.|x$GLOB_FULLPATH_POSIX|x$GLOB_FULLPATH_OTHER)
	;;
(x\$\{*prefix\}*|x\$\{*dir\}*)
	eval cf_utmp_path="$cf_utmp_path"
	case "x$cf_utmp_path" in
	(xNONE/*)
		cf_utmp_path=`echo "$cf_utmp_path" | sed -e s%NONE%$cf_path_syntax%`
		;;
	esac
	;;
(xno|xNONE/*)
	cf_utmp_path=`echo "$cf_utmp_path" | sed -e s%NONE%$cf_path_syntax%`
	;;
(*)
	{ { echo "$as_me:9030: error: expected a pathname, not \"$cf_utmp_path\"" >&5
echo "$as_me: error: expected a pathname, not \"$cf_utmp_path\"" >&2;}
   { (exit 1); exit 1; }; }
	;;
esac

fi
UTMP_PATH=$cf_utmp_path
UTMP_NAME=`echo "$cf_utmp_path" | sed -e 's,^.*/,,'`

# Check whether --with-wtmp-path or --without-wtmp-path was given.
if test "${with_wtmp_path+set}" = set; then
  withval="$with_wtmp_path"
  cf_wtmp_path=$withval
else
  cf_wtmp_path=auto
fi;
if test "$cf_wtmp_path" = auto ; then
	for cf_wtmp_path in /etc/wtmp /var/adm/wtmp /var/run/wtmp /var/log/wtmp
	do
		if test -f ${cf_wtmp_path}x ; then
			cf_wtmp_path=${cf_wtmp_path}x
			break
		elif test -f $cf_wtmp_path/wtmp ; then
			break
		fi
	done
else

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

case "x$cf_wtmp_path" in
(x\$\(*\)*|x\'*\'*)
	;;
(x.|x$GLOB_FULLPATH_POSIX|x$GLOB_FULLPATH_OTHER)
	;;
(x\$\{*prefix\}*|x\$\{*dir\}*)
	eval cf_wtmp_path="$cf_wtmp_path"
	case "x$cf_wtmp_path" in
	(xNONE/*)
		cf_wtmp_path=`echo "$cf_wtmp_path" | sed -e s%NONE%$cf_path_syntax%`
		;;
	esac
	;;
(xno|xNONE/*)
	cf_wtmp_path=`echo "$cf_wtmp_path" | sed -e s%NONE%$cf_path_syntax%`
	;;
(*)
	{ { echo "$as_me:9082: error: expected a pathname, not \"$cf_wtmp_path\"" >&5
echo "$as_me: error: expected a pathname, not \"$cf_wtmp_path\"" >&2;}
   { (exit 1); exit 1; }; }
	;;
esac

fi
WTMP_PATH=$cf_wtmp_path
WTMP_NAME=`echo "$cf_wtmp_path" | sed -e 's,^.*/,,'`

###	checks for external data

echo "$as_me:9094: 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 9101 "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:9115: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:9118: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:9121: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:9124: \$? = $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:9135: 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:9150: 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 9157 "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:9172: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:9175: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:9178: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:9181: \$? = $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:9192: 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

echo "$as_me:9205: checking for explicit tty group name" >&5
echo $ECHO_N "checking for explicit tty group name... $ECHO_C" >&6

# Check whether --with-tty-group or --without-tty-group was given.
if test "${with_tty_group+set}" = set; then
  withval="$with_tty_group"
  cf_tty_group=$withval
else
  cf_tty_group=auto...
fi;
test -z "$cf_tty_group"    && cf_tty_group=auto...
test "$cf_tty_group" = yes && cf_tty_group=auto...
echo "$as_me:9217: result: $cf_tty_group" >&5
echo "${ECHO_T}$cf_tty_group" >&6

if test "$cf_tty_group" = "auto..." ; then
echo "$as_me:9221: checking for tty group name" >&5
echo $ECHO_N "checking for tty group name... $ECHO_C" >&6
if test "${cf_cv_tty_group_name+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

# If we are configuring as root, it is hard to get a clue about the tty group.
# But we'll guess based on how our connection is set up - assuming it is done
# properly.

cf_uid="`id | sed -e 's/^^=*=//' -e 's/(.*$//'`"
# )vi
if test "$cf_uid" != 0 ; then
cf_cv_tty_group_name=
cf_tty_name="`tty`"
test "$cf_tty_name" = "not a tty" && cf_tty_name=/dev/tty
test -z "$cf_tty_name" && cf_tty_name=/dev/tty
if test -c "$cf_tty_name"
then
	cf_option="-lL"

	# Expect listing to have fields like this:
	#-rwxrwxrwx   1 user      group       34293 Jul 18 16:29 pathname
	ls $cf_option "$cf_tty_name" >conftest.out
	read cf_mode cf_links cf_usr cf_grp cf_size cf_date1 cf_date2 cf_date3 cf_rest <conftest.out
	if test -z "$cf_rest" ; then
		cf_option="${cf_option}g"
		ls "$cf_option" "$cf_tty_name" >conftest.out
		read cf_mode cf_links cf_usr cf_grp cf_size cf_date1 cf_date2 cf_date3 cf_rest <conftest.out
	fi
	rm -f conftest.out
	cf_cv_tty_group_name=$cf_grp
fi
fi

# If we cannot deduce the tty group, fall back on hardcoded cases

if test -z "$cf_cv_tty_group_name"
then
case $host_os in
(osf*)
	cf_cv_tty_group_name="terminal"
	;;
(*)
	cf_cv_tty_group_name="unknown"
	if ( ${EGREP-egrep} '^tty:' /etc/group 2>/dev/null 1>/dev/null ) then
		cf_cv_tty_group_name="tty"
	fi
	;;
esac
fi

fi
echo "$as_me:9274: result: $cf_cv_tty_group_name" >&5
echo "${ECHO_T}$cf_cv_tty_group_name" >&6
cf_tty_group="$cf_cv_tty_group_name"
else
	# if configure option, always do this

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

fi

cat >>confdefs.h <<EOF
#define TTY_GROUP_NAME "$cf_tty_group"
EOF

# This is only a double-check that the group-name we obtained above really
# does apply to the device.  We cannot perform this test if we are in batch
# mode, or if we are cross-compiling.

echo "$as_me:9294: checking if we may use the $cf_tty_group group" >&5
echo $ECHO_N "checking if we may use the $cf_tty_group group... $ECHO_C" >&6
if test "${cf_cv_tty_group+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

cf_tty_name="`tty`"
if test "$cf_tty_name" != "not a tty"
then
if test "$cross_compiling" = yes; then
  cf_cv_tty_group=unknown
else
  cat >"conftest.$ac_ext" <<_ACEOF
#line 9307 "configure"
#include "confdefs.h"

$ac_includes_default

#include <grp.h>

int main(void)
{
	static char default_tty[] = "/dev/tty";
	struct stat sb;
	struct group *ttygrp;
	int fd;
	char *name;

	for (fd = 0; fd < 3; ++fd) {
		if ((name = ttyname(fd)) != 0)
			break;
	}
	if (name == 0)
		name = default_tty;

	ttygrp = getgrnam(TTY_GROUP_NAME);
	endgrent();

	if (ttygrp != 0
	 && name != 0
	 && stat(name, &sb) == 0
	 && sb.st_gid != getgid()
	 && sb.st_gid == ttygrp->gr_gid) {
		${cf_cv_main_return:-return} (0);
	}
	${cf_cv_main_return:-return} (1);
}

_ACEOF
rm -f "conftest$ac_exeext"
if { (eval echo "$as_me:9344: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:9347: \$? = $ac_status" >&5
  (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
  { (eval echo "$as_me:9349: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:9352: \$? = $ac_status" >&5
  (exit "$ac_status"); }; }; then
  cf_cv_tty_group=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_tty_group=no
fi
rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
fi
elif test "$cross_compiling" = yes; then
	cf_cv_tty_group=unknown
else
	cf_cv_tty_group=yes
fi

fi
echo "$as_me:9370: result: $cf_cv_tty_group" >&5
echo "${ECHO_T}$cf_cv_tty_group" >&6

if test $cf_cv_tty_group = no ; then
	{ echo "$as_me:9374: WARNING: Cannot use $cf_tty_group group" >&5
echo "$as_me: WARNING: Cannot use $cf_tty_group group" >&2;}
else
	cat >>confdefs.h <<\EOF
#define USE_TTY_GROUP 1
EOF

fi

###	checks for system services and user specified options

echo "$as_me:9385: 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 9489 "configure"
#include "confdefs.h"
#include <X11/Intrinsic.h>
_ACEOF
if { (eval echo "$as_me:9493: \"$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:9499: \$? = $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 9532 "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:9544: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:9547: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:9550: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:9553: \$? = $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:9591: 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:9601: 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:9628: 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 9632 "configure"
#include "confdefs.h"

int
main (void)
{

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

int
main (void)
{

  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext" "conftest$ac_exeext"
if { (eval echo "$as_me:9681: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:9684: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:9687: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:9690: \$? = $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:9700: result: yes" >&5
echo "${ECHO_T}yes" >&6
	  X_LIBS="$X_LIBS -R $x_libraries"
	else
	  echo "$as_me:9704: 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 9724 "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:9743: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:9746: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:9749: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:9752: \$? = $ac_status" >&5
  (exit "$ac_status"); }; }; then
  :
else
  echo "$as_me: failed program was:" >&5
cat "conftest.$ac_ext" >&5
echo "$as_me:9758: 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 9766 "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:9785: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:9788: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:9791: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:9794: \$? = $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:9805: 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:9812: 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 9820 "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:9839: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:9842: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:9845: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:9848: \$? = $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:9859: 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:9878: 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 9884 "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:9915: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:9918: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:9921: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:9924: \$? = $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:9934: 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:9938: 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 9946 "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:9965: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:9968: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:9971: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:9974: \$? = $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:9985: 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:9992: 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 10000 "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:10019: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:10022: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:10025: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:10028: \$? = $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:10039: 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:10055: 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 10061 "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:10092: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:10095: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:10098: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:10101: \$? = $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:10111: 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:10115: 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 10123 "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:10142: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:10145: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:10148: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:10151: \$? = $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:10162: 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:10171: 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 10177 "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:10208: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:10211: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:10214: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:10217: \$? = $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:10227: 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:10231: 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 10239 "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:10258: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:10261: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:10264: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:10267: \$? = $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:10278: 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:10287: 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 10293 "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:10324: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:10327: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:10330: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:10333: \$? = $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:10343: 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:10347: 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 10355 "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:10374: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:10377: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:10380: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:10383: \$? = $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:10394: 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:10412: 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 10420 "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:10439: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:10442: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:10445: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:10448: \$? = $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:10459: 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

echo "$as_me:10469: 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 10475 "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:10497: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:10500: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:10503: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:10506: \$? = $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:10516: 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

echo "$as_me:10526: checking for POSIX wait functions" >&5
echo $ECHO_N "checking for POSIX wait functions... $ECHO_C" >&6
if test "${cf_cv_posix_wait+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

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

$ac_includes_default

#ifdef HAVE_SYS_WAIT_H
#include <sys/wait.h>
#endif

int
main (void)
{

	int stat_loc;
	pid_t pid = waitpid(-1, &stat_loc, WNOHANG|WUNTRACED);
	pid_t pid2 = wait(&stat_loc);
	(void)pid;
	(void)pid2;

  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext" "conftest$ac_exeext"
if { (eval echo "$as_me:10557: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:10560: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:10563: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:10566: \$? = $ac_status" >&5
  (exit "$ac_status"); }; }; then
  cf_cv_posix_wait=yes
else
  echo "$as_me: failed program was:" >&5
cat "conftest.$ac_ext" >&5
cf_cv_posix_wait=no
fi
rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"

fi
echo "$as_me:10577: result: $cf_cv_posix_wait" >&5
echo "${ECHO_T}$cf_cv_posix_wait" >&6
test "$cf_cv_posix_wait" = yes &&
cat >>confdefs.h <<\EOF
#define USE_POSIX_WAIT 1
EOF

echo "$as_me:10584: 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 10591 "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:10605: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:10608: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:10611: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:10614: \$? = $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:10625: 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:10640: 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 10647 "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: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
  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:10682: 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:10695: 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 10702 "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:10716: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:10719: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:10722: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:10725: \$? = $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:10736: 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:10751: 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 10758 "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:10773: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:10776: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:10779: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:10782: \$? = $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:10793: 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

cf_save_LIBS_CF_SYSV="$LIBS"
cf_save_CFLAGS_CF_SYSV="$CFLAGS"
cf_save_CPPFLAGS_CF_SYSV="$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

for ac_header in \
termios.h \
stdlib.h \
X11/Intrinsic.h \

do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
echo "$as_me:10829: 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 10835 "configure"
#include "confdefs.h"
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:10839: \"$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:10845: \$? = $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:10864: 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:10874: checking if we should define SYSV" >&5
echo $ECHO_N "checking if we should define SYSV... $ECHO_C" >&6
if test "${cf_cv_sysv+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

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

#undef  SYSV
#define SYSV 1			/* get Xos.h to declare sys_errlist[] */
#ifdef HAVE_STDLIB_H
#include <stdlib.h>		/* look for wchar_t */
#endif
#ifdef HAVE_X11_INTRINSIC_H
#include <X11/Intrinsic.h>	/* Intrinsic.h has other traps... */
#endif
#ifdef HAVE_TERMIOS_H		/* needed for HPUX 10.20 */
#include <termios.h>
#define STRUCT_TERMIOS struct termios
#else
#define STRUCT_TERMIOS struct termio
#endif
#include <curses.h>
#include <term.h>		/* eliminate most BSD hacks */
#include <errno.h>		/* declare sys_errlist on older systems */
#include <sys/termio.h>		/* eliminate most of the remaining ones */

int
main (void)
{

static STRUCT_TERMIOS d_tio;
	d_tio.c_cc[VINTR] = 0;
	d_tio.c_cc[VQUIT] = 0;
	d_tio.c_cc[VERASE] = 0;
	d_tio.c_cc[VKILL] = 0;
	d_tio.c_cc[VEOF] = 0;
	d_tio.c_cc[VEOL] = 0;
	d_tio.c_cc[VMIN] = 0;
	d_tio.c_cc[VTIME] = 0;
#if defined(HAVE_SYS_ERRLIST) && !defined(DECL_SYS_ERRLIST)
sys_errlist[0] = "";		/* Cygwin mis-declares this */
#endif

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

fi
echo "$as_me:10945: result: $cf_cv_sysv" >&5
echo "${ECHO_T}$cf_cv_sysv" >&6
test "$cf_cv_sysv" = yes &&
cat >>confdefs.h <<\EOF
#define SYSV 1
EOF

LIBS="$cf_save_LIBS_CF_SYSV"
CFLAGS="$cf_save_CFLAGS_CF_SYSV"
CPPFLAGS="$cf_save_CPPFLAGS_CF_SYSV"

echo "$as_me:10956: checking for elf_begin in -lelf" >&5
echo $ECHO_N "checking for elf_begin in -lelf... $ECHO_C" >&6
if test "${ac_cv_lib_elf_elf_begin+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lelf  $LIBS"
cat >"conftest.$ac_ext" <<_ACEOF
#line 10964 "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 elf_begin (void);
int
main (void)
{
elf_begin ();
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext" "conftest$ac_exeext"
if { (eval echo "$as_me:10983: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:10986: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:10989: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:10992: \$? = $ac_status" >&5
  (exit "$ac_status"); }; }; then
  ac_cv_lib_elf_elf_begin=yes
else
  echo "$as_me: failed program was:" >&5
cat "conftest.$ac_ext" >&5
ac_cv_lib_elf_elf_begin=no
fi
rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:11003: result: $ac_cv_lib_elf_elf_begin" >&5
echo "${ECHO_T}$ac_cv_lib_elf_elf_begin" >&6
if test "$ac_cv_lib_elf_elf_begin" = yes; then

echo "$as_me:11007: checking if this is an SVR4 system" >&5
echo $ECHO_N "checking if this is an SVR4 system... $ECHO_C" >&6
if test "${cf_cv_svr4+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

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

#if defined(__CYGWIN__)
#error Cygwin is not SVr4
#endif
#include <elf.h>
#include <sys/termio.h>

int
main (void)
{

static struct termio d_tio;
	d_tio.c_cc[VINTR] = 0;
	d_tio.c_cc[VQUIT] = 0;
	d_tio.c_cc[VERASE] = 0;
	d_tio.c_cc[VKILL] = 0;
	d_tio.c_cc[VEOF] = 0;
	d_tio.c_cc[VEOL] = 0;
	d_tio.c_cc[VMIN] = 0;
	d_tio.c_cc[VTIME] = 0;
	d_tio.c_cc[VLNEXT] = 0;

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

fi
echo "$as_me:11063: result: $cf_cv_svr4" >&5
echo "${ECHO_T}$cf_cv_svr4" >&6

fi

test "$cf_cv_svr4" = yes &&
cat >>confdefs.h <<\EOF
#define SVR4 1
EOF

echo "$as_me:11073: 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:11083: 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:11095: 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:11112: 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:11123: result: $PKG_CONFIG" >&5
echo "${ECHO_T}$PKG_CONFIG" >&6
else
  echo "$as_me:11126: 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:11135: 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:11152: 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:11164: result: $ac_pt_PKG_CONFIG" >&5
echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
else
  echo "$as_me:11167: 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 "x$PKG_CONFIG" in
(x\$\(*\)*|x\'*\'*)
	;;
(x.|x$GLOB_FULLPATH_POSIX|x$GLOB_FULLPATH_OTHER)
	;;
(x\$\{*prefix\}*|x\$\{*dir\}*)
	eval PKG_CONFIG="$PKG_CONFIG"
	case "x$PKG_CONFIG" in
	(xNONE/*)
		PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
		;;
	esac
	;;
(xno|xNONE/*)
	PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
	;;
(*)
	{ { echo "$as_me:11208: 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:11215: WARNING: pkg-config is not installed" >&5
echo "$as_me: WARNING: pkg-config is not installed" >&2;}
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}:11231: 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}:11237: 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}:11241: 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:11361: 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}:11368: 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}:11374: 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}:11378: 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:11498: 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}:11505: 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}:11511: 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}:11515: 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:11635: 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}:11642: 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}:11648: 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}:11652: 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:11772: 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}:11785: 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}:11791: 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}:11795: 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:11916: 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 11923 "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:11943: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:11946: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:11949: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:11952: \$? = $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:11962: 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}:11968: 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}:11975: 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}:11981: 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}:11985: 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}:12108: 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}:12113: testing ...after  $LIBS ..." 1>&5

fi

		fi
		;;
	esac

echo "$as_me:12121: 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 12128 "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:12144: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:12147: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:12150: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:12153: \$? = $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:12163: 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}:12177: 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}:12182: 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}:12188: 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}:12192: 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}:12311: 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}:12317: 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}:12321: 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}:12450: 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}:12455: 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}:12475: 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}:12560: 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}:12570: 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}:12580: 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 12589 "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:12601: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:12604: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:12607: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:12610: \$? = $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}:12618: 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}:12623: 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:12631: 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 12637 "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:12668: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:12671: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:12674: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:12677: \$? = $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:12687: 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:12693: 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 12701 "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:12720: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:12723: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:12726: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:12729: \$? = $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:12740: 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:12764: 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 12770 "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:12801: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:12804: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:12807: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:12810: \$? = $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:12820: 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:12826: 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 12834 "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:12853: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:12856: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:12859: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:12862: \$? = $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:12873: 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:12890: 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

for ac_header in \
	X11/DECkeysym.h \
	X11/Sunkeysym.h \
	X11/XF86keysym.h \
	X11/XKBlib.h \
	X11/TranslateI.h \
	X11/Xpoll.h \
	X11/extensions/XKB.h \

do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
echo "$as_me:12909: 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 12915 "configure"
#include "confdefs.h"
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:12919: \"$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:12925: \$? = $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:12944: 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

ICON_SUFFIX=.xbm

cf_save_cppflags="${CPPFLAGS}"
cf_save_ldflags="${LDFLAGS}"

echo "$as_me:12959: checking if you want to use the Xpm library for colored icon" >&5
echo $ECHO_N "checking if you want to use the Xpm library for colored icon... $ECHO_C" >&6

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

if test "$cf_Xpm_library" != no ; then
    if test "$cf_Xpm_library" != yes ; then
	CPPFLAGS="$CPPFLAGS -I$withval/include"
	LDFLAGS="$LDFLAGS -L$withval/lib"
    fi
    echo "$as_me:12977: checking for X11/xpm.h" >&5
echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6
if test "${ac_cv_header_X11_xpm_h+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >"conftest.$ac_ext" <<_ACEOF
#line 12983 "configure"
#include "confdefs.h"
#include <X11/xpm.h>
_ACEOF
if { (eval echo "$as_me:12987: \"$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:12993: \$? = $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_X11_xpm_h=yes
else
  echo "$as_me: failed program was:" >&5
  cat "conftest.$ac_ext" >&5
  ac_cv_header_X11_xpm_h=no
fi
rm -f conftest.err "conftest.$ac_ext"
fi
echo "$as_me:13012: result: $ac_cv_header_X11_xpm_h" >&5
echo "${ECHO_T}$ac_cv_header_X11_xpm_h" >&6
if test "$ac_cv_header_X11_xpm_h" = yes; then

	echo "$as_me:13016: checking for XpmCreatePixmapFromData in -lXpm" >&5
echo $ECHO_N "checking for XpmCreatePixmapFromData in -lXpm... $ECHO_C" >&6
if test "${ac_cv_lib_Xpm_XpmCreatePixmapFromData+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lXpm -lX11 $X_LIBS $LIBS"
cat >"conftest.$ac_ext" <<_ACEOF
#line 13024 "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 XpmCreatePixmapFromData (void);
int
main (void)
{
XpmCreatePixmapFromData ();
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext" "conftest$ac_exeext"
if { (eval echo "$as_me:13043: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:13046: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:13049: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:13052: \$? = $ac_status" >&5
  (exit "$ac_status"); }; }; then
  ac_cv_lib_Xpm_XpmCreatePixmapFromData=yes
else
  echo "$as_me: failed program was:" >&5
cat "conftest.$ac_ext" >&5
ac_cv_lib_Xpm_XpmCreatePixmapFromData=no
fi
rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:13063: result: $ac_cv_lib_Xpm_XpmCreatePixmapFromData" >&5
echo "${ECHO_T}$ac_cv_lib_Xpm_XpmCreatePixmapFromData" >&6
if test "$ac_cv_lib_Xpm_XpmCreatePixmapFromData" = yes; then

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

	    ICON_SUFFIX=.xpm
	    LIBS="-lXpm $LIBS"
else
  CPPFLAGS="${cf_save_cppflags}" LDFLAGS="${cf_save_ldflags}"
fi

else
  CPPFLAGS="${cf_save_cppflags}" LDFLAGS="${cf_save_ldflags}"
fi

fi

echo "$as_me:13083: checking if you want to use the Xinerama extension" >&5
echo $ECHO_N "checking if you want to use the Xinerama extension... $ECHO_C" >&6

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

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

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

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

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

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

echo "${as_me:-configure}:13110: testing package xinerama 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 >>confdefs.h <<\EOF
#define HAVE_X11_EXTENSIONS_XINERAMA_H 1
EOF

else
	cf_pkgconfig_incs=
	cf_pkgconfig_libs=

	echo "$as_me:13234: checking for XineramaQueryScreens in -lXinerama" >&5
echo $ECHO_N "checking for XineramaQueryScreens in -lXinerama... $ECHO_C" >&6
if test "${ac_cv_lib_Xinerama_XineramaQueryScreens+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lXinerama  $LIBS"
cat >"conftest.$ac_ext" <<_ACEOF
#line 13242 "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 XineramaQueryScreens (void);
int
main (void)
{
XineramaQueryScreens ();
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext" "conftest$ac_exeext"
if { (eval echo "$as_me:13261: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:13264: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:13267: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:13270: \$? = $ac_status" >&5
  (exit "$ac_status"); }; }; then
  ac_cv_lib_Xinerama_XineramaQueryScreens=yes
else
  echo "$as_me: failed program was:" >&5
cat "conftest.$ac_ext" >&5
ac_cv_lib_Xinerama_XineramaQueryScreens=no
fi
rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:13281: result: $ac_cv_lib_Xinerama_XineramaQueryScreens" >&5
echo "${ECHO_T}$ac_cv_lib_Xinerama_XineramaQueryScreens" >&6
if test "$ac_cv_lib_Xinerama_XineramaQueryScreens" = yes; then

cf_add_libs="$LIBS"
# reverse order
cf_add_0lib=
for cf_add_1lib in -lXinerama; 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"

for ac_header in \
			X11/extensions/Xinerama.h \

do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
echo "$as_me:13306: 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 13312 "configure"
#include "confdefs.h"
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:13316: \"$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:13322: \$? = $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:13341: 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

cf_x_athena=${cf_x_athena:-Xaw}

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

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

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

echo "$as_me:13413: 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:13424: result: yes" >&5
echo "${ECHO_T}yes" >&6
else
	echo "$as_me:13427: 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}:13447: 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}:13453: 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}:13457: 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}:13588: testing ..trimmed $LIBS ..." 1>&5

			;;
		esac
	done

echo "$as_me:13594: 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 13601 "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:13619: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:13622: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:13625: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:13628: \$? = $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:13638: 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}:13650: 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}:13658: 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}:13664: 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}:13668: 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}:13788: 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}:13793: testing ...after  $LIBS ..." 1>&5

else
	cf_pkgconfig_incs=
	cf_pkgconfig_libs=

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

echo "${as_me:-configure}:13801: 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}:13806: 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}:13817: 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}:13842: 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}:13848: 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}:13852: 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:13973: 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 13981 "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:14000: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:14003: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:14006: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:14009: \$? = $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:14020: 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}:14056: 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}:14062: 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}:14066: 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:14186: 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}:14193: 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}:14199: 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}:14203: 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:14323: 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}:14330: 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}:14336: 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}:14340: 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:14460: 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}:14467: 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}:14473: 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}:14477: 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:14597: 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}:14610: 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}:14616: 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}:14620: 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:14741: 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 14748 "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:14768: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:14771: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:14774: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:14777: \$? = $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:14787: 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}:14793: 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}:14800: 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}:14806: 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}:14810: 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}:14933: 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}:14938: testing ...after  $LIBS ..." 1>&5

fi

		fi
		;;
	esac

echo "$as_me:14946: 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 14953 "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:14969: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:14972: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:14975: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:14978: \$? = $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:14988: 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}:15002: 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}:15007: 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}:15013: 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}:15017: 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}:15136: 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}:15142: 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}:15146: 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}:15275: 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}:15280: 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}:15300: 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}:15385: 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}:15395: 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}:15405: 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 15414 "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:15426: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:15429: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:15432: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:15435: \$? = $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}:15443: 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}:15448: 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:15456: 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 15462 "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:15493: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:15496: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:15499: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:15502: \$? = $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:15512: 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:15518: 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 15526 "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:15545: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:15548: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:15551: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:15554: \$? = $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:15565: 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:15589: 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 15595 "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:15626: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:15629: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:15632: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:15635: \$? = $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:15645: 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:15651: 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 15659 "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:15678: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:15681: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:15684: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:15687: \$? = $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:15698: 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:15715: 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:15756: 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:15759: checking for $cf_test" >&5
echo $ECHO_N "checking for $cf_test... $ECHO_C" >&6
		fi
		cat >"conftest.$ac_ext" <<_ACEOF
#line 15763 "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:15777: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:15780: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:15783: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:15786: \$? = $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:15795: 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:15811: 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:15876: 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 15879 "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:15896: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:15899: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:15902: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:15905: \$? = $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:15914: 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:15931: 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

for ac_header in X11/Xpoll.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
echo "$as_me:15963: 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 15969 "configure"
#include "confdefs.h"
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:15973: \"$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:15979: \$? = $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:15998: 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:16008: 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}:16014: testing sys/types alone ..." 1>&5

cat >"conftest.$ac_ext" <<_ACEOF
#line 16017 "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:16030: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:16033: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:16036: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:16039: \$? = $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}:16046: testing X11/Xpoll.h ..." 1>&5

cat >"conftest.$ac_ext" <<_ACEOF
#line 16049 "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:16064: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:16067: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:16070: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:16073: \$? = $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}:16080: testing sys/select.h ..." 1>&5

cat >"conftest.$ac_ext" <<_ACEOF
#line 16083 "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:16097: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:16100: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:16103: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:16106: \$? = $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:16120: 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:16130: checking for declaration of fd_mask" >&5
echo $ECHO_N "checking for declaration of fd_mask... $ECHO_C" >&6
if test "${cf_cv_type_fd_mask+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

    if test x$cf_cv_type_fd_set = xX11/Xpoll.h ; then
        cat >"conftest.$ac_ext" <<_ACEOF
#line 16138 "configure"
#include "confdefs.h"

#include <X11/Xpoll.h>
int
main (void)
{
fd_mask x
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext"
if { (eval echo "$as_me:16151: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:16154: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:16157: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:16160: \$? = $ac_status" >&5
  (exit "$ac_status"); }; }; then
  :
else
  echo "$as_me: failed program was:" >&5
cat "conftest.$ac_ext" >&5

echo "${as_me:-configure}:16167: testing if we must define CSRG_BASED ..." 1>&5

# Xosdefs.h on Mac OS X may not define this (but it should).
            cat >"conftest.$ac_ext" <<_ACEOF
#line 16171 "configure"
#include "confdefs.h"

#define CSRG_BASED
#include <X11/Xpoll.h>
int
main (void)
{
fd_mask x
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext"
if { (eval echo "$as_me:16185: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:16188: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:16191: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:16194: \$? = $ac_status" >&5
  (exit "$ac_status"); }; }; then
  cf_cv_type_fd_mask=CSRG_BASED
else
  echo "$as_me: failed program was:" >&5
cat "conftest.$ac_ext" >&5
fi
rm -f "conftest.$ac_objext" "conftest.$ac_ext"
fi
rm -f "conftest.$ac_objext" "conftest.$ac_ext"
    else
        cf_cv_type_fd_mask=$cf_cv_type_fd_set
    fi

fi
echo "$as_me:16209: result: $cf_cv_type_fd_mask" >&5
echo "${ECHO_T}$cf_cv_type_fd_mask" >&6
if test x$cf_cv_type_fd_mask = xCSRG_BASED ; then

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

fi

echo "$as_me:16219: checking for IRIX 6.5 baud-rate redefinitions" >&5
echo $ECHO_N "checking for IRIX 6.5 baud-rate redefinitions... $ECHO_C" >&6
if test "${cf_cv_termio_c_ispeed+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

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

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

struct termio foo;
foo.c_ispeed = B38400;
foo.c_ospeed = B9600;
(void)foo;

  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext"
if { (eval echo "$as_me:16245: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:16248: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:16251: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:16254: \$? = $ac_status" >&5
  (exit "$ac_status"); }; }; then
  cf_cv_termio_c_ispeed=yes

else
  echo "$as_me: failed program was:" >&5
cat "conftest.$ac_ext" >&5
cf_cv_termio_c_ispeed=no
fi
rm -f "conftest.$ac_objext" "conftest.$ac_ext"

fi
echo "$as_me:16266: result: $cf_cv_termio_c_ispeed" >&5
echo "${ECHO_T}$cf_cv_termio_c_ispeed" >&6
test "$cf_cv_termio_c_ispeed" = yes &&
cat >>confdefs.h <<\EOF
#define HAVE_TERMIO_C_ISPEED 1
EOF

echo "$as_me:16273: checking for termios type tcflag_t" >&5
echo $ECHO_N "checking for termios type tcflag_t... $ECHO_C" >&6
if test "${cf_cv_havetype_tcflag_t+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

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

		tcflag_t x = 0; (void)x
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext"
if { (eval echo "$as_me:16293: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:16296: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:16299: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:16302: \$? = $ac_status" >&5
  (exit "$ac_status"); }; }; then
  cf_cv_havetype_tcflag_t=yes
else
  echo "$as_me: failed program was:" >&5
cat "conftest.$ac_ext" >&5
cf_cv_havetype_tcflag_t=no
fi
rm -f "conftest.$ac_objext" "conftest.$ac_ext"

fi
echo "$as_me:16313: result: $cf_cv_havetype_tcflag_t" >&5
echo "${ECHO_T}$cf_cv_havetype_tcflag_t" >&6
test "$cf_cv_havetype_tcflag_t" = no &&
cat >>confdefs.h <<\EOF
#define tcflag_t unsigned long
EOF

echo "$as_me:16320: checking for termios type speed_t" >&5
echo $ECHO_N "checking for termios type speed_t... $ECHO_C" >&6
if test "${cf_cv_havetype_speed_t+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

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

		speed_t x = 0; (void)x
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext"
if { (eval echo "$as_me:16340: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:16343: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:16346: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:16349: \$? = $ac_status" >&5
  (exit "$ac_status"); }; }; then
  cf_cv_havetype_speed_t=yes
else
  echo "$as_me: failed program was:" >&5
cat "conftest.$ac_ext" >&5
cf_cv_havetype_speed_t=no
fi
rm -f "conftest.$ac_objext" "conftest.$ac_ext"

fi
echo "$as_me:16360: result: $cf_cv_havetype_speed_t" >&5
echo "${ECHO_T}$cf_cv_havetype_speed_t" >&6
test "$cf_cv_havetype_speed_t" = no &&
cat >>confdefs.h <<\EOF
#define speed_t unsigned short
EOF

echo "$as_me:16367: checking for termios type cc_t" >&5
echo $ECHO_N "checking for termios type cc_t... $ECHO_C" >&6
if test "${cf_cv_havetype_cc_t+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

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

		cc_t x = 0; (void)x
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext"
if { (eval echo "$as_me:16387: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:16390: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:16393: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:16396: \$? = $ac_status" >&5
  (exit "$ac_status"); }; }; then
  cf_cv_havetype_cc_t=yes
else
  echo "$as_me: failed program was:" >&5
cat "conftest.$ac_ext" >&5
cf_cv_havetype_cc_t=no
fi
rm -f "conftest.$ac_objext" "conftest.$ac_ext"

fi
echo "$as_me:16407: result: $cf_cv_havetype_cc_t" >&5
echo "${ECHO_T}$cf_cv_havetype_cc_t" >&6
test "$cf_cv_havetype_cc_t" = no &&
cat >>confdefs.h <<\EOF
#define cc_t unsigned char
EOF

# The Xcursor library is normally (weakly) linked via the X11 library rather
# than directly to applications.  xterm can select a cursor theme; users can
# also use environment variables to select cursor size.  We would only notice
# the library if there are development files for it.  Provide a way to disable
# the feature if it is unwanted.
echo "$as_me:16419: checking if we expect to use the Xcursor library" >&5
echo $ECHO_N "checking if we expect to use the Xcursor library... $ECHO_C" >&6

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

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

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

fi

LIBS="$LIBS $X_EXTRA_LIBS"

for ac_header in \
stropts.h \

do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
echo "$as_me:16453: 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 16459 "configure"
#include "confdefs.h"
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:16463: \"$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:16469: \$? = $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:16488: 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_func_grantpt="grantpt ptsname"
cf_prefer_openpt=no
case $host_os in
(darwin[0-9].*)
	;;
(openbsd[0-9].*)
	# The POSIX entrypoints exist, but have never worked.
	;;
(linux*)
	cf_func_grantpt="$cf_func_grantpt posix_openpt"
	cf_prefer_openpt=yes
	;;
(*)
	cf_func_grantpt="$cf_func_grantpt posix_openpt"
	;;
esac

for ac_func in $cf_func_grantpt
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:16518: 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 16524 "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:16555: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:16558: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:16561: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:16564: \$? = $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:16574: 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

cf_grantpt_opts=
if test "x$ac_cv_func_grantpt" = "xyes" ; then
	echo "$as_me:16586: checking if grantpt really works" >&5
echo $ECHO_N "checking if grantpt really works... $ECHO_C" >&6
	cat >"conftest.$ac_ext" <<_ACEOF
#line 16589 "configure"
#include "confdefs.h"

#include <stdlib.h>
#include <stdio.h>
#include <termios.h>
#include <unistd.h>
#include <signal.h>
#include <fcntl.h>
#include <errno.h>

#ifndef HAVE_POSIX_OPENPT
#undef posix_openpt
#define posix_openpt(mode) open("/dev/ptmx", mode)
#endif

#ifdef HAVE_STROPTS_H
#include <stropts.h>
#endif

static void failed(int code)
{
	perror("conftest");
	exit(code);
}

static void my_timeout(int sig)
{
	(void)sig;
	exit(99);
}

int
main (void)
{

	int code = 0;
	int pty;
	int tty;
	char *slave;
	struct termios tio;

	(void)tio;
	signal(SIGALRM, my_timeout);

	if (alarm(2) == 9)
		failed(9);
	else if ((pty = posix_openpt(O_RDWR)) < 0)
		failed(1);
	else if (grantpt(pty) < 0)
		failed(2);
	else if (unlockpt(pty) < 0)
		failed(3);
	else if ((slave = ptsname(pty)) == 0)
		failed(4);
#if (CONFTEST == 3) || defined(CONFTEST_isatty)
	else if (!isatty(pty))
		failed(4);
#endif
#if CONFTEST >= 4
    else if (tcgetattr(pty, &tio) < 0)
		failed(20);
    else if (tcsetattr(pty, TCSAFLUSH, &tio) < 0)
		failed(21);
#endif
	/* BSD posix_openpt does not treat pty as a terminal until slave is opened.
	 * Linux does treat it that way.
	 */
	else if ((tty = open(slave, O_RDWR)) < 0)
		failed(5);
#ifdef CONFTEST
#ifdef I_PUSH
#if (CONFTEST == 0) || defined(CONFTEST_ptem)
    else if (ioctl(tty, I_PUSH, "ptem") < 0)
		failed(10);
#endif
#if (CONFTEST == 1) || defined(CONFTEST_ldterm)
    else if (ioctl(tty, I_PUSH, "ldterm") < 0)
		failed(11);
#endif
#if (CONFTEST == 2) || defined(CONFTEST_ttcompat)
    else if (ioctl(tty, I_PUSH, "ttcompat") < 0)
		failed(12);
#endif
#endif /* I_PUSH */
#if CONFTEST >= 5
    else if (tcgetattr(tty, &tio) < 0)
		failed(30);
    else if (tcsetattr(tty, TCSAFLUSH, &tio) < 0)
		failed(31);
#endif
#endif /* CONFTEST */
    (void) tty;
	${cf_cv_main_return:-return}(code);

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

	if test "$cross_compiling" = yes; then
  ac_cv_func_grantpt=maybe
else
  cat >"conftest.$ac_ext" <<_ACEOF
#line 16705 "configure"
#include "confdefs.h"

#include <stdlib.h>
#include <stdio.h>
#include <termios.h>
#include <unistd.h>
#include <signal.h>
#include <fcntl.h>
#include <errno.h>

#ifndef HAVE_POSIX_OPENPT
#undef posix_openpt
#define posix_openpt(mode) open("/dev/ptmx", mode)
#endif

#ifdef HAVE_STROPTS_H
#include <stropts.h>
#endif

static void failed(int code)
{
	perror("conftest");
	exit(code);
}

static void my_timeout(int sig)
{
	(void)sig;
	exit(99);
}

int main(void)
{

	int code = 0;
	int pty;
	int tty;
	char *slave;
	struct termios tio;

	(void)tio;
	signal(SIGALRM, my_timeout);

	if (alarm(2) == 9)
		failed(9);
	else if ((pty = posix_openpt(O_RDWR)) < 0)
		failed(1);
	else if (grantpt(pty) < 0)
		failed(2);
	else if (unlockpt(pty) < 0)
		failed(3);
	else if ((slave = ptsname(pty)) == 0)
		failed(4);
#if (CONFTEST == 3) || defined(CONFTEST_isatty)
	else if (!isatty(pty))
		failed(4);
#endif
#if CONFTEST >= 4
    else if (tcgetattr(pty, &tio) < 0)
		failed(20);
    else if (tcsetattr(pty, TCSAFLUSH, &tio) < 0)
		failed(21);
#endif
	/* BSD posix_openpt does not treat pty as a terminal until slave is opened.
	 * Linux does treat it that way.
	 */
	else if ((tty = open(slave, O_RDWR)) < 0)
		failed(5);
#ifdef CONFTEST
#ifdef I_PUSH
#if (CONFTEST == 0) || defined(CONFTEST_ptem)
    else if (ioctl(tty, I_PUSH, "ptem") < 0)
		failed(10);
#endif
#if (CONFTEST == 1) || defined(CONFTEST_ldterm)
    else if (ioctl(tty, I_PUSH, "ldterm") < 0)
		failed(11);
#endif
#if (CONFTEST == 2) || defined(CONFTEST_ttcompat)
    else if (ioctl(tty, I_PUSH, "ttcompat") < 0)
		failed(12);
#endif
#endif /* I_PUSH */
#if CONFTEST >= 5
    else if (tcgetattr(tty, &tio) < 0)
		failed(30);
    else if (tcsetattr(tty, TCSAFLUSH, &tio) < 0)
		failed(31);
#endif
#endif /* CONFTEST */
    (void) tty;
	${cf_cv_main_return:-return}(code);

}

_ACEOF
rm -f "conftest$ac_exeext"
if { (eval echo "$as_me:16803: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:16806: \$? = $ac_status" >&5
  (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
  { (eval echo "$as_me:16808: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:16811: \$? = $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_func_grantpt=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
ac_cv_func_grantpt=no
fi
rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
	echo "$as_me:16830: result: $ac_cv_func_grantpt" >&5
echo "${ECHO_T}$ac_cv_func_grantpt" >&6

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

		if test "x$ac_cv_func_grantpt" = "xyes" ; then
			echo "$as_me:16836: checking for pty features" >&5
echo $ECHO_N "checking for pty features... $ECHO_C" >&6
			if test "x$ac_cv_header_stropts_h" = xyes
			then
				cf_pty_this=0
			else
				cf_pty_this=3
			fi

			cf_pty_defines=
			while test $cf_pty_this != 6
			do

				cf_pty_feature=
				cf_pty_next="`expr $cf_pty_this + 1`"

echo "${as_me:-configure}:16852: testing pty feature test $cf_pty_next:5 ..." 1>&5

				if test "$cross_compiling" = yes; then
  { { echo "$as_me:16855: 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 16860 "configure"
#include "confdefs.h"
#define CONFTEST $cf_pty_this
$cf_pty_defines

#include <stdlib.h>
#include <stdio.h>
#include <termios.h>
#include <unistd.h>
#include <signal.h>
#include <fcntl.h>
#include <errno.h>

#ifndef HAVE_POSIX_OPENPT
#undef posix_openpt
#define posix_openpt(mode) open("/dev/ptmx", mode)
#endif

#ifdef HAVE_STROPTS_H
#include <stropts.h>
#endif

static void failed(int code)
{
	perror("conftest");
	exit(code);
}

static void my_timeout(int sig)
{
	(void)sig;
	exit(99);
}

int main(void)
{

	int code = 0;
	int pty;
	int tty;
	char *slave;
	struct termios tio;

	(void)tio;
	signal(SIGALRM, my_timeout);

	if (alarm(2) == 9)
		failed(9);
	else if ((pty = posix_openpt(O_RDWR)) < 0)
		failed(1);
	else if (grantpt(pty) < 0)
		failed(2);
	else if (unlockpt(pty) < 0)
		failed(3);
	else if ((slave = ptsname(pty)) == 0)
		failed(4);
#if (CONFTEST == 3) || defined(CONFTEST_isatty)
	else if (!isatty(pty))
		failed(4);
#endif
#if CONFTEST >= 4
    else if (tcgetattr(pty, &tio) < 0)
		failed(20);
    else if (tcsetattr(pty, TCSAFLUSH, &tio) < 0)
		failed(21);
#endif
	/* BSD posix_openpt does not treat pty as a terminal until slave is opened.
	 * Linux does treat it that way.
	 */
	else if ((tty = open(slave, O_RDWR)) < 0)
		failed(5);
#ifdef CONFTEST
#ifdef I_PUSH
#if (CONFTEST == 0) || defined(CONFTEST_ptem)
    else if (ioctl(tty, I_PUSH, "ptem") < 0)
		failed(10);
#endif
#if (CONFTEST == 1) || defined(CONFTEST_ldterm)
    else if (ioctl(tty, I_PUSH, "ldterm") < 0)
		failed(11);
#endif
#if (CONFTEST == 2) || defined(CONFTEST_ttcompat)
    else if (ioctl(tty, I_PUSH, "ttcompat") < 0)
		failed(12);
#endif
#endif /* I_PUSH */
#if CONFTEST >= 5
    else if (tcgetattr(tty, &tio) < 0)
		failed(30);
    else if (tcsetattr(tty, TCSAFLUSH, &tio) < 0)
		failed(31);
#endif
#endif /* CONFTEST */
    (void) tty;
	${cf_cv_main_return:-return}(code);

}

_ACEOF
rm -f "conftest$ac_exeext"
if { (eval echo "$as_me:16960: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:16963: \$? = $ac_status" >&5
  (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
  { (eval echo "$as_me:16965: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:16968: \$? = $ac_status" >&5
  (exit "$ac_status"); }; }; then

				case $cf_pty_next in
				(1) # - streams
					cf_pty_feature=ptem
					;;
				(2) # - streams
					cf_pty_feature=ldterm
					;;
				(3) # - streams
					cf_pty_feature=ttcompat
					;;
				(4)
					cf_pty_feature=pty_isatty
					;;
				(5)
					cf_pty_feature=pty_tcsetattr
					;;
				(6)
					cf_pty_feature=tty_tcsetattr
					;;
				esac

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

				case $cf_pty_next in
				(1|2|3)

echo "${as_me:-configure}:17000: testing skipping remaining streams features $cf_pty_this..2 ..." 1>&5

					cf_pty_next=3
					;;
				esac

fi
rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
fi
				if test -n "$cf_pty_feature"
				then
					cf_pty_defines="$cf_pty_defines
#define CONFTEST_$cf_pty_feature 1
"
					cf_grantpt_opts="$cf_grantpt_opts $cf_pty_feature"
				fi

				cf_pty_this=$cf_pty_next
			done
			echo "$as_me:17019: result: $cf_grantpt_opts" >&5
echo "${ECHO_T}$cf_grantpt_opts" >&6
			cf_grantpt_opts=`echo "$cf_grantpt_opts" | sed -e 's/ isatty//'`
		fi
	fi
fi

if test "x$cf_prefer_posix_openpt" = "xyes" && test "x$ac_cv_func_posix_openpt" = "xyes" ; then
	test -n "$verbose" && echo "	prefer posix_openpt over openpty" 1>&6

echo "${as_me:-configure}:17029: testing prefer posix_openpt over openpty ..." 1>&5

elif test "x$disable_openpty" != "xyes" || test -z "$cf_grantpt_opts" ; then
	echo "$as_me:17032: checking for openpty in -lutil" >&5
echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
if test "${ac_cv_lib_util_openpty+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lutil  $LIBS"
cat >"conftest.$ac_ext" <<_ACEOF
#line 17040 "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 openpty (void);
int
main (void)
{
openpty ();
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext" "conftest$ac_exeext"
if { (eval echo "$as_me:17059: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:17062: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:17065: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:17068: \$? = $ac_status" >&5
  (exit "$ac_status"); }; }; then
  ac_cv_lib_util_openpty=yes
else
  echo "$as_me: failed program was:" >&5
cat "conftest.$ac_ext" >&5
ac_cv_lib_util_openpty=no
fi
rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:17079: result: $ac_cv_lib_util_openpty" >&5
echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
if test "$ac_cv_lib_util_openpty" = yes; then
  cf_have_openpty=yes
else
  cf_have_openpty=no
fi

	if test "$cf_have_openpty" = yes ; then
		ac_cv_func_grantpt=no
		LIBS="-lutil $LIBS"

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

for ac_header in \
			util.h \
			libutil.h \
			pty.h \

do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
echo "$as_me:17102: 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 17108 "configure"
#include "confdefs.h"
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:17112: \"$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:17118: \$? = $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:17137: 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 "x$ac_cv_func_grantpt" != xno
then
	test -n "$verbose" && echo "	will rely upon grantpt" 1>&6

echo "${as_me:-configure}:17154: testing will rely upon grantpt ..." 1>&5

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

	for cf_feature in $cf_grantpt_opts
	do
		cf_feature=`echo "$cf_feature" | sed -e 's/ //g'`

cf_FEATURE=`echo "$cf_feature" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`

		cat >>confdefs.h <<EOF
#define HAVE_GRANTPT_$cf_FEATURE 1
EOF

	done
elif test "x$cf_have_openpty" = xno
then
	test -n "$verbose" && echo "	will rely upon BSD-pseudoterminals" 1>&6

echo "${as_me:-configure}:17175: testing will rely upon BSD-pseudoterminals ..." 1>&5

else
	test -n "$verbose" && echo "	will rely upon openpty" 1>&6

echo "${as_me:-configure}:17180: testing will rely upon openpty ..." 1>&5

fi

echo "$as_me:17184: checking if we can use XkbQueryExtension" >&5
echo $ECHO_N "checking if we can use XkbQueryExtension... $ECHO_C" >&6
if test "${cf_cv_xkb_query_extension+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

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

#include <X11/Xlib.h>
#include <X11/extensions/XKB.h>
#include <X11/XKBlib.h>

int
main (void)
{

	int xkbmajor = XkbMajorVersion;
	int xkbminor = XkbMinorVersion;
	int xkbopcode, xkbevent, xkberror;

	if (XkbLibraryVersion(&xkbmajor, &xkbminor)
	    && XkbQueryExtension((Display *)0,
				 &xkbopcode,
				 &xkbevent,
				 &xkberror,
				 &xkbmajor,
				 &xkbminor))
		 return 0;

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

cf_cv_xkb_query_extension=yes

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

cf_cv_xkb_query_extension=no

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

fi
echo "$as_me:17244: result: $cf_cv_xkb_query_extension" >&5
echo "${ECHO_T}$cf_cv_xkb_query_extension" >&6

if test $cf_cv_xkb_query_extension = yes
then

for ac_func in XkbQueryExtension
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:17253: 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 17259 "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:17290: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:17293: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:17296: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:17299: \$? = $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:17309: 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

fi

echo "$as_me:17321: checking if we can use XkbKeycodeToKeysym" >&5
echo $ECHO_N "checking if we can use XkbKeycodeToKeysym... $ECHO_C" >&6
if test "${cf_cv_xkb_keycode_to_keysym+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

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

#include <X11/Xlib.h>
#include <X11/XKBlib.h>

int
main (void)
{

    KeySym keysym = XkbKeycodeToKeysym((Display *)0, 0, 0, 0);
	(void)keysym;

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

cf_cv_xkb_keycode_to_keysym=yes

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

cf_cv_xkb_keycode_to_keysym=no

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

fi
echo "$as_me:17370: result: $cf_cv_xkb_keycode_to_keysym" >&5
echo "${ECHO_T}$cf_cv_xkb_keycode_to_keysym" >&6

if test $cf_cv_xkb_keycode_to_keysym = yes
then

for ac_func in XkbKeycodeToKeysym
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:17379: 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 17385 "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:17416: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:17419: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:17422: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:17425: \$? = $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:17435: 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

fi

cf_save_LIBS_CF_XKB_BELL_EXT="$LIBS"
cf_save_CFLAGS_CF_XKB_BELL_EXT="$CFLAGS"
cf_save_CPPFLAGS_CF_XKB_BELL_EXT="$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

echo "$as_me:17463: checking for XKB Bell extension" >&5
echo $ECHO_N "checking for XKB Bell extension... $ECHO_C" >&6
if test "${cf_cv_xkb_bell_ext+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

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

#include <X11/Intrinsic.h>
#include <X11/XKBlib.h>		/* has the prototype */
#include <X11/extensions/XKBbells.h>	/* has the XkbBI_xxx definitions */

int
main (void)
{

	int x = (XkbBI_Info |XkbBI_MinorError |XkbBI_MajorError |XkbBI_TerminalBell |XkbBI_MarginBell);
	Atom y = 0;
	(void)x;
	XkbBell((Display *)0, (Window)0, 0, y);

  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext" "conftest$ac_exeext"
if { (eval echo "$as_me:17491: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:17494: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:17497: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:17500: \$? = $ac_status" >&5
  (exit "$ac_status"); }; }; then
  cf_cv_xkb_bell_ext=yes
else
  echo "$as_me: failed program was:" >&5
cat "conftest.$ac_ext" >&5
cf_cv_xkb_bell_ext=no
fi
rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"

fi
echo "$as_me:17511: result: $cf_cv_xkb_bell_ext" >&5
echo "${ECHO_T}$cf_cv_xkb_bell_ext" >&6
test "$cf_cv_xkb_bell_ext" = yes &&
cat >>confdefs.h <<\EOF
#define HAVE_XKB_BELL_EXT 1
EOF

LIBS="$cf_save_LIBS_CF_XKB_BELL_EXT"
CFLAGS="$cf_save_CFLAGS_CF_XKB_BELL_EXT"
CPPFLAGS="$cf_save_CPPFLAGS_CF_XKB_BELL_EXT"

for ac_func in Xutf8LookupString
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:17525: 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 17531 "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:17562: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:17565: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:17568: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:17571: \$? = $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:17581: 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

	EXTRAHDRS="$EXTRAHDRS xutf8.h"
	EXTRASRCS="$EXTRASRCS xutf8.c"
	EXTRAOBJS="$EXTRAOBJS xutf8.o"

fi
done

echo "$as_me:17597: checking if you want narrow prototypes for X libraries" >&5
echo $ECHO_N "checking if you want narrow prototypes for X libraries... $ECHO_C" >&6

case `$ac_config_guess` in
(*freebsd*|*gnu*|*irix5*|*irix6*|*netbsd*|*openbsd*|*qnx*|*sco*|*sgi*)
	cf_default_narrowproto=yes
	;;
(*)
	cf_default_narrowproto=no
	;;
esac

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

fi;
echo "$as_me:17623: result: $enable_narrowproto" >&5
echo "${ECHO_T}$enable_narrowproto" >&6

echo "$as_me:17626: checking if we should use imake to help" >&5
echo $ECHO_N "checking if we should use imake to help... $ECHO_C" >&6

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

fi;
echo "$as_me:17643: result: $enable_imake" >&5
echo "${ECHO_T}$enable_imake" >&6

if test "$enable_imake" = yes ; then

for ac_prog in xmkmf imake
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:17652: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_path_IMAKE+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $IMAKE in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_IMAKE="$IMAKE" # 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_IMAKE="$ac_dir/$ac_word"
   echo "$as_me:17669: found $ac_dir/$ac_word" >&5
   break
fi
done

  ;;
esac
fi
IMAKE=$ac_cv_path_IMAKE

if test -n "$IMAKE"; then
  echo "$as_me:17680: result: $IMAKE" >&5
echo "${ECHO_T}$IMAKE" >&6
else
  echo "$as_me:17683: result: no" >&5
echo "${ECHO_T}no" >&6
fi

  test -n "$IMAKE" && break
done

if test -n "$IMAKE" ; then

case $IMAKE in
(*/imake)
	cf_imake_opts="-DUseInstalled=YES"
	;;
(*/util/xmkmf)
	# A single parameter tells xmkmf where the config-files are:
	cf_imake_opts="`echo "$IMAKE"|sed -e s,/config/util/xmkmf,,`"
	;;
(*)
	cf_imake_opts=
	;;
esac

# If it's installed properly, imake (or its wrapper, xmkmf) will point to the
# config directory.
if mkdir conftestdir; then
	CDPATH=; export CDPATH
	cf_makefile=`cd "$srcdir" || exit;pwd`/Imakefile
	cd conftestdir

	cat >fix_cflags.sed <<'CF_EOF'
s/\\//g
s/[ 	][ 	]*/ /g
s/"//g
:pack
s/\(=[^ ][^ ]*\) \([^-]\)/\1	\2/g
t pack
s/\(-D[a-zA-Z0-9_][a-zA-Z0-9_]*\)=\([^\'0-9 ][^ ]*\)/\1='\\"\2\\"'/g
s/^IMAKE[ ]/IMAKE_CFLAGS="/
s/	/ /g
s/$/"/
CF_EOF

	cat >fix_lflags.sed <<'CF_EOF'
s/^IMAKE[ 	]*/IMAKE_LOADFLAGS="/
s/$/"/
CF_EOF

	echo >./Imakefile
	test -f "$cf_makefile" && cat "$cf_makefile" >>./Imakefile

	cat >> ./Imakefile <<'CF_EOF'
findstddefs:
	@echo IMAKE ${ALLDEFINES} $(MAIN_DEFINES) $(VENDORMANDEFS)       | sed -f fix_cflags.sed
	@echo IMAKE ${EXTRA_LOAD_FLAGS} | sed -f fix_lflags.sed
CF_EOF

	if ( $IMAKE "$cf_imake_opts" 1>/dev/null 2>&5 && test -f Makefile)
	then
		test -n "$verbose" && echo "	Using $IMAKE $cf_imake_opts" 1>&6

echo "${as_me:-configure}:17743: testing Using $IMAKE $cf_imake_opts ..." 1>&5

	else
		# sometimes imake doesn't have the config path compiled in.  Find it.
		cf_config=
		for cf_libpath in $X_LIBS $LIBS ; do
			case "$cf_libpath" in
			(-L*)
				cf_libpath=`echo ".$cf_libpath" | sed -e 's/^...//'`
				cf_libpath="$cf_libpath/X11/config"
				if test -d "$cf_libpath" ; then
					cf_config="$cf_libpath"
					break
				fi
				;;
			esac
		done
		if test -z "$cf_config" ; then
			{ echo "$as_me:17761: WARNING: Could not find imake config-directory" >&5
echo "$as_me: WARNING: Could not find imake config-directory" >&2;}
		else
			cf_imake_opts="$cf_imake_opts -I$cf_config"
			if ( "$IMAKE" -v "$cf_imake_opts" 2>&5)
			then
				test -n "$verbose" && echo "	Using $IMAKE $cf_config" 1>&6

echo "${as_me:-configure}:17769: testing Using $IMAKE $cf_config ..." 1>&5

			else
				{ echo "$as_me:17772: WARNING: Cannot run $IMAKE" >&5
echo "$as_me: WARNING: Cannot run $IMAKE" >&2;}
			fi
		fi
	fi

	# GNU make sometimes prints "make[1]: Entering...", which
	# would confuse us.
	eval "`make findstddefs 2>/dev/null | grep -v make`"

	cd ..
	rm -rf conftestdir

	# We use ${ALLDEFINES} rather than ${STD_DEFINES} because the former
	# declares XTFUNCPROTO there.  However, some vendors (e.g., SGI) have
	# modified it to support site.cf, adding a kludge for the /usr/include
	# directory.  Try to filter that out, otherwise gcc won't find its
	# headers.
	if test -n "$GCC" ; then
	    if test -n "$IMAKE_CFLAGS" ; then
		cf_nostdinc=""
		cf_std_incl=""
		cf_cpp_opts=""
		for cf_opt in $IMAKE_CFLAGS
		do
		    case "$cf_opt" in
		    (-nostdinc)
			cf_nostdinc="$cf_opt"
			;;
		    (-I/usr/include)
			cf_std_incl="$cf_opt"
			;;
		    (*)
			cf_cpp_opts="$cf_cpp_opts $cf_opt"
			;;
		    esac
		done
		if test -z "$cf_nostdinc" ; then
		    IMAKE_CFLAGS="$cf_cpp_opts $cf_std_incl"
		elif test -z "$cf_std_incl" ; then
		    IMAKE_CFLAGS="$cf_cpp_opts $cf_nostdinc"
		else
		    test -n "$verbose" && echo "	suppressed \"$cf_nostdinc\" and \"$cf_std_incl\"" 1>&6

echo "${as_me:-configure}:17816: testing suppressed \"$cf_nostdinc\" and \"$cf_std_incl\" ..." 1>&5

		    IMAKE_CFLAGS="$cf_cpp_opts"
		fi
	    fi
	fi
fi

# Some imake configurations define PROJECTROOT with an empty value.  Remove
# the empty definition.
case $IMAKE_CFLAGS in
(*-DPROJECTROOT=/*)
	;;
(*)
	IMAKE_CFLAGS=`echo "$IMAKE_CFLAGS" |sed -e "s,-DPROJECTROOT=[ 	], ,"`
	;;
esac

fi

test -n "$verbose" && echo "	IMAKE_CFLAGS $IMAKE_CFLAGS" 1>&6

echo "${as_me:-configure}:17838: testing IMAKE_CFLAGS $IMAKE_CFLAGS ..." 1>&5

test -n "$verbose" && echo "	IMAKE_LOADFLAGS $IMAKE_LOADFLAGS" 1>&6

echo "${as_me:-configure}:17842: testing IMAKE_LOADFLAGS $IMAKE_LOADFLAGS ..." 1>&5

fi

if test -n "$IMAKE" && test -n "$IMAKE_CFLAGS" ; then

cf_fix_cppflags=no
cf_new_cflags=
cf_new_cppflags=
cf_new_extra_cppflags=

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

else
	IMAKE_CFLAGS=
	IMAKE_LOADFLAGS=
	test -n "$verbose" && echo "	make fallback definitions" 1>&6

echo "${as_me:-configure}:17951: testing make fallback definitions ..." 1>&5

	# We prefer config.guess' values when we can get them, to avoid
	# inconsistent results with uname (AIX for instance).  However,
	# config.guess is not always consistent either.
	case $host_os in
	(*[0-9].[0-9]*)
		UNAME_RELEASE="$host_os"
		;;
	(*)
		UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
		;;
	esac

	case .$UNAME_RELEASE in
	(*[0-9].[0-9]*)
		OSMAJORVERSION=`echo "$UNAME_RELEASE" |sed -e 's/^[^0-9]*//' -e 's/\..*//'`
		OSMINORVERSION=`echo "$UNAME_RELEASE" |sed -e 's/^[^0-9]*//' -e 's/^[^.]*\.//' -e 's/\..*//' -e 's/[^0-9].*//' `
		test -z "$OSMAJORVERSION" && OSMAJORVERSION=1
		test -z "$OSMINORVERSION" && OSMINORVERSION=0
		IMAKE_CFLAGS="-DOSMAJORVERSION=$OSMAJORVERSION -DOSMINORVERSION=$OSMINORVERSION $IMAKE_CFLAGS"
		;;
	esac

	# FUNCPROTO is standard with X11R6, but XFree86 drops it, leaving some
	# fallback/fragments for NeedPrototypes, etc.
	IMAKE_CFLAGS="-DFUNCPROTO=15 $IMAKE_CFLAGS"

	# If this is not set properly, Xaw's scrollbars will not work
	if test "$enable_narrowproto" = yes ; then
		IMAKE_CFLAGS="-DNARROWPROTO=1 $IMAKE_CFLAGS"
	fi

	# Other special definitions:
	case $host_os in
	(aix*)
		# imake on AIX 5.1 defines AIXV3.  really.
		IMAKE_CFLAGS="-DAIXV3 -DAIXV4 $IMAKE_CFLAGS"
		;;
	(irix[56].*)
		# these are needed to make SIGWINCH work in xterm
		IMAKE_CFLAGS="-DSYSV -DSVR4 $IMAKE_CFLAGS"
		;;
	esac

	# "modern" systems install X applications in /usr/bin.  Other systems may
	# use one of the X release-based directories.
	case "$CFLAGS $CPPFLAGS $IMAKE_CFLAGS" in
	(*-DPROJECTROOT*)
		;;
	(*)
		for cf_dir in /usr/X11R7 /usr/X11R6 /usr/X11R5
		do
			if test -d "$cf_dir/bin"
			then
				IMAKE_CFLAGS="$IMAKE_CFLAGS -DPROJECTROOT=\\\"$cf_dir\\\""
				break
			fi
		done
		;;
	esac

cf_fix_cppflags=no
cf_new_cflags=
cf_new_cppflags=
cf_new_extra_cppflags=

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

fi

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

  test -z "$ac_cv_path_GROFF_PATH" && ac_cv_path_GROFF_PATH="no"
  ;;
esac
fi
GROFF_PATH=$ac_cv_path_GROFF_PATH

if test -n "$GROFF_PATH"; then
  echo "$as_me:18144: result: $GROFF_PATH" >&5
echo "${ECHO_T}$GROFF_PATH" >&6
else
  echo "$as_me:18147: result: no" >&5
echo "${ECHO_T}no" >&6
fi

for ac_prog in nroff mandoc
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:18155: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_path_NROFF_PATH+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $NROFF_PATH in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_NROFF_PATH="$NROFF_PATH" # 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_NROFF_PATH="$ac_dir/$ac_word"
   echo "$as_me:18172: found $ac_dir/$ac_word" >&5
   break
fi
done

  ;;
esac
fi
NROFF_PATH=$ac_cv_path_NROFF_PATH

if test -n "$NROFF_PATH"; then
  echo "$as_me:18183: result: $NROFF_PATH" >&5
echo "${ECHO_T}$NROFF_PATH" >&6
else
  echo "$as_me:18186: result: no" >&5
echo "${ECHO_T}no" >&6
fi

  test -n "$NROFF_PATH" && break
done
test -n "$NROFF_PATH" || NROFF_PATH="no"

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

  test -z "$ac_cv_path_TBL_PATH" && ac_cv_path_TBL_PATH="cat"
  ;;
esac
fi
TBL_PATH=$ac_cv_path_TBL_PATH

if test -n "$TBL_PATH"; then
  echo "$as_me:18225: result: $TBL_PATH" >&5
echo "${ECHO_T}$TBL_PATH" >&6
else
  echo "$as_me:18228: result: no" >&5
echo "${ECHO_T}no" >&6
fi

if test "x$GROFF_PATH" = xno
then
	NROFF_NOTE=
	GROFF_NOTE="#"
else
	NROFF_NOTE="#"
	GROFF_NOTE=
fi

echo "$as_me:18241: 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:18253: 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:18270: found $ac_dir/$ac_word" >&5
   break
fi
done

  ;;
esac
fi
FGREP=$ac_cv_path_FGREP

if test -n "$FGREP"; then
  echo "$as_me:18281: result: $FGREP" >&5
echo "${ECHO_T}$FGREP" >&6
else
  echo "$as_me:18284: 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:18292: error: cannot find workable fgrep" >&5
echo "$as_me: error: cannot find workable fgrep" >&2;}
   { (exit 1); exit 1; }; }
   fi
fi
echo "$as_me:18297: result: $ac_cv_path_FGREP" >&5
echo "${ECHO_T}$ac_cv_path_FGREP" >&6
 FGREP="$ac_cv_path_FGREP"

case "x${with_man2html}" in
(xno)
	cf_man2html=no
	;;
(x|xyes)
	# Extract the first word of "man2html", so it can be a program name with args.
set dummy man2html; ac_word=$2
echo "$as_me:18308: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_path_cf_man2html+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $cf_man2html in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_cf_man2html="$cf_man2html" # 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_cf_man2html="$ac_dir/$ac_word"
   echo "$as_me:18325: found $ac_dir/$ac_word" >&5
   break
fi
done

  test -z "$ac_cv_path_cf_man2html" && ac_cv_path_cf_man2html="no"
  ;;
esac
fi
cf_man2html=$ac_cv_path_cf_man2html

if test -n "$cf_man2html"; then
  echo "$as_me:18337: result: $cf_man2html" >&5
echo "${ECHO_T}$cf_man2html" >&6
else
  echo "$as_me:18340: result: no" >&5
echo "${ECHO_T}no" >&6
fi

	case "x$cf_man2html" in
	(x/*)
		echo "$as_me:18346: checking for the modified Earl Hood script" >&5
echo $ECHO_N "checking for the modified Earl Hood script... $ECHO_C" >&6
		if ( $cf_man2html -help 2>&1 | grep 'Make an index of headers at the end' >/dev/null )
		then
			cf_man2html_ok=yes
		else
			cf_man2html=no
			cf_man2html_ok=no
		fi
		echo "$as_me:18355: result: $cf_man2html_ok" >&5
echo "${ECHO_T}$cf_man2html_ok" >&6
		;;
	(*)
		cf_man2html=no
		;;
	esac
esac

echo "$as_me:18364: checking for program to convert manpage to html" >&5
echo $ECHO_N "checking for program to convert manpage to html... $ECHO_C" >&6

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

cf_with_groff=no

case $cf_man2html in
(yes)
	echo "$as_me:18379: result: man2html" >&5
echo "${ECHO_T}man2html" >&6
	# Extract the first word of "man2html", so it can be a program name with args.
set dummy man2html; ac_word=$2
echo "$as_me:18383: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_path_cf_man2html+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $cf_man2html in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_cf_man2html="$cf_man2html" # 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_cf_man2html="$ac_dir/$ac_word"
   echo "$as_me:18400: found $ac_dir/$ac_word" >&5
   break
fi
done

  test -z "$ac_cv_path_cf_man2html" && ac_cv_path_cf_man2html="no"
  ;;
esac
fi
cf_man2html=$ac_cv_path_cf_man2html

if test -n "$cf_man2html"; then
  echo "$as_me:18412: result: $cf_man2html" >&5
echo "${ECHO_T}$cf_man2html" >&6
else
  echo "$as_me:18415: result: no" >&5
echo "${ECHO_T}no" >&6
fi

	;;
(no|groff|*/groff*)
	cf_with_groff=yes
	cf_man2html=$GROFF_PATH
	echo "$as_me:18423: result: $cf_man2html" >&5
echo "${ECHO_T}$cf_man2html" >&6
	;;
(*)
	echo "$as_me:18427: result: $cf_man2html" >&5
echo "${ECHO_T}$cf_man2html" >&6
	;;
esac

MAN2HTML_TEMP="man2html.tmp"
	cat >$MAN2HTML_TEMP <<CF_EOF
#!$SHELL
# Temporary script generated by CF_WITH_MAN2HTML
# Convert inputs to html, sending result to standard output.
#
# Parameters:
# \${1} = rootname of file to convert
# \${2} = suffix of file to convert, e.g., "1"
# \${3} = macros to use, e.g., "man"
#
ROOT=\$1
TYPE=\$2
MACS=\$3

unset LANG
unset LC_ALL
unset LC_CTYPE
unset LANGUAGE
GROFF_NO_SGR=stupid
export GROFF_NO_SGR

CF_EOF

NROFF_OPTS=
if test "x$cf_with_groff" = xyes
then
	MAN2HTML_NOTE="$GROFF_NOTE"
	MAN2HTML_PATH="$GROFF_PATH"
	cat >>$MAN2HTML_TEMP <<CF_EOF
$SHELL -c "$TBL_PATH \${ROOT}.\${TYPE} | $GROFF_PATH -P -o0 -I\${ROOT}_ -Thtml -\${MACS}"
CF_EOF
else
	# disable hyphenation if this is groff
	if test "x$GROFF_PATH" != xno
	then
		echo "$as_me:18468: checking if nroff is really groff" >&5
echo $ECHO_N "checking if nroff is really groff... $ECHO_C" >&6
		cf_check_groff="`$NROFF_PATH --version 2>/dev/null | grep groff`"
		test -n "$cf_check_groff" && cf_check_groff=yes
		test -n "$cf_check_groff" || cf_check_groff=no
		echo "$as_me:18473: result: $cf_check_groff" >&5
echo "${ECHO_T}$cf_check_groff" >&6
		test "x$cf_check_groff" = xyes && NROFF_OPTS="-rHY=0"
	fi
	MAN2HTML_NOTE=""

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

case "x$cf_man2html" in
(x\$\(*\)*|x\'*\'*)
	;;
(x.|x$GLOB_FULLPATH_POSIX|x$GLOB_FULLPATH_OTHER)
	;;
(x\$\{*prefix\}*|x\$\{*dir\}*)
	eval cf_man2html="$cf_man2html"
	case "x$cf_man2html" in
	(xNONE/*)
		cf_man2html=`echo "$cf_man2html" | sed -e s%NONE%$cf_path_syntax%`
		;;
	esac
	;;
(xno|xNONE/*)
	cf_man2html=`echo "$cf_man2html" | sed -e s%NONE%$cf_path_syntax%`
	;;
(*)
	{ { echo "$as_me:18502: error: expected a pathname, not \"$cf_man2html\"" >&5
echo "$as_me: error: expected a pathname, not \"$cf_man2html\"" >&2;}
   { (exit 1); exit 1; }; }
	;;
esac

	MAN2HTML_PATH="$cf_man2html"
	echo "$as_me:18509: checking for $cf_man2html top/bottom margins" >&5
echo $ECHO_N "checking for $cf_man2html top/bottom margins... $ECHO_C" >&6

	# for this example, expect 3 lines of content, the remainder is head/foot
	cat >conftest.in <<CF_EOF
.TH HEAD1 HEAD2 HEAD3 HEAD4 HEAD5
.SH SECTION
MARKER
CF_EOF

	LC_ALL=C LC_CTYPE=C LANG=C LANGUAGE=C $NROFF_PATH -man conftest.in >conftest.out

	cf_man2html_1st="`${FGREP-fgrep} -n MARKER conftest.out |sed -e 's/^[^0-9]*://' -e 's/:.*//'`"
	cf_man2html_top=`expr "$cf_man2html_1st" - 2`
	cf_man2html_bot="`wc -l conftest.out |sed -e 's/[^0-9]//g'`"
	cf_man2html_bot=`expr "$cf_man2html_bot" - 2 - "$cf_man2html_top"`
	cf_man2html_top_bot="-topm=$cf_man2html_top -botm=$cf_man2html_bot"

	echo "$as_me:18527: result: $cf_man2html_top_bot" >&5
echo "${ECHO_T}$cf_man2html_top_bot" >&6

	echo "$as_me:18530: checking for pagesize to use" >&5
echo $ECHO_N "checking for pagesize to use... $ECHO_C" >&6
	for cf_block in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
	do
	cat >>conftest.in <<CF_EOF
.nf
0
1
2
3
4
5
6
7
8
9
CF_EOF
	done

	LC_ALL=C LC_CTYPE=C LANG=C LANGUAGE=C $NROFF_PATH -man conftest.in >conftest.out
	cf_man2html_page="`${FGREP-fgrep} -n HEAD1 conftest.out |sed -n '$p' |sed -e 's/^[^0-9]*://' -e 's/:.*//'`"
	test -z "$cf_man2html_page" && cf_man2html_page=99999
	test "$cf_man2html_page" -gt 100 && cf_man2html_page=99999

	rm -rf conftest*
	echo "$as_me:18555: result: $cf_man2html_page" >&5
echo "${ECHO_T}$cf_man2html_page" >&6

	cat >>$MAN2HTML_TEMP <<CF_EOF
: \${MAN2HTML_PATH=$MAN2HTML_PATH}
MAN2HTML_OPTS="\$MAN2HTML_OPTS -index -title=\"\$ROOT(\$TYPE)\" -compress -pgsize $cf_man2html_page"
case \${TYPE} in
(ms)
	$TBL_PATH \${ROOT}.\${TYPE} | $NROFF_PATH $NROFF_OPTS -\${MACS} | \$MAN2HTML_PATH -topm=0 -botm=0 \$MAN2HTML_OPTS
	;;
(*)
	$TBL_PATH \${ROOT}.\${TYPE} | $NROFF_PATH $NROFF_OPTS -\${MACS} | \$MAN2HTML_PATH $cf_man2html_top_bot \$MAN2HTML_OPTS
	;;
esac
CF_EOF
fi

chmod 700 $MAN2HTML_TEMP

# If we have already established that there is a full termcap implementation,
# suppress the definitions for terminfo that we make have imported from the
# imake-file.
if test "x$cf_cv_lib_tgetent" != xno || test "x$cf_cv_lib_part_tgetent" != xno ; then
	case "$IMAKE_CFLAGS" in
	(*-DUSE_TERMINFO\ -DHAVE_TIGETSTR*)

	test -n "$verbose" && echo "	removing terminfo flags from IMAKE_CFLAGS" 1>&6

echo "${as_me:-configure}:18583: testing removing terminfo flags from IMAKE_CFLAGS ..." 1>&5

	IMAKE_CFLAGS=`echo "$IMAKE_CFLAGS" | sed -e 's/-DUSE_TERMINFO[ 	]*-DHAVE_TIGETSTR[ 	]*//'`
	test -n "$verbose" && echo "	...result $IMAKE_CFLAGS" 1>&6

echo "${as_me:-configure}:18588: testing ...result $IMAKE_CFLAGS ..." 1>&5

	test -n "$verbose" && echo "	removing terminfo flags from CPPFLAGS" 1>&6

echo "${as_me:-configure}:18592: testing removing terminfo flags from CPPFLAGS ..." 1>&5

	CPPFLAGS=`echo "$CPPFLAGS" | sed -e 's/-DUSE_TERMINFO[ 	]*-DHAVE_TIGETSTR[ 	]*//'`
	test -n "$verbose" && echo "	...result $CPPFLAGS" 1>&6

echo "${as_me:-configure}:18597: testing ...result $CPPFLAGS ..." 1>&5

		;;
	esac
fi

echo "$as_me:18603: checking for default terminal-id" >&5
echo $ECHO_N "checking for default terminal-id... $ECHO_C" >&6

# Check whether --with-terminal-id or --without-terminal-id was given.
if test "${with_terminal_id+set}" = set; then
  withval="$with_terminal_id"
  default_termid=$withval
else
  default_termid=vt420
fi;
echo "$as_me:18613: result: $default_termid" >&5
echo "${ECHO_T}$default_termid" >&6
case $default_termid in
(vt*)	default_termid=`echo $default_termid | sed -e 's/^..//'`
	;;
([1-9][0-9][0-9]|[1-9][0-9])
	;;
(*)
	{ { echo "$as_me:18621: error: expected a number, not $default_termid" >&5
echo "$as_me: error: expected a number, not $default_termid" >&2;}
   { (exit 1); exit 1; }; }
	;;
esac

cat >>confdefs.h <<EOF
#define DFT_DECID "$default_termid"
EOF

echo "$as_me:18631: checking for default terminal-type" >&5
echo $ECHO_N "checking for default terminal-type... $ECHO_C" >&6

# Check whether --with-terminal-type or --without-terminal-type was given.
if test "${with_terminal_type+set}" = set; then
  withval="$with_terminal_type"
  default_TERM=$withval
else
  default_TERM=xterm
fi;
echo "$as_me:18641: result: $default_TERM" >&5
echo "${ECHO_T}$default_TERM" >&6

cat >>confdefs.h <<EOF
#define DFT_TERMTYPE "$default_TERM"
EOF

###############################################################################
echo "$as_me:18649: checking if backarrow-key should be BS" >&5
echo $ECHO_N "checking if backarrow-key should be BS... $ECHO_C" >&6

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

fi;

echo "$as_me:18667: result: $backarrow_is_bs" >&5
echo "${ECHO_T}$backarrow_is_bs" >&6
case $backarrow_is_bs in
(yes)
	backarrow_is_bs=true
	;;
(no)
	backarrow_is_bs=false
	;;
esac
cf_xbool1=`echo "$backarrow_is_bs"|sed -e 's/^\(.\).*/\1/'`

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

cf_xbool2=`echo "$backarrow_is_bs"|sed -e 's/^.//'`
backarrow_is_bs=${cf_xbool1}${cf_xbool2}

cat >>confdefs.h <<EOF
#define DEF_BACKARO_BS $backarrow_is_bs
EOF

echo "$as_me:18688: checking if backarrow-key should be treated as erase" >&5
echo $ECHO_N "checking if backarrow-key should be treated as erase... $ECHO_C" >&6

# Check whether --enable-backarrow-is-erase or --disable-backarrow-is-erase was given.
if test "${enable_backarrow_is_erase+set}" = set; then
  enableval="$enable_backarrow_is_erase"
  test "$enableval" != yes && enableval=no
	if test "$enableval" != "no" ; then
    backarrow_is_erase=$enableval
	else
		backarrow_is_erase=no
	fi
else
  enableval=no
	backarrow_is_erase=no

fi;

echo "$as_me:18706: result: $backarrow_is_erase" >&5
echo "${ECHO_T}$backarrow_is_erase" >&6
case $backarrow_is_erase in
(yes)
	backarrow_is_erase=true
	;;
(no)
	backarrow_is_erase=false
	;;
esac
cf_xbool1=`echo "$backarrow_is_erase"|sed -e 's/^\(.\).*/\1/'`

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

cf_xbool2=`echo "$backarrow_is_erase"|sed -e 's/^.//'`
backarrow_is_erase=${cf_xbool1}${cf_xbool2}

cat >>confdefs.h <<EOF
#define DEF_BACKARO_ERASE $backarrow_is_erase
EOF

echo "$as_me:18727: checking for default backspace/DEL setting" >&5
echo $ECHO_N "checking for default backspace/DEL setting... $ECHO_C" >&6

# Check whether --enable-delete-is-del or --disable-delete-is-del was given.
if test "${enable_delete_is_del+set}" = set; then
  enableval="$enable_delete_is_del"
  delete_is_del=$enableval
else
  delete_is_del=maybe
fi;

echo "$as_me:18738: result: $delete_is_del" >&5
echo "${ECHO_T}$delete_is_del" >&6
case $delete_is_del in
(yes)
	delete_is_del=true
	;;
(no)
	delete_is_del=false
	;;
esac
cf_xbool1=`echo "$delete_is_del"|sed -e 's/^\(.\).*/\1/'`

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

cf_xbool2=`echo "$delete_is_del"|sed -e 's/^.//'`
delete_is_del=${cf_xbool1}${cf_xbool2}

cat >>confdefs.h <<EOF
#define DEFDELETE_DEL $delete_is_del
EOF

echo "$as_me:18759: checking for default pty initial erase setting" >&5
echo $ECHO_N "checking for default pty initial erase setting... $ECHO_C" >&6

# Check whether --enable-pty-erase or --disable-pty-erase was given.
if test "${enable_pty_erase+set}" = set; then
  enableval="$enable_pty_erase"
  initial_erase=$enableval
else
  initial_erase=False
fi;

echo "$as_me:18770: result: $initial_erase" >&5
echo "${ECHO_T}$initial_erase" >&6
case $initial_erase in
(yes)
	initial_erase=true
	;;
(no)
	initial_erase=false
	;;
esac
cf_xbool1=`echo "$initial_erase"|sed -e 's/^\(.\).*/\1/'`

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

cf_xbool2=`echo "$initial_erase"|sed -e 's/^.//'`
initial_erase=${cf_xbool1}${cf_xbool2}

cat >>confdefs.h <<EOF
#define DEF_INITIAL_ERASE $initial_erase
EOF

echo "$as_me:18791: checking if alt should send ESC" >&5
echo $ECHO_N "checking if alt should send ESC... $ECHO_C" >&6

# Check whether --enable-alt-sends-esc or --disable-alt-sends-esc was given.
if test "${enable_alt_sends_esc+set}" = set; then
  enableval="$enable_alt_sends_esc"
  test "$enableval" != yes && enableval=no
	if test "$enableval" != "no" ; then
    alt_sends_esc=$enableval
	else
		alt_sends_esc=no
	fi
else
  enableval=no
	alt_sends_esc=no

fi;

echo "$as_me:18809: result: $alt_sends_esc" >&5
echo "${ECHO_T}$alt_sends_esc" >&6
case $alt_sends_esc in
(yes)
	alt_sends_esc=true
	;;
(no)
	alt_sends_esc=false
	;;
esac
cf_xbool1=`echo "$alt_sends_esc"|sed -e 's/^\(.\).*/\1/'`

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

cf_xbool2=`echo "$alt_sends_esc"|sed -e 's/^.//'`
alt_sends_esc=${cf_xbool1}${cf_xbool2}

cat >>confdefs.h <<EOF
#define DEF_ALT_SENDS_ESC $alt_sends_esc
EOF

echo "$as_me:18830: checking if meta should send ESC" >&5
echo $ECHO_N "checking if meta should send ESC... $ECHO_C" >&6

# Check whether --enable-meta-sends-esc or --disable-meta-sends-esc was given.
if test "${enable_meta_sends_esc+set}" = set; then
  enableval="$enable_meta_sends_esc"
  test "$enableval" != yes && enableval=no
	if test "$enableval" != "no" ; then
    meta_sends_esc=$enableval
	else
		meta_sends_esc=no
	fi
else
  enableval=no
	meta_sends_esc=no

fi;

echo "$as_me:18848: result: $meta_sends_esc" >&5
echo "${ECHO_T}$meta_sends_esc" >&6
case $meta_sends_esc in
(yes)
	meta_sends_esc=true
	;;
(no)
	meta_sends_esc=false
	;;
esac
cf_xbool1=`echo "$meta_sends_esc"|sed -e 's/^\(.\).*/\1/'`

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

cf_xbool2=`echo "$meta_sends_esc"|sed -e 's/^.//'`
meta_sends_esc=${cf_xbool1}${cf_xbool2}

cat >>confdefs.h <<EOF
#define DEF_META_SENDS_ESC $meta_sends_esc
EOF

###############################################################################
# Extract the first word of "tic", so it can be a program name with args.
set dummy tic; ac_word=$2
echo "$as_me:18872: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_cf_tic_prog+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$cf_tic_prog"; then
  ac_cv_prog_cf_tic_prog="$cf_tic_prog" # 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_cf_tic_prog="yes"
echo "$as_me:18887: found $ac_dir/$ac_word" >&5
break
done

  test -z "$ac_cv_prog_cf_tic_prog" && ac_cv_prog_cf_tic_prog="no"
fi
fi
cf_tic_prog=$ac_cv_prog_cf_tic_prog
if test -n "$cf_tic_prog"; then
  echo "$as_me:18896: result: $cf_tic_prog" >&5
echo "${ECHO_T}$cf_tic_prog" >&6
else
  echo "$as_me:18899: result: no" >&5
echo "${ECHO_T}no" >&6
fi

if test "$cf_tic_prog" = yes ; then
	if test -n "$TERMINFO"
	then
		case "$TERMINFO" in
		(/*)
			test -d "$TERMINFO" || unset TERMINFO
			;;
		(*)
			unset TERMINFO
			;;
		esac
	fi
	echo "$as_me:18915: checking for private terminfo-directory" >&5
echo $ECHO_N "checking for private terminfo-directory... $ECHO_C" >&6

# Check whether --with-own-terminfo or --without-own-terminfo was given.
if test "${with_own_terminfo+set}" = set; then
  withval="$with_own_terminfo"
  TERMINFO_DIR=$withval
else
  TERMINFO_DIR=${TERMINFO-none}
fi;
	echo "$as_me:18925: result: $TERMINFO_DIR" >&5
echo "${ECHO_T}$TERMINFO_DIR" >&6
	if test "$TERMINFO_DIR" = yes ; then
		{ echo "$as_me:18928: WARNING: no value given" >&5
echo "$as_me: WARNING: no value given" >&2;}
	elif test "$TERMINFO_DIR" != none ; then
		if test -d "$TERMINFO_DIR" ; then

cat >>confdefs.h <<EOF
#define OWN_TERMINFO_DIR "$TERMINFO_DIR"
EOF

			echo "$as_me:18937: checking if \$TERMINFO should also be set" >&5
echo $ECHO_N "checking if \$TERMINFO should also be set... $ECHO_C" >&6

# Check whether --enable-env-terminfo or --disable-env-terminfo was given.
if test "${enable_env_terminfo+set}" = set; then
  enableval="$enable_env_terminfo"
  cf_env_terminfo=yes
else
  cf_env_terminfo=no
fi;
			echo "$as_me:18947: result: $cf_env_terminfo" >&5
echo "${ECHO_T}$cf_env_terminfo" >&6
			test $cf_env_terminfo = yes &&

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

		else
			{ echo "$as_me:18956: WARNING: not a directory" >&5
echo "$as_me: WARNING: not a directory" >&2;}
		fi
	elif test "$prefix" != NONE ; then
		TERMINFO_DIR='${prefix}/lib/terminfo'
	elif test -d /usr/lib/terminfo ; then
		TERMINFO_DIR=/usr/lib/terminfo
	else
		TERMINFO_DIR=
	fi
	SET_TERMINFO=
	if test -n "$TERMINFO_DIR" ; then
		TERMINFO_DIR='${DESTDIR}'$TERMINFO_DIR
		SET_TERMINFO='TERMINFO=${TERMINFO_DIR}'
	fi
	no_ticprog=
else
	no_ticprog="#"
	TERMINFO_DIR=
	SET_TERMINFO=
fi

###############################################################################

echo "$as_me:18980: checking if you want active-icons" >&5
echo $ECHO_N "checking if you want active-icons... $ECHO_C" >&6

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

fi;
echo "$as_me:18997: result: $enable_active_icon" >&5
echo "${ECHO_T}$enable_active_icon" >&6
if test "$enable_active_icon" = no ; then

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

fi

echo "$as_me:19007: checking if you want ANSI color" >&5
echo $ECHO_N "checking if you want ANSI color... $ECHO_C" >&6

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

fi;
echo "$as_me:19024: result: $enable_ansi_color" >&5
echo "${ECHO_T}$enable_ansi_color" >&6
test "$enable_ansi_color" = no &&
cat >>confdefs.h <<\EOF
#define OPT_ISO_COLORS 0
EOF

if test "$enable_ansi_color" = yes ; then

	echo "$as_me:19033: checking if you want 16 colors like aixterm" >&5
echo $ECHO_N "checking if you want 16 colors like aixterm... $ECHO_C" >&6

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

fi;
	echo "$as_me:19050: result: $enable_16_color" >&5
echo "${ECHO_T}$enable_16_color" >&6
	test "$enable_16_color" = no &&
cat >>confdefs.h <<\EOF
#define OPT_AIX_COLORS 0
EOF

	echo "$as_me:19057: checking if you want 256 colors" >&5
echo $ECHO_N "checking if you want 256 colors... $ECHO_C" >&6

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

fi;
	echo "$as_me:19074: result: $enable_256_color" >&5
echo "${ECHO_T}$enable_256_color" >&6

	if test "$enable_256_color" = yes ; then

		CHARPROC_DEPS="$CHARPROC_DEPS 256colres.h"
		EXTRAHDRS="$EXTRAHDRS 256colres.h"

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

		echo "$as_me:19086: checking if you want direct-color support" >&5
echo $ECHO_N "checking if you want direct-color support... $ECHO_C" >&6

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

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

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

		fi

	else

		echo "$as_me:19115: checking if you want 88 colors" >&5
echo $ECHO_N "checking if you want 88 colors... $ECHO_C" >&6

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

fi;
		echo "$as_me:19132: result: $enable_88_color" >&5
echo "${ECHO_T}$enable_88_color" >&6
		if test "$enable_88_color" = yes ; then
			CHARPROC_DEPS="$CHARPROC_DEPS 88colres.h"
			EXTRAHDRS="$EXTRAHDRS 88colres.h"

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

		fi

	fi

fi

echo "$as_me:19148: checking if you want blinking cursor" >&5
echo $ECHO_N "checking if you want blinking cursor... $ECHO_C" >&6

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

fi;
echo "$as_me:19165: result: $enable_blink_curs" >&5
echo "${ECHO_T}$enable_blink_curs" >&6
test "$enable_blink_curs" = no &&
cat >>confdefs.h <<\EOF
#define OPT_BLINK_CURS 0
EOF

echo "$as_me:19172: checking if you want support for block-selection" >&5
echo $ECHO_N "checking if you want support for block-selection... $ECHO_C" >&6

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

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

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

else

cat >>confdefs.h <<\EOF
#define OPT_BLOCK_SELECT 0
EOF

fi

echo "$as_me:19205: checking if you want to ignore Linux's broken palette-strings" >&5
echo $ECHO_N "checking if you want to ignore Linux's broken palette-strings... $ECHO_C" >&6

case $host_os in
(linux*)
	assume_broken_osc=yes ;;
(*)
	assume_broken_osc=no ;;
esac

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

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

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

else

cat >>confdefs.h <<\EOF
#define OPT_BROKEN_OSC 0
EOF

fi

echo "$as_me:19245: checking if you want to allow broken string-terminators" >&5
echo $ECHO_N "checking if you want to allow broken string-terminators... $ECHO_C" >&6

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

fi;
echo "$as_me:19262: result: $enable_broken_st" >&5
echo "${ECHO_T}$enable_broken_st" >&6
test "$enable_broken_st" = no &&
cat >>confdefs.h <<\EOF
#define OPT_BROKEN_ST 0
EOF

echo "$as_me:19269: checking if you want to compile-in icon data" >&5
echo $ECHO_N "checking if you want to compile-in icon data... $ECHO_C" >&6

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

fi;
echo "$as_me:19286: result: $enable_builtin_xpms" >&5
echo "${ECHO_T}$enable_builtin_xpms" >&6
test "$enable_builtin_xpms" = yes &&
cat >>confdefs.h <<\EOF
#define OPT_BUILTIN_XPMS 1
EOF

echo "$as_me:19293: checking if you want printable 128-159" >&5
echo $ECHO_N "checking if you want printable 128-159... $ECHO_C" >&6

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

fi;
echo "$as_me:19310: result: $enable_c1_print" >&5
echo "${ECHO_T}$enable_c1_print" >&6
test "$enable_c1_print" = no &&
cat >>confdefs.h <<\EOF
#define OPT_C1_PRINT 0
EOF

if test "$enable_ansi_color" = yes ; then

	echo "$as_me:19319: checking if you want bold colors mapped like IBM PC" >&5
echo $ECHO_N "checking if you want bold colors mapped like IBM PC... $ECHO_C" >&6

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

fi;
	echo "$as_me:19336: result: $enable_pc_color" >&5
echo "${ECHO_T}$enable_pc_color" >&6
	test "$enable_pc_color" = no &&
cat >>confdefs.h <<\EOF
#define OPT_PC_COLORS 0
EOF

	echo "$as_me:19343: checking if you want separate color-classes" >&5
echo $ECHO_N "checking if you want separate color-classes... $ECHO_C" >&6

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

fi;
	echo "$as_me:19360: result: $enable_color_class" >&5
echo "${ECHO_T}$enable_color_class" >&6
	test "$enable_color_class" = no &&
cat >>confdefs.h <<\EOF
#define OPT_COLOR_CLASS 0
EOF

	echo "$as_me:19367: checking if you want color-mode enabled by default" >&5
echo $ECHO_N "checking if you want color-mode enabled by default... $ECHO_C" >&6

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

fi;
	echo "$as_me:19384: result: $default_colormode" >&5
echo "${ECHO_T}$default_colormode" >&6
	test "$default_colormode" = no &&
cat >>confdefs.h <<\EOF
#define DFT_COLORMODE 0
EOF

fi

echo "$as_me:19393: checking if you want support for color highlighting" >&5
echo $ECHO_N "checking if you want support for color highlighting... $ECHO_C" >&6

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

fi;
echo "$as_me:19410: result: $default_highlight" >&5
echo "${ECHO_T}$default_highlight" >&6
test "$default_highlight" = no &&
cat >>confdefs.h <<\EOF
#define OPT_HIGHLIGHT_COLOR 0
EOF

echo "$as_me:19417: checking if you want support for doublesize characters" >&5
echo $ECHO_N "checking if you want support for doublesize characters... $ECHO_C" >&6

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

fi;
echo "$as_me:19434: result: $enable_doublechars" >&5
echo "${ECHO_T}$enable_doublechars" >&6
test "$enable_doublechars" = no &&
cat >>confdefs.h <<\EOF
#define OPT_DEC_CHRSET 0
EOF

echo "$as_me:19441: checking if you want fallback-support for box characters" >&5
echo $ECHO_N "checking if you want fallback-support for box characters... $ECHO_C" >&6

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

fi;
echo "$as_me:19458: result: $enable_boxchars" >&5
echo "${ECHO_T}$enable_boxchars" >&6
test "$enable_boxchars" = no &&
cat >>confdefs.h <<\EOF
#define OPT_BOX_CHARS 0
EOF

echo "$as_me:19465: checking if you want to allow spawning commands to process selections" >&5
echo $ECHO_N "checking if you want to allow spawning commands to process selections... $ECHO_C" >&6

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

fi;
echo "$as_me:19482: result: $enable_exec_selection" >&5
echo "${ECHO_T}$enable_exec_selection" >&6
if test "$enable_exec_selection" = no ; then

cat >>confdefs.h <<\EOF
#define OPT_EXEC_SELECTION 0
EOF

fi

echo "$as_me:19492: checking if you want to allow spawning new xterms" >&5
echo $ECHO_N "checking if you want to allow spawning new xterms... $ECHO_C" >&6

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

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

echo "$as_me:19513: checking for proc tree with cwd-support" >&5
echo $ECHO_N "checking for proc tree with cwd-support... $ECHO_C" >&6
if test "${cf_cv_procfs_cwd+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

cf_cv_procfs_cwd=no
for cf_path in /proc /compat/linux/proc /usr/compat/linux/proc
do
	if test -d "$cf_path" && \
	   test -d "$cf_path"/$$ && \
	   { test -d "$cf_path"/$$/cwd || \
	     test -L "$cf_path"/$$/cwd; }; then
		cf_cv_procfs_cwd="$cf_path"
		break
	fi
done

fi
echo "$as_me:19532: result: $cf_cv_procfs_cwd" >&5
echo "${ECHO_T}$cf_cv_procfs_cwd" >&6

	if test "$cf_cv_procfs_cwd" = no ; then
		{ echo "$as_me:19536: WARNING: no suitable proc filesystem found" >&5
echo "$as_me: WARNING: no suitable proc filesystem found" >&2;}
	else

cat >>confdefs.h <<EOF
#define PROCFS_ROOT "$cf_cv_procfs_cwd"
EOF

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

	fi
fi

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

echo "${as_me:-configure}:19554: 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}:19560: 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}:19564: 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:19685: 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 19693 "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:19712: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:19715: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:19718: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:19721: \$? = $ac_status" >&5
  (exit "$ac_status"); }; }; then
  ac_cv_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:19732: 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

echo "$as_me:19756: checking for X11/extensions/Xdbe.h" >&5
echo $ECHO_N "checking for X11/extensions/Xdbe.h... $ECHO_C" >&6
if test "${ac_cv_header_X11_extensions_Xdbe_h+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >"conftest.$ac_ext" <<_ACEOF
#line 19762 "configure"
#include "confdefs.h"
#include <X11/extensions/Xdbe.h>
_ACEOF
if { (eval echo "$as_me:19766: \"$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:19772: \$? = $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_X11_extensions_Xdbe_h=yes
else
  echo "$as_me: failed program was:" >&5
  cat "conftest.$ac_ext" >&5
  ac_cv_header_X11_extensions_Xdbe_h=no
fi
rm -f conftest.err "conftest.$ac_ext"
fi
echo "$as_me:19791: result: $ac_cv_header_X11_extensions_Xdbe_h" >&5
echo "${ECHO_T}$ac_cv_header_X11_extensions_Xdbe_h" >&6
if test "$ac_cv_header_X11_extensions_Xdbe_h" = yes; then

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

	echo "$as_me:19799: checking for XdbeSwapBuffers" >&5
echo $ECHO_N "checking for XdbeSwapBuffers... $ECHO_C" >&6
if test "${ac_cv_func_XdbeSwapBuffers+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >"conftest.$ac_ext" <<_ACEOF
#line 19805 "configure"
#include "confdefs.h"
#define XdbeSwapBuffers autoconf_temporary
#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
#undef XdbeSwapBuffers

#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 XdbeSwapBuffers (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_XdbeSwapBuffers) || defined (__stub___XdbeSwapBuffers)
#error found stub for XdbeSwapBuffers
#endif

	return XdbeSwapBuffers ();
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext" "conftest$ac_exeext"
if { (eval echo "$as_me:19836: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:19839: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:19842: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:19845: \$? = $ac_status" >&5
  (exit "$ac_status"); }; }; then
  ac_cv_func_XdbeSwapBuffers=yes
else
  echo "$as_me: failed program was:" >&5
cat "conftest.$ac_ext" >&5
ac_cv_func_XdbeSwapBuffers=no
fi
rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
fi
echo "$as_me:19855: result: $ac_cv_func_XdbeSwapBuffers" >&5
echo "${ECHO_T}$ac_cv_func_XdbeSwapBuffers" >&6
if test "$ac_cv_func_XdbeSwapBuffers" = yes; then

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

				   cf_x_ext_double_buffer=yes
fi

fi

double_buffer=False
if test "$cf_x_ext_double_buffer" = yes ; then
	echo "$as_me:19870: checking if you want to enable double-buffering in default resources" >&5
echo $ECHO_N "checking if you want to enable double-buffering in default resources... $ECHO_C" >&6

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

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

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

		double_buffer=True
	fi
fi

echo "$as_me:19899: checking if you want to use FreeType library" >&5
echo $ECHO_N "checking if you want to use FreeType library... $ECHO_C" >&6

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

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

cf_cv_x_freetype_incs=no
cf_cv_x_freetype_libs=no
cf_extra_freetype_libs=
FREETYPE_CONFIG=none
FREETYPE_PARAMS=

echo "$as_me:19926: checking for FreeType configuration script" >&5
echo $ECHO_N "checking for FreeType configuration script... $ECHO_C" >&6

# Check whether --with-freetype-config or --without-freetype-config was given.
if test "${with_freetype_config+set}" = set; then
  withval="$with_freetype_config"
  cf_cv_x_freetype_cfgs="$withval"
else
  cf_cv_x_freetype_cfgs=auto
fi;
test -z $cf_cv_x_freetype_cfgs && cf_cv_x_freetype_cfgs=auto
test $cf_cv_x_freetype_cfgs = no && cf_cv_x_freetype_cfgs=none
echo "$as_me:19938: result: $cf_cv_x_freetype_cfgs" >&5
echo "${ECHO_T}$cf_cv_x_freetype_cfgs" >&6

case $cf_cv_x_freetype_cfgs in
(none)
	echo "$as_me:19943: checking if you specified -D/-I options for FreeType" >&5
echo $ECHO_N "checking if you specified -D/-I options for FreeType... $ECHO_C" >&6

# Check whether --with-freetype-cflags or --without-freetype-cflags was given.
if test "${with_freetype_cflags+set}" = set; then
  withval="$with_freetype_cflags"
  cf_cv_x_freetype_incs="$with_freetype_cflags"
else
  cf_cv_x_freetype_incs=no
fi;
	echo "$as_me:19953: result: $cf_cv_x_freetype_incs" >&5
echo "${ECHO_T}$cf_cv_x_freetype_incs" >&6

	echo "$as_me:19956: checking if you specified -L/-l options for FreeType" >&5
echo $ECHO_N "checking if you specified -L/-l options for FreeType... $ECHO_C" >&6

# Check whether --with-freetype-libs or --without-freetype-libs was given.
if test "${with_freetype_libs+set}" = set; then
  withval="$with_freetype_libs"
  cf_cv_x_freetype_libs="$with_freetype_libs"
else
  cf_cv_x_freetype_libs=no
fi;
	echo "$as_me:19966: result: $cf_cv_x_freetype_libs" >&5
echo "${ECHO_T}$cf_cv_x_freetype_libs" >&6
	;;
(auto)
	if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xft; then
		FREETYPE_CONFIG=$PKG_CONFIG
		FREETYPE_PARAMS=xft
	else
		# Extract the first word of "freetype-config", so it can be a program name with args.
set dummy freetype-config; ac_word=$2
echo "$as_me:19976: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_path_FREETYPE_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $FREETYPE_CONFIG in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_FREETYPE_CONFIG="$FREETYPE_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_FREETYPE_CONFIG="$ac_dir/$ac_word"
   echo "$as_me:19993: found $ac_dir/$ac_word" >&5
   break
fi
done

  test -z "$ac_cv_path_FREETYPE_CONFIG" && ac_cv_path_FREETYPE_CONFIG="none"
  ;;
esac
fi
FREETYPE_CONFIG=$ac_cv_path_FREETYPE_CONFIG

if test -n "$FREETYPE_CONFIG"; then
  echo "$as_me:20005: result: $FREETYPE_CONFIG" >&5
echo "${ECHO_T}$FREETYPE_CONFIG" >&6
else
  echo "$as_me:20008: result: no" >&5
echo "${ECHO_T}no" >&6
fi

		if test "$FREETYPE_CONFIG" != none; then
			FREETYPE_CONFIG=$FREETYPE_CONFIG
			cf_extra_freetype_libs="-lXft"
		else
			# Extract the first word of "xft-config", so it can be a program name with args.
set dummy xft-config; ac_word=$2
echo "$as_me:20018: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_path_FREETYPE_OLD_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $FREETYPE_OLD_CONFIG in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_FREETYPE_OLD_CONFIG="$FREETYPE_OLD_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_FREETYPE_OLD_CONFIG="$ac_dir/$ac_word"
   echo "$as_me:20035: found $ac_dir/$ac_word" >&5
   break
fi
done

  test -z "$ac_cv_path_FREETYPE_OLD_CONFIG" && ac_cv_path_FREETYPE_OLD_CONFIG="none"
  ;;
esac
fi
FREETYPE_OLD_CONFIG=$ac_cv_path_FREETYPE_OLD_CONFIG

if test -n "$FREETYPE_OLD_CONFIG"; then
  echo "$as_me:20047: result: $FREETYPE_OLD_CONFIG" >&5
echo "${ECHO_T}$FREETYPE_OLD_CONFIG" >&6
else
  echo "$as_me:20050: result: no" >&5
echo "${ECHO_T}no" >&6
fi

			if test "$FREETYPE_OLD_CONFIG" != none; then
				FREETYPE_CONFIG=$FREETYPE_OLD_CONFIG
			fi
		fi
	fi
	;;
(pkg*)
	if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xft; then
		FREETYPE_CONFIG=$cf_cv_x_freetype_cfgs
		FREETYPE_PARAMS=xft
	else
		{ echo "$as_me:20065: WARNING: cannot find pkg-config for Xft" >&5
echo "$as_me: WARNING: cannot find pkg-config for Xft" >&2;}
	fi
	;;
(*)
	# Extract the first word of "$cf_cv_x_freetype_cfgs", so it can be a program name with args.
set dummy $cf_cv_x_freetype_cfgs; ac_word=$2
echo "$as_me:20072: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_path_FREETYPE_XFT_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $FREETYPE_XFT_CONFIG in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_FREETYPE_XFT_CONFIG="$FREETYPE_XFT_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_FREETYPE_XFT_CONFIG="$ac_dir/$ac_word"
   echo "$as_me:20089: found $ac_dir/$ac_word" >&5
   break
fi
done

  test -z "$ac_cv_path_FREETYPE_XFT_CONFIG" && ac_cv_path_FREETYPE_XFT_CONFIG="none"
  ;;
esac
fi
FREETYPE_XFT_CONFIG=$ac_cv_path_FREETYPE_XFT_CONFIG

if test -n "$FREETYPE_XFT_CONFIG"; then
  echo "$as_me:20101: result: $FREETYPE_XFT_CONFIG" >&5
echo "${ECHO_T}$FREETYPE_XFT_CONFIG" >&6
else
  echo "$as_me:20104: result: no" >&5
echo "${ECHO_T}no" >&6
fi

	if test "$FREETYPE_XFT_CONFIG" != none; then
		FREETYPE_CONFIG=$FREETYPE_XFT_CONFIG
	else
		{ echo "$as_me:20111: WARNING: cannot find config script for Xft" >&5
echo "$as_me: WARNING: cannot find config script for Xft" >&2;}
	fi
	;;
esac

if test "$FREETYPE_CONFIG" != none ; then
	echo "$as_me:20118: checking for FreeType config" >&5
echo $ECHO_N "checking for FreeType config... $ECHO_C" >&6
	echo "$as_me:20120: result: $FREETYPE_CONFIG $FREETYPE_PARAMS" >&5
echo "${ECHO_T}$FREETYPE_CONFIG $FREETYPE_PARAMS" >&6

	if test "$cf_cv_x_freetype_incs" = no ; then
		echo "$as_me:20124: checking for $FREETYPE_CONFIG cflags" >&5
echo $ECHO_N "checking for $FREETYPE_CONFIG cflags... $ECHO_C" >&6
		cf_cv_x_freetype_incs="`$FREETYPE_CONFIG $FREETYPE_PARAMS --cflags 2>/dev/null`"
		echo "$as_me:20127: result: $cf_cv_x_freetype_incs" >&5
echo "${ECHO_T}$cf_cv_x_freetype_incs" >&6
	fi

	if test "$cf_cv_x_freetype_libs" = no ; then
		echo "$as_me:20132: checking for $FREETYPE_CONFIG libs" >&5
echo $ECHO_N "checking for $FREETYPE_CONFIG libs... $ECHO_C" >&6
		cf_cv_x_freetype_libs="$cf_extra_freetype_libs `$FREETYPE_CONFIG $FREETYPE_PARAMS --libs 2>/dev/null`"
		echo "$as_me:20135: result: $cf_cv_x_freetype_libs" >&5
echo "${ECHO_T}$cf_cv_x_freetype_libs" >&6
	fi
fi

if test "$cf_cv_x_freetype_incs" = no ; then
	cf_cv_x_freetype_incs=
fi

if test "$cf_cv_x_freetype_libs" = no ; then
	cf_cv_x_freetype_libs=-lXft
fi

echo "$as_me:20148: checking if we can link with FreeType libraries" >&5
echo $ECHO_N "checking if we can link with FreeType libraries... $ECHO_C" >&6

cf_save_LIBS="$LIBS"
cf_save_INCS="$CPPFLAGS"

cf_add_libs="$LIBS"
# reverse order
cf_add_0lib=
for cf_add_1lib in $cf_cv_x_freetype_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"

CPPFLAGS="$CPPFLAGS $cf_cv_x_freetype_incs"

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

#include <X11/Xlib.h>
#include <X11/extensions/Xrender.h>
#include <X11/Xft/Xft.h>
int
main (void)
{

	XftPattern  *pat = XftNameParse ("name"); (void)pat
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext" "conftest$ac_exeext"
if { (eval echo "$as_me:20189: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:20192: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:20195: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:20198: \$? = $ac_status" >&5
  (exit "$ac_status"); }; }; then
  cf_cv_found_freetype=yes
else
  echo "$as_me: failed program was:" >&5
cat "conftest.$ac_ext" >&5
cf_cv_found_freetype=no
fi
rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
echo "$as_me:20207: result: $cf_cv_found_freetype" >&5
echo "${ECHO_T}$cf_cv_found_freetype" >&6

LIBS="$cf_save_LIBS"
CPPFLAGS="$cf_save_INCS"

if test "$cf_cv_found_freetype" = yes ; then

cf_add_libs="$LIBS"
# reverse order
cf_add_0lib=
for cf_add_1lib in $cf_cv_x_freetype_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_fix_cppflags=no
cf_new_cflags=
cf_new_cppflags=
cf_new_extra_cppflags=

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

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

for ac_func in \
	XftDrawCharSpec \
	XftDrawSetClip \
	XftDrawSetClipRectangles \

do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:20340: 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 20346 "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:20377: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:20380: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:20383: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:20386: \$? = $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:20396: 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

else
	{ echo "$as_me:20407: WARNING: No libraries found for FreeType" >&5
echo "$as_me: WARNING: No libraries found for FreeType" >&2;}
	CPPFLAGS=`echo "$CPPFLAGS" | sed -e s/-DXRENDERFONT//`
fi

# FIXME: revisit this if needed

if test "$cf_cv_found_freetype" = yes ; then
echo "$as_me:20415: checking for usable Xft/fontconfig package" >&5
echo $ECHO_N "checking for usable Xft/fontconfig package... $ECHO_C" >&6
if test "${cf_cv_xft_compat+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

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

#include <X11/Xlib.h>
#include <X11/Xft/Xft.h>

int
main (void)
{

	XftPattern *pat = 0;
	XftPatternBuild(pat,
					XFT_FAMILY, XftTypeString, "mono",
					(void *) 0);

  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext" "conftest$ac_exeext"
if { (eval echo "$as_me:20442: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:20445: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:20448: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:20451: \$? = $ac_status" >&5
  (exit "$ac_status"); }; }; then
  cf_cv_xft_compat=yes
else
  echo "$as_me: failed program was:" >&5
cat "conftest.$ac_ext" >&5
cf_cv_xft_compat=no
fi
rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"

fi
echo "$as_me:20462: result: $cf_cv_xft_compat" >&5
echo "${ECHO_T}$cf_cv_xft_compat" >&6

if test "$cf_cv_xft_compat" = no
then
	# workaround for broken ".pc" files used for Xft.
	case "$cf_cv_x_freetype_libs" in
	(*-lfontconfig*)
		;;
	(*)
		test -n "$verbose" && echo "	work around broken package" 1>&6

echo "${as_me:-configure}:20474: testing work around broken package ..." 1>&5

		cf_save_fontconfig="$LIBS"

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

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

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

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

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

echo "${as_me:-configure}:20491: testing package fontconfig 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_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

				LIBS="$cf_save_fontconfig"

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

echo "${as_me:-configure}:20709: testing ...before $LIBS ..." 1>&5

LIBS=`echo "$LIBS" | sed -e "s/[ 	][ 	]*/ /g" -e "s%-lXft %-lXft $cf_pkgconfig_libs %" -e 's%  % %g'`
test -n "$verbose" && echo "	...after  $LIBS" 1>&6

echo "${as_me:-configure}:20714: testing ...after  $LIBS ..." 1>&5

else
	cf_pkgconfig_incs=
	cf_pkgconfig_libs=

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

echo "${as_me:-configure}:20722: testing ...before $LIBS ..." 1>&5

LIBS=`echo "$LIBS" | sed -e "s/[ 	][ 	]*/ /g" -e "s%-lXft %-lXft -lfontconfig %" -e 's%  % %g'`
test -n "$verbose" && echo "	...after  $LIBS" 1>&6

echo "${as_me:-configure}:20727: testing ...after  $LIBS ..." 1>&5

fi

		;;
	esac
fi
fi

else
	CPPFLAGS=`echo "$CPPFLAGS" | sed -e s/-DXRENDERFONT//`
fi

echo "$as_me:20740: checking if you want support for HP-style function keys" >&5
echo $ECHO_N "checking if you want support for HP-style function keys... $ECHO_C" >&6

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

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

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

fi

echo "$as_me:20767: checking if you want support for SCO-style function keys" >&5
echo $ECHO_N "checking if you want support for SCO-style function keys... $ECHO_C" >&6

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

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

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

fi

echo "$as_me:20794: checking if you want support for Sun-style function keys" >&5
echo $ECHO_N "checking if you want support for Sun-style function keys... $ECHO_C" >&6

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

fi;
echo "$as_me:20811: result: $enable_sun_fkeys" >&5
echo "${ECHO_T}$enable_sun_fkeys" >&6
if test "$enable_sun_fkeys" = no ; then

cat >>confdefs.h <<\EOF
#define OPT_SUN_FUNC_KEYS 0
EOF

fi

echo "$as_me:20821: checking if you want saved-lines stored as a FIFO" >&5
echo $ECHO_N "checking if you want saved-lines stored as a FIFO... $ECHO_C" >&6

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

fi;
echo "$as_me:20838: result: $enable_fifo_lines" >&5
echo "${ECHO_T}$enable_fifo_lines" >&6
if test "$enable_fifo_lines" != yes ; then
	{ echo "$as_me:20841: WARNING: this option has been deprecated" >&5
echo "$as_me: WARNING: this option has been deprecated" >&2;}
fi

echo "$as_me:20845: checking if you want support for internationalization" >&5
echo $ECHO_N "checking if you want support for internationalization... $ECHO_C" >&6

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

fi;
echo "$as_me:20862: result: $enable_i18n" >&5
echo "${ECHO_T}$enable_i18n" >&6
if test "$enable_i18n" = no ; then

cat >>confdefs.h <<\EOF
#define OPT_I18N_SUPPORT 0
EOF

fi

echo "$as_me:20872: checking if you want support for initial-erase setup" >&5
echo $ECHO_N "checking if you want support for initial-erase setup... $ECHO_C" >&6

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

fi;
echo "$as_me:20889: result: $enable_ie" >&5
echo "${ECHO_T}$enable_ie" >&6
if test "$enable_ie" = no ; then

cat >>confdefs.h <<\EOF
#define OPT_INITIAL_ERASE 0
EOF

fi

echo "$as_me:20899: checking if you want support for input-method" >&5
echo $ECHO_N "checking if you want support for input-method... $ECHO_C" >&6

# Check whether --enable-input-method or --disable-input-method was given.
if test "${enable_input_method+set}" = set; then
  enableval="$enable_input_method"
  test "$enableval" != no && enableval=yes
	if test "$enableval" != "yes" ; then
    enable_ximp=no
	else
		enable_ximp=$enable_i18n
	fi
else
  enableval=yes
	enable_ximp=$enable_i18n

fi;
echo "$as_me:20916: result: $enable_ximp" >&5
echo "${ECHO_T}$enable_ximp" >&6

echo "$as_me:20919: checking if X libraries support input-method" >&5
echo $ECHO_N "checking if X libraries support input-method... $ECHO_C" >&6
if test "${cf_cv_input_method+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

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

#include <X11/IntrinsicP.h>
#include <X11/Xatom.h>
#include <X11/Xutil.h>
#include <X11/Xmu/Atoms.h>
#include <X11/Xmu/Converters.h>
#include <X11/Xaw/XawImP.h>

int
main (void)
{

{
	XIM xim;
	XIMStyles *xim_styles = 0;
	XIMStyle input_style;
	Widget w = XtCreateWidget("none", (WidgetClass)0, None, (ArgList)0, 0);

	XSetLocaleModifiers("@im=none");
	xim = XOpenIM(XtDisplay(w), NULL, NULL, NULL);
	XGetIMValues(xim, XNQueryInputStyle, &xim_styles, NULL);
	XCloseIM(xim);
	input_style = (XIMPreeditNothing | XIMStatusNothing);
	(void)xim_styles;
	(void)input_style;
}

  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext" "conftest$ac_exeext"
if { (eval echo "$as_me:20960: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:20963: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:20966: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:20969: \$? = $ac_status" >&5
  (exit "$ac_status"); }; }; then
  cf_cv_input_method=yes
else
  echo "$as_me: failed program was:" >&5
cat "conftest.$ac_ext" >&5
cf_cv_input_method=no
fi
rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
fi
echo "$as_me:20979: result: $cf_cv_input_method" >&5
echo "${ECHO_T}$cf_cv_input_method" >&6

test "$cf_cv_input_method" = no && enable_ximp=no
if test "$enable_ximp" != no ; then
	if test "$enable_i18n" = no ; then
		{ echo "$as_me:20985: WARNING: input-method relies upon internationalization" >&5
echo "$as_me: WARNING: input-method relies upon internationalization" >&2;}
		enable_ximp=no
	fi
fi
if test "$enable_ximp" = no ; then

cat >>confdefs.h <<\EOF
#define OPT_INPUT_METHOD 0
EOF

fi

echo "$as_me:20998: checking if you want support for load-vt-fonts" >&5
echo $ECHO_N "checking if you want support for load-vt-fonts... $ECHO_C" >&6

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

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

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

fi

echo "$as_me:21025: checking if you want support for logging" >&5
echo $ECHO_N "checking if you want support for logging... $ECHO_C" >&6

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

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

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

	echo "$as_me:21050: checking if you want to allow logging via a pipe" >&5
echo $ECHO_N "checking if you want to allow logging via a pipe... $ECHO_C" >&6

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

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

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

	fi
fi

echo "$as_me:21078: checking if you want support for iconify/maximize translations" >&5
echo $ECHO_N "checking if you want support for iconify/maximize translations... $ECHO_C" >&6

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

fi;
echo "$as_me:21095: result: $enable_maximize" >&5
echo "${ECHO_T}$enable_maximize" >&6
test "$enable_maximize" = no &&
cat >>confdefs.h <<\EOF
#define OPT_MAXIMIZE 0
EOF

echo "$as_me:21102: checking if you want NumLock to override keyboard tables" >&5
echo $ECHO_N "checking if you want NumLock to override keyboard tables... $ECHO_C" >&6

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

fi;
echo "$as_me:21119: result: $enable_numlock" >&5
echo "${ECHO_T}$enable_numlock" >&6
test "$enable_numlock" = no &&
cat >>confdefs.h <<\EOF
#define OPT_NUM_LOCK 0
EOF

echo "$as_me:21126: checking if you want support for get/set of base64 selection data" >&5
echo $ECHO_N "checking if you want support for get/set of base64 selection data... $ECHO_C" >&6

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

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

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

else

cat >>confdefs.h <<\EOF
#define OPT_PASTE64 0
EOF

fi

echo "$as_me:21159: checking if you want support for pty-handshaking" >&5
echo $ECHO_N "checking if you want support for pty-handshaking... $ECHO_C" >&6

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

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

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

else

cat >>confdefs.h <<\EOF
#define OPT_PTY_HANDSHAKE 0
EOF

fi

echo "$as_me:21192: checking if you want support for mouse in readline applications" >&5
echo $ECHO_N "checking if you want support for mouse in readline applications... $ECHO_C" >&6

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

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

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

fi

echo "$as_me:21219: checking if you want support for regular-expression selections" >&5
echo $ECHO_N "checking if you want support for regular-expression selections... $ECHO_C" >&6

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

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

echo "$as_me:21240: checking if you want to use PCRE2 for regular-expressions" >&5
echo $ECHO_N "checking if you want to use PCRE2 for regular-expressions... $ECHO_C" >&6

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

fi;
test -z "$with_pcre2" && with_pcre2=no
echo "$as_me:21249: result: $with_pcre2" >&5
echo "${ECHO_T}$with_pcre2" >&6

if test "x$with_pcre2" != xno ; then
	cf_with_pcre2_ok=no
	for cf_with_pcre2 in libpcre2 libpcre2-posix libpcre
	do

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

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

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

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

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

echo "${as_me:-configure}:21270: testing package $cf_with_pcre2 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_with_pcre2_ok=yes; break
else
	cf_pkgconfig_incs=
	cf_pkgconfig_libs=
	:
fi

	done
	cf_with_pcre2_ok=yes || { { echo "$as_me:21394: error: Cannot find PCRE2 library" >&5
echo "$as_me: error: Cannot find PCRE2 library" >&2;}
   { (exit 1); exit 1; }; }

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

	# if pkgconfig gave no results, look for the libraries directly
	case "$LIBS" in
	(*pcre2-posix*|*pcreposix*)
		;;
	(*)
		echo "$as_me:21407: 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 21415 "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:21434: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:21437: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:21440: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:21443: \$? = $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:21454: 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:21475: 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 21483 "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:21502: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:21505: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:21508: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:21511: \$? = $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:21522: 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
  { { echo "$as_me:21543: error: Cannot find PCRE2 POSIX library" >&5
echo "$as_me: error: Cannot find PCRE2 POSIX library" >&2;}
   { (exit 1); exit 1; }; }
fi

fi

		;;
	esac

	# either way, check for the library header files

for ac_header in pcre2posix.h pcreposix.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
echo "$as_me:21558: 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 21564 "configure"
#include "confdefs.h"
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:21568: \"$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:21574: \$? = $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:21593: 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 PCRE2regcomp
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:21606: 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 21612 "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:21643: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:21646: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:21649: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:21652: \$? = $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:21662: 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

fi

	if test "$with_pcre2" = no ; then

echo "$as_me:21676: checking if you want to use PCRE for regular-expressions" >&5
echo $ECHO_N "checking if you want to use PCRE for regular-expressions... $ECHO_C" >&6

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

fi;
test -z "$with_pcre" && with_pcre=no
echo "$as_me:21685: result: $with_pcre" >&5
echo "${ECHO_T}$with_pcre" >&6

if test "$with_pcre" != no ; then

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

echo "${as_me:-configure}:21693: 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}:21699: 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}:21703: 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:21824: 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 21832 "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:21851: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:21854: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:21857: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:21860: \$? = $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:21871: 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
  cat >>confdefs.h <<EOF
#define HAVE_LIBPCRE 1
EOF

  LIBS="-lpcre $LIBS"

else
  { { echo "$as_me:21881: error: Cannot find PCRE library" >&5
echo "$as_me: error: Cannot find PCRE library" >&2;}
   { (exit 1); exit 1; }; }
fi

fi

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

	case $LIBS in
	(*pcreposix*)
		;;
	(*)
		echo "$as_me:21896: checking for pcreposix_regcomp in -lpcreposix" >&5
echo $ECHO_N "checking for pcreposix_regcomp in -lpcreposix... $ECHO_C" >&6
if test "${ac_cv_lib_pcreposix_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 21904 "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 pcreposix_regcomp (void);
int
main (void)
{
pcreposix_regcomp ();
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext" "conftest$ac_exeext"
if { (eval echo "$as_me:21923: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:21926: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:21929: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:21932: \$? = $ac_status" >&5
  (exit "$ac_status"); }; }; then
  ac_cv_lib_pcreposix_pcreposix_regcomp=yes
else
  echo "$as_me: failed program was:" >&5
cat "conftest.$ac_ext" >&5
ac_cv_lib_pcreposix_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:21943: result: $ac_cv_lib_pcreposix_pcreposix_regcomp" >&5
echo "${ECHO_T}$ac_cv_lib_pcreposix_pcreposix_regcomp" >&6
if test "$ac_cv_lib_pcreposix_pcreposix_regcomp" = yes; then

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

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
  echo "$as_me:21968: 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 21976 "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:21995: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:21998: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:22001: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:22004: \$? = $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:22015: 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

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

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
  { { echo "$as_me:22040: error: Cannot find PCRE POSIX library" >&5
echo "$as_me: error: Cannot find PCRE POSIX library" >&2;}
   { (exit 1); exit 1; }; }
fi

fi

		;;
	esac
fi

		if test "$with_pcre" = no ; then

cf_regex_func=no
cf_regex_libs=
case "$host_os" in
(mingw*)
	# -lsystre -ltre -lintl -liconv
	echo "$as_me:22058: checking for regcomp in -lsystre" >&5
echo $ECHO_N "checking for regcomp in -lsystre... $ECHO_C" >&6
if test "${ac_cv_lib_systre_regcomp+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lsystre  $LIBS"
cat >"conftest.$ac_ext" <<_ACEOF
#line 22066 "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:22085: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:22088: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:22091: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:22094: \$? = $ac_status" >&5
  (exit "$ac_status"); }; }; then
  ac_cv_lib_systre_regcomp=yes
else
  echo "$as_me: failed program was:" >&5
cat "conftest.$ac_ext" >&5
ac_cv_lib_systre_regcomp=no
fi
rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:22105: result: $ac_cv_lib_systre_regcomp" >&5
echo "${ECHO_T}$ac_cv_lib_systre_regcomp" >&6
if test "$ac_cv_lib_systre_regcomp" = yes; then

		echo "$as_me:22109: checking for libiconv_open in -liconv" >&5
echo $ECHO_N "checking for libiconv_open in -liconv... $ECHO_C" >&6
if test "${ac_cv_lib_iconv_libiconv_open+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-liconv  $LIBS"
cat >"conftest.$ac_ext" <<_ACEOF
#line 22117 "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 libiconv_open (void);
int
main (void)
{
libiconv_open ();
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext" "conftest$ac_exeext"
if { (eval echo "$as_me:22136: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:22139: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:22142: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:22145: \$? = $ac_status" >&5
  (exit "$ac_status"); }; }; then
  ac_cv_lib_iconv_libiconv_open=yes
else
  echo "$as_me: failed program was:" >&5
cat "conftest.$ac_ext" >&5
ac_cv_lib_iconv_libiconv_open=no
fi
rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:22156: result: $ac_cv_lib_iconv_libiconv_open" >&5
echo "${ECHO_T}$ac_cv_lib_iconv_libiconv_open" >&6
if test "$ac_cv_lib_iconv_libiconv_open" = yes; then

cf_add_libs="$LIBS"
# reverse order
cf_add_0lib=
for cf_add_1lib in -liconv; 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:22178: checking for libintl_gettext in -lintl" >&5
echo $ECHO_N "checking for libintl_gettext in -lintl... $ECHO_C" >&6
if test "${ac_cv_lib_intl_libintl_gettext+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lintl  $LIBS"
cat >"conftest.$ac_ext" <<_ACEOF
#line 22186 "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 libintl_gettext (void);
int
main (void)
{
libintl_gettext ();
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext" "conftest$ac_exeext"
if { (eval echo "$as_me:22205: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:22208: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:22211: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:22214: \$? = $ac_status" >&5
  (exit "$ac_status"); }; }; then
  ac_cv_lib_intl_libintl_gettext=yes
else
  echo "$as_me: failed program was:" >&5
cat "conftest.$ac_ext" >&5
ac_cv_lib_intl_libintl_gettext=no
fi
rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:22225: result: $ac_cv_lib_intl_libintl_gettext" >&5
echo "${ECHO_T}$ac_cv_lib_intl_libintl_gettext" >&6
if test "$ac_cv_lib_intl_libintl_gettext" = yes; then

cf_add_libs="$LIBS"
# reverse order
cf_add_0lib=
for cf_add_1lib in -lintl; 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:22247: checking for tre_regcomp in -ltre" >&5
echo $ECHO_N "checking for tre_regcomp in -ltre... $ECHO_C" >&6
if test "${ac_cv_lib_tre_tre_regcomp+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-ltre  $LIBS"
cat >"conftest.$ac_ext" <<_ACEOF
#line 22255 "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 tre_regcomp (void);
int
main (void)
{
tre_regcomp ();
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext" "conftest$ac_exeext"
if { (eval echo "$as_me:22274: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:22277: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:22280: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:22283: \$? = $ac_status" >&5
  (exit "$ac_status"); }; }; then
  ac_cv_lib_tre_tre_regcomp=yes
else
  echo "$as_me: failed program was:" >&5
cat "conftest.$ac_ext" >&5
ac_cv_lib_tre_tre_regcomp=no
fi
rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:22294: result: $ac_cv_lib_tre_tre_regcomp" >&5
echo "${ECHO_T}$ac_cv_lib_tre_tre_regcomp" >&6
if test "$ac_cv_lib_tre_tre_regcomp" = yes; then

cf_add_libs="$LIBS"
# reverse order
cf_add_0lib=
for cf_add_1lib in -ltre; 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

cf_add_libs="$LIBS"
# reverse order
cf_add_0lib=
for cf_add_1lib in -lsystre; 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_regex_func=regcomp

else

		echo "$as_me:22336: checking for regcomp in -lgnurx" >&5
echo $ECHO_N "checking for regcomp in -lgnurx... $ECHO_C" >&6
if test "${ac_cv_lib_gnurx_regcomp+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lgnurx  $LIBS"
cat >"conftest.$ac_ext" <<_ACEOF
#line 22344 "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:22363: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:22366: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:22369: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:22372: \$? = $ac_status" >&5
  (exit "$ac_status"); }; }; then
  ac_cv_lib_gnurx_regcomp=yes
else
  echo "$as_me: failed program was:" >&5
cat "conftest.$ac_ext" >&5
ac_cv_lib_gnurx_regcomp=no
fi
rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:22383: result: $ac_cv_lib_gnurx_regcomp" >&5
echo "${ECHO_T}$ac_cv_lib_gnurx_regcomp" >&6
if test "$ac_cv_lib_gnurx_regcomp" = yes; then

cf_add_libs="$LIBS"
# reverse order
cf_add_0lib=
for cf_add_1lib in -lgnurx; 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_regex_func=regcomp
fi

fi

	;;
(*)
	cf_regex_libs="regex re"
	echo "$as_me:22411: checking for regcomp" >&5
echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
if test "${ac_cv_func_regcomp+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >"conftest.$ac_ext" <<_ACEOF
#line 22417 "configure"
#include "confdefs.h"
#define regcomp autoconf_temporary
#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
#undef regcomp

#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)
{

/* 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_regcomp) || defined (__stub___regcomp)
#error found stub for regcomp
#endif

	return regcomp ();
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext" "conftest$ac_exeext"
if { (eval echo "$as_me:22448: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:22451: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:22454: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:22457: \$? = $ac_status" >&5
  (exit "$ac_status"); }; }; then
  ac_cv_func_regcomp=yes
else
  echo "$as_me: failed program was:" >&5
cat "conftest.$ac_ext" >&5
ac_cv_func_regcomp=no
fi
rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
fi
echo "$as_me:22467: result: $ac_cv_func_regcomp" >&5
echo "${ECHO_T}$ac_cv_func_regcomp" >&6
if test "$ac_cv_func_regcomp" = yes; then
  cf_regex_func=regcomp
else

		for cf_regex_lib in $cf_regex_libs
		do
			as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
echo "$as_me:22476: checking for regcomp in -l$cf_regex_lib" >&5
echo $ECHO_N "checking for regcomp in -l$cf_regex_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_regex_lib  $LIBS"
cat >"conftest.$ac_ext" <<_ACEOF
#line 22484 "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:22503: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:22506: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:22509: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:22512: \$? = $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:22523: 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_add_libs="$LIBS"
# reverse order
cf_add_0lib=
for cf_add_1lib in -l$cf_regex_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_regex_func=regcomp
					break
fi

		done

fi

	;;
esac

if test "$cf_regex_func" = no ; then
	echo "$as_me:22555: checking for compile" >&5
echo $ECHO_N "checking for compile... $ECHO_C" >&6
if test "${ac_cv_func_compile+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >"conftest.$ac_ext" <<_ACEOF
#line 22561 "configure"
#include "confdefs.h"
#define compile autoconf_temporary
#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
#undef compile

#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 compile (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_compile) || defined (__stub___compile)
#error found stub for compile
#endif

	return compile ();
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext" "conftest$ac_exeext"
if { (eval echo "$as_me:22592: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:22595: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:22598: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:22601: \$? = $ac_status" >&5
  (exit "$ac_status"); }; }; then
  ac_cv_func_compile=yes
else
  echo "$as_me: failed program was:" >&5
cat "conftest.$ac_ext" >&5
ac_cv_func_compile=no
fi
rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
fi
echo "$as_me:22611: result: $ac_cv_func_compile" >&5
echo "${ECHO_T}$ac_cv_func_compile" >&6
if test "$ac_cv_func_compile" = yes; then
  cf_regex_func=compile
else

		echo "$as_me:22617: checking for compile in -lgen" >&5
echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
if test "${ac_cv_lib_gen_compile+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lgen  $LIBS"
cat >"conftest.$ac_ext" <<_ACEOF
#line 22625 "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 compile (void);
int
main (void)
{
compile ();
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext" "conftest$ac_exeext"
if { (eval echo "$as_me:22644: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:22647: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:22650: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:22653: \$? = $ac_status" >&5
  (exit "$ac_status"); }; }; then
  ac_cv_lib_gen_compile=yes
else
  echo "$as_me: failed program was:" >&5
cat "conftest.$ac_ext" >&5
ac_cv_lib_gen_compile=no
fi
rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:22664: result: $ac_cv_lib_gen_compile" >&5
echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
if test "$ac_cv_lib_gen_compile" = yes; then

cf_add_libs="$LIBS"
# reverse order
cf_add_0lib=
for cf_add_1lib in -lgen; 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_regex_func=compile
fi

fi

fi

if test "$cf_regex_func" = no ; then
	{ echo "$as_me:22692: WARNING: cannot find regular expression library" >&5
echo "$as_me: WARNING: cannot find regular expression library" >&2;}
fi

echo "$as_me:22696: checking for regular-expression headers" >&5
echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
if test "${cf_cv_regex_hdrs+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

cf_cv_regex_hdrs=no
case "$cf_regex_func" in
(compile)
	for cf_regex_hdr in regexp.h regexpr.h
	do
		cat >"conftest.$ac_ext" <<_ACEOF
#line 22708 "configure"
#include "confdefs.h"
#include <$cf_regex_hdr>
int
main (void)
{

			char *p = compile("", "", "", 0);
			int x = step("", "");
			(void)p;
			(void)x;

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

			cf_cv_regex_hdrs=$cf_regex_hdr
			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
	;;
(*)
	for cf_regex_hdr in regex.h
	do
		cat >"conftest.$ac_ext" <<_ACEOF
#line 22751 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <stdio.h>
#include <$cf_regex_hdr>
int
main (void)
{

			regex_t *p = NULL;
			int x = regcomp(p, "", 0);
			int y = regexec(p, "", 0, 0, 0);
			(void)x;
			(void)y;
			regfree(p);

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

			cf_cv_regex_hdrs=$cf_regex_hdr
			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
	;;
esac

fi
echo "$as_me:22797: result: $cf_cv_regex_hdrs" >&5
echo "${ECHO_T}$cf_cv_regex_hdrs" >&6

case "$cf_cv_regex_hdrs" in
	(no)		{ echo "$as_me:22801: WARNING: no regular expression header found" >&5
echo "$as_me: WARNING: no regular expression header found" >&2;} ;;
	(regex.h)
cat >>confdefs.h <<\EOF
#define HAVE_REGEX_H_FUNCS 1
EOF
 ;;
	(regexp.h)
cat >>confdefs.h <<\EOF
#define HAVE_REGEXP_H_FUNCS 1
EOF
 ;;
	(regexpr.h)
cat >>confdefs.h <<\EOF
#define HAVE_REGEXPR_H_FUNCS 1
EOF
 ;;
esac

			if test "X$cf_cv_regex_hdrs" != "Xregex.h" ; then
				{ { echo "$as_me:22821: error: Only POSIX, PCRE, or PCRE2 regular expressions are supported" >&5
echo "$as_me: error: Only POSIX, PCRE, or PCRE2 regular expressions are supported" >&2;}
   { (exit 1); exit 1; }; }
			fi
		fi
	fi

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

fi

echo "$as_me:22834: checking if you want support for right-scrollbar" >&5
echo $ECHO_N "checking if you want support for right-scrollbar... $ECHO_C" >&6

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

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

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

fi

echo "$as_me:22861: checking if you want check for redundant name-change" >&5
echo $ECHO_N "checking if you want check for redundant name-change... $ECHO_C" >&6

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

fi;
echo "$as_me:22878: result: $enable_samename" >&5
echo "${ECHO_T}$enable_samename" >&6
test "$enable_samename" = no &&
cat >>confdefs.h <<\EOF
#define OPT_SAME_NAME 0
EOF

echo "$as_me:22885: checking if you want support for selection-actions" >&5
echo $ECHO_N "checking if you want support for selection-actions... $ECHO_C" >&6

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

fi;
echo "$as_me:22902: result: $enable_selection_ops" >&5
echo "${ECHO_T}$enable_selection_ops" >&6
test "$enable_selection_ops" = no &&
cat >>confdefs.h <<\EOF
#define OPT_SELECTION_OPS 0
EOF

echo "$as_me:22909: checking if you want support for session management" >&5
echo $ECHO_N "checking if you want support for session management... $ECHO_C" >&6

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

fi;
echo "$as_me:22926: result: $enable_session_mgt" >&5
echo "${ECHO_T}$enable_session_mgt" >&6
test "$enable_session_mgt" = no &&
cat >>confdefs.h <<\EOF
#define OPT_SESSION_MGT 0
EOF

echo "$as_me:22933: checking if you want support for status-line" >&5
echo $ECHO_N "checking if you want support for status-line... $ECHO_C" >&6

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

fi;
echo "$as_me:22950: result: $enable_status_line" >&5
echo "${ECHO_T}$enable_status_line" >&6
test "$enable_status_line" = yes &&
cat >>confdefs.h <<\EOF
#define OPT_STATUS_LINE 1
EOF

echo "$as_me:22957: checking if you want to use termcap function-keys" >&5
echo $ECHO_N "checking if you want to use termcap function-keys... $ECHO_C" >&6

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

fi;
echo "$as_me:22974: result: $enable_tcap_fkeys" >&5
echo "${ECHO_T}$enable_tcap_fkeys" >&6
test "$enable_tcap_fkeys" = no &&
cat >>confdefs.h <<\EOF
#define OPT_TCAP_FKEYS 0
EOF

echo "$as_me:22981: checking if you want to use termcap-query/report" >&5
echo $ECHO_N "checking if you want to use termcap-query/report... $ECHO_C" >&6

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

fi;
echo "$as_me:22998: result: $enable_tcap_query" >&5
echo "${ECHO_T}$enable_tcap_query" >&6
test "$enable_tcap_query" = no &&
cat >>confdefs.h <<\EOF
#define OPT_TCAP_QUERY 0
EOF

echo "$as_me:23005: checking if you want support for tek4014" >&5
echo $ECHO_N "checking if you want support for tek4014... $ECHO_C" >&6

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

fi;
echo "$as_me:23022: result: $enable_tek4014" >&5
echo "${ECHO_T}$enable_tek4014" >&6
if test "$enable_tek4014" = no ; then

cat >>confdefs.h <<\EOF
#define OPT_TEK4014 0
EOF

else
	EXTRAHDRS="$EXTRAHDRS Tekparse.h"
	EXTRASRCS="$EXTRASRCS TekPrsTbl.c Tekproc.c"
	EXTRAOBJS="$EXTRAOBJS TekPrsTbl.o Tekproc.o"
fi

echo "$as_me:23036: checking if you want pulldown menus with a toolbar" >&5
echo $ECHO_N "checking if you want pulldown menus with a toolbar... $ECHO_C" >&6

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

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

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

fi

echo "$as_me:23063: checking if you want VT52 emulation" >&5
echo $ECHO_N "checking if you want VT52 emulation... $ECHO_C" >&6

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

fi;
echo "$as_me:23080: result: $enable_vt52" >&5
echo "${ECHO_T}$enable_vt52" >&6
test "$enable_vt52" = no &&
cat >>confdefs.h <<\EOF
#define OPT_VT52_MODE 0
EOF

echo "$as_me:23087: checking if you want wide-attribute support" >&5
echo $ECHO_N "checking if you want wide-attribute support... $ECHO_C" >&6

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

fi;
echo "$as_me:23104: result: $enable_wattr" >&5
echo "${ECHO_T}$enable_wattr" >&6

if test x$enable_wattr = xno && test x$enable_direct_color = xyes ; then
	{ echo "$as_me:23108: WARNING: overriding wide-attributes to support direct color" >&5
echo "$as_me: WARNING: overriding wide-attributes to support direct color" >&2;}
	enable_wattr=yes
fi

echo "$as_me:23113: checking if you want wide-character support" >&5
echo $ECHO_N "checking if you want wide-character support... $ECHO_C" >&6

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

fi;
echo "$as_me:23130: result: $enable_wchar" >&5
echo "${ECHO_T}$enable_wchar" >&6
test "x$enable_wattr" = xno &&
cat >>confdefs.h <<\EOF
#define OPT_WIDE_ATTRS 0
EOF

echo "$as_me:23137: checking if you want only 16-bit character support" >&5
echo $ECHO_N "checking if you want only 16-bit character support... $ECHO_C" >&6

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

fi;
echo "$as_me:23154: result: $enable_16bit_chars" >&5
echo "${ECHO_T}$enable_16bit_chars" >&6

if test "$enable_16bit_chars" = yes ; then

cat >>confdefs.h <<\EOF
#define OPT_WIDER_ICHAR 0
EOF

	enable_wchar=yes
fi

if test "$enable_wchar" = yes ; then

echo "$as_me:23168: checking if you want to use mini-luit/Latin9 built-in support" >&5
echo $ECHO_N "checking if you want to use mini-luit/Latin9 built-in support... $ECHO_C" >&6

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

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

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

fi

echo "$as_me:23195: checking if you want to use luit" >&5
echo $ECHO_N "checking if you want to use luit... $ECHO_C" >&6

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

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

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

test -z "$LUIT" && LUIT="xterm-filter"
for ac_prog in $LUIT xterm-filter bluit luit
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:23225: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_path_LUIT+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $LUIT in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_LUIT="$LUIT" # 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_LUIT="$ac_dir/$ac_word"
   echo "$as_me:23242: found $ac_dir/$ac_word" >&5
   break
fi
done

  ;;
esac
fi
LUIT=$ac_cv_path_LUIT

if test -n "$LUIT"; then
  echo "$as_me:23253: result: $LUIT" >&5
echo "${ECHO_T}$LUIT" >&6
else
  echo "$as_me:23256: result: no" >&5
echo "${ECHO_T}no" >&6
fi

  test -n "$LUIT" && break
done
test -n "$LUIT" || LUIT="$LUIT"

cf_path_prog=""
cf_path_args=""
IFS="${IFS:- 	}"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
for cf_temp in $ac_cv_path_LUIT
do
	if test -z "$cf_path_prog" ; then
		if test "$with_full_paths" = yes ; then

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

case "x$cf_temp" in
(x\$\(*\)*|x\'*\'*)
	;;
(x.|x$GLOB_FULLPATH_POSIX|x$GLOB_FULLPATH_OTHER)
	;;
(x\$\{*prefix\}*|x\$\{*dir\}*)
	eval cf_temp="$cf_temp"
	case "x$cf_temp" in
	(xNONE/*)
		cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
		;;
	esac
	;;
(xno|xNONE/*)
	cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
	;;
(*)
	break
	;;
esac

			cf_path_prog="$cf_temp"
		else
			cf_path_prog="`basename "$cf_temp"`"
		fi
	elif test -z "$cf_path_args" ; then
		cf_path_args="$cf_temp"
	else
		cf_path_args="$cf_path_args $cf_temp"
	fi
done
IFS="$cf_save_ifs"

if test -n "$cf_path_prog" ; then

echo "${as_me:-configure}:23313: testing defining path for ${cf_path_prog} ..." 1>&5

cat >>confdefs.h <<EOF
#define LUIT_PATH "$cf_path_prog"
EOF

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

fi

fi

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

	EXTRAHDRS="$EXTRAHDRS charclass.h precompose.h wcwidth.h"
	EXTRASRCS="$EXTRASRCS charclass.c precompose.c wcwidth.c"
	EXTRAOBJS="$EXTRAOBJS charclass.o precompose.o wcwidth.o"
fi

echo "$as_me:23337: checking if you want dynamic-abbreviation support" >&5
echo $ECHO_N "checking if you want dynamic-abbreviation support... $ECHO_C" >&6

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

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

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

fi

echo "$as_me:23364: checking if you want DECterm Locator support" >&5
echo $ECHO_N "checking if you want DECterm Locator support... $ECHO_C" >&6

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

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

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

fi

echo "$as_me:23391: checking if you want XHTML and SVG screen dump support" >&5
echo $ECHO_N "checking if you want XHTML and SVG screen dump support... $ECHO_C" >&6

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

fi;
echo "$as_me:23408: result: $enable_screen_dumps" >&5
echo "${ECHO_T}$enable_screen_dumps" >&6
if test "$enable_screen_dumps" = yes ; then
	EXTRASRCS="$EXTRASRCS html.c svg.c"
	EXTRAOBJS="$EXTRAOBJS html.o svg.o"
else

cat >>confdefs.h <<\EOF
#define OPT_SCREEN_DUMPS 0
EOF

fi

echo "$as_me:23421: checking if you want ReGIS graphics support" >&5
echo $ECHO_N "checking if you want ReGIS graphics support... $ECHO_C" >&6

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

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

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

	EXTRAHDRS="$EXTRAHDRS graphics_regis.h"
	EXTRASRCS="$EXTRASRCS graphics_regis.c"
	EXTRAOBJS="$EXTRAOBJS graphics_regis.o"

echo "$as_me:23450: checking if -lm needed for math functions" >&5
echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
if test "${cf_cv_need_libm+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

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

		#include <stdio.h>
		#include <stdlib.h>
		#include <math.h>

int
main (void)
{
double x = rand(); printf("result = %g\\n", sin(x))
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext" "conftest$ac_exeext"
if { (eval echo "$as_me:23473: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:23476: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:23479: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:23482: \$? = $ac_status" >&5
  (exit "$ac_status"); }; }; then
  cf_cv_need_libm=no
else
  echo "$as_me: failed program was:" >&5
cat "conftest.$ac_ext" >&5
cf_cv_need_libm=yes
fi
rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
fi
echo "$as_me:23492: result: $cf_cv_need_libm" >&5
echo "${ECHO_T}$cf_cv_need_libm" >&6

if test "$cf_cv_need_libm" = yes
then

	cf_save_LIBS="$LIBS"
	LIBS="$LIBS -lm"
	echo "$as_me:23500: checking if -lm is available for math functions" >&5
echo $ECHO_N "checking if -lm is available for math functions... $ECHO_C" >&6
if test "${cf_cv_have_libm+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

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

		#include <stdio.h>
		#include <stdlib.h>
		#include <math.h>

int
main (void)
{
double x = rand(); printf("result = %g\\n", sin(x))
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext" "conftest$ac_exeext"
if { (eval echo "$as_me:23523: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:23526: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:23529: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:23532: \$? = $ac_status" >&5
  (exit "$ac_status"); }; }; then
  cf_cv_have_libm=yes
else
  echo "$as_me: failed program was:" >&5
cat "conftest.$ac_ext" >&5
cf_cv_have_libm=no
fi
rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
fi
echo "$as_me:23542: result: $cf_cv_have_libm" >&5
echo "${ECHO_T}$cf_cv_have_libm" >&6
	LIBS="$cf_save_LIBS"

	if test "$cf_cv_have_libm" = yes
	then

cf_add_libs="$LIBS"
# reverse order
cf_add_0lib=
for cf_add_1lib in -lm; 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
else
	cf_cv_have_libm=yes
fi

if test "$cf_cv_have_libm" = yes
then

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

fi

fi

echo "$as_me:23581: checking if you want sixel graphics support" >&5
echo $ECHO_N "checking if you want sixel graphics support... $ECHO_C" >&6

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

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

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

	EXTRAHDRS="$EXTRAHDRS graphics_sixel.h"
	EXTRASRCS="$EXTRASRCS graphics_sixel.c"
	EXTRAOBJS="$EXTRAOBJS graphics_sixel.o"
fi

if test "$enable_regis_graphics" = yes || test "$enable_sixel_graphics" = yes ; then

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

	EXTRAHDRS="$EXTRAHDRS graphics.h"
	EXTRASRCS="$EXTRASRCS graphics.c"
	EXTRAOBJS="$EXTRAOBJS graphics.o"
	STRINGS_MAX=600000
else
	STRINGS_MAX=20000
fi

echo "$as_me:23625: checking if you want sixel screen dump support" >&5
echo $ECHO_N "checking if you want sixel screen dump support... $ECHO_C" >&6

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

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

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

fi

echo "$as_me:23652: checking if you want VT420 rectangle support" >&5
echo $ECHO_N "checking if you want VT420 rectangle support... $ECHO_C" >&6

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

fi;
echo "$as_me:23669: result: $enable_rectangles" >&5
echo "${ECHO_T}$enable_rectangles" >&6
if test "$enable_rectangles" = no ; then

cat >>confdefs.h <<\EOF
#define OPT_DEC_RECTOPS 0
EOF

fi

echo "$as_me:23679: checking if you want -ziconbeep option" >&5
echo $ECHO_N "checking if you want -ziconbeep option... $ECHO_C" >&6

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

fi;
echo "$as_me:23696: result: $enable_ziconbeep" >&5
echo "${ECHO_T}$enable_ziconbeep" >&6
test "$enable_ziconbeep" = no &&
cat >>confdefs.h <<\EOF
#define OPT_ZICONBEEP 0
EOF

###############################################################################

echo "$as_me:23705: checking if you want debugging traces" >&5
echo $ECHO_N "checking if you want debugging traces... $ECHO_C" >&6

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

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

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

	EXTRASRCS="$EXTRASRCS trace.c"
	EXTRAOBJS="$EXTRAOBJS trace.o"
fi

echo "$as_me:23734: 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:23756: 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:23870: 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 23876 "configure"
#include "confdefs.h"
#include <dmalloc.h>
_ACEOF
if { (eval echo "$as_me:23880: \"$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:23886: \$? = $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:23905: 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:23909: 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 23917 "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:23936: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:23939: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:23942: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:23945: \$? = $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:23956: 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
  cat >>confdefs.h <<EOF
#define HAVE_LIBDMALLOC 1
EOF

  LIBS="-ldmalloc $LIBS"

fi

fi

fi

echo "$as_me:23971: 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:23993: 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:24107: 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 24113 "configure"
#include "confdefs.h"
#include <dbmalloc.h>
_ACEOF
if { (eval echo "$as_me:24117: \"$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:24123: \$? = $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:24142: 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:24146: 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 24154 "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:24173: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:24176: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:24179: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:24182: \$? = $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:24193: 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
  cat >>confdefs.h <<EOF
#define HAVE_LIBDBMALLOC 1
EOF

  LIBS="-ldbmalloc $LIBS"

fi

fi

fi

echo "$as_me:24208: checking if you want to use valgrind for testing" >&5
echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6

# Check whether --with-valgrind or --without-valgrind was given.
if test "${with_valgrind+set}" = set; then
  withval="$with_valgrind"
  case "x$withval" in
	(x|xno) ;;
	(*)
		: "${with_cflags:=-g}"
		: "${enable_leaks:=no}"
		with_valgrind=yes

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

		;;
	esac
else
  with_valgrind=
fi;
echo "$as_me:24230: result: ${with_valgrind:-no}" >&5
echo "${ECHO_T}${with_valgrind:-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

echo "$as_me:24343: checking if you want to perform memory-leak testing" >&5
echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6

# Check whether --enable-leaks or --disable-leaks was given.
if test "${enable_leaks+set}" = set; then
  enableval="$enable_leaks"
  enable_leaks=$enableval
else
  enable_leaks=yes
fi;
if test "x$enable_leaks" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
echo "$as_me:24354: result: $with_no_leaks" >&5
echo "${ECHO_T}$with_no_leaks" >&6

if test "$enable_leaks" = no ; then

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

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

fi

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

echo "$as_me:24406: checking if you want magic cookie emulation" >&5
echo $ECHO_N "checking if you want magic cookie emulation... $ECHO_C" >&6

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

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

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

	EXTRASRCS="$EXTRASRCS testxmc.c"
	EXTRAOBJS="$EXTRAOBJS testxmc.o"
fi

for ac_func in tigetstr
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:24438: 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 24444 "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:24475: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:24478: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:24481: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:24484: \$? = $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:24494: 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 -n "$cf_cv_lib_part_tgetent"; then

for ac_func in use_extended_names
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:24509: 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 24515 "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:24546: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:24549: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:24552: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:24555: \$? = $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:24565: 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

fi

echo "$as_me:24577: checking if you want to use C11 _Noreturn feature" >&5
echo $ECHO_N "checking if you want to use C11 _Noreturn feature... $ECHO_C" >&6

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

fi;
echo "$as_me:24594: result: $enable_stdnoreturn" >&5
echo "${ECHO_T}$enable_stdnoreturn" >&6

if test $enable_stdnoreturn = yes; then
echo "$as_me:24598: checking for C11 _Noreturn feature" >&5
echo $ECHO_N "checking for C11 _Noreturn feature... $ECHO_C" >&6
if test "${cf_cv_c11_noreturn+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >"conftest.$ac_ext" <<_ACEOF
#line 24604 "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:24620: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:24623: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:24626: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:24629: \$? = $ac_status" >&5
  (exit "$ac_status"); }; }; then
  cf_cv_c11_noreturn=yes
else
  echo "$as_me: failed program was:" >&5
cat "conftest.$ac_ext" >&5
cf_cv_c11_noreturn=no
fi
rm -f "conftest.$ac_objext" "conftest.$ac_ext"

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

if test "$GCC" = yes || test "$GXX" = yes
then

if test "$GCC" = yes || test "$GXX" = yes
then
	case $CFLAGS in
	(*-Werror=*)
		cf_temp_flags=
		for cf_temp_scan in $CFLAGS
		do
			case "x$cf_temp_scan" in
			(x-Werror=format*)

	test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
	cf_temp_flags="${cf_temp_flags}$cf_temp_scan"

				;;
			(x-Werror=*)

	test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
	EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"

				;;
			(*)

	test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
	cf_temp_flags="${cf_temp_flags}$cf_temp_scan"

				;;
			esac
		done
		if test "x$CFLAGS" != "x$cf_temp_flags"
		then
			test -n "$verbose" && echo "	repairing CFLAGS: $CFLAGS" 1>&6

echo "${as_me:-configure}:24696: testing repairing CFLAGS: $CFLAGS ..." 1>&5

			CFLAGS="$cf_temp_flags"
			test -n "$verbose" && echo "	... fixed $CFLAGS" 1>&6

echo "${as_me:-configure}:24701: testing ... fixed $CFLAGS ..." 1>&5

			test -n "$verbose" && echo "	... extra $EXTRA_CFLAGS" 1>&6

echo "${as_me:-configure}:24705: testing ... extra $EXTRA_CFLAGS ..." 1>&5

		fi
		;;
	esac
fi

if test "$GCC" = yes || test "$GXX" = yes
then
	case $CPPFLAGS in
	(*-Werror=*)
		cf_temp_flags=
		for cf_temp_scan in $CPPFLAGS
		do
			case "x$cf_temp_scan" in
			(x-Werror=format*)

	test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
	cf_temp_flags="${cf_temp_flags}$cf_temp_scan"

				;;
			(x-Werror=*)

	test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
	EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"

				;;
			(*)

	test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
	cf_temp_flags="${cf_temp_flags}$cf_temp_scan"

				;;
			esac
		done
		if test "x$CPPFLAGS" != "x$cf_temp_flags"
		then
			test -n "$verbose" && echo "	repairing CPPFLAGS: $CPPFLAGS" 1>&6

echo "${as_me:-configure}:24744: testing repairing CPPFLAGS: $CPPFLAGS ..." 1>&5

			CPPFLAGS="$cf_temp_flags"
			test -n "$verbose" && echo "	... fixed $CPPFLAGS" 1>&6

echo "${as_me:-configure}:24749: testing ... fixed $CPPFLAGS ..." 1>&5

			test -n "$verbose" && echo "	... extra $EXTRA_CFLAGS" 1>&6

echo "${as_me:-configure}:24753: testing ... extra $EXTRA_CFLAGS ..." 1>&5

		fi
		;;
	esac
fi

if test "$GCC" = yes || test "$GXX" = yes
then
	case $LDFLAGS in
	(*-Werror=*)
		cf_temp_flags=
		for cf_temp_scan in $LDFLAGS
		do
			case "x$cf_temp_scan" in
			(x-Werror=format*)

	test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
	cf_temp_flags="${cf_temp_flags}$cf_temp_scan"

				;;
			(x-Werror=*)

	test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
	EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"

				;;
			(*)

	test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
	cf_temp_flags="${cf_temp_flags}$cf_temp_scan"

				;;
			esac
		done
		if test "x$LDFLAGS" != "x$cf_temp_flags"
		then
			test -n "$verbose" && echo "	repairing LDFLAGS: $LDFLAGS" 1>&6

echo "${as_me:-configure}:24792: testing repairing LDFLAGS: $LDFLAGS ..." 1>&5

			LDFLAGS="$cf_temp_flags"
			test -n "$verbose" && echo "	... fixed $LDFLAGS" 1>&6

echo "${as_me:-configure}:24797: testing ... fixed $LDFLAGS ..." 1>&5

			test -n "$verbose" && echo "	... extra $EXTRA_CFLAGS" 1>&6

echo "${as_me:-configure}:24801: testing ... extra $EXTRA_CFLAGS ..." 1>&5

		fi
		;;
	esac
fi

echo "$as_me:24808: 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
    enable_warnings=yes
	else
		enable_warnings=no
	fi
else
  enableval=no
	enable_warnings=no

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

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 24849 "configure"
#include "confdefs.h"

$ac_includes_default
#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:24864: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:24867: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:24870: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:24873: \$? = $ac_status" >&5
  (exit "$ac_status"); }; }; then

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

#undef  _CONST_X_STRING
#define _CONST_X_STRING	/* X11R7.8 (perhaps) */
#undef  XTSTRINGDEFINES	/* X11R5 and later */
$ac_includes_default
#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:24901: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:24904: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest.$ac_objext"'
  { (eval echo "$as_me:24907: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:24910: \$? = $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:24925: 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 24954 "${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:24970: 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:24986: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:24989: \$? = $ac_status" >&5
  (exit "$ac_status"); }; then
			test -n "$verbose" && echo "$as_me:24991: 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:24999: 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 Wdeclaration-after-statement Wextra Wno-unknown-pragmas Wswitch-enum Wno-cast-qual
	do
		CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
		if { (eval echo "$as_me:25022: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:25025: \$? = $ac_status" >&5
  (exit "$ac_status"); }; then
			test -n "$verbose" && echo "$as_me:25027: 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}:25035: 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}:25045: 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

if test "$GCC" = yes || test "$GXX" = yes
then
cat > conftest.i <<EOF
#ifndef GCC_PRINTF
#define GCC_PRINTF 0
#endif
#ifndef GCC_SCANF
#define GCC_SCANF 0
#endif
#ifndef GCC_NORETURN
#define GCC_NORETURN /* nothing */
#endif
#ifndef GCC_UNUSED
#define GCC_UNUSED /* nothing */
#endif
EOF
if test "$GCC" = yes
then
	{ echo "$as_me:25078: checking for $CC __attribute__ directives..." >&5
echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
cat > "conftest.$ac_ext" <<EOF
#line 25081 "${as_me:-configure}"
#include <stdio.h>
#include "confdefs.h"
#include "conftest.h"
#include "conftest.i"
#if	GCC_PRINTF
#define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
#else
#define GCC_PRINTFLIKE(fmt,var) /*nothing*/
#endif
#if	GCC_SCANF
#define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
#else
#define GCC_SCANFLIKE(fmt,var)  /*nothing*/
#endif
extern void wow(char *,...) GCC_SCANFLIKE(1,2);
extern GCC_NORETURN void oops(char *,...) GCC_PRINTFLIKE(1,2);
extern GCC_NORETURN void foo(void);
int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
EOF
	cf_printf_attribute=no
	cf_scanf_attribute=no
	for cf_attribute in scanf printf unused noreturn
	do

cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`

		cf_directive="__attribute__(($cf_attribute))"
		echo "checking for $CC $cf_directive" 1>&5

		case "$cf_attribute" in
		(printf)
			cf_printf_attribute=yes
			cat >conftest.h <<EOF
#define GCC_$cf_ATTRIBUTE 1
EOF
			;;
		(scanf)
			cf_scanf_attribute=yes
			cat >conftest.h <<EOF
#define GCC_$cf_ATTRIBUTE 1
EOF
			;;
		(*)
			cat >conftest.h <<EOF
#define GCC_$cf_ATTRIBUTE $cf_directive
EOF
			;;
		esac

		if { (eval echo "$as_me:25131: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:25134: \$? = $ac_status" >&5
  (exit "$ac_status"); }; then
			test -n "$verbose" && echo "$as_me:25136: result: ... $cf_attribute" >&5
echo "${ECHO_T}... $cf_attribute" >&6
			cat conftest.h >>confdefs.h
			case "$cf_attribute" in
			(noreturn)

cat >>confdefs.h <<EOF
#define GCC_NORETURN $cf_directive
EOF

				;;
			(printf)
				cf_value='/* nothing */'
				if test "$cf_printf_attribute" != no ; then
					cf_value='__attribute__((format(printf,fmt,var)))'

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

				fi

cat >>confdefs.h <<EOF
#define GCC_PRINTFLIKE(fmt,var) $cf_value
EOF

				;;
			(scanf)
				cf_value='/* nothing */'
				if test "$cf_scanf_attribute" != no ; then
					cf_value='__attribute__((format(scanf,fmt,var)))'

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

				fi

cat >>confdefs.h <<EOF
#define GCC_SCANFLIKE(fmt,var) $cf_value
EOF

				;;
			(unused)

cat >>confdefs.h <<EOF
#define GCC_UNUSED $cf_directive
EOF

				;;
			esac
		fi
	done
else
	${FGREP-fgrep} define conftest.i >>confdefs.h
fi
rm -rf ./conftest*
fi

fi

test "$disable_setuid" = yes &&
cat >>confdefs.h <<\EOF
#define DISABLE_SETUID 1
EOF

test "$disable_setgid" = yes &&
cat >>confdefs.h <<\EOF
#define DISABLE_SETGID 1
EOF

if test $disable_setuid = yes ; then
	MAY_SETUID="#"
	NOT_SETUID=
elif test $disable_setgid = yes ; then
	MAY_SETUID="#"
	NOT_SETUID=
else
	MAY_SETUID=
	NOT_SETUID="#"
fi

###	remove from CPPFLAGS the optional features we define in xtermcfg.h
###	or other conflicting symbols that may be defined via imake:
for cf_def in \
	__STDC__ \
	ALLOWLOGGING \
	ALLOWLOGFILEEXEC \
	OPT_LUIT_PROG \
	OPT_WIDE_CHARS \
	SCROLLBAR_RIGHT \
	USE_TTY_GROUP \
	USE_UTEMPTER \
	XRENDERFONT
do
	CPPFLAGS=`echo "$CPPFLAGS" | sed -e s/-D$cf_def//`
done

echo "$as_me:25234: checking if filesystem supports mixed-case filenames" >&5
echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
if test "${cf_cv_mixedcase+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

if test "$cross_compiling" = yes ; then
	case "$target_alias" in
	(*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*|darwin*)
		cf_cv_mixedcase=no
		;;
	(*)
		cf_cv_mixedcase=yes
		;;
	esac
else
	rm -f conftest CONFTEST
	echo test >conftest
	if test -f CONFTEST ; then
		cf_cv_mixedcase=no
	else
		cf_cv_mixedcase=yes
	fi
	rm -f conftest CONFTEST
fi

fi
echo "$as_me:25261: result: $cf_cv_mixedcase" >&5
echo "${ECHO_T}$cf_cv_mixedcase" >&6
test "$cf_cv_mixedcase" = yes &&
cat >>confdefs.h <<\EOF
#define MIXEDCASE_FILENAMES 1
EOF

for ac_prog in exctags ctags
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:25272: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_CTAGS+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$CTAGS"; then
  ac_cv_prog_CTAGS="$CTAGS" # 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_CTAGS="$ac_prog"
echo "$as_me:25287: found $ac_dir/$ac_word" >&5
break
done

fi
fi
CTAGS=$ac_cv_prog_CTAGS
if test -n "$CTAGS"; then
  echo "$as_me:25295: result: $CTAGS" >&5
echo "${ECHO_T}$CTAGS" >&6
else
  echo "$as_me:25298: result: no" >&5
echo "${ECHO_T}no" >&6
fi

  test -n "$CTAGS" && break
done

for ac_prog in exetags etags
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:25309: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_ETAGS+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ETAGS"; then
  ac_cv_prog_ETAGS="$ETAGS" # 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_ETAGS="$ac_prog"
echo "$as_me:25324: found $ac_dir/$ac_word" >&5
break
done

fi
fi
ETAGS=$ac_cv_prog_ETAGS
if test -n "$ETAGS"; then
  echo "$as_me:25332: result: $ETAGS" >&5
echo "${ECHO_T}$ETAGS" >&6
else
  echo "$as_me:25335: result: no" >&5
echo "${ECHO_T}no" >&6
fi

  test -n "$ETAGS" && break
done

# Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
set dummy ${CTAGS:-ctags}; ac_word=$2
echo "$as_me:25344: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$MAKE_LOWER_TAGS"; then
  ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # 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_MAKE_LOWER_TAGS="yes"
echo "$as_me:25359: found $ac_dir/$ac_word" >&5
break
done

  test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
fi
fi
MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
if test -n "$MAKE_LOWER_TAGS"; then
  echo "$as_me:25368: result: $MAKE_LOWER_TAGS" >&5
echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
else
  echo "$as_me:25371: result: no" >&5
echo "${ECHO_T}no" >&6
fi

if test "$cf_cv_mixedcase" = yes ; then
	# Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
set dummy ${ETAGS:-etags}; ac_word=$2
echo "$as_me:25378: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$MAKE_UPPER_TAGS"; then
  ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # 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_MAKE_UPPER_TAGS="yes"
echo "$as_me:25393: found $ac_dir/$ac_word" >&5
break
done

  test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
fi
fi
MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
if test -n "$MAKE_UPPER_TAGS"; then
  echo "$as_me:25402: result: $MAKE_UPPER_TAGS" >&5
echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
else
  echo "$as_me:25405: result: no" >&5
echo "${ECHO_T}no" >&6
fi

else
	MAKE_UPPER_TAGS=no
fi

if test "$MAKE_UPPER_TAGS" = yes ; then
	MAKE_UPPER_TAGS=
else
	MAKE_UPPER_TAGS="#"
fi

if test "$MAKE_LOWER_TAGS" = yes ; then
	MAKE_LOWER_TAGS=
else
	MAKE_LOWER_TAGS="#"
fi

LD_RPATH_OPT=
if test "x$cf_cv_enable_rpath" != xno
then
	echo "$as_me:25428: checking for an rpath option" >&5
echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
	case "$cf_cv_system_name" in
	(irix*)
		if test "$GCC" = yes; then
			LD_RPATH_OPT="-Wl,-rpath,"
		else
			LD_RPATH_OPT="-rpath "
		fi
		;;
	(linux*|gnu*|k*bsd*-gnu|freebsd*)
		LD_RPATH_OPT="-Wl,-rpath,"
		;;
	(openbsd[2-9].*|mirbsd*)
		LD_RPATH_OPT="-Wl,-rpath,"
		;;
	(dragonfly*)
		LD_RPATH_OPT="-rpath "
		;;
	(netbsd*)
		LD_RPATH_OPT="-Wl,-rpath,"
		;;
	(osf*|mls+*)
		LD_RPATH_OPT="-rpath "
		;;
	(solaris2*)
		LD_RPATH_OPT="-R"
		;;
	(*)
		;;
	esac
	echo "$as_me:25459: result: $LD_RPATH_OPT" >&5
echo "${ECHO_T}$LD_RPATH_OPT" >&6

	case "x$LD_RPATH_OPT" in
	(x-R*)
		echo "$as_me:25464: checking if we need a space after rpath option" >&5
echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
		cf_save_LIBS="$LIBS"

cf_add_libs="$LIBS"
# reverse order
cf_add_0lib=
for cf_add_1lib in ${LD_RPATH_OPT}$libdir; 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 25485 "configure"
#include "confdefs.h"

int
main (void)
{

  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext" "conftest$ac_exeext"
if { (eval echo "$as_me:25497: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:25500: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:25503: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:25506: \$? = $ac_status" >&5
  (exit "$ac_status"); }; }; then
  cf_rpath_space=no
else
  echo "$as_me: failed program was:" >&5
cat "conftest.$ac_ext" >&5
cf_rpath_space=yes
fi
rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
		LIBS="$cf_save_LIBS"
		echo "$as_me:25516: result: $cf_rpath_space" >&5
echo "${ECHO_T}$cf_rpath_space" >&6
		test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
		;;
	esac
fi

echo "$as_me:25523: checking if rpath-hack should be disabled" >&5
echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6

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

fi;
if test "x$enable_rpath_hack" = xno; then cf_disable_rpath_hack=yes; else cf_disable_rpath_hack=no; fi
echo "$as_me:25541: result: $cf_disable_rpath_hack" >&5
echo "${ECHO_T}$cf_disable_rpath_hack" >&6

if test "$enable_rpath_hack" = yes ; then

echo "$as_me:25546: checking for updated LDFLAGS" >&5
echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
if test -n "$LD_RPATH_OPT" ; then
	echo "$as_me:25549: result: maybe" >&5
echo "${ECHO_T}maybe" >&6

	for ac_prog in ldd
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:25556: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$cf_ldd_prog"; then
  ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # 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_cf_ldd_prog="$ac_prog"
echo "$as_me:25571: found $ac_dir/$ac_word" >&5
break
done

fi
fi
cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
if test -n "$cf_ldd_prog"; then
  echo "$as_me:25579: result: $cf_ldd_prog" >&5
echo "${ECHO_T}$cf_ldd_prog" >&6
else
  echo "$as_me:25582: result: no" >&5
echo "${ECHO_T}no" >&6
fi

  test -n "$cf_ldd_prog" && break
done
test -n "$cf_ldd_prog" || cf_ldd_prog="no"

	cf_rpath_list="/usr/lib /lib"
	if test "$cf_ldd_prog" != no
	then
		cf_rpath_oops=

cat >"conftest.$ac_ext" <<_ACEOF
#line 25596 "configure"
#include "confdefs.h"
#include <stdio.h>
int
main (void)
{
printf("Hello");
  ;
  return 0;
}
_ACEOF
rm -f "conftest.$ac_objext" "conftest$ac_exeext"
if { (eval echo "$as_me:25608: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:25611: \$? = $ac_status" >&5
  (exit "$ac_status"); } &&
         { ac_try='test -s "conftest$ac_exeext"'
  { (eval echo "$as_me:25614: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:25617: \$? = $ac_status" >&5
  (exit "$ac_status"); }; }; then
  cf_rpath_oops=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
		 cf_rpath_list=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} / | sed -e 's%^.*[ 	]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
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"

		# If we passed the link-test, but get a "not found" on a given library,
		# this could be due to inept reconfiguration of gcc to make it only
		# partly honor /usr/local/lib (or whatever).  Sometimes this behavior
		# is intentional, e.g., installing gcc in /usr/bin and suppressing the
		# /usr/local libraries.
		if test -n "$cf_rpath_oops"
		then
			for cf_rpath_src in $cf_rpath_oops
			do
				for cf_rpath_dir in \
					/usr/local \
					/usr/pkg \
					/opt/sfw
				do
					if test -f "$cf_rpath_dir/lib/$cf_rpath_src"
					then
						test -n "$verbose" && echo "	...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6

echo "${as_me:-configure}:25645: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5

						LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
						break
					fi
				done
			done
		fi
	fi

	test -n "$verbose" && echo "	...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6

echo "${as_me:-configure}:25657: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5

test -n "$verbose" && echo "	...checking LDFLAGS $LDFLAGS" 1>&6

echo "${as_me:-configure}:25661: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5

cf_rpath_dst=
for cf_rpath_src in $LDFLAGS
do
	case "$cf_rpath_src" in
	(-L*)

		# check if this refers to a directory which we will ignore
		cf_rpath_skip=no
		if test -n "$cf_rpath_list"
		then
			for cf_rpath_item in $cf_rpath_list
			do
				if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
				then
					cf_rpath_skip=yes
					break
				fi
			done
		fi

		if test "$cf_rpath_skip" = no
		then
			# transform the option
			if test "$LD_RPATH_OPT" = "-R " ; then
				cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
			else
				cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
			fi

			# if we have not already added this, add it now
			cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
			if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
			then
				test -n "$verbose" && echo "	...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6

echo "${as_me:-configure}:25698: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5

				EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
			fi
		fi
		;;
	esac
	cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
done
LDFLAGS=$cf_rpath_dst

test -n "$verbose" && echo "	...checked LDFLAGS $LDFLAGS" 1>&6

echo "${as_me:-configure}:25711: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5

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

echo "${as_me:-configure}:25715: testing ...checking LIBS $LIBS ..." 1>&5

cf_rpath_dst=
for cf_rpath_src in $LIBS
do
	case "$cf_rpath_src" in
	(-L*)

		# check if this refers to a directory which we will ignore
		cf_rpath_skip=no
		if test -n "$cf_rpath_list"
		then
			for cf_rpath_item in $cf_rpath_list
			do
				if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
				then
					cf_rpath_skip=yes
					break
				fi
			done
		fi

		if test "$cf_rpath_skip" = no
		then
			# transform the option
			if test "$LD_RPATH_OPT" = "-R " ; then
				cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
			else
				cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
			fi

			# if we have not already added this, add it now
			cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
			if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
			then
				test -n "$verbose" && echo "	...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6

echo "${as_me:-configure}:25752: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5

				EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
			fi
		fi
		;;
	esac
	cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
done
LIBS=$cf_rpath_dst

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

echo "${as_me:-configure}:25765: testing ...checked LIBS $LIBS ..." 1>&5

	test -n "$verbose" && echo "	...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6

echo "${as_me:-configure}:25769: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5

else
	echo "$as_me:25772: result: no" >&5
echo "${ECHO_T}no" >&6
fi

fi

# Force plink.sh to not trim pcre's libraries, which have the same symbol
# names as the system regexp.
if test "$with_pcre" != no
then
	LIBS=`echo "$LIBS" | sed -e 's/-lpcre/-kpcre/g'`
fi

###	output xtermcfg.h, etc
ac_config_files="$ac_config_files Makefile df-install minstall:minstall.in run-tic.sh:run-tic.in"

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

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.20250126,
  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:26045: 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:26064: 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.20250126, 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
for ac_config_target in $ac_config_targets
do
  case "$ac_config_target" in
  # Handling of arguments.
  "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
  "df-install" ) CONFIG_FILES="$CONFIG_FILES df-install" ;;
  "minstall" ) CONFIG_FILES="$CONFIG_FILES minstall:minstall.in" ;;
  "run-tic.sh" ) CONFIG_FILES="$CONFIG_FILES run-tic.sh:run-tic.in" ;;
  "xtermcfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS xtermcfg.h:xtermcfg.hin" ;;
  *) { { echo "$as_me:26104: 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
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,@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,@CC@,$CC,;t t
s,@CFLAGS@,$CFLAGS,;t t
s,@LDFLAGS@,$LDFLAGS,;t t
s,@CPPFLAGS@,$CPPFLAGS,;t t
s,@ac_ct_CC@,$ac_ct_CC,;t t
s,@EXEEXT@,$EXEEXT,;t t
s,@OBJEXT@,$OBJEXT,;t t
s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
s,@CPP@,$CPP,;t t
s,@GREP@,$GREP,;t t
s,@EGREP@,$EGREP,;t t
s,@AWK@,$AWK,;t t
s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
s,@INSTALL_DATA@,$INSTALL_DATA,;t t
s,@LN_S@,$LN_S,;t t
s,@LINT@,$LINT,;t t
s,@LINT_OPTS@,$LINT_OPTS,;t t
s,@LINT_LIBS@,$LINT_LIBS,;t t
s,@APP_CLASS@,$APP_CLASS,;t t
s,@target@,$target,;t t
s,@target_cpu@,$target_cpu,;t t
s,@target_vendor@,$target_vendor,;t t
s,@target_os@,$target_os,;t t
s,@GLOB_FULLPATH_POSIX@,$GLOB_FULLPATH_POSIX,;t t
s,@GLOB_FULLPATH_OTHER@,$GLOB_FULLPATH_OTHER,;t t
s,@APPSDIR@,$APPSDIR,;t t
s,@no_appsdir@,$no_appsdir,;t t
s,@ICON_NAME@,$ICON_NAME,;t t
s,@ICON_SYMLINK@,$ICON_SYMLINK,;t t
s,@PIXMAPDIR@,$PIXMAPDIR,;t t
s,@no_pixmapdir@,$no_pixmapdir,;t t
s,@ICONDIR@,$ICONDIR,;t t
s,@no_icondir@,$no_icondir,;t t
s,@ICON_FORMAT@,$ICON_FORMAT,;t t
s,@ICON_THEME@,$ICON_THEME,;t t
s,@ICON_LIST@,$ICON_LIST,;t t
s,@desktop_utils@,$desktop_utils,;t t
s,@DESKTOP_FLAGS@,$DESKTOP_FLAGS,;t t
s,@DESKTOP_CATEGORY@,$DESKTOP_CATEGORY,;t t
s,@XTERM_PATH@,$XTERM_PATH,;t t
s,@XTERM_SYMLINK@,$XTERM_SYMLINK,;t t
s,@SINSTALL_OPTS@,$SINSTALL_OPTS,;t t
s,@UTMP_NAME@,$UTMP_NAME,;t t
s,@UTMP_PATH@,$UTMP_PATH,;t t
s,@WTMP_NAME@,$WTMP_NAME,;t t
s,@WTMP_PATH@,$WTMP_PATH,;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,@PKG_CONFIG@,$PKG_CONFIG,;t t
s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
s,@ICON_SUFFIX@,$ICON_SUFFIX,;t t
s,@IMAKE@,$IMAKE,;t t
s,@IMAKE_CFLAGS@,$IMAKE_CFLAGS,;t t
s,@IMAKE_LOADFLAGS@,$IMAKE_LOADFLAGS,;t t
s,@GROFF_PATH@,$GROFF_PATH,;t t
s,@NROFF_PATH@,$NROFF_PATH,;t t
s,@TBL_PATH@,$TBL_PATH,;t t
s,@GROFF_NOTE@,$GROFF_NOTE,;t t
s,@NROFF_NOTE@,$NROFF_NOTE,;t t
s,@FGREP@,$FGREP,;t t
s,@cf_man2html@,$cf_man2html,;t t
s,@MAN2HTML_NOTE@,$MAN2HTML_NOTE,;t t
s,@MAN2HTML_PATH@,$MAN2HTML_PATH,;t t
s,@MAN2HTML_TEMP@,$MAN2HTML_TEMP,;t t
s,@default_termid@,$default_termid,;t t
s,@default_TERM@,$default_TERM,;t t
s,@backarrow_is_bs@,$backarrow_is_bs,;t t
s,@backarrow_is_erase@,$backarrow_is_erase,;t t
s,@delete_is_del@,$delete_is_del,;t t
s,@initial_erase@,$initial_erase,;t t
s,@alt_sends_esc@,$alt_sends_esc,;t t
s,@meta_sends_esc@,$meta_sends_esc,;t t
s,@cf_tic_prog@,$cf_tic_prog,;t t
s,@no_ticprog@,$no_ticprog,;t t
s,@TERMINFO_DIR@,$TERMINFO_DIR,;t t
s,@SET_TERMINFO@,$SET_TERMINFO,;t t
s,@double_buffer@,$double_buffer,;t t
s,@FREETYPE_CONFIG@,$FREETYPE_CONFIG,;t t
s,@FREETYPE_OLD_CONFIG@,$FREETYPE_OLD_CONFIG,;t t
s,@FREETYPE_XFT_CONFIG@,$FREETYPE_XFT_CONFIG,;t t
s,@HAVE_TYPE_FCCHAR32@,$HAVE_TYPE_FCCHAR32,;t t
s,@HAVE_TYPE_XFTCHARSPEC@,$HAVE_TYPE_XFTCHARSPEC,;t t
s,@LUIT@,$LUIT,;t t
s,@STRINGS_MAX@,$STRINGS_MAX,;t t
s,@ECHO_LT@,$ECHO_LT,;t t
s,@ECHO_LD@,$ECHO_LD,;t t
s,@RULE_CC@,$RULE_CC,;t t
s,@SHOW_CC@,$SHOW_CC,;t t
s,@ECHO_CC@,$ECHO_CC,;t t
s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
s,@HAVE_STDNORETURN_H@,$HAVE_STDNORETURN_H,;t t
s,@STDC_NORETURN@,$STDC_NORETURN,;t t
s,@CHARPROC_DEPS@,$CHARPROC_DEPS,;t t
s,@EXTRAHDRS@,$EXTRAHDRS,;t t
s,@EXTRASRCS@,$EXTRASRCS,;t t
s,@EXTRAOBJS@,$EXTRAOBJS,;t t
s,@MAY_SETUID@,$MAY_SETUID,;t t
s,@NOT_SETUID@,$NOT_SETUID,;t t
s,@CTAGS@,$CTAGS,;t t
s,@ETAGS@,$ETAGS,;t t
s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
s,@cf_ldd_prog@,$cf_ldd_prog,;t t
s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;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' && sed -e 's/\\\\*$//g' -e 's/$/\\/' -e 's/;t t\\/;t t/' -e 't' -e '3,'$ac_max_sed_lines's/$/\\/' "$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 | grep -v '^s,@.*;t t$' >"$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:26434: 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:26452: 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:26465: 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:26481: 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:26490: 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:26535: 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:26546: 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:26595: 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:26606: 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:26619: 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:26738: $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

{ (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

