#! /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
  --disable-darwin        Disable Darwin (Mac OS X) support."
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
  --disable-xsmp          Disable XSMP session management"
ac_help="$ac_help
  --disable-xsmp-interact Disable XSMP interaction"
ac_help="$ac_help
  --enable-mzschemeinterp   Include MzScheme interpreter."
ac_help="$ac_help
  --with-plthome=PLTHOME   Use PLTHOME."
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
  --disable-netbeans      Disable 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/gtk2/gnome/gnome2/kde/motif/athena/neXtaw/beos/photon/carbon]"
ac_help="$ac_help
  --enable-kde-check      If auto-select GUI, check for KDE [default=no]"
ac_help="$ac_help
  --enable-gtk-check      If auto-select GUI, check for GTK [default=yes]"
ac_help="$ac_help
  --enable-gtk2-check     If GTK GUI, check for GTK+ 2 [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
  --enable-nextaw-check   If auto-select GUI, check for neXtaw [default=yes]"
ac_help="$ac_help
  --enable-carbon-check   If auto-select GUI, check for Carbon [default=yes]"
ac_help="$ac_help
  --with-qt-dir=DIR	Specify prefix of QT files"
ac_help="$ac_help
  --with-qt-includes=DIR	Specify location of Qt headers"
ac_help="$ac_help
  --with-qt-libs=DIR	Specify location of Qt libraries"
ac_help="$ac_help
  --enable-kde-toolbar   if KDE GUI is selected, enable a KDE-look toolbar [default=no]"
ac_help="$ac_help
  --disable-rpath      Disable rpath."
ac_help="$ac_help
  --with-kde-prefix=PFX	Prefix where KDE is installed (optional)"
ac_help="$ac_help
  --with-kde-includes=DIR	Specify location of KDE headers"
ac_help="$ac_help
  --with-kde-libs=DIR	Specify location of KDE libraries"
ac_help="$ac_help
  --disable-kdetest	Do not try to compile and run a test KDE program"
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:644: 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:674: 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:704: 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:755: 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:787: 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 798 "configure"
#include "confdefs.h"

main(){return(0);}
EOF
if { (eval echo configure:803: \"$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:829: 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:834: 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:843: \"$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:862: 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:893: 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 908 "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:914: \"$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 925 "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:931: \"$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 942 "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:948: \"$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
	cat > conftest.$ac_ext <<EOF
#line 972 "configure"
#include "confdefs.h"

EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "" >/dev/null 2>&1; then
  :
fi
rm -f conftest*
 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
echo "configure:982: 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:1006: 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:1038: 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:1067: 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 1072 "configure"
#include "confdefs.h"

int main() {

#ifndef __CYGWIN__
#define __CYGWIN__ __CYGWIN32__
#endif
return __CYGWIN__;
; return 0; }
EOF
if { (eval echo configure:1083: \"$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:1100: 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 1105 "configure"
#include "confdefs.h"

int main() {
return __MINGW32__;
; return 0; }
EOF
if { (eval echo configure:1112: \"$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:1131: 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:1141: \"$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:1188: 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:1195: 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:1203: 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

DEFAULT_VIMNAME=vim
echo $ac_n "checking for Darwin (Mac OS X)""... $ac_c" 1>&6
echo "configure:1213: checking for Darwin (Mac OS X)" >&5
if test "`(uname) 2>/dev/null`" = Darwin; then
  echo "$ac_t""yes" 1>&6

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

  if test "$enable_darwin" = "yes"; then
    echo "$ac_t""no" 1>&6
    echo $ac_n "checking if Darwin files are there""... $ac_c" 1>&6
echo "configure:1230: checking if Darwin files are there" >&5
    if test -f os_macosx.c; then
      echo "$ac_t""yes" 1>&6
    else
      echo "$ac_t""no, Darwin support disabled" 1>&6
      enable_darwin=no
    fi
  else
    echo "$ac_t""yes, Darwin support excluded" 1>&6
  fi

  if test "$enable_darwin" = "yes"; then
    MACOSX=yes
    OS_EXTRA_SCR="os_macosx.c os_mac_conv.c";
    OS_EXTRA_OBJ="objects/os_macosx.o objects/os_mac_conv.o"
    CPPFLAGS="$CPPFLAGS -DMACOS_X_UNIX -I/Developer/Headers/FlatCarbon -no-cpp-precomp"

                ac_safe=`echo "Carbon/Carbon.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for Carbon/Carbon.h""... $ac_c" 1>&6
echo "configure:1249: checking for Carbon/Carbon.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 1254 "configure"
#include "confdefs.h"
#include <Carbon/Carbon.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1259: \"$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
  CARBON=yes
else
  echo "$ac_t""no" 1>&6
fi

    if test "x$CARBON" = "xyes"; then
      if test -z "$with_x" -a "X$enable_gui" != Xmotif -a "X$enable_gui" != Xathena -a "X$enable_gui" != Xgtk -a "X$enable_gui" != Xgtk2; then
	with_x=no
	DEFAULT_VIMNAME=Vim
      fi
    fi
  fi
else
  echo "$ac_t""no" 1>&6
fi




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:1316: 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="$DEFAULT_VIMNAME"; echo "$ac_t""Defaulting to $VIMNAME" 1>&6
fi


echo $ac_n "checking --with-ex-name argument""... $ac_c" 1>&6
echo "configure:1327: 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:1338: 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:1350: 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:1364: 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:1378: checking if character set is EBCDIC" >&5
cat > conftest.$ac_ext <<EOF
#line 1380 "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:1393: \"$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:1421: 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:1458: 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:1501: 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 --disable-xsmp argument""... $ac_c" 1>&6
echo "configure:1513: checking --disable-xsmp argument" >&5
# Check whether --enable-xsmp or --disable-xsmp was given.
if test "${enable_xsmp+set}" = set; then
  enableval="$enable_xsmp"
  :
else
  enable_xsmp="yes"
fi


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

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

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

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

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

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

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


  if test "X$with_plthome" != "X"; then
       vi_cv_path_mzscheme_pfx="$with_plthome"
  else
    echo $ac_n "checking PLTHOME environment var""... $ac_c" 1>&6
echo "configure:1578: checking PLTHOME environment var" >&5
    if test "X$PLTHOME" != "X"; then
	echo "$ac_t"""$PLTHOME"" 1>&6
        vi_cv_path_mzscheme_pfx="$PLTHOME"
    else
	echo "$ac_t"""not set"" 1>&6
	        # Extract the first word of "mzscheme", so it can be a program name with args.
set dummy mzscheme; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1587: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_vi_cv_path_mzscheme'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$vi_cv_path_mzscheme" in
  /*)
  ac_cv_path_vi_cv_path_mzscheme="$vi_cv_path_mzscheme" # Let the user override the test with a path.
  ;;
  ?:/*)			 
  ac_cv_path_vi_cv_path_mzscheme="$vi_cv_path_mzscheme" # 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_mzscheme="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  ;;
esac
fi
vi_cv_path_mzscheme="$ac_cv_path_vi_cv_path_mzscheme"
if test -n "$vi_cv_path_mzscheme"; then
  echo "$ac_t""$vi_cv_path_mzscheme" 1>&6
else
  echo "$ac_t""no" 1>&6
fi


		        if test "X$vi_cv_path_mzscheme" != "X"; then
	  lsout=`ls -l $vi_cv_path_mzscheme`
	  if echo "$lsout" | grep -e '->' >/dev/null 2>/dev/null; then
	    vi_cv_path_mzscheme=`echo "$lsout" | sed 's/.*-> \(.*\)/\1/'`
	  fi
	fi

        if test "X$vi_cv_path_mzscheme" != "X"; then
                        echo $ac_n "checking MzScheme install prefix""... $ac_c" 1>&6
echo "configure:1629: checking MzScheme install prefix" >&5
if eval "test \"`echo '$''{'vi_cv_path_mzscheme_pfx'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
   vi_cv_path_mzscheme_pfx=`
      	    ${vi_cv_path_mzscheme} -evm \
            "(display (simplify-path		\
              (build-path (call-with-values	\
      	        (lambda () (split-path (find-system-path (quote exec-file)))) \
      	        (lambda (base name must-be-dir?) base)) (quote up))))"` 
fi

echo "$ac_t""$vi_cv_path_mzscheme_pfx" 1>&6
	    	    vi_cv_path_mzscheme_pfx=`echo "$vi_cv_path_mzscheme_pfx" | sed 's+/$++'`
        fi
    fi
  fi

  if test "X$vi_cv_path_mzscheme_pfx" != "X"; then
    echo $ac_n "checking if scheme.h can be found in $vi_cv_path_mzscheme_pfx/include""... $ac_c" 1>&6
echo "configure:1649: checking if scheme.h can be found in $vi_cv_path_mzscheme_pfx/include" >&5
    if test -f $vi_cv_path_mzscheme_pfx/include/scheme.h; then
      echo "$ac_t"""yes"" 1>&6
    else
      echo "$ac_t"""no"" 1>&6
      vi_cv_path_mzscheme_pfx=
    fi
  fi

  if test "X$vi_cv_path_mzscheme_pfx" != "X"; then
    if test -f "${vi_cv_path_mzscheme_pfx}/lib/libmzgc.a"; then
      MZSCHEME_LIBS="${vi_cv_path_mzscheme_pfx}/lib/libmzgc.a ${vi_cv_path_mzscheme_pfx}/lib/libmzscheme.a"
    else
      MZSCHEME_LIBS="-L${vi_cv_path_mzscheme_pfx}/lib -lmzgc -lmzscheme"
      if test "$GCC" = yes; then
		        MZSCHEME_LIBS="$MZSCHEME_LIBS -Wl,-rpath -Wl,${vi_cv_path_mzscheme_pfx}/lib"
      elif test "`(uname) 2>/dev/null`" = SunOS &&
			       uname -r | grep '^5' >/dev/null; then
	MZSCHEME_LIBS="$MZSCHEME_LIBS -R ${vi_cv_path_mzscheme_pfx}/lib"
      fi
    fi
    MZSCHEME_CFLAGS="-I${vi_cv_path_mzscheme_pfx}/include   \
      -DMZSCHEME_COLLECTS='\"${vi_cv_path_mzscheme_pfx}/collects\"'"
    MZSCHEME_SRC="if_mzsch.c"
    MZSCHEME_OBJ="objects/if_mzsch.o"
    MZSCHEME_PRO="if_mzsch.pro"
    cat >> confdefs.h <<\EOF
#define FEAT_MZSCHEME 1
EOF

  fi
  
  
  
  
  
fi


echo $ac_n "checking --enable-perlinterp argument""... $ac_c" 1>&6
echo "configure:1689: 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:1704: 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:1738: checking Perl version" >&5
    if $vi_cv_path_perl -e 'require 5.003_01' >/dev/null 2>/dev/null; then
     eval `$vi_cv_path_perl -V:usethreads`
     if test "X$usethreads" = "XUNKNOWN" -o "X$usethreads" = "Xundef"; then
       badthreads=no
     else
       if $vi_cv_path_perl -e 'require 5.6.0' >/dev/null 2>/dev/null; then
	 eval `$vi_cv_path_perl -V:use5005threads`
	 if test "X$use5005threads" = "XUNKNOWN" -o "X$use5005threads" = "Xundef"; then
	   badthreads=no
	 else
	   badthreads=yes
	   echo "$ac_t"">>> Perl > 5.6 with 5.5 threads cannot be used <<<" 1>&6
	 fi
       else
	 badthreads=yes
	 echo "$ac_t"">>> Perl 5.5 with threads cannot be used <<<" 1>&6
       fi
     fi
     if test $badthreads = no; 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;print"\n"' | sed -e 's/-fno[^ ]*//'`
            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//'`

                  echo $ac_n "checking if compile and link flags for Perl are sane""... $ac_c" 1>&6
echo "configure:1774: checking if compile and link flags for Perl are sane" >&5
      cflags_save=$CFLAGS
      libs_save=$LIBS
      ldflags_save=$LDFLAGS
      CFLAGS="$CFLAGS $perlcppflags"
      LIBS="$LIBS $perllibs"
      LDFLAGS="$perlldflags $LDFLAGS"
      cat > conftest.$ac_ext <<EOF
#line 1782 "configure"
#include "confdefs.h"

int main() {
 
; return 0; }
EOF
if { (eval echo configure:1789: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  echo "$ac_t""yes" 1>&6; perl_ok=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  echo "$ac_t""no: PERL DISABLED" 1>&6; perl_ok=no
fi
rm -f conftest*
      CFLAGS=$cflags_save
      LIBS=$libs_save
      LDFLAGS=$ldflags_save
      if test $perl_ok = yes; then
	if test "X$perlcppflags" != "X"; then
	  PERL_CFLAGS="$perlcppflags"
	fi
	if test "X$perlldflags" != "X"; then
	  LDFLAGS="$perlldflags $LDFLAGS"
	fi
	PERL_LIBS=$perllibs
	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

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

  if test "x$MACOSX" = "xyes"; then
        dir=/System/Library/Perl
    darwindir=$dir/darwin
    if test -d $darwindir; then
      PERL=/usr/bin/perl
    else
            dir=/System/Library/Perl/5.8.1
      darwindir=$dir/darwin-thread-multi-2level
      if test -d $darwindir; then
	PERL=/usr/bin/perl
      fi
    fi
    if test -n "$PERL"; then
      PERL_DIR="$dir"
      PERL_CFLAGS="-DFEAT_PERL -I$darwindir/CORE"
      PERL_OBJ="objects/if_perl.o objects/if_perlsfio.o $darwindir/auto/DynaLoader/DynaLoader.a"
      PERL_LIBS="-L$darwindir/CORE -lperl"
    fi
  fi
fi







echo $ac_n "checking --enable-pythoninterp argument""... $ac_c" 1>&6
echo "configure:1852: 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:1866: 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:1901: 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:1913: 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:1920: 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:1932: 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:1963: 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 "x$MACOSX" = "xyes" && ${vi_cv_path_python} -c \
		"import sys; sys.exit(${vi_cv_var_python_version} < 2.3)"; then
	      vi_cv_path_python_plibs="-framework Python"
	    else
	      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
	
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"
		if test "x$MACOSX" = "xyes"; then
	  PYTHON_OBJ="objects/if_python.o"
	else
	  PYTHON_OBJ="objects/if_python.o objects/py_config.o"
	fi
	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:2036: checking if -pthread should be used" >&5
	threadsafe_flag=
	thread_lib=
	if test "x$MACOSX" != "xyes"; then
	  test "$GCC" = yes && threadsafe_flag="-pthread"
	  if test "`(uname) 2>/dev/null`" = FreeBSD; then
	    threadsafe_flag="-D_THREAD_SAFE"
	    thread_lib="-pthread"
	  fi
	fi
	libs_save_old=$LIBS
	if test -n "$threadsafe_flag"; then
	  cflags_save=$CFLAGS
	  CFLAGS="$CFLAGS $threadsafe_flag"
	  LIBS="$LIBS $thread_lib"
	  cat > conftest.$ac_ext <<EOF
#line 2052 "configure"
#include "confdefs.h"

int main() {
 
; return 0; }
EOF
if { (eval echo configure:2059: \"$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_old
	     
fi
rm -f conftest*
	  CFLAGS=$cflags_save
	else
	  echo "$ac_t""no" 1>&6
	fi

			echo $ac_n "checking if compile and link flags for Python are sane""... $ac_c" 1>&6
echo "configure:2076: checking if compile and link flags for Python are sane" >&5
	cflags_save=$CFLAGS
	libs_save=$LIBS
	CFLAGS="$CFLAGS $PYTHON_CFLAGS"
	LIBS="$LIBS $PYTHON_LIBS"
	cat > conftest.$ac_ext <<EOF
#line 2082 "configure"
#include "confdefs.h"

int main() {
 
; return 0; }
EOF
if { (eval echo configure:2089: \"$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_ok=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  echo "$ac_t""no: PYTHON DISABLED" 1>&6; python_ok=no
fi
rm -f conftest*
	CFLAGS=$cflags_save
	LIBS=$libs_save
	if test $python_ok = yes; then
	  cat >> confdefs.h <<\EOF
#define FEAT_PYTHON 1
EOF

	else
	  LIBS=$libs_save_old
	  PYTHON_SRC=
	  PYTHON_OBJ=
	  PYTHON_LIBS=
	  PYTHON_CFLAGS=
	fi

      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:2128: 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:2142: 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:2154: 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:2193: 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:2231: 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:2266: 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:2273: checking for location of Tcl include" >&5
      if test "x$MACOSX" != "xyes"; then
	tclinc="$tclloc/include $tclloc/include/tcl $tclloc/include/tcl$tclver /usr/local/include /usr/include"
      else
		tclinc="/System/Library/Frameworks/Tcl.framework/Headers"
      fi
      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:2292: checking for location of tclConfig.sh script" >&5
	if test "x$MACOSX" != "xyes"; then
	  tclcnf=`echo $tclinc | sed s/include/lib/g`
	else
	  	  tclcnf="/System/Library/Frameworks/Tcl.framework"
	fi
	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=`eval echo "$TCL_LIB_SPEC $TCL_LIBS"`
	    	    	    TCL_DEFS=`echo $TCL_DEFS | tr ' ' '\012' | sed -e '/^-[^D]/d' -e '/-D[^_]/d' -e 's/-D_/ -D_/' | tr -d '\012'`
	    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:2310: 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 $TCL_DEFS"
	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:2356: 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:2371: 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:2405: 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
      echo $ac_n "checking Ruby header files""... $ac_c" 1>&6
echo "configure:2409: checking Ruby header files" >&5
      rubyhdrdir=`$vi_cv_path_ruby -r mkmf -e 'print Config::CONFIG["archdir"] || $hdrdir' 2>/dev/null`
      if test "X$rubyhdrdir" != "X"; then
	echo "$ac_t""$rubyhdrdir" 1>&6
	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 -f "$rubyhdrdir/$librubyarg"; then
	  librubyarg="$rubyhdrdir/$librubyarg"
	else
	  rubylibdir=`$vi_cv_path_ruby -r rbconfig -e 'print Config.expand(Config::CONFIG["libdir"])'`
	  if test -f "$rubylibdir/$librubyarg"; then
	    librubyarg="$rubylibdir/$librubyarg"
	  elif test "$librubyarg" = "libruby.a"; then
	    	    librubyarg="-lruby"
	  else
	    librubyarg=`$vi_cv_path_ruby -r rbconfig -e "print '$librubyarg'.gsub(/-L\./, %'-L#{Config.expand(Config::CONFIG[\"libdir\"])}')"`
	  fi
	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""not found" 1>&6
      fi
    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:2461: 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:2479: 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 --disable-netbeans argument""... $ac_c" 1>&6
echo "configure:2504: checking --disable-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="yes"
fi

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

int main() {
socket()
; return 0; }
EOF
if { (eval echo configure:2535: \"$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 socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  cat >> confdefs.h <<EOF
#define $ac_tr_lib 1
EOF

  LIBS="-lsocket $LIBS"

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

  echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
echo "configure:2563: 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 2571 "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:2582: \"$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 nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  cat >> confdefs.h <<EOF
#define $ac_tr_lib 1
EOF

  LIBS="-lnsl $LIBS"

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

  echo $ac_n "checking whether compiling netbeans integration is possible""... $ac_c" 1>&6
echo "configure:2610: checking whether compiling netbeans integration is possible" >&5
  cat > conftest.$ac_ext <<EOF
#line 2612 "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 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:2642: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; 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*
else
  echo "$ac_t""yes" 1>&6
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:2667: 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:2689: 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:2707: 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:2719: 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:2730: 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$MACOSX" != "xyes" -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:2750: 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:2788: 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 2850 "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:2855: \"$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 2924 "configure"
#include "confdefs.h"

int main() {
${x_direct_test_function}()
; return 0; }
EOF
if { (eval echo configure:2931: \"$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:3037: 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 3040 "configure"
#include "confdefs.h"

int main() {

; return 0; }
EOF
if { (eval echo configure:3047: \"$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 3063 "configure"
#include "confdefs.h"

int main() {

; return 0; }
EOF
if { (eval echo configure:3070: \"$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:3102: 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 3110 "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:3121: \"$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:3143: 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 3151 "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:3162: \"$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:3191: 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 3196 "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:3219: \"$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:3240: 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 3248 "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:3259: \"$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:3289: 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 3294 "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:3317: \"$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:3338: 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 3346 "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:3357: \"$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:3381: 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 3386 "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:3409: \"$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:3430: 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 3438 "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:3449: \"$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:3473: 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 3478 "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:3501: \"$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:3522: 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 3530 "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:3541: \"$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:3574: 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 3582 "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:3593: \"$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 %%'`"
    X_LIBS="`echo $X_LIBS\  | sed -e 's%-R/usr/lib %%' -e 's%-R /usr/lib %%'`"


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

; return 0; }
EOF
if { (eval echo configure:3658: \"$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:3684: 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 3692 "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:3703: \"$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:3725: 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 3733 "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:3744: \"$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:3767: 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 3775 "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:3786: \"$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:3808: checking if X11 header files implicitly declare return values" >&5
    cflags_save=$CFLAGS
    CFLAGS="$CFLAGS $X_CFLAGS -Werror"
    cat > conftest.$ac_ext <<EOF
#line 3812 "configure"
#include "confdefs.h"
#include <X11/Xlib.h>
int main() {

; return 0; }
EOF
if { (eval echo configure:3819: \"$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 3828 "configure"
#include "confdefs.h"
#include <X11/Xlib.h>
int main() {

; return 0; }
EOF
if { (eval echo configure:3835: \"$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$MACOSX" != "xyes" -a "x$QNX" != "xyes" && enable_gui=no

echo $ac_n "checking --enable-gui argument""... $ac_c" 1>&6
echo "configure:3859: 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


enable_gui_canon=`echo "_$enable_gui" | \
	sed 's/[ _+-]//g;y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`

SKIP_GTK=YES
SKIP_GTK2=YES
SKIP_GNOME=YES
SKIP_KDE=YES
SKIP_MOTIF=YES
SKIP_ATHENA=YES
SKIP_NEXTAW=YES
SKIP_PHOTON=YES
SKIP_BEOS=YES
SKIP_CARBON=YES
GUITYPE=NONE

if test "x$BEOS" = "xyes"; then
  SKIP_BEOS=
  case "$enable_gui_canon" in
    no)		echo "$ac_t""no GUI support" 1>&6
		SKIP_BEOS=YES ;;
    yes|"")	echo "$ac_t""yes - automatic GUI support" 1>&6 ;;
    auto)	echo "$ac_t""auto - automatic GUI support" 1>&6 ;;
    beos)	echo "$ac_t""BeOS GUI support" 1>&6 ;;
    *)		echo "$ac_t""Sorry, $enable_gui GUI is not supported" 1>&6
		SKIP_BEOS=YES ;;
  esac

elif test "x$QNX" = "xyes" -a "x$with_x" = "xno" ; then
  SKIP_PHOTON=
  case "$enable_gui_canon" in
    no)		echo "$ac_t""no GUI support" 1>&6
		SKIP_PHOTON=YES ;;
    yes|"")	echo "$ac_t""yes - automatic GUI support" 1>&6 ;;
    auto)	echo "$ac_t""auto - automatic GUI support" 1>&6 ;;
    photon)	echo "$ac_t""Photon GUI support" 1>&6 ;;
    *)		echo "$ac_t""Sorry, $enable_gui GUI is not supported" 1>&6
		SKIP_PHOTON=YES ;;
  esac

elif test "x$MACOSX" = "xyes" -a "x$with_x" = "xno" ; then
  SKIP_CARBON=
  case "$enable_gui_canon" in
    no)		echo "$ac_t""no GUI support" 1>&6
		SKIP_CARBON=YES ;;
    yes|"")	echo "$ac_t""yes - automatic GUI support" 1>&6 ;;
    auto)	echo "$ac_t""auto - automatic GUI support" 1>&6 ;;
    carbon)	echo "$ac_t""Carbon GUI support" 1>&6 ;;
    *)		echo "$ac_t""Sorry, $enable_gui GUI is not supported" 1>&6
		SKIP_CARBON=YES ;;
  esac

else

  case "$enable_gui_canon" in
    no|none)	echo "$ac_t""no GUI support" 1>&6 ;;
    yes|""|auto)	echo "$ac_t""yes/auto - automatic GUI support" 1>&6
		SKIP_GTK=
		SKIP_GTK2=
		SKIP_GNOME=
		SKIP_MOTIF=
		SKIP_ATHENA=
		SKIP_NEXTAW=
		SKIP_CARBON=;;
    kde|Kde|KDE)	echo "$ac_t""KDE 2.x or 3.x GUI support" 1>&6
    		SKIP_KDE=;;
    gtk)	echo "$ac_t""GTK+ 1.x GUI support" 1>&6
		SKIP_GTK=;;
    gtk2)	echo "$ac_t""GTK+ 2.x GUI support" 1>&6
		SKIP_GTK=
		SKIP_GTK2=;;
    gnome)	echo "$ac_t""GNOME 1.x GUI support" 1>&6
		SKIP_GNOME=
		SKIP_GTK=;;
    gnome2)	echo "$ac_t""GNOME 2.x GUI support" 1>&6
		SKIP_GNOME=
		SKIP_GTK=
		SKIP_GTK2=;;
    motif)	echo "$ac_t""Motif GUI support" 1>&6
		SKIP_MOTIF=;;
    athena)	echo "$ac_t""Athena GUI support" 1>&6
		SKIP_ATHENA=;;
    nextaw)	echo "$ac_t""neXtaw GUI support" 1>&6
		SKIP_NEXTAW=;;
    *)		echo "$ac_t""Sorry, $enable_gui GUI is not supported" 1>&6 ;;
  esac

