#! /bin/sh

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

# Defaults:
ac_help=
ac_default_prefix=/usr/local
# Any additions from configure.in:
ac_help="$ac_help
  --disable-all           Initially disable all features.
			    This can be used with --enable-* to pick a
			    smaller set of features more easily. Otherwise
			    unless otherwise noted all protocols are enabled."
ac_help="$ac_help
  --enable-bgmp           Enable BGMP protocol.
  --disable-bgmp          Disable BGMP protocol. (default-disabled) "
ac_help="$ac_help
  --enable-bgp            Enable BGP protocol.
  --disable-bgp           Disable BGP protocol. "
ac_help="$ac_help
  --enable-bgp4mp            Enable BGP4MP protocol.
  --disable-bgp4mp           Disable BGP4MP protocol. "
ac_help="$ac_help
  --enable-egp            Enable EGP protocol.
  --disable-egp           Disable EGP protocol. "
ac_help="$ac_help
  --enable-dvmrp          Enable DVMRP protocol.
  --disable-dvmrp         Disable DVMRP protocol. "
ac_help="$ac_help
  --enable-dvmrp-routing  Enable DVMRP routing protocol.
  --disable-dvmrp-routing Disable DVMRP routing protocol. "
ac_help="$ac_help
  --enable-gii            Enable GII interface.
  --disable-gii           Disable GII interface. "
ac_help="$ac_help
  --enable-hello          Enable Hello protocol.
  --disable-hello         Disable Hello protocol. (default-disabled) "
ac_help="$ac_help
  --enable-icmp           Enable ICMP protocol.
  --disable-icmp          Disable ICMP protocol. "
ac_help="$ac_help
  --enable-icmpv6           Enable ICMPv6 protocol.
  --disable-icmpv6          Disable ICMPv6 protocol. "
ac_help="$ac_help
  --enable-igmp           Enable IGMP protocol.
  --disable-igmp          Disable IGMP protocol. "
ac_help="$ac_help
  --enable-isis           Enable IS-IS protocol.
  --disable-isis          Disable IS-IS protocol. "
ac_help="$ac_help
  --enable-iso            Enable ISO in protocols.
  --disable-iso           Disable ISO in protocols. "
ac_help="$ac_help
  --enable-mpbgp          Enable MPBGP protocol.
  --disable-mpbgp         Disable MPBGMP protocol. (default-disabled) "
ac_help="$ac_help
  --enable-msdp           Enable OSPF protocol.
  --disable-msdp          Disable OSPF protocol. (default-disabled) "
ac_help="$ac_help
  --enable-ospf           Enable OSPF protocol.
  --disable-ospf          Disable OSPF protocol. (default-disabled if non v3.x) "
ac_help="$ac_help
  --enable-ospf2          Enable New OSPF protocol.
  --disable-ospf2         Disable New OSPF protocol. "
ac_help="$ac_help
  --enable-pimdm          Enable PIM Dense Mode protocol.
  --disable-pimdm         Disable PIM Dense Mode protocol. "
ac_help="$ac_help
  --enable-pimsm          Enable PIM Sparse Mode protocol.
  --disable-pimsm         Disable PIM Sparse Mode protocol. "
ac_help="$ac_help
  --enable-rdisc          Enable Router Discovery protocol.
  --disable-rdisc         Disable Router Discovery protocol. "
ac_help="$ac_help
  --enable-rip            Enable RIP protocol.
  --disable-rip           Disable RIP protocol. "
ac_help="$ac_help
  --enable-ripng            Enable RIPng protocol.
  --disable-ripng           Disable RIPng protocol. "
ac_help="$ac_help
  --enable-slsp           Enable SLSP protocol.
  --disable-slsp          Disable SLSP protocol. (default-disabled)"
ac_help="$ac_help
  --enable-smux           Enable SMUX/SNMP subagent support.
  --disable-smux          Disable SNMP with smux subagent support. "
ac_help="$ac_help
  --enable-rsd            Enable Route Server Daemon support.
  --disable-rsd           Enable Route Server Daemon support. (default-disabled)"
ac_help="$ac_help
  --enable-wrd            Enable Weighted Route Damping support.
  --disable-wrd           Disable Weighted Route Damping support. "
ac_help="$ac_help
  --enable-developer      Enable all compiler warnings (gcc only).
  --disable-developer     Disable all compiler warnings (default-disabled). "
ac_help="$ac_help
  --enable-dist           Run for \"make dist\" only.
  --disable-dist          Don't run for \"make dist\" only. (default). "

# 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=src/gated/task.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


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:645: 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'

echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
echo "configure:698: checking whether build environment is sane" >&5
# Just in case
sleep 1
echo timestamp > conftestfile
# Do `set' in a subshell so we don't clobber the current shell's
# arguments.  Must try -L first in case configure is actually a
# symlink; some systems play weird games with the mod time of symlinks
# (eg FreeBSD returns the mod time of the symlink's containing
# directory).
if (
   set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
   if test "$*" = "X"; then
      # -L didn't work.
      set X `ls -t $srcdir/configure conftestfile`
   fi
   if test "$*" != "X $srcdir/configure conftestfile" \
      && test "$*" != "X conftestfile $srcdir/configure"; then

      # If neither matched, then we have a broken ls.  This can happen
      # if, for instance, CONFIG_SHELL is bash and it inherits a
      # broken ls alias from the environment.  This has actually
      # happened.  Such a system could not be considered "sane".
      { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
alias in your environment" 1>&2; exit 1; }
   fi

   test "$2" = conftestfile
   )
then
   # Ok.
   :
else
   { echo "configure: error: newly created file is older than distributed files!
Check your system clock" 1>&2; exit 1; }
fi
rm -f conftest*
echo "$ac_t""yes" 1>&6
if test "$program_transform_name" = s,x,x,; then
  program_transform_name=
else
  # Double any \ or $.  echo might interpret backslashes.
  cat <<\EOF_SED > conftestsed
s,\\,\\\\,g; s,\$,$$,g
EOF_SED
  program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
  rm -f conftestsed
fi
test "$program_prefix" != NONE &&
  program_transform_name="s,^,${program_prefix},; $program_transform_name"
# Use a double $ so make ignores it.
test "$program_suffix" != NONE &&
  program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"

# sed with no file args requires a program.
test "$program_transform_name" = "" && program_transform_name="s,x,x,"

echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
echo "configure:755: 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


PACKAGE=gated

VERSION=public-v6-snapshot000127

if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
  { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
fi
cat >> confdefs.h <<EOF
#define PACKAGE "$PACKAGE"
EOF

cat >> confdefs.h <<EOF
#define VERSION "$VERSION"
EOF



missing_dir=`cd $ac_aux_dir && pwd`
echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
echo "configure:801: checking for working aclocal" >&5
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf.  Sigh.
if (aclocal --version) < /dev/null > /dev/null 2>&1; then
   ACLOCAL=aclocal
   echo "$ac_t""found" 1>&6
else
   ACLOCAL="$missing_dir/missing aclocal"
   echo "$ac_t""missing" 1>&6
fi

echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
echo "configure:814: checking for working autoconf" >&5
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf.  Sigh.
if (autoconf --version) < /dev/null > /dev/null 2>&1; then
   AUTOCONF=autoconf
   echo "$ac_t""found" 1>&6
else
   AUTOCONF="$missing_dir/missing autoconf"
   echo "$ac_t""missing" 1>&6
fi

echo $ac_n "checking for working automake""... $ac_c" 1>&6
echo "configure:827: checking for working automake" >&5
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf.  Sigh.
if (automake --version) < /dev/null > /dev/null 2>&1; then
   AUTOMAKE=automake
   echo "$ac_t""found" 1>&6
else
   AUTOMAKE="$missing_dir/missing automake"
   echo "$ac_t""missing" 1>&6
fi

echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
echo "configure:840: checking for working autoheader" >&5
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf.  Sigh.
if (autoheader --version) < /dev/null > /dev/null 2>&1; then
   AUTOHEADER=autoheader
   echo "$ac_t""found" 1>&6
else
   AUTOHEADER="$missing_dir/missing autoheader"
   echo "$ac_t""missing" 1>&6
fi

echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
echo "configure:853: checking for working makeinfo" >&5
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf.  Sigh.
if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
   MAKEINFO=makeinfo
   echo "$ac_t""found" 1>&6
else
   MAKEINFO="$missing_dir/missing makeinfo"
   echo "$ac_t""missing" 1>&6
fi







enabled_proto=
enabled_v3_proto=
enabled_v34_proto=
enabled_v4_proto=
enabled_v6_proto=
enabled_mcast_proto=
enabled_iso_proto=
enabled_param=
disabled_proto=
disabled_param=

all_dirs_v3="aspath bgp egp gated gatedcompat gdc gii icmp inet iso krt \
	 krt_multi krt_os ospf ospf_monitor \
	 rdisc rip ripquery scram slsp smux"

all_dirs_v4="aspath bgp egp gated gatedcompat gdc gii icmp inet \
	iso krt krt_multi krt_os new_isis new_ospf \
	ospf ospf_monitor rdisc rip ripquery scram slsp wrd smux"

all_dirs_v5="aspath bgmp cbt dvmrp dvmrp_routing dwr gated \
	gatedcompat gdc gii igmp inet iso krt krt_multi krt_os \
	mcore mpbgp msdp pim pimdm pimsm rip ripquery \
	scram smux"

all_dirs_v6="aspath bgp bgp4mp gated gatedcompat gdc gii icmpv6 inet6 \
	krt krt_ipv6multi krt_multi krt_os mld6 ripng rip6query \
	scram smux"






















# Check whether --enable-all or --disable-all was given.
if test "${enable_all+set}" = set; then
  enableval="$enable_all"
  
			    if test $enableval = yes; then
				echo "no option --enable-all"
				exit 1
			    fi 
else
  
			    #
			    # we don't let the user set this to yes
			    # becuase it really just means don't disable all
			    #
			    enable_all=yes
			    
fi


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


# Check whether --enable-bgp or --disable-bgp was given.
if test "${enable_bgp+set}" = set; then
  enableval="$enable_bgp"
  
	if test $enableval = yes; then
		enabled_proto="$enabled_proto bgp"
	else
		disabled_proto="$disabled_proto bgp"
	fi
	
else
  
		if test $enable_all = no; then
			disabled_proto="$disabled_proto bgp"
			bgp=no
		else
			enabled_v34_proto="$enabled_v34_proto bgp"
			bgp=yes
		fi
	
fi


# Check whether --enable-bgp4mp or --disable-bgp4mp was given.
if test "${enable_bgp4mp+set}" = set; then
  enableval="$enable_bgp4mp"
  
	if test $enableval = yes; then
		enabled_proto="$enabled_proto bgp4mp"
	else
		disabled_proto="$disabled_proto bgp4mp"
	fi
	
else
  
	if test $enable_all = no; then
		disabled_proto="$disabled_proto bgp4mp"
		bgp4mp=no
	else
		enabled_v6_proto="$enabled_v6_proto bgp4mp"
		bgp4mp=yes
	fi
	
fi


# Check whether --enable-egp or --disable-egp was given.
if test "${enable_egp+set}" = set; then
  enableval="$enable_egp"
  
	if test $enableval = yes; then
		enabled_proto="$enabled_proto egp"
	else
		disabled_proto="$disabled_proto egp"
	fi
	
else
  
		if test $enable_all = no; then
			disabled_proto="$disabled_proto egp"
			egp=no
		else
			enabled_v34_proto="$enabled_v34_proto egp"
			egp=yes
		fi
	
fi


# Check whether --enable-dvmrp or --disable-dvmrp was given.
if test "${enable_dvmrp+set}" = set; then
  enableval="$enable_dvmrp"
  
	if test $enableval = yes; then
		enabled_proto="$enabled_proto dvmrp"
	else
		disabled_proto="$disabled_proto dvmrp"
	fi
	
else
  
		if test $enable_all = no; then
			disabled_proto="$disabled_proto dvmrp"
			dvmrp=no
		else
			enabled_v5_proto="$enabled_v5_proto dvmrp"
			dvmrp=yes
		fi
	
fi


# Check whether --enable-dvmrp-routing or --disable-dvmrp-routing was given.
if test "${enable_dvmrp_routing+set}" = set; then
  enableval="$enable_dvmrp_routing"
  
	if test $enableval = yes; then
		enabled_proto="$enabled_proto dvmrp_routing"
	else
		disabled_proto="$disabled_proto dvmrp_routing"
	fi
	
else
  
		if test $enable_all = no; then
			disabled_proto="$disabled_proto dvmrp_routing"
			dvmrp_routing=no
		else
			enabled_v5_proto="$enabled_v5_proto dvmrp_routing"
			dvmrp_routing=yes
		fi
	
fi


# Check whether --enable-gii or --disable-gii was given.
if test "${enable_gii+set}" = set; then
  enableval="$enable_gii"
  
	if test $enableval = yes; then
		enabled_proto="$enabled_proto gii"
	else
		disabled_proto="$disabled_proto gii"
	fi
	
else
  
		if test $enable_all = no; then
			disabled_proto="$disabled_proto gii"
			gii=no
		else
			enabled_v34_proto="$enabled_v34_proto gii"
			gii=yes
		fi
	
fi


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


# Check whether --enable-icmp or --disable-icmp was given.
if test "${enable_icmp+set}" = set; then
  enableval="$enable_icmp"
  
	if test $enableval = yes; then
		enabled_proto="$enabled_proto icmp"
	else
		disabled_proto="$disabled_proto icmp"
	fi
	
else
  
		if test $enable_all = no; then
			disabled_proto="$disabled_proto icmp"
			icmp=no
		else
			enabled_v34_proto="$enabled_v34_proto icmp"
			icmp=yes
		fi
	
fi


# Check whether --enable-icmpv6 or --disable-icmpv6 was given.
if test "${enable_icmpv6+set}" = set; then
  enableval="$enable_icmpv6"
  
	if test $enableval = yes; then
		enabled_proto="$enabled_proto icmpv6"
	else
		disabled_proto="$disabled_proto icmpv6"
	fi
	
else
  
	if test $enable_all = no; then
		disabled_proto="$disabled_proto icmpv6"
		icmpv6=no
	else
		enabled_v6_proto="$enabled_v6_proto icmpv6"
		icmpv6=yes
	fi
	
fi


# Check whether --enable-igmp or --disable-igmp was given.
if test "${enable_igmp+set}" = set; then
  enableval="$enable_igmp"
  
	if test $enableval = yes; then
		enabled_proto="$enabled_proto igmp"
	else
		disabled_proto="$disabled_proto igmp"
	fi
	
else
  
		if test $enable_all = no; then
			disabled_proto="$disabled_proto igmp"
			igmp=no
		else
			enabled_v5_proto="$enabled_v5_proto igmp"
			igmp=yes
		fi
	
fi


# Check whether --enable-isis or --disable-isis was given.
if test "${enable_isis+set}" = set; then
  enableval="$enable_isis"
  
	if test $enableval = yes; then
		enabled_proto="$enabled_proto isis2"
	else
		disabled_proto="$disabled_proto isis2"
	fi
	
else
  
		if test $enable_all = no; then
			disabled_proto="$disabled_proto isis2"
			isis2=no
		else
			enabled_v4_proto="$enabled_v4_proto isis2"
			isis2=yes
		fi
	
fi


# Check whether --enable-isis or --disable-isis was given.
if test "${enable_isis+set}" = set; then
  enableval="$enable_isis"
  
	if test $enableval = yes; then
		enabled_proto="$enabled_proto iso"
	else
		disabled_proto="$disabled_proto iso"
	fi
	
else
  
		if test $enable_all = no; then
			disabled_proto="$disabled_proto iso"
			iso=no
		else
			enabled_iso_proto="$enabled_iso_proto iso"
			iso=yes
		fi
	
fi


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


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


# Check whether --enable-ospf or --disable-ospf was given.
if test "${enable_ospf+set}" = set; then
  enableval="$enable_ospf"
  
	if test $enableval = yes; then
		enabled_proto="$enabled_proto ospf"
	else
		disabled_proto="$disabled_proto ospf"
	fi
	
else
  
		if test $enable_all = no; then
			disabled_proto="$disabled_proto ospf"
			ospf=no
		else
			enabled_v3_proto="$enabled_v3_proto ospf"
			ospf=yes
		fi
	
fi


# Check whether --enable-ospf2 or --disable-ospf2 was given.
if test "${enable_ospf2+set}" = set; then
  enableval="$enable_ospf2"
  
	if test $enableval = yes; then
		enabled_proto="$enabled_proto ospf2"
	else
		disabled_proto="$disabled_proto ospf2"
	fi
	
else
  
		if test $enable_all = no; then
			disabled_proto="$disabled_proto ospf2"
			ospf2=no
		else
			enabled_v4_proto="$enabled_v4_proto ospf2"
			ospf2=yes
		fi
	
fi


# Check whether --enable-pimdm or --disable-pimdm was given.
if test "${enable_pimdm+set}" = set; then
  enableval="$enable_pimdm"
  
	if test $enableval = yes; then
		enabled_proto="$enabled_proto pimdm"
	else
		disabled_proto="$disabled_proto pimdm"
	fi
	
else
  
		if test $enable_all = no; then
			disabled_proto="$disabled_proto pimdm"
			pimdm=no
		else
			enabled_v5_proto="$enabled_v5_proto pimdm"
			pimdm=yes
		fi
	
fi


# Check whether --enable-pimsm or --disable-pimsm was given.
if test "${enable_pimsm+set}" = set; then
  enableval="$enable_pimsm"
  
	if test $enableval = yes; then
		enabled_proto="$enabled_proto pimsm"
	else
		disabled_proto="$disabled_proto pimsm"
	fi
	
else
  
		if test $enable_all = no; then
			disabled_proto="$disabled_proto pimsm"
			pimsm=no
		else
			enabled_v5_proto="$enabled_v5_proto pimsm"
			pimsm=yes
		fi
	
fi


# Check whether --enable-rdisc or --disable-rdisc was given.
if test "${enable_rdisc+set}" = set; then
  enableval="$enable_rdisc"
  
	if test $enableval = yes; then
		enabled_proto="$enabled_proto rdisc"
	else
		disabled_proto="$disabled_proto rdisc"
	fi
	
else
  
		if test $enable_all = no; then
			disabled_proto="$disabled_proto rdisc"
			rdisc=no
		else
			enabled_v34_proto="$enabled_v34_proto rdisc"
			rdisc=yes
		fi
	
fi


# Check whether --enable-rip or --disable-rip was given.
if test "${enable_rip+set}" = set; then
  enableval="$enable_rip"
  
	if test $enableval = yes; then
		enabled_proto="$enabled_proto rip"
	else
		disabled_proto="$disabled_proto rip"
	fi
	
else
  
		if test $enable_all = no; then
			disabled_proto="$disabled_proto rip"
			rip=no
		else
			enabled_v34_proto="$enabled_v34_proto rip"
			rip=yes
		fi
	
fi


# Check whether --enable-ripng or --disable-ripng was given.
if test "${enable_ripng+set}" = set; then
  enableval="$enable_ripng"
  
	if test $enableval = yes; then
		enabled_proto="$enabled_proto ripng"
	else
		disabled_proto="$disabled_proto ripng"
	fi
	
else
  
	if test $enable_all = no; then
		disabled_proto="$disabled_proto ripng"
		ripng=no
	else
		enabled_v6_proto="$enabled_v6_proto ripng"
		ripng=yes
	fi
	
fi


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


# Check whether --enable-smux or --disable-smux was given.
if test "${enable_smux+set}" = set; then
  enableval="$enable_smux"
  
	if test $enableval = yes; then
		enabled_proto="$enabled_proto smux"
	else
		disabled_proto="$disabled_proto smux"
	fi
	
else
  
		if test $enable_all = no; then
			disabled_proto="$disabled_proto smux"
			smux=no
		else
			enabled_host_proto="$enabled_host_proto smux"
			smux=yes
		fi
	
fi


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


# Check whether --enable-wrd or --disable-wrd was given.
if test "${enable_wrd+set}" = set; then
  enableval="$enable_wrd"
  
	if test $enableval = yes; then
		enabled_proto="$enabled_proto wrd"
	else
		disabled_proto="$disabled_proto wrd"
	fi
	
else
  
		if test $enable_all = no; then
			disabled_proto="$disabled_proto wrd"
			wrd=no
		else
			enabled_v4_proto="$enabled_v4_proto wrd"
			wrd=yes
		fi
	
fi


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


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


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

test -n "$AWK" && break
done

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:1582: 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"

# 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:1615: 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:1645: 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:1696: 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:1728: 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 1739 "configure"
#include "confdefs.h"

main(){return(0);}
EOF
if { (eval echo configure:1744: \"$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:1770: 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:1775: 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:1784: \"$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:1803: checking whether ${CC-cc} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  echo 'void f(){}' > conftest.c
if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
  ac_cv_prog_cc_g=yes
else
  ac_cv_prog_cc_g=no
fi
rm -f conftest*

fi

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

echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
echo "configure:1835: 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 1850 "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:1856: \"$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 1867 "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:1873: \"$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 1884 "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:1890: \"$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

missing_dir=`cd $ac_aux_dir && pwd`
for ac_prog in flex lex
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:1920: 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="$ac_prog"
      break
    fi
  done
  IFS="$ac_save_ifs"
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

test -n "$LEX" && break
done
test -n "$LEX" || LEX=""$missing_dir/missing flex""

# 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:1953: 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:1987: 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 1995 "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:2006: \"$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

echo $ac_n "checking lex output file root""... $ac_c" 1>&6
echo "configure:2029: checking lex output file root" >&5
if eval "test \"`echo '$''{'ac_cv_prog_lex_root'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  # The minimal lex program is just a single line: %%.  But some broken lexes
# (Solaris, I think it was) want two %% lines, so accommodate them.
echo '%%
%%' | $LEX
if test -f lex.yy.c; then
  ac_cv_prog_lex_root=lex.yy
elif test -f lexyy.c; then
  ac_cv_prog_lex_root=lexyy
else
  { echo "configure: error: cannot find output from $LEX; giving up" 1>&2; exit 1; }
fi
fi

echo "$ac_t""$ac_cv_prog_lex_root" 1>&6
LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root

echo $ac_n "checking whether yytext is a pointer""... $ac_c" 1>&6
echo "configure:2050: checking whether yytext is a pointer" >&5
if eval "test \"`echo '$''{'ac_cv_prog_lex_yytext_pointer'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  # POSIX says lex can declare yytext either as a pointer or an array; the
# default is implementation-dependent. Figure out which it is, since
# not all implementations provide the %pointer and %array declarations.
ac_cv_prog_lex_yytext_pointer=no
echo 'extern char *yytext;' >>$LEX_OUTPUT_ROOT.c
ac_save_LIBS="$LIBS"
LIBS="$LIBS $LEXLIB"
cat > conftest.$ac_ext <<EOF
#line 2062 "configure"
#include "confdefs.h"
`cat $LEX_OUTPUT_ROOT.c`
int main() {

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

fi

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

fi

# 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:2102: 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'

echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
echo "configure:2155: 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

echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
echo "configure:2176: 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

echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
echo "configure:2203: 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 2218 "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:2224: \"$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 2235 "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:2241: \"$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 2252 "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:2258: \"$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

# 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:2285: 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

for ac_prog in vmunix hp-ux kernel unix netbsd bsd xenix mach dgux syst\
 arix irix genunix
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:2318: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_kernel'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$kernel" in
  /*)
  ac_cv_path_kernel="$kernel" # Let the user override the test with a path.
  ;;
  ?:/*)			 
  ac_cv_path_kernel="$kernel" # Let the user override the test with a dos path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="/:/kernel:/stand"
  for ac_dir in $ac_dummy; do 
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_path_kernel="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  ;;
esac
fi
kernel="$ac_cv_path_kernel"
if test -n "$kernel"; then
  echo "$ac_t""$kernel" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

test -n "$kernel" && break
done
test -n "$kernel" || kernel="unknown"

cat >> confdefs.h <<EOF
#define KERNEL_FNAME "$ac_cv_path_kernel"
EOF


echo $ac_n "checking which directory to use for PIDDIR""... $ac_c" 1>&6
echo "configure:2360: checking which directory to use for PIDDIR" >&5
if eval "test \"`echo '$''{'ac_cv_dir_PIDDIR'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  for ac_var in /var/run /etc; do
   if test -d $ac_var; then
      ac_cv_dir_PIDDIR="$ac_var"
      break
   fi
done

fi

PIDDIR="$ac_cv_dir_PIDDIR"

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

echo $ac_n "checking which directory to use for DUMPDIR""... $ac_c" 1>&6
echo "configure:2378: checking which directory to use for DUMPDIR" >&5
if eval "test \"`echo '$''{'ac_cv_dir_DUMPDIR'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  for ac_var in /var/tmp /usr/tmp; do
   if test -d $ac_var; then
      ac_cv_dir_DUMPDIR="$ac_var"
      break
   fi
done

fi

DUMPDIR="$ac_cv_dir_DUMPDIR"

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

echo $ac_n "checking which directory to use for SBINDIR""... $ac_c" 1>&6
echo "configure:2396: checking which directory to use for SBINDIR" >&5
if eval "test \"`echo '$''{'ac_cv_dir_SBINDIR'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  for ac_var in /usr/contrib/bin /usr/local/sbin /usr/sbin /sbin \
 /usr/local/etc /usr/etc /etc; do
   if test -d $ac_var; then
      ac_cv_dir_SBINDIR="$ac_var"
      break
   fi
done

fi

SBINDIR="$ac_cv_dir_SBINDIR"

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

echo $ac_n "checking which directory to use for BINDIR""... $ac_c" 1>&6
echo "configure:2415: checking which directory to use for BINDIR" >&5
if eval "test \"`echo '$''{'ac_cv_dir_BINDIR'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  for ac_var in /usr/contrib/bin /usr/local/bin /usr/bin /usr/etc /etc; do
   if test -d $ac_var; then
      ac_cv_dir_BINDIR="$ac_var"
      break
   fi
done

fi

BINDIR="$ac_cv_dir_BINDIR"

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

echo $ac_n "checking which directory to use for IPV6_NETINET6""... $ac_c" 1>&6
echo "configure:2433: checking which directory to use for IPV6_NETINET6" >&5
if eval "test \"`echo '$''{'ac_cv_dir_IPV6_NETINET6'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  for ac_var in /usr/include/netinet6; do
   if test -d $ac_var; then
      ac_cv_dir_IPV6_NETINET6="$ac_var"
      break
   fi
done

fi

IPV6_NETINET6="$ac_cv_dir_IPV6_NETINET6"

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


echo $ac_n "checking for res_query in -lresolv""... $ac_c" 1>&6
echo "configure:2452: checking for res_query in -lresolv" >&5
ac_lib_var=`echo resolv'_'res_query | 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="-lresolv  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 2460 "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 res_query();

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

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

  LIBS="-lresolv $LIBS"

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

echo $ac_n "checking for inet_aton in -lresolv""... $ac_c" 1>&6
echo "configure:2499: checking for inet_aton in -lresolv" >&5
ac_lib_var=`echo resolv'_'inet_aton | 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="-lresolv  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 2507 "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 inet_aton();

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

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

  LIBS="-lresolv $LIBS"

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

echo $ac_n "checking for ceil in -lm""... $ac_c" 1>&6
echo "configure:2546: checking for ceil in -lm" >&5
ac_lib_var=`echo m'_'ceil | 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="-lm  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 2554 "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 ceil();

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

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

  LIBS="-lm $LIBS"

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


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

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

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

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

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

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

fi

echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
echo "configure:2719: 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 2724 "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:2732: \"$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 2749 "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 2767 "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 2788 "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:2799: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  :
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_header_stdc=no
fi
rm -fr conftest*
fi

fi
fi

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

fi

echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
echo "configure:2823: checking for sys/wait.h that is POSIX.1 compatible" >&5
if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 2828 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/wait.h>
#ifndef WEXITSTATUS
#define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
#endif
#ifndef WIFEXITED
#define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
#endif
int main() {
int s;
wait (&s);
s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
; return 0; }
EOF
if { (eval echo configure:2844: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_header_sys_wait_h=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_header_sys_wait_h=no
fi
rm -f conftest*
fi

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

fi

for ac_hdr in bstring.h fcntl.h nlist.h stdlib.h inet/ip.h inet/led.h inet/mib2.h \
 kvm.h malloc.h arpa/inet.h inet/nd.h net/if.h net/if_dl.h netinet/if_ether.h \
 net/if_arp.h net/if_var.h netinet/in_systm.h netinet/in_var.h netinet/in.h \
 netinet/ip_mroute.h netinet/ip_var.h netinet/tcpip.h netinet/udp_var.h \
 netinet/icmp6.h \
 netiso/iso.h paths.h string.h sys/dlpi.h sys/cdefs.h sys/dmap.h \
 sys/file.h sys/ioctl.h sys/mbuf.h sys/mman.h sys/proc.h sys/queue.h sys/sockio.h \
 sys/stropts.h sys/sysinfo.h sys/systeminfo.h sys/time.h sys/vm.h syslog.h \
 unistd.h xti.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:2876: 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 2881 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2886: \"$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


MKDEP_FILE="$srcdir/util/make-depend"
echo $ac_n "checking how to calculate deps""... $ac_c" 1>&6
echo "configure:2915: checking how to calculate deps" >&5
if test $ac_cv_prog_CC = gcc; then
				MKDEP="\$(top_srcdir)/util/mkdep"
else
				
ac_safe=`echo "makedepend" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for makedepend""... $ac_c" 1>&6
echo "configure:2922: checking for makedepend" >&5
if eval "test \"`echo '$''{'ac_cv_file_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
    { echo "configure: error: Cannot check for file existence when cross compiling" 1>&2; exit 1; }
else
  if test -r makedepend; then
    eval "ac_cv_file_$ac_safe=yes"
  else
    eval "ac_cv_file_$ac_safe=no"
  fi
fi
fi
if eval "test \"`echo '$ac_cv_file_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  has_makedepend=yes
else
  echo "$ac_t""no" 1>&6
has_makedepend=no
fi

	if test $has_makedepend = yes; then
		MKDEP="makedepend"
	else
		
ac_safe=`echo "mkdep" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for mkdep""... $ac_c" 1>&6
echo "configure:2950: checking for mkdep" >&5
if eval "test \"`echo '$''{'ac_cv_file_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
    { echo "configure: error: Cannot check for file existence when cross compiling" 1>&2; exit 1; }
else
  if test -r mkdep; then
    eval "ac_cv_file_$ac_safe=yes"
  else
    eval "ac_cv_file_$ac_safe=no"
  fi
fi
fi
if eval "test \"`echo '$ac_cv_file_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  has_mkdep=yes
else
  echo "$ac_t""no" 1>&6
has_mkdep=no
fi

		if test $has_mkdep = yes; then
			MKDEP="mkdep"
		else
			MKDEP=""
			MKDEP_FILE="/dev/null"
		fi
	fi
fi
echo "$ac_t""$MKDEP" 1>&6




echo $ac_n "checking for working const""... $ac_c" 1>&6
echo "configure:2986: 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 2991 "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:3040: \"$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:3061: 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 3068 "configure"
#include "confdefs.h"

int main() {
} $ac_kw foo() {
; return 0; }
EOF
if { (eval echo configure:3075: \"$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 UNUSED""... $ac_c" 1>&6
echo "configure:3101: checking for UNUSED" >&5
if eval "test \"`echo '$''{'ac_cv_c_unused'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_cv_c_unused=no
for ac_kw in unused __unused__ '__attribute__((__unused__))'; do
  cat > conftest.$ac_ext <<EOF
#line 3108 "configure"
#include "confdefs.h"

int main() {
} $ac_kw foo() {
; return 0; }
EOF
if { (eval echo configure:3115: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_c_unused=$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_unused" 1>&6
case "$ac_cv_c_unused" in
  inline | yes) ;;
  no) cat >> confdefs.h <<\EOF
#define UNUSED 
EOF
 ;;
  *)  cat >> confdefs.h <<EOF
#define UNUSED $ac_cv_c_unused
EOF
 ;;
esac

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

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

fi

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

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

fi

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

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

fi

echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
echo "configure:3240: 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 3245 "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:3254: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_header_time=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_header_time=no
fi
rm -f conftest*
fi

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

fi

echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
echo "configure:3275: checking whether struct tm is in sys/time.h or time.h" >&5
if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 3280 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <time.h>
int main() {
struct tm *tp; tp->tm_sec;
; return 0; }
EOF
if { (eval echo configure:3288: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_struct_tm=time.h
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_struct_tm=sys/time.h
fi
rm -f conftest*
fi

echo "$ac_t""$ac_cv_struct_tm" 1>&6
if test $ac_cv_struct_tm = sys/time.h; then
  cat >> confdefs.h <<\EOF
#define TM_IN_SYS_TIME 1
EOF

fi

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

fi

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

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

fi

cat > conftest.$ac_ext <<EOF
#line 3343 "configure"
#include "confdefs.h"
#include <sys/socket.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "[[:space:]]sa_len" >/dev/null 2>&1; then
  rm -rf conftest*
  cat >> confdefs.h <<\EOF
#define USE_SOCKLEN 1
EOF

fi
rm -f conftest*

echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
echo "configure:3358: checking whether byte ordering is bigendian" >&5
if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_cv_c_bigendian=unknown
# See if sys/param.h defines the BYTE_ORDER macro.
cat > conftest.$ac_ext <<EOF
#line 3365 "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:3376: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  # It does; now see whether it defined to BIG_ENDIAN or not.
cat > conftest.$ac_ext <<EOF
#line 3380 "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:3391: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_c_bigendian=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_c_bigendian=no
fi
rm -f conftest*
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
fi
rm -f conftest*
if test $ac_cv_c_bigendian = unknown; then
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 3411 "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:3424: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  ac_cv_c_bigendian=no
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_c_bigendian=yes
fi
rm -fr conftest*
fi

fi
fi

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

fi

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

fi
echo "$ac_t""$ac_cv_sizeof_long" 1>&6
cat >> confdefs.h <<EOF
#define SIZEOF_LONG $ac_cv_sizeof_long
EOF


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

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


if test -f /dev/nit; then
   cat >> confdefs.h <<\EOF
#define HAVE_DEV_NIT 1
EOF

   if eval "test \"`echo '$''{'ac_cv_file_dev_nit'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_cv_file_dev_nit=yes
fi

fi

echo $ac_n "checking for __P in sys/cdefs.h""... $ac_c" 1>&6
echo "configure:3539: checking for __P in sys/cdefs.h" >&5
if eval "test \"`echo '$''{'ac_cv_sys_cdefs_h_has_P'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
   cat > conftest.$ac_ext <<EOF
#line 3544 "configure"
#include "confdefs.h"

#ifdef HAVE_SYS_CDEFS_H
#include <sys/cdefs.h>
#endif
#ifdef __P
xxxyesxxx
#endif

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

fi

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

fi


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

fi

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

fi

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

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

fi

echo $ac_n "checking if we can use ioctl() to manipulate the routing table""... $ac_c" 1>&6
echo "configure:3650: checking if we can use ioctl() to manipulate the routing table" >&5
cat > conftest.$ac_ext <<EOF
#line 3652 "configure"
#include "confdefs.h"
#define _INCLUDE_HPUX_SOURCE
 #include <sys/sockio.h>
 #include <sys/ioctl.h>
 #ifdef SIOCADDRT
  wooj
 #endif

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

echo "$ac_t""$ac_cv_have_rt_ioctl" 1>&6
if test $ac_cv_have_rt_ioctl = yes -a $ac_cv_header_sys_sockio.h = yes; then
  cat >> confdefs.h <<\EOF
#define HAVE_RT_IOCTL 1
EOF

fi

echo $ac_n "checking for special os's""... $ac_c" 1>&6
echo "configure:3681: checking for special os's" >&5
uname_r=`uname -r`
uname_s=`uname -s`
hp_ux_102=no
hp_ux_110=no
linux=no
if test x$uname_s = xHP-UX -a x$uname_r = xB.10.20; then
	hp_ux_102=yes
	echo "$ac_t""$uname_s $uname_r" 1>&6
elif test x$uname_s = xHP-UX -a x$uname_r = xB.11.00; then
	hp_ux_110=yes
	echo "$ac_t""$uname_s $uname_r" 1>&6
elif test x$uname_s = xLinux; then
	linux=yes
	echo "$ac_t""$uname_s $uname_r" 1>&6
else
	echo "$ac_t""no" 1>&6
fi


netlink=no
if test $linux = yes; then
	echo $ac_n "checking for rtnetlink.h""... $ac_c" 1>&6
echo "configure:3704: checking for rtnetlink.h" >&5
	if test -e /usr/include/linux/rtnetlink.h; then
		netlink=yes
		cat >> confdefs.h <<\EOF
#define HAVE_NETLINK 1
EOF

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

echo $ac_n "checking if ip_mroute.h hides struct igmpmsg in KERNEL defines""... $ac_c" 1>&6
echo "configure:3718: checking if ip_mroute.h hides struct igmpmsg in KERNEL defines" >&5 
cat > conftest.$ac_ext <<EOF
#line 3720 "configure"
#include "confdefs.h"
#include <netinet/ip_mroute.h>
 #ifdef IGMPMSG_NOCACHE
  wooj
 #endif

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


if test $ac_cv_ip_mroute_need_kernel = unknown; then
  cat > conftest.$ac_ext <<EOF
#line 3741 "configure"
#include "confdefs.h"
#define KERNEL
   #define _KERNEL
   #include <netinet/ip_mroute.h>
   #ifdef IGMPMSG_NOCACHE
    wooj
   #endif
  
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "wooj" >/dev/null 2>&1; then
  rm -rf conftest*
  ac_cv_ip_mroute_need_kernel=kernel
fi
rm -f conftest*

fi		

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

fi

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

fi
rm -f conftest*

cat > conftest.$ac_ext <<EOF
#line 3784 "configure"
#include "confdefs.h"
#include <net/if.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "if_addrlist" >/dev/null 2>&1; then
  rm -rf conftest*
  ac_cv_use_if_addrlist=yes
else
  rm -rf conftest*
  ac_cv_use_if_addrlist=no
fi
rm -f conftest*

cat > conftest.$ac_ext <<EOF
#line 3799 "configure"
#include "confdefs.h"
#include <net/if_var.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "if_addrhead" >/dev/null 2>&1; then
  rm -rf conftest*
  ac_cv_use_if_addrhead=yes
else
  rm -rf conftest*
  ac_cv_use_if_addrhead=no
fi
rm -f conftest*

cat > conftest.$ac_ext <<EOF
#line 3814 "configure"
#include "confdefs.h"
#include <netinet/in_var.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "ia_list" >/dev/null 2>&1; then
  rm -rf conftest*
  ac_cv_use_ia_list=yes
else
  rm -rf conftest*
  ac_cv_use_ia_list=no
fi
rm -f conftest*

cat > conftest.$ac_ext <<EOF
#line 3829 "configure"
#include "confdefs.h"
#include <netinet/in_var.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "ia_link" >/dev/null 2>&1; then
  rm -rf conftest*
  ac_cv_use_ia_link=yes
else
  rm -rf conftest*
  ac_cv_use_ia_link=no
fi
rm -f conftest*

cat > conftest.$ac_ext <<EOF
#line 3844 "configure"
#include "confdefs.h"
#include <net/if.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "if_list" >/dev/null 2>&1; then
  rm -rf conftest*
  ac_cv_use_if_list=yes
else
  rm -rf conftest*
  ac_cv_use_if_list=no
fi
rm -f conftest*

cat > conftest.$ac_ext <<EOF
#line 3859 "configure"
#include "confdefs.h"
#include <net/if_var.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "if_link" >/dev/null 2>&1; then
  rm -rf conftest*
  ac_cv_use_if_link=yes
else
  rm -rf conftest*
  ac_cv_use_if_link=no
fi
rm -f conftest*

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

fi
rm -f conftest*

cat > conftest.$ac_ext <<EOF
#line 3889 "configure"
#include "confdefs.h"
#include <net/route.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "radix_node_head" >/dev/null 2>&1; then
  rm -rf conftest*
  ac_cv_have_radix_node_head=yes
else
  rm -rf conftest*
  ac_cv_have_radix_node_head=no
fi
rm -f conftest*

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

fi
rm -f conftest*

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

fi
rm -f conftest*

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

fi
rm -f conftest*

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

fi
rm -f conftest*

if test $linux != yes; then
   cat > conftest.$ac_ext <<EOF
#line 3965 "configure"
#include "confdefs.h"
#include <sys/socket.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "msg_control" >/dev/null 2>&1; then
  rm -rf conftest*
  cat >> confdefs.h <<\EOF
#define USE_MSGHDR_CONTROLFIELDS 1
EOF

fi
rm -f conftest*

fi
cat > conftest.$ac_ext <<EOF
#line 3981 "configure"
#include "confdefs.h"
#include <sys/socket.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "[[:space:]]sa_len" >/dev/null 2>&1; then
  rm -rf conftest*
  cat >> confdefs.h <<\EOF
#define USE_SOCKLEN 1
EOF

fi
rm -f conftest*

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

fi
rm -f conftest*

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

fi
rm -f conftest*

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

fi
rm -f conftest*

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

fi
rm -f conftest*

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

fi
rm -f conftest*

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

fi
rm -f conftest*

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

fi
rm -f conftest*

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

fi
rm -f conftest*

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

fi
rm -f conftest*

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

fi
rm -f conftest*


if test $ac_cv_have_radix_node_head = yes; then
    cat >> confdefs.h <<\EOF
#define HAVE_RADIX_NODE_HEAD 1
EOF

    echo $ac_n "checking if radix_node_head has usable fields for krt_rtread_radix""... $ac_c" 1>&6
echo "configure:4152: checking if radix_node_head has usable fields for krt_rtread_radix" >&5
    cat > conftest.$ac_ext <<EOF
#line 4154 "configure"
#include "confdefs.h"
#include <net/route.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "rnh_next" >/dev/null 2>&1; then
  rm -rf conftest*
  ac_cv_radix_usable=yes
else
  rm -rf conftest*
  ac_cv_radix_usable=no
fi
rm -f conftest*

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

    fi
else
    ac_cv_radix_usable=no
fi

if test $ac_cv_use_if_addrlist = yes; then
    echo $ac_n "checking if if_addrlist is a TAILQ_ENTRY""... $ac_c" 1>&6
echo "configure:4181: checking if if_addrlist is a TAILQ_ENTRY" >&5
    cat > conftest.$ac_ext <<EOF
#line 4183 "configure"
#include "confdefs.h"
#include <net/if.h>
    #ifdef TAILQ_ENTRY /* assume if TAILQ_ENTRY is defined, we're using it */
    wooj
    #endif
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "wooj" >/dev/null 2>&1; then
  rm -rf conftest*
   cat >> confdefs.h <<\EOF
#define USE_IF_ADDRLIST_TAILQ 1
EOF
 echo "$ac_t""yes" 1>&6 
else
  rm -rf conftest*
  echo "$ac_t""no" 1>&6
fi
rm -f conftest*

else if test $ac_cv_use_if_addrhead = yes; then
    echo $ac_n "checking if if_addrhead is a TAILQ_ENTRY""... $ac_c" 1>&6
echo "configure:4205: checking if if_addrhead is a TAILQ_ENTRY" >&5
    cat > conftest.$ac_ext <<EOF
#line 4207 "configure"
#include "confdefs.h"
#include <net/if_var.h>
    #ifdef TAILQ_ENTRY /* assume if TAILQ_ENTRY is defined, we're using it */
    wooj
    #endif
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "wooj" >/dev/null 2>&1; then
  rm -rf conftest*
   cat >> confdefs.h <<\EOF
#define USE_IF_ADDRHEAD_TAILQ 1
EOF
 echo "$ac_t""yes" 1>&6 
else
  rm -rf conftest*
  echo "$ac_t""no" 1>&6
fi
rm -f conftest*

fi
fi

if test $ac_cv_use_ia_list = yes; then
    echo $ac_n "checking if ia_list is a TAILQ_ENTRY""... $ac_c" 1>&6
echo "configure:4232: checking if ia_list is a TAILQ_ENTRY" >&5
    cat > conftest.$ac_ext <<EOF
#line 4234 "configure"
#include "confdefs.h"
#include <netinet/in_var.h>
    #ifdef TAILQ_ENTRY /* assume if TAILQ_ENTRY is defined, we're using it */
    wooj
    #endif
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "wooj" >/dev/null 2>&1; then
  rm -rf conftest*
   cat >> confdefs.h <<\EOF
#define USE_IA_LIST_TAILQ 1
EOF
 echo "$ac_t""yes" 1>&6 
else
  rm -rf conftest*
  echo "$ac_t""no" 1>&6
fi
rm -f conftest*

else if test $ac_cv_use_ia_link = yes; then
    echo $ac_n "checking if ia_link is a TAILQ_ENTRY""... $ac_c" 1>&6
echo "configure:4256: checking if ia_link is a TAILQ_ENTRY" >&5
    cat > conftest.$ac_ext <<EOF
#line 4258 "configure"
#include "confdefs.h"
#include <netinet/in_var.h>
    #ifdef TAILQ_ENTRY /* assume if TAILQ_ENTRY is defined, we're using it */
    wooj
    #endif
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "wooj" >/dev/null 2>&1; then
  rm -rf conftest*
   cat >> confdefs.h <<\EOF
#define USE_IA_LINK_TAILQ 1
EOF
 echo "$ac_t""yes" 1>&6 
else
  rm -rf conftest*
  echo "$ac_t""no" 1>&6
fi
rm -f conftest*

fi
fi

if test $ac_cv_use_if_list = yes; then
    echo $ac_n "checking if if_list is a TAILQ_ENTRY""... $ac_c" 1>&6
echo "configure:4283: checking if if_list is a TAILQ_ENTRY" >&5
    cat > conftest.$ac_ext <<EOF
#line 4285 "configure"
#include "confdefs.h"
#include <net/if.h>
    #ifdef TAILQ_ENTRY /* assume if TAILQ_ENTRY is defined, we're using it */
    wooj
    #endif
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "wooj" >/dev/null 2>&1; then
  rm -rf conftest*
   cat >> confdefs.h <<\EOF
#define USE_IF_LIST_TAILQ 1
EOF
 echo "$ac_t""yes" 1>&6 
else
  rm -rf conftest*
  echo "$ac_t""no" 1>&6
fi
rm -f conftest*

else if test $ac_cv_use_if_link = yes; then
    echo $ac_n "checking if if_link is a TAILQ_ENTRY""... $ac_c" 1>&6
echo "configure:4307: checking if if_link is a TAILQ_ENTRY" >&5
    cat > conftest.$ac_ext <<EOF
#line 4309 "configure"
#include "confdefs.h"
#include <net/if_var.h>
    #ifdef TAILQ_ENTRY /* assume if TAILQ_ENTRY is defined, we're using it */
    wooj
    #endif
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "wooj" >/dev/null 2>&1; then
  rm -rf conftest*
   cat >> confdefs.h <<\EOF
#define USE_IF_LINK_TAILQ 1
EOF
 echo "$ac_t""yes" 1>&6 
else
  rm -rf conftest*
  echo "$ac_t""no" 1>&6
fi
rm -f conftest*

fi
fi

echo $ac_n "checking whether netinet/in.h defines IP_MULTICAST_IF""... $ac_c" 1>&6
echo "configure:4333: checking whether netinet/in.h defines IP_MULTICAST_IF" >&5
if eval "test \"`echo '$''{'ac_cv_hdr_IP_MULTICAST_IF'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 4338 "configure"
#include "confdefs.h"
#include <netinet/in.h>
#ifdef IP_MULTICAST_IF
yes
#endif

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


fi

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

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

if test $ac_cv_hdr_IP_MULTICAST_IF = yes; then
	ip_multicast=yes
else
	ip_multicast=no
fi
echo $ac_n "checking whether sys/socket.h defines PF_ROUTE""... $ac_c" 1>&6
echo "configure:4373: checking whether sys/socket.h defines PF_ROUTE" >&5
if eval "test \"`echo '$''{'ac_cv_hdr_PF_ROUTE'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 4378 "configure"
#include "confdefs.h"
#include <sys/socket.h>
#ifdef PF_ROUTE
yes
#endif

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


fi

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

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

if test $ac_cv_hdr_PF_ROUTE = yes -a $linux != yes; then
	krt_os_objs="$krt_os_objs krt_rt_sock.o"
	cat >> confdefs.h <<\EOF
#define KRT_RT_SOCK 1
EOF

	cat >> confdefs.h <<\EOF
#define KRT_SOCKET_TYPE PF_ROUTE,SOCK_RAW,AF_UNSPEC
EOF

elif test $netlink = yes; then
	krt_os_objs="$krt_os_objs krt_rt_netlink.o"
	cat >> confdefs.h <<\EOF
#define KRT_RT_NETLINK 1
EOF

	cat >> confdefs.h <<\EOF
#define KRT_SOCKET_TYPE PF_ROUTE,SOCK_RAW,AF_UNSPEC
EOF

elif test $ac_cv_have_rt_ioctl = yes; then
	krt_os_objs="$krt_os_objs krt_rt_ioctl.o"
	cat >> confdefs.h <<\EOF
#define KRT_RT_IOCTL 1
EOF

	cat >> confdefs.h <<\EOF
#define KRT_SOCKET_TYPE PF_INET,SOCK_DGRAM,AF_UNSPEC
EOF

else
	:
fi
echo $ac_n "checking whether sys/socket.h defines AF_LINK""... $ac_c" 1>&6
echo "configure:4441: checking whether sys/socket.h defines AF_LINK" >&5
if eval "test \"`echo '$''{'ac_cv_hdr_AF_LINK'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 4446 "configure"
#include "confdefs.h"
#include <sys/socket.h>
#ifdef AF_LINK
yes
#endif

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


fi

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

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

echo $ac_n "checking whether netinet/in_var.h defines inm_next""... $ac_c" 1>&6
echo "configure:4476: checking whether netinet/in_var.h defines inm_next" >&5
if eval "test \"`echo '$''{'ac_cv_hdr_inm_next'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 4481 "configure"
#include "confdefs.h"
#include <netinet/in_var.h>
#ifdef inm_next
yes
#endif

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


fi

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

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

echo $ac_n "checking whether inet/ip.h defines IRE_DEFAULT""... $ac_c" 1>&6
echo "configure:4511: checking whether inet/ip.h defines IRE_DEFAULT" >&5
if eval "test \"`echo '$''{'ac_cv_hdr_IRE_DEFAULT'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 4516 "configure"
#include "confdefs.h"
#include <inet/ip.h>
#ifdef IRE_DEFAULT
yes
#endif

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


fi

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

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

echo $ac_n "checking whether sys/socketio.h defines SIOCGIFHWADDR""... $ac_c" 1>&6
echo "configure:4546: checking whether sys/socketio.h defines SIOCGIFHWADDR" >&5
if eval "test \"`echo '$''{'ac_cv_hdr_SIOCGIFHWADDR'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 4551 "configure"
#include "confdefs.h"
#include <sys/socketio.h>
#ifdef SIOCGIFHWADDR
yes
#endif

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


fi

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

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

echo $ac_n "checking whether sys/dlpi_ext.h defines DL_HP_PPA_ACK""... $ac_c" 1>&6
echo "configure:4581: checking whether sys/dlpi_ext.h defines DL_HP_PPA_ACK" >&5
if eval "test \"`echo '$''{'ac_cv_hdr_DL_HP_PPA_ACK'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 4586 "configure"
#include "confdefs.h"
#include <sys/dlpi_ext.h>
#ifdef DL_HP_PPA_ACK
yes
#endif

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


fi

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

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

echo $ac_n "checking whether sys/mman.h defines MAP_ANON""... $ac_c" 1>&6
echo "configure:4616: checking whether sys/mman.h defines MAP_ANON" >&5
if eval "test \"`echo '$''{'ac_cv_hdr_MAP_ANON'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 4621 "configure"
#include "confdefs.h"
#include <sys/mman.h>
#ifdef MAP_ANON
yes
#endif

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


fi

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

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

echo $ac_n "checking whether sys/socket.h defines AF_INET6""... $ac_c" 1>&6
echo "configure:4651: checking whether sys/socket.h defines AF_INET6" >&5
if eval "test \"`echo '$''{'ac_cv_hdr_AF_INET6'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 4656 "configure"
#include "confdefs.h"
#include <sys/socket.h>
#ifdef AF_INET6
yes
#endif

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


fi

if test "$ac_cv_hdr_AF_INET6" = yes; then
   :
fi
echo "$ac_t""$ac_cv_hdr_AF_INET6" 1>&6

echo $ac_n "checking whether sys-dist/socket.h defines AF_INET6""... $ac_c" 1>&6
echo "configure:4683: checking whether sys-dist/socket.h defines AF_INET6" >&5
if eval "test \"`echo '$''{'ac_cv_hdr_AF_INET6'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 4688 "configure"
#include "confdefs.h"
#include <sys-dist/socket.h>
#ifdef AF_INET6
yes
#endif

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


fi

if test "$ac_cv_hdr_AF_INET6" = yes; then
   :
fi
echo "$ac_t""$ac_cv_hdr_AF_INET6" 1>&6


# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
# for constant arguments.  Useless!
echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
echo "configure:4718: checking for working alloca.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 4723 "configure"
#include "confdefs.h"
#include <alloca.h>
int main() {
char *p = alloca(2 * sizeof(int));
; return 0; }
EOF
if { (eval echo configure:4730: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  ac_cv_header_alloca_h=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_header_alloca_h=no
fi
rm -f conftest*
fi

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

fi

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

#ifdef __GNUC__
# define alloca __builtin_alloca
#else
# ifdef _MSC_VER
#  include <malloc.h>
#  define alloca _alloca
# else
#  if HAVE_ALLOCA_H
#   include <alloca.h>
#  else
#   ifdef _AIX
 #pragma alloca
#   else
#    ifndef alloca /* predefined by HP cc +Olibcalls */
char *alloca ();
#    endif
#   endif
#  endif
# endif
#endif

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

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

fi

if test $ac_cv_func_alloca_works = no; then
  # The SVR3 libPW and SVR4 libucb both contain incompatible functions
  # that cause trouble.  Some versions do not even contain alloca or
  # contain a buggy version.  If you still want to use their alloca,
  # use ar to extract alloca.o from them instead of compiling alloca.c.
  ALLOCA=alloca.${ac_objext}
  cat >> confdefs.h <<\EOF
#define C_ALLOCA 1
EOF


echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
echo "configure:4816: checking whether alloca needs Cray hooks" >&5
if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 4821 "configure"
#include "confdefs.h"
#if defined(CRAY) && ! defined(CRAY2)
webecray
#else
wenotbecray
#endif

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

fi

echo "$ac_t""$ac_cv_os_cray" 1>&6
if test $ac_cv_os_cray = yes; then
for ac_func in _getb67 GETB67 getb67; do
  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:4846: 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 4851 "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:4874: \"$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
  cat >> confdefs.h <<EOF
#define CRAY_STACKSEG_END $ac_func
EOF

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

done
fi

echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
echo "configure:4901: checking stack direction for C alloca" >&5
if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_c_stack_direction=0
else
  cat > conftest.$ac_ext <<EOF
#line 4909 "configure"
#include "confdefs.h"
find_stack_direction ()
{
  static char *addr = 0;
  auto char dummy;
  if (addr == 0)
    {
      addr = &dummy;
      return find_stack_direction ();
    }
  else
    return (&dummy > addr) ? 1 : -1;
}
main ()
{
  exit (find_stack_direction() < 0);
}
EOF
if { (eval echo configure:4928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  ac_cv_c_stack_direction=1
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_c_stack_direction=-1
fi
rm -fr conftest*
fi

fi

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

fi

echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6
echo "configure:4950: checking type of array argument to getgroups" >&5
if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_type_getgroups=cross
else
  cat > conftest.$ac_ext <<EOF
#line 4958 "configure"
#include "confdefs.h"

/* Thanks to Mike Rendell for this test.  */
#include <sys/types.h>
#define NGID 256
#undef MAX
#define MAX(x, y) ((x) > (y) ? (x) : (y))
main()
{
  gid_t gidset[NGID];
  int i, n;
  union { gid_t gval; long lval; }  val;

  val.lval = -1;
  for (i = 0; i < NGID; i++)
    gidset[i] = val.gval;
  n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
                 gidset);
  /* Exit non-zero if getgroups seems to require an array of ints.  This
     happens when gid_t is short but getgroups modifies an array of ints.  */
  exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
}

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

if test $ac_cv_type_getgroups = cross; then
        cat > conftest.$ac_ext <<EOF
#line 4997 "configure"
#include "confdefs.h"
#include <unistd.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then
  rm -rf conftest*
  ac_cv_type_getgroups=gid_t
else
  rm -rf conftest*
  ac_cv_type_getgroups=int
fi
rm -f conftest*

fi
fi

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


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


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

  fi
fi

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

echo $ac_n "checking whether setvbuf arguments are reversed""... $ac_c" 1>&6
echo "configure:5068: checking whether setvbuf arguments are reversed" >&5
if eval "test \"`echo '$''{'ac_cv_func_setvbuf_reversed'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  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 5076 "configure"
#include "confdefs.h"
#include <stdio.h>
/* If setvbuf has the reversed format, exit 0. */
main () {
  /* This call has the arguments reversed.
     A reversed system may check and see that the address of main
     is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
  if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
    exit(1);
  putc('\r', stdout);
  exit(0);			/* Non-reversed systems segv here.  */
}
EOF
if { (eval echo configure:5090: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  ac_cv_func_setvbuf_reversed=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_func_setvbuf_reversed=no
fi
rm -fr conftest*
fi

rm -f core core.* *.core
fi

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

fi

echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
echo "configure:5114: 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 5119 "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:5136: \"$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


echo $ac_n "checking for vprintf""... $ac_c" 1>&6
echo "configure:5155: checking for vprintf" >&5
if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 5160 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char vprintf(); 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 vprintf();

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_vprintf) || defined (__stub___vprintf)
choke me
#else
vprintf();
#endif

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

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

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

if test "$ac_cv_func_vprintf" != yes; then
echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
echo "configure:5207: checking for _doprnt" >&5
if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 5212 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char _doprnt(); 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 _doprnt();

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__doprnt) || defined (__stub____doprnt)
choke me
#else
_doprnt();
#endif

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

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

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

fi



LIBS="$LIBS -L/usr/local/v6/lib";
echo $ac_n "checking for crypt""... $ac_c" 1>&6
echo "configure:5263: checking for crypt" >&5
if eval "test \"`echo '$''{'ac_cv_func_crypt'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 5268 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char crypt(); 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 crypt();

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_crypt) || defined (__stub___crypt)
choke me
#else
crypt();
#endif

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

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

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

if test $ac_cv_func_crypt = no; then
   # crypt is not in the default libraries.  See if it's in some other.
   for lib in crypt; do
      echo $ac_n "checking for crypt in -l$lib""... $ac_c" 1>&6
echo "configure:5317: checking for crypt in -l$lib" >&5
ac_lib_var=`echo $lib'_'crypt | 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$lib  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 5325 "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 crypt();

int main() {
crypt()
; return 0; }
EOF
if { (eval echo configure:5336: \"$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
  cat >> confdefs.h <<\EOF
#define HAVE_CRYPT 1
EOF

        LIBS="$LIBS -l$lib"; break
else
  echo "$ac_t""no" 1>&6
fi

   done
fi


echo $ac_n "checking for inet_ntoa""... $ac_c" 1>&6
echo "configure:5365: checking for inet_ntoa" >&5
if eval "test \"`echo '$''{'ac_cv_func_inet_ntoa'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 5370 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char inet_ntoa(); 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 inet_ntoa();

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_inet_ntoa) || defined (__stub___inet_ntoa)
choke me
#else
inet_ntoa();
#endif

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

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

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

if test $ac_cv_func_inet_ntoa = no; then
   # inet_ntoa is not in the default libraries.  See if it's in some other.
   for lib in xnet nsl socket bsd inet c_s; do
      echo $ac_n "checking for inet_ntoa in -l$lib""... $ac_c" 1>&6
echo "configure:5419: checking for inet_ntoa in -l$lib" >&5
ac_lib_var=`echo $lib'_'inet_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="-l$lib  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 5427 "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 inet_ntoa();

int main() {
inet_ntoa()
; return 0; }
EOF
if { (eval echo configure:5438: \"$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
  cat >> confdefs.h <<\EOF
#define HAVE_INET_NTOA 1
EOF

        LIBS="$LIBS -l$lib"; break
else
  echo "$ac_t""no" 1>&6
fi

   done
fi


echo $ac_n "checking for socket""... $ac_c" 1>&6
echo "configure:5467: checking for socket" >&5
if eval "test \"`echo '$''{'ac_cv_func_socket'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 5472 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char socket(); 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 socket();

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_socket) || defined (__stub___socket)
choke me
#else
socket();
#endif

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

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

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

if test $ac_cv_func_socket = no; then
   # socket is not in the default libraries.  See if it's in some other.
   for lib in xnet socket bsd inet c_s; do
      echo $ac_n "checking for socket in -l$lib""... $ac_c" 1>&6
echo "configure:5521: checking for socket in -l$lib" >&5
ac_lib_var=`echo $lib'_'socket | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-l$lib  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 5529 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char socket();

int main() {
socket()
; return 0; }
EOF
if { (eval echo configure:5540: \"$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
  cat >> confdefs.h <<\EOF
#define HAVE_SOCKET 1
EOF

        LIBS="$LIBS -l$lib"; break
else
  echo "$ac_t""no" 1>&6
fi

   done
fi


echo $ac_n "checking for if_nametoindex""... $ac_c" 1>&6
echo "configure:5569: checking for if_nametoindex" >&5
if eval "test \"`echo '$''{'ac_cv_func_if_nametoindex'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 5574 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char if_nametoindex(); 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 if_nametoindex();

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_if_nametoindex) || defined (__stub___if_nametoindex)
choke me
#else
if_nametoindex();
#endif

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

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

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

if test $ac_cv_func_if_nametoindex = no; then
   # if_nametoindex is not in the default libraries.  See if it's in some other.
   for lib in socket inet6; do
      echo $ac_n "checking for if_nametoindex in -l$lib""... $ac_c" 1>&6
echo "configure:5623: checking for if_nametoindex in -l$lib" >&5
ac_lib_var=`echo $lib'_'if_nametoindex | 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$lib  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 5631 "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 if_nametoindex();

int main() {
if_nametoindex()
; return 0; }
EOF
if { (eval echo configure:5642: \"$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
  cat >> confdefs.h <<\EOF
#define HAVE_IFNAMETOINDEX 1
EOF

        LIBS="$LIBS -l$lib"; break
else
  echo "$ac_t""no" 1>&6
fi

   done
fi

echo $ac_n "checking for getipnodebyname""... $ac_c" 1>&6
echo "configure:5670: checking for getipnodebyname" >&5
if eval "test \"`echo '$''{'ac_cv_func_getipnodebyname'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 5675 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char getipnodebyname(); 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 getipnodebyname();

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_getipnodebyname) || defined (__stub___getipnodebyname)
choke me
#else
getipnodebyname();
#endif

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

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

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

if test $ac_cv_func_getipnodebyname = no; then
   # getipnodebyname is not in the default libraries.  See if it's in some other.
   for lib in socket inet6; do
      echo $ac_n "checking for getipnodebyname in -l$lib""... $ac_c" 1>&6
echo "configure:5724: checking for getipnodebyname in -l$lib" >&5
ac_lib_var=`echo $lib'_'getipnodebyname | 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$lib  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 5732 "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 getipnodebyname();

int main() {
getipnodebyname()
; return 0; }
EOF
if { (eval echo configure:5743: \"$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
  cat >> confdefs.h <<\EOF
#define HAVE_GETIPNODEBYNAME 1
EOF

        LIBS="$LIBS -l$lib"; break
else
  echo "$ac_t""no" 1>&6
fi

   done
fi


echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
echo "configure:5772: 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 5777 "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:5800: \"$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
  cat >> confdefs.h <<\EOF
#define HAVE_GETHOSTBYNAME 1
EOF

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

if test $ac_cv_func_gethostbyname = no; then
   # gethostbyname is not in the default libraries.  See if it's in some other.
   for lib in nsl bsd socket inet; do
      echo $ac_n "checking for gethostbyname in -l$lib""... $ac_c" 1>&6
echo "configure:5826: checking for gethostbyname in -l$lib" >&5
ac_lib_var=`echo $lib'_'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="-l$lib  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 5834 "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:5845: \"$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
  cat >> confdefs.h <<\EOF
#define HAVE_GETHOSTBYNAME 1
EOF

        LIBS="$LIBS -l$lib"; break
else
  echo "$ac_t""no" 1>&6
fi

   done
fi

echo $ac_n "checking for kstat_open""... $ac_c" 1>&6
echo "configure:5873: checking for kstat_open" >&5
if eval "test \"`echo '$''{'ac_cv_func_kstat_open'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 5878 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char kstat_open(); 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 kstat_open();

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_kstat_open) || defined (__stub___kstat_open)
choke me
#else
kstat_open();
#endif

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

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

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

if test $ac_cv_func_kstat_open = no; then
   # kstat_open is not in the default libraries.  See if it's in some other.
   for lib in kstat; do
      echo $ac_n "checking for kstat_open in -l$lib""... $ac_c" 1>&6
echo "configure:5927: checking for kstat_open in -l$lib" >&5
ac_lib_var=`echo $lib'_'kstat_open | 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$lib  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 5935 "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 kstat_open();

int main() {
kstat_open()
; return 0; }
EOF
if { (eval echo configure:5946: \"$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
  cat >> confdefs.h <<\EOF
#define HAVE_KSTAT_OPEN 1
EOF

        LIBS="$LIBS -l$lib"; break
else
  echo "$ac_t""no" 1>&6
fi

   done
fi

echo $ac_n "checking for kvm_open""... $ac_c" 1>&6
echo "configure:5974: checking for kvm_open" >&5
if eval "test \"`echo '$''{'ac_cv_func_kvm_open'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 5979 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char kvm_open(); 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 kvm_open();

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_kvm_open) || defined (__stub___kvm_open)
choke me
#else
kvm_open();
#endif

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

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

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

if test $ac_cv_func_kvm_open = no; then
   # kvm_open is not in the default libraries.  See if it's in some other.
   for lib in kvm; do
      echo $ac_n "checking for kvm_open in -l$lib""... $ac_c" 1>&6
echo "configure:6028: checking for kvm_open in -l$lib" >&5
ac_lib_var=`echo $lib'_'kvm_open | 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$lib  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 6036 "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 kvm_open();

int main() {
kvm_open()
; return 0; }
EOF
if { (eval echo configure:6047: \"$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
  cat >> confdefs.h <<\EOF
#define HAVE_KVM_OPEN 1
EOF

        LIBS="$LIBS -l$lib"; break
else
  echo "$ac_t""no" 1>&6
fi

   done
fi

echo $ac_n "checking for nlist""... $ac_c" 1>&6
echo "configure:6075: checking for nlist" >&5
if eval "test \"`echo '$''{'ac_cv_func_nlist'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 6080 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char nlist(); 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 nlist();

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_nlist) || defined (__stub___nlist)
choke me
#else
nlist();
#endif

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

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

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

if test $ac_cv_func_nlist = no; then
   # nlist is not in the default libraries.  See if it's in some other.
   for lib in elf mld; do
      echo $ac_n "checking for nlist in -l$lib""... $ac_c" 1>&6
echo "configure:6129: checking for nlist in -l$lib" >&5
ac_lib_var=`echo $lib'_'nlist | 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$lib  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 6137 "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 nlist();

int main() {
nlist()
; return 0; }
EOF
if { (eval echo configure:6148: \"$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
  cat >> confdefs.h <<\EOF
#define HAVE_NLIST 1
EOF

        LIBS="$LIBS -l$lib"; break
else
  echo "$ac_t""no" 1>&6
fi

   done
fi



for ac_func in assert bcmp bcopy bzero flock getkerninfo \
 getspnam gettimeofday getcwd index lrand48 memmove \
 memcpy mmap random select sendmsg setenv setsid strchr strdup \
 sterror sysctl sysinfo tzsetwall waitpid
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:6183: 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 6188 "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:6211: \"$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


mkdir -p src/gated

for ac_func in sys_signame
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:6241: 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 6246 "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:6269: \"$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 "x$ac_cv_func_sys_signame" = "xno"; then
	sigfile='configure'
	if grep SIGINT /usr/include/signal.h > /dev/null; then
		sigfile=/usr/include/signal.h
	elif grep SIGINT /usr/include/sys/signal.h > /dev/null; then
		sigfile=/usr/include/sys/signal.h
	elif grep SIGINT /usr/include/sys/iso/signal_iso.h > /dev/null; then
		sigfile=/usr/include/sys/signal.h
	elif grep SIGINT /usr/include/asm/signal.h > /dev/null; then
		# Linux keeps signal.h in a different spot
		sigfile=/usr/include/asm/signal.h
	fi
	signamesfile=signames.h
	signamesfile=src/gated/signames.h

# The following doesn't work.  ac_dir is left equal to signamesfile.
# Need to fix this eventually so we can delete the "mkdir -p" command 
# from configure.in.
#
#   # Remove last slash and all that follows it.  Not all systems have dirname.
#   ac_dir=`echo $signamesfile|sed 's%/[^/][^/]*$%%'`
#   if test "$ac_dir" != "$signamesfile" && test "$ac_dir" != .; then
#    # The file is in a subdirectory.
#    test ! -d "$ac_dir" && mkdir -p "$ac_dir"
#   fi

   echo "/* This file is automatically generated from $sigfile */" > $signamesfile
   cat > $signamesfile << EOM
const char *const sys_signame[] = {
EOM
   count=1
   if test $sigfile = "configure"; then
      while test $count -le 64; do
         echo "    \"Signal $count\",      /* $Signal $count */" >> $signamesfile
         count=`expr $count + 1`
      done
   else
      grep 'define[ 	]*SIG' $sigfile | while read line; do
         set $line
         if test "x$3" != "x$count"; then
            continue
         fi
         echo "    \"$2\",	/* $3 */" >> $signamesfile
         count=`expr $count + 1`
      done
   fi
   echo "};" >> $signamesfile
fi


   BUILD_DATE=`date`
   

if eval "test \"`echo '$''{'ac_cv_choose_func_ENVIRON'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  for ac_func in environ _environ
do
   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:6352: 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 6357 "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:6380: \"$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
  ENVIRON=$ac_func
else
  echo "$ac_t""no" 1>&6
fi

   test -n "$ENVIRON" && break
done

fi
cat >> confdefs.h <<EOF
#define ENVIRON $ENVIRON
EOF

for ac_func in ffs flock kvm inet_aton setvbuf strcasecmp strerror\
 sysconf unsetenv
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:6411: 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 6416 "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:6439: \"$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}.${ac_objext}"
fi
done



if test $ac_cv_func_bcopy != yes; then
   if test $ac_cv_header_string_h = yes; then
      cat > conftest.$ac_ext <<EOF
#line 6469 "configure"
#include "confdefs.h"
#include <string.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "bcopy" >/dev/null 2>&1; then
  rm -rf conftest*
  ac_cv_func_bcopy=yes
fi
rm -f conftest*

   fi
   if test $ac_cv_func_bcopy != yes; then
      if test $ac_cv_header_bstring_h = yes; then
         cat > conftest.$ac_ext <<EOF
#line 6484 "configure"
#include "confdefs.h"
#include <bstring.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "bcopy" >/dev/null 2>&1; then
  rm -rf conftest*
  ac_cv_func_bcopy=yes
fi
rm -f conftest*

      fi
   fi
   if test $ac_cv_func_bcopy = yes; then
      cat >> confdefs.h <<\EOF
#define HAVE_BCOPY 1
EOF

   fi
fi

if test $ac_cv_func_bzero != yes; then
   if test $ac_cv_header_string_h = yes; then
      cat > conftest.$ac_ext <<EOF
#line 6508 "configure"
#include "confdefs.h"
#include <string.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "bzero" >/dev/null 2>&1; then
  rm -rf conftest*
  ac_cv_func_bzero=yes
fi
rm -f conftest*

   fi
   if test $ac_cv_func_bzero != yes; then
      if test $ac_cv_header_bstring_h = yes; then
         cat > conftest.$ac_ext <<EOF
#line 6523 "configure"
#include "confdefs.h"
#include <bstring.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "bzero" >/dev/null 2>&1; then
  rm -rf conftest*
  ac_cv_func_bzero=yes
fi
rm -f conftest*

      fi
   fi
   if test $ac_cv_func_bzero = yes; then
      cat >> confdefs.h <<\EOF
#define HAVE_BZERO 1
EOF

   fi
fi

if test $ac_cv_func_bcmp != yes; then
   if test $ac_cv_header_string_h = yes; then
      cat > conftest.$ac_ext <<EOF
#line 6547 "configure"
#include "confdefs.h"
#include <string.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "bcmp" >/dev/null 2>&1; then
  rm -rf conftest*
  ac_cv_func_bcmp=yes
fi
rm -f conftest*

   fi
   if test $ac_cv_func_bcmp != yes; then
      if test $ac_cv_header_bstring_h = yes; then
         cat > conftest.$ac_ext <<EOF
#line 6562 "configure"
#include "confdefs.h"
#include <bstring.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "bcmp" >/dev/null 2>&1; then
  rm -rf conftest*
  ac_cv_func_bcmp=yes
fi
rm -f conftest*

      fi
   fi
   if test $ac_cv_func_bcmp = yes; then
      cat >> confdefs.h <<\EOF
#define HAVE_BCMP 1
EOF

   fi
fi

echo $ac_n "checking for Solaris XPG4 support""... $ac_c" 1>&6
echo "configure:6584: checking for Solaris XPG4 support" >&5
if test -f /usr/lib/libxnet.so; then
      CFLAGS="$CFLAGS -D_POSIX_C_SOURCE=199506 -D_XOPEN_SOURCE=500"
      CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED=1 -D_XOPEN_VERSION=4"
      CFLAGS="$CFLAGS -D__EXTENSIONS__ -D_VA_LIST"
      LIBS="$LIBS -lnsl -lxnet /usr/ccs/lib/values-xpg4.o"
			cat >> confdefs.h <<\EOF
#define HAVE_XPG4 1
EOF

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

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

echo $ac_n "checking for AIX support""... $ac_c" 1>&6
echo "configure:6604: checking for AIX support" >&5
if test -f /usr/lib/lpd/aixlong; then
      CFLAGS="$CFLAGS -DINCLUDE_KVM -D_BSD=44 -DINRIA -DV6L1 -DKVM_TYPE_OTHER"
			LIBS = "$LIBS -lbsd -bloadmap:load.out"
			cat >> confdefs.h <<\EOF
#define HAVE_AIX 1
EOF

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

fordist=no
for i in $enabled_param; do
	case $i in
	developer)
		if test $ac_cv_prog_CC = gcc; then
			CFLAGS="$CFLAGS -g -Wall -pedantic -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wwrite-strings -Wcast-align -Wcast-qual -Wpointer-arith -Wshadow"
		fi
		cat >> confdefs.h <<\EOF
