#!/bin/sh
# From configure.in 1.13 6/9/94

#!/bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated automatically using autoconf version 1.10 
# Copyright (C) 1991, 1992, 1993, 1994 Free Software Foundation, Inc.

# This configure script is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as published
# by the Free Software Foundation; either version 2, or (at your option)
# any later version.

# This script is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General
# Public License for more details.

# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

# Save the original args to write them into config.status later.
configure_args="$*"

# Only options that might do something get documented.
ac_usage="Usage: configure [options] [host]
Options: [defaults in brackets after descriptions]
--build=BUILD		configure for building on BUILD [BUILD=HOST]
--disable-FEATURE	do not include FEATURE (same as --enable-FEATURE=no)
--enable-FEATURE[=ARG]	include FEATURE [ARG=yes]
--exec-prefix=PREFIX	install host dependent files in PREFIX [/usr/local]
--help			print this message
--host=HOST		configure for HOST [guessed]
--prefix=PREFIX		install host independent files in PREFIX [/usr/local]
--quiet, --silent	do not print \`checking for...' messages
--srcdir=DIR		find the sources in DIR [configure dir or ..]
--target=TARGET		configure for TARGET [TARGET=HOST]
--verbose		print results of checks
--version		print the version of autoconf that created configure
--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"

# Initialize some variables set by options.
# The variables have the same names as the options, with
# dashes changed to underlines.
build=NONE
exec_prefix=
host=NONE
no_create=
nonopt=NONE
norecursion=
prefix=
program_prefix=
program_suffix=
program_transform_name=
silent=
srcdir=
target=NONE
verbose=
x_includes=
x_libraries=

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

  # Accept (but ignore some of) the important Cygnus configure
  # options, so we can diagnose typos.

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

  case "$ac_option" in

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

  -disable-* | --disable-*)
    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
    # Reject names that aren't valid shell variable names.
    if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
      echo "configure: $ac_feature: invalid feature name" >&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 aren't valid shell variable names.
    if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
      echo "configure: $ac_feature: invalid feature name" >&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'" ;;

  # For backward compatibility, recognize -exec-prefix and --exec_prefix.
  -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)
    with_gas=yes ;; # Obsolete; use --with-gas.

  -help | --help | --hel | --he)
    cat << EOF
$ac_usage
Application options:
--enable-experimental         to include experimental code
--enable-command-history      to include command history
--enable-debug-printout       to include add debug print outs
--enable-long-labels          to have 32-bits LABELS
--enable-long-seek            to have 32-bits SEEK offsets
--disable-encrypted-passwd    to not use encrypted passwords
--disable-debug               to avoid "-g" 
--disable-locks               to not use file locking
--with-db-dir=DIR             to install database in DIR (exec_prefix/database)
--with-owner=username         default is $USER
--with-port-number=number     default is 6073
--with-rpc-prog=number        default is 572662306
--with-host=hostname          to set another host (current host)
--with-x11-link-flags         to add extra X link flags
EOF
    exit 0 ;;

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

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

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

  -norecursion | --norecursion | --norecursio | --norecursi \
  | --norecurs | --norecur | --norecu | --norec | --nore | --nor)
    norecursion=yes ;;

  -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 ;;

  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
    ac_prev=srcdir ;;
  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
    srcdir="$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 1.10"
    exit 0 ;;

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

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

  -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: $ac_option: invalid option; use --help to show usage" >&2; exit 1
    ;;

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

  esac
done

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

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

# Save the original args if we used an alternate arg parser.
ac_configure_temp="${configure_args-$*}"
# Strip out --no-create and --norecursion so they don't pile up.
configure_args=
for ac_arg in $ac_configure_temp; do
  case "$ac_arg" in
  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  | --no-cr | --no-c) ;;
  -norecursion | --norecursion | --norecursio | --norecursi \
  | --norecurs | --norecur | --norecu | --norec | --nore | --nor) ;;
  *) configure_args="$configure_args $ac_arg" ;;
  esac
done

# NLS nuisances.
# These must not be set unconditionally because not all systems understand
# e.g. LANG=C (notably SCO).
if test "${LC_ALL+set}" = 'set'; then LC_ALL=C; export LC_ALL; fi
if test "${LANG+set}"   = 'set'; then LANG=C;   export LANG;   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=version.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 `..'.
  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
fi
if test ! -r $srcdir/$ac_unique_file; then
  if test x$ac_srcdir_defaulted = xyes; then
    echo "configure: can not find sources in ${ac_confdir} or .." >&2; exit 1
  else
    echo "configure: can not find sources in ${srcdir}" >&2; exit 1
  fi
fi
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='${CPP}'
ac_compile='${CC-cc} $CFLAGS $LDFLAGS conftest.${ac_ext} -o conftest $LIBS >/dev/null 2>&1'


if test -n "$LD_LIBRARY_PATH"; then
  echo "configure: warning: You have LD_LIBRARY_PATH set which might result in a wrong configuration." >&2
  echo "configure: warning: If LD_LIBRARY_PATH should not be set, please unset it and rerun script." >&2
fi
if test -z "$CC"; then
  # Extract the first word of `gcc', so it can be a program name with args.
  set ac_dummy gcc; ac_word=$2
  test -n "$silent" || echo "checking for $ac_word"
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  for ac_dir in $PATH; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      CC="gcc"
      break
    fi
  done
  IFS="$ac_save_ifs"
fi
test -z "$CC" && CC="cc"
test -n "$CC" && test -n "$verbose" && echo "	setting CC to $CC"

# Find out if we are using GNU C, under whatever name.
cat > conftest.c <<EOF
#ifdef __GNUC__
  yes
#endif
EOF
${CC-cc} -E conftest.c > conftest.out 2>&1
if egrep yes conftest.out >/dev/null 2>&1; then
  GCC=1 # For later tests.
fi
rm -f conftest*

test -n "$silent" || echo "checking how to run the C preprocessor"
if test -z "$CPP"; then
  # This must be in double quotes, not single quotes, because CPP may get
  # substituted into the Makefile and ``${CC-cc}'' will simply confuse
  # make.  It must be expanded now.
  CPP="${CC-cc} -E"
  cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
#include <stdio.h>
Syntax Error
EOF
# Some shells (Coherent) do redirections in the wrong order, so need
# the parens.
ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
if test -z "$ac_err"; then
  :
else
  rm -rf conftest*
  CPP="${CC-cc} -E -traditional-cpp"
  cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
#include <stdio.h>
Syntax Error
EOF
# Some shells (Coherent) do redirections in the wrong order, so need
# the parens.
ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
if test -z "$ac_err"; then
  :
else
  rm -rf conftest*
  CPP=/lib/cpp
fi
rm -f conftest*
fi
rm -f conftest*
fi
test -n "$verbose" && echo "	setting CPP to $CPP"

if test -n "$GCC"; then
  test -n "$silent" || echo "checking whether -traditional is needed"
  ac_pattern="Autoconf.*'x'"
  ac_prog='#include <sgtty.h>
Autoconf TIOCGETP'
  cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
$ac_prog
EOF
eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
if egrep "$ac_pattern" conftest.out >/dev/null 2>&1; then
  rm -rf conftest*
  ac_need_trad=1

fi
rm -f conftest*


  if test -z "$ac_need_trad"; then
    ac_prog='#include <termio.h>
Autoconf TCGETA'
    cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
$ac_prog
EOF
eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
if egrep "$ac_pattern" conftest.out >/dev/null 2>&1; then
  rm -rf conftest*
  ac_need_trad=1

fi
rm -f conftest*

  fi
  test -n "$ac_need_trad" && CC="$CC -traditional"
fi

copy_srcdir=${srcdir}
srcdir=${srcdir}/bin
# Make sure to not get the incompatible SysV /etc/install and
# /usr/sbin/install, which might be in PATH before a BSD-like install,
# or the SunOS /usr/etc/install directory, or the AIX /bin/install,
# or the AFS install, which mishandles nonexistent args, or
# /usr/ucb/install on SVR4, which tries to use the nonexistent group
# `staff', or /sbin/install on IRIX which has incompatible command-line
# syntax.  Sigh.
#
#     On most BSDish systems install is in /usr/bin, not /usr/ucb
#     anyway.
# This turns out not to be true, so the mere pathname isn't an indication
# of whether the program works.  What we really need is a set of tests for
# the install program to see if it actually works in all the required ways.
#
# Avoid using ./install, which might have been erroneously created
# by make from ./install.sh.
if test -z "${INSTALL}"; then
  test -n "$silent" || echo "checking for a BSD compatible install"
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  for ac_dir in $PATH; do
    case "$ac_dir" in
    ''|.|/etc|/sbin|/usr/sbin|/usr/etc|/usr/afsws/bin|/usr/ucb) ;;
    *)
      # OSF1 and SCO ODT 3.0 have their own names for install.
      for ac_prog in installbsd scoinst install; do
        if test -f $ac_dir/$ac_prog; then
	  if test $ac_prog = install &&
            grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
	    # AIX install.  It has an incompatible calling convention.
	    # OSF/1 installbsd also uses dspmsg, but is usable.
	    :
	  else
	    INSTALL="$ac_dir/$ac_prog -c"
	    break 2
	  fi
	fi
      done
      ;;
    esac
  done
  IFS="$ac_save_ifs"
fi

if test -z "$INSTALL"; then
  # As a last resort, use the slow shell script.
  for ac_dir in ${srcdir} ${srcdir}/.. ${srcdir}/../..; do
    if test -f $ac_dir/install.sh; then
      INSTALL=$ac_dir/install.sh; break
    fi
  done
fi
if test -z "$INSTALL"; then
  echo "configure: can not find install.sh in ${srcdir} or ${srcdir}/.. or ${srcdir}/../.." >&2; exit 1
fi
test -n "$verbose" && echo "	setting INSTALL to $INSTALL"

# Use test -z because SunOS4 sh mishandles ${INSTALL_PROGRAM-'${INSTALL}'}.
# It thinks the first close brace ends the variable substitution.
test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
test -n "$verbose" && echo "	setting INSTALL_PROGRAM to $INSTALL_PROGRAM"

test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
test -n "$verbose" && echo "	setting INSTALL_DATA to $INSTALL_DATA"
 
srcdir=${copy_srcdir}
if test "./bin/install.sh" = "$INSTALL"; then
   INSTALL='${srcdir}/bin/install.sh'
fi
INSTALL_DATA_FLAG="`echo $INSTALL_DATA | sed 's/\${INSTALL}//'`"
if test -z "$RANLIB"; then
  # Extract the first word of `ranlib', so it can be a program name with args.
  set ac_dummy ranlib; ac_word=$2
  test -n "$silent" || echo "checking for $ac_word"
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  for ac_dir in $PATH; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      RANLIB="ranlib"
      break
    fi
  done
  IFS="$ac_save_ifs"
fi
test -z "$RANLIB" && RANLIB=":"
test -n "$RANLIB" && test -n "$verbose" && echo "	setting RANLIB to $RANLIB"

for ac_prog in mawk gawk nawk awk
do
if test -z "$AWK"; then
  # Extract the first word of `$ac_prog', so it can be a program name with args.
  set ac_dummy $ac_prog; ac_word=$2
  test -n "$silent" || echo "checking for $ac_word"
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  for ac_dir in $PATH; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      AWK="$ac_prog"
      break
    fi
  done
  IFS="$ac_save_ifs"
fi

test -n "$AWK" && test -n "$verbose" && echo "	setting AWK to $AWK"

test -n "$AWK" && break
done

if test -z "$MAKE"; then
  # Extract the first word of `make', so it can be a program name with args.
  set ac_dummy make; ac_word=$2
  test -n "$silent" || echo "checking for $ac_word"
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  for ac_dir in $PATH; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      MAKE="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
fi
test -z "$MAKE" && MAKE="make"
test -n "$MAKE" && test -n "$verbose" && echo "	setting MAKE to $MAKE"

test -n "$silent" || echo "checking if $MAKE understands 'include'"
broken_make=
err=`eval "($MAKE -n -f ${srcdir}/Makefile help >/dev/null) 2>&1"`
if test -n "$err"; then
  echo "configure: warning: ${MAKE} cannot handle include in Makefile, pleae use another make" >&2
  test -n "$silent" || echo "checking for searching for GNU make as gmake or gnumake"
  broken_make=yes
  MAKE=
  for ac_prog in gmake gnumake make
do
if test -z "$MAKE"; then
  # Extract the first word of `$ac_prog', so it can be a program name with args.
  set ac_dummy $ac_prog; ac_word=$2
  test -n "$silent" || echo "checking for $ac_word"
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  for ac_dir in $PATH; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      MAKE="$ac_prog"
      break
    fi
  done
  IFS="$ac_save_ifs"
fi

test -n "$MAKE" && test -n "$verbose" && echo "	setting MAKE to $MAKE"

test -n "$MAKE" && break
done

fi
if test -z "$MAKEDEPEND"; then
  # Extract the first word of `makedepend', so it can be a program name with args.
  set ac_dummy makedepend; ac_word=$2
  test -n "$silent" || echo "checking for $ac_word"
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  for ac_dir in $PATH; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      MAKEDEPEND="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
fi
test -z "$MAKEDEPEND" && MAKEDEPEND="makedepend"
test -n "$MAKEDEPEND" && test -n "$verbose" && echo "	setting MAKEDEPEND to $MAKEDEPEND"

if test -z "$AR"; then
  # Extract the first word of `ar', so it can be a program name with args.
  set ac_dummy ar; ac_word=$2
  test -n "$silent" || echo "checking for $ac_word"
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  for ac_dir in $PATH; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      AR="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
fi
test -z "$AR" && AR="ar"
test -n "$AR" && test -n "$verbose" && echo "	setting AR to $AR"

if test -z "$LINT"; then
  # Extract the first word of `lint', so it can be a program name with args.
  set ac_dummy lint; ac_word=$2
  test -n "$silent" || echo "checking for $ac_word"
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  for ac_dir in $PATH; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      LINT="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
fi
test -z "$LINT" && LINT="lint"
test -n "$LINT" && test -n "$verbose" && echo "	setting LINT to $LINT"

if test -z "$CHMOD"; then
  # Extract the first word of `chmod', so it can be a program name with args.
  set ac_dummy chmod; ac_word=$2
  test -n "$silent" || echo "checking for $ac_word"
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  for ac_dir in $PATH; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      CHMOD="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
fi
test -z "$CHMOD" && CHMOD="chmod"
test -n "$CHMOD" && test -n "$verbose" && echo "	setting CHMOD to $CHMOD"

if test -z "$RSH"; then
  # Extract the first word of `rsh', so it can be a program name with args.
  set ac_dummy rsh; ac_word=$2
  test -n "$silent" || echo "checking for $ac_word"
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  for ac_dir in $PATH; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      RSH="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
fi
test -z "$RSH" && RSH="/usr/ucb/rsh"
test -n "$RSH" && test -n "$verbose" && echo "	setting RSH to $RSH"

if test -z "$BINSH"; then
  # Extract the first word of `sh', so it can be a program name with args.
  set ac_dummy sh; ac_word=$2
  test -n "$silent" || echo "checking for $ac_word"
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  for ac_dir in $PATH; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      BINSH="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
fi
test -z "$BINSH" && BINSH="/bin/sh"
test -n "$BINSH" && test -n "$verbose" && echo "	setting BINSH to $BINSH"

test -n "$silent" || echo "checking for POSIXized ISC"
if test -d /etc/conf/kconfig.d &&
  grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
then
  ISC=1 # If later tests want to check for ISC.
  
