#! /bin/sh

# From configure.in Revision: 1.427.2.26 














# Define a conditional.




 























































































































































































































































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

# Defaults:
ac_help=
ac_default_prefix=/usr/local
# Any additions from configure.in:
ac_default_prefix=/usr/arla
ac_help="$ac_help
  --with-x                use the X Window System"
ac_help="$ac_help
  --enable-smp            compile for SMP (for Linux and FreeBSD)"
ac_help="$ac_help
  --enable-kld            build kld modules (only FreeBSD 3.0)"
ac_help="$ac_help
  --with-pthreads=dir       compile liblwp as pthreads wrapper using pthreads in dir"
ac_help="$ac_help
  --with-sys=dir          use dir as your kernel source code directory
                          default $default_sys"
ac_help="$ac_help
  --with-arlacachedir=dir use dir as cachedir instead of \$prefix/cache"
ac_help="$ac_help
  --with-arlaconffile=file use file for configuration instead of \$prefix/etc/arla.conf"
ac_help="$ac_help
  --enable-knfs           make afs nfs-mountable"
ac_help="$ac_help
  --with-krb4=dir         use kerberos 4 in dir"
ac_help="$ac_help
  --with-krb4-lib=dir     use kerberos 4 libraries in dir"
ac_help="$ac_help
  --with-krb4-include=dir use kerberos 4 headers in dir"
ac_help="$ac_help
  --with-krb5=dir         use kerberos 5 in dir"
ac_help="$ac_help
  --with-krb5-include=dir use kerberos 5 headers in dir"
ac_help="$ac_help
  --with-krb5-lib=dir     use kerberos 5 libraries in dir"
ac_help="$ac_help
  --with-krbafs=dir       use libkrbafs (from cmu, extracted from kth-krb) in dir"
ac_help="$ac_help
  --with-readline=dir                use readline in dir"
ac_help="$ac_help
  --with-readline-lib=dir            use readline libraries in dir"
ac_help="$ac_help
  --with-readline-include=dir        use readline headers in dir"
ac_help="$ac_help
  --disable-mmap          don't use mmap"
ac_help="$ac_help
  --enable-mmaptime       use mmaptime time, read the README before use (disable by default)"
ac_help="$ac_help
  --disable-dynamic-afs   don't use loaded AFS library with AIX"
ac_help="$ac_help
  --enable-bigendian	the target is big endian"
ac_help="$ac_help
  --enable-littleendian	the target is little endian"

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

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

ac_prev=
for ac_option
do

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

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

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

  case "$ac_option" in

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  esac
done

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

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

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

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

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

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

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

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

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

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

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

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

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





PACKAGE=arla
VERSION=0.34.5
cat >> confdefs.h <<EOF
#define PACKAGE "$PACKAGE"
EOF
cat >> confdefs.h <<EOF
#define VERSION "$VERSION"
EOF

# This may be overridden using --prefix=/usr to configure


CFLAGS="-g ${CFLAGS}"

if test "$AS" = ""; then
  AS=as
fi

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

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

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

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

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

cat > conftest.$ac_ext << EOF

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

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

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

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

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

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

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

fi

echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
if test "$ac_test_CFLAGS" = set; then
  CFLAGS="$ac_save_CFLAGS"
elif test $ac_cv_prog_cc_g = yes; then
  if test "$GCC" = yes; then
    CFLAGS="-g -O2"
  else
    CFLAGS="-g"
  fi
else
  if test "$GCC" = yes; then
    CFLAGS="-O2"
  else
    CFLAGS=
  fi
fi


echo $ac_n "checking for $CC warning options""... $ac_c" 1>&6
echo "configure:1086: checking for $CC warning options" >&5
if test "$GCC" = "yes"; then
  extra_flags="-Wall -Wmissing-prototypes -Wpointer-arith -Wbad-function-cast -Wmissing-declarations -Wnested-externs"
  CFLAGS="$CFLAGS $extra_flags"
  echo "$ac_t""$extra_flags" 1>&6
else
  echo "$ac_t""none" 1>&6
fi

echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
echo "configure:1096: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
  CPP=
fi
if test -z "$CPP"; then
if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
    # This must be in double quotes, not single quotes, because CPP may get
  # substituted into the Makefile and "${CC-cc}" will confuse make.
  CPP="${CC-cc} -E"
  # On the NeXT, cc -E runs the code through the compiler's parser,
  # not just through cpp.
  cat > conftest.$ac_ext <<EOF
#line 1111 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1117: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  :
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  CPP="${CC-cc} -E -traditional-cpp"
  cat > conftest.$ac_ext <<EOF
#line 1128 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1134: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  :
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  CPP="${CC-cc} -nologo -E"
  cat > conftest.$ac_ext <<EOF
#line 1145 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1151: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  :
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  CPP=/lib/cpp
fi
rm -f conftest*
fi
rm -f conftest*
fi
rm -f conftest*
  ac_cv_prog_CPP="$CPP"
fi
  CPP="$ac_cv_prog_CPP"
else
  ac_cv_prog_CPP="$CPP"
fi
echo "$ac_t""$CPP" 1>&6

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

ac_aux_dir=
for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
  if test -f $ac_dir/install-sh; then
    ac_aux_dir=$ac_dir
    ac_install_sh="$ac_aux_dir/install-sh -c"
    break
  elif test -f $ac_dir/install.sh; then
    ac_aux_dir=$ac_dir
    ac_install_sh="$ac_aux_dir/install.sh -c"
    break
  fi
done
if test -z "$ac_aux_dir"; then
  { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
fi
ac_config_guess=$ac_aux_dir/config.guess
ac_config_sub=$ac_aux_dir/config.sub
ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.

# Find a good install program.  We prefer a C program (faster),
# so one script is as good as another.  But avoid the broken or
# incompatible versions:
# SysV /etc/install, /usr/sbin/install
# SunOS /usr/etc/install
# IRIX /sbin/install
# AIX /bin/install
# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
# AFS /usr/afsws/bin/install, which mishandles nonexistent args
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
echo "configure:1233: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
    IFS="${IFS= 	}"; ac_save_IFS="$IFS"; IFS=":"
  for ac_dir in $PATH; do
    # Account for people who put trailing slashes in PATH elements.
    case "$ac_dir/" in
    /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
    *)
      # OSF1 and SCO ODT 3.0 have their own names for install.
      # Don't use installbsd from OSF since it installs stuff as root
      # by default.
      for ac_prog in ginstall scoinst install; do
        if 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.
	    :
	  else
	    ac_cv_path_install="$ac_dir/$ac_prog -c"
	    break 2
	  fi
	fi
      done
      ;;
    esac
  done
  IFS="$ac_save_IFS"

fi
  if test "${ac_cv_path_install+set}" = set; then
    INSTALL="$ac_cv_path_install"
  else
    # As a last resort, use the slow shell script.  We don't cache a
    # path for INSTALL within a source directory, because that will
    # break other packages using the cache if that directory is
    # removed, or if the path is relative.
    INSTALL="$ac_install_sh"
  fi
fi
echo "$ac_t""$INSTALL" 1>&6

# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
# It thinks the first close brace ends the variable substitution.
test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'

test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'

test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'

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

echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
echo "configure:1316: checking whether ln -s works" >&5
if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  rm -f conftestdata
if ln -s X conftestdata 2>/dev/null
then
  rm -f conftestdata
  ac_cv_prog_LN_S="ln -s"
else
  ac_cv_prog_LN_S=ln
fi
fi
LN_S="$ac_cv_prog_LN_S"
if test "$ac_cv_prog_LN_S" = "ln -s"; then
  echo "$ac_t""yes" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

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

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

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

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

fi

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

test -n "$YACC" && break
done
test -n "$YACC" || YACC="yacc"


# Make sure we can run config.sub.
if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
fi

echo $ac_n "checking host system type""... $ac_c" 1>&6
echo "configure:1456: checking host system type" >&5

host_alias=$host
case "$host_alias" in
NONE)
  case $nonopt in
  NONE)
    if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
    else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
    fi ;;
  *) host_alias=$nonopt ;;
  esac ;;
esac

host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$host" 1>&6

CANONICAL_HOST=$host

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

test -n "$GUILE_GTK" && break
done
test -n "$GUILE_GTK" || GUILE_GTK="/bin/false"


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

# Check whether --with-x or --without-x was given.
if test "${with_x+set}" = set; then
  withval="$with_x"
  :
fi

# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
if test "x$with_x" = xno; then
  # The user explicitly disabled X.
  have_x=disabled
else
  if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
    # Both variables are already set.
    have_x=yes
  else
if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  # One or both of the vars are not set, and there is no cached value.
ac_x_includes=NO ac_x_libraries=NO
rm -fr conftestdir
if mkdir conftestdir; then
  cd conftestdir
  # Make sure to not put "make" in the Imakefile rules, since we grep it out.
  cat > Imakefile <<'EOF'
acfindx:
	@echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
EOF
  if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
    # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
    eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
    for ac_extension in a so sl; do
      if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
        test -f $ac_im_libdir/libX11.$ac_extension; then
        ac_im_usrlibdir=$ac_im_libdir; break
      fi
    done
    # Screen out bogus values from the imake configuration.  They are
    # bogus both because they are the default anyway, and because
    # using them would break gcc on systems where it needs fixed includes.
    case "$ac_im_incroot" in
	/usr/include) ;;
	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
    esac
    case "$ac_im_usrlibdir" in
	/usr/lib | /lib) ;;
	*) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
    esac
  fi
  cd ..
  rm -fr conftestdir
fi

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

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

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

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

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

int main() {
${x_direct_test_function}()
; return 0; }
EOF
if { (eval echo configure:1948: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  LIBS="$ac_save_LIBS"
# We can link X programs with no special library path.
ac_x_libraries=
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  LIBS="$ac_save_LIBS"
# First see if replacing the include by lib works.
# Check X11 before X11Rn because it is often a symlink to the current release.
for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
    /usr/X11/lib          \
    /usr/X11R6/lib        \
    /usr/X11R5/lib        \
    /usr/X11R4/lib        \
                          \
    /usr/lib/X11          \
    /usr/lib/X11R6        \
    /usr/lib/X11R5        \
    /usr/lib/X11R4        \
                          \
    /usr/local/X11/lib    \
    /usr/local/X11R6/lib  \
    /usr/local/X11R5/lib  \
    /usr/local/X11R4/lib  \
                          \
    /usr/local/lib/X11    \
    /usr/local/lib/X11R6  \
    /usr/local/lib/X11R5  \
    /usr/local/lib/X11R4  \
                          \
    /usr/X386/lib         \
    /usr/x386/lib         \
    /usr/XFree86/lib/X11  \
                          \
    /usr/lib              \
    /usr/local/lib        \
    /usr/unsupported/lib  \
    /usr/athena/lib       \
    /usr/local/x11r5/lib  \
    /usr/lpp/Xamples/lib  \
    /lib/usr/lib/X11	  \
                          \
    /usr/openwin/lib      \
    /usr/openwin/share/lib \
    ; \
do
  for ac_extension in a so sl; do
    if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
      ac_x_libraries=$ac_dir
      break 2
    fi
  done
done
fi
rm -f conftest*
fi # $ac_x_libraries = NO

if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
  # Didn't find X anywhere.  Cache the known absence of X.
  ac_cv_have_x="have_x=no"
else
  # Record where we found X for the cache.
  ac_cv_have_x="have_x=yes \
	        ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
fi
fi
  fi
  eval "$ac_cv_have_x"
fi # $with_x != no

if test "$have_x" != yes; then
  echo "$ac_t""$have_x" 1>&6
  no_x=yes
else
  # If each of the values was on the command line, it overrides each guess.
  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
  # Update the cache value to reflect the command line values.
  ac_cv_have_x="have_x=yes \
		ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
  echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
fi


if test "$no_x" = yes; then
  # Not all programs may use this symbol, but it does not hurt to define it.
  cat >> confdefs.h <<\EOF
#define X_DISPLAY_MISSING 1
EOF

  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
else
  if test -n "$x_includes"; then
    X_CFLAGS="$X_CFLAGS -I$x_includes"
  fi

  # It would also be nice to do this for all -L options, not just this one.
  if test -n "$x_libraries"; then
    X_LIBS="$X_LIBS -L$x_libraries"
    # For Solaris; some versions of Sun CC require a space after -R and
    # others require no space.  Words are not sufficient . . . .
    case "`(uname -sr) 2>/dev/null`" in
    "SunOS 5"*)
      echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
echo "configure:2055: checking whether -R must be followed by a space" >&5
      ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
      cat > conftest.$ac_ext <<EOF
#line 2058 "configure"
#include "confdefs.h"

int main() {

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

int main() {

; return 0; }
EOF
if { (eval echo configure:2088: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  ac_R_space=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_R_space=no
fi
rm -f conftest*
	if test $ac_R_space = yes; then
	  echo "$ac_t""yes" 1>&6
	  X_LIBS="$X_LIBS -R $x_libraries"
	else
	  echo "$ac_t""neither works" 1>&6
	fi
      fi
      LIBS="$ac_xsave_LIBS"
    esac
  fi

  # Check for system-dependent libraries X programs must link with.
  # Do this before checking for the system-independent R6 libraries
  # (-lICE), since we may need -lsocket or whatever for X linking.

  if test "$ISC" = yes; then
    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
  else
    # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
    # libraries were built with DECnet support.  And karl@cs.umb.edu says
    # the Alpha needs dnet_stub (dnet does not exist).
    echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
echo "configure:2120: checking for dnet_ntoa in -ldnet" >&5
ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-ldnet  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 2128 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char dnet_ntoa();

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

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

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

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

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

    fi

    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
    # to get the SysV transport functions.
    # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
    # needs -lnsl.
    # The nsl library prevents programs from opening the X display
    # on Irix 5.2, according to dickey@clark.net.
    echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
echo "configure:2209: checking for gethostbyname" >&5
if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 2214 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char gethostbyname(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char gethostbyname();

int main() {

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

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

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

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

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

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

    fi

    # lieder@skyler.mavd.honeywell.com says without -lsocket,
    # socket/setsockopt and other routines are undefined under SCO ODT
    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
    # on later versions), says simon@lia.di.epfl.ch: it contains
    # gethostby* variants that don't use the nameserver (or something).
    # -lsocket must be given before -lnsl if both are needed.
    # We assume that if connect needs -lnsl, so does gethostbyname.
    echo $ac_n "checking for connect""... $ac_c" 1>&6
echo "configure:2307: checking for connect" >&5
if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 2312 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char connect(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char connect();

int main() {

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

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

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

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

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

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

    fi

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

int main() {

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

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

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

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

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

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

    fi

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

int main() {

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

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

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

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

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

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

    fi
  fi

  # Check for libraries that X11R6 Xt/Xaw programs need.
  ac_save_LDFLAGS="$LDFLAGS"
  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
  # check for ICE first), but we must link in the order -lSM -lICE or
  # we get undefined symbols.  So assume we have SM if we have ICE.
  # These have to be linked with before -lX11, unlike the other
  # libraries we check for below, so use a different variable.
  #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
  echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
echo "configure:2592: checking for IceConnectionNumber in -lICE" >&5
ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lICE $X_EXTRA_LIBS $LIBS"
cat > conftest.$ac_ext <<EOF
#line 2600 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char IceConnectionNumber();

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

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

  LDFLAGS="$ac_save_LDFLAGS"

fi


# try to figure out if we need any additional ld flags, like -R
# and yes, the autoconf X test is utterly broken
if test "$no_x" != yes; then
	echo $ac_n "checking for special X linker flags""... $ac_c" 1>&6
echo "configure:2640: checking for special X linker flags" >&5
if eval "test \"`echo '$''{'krb_cv_sys_x_libs_rpath'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
	ac_save_libs="$LIBS"
	ac_save_cflags="$CFLAGS"
	CFLAGS="$CFLAGS $X_CFLAGS"
	krb_cv_sys_x_libs_rpath=""
	krb_cv_sys_x_libs=""
	for rflag in "" "-R" "-R " "-rpath "; do
		if test "$rflag" = ""; then
			foo="$X_LIBS"
		else
			foo=""
			for flag in $X_LIBS; do
			case $flag in
			-L*)
				foo="$foo $flag `echo $flag | sed \"s/-L/$rflag/\"`"
				;;
			*)
				foo="$foo $flag"
				;;
			esac
			done
		fi
		LIBS="$ac_save_libs $foo -lX11"
		if test "$cross_compiling" = yes; then
    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
else
  cat > conftest.$ac_ext <<EOF
#line 2671 "configure"
#include "confdefs.h"

		#include <X11/Xlib.h>
		foo()
		{
		XOpenDisplay(NULL);
		}
		main()
		{
		return 0;
		}
		
EOF
if { (eval echo configure:2685: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  krb_cv_sys_x_libs_rpath="$rflag"; krb_cv_sys_x_libs="$foo"; break
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  :
fi
rm -fr conftest*
fi

	done
	LIBS="$ac_save_libs"
	CFLAGS="$ac_save_cflags"
	
fi

echo "$ac_t""$krb_cv_sys_x_libs_rpath" 1>&6
	X_LIBS="$krb_cv_sys_x_libs"
fi

if test "$no_x" = "yes" ; then
	MAKE_X_PROGS_BIN=""
else
	MAKE_X_PROGS_BIN='$(X_PROGS_BIN)'
fi


echo $ac_n "checking target system type""... $ac_c" 1>&6
echo "configure:2715: checking target system type" >&5

target_alias=$target
case "$target_alias" in
NONE)
  case $nonopt in
  NONE) target_alias=$host_alias ;;
  *) target_alias=$nonopt ;;
  esac ;;
esac

target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$target" 1>&6



echo $ac_n "checking for efficient ntohl""... $ac_c" 1>&6
echo "configure:2735: checking for efficient ntohl" >&5
if eval "test \"`echo '$''{'ac_cv_func_ntohl'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
case "$target_cpu" in
i[3-9]86) if test "$cross_compiling" = yes; then
  ac_cv_func_ntohl="ntohl"
else
  cat > conftest.$ac_ext <<EOF
#line 2745 "configure"
#include "confdefs.h"

#if defined(__GNUC__) && defined(i386)
unsigned long foo(unsigned long x)
{
  asm("bswap %0" : "=r" (x) : "0" (x));
  return x;
}
#endif

int main(void)
{
  return foo(0x12345678) != 0x78563412;
}

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

fi

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



# Check whether --enable-smp or --disable-smp was given.
if test "${enable_smp+set}" = set; then
  enableval="$enable_smp"
  if test "$enableval" = "yes"; then
  smp="-DSMP -D__SMP__"
else
  smp="no"
fi

fi


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

fi


# what kind of lwp

LWP_PROCESS="process.o"
LWP_C="lwp_asm.c"
LWP_O="lwp_asm.o"
LWP_H="lwp_asm.h"
PLWP_LIB_FLAGS=""
PLWP_INC_FLAGS=""

# Check whether --with-pthreads or --without-pthreads was given.
if test "${with_pthreads+set}" = set; then
  withval="$with_pthreads"
  if test "$with_pthreads" = "windows"; then
  with_pthreads=win
elif test "$with_pthreads" != "no"; then
  LWP_PROCESS=""
  LWP_C="plwp.c"
  LWP_O="plwp.o"
  LWP_H="plwp.h"
  PLWP_INC_FLAGS="-DPTHREADS_LWP"
  if test "$with_pthreads" != "yes"; then
    PLWP_LIB_FLAGS="-L${with_pthreads}/lib -lpthread"
    PLWP_INC_FLAGS="-I${with_pthreads}/include -DPTHREADS_LWP"
  else
    PLWP_LIB_FLAGS="-lpthread"
    PLWP_INC_FLAGS="-DPTHREADS_LWP"
  fi
fi
else
  with_pthreads=no
fi


# where the source tree is located

case "$target_os" in
    linux*)
    default_sys=/usr/src/linux
    ;;
    *)
    default_sys=/sys
    ;;
esac
# Check whether --with-sys or --without-sys was given.
if test "${with_sys+set}" = set; then
  withval="$with_sys"
  SYS=$withval
else
  SYS="$default_sys"
fi



echo $ac_n "checking for kernel stuff""... $ac_c" 1>&6
echo "configure:2865: checking for kernel stuff" >&5
case "$target_os" in
sunos4.1*) 
  KERNEL_INCLUDE=-I`(cd $srcdir; pwd)`/xfs/sunos
  KERNEL_SRCS='sunos-subr.c'
  KERNEL_HDRS=''
  XFS_SUBDIR=sunos
  KERNEL=/vmunix
  echo "$ac_t""SunOS 4.1.x" 1>&6
  ;;
solaris*)
  KERNEL_INCLUDE=-I`(cd $srcdir; pwd)`/xfs/solaris
  KERNEL_SRCS='solaris-subr.c'
  KERNEL_HDRS=''
  XFS_SUBDIR=solaris
  KERNEL=/dev/ksyms
  KERNEL_CPPFLAGS="${KERNEL_CPPFLAGS} -D_KERNEL"
  echo "$ac_t""Solaris" 1>&6
  case "$target_cpu" in
  sparc64) cat >> confdefs.h <<\EOF
#define NEED_VICEIOCTL32 1
EOF

	   KERNEL_CPPFLAGS="${KERNEL_CPPFLAGS} -D_SYSCALL32 -D_SYSCALL32_IMPL"
           ;;
  esac
  ;;
irix*)
  KERNEL_INCLUDE=-I`(cd $srcdir; pwd)`/xfs/irix
  KERNEL_SRCS='irix-subr.c'
  KERNEL_HDRS=''
  ip=`hinv -c processor | awk '$4 ~ /IP/ { print $4}'`
  cpu=`hinv -t cpu | awk '{print $3}'`
  KERNEL_CPPFLAGS="${KERNEL_CPPFLAGS} -D$ip -D$cpu -DR4000"
  XFS_SUBDIR=irix
  KERNEL=/unix
  case "$target_os" in
  irix6.[4-9])
    cat >> confdefs.h <<\EOF
#define IRIX_64 1
EOF
 ;;
  esac
  echo "$ac_t""Irix" 1>&6
  ;;
hpux*)
  KERNEL_SRCS='hpux-subr.c'
  echo "$ac_t""hp-ux" 1>&6
  KERNEL=/hp-ux
  KERNEL_INCLUDE=-I`(cd $srcdir; pwd)`/xfs/unknown
  echo "configure: warning: No kernel support for $target_os" 1>&2
  ;;
aix*)
  KERNEL_INCLUDE=-I`(cd $srcdir; pwd)`/xfs/aix
  KERNEL_SRCS='aix-subr.c'
  KERNEL_HDRS=''
  XFS_SUBDIR=aix
  echo "$ac_t""AIX" 1>&6
  ;;  
openbsd*)
  KERNEL_INCLUDE=-I`(cd $srcdir; pwd)`/xfs/bsd
  KERNEL_SRCS='bsd-subr.c'
  KERNEL_HDRS=''
  MODULE=xfs_mod.o
  cat > conftest.mk << END
.include <bsd.lkm.mk>
.if defined(UVM) && (\${UVM} != "no")
CFLAGS+=-DUVM
.endif
.if PMAP_NEW
CFLAGS+=-DPMAP_NEW
.endif
echo:
	@echo \$(CFLAGS)
END
  ac_out=`/usr/bin/make S=$SYS -f conftest.mk echo 2> /dev/null`
  incl= defs= flags=
  for i in $ac_out; do
	case "$i" in
		-I*)	if test "$i" != -I. -a "$i" != "-I`pwd`"; then
				incl="$incl${incl:+ }$i"
			fi
			;;
		-D*)	defs="$defs${defs:+ }$i" ;;
		-m*)	flags="$flags${flags:+ }$i" ;;
		*) 	;;
	esac
  done
## -DKERNEL -DLKM -DACTUALLY_LKM_NOT_KERNEL ??
  # make sure we compile with -mno-fp-regs on alpha
  if test `uname -m` = alpha -a `expr "$flags" : ".*-mno-fp-regs"` -eq 0
  then
	flags="$flags${flags:+ }-mno-fp-regs"
  fi
  KERNEL_CPPFLAGS="${KERNEL_CPPFLAGS} -D_LKM"
  KERNEL_CPPFLAGS="${KERNEL_CPPFLAGS} $defs${defs:+ }$flags${flags:+ }$incl"
  test_KERNEL_CFLAGS="${KERNEL_CFLAGS}"
  KERNEL_LD='ld'
  XFS_SRCS='xfs_wrap-bsd.c xfs_common-bsd.c xfs_dev-common.c xfs_dev-bsd.c xfs_syscalls-common.c xfs_syscalls-wrap-bsd.c xfs_node-bsd.c xfs_vfsops-common.c xfs_vfsops-bsd.c xfs_vfsops-openbsd.c xfs_vnodeops-common.c xfs_vnodeops-bsd.c'
  XFS_SUBDIR=bsd
  KERNEL=/bsd
  MODLOAD=modload
  MODUNLOAD=modunload
  echo "$ac_t""OpenBSD" 1>&6
  ;;
netbsd* | netbsdelf*)
      case "$target_os" in
  netbsd1.4.2)
    if test X"$GCC" = Xyes ; then
      CC="$CC -static"
    else
      echo "configure: warning: There is a problem with netbsd 1.4.2, you should build it static" 1>&2
    fi
    ;;
  esac
  KERNEL_INCLUDE=-I`(cd $srcdir; pwd)`/xfs/bsd
  KERNEL_SRCS='bsd-subr.c'
  KERNEL_HDRS=''
  MODULE=xfs_mod.o
  cat > conftest.mk << END
.include <bsd.kmod.mk>
.if UVM
CFLAGS+=-DUVM
.endif
.if PMAP_NEW
CFLAGS+=-DPMAP_NEW
.endif
echo:
	@echo \$(CFLAGS)
END
  ac_out=`/usr/bin/make S=$SYS -f conftest.mk echo 2> /dev/null`
  incl= defs= flags=
  for i in $ac_out; do
	case "$i" in
		-I*)	if test "$i" != -I. -a "$i" != "-I`pwd`"; then
				incl="$incl${incl:+ }$i"
			fi
			;;
		-D*)	defs="$defs${defs:+ }$i" ;;
		-m*)	flags="$flags${flags:+ }$i" ;;
		*) 	;;
	esac
  done
## -DKERNEL -DLKM -DACTUALLY_LKM_NOT_KERNEL ??
  # make sure we compile with -mno-fp-regs on alpha
  if test `uname -m` = alpha -a `expr "$flags" : ".*-mno-fp-regs"` -eq 0
  then
	flags="$flags${flags:+ }-mno-fp-regs"
  fi
  KERNEL_CPPFLAGS="${KERNEL_CPPFLAGS} $defs${defs:+ }$flags${flags:+ }$incl"
  test_KERNEL_CFLAGS="${KERNEL_CFLAGS}"
  KERNEL_LD='ld'
  XFS_SRCS='xfs_wrap-bsd.c xfs_common-bsd.c xfs_dev-common.c xfs_dev-bsd.c xfs_syscalls-common.c xfs_syscalls-wrap-bsd.c xfs_node-bsd.c xfs_vfsops-common.c xfs_vfsops-bsd.c xfs_vfsops-netbsd.c xfs_vnodeops-common.c xfs_vnodeops-bsd.c'
  XFS_SUBDIR=bsd
  KERNEL=/netbsd
  MODLOAD=modload
  MODUNLOAD=modunload
  echo "$ac_t""NetBSD" 1>&6
  ;;