#define GII_DEBUG_MENU 1
EOF

		;;
	dist)
		fordist=yes
		;;
	esac
done

echo $ac_n "checking for protocols to use""... $ac_c" 1>&6
echo "configure:6636: checking for protocols to use" >&5

new_protocols="PARSE_LINK \
	"

license_v3=no
license_v4=no
license_v5=no
license_v6=no
LICENSE_DIRS=

if test -d $srcdir/licenses/v3; then
	license_v3=yes
	if test $fordist = yes; then
		LICENSE_DIRS="$LICENSE_DIRS v3"
	fi
fi

if test -d $srcdir/licenses/v4; then
	license_v4=yes
	if test $fordist = yes; then
		LICENSE_DIRS="$LICENSE_DIRS v4"
	fi
fi

if test -d $srcdir/licenses/v5; then
	license_v5=yes
fi

if test -d $srcdir/licenses/v6; then
	license_v6=yes
	if test $fordist = yes; then
		LICENSE_DIRS="$LICENSE_DIRS v6"
	fi
fi




#
#
# Enable v5/mcast defaults if mcast is supported _and_ there
# is a v5 license.
#
if test $ac_cv_header_netinet_ip_mroute_h = yes -a $license_v5 = yes; then
	enabled_proto="$enabled_proto $enabled_v5_proto"
	cat >> confdefs.h <<\EOF