fi

if test "x$SKIP_KDE" != "xYES" -a "$enable_gui_canon" != "kde"; then
    echo $ac_n "checking whether or not to look for KDE""... $ac_c" 1>&6
echo "configure:3959: checking whether or not to look for KDE" >&5
    # Check whether --enable-kde-check or --disable-kde-check was given.
if test "${enable_kde_check+set}" = set; then
  enableval="$enable_kde_check"
  :
else
  enable_kde_check="no"
fi

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

if test "x$SKIP_GTK" != "xYES" -a "$enable_gui_canon" != "gtk" -a "$enable_gui_canon" != "gtk2"; then
  echo $ac_n "checking whether or not to look for GTK""... $ac_c" 1>&6
echo "configure:3976: 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_GTK2" != "xYES" -a "$enable_gui_canon" != "gtk2" \
				-a "$enable_gui_canon" != "gnome2"; then
  echo $ac_n "checking whether or not to look for GTK+ 2""... $ac_c" 1>&6
echo "configure:3995: checking whether or not to look for GTK+ 2" >&5
  # Check whether --enable-gtk2-check or --disable-gtk2-check was given.
if test "${enable_gtk2_check+set}" = set; then
  enableval="$enable_gtk2_check"
  :
else
  enable_gtk2_check="yes"