freebsd[345]* | freebsdelf[345]*)
  echo "$ac_t""FreeBSD [345].x" 1>&6
  KERNEL_INCLUDE=-I`(cd $srcdir; pwd)`/xfs/bsd
  KERNEL_SRCS='bsd-subr.c'
  KERNEL_HDRS=''
  KERNEL=`sysctl -n kern.bootfile`
  echo $ac_n "checking for kernel object format""... $ac_c" 1>&6
echo "configure:3031: checking for kernel object format" >&5
  kernobjformat=aout
  case `file $KERNEL 2>/dev/null` in
  *ELF*)  kernobjformat=elf ;;
  esac
  echo "$ac_t""$kernobjformat" 1>&6

  echo $ac_n "checking for kld""... $ac_c" 1>&6
echo "configure:3039: checking for kld" >&5
    case "$target_os" in
  	freebsd[45]*)
	if test "X$kld" = "X"; then
		kld="yes";
	fi
	;;
  esac
    case "$kernobjformat" in
	elf*)
	if test "X$kld" = "X"; then
		kld=yes;
	fi
	;;
  esac
  KERNEL_CFLAGS="${KERNEL_CFLAGS}${KERNEL_CFLAGS:+ }-O"
  if test `uname -m` = alpha -a `expr "$KERNEL_CFLAGS" : ".*-mno-fp-regs"` -eq 0
  then
	KERNEL_CFLAGS="${KERNEL_CFLAGS}${KERNEL_CFLAGS:+ }-mno-fp-regs"
  fi
  if test "$kld" = "yes"; then
    KERNEL_CPPFLAGS="${KERNEL_CPPFLAGS} $smp -DKERNEL -D_KERNEL -DVFS_KLD -DKLD_MODULE -I$SYS/arch -I$SYS -I."
    test_KERNEL_CFLAGS="-$kernobjformat ${KERNEL_CFLAGS}"
    KERNEL_LD='ld'
    case "$kernobjformat" in
    aout) extra_LDFLAGS="-A" ;;
    elf)  extra_LDFLAGS="-R" ;;
    *) { echo "configure: error: Unknown object format $kernobjformat" 1>&2; exit 1; }
    esac
    ac_kernel_ld='${LD-ld} -$kernobjformat -o conftest $LDFLAGS $extra_LDFLAGS $KERNEL conftest.o -e _foo 1>&5'
    MODULE=xfs.ko
    echo "$ac_t""yes" 1>&6
  else
    if test "$kernobjformat" != "aout"; then
      echo "configure: warning: You cannot build LKMs against $kernobjformat kernels" 1>&2
    fi
    KERNEL_CPPFLAGS="${KERNEL_CPPFLAGS} $smp -DKERNEL -D_KERNEL -DLKM -D_LKM -DVFS_LKM -DACTUALLY_LKM_NOT_KERNEL -I$SYS/arch -I$SYS -I."
    test_KERNEL_CFLAGS="-aout ${KERNEL_CFLAGS}"
    KERNEL_LD='ld -aout'
    ac_kernel_ld='${LD-ld} -aout -o conftest $LDFLAGS -A $KERNEL conftest.o -e _foo 1>&5'
    MODULE=xfs_mod.o
    echo "$ac_t""no" 1>&6
  fi

  XFS_SUBDIR=bsd
  XFS_SRCS='xfs_wrap-bsd.c xfs_common-bsd.c xfs_dev-common.c xfs_dev-bsd.c xfs_syscalls-common.c xfs_syscalls-wrap-freebsd.c xfs_node-bsd.c xfs_vfsops-common.c xfs_vfsops-bsd.c xfs_vfsops-freebsd.c xfs_vnodeops-common.c xfs_vnodeops-bsd.c'
  MODLOAD=modload
  MODUNLOAD=modunload

  ;;
macos*|darwin*)
  echo "$ac_t""MacOS" 1>&6
  KERNEL_INCLUDE=-I`(cd $srcdir; pwd)`/xfs/bsd
  KERNEL_SRCS='bsd-subr.c'
  KERNEL_HDRS=''
  KERNEL=/mach

  KERNEL_CPPFLAGS="${KERNEL_CPPFLAGS} -DKERNEL -D_KERNEL -I/System/Library/Frameworks/Kernel.framework/Headers -static -DKERNEL_PRIVATE -DDIAGNOSTIC -DUSE_SELECT -DMACH_USER_API"
  KERNEL_CFLAGS="${KERNEL_CFLAGS} -fno-common -Wno-format -pipe -finline -fno-keep-inline-functions -force_cpusubtype_ALL -msoft-float -mlong-branch"
  test_KERNEL_CFLAGS="${KERNEL_CFLAGS}"
  KERNEL_LD='ld'
  MODULE=xfs_mod.o

  MODLOAD=kmodload
  MODUNLOAD=kmodunload

  XFS_SUBDIR=bsd
  XFS_SRCS='xfs_wrap-bsd.c xfs_common-bsd.c xfs_dev-common.c xfs_dev-bsd.c xfs_syscalls-common.c xfs_syscalls-wrap-bsd.c xfs_node-bsd.c xfs_vfsops-common.c xfs_vfsops-bsd.c xfs_vfsops-macos.c xfs_vnodeops-common.c xfs_vnodeops-bsd.c xfs_info.c'

  ;;
linux*)
  echo "$ac_t""Linux" 1>&6
  KERNEL_INCLUDE=-I`(cd $srcdir; pwd)`/xfs/linux
  KERNEL_SRCS='bsd-subr.c'
  KERNEL_HDRS=''
  echo $ac_n "checking for smp""... $ac_c" 1>&6
echo "configure:3115: checking for smp" >&5
if test "X$smp" = "Xno"; then
  smp=
elif test "X$smp" = "X"; then
  cat > conftest.$ac_ext <<EOF
#line 3120 "configure"
#include "confdefs.h"
#include <linux/config.h>
#ifdef CONFIG_MODVERSIONS
#define MODVERSIONS
#include <linux/modversions.h>
#endif
__ver_get_module_symbol
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "smp_[0-9a-z_]*" >/dev/null 2>&1; then
  rm -rf conftest*
  smp='-D__SMP__'
else
  rm -rf conftest*
  
if grep 'smp_[0-9a-zA-Z_]*\>' /proc/ksyms >/dev/null || test `grep -c '^processor' /proc/cpuinfo` -gt 1; then
  smp='-D__SMP__'
fi
fi

fi
rm -f conftest*

  if test "X$smp" = "X"; then
     echo "$ac_t""no" 1>&6
  else
     echo "$ac_t""yes" 1>&6
  fi
  KERNEL_CPPFLAGS="-I$SYS/include -DMODULE -D__KERNEL__ $smp ${KERNEL_CPPFLAGS} "
  case "$target_cpu" in
  alpha*)
    KERNEL_CC=${KERNEL_CC:-$CC}
    KERNEL_CFLAGS="${KERNEL_CFLAGS} -mno-fp-regs -ffixed-8" ;;
  sparc64*)
    KERNEL_CFLAGS="${KERNEL_CFLAGS} -mno-fpu -ffixed-g4 -fcall-used-g5 -fcall-used-g7"
    KERNEL_LDFLAGS="-m elf64_sparc"
    KERNEL_CC=${KERNEL_CC:-sparc64-linux-gcc}
    cat >> confdefs.h <<\EOF
#define NEED_VICEIOCTL32 1
EOF
 ;;
   *)
    KERNEL_CC=${KERNEL_CC:-$CC} ;;
  esac
  test_KERNEL_CFLAGS="${KERNEL_CFLAGS}"
  XFS_SUBDIR=linux
  KERNEL=/dev/null
  ;;
osf*)
  KERNEL_INCLUDE=-I`(cd $srcdir; pwd)`/xfs/bsd
  KERNEL_SRCS=bsd-subr.c
  KERNEL_HDRS=
  KERNEL_CPPFLAGS="${KERNEL_CPPFLAGS} -DKERNEL -D_KERNEL -DMACH"
  XFS_SRCS='xfs_wrap-osf.c xfs_common-osf.c xfs_dev-common.c xfs_dev-osf.c xfs_syscalls-common.c xfs_syscalls-wrap-osf.c xfs_node-osf.c xfs_vfsops-common.c xfs_vfsops-osf.c xfs_vnodeops-common.c xfs_vnodeops-osf.c'
  # XXX find kernel include dir
  nodename=`hostname | sed 's/\..*//' | tr 'a-z' 'A-Z'`
  foo=`ls $SYS/inet.h $SYS/GENERIC/inet.h $SYS/$nodename/inet.h $SYS/*/inet.h 2> /dev/null | head -1 | sed -e 's,/inet.h,,'`
  KERNEL_CPPFLAGS="${KERNEL_CPPFLAGS} -I/usr/sys/include -I$foo"
  test_KERNEL_CFLAGS="${KERNEL_CFLAGS}"
  KERNEL_LD='ld'
  XFS_SUBDIR=bsd
  echo "$ac_t""osf/1" 1>&6
  KERNEL=/vmunix
  case "$CC" in
  cc)
	CC="$CC -std1"
	;;
  esac
  MODLOAD=modload
  MODUNLOAD=modunload
  ;;
cygwin*)
  echo "$ac_t""cygwin/VC" 1>&6
  echo "configure: warning: Only kernel support for NT" 1>&2
  if test "$with_pthreads" = "windows"; then
    echo "configure: warning: Using LWP on windows native threads" 1>&2
    LWP_PROCESS=""
    LWP_C="plwp.c"
    LWP_O="plwp.o"
    LWP_H="plwp.h"
    PLWP_INC_FLAGS="-DWINDOWS_THREADS_LWP"
  else
    echo "configure: warning: Using LWP on asm threads or pthreads" 1>&2
  fi
  KERNEL_INCLUDE=-I`(cd $srcdir; pwd)`/xfs/unknown
  KERNEL_SRCS=unknown-subr.c
  KERNEL_HDRS=
  KERNEL=/dev/null
  XFS_SUBDIR=
  ;;
*)
  echo "$ac_t""none" 1>&6
  echo "configure: warning: No kernel support for $target_os, compiling only user-level stuff" 1>&2
  KERNEL_INCLUDE=-I`(cd $srcdir; pwd)`/xfs/unknown
  KERNEL_SRCS=unknown-subr.c
  KERNEL_HDRS=
  KERNEL=/dev/null
  XFS_SUBDIR=
  ;;
esac
if test "$XFS_SUBDIR" != ""; then
  XFS_SUBDIR_Makefile=xfs/$XFS_SUBDIR/Makefile
  XFS_SUBDIR_BIN_Makefile=xfs/$XFS_SUBDIR/bin/Makefile
fi



if test "`uname`" = OSF1; then
  OSF1_TRUE=
  OSF1_FALSE='#'
else
  OSF1_TRUE='#'
  OSF1_FALSE=
fi
# Check where to put the cache

# Check whether --with-arlacachedir or --without-arlacachedir was given.
if test "${with_arlacachedir+set}" = set; then
  withval="$with_arlacachedir"
  ARLACACHEDIR=$withval
else
  ARLACACHEDIR='${prefix}/cache'
fi


# Check where to find the configuration

# Check whether --with-arlaconffile or --without-arlaconffile was given.
if test "${with_arlaconffile+set}" = set; then
  withval="$with_arlaconffile"
  ARLACONFFILE=$withval
else
  ARLACONFFILE='${sysconfdir}/arla.conf'
fi


# Do we want knfs ?

ARLA_KNFS=""
# Check whether --enable-knfs or --disable-knfs was given.
if test "${enable_knfs+set}" = set; then
  enableval="$enable_knfs"
  ARLA_KNFS="-DARLA_KNFS"
fi
















 
# Check whether --with-krb4 or --without-krb4 was given.
if test "${with_krb4+set}" = set; then
  withval="$with_krb4"
  if test "X$withval" = "X"; then
  :
fi
else
  with_krb4=yes
fi


# Check whether --with-krb4-lib or --without-krb4-lib was given.
if test "${with_krb4_lib+set}" = set; then
  withval="$with_krb4_lib"
  if test "$withval" = "yes" -o "$withval" = "no"; then
  { echo "configure: error: No argument for --with-krb4-lib" 1>&2; exit 1; }
fi
fi


# Check whether --with-krb4-include or --without-krb4-include was given.
if test "${with_krb4_include+set}" = set; then
  withval="$with_krb4_include"
  if test "$withval" = "yes" -o "$withval" = "no"; then
  { echo "configure: error: No argument for --with-krb4-include" 1>&2; exit 1; }
fi
fi


 

# Check whether --with-krb5 or --without-krb5 was given.
if test "${with_krb5+set}" = set; then
  withval="$with_krb5"
  
if test "X$withval" = "X"; then
  :
  
elif test "$withval" = "no"; then
if test "$with_krb4" = "yes"; then
  with_krb5=compat
else
  with_krb5=no
fi
fi

else
  with_krb5=yes
fi


# Check whether --with-krb5-include or --without-krb5-include was given.
if test "${with_krb5_include+set}" = set; then
  withval="$with_krb5_include"
  if test "$withval" = "yes" -o "$withval" = "no"; then
  { echo "configure: error: No argument for --with-krb5-include" 1>&2; exit 1; }
fi

fi


# Check whether --with-krb5-lib or --without-krb5-lib was given.
if test "${with_krb5_lib+set}" = set; then
  withval="$with_krb5_lib"
  if test "$withval" = "yes" -o "$withval" = "no"; then
  { echo "configure: error: No argument for --with-krb5-lib" 1>&2; exit 1; }
fi

fi




case X"$with_krb5" in
  Xyes|Xno|Xcompat)
    ;;
  *)
    ac_cv_krb5_where_lib="$with_krb5/lib"
    ac_cv_krb5_where_inc="$with_krb5/include"
    ac_cv_found_krb5=yes
    ;;
esac

if test "X$with_krb5_include" != "X"; then
  ac_cv_krb4_where_inc=$with_krb5_include
  ac_cv_found_krb5=yes
fi

if test "X$with_krb5_lib" != "X"; then
  ac_cv_krb5_where_lib=$with_krb5_lib
  with_krb5=yes
fi


if test "$with_krb5" != "no"; then
  if test "$ac_cv_krb5_where_lib" = ""; then
    
   for i in "" /usr/heimdal/lib /usr/athena/lib /usr/kerberos/lib /usr/local/lib; do
      echo $ac_n "checking for kerberos5 libraries in $i""... $ac_c" 1>&6
echo "configure:3381: checking for kerberos5 libraries in $i" >&5
      
saved_LIBS=$LIBS
for a in "-lk5crypto -lcom_err" 			 "-lcrypto -lcom_err" 			         "-lasn1 -ldes -lroken" 		         "-lasn1 -ldes -lroken -lresolv" 	         "-lasn1 -lcrypto -lcom_err -lroken"		 "-lasn1 -ldes -lroken -ldb" 			 "-lasn1 -ldes -lroken -ldb -lresolv" 		 "-lasn1 -lcrypto -lcom_err -lroken -ldb" 	; do
  LIBS="$saved_LIBS"
  if test "X$i" != "X"; then
    LIBS="$LIBS -L$i"
  fi
  LIBS="$LIBS -lkrb5 $a"
  cat > conftest.$ac_ext <<EOF
#line 3391 "configure"
#include "confdefs.h"