#define GATED_MEMBER 1
EOF

fi

# Enable v6/ipv6 defaults if ipv6 is supported _and_ there
# is a v6 license.
#
if test $ac_cv_header_netinet_icmp6_h = yes; then
	have_inet6=yes
else
	have_inet6=no
fi

if test $have_inet6 = yes -a $license_v6 = yes; then
	enabled_proto="$enabled_proto $enabled_v6_proto"
	new_protocols="$new_protocols KRT_IPMULTI_V6"
	cat >> confdefs.h <<\EOF
#define GATED_MEMBER 1
EOF

fi

#
# Enable v4 defaults if there is a v4 license.
#
if test $license_v4 = yes; then
	enabled_proto="$enabled_proto $enabled_v4_proto"
	cat >> confdefs.h <<\EOF
#define GATED_MEMBER 1
EOF

fi

#
# Enable v3/v4 defaults if there is a v3 or v4 license.
#
if test $license_v3 = yes -o $license_v4 = yes; then
	enabled_proto="$enabled_proto $enabled_v34_proto"
fi

#
# Enable v3 defaults if there is a v3 license.
#
if test $license_v3 = yes; then
	enabled_proto="$enabled_proto $enabled_v3_proto"
	cat >> confdefs.h <<\EOF
#define GATED_PUBLIC 1
EOF