fi

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

if test "x$SKIP_GNOME" != "xYES" -a "$enable_gui_canon" != "gnome" \
				 -a "$enable_gui_canon" != "gnome2"; then
  echo $ac_n "checking whether or not to look for GNOME""... $ac_c" 1>&6
echo "configure:4013: 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_canon" != "motif"; then
  echo $ac_n "checking whether or not to look for Motif""... $ac_c" 1>&6
echo "configure:4030: 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_canon" != "athena"; then
  echo $ac_n "checking whether or not to look for Athena""... $ac_c" 1>&6
echo "configure:4047: 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 "x$SKIP_NEXTAW" != "xYES" -a "$enable_gui_canon" != "nextaw"; then
  echo $ac_n "checking whether or not to look for neXtaw""... $ac_c" 1>&6
echo "configure:4064: checking whether or not to look for neXtaw" >&5
  # Check whether --enable-nextaw-check or --disable-nextaw-check was given.
if test "${enable_nextaw_check+set}" = set; then
  enableval="$enable_nextaw_check"
  :
else
  enable_nextaw_check="yes"
fi

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

if test "x$SKIP_CARBON" != "xYES" -a "$enable_gui_canon" != "carbon"; then
  echo $ac_n "checking whether or not to look for Carbon""... $ac_c" 1>&6