int main() {
krb5_init_context();
; return 0; }
EOF
if { (eval echo configure:3398: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  ac_cv_found_krb5_lib=yes
   ac_cv_found_krb5=yes
   ac_cv_krb5_extralib=$a
   break
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_found_krb5_lib=no
fi
rm -f conftest*
done
LIBS=$saved_LIBS

      if test "$ac_cv_found_krb5_lib" != "no" ; then
        ac_cv_krb5_where_lib=$i
	echo "$ac_t""found" 1>&6
	break
      else
	echo "$ac_t""not found" 1>&6
      fi
    done

  else
    
   for i in $ac_cv_krb5_where_lib; do
      echo $ac_n "checking for kerberos5 libraries in $i""... $ac_c" 1>&6
echo "configure:3427: checking for kerberos5 libraries in $i" >&5
      
saved_LIBS=$LIBS
for a in "-lk5crypto -lcom_err" 			 "-lcrypto -lcom_err" 			         "-lasn1 -ldes -lroken" 		         "-lasn1 -ldes -lroken -lresolv" 	         "-lasn1 -lcrypto -lcom_err -lroken"		 "-lasn1 -ldes -lroken -ldb" 			 "-lasn1 -ldes -lroken -ldb -lresolv" 		 "-lasn1 -lcrypto -lcom_err -lroken -ldb" 	; do
  LIBS="$saved_LIBS"
  if test "X$i" != "X"; then
    LIBS="$LIBS -L$i"
  fi
  LIBS="$LIBS -lkrb5 $a"
  cat > conftest.$ac_ext <<EOF
#line 3437 "configure"
#include "confdefs.h"

int main() {
krb5_init_context();
; return 0; }
EOF
if { (eval echo configure:3444: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  ac_cv_found_krb5_lib=yes
   ac_cv_found_krb5=yes
   ac_cv_krb5_extralib=$a
   break
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_found_krb5_lib=no
fi
rm -f conftest*
done
LIBS=$saved_LIBS

      if test "$ac_cv_found_krb5_lib" != "no" ; then
        ac_cv_krb5_where_lib=$i
	echo "$ac_t""found" 1>&6
	break
      else
	echo "$ac_t""not found" 1>&6
      fi
    done

  fi
fi


if test "X$with_krb5_include" != "X"; then
  ac_cv_krb5_where_inc=$with_krb5_include
  ac_cv_found_krb5=yes
  with_krb5=yes
fi

 if test "$with_krb5" != "no"; then
  if test "$ac_cv_krb5_where_inc" = ""; then
    
   for i in "" /usr/heimdal/include /usr/athena/include /usr/kerberos/include /usr/include/kerberosV /usr/include/kerberos /usr/include/krb5 /usr/local/include; do
      echo $ac_n "checking for kerberos5 headers in $i""... $ac_c" 1>&6
echo "configure:3484: checking for kerberos5 headers in $i" >&5
      
saved_CPPFLAGS=$CPPFLAGS
if test "X$i" != "X" ; then
   CPPFLAGS="$saved_CPPFLAGS -I$i"
fi
cat > conftest.$ac_ext <<EOF
#line 3491 "configure"
#include "confdefs.h"
#include <krb5.h>
int main() {
krb5_kvno foo;
; return 0; }
EOF
if { (eval echo configure:3498: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_found_krb5_inc=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_found_krb5_inc=no
fi
rm -f conftest*
CPPFLAGS=$saved_CPPFLAGS

      if test "$ac_cv_found_krb5_inc" = "yes"; then
        ac_cv_krb5_where_inc=$i
	echo "$ac_t""found" 1>&6
	break
      else
	echo "$ac_t""not found" 1>&6
      fi
    done

  else
    
   for i in $ac_cv_krb5_where_inc; do
      echo $ac_n "checking for kerberos5 headers in $i""... $ac_c" 1>&6
echo "configure:3523: checking for kerberos5 headers in $i" >&5
      
saved_CPPFLAGS=$CPPFLAGS
if test "X$i" != "X" ; then
   CPPFLAGS="$saved_CPPFLAGS -I$i"
fi
cat > conftest.$ac_ext <<EOF
#line 3530 "configure"
#include "confdefs.h"
#include <krb5.h>
int main() {
krb5_kvno foo;
; return 0; }
EOF
if { (eval echo configure:3537: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_found_krb5_inc=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_found_krb5_inc=no
fi
rm -f conftest*
CPPFLAGS=$saved_CPPFLAGS

      if test "$ac_cv_found_krb5_inc" = "yes"; then
        ac_cv_krb5_where_inc=$i
	echo "$ac_t""found" 1>&6
	break
      else
	echo "$ac_t""not found" 1>&6
      fi
    done

  fi
fi
 
  

if test "X$with_krb4" != "Xyes" -a "X$with_krb4" != "Xno"; then
  ac_cv_krb4_where_lib=$with_krb4/lib
  ac_cv_krb4_where_inc=$with_krb4/include
  ac_cv_found_krb4=yes
  
fi

if test "X$with_krb4_lib" != "X"; then
  ac_cv_krb4_where_lib=$with_krb4_lib
  ac_cv_found_krb4=yes
fi


if test "$with_krb4" != "no"; then
  if test "$ac_cv_krb4_where_lib" = ""; then
    
   for i in "" /usr/athena/lib /usr/kerberos/lib /usr/lib /usr/local/lib; do
      echo $ac_n "checking for kerberos4 libraries in $i""... $ac_c" 1>&6
echo "configure:3581: checking for kerberos4 libraries in $i" >&5
      
saved_LIBS=$LIBS
for a in "-lkrb -ldes"				 "-lkrb -ldes -lroken"			 "-lkrb -ldes -lroken -lcom_err" 	 "-lkrb -ldes -lcom_err" 		; do
  LIBS="$saved_LIBS"
  if test "X$i" != "X"; then
     LIBS="$LIBS -L$i"
  fi
  LIBS="$LIBS $a"
  cat > conftest.$ac_ext <<EOF
#line 3591 "configure"
#include "confdefs.h"

int main() {
dest_tkt();
; return 0; }
EOF
if { (eval echo configure:3598: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  ac_cv_found_krb4_lib=yes
   ac_cv_krb4_extralib="$a"
   ac_cv_found_krb4=yes
   break
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_found_krb4_lib=no
   if test "$ac_cv_found_krb4_lib" = "no"; then
    if test "X$i" != "X"; then
       LIBS="$saved_LIBS -L$i"
    fi
    LIBS="$LIBS -lkrb4 -ldes425 -lkrb5 -lcom_err $ac_cv_krb5_extralib"
    cat > conftest.$ac_ext <<EOF
#line 3615 "configure"
#include "confdefs.h"

int main() {
dest_tkt();
; return 0; }
EOF
if { (eval echo configure:3622: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  ac_cv_found_krb4_lib=compat
     break
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_found_krb4_lib=no
fi
rm -f conftest*
   fi
fi
rm -f conftest*
done
LIBS=$saved_LIBS

      if test "$ac_cv_found_krb4_lib" != "no" ; then
        ac_cv_krb4_where_lib=$i
	echo "$ac_t""found" 1>&6
	break
      else
	echo "$ac_t""not found" 1>&6
      fi
    done

  else
    
   for i in $ac_cv_krb4_where_lib; do
      echo $ac_n "checking for kerberos4 libraries in $i""... $ac_c" 1>&6
echo "configure:3652: checking for kerberos4 libraries in $i" >&5
      
saved_LIBS=$LIBS
for a in "-lkrb -ldes"				 "-lkrb -ldes -lroken"			 "-lkrb -ldes -lroken -lcom_err" 	 "-lkrb -ldes -lcom_err" 		; do
  LIBS="$saved_LIBS"
  if test "X$i" != "X"; then
     LIBS="$LIBS -L$i"
  fi
  LIBS="$LIBS $a"
  cat > conftest.$ac_ext <<EOF
#line 3662 "configure"
#include "confdefs.h"

int main() {
dest_tkt();
; return 0; }
EOF
if { (eval echo configure:3669: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  ac_cv_found_krb4_lib=yes
   ac_cv_krb4_extralib="$a"
   ac_cv_found_krb4=yes
   break
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_found_krb4_lib=no
   if test "$ac_cv_found_krb4_lib" = "no"; then
    if test "X$i" != "X"; then
       LIBS="$saved_LIBS -L$i"
    fi
    LIBS="$LIBS -lkrb4 -ldes425 -lkrb5 -lcom_err $ac_cv_krb5_extralib"
    cat > conftest.$ac_ext <<EOF
#line 3686 "configure"
#include "confdefs.h"

int main() {
dest_tkt();
; return 0; }
EOF
if { (eval echo configure:3693: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  ac_cv_found_krb4_lib=compat
     break
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_found_krb4_lib=no
fi
rm -f conftest*
   fi
fi
rm -f conftest*
done
LIBS=$saved_LIBS

      if test "$ac_cv_found_krb4_lib" != "no" ; then
        ac_cv_krb4_where_lib=$i
	echo "$ac_t""found" 1>&6
	break
      else
	echo "$ac_t""not found" 1>&6
      fi
    done

  fi
fi


if test "X$with_krb4_include" != "X"; then
  ac_cv_krb4_where_inc=$with_krb4_include
  ac_cv_found_krb4=yes
fi


if test "$with_krb4" != "no"; then
  if test "$ac_cv_krb4_where_inc" = ""; then
    
   for i in "" /usr/include /usr/athena/include /usr/kerberos/include /usr/include/kerberos /usr/local/include; do
      for j in "" kerberos "kerberosIV"; do
	if test -n "$i"; then
	  if test -n "$j"; then
	    d="$i/$j"
	  else
	    d="$i"
	  fi
	else
	  d="$j"
	fi
        echo $ac_n "checking for kerberos4 headers in $d""... $ac_c" 1>&6
echo "configure:3744: checking for kerberos4 headers in $d" >&5
	
saved_CPPFLAGS="${CPPFLAGS}"
if test -n "$d"; then
   CPPFLAGS="$saved_CPPFLAGS -I$d"
fi
cat > conftest.$ac_ext <<EOF
#line 3751 "configure"
#include "confdefs.h"
#include <krb.h>
int main() {
struct ktext foo;
; return 0; }
EOF
if { (eval echo configure:3758: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_found_krb4=yes
ac_cv_found_krb4_inc=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_found_krb4_inc=no
fi
rm -f conftest*
CPPFLAGS=$saved_CPPFLAGS

        if test "$ac_cv_found_krb4_inc" = "yes"; then
          ac_cv_krb4_where_inc=$d
	  echo "$ac_t""found" 1>&6
	  break 2
        else
	  echo "$ac_t""not found" 1>&6
        fi
      done
   done

  else
    
   for i in $ac_cv_krb4_where_inc; do
      for j in "" kerberos "kerberosIV"; do
	if test -n "$i"; then
	  if test -n "$j"; then
	    d="$i/$j"
	  else
	    d="$i"
	  fi
	else
	  d="$j"
	fi
        echo $ac_n "checking for kerberos4 headers in $d""... $ac_c" 1>&6
echo "configure:3795: checking for kerberos4 headers in $d" >&5
	
saved_CPPFLAGS="${CPPFLAGS}"
if test -n "$d"; then
   CPPFLAGS="$saved_CPPFLAGS -I$d"
fi
cat > conftest.$ac_ext <<EOF
#line 3802 "configure"
#include "confdefs.h"
#include <krb.h>
int main() {
struct ktext foo;
; return 0; }
EOF
if { (eval echo configure:3809: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_found_krb4=yes
ac_cv_found_krb4_inc=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_found_krb4_inc=no
fi
rm -f conftest*
CPPFLAGS=$saved_CPPFLAGS

        if test "$ac_cv_found_krb4_inc" = "yes"; then
          ac_cv_krb4_where_inc=$d
	  echo "$ac_t""found" 1>&6
	  break 2
        else
	  echo "$ac_t""not found" 1>&6
        fi
      done
   done

  fi
fi


 


   
if test "X$ac_cv_found_krb5" = "Xyes"; then
  KRB5_INC_DIR=$ac_cv_krb5_where_inc
  KRB5_LIB_DIR=$ac_cv_krb5_where_lib
  KRB5_INC_FLAGS=
  if test "X$KRB5_INC_DIR" != "X" ; then
    KRB5_INC_FLAGS="-I${KRB5_INC_DIR}"
  fi
  KRB5_LIB_FLAGS=
  if test "X$KRB5_LIB_DIR" != "X" ; then
     KRB5_LIB_FLAGS="-L${KRB5_LIB_DIR}"
  fi
  KRB5_LIB_FLAGS="$KRB5_LIB_FLAGS -lkrb5 -lcom_err $ac_cv_krb5_extralib"
fi

 
   
if test "X$ac_cv_found_krb4" = "Xyes"; then
  KRB4_INC_DIR=$ac_cv_krb4_where_inc
  KRB4_LIB_DIR=$ac_cv_krb4_where_lib
  KRB4_INC_FLAGS=
  if test "X$KRB4_INC_DIR" != "X" ; then
    KRB4_INC_FLAGS="-I${KRB4_INC_DIR}"
  fi
  KRB4_LIB_FLAGS="$ac_cv_krb4_extralib"
  if test "X$KRB4_LIB_DIR" != "X" ; then
     KRB4_LIB_FLAGS="-L${KRB4_LIB_DIR} ${KRB4_LIB_FLAGS}"
  fi


elif test "X$with_krb5" != "Xno" ; then

  echo $ac_n "checking figuring out what way to use kerberos 5 compat""... $ac_c" 1>&6
echo "configure:3872: checking figuring out what way to use kerberos 5 compat" >&5

  KRB4_INC_DIR=$ac_cv_krb5_where_inc
  KRB4_LIB_DIR=$ac_cv_krb5_where_lib
  if test "X$KRB4_INC_DIR" != "X"; then
    KRB4_INC_FLAGS="-I${KRB4_INC_DIR}/kerberosIV -I${KRB4_INC_DIR}"
  else
    KRB4_INC_FLAGS=""
  fi
  if test "X$ac_cv_krb4_where_lib" != "X" ; then
    KRB4_LIB_FLAGS="-L${ac_cv_krb4_where_lib}"
  fi
  KRB4_LIB_FLAGS="$KRB4_LIB_FLAGS -lkrb4 -ldes425 -lkrb5 -lcom_err"
  KRB4_LIB_FLAGS="$KRB4_LIB_FLAGS $ac_cv_krb5_extralib"
  if test "X${KRB4_LIB_DIR}" != X; then
	KRB4_LIB_FLAGS="-L$KRB4_LIB_DIR $KRB4_LIB_FLAGS"
  fi
  echo "$ac_t""done" 1>&6
fi

 



if test "X$ac_cv_found_krb5" = "Xyes"; then
  if test "X$ac_cv_found_krb4_lib" = "Xcompat"; then
    ac_cv_found_krb4=yes
    with_krb4=yes
    
      cat >> confdefs.h <<\EOF
#define HAVE_KRB5_COMPAT_KRB4 1
EOF

       fi
  
    with_krb5=yes
    cat >> confdefs.h <<\EOF
#define HAVE_KRB5 1
EOF

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

fi





 



if test "$ac_cv_found_krb4" = "yes"; then
  with_krb4=yes
  cat >> confdefs.h <<\EOF
#define KERBEROS 1
EOF

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

fi




 



# Check whether --with-krbafs or --without-krbafs was given.
if test "${with_krbafs+set}" = set; then
  withval="$with_krbafs"
  if test "$with_krbafs" = "yes"; then
  { echo "configure: error: You have to give the path to krbafs lib" 1>&2; exit 1; }
elif test "$with_krbafs" = "no"; then
  ac_cv_funclib_k_hasafs=no
else
  KAFS_LIBS_FLAGS="-L${with_krbafs}/lib"
fi
fi


echo $ac_n "checking checking for libkafs/libkrbafs""... $ac_c" 1>&6
echo "configure:3960: checking checking for libkafs/libkrbafs" >&5
if eval "test \"`echo '$''{'ac_cv_funclib_k_hasafs'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  

saved_LIBS="$LIBS"

for a in "$KRB4_LIB_FLAGS" \
	 "$KRB5_LIB_FLAGS" \
	 "$KRB5_LIB_FLAGS $KRB4_LIB_FLAGS" ; do
  for b in "kafs" "krbafs"; do
    LIBS="$saved_LIBS ${KAFS_LIBS_FLAGS} $a -l$b"
    cat > conftest.$ac_ext <<EOF
#line 3974 "configure"
#include "confdefs.h"

int main() {
k_hasafs();
; return 0; }
EOF
if { (eval echo configure:3981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  ac_cv_funclib_k_hasafs=yes
    ac_cv_libkafs_flags="$KAFS_LIBS_FLAGS $a -l$b"
    break 2
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_funclib_k_hasafs=no
fi
rm -f conftest*
  done
done

LIBS="$saved_LIBS"
fi

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

if test "X$ac_cv_funclib_k_hasafs" != "Xno"; then
   KAFS_LIBS="$ac_cv_libkafs_flags"
fi




if test "X$ac_cv_found_krb4" = "Xyes"; then
  RXKAD="rxkad"
  RXKAD_MAKEFILE="rxkad/Makefile"
  RXKAD_LIBS="-L../rxkad -lrxkad $KRB4_LIB_FLAGS"
  MILKO_RXKAD_LIBS=`echo $RXKAD_LIBS | sed s,\.\./,\.\./\.\./,`
  MILKO_RXKAD_LIBS2=`echo $MILKO_RXKAD_LIBS | sed s,\.\./,\.\./\.\./,`
  APPL_SUBDIRS='afsutils amon fs'
else
  APPL_SUBDIRS=
fi




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


fi

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

fi



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


fi

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

fi



echo $ac_n "checking for krb_principal""... $ac_c" 1>&6
echo "configure:4091: checking for krb_principal" >&5
if eval "test \"`echo '$''{'ac_cv_struct_krb_principal'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
if test "$ac_cv_found_krb4" = "yes"; then
save_CPPFLAGS="${CPPFLAGS}"
CPPFLAGS="${KRB4_INC_FLAGS} $CPPFLAGS"
cat > conftest.$ac_ext <<EOF
#line 4100 "configure"
#include "confdefs.h"
#include <krb.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "krb_principal" >/dev/null 2>&1; then
  rm -rf conftest*
  ac_cv_struct_krb_principal=yes
fi
rm -f conftest*

CPPFLAGS="${save_CPPFLAGS}"
eval "ac_cv_struct_krb_principal=${ac_cv_struct_krb_principal-no}"
else
eval "ac_cv_struct_krb_principal=no"
fi

fi

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

fi



echo $ac_n "checking for krb_get_err_text""... $ac_c" 1>&6
echo "configure:4130: checking for krb_get_err_text" >&5
if eval "test \"`echo '$''{'ac_cv_func_krb_get_err_text'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
if test "$ac_cv_found_krb4" = "yes"; then
save_CPPFLAGS="${CPPFLAGS}"
save_LIBS="${LIBS}"
CPPFLAGS="${KRB4_INC_FLAGS} ${CPPFLAGS}"
LIBS="${KRB4_LIB_FLAGS} ${LIBS}"
cat > conftest.$ac_ext <<EOF
#line 4141 "configure"
#include "confdefs.h"
#include <krb.h>
int main() {
krb_get_err_text(0);
; return 0; }
EOF
if { (eval echo configure:4148: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  ac_cv_func_krb_get_err_text=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_func_krb_get_err_text=no
fi
rm -f conftest*
CPPFLAGS="${save_CPPFLAGS}"
LIBS="${save_LIBS}"
fi

fi

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

fi



echo $ac_n "checking for krb_get_default_tkt_root""... $ac_c" 1>&6
echo "configure:4175: checking for krb_get_default_tkt_root" >&5
if eval "test \"`echo '$''{'ac_cv_func_krb_get_default_tkt_root'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
if test "$ac_cv_found_krb4" = "yes"; then
save_CPPFLAGS="${CPPFLAGS}"
save_LIBS="${LIBS}"
CPPFLAGS="${KRB4_INC_FLAGS} ${CPPFLAGS}"
LIBS="${KRB4_LIB_FLAGS} ${LIBS}"
cat > conftest.$ac_ext <<EOF
#line 4186 "configure"
#include "confdefs.h"
#include <krb.h>
int main() {
krb_get_default_tkt_root();
; return 0; }
EOF
if { (eval echo configure:4193: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  ac_cv_func_krb_get_default_tkt_root=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_func_krb_get_default_tkt_root=no
fi
rm -f conftest*
CPPFLAGS="${save_CPPFLAGS}"
LIBS="${save_LIBS}"
else
eval "ac_cv_func_krb_get_default_tkt_root=no"
fi

fi

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

fi



echo $ac_n "checking for krb_kdctimeofday""... $ac_c" 1>&6
echo "configure:4222: checking for krb_kdctimeofday" >&5
if eval "test \"`echo '$''{'ac_cv_func_krb_kdctimeofday'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
if test "$ac_cv_found_krb4" = "yes"; then
save_CPPFLAGS="${CPPFLAGS}"
save_LIBS="${LIBS}"
CPPFLAGS="${KRB4_INC_FLAGS} ${CPPFLAGS}"
LIBS="${KRB4_LIB_FLAGS} ${LIBS}"
cat > conftest.$ac_ext <<EOF
#line 4233 "configure"
#include "confdefs.h"
#include <krb.h>
int main() {
krb_kdctimeofday(0);
; return 0; }
EOF
if { (eval echo configure:4240: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  ac_cv_func_krb_kdctimeofday=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_func_krb_kdctimeofday=no
fi
rm -f conftest*
CPPFLAGS="${save_CPPFLAGS}"
LIBS="${save_LIBS}"
else
eval "ac_cv_func_krb_kdctimeofday=no"
fi

fi

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

fi





# Check whether --with-readline or --without-readline was given.
if test "${with_readline+set}" = set; then
  withval="$with_readline"
  :
fi

# Check whether --with-readline-lib or --without-readline-lib was given.
if test "${with_readline_lib+set}" = set; then
  withval="$with_readline_lib"
  if test "$withval" = "yes" -o "$withval" = "no"; then
  { echo "configure: error: No argument for --with-readline-lib" 1>&2; exit 1; }
elif test "X$with_readline" = "X"; then
  with_readline=yes
fi
fi

# Check whether --with-readline-include or --without-readline-include was given.
if test "${with_readline_include+set}" = set; then
  withval="$with_readline_include"
  if test "$withval" = "yes" -o "$withval" = "no"; then
  { echo "configure: error: No argument for --with-readline-include" 1>&2; exit 1; }
elif test "X$with_readline" = "X"; then
  with_readline=yes
fi
fi


echo $ac_n "checking for readline""... $ac_c" 1>&6
echo "configure:4298: checking for readline" >&5

case "$with_readline" in
yes)	;;
no)	;;
"")	;;
*)	if test "$with_readline_include" = ""; then
		with_readline_include="$with_readline/include"
	fi
	if test "$with_readline_lib" = ""; then
		with_readline_lib="$with_readline/lib$abilibdirext"
	fi
	;;
esac
header_dirs=
lib_dirs=
d=''
for i in $d; do
	header_dirs="$header_dirs $i/include"
	lib_dirs="$lib_dirs $i/lib$abilibdirext"
done

case "$with_readline_include" in
yes) ;;
no)  ;;
*)   header_dirs="$with_readline_include $header_dirs";;
esac
case "$with_readline_lib" in
yes) ;;
no)  ;;
*)   lib_dirs="$with_readline_lib $lib_dirs";;
esac

save_CFLAGS="$CFLAGS"
save_LIBS="$LIBS"
ires= lres=
for i in $header_dirs; do
	CFLAGS="-I$i $save_CFLAGS"
	cat > conftest.$ac_ext <<EOF
#line 4337 "configure"
#include "confdefs.h"

#include <stdio.h>
#include <readline.h>

int main() {

; return 0; }
EOF
if { (eval echo configure:4347: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ires=$i;break
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
fi
rm -f conftest*
done
for i in $lib_dirs; do
	LIBS="-L$i -lreadline  $save_LIBS"
	cat > conftest.$ac_ext <<EOF
#line 4359 "configure"
#include "confdefs.h"

#include <stdio.h>
#include <readline.h>

int main() {

; return 0; }
EOF
if { (eval echo configure:4369: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  lres=$i;break
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
fi
rm -f conftest*
done
CFLAGS="$save_CFLAGS"
LIBS="$save_LIBS"

if test "$ires" -a "$lres"; then
	readline_includedir="$ires"
	readline_libdir="$lres"
	INCLUDE_readline="-I$readline_includedir"
	LIB_readline="-L$readline_libdir -lreadline"
	cat >> confdefs.h <<EOF
#define `echo readline | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ` 1
EOF

	with_readline=yes
	echo "$ac_t""headers $ires, libraries $lres" 1>&6
else
	INCLUDE_readline=
	LIB_readline=
	with_readline=no
	echo "$ac_t""$with_readline" 1>&6
fi




if test "$with_readline" = "no"; then
	


echo $ac_n "checking for tgetent""... $ac_c" 1>&6
echo "configure:4407: checking for tgetent" >&5
if eval "test \"`echo '$''{'ac_cv_funclib_tgetent'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
if eval "test \"\$ac_cv_func_tgetent\" != yes" ; then
	ac_save_LIBS="$LIBS"
	for ac_lib in "" termcap ncurses curses; do
		if test -n "$ac_lib"; then 
			ac_lib="-l$ac_lib"
		else
			ac_lib=""
		fi
		LIBS=" $ac_lib  $ac_save_LIBS"
		cat > conftest.$ac_ext <<EOF
#line 4422 "configure"
#include "confdefs.h"

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

fi


eval "ac_res=\$ac_cv_funclib_tgetent"

: << END
@@@funcs="$funcs tgetent"@@@
@@@libs="$libs "" termcap ncurses curses"@@@
END

# tgetent
eval "ac_tr_func=HAVE_`echo tgetent | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`"
eval "ac_tr_lib=HAVE_LIB`echo $ac_res | sed -e 's/-l//' | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`"
eval "LIB_tgetent=$ac_res"

case "$ac_res" in
	yes)
	eval "ac_cv_func_tgetent=yes"
	eval "LIB_tgetent="
	cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF

	echo "$ac_t""yes" 1>&6
	;;
	no)
	eval "ac_cv_func_tgetent=no"
	eval "LIB_tgetent="
	echo "$ac_t""no" 1>&6
	;;
	*)
	eval "ac_cv_func_tgetent=yes"
	eval "ac_cv_lib_`echo "$ac_res" | sed 's/-l//'`=yes"
	cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF

	cat >> confdefs.h <<EOF
#define $ac_tr_lib 1
EOF

	echo "$ac_t""yes, in $ac_res" 1>&6
	;;
esac


	if test "$ac_cv_funclib_tgetent" = "no"; then
		{ echo "configure: error: Could not find tgetent, needed by edit/editline" 1>&2; exit 1; }
	fi
	


echo $ac_n "checking for readline""... $ac_c" 1>&6
echo "configure:4495: checking for readline" >&5
if eval "test \"`echo '$''{'ac_cv_funclib_readline'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
if eval "test \"\$ac_cv_func_readline\" != yes" ; then
	ac_save_LIBS="$LIBS"
	for ac_lib in "" editline edit readline; do
		if test -n "$ac_lib"; then 
			ac_lib="-l$ac_lib"
		else
			ac_lib=""
		fi
		LIBS=" $ac_lib $LIB_tgetent $ac_save_LIBS"
		cat > conftest.$ac_ext <<EOF
#line 4510 "configure"
#include "confdefs.h"

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

fi


eval "ac_res=\$ac_cv_funclib_readline"

: << END
@@@funcs="$funcs readline"@@@
@@@libs="$libs "" editline edit readline"@@@
END

# readline
eval "ac_tr_func=HAVE_`echo readline | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`"
eval "ac_tr_lib=HAVE_LIB`echo $ac_res | sed -e 's/-l//' | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`"
eval "LIB_readline=$ac_res"

case "$ac_res" in
	yes)
	eval "ac_cv_func_readline=yes"
	eval "LIB_readline="
	cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF

	echo "$ac_t""yes" 1>&6
	;;
	no)
	eval "ac_cv_func_readline=no"
	eval "LIB_readline="
	echo "$ac_t""no" 1>&6
	;;
	*)
	eval "ac_cv_func_readline=yes"
	eval "ac_cv_lib_`echo "$ac_res" | sed 's/-l//'`=yes"
	cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF

	cat >> confdefs.h <<EOF
#define $ac_tr_lib 1
EOF

	echo "$ac_t""yes, in $ac_res" 1>&6
	;;
esac


	if test "$ac_cv_func_readline" = "no"; then
		


echo $ac_n "checking for el_init""... $ac_c" 1>&6
echo "configure:4581: checking for el_init" >&5
if eval "test \"`echo '$''{'ac_cv_funclib_el_init'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
if eval "test \"\$ac_cv_func_el_init\" != yes" ; then
	ac_save_LIBS="$LIBS"
	for ac_lib in "" edit; do
		if test -n "$ac_lib"; then 
			ac_lib="-l$ac_lib"
		else
			ac_lib=""
		fi
		LIBS=" $ac_lib $LIB_tgetent $ac_save_LIBS"
		cat > conftest.$ac_ext <<EOF
#line 4596 "configure"
#include "confdefs.h"

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

fi


eval "ac_res=\$ac_cv_funclib_el_init"

: << END
@@@funcs="$funcs el_init"@@@
@@@libs="$libs "" edit"@@@
END

# el_init
eval "ac_tr_func=HAVE_`echo el_init | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`"
eval "ac_tr_lib=HAVE_LIB`echo $ac_res | sed -e 's/-l//' | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`"
eval "LIB_el_init=$ac_res"

case "$ac_res" in
	yes)
	eval "ac_cv_func_el_init=yes"
	eval "LIB_el_init="
	cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF

	echo "$ac_t""yes" 1>&6
	;;
	no)
	eval "ac_cv_func_el_init=no"
	eval "LIB_el_init="
	echo "$ac_t""no" 1>&6
	;;
	*)
	eval "ac_cv_func_el_init=yes"
	eval "ac_cv_lib_`echo "$ac_res" | sed 's/-l//'`=yes"
	cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF

	cat >> confdefs.h <<EOF
#define $ac_tr_lib 1
EOF

	echo "$ac_t""yes, in $ac_res" 1>&6
	;;
esac


		if test "$ac_cv_func_el_init" = yes; then
			editline_OBJS=edit_compat.o
			LIB_readline='-L'`pwd`'/lib/editline -leditline '"$LIB_el_init";
			INCLUDE_readline='-I'`pwd`'/lib/editline -I$(top_srcdir)/lib/editline'
		else
			editline_OBJS="editline.o complete.o sysunix.o"
			LIB_readline='-L'`pwd`'/lib/editline -leditline'
			INCLUDE_readline='-I'`pwd`'/lib/editline -I$(top_srcdir)/lib/editline'
		fi
	fi
fi
cat >> confdefs.h <<\EOF
#define HAVE_READLINE 1
EOF
LIB_readline="$LIB_readline \$(LIB_tgetent)"

# Check whether --enable-mmap or --disable-mmap was given.
if test "${enable_mmap+set}" = set; then
  enableval="$enable_mmap"
  if test "$enableval" = "no"; then
  ac_cv_func_mmap_fixed_mapped=no
 fi
fi


# Check whether --enable-mmaptime or --disable-mmaptime was given.
if test "${enable_mmaptime+set}" = set; then
  enableval="$enable_mmaptime"
  if test "$enableval" = "yes" -o "X$enableval" = "X"; then
  cat >> confdefs.h <<\EOF
#define USE_MMAPTIME 1
EOF

fi
fi


aix_dynamic_afs=yes
# Check whether --enable-dynamic-afs or --disable-dynamic-afs was given.
if test "${enable_dynamic_afs+set}" = set; then
  enableval="$enable_dynamic_afs"
  
if test "$enableval" = "no"; then
	aix_dynamic_afs=no
fi

fi



if test "${ac_cv_prog_getconf-set}" = set ;then

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


fi

if test "$ac_cv_prog_getconf" = "yes";then
echo $ac_n "checking if we have LFS_CFLAGS""... $ac_c" 1>&6
echo "configure:4748: checking if we have LFS_CFLAGS" >&5
FOO="`getconf LFS_CFLAGS 2>/dev/null >/dev/null`"
if test $? = 0 ;then
CFLAGS="$CFLAGS $FOO"
echo "$ac_t""yes $FOO" 1>&6
else
echo "$ac_t""no" 1>&6
fi
fi



if test "$ac_cv_prog_getconf" = "yes";then
echo $ac_n "checking if we have LFS_LDFLAGS""... $ac_c" 1>&6
echo "configure:4762: checking if we have LFS_LDFLAGS" >&5
FOO="`getconf LFS_LDFLAGS 2>/dev/null >/dev/null`"
if test $? = 0 ;then
LDFLAGS="$LDFLAGS $FOO"
echo "$ac_t""yes $FOO" 1>&6
else
echo "$ac_t""no" 1>&6
fi
fi




echo $ac_n "checking for glibc""... $ac_c" 1>&6
echo "configure:4776: checking for glibc" >&5
if eval "test \"`echo '$''{'ac_cv_libc_glibc'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
cat > conftest.$ac_ext <<EOF
#line 4782 "configure"
#include "confdefs.h"
#include <features.h>
#ifdef __GLIBC__
yes
#endif

EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "yes" >/dev/null 2>&1; then
  rm -rf conftest*
  eval "ac_cv_libc_glibc=yes"
else
  rm -rf conftest*
  eval "ac_cv_libc_glibc=no"
fi
rm -f conftest*

fi

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

fi




if test "$editline_OBJS" != ""; then
  editline_dir=editline
fi
























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

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

int main() {

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

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

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

echo $ac_n "checking for working mmap""... $ac_c" 1>&6
echo "configure:4936: checking for working mmap" >&5
if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_func_mmap_fixed_mapped=no
else
  cat > conftest.$ac_ext <<EOF
#line 4944 "configure"
#include "confdefs.h"

/* Thanks to Mike Haertel and Jim Avera for this test.
   Here is a matrix of mmap possibilities:
	mmap private not fixed
	mmap private fixed at somewhere currently unmapped
	mmap private fixed at somewhere already mapped
	mmap shared not fixed
	mmap shared fixed at somewhere currently unmapped
	mmap shared fixed at somewhere already mapped
   For private mappings, we should verify that changes cannot be read()
   back from the file, nor mmap's back from the file at a different
   address.  (There have been systems where private was not correctly
   implemented like the infamous i386 svr4.0, and systems where the
   VM page cache was not coherent with the filesystem buffer cache
   like early versions of FreeBSD and possibly contemporary NetBSD.)
   For shared mappings, we should conversely verify that changes get
   propogated back to all the places they're supposed to be.

   Grep wants private fixed already mapped.
   The main things grep needs to know about mmap are:
   * does it exist and is it safe to write into the mmap'd area
   * how to use it (BSD variants)  */
#include <sys/types.h>
#include <fcntl.h>
#include <sys/mman.h>

/* This mess was copied from the GNU getpagesize.h.  */
#ifndef HAVE_GETPAGESIZE
# ifdef HAVE_UNISTD_H
#  include <unistd.h>
# endif

/* Assume that all systems that can run configure have sys/param.h.  */
# ifndef HAVE_SYS_PARAM_H
#  define HAVE_SYS_PARAM_H 1
# endif

# ifdef _SC_PAGESIZE
#  define getpagesize() sysconf(_SC_PAGESIZE)
# else /* no _SC_PAGESIZE */
#  ifdef HAVE_SYS_PARAM_H
#   include <sys/param.h>
#   ifdef EXEC_PAGESIZE
#    define getpagesize() EXEC_PAGESIZE
#   else /* no EXEC_PAGESIZE */
#    ifdef NBPG
#     define getpagesize() NBPG * CLSIZE
#     ifndef CLSIZE
#      define CLSIZE 1
#     endif /* no CLSIZE */
#    else /* no NBPG */
#     ifdef NBPC
#      define getpagesize() NBPC
#     else /* no NBPC */
#      ifdef PAGESIZE
#       define getpagesize() PAGESIZE
#      endif /* PAGESIZE */
#     endif /* no NBPC */
#    endif /* no NBPG */
#   endif /* no EXEC_PAGESIZE */
#  else /* no HAVE_SYS_PARAM_H */
#   define getpagesize() 8192	/* punt totally */
#  endif /* no HAVE_SYS_PARAM_H */
# endif /* no _SC_PAGESIZE */

#endif /* no HAVE_GETPAGESIZE */

#ifdef __cplusplus
extern "C" { void *malloc(unsigned); }
#else
char *malloc();
#endif

int
main()
{
	char *data, *data2, *data3;
	int i, pagesize;
	int fd;

	pagesize = getpagesize();

	/*
	 * First, make a file with some known garbage in it.
	 */
	data = malloc(pagesize);
	if (!data)
		exit(1);
	for (i = 0; i < pagesize; ++i)
		*(data + i) = rand();
	umask(0);
	fd = creat("conftestmmap", 0600);
	if (fd < 0)
		exit(1);
	if (write(fd, data, pagesize) != pagesize)
		exit(1);
	close(fd);

	/*
	 * Next, try to mmap the file at a fixed address which
	 * already has something else allocated at it.  If we can,
	 * also make sure that we see the same garbage.
	 */
	fd = open("conftestmmap", O_RDWR);
	if (fd < 0)
		exit(1);
	data2 = malloc(2 * pagesize);
	if (!data2)
		exit(1);
	data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
	if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
	    MAP_PRIVATE | MAP_FIXED, fd, 0L))
		exit(1);
	for (i = 0; i < pagesize; ++i)
		if (*(data + i) != *(data2 + i))
			exit(1);

	/*
	 * Finally, make sure that changes to the mapped area
	 * do not percolate back to the file as seen by read().
	 * (This is a bug on some variants of i386 svr4.0.)
	 */
	for (i = 0; i < pagesize; ++i)
		*(data2 + i) = *(data2 + i) + 1;
	data3 = malloc(pagesize);
	if (!data3)
		exit(1);
	if (read(fd, data3, pagesize) != pagesize)
		exit(1);
	for (i = 0; i < pagesize; ++i)
		if (*(data + i) != *(data3 + i))
			exit(1);
	close(fd);
	unlink("conftestmmap");
	exit(0);
}

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

fi

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

fi



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

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

fi

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

fi

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

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

fi
fi

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

fi

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

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

fi


for ac_hdr in 				\
		arpa/inet.h			\
		arpa/nameser.h			\
		crypt.h				\
		dbm.h				\
		dirent.h			\
		errno.h				\
		fcntl.h				\
		grp.h				\
		inttypes.h			\
		kvm.h				\
		libelf/nlist.h			\
		machine/alpha/asm.h		\
		machine/asm.h			\
		machine/endian.h		\
		machine/regdef.h		\
		miscfs/genfs/genfs.h		\
		ndbm.h				\
		netdb.h				\
		netinet/in.h			\
		netinet/in6.h			\
		netinet/in6_machtypes.h		\
		netinet6/in6.h			\
		nlist.h				\
		paths.h				\
		pwd.h				\
		regdef.h			\
		resolv.h			\
		rpcsvc/dbm.h			\
		shadow.h			\
		sys/attr.h			\
		sys/bitypes.h			\
		sys/cdefs.h			\
		sys/dir.h			\
		sys/filedesc.h			\
		sys/ioccom.h			\
		sys/ioctl.h			\
		sys/lkm.h			\
		sys/mman.h			\
		sys/module.h			\
		sys/mount.h			\
		sys/param.h			\
		sys/poll.h			\
		sys/proc.h			\
		sys/queue.h			\
		sys/resource.h			\
		sys/select.h			\
		sys/signalvar.h			\
		sys/socket.h			\
		sys/sockio.h			\
		sys/stat.h			\
		sys/syscallargs.h		\
		sys/sysconfig.h			\
		sys/sysctl.h			\
		sys/sysent.h			\
		sys/sysproto.h			\
		sys/time.h			\
		sys/tty.h			\
		sys/types.h			\
		sys/uio.h			\
		sys/user.h			\
		sys/utsname.h			\
		sys/vfs.h			\
		sys/wait.h			\
		syslog.h			\
		termios.h			\
		unistd.h			\
		uvm/uvm_extern.h		\
		vm/vm.h				\
		vm/vm_extern.h			\
		vm/vm_object.h			\
		vm/vm_pager.h			\
		vm/vm_zone.h			\
		vm/vnode_pager.h		\

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



# Check whether --enable-bigendian or --disable-bigendian was given.
if test "${enable_bigendian+set}" = set; then
  enableval="$enable_bigendian"
  krb_cv_c_bigendian=yes
fi

# Check whether --enable-littleendian or --disable-littleendian was given.
if test "${enable_littleendian+set}" = set; then
  enableval="$enable_littleendian"
  krb_cv_c_bigendian=no
fi

echo $ac_n "checking whether byte order is known at compile time""... $ac_c" 1>&6
echo "configure:5377: checking whether byte order is known at compile time" >&5
if eval "test \"`echo '$''{'krb_cv_c_bigendian_compile'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 5382 "configure"
#include "confdefs.h"

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

#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
 bogus endian macros
#endif
; return 0; }
EOF
if { (eval echo configure:5394: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  krb_cv_c_bigendian_compile=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  krb_cv_c_bigendian_compile=no
fi
rm -f conftest*
fi

echo "$ac_t""$krb_cv_c_bigendian_compile" 1>&6
echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
echo "configure:5408: checking whether byte ordering is bigendian" >&5
if eval "test \"`echo '$''{'krb_cv_c_bigendian'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
  if test "$krb_cv_c_bigendian_compile" = "yes"; then
    cat > conftest.$ac_ext <<EOF
#line 5415 "configure"
#include "confdefs.h"

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

#if BYTE_ORDER != BIG_ENDIAN
  not big endian
#endif
; return 0; }
EOF
if { (eval echo configure:5427: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  krb_cv_c_bigendian=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  krb_cv_c_bigendian=no
fi
rm -f conftest*
  else
    if test "$cross_compiling" = yes; then
  { echo "configure: error: specify either --enable-bigendian or --enable-littleendian" 1>&2; exit 1; }
else
  cat > conftest.$ac_ext <<EOF
#line 5442 "configure"
#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
if { (eval echo configure:5455: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  krb_cv_c_bigendian=no
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  krb_cv_c_bigendian=yes
fi
rm -fr conftest*
fi

  fi

fi

echo "$ac_t""$krb_cv_c_bigendian" 1>&6
if test "$krb_cv_c_bigendian" = "yes"; then
  cat >> confdefs.h <<\EOF
#define WORDS_BIGENDIAN 1
EOF
fi
if test "$krb_cv_c_bigendian_compile" = "yes"; then
  cat >> confdefs.h <<\EOF
#define ENDIANESS_IN_SYS_PARAM_H 1
EOF
fi



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

int main() {

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

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

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

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

fi



echo $ac_n "checking for inline""... $ac_c" 1>&6
echo "configure:5563: checking for inline" >&5
if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_cv_c_inline=no
for ac_kw in inline __inline__ __inline; do
  cat > conftest.$ac_ext <<EOF
#line 5570 "configure"
#include "confdefs.h"

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

fi

echo "$ac_t""$ac_cv_c_inline" 1>&6
case "$ac_cv_c_inline" in
  inline | yes) ;;
  no) cat >> confdefs.h <<\EOF
#define inline 
EOF
 ;;
  *)  cat >> confdefs.h <<EOF
#define inline $ac_cv_c_inline
EOF
 ;;
esac




echo $ac_n "checking for __FUNCTION__""... $ac_c" 1>&6
echo "configure:5606: checking for __FUNCTION__" >&5
if eval "test \"`echo '$''{'ac_cv___function__'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
if test "$cross_compiling" = yes; then
  ac_cv___function__=no
else
  cat > conftest.$ac_ext <<EOF
#line 5615 "configure"
#include "confdefs.h"

#include <string.h>

static char *foo()
{
  return __FUNCTION__;
}

int main()
{
  return strcmp(foo(), "foo") != 0;
}

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

fi

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

fi
echo "$ac_t""$ac_cv___function__" 1>&6




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

#include <stdlib.h>

int main() {

static void foo(void) __attribute__ ((noreturn));

static void
foo(void)
{
  exit(1);
}

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

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

fi
echo "$ac_t""$ac_cv___attribute__" 1>&6





lib_dbm=no
lib_db=no

for i in "" $berkeley_db gdbm ndbm; do

	if test "$i"; then
		m="lib$i"
		l="-l$i"
	else
		m="libc"
		l=""
	fi	

	echo $ac_n "checking for dbm_open in $m""... $ac_c" 1>&6
echo "configure:5718: checking for dbm_open in $m" >&5
	if eval "test \"`echo '$''{'ac_cv_krb_dbm_open_$m'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  

	save_LIBS="$LIBS"
	LIBS="$l $LIBS"
	if test "$cross_compiling" = yes; then
  ac_res=no
else
  cat > conftest.$ac_ext <<EOF
#line 5730 "configure"
#include "confdefs.h"

#include <unistd.h>
#include <fcntl.h>
#include <ndbm.h>
int main()
{
  DBM *d;

  d = dbm_open("conftest", O_RDWR | O_CREAT, 0666);
  if(d == NULL)
    return 1;
  dbm_close(d);
  return 0;
}
EOF
if { (eval echo configure:5747: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  
	if test -f conftest.db; then
		ac_res=db
	else
		ac_res=dbm
	fi
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_res=no
fi
rm -fr conftest*
fi


	LIBS="$save_LIBS"

	eval ac_cv_krb_dbm_open_$m=$ac_res
fi

	eval ac_res=\$ac_cv_krb_dbm_open_$m
	echo "$ac_t""$ac_res" 1>&6

	if test "$lib_dbm" = no -a $ac_res = dbm; then
		lib_dbm="$l"
	elif test "$lib_db" = no -a $ac_res = db; then
		lib_db="$l"
		break
	fi
done

echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
echo "configure:5782: checking for NDBM library" >&5
ac_ndbm=no
if test "$lib_db" != no; then
	LIB_DBM="$lib_db"
	ac_ndbm=yes
	cat >> confdefs.h <<\EOF
#define HAVE_NEW_DB 1
EOF

	if test "$LIB_DBM"; then
		ac_res="yes, $LIB_DBM"
	else
		ac_res=yes
	fi
elif test "$lib_dbm" != no; then
	LIB_DBM="$lib_dbm"
	ac_ndbm=yes
	if test "$LIB_DBM"; then
		ac_res="yes, $LIB_DBM"
	else
		ac_res=yes
	fi
else
	LIB_DBM=""
	ac_res=no
fi
test "$ac_ndbm" = yes && cat >> confdefs.h <<\EOF
#define NDBM 1
EOF

DBLIB="$LIB_DBM"

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





echo $ac_n "checking for NEXTSTEP""... $ac_c" 1>&6
echo "configure:5821: checking for NEXTSTEP" >&5
if eval "test \"`echo '$''{'krb_cv_sys_nextstep'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 5826 "configure"
#include "confdefs.h"
#if defined(NeXT) && !defined(__APPLE__)
	yes
#endif 

EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "yes" >/dev/null 2>&1; then
  rm -rf conftest*
  krb_cv_sys_nextstep=yes
else
  rm -rf conftest*
  krb_cv_sys_nextstep=no
fi
rm -f conftest*
 
fi

if test "$krb_cv_sys_nextstep" = "yes"; then
  CFLAGS="$CFLAGS -posix"
  CPPFLAGS="$CPPFLAGS -posix"
  LIBS="$LIBS -posix"
fi
echo "$ac_t""$krb_cv_sys_nextstep" 1>&6


echo $ac_n "checking for AIX""... $ac_c" 1>&6
echo "configure:5854: checking for AIX" >&5
if eval "test \"`echo '$''{'krb_cv_sys_aix'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 5859 "configure"
#include "confdefs.h"
#ifdef _AIX
	yes
#endif 

EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "yes" >/dev/null 2>&1; then
  rm -rf conftest*
  krb_cv_sys_aix=yes
else
  rm -rf conftest*
  krb_cv_sys_aix=no
fi
rm -f conftest*
 
fi

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


if test "$krb_cv_sys_aix" = yes ;then
	if test "$aix_dynamic_afs" = yes; then
		AFS_EXTRA_OBJS='$(srcdir)/afsl.exp dlfcn.o'
		AFS_EXTRA_LIBS=afslib.so
		# this works differently in AIX <=3 and 4
		if test `uname -v` = 4 ; then
			AFS_EXTRA_LD="-bnoentry"
		else
			AFS_EXTRA_LD="-e _nostart"
		fi
		AFS_EXTRA_DEFS=
		AIX_EXTRA_KAFS="-lld"
	else
		AFS_EXTRA_OBJS='$(srcdir)/afsl.exp afslib.o'
		AFS_EXTRA_LIBS=
		AFS_EXTRA_DEFS='-DSTATIC_AFS_SYSCALLS'
		AIX_EXTRA_KAFS=
	fi
					fi



echo $ac_n "checking for struct winsize""... $ac_c" 1>&6
echo "configure:5904: checking for struct winsize" >&5
if eval "test \"`echo '$''{'ac_cv_struct_winsize'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
ac_cv_struct_winsize=no
for i in sys/termios.h sys/ioctl.h; do
cat > conftest.$ac_ext <<EOF
#line 5912 "configure"
#include "confdefs.h"
#include <$i>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "struct[ 	]*winsize" >/dev/null 2>&1; then
  rm -rf conftest*
  ac_cv_struct_winsize=yes; break
fi
rm -f conftest*
done

fi

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

fi
echo "$ac_t""$ac_cv_struct_winsize" 1>&6
cat > conftest.$ac_ext <<EOF
#line 5934 "configure"
#include "confdefs.h"
#include <termios.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "ws_xpixel" >/dev/null 2>&1; then
  rm -rf conftest*
  cat >> confdefs.h <<\EOF
#define HAVE_WS_XPIXEL 1
EOF

fi
rm -f conftest*

cat > conftest.$ac_ext <<EOF
#line 5949 "configure"
#include "confdefs.h"
#include <termios.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "ws_ypixel" >/dev/null 2>&1; then
  rm -rf conftest*
  cat >> confdefs.h <<\EOF
#define HAVE_WS_YPIXEL 1
EOF

fi
rm -f conftest*


 





echo $ac_n "checking for syslog""... $ac_c" 1>&6
echo "configure:5971: checking for syslog" >&5
if eval "test \"`echo '$''{'ac_cv_funclib_syslog'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
if eval "test \"\$ac_cv_func_syslog\" != yes" ; then
	ac_save_LIBS="$LIBS"
	for ac_lib in "" syslog; do
		if test -n "$ac_lib"; then 
			ac_lib="-l$ac_lib"
		else
			ac_lib=""
		fi
		LIBS=" $ac_lib  $ac_save_LIBS"
		cat > conftest.$ac_ext <<EOF
#line 5986 "configure"
#include "confdefs.h"

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

fi


eval "ac_res=\$ac_cv_funclib_syslog"

: << END
@@@funcs="$funcs syslog"@@@
@@@libs="$libs "" syslog"@@@
END

# syslog
eval "ac_tr_func=HAVE_`echo syslog | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`"
eval "ac_tr_lib=HAVE_LIB`echo $ac_res | sed -e 's/-l//' | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`"
eval "LIB_syslog=$ac_res"

case "$ac_res" in
	yes)
	eval "ac_cv_func_syslog=yes"
	eval "LIB_syslog="
	cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF

	echo "$ac_t""yes" 1>&6
	;;
	no)
	eval "ac_cv_func_syslog=no"
	eval "LIB_syslog="
	echo "$ac_t""no" 1>&6
	;;
	*)
	eval "ac_cv_func_syslog=yes"
	eval "ac_cv_lib_`echo "$ac_res" | sed 's/-l//'`=yes"
	cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF

	cat >> confdefs.h <<EOF
#define $ac_tr_lib 1
EOF

	echo "$ac_t""yes, in $ac_res" 1>&6
	;;
esac


if test -n "$LIB_syslog"; then
	LIBS="$LIB_syslog $LIBS"
fi







echo $ac_n "checking for socket""... $ac_c" 1>&6
echo "configure:6063: checking for socket" >&5
if eval "test \"`echo '$''{'ac_cv_funclib_socket'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
if eval "test \"\$ac_cv_func_socket\" != yes" ; then
	ac_save_LIBS="$LIBS"
	for ac_lib in "" socket; do
		if test -n "$ac_lib"; then 
			ac_lib="-l$ac_lib"
		else
			ac_lib=""
		fi
		LIBS=" $ac_lib  $ac_save_LIBS"
		cat > conftest.$ac_ext <<EOF
#line 6078 "configure"
#include "confdefs.h"
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
int main() {
socket(0,0,0)
; return 0; }
EOF
if { (eval echo configure:6090: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "if test -n \"$ac_lib\";then ac_cv_funclib_socket=$ac_lib; else ac_cv_funclib_socket=yes; fi";break
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
fi
rm -f conftest*
	done
	eval "ac_cv_funclib_socket=\${ac_cv_funclib_socket-no}"
	LIBS="$ac_save_LIBS"
fi

fi


eval "ac_res=\$ac_cv_funclib_socket"

: << END
@@@funcs="$funcs socket"@@@
@@@libs="$libs "" socket"@@@
END

# socket
eval "ac_tr_func=HAVE_`echo socket | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`"
eval "ac_tr_lib=HAVE_LIB`echo $ac_res | sed -e 's/-l//' | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`"
eval "LIB_socket=$ac_res"

case "$ac_res" in
	yes)
	eval "ac_cv_func_socket=yes"
	eval "LIB_socket="
	cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF

	echo "$ac_t""yes" 1>&6
	;;
	no)
	eval "ac_cv_func_socket=no"
	eval "LIB_socket="
	echo "$ac_t""no" 1>&6
	;;
	*)
	eval "ac_cv_func_socket=yes"
	eval "ac_cv_lib_`echo "$ac_res" | sed 's/-l//'`=yes"
	cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF

	cat >> confdefs.h <<EOF
#define $ac_tr_lib 1
EOF

	echo "$ac_t""yes, in $ac_res" 1>&6
	;;
esac


if test -n "$LIB_socket"; then
	LIBS="$LIB_socket $LIBS"
fi





echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
echo "configure:6158: checking for gethostbyname" >&5
if eval "test \"`echo '$''{'ac_cv_funclib_gethostbyname'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
if eval "test \"\$ac_cv_func_gethostbyname\" != yes" ; then
	ac_save_LIBS="$LIBS"
	for ac_lib in "" nsl; do
		if test -n "$ac_lib"; then 
			ac_lib="-l$ac_lib"
		else
			ac_lib=""
		fi
		LIBS=" $ac_lib  $ac_save_LIBS"
		cat > conftest.$ac_ext <<EOF
#line 6173 "configure"
#include "confdefs.h"
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
int main() {
gethostbyname("foo")
; return 0; }
EOF
if { (eval echo configure:6185: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "if test -n \"$ac_lib\";then ac_cv_funclib_gethostbyname=$ac_lib; else ac_cv_funclib_gethostbyname=yes; fi";break
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
fi
rm -f conftest*
	done
	eval "ac_cv_funclib_gethostbyname=\${ac_cv_funclib_gethostbyname-no}"
	LIBS="$ac_save_LIBS"
fi

fi


eval "ac_res=\$ac_cv_funclib_gethostbyname"

: << END
@@@funcs="$funcs gethostbyname"@@@
@@@libs="$libs "" nsl"@@@
END

# gethostbyname
eval "ac_tr_func=HAVE_`echo gethostbyname | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`"
eval "ac_tr_lib=HAVE_LIB`echo $ac_res | sed -e 's/-l//' | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`"
eval "LIB_gethostbyname=$ac_res"

case "$ac_res" in
	yes)
	eval "ac_cv_func_gethostbyname=yes"
	eval "LIB_gethostbyname="
	cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF

	echo "$ac_t""yes" 1>&6
	;;
	no)
	eval "ac_cv_func_gethostbyname=no"
	eval "LIB_gethostbyname="
	echo "$ac_t""no" 1>&6
	;;
	*)
	eval "ac_cv_func_gethostbyname=yes"
	eval "ac_cv_lib_`echo "$ac_res" | sed 's/-l//'`=yes"
	cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF

	cat >> confdefs.h <<EOF
#define $ac_tr_lib 1
EOF

	echo "$ac_t""yes, in $ac_res" 1>&6
	;;
esac


if test -n "$LIB_gethostbyname"; then
	LIBS="$LIB_gethostbyname $LIBS"
fi






echo $ac_n "checking for res_search""... $ac_c" 1>&6
echo "configure:6254: checking for res_search" >&5
if eval "test \"`echo '$''{'ac_cv_funclib_res_search'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
if eval "test \"\$ac_cv_func_res_search\" != yes" ; then
	ac_save_LIBS="$LIBS"
	for ac_lib in "" resolv; do
		if test -n "$ac_lib"; then 
			ac_lib="-l$ac_lib"
		else
			ac_lib=""
		fi
		LIBS=" $ac_lib  $ac_save_LIBS"
		cat > conftest.$ac_ext <<EOF
#line 6269 "configure"
#include "confdefs.h"

#include <stdio.h>
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
#ifdef HAVE_ARPA_NAMESER_H
#include <arpa/nameser.h>
#endif
#ifdef HAVE_RESOLV_H
#include <resolv.h>
#endif

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

fi


eval "ac_res=\$ac_cv_funclib_res_search"

: << END
@@@funcs="$funcs res_search"@@@
@@@libs="$libs "" resolv"@@@
END

# res_search
eval "ac_tr_func=HAVE_`echo res_search | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`"
eval "ac_tr_lib=HAVE_LIB`echo $ac_res | sed -e 's/-l//' | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`"
eval "LIB_res_search=$ac_res"

case "$ac_res" in
	yes)
	eval "ac_cv_func_res_search=yes"
	eval "LIB_res_search="
	cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF

	echo "$ac_t""yes" 1>&6
	;;
	no)
	eval "ac_cv_func_res_search=no"
	eval "LIB_res_search="
	echo "$ac_t""no" 1>&6
	;;
	*)
	eval "ac_cv_func_res_search=yes"
	eval "ac_cv_lib_`echo "$ac_res" | sed 's/-l//'`=yes"
	cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF

	cat >> confdefs.h <<EOF
#define $ac_tr_lib 1
EOF

	echo "$ac_t""yes, in $ac_res" 1>&6
	;;
esac


if test -n "$LIB_res_search"; then
	LIBS="$LIB_res_search $LIBS"
fi






echo $ac_n "checking for dn_expand""... $ac_c" 1>&6
echo "configure:6359: checking for dn_expand" >&5
if eval "test \"`echo '$''{'ac_cv_funclib_dn_expand'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
if eval "test \"\$ac_cv_func_dn_expand\" != yes" ; then
	ac_save_LIBS="$LIBS"
	for ac_lib in "" resolv; do
		if test -n "$ac_lib"; then 
			ac_lib="-l$ac_lib"
		else
			ac_lib=""
		fi
		LIBS=" $ac_lib  $ac_save_LIBS"
		cat > conftest.$ac_ext <<EOF
#line 6374 "configure"
#include "confdefs.h"

#include <stdio.h>
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
#ifdef HAVE_ARPA_NAMESER_H
#include <arpa/nameser.h>
#endif
#ifdef HAVE_RESOLV_H
#include <resolv.h>
#endif

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

fi


eval "ac_res=\$ac_cv_funclib_dn_expand"

: << END
@@@funcs="$funcs dn_expand"@@@
@@@libs="$libs "" resolv"@@@
END

# dn_expand
eval "ac_tr_func=HAVE_`echo dn_expand | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`"
eval "ac_tr_lib=HAVE_LIB`echo $ac_res | sed -e 's/-l//' | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`"
eval "LIB_dn_expand=$ac_res"

case "$ac_res" in
	yes)
	eval "ac_cv_func_dn_expand=yes"
	eval "LIB_dn_expand="
	cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF

	echo "$ac_t""yes" 1>&6
	;;
	no)
	eval "ac_cv_func_dn_expand=no"
	eval "LIB_dn_expand="
	echo "$ac_t""no" 1>&6
	;;
	*)
	eval "ac_cv_func_dn_expand=yes"
	eval "ac_cv_lib_`echo "$ac_res" | sed 's/-l//'`=yes"
	cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF

	cat >> confdefs.h <<EOF
#define $ac_tr_lib 1
EOF

	echo "$ac_t""yes, in $ac_res" 1>&6
	;;
esac


if test -n "$LIB_dn_expand"; then
	LIBS="$LIB_dn_expand $LIBS"
fi



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

#include <stdio.h>
#include <string.h>
int main()
{
	char foo[3];
	snprintf(foo, 2, "12");
	return strcmp(foo, "1");
}
EOF
if { (eval echo configure:6482: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  :
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_func_snprintf_working=no
fi
rm -fr conftest*
fi

fi

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

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

fi
if test "$ac_cv_func_snprintf_working" = yes; then
	
if test "$ac_cv_func_snprintf+set" != set -o "$ac_cv_func_snprintf" = yes; then
echo $ac_n "checking if snprintf needs a prototype""... $ac_c" 1>&6
echo "configure:6508: checking if snprintf needs a prototype" >&5
if eval "test \"`echo '$''{'ac_cv_func_snprintf_noproto'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 6513 "configure"
#include "confdefs.h"
#include <stdio.h>
int main() {
struct foo { int foo; } xx;
extern int snprintf (struct foo*);
snprintf(&xx);

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

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

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

fi

fi

fi


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

int main() {

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

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

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


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

int main() {

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

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

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


cat > conftest.$ac_ext <<EOF
#line 6662 "configure"
#include "confdefs.h"
#include <signal.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "sigaction" >/dev/null 2>&1; then
  rm -rf conftest*
  cat >> confdefs.h <<\EOF
#define HAVE_POSIX_SIGNALS 1
EOF

fi
rm -f conftest*


save_CPPFLAGS="${CPPFLAGS}"
if test "$KRB4_INC_DIR"; then
  CPPFLAGS="-I${KRB4_INC_DIR} $CPPFLAGS"
fi

for i in int8_t int16_t int32_t int64_t; do
        

cv=`echo "$i" | sed 'y%./+- %__p__%'`
echo $ac_n "checking for $i""... $ac_c" 1>&6
echo "configure:6687: checking for $i" >&5
if eval "test \"`echo '$''{'ac_cv_type_$cv'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 6692 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
#include <stdlib.h>
#include <stddef.h>
#endif

int main() {
$i foo;
; return 0; }
EOF
if { (eval echo configure:6704: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  eval "ac_cv_type_$cv=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_type_$cv=no"
fi
rm -f conftest*
fi
echo "$ac_t""`eval echo \\$ac_cv_type_$cv`" 1>&6
if test `eval echo \\$ac_cv_type_$cv` = yes; then
  ac_tr_hdr=HAVE_`echo $i | sed 'y%abcdefghijklmnopqrstuvwxyz./- %ABCDEFGHIJKLMNOPQRSTUVWXYZ____%'`

: << END
@@@funcs="$funcs $i"@@@
END

  cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF

fi

done
: << END
@@@funcs="$funcs int8_t int16_t int32_t int64_t"@@@
END


for i in int16 int32; do
        

cv=`echo "$i" | sed 'y%./+- %__p__%'`
echo $ac_n "checking for $i""... $ac_c" 1>&6
echo "configure:6740: checking for $i" >&5
if eval "test \"`echo '$''{'ac_cv_type_$cv'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 6745 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
#include <stdlib.h>
#include <stddef.h>
#endif

int main() {
$i foo;
; return 0; }
EOF
if { (eval echo configure:6757: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  eval "ac_cv_type_$cv=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_type_$cv=no"
fi
rm -f conftest*
fi
echo "$ac_t""`eval echo \\$ac_cv_type_$cv`" 1>&6
if test `eval echo \\$ac_cv_type_$cv` = yes; then
  ac_tr_hdr=HAVE_`echo $i | sed 'y%abcdefghijklmnopqrstuvwxyz./- %ABCDEFGHIJKLMNOPQRSTUVWXYZ____%'`

: << END
@@@funcs="$funcs $i"@@@
END

  cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF

fi

done
: << END
@@@funcs="$funcs int16 int32"@@@
END


for i in u_int8_t u_int16_t u_int32_t u_int64_t; do
        

cv=`echo "$i" | sed 'y%./+- %__p__%'`
echo $ac_n "checking for $i""... $ac_c" 1>&6
echo "configure:6793: checking for $i" >&5
if eval "test \"`echo '$''{'ac_cv_type_$cv'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 6798 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
#include <stdlib.h>
#include <stddef.h>
#endif

int main() {
$i foo;
; return 0; }
EOF
if { (eval echo configure:6810: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  eval "ac_cv_type_$cv=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_type_$cv=no"
fi
rm -f conftest*
fi
echo "$ac_t""`eval echo \\$ac_cv_type_$cv`" 1>&6
if test `eval echo \\$ac_cv_type_$cv` = yes; then
  ac_tr_hdr=HAVE_`echo $i | sed 'y%abcdefghijklmnopqrstuvwxyz./- %ABCDEFGHIJKLMNOPQRSTUVWXYZ____%'`

: << END
@@@funcs="$funcs $i"@@@
END

  cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF

fi

done
: << END
@@@funcs="$funcs u_int8_t u_int16_t u_int32_t u_int64_t"@@@
END


for i in u_int16 u_int32; do
        

cv=`echo "$i" | sed 'y%./+- %__p__%'`
echo $ac_n "checking for $i""... $ac_c" 1>&6
echo "configure:6846: checking for $i" >&5
if eval "test \"`echo '$''{'ac_cv_type_$cv'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 6851 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
#include <stdlib.h>
#include <stddef.h>
#endif

int main() {
$i foo;
; return 0; }
EOF
if { (eval echo configure:6863: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  eval "ac_cv_type_$cv=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_type_$cv=no"
fi
rm -f conftest*
fi
echo "$ac_t""`eval echo \\$ac_cv_type_$cv`" 1>&6
if test `eval echo \\$ac_cv_type_$cv` = yes; then
  ac_tr_hdr=HAVE_`echo $i | sed 'y%abcdefghijklmnopqrstuvwxyz./- %ABCDEFGHIJKLMNOPQRSTUVWXYZ____%'`

: << END
@@@funcs="$funcs $i"@@@
END

  cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF

fi

done
: << END
@@@funcs="$funcs u_int16 u_int32"@@@
END


for i in bool ssize_t; do
        

cv=`echo "$i" | sed 'y%./+- %__p__%'`
echo $ac_n "checking for $i""... $ac_c" 1>&6
echo "configure:6899: checking for $i" >&5
if eval "test \"`echo '$''{'ac_cv_type_$cv'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 6904 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
#include <stdlib.h>
#include <stddef.h>
#endif

int main() {
$i foo;
; return 0; }
EOF
if { (eval echo configure:6916: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  eval "ac_cv_type_$cv=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_type_$cv=no"
fi
rm -f conftest*
fi
echo "$ac_t""`eval echo \\$ac_cv_type_$cv`" 1>&6
if test `eval echo \\$ac_cv_type_$cv` = yes; then
  ac_tr_hdr=HAVE_`echo $i | sed 'y%abcdefghijklmnopqrstuvwxyz./- %ABCDEFGHIJKLMNOPQRSTUVWXYZ____%'`

: << END
@@@funcs="$funcs $i"@@@
END

  cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF

fi

done
: << END
@@@funcs="$funcs bool ssize_t"@@@
END


for i in register_t; do
        

cv=`echo "$i" | sed 'y%./+- %__p__%'`
echo $ac_n "checking for $i""... $ac_c" 1>&6
echo "configure:6952: checking for $i" >&5
if eval "test \"`echo '$''{'ac_cv_type_$cv'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 6957 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
#include <stdlib.h>
#include <stddef.h>
#endif

int main() {
$i foo;
; return 0; }
EOF
if { (eval echo configure:6969: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  eval "ac_cv_type_$cv=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_type_$cv=no"
fi
rm -f conftest*
fi
echo "$ac_t""`eval echo \\$ac_cv_type_$cv`" 1>&6
if test `eval echo \\$ac_cv_type_$cv` = yes; then
  ac_tr_hdr=HAVE_`echo $i | sed 'y%abcdefghijklmnopqrstuvwxyz./- %ABCDEFGHIJKLMNOPQRSTUVWXYZ____%'`

: << END
@@@funcs="$funcs $i"@@@
END

  cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF

fi

done
: << END
@@@funcs="$funcs register_t"@@@
END


for i in intptr_t; do
        

cv=`echo "$i" | sed 'y%./+- %__p__%'`
echo $ac_n "checking for $i""... $ac_c" 1>&6
echo "configure:7005: checking for $i" >&5
if eval "test \"`echo '$''{'ac_cv_type_$cv'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 7010 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
#include <stdlib.h>
#include <stddef.h>
#endif

int main() {
$i foo;
; return 0; }
EOF
if { (eval echo configure:7022: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  eval "ac_cv_type_$cv=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_type_$cv=no"
fi
rm -f conftest*
fi
echo "$ac_t""`eval echo \\$ac_cv_type_$cv`" 1>&6
if test `eval echo \\$ac_cv_type_$cv` = yes; then
  ac_tr_hdr=HAVE_`echo $i | sed 'y%abcdefghijklmnopqrstuvwxyz./- %ABCDEFGHIJKLMNOPQRSTUVWXYZ____%'`

: << END
@@@funcs="$funcs $i"@@@
END

  cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF

fi

done
: << END
@@@funcs="$funcs intptr_t"@@@
END


for i in off64_t; do
        

cv=`echo "$i" | sed 'y%./+- %__p__%'`
echo $ac_n "checking for $i""... $ac_c" 1>&6
echo "configure:7058: checking for $i" >&5
if eval "test \"`echo '$''{'ac_cv_type_$cv'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 7063 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
#include <stdlib.h>
#include <stddef.h>
#endif

int main() {
$i foo;
; return 0; }
EOF
if { (eval echo configure:7075: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  eval "ac_cv_type_$cv=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_type_$cv=no"
fi
rm -f conftest*
fi
echo "$ac_t""`eval echo \\$ac_cv_type_$cv`" 1>&6
if test `eval echo \\$ac_cv_type_$cv` = yes; then
  ac_tr_hdr=HAVE_`echo $i | sed 'y%abcdefghijklmnopqrstuvwxyz./- %ABCDEFGHIJKLMNOPQRSTUVWXYZ____%'`

: << END
@@@funcs="$funcs $i"@@@
END

  cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF

fi

done
: << END
@@@funcs="$funcs off64_t"@@@
END

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

CPPFLAGS="${save_CPPFLAGS}"

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

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

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



#
# Check if we have _res
#


echo $ac_n "checking for res""... $ac_c" 1>&6
echo "configure:7195: checking for res" >&5
if eval "test \"`echo '$''{'ac_cv_var_res'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
cat > conftest.$ac_ext <<EOF
#line 7201 "configure"
#include "confdefs.h"
extern int res;
int foo() { return res; }
int main() {
foo()
; return 0; }
EOF
if { (eval echo configure:7209: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  ac_cv_var_res=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_var_res=no
fi
rm -f conftest*

fi



echo "$ac_t""`eval echo \\$ac_cv_var_res`" 1>&6
if test `eval echo \\$ac_cv_var_res` = yes; then
	cat >> confdefs.h <<EOF
#define HAVE_RES 1
EOF

	
echo $ac_n "checking if res is properly declared""... $ac_c" 1>&6
echo "configure:7232: checking if res is properly declared" >&5
if eval "test \"`echo '$''{'ac_cv_var_res_declaration'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
cat > conftest.$ac_ext <<EOF
#line 7238 "configure"
#include "confdefs.h"
#include <resolv.h>
extern struct { int foo; } res;
int main() {
res.foo = 1;
; return 0; }
EOF
if { (eval echo configure:7246: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  eval "ac_cv_var_res_declaration=no"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_var_res_declaration=yes"
fi
rm -f conftest*

fi




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

fi


fi






echo $ac_n "checking for krb_afslog_uid""... $ac_c" 1>&6
echo "configure:7279: checking for krb_afslog_uid" >&5
if eval "test \"`echo '$''{'ac_cv_funclib_krb_afslog_uid'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
if eval "test \"\$ac_cv_func_krb_afslog_uid\" != yes" ; then
	ac_save_LIBS="$LIBS"
	for ac_lib in ""; do
		if test -n "$ac_lib"; then 
			ac_lib="-l$ac_lib"
		else
			ac_lib=""
		fi
		LIBS=" $ac_lib $KAFS_LIBS $KRB4_LIB_FLAGS $ac_save_LIBS"
		cat > conftest.$ac_ext <<EOF
#line 7294 "configure"
#include "confdefs.h"

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

fi


eval "ac_res=\$ac_cv_funclib_krb_afslog_uid"

: << END
@@@funcs="$funcs krb_afslog_uid"@@@
@@@libs="$libs """@@@
END

# krb_afslog_uid
eval "ac_tr_func=HAVE_`echo krb_afslog_uid | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`"
eval "ac_tr_lib=HAVE_LIB`echo $ac_res | sed -e 's/-l//' | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`"
eval "LIB_krb_afslog_uid=$ac_res"

case "$ac_res" in
	yes)
	eval "ac_cv_func_krb_afslog_uid=yes"
	eval "LIB_krb_afslog_uid="
	cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF

	echo "$ac_t""yes" 1>&6
	;;
	no)
	eval "ac_cv_func_krb_afslog_uid=no"
	eval "LIB_krb_afslog_uid="
	echo "$ac_t""no" 1>&6
	;;
	*)
	eval "ac_cv_func_krb_afslog_uid=yes"
	eval "ac_cv_lib_`echo "$ac_res" | sed 's/-l//'`=yes"
	cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF

	cat >> confdefs.h <<EOF
#define $ac_tr_lib 1
EOF

	echo "$ac_t""yes, in $ac_res" 1>&6
	;;
esac



#
# libroken
#





echo $ac_n "checking for hstrerror""... $ac_c" 1>&6
echo "configure:7370: checking for hstrerror" >&5
if eval "test \"`echo '$''{'ac_cv_funclib_hstrerror'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
if eval "test \"\$ac_cv_func_hstrerror\" != yes" ; then
	ac_save_LIBS="$LIBS"
	for ac_lib in "" resolv; do
		if test -n "$ac_lib"; then 
			ac_lib="-l$ac_lib"
		else
			ac_lib=""
		fi
		LIBS=" $ac_lib  $ac_save_LIBS"
		cat > conftest.$ac_ext <<EOF
#line 7385 "configure"
#include "confdefs.h"
#ifdef HAVE_NETDB_H
#include <netdb.h>
#endif
int main() {
hstrerror(17)
; return 0; }
EOF
if { (eval echo configure:7394: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "if test -n \"$ac_lib\";then ac_cv_funclib_hstrerror=$ac_lib; else ac_cv_funclib_hstrerror=yes; fi";break
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
fi
rm -f conftest*
	done
	eval "ac_cv_funclib_hstrerror=\${ac_cv_funclib_hstrerror-no}"
	LIBS="$ac_save_LIBS"
fi

fi


eval "ac_res=\$ac_cv_funclib_hstrerror"

: << END
@@@funcs="$funcs hstrerror"@@@
@@@libs="$libs "" resolv"@@@
END

# hstrerror
eval "ac_tr_func=HAVE_`echo hstrerror | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`"
eval "ac_tr_lib=HAVE_LIB`echo $ac_res | sed -e 's/-l//' | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`"
eval "LIB_hstrerror=$ac_res"

case "$ac_res" in
	yes)
	eval "ac_cv_func_hstrerror=yes"
	eval "LIB_hstrerror="
	cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF

	echo "$ac_t""yes" 1>&6
	;;
	no)
	eval "ac_cv_func_hstrerror=no"
	eval "LIB_hstrerror="
	echo "$ac_t""no" 1>&6
	;;
	*)
	eval "ac_cv_func_hstrerror=yes"
	eval "ac_cv_lib_`echo "$ac_res" | sed 's/-l//'`=yes"
	cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF

	cat >> confdefs.h <<EOF
#define $ac_tr_lib 1
EOF

	echo "$ac_t""yes, in $ac_res" 1>&6
	;;
esac


if test -n "$LIB_hstrerror"; then
	LIBS="$LIB_hstrerror $LIBS"
fi

if eval "test \"$ac_cv_func_hstrerror\" != yes"; then
LIBOBJS="$LIBOBJS hstrerror.o"
fi


if test "$ac_cv_func_hstrerror+set" != set -o "$ac_cv_func_hstrerror" = yes; then
echo $ac_n "checking if hstrerror needs a prototype""... $ac_c" 1>&6
echo "configure:7464: checking if hstrerror needs a prototype" >&5
if eval "test \"`echo '$''{'ac_cv_func_hstrerror_noproto'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 7469 "configure"
#include "confdefs.h"

#ifdef HAVE_NETDB_H
#include <netdb.h>
#endif
int main() {
struct foo { int foo; } xx;
extern int hstrerror (struct foo*);
hstrerror(&xx);

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

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

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

fi

fi


echo $ac_n "checking if hstrerror needs const""... $ac_c" 1>&6
echo "configure:7507: checking if hstrerror needs const" >&5
if eval "test \"`echo '$''{'ac_cv_func_hstrerror_const'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 7512 "configure"
#include "confdefs.h"
netdb.h
int main() {
const char *hstrerror(int);
; return 0; }
EOF
if { (eval echo configure:7519: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_func_hstrerror_const=no
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_func_hstrerror_const=yes
fi
rm -f conftest*
fi

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

fi


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

int main() {

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

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

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

else
  echo "$ac_t""no" 1>&6
LIBOBJS="$LIBOBJS ${ac_func}.o"
fi

: << END
@@@funcs="$funcs chown daemon err errx fchown flock getcwd getdtablesize getopt"@@@
END
done

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

int main() {

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

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

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

else
  echo "$ac_t""no" 1>&6
LIBOBJS="$LIBOBJS ${ac_func}.o"
fi

: << END
@@@funcs="$funcs getusershell inet_aton initgroups lstat memmove mkstemp"@@@
END
done

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

int main() {

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

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

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

else
  echo "$ac_t""no" 1>&6
LIBOBJS="$LIBOBJS ${ac_func}.o"
fi

: << END
@@@funcs="$funcs putenv rcmd readv recvmsg sendmsg setegid setenv seteuid"@@@
END
done

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

int main() {

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

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

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

else
  echo "$ac_t""no" 1>&6
LIBOBJS="$LIBOBJS ${ac_func}.o"
fi

: << END
@@@funcs="$funcs strcasecmp strdup strerror strftime strlcat strlcpy strlwr"@@@
END
done

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

int main() {

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

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

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

else
  echo "$ac_t""no" 1>&6
LIBOBJS="$LIBOBJS ${ac_func}.o"
fi

: << END
@@@funcs="$funcs strnlen strsep strsep_copy strptime strtok_r strupr unsetenv"@@@
END
done

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

int main() {

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

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

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

else
  echo "$ac_t""no" 1>&6
LIBOBJS="$LIBOBJS ${ac_func}.o"
fi

: << END
@@@funcs="$funcs verr verrx vsyslog vwarn vwarnx warn warnx writev"@@@
END
done


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

if test "$ac_cv_func_inet_aton+set" != set -o "$ac_cv_func_inet_aton" = yes; then
echo $ac_n "checking if inet_aton needs a prototype""... $ac_c" 1>&6
echo "configure:7911: checking if inet_aton needs a prototype" >&5
if eval "test \"`echo '$''{'ac_cv_func_inet_aton_noproto'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 7916 "configure"
#include "confdefs.h"

#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
#ifdef HAVE_ARPA_INET_H
#include <arpa/inet.h>
#endif
int main() {
struct foo { int foo; } xx;
extern int inet_aton (struct foo*);
inet_aton(&xx);

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

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

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

fi

fi

fi

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

int main() {

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

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

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

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

int main() {

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

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

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


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

int main() {

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

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

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


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

int main() {

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

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

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


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

int main() {

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

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

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



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

int main() {

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

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

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

if test "$ac_cv_func_getvfsbyname" = "yes"; then
echo $ac_n "checking for two argument getvfsbyname""... $ac_c" 1>&6
echo "configure:8300: checking for two argument getvfsbyname" >&5
if eval "test \"`echo '$''{'ac_cv_func_getvfsbyname_two_arguments'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 8305 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/param.h>
#include <sys/mount.h>
int main() {
struct vfsconf vfc;
int foo = getvfsbyname("arla", &vfc);

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

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

fi
fi



echo $ac_n "checking for optreset""... $ac_c" 1>&6
echo "configure:8340: checking for optreset" >&5
if eval "test \"`echo '$''{'ac_cv_var_optreset'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
cat > conftest.$ac_ext <<EOF
#line 8346 "configure"
#include "confdefs.h"
extern int optreset;
int foo() { return optreset; }
int main() {
foo()
; return 0; }
EOF
if { (eval echo configure:8354: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  ac_cv_var_optreset=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_var_optreset=no
fi
rm -f conftest*

fi



echo "$ac_t""`eval echo \\$ac_cv_var_optreset`" 1>&6
if test `eval echo \\$ac_cv_var_optreset` = yes; then
	cat >> confdefs.h <<EOF
#define HAVE_OPTRESET 1
EOF

	
echo $ac_n "checking if optreset is properly declared""... $ac_c" 1>&6
echo "configure:8377: checking if optreset is properly declared" >&5
if eval "test \"`echo '$''{'ac_cv_var_optreset_declaration'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
cat > conftest.$ac_ext <<EOF
#line 8383 "configure"
#include "confdefs.h"
#include <stdlib.h>
extern struct { int foo; } optreset;
int main() {
optreset.foo = 1;
; return 0; }
EOF
if { (eval echo configure:8391: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  eval "ac_cv_var_optreset_declaration=no"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_var_optreset_declaration=yes"
fi
rm -f conftest*

fi




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

fi


fi

if test "$ac_cv_var_optreset" = yes; then
	
echo $ac_n "checking if optreset is properly declared""... $ac_c" 1>&6
echo "configure:8421: checking if optreset is properly declared" >&5
if eval "test \"`echo '$''{'ac_cv_var_optreset_declaration'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
cat > conftest.$ac_ext <<EOF
#line 8427 "configure"
#include "confdefs.h"
#include <stdlib.h>
extern struct { int foo; } optreset;
int main() {
optreset.foo = 1;
; return 0; }
EOF
if { (eval echo configure:8435: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  eval "ac_cv_var_optreset_declaration=no"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_var_optreset_declaration=yes"
fi
rm -f conftest*

fi




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

fi

fi








echo $ac_n "checking for kvm_open""... $ac_c" 1>&6
echo "configure:8469: checking for kvm_open" >&5
if eval "test \"`echo '$''{'ac_cv_funclib_kvm_open'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
if eval "test \"\$ac_cv_func_kvm_open\" != yes" ; then
	ac_save_LIBS="$LIBS"
	for ac_lib in "" kvm; do
		if test -n "$ac_lib"; then 
			ac_lib="-l$ac_lib"
		else
			ac_lib=""
		fi
		LIBS=" $ac_lib  $ac_save_LIBS"
		cat > conftest.$ac_ext <<EOF
#line 8484 "configure"
#include "confdefs.h"

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

fi


eval "ac_res=\$ac_cv_funclib_kvm_open"

: << END
@@@funcs="$funcs kvm_open"@@@
@@@libs="$libs "" kvm"@@@
END

# kvm_open
eval "ac_tr_func=HAVE_`echo kvm_open | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`"
eval "ac_tr_lib=HAVE_LIB`echo $ac_res | sed -e 's/-l//' | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`"
eval "LIB_kvm_open=$ac_res"

case "$ac_res" in
	yes)
	eval "ac_cv_func_kvm_open=yes"
	eval "LIB_kvm_open="
	cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF

	echo "$ac_t""yes" 1>&6
	;;
	no)
	eval "ac_cv_func_kvm_open=no"
	eval "LIB_kvm_open="
	echo "$ac_t""no" 1>&6
	;;
	*)
	eval "ac_cv_func_kvm_open=yes"
	eval "ac_cv_lib_`echo "$ac_res" | sed 's/-l//'`=yes"
	cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF

	cat >> confdefs.h <<EOF
#define $ac_tr_lib 1
EOF

	echo "$ac_t""yes, in $ac_res" 1>&6
	;;
esac


if test -n "$LIB_kvm_open"; then
	LIBS="$LIB_kvm_open $LIBS"
fi





echo $ac_n "checking for kvm_nlist""... $ac_c" 1>&6
echo "configure:8559: checking for kvm_nlist" >&5
if eval "test \"`echo '$''{'ac_cv_funclib_kvm_nlist'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
if eval "test \"\$ac_cv_func_kvm_nlist\" != yes" ; then
	ac_save_LIBS="$LIBS"
	for ac_lib in "" kvm; do
		if test -n "$ac_lib"; then 
			ac_lib="-l$ac_lib"
		else
			ac_lib=""
		fi
		LIBS=" $ac_lib  $ac_save_LIBS"
		cat > conftest.$ac_ext <<EOF
#line 8574 "configure"
#include "confdefs.h"

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

fi


eval "ac_res=\$ac_cv_funclib_kvm_nlist"

: << END
@@@funcs="$funcs kvm_nlist"@@@
@@@libs="$libs "" kvm"@@@
END

# kvm_nlist
eval "ac_tr_func=HAVE_`echo kvm_nlist | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`"
eval "ac_tr_lib=HAVE_LIB`echo $ac_res | sed -e 's/-l//' | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`"
eval "LIB_kvm_nlist=$ac_res"

case "$ac_res" in
	yes)
	eval "ac_cv_func_kvm_nlist=yes"
	eval "LIB_kvm_nlist="
	cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF

	echo "$ac_t""yes" 1>&6
	;;
	no)
	eval "ac_cv_func_kvm_nlist=no"
	eval "LIB_kvm_nlist="
	echo "$ac_t""no" 1>&6
	;;
	*)
	eval "ac_cv_func_kvm_nlist=yes"
	eval "ac_cv_lib_`echo "$ac_res" | sed 's/-l//'`=yes"
	cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF

	cat >> confdefs.h <<EOF
#define $ac_tr_lib 1
EOF

	echo "$ac_t""yes, in $ac_res" 1>&6
	;;
esac


if test -n "$LIB_kvm_nlist"; then
	LIBS="$LIB_kvm_nlist $LIBS"
fi

#AC_MMAP_TIME($with_mmap_time)



if test "$ac_cv_func_strtok_r+set" != set -o "$ac_cv_func_strtok_r" = yes; then
echo $ac_n "checking if strtok_r needs a prototype""... $ac_c" 1>&6
echo "configure:8650: checking if strtok_r needs a prototype" >&5
if eval "test \"`echo '$''{'ac_cv_func_strtok_r_noproto'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 8655 "configure"
#include "confdefs.h"

#include <string.h>

int main() {
struct foo { int foo; } xx;
extern int strtok_r (struct foo*);
strtok_r(&xx);

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

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

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

fi

fi



if test "$ac_cv_func_select+set" != set -o "$ac_cv_func_select" = yes; then
echo $ac_n "checking if select needs a prototype""... $ac_c" 1>&6
echo "configure:8694: checking if select needs a prototype" >&5
if eval "test \"`echo '$''{'ac_cv_func_select_noproto'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 8699 "configure"
#include "confdefs.h"

#include <sys/types.h> 
#include <sys/time.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif

int main() {
struct foo { int foo; } xx;
extern int select (struct foo*);
select(&xx);

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

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

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

fi

fi



echo $ac_n "checking if we can include both dirent.h and sys/dir.h""... $ac_c" 1>&6
echo "configure:8741: checking if we can include both dirent.h and sys/dir.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_dirent_and_sys_dir'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 8746 "configure"
#include "confdefs.h"

#include <sys/types.h>
#include <dirent.h>
#include <sys/dir.h>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:8755: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  ac_cv_header_dirent_and_sys_dir=yes
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_header_dirent_and_sys_dir=no
fi
rm -f conftest*
fi

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

fi




echo $ac_n "checking for d_type in struct dirent""... $ac_c" 1>&6
echo "configure:8782: checking for d_type in struct dirent" >&5
if eval "test \"`echo '$''{'ac_cv_type_struct_dirent_d_type'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
cat > conftest.$ac_ext <<EOF
#line 8788 "configure"
#include "confdefs.h"
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#include <dirent.h>

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

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

	
fi






echo $ac_n "checking for sa_len in struct sockaddr""... $ac_c" 1>&6
echo "configure:8827: checking for sa_len in struct sockaddr" >&5
if eval "test \"`echo '$''{'ac_cv_type_struct_sockaddr_sa_len'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
cat > conftest.$ac_ext <<EOF
#line 8833 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/socket.h>
int main() {
struct sockaddr x; x.sa_len;
; return 0; }
EOF
if { (eval echo configure:8841: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_type_struct_sockaddr_sa_len=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_type_struct_sockaddr_sa_len=no
fi
rm -f conftest*
fi

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

	
fi





echo $ac_n "checking for h_errno""... $ac_c" 1>&6
echo "configure:8868: checking for h_errno" >&5
if eval "test \"`echo '$''{'ac_cv_var_h_errno'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
cat > conftest.$ac_ext <<EOF
#line 8874 "configure"
#include "confdefs.h"
extern int h_errno;
int foo() { return h_errno; }
int main() {
foo()
; return 0; }
EOF
if { (eval echo configure:8882: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  ac_cv_var_h_errno=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_var_h_errno=no
fi
rm -f conftest*

fi



echo "$ac_t""`eval echo \\$ac_cv_var_h_errno`" 1>&6
if test `eval echo \\$ac_cv_var_h_errno` = yes; then
	cat >> confdefs.h <<EOF
#define HAVE_H_ERRNO 1
EOF

	
echo $ac_n "checking if h_errno is properly declared""... $ac_c" 1>&6
echo "configure:8905: checking if h_errno is properly declared" >&5
if eval "test \"`echo '$''{'ac_cv_var_h_errno_declaration'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
cat > conftest.$ac_ext <<EOF
#line 8911 "configure"
#include "confdefs.h"
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_NETDB_H
#include <netdb.h>
#endif
extern struct { int foo; } h_errno;
int main() {
h_errno.foo = 1;
; return 0; }
EOF
if { (eval echo configure:8924: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  eval "ac_cv_var_h_errno_declaration=no"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_var_h_errno_declaration=yes"
fi
rm -f conftest*

fi




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

fi


fi




echo $ac_n "checking for h_errlist""... $ac_c" 1>&6
echo "configure:8955: checking for h_errlist" >&5
if eval "test \"`echo '$''{'ac_cv_var_h_errlist'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
cat > conftest.$ac_ext <<EOF
#line 8961 "configure"
#include "confdefs.h"
extern int h_errlist;
int foo() { return h_errlist; }
int main() {
foo()
; return 0; }
EOF
if { (eval echo configure:8969: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  ac_cv_var_h_errlist=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_var_h_errlist=no
fi
rm -f conftest*

fi



echo "$ac_t""`eval echo \\$ac_cv_var_h_errlist`" 1>&6
if test `eval echo \\$ac_cv_var_h_errlist` = yes; then
	cat >> confdefs.h <<EOF
#define HAVE_H_ERRLIST 1
EOF

	
echo $ac_n "checking if h_errlist is properly declared""... $ac_c" 1>&6
echo "configure:8992: checking if h_errlist is properly declared" >&5
if eval "test \"`echo '$''{'ac_cv_var_h_errlist_declaration'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
cat > conftest.$ac_ext <<EOF
#line 8998 "configure"
#include "confdefs.h"
#ifdef HAVE_NETDB_H
#include <netdb.h>
#endif
extern struct { int foo; } h_errlist;
int main() {
h_errlist.foo = 1;
; return 0; }
EOF
if { (eval echo configure:9008: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  eval "ac_cv_var_h_errlist_declaration=no"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_var_h_errlist_declaration=yes"
fi
rm -f conftest*

fi




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

fi


fi




echo $ac_n "checking for h_nerr""... $ac_c" 1>&6
echo "configure:9039: checking for h_nerr" >&5
if eval "test \"`echo '$''{'ac_cv_var_h_nerr'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
cat > conftest.$ac_ext <<EOF
#line 9045 "configure"
#include "confdefs.h"
extern int h_nerr;
int foo() { return h_nerr; }
int main() {
foo()
; return 0; }
EOF
if { (eval echo configure:9053: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  ac_cv_var_h_nerr=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_var_h_nerr=no
fi
rm -f conftest*

fi



echo "$ac_t""`eval echo \\$ac_cv_var_h_nerr`" 1>&6
if test `eval echo \\$ac_cv_var_h_nerr` = yes; then
	cat >> confdefs.h <<EOF
#define HAVE_H_NERR 1
EOF

	
echo $ac_n "checking if h_nerr is properly declared""... $ac_c" 1>&6
echo "configure:9076: checking if h_nerr is properly declared" >&5
if eval "test \"`echo '$''{'ac_cv_var_h_nerr_declaration'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
cat > conftest.$ac_ext <<EOF
#line 9082 "configure"
#include "confdefs.h"
#ifdef HAVE_NETDB_H
#include <netdb.h>
#endif
extern struct { int foo; } h_nerr;
int main() {
h_nerr.foo = 1;
; return 0; }
EOF
if { (eval echo configure:9092: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  eval "ac_cv_var_h_nerr_declaration=no"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_var_h_nerr_declaration=yes"
fi
rm -f conftest*

fi




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

fi


fi




case "$target_os" in
solaris*)
  echo $ac_n "checking if as supports .register""... $ac_c" 1>&6
echo "configure:9125: checking if as supports .register" >&5
if eval "test \"`echo '$''{'ac_cv_prog_as_register'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
  cat > conftest.s <<EOF
	.register	%g2, #scratch
	.register	%g3, #scratch
	.register	%g6, #scratch
	.register	%g7, #scratch
EOF
  if $AS conftest.s >/dev/null 2>&1; then
    ac_cv_prog_as_register=yes
  else
    ac_cv_prog_as_register=no
  fi
  rm -f conftest.s a.out

fi

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

  fi
esac



if test "$XFS_SUBDIR" = "bsd"; then


echo $ac_n "checking for ELF object format""... $ac_c" 1>&6
echo "configure:9160: checking for ELF object format" >&5
if eval "test \"`echo '$''{'ac_cv_sys_elf_object_format'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
ac_cv_sys_elf_object_format=no
echo 'int foo;' > conftest.$ac_ext
if { (eval echo configure:9167: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
	case `file conftest.o 2> /dev/null` in
	*ELF*)	ac_cv_sys_elf_object_format=yes ;;
	esac
fi
rm -f conftest*
fi

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

if test "$ac_kernel_ld" = ""; then
if test "$ac_cv_sys_elf_object_format" = yes; then
ac_kernel_ld='${LD-ld} -o conftest $LDFLAGS -R $KERNEL conftest.o -e _foo 1>&5'
else
ac_kernel_ld='${LD-ld} -o conftest $LDFLAGS -A $KERNEL conftest.o -e _foo 1>&5'
fi
fi

for ac_func in \
cdevsw_add					\
debuglockmgr					\
lockmgr						\
make_dev					\
vop_revoke					\
genfs_revoke					\
vfs_opv_init					\
vfs_opv_init_default				\
vfs_opv_init_explicit				\
vfs_add_vnodeops				\
vfs_attach					\
vfs_register					\
vfs_getvfs					\
vgonel						\
zfreei						\
vfs_cache_lookup				\
vnode_pager_generic_putpages			\
vnode_pager_generic_getpages			\
vnode_pager_setsize				\
devtoname					\
udev2dev					\
snprintf					\
nosys						\
sys_nosys					\
sys_lkmnosys					\

do
echo $ac_n "checking for $ac_func in kernel""... $ac_c" 1>&6
echo "configure:9214: checking for $ac_func in kernel" >&5
if eval "test \"`echo '$''{'ac_cv_kernel_func_$ac_func'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
if test "$target_os" = "macos10.0"; then
  if nm $KERNEL | egrep "\\<_?$ac_func\\>" >/dev/null 2>&1; then
    eval "ac_cv_kernel_func_$ac_func=yes"
  else
    eval "ac_cv_kernel_func_$ac_func=no"
  fi
else
cat > conftest.$ac_ext <<EOF
#line 9227 "configure"
#include "confdefs.h"

int _foo() {
return foo();
}
int foo() {
$ac_func();
return 0; }
EOF
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $test_KERNEL_CFLAGS $KERNEL_CPPFLAGS"
if { (eval echo configure:__oline__: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && { (eval echo configure:9239: \"$ac_kernel_ld\") 1>&5; (eval $ac_kernel_ld) 2>&5; } && test -s conftest; then
  eval "ac_cv_kernel_func_$ac_func=yes"
else
  eval "ac_cv_kernel_func_$ac_func=no"
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
fi
CFLAGS="$save_CFLAGS"
rm -f conftest*
fi
fi

eval "ac_tr_var=HAVE_KERNEL_`echo $ac_func | tr '[a-z]' '[A-Z]'`"

echo "$ac_t""`eval echo \\${ac_cv_kernel_func_$ac_func}`" 1>&6
if test `eval echo \\${ac_cv_kernel_func_$ac_func}` = yes; then
  cat >> confdefs.h <<EOF
#define $ac_tr_var 1
EOF

fi

done

: << END
@@@funcs="$funcs \
kernel_cdevsw_add					\
kernel_debuglockmgr					\
kernel_lockmgr						\
kernel_make_dev					\
kernel_vop_revoke					\
kernel_genfs_revoke					\
kernel_vfs_opv_init					\
kernel_vfs_opv_init_default				\
kernel_vfs_opv_init_explicit				\
kernel_vfs_add_vnodeops				\
kernel_vfs_attach					\
kernel_vfs_register					\
kernel_vfs_getvfs					\
kernel_vgonel						\
kernel_zfreei						\
kernel_vfs_cache_lookup				\
kernel_vnode_pager_generic_putpages			\
kernel_vnode_pager_generic_getpages			\
kernel_vnode_pager_setsize				\
kernel_devtoname					\
kernel_udev2dev					\
kernel_snprintf					\
kernel_nosys						\
kernel_sys_nosys					\
kernel_sys_lkmnosys					\
"@@@
END

echo $ac_n "checking for memcpy in kernel""... $ac_c" 1>&6
echo "configure:9294: checking for memcpy in kernel" >&5
if eval "test \"`echo '$''{'ac_cv_kernel_func_memcpy'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
if test "$target_os" = "macos10.0"; then
  if nm $KERNEL | egrep "\\<_?memcpy\\>" >/dev/null 2>&1; then
    eval "ac_cv_kernel_func_memcpy=yes"
  else
    eval "ac_cv_kernel_func_memcpy=no"
  fi
else
cat > conftest.$ac_ext <<EOF
#line 9307 "configure"
#include "confdefs.h"

int _foo() {
return foo();
}
int foo() {
memcpy(0,0,0);
return 0; }
EOF
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $test_KERNEL_CFLAGS $KERNEL_CPPFLAGS"
if { (eval echo configure:__oline__: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && { (eval echo configure:9319: \"$ac_kernel_ld\") 1>&5; (eval $ac_kernel_ld) 2>&5; } && test -s conftest; then
  eval "ac_cv_kernel_func_memcpy=yes"
else
  eval "ac_cv_kernel_func_memcpy=no"
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
fi
CFLAGS="$save_CFLAGS"
rm -f conftest*
fi
fi

eval "ac_tr_var=HAVE_KERNEL_`echo memcpy | tr 'a-z' 'A-Z'`"

echo "$ac_t""`eval echo \\${ac_cv_kernel_func_memcpy}`" 1>&6
if test `eval echo \\${ac_cv_kernel_func_memcpy}` = yes; then
  cat >> confdefs.h <<EOF
#define $ac_tr_var 1
EOF

fi

: << END
@@@funcs="$funcs kernel_memcpy"@@@
END



echo $ac_n "checking if vnode_if.h needs to be built""... $ac_c" 1>&6
echo "configure:9348: checking if vnode_if.h needs to be built" >&5
rm -f vnode_if.[ch]

save_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $KERNEL_CPPFLAGS"
cat > conftest.$ac_ext <<EOF
#line 9354 "configure"
#include "confdefs.h"

#include <sys/types.h>
#include <sys/param.h>
#include <sys/stat.h>
#include <sys/vnode.h>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:9364: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  ac_cv_header_vnode_if_h=no
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_header_vnode_if_h=yes
fi
rm -f conftest*
CPPFLAGS="$save_CPPFLAGS"

if test "$ac_cv_header_vnode_if_h" = "yes"; then
test -d ../sys || mkdir ../sys 
if test -f $SYS/kern/vnode_if.pl; then
  perl $SYS/kern/vnode_if.pl -h $SYS/kern/vnode_if.src
elif test -f $SYS/kern/vnode_if.sh; then
  /bin/sh $SYS/kern/vnode_if.sh $SYS/kern/vnode_if.src
else
  { echo "configure: error: unable to find any vnode_if script" 1>&2; exit 1; }
fi
if test -f vnode_if.h; then
  :
else
  { echo "configure: error: failed to create vnode_if.h" 1>&2; exit 1; }
fi

save_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $KERNEL_CPPFLAGS"
cat > conftest.$ac_ext <<EOF
#line 9397 "configure"
#include "confdefs.h"

#include <sys/types.h>
#include <sys/param.h>
#include <sys/stat.h>
#include <sys/vnode.h>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:9407: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  ac_cv_header_vnode_if_h=yes; VNODE_IF_H=vnode_if.h
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  { echo "configure: error: tried creating vnode_if.h but still could not include vnode.h" 1>&2; exit 1; }
fi
rm -f conftest*
CPPFLAGS="$save_CPPFLAGS"

fi
echo "$ac_t""$ac_cv_header_vnode_if_h" 1>&6


echo $ac_n "checking for doforce in kernel""... $ac_c" 1>&6
echo "configure:9427: checking for doforce in kernel" >&5
if eval "test \"`echo '$''{'ac_cv_kernel_var_doforce'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
if test "$target_os" = "macos10.0"; then
  if nm $KERNEL | egrep "\\<_?doforce\\>" >/dev/null 2>&1; then
    eval "ac_cv_kernel_var_doforce=yes"
  else
    eval "ac_cv_kernel_var_doforce=no"
  fi
else
cat > conftest.$ac_ext <<EOF
#line 9440 "configure"
#include "confdefs.h"

int _foo() {
return foo();
}
int foo() {
extern int doforce; return doforce;
return 0; }
EOF
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $test_KERNEL_CFLAGS $KERNEL_CPPFLAGS"
if { (eval echo configure:__oline__: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && { (eval echo configure:9452: \"$ac_kernel_ld\") 1>&5; (eval $ac_kernel_ld) 2>&5; } && test -s conftest; then
  eval "ac_cv_kernel_var_doforce=yes"
else
  eval "ac_cv_kernel_var_doforce=no"
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
fi
CFLAGS="$save_CFLAGS"
rm -f conftest*
fi
fi

eval "ac_tr_var=HAVE_KERNEL_`echo doforce | tr 'a-z' 'A-Z'`"

echo "$ac_t""`eval echo \\${ac_cv_kernel_var_doforce}`" 1>&6
if test `eval echo \\${ac_cv_kernel_var_doforce}` = yes; then
  cat >> confdefs.h <<EOF
#define $ac_tr_var 1
EOF

fi

: << END
@@@funcs="$funcs kernel_doforce"@@@
END

echo $ac_n "checking for aout_sysent in kernel""... $ac_c" 1>&6
echo "configure:9479: checking for aout_sysent in kernel" >&5
if eval "test \"`echo '$''{'ac_cv_kernel_var_aout_sysent'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
if test "$target_os" = "macos10.0"; then
  if nm $KERNEL | egrep "\\<_?aout_sysent\\>" >/dev/null 2>&1; then
    eval "ac_cv_kernel_var_aout_sysent=yes"
  else
    eval "ac_cv_kernel_var_aout_sysent=no"
  fi
else
cat > conftest.$ac_ext <<EOF
#line 9492 "configure"
#include "confdefs.h"

int _foo() {
return foo();
}
int foo() {
extern struct sysent* aout_sysent; return aout_sysent;
return 0; }
EOF
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $test_KERNEL_CFLAGS $KERNEL_CPPFLAGS"
if { (eval echo configure:__oline__: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && { (eval echo configure:9504: \"$ac_kernel_ld\") 1>&5; (eval $ac_kernel_ld) 2>&5; } && test -s conftest; then
  eval "ac_cv_kernel_var_aout_sysent=yes"
else
  eval "ac_cv_kernel_var_aout_sysent=no"
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
fi
CFLAGS="$save_CFLAGS"
rm -f conftest*
fi
fi

eval "ac_tr_var=HAVE_KERNEL_`echo aout_sysent | tr 'a-z' 'A-Z'`"

echo "$ac_t""`eval echo \\${ac_cv_kernel_var_aout_sysent}`" 1>&6
if test `eval echo \\${ac_cv_kernel_var_aout_sysent}` = yes; then
  cat >> confdefs.h <<EOF
#define $ac_tr_var 1
EOF

fi

: << END
@@@funcs="$funcs kernel_aout_sysent"@@@
END



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

fi

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

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

fi


for ac_func in vfs_object_create
do
echo $ac_n "checking for $ac_func in kernel""... $ac_c" 1>&6
echo "configure:9567: checking for $ac_func in kernel" >&5
if eval "test \"`echo '$''{'ac_cv_kernel_func_$ac_func'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
if test "$target_os" = "macos10.0"; then
  if nm $KERNEL | egrep "\\<_?$ac_func\\>" >/dev/null 2>&1; then
    eval "ac_cv_kernel_func_$ac_func=yes"
  else
    eval "ac_cv_kernel_func_$ac_func=no"
  fi
else
cat > conftest.$ac_ext <<EOF
#line 9580 "configure"
#include "confdefs.h"

int _foo() {
return foo();
}
int foo() {
$ac_func();
return 0; }
EOF
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $test_KERNEL_CFLAGS $KERNEL_CPPFLAGS"
if { (eval echo configure:__oline__: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && { (eval echo configure:9592: \"$ac_kernel_ld\") 1>&5; (eval $ac_kernel_ld) 2>&5; } && test -s conftest; then
  eval "ac_cv_kernel_func_$ac_func=yes"
else
  eval "ac_cv_kernel_func_$ac_func=no"
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
fi
CFLAGS="$save_CFLAGS"
rm -f conftest*
fi
fi

eval "ac_tr_var=HAVE_KERNEL_`echo $ac_func | tr '[a-z]' '[A-Z]'`"

echo "$ac_t""`eval echo \\${ac_cv_kernel_func_$ac_func}`" 1>&6
if test `eval echo \\${ac_cv_kernel_func_$ac_func}` = yes; then
  cat >> confdefs.h <<EOF
#define $ac_tr_var 1
EOF

fi

done

: << END
@@@funcs="$funcs kernel_vfs_object_create"@@@
END

if test "$ac_cv_kernel_func_vfs_object_create" = "yes"; then
echo $ac_n "checking if vfs_object_create takes four arguments""... $ac_c" 1>&6
echo "configure:9622: checking if vfs_object_create takes four arguments" >&5
if eval "test \"`echo '$''{'ac_cv_func_vfs_object_create_four_args'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $test_KERNEL_CFLAGS $KERNEL_CPPFLAGS"
cat > conftest.$ac_ext <<EOF
#line 9630 "configure"
#include "confdefs.h"

#include <sys/types.h>
#include <sys/param.h>
#include <sys/vnode.h>

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

fi

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

fi
fi


echo $ac_n "checking if VOP_LOCK takes one argument""... $ac_c" 1>&6
echo "configure:9667: checking if VOP_LOCK takes one argument" >&5
if eval "test \"`echo '$''{'ac_cv_func_vop_lock_one_arg'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $test_KERNEL_CFLAGS $KERNEL_CPPFLAGS"
cat > conftest.$ac_ext <<EOF
#line 9675 "configure"
#include "confdefs.h"

#ifdef HAVE_SYS_CDEFS_H
#include <sys/cdefs.h>
#endif
#include <sys/param.h>
#include <sys/types.h>
#include <sys/time.h>
#include <sys/uio.h>
#include <sys/vnode.h>

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

fi

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

fi

echo $ac_n "checking if VOP_LOCK takes two arguments""... $ac_c" 1>&6
echo "configure:9714: checking if VOP_LOCK takes two arguments" >&5
if eval "test \"`echo '$''{'ac_cv_func_vop_lock_two_args'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $test_KERNEL_CFLAGS $KERNEL_CPPFLAGS"
cat > conftest.$ac_ext <<EOF
#line 9722 "configure"
#include "confdefs.h"

#ifdef HAVE_SYS_CDEFS_H
#include <sys/cdefs.h>
#endif
#include <sys/param.h>
#include <sys/types.h>
#include <sys/time.h>
#include <sys/uio.h>
#include <sys/vnode.h>

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

fi

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

fi

echo $ac_n "checking if VOP_LOCK takes three arguments""... $ac_c" 1>&6
echo "configure:9761: checking if VOP_LOCK takes three arguments" >&5
if eval "test \"`echo '$''{'ac_cv_func_vop_lock_three_args'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $test_KERNEL_CFLAGS $KERNEL_CPPFLAGS"
cat > conftest.$ac_ext <<EOF
#line 9769 "configure"
#include "confdefs.h"

#ifdef HAVE_SYS_CDEFS_H
#include <sys/cdefs.h>
#endif
#include <sys/param.h>
#include <sys/types.h>
#include <sys/time.h>
#include <sys/uio.h>
#include <sys/vnode.h>

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

fi

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

fi


echo $ac_n "checking if vfs_busy takes three arguments""... $ac_c" 1>&6
echo "configure:9809: checking if vfs_busy takes three arguments" >&5
if eval "test \"`echo '$''{'ac_cv_func_vfs_busy_three_args'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $test_KERNEL_CFLAGS $KERNEL_CPPFLAGS"
cat > conftest.$ac_ext <<EOF
#line 9817 "configure"
#include "confdefs.h"

#ifdef HAVE_SYS_CDEFS_H
#include <sys/cdefs.h>
#endif
#include <sys/types.h>
#include <sys/param.h>
#include <sys/ucred.h>
#ifdef HAVE_SYS_MODULE_H
#include <sys/module.h>
#endif
#include <sys/mount.h>
int main() {
vfs_busy(0, 0, 0)
; return 0; }
EOF
if { (eval echo configure:9834: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_func_vfs_busy_three_args=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_func_vfs_busy_three_args=no
fi
rm -f conftest*
CFLAGS="$save_CFLAGS"

fi

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

fi

echo $ac_n "checking if vfs_busy takes four arguments""... $ac_c" 1>&6
echo "configure:9857: checking if vfs_busy takes four arguments" >&5
if eval "test \"`echo '$''{'ac_cv_func_vfs_busy_four_args'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $test_KERNEL_CFLAGS $KERNEL_CPPFLAGS"
cat > conftest.$ac_ext <<EOF
#line 9865 "configure"
#include "confdefs.h"

#ifdef HAVE_SYS_CDEFS_H
#include <sys/cdefs.h>
#endif
#include <sys/types.h>
#include <sys/param.h>
#include <sys/ucred.h>
#ifdef HAVE_SYS_MODULE_H
#include <sys/module.h>
#endif
#include <sys/mount.h>
int main() {
vfs_busy(0, 0, 0, 0)
; return 0; }
EOF
if { (eval echo configure:9882: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_func_vfs_busy_four_args=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_func_vfs_busy_four_args=no
fi
rm -f conftest*
CFLAGS="$save_CFLAGS"

fi

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

fi


echo $ac_n "checking if vget takes one argument""... $ac_c" 1>&6
echo "configure:9906: checking if vget takes one argument" >&5
if eval "test \"`echo '$''{'ac_cv_func_vget_one_args'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $test_KERNEL_CFLAGS $KERNEL_CPPFLAGS"
cat > conftest.$ac_ext <<EOF
#line 9914 "configure"
#include "confdefs.h"

#ifdef HAVE_SYS_CDEFS_H
#include <sys/cdefs.h>
#endif
#if defined(__osf__) && defined(__GNUC__)
#define asm __foo_asm
#endif
#include <sys/types.h>
#include <sys/param.h>
#include <sys/time.h>
#include <sys/uio.h>
#include <sys/vnode.h>

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

fi

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

fi

echo $ac_n "checking if vget takes two arguments""... $ac_c" 1>&6
echo "configure:9956: checking if vget takes two arguments" >&5
if eval "test \"`echo '$''{'ac_cv_func_vget_two_args'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $test_KERNEL_CFLAGS $KERNEL_CPPFLAGS"
cat > conftest.$ac_ext <<EOF
#line 9964 "configure"
#include "confdefs.h"

#ifdef HAVE_SYS_CDEFS_H
#include <sys/cdefs.h>
#endif
#include <sys/types.h>
#include <sys/param.h>
#include <sys/time.h>
#include <sys/uio.h>
#include <sys/vnode.h>

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

fi

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

fi

echo $ac_n "checking if vget takes three arguments""... $ac_c" 1>&6
echo "configure:10003: checking if vget takes three arguments" >&5
if eval "test \"`echo '$''{'ac_cv_func_vget_three_args'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $test_KERNEL_CFLAGS $KERNEL_CPPFLAGS"
cat > conftest.$ac_ext <<EOF
#line 10011 "configure"
#include "confdefs.h"

#ifdef HAVE_SYS_CDEFS_H
#include <sys/cdefs.h>
#endif
#include <sys/types.h>
#include <sys/param.h>
#include <sys/time.h>
#include <sys/uio.h>
#include <sys/vnode.h>

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

fi

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

fi

if test "$ac_cv_func_vget_one_args" = "no" -a "$ac_cv_func_vget_two_args" = "no" -a "$ac_cv_func_vget_three_args" = "no"; then
  { echo "configure: error: test for number of arguments of vget failed" 1>&2; exit 1; }
fi


echo $ac_n "checking if suser takes two arguments""... $ac_c" 1>&6
echo "configure:10055: checking if suser takes two arguments" >&5
if eval "test \"`echo '$''{'ac_cv_func_suser_two_args'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $test_KERNEL_CFLAGS $KERNEL_CPPFLAGS"
cat > conftest.$ac_ext <<EOF
#line 10063 "configure"
#include "confdefs.h"

#ifdef HAVE_SYS_CDEFS_H
#include <sys/cdefs.h>
#endif
#include <sys/types.h>
#include <sys/param.h>
#include <sys/time.h>
#include <sys/proc.h>

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

fi

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

fi


for ac_func in vfs_getnewfsid
do
echo $ac_n "checking for $ac_func in kernel""... $ac_c" 1>&6
echo "configure:10104: checking for $ac_func in kernel" >&5
if eval "test \"`echo '$''{'ac_cv_kernel_func_$ac_func'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
if test "$target_os" = "macos10.0"; then
  if nm $KERNEL | egrep "\\<_?$ac_func\\>" >/dev/null 2>&1; then
    eval "ac_cv_kernel_func_$ac_func=yes"
  else
    eval "ac_cv_kernel_func_$ac_func=no"
  fi
else
cat > conftest.$ac_ext <<EOF
#line 10117 "configure"
#include "confdefs.h"

int _foo() {
return foo();
}
int foo() {
$ac_func();
return 0; }
EOF
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $test_KERNEL_CFLAGS $KERNEL_CPPFLAGS"
if { (eval echo configure:__oline__: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && { (eval echo configure:10129: \"$ac_kernel_ld\") 1>&5; (eval $ac_kernel_ld) 2>&5; } && test -s conftest; then
  eval "ac_cv_kernel_func_$ac_func=yes"
else
  eval "ac_cv_kernel_func_$ac_func=no"
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
fi
CFLAGS="$save_CFLAGS"
rm -f conftest*
fi
fi

eval "ac_tr_var=HAVE_KERNEL_`echo $ac_func | tr '[a-z]' '[A-Z]'`"

echo "$ac_t""`eval echo \\${ac_cv_kernel_func_$ac_func}`" 1>&6
if test `eval echo \\${ac_cv_kernel_func_$ac_func}` = yes; then
  cat >> confdefs.h <<EOF
#define $ac_tr_var 1
EOF

fi

done

: << END
@@@funcs="$funcs kernel_vfs_getnewfsid"@@@
END

if test "$ac_cv_kernel_func_vfs_getnewfsid" = "yes"; then
echo $ac_n "checking if vfs_getnewfsid takes two arguments""... $ac_c" 1>&6
echo "configure:10159: checking if vfs_getnewfsid takes two arguments" >&5
if eval "test \"`echo '$''{'ac_cv_func_vfs_getnewfsid_two_args'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $test_KERNEL_CFLAGS $KERNEL_CPPFLAGS"
cat > conftest.$ac_ext <<EOF
#line 10167 "configure"
#include "confdefs.h"

#include <sys/types.h>
#include <sys/param.h>
#ifdef HAVE_SYS_MODULE_H
#include <sys/module.h>
#endif
#include <sys/mount.h>
#include <sys/vnode.h>

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

fi

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

fi
fi


echo $ac_n "checking if lockmgr takes four arguments""... $ac_c" 1>&6
echo "configure:10207: checking if lockmgr takes four arguments" >&5
if eval "test \"`echo '$''{'ac_cv_func_lockmgr_four_args'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $test_KERNEL_CFLAGS $KERNEL_CPPFLAGS"
cat > conftest.$ac_ext <<EOF
#line 10215 "configure"
#include "confdefs.h"

#ifdef HAVE_SYS_CDEFS_H
#include <sys/cdefs.h>
#endif
#include <sys/types.h>
#include <sys/param.h>
#include <sys/time.h>
#include <sys/proc.h>
#include <sys/lock.h>

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

fi

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

fi


for ac_func in lockstatus
do
echo $ac_n "checking for $ac_func in kernel""... $ac_c" 1>&6
echo "configure:10257: checking for $ac_func in kernel" >&5
if eval "test \"`echo '$''{'ac_cv_kernel_func_$ac_func'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
if test "$target_os" = "macos10.0"; then
  if nm $KERNEL | egrep "\\<_?$ac_func\\>" >/dev/null 2>&1; then
    eval "ac_cv_kernel_func_$ac_func=yes"
  else
    eval "ac_cv_kernel_func_$ac_func=no"
  fi
else
cat > conftest.$ac_ext <<EOF
#line 10270 "configure"
#include "confdefs.h"

int _foo() {
return foo();
}
int foo() {
$ac_func();
return 0; }
EOF
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $test_KERNEL_CFLAGS $KERNEL_CPPFLAGS"
if { (eval echo configure:__oline__: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && { (eval echo configure:10282: \"$ac_kernel_ld\") 1>&5; (eval $ac_kernel_ld) 2>&5; } && test -s conftest; then
  eval "ac_cv_kernel_func_$ac_func=yes"
else
  eval "ac_cv_kernel_func_$ac_func=no"
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
fi
CFLAGS="$save_CFLAGS"
rm -f conftest*
fi
fi

eval "ac_tr_var=HAVE_KERNEL_`echo $ac_func | tr '[a-z]' '[A-Z]'`"

echo "$ac_t""`eval echo \\${ac_cv_kernel_func_$ac_func}`" 1>&6
if test `eval echo \\${ac_cv_kernel_func_$ac_func}` = yes; then
  cat >> confdefs.h <<EOF
#define $ac_tr_var 1
EOF

fi

done

: << END
@@@funcs="$funcs kernel_lockstatus"@@@
END

if test "$ac_cv_kernel_func_lockstatus" = "yes"; then
echo $ac_n "checking if lockstatus takes two arguments""... $ac_c" 1>&6
echo "configure:10312: checking if lockstatus takes two arguments" >&5
if eval "test \"`echo '$''{'ac_cv_func_lockstatus_two_args'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $test_KERNEL_CFLAGS $KERNEL_CPPFLAGS"
cat > conftest.$ac_ext <<EOF
#line 10320 "configure"
#include "confdefs.h"

#ifdef HAVE_SYS_CDEFS_H
#include <sys/cdefs.h>
#endif
#include <sys/types.h>
#include <sys/param.h>
#include <sys/time.h>
#include <sys/proc.h>
#include <sys/lock.h>

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

fi

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

fi

echo $ac_n "checking if lockstatus takes one argument""... $ac_c" 1>&6
echo "configure:10359: checking if lockstatus takes one argument" >&5
if eval "test \"`echo '$''{'ac_cv_func_lockstatus_one_args'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $test_KERNEL_CFLAGS $KERNEL_CPPFLAGS"
cat > conftest.$ac_ext <<EOF
#line 10367 "configure"
#include "confdefs.h"

#ifdef HAVE_SYS_CDEFS_H
#include <sys/cdefs.h>
#endif
#include <sys/types.h>
#include <sys/param.h>
#include <sys/proc.h>
#include <sys/lock.h>

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

fi

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

fi

if test "$ac_cv_func_lockstatus_two_args" = "no" -a "$ac_cv_func_lockstatus_one_args" = "no"; then
	{ echo "configure: error: unable to figure out how many args lockstatus takes" 1>&2; exit 1; }
fi
fi

case "$target_os" in
osf*)

echo $ac_n "checking if ubc_lookup takes six arguments""... $ac_c" 1>&6
echo "configure:10413: checking if ubc_lookup takes six arguments" >&5
if eval "test \"`echo '$''{'ac_cv_func_ubc_lookup_six_args'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $test_KERNEL_CFLAGS $KERNEL_CPPFLAGS"
cat > conftest.$ac_ext <<EOF
#line 10421 "configure"
#include "confdefs.h"

#if defined(__osf__) && defined(__GNUC__)
#define asm __foo_asm
#endif
#include <sys/types.h>
#include <sys/param.h>
#include <sys/proc.h>
#include <sys/lock.h>
#include <vm/vm_ubc.h>

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

fi

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

fi
 ;;
esac



echo $ac_n "checking if DIRSIZ lives in dirent.h""... $ac_c" 1>&6
echo "configure:10464: checking if DIRSIZ lives in dirent.h" >&5
if eval "test \"`echo '$''{'ac_cv_dirsiz_in_dirent'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 10469 "configure"
#include "confdefs.h"
#include <dirent.h>
#ifdef DIRSIZE
yes
#endif
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "yes" >/dev/null 2>&1; then
  rm -rf conftest*
  eval "ac_cv_dirsiz_in_dirent=yes"
else
  rm -rf conftest*
  eval "ac_cv_dirsiz_in_dirent=no"
fi
rm -f conftest*

fi

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

fi

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

fi

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

fi

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

fi

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

fi





echo $ac_n "checking for p_sigmask in struct proc""... $ac_c" 1>&6
echo "configure:10567: checking for p_sigmask in struct proc" >&5
if eval "test \"`echo '$''{'ac_cv_type_struct_proc_p_sigmask'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
cat > conftest.$ac_ext <<EOF
#line 10573 "configure"
#include "confdefs.h"
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
#ifdef HAVE_SYS_PROC_H
#include <sys/proc.h>
#endif
int main() {
struct proc x; x.p_sigmask;
; return 0; }
EOF
if { (eval echo configure:10591: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_type_struct_proc_p_sigmask=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_type_struct_proc_p_sigmask=no
fi
rm -f conftest*
fi

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

	
fi





echo $ac_n "checking if struct mount has a field mnt_syncer""... $ac_c" 1>&6
echo "configure:10618: checking if struct mount has a field mnt_syncer" >&5
if eval "test \"`echo '$''{'ac_cv_struct_mount_mnt_syncer'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  

save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $test_KERNEL_CFLAGS $KERNEL_CPPFLAGS"
cat > conftest.$ac_ext <<EOF
#line 10627 "configure"
#include "confdefs.h"

#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
#ifdef HAVE_SYS_PROC_H
#include <sys/proc.h>
#endif
#ifdef HAVE_SYS_VNODE_H
#include <sys/vnode.h>
#endif
#ifdef HAVE_SYS_MOUNT_H
#include <sys/mount.h>
#endif

int main() {
struct mount foo; struct vnode * bar = foo.mnt_syncer; 
; return 0; }
EOF
if { (eval echo configure:10653: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_struct_mount_mnt_syncer=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_struct_mount_mnt_syncer=no
fi
rm -f conftest*
CFLAGS="$save_CFLAGS"

fi

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

	
fi





echo $ac_n "checking if struct mount has a field m_info""... $ac_c" 1>&6
echo "configure:10682: checking if struct mount has a field m_info" >&5
if eval "test \"`echo '$''{'ac_cv_struct_mount_m_info'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  

save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $test_KERNEL_CFLAGS $KERNEL_CPPFLAGS"
cat > conftest.$ac_ext <<EOF
#line 10691 "configure"
#include "confdefs.h"

#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
#ifdef HAVE_SYS_PROC_H
#include <sys/proc.h>
#endif
#ifdef HAVE_SYS_VNODE_H
#include <sys/vnode.h>
#endif
#ifdef HAVE_SYS_MOUNT_H
#include <sys/mount.h>
#endif

int main() {
struct mount foo; qaddr_t bar = foo.m_info; 
; return 0; }
EOF
if { (eval echo configure:10717: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_struct_mount_m_info=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_struct_mount_m_info=no
fi
rm -f conftest*
CFLAGS="$save_CFLAGS"

fi

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

	
fi





echo $ac_n "checking if struct vfsconf has a field vfc_refcount""... $ac_c" 1>&6
echo "configure:10746: checking if struct vfsconf has a field vfc_refcount" >&5
if eval "test \"`echo '$''{'ac_cv_struct_vfsconf_vfc_refcount'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  

save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $test_KERNEL_CFLAGS $KERNEL_CPPFLAGS"
cat > conftest.$ac_ext <<EOF
#line 10755 "configure"
#include "confdefs.h"

#include <sys/types.h>
#include <sys/param.h>
#include <sys/mount.h>

int main() {
struct vfsconf foo; int bar = foo.vfc_refcount; 
; return 0; }
EOF
if { (eval echo configure:10766: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_struct_vfsconf_vfc_refcount=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_struct_vfsconf_vfc_refcount=no
fi
rm -f conftest*
CFLAGS="$save_CFLAGS"

fi

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

	
fi





echo $ac_n "checking if struct vfsconf has a field vfc_mountroot""... $ac_c" 1>&6
echo "configure:10795: checking if struct vfsconf has a field vfc_mountroot" >&5
if eval "test \"`echo '$''{'ac_cv_struct_vfsconf_vfc_mountroot'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  

save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $test_KERNEL_CFLAGS $KERNEL_CPPFLAGS"
cat > conftest.$ac_ext <<EOF
#line 10804 "configure"
#include "confdefs.h"

#include <sys/types.h>
#include <sys/param.h>
#include <sys/mount.h>

int main() {
struct vfsconf foo; int (*)(void) bar = foo.vfc_mountroot; 
; return 0; }
EOF
if { (eval echo configure:10815: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_struct_vfsconf_vfc_mountroot=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_struct_vfsconf_vfc_mountroot=no
fi
rm -f conftest*
CFLAGS="$save_CFLAGS"

fi

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

	
fi





echo $ac_n "checking if struct uio has a field uio_procp""... $ac_c" 1>&6
echo "configure:10844: checking if struct uio has a field uio_procp" >&5
if eval "test \"`echo '$''{'ac_cv_struct_uio_uio_procp'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  

save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $test_KERNEL_CFLAGS $KERNEL_CPPFLAGS"
cat > conftest.$ac_ext <<EOF
#line 10853 "configure"
#include "confdefs.h"

#include <sys/types.h>
#ifdef HAVE_SYS_CDEFS_H
#include <sys/cdefs.h>
#endif
#include <sys/uio.h>

int main() {
struct uio foo; struct proc * bar = foo.uio_procp; 
; return 0; }
EOF
if { (eval echo configure:10866: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_struct_uio_uio_procp=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_struct_uio_uio_procp=no
fi
rm -f conftest*
CFLAGS="$save_CFLAGS"

fi

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

	
fi





echo $ac_n "checking if struct vfsops has a field vfs_opv_descs""... $ac_c" 1>&6
echo "configure:10895: checking if struct vfsops has a field vfs_opv_descs" >&5
if eval "test \"`echo '$''{'ac_cv_struct_vfsops_vfs_opv_descs'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  

save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $test_KERNEL_CFLAGS $KERNEL_CPPFLAGS"
cat > conftest.$ac_ext <<EOF
#line 10904 "configure"
#include "confdefs.h"

#include <sys/types.h>
#include <sys/param.h>
#include <sys/mount.h>

int main() {
struct vfsops foo; struct vnodeopv_desc ** bar = foo.vfs_opv_descs; 
; return 0; }
EOF
if { (eval echo configure:10915: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_struct_vfsops_vfs_opv_descs=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_struct_vfsops_vfs_opv_descs=no
fi
rm -f conftest*
CFLAGS="$save_CFLAGS"

fi

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

	
fi





echo $ac_n "checking if struct vfsops has a field vfs_name""... $ac_c" 1>&6
echo "configure:10944: checking if struct vfsops has a field vfs_name" >&5
if eval "test \"`echo '$''{'ac_cv_struct_vfsops_vfs_name'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  

save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $test_KERNEL_CFLAGS $KERNEL_CPPFLAGS"
cat > conftest.$ac_ext <<EOF
#line 10953 "configure"
#include "confdefs.h"

#include <sys/types.h>
#include <sys/param.h>
#include <sys/mount.h>

int main() {
struct vfsops foo; char * bar = foo.vfs_name; 
; return 0; }
EOF
if { (eval echo configure:10964: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_struct_vfsops_vfs_name=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_struct_vfsops_vfs_name=no
fi
rm -f conftest*
CFLAGS="$save_CFLAGS"

fi

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

	
fi





echo $ac_n "checking if struct vfsops has a field vfs_uninit""... $ac_c" 1>&6
echo "configure:10993: checking if struct vfsops has a field vfs_uninit" >&5
if eval "test \"`echo '$''{'ac_cv_struct_vfsops_vfs_uninit'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  

save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $test_KERNEL_CFLAGS $KERNEL_CPPFLAGS"
cat > conftest.$ac_ext <<EOF
#line 11002 "configure"
#include "confdefs.h"

#include <sys/types.h>
#include <sys/param.h>
#include <sys/mount.h>

int main() {
struct vfsops foo; void * bar = foo.vfs_uninit; 
; return 0; }
EOF
if { (eval echo configure:11013: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_struct_vfsops_vfs_uninit=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_struct_vfsops_vfs_uninit=no
fi
rm -f conftest*
CFLAGS="$save_CFLAGS"

fi

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

	
fi





echo $ac_n "checking if struct vfsops has a field vfs_oid""... $ac_c" 1>&6
echo "configure:11042: checking if struct vfsops has a field vfs_oid" >&5
if eval "test \"`echo '$''{'ac_cv_struct_vfsops_vfs_oid'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  

save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $test_KERNEL_CFLAGS $KERNEL_CPPFLAGS"
cat > conftest.$ac_ext <<EOF
#line 11051 "configure"
#include "confdefs.h"

#include <sys/types.h>
#include <sys/param.h>
#include <sys/mount.h>

int main() {
struct vfsops foo; struct sysctl_oid * bar = foo.vfs_oid; 
; return 0; }
EOF
if { (eval echo configure:11062: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_struct_vfsops_vfs_oid=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_struct_vfsops_vfs_oid=no
fi
rm -f conftest*
CFLAGS="$save_CFLAGS"

fi

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

	
fi





echo $ac_n "checking if struct vfsops has a field vfs_done""... $ac_c" 1>&6
echo "configure:11091: checking if struct vfsops has a field vfs_done" >&5
if eval "test \"`echo '$''{'ac_cv_struct_vfsops_vfs_done'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  

save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $test_KERNEL_CFLAGS $KERNEL_CPPFLAGS"
cat > conftest.$ac_ext <<EOF
#line 11100 "configure"
#include "confdefs.h"

#include <sys/types.h>
#include <sys/param.h>
#include <sys/mount.h>

int main() {
struct vfsops foo; int bar = foo.vfs_done; 
; return 0; }
EOF
if { (eval echo configure:11111: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_struct_vfsops_vfs_done=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_struct_vfsops_vfs_done=no
fi
rm -f conftest*
CFLAGS="$save_CFLAGS"

fi

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

	
fi





echo $ac_n "checking if struct vfsops has a field vfs_checkexp""... $ac_c" 1>&6
echo "configure:11140: checking if struct vfsops has a field vfs_checkexp" >&5
if eval "test \"`echo '$''{'ac_cv_struct_vfsops_vfs_checkexp'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  

save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $test_KERNEL_CFLAGS $KERNEL_CPPFLAGS"
cat > conftest.$ac_ext <<EOF
#line 11149 "configure"
#include "confdefs.h"

#include <sys/types.h>
#include <sys/param.h>
#include <sys/mount.h>

int main() {
struct vfsops foo; void * bar = foo.vfs_checkexp; 
; return 0; }
EOF
if { (eval echo configure:11160: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_struct_vfsops_vfs_checkexp=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_struct_vfsops_vfs_checkexp=no
fi
rm -f conftest*
CFLAGS="$save_CFLAGS"

fi

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

	
fi





echo $ac_n "checking if struct vop_fsync_args has a field a_flags""... $ac_c" 1>&6
echo "configure:11189: checking if struct vop_fsync_args has a field a_flags" >&5
if eval "test \"`echo '$''{'ac_cv_struct_vop_fsync_args_a_flags'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  

save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $test_KERNEL_CFLAGS $KERNEL_CPPFLAGS"
cat > conftest.$ac_ext <<EOF
#line 11198 "configure"
#include "confdefs.h"

#include <sys/types.h>
#include <sys/param.h>
#include <sys/vnode.h>
#include <sys/vnode_if.h>

int main() {
struct vop_fsync_args foo; int bar = foo.a_flags; 
; return 0; }
EOF
if { (eval echo configure:11210: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_struct_vop_fsync_args_a_flags=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_struct_vop_fsync_args_a_flags=no
fi
rm -f conftest*
CFLAGS="$save_CFLAGS"

fi

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

	
fi





echo $ac_n "checking if struct proc has a field p_retval""... $ac_c" 1>&6
echo "configure:11239: checking if struct proc has a field p_retval" >&5
if eval "test \"`echo '$''{'ac_cv_struct_proc_p_retval'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  

save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $test_KERNEL_CFLAGS $KERNEL_CPPFLAGS"
cat > conftest.$ac_ext <<EOF
#line 11248 "configure"
#include "confdefs.h"

#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
#ifdef HAVE_SYS_PROC_H
#include <sys/proc.h>
#endif

int main() {
struct proc foo; register_t * bar = foo.p_retval; 
; return 0; }
EOF
if { (eval echo configure:11268: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_struct_proc_p_retval=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_struct_proc_p_retval=no
fi
rm -f conftest*
CFLAGS="$save_CFLAGS"

fi

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

	
fi






echo $ac_n "checking if struct setgroups_args exists""... $ac_c" 1>&6
echo "configure:11298: checking if struct setgroups_args exists" >&5
if eval "test \"`echo '$''{'ac_cv_have_def_struct_setgroups_args'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  

save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $test_KERNEL_CFLAGS $KERNEL_CPPFLAGS"
cat > conftest.$ac_ext <<EOF
#line 11307 "configure"
#include "confdefs.h"

#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
#ifdef HAVE_SYS_MOUNT_H
#include <sys/mount.h>
#endif
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
#ifdef HAVE_SYS_PROC_H
#include <sys/proc.h>
#endif
#ifdef HAVE_SYS_SYSPROTO_H
#include <sys/sysproto.h>
#endif
#ifdef HAVE_SYS_SYSCALLARGS_H
#include <sys/syscallargs.h>
#endif

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

fi

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

	
fi





echo $ac_n "checking if struct sys_setgroups_args exists""... $ac_c" 1>&6
echo "configure:11365: checking if struct sys_setgroups_args exists" >&5
if eval "test \"`echo '$''{'ac_cv_have_def_struct_sys_setgroups_args'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  

save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $test_KERNEL_CFLAGS $KERNEL_CPPFLAGS"
cat > conftest.$ac_ext <<EOF
#line 11374 "configure"
#include "confdefs.h"

#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
#ifdef HAVE_SYS_MOUNT_H
#include <sys/mount.h>
#endif
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
#ifdef HAVE_SYS_PROC_H
#include <sys/proc.h>
#endif
#ifdef HAVE_SYS_SYSPROTO_H
#include <sys/sysproto.h>
#endif
#ifdef HAVE_SYS_SYSCALLARGS_H
#include <sys/syscallargs.h>
#endif

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

fi

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

	
fi





echo $ac_n "checking if struct cdevsw has a field d_stop""... $ac_c" 1>&6
echo "configure:11432: checking if struct cdevsw has a field d_stop" >&5
if eval "test \"`echo '$''{'ac_cv_struct_cdevsw_d_stop'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  

save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $test_KERNEL_CFLAGS $KERNEL_CPPFLAGS"
cat > conftest.$ac_ext <<EOF
#line 11441 "configure"
#include "confdefs.h"

#include <sys/types.h>
#ifdef HAVE_SYS_CDEFS_H
#include <sys/cdefs.h>
#endif
#include <sys/conf.h>

int main() {
struct cdevsw foo; d_stop_t * bar = foo.d_stop; 
; return 0; }
EOF
if { (eval echo configure:11454: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_struct_cdevsw_d_stop=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_struct_cdevsw_d_stop=no
fi
rm -f conftest*
CFLAGS="$save_CFLAGS"

fi

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

	
fi





echo $ac_n "checking if struct cdevsw has a field d_reset""... $ac_c" 1>&6
echo "configure:11483: checking if struct cdevsw has a field d_reset" >&5
if eval "test \"`echo '$''{'ac_cv_struct_cdevsw_d_reset'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  

save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $test_KERNEL_CFLAGS $KERNEL_CPPFLAGS"
cat > conftest.$ac_ext <<EOF
#line 11492 "configure"
#include "confdefs.h"

#include <sys/types.h>
#ifdef HAVE_SYS_CDEFS_H
#include <sys/cdefs.h>
#endif
#include <sys/conf.h>

int main() {
struct cdevsw foo; d_reset_t * bar = foo.d_reset; 
; return 0; }
EOF
if { (eval echo configure:11505: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_struct_cdevsw_d_reset=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_struct_cdevsw_d_reset=no
fi
rm -f conftest*
CFLAGS="$save_CFLAGS"

fi

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

	
fi





echo $ac_n "checking if struct cdevsw has a field d_bogoreset""... $ac_c" 1>&6
echo "configure:11534: checking if struct cdevsw has a field d_bogoreset" >&5
if eval "test \"`echo '$''{'ac_cv_struct_cdevsw_d_bogoreset'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  

save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $test_KERNEL_CFLAGS $KERNEL_CPPFLAGS"
cat > conftest.$ac_ext <<EOF
#line 11543 "configure"
#include "confdefs.h"

#include <sys/types.h>
#ifdef HAVE_SYS_CDEFS_H
#include <sys/cdefs.h>
#endif
#include <sys/conf.h>

int main() {
struct cdevsw foo; d_reset_t * bar = foo.d_bogoreset; 
; return 0; }
EOF
if { (eval echo configure:11556: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_struct_cdevsw_d_bogoreset=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_struct_cdevsw_d_bogoreset=no
fi
rm -f conftest*
CFLAGS="$save_CFLAGS"

fi

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

	
fi





echo $ac_n "checking if struct cdevsw has a field d_devtotty""... $ac_c" 1>&6
echo "configure:11585: checking if struct cdevsw has a field d_devtotty" >&5
if eval "test \"`echo '$''{'ac_cv_struct_cdevsw_d_devtotty'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  

save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $test_KERNEL_CFLAGS $KERNEL_CPPFLAGS"
cat > conftest.$ac_ext <<EOF
#line 11594 "configure"
#include "confdefs.h"

#include <sys/types.h>
#ifdef HAVE_SYS_CDEFS_H
#include <sys/cdefs.h>
#endif
#include <sys/conf.h>

int main() {
struct cdevsw foo; d_devtotty_t * bar = foo.d_devtotty; 
; return 0; }
EOF
if { (eval echo configure:11607: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_struct_cdevsw_d_devtotty=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_struct_cdevsw_d_devtotty=no
fi
rm -f conftest*
CFLAGS="$save_CFLAGS"

fi

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

	
fi





echo $ac_n "checking if struct cdevsw has a field d_bogoparms""... $ac_c" 1>&6
echo "configure:11636: checking if struct cdevsw has a field d_bogoparms" >&5
if eval "test \"`echo '$''{'ac_cv_struct_cdevsw_d_bogoparms'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  

save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $test_KERNEL_CFLAGS $KERNEL_CPPFLAGS"
cat > conftest.$ac_ext <<EOF
#line 11645 "configure"
#include "confdefs.h"

#include <sys/types.h>
#ifdef HAVE_SYS_CDEFS_H
#include <sys/cdefs.h>
#endif
#include <sys/conf.h>

int main() {
struct cdevsw foo; d_parms_t * bar = foo.d_bogoparms; 
; return 0; }
EOF
if { (eval echo configure:11658: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_struct_cdevsw_d_bogoparms=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_struct_cdevsw_d_bogoparms=no
fi
rm -f conftest*
CFLAGS="$save_CFLAGS"

fi

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

	
fi





echo $ac_n "checking if struct cdevsw has a field d_spare""... $ac_c" 1>&6
echo "configure:11687: checking if struct cdevsw has a field d_spare" >&5
if eval "test \"`echo '$''{'ac_cv_struct_cdevsw_d_spare'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  

save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $test_KERNEL_CFLAGS $KERNEL_CPPFLAGS"
cat > conftest.$ac_ext <<EOF
#line 11696 "configure"
#include "confdefs.h"

#include <sys/types.h>
#ifdef HAVE_SYS_CDEFS_H
#include <sys/cdefs.h>
#endif
#include <sys/conf.h>

int main() {
struct cdevsw foo; void * bar = foo.d_spare; 
; return 0; }
EOF
if { (eval echo configure:11709: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_struct_cdevsw_d_spare=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_struct_cdevsw_d_spare=no
fi
rm -f conftest*
CFLAGS="$save_CFLAGS"

fi

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

	
fi





echo $ac_n "checking if struct cdevsw has a field d_maxio""... $ac_c" 1>&6
echo "configure:11738: checking if struct cdevsw has a field d_maxio" >&5
if eval "test \"`echo '$''{'ac_cv_struct_cdevsw_d_maxio'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  

save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $test_KERNEL_CFLAGS $KERNEL_CPPFLAGS"
cat > conftest.$ac_ext <<EOF
#line 11747 "configure"
#include "confdefs.h"

#include <sys/types.h>
#ifdef HAVE_SYS_CDEFS_H
#include <sys/cdefs.h>
#endif
#include <sys/conf.h>

int main() {
struct cdevsw foo; int bar = foo.d_maxio; 
; return 0; }
EOF
if { (eval echo configure:11760: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_struct_cdevsw_d_maxio=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_struct_cdevsw_d_maxio=no
fi
rm -f conftest*
CFLAGS="$save_CFLAGS"

fi

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

	
fi





echo $ac_n "checking if struct componentname has a field cn_hash""... $ac_c" 1>&6
echo "configure:11789: checking if struct componentname has a field cn_hash" >&5
if eval "test \"`echo '$''{'ac_cv_struct_componentname_cn_hash'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  

save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $test_KERNEL_CFLAGS $KERNEL_CPPFLAGS"
cat > conftest.$ac_ext <<EOF
#line 11798 "configure"
#include "confdefs.h"

#include <sys/types.h>
#ifdef HAVE_SYS_CDEFS_H
#include <sys/cdefs.h>
#endif
#include <sys/uio.h>
#include <sys/namei.h>

int main() {
struct componentname foo; u_long bar = foo.cn_hash; 
; return 0; }
EOF
if { (eval echo configure:11812: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_struct_componentname_cn_hash=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_struct_componentname_cn_hash=no
fi
rm -f conftest*
CFLAGS="$save_CFLAGS"

fi

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

	
fi




echo $ac_n "checking if we can only include uvm headers""... $ac_c" 1>&6
echo "configure:11840: checking if we can only include uvm headers" >&5
if eval "test \"`echo '$''{'ac_cv_kernel_uvm_only'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $test_KERNEL_CFLAGS $KERNEL_CPPFLAGS"
cat > conftest.$ac_ext <<EOF
#line 11848 "configure"
#include "confdefs.h"

#include <sys/types.h>
#include <sys/param.h>
#ifdef HAVE_VM_VM_H
#include <vm/vm.h>
#endif
#ifdef HAVE_VM_VM_EXTERN_H
#include <vm/vm_extern.h>
#endif
#ifdef HAVE_VM_VM_ZONE_H
#include <vm/vm_zone.h>
#endif
#ifdef HAVE_VM_VM_OBJECT_H
#include <vm/vm_object.h>
#endif
#ifdef HAVE_UVM_UVM_EXTERN_H
#include <uvm/uvm_extern.h>
#endif

int main() {
int suvmtiuk = 1;

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

fi

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

fi



elif test "$XFS_SUBDIR" = "linux"; then

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



echo $ac_n "checking if d_alloc_root takes two arguments""... $ac_c" 1>&6
echo "configure:11943: checking if d_alloc_root takes two arguments" >&5
if eval "test \"`echo '$''{'ac_cv_func_d_alloc_root_two_args'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $test_KERNEL_CFLAGS $KERNEL_CPPFLAGS"
cat > conftest.$ac_ext <<EOF
#line 11951 "configure"
#include "confdefs.h"
#include <asm/current.h>
#include <linux/fs.h>
#include <linux/dcache.h>
int main() {

d_alloc_root(NULL, NULL)

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

fi

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

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

fi



echo $ac_n "checking if devfs_register takes the dir argument""... $ac_c" 1>&6
echo "configure:11988: checking if devfs_register takes the dir argument" >&5
if eval "test \"`echo '$''{'ac_cv_func_devfs_register_eleven_args'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $test_KERNEL_CFLAGS $KERNEL_CPPFLAGS"
cat > conftest.$ac_ext <<EOF
#line 11996 "configure"
#include "confdefs.h"
#include <linux/devfs_fs_kernel.h>

int main() {
devfs_handle_t de;
devfs_register(de, NULL, 0, 0, 0, 0, 0, 0, 0, NULL, NULL);

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

fi

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

fi




echo $ac_n "checking if struct ViceIoctl has a field in""... $ac_c" 1>&6
echo "configure:12032: checking if struct ViceIoctl has a field in" >&5
if eval "test \"`echo '$''{'ac_cv_struct_viceioctl_in'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  

save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $test_KERNEL_CFLAGS $KERNEL_CPPFLAGS"
cat > conftest.$ac_ext <<EOF
#line 12041 "configure"
#include "confdefs.h"

#define __KERNEL__
#include <asm/current.h>
#include <linux/fs.h>

int main() {
struct ViceIoctl foo; caddr_t bar = foo.in; 
; return 0; }
EOF
if { (eval echo configure:12052: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_struct_viceioctl_in=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_struct_viceioctl_in=no
fi
rm -f conftest*
CFLAGS="$save_CFLAGS"

fi

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

	
fi




for i in int8_t int16_t int32_t int64_t; do
        
cv=`echo "$i" | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
echo $ac_n "checking for $i in the linux kernel""... $ac_c" 1>&6
echo "configure:12083: checking for $i in the linux kernel" >&5
if eval "test \"`echo '$''{'ac_cv_linux_kernel_type_$cv'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $test_KERNEL_CFLAGS $KERNEL_CPPFLAGS"
cat > conftest.$ac_ext <<EOF
#line 12091 "configure"
#include "confdefs.h"

#define __KERNEL__
#include <linux/types.h>

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

fi
echo "$ac_t""`eval echo \\$ac_cv_linux_kernel_type_$cv`" 1>&6
if test `eval echo \\$ac_cv_linux_kernel_type_$cv` = yes; then
  ac_tr_hdr=HAVE_LINUX_KERNEL_`echo $i | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF

fi

done
: << END
@@@funcs="$funcs linux_kernel_int8_t linux_kernel_int16_t linux_kernel_int32_t linux_kernel_int64_t"@@@
END


for i in u_int8_t u_int16_t u_int32_t u_int64_t; do
        
cv=`echo "$i" | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
echo $ac_n "checking for $i in the linux kernel""... $ac_c" 1>&6
echo "configure:12133: checking for $i in the linux kernel" >&5
if eval "test \"`echo '$''{'ac_cv_linux_kernel_type_$cv'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $test_KERNEL_CFLAGS $KERNEL_CPPFLAGS"
cat > conftest.$ac_ext <<EOF
#line 12141 "configure"
#include "confdefs.h"

#define __KERNEL__
#include <linux/types.h>

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

fi
echo "$ac_t""`eval echo \\$ac_cv_linux_kernel_type_$cv`" 1>&6
if test `eval echo \\$ac_cv_linux_kernel_type_$cv` = yes; then
  ac_tr_hdr=HAVE_LINUX_KERNEL_`echo $i | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF

fi

done
: << END
@@@funcs="$funcs linux_kernel_u_int8_t linux_kernel_u_int16_t linux_kernel_u_int32_t linux_kernel_u_int64_t"@@@
END




echo $ac_n "checking if struct super_operations has a field notify_change""... $ac_c" 1>&6
echo "configure:12182: checking if struct super_operations has a field notify_change" >&5
if eval "test \"`echo '$''{'ac_cv_struct_super_operations_notify_change'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  

save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $test_KERNEL_CFLAGS $KERNEL_CPPFLAGS"
cat > conftest.$ac_ext <<EOF
#line 12191 "configure"
#include "confdefs.h"

#include <asm/current.h>
#include <linux/fs.h>
typedef int (*notify_change_type)(struct dentry *, struct iattr *);

int main() {
struct super_operations foo; notify_change_type bar = foo.notify_change; 
; return 0; }
EOF
if { (eval echo configure:12202: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_struct_super_operations_notify_change=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_struct_super_operations_notify_change=no
fi
rm -f conftest*
CFLAGS="$save_CFLAGS"

fi

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

	
fi





echo $ac_n "checking if struct inode_operations has a field default_file_ops""... $ac_c" 1>&6
echo "configure:12231: checking if struct inode_operations has a field default_file_ops" >&5
if eval "test \"`echo '$''{'ac_cv_struct_inode_operations_default_file_ops'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  

save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $test_KERNEL_CFLAGS $KERNEL_CPPFLAGS"
cat > conftest.$ac_ext <<EOF
#line 12240 "configure"
#include "confdefs.h"

#include <asm/current.h>
#include <linux/fs.h>

int main() {
struct inode_operations foo; struct file_operations * bar = foo.default_file_ops; 
; return 0; }
EOF
if { (eval echo configure:12250: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_struct_inode_operations_default_file_ops=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_struct_inode_operations_default_file_ops=no
fi
rm -f conftest*
CFLAGS="$save_CFLAGS"

fi

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

	
fi





echo $ac_n "checking if struct inode_operations has a field updatepage""... $ac_c" 1>&6
echo "configure:12279: checking if struct inode_operations has a field updatepage" >&5
if eval "test \"`echo '$''{'ac_cv_struct_inode_operations_updatepage'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  

save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $test_KERNEL_CFLAGS $KERNEL_CPPFLAGS"
cat > conftest.$ac_ext <<EOF
#line 12288 "configure"
#include "confdefs.h"

#include <asm/current.h>
#include <linux/fs.h>
typedef int (*updatepage_type)(struct file *, struct page *, unsigned long, unsigned int, int);

int main() {
struct inode_operations foo; updatepage_type bar = foo.updatepage; 
; return 0; }
EOF
if { (eval echo configure:12299: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_struct_inode_operations_updatepage=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_struct_inode_operations_updatepage=no
fi
rm -f conftest*
CFLAGS="$save_CFLAGS"

fi

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

	
fi





echo $ac_n "checking if struct inode_operations has a field bmap""... $ac_c" 1>&6
echo "configure:12328: checking if struct inode_operations has a field bmap" >&5
if eval "test \"`echo '$''{'ac_cv_struct_inode_operations_bmap'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  

save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $test_KERNEL_CFLAGS $KERNEL_CPPFLAGS"
cat > conftest.$ac_ext <<EOF
#line 12337 "configure"
#include "confdefs.h"

#include <asm/current.h>
#include <linux/fs.h>
typedef int (*bmap_type)(struct inode *,int);

int main() {
struct inode_operations foo; bmap_type bar = foo.bmap; 
; return 0; }
EOF
if { (eval echo configure:12348: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_struct_inode_operations_bmap=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_struct_inode_operations_bmap=no
fi
rm -f conftest*
CFLAGS="$save_CFLAGS"

fi

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

	
fi





echo $ac_n "checking if struct inode_operations has a field smap""... $ac_c" 1>&6
echo "configure:12377: checking if struct inode_operations has a field smap" >&5
if eval "test \"`echo '$''{'ac_cv_struct_inode_operations_smap'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  

save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $test_KERNEL_CFLAGS $KERNEL_CPPFLAGS"
cat > conftest.$ac_ext <<EOF
#line 12386 "configure"
#include "confdefs.h"

#include <asm/current.h>
#include <linux/fs.h>
typedef int (*smap_type)(struct inode *,int);

int main() {
struct inode_operations foo; smap_type bar = foo.smap; 
; return 0; }
EOF
if { (eval echo configure:12397: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_struct_inode_operations_smap=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_struct_inode_operations_smap=no
fi
rm -f conftest*
CFLAGS="$save_CFLAGS"

fi

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

	
fi




echo $ac_n "checking for wait_queue_head_t""... $ac_c" 1>&6
echo "configure:12425: checking for wait_queue_head_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_wait_queue_head_t'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  

save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $test_KERNEL_CFLAGS $KERNEL_CPPFLAGS"
cat > conftest.$ac_ext <<EOF
#line 12434 "configure"
#include "confdefs.h"
#include <linux/wait.h>
int main() {
wait_queue_head_t foo;
; return 0; }
EOF
if { (eval echo configure:12441: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_type_wait_queue_head_t=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_type_wait_queue_head_t=no
fi
rm -f conftest*
CFLAGS="$save_CFLAGS"

fi

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

fi


echo $ac_n "checking for wait_queue_task_list""... $ac_c" 1>&6
echo "configure:12465: checking for wait_queue_task_list" >&5
if eval "test \"`echo '$''{'ac_cv_type_wait_queue_task_list'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  

save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $test_KERNEL_CFLAGS $KERNEL_CPPFLAGS"
cat > conftest.$ac_ext <<EOF
#line 12474 "configure"
#include "confdefs.h"
#include <linux/stddef.h>
#include <linux/wait.h>
int main() {
wait_queue_head_t foo;
void *p;
p = &foo.task_list;
; return 0; }
EOF
if { (eval echo configure:12484: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_type_wait_queue_task_list=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_type_wait_queue_task_list=no
fi
rm -f conftest*
CFLAGS="$save_CFLAGS"

fi

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

fi


echo $ac_n "checking for init_waitqueue_head""... $ac_c" 1>&6
echo "configure:12508: checking for init_waitqueue_head" >&5
if eval "test \"`echo '$''{'ac_cv_func_init_waitqueue_head'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  

save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $test_KERNEL_CFLAGS $KERNEL_CPPFLAGS"
cat > conftest.$ac_ext <<EOF
#line 12517 "configure"
#include "confdefs.h"
#include <linux/wait.h>
int main() {
wait_queue_head_t foo;
init_waitqueue_head(&foo)
; return 0; }
EOF
if { (eval echo configure:12525: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_func_init_waitqueue_head=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_func_init_waitqueue_head=no
fi
rm -f conftest*
CFLAGS="$save_CFLAGS"

fi

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

fi


echo $ac_n "checking for init_MUTEX""... $ac_c" 1>&6
echo "configure:12549: checking for init_MUTEX" >&5
if eval "test \"`echo '$''{'ac_cv_func_init_mutex'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
save_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $test_KERNEL_CFLAGS $KERNEL_CPPFLAGS"
cat > conftest.$ac_ext <<EOF
#line 12557 "configure"
#include "confdefs.h"
#include <asm/semaphore.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "init_MUTEX" >/dev/null 2>&1; then
  rm -rf conftest*
  ac_cv_func_init_mutex=yes
else
  rm -rf conftest*
  ac_cv_func_init_mutex=no
fi
rm -f conftest*

CPPFLAGS="$save_CPPFLAGS"

fi

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

fi


echo $ac_n "checking for whether filldir_t includes a dt_type""... $ac_c" 1>&6
echo "configure:12585: checking for whether filldir_t includes a dt_type" >&5
if eval "test \"`echo '$''{'ac_cv_type_filldir_dt_type'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $test_KERNEL_CFLAGS $KERNEL_CPPFLAGS"
cat > conftest.$ac_ext <<EOF
#line 12593 "configure"
#include "confdefs.h"
#include <asm/current.h>
#include <linux/fs.h>
int main() {

int HAVE_STRUCT_INODE_OPERATIONS_SMAP;

filldir_t bar = HAVE_STRUCT_INODE_OPERATIONS_SMAP;

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

fi

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

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

fi


echo $ac_n "checking for dget_locked""... $ac_c" 1>&6
echo "configure:12630: checking for dget_locked" >&5
if eval "test \"`echo '$''{'ac_cv_func_dget_locked'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
save_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $test_KERNEL_CFLAGS $KERNEL_CPPFLAGS"
cat > conftest.$ac_ext <<EOF
#line 12638 "configure"
#include "confdefs.h"
#include <linux/dcache.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "dget_locked" >/dev/null 2>&1; then
  rm -rf conftest*
  ac_cv_func_dget_locked=yes
else
  rm -rf conftest*
  ac_cv_func_dget_locked=no
fi
rm -f conftest*

CPPFLAGS="$save_CPPFLAGS"

fi

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

fi




echo $ac_n "checking if struct task_struct has a field pending""... $ac_c" 1>&6
echo "configure:12668: checking if struct task_struct has a field pending" >&5
if eval "test \"`echo '$''{'ac_cv_struct_task_struct_pending'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  

save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $test_KERNEL_CFLAGS $KERNEL_CPPFLAGS"
cat > conftest.$ac_ext <<EOF
#line 12677 "configure"
#include "confdefs.h"

#include <asm/current.h>
#include <linux/sched.h>

int main() {
struct task_struct foo; struct sigpending bar = foo.pending; 
; return 0; }
EOF
if { (eval echo configure:12687: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_struct_task_struct_pending=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_struct_task_struct_pending=no
fi
rm -f conftest*
CFLAGS="$save_CFLAGS"

fi

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

	
fi



elif test "$XFS_SUBDIR" = "solaris"; then



echo $ac_n "checking if struct vfsops has a field vfs_freevfs""... $ac_c" 1>&6
echo "configure:12718: checking if struct vfsops has a field vfs_freevfs" >&5
if eval "test \"`echo '$''{'ac_cv_struct_vfsops_vfs_freevfs'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  

save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $test_KERNEL_CFLAGS $KERNEL_CPPFLAGS"
cat > conftest.$ac_ext <<EOF
#line 12727 "configure"
#include "confdefs.h"

#include <sys/types.h>
#include <sys/vfs.h>
typedef void (*freevfs_type)(struct vfs *);

int main() {
struct vfsops foo; freevfs_type bar = foo.vfs_freevfs; 
; return 0; }
EOF
if { (eval echo configure:12738: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_struct_vfsops_vfs_freevfs=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_struct_vfsops_vfs_freevfs=no
fi
rm -f conftest*
CFLAGS="$save_CFLAGS"

fi

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

	
fi



fi # end of OS-specific tests


for ac_func in strlcpy
do
echo $ac_n "checking for $ac_func in kernel""... $ac_c" 1>&6
echo "configure:12770: checking for $ac_func in kernel" >&5
if eval "test \"`echo '$''{'ac_cv_kernel_func_$ac_func'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
if test "$target_os" = "macos10.0"; then
  if nm $KERNEL | egrep "\\<_?$ac_func\\>" >/dev/null 2>&1; then
    eval "ac_cv_kernel_func_$ac_func=yes"
  else
    eval "ac_cv_kernel_func_$ac_func=no"
  fi
else
cat > conftest.$ac_ext <<EOF
#line 12783 "configure"
#include "confdefs.h"

int _foo() {
return HAVE_STRUCT_VFSOPS_VFS_FREEVFS;
}
int HAVE_STRUCT_VFSOPS_VFS_FREEVFS {
$ac_func();
return 0; }
EOF
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $test_KERNEL_CFLAGS $KERNEL_CPPFLAGS"
if { (eval echo configure:__oline__: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && { (eval echo configure:12795: \"$ac_kernel_ld\") 1>&5; (eval $ac_kernel_ld) 2>&5; } && test -s conftest; then
  eval "ac_cv_kernel_func_$ac_func=yes"
else
  eval "ac_cv_kernel_func_$ac_func=no"
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
fi
CFLAGS="$save_CFLAGS"
rm -f conftest*
fi
fi

eval "ac_tr_var=HAVE_KERNEL_`echo $ac_func | tr '[a-z]' '[A-Z]'`"

echo "$ac_t""`eval echo \\${ac_cv_kernel_func_$ac_func}`" 1>&6
if test `eval echo \\${ac_cv_kernel_func_$ac_func}` = yes; then
  cat >> confdefs.h <<EOF
#define $ac_tr_var 1
EOF

fi

done

: << END
@@@funcs="$funcs kernel_strlcpy"@@@
END



echo $ac_n "checking for working htonl""... $ac_c" 1>&6
echo "configure:12826: checking for working htonl" >&5
if eval "test \"`echo '$''{'ac_cv_htonl_works'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
cat > conftest.$ac_ext <<EOF
#line 12832 "configure"
#include "confdefs.h"
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_NETDB_H
#include <netdb.h>
#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif

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

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

if test "$ac_cv_htonl_works" = "no"; then
echo $ac_n "checking if htonl is repairable""... $ac_c" 1>&6
echo "configure:12864: checking if htonl is repairable" >&5
if eval "test \"`echo '$''{'ac_cv_htonl_hack_works'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
cat > conftest.$ac_ext <<EOF
#line 12870 "configure"
#include "confdefs.h"
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_NETDB_H
#include <netdb.h>
#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
#define htonl(x) __cpu_to_be32(x)

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

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

if test "$ac_cv_htonl_hack_works" = "no"; then
{ echo "configure: error: Cannot repair htonl" 1>&2; exit 1; }
else
  cat >> confdefs.h <<\EOF
#define HAVE_REPAIRABLE_HTONL 1
EOF

fi

fi

# Almost done....

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

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

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

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

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

DEFS=-DHAVE_CONFIG_H

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

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

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

ac_given_srcdir=$srcdir
ac_given_INSTALL="$INSTALL"

trap 'rm -fr `echo "Makefile				\
	include/Makefile			\
	arlad/Makefile				\
	lwp/Makefile				\
	xfs/Makefile				\
	$XFS_SUBDIR_Makefile			\
	$XFS_SUBDIR_BIN_Makefile		\
	rx/Makefile				\
	$RXKAD_MAKEFILE				\
	rxdef/Makefile				\
	appl/Makefile				\
	appl/lib/Makefile			\
	appl/asrvutil/Makefile			\
	appl/afsmgr/Makefile			\
	appl/afsutils/Makefile			\
	appl/amon/Makefile			\
	appl/fs/Makefile			\
	appl/pts/Makefile			\
	appl/udebug/Makefile			\
	appl/vos/Makefile			\
	appl/bos/Makefile			\
	doc/Makefile				\
	lib/Makefile				\
	lib/roken/Makefile			\
	lib/sl/Makefile				\
	lib/cmd/Makefile				\
	lib/editline/Makefile			\
	lib/ko/Makefile				\
	lib/acl/Makefile			\
	lib/bufdir/Makefile			\
	util/Makefile				\
	ydr/Makefile				\
	conf/Makefile				\
	conf/arla.spec				\
	milko/Makefile 				\
	milko/lib/Makefile 			\
	milko/lib/vstatus/Makefile 		\
	milko/lib/dpart/Makefile		\
	milko/lib/voldb/Makefile		\
	milko/lib/vld/Makefile			\
	milko/lib/ropa/Makefile			\
	milko/lib/msecurity/Makefile		\
	milko/lib/mlog/Makefile			\
	milko/appl/Makefile			\
	milko/appl/sked/Makefile		\
	milko/appl/perf/Makefile		\
	milko/appl/bootstrap/Makefile		\
	milko/fs/Makefile			\
	milko/vldb/Makefile			\
	milko/pts/Makefile			\
	milko/bos/Makefile			\
	tests/Makefile include/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
EOF
cat >> $CONFIG_STATUS <<EOF

# Protect against being on the right side of a sed subst in config.status.
sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
$ac_vpsub
$extrasub
s%@SHELL@%$SHELL%g
s%@CFLAGS@%$CFLAGS%g
s%@CPPFLAGS@%$CPPFLAGS%g
s%@CXXFLAGS@%$CXXFLAGS%g
s%@FFLAGS@%$FFLAGS%g
s%@DEFS@%$DEFS%g
s%@LDFLAGS@%$LDFLAGS%g
s%@LIBS@%$LIBS%g
s%@exec_prefix@%$exec_prefix%g
s%@prefix@%$prefix%g
s%@program_transform_name@%$program_transform_name%g
s%@bindir@%$bindir%g
s%@sbindir@%$sbindir%g
s%@libexecdir@%$libexecdir%g
s%@datadir@%$datadir%g
s%@sysconfdir@%$sysconfdir%g
s%@sharedstatedir@%$sharedstatedir%g
s%@localstatedir@%$localstatedir%g
s%@libdir@%$libdir%g
s%@includedir@%$includedir%g
s%@oldincludedir@%$oldincludedir%g
s%@infodir@%$infodir%g
s%@mandir@%$mandir%g
s%@PACKAGE@%$PACKAGE%g
s%@VERSION@%$VERSION%g
s%@AS@%$AS%g
s%@CC@%$CC%g
s%@CPP@%$CPP%g
s%@SET_MAKE@%$SET_MAKE%g
s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
s%@INSTALL_DATA@%$INSTALL_DATA%g
s%@RANLIB@%$RANLIB%g
s%@LN_S@%$LN_S%g
s%@LEX@%$LEX%g
s%@LEXLIB@%$LEXLIB%g
s%@YACC@%$YACC%g
s%@host@%$host%g
s%@host_alias@%$host_alias%g
s%@host_cpu@%$host_cpu%g
s%@host_vendor@%$host_vendor%g
s%@host_os@%$host_os%g
s%@CANONICAL_HOST@%$CANONICAL_HOST%g
s%@SYMORDER@%$SYMORDER%g
s%@MAKEINFO@%$MAKEINFO%g
s%@DVI2PS@%$DVI2PS%g
s%@TEXI2DVI@%$TEXI2DVI%g
s%@TEXI2PDF@%$TEXI2PDF%g
s%@TEXI2HTML@%$TEXI2HTML%g
s%@DVIPS@%$DVIPS%g
s%@chmod@%$chmod%g
s%@GUILE_GTK@%$GUILE_GTK%g
s%@X_CFLAGS@%$X_CFLAGS%g
s%@X_PRE_LIBS@%$X_PRE_LIBS%g
s%@X_LIBS@%$X_LIBS%g
s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
s%@MAKE_X_PROGS_BIN@%$MAKE_X_PROGS_BIN%g
s%@target@%$target%g
s%@target_alias@%$target_alias%g
s%@target_cpu@%$target_cpu%g
s%@target_vendor@%$target_vendor%g
s%@target_os@%$target_os%g
s%@SYS@%$SYS%g
s%@OSF1_TRUE@%$OSF1_TRUE%g
s%@OSF1_FALSE@%$OSF1_FALSE%g
s%@ARLA_KNFS@%$ARLA_KNFS%g
s%@LWP_PROCESS@%$LWP_PROCESS%g
s%@PLWP_LIB_FLAGS@%$PLWP_LIB_FLAGS%g
s%@PLWP_INC_FLAGS@%$PLWP_INC_FLAGS%g
s%@LWP_C@%$LWP_C%g
s%@LWP_O@%$LWP_O%g
s%@LWP_H@%$LWP_H%g
s%@KRB5_LIB_DIR@%$KRB5_LIB_DIR%g
s%@KRB5_INC_DIR@%$KRB5_INC_DIR%g
s%@KRB5_INC_FLAGS@%$KRB5_INC_FLAGS%g
s%@KRB5_LIB_FLAGS@%$KRB5_LIB_FLAGS%g
s%@KRB4_LIB_DIR@%$KRB4_LIB_DIR%g
s%@KRB4_INC_DIR@%$KRB4_INC_DIR%g
s%@KRB4_INC_FLAGS@%$KRB4_INC_FLAGS%g
s%@KRB4_LIB_FLAGS@%$KRB4_LIB_FLAGS%g
s%@KAFS_LIBS@%$KAFS_LIBS%g
s%@APPL_SUBDIRS@%$APPL_SUBDIRS%g
s%@INCLUDE_readline@%$INCLUDE_readline%g
s%@LIB_readline@%$LIB_readline%g
s%@LIB_tgetent@%$LIB_tgetent%g
s%@LIB_el_init@%$LIB_el_init%g
s%@ac_cv_prog_getconf@%$ac_cv_prog_getconf%g
s%@editline_OBJS@%$editline_OBJS%g
s%@editline_dir@%$editline_dir%g
s%@GCC@%$GCC%g
s%@KERNEL_INCLUDE@%$KERNEL_INCLUDE%g
s%@KERNEL_SRCS@%$KERNEL_SRCS%g
s%@KERNEL_HDRS@%$KERNEL_HDRS%g
s%@KERNEL_CPPFLAGS@%$KERNEL_CPPFLAGS%g
s%@KERNEL_CFLAGS@%$KERNEL_CFLAGS%g
s%@KERNEL_LDFLAGS@%$KERNEL_LDFLAGS%g
s%@KERNEL_CC@%$KERNEL_CC%g
s%@KERNEL_LD@%$KERNEL_LD%g
s%@MODLOAD@%$MODLOAD%g
s%@MODUNLOAD@%$MODUNLOAD%g
s%@MODULE@%$MODULE%g
s%@XFS_SUBDIR@%$XFS_SUBDIR%g
s%@XFS_SRCS@%$XFS_SRCS%g
s%@RXKAD@%$RXKAD%g
s%@MILKO_RXKAD_LIBS@%$MILKO_RXKAD_LIBS%g
s%@MILKO_RXKAD_LIBS2@%$MILKO_RXKAD_LIBS2%g
s%@RXKAD_LIBS@%$RXKAD_LIBS%g
s%@ARLACACHEDIR@%$ARLACACHEDIR%g
s%@ARLACONFFILE@%$ARLACONFFILE%g
s%@LIB_DBM@%$LIB_DBM%g
s%@DBLIB@%$DBLIB%g
s%@AFS_EXTRA_OBJS@%$AFS_EXTRA_OBJS%g
s%@AFS_EXTRA_LIBS@%$AFS_EXTRA_LIBS%g
s%@AFS_EXTRA_LD@%$AFS_EXTRA_LD%g
s%@AFS_EXTRA_DEFS@%$AFS_EXTRA_DEFS%g
s%@AIX_EXTRA_KAFS@%$AIX_EXTRA_KAFS%g
s%@LIB_syslog@%$LIB_syslog%g
s%@LIB_socket@%$LIB_socket%g
s%@LIB_gethostbyname@%$LIB_gethostbyname%g
s%@LIB_res_search@%$LIB_res_search%g
s%@LIB_dn_expand@%$LIB_dn_expand%g
s%@LIB_krb_afslog_uid@%$LIB_krb_afslog_uid%g
s%@LIB_hstrerror@%$LIB_hstrerror%g
s%@LIBOBJS@%$LIBOBJS%g
s%@LIB_kvm_open@%$LIB_kvm_open%g
s%@LIB_kvm_nlist@%$LIB_kvm_nlist%g
s%@VNODE_IF_H@%$VNODE_IF_H%g

CEOF
EOF

cat >> $CONFIG_STATUS <<\EOF

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

cat >> $CONFIG_STATUS <<EOF

CONFIG_FILES=\${CONFIG_FILES-"Makefile				\
	include/Makefile			\
	arlad/Makefile				\
	lwp/Makefile				\
	xfs/Makefile				\
	$XFS_SUBDIR_Makefile			\
	$XFS_SUBDIR_BIN_Makefile		\
	rx/Makefile				\
	$RXKAD_MAKEFILE				\
	rxdef/Makefile				\
	appl/Makefile				\
	appl/lib/Makefile			\
	appl/asrvutil/Makefile			\
	appl/afsmgr/Makefile			\
	appl/afsutils/Makefile			\
	appl/amon/Makefile			\
	appl/fs/Makefile			\
	appl/pts/Makefile			\
	appl/udebug/Makefile			\
	appl/vos/Makefile			\
	appl/bos/Makefile			\
	doc/Makefile				\
	lib/Makefile				\
	lib/roken/Makefile			\
	lib/sl/Makefile				\
	lib/cmd/Makefile				\
	lib/editline/Makefile			\
	lib/ko/Makefile				\
	lib/acl/Makefile			\
	lib/bufdir/Makefile			\
	util/Makefile				\
	ydr/Makefile				\
	conf/Makefile				\
	conf/arla.spec				\
	milko/Makefile 				\
	milko/lib/Makefile 			\
	milko/lib/vstatus/Makefile 		\
	milko/lib/dpart/Makefile		\
	milko/lib/voldb/Makefile		\
	milko/lib/vld/Makefile			\
	milko/lib/ropa/Makefile			\
	milko/lib/msecurity/Makefile		\
	milko/lib/mlog/Makefile			\
	milko/appl/Makefile			\
	milko/appl/sked/Makefile		\
	milko/appl/perf/Makefile		\
	milko/appl/bootstrap/Makefile		\
	milko/fs/Makefile			\
	milko/vldb/Makefile			\
	milko/pts/Makefile			\
	milko/bos/Makefile			\
	tests/Makefile"}
EOF
cat >> $CONFIG_STATUS <<\EOF
for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
  case "$ac_file" in
  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  *) ac_file_in="${ac_file}.in" ;;
  esac

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

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

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

  case "$ac_given_INSTALL" in
  [/$]*) INSTALL="$ac_given_INSTALL" ;;
  *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
  esac

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

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

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

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

  echo creating $ac_file

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

EOF

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

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

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

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

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

EOF
cat >> $CONFIG_STATUS <<EOF

EOF
cat >> $CONFIG_STATUS <<\EOF

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



cat > include/${PACKAGE}-newversion.h.in <<FOOBAR
char *${PACKAGE}_long_version = "@(#)\$Version: $PACKAGE-$VERSION by @USER@ on @HOST@ ($host) @DATE@ \$";
char *${PACKAGE}_version = "$PACKAGE-$VERSION";
FOOBAR

if test -f include/${PACKAGE}-version.h && cmp -s include/${PACKAGE}-newversion.h.in include/${PACKAGE}-version.h.in; then
	echo "include/${PACKAGE}-version.h is unchanged"
	rm -f include/${PACKAGE}-newversion.h.in
else
 	echo "creating include/${PACKAGE}-version.h"
 	User=${USER-${LOGNAME}}
 	Host=`(hostname || uname -n) 2>/dev/null | sed 1q`
 	Date=`date`
	mv -f include/${PACKAGE}-newversion.h.in include/${PACKAGE}-version.h.in
	sed -e "s/@USER@/$User/" -e "s/@HOST@/$Host/" -e "s/@DATE@/$Date/" include/${PACKAGE}-version.h.in > include/${PACKAGE}-version.h
fi