fi

#
# Enable ISO if the machine supports it _and_ there is
# a v4 license.
#
if test $ac_cv_header_netiso_iso_h = yes -a $license_v4 = yes; then
	enabled_proto="$enabled_proto $enabled_iso_proto"
fi

#
# Enable host protocols.
# (maybe more checks here in the future)
#
enabled_proto="$enabled_proto $enabled_host_proto"

#
# if general mcast is supported compile krt module
#
if test $ip_multicast = yes; then
	new_protocols="$new_protocols KRT_IPMULTI_TTL0"
fi

#
# If there is only a v5 license, enable RIP because this
# is the only way it's distributed.
#
if test $license_v3 = no -a $license_v4 = no -a $license_v5 = yes; then
	enabled_proto="$enabled_proto rip"
fi

for i in $enabled_proto; do
	i=`echo PROTO_${i} | tr 'a-z' 'A-Z'`;
	new_protocols="$new_protocols $i"
done    

# add a space to make grep work
new_protocols="$new_protocols "

# add in dependencies, loop until no change
test_proto_change=
while test X"$test_proto_change" != X"$new_protocols"; do

	test_proto_change="$new_protocols"

	for i in $new_protocols; do
		case $i in
		PROTO_BGMP)
			protodeps="IP_MULTICAST_ROUTING PROTO_INET"
			protomutex=""
			;;
		PROTO_BGP)
			protodeps="AUTONOMOUS_SYSTEM PROTO_ASPATHS ROUTER_ID"
			protomutex=""
			;;
    PROTO_BGP4MP)
      protodeps="IPV6_ROUTING AUTONOMOUS_SYSTEM PROTO_BGP ROUTER_ID PROTO_INET PROTO_INET6 PROTO_MLD6"
      protomutex=""
      ;;
		PROTO_EGP)
			protodeps="AUTONOMOUS_SYSTEM PROTO_INET"
			protomutex=""
			;;
		PROTO_DVMRP)
			protodeps="PROTO_DVMRP_ROUTING IP_MULTICAST_ROUTING"
			protomutex=""
			;;
		PROTO_DVMRP_ROUTING)
			protodeps="PROTO_INET"
			protomutex=""
			;;
		PROTO_HELLO) 
			protodeps="PROTO_INET"
			protomutex=""
			;;
		PROTO_ICMP) 
			protodeps="PROTO_INET"
			protomutex=""
			;;
		PROTO_ICMPV6)
			protodeps="IPV6_ROUTING PROTO_INET PROTO_INET6 PROTO_MLD6"
			protomutex=""
			;;
		PROTO_IGMP) 
			protodeps="IP_MULTICAST_ROUTING PROTO_INET"
			protomutex=""
			;;
		PROTO_ISIS) 
			protodeps="FLETCHER_CHECKSUM PROTO_INET PROTO_ISO"
			protomutex=""
			;;
		PROTO_ISIS2) 
			protodeps="FLETCHER_CHECKSUM PROTO_INET"
			protomutex=""
			;;
		PROTO_OSPF) 
			protodeps="PROTO_OSPF_EITHER FLETCHER_CHECKSUM ROUTER_ID MD5_CHECKSUM PROTO_INET"
			protomutex="PROTO_OSPF2"
			;;
		PROTO_OSPF2) 
			protodeps="PROTO_OSPF_EITHER FLETCHER_CHECKSUM MD5_CHECKSUM ROUTER_ID PROTO_INET"
			protomutex="PROTO_OSPF"
			;;
		PROTO_PIM) 
			protodeps="IP_MULTICAST_ROUTING PROTO_INET"
			protomutex=""
			;;
		PROTO_PIMSM) 
			protodeps="PROTO_PIM"
			protomutex=""
			;;
		PROTO_PIMDM) 
			protodeps="PROTO_PIM"
			protomutex=""
			;;
		PROTO_MPBGP)
			protodeps="AUTONOMOUS_SYSTEM PROTO_ASPATHS ROUTER_ID RUSTY"
			protomutex="PROTO_BGP"
			;;
		PROTO_MSDP) 
			protodeps="PROTO_PIMSM"
			protomutex=""
			;;
		PROTO_RDISC)
			protodeps="RDISC_SERVER RDISC_CLIENT"
			protomutex=""
			;;
		RDISC_SERVER)
			protodeps="ICMP_SEND"
			protomutex=""
			;;
		RDISC_CLIENT)
			protodeps="ICMP_SEND"
			protomutex=""
			;;
		PROTO_RIPNG)
			protodeps="IPV6_ROUTING PROTO_INET PROTO_INET6 PROTO_MLD6"
			protomutex=""
			;;
		PROTO_RIP)
			protodeps="MD5_CHECKSUM"
			protomutex=""
			;;
		PROTO_SLSP)
			protodeps="FLETCHER_CHECKSUM"
			protomutex=""
			;;
		PROTO_SMUX)
			protodeps="PROTO_SNMP PARSE_PORT PROTO_INET"
			;;
		PROTO_RSD)
			protodeps="EXTENDED_RIBS"
			protomutex=""
			;;
		*)
			protodeps=""
			protomutex=""
			;;
		esac

		for j in $protodeps; do
			if echo $new_protocols | grep "$j " > /dev/null; then
				:
			else
				new_protocols="$new_protocols $j"
				new_protocols="$new_protocols "
			fi
		done

		for m in $protomutex; do
			if echo $new_protocols | grep "$m " > /dev/null; then
				echo ""
				echo "error:  $m cannot be used with $i"
				exit
			fi
		done
	done