echo "configure:4081: checking whether or not to look for Carbon" >&5
  # Check whether --enable-carbon-check or --disable-carbon-check was given.
if test "${enable_carbon_check+set}" = set; then
  enableval="$enable_carbon_check"
  :
else
  enable_carbon_check="yes"
fi

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


if test -z "$SKIP_KDE"; then
# Check whether --with-qt-dir or --without-qt-dir was given.
if test "${with_qt_dir+set}" = set; then
  withval="$with_qt_dir"
  
						 ROOTQT="$withval"
						 MOC="$withval"/bin/moc
						 QT_INCLUDES="$withval"/include
						 QT_LIBS="$withval"/lib
						 
fi


if test "x$ROOTQT" = "x"; then
  if test -z "$QTDIR"; then
            # Extract the first word of "moc", so it can be a program name with args.
set dummy moc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:4115: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_MOC'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$MOC" in
  /*)
  ac_cv_path_MOC="$MOC" # Let the user override the test with a path.
  ;;
  ?:/*)			 
  ac_cv_path_MOC="$MOC" # 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_MOC="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  test -z "$ac_cv_path_MOC" && ac_cv_path_MOC="no"
  ;;
esac
fi
MOC="$ac_cv_path_MOC"
if test -n "$MOC"; then
  echo "$ac_t""$MOC" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

    if test "x$MOC" = "xno"; then
      { echo "configure: error: could not find Qt directory" 1>&2; exit 1; }
    else
      ROOTQT=`echo $MOC | sed 's+/bin/moc++'`
    fi
  else
    ROOTQT="$QTDIR"
  fi
fi
MOC="$ROOTQT"/bin/moc
QT_INCLUDES="$ROOTQT"/include
QT_LIBS="$ROOTQT"/lib

# Check whether --with-qt-includes or --without-qt-includes was given.
if test "${with_qt_includes+set}" = set; then
  withval="$with_qt_includes"
  QT_INCLUDES="$withval"
						
fi


# Check whether --with-qt-libraries or --without-qt-libraries was given.
if test "${with_qt_libraries+set}" = set; then
  withval="$with_qt_libraries"
  QT_LIBS="$withval"
						
fi


if test "x$QT_LIBS" = "x" ; then
	QT_LIBS="$ROOTQT"/lib
fi
if test "x$QT_INCLUDES" = "x" ; then
	QT_INCLUDES="$ROOTQT"/include
fi

echo $ac_n "checking whether or not to use a KDE Toolbar in KVim""... $ac_c" 1>&6
echo "configure:4185: checking whether or not to use a KDE Toolbar in KVim" >&5
# Check whether --enable-kde-toolbar or --disable-kde-toolbar was given.
if test "${enable_kde_toolbar+set}" = set; then
  enableval="$enable_kde_toolbar"
  :
else
  enable_kde_toolbar="no"
fi

if test "x$enable_kde_toolbar" != "xno"; then
  cat >> confdefs.h <<\EOF
#define FEAT_KDETOOLBAR 1
EOF

fi
echo "$ac_t""$enable_kde_toolbar" 1>&6;
fi


if test -z "$SKIP_KDE"; then




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

if test "$enable_rpath" = "yes"; then
	echo "$ac_t""no" 1>&6
else
	echo "$ac_t""yes" 1>&6
fi

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


# Check whether --with-kde-includes or --without-kde-includes was given.
if test "${with_kde_includes+set}" = set; then
  withval="$with_kde_includes"
  KDE_INCLUDES="$withval"
						
fi


# Check whether --with-kde-libraries or --without-kde-libraries was given.
if test "${with_kde_libraries+set}" = set; then
  withval="$with_kde_libraries"
  KDE_LIBS="$withval"
						
fi


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


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

if test "x$kde_config_prefix" != "x" ; then
	KDE_CONFIG=$kde_config_prefix/bin/kde-config
fi

if test "X$KDE_CONFIG" = "X"; then
	# Extract the first word of "kde-config", so it can be a program name with args.
set dummy kde-config; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:4276: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_KDE_CONFIG'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$KDE_CONFIG" in
  /*)
  ac_cv_path_KDE_CONFIG="$KDE_CONFIG" # Let the user override the test with a path.
  ;;
  ?:/*)			 
  ac_cv_path_KDE_CONFIG="$KDE_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_KDE_CONFIG="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  test -z "$ac_cv_path_KDE_CONFIG" && ac_cv_path_KDE_CONFIG="no"
  ;;
esac
fi
KDE_CONFIG="$ac_cv_path_KDE_CONFIG"
if test -n "$KDE_CONFIG"; then
  echo "$ac_t""$KDE_CONFIG" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

else
	echo "$ac_t""Using KDE configuration program $KDE_CONFIG" 1>&6
fi

if test "X$KDE_CONFIG" != "X" ; then
	
	if test "X$KDE_CONFIG" != "X"; then
	  min_kde_version=2.0.0
	  echo $ac_n "checking for KDE version >= $min_kde_version""... $ac_c" 1>&6
echo "configure:4318: checking for KDE version >= $min_kde_version" >&5
	  no_kde=""
	  if test "$KDE_CONFIG" = "no" ; then
		no_kde=yes
	  else
		KDE_PREFIX=`$KDE_CONFIG --prefix`
		if test "x$KDE_LIBS" = "x"; then
		  KDE_LIBS="$KDE_PREFIX/lib"
		fi
		if test "x$KDE_INCLUDES" = "x"; then
		  KDE_INCLUDES="$KDE_PREFIX/include"
		  if test -d "$KDE_INCLUDES/kde"; then
		    KDE_INCLUDES="$KDE_INCLUDES/kde"
		  fi
		fi
		kde_major_version=`$KDE_CONFIG --version | grep KDE | \
sed 's/KDE:\ //' | sed 's/\([0-9]*\).\([0-9]*.*\)/\1/'`
		kde_minor_version=`$KDE_CONFIG --version | grep KDE | \
sed 's/KDE:\ //' | sed 's/\([0-9]*\).\([0-9]*.*\)/\2/'`

		qt_major_version=`$KDE_CONFIG --version | grep Qt | sed -e \
's/Qt:\ //' | sed 's/\([0-9]*\).\([0-9]*.*\)/\1/'`
		qt_minor_version=`$KDE_CONFIG --version | grep Qt | sed -e \
's/Qt:\ //' | sed 's/\([0-9]*\).\([0-9]*.*\)/\2/'`

								if test "x$enable-kdetest" = "xyes" ; then
			ac_save_LIBS="$LIBS"
			LIBS="$LIBS $KDE_LIBS"

						if test "$cross_compiling" = yes; then
  echo $ac_n "cross compiling KDE ? ? how can i remove that ? :)"
else
  cat > conftest.$ac_ext <<EOF
#line 4351 "configure"
#include "confdefs.h"

#include <stdio.h>
int
main()
{ return 0; }
			
EOF
if { (eval echo configure:4360: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  :
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  no_kde=yes
fi
rm -fr conftest*
fi

			LIBS="$ac_save_LIBS"
		fi
	fi
	if test "x$no_kde" = x ; then
	  echo "$ac_t""found KDE $kde_major_version.$kde_minor_version" 1>&6
	  GUI_LIB_LOC="-L$KDE_LIBS -lkdeui -lkdecore -lDCOP"
							 GUI_INC_LOC="-I$KDE_INCLUDES"
							 KDEDIR="$KDE_PREFIX"
	else
	  echo "$ac_t""no" 1>&6
	  KDE_LIBS=""
	  :
	fi
else
  echo "$ac_t""no" 1>&6
  KDE_LIBS=""
  :
fi





	if test "x$KDE_PREFIX" != "x"; then
		echo $ac_n "checking for QT version $qt_major_version.x""... $ac_c" 1>&6
echo "configure:4397: checking for QT version $qt_major_version.x" >&5
		if test "x$ROOTQT" != "x" ; then
			GUI_INC_LOC="-I$QT_INCLUDES $GUI_INC_LOC"
			if test $qt_major_version -lt 2; then
				{ echo "configure: error: Your QT version is prior to 2.0; KDE 2.x and 3.x require at least QT 2" 1>&2; exit 1; }
			fi
						if test "`(uname) 2>/dev/null`" = "FreeBSD"; then
				CFLAGS="$CFLAGS -D_THREAD_SAFE"
				CXXFLAGS="$CXXFLAGS -D_THREAD_SAFE"
				GUI_LIB_LOC="$GUI_LIB_LOC -pthread"
				LIBS="$LIBS -pthread"
			fi

						if test "x$enable_rpath" = "xyes"; then
				if test $qt_major_version = 2; then
					GUI_LIB_LOC="-L$KDE_LIBS -lkfile -L$QT_LIBS -lqt $GUI_LIB_LOC \
-Wl,--rpath -Wl,$KDE_LIBS -Wl,--rpath -Wl,$QT_LIBS"
				else
					GUI_LIB_LOC="-L$KDE_LIBS -lkio -L$QT_LIBS -lqt-mt $GUI_LIB_LOC \
-Wl,--rpath -Wl,$KDE_LIBS -Wl,--rpath -Wl,$QT_LIBS"
				fi
			else
				if test $qt_major_version = 2; then
					GUI_LIB_LOC="-L$KDE_LIBS -lkfile -L$QT_LIBS -lqt $GUI_LIB_LOC"
				else
					GUI_LIB_LOC="-L$KDE_LIBS -lkio -L$QT_LIBS -lqt-mt $GUI_LIB_LOC"
				fi
			fi

						GUI_INC_LOC="`echo $GUI_INC_LOC\ | sed 's%-I/usr/include %%'`"

			echo "$ac_t""found $qt_major_version.$qt_minor_version in $ROOTQT" 1>&6

                                                                     
  qt_incdir=NO
  for i in $QT_INCLUDES;
    do
      for j in qstyle.h;
      do
       echo "configure: 4436: $i/$j" >&5
       if test -r "$i/$j"; then
         echo "taking that" >&5
         qt_incdir=$i
         break 2
       fi
      done
    done

                       if test "x$qt_incdir" = "xNO"; then
                               { echo "configure: error: Could not find Qt headers in $QT_INCLUDES" 1>&2; exit 1; }
                       fi
                       
  kde_incdir=NO
  for i in $KDE_INCLUDES;
    do
      for j in kapplication.h;
      do
       echo "configure: 4454: $i/$j" >&5
       if test -r "$i/$j"; then
         echo "taking that" >&5
         kde_incdir=$i
         break 2
       fi
      done
    done

                       if test "x$kde_incdir" = "xNO"; then
                               { echo "configure: error: Could not find KDE headers in $KDE_INCLUDES" 1>&2; exit 1; }
                       fi

                       
                       ac_ext=C
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cxx_cross

                       ac_save_LIBS="$LIBS"
                       LIBS="$GUI_LIB_LOC"
                       ac_save_CXXFLAGS="$CXXFLAGS"
                       CXXFLAGS="$CXXFLAGS $GUI_INC_LOC"
                       echo $ac_n "checking whether Qt libraries are usable""... $ac_c" 1>&6
echo "configure:4480: checking whether Qt libraries are usable" >&5
                       cat > conftest.$ac_ext <<EOF
#line 4482 "configure"
#include "confdefs.h"
#include <qapplication.h>
int main() {

                           int argc;
                           char** argv;
                           QApplication app(argc, argv);
                           
; return 0; }
EOF
if { (eval echo configure:4493: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; 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;{ echo "configure: error: Qt fails to link a simple application" 1>&2; exit 1; }
fi
rm -f conftest*

                       echo $ac_n "checking whether KDE libraries are usable""... $ac_c" 1>&6
echo "configure:4505: checking whether KDE libraries are usable" >&5
                       cat > conftest.$ac_ext <<EOF
#line 4507 "configure"
#include "confdefs.h"
#include <kapplication.h>
int main() {

                           int argc;
                           char** argv;
                           KApplication app(argc, argv);
                           
; return 0; }
EOF
if { (eval echo configure:4518: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; 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;{ echo "configure: error: KDE fails to link a simple application" 1>&2; exit 1; }
fi
rm -f conftest*

                       LIBS="$ac_save_LIBS"
                       CXXFLAGS="$ac_save_CXXFLAGS"
                       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



			SKIP_GTK=YES
			SKIP_ATHENA=YES
			SKIP_MOTIF=YES
			GUITYPE=KDE
			
			
			
			
			
			cat >> confdefs.h <<\EOF
#define FEAT_GUI_KDE 1
EOF

		else
			{ echo "configure: error: Detected QT version mismatched" 1>&2; exit 1; }
		fi
	else
		{ echo "configure: error: Could not find KDE installation prefix" 1>&2; exit 1; }
	fi
fi
fi

if test "x$MACOSX" = "xyes" -a -z "$SKIP_CARBON" -a "x$CARBON" = "xyes"; then
  echo $ac_n "checking for Carbon GUI""... $ac_c" 1>&6
echo "configure:4564: checking for Carbon GUI" >&5
    echo "$ac_t""yes" 1>&6;
  GUITYPE=CARBONGUI
    SKIP_GTK=YES;
  SKIP_GTK2=YES;
  SKIP_GNOME=YES;
  SKIP_MOTIF=YES;
  SKIP_ATHENA=YES;
  SKIP_NEXTAW=YES;
  SKIP_PHOTON=YES;
  SKIP_BEOS=YES;
  SKIP_CARBON=YES
fi









if test -z "$SKIP_GTK"; then

  echo $ac_n "checking --with-gtk-prefix argument""... $ac_c" 1>&6
echo "configure:4589: 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:4600: 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:4611: 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:4638: 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:4675: 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$PKG_CONFIG" = "X"; then
    # Extract the first word of "pkg-config", so it can be a program name with args.
set dummy pkg-config; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:4717: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_PKG_CONFIG'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$PKG_CONFIG" in
  /*)
  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
  ;;
  ?:/*)			 
  ac_cv_path_PKG_CONFIG="$PKG_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_PKG_CONFIG="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
  ;;
esac
fi
PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
if test -n "$PKG_CONFIG"; then
  echo "$ac_t""$PKG_CONFIG" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

  fi

  if test "x$GTK_CONFIG:$PKG_CONFIG" != "xno:no"; then
            if test "X$SKIP_GTK2" != "XYES"; then
      
  if test "X$GTK_CONFIG" != "Xno" -o "X$PKG_CONFIG" != "Xno"; then
  {
    min_gtk_version=2.2.0
    echo $ac_n "checking for GTK - version >= $min_gtk_version""... $ac_c" 1>&6
echo "configure:4759: checking for GTK - version >= $min_gtk_version" >&5
    no_gtk=""
    if (test "X$SKIP_GTK2" != "XYES" -a "X$PKG_CONFIG" != "Xno") \
	  && $PKG_CONFIG --exists gtk+-2.0; then
    {
                        GTK_CFLAGS=`$PKG_CONFIG --cflags gtk+-2.0`
      GTK_LIBDIR=`$PKG_CONFIG --libs-only-L gtk+-2.0`
      GTK_LIBS=`$PKG_CONFIG --libs gtk+-2.0`
      gtk_major_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
	     sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\1/'`
      gtk_minor_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
	     sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\2/'`
      gtk_micro_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
	     sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\3/'`
    }
    elif test "X$GTK_CONFIG" != "Xno"; then
    {
      GTK_CFLAGS=`$GTK_CONFIG $gtk_config_args --cflags`
      GTK_LIBDIR=
      GTK_LIBS=`$GTK_CONFIG $gtk_config_args --libs`
      gtk_major_version=`$GTK_CONFIG $gtk_config_args --version | \
	     sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\1/'`
      gtk_minor_version=`$GTK_CONFIG $gtk_config_args --version | \
	     sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\2/'`
      gtk_micro_version=`$GTK_CONFIG $gtk_config_args --version | \
	     sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\3/'`
    }
    else
      no_gtk=yes
    fi

    if test "x$enable_gtktest" = "xyes" -a "x$no_gtk" = "x"; 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 4802 "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:4834: \"$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
    if test "x$no_gtk" = x ; then
      if test "x$enable_gtktest" = "xyes"; then
	echo "$ac_t""yes; found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" 1>&6
      else
	echo "$ac_t""found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" 1>&6
      fi
      GUI_LIB_LOC="$GTK_LIBDIR"
		   GTK_LIBNAME="$GTK_LIBS"
		  GUI_INC_LOC="$GTK_CFLAGS"
    else
    {
      echo "$ac_t""no" 1>&6
      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_NEXTAW=YES
	SKIP_MOTIF=YES
	GUITYPE=GTK
	
      fi
    fi

                if test "x$GUITYPE" != "xGTK"; then
      SKIP_GTK2=YES
      
  if test "X$GTK_CONFIG" != "Xno" -o "X$PKG_CONFIG" != "Xno"; then
  {
    min_gtk_version=1.1.16
    echo $ac_n "checking for GTK - version >= $min_gtk_version""... $ac_c" 1>&6
echo "configure:4893: checking for GTK - version >= $min_gtk_version" >&5
    no_gtk=""
    if (test "X$SKIP_GTK2" != "XYES" -a "X$PKG_CONFIG" != "Xno") \
	  && $PKG_CONFIG --exists gtk+-2.0; then
    {
                        GTK_CFLAGS=`$PKG_CONFIG --cflags gtk+-2.0`
      GTK_LIBDIR=`$PKG_CONFIG --libs-only-L gtk+-2.0`
      GTK_LIBS=`$PKG_CONFIG --libs gtk+-2.0`
      gtk_major_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
	     sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\1/'`
      gtk_minor_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
	     sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\2/'`
      gtk_micro_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
	     sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\3/'`
    }
    elif test "X$GTK_CONFIG" != "Xno"; then
    {
      GTK_CFLAGS=`$GTK_CONFIG $gtk_config_args --cflags`
      GTK_LIBDIR=
      GTK_LIBS=`$GTK_CONFIG $gtk_config_args --libs`
      gtk_major_version=`$GTK_CONFIG $gtk_config_args --version | \
	     sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\1/'`
      gtk_minor_version=`$GTK_CONFIG $gtk_config_args --version | \
	     sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\2/'`
      gtk_micro_version=`$GTK_CONFIG $gtk_config_args --version | \
	     sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\3/'`
    }
    else
      no_gtk=yes
    fi

    if test "x$enable_gtktest" = "xyes" -a "x$no_gtk" = "x"; 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 4936 "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:4968: \"$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
    if test "x$no_gtk" = x ; then
      if test "x$enable_gtktest" = "xyes"; then
	echo "$ac_t""yes; found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" 1>&6
      else
	echo "$ac_t""found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" 1>&6
      fi
      GTK_LIBNAME="$GTK_LIBS"
		  GUI_INC_LOC="$GTK_CFLAGS"
    else
    {
      echo "$ac_t""no" 1>&6
      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_NEXTAW=YES
	SKIP_MOTIF=YES
	GUITYPE=GTK
	
      fi
    fi
  fi
    if test "x$GUITYPE" = "xGTK"; then
    if test "$gtk_major_version" = 1 -a "0$gtk_minor_version" -lt 2 \
	 -o "$gtk_major_version" = 1 -a "$gtk_minor_version" = 2 -a "0$gtk_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 "0$gtk_major_version" -ge 2; then
	cat >> confdefs.h <<\EOF
#define HAVE_GTK2 1
EOF

	if test "$gtk_minor_version" = 1 -a "0$gtk_micro_version" -ge 1 \
		|| test "0$gtk_minor_version" -ge 2 \
		|| test "0$gtk_major_version" -gt 2; then
	  cat >> confdefs.h <<\EOF
#define HAVE_GTK_MULTIHEAD 1
EOF

	fi
      fi
                        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 -a "0$gtk_major_version" -ge 2; then
  {
    echo $ac_n "checking for libgnomeui-2.0""... $ac_c" 1>&6
echo "configure:5086: checking for libgnomeui-2.0" >&5
    if $PKG_CONFIG --exists libgnomeui-2.0; then
      echo "$ac_t""yes" 1>&6
      GNOME_LIBS=`$PKG_CONFIG --libs-only-l libgnomeui-2.0`
      GNOME_LIBDIR=`$PKG_CONFIG --libs-only-L libgnomeui-2.0`
      GNOME_INCLUDEDIR=`$PKG_CONFIG --cflags libgnomeui-2.0`
      have_gnome=yes
    else
      echo "$ac_t""not found" 1>&6
      if test "x" = xfail; then
	{ echo "configure: error: Could not find libgnomeui-2.0 via pkg-config" 1>&2; exit 1; }
      fi
    fi
  }
  elif 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:5105: 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:5142: 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:5167: 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:5205: 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:5229: 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:5246: 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 "$try"/libXm.dylib; 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
  SKIP_NEXTAW=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:5289: checking if Athena header files can be found" >&5
  cflags_save=$CFLAGS
  CFLAGS="$CFLAGS $X_CFLAGS"
  cat > conftest.$ac_ext <<EOF
#line 5293 "configure"
#include "confdefs.h"

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

; return 0; }
EOF
if { (eval echo configure:5302: \"$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_NEXTAW"; then
  echo $ac_n "checking if neXtaw header files can be found""... $ac_c" 1>&6
echo "configure:5321: checking if neXtaw header files can be found" >&5
  cflags_save=$CFLAGS
  CFLAGS="$CFLAGS $X_CFLAGS"
  cat > conftest.$ac_ext <<EOF
#line 5325 "configure"
#include "confdefs.h"

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

; return 0; }
EOF
if { (eval echo configure:5334: \"$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_NEXTAW=YES 
fi
rm -f conftest*
  CFLAGS=$cflags_save
fi

if test -z "$SKIP_NEXTAW"; then
  GUITYPE=NEXTAW
fi

if test -z "$SKIP_ATHENA" -o -z "$SKIP_NEXTAW" -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:5362: 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 5370 "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:5381: \"$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 wslen in -lw""... $ac_c" 1>&6
echo "configure:5402: checking for wslen in -lw" >&5
ac_lib_var=`echo w'_'wslen | 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="-lw $GUI_X_LIBS -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS"
cat > conftest.$ac_ext <<EOF
#line 5410 "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 wslen();

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

  echo $ac_n "checking for dlsym in -ldl""... $ac_c" 1>&6
echo "configure:5442: checking for dlsym in -ldl" >&5
ac_lib_var=`echo dl'_'dlsym | 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="-ldl $GUI_X_LIBS -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS"
cat > conftest.$ac_ext <<EOF
#line 5450 "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 dlsym();

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

  echo $ac_n "checking for XmuCreateStippledPixmap in -lXmu""... $ac_c" 1>&6
echo "configure:5482: 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 5490 "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:5501: \"$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:5523: 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 5531 "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:5542: \"$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:5566: 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 "$enable_xsmp" = "yes"; then
  cppflags_save=$CPPFLAGS
  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
  for ac_hdr in X11/SM/SMlib.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:5596: 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 5601 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:5606: \"$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_ATHENA" -o -z "$SKIP_NEXTAW" -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:5643: 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 5648 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:5653: \"$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:5682: checking for XIMText in X11/Xlib.h" >&5
    cat > conftest.$ac_ext <<EOF
#line 5684 "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_NEXTAW" -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:5715: 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 5720 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:5725: \"$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:5761: 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 5766 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:5771: \"$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 "x$GUITYPE:$enable_fontset" = "xGTK:yes" -a "0$gtk_major_version" -ge 2; then
  echo "$ac_t""GTK+ 2 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:5864: 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 5869 "configure"
#include "confdefs.h"
#include <ctype.h>
main() { exit(toupper('A') == 'A' && tolower('z') == 'z'); }
EOF
if { (eval echo configure:5874: \"$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:5891: checking whether __DATE__ and __TIME__ work" >&5
cat > conftest.$ac_ext <<EOF
#line 5893 "configure"
#include "confdefs.h"

int main() {
printf("(" __DATE__ " " __TIME__ ")");
; return 0; }
EOF
if { (eval echo configure:5900: \"$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:5916: 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 5921 "configure"
#include "confdefs.h"
#include <elf.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:5926: \"$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:5949: 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 5957 "configure"
#include "confdefs.h"

int main() {
main()
; return 0; }
EOF
if { (eval echo configure:5964: \"$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:5998: 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 6003 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <$ac_hdr>
int main() {
DIR *dirp = 0;
; return 0; }
EOF
if { (eval echo configure:6011: \"$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:6036: 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 6044 "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:6055: \"$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:6077: 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 6085 "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:6096: \"$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:6120: 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 6125 "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:6133: \"$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 6150 "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 6168 "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 6189 "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:6200: \"$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:6224: 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 6229 "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:6245: \"$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:6268: checking for sys/wait.h that defines union wait" >&5
  cat > conftest.$ac_ext <<EOF
#line 6270 "configure"
#include "confdefs.h"
#include <sys/wait.h>
int main() {
union wait xx, yy; xx = yy
; return 0; }
EOF
if { (eval echo configure:6277: \"$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 \
	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 pthread_np.h \
	sys/acl.h sys/access.h sys/sysctl.h sys/sysinfo.h wchar.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:6308: 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 6313 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:6318: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
 
else
  echo "$ac_t""no" 1>&6
fi
done


if test "x$MACOSX" != "xyes"; then
  for ac_hdr in strings.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:6350: 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 6355 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:6360: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
 
else
  echo "$ac_t""no" 1>&6
fi
done

fi

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

#if defined(_AIX) && !defined(_AIX51) && !defined(_NO_PROTO)
# define _NO_PROTO	/* like in os_unix.h, causes conflict for AIX (Winn) */
			/* but don't do it on AIX 5.1 (Uribarri) */