{
test -n "$verbose" && \
echo "	defining _POSIX_SOURCE"
echo "#define" _POSIX_SOURCE "1" >> confdefs.h
DEFS="$DEFS -D_POSIX_SOURCE=1"
}

  if test -n "$GCC"; then
    CC="$CC -posix"
  else
    CC="$CC -Xp"
  fi
fi

test -n "$silent" || echo "checking for minix/config.h"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
#include <minix/config.h>
EOF
# Some shells (Coherent) do redirections in the wrong order, so need
# the parens.
ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
if test -z "$ac_err"; then
  rm -rf conftest*
  MINIX=1

fi
rm -f conftest*

# The Minix shell can't assign to the same variable on the same line!
if test -n "$MINIX"; then
  
{
test -n "$verbose" && \
echo "	defining _POSIX_SOURCE"
echo "#define" _POSIX_SOURCE "1" >> confdefs.h
DEFS="$DEFS -D_POSIX_SOURCE=1"
}

  
{
test -n "$verbose" && \
echo "	defining" _POSIX_1_SOURCE to be "2"
echo "#define" _POSIX_1_SOURCE "2" >> confdefs.h
DEFS="$DEFS -D_POSIX_1_SOURCE=2"
}

  
{
test -n "$verbose" && \
echo "	defining _MINIX"
echo "#define" _MINIX "1" >> confdefs.h
DEFS="$DEFS -D_MINIX=1"
}

fi

test -n "$silent" || echo "checking for AIX"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
#ifdef _AIX
  yes
#endif

EOF
eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
if egrep "yes" conftest.out >/dev/null 2>&1; then
  rm -rf conftest*
  
{
test -n "$verbose" && \
echo "	defining _ALL_SOURCE"
echo "#define" _ALL_SOURCE "1" >> confdefs.h
DEFS="$DEFS -D_ALL_SOURCE=1"
}


fi
rm -f conftest*


ac_save_LIBS="${LIBS}"
LIBS="${LIBS} -lseq"
ac_have_lib=""
test -n "$silent" || echo "checking for -lseq"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"

int main() { return 0; }
int t() { main();; return 0; }
EOF
if eval $ac_compile; then
  rm -rf conftest*
  ac_have_lib="1"

fi
rm -f conftest*
LIBS="${ac_save_LIBS}"
if test -n "${ac_have_lib}"; then
   :; LIBS="$LIBS -lseq"
else
   :; 
fi


ac_save_LIBS="${LIBS}"
LIBS="${LIBS} -lsun"
ac_have_lib=""
test -n "$silent" || echo "checking for -lsun"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"

int main() { return 0; }
int t() { main();; return 0; }
EOF
if eval $ac_compile; then
  rm -rf conftest*
  ac_have_lib="1"

fi
rm -f conftest*
LIBS="${ac_save_LIBS}"
if test -n "${ac_have_lib}"; then
   :; LIBS="$LIBS -lsun"
else
   :; 
fi


ac_save_LIBS="${LIBS}"
LIBS="${LIBS} -lelf"
ac_have_lib=""
test -n "$silent" || echo "checking for -lelf"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"

int main() { return 0; }
int t() { main();; return 0; }
EOF
if eval $ac_compile; then
  rm -rf conftest*
  ac_have_lib="1"

fi
rm -f conftest*
LIBS="${ac_save_LIBS}"
if test -n "${ac_have_lib}"; then
   :; 
{
test -n "$verbose" && \
echo "	defining SVR4"
echo "#define" SVR4 "1" >> confdefs.h
DEFS="$DEFS -DSVR4=1"
}

else
   :; 
fi

test -n "$silent" || echo "checking for sys/dg_sys_info.h"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
#include <sys/dg_sys_info.h>
EOF
# Some shells (Coherent) do redirections in the wrong order, so need
# the parens.
ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
if test -z "$ac_err"; then
  rm -rf conftest*
  
{
test -n "$verbose" && \
echo "	defining DGUX"
echo "#define" DGUX "1" >> confdefs.h
DEFS="$DEFS -DDGUX=1"
}


fi
rm -f conftest*

test -n "$silent" || echo "checking for OSF1/Alpha"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"

#if defined(__alpha__) || defined(__alpha)
  yes
#endif
EOF
eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
if egrep "yes" conftest.out >/dev/null 2>&1; then
  rm -rf conftest*
  
{
test -n "$verbose" && \
echo "	defining _BSD"
echo "#define" _BSD "1" >> confdefs.h
DEFS="$DEFS -D_BSD=1"
}
 
on_alpha=yes

fi
rm -f conftest*

test -n "$silent" || echo "checking for Xenix"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"

#if defined(M_XENIX) && !defined(M_UNIX)
yes
#endif
EOF
eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
if egrep "yes" conftest.out >/dev/null 2>&1; then
  rm -rf conftest*
  
{
test -n "$verbose" && \
echo "	defining XENIX"
echo "#define" XENIX "1" >> confdefs.h
DEFS="$DEFS -DXENIX=1"
}


fi
rm -f conftest*

got_it=
test -n "$silent" || echo "checking for __scoinfo"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
#include <ctype.h>
int main() { return 0; }
int t() { 
/* 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___scoinfo) || defined (__stub_____scoinfo)
choke me
#else
/* Override any gcc2 internal prototype to avoid an error.  */
extern char __scoinfo(); __scoinfo();
#endif
; return 0; }
EOF
if eval $ac_compile; then
  rm -rf conftest*
  got_it=sco

fi
rm -f conftest*

if test -z "$got_it"; then
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"

#if defined(M_UNIX) || defined(sco) || defined(SCO)
yes
#endif
EOF
eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
if egrep "yes" conftest.out >/dev/null 2>&1; then
  rm -rf conftest*
  got_it=sco

fi
rm -f conftest*

fi
if test -n "$got_it"; then
    
{
test -n "$verbose" && \
echo "	defining SCO"
echo "#define" SCO "1" >> confdefs.h
DEFS="$DEFS -DSCO=1"
}

    RANLIB=":"
    
{
test -n "$verbose" && \
echo "	defining SIGUSR1_FOR_OOB"
echo "#define" SIGUSR1_FOR_OOB "1" >> confdefs.h
DEFS="$DEFS -DSIGUSR1_FOR_OOB=1"
}

fi
test -n "$silent" || echo "checking for setsockopt"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
#include <ctype.h>
int main() { return 0; }
int t() { 
/* 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_setsockopt) || defined (__stub___setsockopt)
choke me
#else
/* Override any gcc2 internal prototype to avoid an error.  */
extern char setsockopt(); setsockopt();
#endif
; return 0; }
EOF
if eval $ac_compile; then
  :
else
  rm -rf conftest*
  ac_save_LIBS="${LIBS}"
LIBS="${LIBS} -lsocket"
ac_have_lib=""
test -n "$silent" || echo "checking for -lsocket"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"

int main() { return 0; }
int t() { main();; return 0; }
EOF
if eval $ac_compile; then
  rm -rf conftest*
  ac_have_lib="1"

fi
rm -f conftest*
LIBS="${ac_save_LIBS}"
if test -n "${ac_have_lib}"; then
   :; LIBS="$LIBS -lsocket"
     ac_save_LIBS="${LIBS}"
LIBS="${LIBS} -lnsl_s"
ac_have_lib=""
test -n "$silent" || echo "checking for -lnsl_s"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"

int main() { return 0; }
int t() { main();; return 0; }
EOF
if eval $ac_compile; then
  rm -rf conftest*
  ac_have_lib="1"

fi
rm -f conftest*
LIBS="${ac_save_LIBS}"
if test -n "${ac_have_lib}"; then
   :; LIBS="$LIBS -lnsl_s"
else
   :; ac_save_LIBS="${LIBS}"
LIBS="${LIBS} -lnsl"
ac_have_lib=""
test -n "$silent" || echo "checking for -lnsl"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"

int main() { return 0; }
int t() { main();; return 0; }
EOF
if eval $ac_compile; then
  rm -rf conftest*
  ac_have_lib="1"

fi
rm -f conftest*
LIBS="${ac_save_LIBS}"
if test -n "${ac_have_lib}"; then
   :; LIBS="$LIBS -lnsl"
else
   :; 
fi

fi

     test -n "$silent" || echo "checking for setsockopt"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
#include <ctype.h>
int main() { return 0; }
int t() { 
/* 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_setsockopt) || defined (__stub___setsockopt)
choke me
#else
/* Override any gcc2 internal prototype to avoid an error.  */
extern char setsockopt(); setsockopt();
#endif
; return 0; }
EOF
if eval $ac_compile; then
  :
else
  rm -rf conftest*
  echo "configure: warning: Failed to find setsockopt function" >&2
fi
rm -f conftest*

else
   :; 
fi

fi
rm -f conftest*

ac_save_LIBS="${LIBS}"
LIBS="${LIBS} -lgen"
ac_have_lib=""
test -n "$silent" || echo "checking for -lgen"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"

int main() { return 0; }
int t() { main();; return 0; }
EOF
if eval $ac_compile; then
  rm -rf conftest*
  ac_have_lib="1"

fi
rm -f conftest*
LIBS="${ac_save_LIBS}"
if test -n "${ac_have_lib}"; then
   :; LIBS="$LIBS -lgen"
else
   :; 
fi

case "$DEFS" in
  *SCO*) test -n "$silent" || echo "checking for XFree86 versus ODT X11 under SCO"
     if test -z "$XSERVER"; then
  # Extract the first word of `X', so it can be a program name with args.
  set ac_dummy X; ac_word=$2
  test -n "$silent" || echo "checking for $ac_word"
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  for ac_dir in $PATH; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      XSERVER="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
fi
test -z "$XSERVER" && XSERVER="X"
test -n "$XSERVER" && test -n "$verbose" && echo "	setting XSERVER to $XSERVER"

     if test "$XSERVER" = X; then
        echo "configure: warning: failed to find X server under name X" >&2
     else
        x_path="`echo $XSERVER | sed 's/\(.*\)\/^\/*$/\1/'`"
        if  test -r "${x_path}/Xsco"; then
          ac_save_LIBS="${LIBS}"
LIBS="${LIBS} -lPW"
ac_have_lib=""
test -n "$silent" || echo "checking for -lPW"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"

int main() { return 0; }
int t() { main();; return 0; }
EOF
if eval $ac_compile; then
  rm -rf conftest*
  ac_have_lib="1"

fi
rm -f conftest*
LIBS="${ac_save_LIBS}"
if test -n "${ac_have_lib}"; then
   :; LIBS="$LIBS -lPW"
else
   :; 
fi

        else
          ac_save_LIBS="${LIBS}"
LIBS="${LIBS} -lpt"
ac_have_lib=""
test -n "$silent" || echo "checking for -lpt"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"

int main() { return 0; }
int t() { main();; return 0; }
EOF
if eval $ac_compile; then
  rm -rf conftest*
  ac_have_lib="1"

fi
rm -f conftest*
LIBS="${ac_save_LIBS}"
if test -n "${ac_have_lib}"; then
   :; LIBS="$LIBS -lpt"
else
   :; 
fi

        fi
     fi
     ac_save_LIBS="${LIBS}"
LIBS="${LIBS} -lintl"
ac_have_lib=""
test -n "$silent" || echo "checking for -lintl"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"

int main() { return 0; }
int t() { main();; return 0; }
EOF
if eval $ac_compile; then
  rm -rf conftest*
  ac_have_lib="1"

fi
rm -f conftest*
LIBS="${ac_save_LIBS}"
if test -n "${ac_have_lib}"; then
   :; LIBS="$LIBS -lintl"
else
   :; 
fi


    ;;
  *) ;;
esac
test -n "$silent" || echo "checking for xdr_void"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
#include <ctype.h>
int main() { return 0; }
int t() { 
/* 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_xdr_void) || defined (__stub___xdr_void)
choke me
#else
/* Override any gcc2 internal prototype to avoid an error.  */
extern char xdr_void(); xdr_void();
#endif
; return 0; }
EOF
if eval $ac_compile; then
  :
else
  rm -rf conftest*
  ac_save_LIBS="${LIBS}"
LIBS="${LIBS} -lrpc"
ac_have_lib=""
test -n "$silent" || echo "checking for -lrpc"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"

int main() { return 0; }
int t() { main();; return 0; }
EOF
if eval $ac_compile; then
  rm -rf conftest*
  ac_have_lib="1"

fi
rm -f conftest*
LIBS="${ac_save_LIBS}"
if test -n "${ac_have_lib}"; then
   :; copy_libs="${LIBS}"
   LIBS="-lrpc $LIBS"
   test -n "$silent" || echo "checking for xdr_void"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
#include <ctype.h>
int main() { return 0; }
int t() { 
/* 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_xdr_void) || defined (__stub___xdr_void)
choke me
#else
/* Override any gcc2 internal prototype to avoid an error.  */
extern char xdr_void(); xdr_void();
#endif
; return 0; }
EOF
if eval $ac_compile; then
  :
else
  rm -rf conftest*
  LIBS="${copy_libs}"
fi
rm -f conftest*

else
   :; 
fi

fi
rm -f conftest*

test -n "$silent" || echo "checking for svc_run"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
#include <ctype.h>
int main() { return 0; }
int t() { 
/* 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_svc_run) || defined (__stub___svc_run)
choke me
#else
/* Override any gcc2 internal prototype to avoid an error.  */
extern char svc_run(); svc_run();
#endif
; return 0; }
EOF
if eval $ac_compile; then
  :
else
  rm -rf conftest*
  ac_save_LIBS="${LIBS}"
LIBS="${LIBS} -lrpcsvc"
ac_have_lib=""
test -n "$silent" || echo "checking for -lrpcsvc"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"

int main() { return 0; }
int t() { main();; return 0; }
EOF
if eval $ac_compile; then
  rm -rf conftest*
  ac_have_lib="1"

fi
rm -f conftest*
LIBS="${ac_save_LIBS}"
if test -n "${ac_have_lib}"; then
   :; copy_libs="${LIBS}"
  LIBS="-lrpcsvc $LIBS"
  test -n "$silent" || echo "checking for svc_run"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
#include <ctype.h>
int main() { return 0; }
int t() { 
/* 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_svc_run) || defined (__stub___svc_run)
choke me
#else
/* Override any gcc2 internal prototype to avoid an error.  */
extern char svc_run(); svc_run();
#endif
; return 0; }
EOF
if eval $ac_compile; then
  :
else
  rm -rf conftest*
  LIBS="${copy_libs}"
fi
rm -f conftest*

else
   :; 
fi

fi
rm -f conftest*

ac_save_LIBS="${LIBS}"
LIBS="${LIBS} -lbsd"
ac_have_lib=""
test -n "$silent" || echo "checking for -lbsd"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"

int main() { return 0; }
int t() { main();; return 0; }
EOF
if eval $ac_compile; then
  rm -rf conftest*
  ac_have_lib="1"

fi
rm -f conftest*
LIBS="${ac_save_LIBS}"
if test -n "${ac_have_lib}"; then
   :; LIBS="-lbsd $LIBS"
else
   :; 
fi

ac_save_LIBS="${LIBS}"
LIBS="${LIBS} -lXbsd"
ac_have_lib=""
test -n "$silent" || echo "checking for -lXbsd"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"

int main() { return 0; }
int t() { main();; return 0; }
EOF
if eval $ac_compile; then
  rm -rf conftest*
  ac_have_lib="1"

fi
rm -f conftest*
LIBS="${ac_save_LIBS}"
if test -n "${ac_have_lib}"; then
   :; LIBS="-lXbsd $LIBS"
else
   :; 
fi