done

new_protocols=`echo $new_protocols | sed -e 's/ $//'`


#
#create a file so we can sort it
#
echo "" > /tmp/$$.acs
for i in $new_protocols; do
	if echo $i | grep "PROTO_PIMX" > /dev/null; then
		echo "PROTO_PIM" >> /tmp/$$.acs
	else
		echo $i >> /tmp/$$.acs
	fi
done
new_protocols=`cat /tmp/$$.acs | sort -u`
rm -f /tmp/$$.acs


SNMPLIB=
SNMPDLIB=
MCORE=
smux_module=

modules="krt krt_os"
for i in $new_protocols; do
	case $i in
	IP_MULTICAST_ROUTING)
		if test $ac_cv_header_netinet_ip_mroute_h = no; then
			echo "multicast routing protocols requested, but multicast routing not supported by OS"
			exit 1
		fi
		MCORE=mcore
		;;
	KRT_IPMULTI_TTL0)
		modules="$modules krt_multi"
		;;
	IPV6_ROUTING)
		if test $have_inet6 = no; then
		echo "ipv6 routing protocols requested, but ipv6 routing not supported by OS"
		exit 1
		fi
		;; 
	PROTO_MPASPATHS)
		modules="$modules mpaspath"
		;;
	PROTO_ASPATHS)
		modules="$modules aspath"
		;;
	PROTO_BGMP)
		modules="$modules bgmp"
		;;
	PROTO_BGP)
		modules="$modules bgp"
		;;
	PROTO_BGP4MP)
		modules="$modules bgp4mp"
		;;
	PROTO_CMU_SNMP)
		SNMPLIB=snmplib
		SNMPLIB_LDADD="-L../snmplib -lsnmplib"
		SNMPDLIB=snmpdlib
		SNMPDLIB_LDADD="-L../snmpdlib -lsnmpdlib"
		modules="$modules snmp_cmu"
		cat >> confdefs.h <<\EOF
#define MIB_RIP 1
EOF

		;;
	PROTO_DVMRP)
		modules="$modules dvmrp"
		;;
	PROTO_DVMRP_ROUTING)
		modules="$modules dvmrp_routing"
		;;
	PROTO_EGP)
		modules="$modules egp"
		;;
	PROTO_GII)
		modules="$modules gii"
		;;
	PROTO_HELLO) 
		modules="$modules hello"
		;;
	PROTO_ICMP) 
		modules="$modules icmp"
		;;
	PROTO_MLD6)
		;;
	KRT_IPMULTI_V6)
		modules="krt_ipv6multi $modules"
		;;
		PROTO_ICMPV6)
		modules="icmpv6 mld6 $modules"
		;;
	PROTO_IGMP) 
		modules="$modules igmp"
		;;
	PROTO_INET)
		modules="$modules inet"
		;;
	PROTO_INET6)
		modules="$modules inet6"
		;;
	PROTO_ISIS)
		modules="$modules isis"
		;;
	PROTO_ISIS2) 
		modules="$modules new_isis"
		;;
	PROTO_ISO)
		modules="$modules iso"
		;;
	PROTO_MPBGP)
		modules="$modules mpbgp"
		;;
	PROTO_MSDP) 
		modules="$modules msdp"
		;;
	PROTO_OSPF) 
		OSPF_MONITOR=ospf_monitor
		modules="$modules ospf"
		;;
	PROTO_OSPF2) 
		OSPF_MONITOR=ospf_monitor
		modules="$modules new_ospf"
		;;
	PROTO_PIM) 
		modules="$modules pim"
		;;
	PROTO_PIMDM) 
		modules="$modules pimdm"
		;;
	PROTO_PIMSM) 
		modules="$modules pimsm"
		;;
	PROTO_RDISC)
		modules="$modules rdisc"
		;;
	PROTO_RIP)
		RIPQUERY=ripquery
		modules="$modules rip"
		;;
	PROTO_RIPNG)
		RIP6QUERY=rip6query
		modules="$modules ripng"
		;;
	PROTO_SLSP)
		modules="$modules slsp"
		;;
	PROTO_SNMP)
		;;
	PROTO_SMUX)
		smux_module="smux"
		cat >> confdefs.h <<\EOF
#define MIB_RIP 1
EOF

		;;
	PROTO_WRD)
		modules="$modules wrd"
		;;
	*)
		;;
	esac
done

# check for proc version for linux
if test $linux = yes; then
	krt_os_objs="$krt_os_objs krt_symbols_proc.o"
	cat >> confdefs.h <<\EOF
#define KRT_SYMBOLS_PROC 1
EOF

#
# XXX HP-UX seems to have the sysinfo
# function in libc, but it is undocumented.
#
elif test $hp_ux_102 = yes -o $hp_ux_110 = yes; then
	krt_os_objs="$krt_os_objs krt_symbols_nlist.o"
	cat >> confdefs.h <<\EOF
#define KRT_SYMBOLS_NLIST 1
EOF

elif test $ac_cv_func_sysinfo = yes; then
	krt_os_objs="$krt_os_objs krt_symbols_sunos5.o"
	cat >> confdefs.h <<\EOF
#define USE_NDD 1
EOF

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

elif test $ac_cv_func_sysctl = yes; then
	krt_os_objs="$krt_os_objs krt_symbols_sysctl.o"
	cat >> confdefs.h <<\EOF
#define KRT_SYMBOLS_SYSCTL 1
EOF

elif test $ac_cv_func_nlist = yes; then
	krt_os_objs="$krt_os_objs krt_symbols_nlist.o"
	cat >> confdefs.h <<\EOF
#define KRT_SYMBOLS_NLIST 1
EOF

fi

if test $netlink = yes; then
	krt_os_objs="$krt_os_objs krt_rtread_netlink.o"
	cat >> confdefs.h <<\EOF
#define KRT_RTREAD_NETLINK 1
EOF

elif test $linux = yes; then
	krt_os_objs="$krt_os_objs krt_rtread_proc.o"
	cat >> confdefs.h <<\EOF
#define KRT_RTREAD_PROC 1
EOF

elif test $ac_cv_func_getkerninfo = yes; then
	krt_os_objs="$krt_os_objs krt_rtread_kinfo.o"
	cat >> confdefs.h <<\EOF
#define KRT_RTREAD_KINFO 1
EOF

elif test $ac_cv_func_sysctl = yes; then
	krt_os_objs="$krt_os_objs krt_rtread_kinfo.o"
	cat >> confdefs.h <<\EOF
#define KRT_RTREAD_KINFO 1
EOF

elif test $ac_cv_radix_usable = yes; then
	krt_os_objs="$krt_os_objs krt_rtread_radix.o"
	cat >> confdefs.h <<\EOF
#define KRT_RTREAD_RADIX 1
EOF

elif test $ac_cv_header_sys_mbuf_h = yes; then
	krt_os_objs="$krt_os_objs krt_rtread_kmem.o"
	cat >> confdefs.h <<\EOF
#define KRT_RTREAD_KMEM 1
EOF

else
	krt_os_objs="$krt_os_objs krt_rtread_sunos5.o"
	cat >> confdefs.h <<\EOF
#define KRT_RTREAD_SUNOS5 1
EOF

fi

if test $netlink = yes; then
	krt_os_objs="$krt_os_objs krt_ifread_netlink.o"
	cat >> confdefs.h <<\EOF
#define KRT_IFREAD_NETLINK 1
EOF

elif test $linux = yes; then
	krt_os_objs="$krt_os_objs krt_ifread_ioctl.o"
	cat >> confdefs.h <<\EOF
#define KRT_IFREAD_IOCTL 1
EOF

elif test $ac_cv_func_getkerninfo = yes; then
	cat >> confdefs.h <<\EOF
#define KRT_IFREAD_KINFO 1
EOF

	krt_os_objs="$krt_os_objs krt_ifread_kinfo.o"
elif test $ac_cv_func_sysctl = yes; then
	cat >> confdefs.h <<\EOF
#define KRT_IFREAD_KINFO 1
EOF

	krt_os_objs="$krt_os_objs krt_ifread_kinfo.o"
elif test $hp_ux_102 = yes; then
	cat >> confdefs.h <<\EOF
#define KRT_IFREAD_COMBO 1
EOF

	krt_os_objs="$krt_os_objs krt_ifread_combo.o"
else
	cat >> confdefs.h <<\EOF
#define KRT_IFREAD_IOCTL 1
EOF

	krt_os_objs="$krt_os_objs krt_ifread_ioctl.o"
fi

for i in $new_protocols; do
	cat >> confdefs.h <<EOF
#define $i 1
EOF

done

echo "# Built automatically by configure, do not edit" > ./src/gated/options
for i in $new_protocols; do
       echo "$i" >> ./src/gated/options
       echo $ac_n " $i$ac_c"
done

if echo $new_protocols | grep "PROTO_BGP " > /dev/null; then
	if test $license_v3 = yes; then
		echo "PROTO_BGP_PUBLIC" >> ./src/gated/options
	elif test $license_v4 = yes; then
		echo "PROTO_BGP_MEMBER" >> ./src/gated/options
	fi
fi

if echo $new_protocols | grep "PROTO_ASPATHS " > /dev/null; then
	if test $license_v3 = yes; then
		echo "PROTO_ASPATHS_PUBLIC" >> ./src/gated/options
		cat >> confdefs.h <<EOF
#define PROTO_ASPATHS_PUBLIC 1
EOF

	elif test $license_v4 = yes -o $license_v6 = yes; then
		echo "PROTO_ASPATHS_MEMBER" >> ./src/gated/options
		if echo $new_protocols | grep -v "PROTO_MPBGP" > /dev/null; then
			echo "PROTO_BGP_MEMBER" >> ./src/gated/options 
		fi
		cat >> confdefs.h <<EOF
#define PROTO_ASPATHS_MEMBER 1
EOF

	fi
fi


# copy options.dep file for filter, XXX need to remove this
# cp $srcdir/src/gated/options.dep ./src/gated

echo ""

if test "$with_interface_route" = "primary"; then
   cat >> confdefs.h <<\EOF
#define PRIMARY_ADDR_INTF_ROUTE 1
EOF

fi

echo $ac_n "checking for KSYM_BOOTTIME""... $ac_c" 1>&6
echo "configure:7255: checking for KSYM_BOOTTIME" >&5
for ac_var in _boottime boottime system_misc_kstat
do
   if eval "test \"`echo '$''{'ac_cv_kernel_var_KSYM_BOOTTIME'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$KSYM_BOOTTIME"; then
  ac_cv_prog_KSYM_BOOTTIME="$KSYM_BOOTTIME" # Let the user override the test.
else
   if test ! -f /tmp/kernel.nm; then
      nm $ac_cv_path_kernel > /tmp/kernel.nm
   fi
   if egrep "^$ac_var " /tmp/kernel.nm >/dev/null 2>&1; then
      ac_cv_kernel_var_KSYM_BOOTTIME="$ac_var"
   else
      if egrep " $ac_var\$" /tmp/kernel.nm >/dev/null 2>&1; then
         ac_cv_kernel_var_KSYM_BOOTTIME="$ac_var"
      fi
   fi
fi

fi
KSYM_BOOTTIME="$ac_cv_kernel_var_KSYM_BOOTTIME"
cat >> confdefs.h <<EOF
#define KSYM_BOOTTIME "$ac_cv_kernel_var_KSYM_BOOTTIME"
EOF

   test -n "$KSYM_BOOTTIME" && break
done
test -n "$KSYM_BOOTTIME" || KSYM_BOOTTIME="unknown"
test -n "$ac_cv_kernel_var_KSYM_BOOTTIME" || ac_cv_kernel_var_KSYM_BOOTTIME=unknown
cat >> confdefs.h <<EOF
#define KSYM_BOOTTIME "$ac_cv_kernel_var_KSYM_BOOTTIME"
EOF
if test -n "$KSYM_BOOTTIME"; then
  echo "$ac_t""$KSYM_BOOTTIME" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

echo $ac_n "checking for KSYM_IFNET""... $ac_c" 1>&6
echo "configure:7296: checking for KSYM_IFNET" >&5
for ac_var in _ifnet ifnet
do
   if eval "test \"`echo '$''{'ac_cv_kernel_var_KSYM_IFNET'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$KSYM_IFNET"; then
  ac_cv_prog_KSYM_IFNET="$KSYM_IFNET" # Let the user override the test.
else
   if test ! -f /tmp/kernel.nm; then
      nm $ac_cv_path_kernel > /tmp/kernel.nm
   fi
   if egrep "^$ac_var " /tmp/kernel.nm >/dev/null 2>&1; then
      ac_cv_kernel_var_KSYM_IFNET="$ac_var"
   else
      if egrep " $ac_var\$" /tmp/kernel.nm >/dev/null 2>&1; then
         ac_cv_kernel_var_KSYM_IFNET="$ac_var"
      fi
   fi
fi

fi
KSYM_IFNET="$ac_cv_kernel_var_KSYM_IFNET"
cat >> confdefs.h <<EOF
#define KSYM_IFNET "$ac_cv_kernel_var_KSYM_IFNET"
EOF

   test -n "$KSYM_IFNET" && break
done
test -n "$KSYM_IFNET" || KSYM_IFNET="unknown"
test -n "$ac_cv_kernel_var_KSYM_IFNET" || ac_cv_kernel_var_KSYM_IFNET=unknown
cat >> confdefs.h <<EOF
#define KSYM_IFNET "$ac_cv_kernel_var_KSYM_IFNET"
EOF
if test -n "$KSYM_IFNET"; then
  echo "$ac_t""$KSYM_IFNET" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

echo $ac_n "checking for KSYM_IN_IFADDR""... $ac_c" 1>&6
echo "configure:7337: checking for KSYM_IN_IFADDR" >&5
for ac_var in _in_ifaddr in_ifaddr in_ifaddrhead
do
   if eval "test \"`echo '$''{'ac_cv_kernel_var_KSYM_IN_IFADDR'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$KSYM_IN_IFADDR"; then
  ac_cv_prog_KSYM_IN_IFADDR="$KSYM_IN_IFADDR" # Let the user override the test.
else
   if test ! -f /tmp/kernel.nm; then
      nm $ac_cv_path_kernel > /tmp/kernel.nm
   fi
   if egrep "^$ac_var " /tmp/kernel.nm >/dev/null 2>&1; then
      ac_cv_kernel_var_KSYM_IN_IFADDR="$ac_var"
   else
      if egrep " $ac_var\$" /tmp/kernel.nm >/dev/null 2>&1; then
         ac_cv_kernel_var_KSYM_IN_IFADDR="$ac_var"
      fi
   fi
fi

fi
KSYM_IN_IFADDR="$ac_cv_kernel_var_KSYM_IN_IFADDR"
cat >> confdefs.h <<EOF
#define KSYM_IN_IFADDR "$ac_cv_kernel_var_KSYM_IN_IFADDR"
EOF

   test -n "$KSYM_IN_IFADDR" && break