#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:6414: \"$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:6432: 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 6438 "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 6456 "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:6478: 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 6483 "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:6532: \"$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:6553: 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 6558 "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:6586: 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 6591 "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:6619: 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 6624 "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:6652: 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 6657 "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:6685: 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 6690 "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:6719: 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 6724 "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:6733: \"$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:6754: 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 6759 "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:6787: 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 6792 "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:6821: 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 6826 "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:6858: 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 6863 "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:6893: checking whether stack_t has an ss_base field" >&5
cat > conftest.$ac_ext <<EOF
#line 6895 "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:6910: \"$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:6926: 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:6944: 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 6952 "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:6963: \"$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 6995 "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:7003: \"$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:7025: 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 7030 "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:7039: \"$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:7060: 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 7065 "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:7074: \"$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:7092: checking whether termcap.h contains ospeed" >&5
cat > conftest.$ac_ext <<EOF
#line 7094 "configure"
#include "confdefs.h"

#ifdef HAVE_TERMCAP_H
# include <termcap.h>
#endif
			
int main() {
ospeed = 20000
; return 0; }
EOF
if { (eval echo configure:7105: \"$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:7117: checking whether ospeed can be extern" >&5
	cat > conftest.$ac_ext <<EOF
#line 7119 "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:7131: \"$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:7149: checking whether termcap.h contains UP, BC and PC" >&5
cat > conftest.$ac_ext <<EOF
#line 7151 "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:7162: \"$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:7174: checking whether UP, BC and PC can be extern" >&5
	cat > conftest.$ac_ext <<EOF
#line 7176 "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:7188: \"$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:7206: checking whether tputs() uses outfuntype" >&5
cat > conftest.$ac_ext <<EOF
#line 7208 "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:7219: \"$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:7234: checking whether sys/select.h and sys/time.h may both be included" >&5
cat > conftest.$ac_ext <<EOF
#line 7236 "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:7246: \"$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:7263: 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:7275: checking for SVR4 ptys" >&5
if test -c /dev/ptmx ; then
  cat > conftest.$ac_ext <<EOF
#line 7278 "configure"
#include "confdefs.h"

int main() {
ptsname(0);grantpt(0);unlockpt(0);
; return 0; }
EOF
if { (eval echo configure:7285: \"$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:7303: checking for ptyranges" >&5
if test -d /dev/ptym ; then
  pdir='/dev/ptym'
else
  pdir='/dev'
fi
cat > conftest.$ac_ext <<EOF
#line 7310 "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:7344: 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 7350 "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:7382: \"$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:7413: 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 7418 "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:7435: \"$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:7467: checking for struct sigcontext" >&5
cat > conftest.$ac_ext <<EOF
#line 7469 "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:7483: \"$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:7499: 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 7504 "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:7516: \"$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 snprintf 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:7541: 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 7546 "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:7569: \"$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:7595: checking for st_blksize" >&5
cat > conftest.$ac_ext <<EOF
#line 7597 "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:7609: \"$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:7624: 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 7629 "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:7635: \"$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:7652: checking for iconv_open()" >&5
save_LIBS="$LIBS"
LIBS="$LIBS -liconv"
cat > conftest.$ac_ext <<EOF
#line 7656 "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:7667: \"$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 7679 "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:7690: \"$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:7708: checking for nl_langinfo(CODESET)" >&5
cat > conftest.$ac_ext <<EOF
#line 7710 "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:7721: \"$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:7736: checking --disable-acl argument" >&5
# Check whether --enable-acl or --disable-acl was given.
if test "${enable_acl+set}" = set; then
  enableval="$enable_acl"
  :
else
  enable_acl="yes"
fi

if test "$enable_acl" = "yes"; then
echo "$ac_t""no" 1>&6
echo $ac_n "checking for acl_get_file in -lposix1e""... $ac_c" 1>&6
echo "configure:7748: 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 7756 "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:7767: \"$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:7786: 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 7794 "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:7805: \"$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:7822: 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 7830 "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:7841: \"$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:7869: checking for POSIX ACL support" >&5
cat > conftest.$ac_ext <<EOF
#line 7871 "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:7885: \"$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:7900: checking for Solaris ACL support" >&5
cat > conftest.$ac_ext <<EOF
#line 7902 "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:7913: \"$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:7928: checking for AIX ACL support" >&5
cat > conftest.$ac_ext <<EOF
#line 7930 "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:7952: \"$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*
else
  echo "$ac_t""yes" 1>&6
fi

echo $ac_n "checking --disable-gpm argument""... $ac_c" 1>&6
echo "configure:7970: 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:7983: 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 7989 "configure"
#include "confdefs.h"
#include <gpm.h>
	    #include <linux/keyboard.h>
int main() {
Gpm_GetLibVersion(NULL);
; return 0; }
EOF
if { (eval echo configure:7997: \"$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 vsnprintf()""... $ac_c" 1>&6
echo "configure:8024: checking for vsnprintf()" >&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 8029 "configure"
#include "confdefs.h"

#include <stdio.h>
#include <stdarg.h>
	/* Check use of vsnprintf() */
	void warn(char *fmt, ...);
	void warn(char *fmt, ...)
	{
	  va_list ap; char buf[20];
	  va_start(ap, fmt);
	  vsnprintf(buf, 20, fmt, ap);
	  va_end(ap);
	}
	main()
	{
	warn("testing %s\n", "a very long string that won't fit");
	exit(0);
	}
	    
EOF
if { (eval echo configure:8050: \"$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 HAVE_VSNPRINTF 1
EOF
 echo "$ac_t""yes" 1>&6
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  echo "$ac_t""no" 1>&6
fi
rm -fr conftest*
fi



echo $ac_n "checking for rename""... $ac_c" 1>&6
echo "configure:8068: checking for rename" >&5
cat > conftest.$ac_ext <<EOF
#line 8070 "configure"
#include "confdefs.h"
#include <stdio.h>
int main() {
rename("this", "that")
; return 0; }
EOF
if { (eval echo configure:8077: \"$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:8092: checking for sysctl" >&5
cat > conftest.$ac_ext <<EOF
#line 8094 "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:8109: \"$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:8124: checking for sysinfo" >&5
cat > conftest.$ac_ext <<EOF
#line 8126 "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:8139: \"$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:8154: checking for sysconf" >&5
cat > conftest.$ac_ext <<EOF
#line 8156 "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:8165: \"$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:8181: 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 8189 "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:8200: \"$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:8221: 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 8241 "configure"
#include "confdefs.h"
#define mch_memmove(s,d,l) memmove(d,s,l) $bcopy_test_prog
EOF
if { (eval echo configure:8245: \"$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 8259 "configure"
#include "confdefs.h"
#define mch_memmove(s,d,l) bcopy(d,s,l) $bcopy_test_prog
EOF
if { (eval echo configure:8263: \"$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 8277 "configure"
#include "confdefs.h"
#define mch_memmove(s,d,l) memcpy(d,s,l) $bcopy_test_prog
EOF
if { (eval echo configure:8281: \"$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:8313: checking whether X_LOCALE needed" >&5
    cat > conftest.$ac_ext <<EOF
#line 8315 "configure"
#include "confdefs.h"
#include <X11/Xlocale.h>
int main() {

; return 0; }
EOF
if { (eval echo configure:8322: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  cat > conftest.$ac_ext <<EOF
#line 8325 "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:8336: \"$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:8363: 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 8371 "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:8382: \"$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:8404: 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:8421: 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:8433: 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:8448: 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:8475: checking for NLS" >&5
  if test -f po/Makefile; then
    have_gettext="no"
    if test -n "$MSGFMT"; then
      cat > conftest.$ac_ext <<EOF
#line 8480 "configure"
#include "confdefs.h"
#include <libintl.h>
int main() {
gettext("Test");
; return 0; }
EOF
if { (eval echo configure:8487: \"$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 8497 "configure"
#include "confdefs.h"
#include <libintl.h>
int main() {
gettext("Test");
; return 0; }
EOF
if { (eval echo configure:8504: \"$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:8530: 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 8535 "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:8558: \"$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:8583: checking for _nl_msg_cat_cntr" >&5
      cat > conftest.$ac_ext <<EOF
#line 8585 "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:8593: \"$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/Makefile" - 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:8616: 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 8621 "configure"
#include "confdefs.h"
#include <dlfcn.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:8626: \"$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:8647: 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 8652 "configure"
#include "confdefs.h"
#include <dl.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:8657: \"$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:8686: checking for dlopen()" >&5
  cat > conftest.$ac_ext <<EOF
#line 8688 "configure"
#include "confdefs.h"

int main() {

		extern void* dlopen();
		dlopen();
      
; return 0; }
EOF
if { (eval echo configure:8698: \"$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:8711: checking for dlopen() in -ldl" >&5
	      olibs=$LIBS
	      LIBS="$LIBS -ldl"
	      cat > conftest.$ac_ext <<EOF
#line 8715 "configure"
#include "confdefs.h"

int main() {

				extern void* dlopen();
				dlopen();
		 
; return 0; }
EOF
if { (eval echo configure:8725: \"$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:8743: checking for dlsym()" >&5
  cat > conftest.$ac_ext <<EOF
#line 8745 "configure"
#include "confdefs.h"

int main() {

		extern void* dlsym();
		dlsym();
      
; return 0; }
EOF
if { (eval echo configure:8755: \"$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:8768: checking for dlsym() in -ldl" >&5
	      olibs=$LIBS
	      LIBS="$LIBS -ldl"
	      cat > conftest.$ac_ext <<EOF
#line 8772 "configure"
#include "confdefs.h"

int main() {

				extern void* dlsym();
				dlsym();
		 
; return 0; }
EOF
if { (eval echo configure:8782: \"$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:8805: checking for shl_load()" >&5
  cat > conftest.$ac_ext <<EOF
#line 8807 "configure"
#include "confdefs.h"

int main() {

		extern void* shl_load();
		shl_load();
     
; return 0; }
EOF
if { (eval echo configure:8817: \"$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:8830: checking for shl_load() in -ldld" >&5
	  olibs=$LIBS
	  LIBS="$LIBS -ldld"
	  cat > conftest.$ac_ext <<EOF
#line 8834 "configure"
#include "confdefs.h"

int main() {

			extern void* shl_load();
			shl_load();
	     
; return 0; }
EOF
if { (eval echo configure:8844: \"$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:8866: 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 8871 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:8876: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
 
else
  echo "$ac_t""no" 1>&6
fi
done


if test "x$MACOSX" = "xyes" -a -n "$PERL"; then
    if echo $LIBS | grep -e '-ldl' >/dev/null; then
    LIBS=`echo $LIBS | sed s/-ldl//`
    PERL_LIBS="$PERL_LIBS -ldl"
  fi
fi

if test "x$MACOSX" = "xyes" && test "x$CARBON" = "xyes" \
	&& test "x$GUITYPE" != "xCARBONGUI"; then
  echo $ac_n "checking whether we need -framework Carbon""... $ac_c" 1>&6
echo "configure:8913: checking whether we need -framework Carbon" >&5
    if test "x$enable_multibyte" = "xyes" || test "x$features" == "xbig" \
	|| test "x$features" = "xhuge"; then
    LIBS="$LIBS -framework Carbon"
    echo "$ac_t""yes" 1>&6
  else
    echo "$ac_t""no" 1>&6
  fi
fi


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_mzscheme@%$vi_cv_path_mzscheme%g
s%@MZSCHEME_SRC@%$MZSCHEME_SRC%g
s%@MZSCHEME_OBJ@%$MZSCHEME_OBJ%g
s%@MZSCHEME_PRO@%$MZSCHEME_PRO%g
s%@MZSCHEME_LIBS@%$MZSCHEME_LIBS%g
s%@MZSCHEME_CFLAGS@%$MZSCHEME_CFLAGS%g
s%@vi_cv_path_perl@%$vi_cv_path_perl%g
s%@vi_cv_perllib@%$vi_cv_perllib%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%@PERL_LIBS@%$PERL_LIBS%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%@MOC@%$MOC%g
s%@KDE_CONFIG@%$KDE_CONFIG%g
s%@KDE_LIBS@%$KDE_LIBS%g
s%@KDE_INCLUDES@%$KDE_INCLUDES%g
s%@KDE_PREFIX@%$KDE_PREFIX%g
s%@QT_LIBS@%$QT_LIBS%g
s%@QT_INCLUDES@%$QT_INCLUDES%g
s%@ROOTQT@%$ROOTQT%g
s%@GTK_CONFIG@%$GTK_CONFIG%g
s%@GTK12_CONFIG@%$GTK12_CONFIG%g
s%@PKG_CONFIG@%$PKG_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