ac_prog='/* 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;
/* 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;
}'
test -n "$silent" || echo "checking for lack of working const"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"

int main() { return 0; }
int t() { $ac_prog; return 0; }
EOF
if eval $ac_compile; then
  :
else
  rm -rf conftest*
  
{
test -n "$verbose" && \
echo "	defining" const to be empty
echo "#define" const "" >> confdefs.h
DEFS="$DEFS -Dconst="
}

fi
rm -f conftest*

test -n "$silent" || echo "checking for stdlib.h"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
#include <stdlib.h>
EOF
# Some shells (Coherent) do redirections in the wrong order, so need
# the parens.
ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
if test -z "$ac_err"; then
  :
else
  rm -rf conftest*
  
{
test -n "$verbose" && \
echo "	defining NO_STDLIB_H"
echo "#define" NO_STDLIB_H "1" >> confdefs.h
DEFS="$DEFS -DNO_STDLIB_H=1"
}

fi
rm -f conftest*

test -n "$silent" || echo "checking for size_t in sys/types.h"
echo '#include "confdefs.h"
#include <sys/types.h>' > conftest.${ac_ext}
eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
if egrep "size_t" conftest.out >/dev/null 2>&1; then
  :
else
  rm -rf conftest*
  
{
test -n "$verbose" && \
echo "	defining" size_t to be "unsigned"
echo "#define" size_t "unsigned" >> confdefs.h
DEFS="$DEFS -Dsize_t=unsigned"
}

fi
rm -f conftest*

test -n "$silent" || echo "checking for off_t in sys/types.h"
echo '#include "confdefs.h"
#include <sys/types.h>' > conftest.${ac_ext}
eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
if egrep "off_t" conftest.out >/dev/null 2>&1; then
  :
else
  rm -rf conftest*
  
{
test -n "$verbose" && \
echo "	defining" off_t to be "long"
echo "#define" off_t "long" >> confdefs.h
DEFS="$DEFS -Doff_t=long"
}

fi
rm -f conftest*

test -n "$silent" || echo "checking for pid_t in sys/types.h"
echo '#include "confdefs.h"
#include <sys/types.h>' > conftest.${ac_ext}
eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
if egrep "pid_t" conftest.out >/dev/null 2>&1; then
  :
else
  rm -rf conftest*
  
{
test -n "$verbose" && \
echo "	defining" pid_t to be "int"
echo "#define" pid_t "int" >> confdefs.h
DEFS="$DEFS -Dpid_t=int"
}

fi
rm -f conftest*

test -n "$silent" || echo "checking byte ordering"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
main () {
  /* Are we little or big endian?  From Harbison&Steele.  */
  union
  {
    long l;
    char c[sizeof (long)];
  } u;
  u.l = 1;
  exit (u.c[sizeof (long) - 1] == 1);
}
EOF
eval $ac_compile
if test -s conftest && (./conftest; exit) 2>/dev/null; then
  :
else
  
{
test -n "$verbose" && \
echo "	defining WORDS_BIGENDIAN"
echo "#define" WORDS_BIGENDIAN "1" >> confdefs.h
DEFS="$DEFS -DWORDS_BIGENDIAN=1"
}

fi
rm -fr conftest*


test -n "$silent" || echo "checking integer size"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
main() { exit(sizeof(int) != 2); }
EOF
eval $ac_compile
if test -s conftest && (./conftest; exit) 2>/dev/null; then
  
{
test -n "$verbose" && \
echo "	defining INT_16_BITS"
echo "#define" INT_16_BITS "1" >> confdefs.h
DEFS="$DEFS -DINT_16_BITS=1"
}


fi
rm -fr conftest*

test -n "$silent" || echo "checking for ANSI C header files"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <float.h>
EOF
# Some shells (Coherent) do redirections in the wrong order, so need
# the parens.
ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
if test -z "$ac_err"; then
  rm -rf conftest*
  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
echo '#include "confdefs.h"
#include <string.h>' > conftest.${ac_ext}
eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
if egrep "memchr" conftest.out >/dev/null 2>&1; then
  rm -rf conftest*
  # SGI's /bin/cc from Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
cat > conftest.${ac_ext} <<EOF
#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
eval $ac_compile
if test -s conftest && (./conftest; exit) 2>/dev/null; then
  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
echo '#include "confdefs.h"
#include <stdlib.h>' > conftest.${ac_ext}
eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
if egrep "free" conftest.out >/dev/null 2>&1; then
  rm -rf conftest*
  
{
test -n "$verbose" && \
echo "	defining STDC_HEADERS"
echo "#define" STDC_HEADERS "1" >> confdefs.h
DEFS="$DEFS -DSTDC_HEADERS=1"
}


fi
rm -f conftest*


fi
rm -fr conftest*

fi
rm -f conftest*


fi
rm -f conftest*

for ac_hdr in string.h strings.h memory.h malloc.h unistd.h sgtty.h
do
ac_tr_hdr=HAVE_`echo $ac_hdr | tr '[a-z]./' '[A-Z]__'`
test -n "$silent" || echo "checking for ${ac_hdr}"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
#include <${ac_hdr}>
EOF
# Some shells (Coherent) do redirections in the wrong order, so need
# the parens.
ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
if test -z "$ac_err"; then
  rm -rf conftest*
  
{
test -n "$verbose" && \
echo "	defining ${ac_tr_hdr}"
echo "#define" ${ac_tr_hdr} "1" >> confdefs.h
DEFS="$DEFS -D${ac_tr_hdr}=1"
}


fi
rm -f conftest*
done
 
for ac_hdr in sys/select.h sys/sockio.h
do
ac_tr_hdr=HAVE_`echo $ac_hdr | tr '[a-z]./' '[A-Z]__'`
test -n "$silent" || echo "checking for ${ac_hdr}"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
#include <${ac_hdr}>
EOF
# Some shells (Coherent) do redirections in the wrong order, so need
# the parens.
ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
if test -z "$ac_err"; then
  rm -rf conftest*
  
{
test -n "$verbose" && \
echo "	defining ${ac_tr_hdr}"
echo "#define" ${ac_tr_hdr} "1" >> confdefs.h
DEFS="$DEFS -D${ac_tr_hdr}=1"
}


fi
rm -f conftest*
done
 
case "$DEFS" in
  *SGTTY*);;
  *) for ac_hdr in bsd/sgtty.h
do
ac_tr_hdr=HAVE_`echo $ac_hdr | tr '[a-z]./' '[A-Z]__'`
test -n "$silent" || echo "checking for ${ac_hdr}"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
#include <${ac_hdr}>
EOF
# Some shells (Coherent) do redirections in the wrong order, so need
# the parens.
ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
if test -z "$ac_err"; then
  rm -rf conftest*
  
{
test -n "$verbose" && \
echo "	defining ${ac_tr_hdr}"
echo "#define" ${ac_tr_hdr} "1" >> confdefs.h
DEFS="$DEFS -D${ac_tr_hdr}=1"
}


fi
rm -f conftest*
done
;;
esac
case "$DEFS" in
  *SGTTY_H*) ;;
  *) test -n "$silent" || echo "checking for termios.h"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
#include <termios.h>
EOF
# Some shells (Coherent) do redirections in the wrong order, so need
# the parens.
ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
if test -z "$ac_err"; then
  rm -rf conftest*
  
{
test -n "$verbose" && \
echo "	defining HAVE_TERMIOS"
echo "#define" HAVE_TERMIOS "1" >> confdefs.h
DEFS="$DEFS -DHAVE_TERMIOS=1"
}

        test -n "$silent" || echo "checking for working termios"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
#include <termios.h>
int main() { return 0; }
int t() { struct termios t; tcgetattr(0,&t);; return 0; }
EOF
if eval $ac_compile; then
  :
else
  rm -rf conftest*
  echo "configure: warning: termios compile check failed!" >&2
fi
rm -f conftest*


else
  rm -rf conftest*
  for ac_hdr in termio.h
do
ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'a-z./' 'A-Z__'`
test -n "$silent" || echo "checking for ${ac_hdr}"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
#include <${ac_hdr}>
EOF
# Some shells (Coherent) do redirections in the wrong order, so need
# the parens.
ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
if test -z "$ac_err"; then
  rm -rf conftest*
  
{
test -n "$verbose" && \
echo "	defining ${ac_tr_hdr}"
echo "#define" ${ac_tr_hdr} "1" >> confdefs.h
DEFS="$DEFS -D${ac_tr_hdr}=1"
}


fi
rm -f conftest*
done

fi
rm -f conftest*
;;
esac
test -n "$silent" || echo "checking for whether time.h and sys/time.h may both be included"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
#include <sys/types.h>
#include <sys/time.h>
#include <time.h>
int main() { return 0; }
int t() { struct tm *tp;; return 0; }
EOF
if eval $ac_compile; then
  rm -rf conftest*
  
{
test -n "$verbose" && \
echo "	defining TIME_WITH_SYS_TIME"
echo "#define" TIME_WITH_SYS_TIME "1" >> confdefs.h
DEFS="$DEFS -DTIME_WITH_SYS_TIME=1"
}


fi
rm -f conftest*

test -n "$silent" || echo "checking for struct tm in time.h"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
#include <sys/types.h>
#include <time.h>
int main() { return 0; }
int t() { struct tm *tp; tp->tm_sec;; return 0; }
EOF
if eval $ac_compile; then
  :
else
  rm -rf conftest*
  
{
test -n "$verbose" && \
echo "	defining TM_IN_SYS_TIME"
echo "#define" TM_IN_SYS_TIME "1" >> confdefs.h
DEFS="$DEFS -DTM_IN_SYS_TIME=1"
}

fi
rm -f conftest*

inc='
#include <sys/types.h>
#if defined(STDC_HEADERS) || defined(HAVE_STRING_H)
#include <string.h>
#if !defined(STDC_HEADERS) && defined(HAVE_MEMORY_H)
#include <memory.h>
#endif 
#else
#include <strings.h>
#endif
#ifdef __STDC__
#define P_(x) x
#else   
#define P_(x) ( )
#endif'
nok=
test -n "$silent" || echo "checking for strdup(const char *s)"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"

$inc
extern char * strdup P_((const char *));
int main() { return 0; }
int t() { int x=1; return 0; }
EOF
if eval $ac_compile; then
  rm -rf conftest*
  nok=yes

fi
rm -f conftest*

if test -z "$nok"; then
  test -n "$silent" || echo "checking for strdup(char *)"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"

$inc
char * strdup P_((char *));
int main() { return 0; }
int t() { int x=1; return 0; }
EOF
if eval $ac_compile; then
  rm -rf conftest*
  nok=yes
  
{
test -n "$verbose" && \
echo "	defining STRDUP_NOCONST"
echo "#define" STRDUP_NOCONST "1" >> confdefs.h
DEFS="$DEFS -DSTRDUP_NOCONST=1"
}


fi
rm -f conftest*

fi
if test -z "$nok"; then
  echo "configure: warning: neither strdup(char *) nor strdup(const char *s) worked" >&2
fi
if test -n "$GCC"; then 
inc='
#ifndef NO_STDLIB_H
#include <stdlib.h>
#endif
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#ifdef __STDC__
#define P_(x) x
#else   
#define P_(x) ( )
#endif'
nok=
test -n "$silent" || echo "checking for write(int, const void *, size_t)"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"

$inc
extern int write P_((int , const void *, size_t));

int main() { return 0; }
int t() { int x=0;; return 0; }
EOF
if eval $ac_compile; then
  rm -rf conftest*
  nok=yes

fi
rm -f conftest*

if test -z "$nok"; then
  test -n "$silent" || echo "checking for write(int, const void *, unsigned int)"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"

$inc
extern int write P_((int, const void *, unsigned int));

int main() { return 0; }
int t() { int x=0;; return 0; }
EOF
if eval $ac_compile; then
  rm -rf conftest*
  nok=yes

{
test -n "$verbose" && \
echo "	defining WRITE_UNSIGNED"
echo "#define" WRITE_UNSIGNED "1" >> confdefs.h
DEFS="$DEFS -DWRITE_UNSIGNED=1"
}


fi
rm -f conftest*

fi
if test -z "$nok"; then
  echo "configure: warning: third parameter for write is hard to figure out ..." >&2
fi
nok=
test -n "$silent" || echo "checking for read(int, void *, size_t)"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"

$inc
extern int read P_((int, void *, size_t));

int main() { return 0; }
int t() { int x=0;; return 0; }
EOF
if eval $ac_compile; then
  rm -rf conftest*
  nok=yes

fi
rm -f conftest*

if test -z "$nok"; then
  test -n "$silent" || echo "checking for read(int, void *, unsigned int)"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"

$inc
extern int read P_((int, void *, unsigned int));

int main() { return 0; }
int t() { int x=0;; return 0; }
EOF
if eval $ac_compile; then
  rm -rf conftest*
  nok=yes

{
test -n "$verbose" && \
echo "	defining READ_UNSIGNED"
echo "#define" READ_UNSIGNED "1" >> confdefs.h
DEFS="$DEFS -DREAD_UNSIGNED=1"
}


fi
rm -f conftest*

fi
if test -z "$nok"; then
  echo "configure: warning: third parameter for read is hard to figure out ... " >&2
fi
fi
inc='
#ifndef NO_STDLIB_H
#include <stdlib.h>
#endif
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <stdio.h>
#include <sys/types.h>
#include <sys/wait.h>
#ifndef NULL
#define NULL (0L)
#endif'
nok=
copy_cflags="${CFLAGS}"
if test -n "$on_alpha"; then
    CFLAGS="${CFLAGS} -w2"
fi
test -n "$silent" || echo "checking for wait((int *) NULL)"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
$inc
int main() { return 0; }
int t() { (void) wait((int *) NULL);; return 0; }
EOF
if eval $ac_compile; then
  rm -rf conftest*
  nok=yes

fi
rm -f conftest*

if test -z "$nok"; then
  test -n "$silent" || echo "checking for wait((wait union *) NULL)"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
$inc
int main() { return 0; }
int t() { (void) wait((union wait *) NULL);; return 0; }
EOF
if eval $ac_compile; then
  rm -rf conftest*
  nok=yes
  
{
test -n "$verbose" && \
echo "	defining HAVE_BSD_WAIT"
echo "#define" HAVE_BSD_WAIT "1" >> confdefs.h
DEFS="$DEFS -DHAVE_BSD_WAIT=1"
}


fi
rm -f conftest*

fi
CFLAGS="${copy_cflags}"
if test -z "$nok"; then
  echo "configure: warning: neither wait((int *) NULL) nor wait ((union wait *) NULL) worked" >&2
fi

test -n "$silent" || echo "checking for 64-bit long ints"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
main() { exit(sizeof(long int) != 8); }
EOF
eval $ac_compile
if test -s conftest && (./conftest; exit) 2>/dev/null; then
  
{
test -n "$verbose" && \
echo "	defining LONG_64_BITS"
echo "#define" LONG_64_BITS "1" >> confdefs.h
DEFS="$DEFS -DLONG_64_BITS=1"
}


fi
rm -fr conftest*

HLL1=
HLL2=
case "$DEFS" in
 *LONG_64*);;
 *) test -n "$silent" || echo "checking for long long ints"
    cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
main() { exit(sizeof(long long) != 8); }
EOF
eval $ac_compile
if test -s conftest && (./conftest; exit) 2>/dev/null; then
  
{
test -n "$verbose" && \
echo "	defining HAVE_LONG_LONG"
echo "#define" HAVE_LONG_LONG "1" >> confdefs.h
DEFS="$DEFS -DHAVE_LONG_LONG=1"
}

      HLL1="*/"
      HLL2="/*"
    

fi
rm -fr conftest*;;
esac


ALL_X11_LIBS="-lXaw -lXmu -lXt -lXext -lX11"
no_x=true
# check whether --with-x11-link-flags or --without-x11-link-flags was given.
withval="$with_x11_link_flags"
if test -n "$withval"; then
  X11_LIBS="${withval}"
else
  X11_LIBS=
fi

if test -n "$x_libraries" && test -n "$x_includes"; then
    if test -r "${x_includes}/X11/Xlib.h"; then
     copy_libs="$LIBS"
     LIBS="$LIBS $X11_LIBS -L${x_libraries}"
     ac_save_LIBS="${LIBS}"
LIBS="${LIBS} -lX11"
ac_have_lib=""
test -n "$silent" || echo "checking for -lX11"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"

int main() { return 0; }
int t() { main();; return 0; }
EOF
if eval $ac_compile; then
  rm -rf conftest*
  ac_have_lib="1"

fi
rm -f conftest*
LIBS="${ac_save_LIBS}"
if test -n "${ac_have_lib}"; then
   :; no_x=
else
   :;        LIBS="-Bstatic $LIBS"
          ac_save_LIBS="${LIBS}"
LIBS="${LIBS} -lX11"
ac_have_lib=""
test -n "$silent" || echo "checking for -lX11"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"

int main() { return 0; }
int t() { main();; return 0; }
EOF
if eval $ac_compile; then
  rm -rf conftest*
  ac_have_lib="1"

fi
rm -f conftest*
LIBS="${ac_save_LIBS}"
if test -n "${ac_have_lib}"; then
   :; test -n "$verbose" && echo "	Added -Bstatic when linking X11 apps"
	    X11_LIBS="-Bstatic ${X11_LIBS}"
            no_x=
else
   :; echo "configure: warning: Failed to find/link with ${x_libraries}/libX11" >&2
fi

fi

     LIBS="${copy_libs}"
  else
     echo "configure: warning: Failed to find ${x_includes}/X11/Xlib.h" >&2
  fi
else
  # If we find X, set shell vars x_includes and x_libraries to the paths.
no_x=true
if test "x$with_x" != xno; then
test -n "$silent" || echo "checking for X include and library files with xmkmf"
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
    no_x=
    # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
    eval `make acfindx 2>/dev/null | grep -v make`
    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
    if test ! -f $ac_im_usrlibdir/libX11.a && test -f $ac_im_libdir/libX11.a
    then
      ac_im_usrlibdir=$ac_im_libdir
    fi
    case "$ac_im_incroot" in
	/usr/include) ;;
	*) test -z "$x_includes" && x_includes="$ac_im_incroot" ;;
    esac
    case "$ac_im_usrlibdir" in
	/usr/lib | /lib) ;;
	*) test -z "$x_libraries" && x_libraries="$ac_im_usrlibdir" ;;
    esac
  fi
  cd ..
  rm -fr conftestdir
fi

if test -z "$ac_im_usrlibdir"; then
test -n "$silent" || echo "checking for X include and library files directly"
if test ".$x_direct_test_library" = . ; then
   x_direct_test_library='Xt'
fi
if test ".$x_direct_test_include" = . ; then
   x_direct_test_include='X11/Intrinsic.h'
fi
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
#include <$x_direct_test_include>
EOF
# Some shells (Coherent) do redirections in the wrong order, so need
# the parens.
ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
if test -z "$ac_err"; then
  rm -rf conftest*
  no_x=

else
  rm -rf conftest*
  for ac_dir in               \
    /usr/X11R6/include        \
    /usr/X11R5/include        \
    /usr/X11R4/include        \
                              \
    /usr/include/X11R6        \
    /usr/include/X11R5        \
    /usr/include/X11R4        \
                              \
    /usr/local/X11R6/include  \
    /usr/local/X11R5/include  \
    /usr/local/X11R4/include  \
                              \
    /usr/local/include/X11R6  \
    /usr/local/include/X11R5  \
    /usr/local/include/X11R4  \
                              \
    /usr/X11/include          \
    /usr/include/X11          \
    /usr/local/X11/include    \
    /usr/local/include/X11    \
                              \
    /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
      test -z "$x_includes" && x_includes=$ac_dir
      no_x=
      break
    fi
  done
fi
rm -f conftest*

# Check for the libraries.  First see if replacing the `include' by
# `lib' works.
ac_save_LIBS="${LIBS}"
LIBS="${LIBS} -l"$x_direct_test_library""
ac_have_lib=""
test -n "$silent" || echo "checking for -l"$x_direct_test_library""
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"