done
test -n "$KSYM_IN_IFADDR" || KSYM_IN_IFADDR="unknown"
test -n "$ac_cv_kernel_var_KSYM_IN_IFADDR" || ac_cv_kernel_var_KSYM_IN_IFADDR=unknown
cat >> confdefs.h <<EOF
#define KSYM_IN_IFADDR "$ac_cv_kernel_var_KSYM_IN_IFADDR"
EOF
if test -n "$KSYM_IN_IFADDR"; then
  echo "$ac_t""$KSYM_IN_IFADDR" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

echo $ac_n "checking for KSYM_IP_MROUTER""... $ac_c" 1>&6
echo "configure:7378: checking for KSYM_IP_MROUTER" >&5
for ac_var in _ip_mrouter ip_mrouter
do
   if eval "test \"`echo '$''{'ac_cv_kernel_var_KSYM_IP_MROUTER'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$KSYM_IP_MROUTER"; then
  ac_cv_prog_KSYM_IP_MROUTER="$KSYM_IP_MROUTER" # Let the user override the test.
else
   if test ! -f /tmp/kernel.nm; then
      nm $ac_cv_path_kernel > /tmp/kernel.nm
   fi
   if egrep "^$ac_var " /tmp/kernel.nm >/dev/null 2>&1; then
      ac_cv_kernel_var_KSYM_IP_MROUTER="$ac_var"
   else
      if egrep " $ac_var\$" /tmp/kernel.nm >/dev/null 2>&1; then
         ac_cv_kernel_var_KSYM_IP_MROUTER="$ac_var"
      fi
   fi
fi

fi
KSYM_IP_MROUTER="$ac_cv_kernel_var_KSYM_IP_MROUTER"
cat >> confdefs.h <<EOF
#define KSYM_IP_MROUTER "$ac_cv_kernel_var_KSYM_IP_MROUTER"
EOF

   test -n "$KSYM_IP_MROUTER" && break
done
test -n "$KSYM_IP_MROUTER" || KSYM_IP_MROUTER="unknown"
test -n "$ac_cv_kernel_var_KSYM_IP_MROUTER" || ac_cv_kernel_var_KSYM_IP_MROUTER=unknown
cat >> confdefs.h <<EOF
#define KSYM_IP_MROUTER "$ac_cv_kernel_var_KSYM_IP_MROUTER"
EOF
if test -n "$KSYM_IP_MROUTER"; then
  echo "$ac_t""$KSYM_IP_MROUTER" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

echo $ac_n "checking for KSYM_IPFORWARDING""... $ac_c" 1>&6
echo "configure:7419: checking for KSYM_IPFORWARDING" >&5
for ac_var in _ip_forwarding ipforwarding _ipforwarding
do
   if eval "test \"`echo '$''{'ac_cv_kernel_var_KSYM_IPFORWARDING'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$KSYM_IPFORWARDING"; then
  ac_cv_prog_KSYM_IPFORWARDING="$KSYM_IPFORWARDING" # Let the user override the test.
else
   if test ! -f /tmp/kernel.nm; then
      nm $ac_cv_path_kernel > /tmp/kernel.nm
   fi
   if egrep "^$ac_var " /tmp/kernel.nm >/dev/null 2>&1; then
      ac_cv_kernel_var_KSYM_IPFORWARDING="$ac_var"
   else
      if egrep " $ac_var\$" /tmp/kernel.nm >/dev/null 2>&1; then
         ac_cv_kernel_var_KSYM_IPFORWARDING="$ac_var"
      fi
   fi
fi

fi
KSYM_IPFORWARDING="$ac_cv_kernel_var_KSYM_IPFORWARDING"
cat >> confdefs.h <<EOF
#define KSYM_IPFORWARDING "$ac_cv_kernel_var_KSYM_IPFORWARDING"
EOF

   test -n "$KSYM_IPFORWARDING" && break
done
test -n "$KSYM_IPFORWARDING" || KSYM_IPFORWARDING="\
 unknown"
test -n "$ac_cv_kernel_var_KSYM_IPFORWARDING" || ac_cv_kernel_var_KSYM_IPFORWARDING=unknown
cat >> confdefs.h <<EOF
#define KSYM_IPFORWARDING "$ac_cv_kernel_var_KSYM_IPFORWARDING"
EOF
if test -n "$KSYM_IPFORWARDING"; then
  echo "$ac_t""$KSYM_IPFORWARDING" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

echo $ac_n "checking for KSYM_IPSTAT""... $ac_c" 1>&6
echo "configure:7461: checking for KSYM_IPSTAT" >&5
for ac_var in _ipstat ipstat
do
   if eval "test \"`echo '$''{'ac_cv_kernel_var_KSYM_IPSTAT'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$KSYM_IPSTAT"; then
  ac_cv_prog_KSYM_IPSTAT="$KSYM_IPSTAT" # Let the user override the test.
else
   if test ! -f /tmp/kernel.nm; then
      nm $ac_cv_path_kernel > /tmp/kernel.nm
   fi
   if egrep "^$ac_var " /tmp/kernel.nm >/dev/null 2>&1; then
      ac_cv_kernel_var_KSYM_IPSTAT="$ac_var"
   else
      if egrep " $ac_var\$" /tmp/kernel.nm >/dev/null 2>&1; then
         ac_cv_kernel_var_KSYM_IPSTAT="$ac_var"
      fi
   fi
fi

fi
KSYM_IPSTAT="$ac_cv_kernel_var_KSYM_IPSTAT"
cat >> confdefs.h <<EOF
#define KSYM_IPSTAT "$ac_cv_kernel_var_KSYM_IPSTAT"
EOF

   test -n "$KSYM_IPSTAT" && break
done
test -n "$KSYM_IPSTAT" || KSYM_IPSTAT="unknown"
test -n "$ac_cv_kernel_var_KSYM_IPSTAT" || ac_cv_kernel_var_KSYM_IPSTAT=unknown
cat >> confdefs.h <<EOF
#define KSYM_IPSTAT "$ac_cv_kernel_var_KSYM_IPSTAT"
EOF
if test -n "$KSYM_IPSTAT"; then
  echo "$ac_t""$KSYM_IPSTAT" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

echo $ac_n "checking for KSYM_RTHASHSIZE""... $ac_c" 1>&6
echo "configure:7502: checking for KSYM_RTHASHSIZE" >&5
for ac_var in _rthashsize rthashsize
do
   if eval "test \"`echo '$''{'ac_cv_kernel_var_KSYM_RTHASHSIZE'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$KSYM_RTHASHSIZE"; then
  ac_cv_prog_KSYM_RTHASHSIZE="$KSYM_RTHASHSIZE" # Let the user override the test.
else
   if test ! -f /tmp/kernel.nm; then
      nm $ac_cv_path_kernel > /tmp/kernel.nm
   fi
   if egrep "^$ac_var " /tmp/kernel.nm >/dev/null 2>&1; then
      ac_cv_kernel_var_KSYM_RTHASHSIZE="$ac_var"
   else
      if egrep " $ac_var\$" /tmp/kernel.nm >/dev/null 2>&1; then
         ac_cv_kernel_var_KSYM_RTHASHSIZE="$ac_var"
      fi
   fi
fi

fi
KSYM_RTHASHSIZE="$ac_cv_kernel_var_KSYM_RTHASHSIZE"
cat >> confdefs.h <<EOF
#define KSYM_RTHASHSIZE "$ac_cv_kernel_var_KSYM_RTHASHSIZE"
EOF

   test -n "$KSYM_RTHASHSIZE" && break
done
test -n "$KSYM_RTHASHSIZE" || KSYM_RTHASHSIZE="unknown"
test -n "$ac_cv_kernel_var_KSYM_RTHASHSIZE" || ac_cv_kernel_var_KSYM_RTHASHSIZE=unknown
cat >> confdefs.h <<EOF
#define KSYM_RTHASHSIZE "$ac_cv_kernel_var_KSYM_RTHASHSIZE"
EOF
if test -n "$KSYM_RTHASHSIZE"; then
  echo "$ac_t""$KSYM_RTHASHSIZE" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

echo $ac_n "checking for KSYM_RTHOST""... $ac_c" 1>&6
echo "configure:7543: checking for KSYM_RTHOST" >&5
for ac_var in _rthost rthost
do
   if eval "test \"`echo '$''{'ac_cv_kernel_var_KSYM_RTHOST'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$KSYM_RTHOST"; then
  ac_cv_prog_KSYM_RTHOST="$KSYM_RTHOST" # Let the user override the test.
else
   if test ! -f /tmp/kernel.nm; then
      nm $ac_cv_path_kernel > /tmp/kernel.nm
   fi
   if egrep "^$ac_var " /tmp/kernel.nm >/dev/null 2>&1; then
      ac_cv_kernel_var_KSYM_RTHOST="$ac_var"
   else
      if egrep " $ac_var\$" /tmp/kernel.nm >/dev/null 2>&1; then
         ac_cv_kernel_var_KSYM_RTHOST="$ac_var"
      fi
   fi
fi

fi
KSYM_RTHOST="$ac_cv_kernel_var_KSYM_RTHOST"
cat >> confdefs.h <<EOF
#define KSYM_RTHOST "$ac_cv_kernel_var_KSYM_RTHOST"
EOF

   test -n "$KSYM_RTHOST" && break
done
test -n "$KSYM_RTHOST" || KSYM_RTHOST="unknown"
test -n "$ac_cv_kernel_var_KSYM_RTHOST" || ac_cv_kernel_var_KSYM_RTHOST=unknown
cat >> confdefs.h <<EOF
#define KSYM_RTHOST "$ac_cv_kernel_var_KSYM_RTHOST"
EOF
if test -n "$KSYM_RTHOST"; then
  echo "$ac_t""$KSYM_RTHOST" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

echo $ac_n "checking for KSYM_RTNET""... $ac_c" 1>&6
echo "configure:7584: checking for KSYM_RTNET" >&5
for ac_var in _rtnet rtnet
do
   if eval "test \"`echo '$''{'ac_cv_kernel_var_KSYM_RTNET'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$KSYM_RTNET"; then
  ac_cv_prog_KSYM_RTNET="$KSYM_RTNET" # Let the user override the test.
else
   if test ! -f /tmp/kernel.nm; then
      nm $ac_cv_path_kernel > /tmp/kernel.nm
   fi
   if egrep "^$ac_var " /tmp/kernel.nm >/dev/null 2>&1; then
      ac_cv_kernel_var_KSYM_RTNET="$ac_var"
   else
      if egrep " $ac_var\$" /tmp/kernel.nm >/dev/null 2>&1; then
         ac_cv_kernel_var_KSYM_RTNET="$ac_var"
      fi
   fi
fi

fi
KSYM_RTNET="$ac_cv_kernel_var_KSYM_RTNET"
cat >> confdefs.h <<EOF
#define KSYM_RTNET "$ac_cv_kernel_var_KSYM_RTNET"
EOF

   test -n "$KSYM_RTNET" && break
done
test -n "$KSYM_RTNET" || KSYM_RTNET="unknown"
test -n "$ac_cv_kernel_var_KSYM_RTNET" || ac_cv_kernel_var_KSYM_RTNET=unknown
cat >> confdefs.h <<EOF
#define KSYM_RTNET "$ac_cv_kernel_var_KSYM_RTNET"
EOF
if test -n "$KSYM_RTNET"; then
  echo "$ac_t""$KSYM_RTNET" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

echo $ac_n "checking for KSYM_TCP_TTL""... $ac_c" 1>&6
echo "configure:7625: checking for KSYM_TCP_TTL" >&5
for ac_var in _tcp_ttl tcp_ttl tcpDefaultTTL _ip_defttl ip_defttl
do
   if eval "test \"`echo '$''{'ac_cv_kernel_var_KSYM_TCP_TTL'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$KSYM_TCP_TTL"; then
  ac_cv_prog_KSYM_TCP_TTL="$KSYM_TCP_TTL" # Let the user override the test.
else
   if test ! -f /tmp/kernel.nm; then
      nm $ac_cv_path_kernel > /tmp/kernel.nm
   fi
   if egrep "^$ac_var " /tmp/kernel.nm >/dev/null 2>&1; then
      ac_cv_kernel_var_KSYM_TCP_TTL="$ac_var"
   else
      if egrep " $ac_var\$" /tmp/kernel.nm >/dev/null 2>&1; then
         ac_cv_kernel_var_KSYM_TCP_TTL="$ac_var"
      fi
   fi
fi

fi
KSYM_TCP_TTL="$ac_cv_kernel_var_KSYM_TCP_TTL"
cat >> confdefs.h <<EOF
#define KSYM_TCP_TTL "$ac_cv_kernel_var_KSYM_TCP_TTL"
EOF

   test -n "$KSYM_TCP_TTL" && break
done
test -n "$KSYM_TCP_TTL" || KSYM_TCP_TTL="\
 unknown"
test -n "$ac_cv_kernel_var_KSYM_TCP_TTL" || ac_cv_kernel_var_KSYM_TCP_TTL=unknown
cat >> confdefs.h <<EOF
#define KSYM_TCP_TTL "$ac_cv_kernel_var_KSYM_TCP_TTL"
EOF
if test -n "$KSYM_TCP_TTL"; then
  echo "$ac_t""$KSYM_TCP_TTL" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

echo $ac_n "checking for KSYM_UDPCKSUM""... $ac_c" 1>&6
echo "configure:7667: checking for KSYM_UDPCKSUM" >&5
for ac_var in _udpcksum udpcksum _udp_cksum
do
   if eval "test \"`echo '$''{'ac_cv_kernel_var_KSYM_UDPCKSUM'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$KSYM_UDPCKSUM"; then
  ac_cv_prog_KSYM_UDPCKSUM="$KSYM_UDPCKSUM" # Let the user override the test.
else
   if test ! -f /tmp/kernel.nm; then
      nm $ac_cv_path_kernel > /tmp/kernel.nm
   fi
   if egrep "^$ac_var " /tmp/kernel.nm >/dev/null 2>&1; then
      ac_cv_kernel_var_KSYM_UDPCKSUM="$ac_var"
   else
      if egrep " $ac_var\$" /tmp/kernel.nm >/dev/null 2>&1; then
         ac_cv_kernel_var_KSYM_UDPCKSUM="$ac_var"
      fi
   fi
fi

fi
KSYM_UDPCKSUM="$ac_cv_kernel_var_KSYM_UDPCKSUM"
cat >> confdefs.h <<EOF
#define KSYM_UDPCKSUM "$ac_cv_kernel_var_KSYM_UDPCKSUM"
EOF

   test -n "$KSYM_UDPCKSUM" && break
done
test -n "$KSYM_UDPCKSUM" || KSYM_UDPCKSUM="unknown"
test -n "$ac_cv_kernel_var_KSYM_UDPCKSUM" || ac_cv_kernel_var_KSYM_UDPCKSUM=unknown
cat >> confdefs.h <<EOF
#define KSYM_UDPCKSUM "$ac_cv_kernel_var_KSYM_UDPCKSUM"
EOF
if test -n "$KSYM_UDPCKSUM"; then
  echo "$ac_t""$KSYM_UDPCKSUM" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

echo $ac_n "checking for KSYM_VERSION""... $ac_c" 1>&6
echo "configure:7708: checking for KSYM_VERSION" >&5
for ac_var in _version version
do
   if eval "test \"`echo '$''{'ac_cv_kernel_var_KSYM_VERSION'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$KSYM_VERSION"; then
  ac_cv_prog_KSYM_VERSION="$KSYM_VERSION" # Let the user override the test.
else
   if test ! -f /tmp/kernel.nm; then
      nm $ac_cv_path_kernel > /tmp/kernel.nm
   fi
   if egrep "^$ac_var " /tmp/kernel.nm >/dev/null 2>&1; then
      ac_cv_kernel_var_KSYM_VERSION="$ac_var"
   else
      if egrep " $ac_var\$" /tmp/kernel.nm >/dev/null 2>&1; then
         ac_cv_kernel_var_KSYM_VERSION="$ac_var"
      fi
   fi
fi

fi
KSYM_VERSION="$ac_cv_kernel_var_KSYM_VERSION"
cat >> confdefs.h <<EOF
#define KSYM_VERSION "$ac_cv_kernel_var_KSYM_VERSION"
EOF

   test -n "$KSYM_VERSION" && break
done
test -n "$KSYM_VERSION" || KSYM_VERSION="unknown"
test -n "$ac_cv_kernel_var_KSYM_VERSION" || ac_cv_kernel_var_KSYM_VERSION=unknown
cat >> confdefs.h <<EOF
#define KSYM_VERSION "$ac_cv_kernel_var_KSYM_VERSION"
EOF
if test -n "$KSYM_VERSION"; then
  echo "$ac_t""$KSYM_VERSION" 1>&6
