#! /bin/sh

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

# Defaults:
ac_help=
ac_default_prefix=/usr/local
# Any additions from configure.in:
ac_help="$ac_help
  --with-vim-name=NAME    what to call the Vim executable"
ac_help="$ac_help
  --with-ex-name=NAME     what to call the Ex executable"
ac_help="$ac_help
  --with-view-name=NAME   what to call the View executable"
ac_help="$ac_help
  --with-global-runtime=DIR    global runtime directory in 'runtimepath'"
ac_help="$ac_help
  --with-modified-by=NAME       name of who modified a release version"
ac_help="$ac_help
  --with-features=TYPE    tiny, small, normal, big or huge (default: normal)"
ac_help="$ac_help
  --with-compiledby=NAME  name to show in :version message"
ac_help="$ac_help
  --enable-perlinterp     Include Perl interpreter."
ac_help="$ac_help
  --enable-pythoninterp   Include Python interpreter."
ac_help="$ac_help
  --with-python-config-dir=PATH  Python's config directory"
ac_help="$ac_help
  --enable-tclinterp      Include Tcl interpreter."
ac_help="$ac_help
  --with-tclsh=PATH       which tclsh to use (default: tclsh8.0)"
ac_help="$ac_help
  --enable-rubyinterp     Include Ruby interpreter."
ac_help="$ac_help
  --enable-cscope         Include cscope interface."
ac_help="$ac_help
  --enable-workshop       Include Sun Visual Workshop support."
ac_help="$ac_help
  --enable-netbeans       Include NetBeans integration support."
ac_help="$ac_help
  --enable-sniff          Include Sniff interface."
ac_help="$ac_help
  --enable-multibyte      Include multibyte editing support."
ac_help="$ac_help
  --enable-hangulinput    Include Hangul input support."
ac_help="$ac_help
  --enable-xim            Include XIM input support."
ac_help="$ac_help
  --enable-fontset        Include X fontset output support."
ac_help="$ac_help
  --with-x                use the X Window System"
ac_help="$ac_help
  --enable-gui[=OPTS]     X11 GUI [default=auto] [OPTS=auto/no/gtk/gnome/motif/athena/beos/photon]"
ac_help="$ac_help
  --enable-gtk-check      If auto-select GUI, check for GTK [default=yes]"
ac_help="$ac_help
  --enable-gnome-check    If GTK GUI, check for GNOME [default=no]"
ac_help="$ac_help
  --enable-motif-check    If auto-select GUI, check for Motif [default=yes]"
ac_help="$ac_help
  --enable-athena-check   If auto-select GUI, check for Athena [default=yes]"
ac_help="$ac_help
  --with-gtk-prefix=PFX   Prefix where GTK is installed (optional)"
ac_help="$ac_help
  --with-gtk-exec-prefix=PFX Exec prefix where GTK is installed (optional)"
ac_help="$ac_help
  --disable-gtktest       Do not try to compile and run a test GTK program"
ac_help="$ac_help
  --with-gnome-includes=DIR Specify location of GNOME headers"
ac_help="$ac_help
  --with-gnome-libs=DIR   Specify location of GNOME libs"
ac_help="$ac_help
  --with-gnome            Specify prefix for GNOME files"
ac_help="$ac_help
  --with-motif-lib=STRING   Library for Motif "
ac_help="$ac_help
  --with-tlib=library     terminal library to be used "
ac_help="$ac_help
  --disable-acl           Don't check for ACL support."
ac_help="$ac_help
  --disable-gpm           Don't use gpm (Linux mouse daemon)."
ac_help="$ac_help
  --disable-nls           Don't support NLS (gettext())."

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

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

ac_prev=
for ac_option
do

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

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

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

  case "$ac_option" in

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  esac
done

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

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

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

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

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

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

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

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

# Find the source files, if location was not specified.
if test -z "$srcdir"; then
  ac_srcdir_defaulted=yes
  # Try the directory containing this script, then its parent.
  ac_prog=$0
  ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
  srcdir=$ac_confdir
  if test ! -r $srcdir/$ac_unique_file; then
    srcdir=..
  fi
else
  ac_srcdir_defaulted=no