int main() { return 0; }
int t() { main();; return 0; }
EOF
if eval $ac_compile; then
  rm -rf conftest*
  ac_have_lib="1"

fi
rm -f conftest*
LIBS="${ac_save_LIBS}"
if test -n "${ac_have_lib}"; then
   :; no_x=
else
   :; for ac_dir in `echo "$x_includes" | sed s/include/lib/` \
    /usr/X11R6/lib        \
    /usr/X11R5/lib        \
    /usr/X11R4/lib        \
                          \
    /usr/lib/X11R6        \
    /usr/lib/X11R5        \
    /usr/lib/X11R4        \
                          \
    /usr/local/X11R6/lib  \
    /usr/local/X11R5/lib  \
    /usr/local/X11R4/lib  \
                          \
    /usr/local/lib/X11R6  \
    /usr/local/lib/X11R5  \
    /usr/local/lib/X11R4  \
                          \
    /usr/X11/lib          \
    /usr/lib/X11          \
    /usr/local/X11/lib    \
    /usr/local/lib/X11    \
                          \
    /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  \
                          \
    /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
      test -z "$x_libraries" && x_libraries=$ac_dir
      no_x=
      break 2
    fi
  done
done
fi

fi
test -n "$x_includes" && test -n "$verbose" && echo "	X11 headers are in $x_includes"
test -n "$x_libraries" && test -n "$verbose" && echo "	X11 libraries are in $x_libraries"
fi

fi
if test -n "$no_x"; then
  x_includes="/usr/local/X11/include"
  x_libraries="/usr/local/X11/lib"
fi
test -n "$x_includes"  && x_includes="-I${x_includes}"
test -n "$x_libraries" && x_libraries="-L${x_libraries}"
copy_libs="${LIBS}"
copy_x_libraries="${x_libraries}"
test -z "$x_libraries" && x_libraries="-L/usr/lib"
inc_x='
#ifdef  NeedFunctionPrototypes 
#undef  NeedFunctionPrototypes 
#endif
#define NeedFunctionPrototypes 0
#include <X11/Xlib.h>
#include <X11/Xutil.h>'
LIBS="${x_includes} $copy_libs ${x_libraries} $ALL_X11_LIBS"
test -n "$silent" || echo "checking for extra libraries for X11"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
$inc_x
int main() { return 0; }
int t() { Display *d = XOpenDisplay("foobar");; return 0; }
EOF
if eval $ac_compile; then
  rm -rf conftest*
  x_ok=

else
  rm -rf conftest*
  x_ok=no
fi
rm -f conftest*

if test -n "$x_ok" && test -z "$no_x"; then
  LIBS="${x_includes} ${x_libraries} $copy_libs $ALL_X11_LIBS -lm"
  test -n "$silent" || echo "checking for -lm needed for X11?"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
$inc_x
int main() { return 0; }
int t() {  Display *d = XOpenDisplay("foobar");; return 0; }
EOF
if eval $ac_compile; then
  rm -rf conftest*
  test -n "$verbose" && echo "	Added -lm when linking with X11 apps"
     MATHLIB="-lm"
     x_ok=

fi
rm -f conftest*

fi
if test -n "$x_ok" && test -z "$no_x"; then
  ac_save_LIBS="${LIBS}"
LIBS="${LIBS} -ldnet"
ac_have_lib=""
test -n "$silent" || echo "checking for -ldnet"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"

int main() { return 0; }
int t() { main();; return 0; }
EOF
if eval $ac_compile; then
  rm -rf conftest*
  ac_have_lib="1"

fi
rm -f conftest*
LIBS="${ac_save_LIBS}"
if test -n "${ac_have_lib}"; then
   :; LIBS="${x_includes} ${x_libraries} $copy_libs -lX11 -ldnet"
     test -n "$silent" || echo "checking for -ldnet needed for X11?"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
$inc_x
int main() { return 0; }
int t() {  Display *d = XOpenDisplay("foobar");; return 0; }
EOF
if eval $ac_compile; then
  rm -rf conftest*
  test -n "$verbose" && echo "	Added -ldnet when linking with X11 apps"
        X11_LIBS="$X11_LIBS -ldnet"
	x_ok=

fi
rm -f conftest*

else
   :; 
fi

fi
if test -n "$x_ok" && test -z "$no_x"; then
  ac_save_LIBS="${LIBS}"
LIBS="${LIBS} -ldnet_stub"
ac_have_lib=""
test -n "$silent" || echo "checking for -ldnet_stub"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"

int main() { return 0; }
int t() { main();; return 0; }
EOF
if eval $ac_compile; then
  rm -rf conftest*
  ac_have_lib="1"

fi
rm -f conftest*
LIBS="${ac_save_LIBS}"
if test -n "${ac_have_lib}"; then
   :; LIBS="${x_includes} ${x_libraries} $copy_libs -lX11 -ldnet_stub"
    test -n "$silent" || echo "checking for -ldnet_stub needed for X11?"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
$inc_x
int main() { return 0; }
int t() {  Display *d = XOpenDisplay("foobar");; return 0; }
EOF
if eval $ac_compile; then
  rm -rf conftest*
  test -n "$verbose" && echo "	Added -ldnet_stub when linking with X11 apps"
        X11_LIBS="$X11_LIBS -ldnet_stub"
	x_ok=

fi
rm -f conftest*

else
   :; 
fi

fi
if test -n "$x_ok" && test -z "$no_x"; then
   case "$X11_LIBS" in
    *static*) ;;
    *) LIBS="${x_includes} -Bstatic ${x_libraries} -lX11 $X11_LIBS"
       test -n "$silent" || echo "checking for -Bstatic needed for X11?"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
$inc_x
int main() { return 0; }
int t() {  Display *d = XOpenDisplay("foobar");; return 0; }
EOF
if eval $ac_compile; then
  rm -rf conftest*
  test -n "$verbose" && echo "	Added -Bstatic when linking with X11 apps"
   	  X11_LIBS="-Bstatic ${X11_LIBS}"
	  x_ok=

fi
rm -f conftest*

       ;;
  esac
fi
x_libraries="${copy_x_libraries}"
have_x11=
missing_x11=
if test -n "$no_x"; then
  missing_x11="$ALL_X11_LIBS"
else
  test -n "$silent" || echo "checking for $ALL_X11_LIBS"
  libs_i="${copy_libs} ${x_libraries}"
  libs_x="${X11_LIBS} ${MATHLIB}"
  LIBS="$libs_i $libs_x"
  ac_save_LIBS="${LIBS}"
LIBS="${LIBS} -lX11_s"
ac_have_lib=""
test -n "$silent" || echo "checking for -lX11_s"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"

int main() { return 0; }
int t() { main();; return 0; }
EOF
if eval $ac_compile; then
  rm -rf conftest*
  ac_have_lib="1"

fi
rm -f conftest*
LIBS="${ac_save_LIBS}"
if test -n "${ac_have_lib}"; then
   :; have_x11="-lX11_s"
else
   :; ac_save_LIBS="${LIBS}"
LIBS="${LIBS} -lX11"
ac_have_lib=""
test -n "$silent" || echo "checking for -lX11"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"

int main() { return 0; }
int t() { main();; return 0; }
EOF
if eval $ac_compile; then
  rm -rf conftest*
  ac_have_lib="1"

fi
rm -f conftest*
LIBS="${ac_save_LIBS}"
if test -n "${ac_have_lib}"; then
   :; have_x11="-lX11"
else
   :; echo "configure: warning: Failed to link with -lX11" >&2
	   missing_x11="-lX11"
fi

fi

  LIBS="$libs_i -lXext_s $have_x11 $libs_x"
  test -n "$silent" || echo "checking for -lXext_s"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"

int main() { return 0; }
int t() { main();; return 0; }
EOF
if eval $ac_compile; then
  rm -rf conftest*
  have_x11="-lXext_s $have_x11"

else
  rm -rf conftest*
  LIBS="$libs_i -lXext $have_x11 $libs_x"
	test -n "$silent" || echo "checking for -lXext"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"

int main() { return 0; }
int t() { main();; return 0; }
EOF
if eval $ac_compile; then
  rm -rf conftest*
  have_x11="-lXext $have_x11"

else
  rm -rf conftest*
  echo "configure: warning: Failed to link with -lXext" >&2
	   missing_x11="-lXext ${missing_x11}"
fi
rm -f conftest*

fi
rm -f conftest*

  LIBS="$libs_i -lXt_s $have_x11 $libs_x"
  test -n "$silent" || echo "checking for -lXt_s"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"

int main() { return 0; }
int t() { main();; return 0; }
EOF
if eval $ac_compile; then
  rm -rf conftest*
  have_x11="-lXt_s $have_x11"

else
  rm -rf conftest*
  LIBS="$libs_i -lXt $have_x11 $libs_x"
	test -n "$silent" || echo "checking for -lXt"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"

int main() { return 0; }
int t() { main();; return 0; }
EOF
if eval $ac_compile; then
  rm -rf conftest*
  have_x11="-lXt $have_x11"

else
  rm -rf conftest*
  echo "configure: warning: Failed to link with -lXt" >&2
	   missing_x11="-lXt ${missing_x11}"
fi
rm -f conftest*

fi
rm -f conftest*

  LIBS="$libs_i -lXmu_s $have_x11 $libs_x"
  test -n "$silent" || echo "checking for -lXmu_s"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"

int main() { return 0; }
int t() { main();; return 0; }
EOF
if eval $ac_compile; then
  rm -rf conftest*
  have_x11="-lXmu_s $have_x11"

else
  rm -rf conftest*
  LIBS="$libs_i -lXmu $have_x11 $libs_x"
	test -n "$silent" || echo "checking for -lXmu"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"

int main() { return 0; }
int t() { main();; return 0; }
EOF
if eval $ac_compile; then
  rm -rf conftest*
  have_x11="-lXmu $have_x11"

else
  rm -rf conftest*
  echo "configure: warning: Failed to link with -lXmu" >&2
	   missing_x11="-lXmu ${missing_x11}"
fi
rm -f conftest*

fi
rm -f conftest*

  LIBS="$libs_i -lXaw_s $have_x11 $libs_x"
  test -n "$silent" || echo "checking for -lXaw_s"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"

int main() { return 0; }
int t() { main();; return 0; }
EOF
if eval $ac_compile; then
  rm -rf conftest*
  have_x11="-lXaw_s $have_x11"

else
  rm -rf conftest*
  LIBS="$libs_i -lXaw $have_x11 $libs_x"
	test -n "$silent" || echo "checking for -lXaw"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"

int main() { return 0; }
int t() { main();; return 0; }
EOF
if eval $ac_compile; then
  rm -rf conftest*
  have_x11="-lXaw $have_x11"

else
  rm -rf conftest*
  echo "configure: warning: Failed to link with -lXaw" >&2
	   missing_x11="-lXaw ${missing_x11}"
fi
rm -f conftest*

fi
rm -f conftest*

fi
LIBS="${copy_libs}"
if test -n "$missing_x11"; then
  X11_LIBS="$ALL_X11_LIBS $X11_LIBS"
else
  X11_LIBS="$have_x11 $X11_LIBS"