else
  echo "$ac_t""no" 1>&6
fi


 echo $ac_n "checking for KSYM_IFNET""... $ac_c" 1>&6
echo "configure:7750: checking for KSYM_IFNET" >&5
for ac_var in _ifnet ifnet
do
   if eval "test \"`echo '$''{'ac_cv_kernel_var_KSYM_IFNET'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$KSYM_IFNET"; then
  ac_cv_prog_KSYM_IFNET="$KSYM_IFNET" # Let the user override the test.
else
   if test ! -f /tmp/kernel.nm; then
      nm $ac_cv_path_kernel > /tmp/kernel.nm
   fi
   if egrep "^$ac_var " /tmp/kernel.nm >/dev/null 2>&1; then
      ac_cv_kernel_var_KSYM_IFNET="$ac_var"
   else
      if egrep " $ac_var\$" /tmp/kernel.nm >/dev/null 2>&1; then
         ac_cv_kernel_var_KSYM_IFNET="$ac_var"
      fi
   fi
fi

fi
KSYM_IFNET="$ac_cv_kernel_var_KSYM_IFNET"
cat >> confdefs.h <<EOF
#define KSYM_IFNET "$ac_cv_kernel_var_KSYM_IFNET"
EOF

   test -n "$KSYM_IFNET" && break
done
test -n "$KSYM_IFNET" || KSYM_IFNET="unknown"
test -n "$ac_cv_kernel_var_KSYM_IFNET" || ac_cv_kernel_var_KSYM_IFNET=unknown
cat >> confdefs.h <<EOF
#define KSYM_IFNET "$ac_cv_kernel_var_KSYM_IFNET"
EOF
if test -n "$KSYM_IFNET"; then
  echo "$ac_t""$KSYM_IFNET" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

  echo $ac_n "checking which lladdr system is being used""... $ac_c" 1>&6
echo "configure:7791: checking which lladdr system is being used" >&5
 if eval "test \"`echo '$''{'ac_cv_lladdr_type'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  

 cat > conftest.$ac_ext <<EOF
#line 7798 "configure"
#include "confdefs.h"
#include <netinet/if_ether.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "arpcom" >/dev/null 2>&1; then
  rm -rf conftest*
  use_arpcom="yes"
else
  rm -rf conftest*
  use_arpcom="no"
fi
rm -f conftest*

 if test "$ac_cv_file_dev_nit" = "yes"; then
    ac_cv_lladdr_type=SUNOS4
 else
    if test "$ac_cv_hdr_SIOCGIFHWADDR" = "yes"; then
	ac_cv_lladdr_type=LINUX
    else
	if test "$ac_cv_hdr_DL_HP_PPA_ACK" = "yes"; then
		ac_cv_lladdr_type=HPSTREAMS
	else
		if test "$ac_cv_header_sys_dlpi_h" = "yes"; then
			ac_cv_lladdr_type=SUNOS5
		else
			if test "$use_arpcom" = "yes"; then
				ac_cv_lladdr_type=KMEM
			else
				ac_cv_lladdr_type=NONE
			fi
		fi
	fi
   fi
 fi

fi
cat >> confdefs.h <<EOF
#define KVM_TYPE "$ac_cv_lladdr_type"
EOF

      if test $ac_cv_lladdr_type = "HPSTREAMS"; then
      cat >> confdefs.h <<\EOF
#define KRT_LLADDR_HPSTREAMS 1
EOF

   else
      if test $ac_cv_lladdr_type = "SUNOS4"; then
         cat >> confdefs.h <<\EOF
#define KRT_LLADDR_SUNOS4 1
EOF

      else
         if test $ac_cv_lladdr_type = "SUNOS5"; then
            cat >> confdefs.h <<\EOF
#define KRT_LLADDR_SUNOS5 1
EOF

         else
            if test $ac_cv_lladdr_type = "LINUX"; then
               cat >> confdefs.h <<\EOF
#define KRT_LLADDR_LINUX 1
EOF

            else
               if test $ac_cv_lladdr_type = "KMEM"; then
                  cat >> confdefs.h <<\EOF
#define KRT_LLADDR_KMEM 1
EOF

	       else
                  cat >> confdefs.h <<\EOF
#define KRT_LLADDR_NONE 1
EOF

               fi
            fi
         fi
      fi
   fi

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



 echo $ac_n "checking for kvm_read in -lkvm""... $ac_c" 1>&6
echo "configure:7884: checking for kvm_read in -lkvm" >&5
ac_lib_var=`echo kvm'_'kvm_read | 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="-lkvm  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 7892 "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 kvm_read();

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

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

  LIBS="-lkvm $LIBS"

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

 for ac_func in kvm_openfiles kvm_nlist
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:7933: 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 7938 "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:7961: \"$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 which kvm system is being used""... $ac_c" 1>&6
echo "configure:7986: checking which kvm system is being used" >&5
 if eval "test \"`echo '$''{'ac_cv_kvm_type'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  

  ac_cv_kvm_type=NONE

 if test $ac_cv_func_kvm_openfiles = yes; then
    if test $ac_cv_func_kvm_nlist = yes; then
       ac_cv_kvm_type=BSD44
    else
       ac_cv_kvm_type=OTHER
    fi
 else
    if test $ac_cv_func_kvm_open = yes -o $ac_cv_lib_kvm_kvm_open = yes; then
       ac_cv_kvm_type=SUNOS4
    fi
 fi

fi
cat >> confdefs.h <<EOF
#define KVM_TYPE "$ac_cv_kvm_type"
EOF

      if test $ac_cv_kvm_type = "BSD44"; then
      cat >> confdefs.h <<\EOF
#define KVM_TYPE_BSD44 1
EOF

   else
      if test $ac_cv_kvm_type = "SUNOS4"; then
         cat >> confdefs.h <<\EOF
#define KVM_TYPE_SUNOS4 1
EOF

      else
         if test $ac_cv_kvm_type = "RENO"; then
            cat >> confdefs.h <<\EOF
#define KVM_TYPE_RENO 1
EOF

         else
	    	    	                if test $ac_cv_kvm_type != "NONE" -o $ac_cv_lladdr_type = "HPSTREAMS"; then
	       ac_cv_kvm_type=OTHER
               cat >> confdefs.h <<\EOF
#define KVM_TYPE_OTHER 1
EOF

	       LIBOBJS="$LIBOBJS kvm.o"
            else
               cat >> confdefs.h <<\EOF
#define KVM_TYPE_NONE 1
EOF

            fi
         fi
      fi
   fi

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


if test -f /tmp/kernel.nm; then
   rm -f /tmp/kernel.nm
fi

if test $linux = yes; then
	krt_os_objs="$krt_os_objs krt_lladdr_linux.o"  
elif test $ac_cv_lladdr_type = "HPSTREAMS"; then
	krt_os_objs="$krt_os_objs krt_lladdr_hpstreams.o"
elif test $ac_cv_lladdr_type = "SUNOS4"; then
	krt_os_objs="$krt_os_objs krt_lladdr_sunos4.o"
elif test $ac_cv_lladdr_type = "SUNOS5"; then
	krt_os_objs="$krt_os_objs krt_lladdr_sunos5.o"
elif test $ac_cv_lladdr_type = "LINUX"; then
	krt_os_objs="$krt_os_objs krt_lladdr_linux.o"
elif test $ac_cv_lladdr_type = "KMEM"; then
	krt_os_objs="$krt_os_objs krt_lladdr_kmem.o"
fi

echo "" > /tmp/$$.acs
for i in $krt_os_objs; do
	echo $i >> /tmp/$$.acs
done
krt_os_objs=`cat /tmp/$$.acs | sort -u`
rm -f /tmp/$$.acs

for i in $krt_os_objs; do
       LIBKRT_OS_A_LIBADD="$LIBKRT_OS_A_LIBADD $i"
done



subdirs=
if test $fordist = no; then
	BUILD_SUBDIRS="$smux_module $modules $MCORE $SNMPDLIB $SNMPLIB gatedcompat gated gdc $RIPQUERY $RIP6QUERY $OSPF_MONITOR"
else
				if test $license_v3 = yes; then
		for s in $all_dirs_v3; do
			if echo $subdirs | grep "$s " > /dev/null; then
				:
			else
				subdirs="$subdirs$s "
			fi
		done
	fi
	if test $license_v4 = yes; then
		for s in $all_dirs_v4; do
			if echo $subdirs | grep "$s " > /dev/null; then
				:
			else
				subdirs="$subdirs$s "
			fi
		done
	fi
	if test $license_v5 = yes; then
		for s in $all_dirs_v5; do
			if echo $subdirs | grep "$s " > /dev/null; then
				:
			else
				subdirs="$subdirs$s "
			fi
		done
	fi
	if test $license_v6 = yes; then
		for s in $all_dirs_v6; do
			if echo $subdirs | grep "$s " > /dev/null; then
				:
			else
				subdirs="$subdirs$s "
			fi
		done
	fi
	BUILD_SUBDIRS="$subdirs"
fi



GATED_LDADD=
for i in $smux_module $modules $MCORE $SNMPDLIB $SNMPLIB gatedcompat
do
	GATED_LDADD="$GATED_LDADD -L../$i -l$i"
	#GATED_LDADD="$GATED_LDADD ../$i/lib$i.a"
	GATED_DEPEND="$GATED_DEPEND ../$i/lib$i.a"
done

GATED_DEPEND="$GATED_DEPEND stamp-remdirs"





REMOVE_SUBDIRS=nothing

if test $license_v6 = no; then
	REMOVE_SUBDIRS="$REMOVE_SUBDIRS ripng bgp4mp inet6 icmpv6 mld6 rip6query krt_ipv6multi"
fi

if test $license_v5 = no; then
	REMOVE_SUBDIRS="$REMOVE_SUBDIRS bgmp cbt dvmrp dvmrp_routing dwr igmp \
		mcore pim pimdm pimsm msdp mpbgp mpaspath "
fi

if test $license_v4 = no; then
	REMOVE_SUBDIRS="$REMOVE_SUBDIRS iso new_isis new_ospf wrd"
fi

if test $license_v3 = no -a $license_v4 = no; then
  if test $license_v6 = no; then
		  REMOVE_SUBDIRS="$REMOVE_SUBDIRS bgp"  
	else
			REMOVE_SUBDIRS="$REMOVE_SUBDIRS rip ripquery"
	fi
	REMOVE_SUBDIRS="$REMOVE_SUBDIRS egp icmp isis ospf \
		ospf_monitor rdisc slsp"
fi

for d in $REMOVE_SUBDIRS; do
	if test $d != nothing -a ! -d $srcdir/src/$d; then
		mkdir -p $srcdir/src/$d
cat > $srcdir/src/$d/Makefile.in << __EOF
all: stamp-nothing

clean:
	@echo ""

distdir:
	@echo ""

distclean:
	@echo ""

stamp-nothing:
	touch stamp-nothing
__EOF
	fi
done



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

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

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

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

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

DEFS=-DHAVE_CONFIG_H

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

echo creating $CONFIG_STATUS
rm -f $CONFIG_STATUS
cat > $CONFIG_STATUS <<EOF
#! /bin/sh
# Generated automatically by configure.
# Run this file to recreate the current configuration.
# This directory was configured as follows,
# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
#
# $0 $ac_configure_args
#
# Compiler output produced by configure, useful for debugging
# configure, is in ./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 src/Makefile src/aspath/Makefile src/bgmp/Makefile \
	src/bgp4mp/Makefile src/bgp/Makefile src/cbt/Makefile \
	src/gatedcompat/Makefile    \
	src/dvmrp/Makefile src/dvmrp_routing/Makefile src/dwr/Makefile \
	src/egp/Makefile src/gated/Makefile src/gdc/Makefile \
	src/gii/Makefile src/icmp/Makefile src/icmpv6/Makefile \
	src/igmp/Makefile \
	src/inet/Makefile src/inet6/Makefile src/iso/Makefile src/krt/Makefile \
	src/krt_ipv6multi/Makefile src/krt_multi/Makefile src/krt_os/Makefile \
	src/mcore/Makefile \
	src/mpbgp/Makefile src/msdp/Makefile src/mld6/Makefile \
	src/new_isis/Makefile src/new_ospf/Makefile \
	src/ospf/Makefile src/ospf_monitor/Makefile src/pim/Makefile \
	src/pimdm/Makefile src/pimsm/Makefile src/rdisc/Makefile \
	src/rip/Makefile src/ripng/Makefile src/ripquery/Makefile \
	src/rip6query/Makefile src/scram/Makefile \
	src/slsp/Makefile src/smux/Makefile \
	src/wrd/Makefile src/gated/paths.h \
	src/gated/version.c licenses/Makefile util/Makefile src/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%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
s%@INSTALL_DATA@%$INSTALL_DATA%g
s%@PACKAGE@%$PACKAGE%g
s%@VERSION@%$VERSION%g
s%@ACLOCAL@%$ACLOCAL%g
s%@AUTOCONF@%$AUTOCONF%g
s%@AUTOMAKE@%$AUTOMAKE%g
s%@AUTOHEADER@%$AUTOHEADER%g
s%@MAKEINFO@%$MAKEINFO%g
s%@SET_MAKE@%$SET_MAKE%g
s%@AWK@%$AWK%g
s%@YACC@%$YACC%g
s%@CC@%$CC%g
s%@LEX@%$LEX%g
s%@LEXLIB@%$LEXLIB%g
s%@CPP@%$CPP%g
s%@LEX_OUTPUT_ROOT@%$LEX_OUTPUT_ROOT%g
s%@LN_S@%$LN_S%g
s%@RANLIB@%$RANLIB%g
s%@kernel@%$kernel%g
s%@PIDDIR@%$PIDDIR%g
s%@DUMPDIR@%$DUMPDIR%g
s%@SBINDIR@%$SBINDIR%g
s%@BINDIR@%$BINDIR%g
s%@IPV6_NETINET6@%$IPV6_NETINET6%g
s%@MKDEP@%$MKDEP%g
/@MKDEP_FILE@/r $MKDEP_FILE
s%@MKDEP_FILE@%%g
s%@ALLOCA@%$ALLOCA%g
s%@BUILD_DATE@%$BUILD_DATE%g
s%@LIBOBJS@%$LIBOBJS%g
s%@LICENSE_DIRS@%$LICENSE_DIRS%g
s%@LIBKRT_OS_A_LIBADD@%$LIBKRT_OS_A_LIBADD%g
s%@BUILD_SUBDIRS@%$BUILD_SUBDIRS%g
s%@GATED_LDADD@%$GATED_LDADD%g
s%@GATED_DEPEND@%$GATED_DEPEND%g
s%@REMOVE_SUBDIRS@%$REMOVE_SUBDIRS%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 src/Makefile src/aspath/Makefile src/bgmp/Makefile \
	src/bgp4mp/Makefile src/bgp/Makefile src/cbt/Makefile \
	src/gatedcompat/Makefile    \
	src/dvmrp/Makefile src/dvmrp_routing/Makefile src/dwr/Makefile \
	src/egp/Makefile src/gated/Makefile src/gdc/Makefile \
	src/gii/Makefile src/icmp/Makefile src/icmpv6/Makefile \
	src/igmp/Makefile \
	src/inet/Makefile src/inet6/Makefile src/iso/Makefile src/krt/Makefile \
	src/krt_ipv6multi/Makefile src/krt_multi/Makefile src/krt_os/Makefile \
	src/mcore/Makefile \
	src/mpbgp/Makefile src/msdp/Makefile src/mld6/Makefile \
	src/new_isis/Makefile src/new_ospf/Makefile \
	src/ospf/Makefile src/ospf_monitor/Makefile src/pim/Makefile \
	src/pimdm/Makefile src/pimsm/Makefile src/rdisc/Makefile \
	src/rip/Makefile src/ripng/Makefile src/ripquery/Makefile \
	src/rip6query/Makefile src/scram/Makefile \
	src/slsp/Makefile src/smux/Makefile \
	src/wrd/Makefile src/gated/paths.h \
	src/gated/version.c licenses/Makefile util/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="src/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
test -z "$CONFIG_HEADERS" || echo timestamp > src/stamp-h
\
  	date > src/gatedcompat/stamp-h; date > src/gated/stamp-h; \
  	date > src/stamp-h
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


if test $fordist = no; then
	echo "****"
	echo "**** You must now run 'make depend'."
	echo "****"
fi