fi
if test ! -r $srcdir/$ac_unique_file; then
  if test "$ac_srcdir_defaulted" = yes; then
    { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
  else
    { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
  fi
fi
srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`

# Prefer explicitly selected file to automatically selected ones.
if test -z "$CONFIG_SITE"; then
  if test "x$prefix" != xNONE; then
    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
  else
    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
  fi
fi
for ac_site_file in $CONFIG_SITE; do
  if test -r "$ac_site_file"; then
    echo "loading site script $ac_site_file"
    . "$ac_site_file"
  fi
done

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

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

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




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

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


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

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

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

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

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

cat > conftest.$ac_ext << EOF

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

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

echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
if test $ac_cv_prog_cc_works = no; then
  { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
echo "configure:789: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross

echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
echo "configure:794: checking whether we are using GNU C" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.c <<EOF
#ifdef __GNUC__
  yes;
#endif
EOF
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:803: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
  ac_cv_prog_gcc=yes
else
  ac_cv_prog_gcc=no
fi
fi

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

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

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

fi

echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
if test "$ac_test_CFLAGS" = set; then
  CFLAGS="$ac_save_CFLAGS"
elif test $ac_cv_prog_cc_g = yes; then
  if test "$GCC" = yes; then
    CFLAGS="-g -O2"
  else
    CFLAGS="-g"
  fi
else
  if test "$GCC" = yes; then
    CFLAGS="-O2"
  else
    CFLAGS=
  fi
fi
	echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
echo "configure:853: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
  CPP=
fi
if test -z "$CPP"; then
if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
    # This must be in double quotes, not single quotes, because CPP may get
  # substituted into the Makefile and "${CC-cc}" will confuse make.
  CPP="${CC-cc} -E"
  # On the NeXT, cc -E runs the code through the compiler's parser,
  # not just through cpp.
  cat > conftest.$ac_ext <<EOF
#line 868 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:874: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  :
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  CPP="${CC-cc} -E -traditional-cpp"
  cat > conftest.$ac_ext <<EOF
#line 885 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:891: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  :
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  CPP="${CC-cc} -nologo -E"
  cat > conftest.$ac_ext <<EOF
#line 902 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:908: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  :
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  CPP=/lib/cpp
fi
rm -f conftest*
fi
rm -f conftest*
fi
rm -f conftest*
  ac_cv_prog_CPP="$CPP"
fi
  CPP="$ac_cv_prog_CPP"
else
  ac_cv_prog_CPP="$CPP"
fi
echo "$ac_t""$CPP" 1>&6
	echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
echo "configure:932: checking for POSIXized ISC" >&5
if test -d /etc/conf/kconfig.d &&
  grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
then
  echo "$ac_t""yes" 1>&6
  ISC=yes # If later tests want to check for ISC.
  cat >> confdefs.h <<\EOF
#define _POSIX_SOURCE 1
EOF

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

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


echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
echo "configure:1017: checking for Cygwin environment" >&5
if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 1022 "configure"
#include "confdefs.h"

int main() {

#ifndef __CYGWIN__
#define __CYGWIN__ __CYGWIN32__
#endif
return __CYGWIN__;
; return 0; }
EOF
if { (eval echo configure:1033: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_cygwin=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_cygwin=no
fi
rm -f conftest*
rm -f conftest*
fi

echo "$ac_t""$ac_cv_cygwin" 1>&6
CYGWIN=
test "$ac_cv_cygwin" = yes && CYGWIN=yes
echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
echo "configure:1050: checking for mingw32 environment" >&5
if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 1055 "configure"
#include "confdefs.h"

int main() {
return __MINGW32__;
; return 0; }
EOF
if { (eval echo configure:1062: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_mingw32=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_mingw32=no
fi
rm -f conftest*
rm -f conftest*
fi

echo "$ac_t""$ac_cv_mingw32" 1>&6
MINGW32=
test "$ac_cv_mingw32" = yes && MINGW32=yes


echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
echo "configure:1081: checking for executable suffix" >&5
if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
  ac_cv_exeext=.exe
else
  rm -f conftest*
  echo 'int main () { return 0; }' > conftest.$ac_ext
  ac_cv_exeext=
  if { (eval echo configure:1091: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
    for file in conftest.*; do
      case $file in
      *.c | *.o | *.obj) ;;
      *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
      esac
    done
  else
    { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
  fi
  rm -f conftest*
  test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
fi
fi

EXEEXT=""
test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
echo "$ac_t""${ac_cv_exeext}" 1>&6
ac_exeext=$EXEEXT


if test -z "$CFLAGS"; then
  CFLAGS="-O"
  test "$GCC" = yes && CFLAGS="-O2 -fno-strength-reduce -Wall"
fi
if test "$GCC" = yes; then
  gccversion=`"$CC" --version | sed -e '2,$d;s/^[^0-9]*\([0-9]\.[0-9.]*\).*$/\1/g'`
  if test "$gccversion" = "3.0.1" -o "$gccversion" = "3.0.2"; then
    echo 'GCC 3.0.x has a bug in the optimizer, disabling "-O#"'
    CFLAGS=`echo "$CFLAGS" | sed 's/-O[23456789]/-O/'`
  else
    if test "$gccversion" = "3.1" -o "$gccversion" = "3.2" -o "$gccversion" = "3.2.1" && `echo "$CFLAGS" | grep -v fno-strength-reduce >/dev/null`; then
      echo 'GCC 3.1 and 3.2 have a bug in the optimizer, adding "-fno-strength-reduce"'
      CFLAGS="$CFLAGS -fno-strength-reduce"
    fi
  fi
fi

if test "$cross_compiling" = yes; then
  { echo "configure: error: cannot compile a simple program, check CC and CFLAGS
  (cross compiling doesn't work)" 1>&2; exit 1; }
fi

test "$GCC" = yes && CPP_MM=M; 

if test -f ./toolcheck; then
  echo "checking for buggy tools" 1>&6
echo "configure:1133: checking for buggy tools" >&5
  sh ./toolcheck 1>&6
fi

OS_EXTRA_SRC=""; OS_EXTRA_OBJ=""

echo $ac_n "checking for BeOS""... $ac_c" 1>&6
echo "configure:1140: checking for BeOS" >&5
case `uname` in
    BeOS)	OS_EXTRA_SRC=os_beos.c; OS_EXTRA_OBJ=objects/os_beos.o
		BEOS=yes; echo "$ac_t""yes" 1>&6;;
    *)		BEOS=no; echo "$ac_t""no" 1>&6;;
esac

echo $ac_n "checking for QNX""... $ac_c" 1>&6
echo "configure:1148: checking for QNX" >&5
case `uname` in
    QNX)	OS_EXTRA_SRC=os_qnx.c; OS_EXTRA_OBJ=objects/os_qnx.o
		test -z "$with_x" && with_x=no
		QNX=yes; echo "$ac_t""yes" 1>&6;;
    *)		QNX=no; echo "$ac_t""no" 1>&6;;
esac




have_local_include=''
have_local_lib=''
if test "$GCC" = yes; then
  echo 'void f(){}' > conftest.c
    have_local_include=`${CC-cc} -no-cpp-precomp -c -v conftest.c 2>&1 | grep '/usr/local/include'`
  have_local_lib=`${CC-cc} -c -v conftest.c 2>&1 | grep '/usr/local/lib'`
  rm -f conftest.c conftest.o
fi
if test -z "$have_local_lib" -a -d /usr/local/lib; then
  tt=`echo "$LDFLAGS" | sed -e 's+-L/usr/local/lib ++g' -e 's+-L/usr/local/lib$++g'`
  if test "$tt" = "$LDFLAGS"; then
    LDFLAGS="$LDFLAGS -L/usr/local/lib"
  fi
fi
if test -z "$have_local_include" -a -d /usr/local/include; then
  tt=`echo "$CPPFLAGS" | sed -e 's+-I/usr/local/include ++g' -e 's+-I/usr/local/include$++g'`
  if test "$tt" = "$CPPFLAGS"; then
    CPPFLAGS="$CPPFLAGS -I/usr/local/include"
  fi
fi

echo $ac_n "checking --with-vim-name argument""... $ac_c" 1>&6
echo "configure:1173: checking --with-vim-name argument" >&5
# Check whether --with-vim-name or --without-vim-name was given.
if test "${with_vim_name+set}" = set; then
  withval="$with_vim_name"
  VIMNAME="$withval"; echo "$ac_t""$VIMNAME" 1>&6
else
  VIMNAME="vim"; echo "$ac_t""Defaulting to vim" 1>&6
fi


echo $ac_n "checking --with-ex-name argument""... $ac_c" 1>&6
echo "configure:1184: checking --with-ex-name argument" >&5
# Check whether --with-ex-name or --without-ex-name was given.
if test "${with_ex_name+set}" = set; then
  withval="$with_ex_name"
  EXNAME="$withval"; echo "$ac_t""$EXNAME" 1>&6
else
  EXNAME="ex"; echo "$ac_t""Defaulting to ex" 1>&6
fi


echo $ac_n "checking --with-view-name argument""... $ac_c" 1>&6
echo "configure:1195: checking --with-view-name argument" >&5
# Check whether --with-view-name or --without-view-name was given.
if test "${with_view_name+set}" = set; then
  withval="$with_view_name"
  VIEWNAME="$withval"; echo "$ac_t""$VIEWNAME" 1>&6
else
  VIEWNAME="view"; echo "$ac_t""Defaulting to view" 1>&6
fi



echo $ac_n "checking --with-global-runtime argument""... $ac_c" 1>&6
echo "configure:1207: checking --with-global-runtime argument" >&5
# Check whether --with-global-runtime or --without-global-runtime was given.
if test "${with_global_runtime+set}" = set; then
  withval="$with_global_runtime"
  echo "$ac_t""$withval" 1>&6; cat >> confdefs.h <<EOF
#define RUNTIME_GLOBAL "$withval"
EOF

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


echo $ac_n "checking --with-modified-by argument""... $ac_c" 1>&6
echo "configure:1221: checking --with-modified-by argument" >&5
# Check whether --with-modified-by or --without-modified-by was given.
if test "${with_modified_by+set}" = set; then
  withval="$with_modified_by"
  echo "$ac_t""$withval" 1>&6; cat >> confdefs.h <<EOF
#define MODIFIED_BY "$withval"
EOF

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


echo $ac_n "checking if character set is EBCDIC""... $ac_c" 1>&6
echo "configure:1235: checking if character set is EBCDIC" >&5
cat > conftest.$ac_ext <<EOF
#line 1237 "configure"
#include "confdefs.h"
 
int main() {
 /* TryCompile function for CharSet.
   Treat any failure as ASCII for compatibility with existing art.
   Use compile-time rather than run-time tests for cross-compiler
   tolerance.  */
#if '0'!=240
make an error "Character set is not EBCDIC"
#endif 
; return 0; }
EOF
if { (eval echo configure:1250: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
   # TryCompile action if true
cf_cv_ebcdic=yes 
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
   # TryCompile action if false
cf_cv_ebcdic=no
fi
rm -f conftest*
# end of TryCompile ])
# end of CacheVal CvEbcdic
echo "$ac_t""$cf_cv_ebcdic" 1>&6
case "$cf_cv_ebcdic" in  #(vi
    yes)	cat >> confdefs.h <<\EOF
#define EBCDIC 1
EOF

		line_break='"\\n"'
		;;
    *)		line_break='"\\012"';;
esac


if test "$cf_cv_ebcdic" = "yes"; then
echo $ac_n "checking for OS/390 Unix""... $ac_c" 1>&6
echo "configure:1278: checking for OS/390 Unix" >&5
case `uname` in
    OS/390)	OS390Unix="yes";
										if test "$CC" = "cc"; then
		  ccm="$_CC_CCMODE"
		  ccn="CC"
		else
		  if test "$CC" = "c89"; then
		    ccm="$_CC_C89MODE"
		    ccn="C89"
		  else
		    ccm=1
		  fi
		fi
		if test "$ccm" != "1"; then
		  echo ""
		  echo "------------------------------------------"
		  echo " On OS/390 Unix, the environment variable"
		  echo " __CC_${ccn}MODE must be set to \"1\"!"
		  echo " Do:"
		  echo "    export _CC_${ccn}MODE=1"
		  echo " and then call configure again."
		  echo "------------------------------------------"
		  exit 1
		fi
		CFLAGS="$CFLAGS -D_ALL_SOURCE"; LDFLAGS="$LDFLAGS -Wl,EDIT=NO"
		echo "$ac_t""yes" 1>&6
		;;
    *)		OS390Unix="no";
		echo "$ac_t""no" 1>&6
		;;
esac
fi



echo $ac_n "checking --with-features argument""... $ac_c" 1>&6
echo "configure:1315: checking --with-features argument" >&5
# Check whether --with-features or --without-features was given.
if test "${with_features+set}" = set; then
  withval="$with_features"
  features="$withval"; echo "$ac_t""$features" 1>&6
else
  features="normal"; echo "$ac_t""Defaulting to normal" 1>&6
fi


dovimdiff=""
dogvimdiff=""
case "$features" in
  tiny)		cat >> confdefs.h <<\EOF
#define FEAT_TINY 1
EOF
 ;;
  small)	cat >> confdefs.h <<\EOF
#define FEAT_SMALL 1
EOF
 ;;
  normal)	cat >> confdefs.h <<\EOF
#define FEAT_NORMAL 1
EOF
 dovimdiff="installvimdiff";
			dogvimdiff="installgvimdiff" ;;
  big)		cat >> confdefs.h <<\EOF
#define FEAT_BIG 1
EOF
 dovimdiff="installvimdiff";
			dogvimdiff="installgvimdiff" ;;
  huge)		cat >> confdefs.h <<\EOF
#define FEAT_HUGE 1
EOF
 dovimdiff="installvimdiff";
			dogvimdiff="installgvimdiff" ;;
  *)		echo "$ac_t""Sorry, $features is not supported" 1>&6 ;;
esac




echo $ac_n "checking --with-compiledby argument""... $ac_c" 1>&6
echo "configure:1358: checking --with-compiledby argument" >&5
# Check whether --with-compiledby or --without-compiledby was given.
if test "${with_compiledby+set}" = set; then
  withval="$with_compiledby"
  compiledby="$withval"; echo "$ac_t""$withval" 1>&6
else
  compiledby=""; echo "$ac_t""no" 1>&6
fi



echo $ac_n "checking --enable-perlinterp argument""... $ac_c" 1>&6
echo "configure:1370: checking --enable-perlinterp argument" >&5
# Check whether --enable-perlinterp or --disable-perlinterp was given.
if test "${enable_perlinterp+set}" = set; then
  enableval="$enable_perlinterp"
  :
else
  enable_perlinterp="no"
fi

echo "$ac_t""$enable_perlinterp" 1>&6
if test "$enable_perlinterp" = "yes"; then
  
  # Extract the first word of "perl", so it can be a program name with args.
set dummy perl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1385: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_vi_cv_path_perl'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$vi_cv_path_perl" in
  /*)
  ac_cv_path_vi_cv_path_perl="$vi_cv_path_perl" # Let the user override the test with a path.
  ;;
  ?:/*)			 
  ac_cv_path_vi_cv_path_perl="$vi_cv_path_perl" # Let the user override the test with a dos path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do 
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_path_vi_cv_path_perl="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  ;;
esac
fi
vi_cv_path_perl="$ac_cv_path_vi_cv_path_perl"
if test -n "$vi_cv_path_perl"; then
  echo "$ac_t""$vi_cv_path_perl" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

  if test "X$vi_cv_path_perl" != "X"; then
    echo $ac_n "checking Perl version""... $ac_c" 1>&6
echo "configure:1419: checking Perl version" >&5
    if $vi_cv_path_perl -e 'require 5.003_01' >/dev/null 2>/dev/null; then
      echo "$ac_t""OK" 1>&6
      eval `$vi_cv_path_perl -V:shrpenv`
      if test "X$shrpenv" = "XUNKNOWN"; then # pre 5.003_04
	shrpenv=""
      fi
      vi_cv_perllib=`$vi_cv_path_perl -MConfig -e 'print $Config{privlibexp}'`
      
      perlcppflags=`$vi_cv_path_perl -Mlib=$srcdir -MExtUtils::Embed \
	      -e 'ccflags;perl_inc'`
      if test "X$perlcppflags" != "X"; then
	PERL_CFLAGS="$perlcppflags"
      fi
            perllibs=`cd $srcdir; $vi_cv_path_perl -MExtUtils::Embed -e 'ldopts' | \
		sed -e '/Warning/d' -e '/Note (probably harmless)/d' \
			-e 's/-bE:perl.exp//' -e 's/-lc //'`
      
                  perlldflags=`cd $srcdir; $vi_cv_path_perl -MExtUtils::Embed \
		-e 'ccdlflags' | sed -e 's/-bE:perl.exp//'`
      if test "X$perlldflags" != "X"; then
	LDFLAGS="$perlldflags $LDFLAGS"
      fi
      PERL_SRC="auto/if_perl.c if_perlsfio.c"
      PERL_OBJ="objects/if_perl.o objects/if_perlsfio.o"
      PERL_PRO="if_perl.pro if_perlsfio.pro"
      cat >> confdefs.h <<\EOF
#define FEAT_PERL 1
EOF

    else
      echo "$ac_t""too old; need Perl version 5.003_01 or later" 1>&6
    fi
  fi
fi






echo $ac_n "checking --enable-pythoninterp argument""... $ac_c" 1>&6
echo "configure:1461: checking --enable-pythoninterp argument" >&5
# Check whether --enable-pythoninterp or --disable-pythoninterp was given.
if test "${enable_pythoninterp+set}" = set; then
  enableval="$enable_pythoninterp"
  :
else
  enable_pythoninterp="no"
fi

echo "$ac_t""$enable_pythoninterp" 1>&6
if test "$enable_pythoninterp" = "yes"; then
    # Extract the first word of "python", so it can be a program name with args.
set dummy python; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1475: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_vi_cv_path_python'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$vi_cv_path_python" in
  /*)
  ac_cv_path_vi_cv_path_python="$vi_cv_path_python" # Let the user override the test with a path.
  ;;
  ?:/*)			 
  ac_cv_path_vi_cv_path_python="$vi_cv_path_python" # Let the user override the test with a dos path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do 
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_path_vi_cv_path_python="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  ;;
esac
fi
vi_cv_path_python="$ac_cv_path_vi_cv_path_python"
if test -n "$vi_cv_path_python"; then
  echo "$ac_t""$vi_cv_path_python" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

  if test "X$vi_cv_path_python" != "X"; then

        echo $ac_n "checking Python version""... $ac_c" 1>&6
echo "configure:1510: checking Python version" >&5
if eval "test \"`echo '$''{'vi_cv_var_python_version'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  vi_cv_var_python_version=`
	    ${vi_cv_path_python} -c 'import sys; print sys.version[:3]'`
    
fi

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

        echo $ac_n "checking Python is 1.4 or better""... $ac_c" 1>&6
echo "configure:1522: checking Python is 1.4 or better" >&5
    if ${vi_cv_path_python} -c \
	"import sys; sys.exit(${vi_cv_var_python_version} < 1.4)"
    then
      echo "$ac_t""yep" 1>&6

            echo $ac_n "checking Python's install prefix""... $ac_c" 1>&6
echo "configure:1529: checking Python's install prefix" >&5
if eval "test \"`echo '$''{'vi_cv_path_python_pfx'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
   vi_cv_path_python_pfx=`
	    ${vi_cv_path_python} -c \
		"import sys; print sys.prefix"` 
fi

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

            echo $ac_n "checking Python's execution prefix""... $ac_c" 1>&6
echo "configure:1541: checking Python's execution prefix" >&5
if eval "test \"`echo '$''{'vi_cv_path_python_epfx'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
   vi_cv_path_python_epfx=`
	    ${vi_cv_path_python} -c \
		"import sys; print sys.exec_prefix"` 
fi

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

      
      if eval "test \"`echo '$''{'vi_cv_path_pythonpath'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
   vi_cv_path_pythonpath=`
	    unset PYTHONPATH;
	    ${vi_cv_path_python} -c \
		"import sys, string; print string.join(sys.path,':')"` 
fi


      
      # Check whether --with-python-config-dir or --without-python-config-dir was given.
if test "${with_python_config_dir+set}" = set; then
  withval="$with_python_config_dir"
   vi_cv_path_python_conf="${withval}"  
fi


      echo $ac_n "checking Python's configuration directory""... $ac_c" 1>&6
echo "configure:1572: checking Python's configuration directory" >&5
if eval "test \"`echo '$''{'vi_cv_path_python_conf'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
	vi_cv_path_python_conf=
	for path in "${vi_cv_path_python_pfx}" "${vi_cv_path_python_epfx}"; do
	  for subdir in lib share; do
	    d="${path}/${subdir}/python${vi_cv_var_python_version}/config"
	    if test -d "$d" && test -f "$d/config.c"; then
	      vi_cv_path_python_conf="$d"
	    fi
	  done
	done
      
fi

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

      PYTHON_CONFDIR="${vi_cv_path_python_conf}"

      if test "X$PYTHON_CONFDIR" = "X"; then
	echo "$ac_t""can't find it!" 1>&6
      else

			if eval "test \"`echo '$''{'vi_cv_path_python_plibs'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
	    tmp_mkf="/tmp/Makefile-conf$$"
	    cat ${PYTHON_CONFDIR}/Makefile - <<'eof' >${tmp_mkf}
__:
	@echo "python_MODLIBS='$(MODLIBS)'"
	@echo "python_LIBS='$(LIBS)'"
	@echo "python_SYSLIBS='$(SYSLIBS)'"
	@echo "python_LINKFORSHARED='$(LINKFORSHARED)'"
eof
	    	    eval "`cd ${PYTHON_CONFDIR} && make -f ${tmp_mkf} __ | sed '/ directory /d'`"
	    rm -f ${tmp_mkf}
	    if test "${vi_cv_var_python_version}" = "1.4"; then
		vi_cv_path_python_plibs="${PYTHON_CONFDIR}/libModules.a ${PYTHON_CONFDIR}/libPython.a ${PYTHON_CONFDIR}/libObjects.a ${PYTHON_CONFDIR}/libParser.a"
	    else
		vi_cv_path_python_plibs="-L${PYTHON_CONFDIR} -lpython${vi_cv_var_python_version}"
	    fi
	    vi_cv_path_python_plibs="${vi_cv_path_python_plibs} ${python_MODLIBS} ${python_LIBS} ${python_SYSLIBS} ${python_LINKFORSHARED}"
	    	    vi_cv_path_python_plibs=`echo $vi_cv_path_python_plibs | sed s/-ltermcap//`
	
fi


	PYTHON_LIBS="${vi_cv_path_python_plibs}"
	if test "${vi_cv_path_python_pfx}" = "${vi_cv_path_python_epfx}"; then
	  PYTHON_CFLAGS="-I${vi_cv_path_python_pfx}/include/python${vi_cv_var_python_version}"
	else
	  PYTHON_CFLAGS="-I${vi_cv_path_python_pfx}/include/python${vi_cv_var_python_version} -I${vi_cv_path_python_epfx}/include/python${vi_cv_var_python_version}"
	fi
	PYTHON_SRC="if_python.c"
	PYTHON_OBJ="objects/if_python.o objects/py_config.o"
	if test "${vi_cv_var_python_version}" = "1.4"; then
	   PYTHON_OBJ="$PYTHON_OBJ objects/py_getpath.o"
	fi
	PYTHON_GETPATH_CFLAGS="-DPYTHONPATH='\"${vi_cv_path_pythonpath}\"' -DPREFIX='\"${vi_cv_path_python_pfx}\"' -DEXEC_PREFIX='\"${vi_cv_path_python_epfx}\"'"

							echo $ac_n "checking if -pthread should be used""... $ac_c" 1>&6
echo "configure:1653: checking if -pthread should be used" >&5
	threadsafe_flag=
	thread_lib=
	test "$GCC" = yes && threadsafe_flag="-pthread"
	if test "`(uname) 2>/dev/null`" = FreeBSD; then
	  threadsafe_flag="-D_THREAD_SAFE"
	  thread_lib="-pthread"
	fi
	if test -n "$threadsafe_flag"; then
	  cflags_save=$CFLAGS
	  libs_save=$LIBS
	  CFLAGS="$CFLAGS $threadsafe_flag"
	  LIBS="$LIBS $thread_lib"
	  cat > conftest.$ac_ext <<EOF
#line 1667 "configure"
#include "confdefs.h"

int main() {
 
; return 0; }
EOF
if { (eval echo configure:1674: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  echo "$ac_t""yes" 1>&6; PYTHON_CFLAGS="$PYTHON_CFLAGS $threadsafe_flag"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  echo "$ac_t""no" 1>&6; LIBS=$libs_save
	     
fi
rm -f conftest*
	  CFLAGS=$cflags_save
	else
	  echo "$ac_t""no" 1>&6
	fi

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


      fi
    else
      echo "$ac_t""too old" 1>&6
    fi
  fi
fi







echo $ac_n "checking --enable-tclinterp argument""... $ac_c" 1>&6
echo "configure:1685: checking --enable-tclinterp argument" >&5
# Check whether --enable-tclinterp or --disable-tclinterp was given.
if test "${enable_tclinterp+set}" = set; then
  enableval="$enable_tclinterp"
  :
else
  enable_tclinterp="no"
fi

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

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

    echo $ac_n "checking --with-tclsh argument""... $ac_c" 1>&6
echo "configure:1699: checking --with-tclsh argument" >&5
  # Check whether --with-tclsh or --without-tclsh was given.
if test "${with_tclsh+set}" = set; then
  withval="$with_tclsh"
  tclsh_name="$withval"; echo "$ac_t""$tclsh_name" 1>&6
else
  tclsh_name="tclsh8.0"; echo "$ac_t""no" 1>&6
fi

  # Extract the first word of "$tclsh_name", so it can be a program name with args.
set dummy $tclsh_name; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1711: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_vi_cv_path_tcl'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$vi_cv_path_tcl" in
  /*)
  ac_cv_path_vi_cv_path_tcl="$vi_cv_path_tcl" # Let the user override the test with a path.
  ;;
  ?:/*)			 
  ac_cv_path_vi_cv_path_tcl="$vi_cv_path_tcl" # Let the user override the test with a dos path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do 
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_path_vi_cv_path_tcl="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  ;;
esac
fi
vi_cv_path_tcl="$ac_cv_path_vi_cv_path_tcl"
if test -n "$vi_cv_path_tcl"; then
  echo "$ac_t""$vi_cv_path_tcl" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

  

    if test "X$vi_cv_path_tcl" = "X" -a $tclsh_name = "tclsh8.0"; then
    tclsh_name="tclsh8.2"
    # Extract the first word of "$tclsh_name", so it can be a program name with args.
set dummy $tclsh_name; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1750: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_vi_cv_path_tcl'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$vi_cv_path_tcl" in
  /*)
  ac_cv_path_vi_cv_path_tcl="$vi_cv_path_tcl" # Let the user override the test with a path.
  ;;
  ?:/*)			 
  ac_cv_path_vi_cv_path_tcl="$vi_cv_path_tcl" # Let the user override the test with a dos path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do 
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_path_vi_cv_path_tcl="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  ;;
esac
fi
vi_cv_path_tcl="$ac_cv_path_vi_cv_path_tcl"
if test -n "$vi_cv_path_tcl"; then
  echo "$ac_t""$vi_cv_path_tcl" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

  fi
    if test "X$vi_cv_path_tcl" = "X"; then
    tclsh_name="tclsh"
    # Extract the first word of "$tclsh_name", so it can be a program name with args.
set dummy $tclsh_name; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1788: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_vi_cv_path_tcl'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$vi_cv_path_tcl" in
  /*)
  ac_cv_path_vi_cv_path_tcl="$vi_cv_path_tcl" # Let the user override the test with a path.
  ;;
  ?:/*)			 
  ac_cv_path_vi_cv_path_tcl="$vi_cv_path_tcl" # Let the user override the test with a dos path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do 
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_path_vi_cv_path_tcl="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  ;;
esac
fi
vi_cv_path_tcl="$ac_cv_path_vi_cv_path_tcl"
if test -n "$vi_cv_path_tcl"; then
  echo "$ac_t""$vi_cv_path_tcl" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

  fi
  if test "X$vi_cv_path_tcl" != "X"; then
    echo $ac_n "checking Tcl version""... $ac_c" 1>&6
echo "configure:1823: checking Tcl version" >&5
    if echo 'exit [expr [info tclversion] < 8.0]' | $vi_cv_path_tcl - ; then
      tclver=`echo 'puts [info tclversion]' | $vi_cv_path_tcl -`
      echo "$ac_t""$tclver - OK" 1>&6;
      tclloc=`echo 'set l [info library];set i [string last lib $l];incr i -2;puts [string range $l 0 $i]' | $vi_cv_path_tcl -`

      echo $ac_n "checking for location of Tcl include""... $ac_c" 1>&6
echo "configure:1830: checking for location of Tcl include" >&5
      tclinc="$tclloc/include $tclloc/include/tcl $tclloc/include/tcl$tclver /usr/local/include"
      for try in $tclinc; do
	if test -f "$try/tcl.h"; then
	  echo "$ac_t""$try/tcl.h" 1>&6
	  TCL_INC=$try
	  break
	fi
      done
      if test -z "$TCL_INC"; then
	echo "$ac_t""<not found>" 1>&6
	SKIP_TCL=YES
      fi
      if test -z "$SKIP_TCL"; then
	echo $ac_n "checking for location of tclConfig.sh script""... $ac_c" 1>&6
echo "configure:1845: checking for location of tclConfig.sh script" >&5
	tclcnf=`echo $tclinc | sed s/include/lib/g`
	for try in $tclcnf; do
	  if test -f $try/tclConfig.sh; then
	    echo "$ac_t""$try/tclConfig.sh" 1>&6
	    . $try/tclConfig.sh
	    TCL_LIBS="$TCL_LIB_SPEC $TCL_LIBS"
	    break
	  fi
	done
	if test -z "$TCL_LIBS"; then
	  echo "$ac_t""<not found>" 1>&6
	  echo $ac_n "checking for Tcl library by myself""... $ac_c" 1>&6
echo "configure:1858: checking for Tcl library by myself" >&5
	  tcllib=`echo $tclinc | sed s/include/lib/g`
	  for ext in .so .a ; do
	    for ver in "" $tclver ; do
	      for try in $tcllib ; do
		trylib=tcl$ver$ext
		if test -f $try/lib$trylib ; then
		  echo "$ac_t""$try/lib$trylib" 1>&6
		  TCL_LIBS="-L$try -ltcl$ver -ldl -lm"
		  if test "`(uname) 2>/dev/null`" = SunOS &&
					 uname -r | grep '^5' >/dev/null; then
		    TCL_LIBS="$TCL_LIBS -R $try"
		  fi
		  break 3
		fi
	      done
	    done
	  done
	  if test -z "$TCL_LIBS"; then
	    echo "$ac_t""<not found>" 1>&6
	    SKIP_TCL=YES
	  fi
	fi
	if test -z "$SKIP_TCL"; then
	  cat >> confdefs.h <<\EOF
#define FEAT_TCL 1
EOF

	  TCL_SRC=if_tcl.c
	  TCL_OBJ=objects/if_tcl.o
	  TCL_PRO=if_tcl.pro
	  TCL_CFLAGS="-I$TCL_INC"
	fi
      fi
    else
      echo "$ac_t""too old; need Tcl version 8.0 or later" 1>&6
    fi
  fi
fi






echo $ac_n "checking --enable-rubyinterp argument""... $ac_c" 1>&6
echo "configure:1904: checking --enable-rubyinterp argument" >&5
# Check whether --enable-rubyinterp or --disable-rubyinterp was given.
if test "${enable_rubyinterp+set}" = set; then
  enableval="$enable_rubyinterp"
  :
else
  enable_rubyinterp="no"
fi

echo "$ac_t""$enable_rubyinterp" 1>&6
if test "$enable_rubyinterp" = "yes"; then
  
  # Extract the first word of "ruby", so it can be a program name with args.
set dummy ruby; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1919: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_vi_cv_path_ruby'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$vi_cv_path_ruby" in
  /*)
  ac_cv_path_vi_cv_path_ruby="$vi_cv_path_ruby" # Let the user override the test with a path.
  ;;
  ?:/*)			 
  ac_cv_path_vi_cv_path_ruby="$vi_cv_path_ruby" # Let the user override the test with a dos path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do 
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_path_vi_cv_path_ruby="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  ;;
esac
fi
vi_cv_path_ruby="$ac_cv_path_vi_cv_path_ruby"
if test -n "$vi_cv_path_ruby"; then
  echo "$ac_t""$vi_cv_path_ruby" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

  if test "X$vi_cv_path_ruby" != "X"; then
    echo $ac_n "checking Ruby version""... $ac_c" 1>&6
echo "configure:1953: checking Ruby version" >&5
    if $vi_cv_path_ruby -e 'VERSION >= "1.6.0" or exit 1' >/dev/null 2>/dev/null; then
      echo "$ac_t""OK" 1>&6
      rubyhdrdir=`$vi_cv_path_ruby -r mkmf -e 'print Config::CONFIG["archdir"] || $hdrdir'`
      RUBY_CFLAGS="-I$rubyhdrdir"
      rubylibs=`$vi_cv_path_ruby -r rbconfig -e 'print Config::CONFIG["LIBS"]'`
      if test "X$rubylibs" != "X"; then
	RUBY_LIBS="$rubylibs"
      fi
      librubyarg=`$vi_cv_path_ruby -r rbconfig -e 'print Config.expand(Config::CONFIG["LIBRUBYARG"])'`
      if test "`$vi_cv_path_ruby -r rbconfig -e 'print Config::CONFIG[\"ENABLE_SHARED\"]'`" = "yes"; then
	librubyarg=`$vi_cv_path_ruby -r rbconfig -e "print '$librubyarg'.gsub(/-L\./, %'-L#{Config.expand(Config::CONFIG[\"libdir\"])}')"`
      else
	librubyarg="$rubyhdrdir/$librubyarg"
      fi

      if test "X$librubyarg" != "X"; then
	RUBY_LIBS="$librubyarg $RUBY_LIBS"
      fi
      rubyldflags=`$vi_cv_path_ruby -r rbconfig -e 'print Config::CONFIG["LDFLAGS"]'`
      if test "X$rubyldflags" != "X"; then
	LDFLAGS="$rubyldflags $LDFLAGS"
      fi
      RUBY_SRC="if_ruby.c"
      RUBY_OBJ="objects/if_ruby.o"
      RUBY_PRO="if_ruby.pro"
      cat >> confdefs.h <<\EOF
#define FEAT_RUBY 1
EOF

    else
      echo "$ac_t""too old; need Ruby version 1.6.0 or later" 1>&6
    fi
  fi
fi






echo $ac_n "checking --enable-cscope argument""... $ac_c" 1>&6
echo "configure:1995: checking --enable-cscope argument" >&5
# Check whether --enable-cscope or --disable-cscope was given.
if test "${enable_cscope+set}" = set; then
  enableval="$enable_cscope"
  :
else
  enable_cscope="no"
fi

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

fi

echo $ac_n "checking --enable-workshop argument""... $ac_c" 1>&6
echo "configure:2013: checking --enable-workshop argument" >&5
# Check whether --enable-workshop or --disable-workshop was given.
if test "${enable_workshop+set}" = set; then
  enableval="$enable_workshop"
  :
else
  enable_workshop="no"
fi

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

  WORKSHOP_SRC="workshop.c integration.c"
  
  WORKSHOP_OBJ="objects/workshop.o objects/integration.o"
  
  if test "${enable_gui-xxx}" = xxx; then
    enable_gui=motif
  fi
fi

echo $ac_n "checking --enable-netbeans argument""... $ac_c" 1>&6
echo "configure:2055: checking --enable-netbeans argument" >&5
# Check whether --enable-netbeans or --disable-netbeans was given.
if test "${enable_netbeans+set}" = set; then
  enableval="$enable_netbeans"
  :
else
  enable_netbeans="no"
fi

echo "$ac_t""$enable_netbeans" 1>&6
if test "$enable_netbeans" = "yes"; then
  echo $ac_n "checking whether compiling netbeans integration is possible""... $ac_c" 1>&6
echo "configure:2067: checking whether compiling netbeans integration is possible" >&5
  cat > conftest.$ac_ext <<EOF
#line 2069 "configure"
#include "confdefs.h"

#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <fcntl.h>
#include <netdb.h>
#include <netinet/in.h>
#include <errno.h>
#include <sys/types.h>
#include <sys/socket.h>
	/* Check use of vsnprintf() */
	void warn(char *fmt, ...);
	void warn(char *fmt, ...)
	{
	  va_list ap; char *buf = NULL;
	  va_start(ap, fmt);
	  vsnprintf(buf, 100, fmt, ap);
	  va_end(ap);
	}
	/* Check bitfields */
	struct nbbuf {
	unsigned int  initDone:1;
	ushort signmaplen;
	};
	    
int main() {

		/* Check creating a socket. */
		struct sockaddr_in server;
		(void)socket(AF_INET, SOCK_STREAM, 0);
		(void)htons(100);
		(void)gethostbyname("microsoft.com");
		if (errno == ECONNREFUSED)
		  (void)connect(1, (struct sockaddr *)&server, sizeof(server));
	    
; return 0; }
EOF
if { (eval echo configure:2108: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  echo "$ac_t""yes" 1>&6
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  echo "$ac_t""no" 1>&6; enable_netbeans="no"
fi
rm -f conftest*
fi
if test "$enable_netbeans" = "yes"; then
  cat >> confdefs.h <<\EOF
#define FEAT_NETBEANS_INTG 1
EOF

  NETBEANS_SRC="netbeans.c"
  
  NETBEANS_OBJ="objects/netbeans.o"
  
fi

echo $ac_n "checking --enable-sniff argument""... $ac_c" 1>&6
echo "configure:2131: checking --enable-sniff argument" >&5
# Check whether --enable-sniff or --disable-sniff was given.
if test "${enable_sniff+set}" = set; then
  enableval="$enable_sniff"
  :
else
  enable_sniff="no"
fi

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

  SNIFF_SRC="if_sniff.c"
  
  SNIFF_OBJ="objects/if_sniff.o"
  
fi

echo $ac_n "checking --enable-multibyte argument""... $ac_c" 1>&6
echo "configure:2060: checking --enable-multibyte argument" >&5
# Check whether --enable-multibyte or --disable-multibyte was given.
if test "${enable_multibyte+set}" = set; then
  enableval="$enable_multibyte"
  :
else
  enable_multibyte="no"
fi

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

fi

echo $ac_n "checking --enable-hangulinput argument""... $ac_c" 1>&6
echo "configure:2078: checking --enable-hangulinput argument" >&5
# Check whether --enable-hangulinput or --disable-hangulinput was given.
if test "${enable_hangulinput+set}" = set; then
  enableval="$enable_hangulinput"
  :
else
  enable_hangulinput="no"
fi

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

echo $ac_n "checking --enable-xim argument""... $ac_c" 1>&6
echo "configure:2090: checking --enable-xim argument" >&5
# Check whether --enable-xim or --disable-xim was given.
if test "${enable_xim+set}" = set; then
  enableval="$enable_xim"
  echo "$ac_t""$enable_xim" 1>&6
else
  enable_xim="auto"; echo "$ac_t""defaulting to auto" 1>&6
fi


echo $ac_n "checking --enable-fontset argument""... $ac_c" 1>&6
echo "configure:2101: checking --enable-fontset argument" >&5
# Check whether --enable-fontset or --disable-fontset was given.
if test "${enable_fontset+set}" = set; then
  enableval="$enable_fontset"
  :
else
  enable_fontset="no"
fi

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

test -z "$with_x" && with_x=yes
test "${enable_gui-yes}" != no -a "x$QNX" != "xyes" && with_x=yes
if test "$with_x" = no; then
  echo "$ac_t""defaulting to: don't HAVE_X11" 1>&6
else
  
  # Extract the first word of "xmkmf", so it can be a program name with args.
set dummy xmkmf; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2121: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_xmkmfpath'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$xmkmfpath" in
  /*)
  ac_cv_path_xmkmfpath="$xmkmfpath" # Let the user override the test with a path.
  ;;
  ?:/*)			 
  ac_cv_path_xmkmfpath="$xmkmfpath" # Let the user override the test with a dos path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do 
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_path_xmkmfpath="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  ;;
esac
fi
xmkmfpath="$ac_cv_path_xmkmfpath"
if test -n "$xmkmfpath"; then
  echo "$ac_t""$xmkmfpath" 1>&6
else
  echo "$ac_t""no" 1>&6
fi


  # If we find X, set shell vars x_includes and x_libraries to the
# paths, otherwise set no_x=yes.
# Uses ac_ vars as temps to allow command line to override cache and checks.
# --without-x overrides everything else, but does not touch the cache.
echo $ac_n "checking for X""... $ac_c" 1>&6
echo "configure:2159: checking for X" >&5

# 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 eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&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 conftestdir
if mkdir conftestdir; then
  cd conftestdir
  # 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; 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 conftestdir
fi

if test "$ac_x_includes" = NO; then
  # Guess where to find include files, by looking for this one X11 .h file.
  test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h

  # First, try using that file with no special directory specified.
cat > conftest.$ac_ext <<EOF
#line 2221 "configure"
#include "confdefs.h"
#include <$x_direct_test_include>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2226: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  # We can compile using X headers with no special include directory.
ac_x_includes=
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  # Look for the header file in a standard set of common directories.
# Check X11 before X11Rn because it is often a symlink to the current release.
  for ac_dir in               \
    /usr/X11/include          \
    /usr/X11R6/include        \
    /usr/X11R5/include        \
    /usr/X11R4/include        \
                              \
    /usr/include/X11          \
    /usr/include/X11R6        \
    /usr/include/X11R5        \
    /usr/include/X11R4        \
                              \
    /usr/local/X11/include    \
    /usr/local/X11R6/include  \
    /usr/local/X11R5/include  \
    /usr/local/X11R4/include  \
                              \
    /usr/local/include/X11    \
    /usr/local/include/X11R6  \
    /usr/local/include/X11R5  \
    /usr/local/include/X11R4  \
                              \
    /usr/X386/include         \
    /usr/x386/include         \
    /usr/XFree86/include/X11  \
                              \
    /usr/include              \
    /usr/local/include        \
    /usr/unsupported/include  \
    /usr/athena/include       \
    /usr/local/x11r5/include  \
    /usr/lpp/Xamples/include  \
                              \
    /usr/openwin/include      \
    /usr/openwin/share/include \
    ; \
  do
    if test -r "$ac_dir/$x_direct_test_include"; then
      ac_x_includes=$ac_dir
      break
    fi
  done
fi
rm -f conftest*
fi # $ac_x_includes = NO

if test "$ac_x_libraries" = NO; then
  # Check for the libraries.

  test -z "$x_direct_test_library" && x_direct_test_library=Xt
  test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc

  # See if we find them without any special options.
  # Don't add to $LIBS permanently.
  ac_save_LIBS="$LIBS"
  LIBS="-l$x_direct_test_library $LIBS"
cat > conftest.$ac_ext <<EOF
#line 2295 "configure"
#include "confdefs.h"

int main() {
${x_direct_test_function}()
; return 0; }
EOF
if { (eval echo configure:2302: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  LIBS="$ac_save_LIBS"
# We can link X programs with no special library path.
ac_x_libraries=
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  LIBS="$ac_save_LIBS"
# First see if replacing the include by lib works.
# Check X11 before X11Rn because it is often a symlink to the current release.
for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
    /usr/X11/lib          \
    /usr/X11R6/lib        \
    /usr/X11R5/lib        \
    /usr/X11R4/lib        \
                          \
    /usr/lib/X11          \
    /usr/lib/X11R6        \
    /usr/lib/X11R5        \
    /usr/lib/X11R4        \
                          \
    /usr/local/X11/lib    \
    /usr/local/X11R6/lib  \
    /usr/local/X11R5/lib  \
    /usr/local/X11R4/lib  \
                          \
    /usr/local/lib/X11    \
    /usr/local/lib/X11R6  \
    /usr/local/lib/X11R5  \
    /usr/local/lib/X11R4  \
                          \
    /usr/X386/lib         \
    /usr/x386/lib         \
    /usr/XFree86/lib/X11  \
                          \
    /usr/lib              \
    /usr/local/lib        \
    /usr/unsupported/lib  \
    /usr/athena/lib       \
    /usr/local/x11r5/lib  \
    /usr/lpp/Xamples/lib  \
    /lib/usr/lib/X11	  \
                          \
    /usr/openwin/lib      \
    /usr/openwin/share/lib \
    ; \
do
  for ac_extension in a so sl; do
    if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
      ac_x_libraries=$ac_dir
      break 2
    fi
  done
done
fi
rm -f conftest*
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 "$ac_t""$have_x" 1>&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 "$ac_t""libraries $x_libraries, headers $x_includes" 1>&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 $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
echo "configure:2408: checking whether -R must be followed by a space" >&5
      ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
      cat > conftest.$ac_ext <<EOF
#line 2411 "configure"
#include "confdefs.h"

int main() {

; return 0; }
EOF
if { (eval echo configure:2418: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  ac_R_nospace=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_R_nospace=no
fi
rm -f conftest*
      if test $ac_R_nospace = yes; then
	echo "$ac_t""no" 1>&6
	X_LIBS="$X_LIBS -R$x_libraries"
      else
	LIBS="$ac_xsave_LIBS -R $x_libraries"
	cat > conftest.$ac_ext <<EOF
#line 2434 "configure"
#include "confdefs.h"

int main() {

; return 0; }
EOF
if { (eval echo configure:2441: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  ac_R_space=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_R_space=no
fi
rm -f conftest*
	if test $ac_R_space = yes; then
	  echo "$ac_t""yes" 1>&6
	  X_LIBS="$X_LIBS -R $x_libraries"
	else
	  echo "$ac_t""neither works" 1>&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@cl.cam.ac.uk says this is needed for Ultrix, if the X
    # libraries were built with DECnet support.  And karl@cs.umb.edu says
    # the Alpha needs dnet_stub (dnet does not exist).
    echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
echo "configure:2473: checking for dnet_ntoa in -ldnet" >&5
ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-ldnet  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 2481 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char dnet_ntoa();

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

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

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

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

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

    fi

    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
    # to get the SysV transport functions.
    # chad@anasazi.com 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 dickey@clark.net.
    echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
echo "configure:2562: checking for gethostbyname" >&5
if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 2567 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char gethostbyname(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char gethostbyname();

int main() {

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

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

if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  :
else
  echo "$ac_t""no" 1>&6
fi

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

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

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
else
  echo "$ac_t""no" 1>&6
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@lia.di.epfl.ch: 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 $ac_n "checking for connect""... $ac_c" 1>&6
echo "configure:2660: checking for connect" >&5
if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 2665 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char connect(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char connect();

int main() {

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

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

if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  :
else
  echo "$ac_t""no" 1>&6
fi

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

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

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

    fi

    # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
    echo $ac_n "checking for remove""... $ac_c" 1>&6
echo "configure:2752: checking for remove" >&5
if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 2757 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char remove(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char remove();

int main() {

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

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

if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  :
else
  echo "$ac_t""no" 1>&6
fi

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

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

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

    fi

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

int main() {

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

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

if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  :
else
  echo "$ac_t""no" 1>&6
fi

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

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

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
else
  echo "$ac_t""no" 1>&6
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.
  #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
  echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
echo "configure:2945: checking for IceConnectionNumber in -lICE" >&5
ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lICE $X_EXTRA_LIBS $LIBS"
cat > conftest.$ac_ext <<EOF
#line 2953 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char IceConnectionNumber();

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

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

  LDFLAGS="$ac_save_LDFLAGS"

fi


        if test "$OS390Unix" = "yes"; then
    CFLAGS="$CFLAGS -W c,dll"
    LDFLAGS="$LDFLAGS -W l,dll"
    X_EXTRA_LIBS="$X_EXTRA_LIBS -lSM -lICE -lXmu"
  fi

    
  if test -d "$x_includes" && test ! -d "$x_libraries"; then
    x_libraries=`echo "$x_includes" | sed s/include/lib/`
    echo "$ac_t""Corrected X libraries to $x_libraries" 1>&6
    X_LIBS="$X_LIBS -L$x_libraries"
    if test "`(uname) 2>/dev/null`" = SunOS &&
					 uname -r | grep '^5' >/dev/null; then
      X_LIBS="$X_LIBS -R $x_libraries"
    fi
  fi

  if test -d "$x_libraries" && test ! -d "$x_includes"; then
    x_includes=`echo "$x_libraries" | sed s/lib/include/`
    echo "$ac_t""Corrected X includes to $x_includes" 1>&6
    X_CFLAGS="$X_CFLAGS -I$x_includes"
  fi

    X_CFLAGS="`echo $X_CFLAGS\  | sed 's%-I/usr/include %%'`"
    X_LIBS="`echo $X_LIBS\  | sed 's% -L/usr/lib%%'`"


      echo $ac_n "checking if X11 header files can be found""... $ac_c" 1>&6
echo "configure:3017: checking if X11 header files can be found" >&5
  cflags_save=$CFLAGS
  CFLAGS="$CFLAGS $X_CFLAGS"
  cat > conftest.$ac_ext <<EOF
#line 3021 "configure"
#include "confdefs.h"
#include <X11/Xlib.h>
int main() {

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

  if test "${no_x-no}" = yes; then
    with_x=no
  else
    cat >> confdefs.h <<\EOF
#define HAVE_X11 1
EOF

    X_LIB="-lXt -lX11";
    

    ac_save_LDFLAGS="$LDFLAGS"
    LDFLAGS="-L$x_libraries $LDFLAGS"

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

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

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


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

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

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


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

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

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


        echo $ac_n "checking if X11 header files implicitly declare return values""... $ac_c" 1>&6
echo "configure:3178: checking if X11 header files implicitly declare return values" >&5
    cflags_save=$CFLAGS
    CFLAGS="$CFLAGS $X_CFLAGS -Werror"
    cat > conftest.$ac_ext <<EOF
#line 3182 "configure"
#include "confdefs.h"
#include <X11/Xlib.h>
int main() {

; return 0; }
EOF
if { (eval echo configure:3189: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  echo "$ac_t""no" 1>&6
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  CFLAGS="$CFLAGS -Wno-implicit-int"
	cat > conftest.$ac_ext <<EOF
#line 3198 "configure"
#include "confdefs.h"
#include <X11/Xlib.h>
int main() {

; return 0; }
EOF
if { (eval echo configure:3205: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  echo "$ac_t""yes" 1>&6; cflags_save="$cflags_save -Wno-implicit-int"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  echo "$ac_t""test failed" 1>&6
	
fi
rm -f conftest*
    
fi
rm -f conftest*
    CFLAGS=$cflags_save

    LDFLAGS="$ac_save_LDFLAGS"

  fi
fi

test "x$with_x" = xno -a "x$BEOS" != "xyes" -a "x$QNX" != "xyes" && enable_gui=no

echo $ac_n "checking --enable-gui argument""... $ac_c" 1>&6
echo "configure:3229: checking --enable-gui argument" >&5
# Check whether --enable-gui or --disable-gui was given.
if test "${enable_gui+set}" = set; then
  enableval="$enable_gui"
  :
else
  enable_gui="auto"
fi


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

  SKIP_GTK=YES
  SKIP_GNOME=YES
  SKIP_MOTIF=YES
  SKIP_ATHENA=YES
  SKIP_PHOTON=YES
  SKIP_BEOS=
  GUITYPE=NONE

  case "$enable_gui" in
    no|No|NO)		echo "$ac_t""no GUI support" 1>&6
			SKIP_BEOS=YES ;;
    yes|Yes|YES|"")	echo "$ac_t""yes - automatic GUI support" 1>&6 ;;
    auto|Auto|AUTO|"")	echo "$ac_t""auto - automatic GUI support" 1>&6 ;;
    beos|BeOS|BEOS)	echo "$ac_t""BeOS GUI support" 1>&6 ;;
    *)			echo "$ac_t""Sorry, $enable_gui GUI is not supported" 1>&6 ;;
  esac

elif test "x$QNX" = "xyes" -a "x$with_x" = "xno" ; then
  SKIP_GTK=YES
  SKIP_GNOME=YES
  SKIP_MOTIF=YES
  SKIP_ATHENA=YES
  SKIP_BEOS=YES
  SKIP_PHOTON=
  GUITYPE=NONE

  case "$enable_gui" in
    no|No|NO)		echo "$ac_t""no GUI support" 1>&6
			SKIP_PHOTON=YES ;;
    yes|Yes|YES|"")	echo "$ac_t""yes - automatic GUI support" 1>&6 ;;
    auto|Auto|AUTO|"")	echo "$ac_t""auto - automatic GUI support" 1>&6 ;;
    photon|Photon|PHOTON)	echo "$ac_t""Photon GUI support" 1>&6 ;;
    *)			echo "$ac_t""Sorry, $enable_gui GUI is not supported" 1>&6 ;;
  esac

else

  SKIP_GTK=
  SKIP_GNOME=
  SKIP_MOTIF=
  SKIP_ATHENA=
  SKIP_BEOS=YES
  SKIP_PHOTON=YES
  GUITYPE=NONE

  case "$enable_gui" in
    no|No|NO)		echo "$ac_t""no GUI support" 1>&6
			SKIP_GTK=YES; SKIP_GNOME=YES; SKIP_MOTIF=YES; SKIP_ATHENA=YES ;;
    yes|Yes|YES|"")	echo "$ac_t""yes - automatic GUI support" 1>&6 ;;
    auto|Auto|AUTO|"")	echo "$ac_t""auto - automatic GUI support" 1>&6 ;;
    gtk|Gtk|GTK)		echo "$ac_t""GTK GUI support" 1>&6
			SKIP_GNOME=YES; SKIP_MOTIF=YES; SKIP_ATHENA=YES ;;
    gnome|Gnome|GNOME)		echo "$ac_t""Gnome GUI support" 1>&6
			SKIP_MOTIF=YES; SKIP_ATHENA=YES ;;
    motif|Motif|MOTIF)	echo "$ac_t""Motif GUI support" 1>&6
			SKIP_GTK=YES; SKIP_GNOME=YES; SKIP_ATHENA=YES ;;
    athena|Athena|ATHENA)	echo "$ac_t""Athena GUI support" 1>&6
			SKIP_GTK=YES; SKIP_GNOME=YES; SKIP_MOTIF=YES ;;
    *)			echo "$ac_t""Sorry, $enable_gui GUI is not supported" 1>&6 ;;
  esac

fi

if test "x$SKIP_GTK" != "xYES" -a "$enable_gui" != "gtk"; then
  echo $ac_n "checking whether or not to look for GTK""... $ac_c" 1>&6
echo "configure:3306: checking whether or not to look for GTK" >&5
  # Check whether --enable-gtk-check or --disable-gtk-check was given.
if test "${enable_gtk_check+set}" = set; then
  enableval="$enable_gtk_check"
  :
else
  enable_gtk_check="yes"
fi

  echo "$ac_t""$enable_gtk_check" 1>&6;
  if test "x$enable_gtk_check" = "xno"; then
    SKIP_GTK=YES
    SKIP_GNOME=YES
  fi
fi

if test "x$SKIP_GNOME" != "xYES" -a "$enable_gui" != "gnome"; then
  echo $ac_n "checking whether or not to look for GNOME""... $ac_c" 1>&6
echo "configure:3324: checking whether or not to look for GNOME" >&5
  # Check whether --enable-gnome-check or --disable-gnome-check was given.
if test "${enable_gnome_check+set}" = set; then
  enableval="$enable_gnome_check"
  :
else
  enable_gnome_check="no"
fi

  echo "$ac_t""$enable_gnome_check" 1>&6;
  if test "x$enable_gnome_check" = "xno"; then
    SKIP_GNOME=YES
  fi
fi

if test "x$SKIP_MOTIF" != "xYES" -a "$enable_gui" != "motif"; then
  echo $ac_n "checking whether or not to look for Motif""... $ac_c" 1>&6
echo "configure:3341: checking whether or not to look for Motif" >&5
  # Check whether --enable-motif-check or --disable-motif-check was given.
if test "${enable_motif_check+set}" = set; then
  enableval="$enable_motif_check"
  :
else
  enable_motif_check="yes"
fi

  echo "$ac_t""$enable_motif_check" 1>&6;
  if test "x$enable_motif_check" = "xno"; then
    SKIP_MOTIF=YES
  fi
fi

if test "x$SKIP_ATHENA" != "xYES" -a "$enable_gui" != "athena"; then
  echo $ac_n "checking whether or not to look for Athena""... $ac_c" 1>&6
echo "configure:3358: checking whether or not to look for Athena" >&5
  # Check whether --enable-athena-check or --disable-athena-check was given.
if test "${enable_athena_check+set}" = set; then
  enableval="$enable_athena_check"
  :
else
  enable_athena_check="yes"
fi

  echo "$ac_t""$enable_athena_check" 1>&6;
  if test "x$enable_athena_check" = "xno"; then
    SKIP_ATHENA=YES
  fi
fi










if test -z "$SKIP_GTK"; then

  echo $ac_n "checking --with-gtk-prefix argument""... $ac_c" 1>&6
echo "configure:3385: checking --with-gtk-prefix argument" >&5
  # Check whether --with-gtk-prefix or --without-gtk-prefix was given.
if test "${with_gtk_prefix+set}" = set; then
  withval="$with_gtk_prefix"
  gtk_config_prefix="$withval"; echo "$ac_t""$gtk_config_prefix" 1>&6
else
  gtk_config_prefix=""; echo "$ac_t""no" 1>&6
fi


  echo $ac_n "checking --with-gtk-exec-prefix argument""... $ac_c" 1>&6
echo "configure:3396: checking --with-gtk-exec-prefix argument" >&5
  # Check whether --with-gtk-exec-prefix or --without-gtk-exec-prefix was given.
if test "${with_gtk_exec_prefix+set}" = set; then
  withval="$with_gtk_exec_prefix"
  gtk_config_exec_prefix="$withval"; echo "$ac_t""$gtk_config_prefix" 1>&6
else
  gtk_config_exec_prefix=""; echo "$ac_t""no" 1>&6
fi


  echo $ac_n "checking --disable-gtktest argument""... $ac_c" 1>&6
echo "configure:3407: checking --disable-gtktest argument" >&5
  # Check whether --enable-gtktest or --disable-gtktest was given.
if test "${enable_gtktest+set}" = set; then
  enableval="$enable_gtktest"
  :
else
  enable_gtktest=yes
fi

  if test "x$enable_gtktest" = "xyes" ; then
    echo "$ac_t""gtk test enabled" 1>&6
  else
    echo "$ac_t""gtk test disabled" 1>&6
  fi

  if test "x$gtk_config_prefix" != "x" ; then
    gtk_config_args="$gtk_config_args --prefix=$gtk_config_prefix"
    GTK_CONFIG=$gtk_config_prefix/bin/gtk-config
  fi
  if test "x$gtk_config_exec_prefix" != "x" ; then
    gtk_config_args="$gtk_config_args --exec-prefix=$gtk_config_exec_prefix"
    GTK_CONFIG=$gtk_config_exec_prefix/bin/gtk-config
  fi
  if test "X$GTK_CONFIG" = "X"; then
    # Extract the first word of "gtk-config", so it can be a program name with args.
set dummy gtk-config; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:3434: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_GTK_CONFIG'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$GTK_CONFIG" in
  /*)
  ac_cv_path_GTK_CONFIG="$GTK_CONFIG" # Let the user override the test with a path.
  ;;
  ?:/*)			 
  ac_cv_path_GTK_CONFIG="$GTK_CONFIG" # Let the user override the test with a dos path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do 
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_path_GTK_CONFIG="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  test -z "$ac_cv_path_GTK_CONFIG" && ac_cv_path_GTK_CONFIG="no"
  ;;
esac
fi
GTK_CONFIG="$ac_cv_path_GTK_CONFIG"
if test -n "$GTK_CONFIG"; then
  echo "$ac_t""$GTK_CONFIG" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

    if test "X$GTK_CONFIG" = "Xno"; then
            # Extract the first word of "gtk12-config", so it can be a program name with args.
set dummy gtk12-config; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:3471: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_GTK12_CONFIG'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$GTK12_CONFIG" in
  /*)
  ac_cv_path_GTK12_CONFIG="$GTK12_CONFIG" # Let the user override the test with a path.
  ;;
  ?:/*)			 
  ac_cv_path_GTK12_CONFIG="$GTK12_CONFIG" # Let the user override the test with a dos path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do 
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_path_GTK12_CONFIG="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  test -z "$ac_cv_path_GTK12_CONFIG" && ac_cv_path_GTK12_CONFIG="no"
  ;;
esac
fi
GTK12_CONFIG="$ac_cv_path_GTK12_CONFIG"
if test -n "$GTK12_CONFIG"; then
  echo "$ac_t""$GTK12_CONFIG" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

      GTK_CONFIG="$GTK12_CONFIG"
    fi
  else
    echo "$ac_t""Using GTK configuration program $GTK_CONFIG" 1>&6
  fi

      if test "X$GTK_CONFIG" != "X"; then
    
  if test "X$GTK_CONFIG" != "X"; then

    min_gtk_version=1.1.16
    echo $ac_n "checking for GTK - version >= $min_gtk_version""... $ac_c" 1>&6
echo "configure:3516: checking for GTK - version >= $min_gtk_version" >&5
    no_gtk=""
    if test "$GTK_CONFIG" = "no" ; then
      no_gtk=yes
    else
      GTK_CFLAGS=`$GTK_CONFIG $gtk_config_args --cflags`
      GTK_LIBS=`$GTK_CONFIG $gtk_config_args --libs`
      gtk_config_major_version=`$GTK_CONFIG $gtk_config_args --version | \
	     sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'`
      gtk_config_minor_version=`$GTK_CONFIG $gtk_config_args --version | \
	     sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'`
      gtk_config_micro_version=`$GTK_CONFIG $gtk_config_args --version | \
	     sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'`
      if test "x$enable_gtktest" = "xyes" ; then
	ac_save_CFLAGS="$CFLAGS"
	ac_save_LIBS="$LIBS"
	CFLAGS="$CFLAGS $GTK_CFLAGS"
	LIBS="$LIBS $GTK_LIBS"

					rm -f conf.gtktest
	if test "$cross_compiling" = yes; then
  echo $ac_n "cross compiling; assumed OK... $ac_c"
else
  cat > conftest.$ac_ext <<EOF
#line 3540 "configure"
#include "confdefs.h"

#include <gtk/gtk.h>
#include <stdio.h>

int
main ()
{
  int major, minor, micro;
  char *tmp_version;

  system ("touch conf.gtktest");

  /* HP/UX 9 (%@#!) writes to sscanf strings */
  tmp_version = g_strdup("$min_gtk_version");
  if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
     printf("%s, bad version string\n", "$min_gtk_version");
     exit(1);
   }

  if ((gtk_major_version > major) ||
      ((gtk_major_version == major) && (gtk_minor_version > minor)) ||
      ((gtk_major_version == major) && (gtk_minor_version == minor) &&
				       (gtk_micro_version >= micro)))
  {
      return 0;
  }
  return 1;
}

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

	CFLAGS="$ac_save_CFLAGS"
	LIBS="$ac_save_LIBS"
      fi
    fi
    if test "x$no_gtk" = x ; then
      echo "$ac_t""yes" 1>&6
      GTK_LIBNAME="$GTK_LIBS"
		GUI_INC_LOC="$GTK_CFLAGS"
    else
      echo "$ac_t""no" 1>&6
      if test "$GTK_CONFIG" = "no" ; then
	:
      else
	if test -f conf.gtktest ; then
	  :
	fi
      fi

      GTK_CFLAGS=""
      GTK_LIBS=""
      :
    fi
  else
    GTK_CFLAGS=""
    GTK_LIBS=""
    :
  fi
  
  
  rm -f conf.gtktest

    if test "x$GTK_CFLAGS" != "x"; then
      SKIP_ATHENA=YES
      SKIP_MOTIF=YES
      GUITYPE=GTK
      
    fi
  fi
    if test "x$GUITYPE" = "xGTK"; then
    if test $gtk_config_major_version = 1 -a $gtk_config_minor_version -lt 2 -o $gtk_config_major_version = 1 -a $gtk_config_minor_version = 2 -a $gtk_config_micro_version -lt 3; then
      echo "$ac_t""this GTK version is old; version 1.2.3 or later is recommended" 1>&6
    else
                        if test -z "$SKIP_GNOME"; then
	
  
  
  

  # Check whether --with-gnome-includes or --without-gnome-includes was given.
if test "${with_gnome_includes+set}" = set; then
  withval="$with_gnome_includes"
  CFLAGS="$CFLAGS -I$withval"
  
fi


  # Check whether --with-gnome-libs or --without-gnome-libs was given.
if test "${with_gnome_libs+set}" = set; then
  withval="$with_gnome_libs"
  LDFLAGS="$LDFLAGS -L$withval" gnome_prefix=$withval
  
fi


  # Check whether --with-gnome or --without-gnome was given.
if test "${with_gnome+set}" = set; then
  withval="$with_gnome"
  if test x$withval = xyes; then
      want_gnome=yes
      have_gnome=yes
    else
      if test "x$withval" = xno; then
	want_gnome=no
      else
	want_gnome=yes
	LDFLAGS="$LDFLAGS -L$withval/lib"
	CFLAGS="$CFLAGS -I$withval/include"
	gnome_prefix=$withval/lib
      fi
    fi
else
  want_gnome=yes
fi


  if test "x$want_gnome" = xyes; then
    # Extract the first word of "gnome-config", so it can be a program name with args.
set dummy gnome-config; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:3673: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_GNOME_CONFIG'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$GNOME_CONFIG" in
  /*)
  ac_cv_path_GNOME_CONFIG="$GNOME_CONFIG" # Let the user override the test with a path.
  ;;
  ?:/*)			 
  ac_cv_path_GNOME_CONFIG="$GNOME_CONFIG" # Let the user override the test with a dos path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do 
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_path_GNOME_CONFIG="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  test -z "$ac_cv_path_GNOME_CONFIG" && ac_cv_path_GNOME_CONFIG="no"
  ;;
esac
fi
GNOME_CONFIG="$ac_cv_path_GNOME_CONFIG"
if test -n "$GNOME_CONFIG"; then
  echo "$ac_t""$GNOME_CONFIG" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

    if test "$GNOME_CONFIG" = "no"; then
      no_gnome_config="yes"
    else
      echo $ac_n "checking if $GNOME_CONFIG works""... $ac_c" 1>&6
echo "configure:3710: checking if $GNOME_CONFIG works" >&5
      if $GNOME_CONFIG --libs-only-l gnome >/dev/null 2>&1; then
	echo "$ac_t""yes" 1>&6
	GNOME_LIBS="`$GNOME_CONFIG --libs-only-l gnome gnomeui`"
	GNOME_LIBDIR="`$GNOME_CONFIG --libs-only-L gnorba gnomeui`"
	GNOME_INCLUDEDIR="`$GNOME_CONFIG --cflags gnorba gnomeui`"
	have_gnome=yes
      else
	echo "$ac_t""no" 1>&6
	no_gnome_config="yes"
      fi
    fi

    if test x$exec_prefix = xNONE; then
      if test x$prefix = xNONE; then
	gnome_prefix=$ac_default_prefix/lib
      else
	gnome_prefix=$prefix/lib
      fi
    else
      gnome_prefix=`eval echo \`echo $libdir\``
    fi

    if test "$no_gnome_config" = "yes"; then
      echo $ac_n "checking for gnomeConf.sh file in $gnome_prefix""... $ac_c" 1>&6
echo "configure:3735: checking for gnomeConf.sh file in $gnome_prefix" >&5
      if test -f $gnome_prefix/gnomeConf.sh; then
	echo "$ac_t""found" 1>&6
	echo "loading gnome configuration from" \
	  "$gnome_prefix/gnomeConf.sh"
	. $gnome_prefix/gnomeConf.sh
	have_gnome=yes
      else
	echo "$ac_t""not found" 1>&6
	if test x = xfail; then
	  { echo "configure: error: Could not find the gnomeConf.sh file that is generated by gnome-libs install" 1>&2; exit 1; }
	fi
      fi
    fi
  fi

	if test x$have_gnome = xyes ; then
	  cat >> confdefs.h <<\EOF
#define FEAT_GUI_GNOME 1
EOF

	  GUI_INC_LOC="$GUI_INC_LOC $GNOME_INCLUDEDIR"
	  GTK_LIBNAME="$GTK_LIBNAME $GNOME_LIBDIR $GNOME_LIBS"
	fi
      fi
    fi
  fi
fi


if test -z "$SKIP_MOTIF"; then
  gui_XXX="/usr/XXX/Motif* /usr/Motif*/XXX /usr/XXX /usr/shlib /usr/X11*/XXX /usr/XXX/X11* /usr/dt/XXX /local/Motif*/XXX /local/XXX/Motif* /usr/local/Motif*/XXX /usr/local/XXX/Motif* /usr/local/XXX /usr/local/X11*/XXX /usr/local/LessTif/Motif*/XXX $MOTIFHOME/XXX"
    GUI_INC_LOC="`echo $GUI_INC_LOC|sed 's%-I%%g'`"

  echo $ac_n "checking for location of Motif GUI includes""... $ac_c" 1>&6
echo "configure:3770: checking for location of Motif GUI includes" >&5
  gui_includes="`echo $x_includes|sed 's%/^/^/*$%%'` `echo "$gui_XXX" | sed s/XXX/include/g` $GUI_INC_LOC"
  GUI_INC_LOC=
  for try in $gui_includes; do
    if test -f "$try/Xm/Xm.h"; then
      GUI_INC_LOC=$try
    fi
  done
  if test -n "$GUI_INC_LOC"; then
    if test "$GUI_INC_LOC" = /usr/include; then
      GUI_INC_LOC=
      echo "$ac_t""in default path" 1>&6
    else
      echo "$ac_t""$GUI_INC_LOC" 1>&6
    fi
  else
    echo "$ac_t""<not found>" 1>&6
    SKIP_MOTIF=YES
  fi
fi


if test -z "$SKIP_MOTIF"; then
  echo $ac_n "checking --with-motif-lib argument""... $ac_c" 1>&6
echo "configure:3794: checking --with-motif-lib argument" >&5
  # Check whether --with-motif-lib or --without-motif-lib was given.
if test "${with_motif_lib+set}" = set; then
  withval="$with_motif_lib"
   MOTIF_LIBNAME="${withval}"  
fi


  if test -n "$MOTIF_LIBNAME"; then
    echo "$ac_t""$MOTIF_LIBNAME" 1>&6
    GUI_LIB_LOC=
  else
    echo "$ac_t""no" 1>&6

        GUI_LIB_LOC="`echo $GUI_LIB_LOC|sed 's%-L%%g'`"

    echo $ac_n "checking for location of Motif GUI libs""... $ac_c" 1>&6
echo "configure:3811: checking for location of Motif GUI libs" >&5
    gui_libs="`echo $x_libraries|sed 's%/^/^/*$%%'` `echo "$gui_XXX" | sed s/XXX/lib/g` `echo "$GUI_INC_LOC" | sed s/include/lib/` $GUI_LIB_LOC"
    GUI_LIB_LOC=
    for try in $gui_libs; do
      for libtry in "$try"/libXm.a "$try"/libXm.so* "$try"/libXm.sl; do
	if test -f "$libtry"; then
	  GUI_LIB_LOC=$try
	fi
      done
    done
    if test -n "$GUI_LIB_LOC"; then
            if test "$GUI_LIB_LOC" = /usr/lib; then
	GUI_LIB_LOC=
	echo "$ac_t""in default path" 1>&6
      else
	if test -n "$GUI_LIB_LOC"; then
	  echo "$ac_t""$GUI_LIB_LOC" 1>&6
	  if test "`(uname) 2>/dev/null`" = SunOS &&
					 uname -r | grep '^5' >/dev/null; then
	    GUI_LIB_LOC="$GUI_LIB_LOC -R $GUI_LIB_LOC"
	  fi
	fi
      fi
      MOTIF_LIBNAME=-lXm
    else
      echo "$ac_t""<not found>" 1>&6
      SKIP_MOTIF=YES
    fi
  fi
fi

if test -z "$SKIP_MOTIF"; then
  SKIP_ATHENA=YES
  GUITYPE=MOTIF
  
fi


GUI_X_LIBS=

if test -z "$SKIP_ATHENA"; then
  echo $ac_n "checking if Athena header files can be found""... $ac_c" 1>&6
echo "configure:3853: checking if Athena header files can be found" >&5
  cflags_save=$CFLAGS
  CFLAGS="$CFLAGS $X_CFLAGS"
  cat > conftest.$ac_ext <<EOF
#line 3857 "configure"
#include "confdefs.h"

#include <X11/Intrinsic.h>
#include <X11/Xaw/Paned.h>
int main() {

; return 0; }
EOF
if { (eval echo configure:3866: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  echo "$ac_t""yes" 1>&6
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  echo "$ac_t""no" 1>&6; SKIP_ATHENA=YES 
fi
rm -f conftest*
  CFLAGS=$cflags_save
fi

if test -z "$SKIP_ATHENA"; then
  GUITYPE=ATHENA
fi

if test -z "$SKIP_ATHENA" -o -z "$SKIP_MOTIF"; then
      if test -n "$GUI_INC_LOC"; then
    GUI_INC_LOC=-I"`echo $GUI_INC_LOC|sed 's%-I%%'`"
  fi
  if test -n "$GUI_LIB_LOC"; then
    GUI_LIB_LOC=-L"`echo $GUI_LIB_LOC|sed 's%-L%%'`"
  fi

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

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

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

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

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

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

  if test -z "$SKIP_MOTIF"; then
    echo $ac_n "checking for XpEndJob in -lXp""... $ac_c" 1>&6
echo "configure:3975: checking for XpEndJob in -lXp" >&5
ac_lib_var=`echo Xp'_'XpEndJob | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lXp $GUI_X_LIBS -lXm -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS"
cat > conftest.$ac_ext <<EOF
#line 3983 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char XpEndJob();

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

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

  fi
  LDFLAGS=$ldflags_save

    echo $ac_n "checking for extra X11 defines""... $ac_c" 1>&6
echo "configure:4018: checking for extra X11 defines" >&5
  NARROW_PROTO=
  rm -fr conftestdir
  if mkdir conftestdir; then
    cd conftestdir
    cat > Imakefile <<'EOF'
acfindx:
	@echo 'NARROW_PROTO="${PROTO_DEFINES}"'
EOF
    if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
      eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
    fi
    cd ..
    rm -fr conftestdir
  fi
  if test -z "$NARROW_PROTO"; then
    echo "$ac_t""no" 1>&6
  else
    echo "$ac_t""$NARROW_PROTO" 1>&6
  fi
  
fi

if test -z "$SKIP_ATHENA" -o -z "$SKIP_MOTIF" -o -z "$SKIP_GTK"; then
    cppflags_save=$CPPFLAGS
  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
  for ac_hdr in X11/xpm.h X11/Sunkeysym.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:4048: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 4053 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:4058: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
 
else
  echo "$ac_t""no" 1>&6
fi
done


    if test ! "$enable_xim" = "no"; then
    echo $ac_n "checking for XIMText in X11/Xlib.h""... $ac_c" 1>&6
echo "configure:4087: checking for XIMText in X11/Xlib.h" >&5
    cat > conftest.$ac_ext <<EOF
#line 4089 "configure"
#include "confdefs.h"
#include <X11/Xlib.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "XIMText" >/dev/null 2>&1; then
  rm -rf conftest*
  echo "$ac_t""yes" 1>&6
else
  rm -rf conftest*
  echo "$ac_t""no; xim has been disabled" 1>&6; enable_xim = "no"
fi
rm -f conftest*

  fi
  CPPFLAGS=$cppflags_save

    if test "$enable_xim" = "auto" -a ! "$enable_hangulinput" = "yes" \
		-a ! "x$GUITYPE" = "xNONE" ; then
    echo "$ac_t""X GUI selected; xim has been enabled" 1>&6
    enable_xim="yes"
  fi
fi

if test -z "$SKIP_ATHENA" -o -z "$SKIP_MOTIF"; then
  cppflags_save=$CPPFLAGS
  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
  for ac_hdr in X11/Xmu/Editres.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:4120: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 4125 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:4130: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
 
else
  echo "$ac_t""no" 1>&6
fi
done

  CPPFLAGS=$cppflags_save
fi

if test -z "$SKIP_MOTIF"; then
  cppflags_save=$CPPFLAGS
  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
  for ac_hdr in Xm/Xm.h Xm/XpmP.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:4166: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 4171 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:4176: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
 
else
  echo "$ac_t""no" 1>&6
fi
done

  CPPFLAGS=$cppflags_save
fi

if test "x$GUITYPE" = "xNONE" -a "$enable_xim" = "yes"; then
  echo "$ac_t""no GUI selected; xim has been disabled" 1>&6
  enable_xim="no"
fi
if test "x$GUITYPE" = "xNONE" -a "$enable_fontset" = "yes"; then
  echo "$ac_t""no GUI selected; fontset has been disabled" 1>&6
  enable_fontset="no"
fi

if test -z "$SKIP_BEOS"; then
  GUITYPE=BEOSGUI
fi

if test -z "$SKIP_PHOTON"; then
  GUITYPE=PHOTONGUI
fi






if test "$enable_workshop" = "yes" -a -n "$SKIP_MOTIF"; then
  { echo "configure: error: cannot use workshop without Motif" 1>&2; exit 1; }
fi

if test "$enable_xim" = "yes"; then
  cat >> confdefs.h <<\EOF
#define FEAT_XIM 1
EOF

fi
if test "$enable_fontset" = "yes"; then
  cat >> confdefs.h <<\EOF
#define FEAT_XFONTSET 1
EOF

fi

if test "$enable_hangulinput" = "yes"; then
  if test "x$GUITYPE" = "xNONE"; then
    echo "$ac_t""no GUI selected; hangul input has been disabled" 1>&6
    enable_hangulinput=no
  else
    cat >> confdefs.h <<\EOF
#define FEAT_HANGULIN 1
EOF

    HANGULIN_SRC=hangulin.c
    
    HANGULIN_OBJ=objects/hangulin.o
    
  fi
fi


echo $ac_n "checking quality of toupper""... $ac_c" 1>&6
echo "configure:4262: checking quality of toupper" >&5
if test "$cross_compiling" = yes; then
  { echo "configure: error: failed to compile test program" 1>&2; exit 1; }
else
  cat > conftest.$ac_ext <<EOF
#line 4267 "configure"
#include "confdefs.h"
#include <ctype.h>
main() { exit(toupper('A') == 'A' && tolower('z') == 'z'); }
EOF
if { (eval echo configure:4272: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  cat >> confdefs.h <<\EOF
#define BROKEN_TOUPPER 1
EOF
 echo "$ac_t""bad" 1>&6
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  echo "$ac_t""good" 1>&6
fi
rm -fr conftest*
fi


echo $ac_n "checking whether __DATE__ and __TIME__ work""... $ac_c" 1>&6
echo "configure:4289: checking whether __DATE__ and __TIME__ work" >&5
cat > conftest.$ac_ext <<EOF
#line 4291 "configure"
#include "confdefs.h"

int main() {
printf("(" __DATE__ " " __TIME__ ")");
; return 0; }
EOF
if { (eval echo configure:4298: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
#define HAVE_DATE_TIME 1
EOF

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

ac_safe=`echo "elf.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for elf.h""... $ac_c" 1>&6
echo "configure:4314: checking for elf.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 4319 "configure"
#include "confdefs.h"
#include <elf.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:4324: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  HAS_ELF=1
else
  echo "$ac_t""no" 1>&6
fi

if test "$HAS_ELF" = 1; then
  echo $ac_n "checking for main in -lelf""... $ac_c" 1>&6
echo "configure:4347: checking for main in -lelf" >&5
ac_lib_var=`echo elf'_'main | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lelf  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 4355 "configure"
#include "confdefs.h"

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

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

  LIBS="-lelf $LIBS"

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

fi

ac_header_dirent=no
for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
echo "configure:4396: checking for $ac_hdr that defines DIR" >&5
if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 4401 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <$ac_hdr>
int main() {
DIR *dirp = 0;
; return 0; }
EOF
if { (eval echo configure:4409: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  eval "ac_cv_header_dirent_$ac_safe=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_dirent_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
 ac_header_dirent=$ac_hdr; break
else
  echo "$ac_t""no" 1>&6
fi
done
# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
if test $ac_header_dirent = dirent.h; then
echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
echo "configure:4434: checking for opendir in -ldir" >&5
ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-ldir  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 4442 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char opendir();

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

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

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

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

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

fi


echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
echo "configure:4518: checking for ANSI C header files" >&5
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 4523 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:4531: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  ac_cv_header_stdc=yes
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_header_stdc=no
fi
rm -f conftest*

if test $ac_cv_header_stdc = yes; then
  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
#line 4548 "configure"
#include "confdefs.h"
#include <string.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "memchr" >/dev/null 2>&1; then
  :
else
  rm -rf conftest*
  ac_cv_header_stdc=no
fi
rm -f conftest*

fi

if test $ac_cv_header_stdc = yes; then
  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
#line 4566 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "free" >/dev/null 2>&1; then
  :
else
  rm -rf conftest*
  ac_cv_header_stdc=no
fi
rm -f conftest*

fi

if test $ac_cv_header_stdc = yes; then
  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
if test "$cross_compiling" = yes; then
  :
else
  cat > conftest.$ac_ext <<EOF
#line 4587 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
int main () { int i; for (i = 0; i < 256; i++)
if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
exit (0); }

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

fi
fi

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

fi

echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
echo "configure:4622: checking for sys/wait.h that is POSIX.1 compatible" >&5
if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 4627 "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() {
int s;
wait (&s);
s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
; return 0; }
EOF
if { (eval echo configure:4643: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_header_sys_wait_h=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_header_sys_wait_h=no
fi
rm -f conftest*
fi

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

fi


if test $ac_cv_header_sys_wait_h = no; then
  echo $ac_n "checking for sys/wait.h that defines union wait""... $ac_c" 1>&6
echo "configure:4666: checking for sys/wait.h that defines union wait" >&5
  cat > conftest.$ac_ext <<EOF
#line 4668 "configure"
#include "confdefs.h"
#include <sys/wait.h>
int main() {
union wait xx, yy; xx = yy
; return 0; }
EOF
if { (eval echo configure:4675: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  echo "$ac_t""yes" 1>&6
			cat >> confdefs.h <<\EOF
#define HAVE_SYS_WAIT_H 1
EOF

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

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

for ac_hdr in stdarg.h stdlib.h string.h sys/select.h sys/utsname.h \
	termcap.h fcntl.h sgtty.h sys/ioctl.h sys/time.h termio.h \
	iconv.h langinfo.h unistd.h stropts.h errno.h strings.h \
	sys/resource.h sys/systeminfo.h locale.h \
	sys/stream.h sys/ptem.h termios.h libc.h sys/statfs.h \
	poll.h sys/poll.h pwd.h utime.h sys/param.h libintl.h \
	libgen.h util/debug.h util/msg18n.h frame.h \
	sys/acl.h sys/access.h sys/sysctl.h sys/sysinfo.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:4706: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 4711 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:4716: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
 
else
  echo "$ac_t""no" 1>&6
fi
done


echo $ac_n "checking if strings.h can be included after string.h""... $ac_c" 1>&6
echo "configure:4744: checking if strings.h can be included after string.h" >&5
cppflags_save=$CPPFLAGS
CPPFLAGS="$CPPFLAGS $X_CFLAGS"
cat > conftest.$ac_ext <<EOF
#line 4748 "configure"
#include "confdefs.h"

#if defined(_AIX) && !defined(_NO_PROTO)
# define _NO_PROTO	/* like in os_unix.h, causes conflict for AIX (Winn) */
#endif
#ifdef HAVE_XM_XM_H
# include <Xm/Xm.h>	/* This breaks it for HP-UX 11 (Squassabia) */
#endif
#ifdef HAVE_STRING_H
# include <string.h>
#endif
#if defined(HAVE_STRINGS_H)
# include <strings.h>
#endif
		
int main() {
int i; i = 0;
; return 0; }
EOF
if { (eval echo configure:4768: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  echo "$ac_t""yes" 1>&6
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  cat >> confdefs.h <<\EOF
#define NO_STRINGS_WITH_STRING_H 1
EOF

		echo "$ac_t""no" 1>&6
fi
rm -f conftest*
CPPFLAGS=$cppflags_save

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


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

  fi
fi

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

echo $ac_n "checking for working const""... $ac_c" 1>&6
echo "configure:4832: checking for working const" >&5
if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 4837 "configure"
#include "confdefs.h"

int main() {

/* Ultrix mips cc rejects this.  */
typedef int charset[2]; const charset x;
/* SunOS 4.1.1 cc rejects this.  */
char const *const *ccp;
char **p;
/* NEC SVR4.0.2 mips cc rejects this.  */
struct point {int x, y;};
static struct point const zero = {0,0};
/* AIX XL C 1.02.0.0 rejects this.
   It does not let you subtract one const X* pointer from another in an arm
   of an if-expression whose if-part is not a constant expression */
const char *g = "string";
ccp = &g + (g ? g-g : 0);
/* HPUX 7.0 cc rejects these. */
++ccp;
p = (char**) ccp;
ccp = (char const *const *) p;
{ /* SCO 3.2v4 cc rejects this.  */
  char *t;
  char const *s = 0 ? (char *) 0 : (char const *) 0;

  *t++ = 0;
}
{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
  int x[] = {25, 17};
  const int *foo = &x[0];
  ++foo;
}
{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
  typedef const int *iptr;
  iptr p = 0;
  ++p;
}
{ /* AIX XL C 1.02.0.0 rejects this saying
     "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
  struct s { int j; const int *ap[3]; };
  struct s *b; b->j = 5;
}
{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
  const int foo = 10;
}

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

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

fi

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

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

fi

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

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

fi

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

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

fi

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

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

fi

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

fi

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

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

fi

echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
echo "configure:5073: checking whether time.h and sys/time.h may both be included" >&5
if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 5078 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/time.h>
#include <time.h>
int main() {
struct tm *tp;
; return 0; }
EOF
if { (eval echo configure:5087: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_header_time=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_header_time=no
fi
rm -f conftest*
fi

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

fi

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

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

fi

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

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

fi


echo $ac_n "checking for rlim_t""... $ac_c" 1>&6
echo "configure:5175: checking for rlim_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_rlim_t'+set}'`\" = set"; then
  echo "$ac_t""(cached) $ac_cv_type_rlim_t" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 5180 "configure"
#include "confdefs.h"

#include <sys/types.h>
#if STDC_HEADERS
#include <stdlib.h>
#include <stddef.h>
#endif
#ifdef HAVE_SYS_RESOURCE_H
#include <sys/resource.h>
#endif
	  
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "(^|[^a-zA-Z_0-9])rlim_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
  rm -rf conftest*
  ac_cv_type_rlim_t=yes
else
  rm -rf conftest*
  ac_cv_type_rlim_t=no
fi
rm -f conftest*

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

echo $ac_n "checking for stack_t""... $ac_c" 1>&6
echo "configure:5212: checking for stack_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_stack_t'+set}'`\" = set"; then
  echo "$ac_t""(cached) $ac_cv_type_stack_t" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 5217 "configure"
#include "confdefs.h"

#include <sys/types.h>
#if STDC_HEADERS
#include <stdlib.h>
#include <stddef.h>
#endif
#include <signal.h>
	  
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "stack_t" >/dev/null 2>&1; then
  rm -rf conftest*
  ac_cv_type_stack_t=yes
else
  rm -rf conftest*
  ac_cv_type_stack_t=no
fi
rm -f conftest*

	  echo "$ac_t""$ac_cv_type_stack_t" 1>&6
fi
if test $ac_cv_type_stack_t = no; then
  cat >> confdefs.h <<\EOF
#define stack_t struct sigaltstack
EOF
fi

echo $ac_n "checking whether stack_t has an ss_base field""... $ac_c" 1>&6
echo "configure:5255: checking whether stack_t has an ss_base field" >&5
cat > conftest.$ac_ext <<EOF
#line 5257 "configure"
#include "confdefs.h"

#include <sys/types.h>
#if STDC_HEADERS
#include <stdlib.h>
#include <stddef.h>
#endif
#include <signal.h>
#include "confdefs.h"
			
int main() {
stack_t sigstk; sigstk.ss_base = 0; 
; return 0; }
EOF
if { (eval echo configure:5272: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
#define HAVE_SS_BASE 1
EOF

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

olibs="$LIBS"
echo $ac_n "checking --with-tlib argument""... $ac_c" 1>&6
echo "configure:5288: checking --with-tlib argument" >&5
# Check whether --with-tlib or --without-tlib was given.
if test "${with_tlib+set}" = set; then
  withval="$with_tlib"
  :
fi

if test -n "$with_tlib"; then
  echo "$ac_t""$with_tlib" 1>&6
  LIBS="$LIBS -l$with_tlib"
else
  echo "$ac_t""automatic terminal library selection" 1>&6
            case "`uname -s 2>/dev/null`" in
	OSF1)	tlibs="ncurses curses termlib termcap";;
	*)	tlibs="ncurses termlib termcap curses";;
  esac
  for libname in $tlibs; do
    echo $ac_n "checking for tgetent in -l${libname}""... $ac_c" 1>&6
echo "configure:5266: checking for tgetent in -l${libname}" >&5
ac_lib_var=`echo ${libname}'_'tgetent | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-l${libname}  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 5274 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char tgetent();

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

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

  LIBS="-l${libname} $LIBS"

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

    if test "x$olibs" != "x$LIBS"; then
                        if test "$cross_compiling" = yes; then
  res="FAIL"
else
  cat > conftest.$ac_ext <<EOF
#line 5317 "configure"
#include "confdefs.h"

#ifdef HAVE_TERMCAP_H
# include <termcap.h>
#endif
main() {char *s; s=(char *)tgoto("%p1%d", 0, 1); exit(0); }
EOF
if { (eval echo configure:5325: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  res="OK"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  res="FAIL"
fi
rm -fr conftest*
fi

      if test "$res" = "OK"; then
	break
      fi
      echo "$ac_t""$libname library is not usable" 1>&6
      LIBS="$olibs"
    fi
  done
fi
if test "x$olibs" != "x$LIBS"; then
  echo $ac_n "checking whether we talk terminfo""... $ac_c" 1>&6
echo "configure:5347: checking whether we talk terminfo" >&5
  if test "$cross_compiling" = yes; then
  { echo "configure: error: failed to compile test program." 1>&2; exit 1; }
else
  cat > conftest.$ac_ext <<EOF
#line 5352 "configure"
#include "confdefs.h"

#ifdef HAVE_TERMCAP_H
# include <termcap.h>
#endif
main()
{char *s; s=(char *)tgoto("%p1%d", 0, 1); exit(!strcmp(s==0 ? "" : s, "1")); }
EOF
if { (eval echo configure:5361: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  echo "$ac_t""no -- we are in termcap land" 1>&6
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  echo "$ac_t""yes -- terminfo spoken here" 1>&6; cat >> confdefs.h <<\EOF
#define TERMINFO 1
EOF

fi
rm -fr conftest*
fi

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

if test "x$olibs" != "x$LIBS"; then
  echo $ac_n "checking what tgetent() returns for an unknown terminal""... $ac_c" 1>&6
echo "configure:5507: checking what tgetent() returns for an unknown terminal" >&5
  if test "$cross_compiling" = yes; then
  { echo "configure: error: failed to compile test program." 1>&2; exit 1; }
else
  cat > conftest.$ac_ext <<EOF
#line 5512 "configure"
#include "confdefs.h"

#ifdef HAVE_TERMCAP_H
# include <termcap.h>
#endif
main()
{char s[10000]; int res = tgetent(s, "thisterminaldoesnotexist"); exit(res != 0); }
EOF
if { (eval echo configure:5521: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  echo "$ac_t""zero" 1>&6; cat >> confdefs.h <<\EOF
#define TGETENT_ZERO_ERR 0
EOF

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

fi

echo $ac_n "checking whether termcap.h contains ospeed""... $ac_c" 1>&6
echo "configure:5539: checking whether termcap.h contains ospeed" >&5
cat > conftest.$ac_ext <<EOF
#line 5541 "configure"
#include "confdefs.h"

#ifdef HAVE_TERMCAP_H
# include <termcap.h>
#endif
			
int main() {
ospeed = 20000
; return 0; }
EOF
if { (eval echo configure:5394: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
#define HAVE_OSPEED 1
EOF

else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  echo "$ac_t""no" 1>&6
	echo $ac_n "checking whether ospeed can be extern""... $ac_c" 1>&6
echo "configure:5406: checking whether ospeed can be extern" >&5
	cat > conftest.$ac_ext <<EOF
#line 5408 "configure"
#include "confdefs.h"

#ifdef HAVE_TERMCAP_H
# include <termcap.h>
#endif
extern short ospeed;
			
int main() {
ospeed = 20000
; return 0; }
EOF
if { (eval echo configure:5420: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
#define OSPEED_EXTERN 1
EOF

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

echo $ac_n "checking whether termcap.h contains UP, BC and PC""... $ac_c" 1>&6
echo "configure:5438: checking whether termcap.h contains UP, BC and PC" >&5
cat > conftest.$ac_ext <<EOF
#line 5440 "configure"
#include "confdefs.h"

#ifdef HAVE_TERMCAP_H
# include <termcap.h>
#endif
			
int main() {
if (UP == 0 && BC == 0) PC = 1
; return 0; }
EOF
if { (eval echo configure:5451: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
#define HAVE_UP_BC_PC 1
EOF

else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  echo "$ac_t""no" 1>&6
	echo $ac_n "checking whether UP, BC and PC can be extern""... $ac_c" 1>&6
echo "configure:5463: checking whether UP, BC and PC can be extern" >&5
	cat > conftest.$ac_ext <<EOF
#line 5465 "configure"
#include "confdefs.h"

#ifdef HAVE_TERMCAP_H
# include <termcap.h>
#endif
extern char *UP, *BC, PC;
			
int main() {
if (UP == 0 && BC == 0) PC = 1
; return 0; }
EOF
if { (eval echo configure:5477: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
#define UP_BC_PC_EXTERN 1
EOF

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

echo $ac_n "checking whether tputs() uses outfuntype""... $ac_c" 1>&6
echo "configure:5495: checking whether tputs() uses outfuntype" >&5
cat > conftest.$ac_ext <<EOF
#line 5497 "configure"
#include "confdefs.h"

#ifdef HAVE_TERMCAP_H
# include <termcap.h>
#endif
			
int main() {
extern int xx(); tputs("test", 1, (outfuntype)xx)
; return 0; }
EOF
if { (eval echo configure:5508: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
#define HAVE_OUTFUNTYPE 1
EOF

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

echo $ac_n "checking whether sys/select.h and sys/time.h may both be included""... $ac_c" 1>&6
echo "configure:5523: checking whether sys/select.h and sys/time.h may both be included" >&5
cat > conftest.$ac_ext <<EOF
#line 5525 "configure"
#include "confdefs.h"

#include <sys/types.h>
#include <sys/time.h>
#include <sys/select.h>
int main() {

; return 0; }
EOF
if { (eval echo configure:5535: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  echo "$ac_t""yes" 1>&6
			cat >> confdefs.h <<\EOF
#define SYS_SELECT_WITH_SYS_TIME 1
EOF

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


echo $ac_n "checking for /dev/ptc""... $ac_c" 1>&6
echo "configure:5552: checking for /dev/ptc" >&5
if test -r /dev/ptc; then
  cat >> confdefs.h <<\EOF
#define HAVE_DEV_PTC 1
EOF

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

echo $ac_n "checking for SVR4 ptys""... $ac_c" 1>&6
echo "configure:5564: checking for SVR4 ptys" >&5
if test -c /dev/ptmx ; then
  cat > conftest.$ac_ext <<EOF
#line 5567 "configure"
#include "confdefs.h"

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

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

echo $ac_n "checking for ptyranges""... $ac_c" 1>&6
echo "configure:5592: checking for ptyranges" >&5
if test -d /dev/ptym ; then
  pdir='/dev/ptym'
else
  pdir='/dev'
fi
cat > conftest.$ac_ext <<EOF
#line 5599 "configure"
#include "confdefs.h"
#ifdef M_UNIX
   yes;
#endif
	
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "yes" >/dev/null 2>&1; then
  rm -rf conftest*
  ptys=`echo /dev/ptyp??`
else
  rm -rf conftest*
  ptys=`echo $pdir/pty??`
fi
rm -f conftest*

if test "$ptys" != "$pdir/pty??" ; then
  p0=`echo $ptys | tr ' ' '\012' | sed -e 's/^.*\(.\).$/\1/g' | sort -u | tr -d '\012'`
  p1=`echo $ptys | tr ' ' '\012' | sed -e 's/^.*\(.\)$/\1/g'  | sort -u | tr -d '\012'`
  cat >> confdefs.h <<EOF
#define PTYRANGE0 "$p0"
EOF

  cat >> confdefs.h <<EOF
#define PTYRANGE1 "$p1"
EOF

  echo "$ac_t""$p0 / $p1" 1>&6
else
  echo "$ac_t""don't know" 1>&6
fi

echo $ac_n "checking default tty permissions/group""... $ac_c" 1>&6
echo "configure:5633: checking default tty permissions/group" >&5
rm -f conftest_grp
if test "$cross_compiling" = yes; then
  { echo "configure: error: failed to compile test program" 1>&2; exit 1; }
else
  cat > conftest.$ac_ext <<EOF
#line 5639 "configure"
#include "confdefs.h"

#include <sys/types.h>
#include <sys/stat.h>
#include <stdio.h>
main()
{
  struct stat sb;
  char *x,*ttyname();
  int om, m;
  FILE *fp;

  if (!(x = ttyname(0))) exit(1);
  if (stat(x, &sb)) exit(1);
  om = sb.st_mode;
  if (om & 002) exit(0);
  m = system("mesg y");
  if (m == -1 || m == 127) exit(1);
  if (stat(x, &sb)) exit(1);
  m = sb.st_mode;
  if (chmod(x, om)) exit(1);
  if (m & 002) exit(0);
  if (sb.st_gid == getgid()) exit(1);
  if (!(fp=fopen("conftest_grp", "w")))
    exit(1);
  fprintf(fp, "%d\n", sb.st_gid);
  fclose(fp);
  exit(0);
}

EOF
if { (eval echo configure:5671: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  
    if test -f conftest_grp; then
	ptygrp=`cat conftest_grp`
	echo "$ac_t""pty mode: 0620, group: $ptygrp" 1>&6
	cat >> confdefs.h <<\EOF
#define PTYMODE 0620
EOF

	cat >> confdefs.h <<EOF
#define PTYGROUP $ptygrp
EOF

    else
	echo "$ac_t""ptys are world accessable" 1>&6
    fi

else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  echo "$ac_t""can't determine - assume ptys are world accessable" 1>&6
fi
rm -fr conftest*
fi

rm -f conftest_grp


echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
echo "configure:5702: checking return type of signal handlers" >&5
if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 5707 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <signal.h>
#ifdef signal
#undef signal
#endif
#ifdef __cplusplus
extern "C" void (*signal (int, void (*)(int)))(int);
#else
void (*signal ()) ();
#endif

int main() {
int i;
; return 0; }
EOF
if { (eval echo configure:5724: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_type_signal=void
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_type_signal=int
fi
rm -f conftest*
fi

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



if test $ac_cv_type_signal = void; then
  cat >> confdefs.h <<\EOF
#define SIGRETURN return
EOF

else
  cat >> confdefs.h <<\EOF
#define SIGRETURN return 0
EOF

fi

echo $ac_n "checking for struct sigcontext""... $ac_c" 1>&6
echo "configure:5756: checking for struct sigcontext" >&5
cat > conftest.$ac_ext <<EOF
#line 5758 "configure"
#include "confdefs.h"

#include <signal.h>
test_sig()
{
    struct sigcontext *scont;
    scont = (struct sigcontext *)0;
    return 1;
} 
int main() {

; return 0; }
EOF
if { (eval echo configure:5772: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  echo "$ac_t""yes" 1>&6
		cat >> confdefs.h <<\EOF
#define HAVE_SIGCONTEXT 1
EOF

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

echo $ac_n "checking getcwd implementation""... $ac_c" 1>&6
echo "configure:5788: checking getcwd implementation" >&5
if test "$cross_compiling" = yes; then
  { echo "configure: error: failed to compile test program" 1>&2; exit 1; }
else
  cat > conftest.$ac_ext <<EOF
#line 5793 "configure"
#include "confdefs.h"

char *dagger[] = { "IFS=pwd", 0 };
main()
{
  char buffer[500];
  extern char **environ;
  environ = dagger;
  return getcwd(buffer, 500) ? 0 : 1;
}
EOF
if { (eval echo configure:5805: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  echo "$ac_t""it is usable" 1>&6
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  echo "$ac_t""it stinks" 1>&6
		cat >> confdefs.h <<\EOF
#define BAD_GETCWD 1
EOF

fi
rm -fr conftest*
fi


for ac_func in bcmp fchdir fchown fseeko fsync ftello getcwd getpseudotty \
	getpwnam getpwuid getrlimit gettimeofday getwd lstat memcmp \
	memset nanosleep opendir putenv qsort readlink select setenv \
	setpgid setsid sigaltstack sigstack sigset sigsetjmp sigaction \
	sigvec strcasecmp strerror strftime stricmp strncasecmp strnicmp \
	strpbrk strtol tgetent towlower towupper usleep utime utimes
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:5875: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 5880 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();

int main() {

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

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

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 
else
  echo "$ac_t""no" 1>&6
fi
done


echo $ac_n "checking for st_blksize""... $ac_c" 1>&6
echo "configure:5884: checking for st_blksize" >&5
cat > conftest.$ac_ext <<EOF
#line 5886 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/stat.h>
int main() {
	struct stat st;
	int n;

	stat("/", &st);
	n = (int)st.st_blksize;
; return 0; }
EOF
if { (eval echo configure:5898: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
#define HAVE_ST_BLKSIZE 1
EOF

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

echo $ac_n "checking whether stat() ignores a trailing slash""... $ac_c" 1>&6
echo "configure:5958: checking whether stat() ignores a trailing slash" >&5
if test "$cross_compiling" = yes; then
  { echo "configure: error: failed to compile test program" 1>&2; exit 1; }
else
  cat > conftest.$ac_ext <<EOF
#line 5963 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/stat.h>
main() {struct stat st;  exit(stat("configure/", &st) != 0); }
EOF
if { (eval echo configure:5969: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
#define STAT_IGNORES_SLASH 1
EOF

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


echo $ac_n "checking for iconv_open()""... $ac_c" 1>&6
echo "configure:5986: checking for iconv_open()" >&5
save_LIBS="$LIBS"
LIBS="$LIBS -liconv"
cat > conftest.$ac_ext <<EOF
#line 5990 "configure"
#include "confdefs.h"

#ifdef HAVE_ICONV_H
# include <iconv.h>
#endif
    
int main() {
iconv_open("fr", "to");
; return 0; }
EOF
if { (eval echo configure:5928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  echo "$ac_t""yes; with -liconv" 1>&6; cat >> confdefs.h <<\EOF
#define HAVE_ICONV 1
EOF

else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  LIBS="$save_LIBS"
    cat > conftest.$ac_ext <<EOF
#line 5940 "configure"
#include "confdefs.h"

#ifdef HAVE_ICONV_H
# include <iconv.h>
#endif
	
int main() {
iconv_open("fr", "to");
; return 0; }
EOF
if { (eval echo configure:5951: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
#define HAVE_ICONV 1
EOF

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


echo $ac_n "checking for nl_langinfo(CODESET)""... $ac_c" 1>&6
echo "configure:5969: checking for nl_langinfo(CODESET)" >&5
cat > conftest.$ac_ext <<EOF
#line 5971 "configure"
#include "confdefs.h"

#ifdef HAVE_LANGINFO_H
# include <langinfo.h>
#endif

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

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

echo $ac_n "checking --disable-acl argument""... $ac_c" 1>&6
echo "configure:6072: checking --disable-acl argument" >&5
# Check whether --enable-acl or --disable-acl was given.
if test "${enable_acl+set}" = set; then
  enableval="$enable_acl"
  echo "$ac_t""yes" 1>&6
else
  enable_acl="yes"; echo "$ac_t""no" 1>&6
fi

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

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

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

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

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

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

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

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

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

fi


echo $ac_n "checking for POSIX ACL support""... $ac_c" 1>&6
echo "configure:6078: checking for POSIX ACL support" >&5
cat > conftest.$ac_ext <<EOF
#line 6080 "configure"
#include "confdefs.h"

#include <sys/types.h>
#ifdef HAVE_SYS_ACL_H
# include <sys/acl.h>
#endif
acl_t acl;
int main() {
acl = acl_get_file("foo", ACL_TYPE_ACCESS);
	acl_set_file("foo", ACL_TYPE_ACCESS, acl);
	acl_free(acl);
; return 0; }
EOF
if { (eval echo configure:6094: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
#define HAVE_POSIX_ACL 1
EOF

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

echo $ac_n "checking for Solaris ACL support""... $ac_c" 1>&6
echo "configure:6109: checking for Solaris ACL support" >&5
cat > conftest.$ac_ext <<EOF
#line 6111 "configure"
#include "confdefs.h"

#ifdef HAVE_SYS_ACL_H
# include <sys/acl.h>
#endif
int main() {
acl("foo", GETACLCNT, 0, NULL);
	
; return 0; }
EOF
if { (eval echo configure:6122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
#define HAVE_SOLARIS_ACL 1
EOF

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

echo $ac_n "checking for AIX ACL support""... $ac_c" 1>&6
echo "configure:6137: checking for AIX ACL support" >&5
cat > conftest.$ac_ext <<EOF
#line 6139 "configure"
#include "confdefs.h"

#ifdef HAVE_SYS_ACL_H
# include <sys/acl.h>
#endif
#ifdef HAVE_SYS_ACCESS_H
# include <sys/access.h>
#endif
#define _ALL_SOURCE

#include <sys/stat.h>

int aclsize;
struct acl *aclent;
int main() {
aclsize = sizeof(struct acl);
	aclent = (void *)malloc(aclsize);
	statacl("foo", STX_NORMAL, aclent, aclsize);
	
; return 0; }
EOF
if { (eval echo configure:6161: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
#define HAVE_AIX_ACL 1
EOF

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

echo $ac_n "checking --disable-gpm argument""... $ac_c" 1>&6
echo "configure:6304: checking --disable-gpm argument" >&5
# Check whether --enable-gpm or --disable-gpm was given.
if test "${enable_gpm+set}" = set; then
  enableval="$enable_gpm"
  :
else
  enable_gpm="yes"
fi


if test "$enable_gpm" = "yes"; then
  echo "$ac_t""no" 1>&6
    echo $ac_n "checking for gpm""... $ac_c" 1>&6
echo "configure:6189: checking for gpm" >&5
if eval "test \"`echo '$''{'vi_cv_have_gpm'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  olibs="$LIBS" ; LIBS="-lgpm"
	cat > conftest.$ac_ext <<EOF
#line 6195 "configure"
#include "confdefs.h"
#include <gpm.h>
	    #include <linux/keyboard.h>
int main() {
Gpm_GetLibVersion(NULL);
; return 0; }
EOF
if { (eval echo configure:6203: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  	    	    vi_cv_have_gpm=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  vi_cv_have_gpm=no
fi
rm -f conftest*
	LIBS="$olibs"
    
fi

echo "$ac_t""$vi_cv_have_gpm" 1>&6
  if test $vi_cv_have_gpm = yes; then
    LIBS="$LIBS -lgpm"
    cat >> confdefs.h <<\EOF
#define HAVE_GPM 1
EOF

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

echo $ac_n "checking for rename""... $ac_c" 1>&6
echo "configure:6230: checking for rename" >&5
cat > conftest.$ac_ext <<EOF
#line 6232 "configure"
#include "confdefs.h"
#include <stdio.h>
int main() {
rename("this", "that")
; return 0; }
EOF
if { (eval echo configure:6239: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
#define HAVE_RENAME 1
EOF

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

echo $ac_n "checking for sysctl""... $ac_c" 1>&6
echo "configure:6254: checking for sysctl" >&5
cat > conftest.$ac_ext <<EOF
#line 6256 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/sysctl.h>
int main() {
	int mib[2], r;
	size_t len;

	mib[0] = CTL_HW;
	mib[1] = HW_USERMEM;
	len = sizeof(r);
	(void)sysctl(mib, 2, &r, &len, (void *)0, (size_t)0);
	
; return 0; }
EOF
if { (eval echo configure:6271: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
#define HAVE_SYSCTL 1
EOF

else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  echo "$ac_t""not usable" 1>&6
fi
rm -f conftest*

echo $ac_n "checking for sysinfo""... $ac_c" 1>&6
echo "configure:6286: checking for sysinfo" >&5
cat > conftest.$ac_ext <<EOF
#line 6288 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/sysinfo.h>
int main() {
	struct sysinfo sinfo;
	int t;

	(void)sysinfo(&sinfo);
	t = sinfo.totalram;
	
; return 0; }
EOF
if { (eval echo configure:6301: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
#define HAVE_SYSINFO 1
EOF

else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  echo "$ac_t""not usable" 1>&6
fi
rm -f conftest*

echo $ac_n "checking for sysconf""... $ac_c" 1>&6
echo "configure:6316: checking for sysconf" >&5
cat > conftest.$ac_ext <<EOF
#line 6318 "configure"
#include "confdefs.h"
#include <unistd.h>
int main() {
	(void)sysconf(_SC_PAGESIZE);
	(void)sysconf(_SC_PHYS_PAGES);
	
; return 0; }
EOF
if { (eval echo configure:6327: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
#define HAVE_SYSCONF 1
EOF

else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  echo "$ac_t""not usable" 1>&6
fi
rm -f conftest*


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

fi

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


echo $ac_n "checking whether memmove/bcopy/memcpy handle overlaps""... $ac_c" 1>&6
echo "configure:6383: checking whether memmove/bcopy/memcpy handle overlaps" >&5
bcopy_test_prog='
main() {
  char buf[10];
  strcpy(buf, "abcdefghi");
  mch_memmove(buf, buf + 2, 3);
  if (strncmp(buf, "ababcf", 6))
    exit(1);
  strcpy(buf, "abcdefghi");
  mch_memmove(buf + 2, buf, 3);
  if (strncmp(buf, "cdedef", 6))
    exit(1);
  exit(0); /* libc version works properly.  */
}'


if test "$cross_compiling" = yes; then
  { echo "configure: error: failed to compile test program" 1>&2; exit 1; }
else
  cat > conftest.$ac_ext <<EOF
#line 6403 "configure"
#include "confdefs.h"
#define mch_memmove(s,d,l) memmove(d,s,l) $bcopy_test_prog
EOF
if { (eval echo configure:6407: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  cat >> confdefs.h <<\EOF
#define USEMEMMOVE 1
EOF
 echo "$ac_t""memmove does" 1>&6
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  if test "$cross_compiling" = yes; then
  { echo "configure: error: failed to compile test program" 1>&2; exit 1; }
else
  cat > conftest.$ac_ext <<EOF
#line 6421 "configure"
#include "confdefs.h"
#define mch_memmove(s,d,l) bcopy(d,s,l) $bcopy_test_prog
EOF
if { (eval echo configure:6425: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  cat >> confdefs.h <<\EOF
#define USEBCOPY 1
EOF
 echo "$ac_t""bcopy does" 1>&6
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  if test "$cross_compiling" = yes; then
  { echo "configure: error: failed to compile test program" 1>&2; exit 1; }
else
  cat > conftest.$ac_ext <<EOF
#line 6439 "configure"
#include "confdefs.h"
#define mch_memmove(s,d,l) memcpy(d,s,l) $bcopy_test_prog
EOF
if { (eval echo configure:6443: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  cat >> confdefs.h <<\EOF
#define USEMEMCPY 1
EOF
 echo "$ac_t""memcpy does" 1>&6
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  echo "$ac_t""no" 1>&6
fi
rm -fr conftest*
fi

fi
rm -fr conftest*
fi

fi
rm -fr conftest*
fi



if test "$enable_multibyte" = "yes"; then
  cflags_save=$CFLAGS
  ldflags_save=$LDFLAGS
  if test -n "$x_includes" ; then
    CFLAGS="$CFLAGS -I$x_includes"
    LDFLAGS="$X_LIBS $LDFLAGS -lX11"
    echo $ac_n "checking whether X_LOCALE needed""... $ac_c" 1>&6
echo "configure:6475: checking whether X_LOCALE needed" >&5
    cat > conftest.$ac_ext <<EOF
#line 6477 "configure"
#include "confdefs.h"
#include <X11/Xlocale.h>
int main() {

; return 0; }
EOF
if { (eval echo configure:6484: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  cat > conftest.$ac_ext <<EOF
#line 6487 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char _Xsetlocale();

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

else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  echo "$ac_t""no" 1>&6
fi
rm -f conftest*
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  echo "$ac_t""no" 1>&6
fi
rm -f conftest*
  fi
  CFLAGS=$cflags_save
  LDFLAGS=$ldflags_save
fi

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

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

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


echo $ac_n "checking how to create tags""... $ac_c" 1>&6
echo "configure:6566: checking how to create tags" >&5
test -f tags && mv tags tags.save
if (eval ctags --version /dev/null | grep Exuberant) < /dev/null 1>&5 2>&1; then
  TAGPRG="ctags"
else
  (eval etags	   /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="etags"
  (eval etags -c   /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="etags -c"
  (eval ctags	   /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="ctags"
  (eval ctags -t   /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="ctags -t"
  (eval ctags -ts  /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="ctags -ts"
  (eval ctags -tvs /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="ctags -tvs"
  (eval ctags -i+m /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="ctags -i+m"
fi
test -f tags.save && mv tags.save tags
echo "$ac_t""$TAGPRG" 1>&6 

echo $ac_n "checking how to run man with a section nr""... $ac_c" 1>&6
echo "configure:6583: checking how to run man with a section nr" >&5
MANDEF="man"
(eval man -s 2 read) < /dev/null > /dev/null 2>&5 && MANDEF="man -s"
echo "$ac_t""$MANDEF" 1>&6
if test "$MANDEF" = "man -s"; then
  cat >> confdefs.h <<\EOF
#define USEMAN_S 1
EOF

fi

echo $ac_n "checking --disable-nls argument""... $ac_c" 1>&6
echo "configure:6595: checking --disable-nls argument" >&5
# Check whether --enable-nls or --disable-nls was given.
if test "${enable_nls+set}" = set; then
  enableval="$enable_nls"
  :
else
  enable_nls="yes"
fi


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

  echo $ac_n "checking for NLS""... $ac_c" 1>&6
echo "configure:6637: checking for NLS" >&5
  if test -d po; then
    have_gettext="no"
    if test -n "$MSGFMT"; then
      cat > conftest.$ac_ext <<EOF
#line 6642 "configure"
#include "confdefs.h"
#include <libintl.h>
int main() {
gettext("Test");
; return 0; }
EOF
if { (eval echo configure:6649: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  echo "$ac_t""gettext() works" 1>&6; have_gettext="yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  olibs=$LIBS
	  LIBS="$LIBS -lintl"
	  cat > conftest.$ac_ext <<EOF
#line 6659 "configure"
#include "confdefs.h"
#include <libintl.h>
int main() {
gettext("Test");
; return 0; }
EOF
if { (eval echo configure:6666: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  echo "$ac_t""gettext() works with -lintl" 1>&6; have_gettext="yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  echo "$ac_t""gettext() doesn't work" 1>&6;
	      LIBS=$olibs
fi
rm -f conftest*
fi
rm -f conftest*
    else
      echo "$ac_t""msgfmt not found - disabled" 1>&6;
    fi
    if test $have_gettext = "yes"; then
      cat >> confdefs.h <<\EOF
#define HAVE_GETTEXT 1
EOF

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

int main() {

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

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

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 
else
  echo "$ac_t""no" 1>&6
fi
done

            echo $ac_n "checking for _nl_msg_cat_cntr""... $ac_c" 1>&6
echo "configure:6745: checking for _nl_msg_cat_cntr" >&5
      cat > conftest.$ac_ext <<EOF
#line 6747 "configure"
#include "confdefs.h"
#include <libintl.h>
		extern int _nl_msg_cat_cntr;
int main() {
++_nl_msg_cat_cntr;
; return 0; }
EOF
if { (eval echo configure:6755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
#define HAVE_NL_MSG_CAT_CNTR 1
EOF

else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  echo "$ac_t""no" 1>&6
fi
rm -f conftest*
    fi
  else
    echo "$ac_t""no "po" directory - disabled" 1>&6;
  fi
else
  echo "$ac_t""yes" 1>&6
fi

ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
echo "configure:6778: checking for dlfcn.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 6783 "configure"
#include "confdefs.h"
#include <dlfcn.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:6788: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  DLL=dlfcn.h
else
  echo "$ac_t""no" 1>&6
ac_safe=`echo "dl.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for dl.h""... $ac_c" 1>&6
echo "configure:6809: checking for dl.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 6814 "configure"
#include "confdefs.h"
#include <dl.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:6819: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  DLL=dl.h
else
  echo "$ac_t""no" 1>&6
fi

fi

if test x${DLL} = xdlfcn.h; then
  cat >> confdefs.h <<\EOF
#define HAVE_DLFCN_H 1
EOF

  echo $ac_n "checking for dlopen()""... $ac_c" 1>&6
echo "configure:6848: checking for dlopen()" >&5
  cat > conftest.$ac_ext <<EOF
#line 6850 "configure"
#include "confdefs.h"

int main() {

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

else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  echo "$ac_t""no" 1>&6;
	      echo $ac_n "checking for dlopen() in -ldl""... $ac_c" 1>&6
echo "configure:6873: checking for dlopen() in -ldl" >&5
	      olibs=$LIBS
	      LIBS="$LIBS -ldl"
	      cat > conftest.$ac_ext <<EOF
#line 6877 "configure"
#include "confdefs.h"

int main() {

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

else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  echo "$ac_t""no" 1>&6;
			  LIBS=$olibs
fi
rm -f conftest*
fi
rm -f conftest*
      echo $ac_n "checking for dlsym()""... $ac_c" 1>&6
echo "configure:6905: checking for dlsym()" >&5
  cat > conftest.$ac_ext <<EOF
#line 6907 "configure"
#include "confdefs.h"

int main() {

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

else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  echo "$ac_t""no" 1>&6;
	      echo $ac_n "checking for dlsym() in -ldl""... $ac_c" 1>&6
echo "configure:6930: checking for dlsym() in -ldl" >&5
	      olibs=$LIBS
	      LIBS="$LIBS -ldl"
	      cat > conftest.$ac_ext <<EOF
#line 6934 "configure"
#include "confdefs.h"

int main() {

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

else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  echo "$ac_t""no" 1>&6;
			  LIBS=$olibs
fi
rm -f conftest*
fi
rm -f conftest*
elif test x${DLL} = xdl.h; then
  cat >> confdefs.h <<\EOF
#define HAVE_DL_H 1
EOF

  echo $ac_n "checking for shl_load()""... $ac_c" 1>&6
echo "configure:6967: checking for shl_load()" >&5
  cat > conftest.$ac_ext <<EOF
#line 6969 "configure"
#include "confdefs.h"

int main() {

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

else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  echo "$ac_t""no" 1>&6;
	  echo $ac_n "checking for shl_load() in -ldld""... $ac_c" 1>&6
echo "configure:6992: checking for shl_load() in -ldld" >&5
	  olibs=$LIBS
	  LIBS="$LIBS -ldld"
	  cat > conftest.$ac_ext <<EOF
#line 6996 "configure"
#include "confdefs.h"

int main() {

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

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


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

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

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

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

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

DEFS=-DHAVE_CONFIG_H

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

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

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

ac_given_srcdir=$srcdir

trap 'rm -fr `echo "auto/config.mk:config.mk.in auto/config.h:config.h.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
EOF
cat >> $CONFIG_STATUS <<EOF

# Protect against being on the right side of a sed subst in config.status.
sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
$ac_vpsub
$extrasub
s%@SHELL@%$SHELL%g
s%@CFLAGS@%$CFLAGS%g
s%@CPPFLAGS@%$CPPFLAGS%g
s%@CXXFLAGS@%$CXXFLAGS%g
s%@FFLAGS@%$FFLAGS%g
s%@DEFS@%$DEFS%g
s%@LDFLAGS@%$LDFLAGS%g
s%@LIBS@%$LIBS%g
s%@exec_prefix@%$exec_prefix%g
s%@prefix@%$prefix%g
s%@program_transform_name@%$program_transform_name%g
s%@bindir@%$bindir%g
s%@sbindir@%$sbindir%g
s%@libexecdir@%$libexecdir%g
s%@datadir@%$datadir%g
s%@sysconfdir@%$sysconfdir%g
s%@sharedstatedir@%$sharedstatedir%g
s%@localstatedir@%$localstatedir%g
s%@libdir@%$libdir%g
s%@includedir@%$includedir%g
s%@oldincludedir@%$oldincludedir%g
s%@infodir@%$infodir%g
s%@mandir@%$mandir%g
s%@SET_MAKE@%$SET_MAKE%g
s%@CC@%$CC%g
s%@CPP@%$CPP%g
s%@AWK@%$AWK%g
s%@STRIP@%$STRIP%g
s%@EXEEXT@%$EXEEXT%g
s%@CPP_MM@%$CPP_MM%g
s%@OS_EXTRA_SRC@%$OS_EXTRA_SRC%g
s%@OS_EXTRA_OBJ@%$OS_EXTRA_OBJ%g
s%@VIMNAME@%$VIMNAME%g
s%@EXNAME@%$EXNAME%g
s%@VIEWNAME@%$VIEWNAME%g
s%@line_break@%$line_break%g
s%@dovimdiff@%$dovimdiff%g
s%@dogvimdiff@%$dogvimdiff%g
s%@compiledby@%$compiledby%g
s%@vi_cv_path_perl@%$vi_cv_path_perl%g
s%@vi_cv_perllib@%$vi_cv_perllib%g
s%@perllibs@%$perllibs%g
s%@shrpenv@%$shrpenv%g
s%@PERL_SRC@%$PERL_SRC%g
s%@PERL_OBJ@%$PERL_OBJ%g
s%@PERL_PRO@%$PERL_PRO%g
s%@PERL_CFLAGS@%$PERL_CFLAGS%g
s%@vi_cv_path_python@%$vi_cv_path_python%g
s%@PYTHON_CONFDIR@%$PYTHON_CONFDIR%g
s%@PYTHON_LIBS@%$PYTHON_LIBS%g
s%@PYTHON_GETPATH_CFLAGS@%$PYTHON_GETPATH_CFLAGS%g
s%@PYTHON_CFLAGS@%$PYTHON_CFLAGS%g
s%@PYTHON_SRC@%$PYTHON_SRC%g
s%@PYTHON_OBJ@%$PYTHON_OBJ%g
s%@vi_cv_path_tcl@%$vi_cv_path_tcl%g
s%@TCL_SRC@%$TCL_SRC%g
s%@TCL_OBJ@%$TCL_OBJ%g
s%@TCL_PRO@%$TCL_PRO%g
s%@TCL_CFLAGS@%$TCL_CFLAGS%g
s%@TCL_LIBS@%$TCL_LIBS%g
s%@vi_cv_path_ruby@%$vi_cv_path_ruby%g
s%@RUBY_SRC@%$RUBY_SRC%g
s%@RUBY_OBJ@%$RUBY_OBJ%g
s%@RUBY_PRO@%$RUBY_PRO%g
s%@RUBY_CFLAGS@%$RUBY_CFLAGS%g
s%@RUBY_LIBS@%$RUBY_LIBS%g
s%@WORKSHOP_SRC@%$WORKSHOP_SRC%g
s%@WORKSHOP_OBJ@%$WORKSHOP_OBJ%g
s%@NETBEANS_SRC@%$NETBEANS_SRC%g
s%@NETBEANS_OBJ@%$NETBEANS_OBJ%g
s%@SNIFF_SRC@%$SNIFF_SRC%g
s%@SNIFF_OBJ@%$SNIFF_OBJ%g
s%@xmkmfpath@%$xmkmfpath%g
s%@X_CFLAGS@%$X_CFLAGS%g
s%@X_PRE_LIBS@%$X_PRE_LIBS%g
s%@X_LIBS@%$X_LIBS%g
s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
s%@X_LIB@%$X_LIB%g
s%@GTK_CONFIG@%$GTK_CONFIG%g
s%@GTK12_CONFIG@%$GTK12_CONFIG%g
s%@GTK_CFLAGS@%$GTK_CFLAGS%g
s%@GTK_LIBS@%$GTK_LIBS%g
s%@GTK_LIBNAME@%$GTK_LIBNAME%g
s%@GNOME_LIBS@%$GNOME_LIBS%g
s%@GNOME_LIBDIR@%$GNOME_LIBDIR%g
s%@GNOME_INCLUDEDIR@%$GNOME_INCLUDEDIR%g
s%@GNOME_CONFIG@%$GNOME_CONFIG%g
s%@MOTIF_LIBNAME@%$MOTIF_LIBNAME%g
s%@NARROW_PROTO@%$NARROW_PROTO%g
s%@GUI_INC_LOC@%$GUI_INC_LOC%g
s%@GUI_LIB_LOC@%$GUI_LIB_LOC%g
s%@GUITYPE@%$GUITYPE%g
s%@GUI_X_LIBS@%$GUI_X_LIBS%g
s%@HANGULIN_SRC@%$HANGULIN_SRC%g
s%@HANGULIN_OBJ@%$HANGULIN_OBJ%g
s%@TAGPRG@%$TAGPRG%g
s%@MSGFMT@%$MSGFMT%g
s%@MAKEMO@%$MAKEMO%g

CEOF
EOF

cat >> $CONFIG_STATUS <<\EOF

# Split the substitutions into bite-sized pieces for seds with
# small command number limits, like on Digital OSF/1 and HP-UX.
ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
ac_file=1 # Number of current file.
ac_beg=1 # First line for current file.
ac_end=$ac_max_sed_cmds # Line after last line for current file.
ac_more_lines=:
ac_sed_cmds=""
while $ac_more_lines; do
  if test $ac_beg -gt 1; then
    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
  else
    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
  fi
  if test ! -s conftest.s$ac_file; then
    ac_more_lines=false
    rm -f conftest.s$ac_file
  else
    if test -z "$ac_sed_cmds"; then
      ac_sed_cmds="sed -f conftest.s$ac_file"
    else
      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
    fi
    ac_file=`expr $ac_file + 1`
    ac_beg=$ac_end
    ac_end=`expr $ac_end + $ac_max_sed_cmds`
  fi
done
if test -z "$ac_sed_cmds"; then
  ac_sed_cmds=cat
fi
EOF

cat >> $CONFIG_STATUS <<EOF

CONFIG_FILES=\${CONFIG_FILES-"auto/config.mk:config.mk.in"}
EOF
cat >> $CONFIG_STATUS <<\EOF
for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
  case "$ac_file" in
  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  *) ac_file_in="${ac_file}.in" ;;
  esac

  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.

  # Remove last slash and all that follows it.  Not all systems have dirname.
  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
    # The file is in a subdirectory.
    test ! -d "$ac_dir" && mkdir "$ac_dir"
    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
    # A "../" for each directory in $ac_dir_suffix.
    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
  else
    ac_dir_suffix= ac_dots=
  fi

  case "$ac_given_srcdir" in
  .)  srcdir=.
      if test -z "$ac_dots"; then top_srcdir=.
      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
  *) # Relative path.
    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
    top_srcdir="$ac_dots$ac_given_srcdir" ;;
  esac


  echo creating "$ac_file"
  rm -f "$ac_file"
  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
  case "$ac_file" in
  *Makefile*) ac_comsub="1i\\
# $configure_input" ;;
  *) ac_comsub= ;;
  esac

  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
  sed -e "$ac_comsub
s%@configure_input@%$configure_input%g
s%@srcdir@%$srcdir%g
s%@top_srcdir@%$top_srcdir%g
" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
fi; done
rm -f conftest.s*

# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
# NAME is the cpp macro being defined and VALUE is the value it is being given.
#
# ac_d sets the value in "#define NAME VALUE" lines.
ac_dA='s%^\([ 	]*\)#\([ 	]*define[ 	][ 	]*\)'
ac_dB='\([ 	][ 	]*\)[^ 	]*%\1#\2'
ac_dC='\3'
ac_dD='%g'
# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
ac_uA='s%^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
ac_uB='\([ 	]\)%\1#\2define\3'
ac_uC=' '
ac_uD='\4%g'
# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
ac_eA='s%^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
ac_eB='$%\1#\2define\3'
ac_eC=' '
ac_eD='%g'

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

  echo creating $ac_file

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

EOF

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

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

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

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

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

EOF
cat >> $CONFIG_STATUS <<EOF

EOF
cat >> $CONFIG_STATUS <<\EOF

exit 0
EOF
chmod +x $CONFIG_STATUS
rm -fr confdefs* $ac_clean_files
test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1