fi
have_x11="${have_x11} $X11_LIBS ${MATHLIB}"
if test -z "$no_x"; then
  inc_x='#if defined(__STDC__)
#include <stdarg.h>
#else
#include <varargs.h>
#endif
int LL_uid = 0;
#if defined(__STDC__)
void LogMess (int uid, char *format, ...)
{ return; }
#else
void LogMess(va_alist) 
 va_dcl 
{ return; }
#endif
void _XlTextCheckResize(ctx) 
 TextWidget ctx; 
{ return; }'
  copy_cflags="$CFLAGS"
  CFLAGS="-c $copy_cflags -I${srcdir}/interface/xlincks/libxl"
  CFLAGS="$CFLAGS -I${srcdir}/includes -I${srcdir}/protos ${x_includes} ${x_libraries} $have_x11"
  nok=
  test -n "$silent" || echo "checking for whether we need to include X11/Xaw/Text.h in ltextsrc.c"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"

#include "${srcdir}/interface/xlincks/libxl/ltextsrc.c"
$inc_x
int main() { return 0; }
int t() { ; return 0; }
EOF
if eval $ac_compile; then
  rm -rf conftest*
  nok=yes

fi
rm -f conftest*

  if test -z "$nok"; then   
    test -n "$silent" || echo "checking for verifying ... "
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"

#define NEED_X11_XAW_TEXT_H
#include "${srcdir}/interface/xlincks/libxl/ltextsrc.c"
$inc_x
int main() { return 0; }
int t() { ; return 0; }
EOF
if eval $ac_compile; then
  rm -rf conftest*
  nok=yes
    
{
test -n "$verbose" && \
echo "	defining NEED_X11_XAW_TEXT_H"
echo "#define" NEED_X11_XAW_TEXT_H "1" >> confdefs.h
DEFS="$DEFS -DNEED_X11_XAW_TEXT_H=1"
}


fi
rm -f conftest*

  fi
  if test -z "$nok"; then
      echo "configure: warning: Failed both test cases ... " >&2
  fi
  CFLAGS="$copy_cflags"
  copy_cpp="$CPP"
  CPP="$copy_cpp ${x_includes}"
  test -n "$silent" || echo "checking for copy_area_offsets in X11/Xaw/TextP.h"
  echo '#include "confdefs.h"
#include <X11/Xaw/TextP.h>' > conftest.${ac_ext}
eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
if egrep "copy_area_offsets" conftest.out >/dev/null 2>&1; then
  :
else
  rm -rf conftest*
  
{
test -n "$verbose" && \
echo "	defining NO_TEXT_COPY_AREA"
echo "#define" NO_TEXT_COPY_AREA "1" >> confdefs.h
DEFS="$DEFS -DNO_TEXT_COPY_AREA=1"
}

fi
rm -f conftest*

  CPP="$copy_cpp"
fi
if test -n "$on_alpha"; then
  if test -n "$GCC"; then
    X11_LIBS="${X11_LIBS} -static"
  else
    X11_LIBS="${X11_LIBS} -non_shared"
  fi
fi
for ac_func in select
do
ac_tr_func=HAVE_`echo $ac_func | tr '[a-z]' '[A-Z]'`
test -n "$silent" || echo "checking for ${ac_func}"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
#include <ctype.h>
int main() { return 0; }
int t() { 
/* 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
/* Override any gcc2 internal prototype to avoid an error.  */
extern char ${ac_func}(); ${ac_func}();
#endif
; return 0; }
EOF
if eval $ac_compile; then
  rm -rf conftest*
  {
test -n "$verbose" && \
echo "	defining ${ac_tr_func}"
echo "#define" ${ac_tr_func} "1" >> confdefs.h
DEFS="$DEFS -D${ac_tr_func}=1"
}


fi
rm -f conftest*
done

case "$DEFS" in
   *HAVE_SELECT*);;
   *) for ac_func in poll
do
ac_tr_func=HAVE_`echo $ac_func | tr '[a-z]' '[A-Z]'`
test -n "$silent" || echo "checking for ${ac_func}"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
#include <ctype.h>
int main() { return 0; }
int t() { 
/* 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
/* Override any gcc2 internal prototype to avoid an error.  */
extern char ${ac_func}(); ${ac_func}();
#endif
; return 0; }
EOF
if eval $ac_compile; then
  rm -rf conftest*
  {
test -n "$verbose" && \
echo "	defining ${ac_tr_func}"
echo "#define" ${ac_tr_func} "1" >> confdefs.h
DEFS="$DEFS -D${ac_tr_func}=1"
}


fi
rm -f conftest*
done
;;
esac
for ac_func in flock getdtablesize random setlinebuf usleep waitpid
do
ac_tr_func=HAVE_`echo $ac_func | tr '[a-z]' '[A-Z]'`
test -n "$silent" || echo "checking for ${ac_func}"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
#include <ctype.h>
int main() { return 0; }
int t() { 
/* 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
/* Override any gcc2 internal prototype to avoid an error.  */
extern char ${ac_func}(); ${ac_func}();
#endif
; return 0; }
EOF
if eval $ac_compile; then
  rm -rf conftest*
  {
test -n "$verbose" && \
echo "	defining ${ac_tr_func}"
echo "#define" ${ac_tr_func} "1" >> confdefs.h
DEFS="$DEFS -D${ac_tr_func}=1"
}


fi
rm -f conftest*
done

test -n "$silent" || echo "checking for strdup"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
#include <ctype.h>
int main() { return 0; }
int t() { 
/* 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_strdup) || defined (__stub___strdup)
choke me
#else
/* Override any gcc2 internal prototype to avoid an error.  */
extern char strdup(); strdup();
#endif
; return 0; }
EOF
if eval $ac_compile; then
  :
else
  rm -rf conftest*
  {
test -n "$verbose" && \
echo "	defining NEED_STRDUP"
echo "#define" NEED_STRDUP "1" >> confdefs.h
DEFS="$DEFS -DNEED_STRDUP=1"
}

fi
rm -f conftest*

test -n "$silent" || echo "checking for strtol"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
#include <ctype.h>
int main() { return 0; }
int t() { 
/* 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_strtol) || defined (__stub___strtol)
choke me
#else
/* Override any gcc2 internal prototype to avoid an error.  */
extern char strtol(); strtol();
#endif
; return 0; }
EOF
if eval $ac_compile; then
  :
else
  rm -rf conftest*
  {
test -n "$verbose" && \
echo "	defining NEED_STRTOL"
echo "#define" NEED_STRTOL "1" >> confdefs.h
DEFS="$DEFS -DNEED_STRTOL=1"
}

fi
rm -f conftest*

case "$DEFS" in
  *LONG_LONG*|*64_LONG*) for ac_func in xdr_hyper xdr_longlong_t
do
ac_tr_func=HAVE_`echo $ac_func | tr '[a-z]' '[A-Z]'`
test -n "$silent" || echo "checking for ${ac_func}"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
#include <ctype.h>
int main() { return 0; }
int t() { 
/* 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
/* Override any gcc2 internal prototype to avoid an error.  */
extern char ${ac_func}(); ${ac_func}();
#endif
; return 0; }
EOF
if eval $ac_compile; then
  rm -rf conftest*
  {
test -n "$verbose" && \
echo "	defining ${ac_tr_func}"
echo "#define" ${ac_tr_func} "1" >> confdefs.h
DEFS="$DEFS -D${ac_tr_func}=1"
}


fi
rm -f conftest*
done
;;
  *);;
esac
# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
# for constant arguments.  Useless!
test -n "$silent" || echo "checking for working alloca.h"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
#include <alloca.h>
int main() { return 0; }
int t() { char *p = alloca(2 * sizeof(int));; return 0; }
EOF
if eval $ac_compile; then
  rm -rf conftest*
  
{
test -n "$verbose" && \
echo "	defining HAVE_ALLOCA_H"
echo "#define" HAVE_ALLOCA_H "1" >> confdefs.h
DEFS="$DEFS -DHAVE_ALLOCA_H=1"
}


fi
rm -f conftest*

ac_decl="#ifdef __GNUC__
#define alloca __builtin_alloca
#else
#if HAVE_ALLOCA_H
#include <alloca.h>
#else
#ifdef _AIX
 #pragma alloca
#else
char *alloca ();
#endif
#endif
#endif
"
test -n "$silent" || echo "checking for alloca"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
$ac_decl
int main() { return 0; }
int t() { char *p = (char *) alloca(1);; return 0; }
EOF
if eval $ac_compile; then
  rm -rf conftest*
  
{
test -n "$verbose" && \
echo "	defining HAVE_ALLOCA"
echo "#define" HAVE_ALLOCA "1" >> confdefs.h
DEFS="$DEFS -DHAVE_ALLOCA=1"
}


else
  rm -rf conftest*
  ac_alloca_missing=1
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"

#if defined(CRAY) && ! defined(CRAY2)
winnitude
#else
lossage
#endif

EOF
eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
if egrep "winnitude" conftest.out >/dev/null 2>&1; then
  rm -rf conftest*
  test -n "$silent" || echo "checking for _getb67"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
#include <ctype.h>
int main() { return 0; }
int t() { 
/* 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__getb67) || defined (__stub____getb67)
choke me
#else
/* Override any gcc2 internal prototype to avoid an error.  */
extern char _getb67(); _getb67();
#endif
; return 0; }
EOF
if eval $ac_compile; then
  rm -rf conftest*
  {
test -n "$verbose" && \
echo "	defining" CRAY_STACKSEG_END to be "_getb67"
echo "#define" CRAY_STACKSEG_END "_getb67" >> confdefs.h
DEFS="$DEFS -DCRAY_STACKSEG_END=_getb67"
}


else
  rm -rf conftest*
  test -n "$silent" || echo "checking for GETB67"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
#include <ctype.h>
int main() { return 0; }
int t() { 
/* 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_GETB67) || defined (__stub___GETB67)
choke me
#else
/* Override any gcc2 internal prototype to avoid an error.  */
extern char GETB67(); GETB67();
#endif
; return 0; }
EOF
if eval $ac_compile; then
  rm -rf conftest*
  {
test -n "$verbose" && \
echo "	defining" CRAY_STACKSEG_END to be "GETB67"
echo "#define" CRAY_STACKSEG_END "GETB67" >> confdefs.h
DEFS="$DEFS -DCRAY_STACKSEG_END=GETB67"
}


else
  rm -rf conftest*
  test -n "$silent" || echo "checking for getb67"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
#include <ctype.h>
int main() { return 0; }
int t() { 
/* 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_getb67) || defined (__stub___getb67)
choke me
#else
/* Override any gcc2 internal prototype to avoid an error.  */
extern char getb67(); getb67();
#endif
; return 0; }
EOF
if eval $ac_compile; then
  rm -rf conftest*
  {
test -n "$verbose" && \
echo "	defining" CRAY_STACKSEG_END to be "getb67"
echo "#define" CRAY_STACKSEG_END "getb67" >> confdefs.h
DEFS="$DEFS -DCRAY_STACKSEG_END=getb67"
}


fi
rm -f conftest*

fi
rm -f conftest*

fi
rm -f conftest*


fi
rm -f conftest*


fi
rm -f conftest*

if test -n "$ac_alloca_missing"; then
  # The SVR3 libPW and SVR4 libucb both contain incompatible functions
  # that cause trouble.  Some versions do not even contain alloca or
  # contain a buggy version.  If you still want to use their alloca,
  # use ar to extract alloca.o from them instead of compiling alloca.c.
  ALLOCA=alloca.o
  
{
test -n "$verbose" && \
echo "	defining C_ALLOCA"
echo "#define" C_ALLOCA "1" >> confdefs.h
DEFS="$DEFS -DC_ALLOCA=1"
}


  test -n "$silent" || echo "checking stack direction for C alloca"
  test -n "$silent" || echo "checking whether cross-compiling"
# If we cannot run a trivial program, we must be cross compiling.
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
main(){exit(0);}
EOF
eval $ac_compile
if test -s conftest && (./conftest; exit) 2>/dev/null; then
  :
else
  cross_compiling=1
fi
rm -fr conftest*

if test -n "$cross_compiling"
then
  
{
test -n "$verbose" && \
echo "	defining" STACK_DIRECTION to be "0"
echo "#define" STACK_DIRECTION "0" >> confdefs.h
DEFS="$DEFS -DSTACK_DIRECTION=0"
}

else
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
find_stack_direction ()
{
  static char *addr = 0;
  auto char dummy;
  if (addr == 0)
    {
      addr = &dummy;
      return find_stack_direction ();
    }
  else
    return (&dummy > addr) ? 1 : -1;
}
main ()
{
  exit (find_stack_direction() < 0);
}
EOF
eval $ac_compile
if test -s conftest && (./conftest; exit) 2>/dev/null; then
  
{
test -n "$verbose" && \
echo "	defining" STACK_DIRECTION to be "1"
echo "#define" STACK_DIRECTION "1" >> confdefs.h
DEFS="$DEFS -DSTACK_DIRECTION=1"
}


else
  
{
test -n "$verbose" && \
echo "	defining" STACK_DIRECTION to be "-1"
echo "#define" STACK_DIRECTION "-1" >> confdefs.h
DEFS="$DEFS -DSTACK_DIRECTION=-1"
}

fi
fi
rm -fr conftest*
fi

cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
#include <stdio.h>
/* If setvbuf has the reversed format, exit 0. */
main () {
  /* This call has the arguments reversed.
     A reversed system may check and see that the address of main
     is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
  if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
    exit(1);
  putc('\r', stdout);
  exit(0);			/* Non-reversed systems segv here.  */
}
EOF
eval $ac_compile
if test -s conftest && (./conftest; exit) 2>/dev/null; then
  
{
test -n "$verbose" && \
echo "	defining SETVBUF_REVERSED"
echo "#define" SETVBUF_REVERSED "1" >> confdefs.h
DEFS="$DEFS -DSETVBUF_REVERSED=1"
}


fi
rm -fr conftest*
rm -f core


test -n "$silent" || echo "checking for working mmap"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
/* Thanks to Mike Haertel and Jim Avera for this test. */
#include <sys/types.h>
#include <fcntl.h>
#include <sys/mman.h>

#ifdef BSD
#ifndef BSD4_1
#define HAVE_GETPAGESIZE
#endif
#endif
#ifndef HAVE_GETPAGESIZE
#include <sys/param.h>
#ifdef EXEC_PAGESIZE
#define getpagesize() EXEC_PAGESIZE
#else
#ifdef NBPG
#define getpagesize() NBPG * CLSIZE
#ifndef CLSIZE
#define CLSIZE 1
#endif /* no CLSIZE */
#else /* no NBPG */
#ifdef NBPC
#define getpagesize() NBPC
#else /* no NBPC */
#define getpagesize() PAGESIZE /* SVR4 */
#endif /* no NBPC */
#endif /* no NBPG */
#endif /* no EXEC_PAGESIZE */
#endif /* not HAVE_GETPAGESIZE */

#ifdef __osf__
#define valloc malloc
#endif

extern char *valloc();
extern char *malloc();

int
main()
{
  char *buf1, *buf2, *buf3;
  int i = getpagesize(), j;
  int i2 = getpagesize()*2;
  int fd;

  buf1 = valloc(i2);
  buf2 = valloc(i);
  buf3 = malloc(i2);
  for (j = 0; j < i2; ++j)
    *(buf1 + j) = rand();
  fd = open("conftestmmap", O_CREAT | O_RDWR, 0666);
  write(fd, buf1, i2);
  mmap(buf2, i, PROT_READ | PROT_WRITE, MAP_FIXED | MAP_PRIVATE, fd, 0);
  for (j = 0; j < i; ++j)
    if (*(buf1 + j) != *(buf2 + j))
      exit(1);
  lseek(fd, (long)i, 0);
  read(fd, buf2, i); /* read into mapped memory -- file should not change */
  /* (it does in i386 SVR4.0 - Jim Avera) */
  lseek(fd, (long)0, 0);
  read(fd, buf3, i2);
  for (j = 0; j < i2; ++j)
    if (*(buf1 + j) != *(buf3 + j))
      exit(1);
  exit(0);
}

EOF
eval $ac_compile
if test -s conftest && (./conftest; exit) 2>/dev/null; then
  
{
test -n "$verbose" && \
echo "	defining HAVE_MMAP"
echo "#define" HAVE_MMAP "1" >> confdefs.h
DEFS="$DEFS -DHAVE_MMAP=1"
}


fi
rm -fr conftest*

test -n "$silent" || echo "checking for wait3 that fills in rusage"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
#include <sys/types.h>
#include <sys/time.h>
#include <sys/resource.h>
#include <stdio.h>
/* HP-UX has wait3 but does not fill in rusage at all.  */
main() {
  struct rusage r;
  int i;
  /* Use a field that we can force nonzero --
     voluntary context switches.
     For systems like NeXT and OSF/1 that don't set it,
     also use the system CPU time.  */
  r.ru_nvcsw = 0;
  r.ru_stime.tv_sec = 0;
  r.ru_stime.tv_usec = 0;
  switch (fork()) {
  case 0: /* Child.  */
    sleep(1); /* Give up the CPU.  */
    _exit(0);
  case -1: _exit(0); /* What can we do?  */
  default: /* Parent.  */
    wait3(&i, 0, &r);
    exit(r.ru_nvcsw == 0
	 && r.ru_stime.tv_sec == 0 && r.ru_stime.tv_usec == 0);
  }
}
EOF
eval $ac_compile
if test -s conftest && (./conftest; exit) 2>/dev/null; then
  
{
test -n "$verbose" && \
echo "	defining HAVE_WAIT3"
echo "#define" HAVE_WAIT3 "1" >> confdefs.h
DEFS="$DEFS -DHAVE_WAIT3=1"
}


fi
rm -fr conftest*

test -n "$silent" || echo "checking for MAXPATHLEN"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"

#include <sys/param.h>
#ifdef MAXPATHLEN
yes
#endif
EOF
eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
if egrep "yes" conftest.out >/dev/null 2>&1; then
  :
else
  rm -rf conftest*
  test -n "$silent" || echo "checking for limits.h"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
#include <limits.h>
EOF
# Some shells (Coherent) do redirections in the wrong order, so need
# the parens.
ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
if test -z "$ac_err"; then
  rm -rf conftest*
  cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"

#include <limits.h
#ifdef PATH_MAX
yes
#endif
EOF
eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
if egrep "yes" conftest.out >/dev/null 2>&1; then
  rm -rf conftest*
  
{
test -n "$verbose" && \
echo "	defining HAVE_LIMITS_H"
echo "#define" HAVE_LIMITS_H "1" >> confdefs.h
DEFS="$DEFS -DHAVE_LIMITS_H=1"
}


fi
rm -f conftest*


fi
rm -f conftest*

fi
rm -f conftest*

test -n "$silent" || echo "checking for return type of signal handlers"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
#include <sys/types.h>
#include <signal.h>
#ifdef signal
#undef signal
#endif
extern void (*signal ()) ();
int main() { return 0; }
int t() { int i;; return 0; }
EOF
if eval $ac_compile; then
  rm -rf conftest*
  
{
test -n "$verbose" && \
echo "	defining" RETSIGTYPE to be "void"
echo "#define" RETSIGTYPE "void" >> confdefs.h
DEFS="$DEFS -DRETSIGTYPE=void"
}


else
  rm -rf conftest*
  
{
test -n "$verbose" && \
echo "	defining" RETSIGTYPE to be "int"
echo "#define" RETSIGTYPE "int" >> confdefs.h
DEFS="$DEFS -DRETSIGTYPE=int"
}

fi
rm -f conftest*


for ac_func in sigaction
do
ac_tr_func=HAVE_`echo $ac_func | tr '[a-z]' '[A-Z]'`
test -n "$silent" || echo "checking for ${ac_func}"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
#include <ctype.h>
int main() { return 0; }
int t() { 
/* 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
/* Override any gcc2 internal prototype to avoid an error.  */
extern char ${ac_func}(); ${ac_func}();
#endif
; return 0; }
EOF
if eval $ac_compile; then
  rm -rf conftest*
  {
test -n "$verbose" && \
echo "	defining ${ac_tr_func}"
echo "#define" ${ac_tr_func} "1" >> confdefs.h
DEFS="$DEFS -D${ac_tr_func}=1"
}


fi
rm -f conftest*
done

test -n "$silent" || echo "checking for restartable system calls"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
/* Exit 0 (true) if wait returns something other than -1,
   i.e. the pid of the child, which means that wait was restarted
   after getting the signal.  */
#include <sys/types.h>
#include <signal.h>
ucatch (isig) { }
main () {
  int i = fork (), status;
  if (i == 0) { sleep (3); kill (getppid (), SIGINT); sleep (3); exit (0); }
  signal (SIGINT, ucatch);
  status = wait(&i);
  if (status == -1) wait(&i);
  exit (status == -1);
}

EOF
eval $ac_compile
if test -s conftest && (./conftest; exit) 2>/dev/null; then
  
{
test -n "$verbose" && \
echo "	defining HAVE_RESTARTABLE_SYSCALLS"
echo "#define" HAVE_RESTARTABLE_SYSCALLS "1" >> confdefs.h
DEFS="$DEFS -DHAVE_RESTARTABLE_SYSCALLS=1"
}


fi
rm -fr conftest*

test -n "$silent" || echo "checking for reliable signals"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"

#ifndef NO_STDLIB_H
#include <stdlib.h>
#endif
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <sys/types.h>
#include <signal.h>
static int j = 0;
RETSIGTYPE ucatch (isig) int isig; { j++; }
main (argc,argv) int argc; char *argv[]; {
  int i = fork ();
  if (i == 0) {
    sleep(5); kill(getppid(),SIGINT); sleep(5); kill(getppid(),SIGINT); 
    exit (0);}
#ifdef HAVE_SIGACTION
  {  struct sigaction act;
     act.sa_handler = ucatch; sigemptyset(&act.sa_mask); act.sa_flags = 0;
#ifdef SA_RESTART
     act.sa_flags |= SA_RESTART;
#endif /* SA_RESTART */
    sigaction (SIGINT, &act, NULL);}
#else
  signal (SIGINT, ucatch);
#endif
  while(wait(&i) == -1); exit(j != 2);}

EOF
eval $ac_compile
if test -s conftest && (./conftest; exit) 2>/dev/null; then
  
{
test -n "$verbose" && \
echo "	defining HAVE_RELIABLE_SIGNALS"
echo "#define" HAVE_RELIABLE_SIGNALS "1" >> confdefs.h
DEFS="$DEFS -DHAVE_RELIABLE_SIGNALS=1"
}


fi
rm -fr conftest*
rm -f core >/dev/null 2>/dev/null
case "$DEFS" in
  *HAVE_GETDTABLE*) ;;
  *)  test -n "$silent" || echo "checking for _SC_OPEN_MAX"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"

#ifdef HAVE_UNISTD_H 
#include <unistd.h>
#endif
int main() { return 0; }
int t() { int foo=_SC_OPEN_MAX;; return 0; }
EOF
if eval $ac_compile; then
  rm -rf conftest*
  
{
test -n "$verbose" && \
echo "	defining HAVE_SC_OPEN_MAX"
echo "#define" HAVE_SC_OPEN_MAX "1" >> confdefs.h
DEFS="$DEFS -DHAVE_SC_OPEN_MAX=1"
}


fi
rm -f conftest*
;;
esac
for ac_func in setsid
do
ac_tr_func=HAVE_`echo $ac_func | tr '[a-z]' '[A-Z]'`
test -n "$silent" || echo "checking for ${ac_func}"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
#include <ctype.h>
int main() { return 0; }
int t() { 
/* 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
/* Override any gcc2 internal prototype to avoid an error.  */
extern char ${ac_func}(); ${ac_func}();
#endif
; return 0; }
EOF
if eval $ac_compile; then
  rm -rf conftest*
  {
test -n "$verbose" && \
echo "	defining ${ac_tr_func}"
echo "#define" ${ac_tr_func} "1" >> confdefs.h
DEFS="$DEFS -D${ac_tr_func}=1"
}


fi
rm -f conftest*
done

case "$DEFS" in 
  *HAVE_SETSID*) ;;
  *) for ac_func in setprgp0
do
ac_tr_func=HAVE_`echo $ac_func | tr '[a-z]' '[A-Z]'`
test -n "$silent" || echo "checking for ${ac_func}"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
#include <ctype.h>
int main() { return 0; }
int t() { 
/* 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
/* Override any gcc2 internal prototype to avoid an error.  */
extern char ${ac_func}(); ${ac_func}();
#endif
; return 0; }
EOF
if eval $ac_compile; then
  rm -rf conftest*
  {
test -n "$verbose" && \
echo "	defining ${ac_tr_func}"
echo "#define" ${ac_tr_func} "1" >> confdefs.h
DEFS="$DEFS -D${ac_tr_func}=1"
}


fi
rm -f conftest*
done
 
      case "$DEFS" in
      *HAVE_SETPRGP*) ;;
      *) for ac_func in setprgp2
do
ac_tr_func=HAVE_`echo $ac_func | tr '[a-z]' '[A-Z]'`
test -n "$silent" || echo "checking for ${ac_func}"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
#include <ctype.h>
int main() { return 0; }
int t() { 
/* 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
/* Override any gcc2 internal prototype to avoid an error.  */
extern char ${ac_func}(); ${ac_func}();
#endif
; return 0; }
EOF
if eval $ac_compile; then
  rm -rf conftest*
  {
test -n "$verbose" && \
echo "	defining ${ac_tr_func}"
echo "#define" ${ac_tr_func} "1" >> confdefs.h
DEFS="$DEFS -D${ac_tr_func}=1"
}


fi
rm -f conftest*
done
;;
      esac
esac
test -n "$silent" || echo "checking for byte order/endianess used in netinet/tcp.h"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
#include <sys/types.h>
#include <netinet/tcp.h>
int main() { return 0; }
int t() { int x;; return 0; }
EOF
if eval $ac_compile; then
  :
else
  rm -rf conftest*
  for ac_hdr in machine/endian.h sys/byteorder.h
do
ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'a-z./' 'A-Z__'`
test -n "$silent" || echo "checking for ${ac_hdr}"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
#include <${ac_hdr}>
EOF
# Some shells (Coherent) do redirections in the wrong order, so need
# the parens.
ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
if test -z "$ac_err"; then
  rm -rf conftest*
  
{
test -n "$verbose" && \
echo "	defining ${ac_tr_hdr}"
echo "#define" ${ac_tr_hdr} "1" >> confdefs.h
DEFS="$DEFS -D${ac_tr_hdr}=1"
}


fi
rm -f conftest*
done

fi
rm -f conftest*

test -n "$silent" || echo "checking for whether sprintf returns an int"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
#include<stdio.h>
extern int sprintf();

int main() { return 0; }
int t() { char b[10];int p=sprintf(b,"%d",10);; return 0; }
EOF
if eval $ac_compile; then
  rm -rf conftest*
  
{
test -n "$verbose" && \
echo "	defining SPRINTF_INT"
echo "#define" SPRINTF_INT "1" >> confdefs.h
DEFS="$DEFS -DSPRINTF_INT=1"
}


fi
rm -f conftest*

test -n "$silent" || echo "checking for a printf not able to handle null string"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"

#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#ifndef NO_STDLIB_H
#include <stdlib.h>
#endif
#include <stdio.h>
main()
{ char *p = NULL; char buf[10]; sprintf(buf,"%s\n", p); exit(0);}
EOF
eval $ac_compile
if test -s conftest && (./conftest; exit) 2>/dev/null; then
  :
else
  
{
test -n "$verbose" && \
echo "	defining HAVE_BROKEN_PRINTF"
echo "#define" HAVE_BROKEN_PRINTF "1" >> confdefs.h
DEFS="$DEFS -DHAVE_BROKEN_PRINTF=1"
}

rm -f core >/dev/null 2>/dev/null
fi
rm -fr conftest*
# check whether --with-fionread or --without-fionread was given.
withval="$with_fionread"
if test -n "$withval"; then
  set -x
fi

got_it=
test -n "$silent" || echo "checking for FIONREAD in sys/ioctl.h"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"

#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif	
#include <sys/types.h>
#include <sys/ioctl.h>
int main() { return 0; }
int t() { int foo = FIONREAD;; return 0; }
EOF
if eval $ac_compile; then
  rm -rf conftest*
  got_it=yes

fi
rm -f conftest*

if test -z "$got_it"; then
test -n "$silent" || echo "checking for checking for FIONREAD in sys/socket.h"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"

#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <sys/types.h>
#include <sys/ioctl.h>
#include <sys/socket.h>
int main() { return 0; }
int t() { int foo = FIONREAD;; return 0; }
EOF
if eval $ac_compile; then
  rm -rf conftest*
  got_it=yes

fi
rm -f conftest*

fi
if test -z "$got_it"; then
test -n "$silent" || echo "checking for checking for FIONREAD in sys/filio.h"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"

#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <sys/types.h>
#include <sys/ioctl.h>
#include <sys/filio.h>
int main() { return 0; }
int t() { int foo = FIONREAD;; return 0; }
EOF
if eval $ac_compile; then
  rm -rf conftest*
  got_it=yes

{
test -n "$verbose" && \
echo "	defining HAVE_SYS_FILIO_H"
echo "#define" HAVE_SYS_FILIO_H "1" >> confdefs.h
DEFS="$DEFS -DHAVE_SYS_FILIO_H=1"
}


fi
rm -f conftest*

fi
if test -z "$got_it"; then
  echo "configure: warning: Strange, failed to find FIONREAD in sys/ioctl.h, sys/filio.h, sys/socket.h" >&2
fi
nok=
prg_x='
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#ifndef NO_STDLIB_H
#include <stdlib.h>
#endif
#include <sys/types.h>
#include <sys/ioctl.h>
#include <sys/socket.h>
#ifdef HAVE_SYS_FILIO_H
#include <sys/filio.h>
#endif'
test -n "$silent" || echo "checking for whether FIONREAD works on pipes"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
$prg_x
main()
{ int fd[2]; long size;
  if(pipe(fd) < 0) exit(1);
  if(write(fd[1], &size, 1) < 0) exit(1);
  if(ioctl(fd[0], FIONREAD, &size) < 0) exit(1); else exit(0);}
EOF
eval $ac_compile
if test -s conftest && (./conftest; exit) 2>/dev/null; then
  nok=yes

fi
rm -fr conftest*
if test -z "$nok";then
  cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
$prg_x
main()
{ int fd[2]; long size;
  if(pipe(fd) < 0) exit(1);
  if(write(fd[1], &size, 1) < 0) exit(1);
  if(ioctl(fd[0], FIONREAD, &size) < 0) exit(0); else exit(1);}
EOF
eval $ac_compile
if test -s conftest && (./conftest; exit) 2>/dev/null; then
  test -n "$verbose" && echo "	FIONREAD do NOT work on pipes"
  
{
test -n "$verbose" && \
echo "	defining NO_FIONREAD_PIPE"
echo "#define" NO_FIONREAD_PIPE "1" >> confdefs.h
DEFS="$DEFS -DNO_FIONREAD_PIPE=1"
}
 
  nok=yes

fi
rm -fr conftest*
fi
if test -z "$nok"; then
  echo "configure: warning: Strange - failed to compile both cases" >&2
fi
# check whether --with-fionread or --without-fionread was given.
withval="$with_fionread"
if test -n "$withval"; then
  set +x
fi

test -n "$silent" || echo "checking for sys/socket.h and sys/time.h"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"

#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <sys/types.h>
#include <sys/socket.h>
extern int socket();
EOF
# Some shells (Coherent) do redirections in the wrong order, so need
# the parens.
ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
if test -z "$ac_err"; then
  :
else
  rm -rf conftest*
  cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"

#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <sys/time.h>
#include <sys/types.h>
#include <sys/socket.h>
extern int socket();
EOF
# Some shells (Coherent) do redirections in the wrong order, so need
# the parens.
ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
if test -z "$ac_err"; then
  rm -rf conftest*
  
{
test -n "$verbose" && \
echo "	defining NEED_SYS_TIME_WITH_SOCKET"
echo "#define" NEED_SYS_TIME_WITH_SOCKET "1" >> confdefs.h
DEFS="$DEFS -DNEED_SYS_TIME_WITH_SOCKET=1"
}


fi
rm -f conftest*
fi
rm -f conftest*
got_it=
test -n "$silent" || echo "checking for SIOCATMARK in sys/socket.h or sys/sockio.h"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"

#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif	
#include <sys/types.h>
#include <sys/ioctl.h>
#include <sys/socket.h>
#ifdef HAVE_SYS_SOCKIO_H
#include <sys/sockio.h>
#endif
int main() { return 0; }
int t() { int x = SIOCATMARK;; return 0; }
EOF
if eval $ac_compile; then
  rm -rf conftest*
  got_it=yes

fi
rm -f conftest*

if test -z "$got_it"; then
test -n "$silent" || echo "checking for stropts.h"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
#include <stropts.h>
EOF
# Some shells (Coherent) do redirections in the wrong order, so need
# the parens.
ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
if test -z "$ac_err"; then
  rm -rf conftest*
  test -n "$silent" || echo "checking for SIOCATMARK in stropts.h"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"

#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif	
#include <sys/types.h>
#include <sys/ioctl.h>
#include <sys/socket.h>
#ifdef HAVE_SYS_SOCKIO_H
#include <sys/sockio.h>
#endif
#include <stropts.h>
int main() { return 0; }
int t() { int x = SIOCATMARK;; return 0; }
EOF
if eval $ac_compile; then
  rm -rf conftest*
  
{
test -n "$verbose" && \
echo "	defining HAVE_STROPTS_H"
echo "#define" HAVE_STROPTS_H "1" >> confdefs.h
DEFS="$DEFS -DHAVE_STROPTS_H=1"
}

got_it=yes

fi
rm -f conftest*


fi
rm -f conftest*

fi
if test -z "$got_it"; then
  echo "configure: warning: oops, failed to find SIOCATMARK" >&2
fi
got_it=
test -n "$silent" || echo "checking for F_SETOWN"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"

#include <sys/types.h>
#include <fcntl.h>
#ifdef HAVE_SYS_FILIO_H
#include <sys/filio.h>
#endif
int main() { return 0; }
int t() { int foo = F_SETOWN;; return 0; }
EOF
if eval $ac_compile; then
  rm -rf conftest*
  
{
test -n "$verbose" && \
echo "	defining HAVE_F_SETOWN"
echo "#define" HAVE_F_SETOWN "1" >> confdefs.h
DEFS="$DEFS -DHAVE_F_SETOWN=1"
}

goto_it="F_SETOWN"

else
  rm -rf conftest*
  test -n "$silent" || echo "checking for FIOSETOWN"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"

#include <sys/types.h>
#include <ioctl.h>
#include <sys/socket.h>
#ifdef HAVE_SYS_SOCKIO_H
#include <sys/sockio.h>
#endif
int main() { return 0; }
int t() { int foo = FIOSETOWN;; return 0; }
EOF
if eval $ac_compile; then
  rm -rf conftest*
  
{
test -n "$verbose" && \
echo "	defining HAVE_FIOSETOWN"
echo "#define" HAVE_FIOSETOWN "1" >> confdefs.h
DEFS="$DEFS -DHAVE_FIOSETOWN=1"
}

got_it="FIOSETOWN"

fi
rm -f conftest*

fi
rm -f conftest*

test -n "$silent" || echo "checking for SIOCSPGRP"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"

#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif	
#include <sys/types.h>
#include <sys/ioctl.h>
#include <sys/socket.h>
#ifdef HAVE_SYS_SOCKIO_H
#include <sys/sockio.h>
#endif
#ifdef HAVE_STROPTS_H
#include <stropts.h>
#endif
int main() { return 0; }
int t() { long foo = SIOCSPGRP;; return 0; }
EOF
if eval $ac_compile; then
  rm -rf conftest*
  got_it="${gotit-SIOCSPGRP}"

fi
rm -f conftest*

if test -z "$got_it"; then
   echo "configure: warning: failed to find F_SETOWN FIOSETOWN SIOCSPGRP" >&2
fi
case "$DEFS" in
   *SIGUSR1_FOR_OOB*) 
   echo not checking for SIGURG on SCO systems - using SIGUSR1 instead
   ;;
   *) test -n "$silent" || echo "checking for SIGURG"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"

#include <sys/types.h>
#include <signal.h>
#ifdef HAVE_STROPTS_H
#include <stropts.h>
#endif
int main() { return 0; }
int t() { int x=SIGURG;; return 0; }
EOF
if eval $ac_compile; then
  :
else
  rm -rf conftest*
  echo "configure: warning: oops - failed to find SIGURG" >&2
fi
rm -f conftest*

   ;;
esac
count="`sed -n '/^char/,/^\042;/p'<${srcdir}/interface/xlincks/libxl/ltexttr.c|wc -c`"
LONGNAMES="-Wf,-XNl`expr $count + 400`"
test -n "$silent" || echo "checking for compiler support of long strings?"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
#include "interface/xlincks/libxl/ltexttr.c"
int main() { return 0; }
int t() { { exit(0);}; return 0; }
EOF
if eval $ac_compile; then
  rm -rf conftest*
  longname='#'
  

else
  rm -rf conftest*
  longname=
fi
rm -f conftest*
LONGNAMES="${longname} ${LONGNAMES}"
if test -z "$longname"; then
  copy_flags="${CFLAGS}"
  CFLAGS="${CFLAGS} ${LONGNAMES}"
  test -n "$silent" || echo "checking for compiler support of long strings - verifing"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
#include "interface/xlincks/libxl/ltexttr.c"
int main() { return 0; }
int t() { { exit(0);}; return 0; }
EOF
if eval $ac_compile; then
  :
else
  rm -rf conftest*
  echo "configure: warning: problems compiling long strings ..." >&2
    longname="failed on compile of long string"
    LONGNAMES="# ${LONGNAMES}"
  
fi
rm -f conftest*
  CFLAGS="${copy_flags}"
fi
if test -z "$no_x"; then
  inc_x='#include "config.h"	
#include <X11/IntrinsicP.h>	
#include <X11/CoreP.h>		
#include <X11/StringDefs.h>
#include <X11/Shell.h>
#include <X11/Xaw/Command.h>	
#include <X11/Xaw/Box.h>	
#include <X11/Xaw/Label.h>	
#include <X11/Xaw/TextP.h>	
#include "ltext.h"
#include "layout.h"
#include "view.h"
#include "aimtypes.h"
#include "resources.h"
#if (XT_REVISION < 5) && !defined(X11_XAW_NO_DEFINE)
#  define XawChainLeft XtChainLeft
#  define XawChainRight XtChainRight
#  define XawChainTop XtChainBottom
#  define XawChainBottom XtChainTop
#endif'
  copy_cpp="$CPP"
  CPP="$CPP $DEFS -I${srcdir}/interface/xlincks -I${srcdir}/includes ${x_includes}"
  CPP="$CPP       -I${srcdir}/interface/xlincks/libxl -I${srcdir}/protos"
  test -n "$silent" || echo "checking for a possible recursive macro in X11/Xaw"
  nok=
  cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
$inc_x
EOF
# Some shells (Coherent) do redirections in the wrong order, so need
# the parens.
ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
if test -z "$ac_err"; then
  rm -rf conftest*
  nok=yes

fi
rm -f conftest*
  if test -z "$nok"; then
    test -n "$verbose" && echo "	verifying ... "
    cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"

#define X11_XAW_NO_DEFINE
$inc_x
EOF
# Some shells (Coherent) do redirections in the wrong order, so need
# the parens.
ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
if test -z "$ac_err"; then
  rm -rf conftest*
  
{
test -n "$verbose" && \
echo "	defining X11_XAW_NO_DEFINE"
echo "#define" X11_XAW_NO_DEFINE "1" >> confdefs.h
DEFS="$DEFS -DX11_XAW_NO_DEFINE=1"
}

     nok=yes

fi
rm -f conftest*
  fi
  if test -z "$nok"; then
    echo "configure: warning: Failed both cases - because of missing X11 header files, ANSI cc or ???" >&2
  fi
  CPP="$copy_cpp"
fi
test -n "$silent" || echo "checking for registerrpc"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
#include <ctype.h>
int main() { return 0; }
int t() { 
/* 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_registerrpc) || defined (__stub___registerrpc)
choke me
#else
/* Override any gcc2 internal prototype to avoid an error.  */
extern char registerrpc(); registerrpc();
#endif
; return 0; }
EOF
if eval $ac_compile; then
  :
else
  rm -rf conftest*
  for ac_func in rpc_reg
do
ac_tr_func=HAVE_`echo $ac_func | tr 'a-z' 'A-Z'`
test -n "$silent" || echo "checking for ${ac_func}"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
#include <ctype.h>
int main() { return 0; }
int t() { 
/* 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
/* Override any gcc2 internal prototype to avoid an error.  */
extern char ${ac_func}(); ${ac_func}();
#endif
; return 0; }
EOF
if eval $ac_compile; then
  rm -rf conftest*
  {
test -n "$verbose" && \
echo "	defining ${ac_tr_func}"
echo "#define" ${ac_tr_func} "1" >> confdefs.h
DEFS="$DEFS -D${ac_tr_func}=1"
}


fi
rm -f conftest*
done

fi
rm -f conftest*

test -n "$silent" || echo "checking for callrpc"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
#include <ctype.h>
int main() { return 0; }
int t() { 
/* 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_callrpc) || defined (__stub___callrpc)
choke me
#else
/* Override any gcc2 internal prototype to avoid an error.  */
extern char callrpc(); callrpc();
#endif
; return 0; }
EOF
if eval $ac_compile; then
  :
else
  rm -rf conftest*
  for ac_func in rpc_call
do
ac_tr_func=HAVE_`echo $ac_func | tr 'a-z' 'A-Z'`
test -n "$silent" || echo "checking for ${ac_func}"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
#include <ctype.h>
int main() { return 0; }
int t() { 
/* 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
/* Override any gcc2 internal prototype to avoid an error.  */
extern char ${ac_func}(); ${ac_func}();
#endif
; return 0; }
EOF
if eval $ac_compile; then
  rm -rf conftest*
  {
test -n "$verbose" && \
echo "	defining ${ac_tr_func}"
echo "#define" ${ac_tr_func} "1" >> confdefs.h
DEFS="$DEFS -D${ac_tr_func}=1"
}


fi
rm -f conftest*
done

fi
rm -f conftest*

inc='
#include <sys/types.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#ifndef NO_STDLIB_H
#include <stdlib.h>
#endif
#include <stdio.h>
#include <rpc/rpc.h>
#include <rpc/pmap_prot.h>
#ifdef HAVE_RPC_CALL
#define callrpc(a,b,c,d,e,f,g,h) (rpc_call(a,b,c,d,e,f,g,h,("datagram_v")))
#endif
#ifdef __STDC__
#define P_(x) x
#else   
#define P_(x) ( )
#endif'
nok=
test -n "$silent" || echo "checking for callrpc(const char *, ...)"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"

$inc
extern int callrpc P_((const char *, u_long, u_long, u_long,
		       xdrproc_t, const char *,
	               xdrproc_t, char *));
int main() { return 0; }
int t() { int x=1; return 0; }
EOF
if eval $ac_compile; then
  rm -rf conftest*
  nok=yes

fi
rm -f conftest*

if test -z "$nok"; then
test -n "$silent" || echo "checking for callrpc(char *, ...)"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"

$inc
extern int callrpc P_((char *, u_long, u_long, u_long,
		       xdrproc_t, char *,
	               xdrproc_t, char *));
int main() { return 0; }
int t() { int x=1; return 0; }
EOF
if eval $ac_compile; then
  rm -rf conftest*
  nok=yes
  
{
test -n "$verbose" && \
echo "	defining CALLRPC_NOCONST"
echo "#define" CALLRPC_NOCONST "1" >> confdefs.h
DEFS="$DEFS -DCALLRPC_NOCONST=1"
}


fi
rm -f conftest*

fi
if test -z "$nok"; then
  echo "configure: warning: neither callrpc(const char *,...) nor callrpc(char *,...) worked" >&2
  echo "configure: warning: not including declaration for callrpc and registerrpc in protos/f_rpc.h" >&2
  
{
test -n "$verbose" && \
echo "	defining CALLRPC_NOPROTO"
echo "#define" CALLRPC_NOPROTO "1" >> confdefs.h
DEFS="$DEFS -DCALLRPC_NOPROTO=1"
}

fi
XDR_FREESRC="#"
XDR_FREEOBJ="#"
test -n "$silent" || echo "checking for xdr_free"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
#include <ctype.h>
int main() { return 0; }
int t() { 
/* 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_xdr_free) || defined (__stub___xdr_free)
choke me
#else
/* Override any gcc2 internal prototype to avoid an error.  */
extern char xdr_free(); xdr_free();
#endif
; return 0; }
EOF
if eval $ac_compile; then
  rm -rf conftest*
  XDR_FREESRC="$XDR_FREESRC xdr.c"
  XDR_FREEOBJ="$XDR_FREEOBJ xdr.o"

else
  rm -rf conftest*
  XDR_FREESRC="xdr.c $XDR_FREESRC"
  XDR_FREEOBJ="xdr.o $XDR_FREEOBJ"
fi
rm -f conftest*

test -n "$silent" || echo "checking for clnt_sperrno"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
#include <ctype.h>
int main() { return 0; }
int t() { 
/* 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_clnt_sperrno) || defined (__stub___clnt_sperrno)
choke me
#else
/* Override any gcc2 internal prototype to avoid an error.  */
extern char clnt_sperrno(); clnt_sperrno();
#endif
; return 0; }
EOF
if eval $ac_compile; then
  rm -rf conftest*
  XDR_FREESRC="$XDR_FREESRC clnt_perror.c"
  XDR_FREEOBJ="$XDR_FREEOBJ clnt_perror.o"

else
  rm -rf conftest*
  XDR_FREESRC="clnt_perror.c $XDR_FREESRC"
  XDR_FREEOBJ="clnt_perror.o $XDR_FREEOBJ"
fi
rm -f conftest*

# check whether --enable-experimental was given
enableval="$enable_experimental"
if test -n "$enableval"; then
  
{
test -n "$verbose" && \
echo "	defining EXPERIMENT"
echo "#define" EXPERIMENT "1" >> confdefs.h
DEFS="$DEFS -DEXPERIMENT=1"
}

fi

# check whether --with-db-dir or --without-db-dir was given.
withval="$with_db_dir"
if test -n "$withval"; then
  DB_DIR="${withval}"
else
  DB_DIR="\$(exec_prefix)"
fi

# check whether --with-owner or --without-owner was given.
withval="$with_owner"
if test -n "$withval"; then
  OWNER="${withval}"
else
  
if test -n "$USER"; then
  OWNER="${USER}"
else
  if whoami >/dev/null 2>/dev/null; then
     OWNER="`whoami`"
  else
     OWNER="marsj"
  fi
fi
fi

# check whether --with-port-number or --without-port-number was given.
withval="$with_port_number"
if test -n "$withval"; then
  TCPIPNO="${withval}"
else
  TCPIPNO="6073"
fi

# check whether --with-rpc-prog or --without-rpc-prog was given.
withval="$with_rpc_prog"
if test -n "$withval"; then
  MONITORNO="${withval}"
else
  MONITORNO="572662306"
fi

# check whether --with-host or --without-host was given.
withval="$with_host"
if test -n "$withval"; then
  X_HOST="${withval}"
else
  if test -n "$HOST"; then
  X_HOST="${HOST}"
else 
  if hostname >/dev/null 2>/dev/null; then
     X_HOST="`hostname`"
  else
     if uname -n >/dev/null 2>/dev/null; then
        X_HOST="`uname -n`"
     else
        echo "configure: warning: Failed to find out host name - set host in Make.config" >&2
	X_HOST="localhost"
     fi
  fi
fi
fi

test -n "$silent" || echo "checking for whether test support -x"
if test -x ./configure >/dev/null 2>/dev/null ; then
  TEST_X="-x"
else
  TEST_X="-r"
fi
if test -z "$HAVE_RPCINFO"; then
  # Extract the first word of `rpcinfo', so it can be a program name with args.
  set ac_dummy rpcinfo; ac_word=$2
  test -n "$silent" || echo "checking for $ac_word"
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  for ac_dir in $PATH; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      HAVE_RPCINFO="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
fi
test -z "$HAVE_RPCINFO" && HAVE_RPCINFO="no"
test -n "$HAVE_RPCINFO" && test -n "$verbose" && echo "	setting HAVE_RPCINFO to $HAVE_RPCINFO"

test -n "$silent" || echo "checking for a running portmapper"
x_portmap=no
if test "$HAVE_RPCINFO" != no; then
  if rpcinfo -p $X_HOST >/dev/null 2>/dev/null; then
    x_portmap=
  fi
fi
if test -n "$x_portmap"; then
test -n "$silent" || echo "checking for a running portmappar using a test program"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"

#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#ifndef NO_STDLIB_H
#include <stdlib.h>
#endif
#include <stdio.h>
#include <rpc/rpc.h>
#include <rpc/pmap_prot.h>
#ifdef HAVE_RPC_CALL
#define callrpc(a,b,c,d,e,f,g,h) (rpc_call(a,b,c,d,e,f,g,h,("datagram_v")))
#endif
main()
{switch(callrpc("$X_HOST",PMAPPROG,PMAPVERS,PMAPPROC_NULL,
	 	xdr_void, NULL, xdr_void, NULL)) {
        case RPC_VERSMISMATCH:
        case RPC_AUTHERROR:
        case RPC_PROGUNAVAIL:
        case RPC_PROGVERSMISMATCH:
        case RPC_PROCUNAVAIL:
        case RPC_CANTDECODEARGS:
        case RPC_SYSTEMERROR:
        case RPC_PROGNOTREGISTERED:
        case RPC_SUCCESS: exit(0);
        case RPC_PMAPFAILURE:
        case RPC_CANTSEND:
        case RPC_CANTRECV:
        case RPC_TIMEDOUT: exit(1);
	default: exit(0);
}}
EOF
eval $ac_compile
if test -s conftest && (./conftest; exit) 2>/dev/null; then
  x_portmap=

fi
rm -fr conftest*
fi
if test -n "$x_portmap"; then
  echo "configure: warning: Trouble contacting the RPC Portmapper - is it running?" >&2
fi
# check whether --enable-debug was given
enableval="$enable_debug"
if test -n "$enableval"; then
  DEBUGFLAG=""
else
  DEBUGFLAG="-g"
fi

if test -n "$GCC"; then
   DEBUGFLAG="${DEBUGFLAG} -Wall"
   if test -n "$GCC"; then
test -n "$silent" || echo "checking for inline"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"

int main() { return 0; }
int t() { } inline foo() {; return 0; }
EOF
if eval $ac_compile; then
  :
else
  rm -rf conftest*
  
{
test -n "$verbose" && \
echo "	defining" inline to be "__inline"
echo "#define" inline "__inline" >> confdefs.h
DEFS="$DEFS -Dinline=__inline"
}

fi
rm -f conftest*

fi

else
   test -n "$silent" || echo "checking for inline"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"

int main() { return 0; }
int t() { } inline foo() {; return 0; }
EOF
if eval $ac_compile; then
  :
else
  rm -rf conftest*
  test -n "$silent" || echo "checking for __inline"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"

int main() { return 0; }
int t() { } __inline foo() {; return 0; }
EOF
if eval $ac_compile; then
  rm -rf conftest*
  
{
test -n "$verbose" && \
echo "	defining" inline to be "__inline"
echo "#define" inline "__inline" >> confdefs.h
DEFS="$DEFS -Dinline=__inline"
}


else
  rm -rf conftest*
  
{
test -n "$verbose" && \
echo "	defining" inline to be empty
echo "#define" inline "" >> confdefs.h
DEFS="$DEFS -Dinline="
}

fi
rm -f conftest*

fi
rm -f conftest*

fi
if test -z "$prefix"; then
  if test -n "$PWD"; then
     prefix=`echo $PWD|sed 's%/^/^/*$%%'`
  fi
  if test -n "`sh -c pwd`"; then
     prefix=`sh -c pwd|sed 's%/^/^/*$%%'`
  fi
  if test -n "$prefix"; then
     prefix="${prefix}/database"
  fi
fi
# check whether --enable-command-history was given
enableval="$enable_command_history"
if test -n "$enableval"; then
  :
else
  
{
test -n "$verbose" && \
echo "	defining COMHISTOFF"
echo "#define" COMHISTOFF "1" >> confdefs.h
DEFS="$DEFS -DCOMHISTOFF=1"
}

fi

# check whether --enable-debug-printout was given
enableval="$enable_debug_printout"
if test -n "$enableval"; then
  
{
test -n "$verbose" && \
echo "	defining DEBUG"
echo "#define" DEBUG "1" >> confdefs.h
DEFS="$DEFS -DDEBUG=1"
}

fi

# check whether --enable-locks was given
enableval="$enable_locks"
if test -n "$enableval"; then
  
{
test -n "$verbose" && \
echo "	defining NO_LOCKS"
echo "#define" NO_LOCKS "1" >> confdefs.h
DEFS="$DEFS -DNO_LOCKS=1"
}

fi

# check whether --enable-long-labels was given
enableval="$enable_long_labels"
if test -n "$enableval"; then
  
{
test -n "$verbose" && \
echo "	defining LABEL_64_BITS"
echo "#define" LABEL_64_BITS "1" >> confdefs.h
DEFS="$DEFS -DLABEL_64_BITS=1"
}

fi

# check whether --enable-long-seek was given
enableval="$enable_long_seek"
if test -n "$enableval"; then
  
{
test -n "$verbose" && \
echo "	defining SEEK_64_BITS"
echo "#define" SEEK_64_BITS "1" >> confdefs.h
DEFS="$DEFS -DSEEK_64_BITS=1"
}

fi

# check whether --enable-encrypted-passwd was given
enableval="$enable_encrypted_passwd"
if test -n "$enableval"; then
  :
else
  
{
test -n "$verbose" && \
echo "	defining CRYPT_PASSWD"
echo "#define" CRYPT_PASSWD "1" >> confdefs.h
DEFS="$DEFS -DCRYPT_PASSWD=1"
}

fi

case "$srcdir" in
 ~*|/*);;
  *) srcdir=`(cd $srcdir;pwd)|sed 's%/^/^/*$%%'`;;
esac
if test -n "$no_x" || test -n "$missing_x11"; then
  echo ""
  echo Warning - configure script failed to find X11 libraries and thus
  echo this script has not be able to test everything. You:
  if test -n "$LD_LIBRARY_PATH"; then
  echo "    - should unset LD_LIBRARY_PATH and rerun the script"
  fi
  echo "    - can modify the generated Make.config to include X11"
  echo "    - can rerun the script with  'xmkmf' in your path, or "
  echo "    - can rerun the script using the following options"
  echo "      \"-x-libraries=dir\"  and"
  echo "      \"-x-includes=dir\" "
  echo ""
  if test -n "$missing_x11"; then
     echo "Failed to link using : ${missing_x11}"
     echo "Notice that the X11 libraries are $ALL_X11_LIBS"
     echo "which should be specified in Make.config for X11_LIBS."
     echo ""
  fi 
  if test -n "$broken_make"; then
     if test "$MAKE" = make; then
       echo "configure: warning: *** your make cannot handle include - please use another make ***" >&2
     else
       echo "configure: warning: *** your make cannot handle include - please try $MAKE ***" >&2
     fi
  fi
  echo ""
fi
# Set default prefixes.
if test -n "$prefix"; then
  test -z "$exec_prefix" && exec_prefix='${prefix}' # Let make expand it.
  ac_prsub="s%^prefix\\([ 	]*\\)=\\([ 	]*\\).*$%prefix\\1=\\2$prefix%"
fi
if test -n "$exec_prefix"; then
  ac_prsub="$ac_prsub
s%^exec_prefix\\([ 	]*\\)=\\([ 	]*\\).*$%exec_prefix\\1=\\2$exec_prefix%"
fi
# 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

# Quote sed substitution magic chars in DEFS.
cat >conftest.def <<EOF
$DEFS
EOF
ac_escape_ampersand_and_backslash='s%[&\\]%\\&%g'
DEFS=`sed "$ac_escape_ampersand_and_backslash" <conftest.def`
rm -f conftest.def
# Substitute for predefined variables.

trap 'rm -f config.status; exit 1' 1 2 15
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 $configure_args

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 $configure_args --no-create
    exec \${CONFIG_SHELL-/bin/sh} $0 $configure_args --no-create ;;
  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
    echo "config.status generated by autoconf version 1.10"
    exit 0 ;;
  -help | --help | --hel | --he | --h)
    echo "\$ac_cs_usage"; exit 0 ;;
  *) echo "\$ac_cs_usage"; exit 1 ;;
  esac
done

trap 'rm -f Make.config DB/Makefile includes/machine.h; exit 1' 1 2 15
CC='$CC'
CPP='$CPP'
INSTALL='$INSTALL'
INSTALL_PROGRAM='$INSTALL_PROGRAM'
INSTALL_DATA='$INSTALL_DATA'
INSTALL_DATA_FLAG='$INSTALL_DATA_FLAG'
RANLIB='$RANLIB'
AWK='$AWK'
MAKE='$MAKE'
MAKEDEPEND='$MAKEDEPEND'
AR='$AR'
LINT='$LINT'
CHMOD='$CHMOD'
RSH='$RSH'
BINSH='$BINSH'
XSERVER='$XSERVER'
HLL1='$HLL1'
HLL2='$HLL2'
x_includes='$x_includes'
x_libraries='$x_libraries'
X11_LIBS='$X11_LIBS'
MATHLIB='$MATHLIB'
ALLOCA='$ALLOCA'
LONGNAMES='$LONGNAMES'
XDR_FREESRC='$XDR_FREESRC'
XDR_FREEOBJ='$XDR_FREEOBJ'
DB_DIR='$DB_DIR'
OWNER='$OWNER'
TCPIPNO='$TCPIPNO'
MONITORNO='$MONITORNO'
X_HOST='$X_HOST'
TEST_X='$TEST_X'
HAVE_RPCINFO='$HAVE_RPCINFO'
DEBUGFLAG='$DEBUGFLAG'
LIBS='$LIBS'
srcdir='$srcdir'
top_srcdir='$top_srcdir'
prefix='$prefix'
exec_prefix='$exec_prefix'
DEFS='$DEFS'
ac_prsub='$ac_prsub'
ac_vpsub='$ac_vpsub'
extrasub='$extrasub'
EOF
cat >> config.status <<\EOF

ac_given_srcdir=$srcdir

CONFIG_FILES=${CONFIG_FILES-"Make.config DB/Makefile includes/machine.h"}
for ac_file in .. ${CONFIG_FILES}; do if test "x$ac_file" != x..; then
  # 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"; then
    # The file is in a subdirectory.
    test ! -d "$ac_dir" && mkdir "$ac_dir"
    ac_dir_suffix="/$ac_dir"
  else
    ac_dir_suffix=
  fi

  # A "../" for each directory in $ac_dir_suffix.
  ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
  case "$ac_given_srcdir" in
  .)  srcdir=.; top_srcdir="$ac_dots." ;;
  /*) 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"
  comment_str="Generated automatically from `echo $ac_file|sed 's|.*/||'`.in by configure."
  case "$ac_file" in
    *.c | *.h | *.C | *.cc | *.m )  echo "/* $comment_str */" > "$ac_file" ;;
    * )          echo "# $comment_str"     > "$ac_file" ;;
  esac
  sed -e "
$ac_prsub
$ac_vpsub
$extrasub
s%@CC@%$CC%g
s%@CPP@%$CPP%g
s%@INSTALL@%$INSTALL%g
s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
s%@INSTALL_DATA@%$INSTALL_DATA%g
s%@INSTALL_DATA_FLAG@%$INSTALL_DATA_FLAG%g
s%@RANLIB@%$RANLIB%g
s%@AWK@%$AWK%g
s%@MAKE@%$MAKE%g
s%@MAKEDEPEND@%$MAKEDEPEND%g
s%@AR@%$AR%g
s%@LINT@%$LINT%g
s%@CHMOD@%$CHMOD%g
s%@RSH@%$RSH%g
s%@BINSH@%$BINSH%g
s%@XSERVER@%$XSERVER%g
s%@HLL1@%$HLL1%g
s%@HLL2@%$HLL2%g
s%@x_includes@%$x_includes%g
s%@x_libraries@%$x_libraries%g
s%@X11_LIBS@%$X11_LIBS%g
s%@MATHLIB@%$MATHLIB%g
s%@ALLOCA@%$ALLOCA%g
s%@LONGNAMES@%$LONGNAMES%g
s%@XDR_FREESRC@%$XDR_FREESRC%g
s%@XDR_FREEOBJ@%$XDR_FREEOBJ%g
s%@DB_DIR@%$DB_DIR%g
s%@OWNER@%$OWNER%g
s%@TCPIPNO@%$TCPIPNO%g
s%@MONITORNO@%$MONITORNO%g
s%@X_HOST@%$X_HOST%g
s%@TEST_X@%$TEST_X%g
s%@HAVE_RPCINFO@%$HAVE_RPCINFO%g
s%@DEBUGFLAG@%$DEBUGFLAG%g
s%@LIBS@%$LIBS%g
s%@srcdir@%$srcdir%g
s%@top_srcdir@%$top_srcdir%g
s%@prefix@%$prefix%g
s%@exec_prefix@%$exec_prefix%g
s%@DEFS@%$DEFS%
" $ac_given_srcdir/${ac_file}.in >> $ac_file
fi; done


exit 0
EOF
chmod +x config.status
test -n "$no_create" || ${CONFIG_SHELL-/bin/sh} config.status
 
