#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by Autoconf 2.14a.
#
# Copyright (C) 1992, 93, 94, 95, 96, 98, 99, 2000
# Free Software Foundation, Inc.
# This configure script is free software; the Free Software Foundation
# gives unlimited permission to copy, distribute and modify it.

#
# Initializations.
#
ac_default_prefix=/usr/local
subdirs=
MFLAGS= MAKEFLAGS=
SHELL=${CONFIG_SHELL-/bin/sh}
# Maximum number of lines to put in a shell here document.
: ${ac_max_here_lines=48}
# Sed expression to map a string onto a valid sh and CPP variable names.
ac_tr_sh='sed -e y%*+%pp%;s%[^a-zA-Z0-9_]%_%g'
ac_tr_cpp='sed -e y%*abcdefghijklmnopqrstuvwxyz%PABCDEFGHIJKLMNOPQRSTUVWXYZ%;s%[^A-Z0-9_]%_%g'

# By default always use an empty string as the executable extension.
# Only change it if the script calls AC_EXEEXT.
ac_exeext=
# By default assume that objects files use an extension of .o.  Only
# change it if the script calls AC_OBJEXT.
ac_objext=o
# Factoring default headers for most tests.
ac_includes_default="\
#include <stdio.h>
#include <sys/types.h>
#if STDC_HEADERS
# include <stdlib.h>
# include <stddef.h>
#else
# if HAVE_STDLIB_H
#  include <stdlib.h>
# endif
#endif
#if HAVE_STRING_H
# if !STDC_HEADERS && HAVE_MEMORY_H
#  include <memory.h>
# endif
# include <string.h>
#else
# if HAVE_STRINGS_H
#  include <strings.h>
# endif
#endif
#if HAVE_INTTYPES_H
# include <inttypes.h>
#endif
#if HAVE_UNISTD_H
# include <unistd.h>
#endif"
ac_unique_file="src/stty.c"

# Initialize some variables set by options.
ac_init_help=
ac_init_version=false
# 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'

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

  ac_optarg=`echo "$ac_option" | sed -n 's/^[^=]*=//p'`

  # 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 echo "$ac_feature" | grep '[^-a-zA-Z0-9_]' >/dev/null 2>&1; then
      { echo "configure: error: invalid feature: $ac_feature" 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 echo "$ac_feature" | grep '[^-a-zA-Z0-9_]' >/dev/null 2>&1; then
      { echo "configure: error: invalid feature: $ac_feature" 1>&2; exit 1; }
    fi
    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
    case "$ac_option" in
      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
      *) 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 | -h)
    ac_init_help=long ;;
  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
    ac_init_help=recursive ;;
  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
    ac_init_help=short ;;

  -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 | -V)
    ac_init_version=: ;;

  -with-* | --with-*)
    ac_package=`echo "$ac_option"|sed -e 's/-*with-//' -e 's/=.*//'`
    # Reject names that are not valid shell variable names.
    if echo "$ac_package" | grep '[^-a-zA-Z0-9_]' >/dev/null 2>&1; then
      { echo "configure: error: invalid package: $ac_package" 1>&2; exit 1; }
    fi
    ac_package=`echo $ac_package| sed 's/-/_/g'`
    case "$ac_option" in
      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
      *) 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 echo "$ac_package" | grep '[^-a-zA-Z0-9_]' >/dev/null 2>&1; then
      { echo "configure: error: invalid package: $ac_package" 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: unrecognized option: $ac_option
Try \`configure --help' for more information." 1>&2; exit 1; }
    ;;

  *=*)
    ac_envvar=`echo "$ac_option" | sed -e 's/=.*//'`
    # Reject names that are not valid shell variable names.
    if echo "$ac_envvar" | grep '[^a-zA-Z0-9_]' >/dev/null 2>&1; then
      { echo "configure: error: invalid variable name: $ac_envvar" 1>&2; exit 1; }
    fi
    ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
    eval "$ac_envvar='$ac_optarg'"
    export $ac_envvar ;;

  *)
    if echo "$ac_option" | grep '[^-a-zA-Z0-9.]' >/dev/null 2>&1; then
      echo "configure: warning: invalid host type: $ac_option" 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

# 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: cannot find sources in $ac_confdir or .." 1>&2; exit 1; }
  else
    { echo "configure: error: cannot find sources in $srcdir" 1>&2; exit 1; }
  fi
fi
srcdir=`echo "$srcdir" | sed 's%\([^/]\)/*$%\1%'`

#
# Report the --help message.
#
if test "$ac_init_help" = "long"; then
  # 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
`configure' configures software source code packages to adapt to many kinds
of systems.

Usage: configure [OPTION]... [VAR=VALUE]... [HOST]

To safely assign special values to environment variables (e.g., CC,
CFLAGS...), give to `configure' the definition as VAR=VALUE.

Defaults for the options are specified in brackets.

Configuration:
  -h, --help              print this message
  -V, --version           print the version of autoconf that created configure
  -q, --quiet, --silent   do not print `checking...' messages
      --cache-file=FILE   cache test results in FILE
  -n, --no-create         do not create output files

EOF

  cat <<EOF
Directories:
  --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 ..]
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]
EOF
  cat <<\EOF

Program names:
  --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
fi

if test -n "$ac_init_help"; then

  cat <<\EOF

Optional Features:
  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
  --disable-dependency-tracking Speeds up one-time builds
  --enable-dependency-tracking  Do not reject slow dependency extractors
  --disable-largefile     omit support for large files
  --disable-assert        turn off assertions
  --disable-nls           do not use Native Language Support

Optional Packages:
  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
  --without-included-regex don't compile regex; this is the default on
                          systems with version 2 of the GNU C library
                          (use with caution on other system)
  --with-included-gettext use the GNU gettext library included here
  --with-catgets          use catgets functions if available

Some influent environment variables:
  CFLAGS      Extra flags for the C compiler
EOF
fi

if test "$ac_init_help" = "recursive"; then
  # If there are subdirs, report their specific --help.
  ac_popdir=`pwd`
  for ac_subdir in : $subdirs; do test "x$ac_subdir" = x: && continue
    cd $ac_subdir
    # A "../" for each directory in /$ac_subdir.
    ac_dots=`echo $ac_subdir |
             sed -e 's%^\./%%;s%[^/]$%&/%;s%[^/]*/%../%g'`

    case "$srcdir" in
    .) # No --srcdir option.  We are building in place.
      ac_sub_srcdir=$srcdir ;;
    [/\\]* | ?:[/\\] ) # Absolute path.
      ac_sub_srcdir=$srcdir/$ac_subdir ;;
    *) # Relative path.
      ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
    esac

    # Check for guested configure; otherwise get Cygnus style configure.
    if test -f $ac_sub_srcdir/configure; then
      echo
      $SHELL $ac_sub_srcdir/configure  --help=recursive
    elif test -f $ac_sub_srcdir/configure.in; then
      echo
      $ac_configure --help
    else
      echo "configure: warning: no configuration information is in $ac_subdir" 1>&2
    fi
    cd $ac_popdir
  done
fi

test -n "$ac_init_help" && exit 0
if $ac_init_version; then
  cat <<\EOF

Copyright (C) 1992, 93, 94, 95, 96, 98, 99, 2000
Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it.
EOF
  exit 0
fi
# 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

# IFS
# We need space, tab and new line, in precisely that order.
ac_nl='
'
IFS=" 	$ac_nl"

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

# Keep a trace of the command line.
# Strip out --no-create and --no-recursion so they do not pile up.
# Also quote any args containing shell meta-characters.
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_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
  ac_configure_args="$ac_configure_args '$ac_arg'" ;;
  *) ac_configure_args="$ac_configure_args $ac_arg" ;;
  esac
done

# 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.

It was created by configure version 2.14a, executed with
 > $0 $ac_configure_args
" 1>&5

# 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

# 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"
      test -f "$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

if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
  # Stardent Vistra SVR4 grep lacks -e, says Kaveh R. Ghazi.
  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
    ECHO_N= ECHO_C='
' ECHO_T='	'
  else
    ECHO_N=-n ECHO_C= ECHO_T=
  fi
else
  ECHO_N= ECHO_C='\c' ECHO_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
  elif test -f $ac_dir/shtool; then
    ac_aux_dir=$ac_dir
    ac_install_sh="$ac_aux_dir/shtool install -c"
    break
  fi
done
if test -z "$ac_aux_dir"; then
  { echo "configure: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
fi
ac_config_guess="$SHELL $ac_aux_dir/config.guess"
ac_config_sub="$SHELL $ac_aux_dir/config.sub"
ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.

echo $ECHO_N "checking host system type... $ECHO_C" 1>&6
echo "configure:600: checking host system type" 1>&5
if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then

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

  ac_cv_host_alias=$host
  case "$ac_cv_host_alias" in
  NONE)
    case $nonopt in
    NONE)
      if ac_cv_host_alias=`$ac_config_guess`; then :
      else { echo "configure: error: cannot guess host type; you must specify one" 1>&2; exit 1; }
      fi ;;    *) ac_cv_host_alias=$nonopt ;;
    esac ;;
  esac

  ac_cv_host=`$ac_config_sub $ac_cv_host_alias` || exit 1
  ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
  ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
  ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
else
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
fi

echo "$ECHO_T""$ac_cv_host" 1>&6

host=$ac_cv_host
host_alias=$ac_cv_host_alias
host_cpu=$ac_cv_host_cpu
host_vendor=$ac_cv_host_vendor
host_os=$ac_cv_host_os

# 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 $ECHO_N "checking for a BSD compatible install... $ECHO_C" 1>&6
echo "configure:641: checking for a BSD compatible install" 1>&5
if test -z "$INSTALL"; then
if test "${ac_cv_path_install+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
    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.
	    :
	  elif test $ac_prog = install &&
	    grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
	    # program-specific install script used by HP pwplus--don't use.
	    :
	  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 "$ECHO_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}'

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

echo $ECHO_N "checking whether build environment is sane... $ECHO_C" 1>&6
echo "configure:693: checking whether build environment is sane" 1>&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 "$ECHO_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 >conftestsed
s,\\,\\\\,g; s,\$,$$,g
EOF
  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,"

test x"${MISSING+set}" = xset || \
  MISSING="\${SHELL} `CDPATH=: && cd $ac_aux_dir && pwd`/missing"
if eval "$MISSING --run :"; then
  am_missing_run="$MISSING --run "
else
  am_missing_run=
  am_backtick='`'
  echo "configure: warning: ${am_backtick}missing' script is too old or missing" 1>&2
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 $ECHO_N "checking for $ac_word... $ECHO_C" 1>&6
echo "configure:759: checking for $ac_word" 1>&5
if test "${ac_cv_prog_AWK+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  if test -n "$AWK"; then
  ac_cv_prog_AWK="$AWK" # Let the user override the test.
else
  for ac_path in `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
    echo "$ac_dir/$ac_word"
  fi
done
IFS=$ac_save_ifs
`; do
    ac_cv_prog_AWK="$ac_prog"
    break
  done
fi
fi
AWK="$ac_cv_prog_AWK"
if test -n "$AWK"; then
  echo "$ECHO_T""$AWK" 1>&6
else
  echo "$ECHO_T""no" 1>&6
fi

test -n "$AWK" && break
done

echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" 1>&6
echo "configure:790: checking whether ${MAKE-make} sets \${MAKE}" 1>&5
set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_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 "$ECHO_T""yes" 1>&6
  SET_MAKE=
else
  echo "$ECHO_T""no" 1>&6
  SET_MAKE="MAKE=${MAKE-make}"
fi

# Check whether --enable-dependency-tracking or --disable-dependency-tracking was given.
if test "${enable_dependency_tracking+set}" = set; then
  enableval="$enable_dependency_tracking"

fi
if test "x$enable_dependency_tracking" = xno; then
  AMDEP="#"
else
  am_depcomp="$ac_aux_dir/depcomp"
  if test ! -f "$am_depcomp"; then
    AMDEP="#"
  else
    AMDEP=
  fi
fi

if test -z "$AMDEP"; then
  AMDEPBACKSLASH='\'
else
  AMDEPBACKSLASH=
fi

if test -d .deps || mkdir .deps 2> /dev/null || test -d .deps; then
  DEPDIR=.deps
else
  DEPDIR=_deps
fi

PACKAGE=sh-utils

VERSION=2.0g

if test "`CDPATH=: && 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

ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal"}

AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}

AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake"}

AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}

MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}

AMTAR=${AMTAR-"${am_missing_run}tar"}

if test -z "$install_sh"; then
   install_sh="$ac_aux_dir/install-sh"
   test -f "$install_sh" || install_sh="$ac_aux_dir/install.sh"
   test -f "$install_sh" || install_sh="${am_missing_run}${ac_auxdir}/install-sh"
         install_sh="`echo $install_sh | sed -e 's/\${SHELL}//'`"
fi

# Enable GNU extensions.
# Define this here, not in acconfig's @TOP@ section, since definitions
# in the latter don't make it into the configure-time tests.
cat >>confdefs.h <<\EOF
#define _GNU_SOURCE 1
EOF

ALL_LINGUAS="cs de el es fr gl it ja nl no pl pt pt_BR sl ru sk sv zh"

      echo $ECHO_N "checking for perl5.003 or newer... $ECHO_C" 1>&6
echo "configure:871: checking for perl5.003 or newer" 1>&5
  if test "${PERL+set}" = set; then
    # `PERL' is set in the user's environment.
    candidate_perl_names="$PERL"
    perl_specified=yes
  else
    candidate_perl_names='perl perl5'
    perl_specified=no
  fi

  found=no

  PERL="$missing_dir/missing perl"
  for perl in $candidate_perl_names; do
    # Run test in a subshell; some versions of sh will print an error if
    # an executable is not found, even if stderr is redirected.
    if ( $perl -e 'require 5.003; use File::Compare' ) > /dev/null 2>&1; then
      PERL=$perl
      found=yes
      break
    fi
  done

  echo "$ECHO_T""$found" 1>&6
  test $found = no && echo "configure: warning:
WARNING: You don't seem to have perl5.003 or newer installed, or you lack
         a usable version of the Perl File::Compare module.  As a result,
         you may be unable to run a few tests or to regenerate certain
         files if you modify the sources from which they are derived.
 " 1>&2

case "${CFLAGS+set} $ac_configure_args" in
 *" CFLAGS="* );;
 "set "*) ac_configure_args="CFLAGS='$CFLAGS' $ac_configure_args";;
esac

  # Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo $ECHO_N "checking for $ac_word... $ECHO_C" 1>&6
echo "configure:905: checking for $ac_word" 1>&5
if test "${ac_cv_prog_CC+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  if test -n "$CC"; then
  ac_cv_prog_CC="$CC" # Let the user override the test.
else
  for ac_path in `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
    echo "$ac_dir/$ac_word"
  fi
done
IFS=$ac_save_ifs
`; do
    ac_cv_prog_CC="gcc"
    break
  done
fi
fi
CC="$ac_cv_prog_CC"
if test -n "$CC"; then
  echo "$ECHO_T""$CC" 1>&6
else
  echo "$ECHO_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 $ECHO_N "checking for $ac_word... $ECHO_C" 1>&6
echo "configure:937: checking for $ac_word" 1>&5
if test "${ac_cv_prog_CC+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  if test -n "$CC"; then
  ac_cv_prog_CC="$CC" # Let the user override the test.
else
  ac_prog_rejected=no
  for ac_path in `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
    echo "$ac_dir/$ac_word"
  fi
done
IFS=$ac_save_ifs
`; do
    if test "$ac_path" = "/usr/ucb/cc"; then
      ac_prog_rejected=yes
      continue
    fi
    ac_cv_prog_CC="cc"
    break
  done
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_path" "$@"
    shift
    ac_cv_prog_CC="$@"
  fi
fi
fi
fi
CC="$ac_cv_prog_CC"
if test -n "$CC"; then
  echo "$ECHO_T""$CC" 1>&6
else
  echo "$ECHO_T""no" 1>&6
fi

    if test -z "$CC"; then
      for ac_prog in cl
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 $ECHO_N "checking for $ac_word... $ECHO_C" 1>&6
echo "configure:990: checking for $ac_word" 1>&5
if test "${ac_cv_prog_CC+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  if test -n "$CC"; then
  ac_cv_prog_CC="$CC" # Let the user override the test.
else
  for ac_path in `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
    echo "$ac_dir/$ac_word"
  fi
done
IFS=$ac_save_ifs
`; do
    ac_cv_prog_CC="$ac_prog"
    break
  done
fi
fi
CC="$ac_cv_prog_CC"
if test -n "$CC"; then
  echo "$ECHO_T""$CC" 1>&6
else
  echo "$ECHO_T""no" 1>&6
fi

test -n "$CC" && break
done

    fi
  fi

test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }

echo $ECHO_N "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works... $ECHO_C" 1>&6
echo "configure:1024: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" 1>&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 1032 "configure"
#include "confdefs.h"
int main(){return(0);}
EOF
if { (eval echo configure:1036: \"$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 -f 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 "$ECHO_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 77; }
fi
echo $ECHO_N "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler... $ECHO_C" 1>&6
echo "configure:1061: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" 1>&5
echo "$ECHO_T""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross

echo $ECHO_N "checking whether we are using GNU C... $ECHO_C" 1>&6
echo "configure:1065: checking whether we are using GNU C" 1>&5
if test "${ac_cv_prog_gcc+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  cat >conftest.c <<EOF
#ifdef __GNUC__
  yes;
#endif
EOF
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1074: \"$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 "$ECHO_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 $ECHO_N "checking whether ${CC-cc} accepts -g... $ECHO_C" 1>&6
echo "configure:1090: checking whether ${CC-cc} accepts -g" 1>&5
if test "${ac_cv_prog_cc_g+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_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 "$ECHO_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 $ECHO_N "checking how to run the C preprocessor... $ECHO_C" 1>&6
echo "configure:1119: checking how to run the C preprocessor" 1>&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
  CPP=
fi
if test -z "$CPP"; then
if test "${ac_cv_prog_CPP+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_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 1134 "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:1140: \"$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
  CPP="${CC-cc} -E -traditional-cpp"

cat >conftest.$ac_ext <<EOF
#line 1150 "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:1156: \"$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
  CPP="${CC-cc} -nologo -E"

cat >conftest.$ac_ext <<EOF
#line 1166 "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:1172: \"$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
  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 "$ECHO_T""$CPP" 1>&6

depcc="$CC"
depcpp="$CPP"
echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" 1>&6
echo "configure:1197: checking dependency style of $depcc" 1>&5
if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else

if test -z "$AMDEP"; then
  echo '#include "conftest.h"' > conftest.c
  echo 'int i;' > conftest.h

  am_cv_CC_dependencies_compiler_type=none
  for depmode in `sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < "$am_depcomp"`; do
    case "$depmode" in
    nosideeffect)
      # after this tag, mechanisms are not by side-effect, so they'll
      # only be used when explicitly requested
      if test "x$enable_dependency_tracking" = xyes; then
	continue
      else
	break
      fi
      ;;
    none) break ;;
    esac
    if depmode="$depmode" \
       source=conftest.c object=conftest.o \
       depfile=conftest.Po tmpdepfile=conftest.TPo \
       $SHELL $am_depcomp $depcc -c conftest.c 2>/dev/null &&
       grep conftest.h conftest.Po > /dev/null 2>&1; then
      am_cv_CC_dependencies_compiler_type="$depmode"
      break
    fi
  done

  rm -f conftest.*
else
  am_cv_CC_dependencies_compiler_type=none
fi

fi

echo "$ECHO_T""$am_cv_CC_dependencies_compiler_type" 1>&6
CCDEPMODE="depmode=$am_cv_CC_dependencies_compiler_type"

echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" 1>&6
echo "configure:1235: checking how to run the C preprocessor" 1>&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
  CPP=
fi
if test -z "$CPP"; then
if test "${ac_cv_prog_CPP+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_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 1250 "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:1256: \"$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
  CPP="${CC-cc} -E -traditional-cpp"

cat >conftest.$ac_ext <<EOF
#line 1266 "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:1272: \"$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
  CPP="${CC-cc} -nologo -E"

cat >conftest.$ac_ext <<EOF
#line 1282 "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:1288: \"$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
  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 "$ECHO_T""$CPP" 1>&6

if test $ac_cv_prog_gcc = yes; then
    echo $ECHO_N "checking whether ${CC-cc} needs -traditional... $ECHO_C" 1>&6
echo "configure:1312: checking whether ${CC-cc} needs -traditional" 1>&5
if test "${ac_cv_prog_gcc_traditional+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
    ac_pattern="Autoconf.*'x'"

cat >conftest.$ac_ext <<EOF
#line 1318 "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
  ac_cv_prog_gcc_traditional=yes
else
  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 1332 "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
  ac_cv_prog_gcc_traditional=yes
fi
rm -f conftest*

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

# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ECHO_N "checking for $ac_word... $ECHO_C" 1>&6
echo "configure:1352: checking for $ac_word" 1>&5
if test "${ac_cv_prog_RANLIB+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  if test -n "$RANLIB"; then
  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
else
  for ac_path in `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
    echo "$ac_dir/$ac_word"
  fi
done
IFS=$ac_save_ifs
`; do
    ac_cv_prog_RANLIB="ranlib"
    break
  done
  test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
fi
fi
RANLIB="$ac_cv_prog_RANLIB"
if test -n "$RANLIB"; then
  echo "$ECHO_T""$RANLIB" 1>&6
else
  echo "$ECHO_T""no" 1>&6
fi

echo $ECHO_N "checking for AIX... $ECHO_C" 1>&6
echo "configure:1382: checking for AIX" 1>&5

cat >conftest.$ac_ext <<EOF
#line 1384 "configure"
#include "confdefs.h"
#ifdef _AIX
  yes
#endif

EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "yes" >/dev/null 2>&1; then
  echo "$ECHO_T""yes" 1>&6
cat >>confdefs.h <<\EOF
#define _ALL_SOURCE 1
EOF

else
  echo "$ECHO_T""no" 1>&6
fi
rm -f conftest*

echo $ECHO_N "checking for minix/config.h... $ECHO_C" 1>&6
echo "configure:1401: checking for minix/config.h" 1>&5
if test "${ac_cv_header_minix_config_h+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else

cat >conftest.$ac_ext <<EOF
#line 1406 "configure"
#include "confdefs.h"
#include <minix/config.h>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1411: \"$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
  ac_cv_header_minix_config_h=yes
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_header_minix_config_h=no
fi
rm -f conftest*
fi
echo "$ECHO_T""$ac_cv_header_minix_config_h" 1>&6
if test $ac_cv_header_minix_config_h = yes; then
  MINIX=yes
else
  MINIX=
fi

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

  cat >>confdefs.h <<\EOF
#define _POSIX_1_SOURCE 2
EOF

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

fi

echo $ECHO_N "checking build system type... $ECHO_C" 1>&6
echo "configure:1441: checking build system type" 1>&5
if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then

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

  ac_cv_build_alias=$build
  case "$ac_cv_build_alias" in
  NONE)
    case $nonopt in
    NONE)
      ac_cv_build_alias=$host_alias ;;
    *) ac_cv_build_alias=$nonopt ;;
    esac ;;
  esac

  ac_cv_build=`$ac_config_sub $ac_cv_build_alias` || exit 1
  ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
  ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
  ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
else
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
fi

echo "$ECHO_T""$ac_cv_build" 1>&6

build=$ac_cv_build
build_alias=$ac_cv_build_alias
build_cpu=$ac_cv_build_cpu
build_vendor=$ac_cv_build_vendor
build_os=$ac_cv_build_os

if test $host != $build; then
  ac_tool_prefix=${host_alias}-
else
  ac_tool_prefix=
fi

   # Check whether --enable-largefile or --disable-largefile was given.
if test "${enable_largefile+set}" = set; then
  enableval="$enable_largefile"

fi
   if test "$enable_largefile" != no; then

# Extract the first word of "${ac_tool_prefix}getconf", so it can be a program name with args.
set dummy ${ac_tool_prefix}getconf; ac_word=$2
echo $ECHO_N "checking for $ac_word... $ECHO_C" 1>&6
echo "configure:1482: checking for $ac_word" 1>&5
if test "${ac_cv_prog_GETCONF+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  if test -n "$GETCONF"; then
  ac_cv_prog_GETCONF="$GETCONF" # Let the user override the test.
else
  for ac_path in `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
    echo "$ac_dir/$ac_word"
  fi
done
IFS=$ac_save_ifs
`; do
    ac_cv_prog_GETCONF="${ac_tool_prefix}getconf"
    break
  done
  test -z "$ac_cv_prog_GETCONF" && ac_cv_prog_GETCONF="getconf"
fi
fi
GETCONF="$ac_cv_prog_GETCONF"
if test -n "$GETCONF"; then
  echo "$ECHO_T""$GETCONF" 1>&6
else
  echo "$ECHO_T""no" 1>&6
fi

     echo $ECHO_N "checking for CFLAGS value to request large file support... $ECHO_C" 1>&6
echo "configure:1512: checking for CFLAGS value to request large file support" 1>&5
if test "${ac_cv_sys_largefile_CFLAGS+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  if ($GETCONF LFS_CFLAGS) >conftest.1 2>conftest.2 && test ! -s conftest.2
      then
        ac_cv_sys_largefile_CFLAGS=`cat conftest.1`
      else
	ac_cv_sys_largefile_CFLAGS=no
	case "$host_os" in
	   # HP-UX 10.20 requires -D__STDC_EXT__ with gcc 2.95.1.
	   hpux10.[2-9][0-9]* | hpux1[1-9]* | hpux[2-9][0-9]*)
	     if test "$GCC" = yes; then
	       ac_cv_sys_largefile_CFLAGS=-D__STDC_EXT__
	     fi
	     ;;
	   # IRIX 6.2 and later require cc -n32.
	   irix6.[2-9]* | irix6.1[0-9]* | irix[7-9].* | irix[1-9][0-9]*)
	     if test "$GCC" != yes; then
	       ac_cv_sys_largefile_CFLAGS=-n32
	     fi
	   esac
	   if test "$ac_cv_sys_largefile_CFLAGS" != no; then
	     ac_save_CC="$CC"
	     CC="$CC $ac_cv_sys_largefile_CFLAGS"
	     cat >conftest.$ac_ext <<EOF
#line 1538 "configure"
#include "confdefs.h"

int
main ()
{

  ;
  return 0;
}
EOF
if { (eval echo configure:1547: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  :
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_sys_largefile_CFLAGS=no
fi
rm -f conftest*
	     CC="$ac_save_CC"
	   fi
      fi
      rm -f conftest*
fi
echo "$ECHO_T""$ac_cv_sys_largefile_CFLAGS" 1>&6
     echo $ECHO_N "checking for LDFLAGS value to request large file support... $ECHO_C" 1>&6
echo "configure:1562: checking for LDFLAGS value to request large file support" 1>&5
if test "${ac_cv_sys_largefile_LDFLAGS+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  if ($GETCONF LFS_LDFLAGS) >conftest.1 2>conftest.2 && test ! -s conftest.2
      then
        ac_cv_sys_largefile_LDFLAGS=`cat conftest.1`
      else
	ac_cv_sys_largefile_LDFLAGS=no
	
      fi
      rm -f conftest*
fi
echo "$ECHO_T""$ac_cv_sys_largefile_LDFLAGS" 1>&6
     echo $ECHO_N "checking for LIBS value to request large file support... $ECHO_C" 1>&6
echo "configure:1577: checking for LIBS value to request large file support" 1>&5
if test "${ac_cv_sys_largefile_LIBS+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  if ($GETCONF LFS_LIBS) >conftest.1 2>conftest.2 && test ! -s conftest.2
      then
        ac_cv_sys_largefile_LIBS=`cat conftest.1`
      else
	ac_cv_sys_largefile_LIBS=no
	
      fi
      rm -f conftest*
fi
echo "$ECHO_T""$ac_cv_sys_largefile_LIBS" 1>&6

     for ac_flag in $ac_cv_sys_largefile_CFLAGS no; do
       case "$ac_flag" in
       no) ;;
       -D_FILE_OFFSET_BITS=*) ;;
       -D_LARGEFILE_SOURCE | -D_LARGEFILE_SOURCE=*) ;;
       -D_LARGE_FILES | -D_LARGE_FILES=*) ;;
       -D?* | -I?*)
	 case "$ac_flag" in
   no) ;;
   ?*)
     case "$CPPFLAGS" in
     '') CPPFLAGS="$ac_flag" ;;
     *) CPPFLAGS=$CPPFLAGS' '"$ac_flag" ;;
     esac ;;
   esac ;;
       *)
	 case "$ac_flag" in
   no) ;;
   ?*)
     case "$CFLAGS" in
     '') CFLAGS="$ac_flag" ;;
     *) CFLAGS=$CFLAGS' '"$ac_flag" ;;
     esac ;;
   esac ;;
       esac
     done
     case "$ac_cv_sys_largefile_LDFLAGS" in
   no) ;;
   ?*)
     case "$LDFLAGS" in
     '') LDFLAGS="$ac_cv_sys_largefile_LDFLAGS" ;;
     *) LDFLAGS=$LDFLAGS' '"$ac_cv_sys_largefile_LDFLAGS" ;;
     esac ;;
   esac
     case "$ac_cv_sys_largefile_LIBS" in
   no) ;;
   ?*)
     case "$LIBS" in
     '') LIBS="$ac_cv_sys_largefile_LIBS" ;;
     *) LIBS=$LIBS' '"$ac_cv_sys_largefile_LIBS" ;;
     esac ;;
   esac
     echo $ECHO_N "checking for _FILE_OFFSET_BITS... $ECHO_C" 1>&6
echo "configure:1634: checking for _FILE_OFFSET_BITS" 1>&5
if test "${ac_cv_sys_file_offset_bits+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  ac_cv_sys_file_offset_bits=no
      case "$host_os" in
	# HP-UX 10.20 and later
	hpux10.[2-9][0-9]* | hpux1[1-9]* | hpux[2-9][0-9]*)
	  ac_cv_sys_file_offset_bits=64 ;;
	esac
      for ac_flag in $ac_cv_sys_largefile_CFLAGS no; do
	case "$ac_flag" in
	-D_FILE_OFFSET_BITS)
	  ac_cv_sys_file_offset_bits=1 ;;
	-D_FILE_OFFSET_BITS=*)
	  ac_cv_sys_file_offset_bits=`expr " $ac_flag" : '[^=]*=\(.*\)'` ;;
	esac
      done

fi
echo "$ECHO_T""$ac_cv_sys_file_offset_bits" 1>&6
   if test "$ac_cv_sys_file_offset_bits" != no; then
     cat >>confdefs.h <<EOF
#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
EOF

   fi
     echo $ECHO_N "checking for _LARGEFILE_SOURCE... $ECHO_C" 1>&6
echo "configure:1660: checking for _LARGEFILE_SOURCE" 1>&5
if test "${ac_cv_sys_largefile_source+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  ac_cv_sys_largefile_source=no
      case "$host_os" in
	# HP-UX 10.20 and later
	hpux10.[2-9][0-9]* | hpux1[1-9]* | hpux[2-9][0-9]*)
	  ac_cv_sys_largefile_source=1 ;;
	esac
      for ac_flag in $ac_cv_sys_largefile_CFLAGS no; do
	case "$ac_flag" in
	-D_LARGEFILE_SOURCE)
	  ac_cv_sys_largefile_source=1 ;;
	-D_LARGEFILE_SOURCE=*)
	  ac_cv_sys_largefile_source=`expr " $ac_flag" : '[^=]*=\(.*\)'` ;;
	esac
      done

fi
echo "$ECHO_T""$ac_cv_sys_largefile_source" 1>&6
   if test "$ac_cv_sys_largefile_source" != no; then
     cat >>confdefs.h <<EOF
#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
EOF

   fi
     echo $ECHO_N "checking for _LARGE_FILES... $ECHO_C" 1>&6
echo "configure:1686: checking for _LARGE_FILES" 1>&5
if test "${ac_cv_sys_large_files+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  ac_cv_sys_large_files=no
      case "$host_os" in
	# AIX 4.2 and later
	aix4.[2-9]* | aix4.1[0-9]* | aix[5-9].* | aix[1-9][0-9]*)
	  ac_cv_sys_large_files=1 ;;
	esac
      for ac_flag in $ac_cv_sys_largefile_CFLAGS no; do
	case "$ac_flag" in
	-D_LARGE_FILES)
	  ac_cv_sys_large_files=1 ;;
	-D_LARGE_FILES=*)
	  ac_cv_sys_large_files=`expr " $ac_flag" : '[^=]*=\(.*\)'` ;;
	esac
      done

fi
echo "$ECHO_T""$ac_cv_sys_large_files" 1>&6
   if test "$ac_cv_sys_large_files" != no; then
     cat >>confdefs.h <<EOF
#define _LARGE_FILES $ac_cv_sys_large_files
EOF

   fi
   fi

echo $ECHO_N "checking for ${CC-cc} option to accept ANSI C... $ECHO_C" 1>&6
echo "configure:1713: checking for ${CC-cc} option to accept ANSI C" 1>&5
if test "${am_cv_prog_cc_stdc+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  am_cv_prog_cc_stdc=no
ac_save_CC="$CC"
# Don't try gcc -ansi; that turns off useful extensions and
# breaks some systems' header files.
# AIX			-qlanglvl=ansi
# Ultrix and OSF/1	-std1
# HP-UX 10.20 and later	-Ae
# HP-UX older versions	-Aa -D_HPUX_SOURCE
# SVR4			-Xc -D__EXTENSIONS__
for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
do
  CC="$ac_save_CC $ac_arg"
  cat >conftest.$ac_ext <<EOF
#line 1730 "configure"
#include "confdefs.h"
#include <stdarg.h>
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
struct buf { int x; };
FILE * (*rcsopen) (struct buf *, struct stat *, int);
static char *e (p, i)
     char **p;
     int i;
{
  return p[i];
}
static char *f (char * (*g) (char **, int), char **p, ...)
{
  char *s;
  va_list v;
  va_start (v,p);
  s = g (p, va_arg (v,int));
  va_end (v);
  return s;
}
int test (int i, double x);
struct s1 {int (*f) (int a);};
struct s2 {int (*f) (double a);};
int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
int argc;
char **argv;

int
main ()
{

return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];

  ;
  return 0;
}
EOF
if { (eval echo configure:1768: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  am_cv_prog_cc_stdc="$ac_arg"; break
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
fi
rm -f conftest*
done
CC="$ac_save_CC"

fi

if test -z "$am_cv_prog_cc_stdc"; then
  echo "$ECHO_T""none needed" 1>&6
else
  echo "$ECHO_T""$am_cv_prog_cc_stdc" 1>&6
fi
case "x$am_cv_prog_cc_stdc" in
  x|xno) ;;
  *) CC="$CC $am_cv_prog_cc_stdc" ;;
esac

echo $ECHO_N "checking for function prototypes... $ECHO_C" 1>&6
echo "configure:1788: checking for function prototypes" 1>&5
if test "$am_cv_prog_cc_stdc" != no; then
  echo "$ECHO_T""yes" 1>&6
  cat >>confdefs.h <<\EOF
#define PROTOTYPES 1
EOF

  U= ANSI2KNR=
else
  echo "$ECHO_T""no" 1>&6
  U=_ ANSI2KNR=./ansi2knr
  # Ensure some checks needed by ansi2knr itself.

echo $ECHO_N "checking for ANSI C header files... $ECHO_C" 1>&6
echo "configure:1800: checking for ANSI C header files" 1>&5
if test "${ac_cv_header_stdc+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else

cat >conftest.$ac_ext <<EOF
#line 1805 "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:1813: \"$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
  ac_cv_header_stdc=yes
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  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 1827 "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
  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 1842 "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
  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 1860 "configure"
#include "confdefs.h"
#include <ctype.h>
#if ((' ' & 0x0FF) == 0x020)
# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
#else
# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
                     || ('j' <= (c) && (c) <= 'r') \
                     || ('s' <= (c) && (c) <= 'z'))
# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
#endif

#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:1884: \"$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
  ac_cv_header_stdc=no
fi
rm -f conftest*
fi

fi
fi
echo "$ECHO_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

  for ac_header in string.h
do
ac_ac_Header=`echo "ac_cv_header_$ac_header" | $ac_tr_sh`
echo $ECHO_N "checking for $ac_header... $ECHO_C" 1>&6
echo "configure:1906: checking for $ac_header" 1>&5
if eval "test \"\${$ac_ac_Header+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else

cat >conftest.$ac_ext <<EOF
#line 1911 "configure"
#include "confdefs.h"
#include <$ac_header>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1916: \"$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
  eval "$ac_ac_Header=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$ac_ac_Header=no"
fi
rm -f conftest*
fi
echo "$ECHO_T""`eval echo '${'$ac_ac_Header'}'`" 1>&6
if test `eval echo '${'$ac_ac_Header'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_header" | $ac_tr_cpp` 1
EOF

fi
done

fi

for ac_func in uname
do
ac_ac_var=`echo "ac_cv_func_$ac_func" | $ac_tr_sh`
echo $ECHO_N "checking for $ac_func... $ECHO_C" 1>&6
echo "configure:1940: checking for $ac_func" 1>&5
if eval "test \"\${$ac_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 1945 "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.  */
#ifdef __cplusplus
extern "C"
#endif
/* 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();
char (*f)();

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
f = $ac_func;
#endif

  ;
  return 0;
}
EOF
if { (eval echo configure:1973: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  eval "$ac_ac_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$ac_ac_var=no"
fi
rm -f conftest*
fi
echo "$ECHO_T""`eval echo '${'$ac_ac_var'}'`" 1>&6
if test `eval echo '${'$ac_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $ac_tr_cpp` 1
EOF
 OPTIONAL_BIN_PROGS="$OPTIONAL_BIN_PROGS uname" MAN="$MAN uname.1"
fi
done

for ac_func in chroot
do
ac_ac_var=`echo "ac_cv_func_$ac_func" | $ac_tr_sh`
echo $ECHO_N "checking for $ac_func... $ECHO_C" 1>&6
echo "configure:1994: checking for $ac_func" 1>&5
if eval "test \"\${$ac_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 1999 "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.  */
#ifdef __cplusplus
extern "C"
#endif
/* 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();
char (*f)();

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
f = $ac_func;
#endif

  ;
  return 0;
}
EOF
if { (eval echo configure:2027: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  eval "$ac_ac_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$ac_ac_var=no"
fi
rm -f conftest*
fi
echo "$ECHO_T""`eval echo '${'$ac_ac_var'}'`" 1>&6
if test `eval echo '${'$ac_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $ac_tr_cpp` 1
EOF
 OPTIONAL_BIN_PROGS="$OPTIONAL_BIN_PROGS chroot" MAN="$MAN chroot.1"
fi
done

for ac_func in gethostid
do
ac_ac_var=`echo "ac_cv_func_$ac_func" | $ac_tr_sh`
echo $ECHO_N "checking for $ac_func... $ECHO_C" 1>&6
echo "configure:2048: checking for $ac_func" 1>&5
if eval "test \"\${$ac_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 2053 "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.  */
#ifdef __cplusplus
extern "C"
#endif
/* 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();
char (*f)();

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
f = $ac_func;
#endif

  ;
  return 0;
}
EOF
if { (eval echo configure:2081: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  eval "$ac_ac_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$ac_ac_var=no"
fi
rm -f conftest*
fi
echo "$ECHO_T""`eval echo '${'$ac_ac_var'}'`" 1>&6
if test `eval echo '${'$ac_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $ac_tr_cpp` 1
EOF
 OPTIONAL_BIN_PROGS="$OPTIONAL_BIN_PROGS hostid" MAN="$MAN hostid.1"
fi
done

echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" 1>&6
echo "configure:2099: checking whether time.h and sys/time.h may both be included" 1>&5
if test "${ac_cv_header_time+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 2104 "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:2117: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  ac_cv_header_time=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_header_time=no
fi
rm -f conftest*
fi
echo "$ECHO_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 $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" 1>&6
echo "configure:2133: checking for uid_t in sys/types.h" 1>&5
if test "${ac_cv_type_uid_t+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else

cat >conftest.$ac_ext <<EOF
#line 2138 "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
  ac_cv_type_uid_t=yes
else
  ac_cv_type_uid_t=no
fi
rm -f conftest*

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

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

fi

  echo $ECHO_N "checking for inttypes.h... $ECHO_C" 1>&6
echo "configure:2160: checking for inttypes.h" 1>&5
if test "${jm_ac_cv_header_inttypes_h+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 2165 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <inttypes.h>
int
main ()
{
uintmax_t i = (uintmax_t) -1;
  ;
  return 0;
}
EOF
if { (eval echo configure:2177: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  jm_ac_cv_header_inttypes_h=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  jm_ac_cv_header_inttypes_h=no
fi
rm -f conftest*
fi
echo "$ECHO_T""$jm_ac_cv_header_inttypes_h" 1>&6
  if test $jm_ac_cv_header_inttypes_h = yes; then
    cat >>confdefs.h <<EOF
#define HAVE_INTTYPES_H 1
EOF

  fi

  echo $ECHO_N "checking for unsigned long long... $ECHO_C" 1>&6
echo "configure:2193: checking for unsigned long long" 1>&5
if test "${ac_cv_type_unsigned_long_long+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 2198 "configure"
#include "confdefs.h"
unsigned long long ull = 1; int i = 63;
int
main ()
{
unsigned long long ullmax = (unsigned long long) -1;
     return ull << i | ull >> i | ullmax / ull | ullmax % ull;
  ;
  return 0;
}
EOF
if { (eval echo configure:2210: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  ac_cv_type_unsigned_long_long=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_type_unsigned_long_long=no
fi
rm -f conftest*
fi
echo "$ECHO_T""$ac_cv_type_unsigned_long_long" 1>&6
  if test $ac_cv_type_unsigned_long_long = yes; then
    cat >>confdefs.h <<\EOF
#define HAVE_UNSIGNED_LONG_LONG 1
EOF

  fi

echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" 1>&6
echo "configure:2226: checking whether byte ordering is bigendian" 1>&5
if test "${ac_cv_c_bigendian+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_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 2233 "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:2247: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  # It does; now see whether it defined to BIG_ENDIAN or not.
cat >conftest.$ac_ext <<EOF
#line 2250 "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:2264: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  ac_cv_c_bigendian=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  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: cannot run test program while cross compiling" 1>&2; exit 1; }
else
  cat >conftest.$ac_ext <<EOF
#line 2282 "configure"
#include "confdefs.h"
int
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:2297: \"$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
  ac_cv_c_bigendian=yes
fi
rm -f conftest*
fi

fi
fi
echo "$ECHO_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 $ECHO_N "checking for ${CC-cc} option to accept ANSI C... $ECHO_C" 1>&6
echo "configure:2316: checking for ${CC-cc} option to accept ANSI C" 1>&5
if test "${ac_cv_prog_cc_stdc+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  ac_cv_prog_cc_stdc=no
ac_save_CC="$CC"
# Don't try gcc -ansi; that turns off useful extensions and
# breaks some systems' header files.
# AIX			-qlanglvl=ansi
# Ultrix and OSF/1	-std1
# HP-UX 10.20 and later	-Ae
# HP-UX older versions	-Aa -D_HPUX_SOURCE
# SVR4			-Xc -D__EXTENSIONS__
for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
do
  CC="$ac_save_CC $ac_arg"
  cat >conftest.$ac_ext <<EOF
#line 2333 "configure"
#include "confdefs.h"
#include <stdarg.h>
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
struct buf { int x; };
FILE * (*rcsopen) (struct buf *, struct stat *, int);
static char *e (p, i)
     char **p;
     int i;
{
  return p[i];
}
static char *f (char * (*g) (char **, int), char **p, ...)
{
  char *s;
  va_list v;
  va_start (v,p);
  s = g (p, va_arg (v,int));
  va_end (v);
  return s;
}
int test (int i, double x);
struct s1 {int (*f) (int a);};
struct s2 {int (*f) (double a);};
int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
int argc;
char **argv;
int
main ()
{
return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
  ;
  return 0;
}
EOF
if { (eval echo configure:2371: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  ac_cv_prog_cc_stdc="$ac_arg"; break
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
fi
rm -f conftest*
done
CC="$ac_save_CC"

fi

case "x$ac_cv_prog_cc_stdc" in
  x|xno)
    echo "$ECHO_T""none needed" 1>&6 ;;
  *)
    echo "$ECHO_T""$ac_cv_prog_cc_stdc" 1>&6
    CC="$CC $ac_cv_prog_cc_stdc" ;;
esac

echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" 1>&6
echo "configure:2389: checking for an ANSI C-conforming const" 1>&5
if test "${ac_cv_c_const+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 2394 "configure"
#include "confdefs.h"

int
main ()
{
/* FIXME: Include the comments suggested by Paul. */
#ifndef __cplusplus
  /* 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;
  }
#endif

  ;
  return 0;
}
EOF
if { (eval echo configure:2448: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  ac_cv_c_const=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_c_const=no
fi
rm -f conftest*
fi
echo "$ECHO_T""$ac_cv_c_const" 1>&6
if test $ac_cv_c_const = no; then
  cat >>confdefs.h <<\EOF
#define const
EOF

fi

echo $ECHO_N "checking for working volatile... $ECHO_C" 1>&6
echo "configure:2464: checking for working volatile" 1>&5
if test "${ac_cv_c_volatile+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 2469 "configure"
#include "confdefs.h"

int
main ()
{

volatile int x;
int * volatile y;
  ;
  return 0;
}
EOF
if { (eval echo configure:2480: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  ac_cv_c_volatile=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_c_volatile=no
fi
rm -f conftest*
fi
echo "$ECHO_T""$ac_cv_c_volatile" 1>&6
if test $ac_cv_c_volatile = no; then
  cat >>confdefs.h <<\EOF
#define volatile
EOF

fi

echo $ECHO_N "checking for inline... $ECHO_C" 1>&6
echo "configure:2496: checking for inline" 1>&5
if test "${ac_cv_c_inline+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  ac_cv_c_inline=no
for ac_kw in inline __inline__ __inline; do
  cat >conftest.$ac_ext <<EOF
#line 2503 "configure"
#include "confdefs.h"

int
main ()
{
#ifndef __cplusplus
  } $ac_kw int foo() {
#endif

  ;
  return 0;
}
EOF
if { (eval echo configure:2515: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  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 "$ECHO_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 $ECHO_N "checking for long double... $ECHO_C" 1>&6
echo "configure:2537: checking for long double" 1>&5
if test "${ac_cv_c_long_double+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  if test "$GCC" = yes; then
  ac_cv_c_long_double=yes
else
if test "$cross_compiling" = yes; then
    { echo "configure: error: cannot run test program while cross compiling" 1>&2; exit 1; }
else
  cat >conftest.$ac_ext <<EOF
#line 2548 "configure"
#include "confdefs.h"
int
main ()
{
  /* The Stardent Vistra knows sizeof(long double), but does not
     support it.  */
  long double foo = 0.0;
  /* On Ultrix 4.3 cc, long double is 4 and double is 8.  */
  exit(sizeof(long double) < sizeof(double));
}
EOF
if { (eval echo configure:2560: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } &&
   test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null; then
  ac_cv_c_long_double=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_c_long_double=no
fi
rm -f conftest*
fi

fi
fi
echo "$ECHO_T""$ac_cv_c_long_double" 1>&6
if test $ac_cv_c_long_double = yes; then
  cat >>confdefs.h <<\EOF
#define HAVE_LONG_DOUBLE 1
EOF

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 $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" 1>&6
echo "configure:2583: checking for $ac_hdr that defines DIR" 1>&5
if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 2588 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <$ac_hdr>

int
main ()
{
DIR *dirp = 0;
  ;
  return 0;
}
EOF
if { (eval echo configure:2600: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  eval "ac_cv_header_dirent_$ac_safe=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  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 "$ECHO_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 "$ECHO_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 $ECHO_N "checking for opendir in -ldir... $ECHO_C" 1>&6
echo "configure:2623: checking for opendir in -ldir" 1>&5
if test "${ac_cv_lib_dir_opendir+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-ldir  $LIBS"
cat >conftest.$ac_ext <<EOF
#line 2630 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* 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:2647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  ac_cv_lib_dir_opendir=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_lib_dir_opendir=no
fi
rm -f conftest*
LIBS="$ac_save_LIBS"
fi
echo "$ECHO_T""$ac_cv_lib_dir_opendir" 1>&6
if test $ac_cv_lib_dir_opendir = yes; then
  LIBS="$LIBS -ldir"
fi

else
  echo $ECHO_N "checking for opendir in -lx... $ECHO_C" 1>&6
echo "configure:2663: checking for opendir in -lx" 1>&5
if test "${ac_cv_lib_x_opendir+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lx  $LIBS"
cat >conftest.$ac_ext <<EOF
#line 2670 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* 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:2687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  ac_cv_lib_x_opendir=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_lib_x_opendir=no
fi
rm -f conftest*
LIBS="$ac_save_LIBS"
fi
echo "$ECHO_T""$ac_cv_lib_x_opendir" 1>&6
if test $ac_cv_lib_x_opendir = yes; then
  LIBS="$LIBS -lx"
fi

fi

echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" 1>&6
echo "configure:2703: checking for struct stat.st_blocks" 1>&5
if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 2708 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/stat.h>

int
main ()
{
struct stat foo;
foo.st_blocks;
  ;
  return 0;
}
EOF
if { (eval echo configure:2721: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  ac_cv_member_struct_stat_st_blocks=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_member_struct_stat_st_blocks=no
fi
rm -f conftest*
fi
echo "$ECHO_T""$ac_cv_member_struct_stat_st_blocks" 1>&6
if test $ac_cv_member_struct_stat_st_blocks = yes; then
  cat >>confdefs.h <<EOF
#define HAVE_STRUCT_STAT_ST_BLOCKS 1
EOF

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

else
  LIBOBJS="$LIBOBJS fileblocks.${ac_objext}"

fi

echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" 1>&6
echo "configure:2742: checking whether struct tm is in sys/time.h or time.h" 1>&5
if test "${ac_cv_struct_tm+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 2747 "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:2759: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  ac_cv_struct_tm=time.h
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_struct_tm=sys/time.h
fi
rm -f conftest*
fi
echo "$ECHO_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 $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" 1>&6
echo "configure:2775: checking for struct tm.tm_zone" 1>&5
if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 2780 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <$ac_cv_struct_tm>

int
main ()
{
struct tm foo;
foo.tm_zone;
  ;
  return 0;
}
EOF
if { (eval echo configure:2793: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  ac_cv_member_struct_tm_tm_zone=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_member_struct_tm_tm_zone=no
fi
rm -f conftest*
fi
echo "$ECHO_T""$ac_cv_member_struct_tm_tm_zone" 1>&6
if test $ac_cv_member_struct_tm_tm_zone = yes; then
  cat >>confdefs.h <<EOF
#define HAVE_STRUCT_TM_TM_ZONE 1
EOF

fi

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

else
  echo $ECHO_N "checking for tzname... $ECHO_C" 1>&6
echo "configure:2814: checking for tzname" 1>&5
if test "${ac_cv_var_tzname+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 2819 "configure"
#include "confdefs.h"
#include <time.h>
#ifndef tzname /* For SGI.  */
extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
#endif

int
main ()
{
atoi(*tzname);
  ;
  return 0;
}
EOF
if { (eval echo configure:2833: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  ac_cv_var_tzname=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_var_tzname=no
fi
rm -f conftest*
fi
echo "$ECHO_T""$ac_cv_var_tzname" 1>&6
  if test $ac_cv_var_tzname = yes; then
    cat >>confdefs.h <<\EOF
#define HAVE_TZNAME 1
EOF

  fi
fi

echo $ECHO_N "checking whether stat file-mode macros are broken... $ECHO_C" 1>&6
echo "configure:2850: checking whether stat file-mode macros are broken" 1>&5
if test "${ac_cv_header_stat_broken+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else

cat >conftest.$ac_ext <<EOF
#line 2855 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/stat.h>

#if defined(S_ISBLK) && defined(S_IFDIR)
# if S_ISBLK (S_IFDIR)
You lose.
# endif
#endif

#if defined(S_ISBLK) && defined(S_IFCHR)
# if S_ISBLK (S_IFCHR)
You lose.
# endif
#endif

#if defined(S_ISLNK) && defined(S_IFREG)
# if S_ISLNK (S_IFREG)
You lose.
# endif
#endif

#if defined(S_ISSOCK) && defined(S_IFREG)
# if S_ISSOCK (S_IFREG)
You lose.
# endif
#endif

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

fi
echo "$ECHO_T""$ac_cv_header_stat_broken" 1>&6
if test $ac_cv_header_stat_broken = yes; then
  cat >>confdefs.h <<\EOF
#define STAT_MACROS_BROKEN 1
EOF

fi

echo $ECHO_N "checking for nanoseconds member of struct stat.st_mtim... $ECHO_C" 1>&6
echo "configure:2895: checking for nanoseconds member of struct stat.st_mtim" 1>&5
if test "${ac_cv_struct_st_mtim_nsec+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  ac_save_CPPFLAGS="$CPPFLAGS"
    ac_cv_struct_st_mtim_nsec=no
    # tv_nsec -- the usual case
    # _tv_nsec -- Solaris 2.6, if
    #	(defined _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED == 1
    #	 && !defined __EXTENSIONS__)
    # st__tim.tv_nsec -- UnixWare 2.1.2
    for ac_val in tv_nsec _tv_nsec st__tim.tv_nsec; do
      CPPFLAGS="$ac_save_CPPFLAGS -DST_MTIM_NSEC=$ac_val"
      cat >conftest.$ac_ext <<EOF
#line 2909 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/stat.h>
int
main ()
{
struct stat s; s.st_mtim.ST_MTIM_NSEC;
  ;
  return 0;
}
EOF
if { (eval echo configure:2921: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  ac_cv_struct_st_mtim_nsec=$ac_val; break
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
fi
rm -f conftest*
    done
    CPPFLAGS="$ac_save_CPPFLAGS"
fi
echo "$ECHO_T""$ac_cv_struct_st_mtim_nsec" 1>&6

  if test $ac_cv_struct_st_mtim_nsec != no; then
    cat >>confdefs.h <<EOF
#define ST_MTIM_NSEC $ac_cv_struct_st_mtim_nsec
EOF

  fi

echo $ECHO_N "checking for st_dm_mode in struct stat... $ECHO_C" 1>&6
echo "configure:2938: checking for st_dm_mode in struct stat" 1>&5
if test "${ac_cv_struct_st_dm_mode+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 2943 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/stat.h>
int
main ()
{
struct stat s; s.st_dm_mode;
  ;
  return 0;
}
EOF
if { (eval echo configure:2955: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  ac_cv_struct_st_dm_mode=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_struct_st_dm_mode=no
fi
rm -f conftest*
fi
echo "$ECHO_T""$ac_cv_struct_st_dm_mode" 1>&6

  if test $ac_cv_struct_st_dm_mode = yes; then
    cat >>confdefs.h <<EOF
#define HAVE_ST_DM_MODE 1
EOF

  fi

  echo $ECHO_N "checking for struct timespec... $ECHO_C" 1>&6
echo "configure:2971: checking for struct timespec" 1>&5
if test "${fu_cv_sys_struct_timespec+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 2976 "configure"
#include "confdefs.h"

#      if TIME_WITH_SYS_TIME
#       include <sys/time.h>
#       include <time.h>
#      else
#       if HAVE_SYS_TIME_H
#        include <sys/time.h>
#       else
#        include <time.h>
#       endif
#      endif

int
main ()
{
static struct timespec x; x.tv_sec = x.tv_nsec;
  ;
  return 0;
}
EOF
if { (eval echo configure:2996: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  fu_cv_sys_struct_timespec=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  fu_cv_sys_struct_timespec=no
fi
rm -f conftest*

fi
echo "$ECHO_T""$fu_cv_sys_struct_timespec" 1>&6

  if test $fu_cv_sys_struct_timespec = yes; then
    cat >>confdefs.h <<EOF
#define HAVE_STRUCT_TIMESPEC 1
EOF

  fi

echo $ECHO_N "checking type of array argument to getgroups... $ECHO_C" 1>&6
echo "configure:3012: checking type of array argument to getgroups" 1>&5
if test "${ac_cv_type_getgroups+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_type_getgroups=cross
else
  cat >conftest.$ac_ext <<EOF
#line 3020 "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))
int
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:3043: \"$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
  ac_cv_type_getgroups=int
fi
rm -f conftest*
fi

if test $ac_cv_type_getgroups = cross; then

cat >conftest.$ac_ext <<EOF
#line 3055 "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
  ac_cv_type_getgroups=gid_t
else
  ac_cv_type_getgroups=int
fi
rm -f conftest*

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

echo $ECHO_N "checking for mode_t... $ECHO_C" 1>&6
echo "configure:3073: checking for mode_t" 1>&5
if test "${ac_cv_type_mode_t+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 3078 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
if ((mode_t *) 0)
  return 0;
if (sizeof (mode_t))
  return 0;
  ;
  return 0;
}
EOF
if { (eval echo configure:3092: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  ac_cv_type_mode_t=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_type_mode_t=no
fi
rm -f conftest*
fi
echo "$ECHO_T""$ac_cv_type_mode_t" 1>&6
if test $ac_cv_type_mode_t = yes; then
  :
else
  cat >>confdefs.h <<EOF
#define mode_t int
EOF

fi

echo $ECHO_N "checking for off_t... $ECHO_C" 1>&6
echo "configure:3110: checking for off_t" 1>&5
if test "${ac_cv_type_off_t+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 3115 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
if ((off_t *) 0)
  return 0;
if (sizeof (off_t))
  return 0;
  ;
  return 0;
}
EOF
if { (eval echo configure:3129: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  ac_cv_type_off_t=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_type_off_t=no
fi
rm -f conftest*
fi
echo "$ECHO_T""$ac_cv_type_off_t" 1>&6
if test $ac_cv_type_off_t = yes; then
  :
else
  cat >>confdefs.h <<EOF
#define off_t long
EOF

fi

echo $ECHO_N "checking for pid_t... $ECHO_C" 1>&6
echo "configure:3147: checking for pid_t" 1>&5
if test "${ac_cv_type_pid_t+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 3152 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
if ((pid_t *) 0)
  return 0;
if (sizeof (pid_t))
  return 0;
  ;
  return 0;
}
EOF
if { (eval echo configure:3166: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  ac_cv_type_pid_t=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_type_pid_t=no
fi
rm -f conftest*
fi
echo "$ECHO_T""$ac_cv_type_pid_t" 1>&6
if test $ac_cv_type_pid_t = yes; then
  :
else
  cat >>confdefs.h <<EOF
#define pid_t int
EOF

fi

echo $ECHO_N "checking return type of signal handlers... $ECHO_C" 1>&6
echo "configure:3184: checking return type of signal handlers" 1>&5
if test "${ac_cv_type_signal+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 3189 "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:3209: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  ac_cv_type_signal=void
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_type_signal=int
fi
rm -f conftest*
fi
echo "$ECHO_T""$ac_cv_type_signal" 1>&6
cat >>confdefs.h <<EOF
#define RETSIGTYPE $ac_cv_type_signal
EOF

echo $ECHO_N "checking for size_t... $ECHO_C" 1>&6
echo "configure:3223: checking for size_t" 1>&5
if test "${ac_cv_type_size_t+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 3228 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
if ((size_t *) 0)
  return 0;
if (sizeof (size_t))
  return 0;
  ;
  return 0;
}
EOF
if { (eval echo configure:3242: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  ac_cv_type_size_t=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_type_size_t=no
fi
rm -f conftest*
fi
echo "$ECHO_T""$ac_cv_type_size_t" 1>&6
if test $ac_cv_type_size_t = yes; then
  :
else
  cat >>confdefs.h <<EOF
#define size_t unsigned
EOF

fi

  if test $jm_ac_cv_header_inttypes_h = no; then

    test $ac_cv_type_unsigned_long_long = yes \
      && ac_type='unsigned long long' \
      || ac_type='unsigned long'
    cat >>confdefs.h <<EOF
#define uintmax_t $ac_type
EOF

  fi

echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" 1>&6
echo "configure:3268: checking whether sys/types.h defines makedev" 1>&5
if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 3273 "configure"
#include "confdefs.h"
#include <sys/types.h>

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

fi
echo "$ECHO_T""$ac_cv_header_sys_types_h_makedev" 1>&6

if test $ac_cv_header_sys_types_h_makedev = no; then
echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" 1>&6
echo "configure:3296: checking for sys/mkdev.h" 1>&5
if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else

cat >conftest.$ac_ext <<EOF
#line 3301 "configure"
#include "confdefs.h"
#include <sys/mkdev.h>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:3306: \"$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
  ac_cv_header_sys_mkdev_h=yes
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_header_sys_mkdev_h=no
fi
rm -f conftest*
fi
echo "$ECHO_T""$ac_cv_header_sys_mkdev_h" 1>&6
if test $ac_cv_header_sys_mkdev_h = yes; then
  cat >>confdefs.h <<\EOF
#define MAJOR_IN_MKDEV 1
EOF

fi

  if test $ac_cv_header_sys_mkdev_h = no; then
    echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" 1>&6
echo "configure:3326: checking for sys/sysmacros.h" 1>&5
if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else

cat >conftest.$ac_ext <<EOF
#line 3331 "configure"
#include "confdefs.h"
#include <sys/sysmacros.h>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:3336: \"$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
  ac_cv_header_sys_sysmacros_h=yes
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_header_sys_sysmacros_h=no
fi
rm -f conftest*
fi
echo "$ECHO_T""$ac_cv_header_sys_sysmacros_h" 1>&6
if test $ac_cv_header_sys_sysmacros_h = yes; then
  cat >>confdefs.h <<\EOF
#define MAJOR_IN_SYSMACROS 1
EOF

fi

  fi
fi

echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" 1>&6
echo "configure:3357: checking for struct stat.st_blksize" 1>&5
if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 3362 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
struct stat foo;
foo.st_blksize;
  ;
  return 0;
}
EOF
if { (eval echo configure:3374: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  ac_cv_member_struct_stat_st_blksize=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_member_struct_stat_st_blksize=no
fi
rm -f conftest*
fi
echo "$ECHO_T""$ac_cv_member_struct_stat_st_blksize" 1>&6
if test $ac_cv_member_struct_stat_st_blksize = yes; then
  cat >>confdefs.h <<EOF
#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
EOF

fi

echo $ECHO_N "checking for ino_t... $ECHO_C" 1>&6
echo "configure:3390: checking for ino_t" 1>&5
if test "${ac_cv_type_ino_t+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 3395 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
if ((ino_t *) 0)
  return 0;
if (sizeof (ino_t))
  return 0;
  ;
  return 0;
}
EOF
if { (eval echo configure:3409: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  ac_cv_type_ino_t=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_type_ino_t=no
fi
rm -f conftest*
fi
echo "$ECHO_T""$ac_cv_type_ino_t" 1>&6
if test $ac_cv_type_ino_t = yes; then
  :
else
  cat >>confdefs.h <<EOF
#define ino_t unsigned long
EOF

fi

echo $ECHO_N "checking for ssize_t... $ECHO_C" 1>&6
echo "configure:3427: checking for ssize_t" 1>&5
if test "${ac_cv_type_ssize_t+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 3432 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
if ((ssize_t *) 0)
  return 0;
if (sizeof (ssize_t))
  return 0;
  ;
  return 0;
}
EOF
if { (eval echo configure:3446: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  ac_cv_type_ssize_t=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_type_ssize_t=no
fi
rm -f conftest*
fi
echo "$ECHO_T""$ac_cv_type_ssize_t" 1>&6
if test $ac_cv_type_ssize_t = yes; then
  :
else
  cat >>confdefs.h <<EOF
#define ssize_t int
EOF

fi

  for ac_header in memory.h string.h strings.h stdlib.h unistd.h sys/time.h
do
ac_ac_Header=`echo "ac_cv_header_$ac_header" | $ac_tr_sh`
echo $ECHO_N "checking for $ac_header... $ECHO_C" 1>&6
echo "configure:3467: checking for $ac_header" 1>&5
if eval "test \"\${$ac_ac_Header+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else

cat >conftest.$ac_ext <<EOF
#line 3472 "configure"
#include "confdefs.h"
#include <$ac_header>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:3477: \"$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
  eval "$ac_ac_Header=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$ac_ac_Header=no"
fi
rm -f conftest*
fi
echo "$ECHO_T""`eval echo '${'$ac_ac_Header'}'`" 1>&6
if test `eval echo '${'$ac_ac_Header'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_header" | $ac_tr_cpp` 1
EOF

fi
done

for ac_header in sys/time.h unistd.h
do
ac_ac_Header=`echo "ac_cv_header_$ac_header" | $ac_tr_sh`
echo $ECHO_N "checking for $ac_header... $ECHO_C" 1>&6
echo "configure:3500: checking for $ac_header" 1>&5
if eval "test \"\${$ac_ac_Header+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else

cat >conftest.$ac_ext <<EOF
#line 3505 "configure"
#include "confdefs.h"
#include <$ac_header>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:3510: \"$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
  eval "$ac_ac_Header=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$ac_ac_Header=no"
fi
rm -f conftest*
fi
echo "$ECHO_T""`eval echo '${'$ac_ac_Header'}'`" 1>&6
if test `eval echo '${'$ac_ac_Header'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_header" | $ac_tr_cpp` 1
EOF

fi
done

for ac_func in alarm
do
ac_ac_var=`echo "ac_cv_func_$ac_func" | $ac_tr_sh`
echo $ECHO_N "checking for $ac_func... $ECHO_C" 1>&6
echo "configure:3533: checking for $ac_func" 1>&5
if eval "test \"\${$ac_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 3538 "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.  */
#ifdef __cplusplus
extern "C"
#endif
/* 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();
char (*f)();

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
f = $ac_func;
#endif

  ;
  return 0;
}
EOF
if { (eval echo configure:3566: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  eval "$ac_ac_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$ac_ac_var=no"
fi
rm -f conftest*
fi
echo "$ECHO_T""`eval echo '${'$ac_ac_var'}'`" 1>&6
if test `eval echo '${'$ac_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $ac_tr_cpp` 1
EOF

fi
done

echo $ECHO_N "checking for working mktime... $ECHO_C" 1>&6
echo "configure:3583: checking for working mktime" 1>&5
if test "${ac_cv_func_working_mktime+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_func_working_mktime=no
else
  cat >conftest.$ac_ext <<EOF
#line 3591 "configure"
#include "confdefs.h"
/* Test program from Paul Eggert and Tony Leneis.  */
#if TIME_WITH_SYS_TIME
# include <sys/time.h>
# include <time.h>
#else
# if HAVE_SYS_TIME_H
#  include <sys/time.h>
# else
#  include <time.h>
# endif
#endif

#if HAVE_UNISTD_H
# include <unistd.h>
#endif

#if !HAVE_ALARM
# define alarm(X) /* empty */
#endif

/* Work around redefinition to rpl_putenv by other config tests.  */
#undef putenv

static time_t time_t_max;

/* Values we'll use to set the TZ environment variable.  */
static const char *const tz_strings[] = {
  (const char *) 0, "TZ=GMT0", "TZ=JST-9",
  "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
};
#define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))

/* Fail if mktime fails to convert a date in the spring-forward gap.
   Based on a problem report from Andreas Jaeger.  */
static void
spring_forward_gap ()
{
  /* glibc (up to about 1998-10-07) failed this test) */
  struct tm tm;

  /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
     instead of "TZ=America/Vancouver" in order to detect the bug even
     on systems that don't support the Olson extension, or don't have the
     full zoneinfo tables installed.  */
  putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");

  tm.tm_year = 98;
  tm.tm_mon = 3;
  tm.tm_mday = 5;
  tm.tm_hour = 2;
  tm.tm_min = 0;
  tm.tm_sec = 0;
  tm.tm_isdst = -1;
  if (mktime (&tm) == (time_t)-1)
    exit (1);
}

static void
mktime_test (now)
     time_t now;
{
  struct tm *lt;
  if ((lt = localtime (&now)) && mktime (lt) != now)
    exit (1);
  now = time_t_max - now;
  if ((lt = localtime (&now)) && mktime (lt) != now)
    exit (1);
}

static void
irix_6_4_bug ()
{
  /* Based on code from Ariel Faigon.  */
  struct tm tm;
  tm.tm_year = 96;
  tm.tm_mon = 3;
  tm.tm_mday = 0;
  tm.tm_hour = 0;
  tm.tm_min = 0;
  tm.tm_sec = 0;
  tm.tm_isdst = -1;
  mktime (&tm);
  if (tm.tm_mon != 2 || tm.tm_mday != 31)
    exit (1);
}

static void
bigtime_test (j)
     int j;
{
  struct tm tm;
  time_t now;
  tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
  now = mktime (&tm);
  if (now != (time_t) -1)
    {
      struct tm *lt = localtime (&now);
      if (! (lt
	     && lt->tm_year == tm.tm_year
	     && lt->tm_mon == tm.tm_mon
	     && lt->tm_mday == tm.tm_mday
	     && lt->tm_hour == tm.tm_hour
	     && lt->tm_min == tm.tm_min
	     && lt->tm_sec == tm.tm_sec
	     && lt->tm_yday == tm.tm_yday
	     && lt->tm_wday == tm.tm_wday
	     && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
		  == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
	exit (1);
    }
}

int
main ()
{
  time_t t, delta;
  int i, j;

  /* This test makes some buggy mktime implementations loop.
     Give up after 60 seconds; a mktime slower than that
     isn't worth using anyway.  */
  alarm (60);

  for (time_t_max = 1; 0 < time_t_max; time_t_max *= 2)
    continue;
  time_t_max--;
  delta = time_t_max / 997; /* a suitable prime number */
  for (i = 0; i < N_STRINGS; i++)
    {
      if (tz_strings[i])
	putenv (tz_strings[i]);

      for (t = 0; t <= time_t_max - delta; t += delta)
	mktime_test (t);
      mktime_test ((time_t) 60 * 60);
      mktime_test ((time_t) 60 * 60 * 24);

      for (j = 1; 0 < j; j *= 2)
        bigtime_test (j);
      bigtime_test (j - 1);
    }
  irix_6_4_bug ();
  spring_forward_gap ();
  exit (0);
}
EOF
if { (eval echo configure:3723: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } &&
   test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null; then
  ac_cv_func_working_mktime=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_func_working_mktime=no
fi
rm -f conftest*
fi

fi
echo "$ECHO_T""$ac_cv_func_working_mktime" 1>&6
if test $ac_cv_func_working_mktime = no; then
  LIBOBJS="$LIBOBJS mktime.${ac_objext}"
fi

echo $ECHO_N "checking for working memcmp... $ECHO_C" 1>&6
echo "configure:3739: checking for working memcmp" 1>&5
if test "${jm_cv_func_memcmp_working+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  if test "$cross_compiling" = yes; then
  jm_cv_func_memcmp_working=no
else
  cat >conftest.$ac_ext <<EOF
#line 3747 "configure"
#include "confdefs.h"
int
main ()
{
  /* Some versions of memcmp are not 8-bit clean.  */
  char c0 = 0x40, c1 = 0x80, c2 = 0x81;
  if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0)
    exit (1);

  /* The Next x86 OpenStep bug shows up only when comparing 16 bytes
     or more and with at least one buffer not starting on a 4-byte boundary.
     William Lewis provided this test program.   */
  {
    char foo[21];
    char bar[21];
    int i;
    for (i = 0; i < 4; i++)
      {
	char *a = foo + i;
	char *b = bar + i;
	strcpy (a, "--------01111111");
	strcpy (b, "--------10000000");
	if (memcmp (a, b, 16) >= 0)
	  exit (1);
      }
    exit (0);
  }
}
EOF
if { (eval echo configure:3776: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } &&
   test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null; then
  jm_cv_func_memcmp_working=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  jm_cv_func_memcmp_working=no
fi
rm -f conftest*
fi

fi
echo "$ECHO_T""$jm_cv_func_memcmp_working" 1>&6
test $jm_cv_func_memcmp_working = no \
  && LIBOBJS="$LIBOBJS memcmp.$ac_objext"

    echo $ECHO_N "checking whether we are using the GNU C Library... $ECHO_C" 1>&6
echo "configure:3791: checking whether we are using the GNU C Library" 1>&5
if test "${ac_cv_gnu_library+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else

cat >conftest.$ac_ext <<EOF
#line 3796 "configure"
#include "confdefs.h"

#include <features.h>
#ifdef __GNU_LIBRARY__
  Thanks for using GNU
#endif
	
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "Thanks for using GNU" >/dev/null 2>&1; then
  ac_cv_gnu_library=yes
else
  ac_cv_gnu_library=no
fi
rm -f conftest*

fi
echo "$ECHO_T""$ac_cv_gnu_library" 1>&6
    echo $ECHO_N "checking for version 2 of the GNU C Library... $ECHO_C" 1>&6
echo "configure:3814: checking for version 2 of the GNU C Library" 1>&5
if test "${ac_cv_glibc+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else

cat >conftest.$ac_ext <<EOF
#line 3819 "configure"
#include "confdefs.h"

#include <features.h>
#ifdef __GLIBC__
  Thanks for using GNU too
#endif
	
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "Thanks for using GNU too" >/dev/null 2>&1; then
  ac_cv_glibc=yes
else
  ac_cv_glibc=no
fi
rm -f conftest*

fi
echo "$ECHO_T""$ac_cv_glibc" 1>&6

echo $ECHO_N "checking whether utime accepts a null argument... $ECHO_C" 1>&6
echo "configure:3837: checking whether utime accepts a null argument" 1>&5
if test "${ac_cv_func_utime_null+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  rm -f conftestdata; >conftestdata
# Sequent interprets utime(file, 0) to mean use start of epoch.  Wrong.
if test "$cross_compiling" = yes; then
  ac_cv_func_utime_null=no
else
  cat >conftest.$ac_ext <<EOF
#line 3847 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/stat.h>
int
main()
{
  struct stat s, t;
  exit (!(stat ("conftestdata", &s) == 0
          && utime ("conftestdata", (long *)0) == 0
          && stat ("conftestdata", &t) == 0
          && t.st_mtime >= s.st_mtime
          && t.st_mtime - s.st_mtime < 120));
}
EOF
if { (eval echo configure:3862: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } &&
   test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null; then
  ac_cv_func_utime_null=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_func_utime_null=no
fi
rm -f conftest*
fi

rm -f core core.* *.core
fi
echo "$ECHO_T""$ac_cv_func_utime_null" 1>&6
if test $ac_cv_func_utime_null = yes; then
  cat >>confdefs.h <<\EOF
#define HAVE_UTIME_NULL 1
EOF

fi

        echo $ECHO_N "checking for strerror in -lcposix... $ECHO_C" 1>&6
echo "configure:3881: checking for strerror in -lcposix" 1>&5
if test "${ac_cv_lib_cposix_strerror+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lcposix  $LIBS"
cat >conftest.$ac_ext <<EOF
#line 3888 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char strerror ();
int
main ()
{
strerror ();
  ;
  return 0;
}
EOF
if { (eval echo configure:3905: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  ac_cv_lib_cposix_strerror=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_lib_cposix_strerror=no
fi
rm -f conftest*
LIBS="$ac_save_LIBS"
fi
echo "$ECHO_T""$ac_cv_lib_cposix_strerror" 1>&6
if test $ac_cv_lib_cposix_strerror = yes; then
  LIBS="$LIBS -lcposix"
fi

  # getdate.y works with bison only.
  : ${YACC='bison -y'}

  echo $ECHO_N "checking whether to enable assertions... $ECHO_C" 1>&6
echo "configure:3922: checking whether to enable assertions" 1>&5
  # Check whether --enable-assert or --disable-assert was given.
if test "${enable_assert+set}" = set; then
  enableval="$enable_assert"
   echo "$ECHO_T""no" 1>&6
	  cat >>confdefs.h <<\EOF
#define NDEBUG 1
EOF

else
   echo "$ECHO_T""yes" 1>&6

fi

  for ac_header in utime.h
do
ac_ac_Header=`echo "ac_cv_header_$ac_header" | $ac_tr_sh`
echo $ECHO_N "checking for $ac_header... $ECHO_C" 1>&6
echo "configure:3937: checking for $ac_header" 1>&5
if eval "test \"\${$ac_ac_Header+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else

cat >conftest.$ac_ext <<EOF
#line 3942 "configure"
#include "confdefs.h"
#include <$ac_header>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:3947: \"$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
  eval "$ac_ac_Header=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$ac_ac_Header=no"
fi
rm -f conftest*
fi
echo "$ECHO_T""`eval echo '${'$ac_ac_Header'}'`" 1>&6
if test `eval echo '${'$ac_ac_Header'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_header" | $ac_tr_cpp` 1
EOF

fi
done

  echo $ECHO_N "checking for struct utimbuf... $ECHO_C" 1>&6
echo "configure:3967: checking for struct utimbuf" 1>&5
if test "${fu_cv_sys_struct_utimbuf+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 3972 "configure"
#include "confdefs.h"

#ifdef TIME_WITH_SYS_TIME
# include <sys/time.h>
# include <time.h>
#else
# ifdef HAVE_SYS_TIME_H
#  include <sys/time.h>
# else
#  include <time.h>
# endif
#endif
#ifdef HAVE_UTIME_H
# include <utime.h>
#endif

int
main ()
{
static struct utimbuf x; x.actime = x.modtime;
  ;
  return 0;
}
EOF
if { (eval echo configure:3995: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  fu_cv_sys_struct_utimbuf=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  fu_cv_sys_struct_utimbuf=no
fi
rm -f conftest*

fi
echo "$ECHO_T""$fu_cv_sys_struct_utimbuf" 1>&6

  if test $fu_cv_sys_struct_utimbuf = yes; then
    cat >>confdefs.h <<EOF
#define HAVE_STRUCT_UTIMBUF 1
EOF

  fi

   echo $ECHO_N "checking for d_type member in directory struct... $ECHO_C" 1>&6
echo "configure:4011: checking for d_type member in directory struct" 1>&5
if test "${jm_cv_struct_dirent_d_type+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 4016 "configure"
#include "confdefs.h"

#include <sys/types.h>
#ifdef HAVE_DIRENT_H
# include <dirent.h>
#else /* not HAVE_DIRENT_H */
# define dirent direct
# ifdef HAVE_SYS_NDIR_H
#  include <sys/ndir.h>
# endif /* HAVE_SYS_NDIR_H */
# ifdef HAVE_SYS_DIR_H
#  include <sys/dir.h>
# endif /* HAVE_SYS_DIR_H */
# ifdef HAVE_NDIR_H
#  include <ndir.h>
# endif /* HAVE_NDIR_H */
#endif /* HAVE_DIRENT_H */

int
main ()
{
struct dirent dp; dp.d_type = 0;
  ;
  return 0;
}
EOF
if { (eval echo configure:4041: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  jm_cv_struct_dirent_d_type=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  jm_cv_struct_dirent_d_type=no
fi
rm -f conftest*

fi
echo "$ECHO_T""$jm_cv_struct_dirent_d_type" 1>&6
   if test $jm_cv_struct_dirent_d_type = yes; then
     cat >>confdefs.h <<\EOF
#define D_TYPE_IN_DIRENT 1
EOF

   fi

   echo $ECHO_N "checking for d_ino member in directory struct... $ECHO_C" 1>&6
echo "configure:4057: checking for d_ino member in directory struct" 1>&5
if test "${jm_cv_struct_dirent_d_ino+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 4062 "configure"
#include "confdefs.h"

#include <sys/types.h>
#ifdef HAVE_DIRENT_H
# include <dirent.h>
#else /* not HAVE_DIRENT_H */
# define dirent direct
# ifdef HAVE_SYS_NDIR_H
#  include <sys/ndir.h>
# endif /* HAVE_SYS_NDIR_H */
# ifdef HAVE_SYS_DIR_H
#  include <sys/dir.h>
# endif /* HAVE_SYS_DIR_H */
# ifdef HAVE_NDIR_H
#  include <ndir.h>
# endif /* HAVE_NDIR_H */
#endif /* HAVE_DIRENT_H */

int
main ()
{
struct dirent dp; dp.d_ino = 0;
  ;
  return 0;
}
EOF
if { (eval echo configure:4087: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  jm_cv_struct_dirent_d_ino=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  jm_cv_struct_dirent_d_ino=no
fi
rm -f conftest*

fi
echo "$ECHO_T""$jm_cv_struct_dirent_d_ino" 1>&6
   if test $jm_cv_struct_dirent_d_ino = yes; then
     cat >>confdefs.h <<\EOF
#define D_INO_IN_DIRENT 1
EOF

   fi

  headers='
#include <stdio.h>
#if HAVE_STRING_H
# if !STDC_HEADERS && HAVE_MEMORY_H
#  include <memory.h>
# endif
# include <string.h>
#else
# if HAVE_STRINGS_H
#  include <strings.h>
# endif
#endif
#if HAVE_STDLIB_H
# include <stdlib.h>
#endif
#if HAVE_UNISTD_H
# include <unistd.h>
#endif

#include <sys/types.h>
#if TIME_WITH_SYS_TIME
# include <sys/time.h>
# include <time.h>
#else
# if HAVE_SYS_TIME_H
#  include <sys/time.h>
# else
#  include <time.h>
# endif
#endif
'

  echo $ECHO_N "checking whether free is declared... $ECHO_C" 1>&6
echo "configure:4133: checking whether free is declared" 1>&5
if test "${ac_cv_have_decl_free+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 4138 "configure"
#include "confdefs.h"
$headers

int
main ()
{
#ifndef free
  char *p = (char *) free;
#endif

  ;
  return 0;
}
EOF
if { (eval echo configure:4151: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  ac_cv_have_decl_free=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_have_decl_free=no
fi
rm -f conftest*
fi
echo "$ECHO_T""$ac_cv_have_decl_free" 1>&6
if test $ac_cv_have_decl_free = yes; then
  cat >>confdefs.h <<EOF
#define HAVE_DECL_FREE 1
EOF

else
  cat >>confdefs.h <<EOF
#define HAVE_DECL_FREE 0
EOF

fi
echo $ECHO_N "checking whether getenv is declared... $ECHO_C" 1>&6
echo "configure:4171: checking whether getenv is declared" 1>&5
if test "${ac_cv_have_decl_getenv+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 4176 "configure"
#include "confdefs.h"
$headers

int
main ()
{
#ifndef getenv
  char *p = (char *) getenv;
#endif

  ;
  return 0;
}
EOF
if { (eval echo configure:4189: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  ac_cv_have_decl_getenv=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_have_decl_getenv=no
fi
rm -f conftest*
fi
echo "$ECHO_T""$ac_cv_have_decl_getenv" 1>&6
if test $ac_cv_have_decl_getenv = yes; then
  cat >>confdefs.h <<EOF
#define HAVE_DECL_GETENV 1
EOF

else
  cat >>confdefs.h <<EOF
#define HAVE_DECL_GETENV 0
EOF

fi
echo $ECHO_N "checking whether geteuid is declared... $ECHO_C" 1>&6
echo "configure:4209: checking whether geteuid is declared" 1>&5
if test "${ac_cv_have_decl_geteuid+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 4214 "configure"
#include "confdefs.h"
$headers

int
main ()
{
#ifndef geteuid
  char *p = (char *) geteuid;
#endif

  ;
  return 0;
}
EOF
if { (eval echo configure:4227: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  ac_cv_have_decl_geteuid=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_have_decl_geteuid=no
fi
rm -f conftest*
fi
echo "$ECHO_T""$ac_cv_have_decl_geteuid" 1>&6
if test $ac_cv_have_decl_geteuid = yes; then
  cat >>confdefs.h <<EOF
#define HAVE_DECL_GETEUID 1
EOF

else
  cat >>confdefs.h <<EOF
#define HAVE_DECL_GETEUID 0
EOF

fi
echo $ECHO_N "checking whether getlogin is declared... $ECHO_C" 1>&6
echo "configure:4247: checking whether getlogin is declared" 1>&5
if test "${ac_cv_have_decl_getlogin+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 4252 "configure"
#include "confdefs.h"
$headers

int
main ()
{
#ifndef getlogin
  char *p = (char *) getlogin;
#endif

  ;
  return 0;
}
EOF
if { (eval echo configure:4265: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  ac_cv_have_decl_getlogin=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_have_decl_getlogin=no
fi
rm -f conftest*
fi
echo "$ECHO_T""$ac_cv_have_decl_getlogin" 1>&6
if test $ac_cv_have_decl_getlogin = yes; then
  cat >>confdefs.h <<EOF
#define HAVE_DECL_GETLOGIN 1
EOF

else
  cat >>confdefs.h <<EOF
#define HAVE_DECL_GETLOGIN 0
EOF

fi
echo $ECHO_N "checking whether lseek is declared... $ECHO_C" 1>&6
echo "configure:4285: checking whether lseek is declared" 1>&5
if test "${ac_cv_have_decl_lseek+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 4290 "configure"
#include "confdefs.h"
$headers

int
main ()
{
#ifndef lseek
  char *p = (char *) lseek;
#endif

  ;
  return 0;
}
EOF
if { (eval echo configure:4303: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  ac_cv_have_decl_lseek=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_have_decl_lseek=no
fi
rm -f conftest*
fi
echo "$ECHO_T""$ac_cv_have_decl_lseek" 1>&6
if test $ac_cv_have_decl_lseek = yes; then
  cat >>confdefs.h <<EOF
#define HAVE_DECL_LSEEK 1
EOF

else
  cat >>confdefs.h <<EOF
#define HAVE_DECL_LSEEK 0
EOF

fi
echo $ECHO_N "checking whether malloc is declared... $ECHO_C" 1>&6
echo "configure:4323: checking whether malloc is declared" 1>&5
if test "${ac_cv_have_decl_malloc+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 4328 "configure"
#include "confdefs.h"
$headers

int
main ()
{
#ifndef malloc
  char *p = (char *) malloc;
#endif

  ;
  return 0;
}
EOF
if { (eval echo configure:4341: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  ac_cv_have_decl_malloc=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_have_decl_malloc=no
fi
rm -f conftest*
fi
echo "$ECHO_T""$ac_cv_have_decl_malloc" 1>&6
if test $ac_cv_have_decl_malloc = yes; then
  cat >>confdefs.h <<EOF
#define HAVE_DECL_MALLOC 1
EOF

else
  cat >>confdefs.h <<EOF
#define HAVE_DECL_MALLOC 0
EOF

fi
echo $ECHO_N "checking whether memchr is declared... $ECHO_C" 1>&6
echo "configure:4361: checking whether memchr is declared" 1>&5
if test "${ac_cv_have_decl_memchr+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 4366 "configure"
#include "confdefs.h"
$headers

int
main ()
{
#ifndef memchr
  char *p = (char *) memchr;
#endif

  ;
  return 0;
}
EOF
if { (eval echo configure:4379: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  ac_cv_have_decl_memchr=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_have_decl_memchr=no
fi
rm -f conftest*
fi
echo "$ECHO_T""$ac_cv_have_decl_memchr" 1>&6
if test $ac_cv_have_decl_memchr = yes; then
  cat >>confdefs.h <<EOF
#define HAVE_DECL_MEMCHR 1
EOF

else
  cat >>confdefs.h <<EOF
#define HAVE_DECL_MEMCHR 0
EOF

fi
echo $ECHO_N "checking whether nanosleep is declared... $ECHO_C" 1>&6
echo "configure:4399: checking whether nanosleep is declared" 1>&5
if test "${ac_cv_have_decl_nanosleep+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 4404 "configure"
#include "confdefs.h"
$headers

int
main ()
{
#ifndef nanosleep
  char *p = (char *) nanosleep;
#endif

  ;
  return 0;
}
EOF
if { (eval echo configure:4417: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  ac_cv_have_decl_nanosleep=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_have_decl_nanosleep=no
fi
rm -f conftest*
fi
echo "$ECHO_T""$ac_cv_have_decl_nanosleep" 1>&6
if test $ac_cv_have_decl_nanosleep = yes; then
  cat >>confdefs.h <<EOF
#define HAVE_DECL_NANOSLEEP 1
EOF

else
  cat >>confdefs.h <<EOF
#define HAVE_DECL_NANOSLEEP 0
EOF

fi
echo $ECHO_N "checking whether realloc is declared... $ECHO_C" 1>&6
echo "configure:4437: checking whether realloc is declared" 1>&5
if test "${ac_cv_have_decl_realloc+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 4442 "configure"
#include "confdefs.h"
$headers

int
main ()
{
#ifndef realloc
  char *p = (char *) realloc;
#endif

  ;
  return 0;
}
EOF
if { (eval echo configure:4455: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  ac_cv_have_decl_realloc=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_have_decl_realloc=no
fi
rm -f conftest*
fi
echo "$ECHO_T""$ac_cv_have_decl_realloc" 1>&6
if test $ac_cv_have_decl_realloc = yes; then
  cat >>confdefs.h <<EOF
#define HAVE_DECL_REALLOC 1
EOF

else
  cat >>confdefs.h <<EOF
#define HAVE_DECL_REALLOC 0
EOF

fi
echo $ECHO_N "checking whether stpcpy is declared... $ECHO_C" 1>&6
echo "configure:4475: checking whether stpcpy is declared" 1>&5
if test "${ac_cv_have_decl_stpcpy+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 4480 "configure"
#include "confdefs.h"
$headers

int
main ()
{
#ifndef stpcpy
  char *p = (char *) stpcpy;
#endif

  ;
  return 0;
}
EOF
if { (eval echo configure:4493: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  ac_cv_have_decl_stpcpy=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_have_decl_stpcpy=no
fi
rm -f conftest*
fi
echo "$ECHO_T""$ac_cv_have_decl_stpcpy" 1>&6
if test $ac_cv_have_decl_stpcpy = yes; then
  cat >>confdefs.h <<EOF
#define HAVE_DECL_STPCPY 1
EOF

else
  cat >>confdefs.h <<EOF
#define HAVE_DECL_STPCPY 0
EOF

fi
echo $ECHO_N "checking whether strstr is declared... $ECHO_C" 1>&6
echo "configure:4513: checking whether strstr is declared" 1>&5
if test "${ac_cv_have_decl_strstr+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 4518 "configure"
#include "confdefs.h"
$headers

int
main ()
{
#ifndef strstr
  char *p = (char *) strstr;
#endif

  ;
  return 0;
}
EOF
if { (eval echo configure:4531: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  ac_cv_have_decl_strstr=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_have_decl_strstr=no
fi
rm -f conftest*
fi
echo "$ECHO_T""$ac_cv_have_decl_strstr" 1>&6
if test $ac_cv_have_decl_strstr = yes; then
  cat >>confdefs.h <<EOF
#define HAVE_DECL_STRSTR 1
EOF

else
  cat >>confdefs.h <<EOF
#define HAVE_DECL_STRSTR 0
EOF

fi
echo $ECHO_N "checking whether strtoul is declared... $ECHO_C" 1>&6
echo "configure:4551: checking whether strtoul is declared" 1>&5
if test "${ac_cv_have_decl_strtoul+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 4556 "configure"
#include "confdefs.h"
$headers

int
main ()
{
#ifndef strtoul
  char *p = (char *) strtoul;
#endif

  ;
  return 0;
}
EOF
if { (eval echo configure:4569: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  ac_cv_have_decl_strtoul=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_have_decl_strtoul=no
fi
rm -f conftest*
fi
echo "$ECHO_T""$ac_cv_have_decl_strtoul" 1>&6
if test $ac_cv_have_decl_strtoul = yes; then
  cat >>confdefs.h <<EOF
#define HAVE_DECL_STRTOUL 1
EOF

else
  cat >>confdefs.h <<EOF
#define HAVE_DECL_STRTOUL 0
EOF

fi
echo $ECHO_N "checking whether strtoull is declared... $ECHO_C" 1>&6
echo "configure:4589: checking whether strtoull is declared" 1>&5
if test "${ac_cv_have_decl_strtoull+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 4594 "configure"
#include "confdefs.h"
$headers

int
main ()
{
#ifndef strtoull
  char *p = (char *) strtoull;
#endif

  ;
  return 0;
}
EOF
if { (eval echo configure:4607: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  ac_cv_have_decl_strtoull=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_have_decl_strtoull=no
fi
rm -f conftest*
fi
echo "$ECHO_T""$ac_cv_have_decl_strtoull" 1>&6
if test $ac_cv_have_decl_strtoull = yes; then
  cat >>confdefs.h <<EOF
#define HAVE_DECL_STRTOULL 1
EOF

else
  cat >>confdefs.h <<EOF
#define HAVE_DECL_STRTOULL 0
EOF

fi
echo $ECHO_N "checking whether ttyname is declared... $ECHO_C" 1>&6
echo "configure:4627: checking whether ttyname is declared" 1>&5
if test "${ac_cv_have_decl_ttyname+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 4632 "configure"
#include "confdefs.h"
$headers

int
main ()
{
#ifndef ttyname
  char *p = (char *) ttyname;
#endif

  ;
  return 0;
}
EOF
if { (eval echo configure:4645: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  ac_cv_have_decl_ttyname=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_have_decl_ttyname=no
fi
rm -f conftest*
fi
echo "$ECHO_T""$ac_cv_have_decl_ttyname" 1>&6
if test $ac_cv_have_decl_ttyname = yes; then
  cat >>confdefs.h <<EOF
#define HAVE_DECL_TTYNAME 1
EOF

else
  cat >>confdefs.h <<EOF
#define HAVE_DECL_TTYNAME 0
EOF

fi

    echo $ECHO_N "checking for long file names... $ECHO_C" 1>&6
echo "configure:4665: checking for long file names" 1>&5
if test "${ac_cv_sys_long_file_names+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  ac_cv_sys_long_file_names=yes
# Test for long file names in all the places we know might matter:
#      .		the current directory, where building will happen
#      $prefix/lib	where we will be installing things
#      $exec_prefix/lib	likewise
# eval it to expand exec_prefix.
#      $TMPDIR		if set, where it might want to write temporary files
# if $TMPDIR is not set:
#      /tmp		where it might want to write temporary files
#      /var/tmp		likewise
#      /usr/tmp		likewise
if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
  ac_tmpdirs=$TMPDIR
else
  ac_tmpdirs='/tmp /var/tmp /usr/tmp'
fi
for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
  test -d $ac_dir || continue
  test -w $ac_dir || continue # It is less confusing to not echo anything here.
  ac_xdir=$ac_dir/cf$$
  (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
  ac_tf1=$ac_xdir/conftest9012345
  ac_tf2=$ac_xdir/conftest9012346
  (echo 1 >$ac_tf1) 2>/dev/null
  (echo 2 >$ac_tf2) 2>/dev/null
  ac_val=`cat $ac_tf1 2>/dev/null`
  if test ! -f $ac_tf1 || test "$ac_val" != 1; then
    ac_cv_sys_long_file_names=no
    rm -rf $ac_xdir 2>/dev/null
    break
  fi
  rm -rf $ac_xdir 2>/dev/null
done
fi
echo "$ECHO_T""$ac_cv_sys_long_file_names" 1>&6
if test $ac_cv_sys_long_file_names = yes; then
  cat >>confdefs.h <<\EOF
#define HAVE_LONG_FILE_NAMES 1
EOF

fi

  for ac_func in pathconf
do
ac_ac_var=`echo "ac_cv_func_$ac_func" | $ac_tr_sh`
echo $ECHO_N "checking for $ac_func... $ECHO_C" 1>&6
echo "configure:4713: checking for $ac_func" 1>&5
if eval "test \"\${$ac_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 4718 "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.  */
#ifdef __cplusplus
extern "C"
#endif
/* 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();
char (*f)();

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
f = $ac_func;
#endif

  ;
  return 0;
}
EOF
if { (eval echo configure:4746: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  eval "$ac_ac_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$ac_ac_var=no"
fi
rm -f conftest*
fi
echo "$ECHO_T""`eval echo '${'$ac_ac_var'}'`" 1>&6
if test `eval echo '${'$ac_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $ac_tr_cpp` 1
EOF

fi
done

  for ac_header in limits.h string.h unistd.h
do
ac_ac_Header=`echo "ac_cv_header_$ac_header" | $ac_tr_sh`
echo $ECHO_N "checking for $ac_header... $ECHO_C" 1>&6
echo "configure:4766: checking for $ac_header" 1>&5
if eval "test \"\${$ac_ac_Header+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else

cat >conftest.$ac_ext <<EOF
#line 4771 "configure"
#include "confdefs.h"
#include <$ac_header>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:4776: \"$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
  eval "$ac_ac_Header=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$ac_ac_Header=no"
fi
rm -f conftest*
fi
echo "$ECHO_T""`eval echo '${'$ac_ac_Header'}'`" 1>&6
if test `eval echo '${'$ac_ac_Header'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_header" | $ac_tr_cpp` 1
EOF

fi
done

  echo $ECHO_N "checking for library containing gethostbyname... $ECHO_C" 1>&6
echo "configure:4796: checking for library containing gethostbyname" 1>&5
if test "${ac_cv_search_gethostbyname+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else

    ac_func_search_save_LIBS="$LIBS"
    ac_cv_search_gethostbyname="no"
    cat >conftest.$ac_ext <<EOF
#line 4803 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* 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:4820: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  ac_cv_search_gethostbyname="none required"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
fi
rm -f conftest*
    if test "$ac_cv_search_gethostbyname" = "no"; then
      for ac_lib in inet nsl; do
	LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
	cat >conftest.$ac_ext <<EOF
#line 4831 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* 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:4848: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  ac_cv_search_gethostbyname="-l$ac_lib"
	  break
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
fi
rm -f conftest*
      done
    fi
    LIBS="$ac_func_search_save_LIBS"

fi
echo "$ECHO_T""$ac_cv_search_gethostbyname" 1>&6

  if test "$ac_cv_search_gethostbyname" = "no"; then :

  else
    if test "$ac_cv_search_gethostbyname" = "none required"; then :

    else
      LIBS="$ac_cv_search_gethostbyname $LIBS"

    fi
  fi

    for ac_func in gethostbyname gethostbyaddr inet_ntoa
do
ac_ac_var=`echo "ac_cv_func_$ac_func" | $ac_tr_sh`
echo $ECHO_N "checking for $ac_func... $ECHO_C" 1>&6
echo "configure:4872: checking for $ac_func" 1>&5
if eval "test \"\${$ac_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 4877 "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.  */
#ifdef __cplusplus
extern "C"
#endif
/* 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();
char (*f)();

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
f = $ac_func;
#endif

  ;
  return 0;
}
EOF
if { (eval echo configure:4905: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  eval "$ac_ac_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$ac_ac_var=no"
fi
rm -f conftest*
fi
echo "$ECHO_T""`eval echo '${'$ac_ac_var'}'`" 1>&6
if test `eval echo '${'$ac_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $ac_tr_cpp` 1
EOF

fi
done

  for ac_func in gethostbyname gethostbyaddr inet_ntoa
do
ac_ac_var=`echo "ac_cv_func_$ac_func" | $ac_tr_sh`
echo $ECHO_N "checking for $ac_func... $ECHO_C" 1>&6
echo "configure:4925: checking for $ac_func" 1>&5
if eval "test \"\${$ac_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 4930 "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.  */
#ifdef __cplusplus
extern "C"
#endif
/* 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();
char (*f)();

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
f = $ac_func;
#endif

  ;
  return 0;
}
EOF
if { (eval echo configure:4958: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  eval "$ac_ac_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$ac_ac_var=no"
fi
rm -f conftest*
fi
echo "$ECHO_T""`eval echo '${'$ac_ac_var'}'`" 1>&6
if test `eval echo '${'$ac_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $ac_tr_cpp` 1
EOF

fi
done

  for ac_header in unistd.h string.h netdb.h sys/socket.h \
                   netinet/in.h arpa/inet.h
do
ac_ac_Header=`echo "ac_cv_header_$ac_header" | $ac_tr_sh`
echo $ECHO_N "checking for $ac_header... $ECHO_C" 1>&6
echo "configure:4979: checking for $ac_header" 1>&5
if eval "test \"\${$ac_ac_Header+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else

cat >conftest.$ac_ext <<EOF
#line 4984 "configure"
#include "confdefs.h"
#include <$ac_header>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:4989: \"$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
  eval "$ac_ac_Header=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$ac_ac_Header=no"
fi
rm -f conftest*
fi
echo "$ECHO_T""`eval echo '${'$ac_ac_Header'}'`" 1>&6
if test `eval echo '${'$ac_ac_Header'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_header" | $ac_tr_cpp` 1
EOF

fi
done

  for ac_func in strerror strerror_r vprintf doprnt
do
ac_ac_var=`echo "ac_cv_func_$ac_func" | $ac_tr_sh`
echo $ECHO_N "checking for $ac_func... $ECHO_C" 1>&6
echo "configure:5012: checking for $ac_func" 1>&5
if eval "test \"\${$ac_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 5017 "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.  */
#ifdef __cplusplus
extern "C"
#endif
/* 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();
char (*f)();

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
f = $ac_func;
#endif

  ;
  return 0;
}
EOF
if { (eval echo configure:5045: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  eval "$ac_ac_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$ac_ac_var=no"
fi
rm -f conftest*
fi
echo "$ECHO_T""`eval echo '${'$ac_ac_var'}'`" 1>&6
if test `eval echo '${'$ac_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $ac_tr_cpp` 1
EOF

fi
done

echo $ECHO_N "checking for ANSI C header files... $ECHO_C" 1>&6
echo "configure:5062: checking for ANSI C header files" 1>&5
if test "${ac_cv_header_stdc+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else

cat >conftest.$ac_ext <<EOF
#line 5067 "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:5075: \"$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
  ac_cv_header_stdc=yes
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  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 5089 "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
  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 5104 "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
  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 5122 "configure"
#include "confdefs.h"
#include <ctype.h>
#if ((' ' & 0x0FF) == 0x020)
# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
#else
# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
                     || ('j' <= (c) && (c) <= 'r') \
                     || ('s' <= (c) && (c) <= 'z'))
# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
#endif

#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:5146: \"$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
  ac_cv_header_stdc=no
fi
rm -f conftest*
fi

fi
fi
echo "$ECHO_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

  for ac_func in isascii mbrtowc
do
ac_ac_var=`echo "ac_cv_func_$ac_func" | $ac_tr_sh`
echo $ECHO_N "checking for $ac_func... $ECHO_C" 1>&6
echo "configure:5168: checking for $ac_func" 1>&5
if eval "test \"\${$ac_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 5173 "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.  */
#ifdef __cplusplus
extern "C"
#endif
/* 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();
char (*f)();

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
f = $ac_func;
#endif

  ;
  return 0;
}
EOF
if { (eval echo configure:5201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  eval "$ac_ac_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$ac_ac_var=no"
fi
rm -f conftest*
fi
echo "$ECHO_T""`eval echo '${'$ac_ac_var'}'`" 1>&6
if test `eval echo '${'$ac_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $ac_tr_cpp` 1
EOF

fi
done

  for ac_header in limits.h stdlib.h string.h wchar.h wctype.h
do
ac_ac_Header=`echo "ac_cv_header_$ac_header" | $ac_tr_sh`
echo $ECHO_N "checking for $ac_header... $ECHO_C" 1>&6
echo "configure:5221: checking for $ac_header" 1>&5
if eval "test \"\${$ac_ac_Header+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else

cat >conftest.$ac_ext <<EOF
#line 5226 "configure"
#include "confdefs.h"
#include <$ac_header>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:5231: \"$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
  eval "$ac_ac_Header=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$ac_ac_Header=no"
fi
rm -f conftest*
fi
echo "$ECHO_T""`eval echo '${'$ac_ac_Header'}'`" 1>&6
if test `eval echo '${'$ac_ac_Header'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_header" | $ac_tr_cpp` 1
EOF

fi
done

echo $ECHO_N "checking for ANSI C header files... $ECHO_C" 1>&6
echo "configure:5251: checking for ANSI C header files" 1>&5
if test "${ac_cv_header_stdc+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else

cat >conftest.$ac_ext <<EOF
#line 5256 "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:5264: \"$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
  ac_cv_header_stdc=yes
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  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 5278 "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
  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 5293 "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
  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 5311 "configure"
#include "confdefs.h"
#include <ctype.h>
#if ((' ' & 0x0FF) == 0x020)
# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
#else
# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
                     || ('j' <= (c) && (c) <= 'r') \
                     || ('s' <= (c) && (c) <= 'z'))
# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
#endif

#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:5335: \"$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
  ac_cv_header_stdc=no
fi
rm -f conftest*
fi

fi
fi
echo "$ECHO_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 $ECHO_N "checking whether backslash-a works in strings... $ECHO_C" 1>&6
echo "configure:5354: checking whether backslash-a works in strings" 1>&5
if test "${ac_cv_c_backslash_a+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 5359 "configure"
#include "confdefs.h"

int
main ()
{

#if '\a' == 'a'
      syntax error;
#endif
      char buf['\a' == 'a' ? -1 : 1];
      buf[0] = '\a';
      return buf[0] != "\a"[0];

  ;
  return 0;
}
EOF
if { (eval echo configure:5374: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  ac_cv_c_backslash_a=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_c_backslash_a=no
fi
rm -f conftest*
fi
echo "$ECHO_T""$ac_cv_c_backslash_a" 1>&6
  if test $ac_cv_c_backslash_a = yes; then
    cat >>confdefs.h <<\EOF
#define HAVE_C_BACKSLASH_A 1
EOF

  fi

echo $ECHO_N "checking for function prototypes... $ECHO_C" 1>&6
echo "configure:5390: checking for function prototypes" 1>&5
if test "$am_cv_prog_cc_stdc" != no; then
  echo "$ECHO_T""yes" 1>&6
  cat >>confdefs.h <<\EOF
#define PROTOTYPES 1
EOF

  U= ANSI2KNR=
else
  echo "$ECHO_T""no" 1>&6
  U=_ ANSI2KNR=./ansi2knr
  # Ensure some checks needed by ansi2knr itself.

echo $ECHO_N "checking for ANSI C header files... $ECHO_C" 1>&6
echo "configure:5402: checking for ANSI C header files" 1>&5
if test "${ac_cv_header_stdc+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else

cat >conftest.$ac_ext <<EOF
#line 5407 "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:5415: \"$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
  ac_cv_header_stdc=yes
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  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 5429 "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
  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 5444 "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
  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 5462 "configure"
#include "confdefs.h"
#include <ctype.h>
#if ((' ' & 0x0FF) == 0x020)
# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
#else
# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
                     || ('j' <= (c) && (c) <= 'r') \
                     || ('s' <= (c) && (c) <= 'z'))
# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
#endif

#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:5486: \"$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
  ac_cv_header_stdc=no
fi
rm -f conftest*
fi

fi
fi
echo "$ECHO_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

  for ac_header in string.h
do
ac_ac_Header=`echo "ac_cv_header_$ac_header" | $ac_tr_sh`
echo $ECHO_N "checking for $ac_header... $ECHO_C" 1>&6
echo "configure:5508: checking for $ac_header" 1>&5
if eval "test \"\${$ac_ac_Header+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else

cat >conftest.$ac_ext <<EOF
#line 5513 "configure"
#include "confdefs.h"
#include <$ac_header>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:5518: \"$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
  eval "$ac_ac_Header=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$ac_ac_Header=no"
fi
rm -f conftest*
fi
echo "$ECHO_T""`eval echo '${'$ac_ac_Header'}'`" 1>&6
if test `eval echo '${'$ac_ac_Header'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_header" | $ac_tr_cpp` 1
EOF

fi
done

fi

echo $ECHO_N "checking for ANSI C header files... $ECHO_C" 1>&6
echo "configure:5539: checking for ANSI C header files" 1>&5
if test "${ac_cv_header_stdc+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else

cat >conftest.$ac_ext <<EOF
#line 5544 "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:5552: \"$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
  ac_cv_header_stdc=yes
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  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 5566 "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
  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 5581 "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
  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 5599 "configure"
#include "confdefs.h"
#include <ctype.h>
#if ((' ' & 0x0FF) == 0x020)
# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
#else
# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
                     || ('j' <= (c) && (c) <= 'r') \
                     || ('s' <= (c) && (c) <= 'z'))
# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
#endif

#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:5623: \"$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
  ac_cv_header_stdc=no
fi
rm -f conftest*
fi

fi
fi
echo "$ECHO_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

  for ac_header in string.h utmpx.h sys/param.h
do
ac_ac_Header=`echo "ac_cv_header_$ac_header" | $ac_tr_sh`
echo $ECHO_N "checking for $ac_header... $ECHO_C" 1>&6
echo "configure:5645: checking for $ac_header" 1>&5
if eval "test \"\${$ac_ac_Header+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else

cat >conftest.$ac_ext <<EOF
#line 5650 "configure"
#include "confdefs.h"
#include <$ac_header>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:5655: \"$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
  eval "$ac_ac_Header=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$ac_ac_Header=no"
fi
rm -f conftest*
fi
echo "$ECHO_T""`eval echo '${'$ac_ac_Header'}'`" 1>&6
if test `eval echo '${'$ac_ac_Header'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_header" | $ac_tr_cpp` 1
EOF

fi
done

  for ac_func in utmpname
do
ac_ac_var=`echo "ac_cv_func_$ac_func" | $ac_tr_sh`
echo $ECHO_N "checking for $ac_func... $ECHO_C" 1>&6
echo "configure:5678: checking for $ac_func" 1>&5
if eval "test \"\${$ac_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 5683 "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.  */
#ifdef __cplusplus
extern "C"
#endif
/* 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();
char (*f)();

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
f = $ac_func;
#endif

  ;
  return 0;
}
EOF
if { (eval echo configure:5711: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  eval "$ac_ac_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$ac_ac_var=no"
fi
rm -f conftest*
fi
echo "$ECHO_T""`eval echo '${'$ac_ac_var'}'`" 1>&6
if test `eval echo '${'$ac_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $ac_tr_cpp` 1
EOF

fi
done

  for ac_func in utmpxname
do
ac_ac_var=`echo "ac_cv_func_$ac_func" | $ac_tr_sh`
echo $ECHO_N "checking for $ac_func... $ECHO_C" 1>&6
echo "configure:5731: checking for $ac_func" 1>&5
if eval "test \"\${$ac_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 5736 "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.  */
#ifdef __cplusplus
extern "C"
#endif
/* 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();
char (*f)();

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
f = $ac_func;
#endif

  ;
  return 0;
}
EOF
if { (eval echo configure:5764: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  eval "$ac_ac_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$ac_ac_var=no"
fi
rm -f conftest*
fi
echo "$ECHO_T""`eval echo '${'$ac_ac_var'}'`" 1>&6
if test `eval echo '${'$ac_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $ac_tr_cpp` 1
EOF

fi
done

echo $ECHO_N "checking for function prototypes... $ECHO_C" 1>&6
echo "configure:5781: checking for function prototypes" 1>&5
if test "$am_cv_prog_cc_stdc" != no; then
  echo "$ECHO_T""yes" 1>&6
  cat >>confdefs.h <<\EOF
#define PROTOTYPES 1
EOF

  U= ANSI2KNR=
else
  echo "$ECHO_T""no" 1>&6
  U=_ ANSI2KNR=./ansi2knr
  # Ensure some checks needed by ansi2knr itself.

echo $ECHO_N "checking for ANSI C header files... $ECHO_C" 1>&6
echo "configure:5793: checking for ANSI C header files" 1>&5
if test "${ac_cv_header_stdc+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else

cat >conftest.$ac_ext <<EOF
#line 5798 "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:5806: \"$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
  ac_cv_header_stdc=yes
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  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 5820 "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
  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 5835 "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
  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 5853 "configure"
#include "confdefs.h"
#include <ctype.h>
#if ((' ' & 0x0FF) == 0x020)
# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
#else
# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
                     || ('j' <= (c) && (c) <= 'r') \
                     || ('s' <= (c) && (c) <= 'z'))
# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
#endif

#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:5877: \"$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
  ac_cv_header_stdc=no
fi
rm -f conftest*
fi

fi
fi
echo "$ECHO_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

  for ac_header in string.h
do
ac_ac_Header=`echo "ac_cv_header_$ac_header" | $ac_tr_sh`
echo $ECHO_N "checking for $ac_header... $ECHO_C" 1>&6
echo "configure:5899: checking for $ac_header" 1>&5
if eval "test \"\${$ac_ac_Header+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else

cat >conftest.$ac_ext <<EOF
#line 5904 "configure"
#include "confdefs.h"
#include <$ac_header>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:5909: \"$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
  eval "$ac_ac_Header=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$ac_ac_Header=no"
fi
rm -f conftest*
fi
echo "$ECHO_T""`eval echo '${'$ac_ac_Header'}'`" 1>&6
if test `eval echo '${'$ac_ac_Header'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_header" | $ac_tr_cpp` 1
EOF

fi
done

fi

  utmp_includes="\
$ac_includes_default
#ifdef HAVE_UTMPX_H
# include <utmpx.h>
#else
# include <utmp.h>
#endif
"

echo $ECHO_N "checking for struct utmpx.ut_user... $ECHO_C" 1>&6
echo "configure:5938: checking for struct utmpx.ut_user" 1>&5
if test "${ac_cv_member_struct_utmpx_ut_user+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 5943 "configure"
#include "confdefs.h"
$utmp_includes

int
main ()
{
struct utmpx foo;
foo.ut_user;
  ;
  return 0;
}
EOF
if { (eval echo configure:5955: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  ac_cv_member_struct_utmpx_ut_user=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_member_struct_utmpx_ut_user=no
fi
rm -f conftest*
fi
echo "$ECHO_T""$ac_cv_member_struct_utmpx_ut_user" 1>&6
if test $ac_cv_member_struct_utmpx_ut_user = yes; then
  cat >>confdefs.h <<EOF
#define HAVE_STRUCT_UTMPX_UT_USER 1
EOF

fi

echo $ECHO_N "checking for struct utmp.ut_user... $ECHO_C" 1>&6
echo "configure:5971: checking for struct utmp.ut_user" 1>&5
if test "${ac_cv_member_struct_utmp_ut_user+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 5976 "configure"
#include "confdefs.h"
$utmp_includes

int
main ()
{
struct utmp foo;
foo.ut_user;
  ;
  return 0;
}
EOF
if { (eval echo configure:5988: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  ac_cv_member_struct_utmp_ut_user=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_member_struct_utmp_ut_user=no
fi
rm -f conftest*
fi
echo "$ECHO_T""$ac_cv_member_struct_utmp_ut_user" 1>&6
if test $ac_cv_member_struct_utmp_ut_user = yes; then
  cat >>confdefs.h <<EOF
#define HAVE_STRUCT_UTMP_UT_USER 1
EOF

fi

echo $ECHO_N "checking for struct utmpx.ut_name... $ECHO_C" 1>&6
echo "configure:6004: checking for struct utmpx.ut_name" 1>&5
if test "${ac_cv_member_struct_utmpx_ut_name+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 6009 "configure"
#include "confdefs.h"
$utmp_includes

int
main ()
{
struct utmpx foo;
foo.ut_name;
  ;
  return 0;
}
EOF
if { (eval echo configure:6021: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  ac_cv_member_struct_utmpx_ut_name=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_member_struct_utmpx_ut_name=no
fi
rm -f conftest*
fi
echo "$ECHO_T""$ac_cv_member_struct_utmpx_ut_name" 1>&6
if test $ac_cv_member_struct_utmpx_ut_name = yes; then
  cat >>confdefs.h <<EOF
#define HAVE_STRUCT_UTMPX_UT_NAME 1
EOF

fi

echo $ECHO_N "checking for struct utmp.ut_name... $ECHO_C" 1>&6
echo "configure:6037: checking for struct utmp.ut_name" 1>&5
if test "${ac_cv_member_struct_utmp_ut_name+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 6042 "configure"
#include "confdefs.h"
$utmp_includes

int
main ()
{
struct utmp foo;
foo.ut_name;
  ;
  return 0;
}
EOF
if { (eval echo configure:6054: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  ac_cv_member_struct_utmp_ut_name=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_member_struct_utmp_ut_name=no
fi
rm -f conftest*
fi
echo "$ECHO_T""$ac_cv_member_struct_utmp_ut_name" 1>&6
if test $ac_cv_member_struct_utmp_ut_name = yes; then
  cat >>confdefs.h <<EOF
#define HAVE_STRUCT_UTMP_UT_NAME 1
EOF

fi

        for ac_func in bzero bcopy isascii btowc
do
ac_ac_var=`echo "ac_cv_func_$ac_func" | $ac_tr_sh`
echo $ECHO_N "checking for $ac_func... $ECHO_C" 1>&6
echo "configure:6073: checking for $ac_func" 1>&5
if eval "test \"\${$ac_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 6078 "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.  */
#ifdef __cplusplus
extern "C"
#endif
/* 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();
char (*f)();

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
f = $ac_func;
#endif

  ;
  return 0;
}
EOF
if { (eval echo configure:6106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  eval "$ac_ac_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$ac_ac_var=no"
fi
rm -f conftest*
fi
echo "$ECHO_T""`eval echo '${'$ac_ac_var'}'`" 1>&6
if test `eval echo '${'$ac_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $ac_tr_cpp` 1
EOF

fi
done

  for ac_header in alloca.h libintl.h wctype.h wchar.h
do
ac_ac_Header=`echo "ac_cv_header_$ac_header" | $ac_tr_sh`
echo $ECHO_N "checking for $ac_header... $ECHO_C" 1>&6
echo "configure:6126: checking for $ac_header" 1>&5
if eval "test \"\${$ac_ac_Header+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else

cat >conftest.$ac_ext <<EOF
#line 6131 "configure"
#include "confdefs.h"
#include <$ac_header>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:6136: \"$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
  eval "$ac_ac_Header=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$ac_ac_Header=no"
fi
rm -f conftest*
fi
echo "$ECHO_T""`eval echo '${'$ac_ac_Header'}'`" 1>&6
if test `eval echo '${'$ac_ac_Header'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_header" | $ac_tr_cpp` 1
EOF

fi
done

echo $ECHO_N "checking for ANSI C header files... $ECHO_C" 1>&6
echo "configure:6156: checking for ANSI C header files" 1>&5
if test "${ac_cv_header_stdc+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else

cat >conftest.$ac_ext <<EOF
#line 6161 "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:6169: \"$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
  ac_cv_header_stdc=yes
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  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 6183 "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
  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 6198 "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
  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 6216 "configure"
#include "confdefs.h"
#include <ctype.h>
#if ((' ' & 0x0FF) == 0x020)
# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
#else
# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
                     || ('j' <= (c) && (c) <= 'r') \
                     || ('s' <= (c) && (c) <= 'z'))
# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
#endif

#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:6240: \"$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
  ac_cv_header_stdc=no
fi
rm -f conftest*
fi

fi
fi
echo "$ECHO_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

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

fi

echo $ECHO_N "checking for alloca... $ECHO_C" 1>&6
echo "configure:6293: checking for alloca" 1>&5
if test "${ac_cv_func_alloca_works+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 6298 "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:6328: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  ac_cv_func_alloca_works=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_func_alloca_works=no
fi
rm -f conftest*
fi
echo "$ECHO_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 $ECHO_N "checking whether alloca needs Cray hooks... $ECHO_C" 1>&6
echo "configure:6353: checking whether alloca needs Cray hooks" 1>&5
if test "${ac_cv_os_cray+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else

cat >conftest.$ac_ext <<EOF
#line 6358 "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
  ac_cv_os_cray=yes
else
  ac_cv_os_cray=no
fi
rm -f conftest*

fi
echo "$ECHO_T""$ac_cv_os_cray" 1>&6
if test $ac_cv_os_cray = yes; then
for ac_func in _getb67 GETB67 getb67; do
  ac_ac_var=`echo "ac_cv_func_$ac_func" | $ac_tr_sh`
echo $ECHO_N "checking for $ac_func... $ECHO_C" 1>&6
echo "configure:6379: checking for $ac_func" 1>&5
if eval "test \"\${$ac_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 6384 "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.  */
#ifdef __cplusplus
extern "C"
#endif
/* 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();
char (*f)();

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
f = $ac_func;
#endif

  ;
  return 0;
}
EOF
if { (eval echo configure:6412: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  eval "$ac_ac_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$ac_ac_var=no"
fi
rm -f conftest*
fi
echo "$ECHO_T""`eval echo '${'$ac_ac_var'}'`" 1>&6
if test `eval echo '${'$ac_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define CRAY_STACKSEG_END $ac_func
EOF

  break
fi

done
fi

echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" 1>&6
echo "configure:6431: checking stack direction for C alloca" 1>&5
if test "${ac_cv_c_stack_direction+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_c_stack_direction=0
else
  cat >conftest.$ac_ext <<EOF
#line 6439 "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;
}

int
main ()
{
  exit (find_stack_direction () < 0);
}
EOF
if { (eval echo configure:6459: \"$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
  ac_cv_c_stack_direction=-1
fi
rm -f conftest*
fi

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

fi

  for ac_func in lchown
do
ac_ac_var=`echo "ac_cv_func_$ac_func" | $ac_tr_sh`
echo $ECHO_N "checking for $ac_func... $ECHO_C" 1>&6
echo "configure:6479: checking for $ac_func" 1>&5
if eval "test \"\${$ac_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 6484 "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.  */
#ifdef __cplusplus
extern "C"
#endif
/* 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();
char (*f)();

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
f = $ac_func;
#endif

  ;
  return 0;
}
EOF
if { (eval echo configure:6512: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  eval "$ac_ac_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$ac_ac_var=no"
fi
rm -f conftest*
fi
echo "$ECHO_T""`eval echo '${'$ac_ac_var'}'`" 1>&6
if test `eval echo '${'$ac_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $ac_tr_cpp` 1
EOF

else
  LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
fi
done

 test -z "$ac_cv_header_unistd_h" \
   && for ac_header in unistd.h
do
ac_ac_Header=`echo "ac_cv_header_$ac_header" | $ac_tr_sh`
echo $ECHO_N "checking for $ac_header... $ECHO_C" 1>&6
echo "configure:6535: checking for $ac_header" 1>&5
if eval "test \"\${$ac_ac_Header+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else

cat >conftest.$ac_ext <<EOF
#line 6540 "configure"
#include "confdefs.h"
#include <$ac_header>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:6545: \"$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
  eval "$ac_ac_Header=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$ac_ac_Header=no"
fi
rm -f conftest*
fi
echo "$ECHO_T""`eval echo '${'$ac_ac_Header'}'`" 1>&6
if test `eval echo '${'$ac_ac_Header'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_header" | $ac_tr_cpp` 1
EOF

fi
done

 echo $ECHO_N "checking for working chown... $ECHO_C" 1>&6
echo "configure:6565: checking for working chown" 1>&5
if test "${jm_cv_func_working_chown+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  if test "$cross_compiling" = yes; then
  	     jm_cv_func_working_chown=no
else
  cat >conftest.$ac_ext <<EOF
#line 6573 "configure"
#include "confdefs.h"

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

    int
    main ()
    {
      char *f = "conftestchown";
      struct stat before, after;

      if (creat (f, 0600) < 0)
        exit (1);
      if (stat (f, &before) < 0)
        exit (1);
      if (chown (f, (uid_t) -1, (gid_t) -1) == -1)
        exit (1);
      if (stat (f, &after) < 0)
        exit (1);
      exit ((before.st_uid == after.st_uid
	     && before.st_gid == after.st_gid) ? 0 : 1);
    }
	
EOF
if { (eval echo configure:6599: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } &&
   test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null; then
  jm_cv_func_working_chown=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  jm_cv_func_working_chown=no
fi
rm -f conftest*
fi

fi
echo "$ECHO_T""$jm_cv_func_working_chown" 1>&6
  if test $jm_cv_func_working_chown = no; then

    LIBOBJS="$LIBOBJS chown.$ac_objext"
    cat >>confdefs.h <<EOF
#define chown rpl_chown
EOF

  fi

  for ac_func in localtime_r
do
ac_ac_var=`echo "ac_cv_func_$ac_func" | $ac_tr_sh`
echo $ECHO_N "checking for $ac_func... $ECHO_C" 1>&6
echo "configure:6621: checking for $ac_func" 1>&5
if eval "test \"\${$ac_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 6626 "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.  */
#ifdef __cplusplus
extern "C"
#endif
/* 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();
char (*f)();

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
f = $ac_func;
#endif

  ;
  return 0;
}
EOF
if { (eval echo configure:6654: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  eval "$ac_ac_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$ac_ac_var=no"
fi
rm -f conftest*
fi
echo "$ECHO_T""`eval echo '${'$ac_ac_var'}'`" 1>&6
if test `eval echo '${'$ac_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $ac_tr_cpp` 1
EOF

fi
done

 if test $ac_cv_func_working_mktime = no; then
   cat >>confdefs.h <<EOF
#define mktime rpl_mktime
EOF

 fi

 echo $ECHO_N "checking whether lstat accepts an empty string... $ECHO_C" 1>&6
echo "configure:6676: checking whether lstat accepts an empty string" 1>&5
if test "${jm_cv_func_lstat_empty_string_bug+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  if test "$cross_compiling" = yes; then
  	 jm_cv_func_lstat_empty_string_bug=yes
else
  cat >conftest.$ac_ext <<EOF
#line 6684 "configure"
#include "confdefs.h"

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

    int
    main ()
    {
      struct stat sbuf;
      exit (lstat ("", &sbuf) ? 1 : 0);
    }
	
EOF
if { (eval echo configure:6696: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } &&
   test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null; then
  jm_cv_func_lstat_empty_string_bug=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  jm_cv_func_lstat_empty_string_bug=no
fi
rm -f conftest*
fi

fi
echo "$ECHO_T""$jm_cv_func_lstat_empty_string_bug" 1>&6
  if test $jm_cv_func_lstat_empty_string_bug = yes; then

    LIBOBJS="$LIBOBJS lstat.$ac_objext"
    cat >>confdefs.h <<EOF
#define HAVE_LSTAT_EMPTY_STRING_BUG 1
EOF

  fi

 echo $ECHO_N "checking whether lstat dereferences a symlink specified with a trailing slash... $ECHO_C" 1>&6
echo "configure:6715: checking whether lstat dereferences a symlink specified with a trailing slash" 1>&5
if test "${jm_cv_func_lstat_dereferences_slashed_symlink+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else

   rm -f conftest.sym conftest.file
   : > conftest.file
   if ln -s conftest.file conftest.sym; then
     if test "$cross_compiling" = yes; then
                    jm_cv_func_lstat_dereferences_slashed_symlink=no

else
  cat >conftest.$ac_ext <<EOF
#line 6726 "configure"
#include "confdefs.h"

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

      int
      main ()
      {
        struct stat sbuf;
        /* Linux will dereference the symlink and fail.
           That is better in the sense that it means we will not
           have to compile and use the lstat wrapper.  */
        exit (lstat ("conftest.sym/", &sbuf) ? 0 : 1);
      }

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

   else
     # If the `ln -s' command failed, then we probably don't even
     # have an lstat function.
     jm_cv_func_lstat_dereferences_slashed_symlink=no
   fi

fi
echo "$ECHO_T""$jm_cv_func_lstat_dereferences_slashed_symlink" 1>&6

  test $jm_cv_func_lstat_dereferences_slashed_symlink = yes \
    && zero_one=1 \
    || zero_one=0
  cat >>confdefs.h <<EOF
#define LSTAT_FOLLOWS_SLASHED_SYMLINK $zero_one
EOF

  if test $jm_cv_func_lstat_dereferences_slashed_symlink = no; then

    # Append lstat.o if it's not already in $LIBOBJS.
    case "$LIBOBJS" in
      *lstat.$ac_objext*) ;;
      *) LIBOBJS="$LIBOBJS lstat.$ac_objext" ;;
    esac
  fi

 echo $ECHO_N "checking whether stat accepts an empty string... $ECHO_C" 1>&6
echo "configure:6771: checking whether stat accepts an empty string" 1>&5
if test "${jm_cv_func_stat_empty_string_bug+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  if test "$cross_compiling" = yes; then
  	 jm_cv_func_stat_empty_string_bug=yes
else
  cat >conftest.$ac_ext <<EOF
#line 6779 "configure"
#include "confdefs.h"

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

    int
    main ()
    {
      struct stat sbuf;
      exit (stat ("", &sbuf) ? 1 : 0);
    }
	
EOF
if { (eval echo configure:6791: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } &&
   test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null; then
  jm_cv_func_stat_empty_string_bug=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  jm_cv_func_stat_empty_string_bug=no
fi
rm -f conftest*
fi

fi
echo "$ECHO_T""$jm_cv_func_stat_empty_string_bug" 1>&6
  if test $jm_cv_func_stat_empty_string_bug = yes; then

    LIBOBJS="$LIBOBJS stat.$ac_objext"
    cat >>confdefs.h <<EOF
#define HAVE_STAT_EMPTY_STRING_BUG 1
EOF

  fi

   cat >>confdefs.h <<EOF
#define HAVE_DONE_WORKING_REALLOC_CHECK 1
EOF

 echo $ECHO_N "checking for working realloc... $ECHO_C" 1>&6
echo "configure:6813: checking for working realloc" 1>&5
if test "${jm_cv_func_working_realloc+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  if test "$cross_compiling" = yes; then
  	 jm_cv_func_working_realloc=no
else
  cat >conftest.$ac_ext <<EOF
#line 6821 "configure"
#include "confdefs.h"

    char *realloc ();
    int
    main ()
    {
      exit (realloc (0, 0) ? 0 : 1);
    }
	
EOF
if { (eval echo configure:6831: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } &&
   test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null; then
  jm_cv_func_working_realloc=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  jm_cv_func_working_realloc=no
fi
rm -f conftest*
fi

fi
echo "$ECHO_T""$jm_cv_func_working_realloc" 1>&6
  if test $jm_cv_func_working_realloc = no; then

    LIBOBJS="$LIBOBJS realloc.$ac_objext"
    cat >>confdefs.h <<EOF
#define realloc rpl_realloc
EOF

  fi

   cat >>confdefs.h <<EOF
#define HAVE_DONE_WORKING_MALLOC_CHECK 1
EOF

 echo $ECHO_N "checking for working malloc... $ECHO_C" 1>&6
echo "configure:6853: checking for working malloc" 1>&5
if test "${jm_cv_func_working_malloc+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  if test "$cross_compiling" = yes; then
  	 jm_cv_func_working_malloc=no
else
  cat >conftest.$ac_ext <<EOF
#line 6861 "configure"
#include "confdefs.h"

    char *malloc ();
    int
    main ()
    {
      exit (malloc (0) ? 0 : 1);
    }
	
EOF
if { (eval echo configure:6871: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } &&
   test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null; then
  jm_cv_func_working_malloc=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  jm_cv_func_working_malloc=no
fi
rm -f conftest*
fi

fi
echo "$ECHO_T""$jm_cv_func_working_malloc" 1>&6
  if test $jm_cv_func_working_malloc = no; then

    LIBOBJS="$LIBOBJS malloc.$ac_objext"
    cat >>confdefs.h <<EOF
#define malloc rpl_malloc
EOF

  fi

  # Check strerror_r
  for ac_func in strerror_r
do
ac_ac_var=`echo "ac_cv_func_$ac_func" | $ac_tr_sh`
echo $ECHO_N "checking for $ac_func... $ECHO_C" 1>&6
echo "configure:6894: checking for $ac_func" 1>&5
if eval "test \"\${$ac_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 6899 "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.  */
#ifdef __cplusplus
extern "C"
#endif
/* 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();
char (*f)();

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
f = $ac_func;
#endif

  ;
  return 0;
}
EOF
if { (eval echo configure:6927: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  eval "$ac_ac_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$ac_ac_var=no"
fi
rm -f conftest*
fi
echo "$ECHO_T""`eval echo '${'$ac_ac_var'}'`" 1>&6
if test `eval echo '${'$ac_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $ac_tr_cpp` 1
EOF

fi
done

  if test $ac_cv_func_strerror_r = yes; then
    for ac_header in string.h
do
ac_ac_Header=`echo "ac_cv_header_$ac_header" | $ac_tr_sh`
echo $ECHO_N "checking for $ac_header... $ECHO_C" 1>&6
echo "configure:6948: checking for $ac_header" 1>&5
if eval "test \"\${$ac_ac_Header+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else

cat >conftest.$ac_ext <<EOF
#line 6953 "configure"
#include "confdefs.h"
#include <$ac_header>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:6958: \"$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
  eval "$ac_ac_Header=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$ac_ac_Header=no"
fi
rm -f conftest*
fi
echo "$ECHO_T""`eval echo '${'$ac_ac_Header'}'`" 1>&6
if test `eval echo '${'$ac_ac_Header'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_header" | $ac_tr_cpp` 1
EOF

fi
done

    echo $ECHO_N "checking for working strerror_r... $ECHO_C" 1>&6
echo "configure:6978: checking for working strerror_r" 1>&5
if test "${jm_cv_func_working_strerror_r+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else

      cat >conftest.$ac_ext <<EOF
#line 6983 "configure"
#include "confdefs.h"

#       include <stdio.h>
#       if HAVE_STRING_H
#        include <string.h>
#       endif

int
main ()
{

	 int buf; /* avoiding square brackets makes this easier */
	 char x = *strerror_r (0, buf, sizeof buf);

  ;
  return 0;
}
EOF
if { (eval echo configure:6998: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  jm_cv_func_working_strerror_r=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  jm_cv_func_working_strerror_r=no

fi
rm -f conftest*
      if test $jm_cv_func_working_strerror_r = yes; then
	cat >>confdefs.h <<EOF
#define HAVE_WORKING_STRERROR_R 1
EOF

      fi

fi
echo "$ECHO_T""$jm_cv_func_working_strerror_r" 1>&6
  fi

 # Solaris 2.5.1 needs -lposix4 to get the nanosleep function.
 # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.

  echo $ECHO_N "checking for library containing nanosleep... $ECHO_C" 1>&6
echo "configure:7017: checking for library containing nanosleep" 1>&5
if test "${ac_cv_search_nanosleep+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else

    ac_func_search_save_LIBS="$LIBS"
    ac_cv_search_nanosleep="no"
    cat >conftest.$ac_ext <<EOF
#line 7024 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char nanosleep ();
int
main ()
{
nanosleep ();
  ;
  return 0;
}
EOF
if { (eval echo configure:7041: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  ac_cv_search_nanosleep="none required"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
fi
rm -f conftest*
    if test "$ac_cv_search_nanosleep" = "no"; then
      for ac_lib in rt posix4; do
	LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
	cat >conftest.$ac_ext <<EOF
#line 7052 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char nanosleep ();
int
main ()
{
nanosleep ();
  ;
  return 0;
}
EOF
if { (eval echo configure:7069: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  ac_cv_search_nanosleep="-l$ac_lib"
	  break
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
fi
rm -f conftest*
      done
    fi
    LIBS="$ac_func_search_save_LIBS"

fi
echo "$ECHO_T""$ac_cv_search_nanosleep" 1>&6

  if test "$ac_cv_search_nanosleep" = "no"; then :

  else
    if test "$ac_cv_search_nanosleep" = "none required"; then :

    else
      LIBS="$ac_cv_search_nanosleep $LIBS"

    fi
  fi

 echo $ECHO_N "checking whether nanosleep works... $ECHO_C" 1>&6
echo "configure:7090: checking whether nanosleep works" 1>&5
if test "${jm_cv_func_nanosleep_works+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else

   if test "$cross_compiling" = yes; then
  	 jm_cv_func_nanosleep_works=no
else
  cat >conftest.$ac_ext <<EOF
#line 7098 "configure"
#include "confdefs.h"

#   if TIME_WITH_SYS_TIME
#    include <sys/time.h>
#    include <time.h>
#   else
#    if HAVE_SYS_TIME_H
#     include <sys/time.h>
#    else
#     include <time.h>
#    endif
#   endif

    int
    main ()
    {
      struct timespec ts_sleep, ts_remaining;
      ts_sleep.tv_sec = 0;
      ts_sleep.tv_nsec = 1;
      exit (nanosleep (&ts_sleep, &ts_remaining) == 0 ? 0 : 1);
    }
	
EOF
if { (eval echo configure:7120: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } &&
   test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null; then
  jm_cv_func_nanosleep_works=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  jm_cv_func_nanosleep_works=no
fi
rm -f conftest*
fi

fi
echo "$ECHO_T""$jm_cv_func_nanosleep_works" 1>&6
  if test $jm_cv_func_nanosleep_works = no; then

    LIBOBJS="$LIBOBJS nanosleep.$ac_objext"
    cat >>confdefs.h <<EOF
#define nanosleep rpl_nanosleep
EOF

  fi

for ac_header in string.h
do
ac_ac_Header=`echo "ac_cv_header_$ac_header" | $ac_tr_sh`
echo $ECHO_N "checking for $ac_header... $ECHO_C" 1>&6
echo "configure:7142: checking for $ac_header" 1>&5
if eval "test \"\${$ac_ac_Header+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else

cat >conftest.$ac_ext <<EOF
#line 7147 "configure"
#include "confdefs.h"
#include <$ac_header>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:7152: \"$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
  eval "$ac_ac_Header=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$ac_ac_Header=no"
fi
rm -f conftest*
fi
echo "$ECHO_T""`eval echo '${'$ac_ac_Header'}'`" 1>&6
if test `eval echo '${'$ac_ac_Header'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_header" | $ac_tr_cpp` 1
EOF

fi
done

echo $ECHO_N "checking for working readdir... $ECHO_C" 1>&6
echo "configure:7172: checking for working readdir" 1>&5
if test "${jm_cv_func_working_readdir+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
    # Arrange for deletion of the temporary directory this test creates, in
  # case the test itself fails to delete everything -- as happens on Sunos.
  ac_clean_files="$ac_clean_files conf-dir"

  if test "$cross_compiling" = yes; then
  jm_cv_func_working_readdir=no
else
  cat >conftest.$ac_ext <<EOF
#line 7183 "configure"
#include "confdefs.h"
#   include <stdio.h>
#   include <sys/types.h>
#   if HAVE_STRING_H
#    include <string.h>
#   endif

#   ifdef HAVE_DIRENT_H
#    include <dirent.h>
#    define NLENGTH(direct) (strlen((direct)->d_name))
#   else /* not HAVE_DIRENT_H */
#    define dirent direct
#    define NLENGTH(direct) ((direct)->d_namlen)
#    ifdef HAVE_SYS_NDIR_H
#     include <sys/ndir.h>
#    endif /* HAVE_SYS_NDIR_H */
#    ifdef HAVE_SYS_DIR_H
#     include <sys/dir.h>
#    endif /* HAVE_SYS_DIR_H */
#    ifdef HAVE_NDIR_H
#     include <ndir.h>
#    endif /* HAVE_NDIR_H */
#   endif /* HAVE_DIRENT_H */

#   define DOT_OR_DOTDOT(Basename) \
     (Basename[0] == '.' && (Basename[1] == '\0' \
			     || (Basename[1] == '.' && Basename[2] == '\0')))

    static void
    create_300_file_dir (const char *dir)
    {
      int i;

      if (mkdir (dir, 0700))
	abort ();
      if (chdir (dir))
	abort ();

      for (i = 0; i < 300; i++)
	{
	  char file_name[4];
	  FILE *out;

	  sprintf (file_name, "%03d", i);
	  out = fopen (file_name, "w");
	  if (!out)
	    abort ();
	  if (fclose (out) == EOF)
	    abort ();
	}

      if (chdir (".."))
	abort ();
    }

    static void
    remove_dir (const char *dir)
    {
      DIR *dirp;

      if (chdir (dir))
	abort ();

      dirp = opendir (".");
      if (dirp == NULL)
	abort ();

      while (1)
	{
	  struct dirent *dp = readdir (dirp);
	  if (dp == NULL)
	    break;

	  if (DOT_OR_DOTDOT (dp->d_name))
	    continue;

	  if (unlink (dp->d_name))
	    abort ();
	}
      closedir (dirp);

      if (chdir (".."))
	abort ();

      if (rmdir (dir))
	exit (1);
    }

    int
    main ()
    {
      const char *dir = "conf-dir";
      create_300_file_dir (dir);
      remove_dir (dir);
      exit (0);
    }
EOF
if { (eval echo configure:7265: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } &&
   test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null; then
  jm_cv_func_working_readdir=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  jm_cv_func_working_readdir=no
fi
rm -f conftest*
fi

fi
echo "$ECHO_T""$jm_cv_func_working_readdir" 1>&6

  if test $jm_cv_func_working_readdir = yes; then
    cat >>confdefs.h <<EOF
#define HAVE_WORKING_READDIR 1
EOF

  fi

 if test $jm_cv_func_memcmp_working = no; then
   cat >>confdefs.h <<EOF
#define memcmp rpl_memcmp
EOF

 fi

    io_functions='clearerr_unlocked feof_unlocked ferror_unlocked
    fflush_unlocked fputc_unlocked fread_unlocked fwrite_unlocked
    getc_unlocked getchar_unlocked putc_unlocked putchar_unlocked'
    for jm_io_func in $io_functions; do
      # Check for the existence of each function only if its declared.
      # Otherwise, we'd get the Solaris5.5.1 functions that are not
      # declared, and that have been removed from Solaris5.6.  The resulting
      # 5.5.1 binaries would not run on 5.6 due to shared library differences.
      ac_ac_Symbol=`echo "ac_cv_have_decl_$jm_io_func" | $ac_tr_sh`
echo $ECHO_N "checking whether $jm_io_func is declared... $ECHO_C" 1>&6
echo "configure:7297: checking whether $jm_io_func is declared" 1>&5
if eval "test \"\${$ac_ac_Symbol+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 7302 "configure"
#include "confdefs.h"
#include <stdio.h>

int
main ()
{
#ifndef $jm_io_func
  char *p = (char *) $jm_io_func;
#endif

  ;
  return 0;
}
EOF
if { (eval echo configure:7315: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  eval "$ac_ac_Symbol=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$ac_ac_Symbol=no"
fi
rm -f conftest*
fi
echo "$ECHO_T""`eval echo '${'$ac_ac_Symbol'}'`" 1>&6
if test `eval echo '${'$ac_ac_Symbol'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_DECL_$jm_io_func" | $ac_tr_cpp` 1
EOF

jm_declared=yes
else
  cat >>confdefs.h <<EOF
#define `echo "HAVE_DECL_$jm_io_func" | $ac_tr_cpp` 0
EOF

jm_declared=no
fi

      if test $jm_declared = yes; then
        for ac_func in $jm_io_func
do
ac_ac_var=`echo "ac_cv_func_$ac_func" | $ac_tr_sh`
echo $ECHO_N "checking for $ac_func... $ECHO_C" 1>&6
echo "configure:7341: checking for $ac_func" 1>&5
if eval "test \"\${$ac_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 7346 "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.  */
#ifdef __cplusplus
extern "C"
#endif
/* 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();
char (*f)();

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
f = $ac_func;
#endif

  ;
  return 0;
}
EOF
if { (eval echo configure:7374: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  eval "$ac_ac_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$ac_ac_var=no"
fi
rm -f conftest*
fi
echo "$ECHO_T""`eval echo '${'$ac_ac_var'}'`" 1>&6
if test `eval echo '${'$ac_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $ac_tr_cpp` 1
EOF

fi
done

      fi
    done

  for ac_header in fnmatch.h
do
ac_ac_Header=`echo "ac_cv_header_$ac_header" | $ac_tr_sh`
echo $ECHO_N "checking for $ac_header... $ECHO_C" 1>&6
echo "configure:7396: checking for $ac_header" 1>&5
if eval "test \"\${$ac_ac_Header+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else

cat >conftest.$ac_ext <<EOF
#line 7401 "configure"
#include "confdefs.h"
#include <$ac_header>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:7406: \"$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
  eval "$ac_ac_Header=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$ac_ac_Header=no"
fi
rm -f conftest*
fi
echo "$ECHO_T""`eval echo '${'$ac_ac_Header'}'`" 1>&6
if test `eval echo '${'$ac_ac_Header'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_header" | $ac_tr_cpp` 1
EOF

fi
done

echo $ECHO_N "checking for working fnmatch... $ECHO_C" 1>&6
echo "configure:7426: checking for working fnmatch" 1>&5
if test "${ac_cv_func_fnmatch_works+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  # Some versions of Solaris or SCO have a broken fnmatch function.
# So we run a test program.  If we are cross-compiling, take no chance.
# Thanks to John Oleynick and Franc,ois Pinard for this test.
if test "$cross_compiling" = yes; then
  ac_cv_func_fnmatch_works=no
else
  cat >conftest.$ac_ext <<EOF
#line 7437 "configure"
#include "confdefs.h"
#if HAVE_FNMATCH_H
# include <fnmatch.h>
#endif

int
main ()
{
  exit (fnmatch ("a*", "abc", 0) != 0);
}
EOF
if { (eval echo configure:7448: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } &&
   test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null; then
  ac_cv_func_fnmatch_works=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_func_fnmatch_works=no
fi
rm -f conftest*
fi

fi
echo "$ECHO_T""$ac_cv_func_fnmatch_works" 1>&6
if test $ac_cv_func_fnmatch_works = yes; then
  cat >>confdefs.h <<\EOF
#define HAVE_FNMATCH 1
EOF

fi

  if test $ac_cv_func_fnmatch_works = no \
      && test $ac_cv_gnu_library = no; then

    LIBOBJS="$LIBOBJS fnmatch.$ac_objext"
    cat >>confdefs.h <<EOF
#define fnmatch rpl_fnmatch
EOF

  fi

            echo $ECHO_N "checking for group_member... $ECHO_C" 1>&6
echo "configure:7473: checking for group_member" 1>&5
if test "${ac_cv_func_group_member+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 7478 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char group_member(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char group_member();
char (*f)();

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_group_member) || defined (__stub___group_member)
choke me
#else
f = group_member;
#endif

  ;
  return 0;
}
EOF
if { (eval echo configure:7506: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  ac_cv_func_group_member=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_func_group_member=no
fi
rm -f conftest*
fi
echo "$ECHO_T""$ac_cv_func_group_member" 1>&6
if test $ac_cv_func_group_member = yes; then
  :
else
  LIBOBJS="$LIBOBJS group-member.$ac_objext"
fi

echo $ECHO_N "checking for SVID conformant putenv... $ECHO_C" 1>&6
echo "configure:7522: checking for SVID conformant putenv" 1>&5
if test "${jm_cv_func_svid_putenv+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  if test "$cross_compiling" = yes; then
  	     jm_cv_func_svid_putenv=no
else
  cat >conftest.$ac_ext <<EOF
#line 7530 "configure"
#include "confdefs.h"

    int
    main ()
    {
      /* Put it in env.  */
      if (putenv ("CONFTEST_putenv=val"))
        exit (1);

      /* Try to remove it.  */
      if (putenv ("CONFTEST_putenv"))
        exit (1);

      /* Make sure it was deleted.  */
      if (getenv ("CONFTEST_putenv") != 0)
        exit (1);

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

fi
echo "$ECHO_T""$jm_cv_func_svid_putenv" 1>&6
  if test $jm_cv_func_svid_putenv = no; then

    LIBOBJS="$LIBOBJS putenv.$ac_objext"
    cat >>confdefs.h <<EOF
#define putenv rpl_putenv
EOF

  fi

echo "checking for AFS" 1>&6
echo "configure:7567: checking for AFS" 1>&5
  test -d /afs \
    && cat >>confdefs.h <<\EOF
#define AFS 1
EOF

  for ac_header in stdlib.h
do
ac_ac_Header=`echo "ac_cv_header_$ac_header" | $ac_tr_sh`
echo $ECHO_N "checking for $ac_header... $ECHO_C" 1>&6
echo "configure:7576: checking for $ac_header" 1>&5
if eval "test \"\${$ac_ac_Header+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else

cat >conftest.$ac_ext <<EOF
#line 7581 "configure"
#include "confdefs.h"
#include <$ac_header>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:7586: \"$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
  eval "$ac_ac_Header=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$ac_ac_Header=no"
fi
rm -f conftest*
fi
echo "$ECHO_T""`eval echo '${'$ac_ac_Header'}'`" 1>&6
if test `eval echo '${'$ac_ac_Header'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_header" | $ac_tr_cpp` 1
EOF

fi
done

  echo $ECHO_N "checking whether <inttypes.h> defines strtoumax as a macro... $ECHO_C" 1>&6
echo "configure:7606: checking whether <inttypes.h> defines strtoumax as a macro" 1>&5
if test "${jm_cv_func_strtoumax_macro+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else

cat >conftest.$ac_ext <<EOF
#line 7611 "configure"
#include "confdefs.h"
#include <inttypes.h>
#ifdef strtoumax
 inttypes_h_defines_strtoumax
#endif
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "inttypes_h_defines_strtoumax" >/dev/null 2>&1; then
  jm_cv_func_strtoumax_macro=yes
else
  jm_cv_func_strtoumax_macro=no
fi
rm -f conftest*

fi
echo "$ECHO_T""$jm_cv_func_strtoumax_macro" 1>&6

  if test "$jm_cv_func_strtoumax_macro" != yes; then
    for ac_func in strtoumax
do
ac_ac_var=`echo "ac_cv_func_$ac_func" | $ac_tr_sh`
echo $ECHO_N "checking for $ac_func... $ECHO_C" 1>&6
echo "configure:7632: checking for $ac_func" 1>&5
if eval "test \"\${$ac_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 7637 "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.  */
#ifdef __cplusplus
extern "C"
#endif
/* 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();
char (*f)();

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
f = $ac_func;
#endif

  ;
  return 0;
}
EOF
if { (eval echo configure:7665: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  eval "$ac_ac_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$ac_ac_var=no"
fi
rm -f conftest*
fi
echo "$ECHO_T""`eval echo '${'$ac_ac_var'}'`" 1>&6
if test `eval echo '${'$ac_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $ac_tr_cpp` 1
EOF

else
  LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
fi
done

  fi

          case "$ac_cv_type_unsigned_long_long,$jm_cv_func_strtoumax_macro,$ac_cv_func_strtoumax" in
    yes,no,no)
      for ac_func in strtoull
do
ac_ac_var=`echo "ac_cv_func_$ac_func" | $ac_tr_sh`
echo $ECHO_N "checking for $ac_func... $ECHO_C" 1>&6
echo "configure:7690: checking for $ac_func" 1>&5
if eval "test \"\${$ac_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 7695 "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.  */
#ifdef __cplusplus
extern "C"
#endif
/* 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();
char (*f)();

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
f = $ac_func;
#endif

  ;
  return 0;
}
EOF
if { (eval echo configure:7723: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  eval "$ac_ac_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$ac_ac_var=no"
fi
rm -f conftest*
fi
echo "$ECHO_T""`eval echo '${'$ac_ac_var'}'`" 1>&6
if test `eval echo '${'$ac_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $ac_tr_cpp` 1
EOF

else
  LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
fi
done

      ;;
  esac

  echo $ECHO_N "checking whether link(2) follows symlinks... $ECHO_C" 1>&6
echo "configure:7744: checking whether link(2) follows symlinks" 1>&5
if test "${jm_ac_cv_func_link_follows_symlink+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else

            test -z "$ac_cv_header_unistd_h" \
      && for ac_header in unistd.h
do
ac_ac_Header=`echo "ac_cv_header_$ac_header" | $ac_tr_sh`
echo $ECHO_N "checking for $ac_header... $ECHO_C" 1>&6
echo "configure:7753: checking for $ac_header" 1>&5
if eval "test \"\${$ac_ac_Header+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else

cat >conftest.$ac_ext <<EOF
#line 7758 "configure"
#include "confdefs.h"
#include <$ac_header>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:7763: \"$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
  eval "$ac_ac_Header=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$ac_ac_Header=no"
fi
rm -f conftest*
fi
echo "$ECHO_T""`eval echo '${'$ac_ac_Header'}'`" 1>&6
if test `eval echo '${'$ac_ac_Header'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_header" | $ac_tr_cpp` 1
EOF

fi
done

    # Create a regular file.
    echo > conftest.file
    if test "$cross_compiling" = yes; then
  jm_ac_cv_func_link_follows_symlink=yes
else
  cat >conftest.$ac_ext <<EOF
#line 7788 "configure"
#include "confdefs.h"

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

#       define SAME_INODE(Stat_buf_1, Stat_buf_2) \
	  ((Stat_buf_1).st_ino == (Stat_buf_2).st_ino \
	   && (Stat_buf_1).st_dev == (Stat_buf_2).st_dev)

	int
	main ()
	{
	  const char *file = "conftest.file";
	  const char *sym = "conftest.sym";
	  const char *hard = "conftest.hard";
	  struct stat sb_file, sb_hard;

	  /* Create a symlink to the regular file. */
	  if (symlink (file, sym))
	    abort ();

	  /* Create a hard link to that symlink.  */
	  if (link (sym, hard))
	    abort ();

	  if (lstat (hard, &sb_hard))
	    abort ();
	  if (lstat (file, &sb_file))
	    abort ();

	  /* If the dev/inode of hard and file are the same, then
	     the link call followed the symlink.  */
	  return SAME_INODE (sb_hard, sb_file) ? 0 : 1;
	}

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

fi
echo "$ECHO_T""$jm_ac_cv_func_link_follows_symlink" 1>&6
  if test $jm_ac_cv_func_link_follows_symlink = yes; then
    cat >>confdefs.h <<\EOF
#define LINK_FOLLOWS_SYMLINKS 1
EOF

  fi

echo $ECHO_N "checking for error_at_line... $ECHO_C" 1>&6
echo "configure:7838: checking for error_at_line" 1>&5
if test "${am_cv_lib_error_at_line+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 7843 "configure"
#include "confdefs.h"

int
main ()
{
error_at_line(0, 0, "", 0, "");
  ;
  return 0;
}
EOF
if { (eval echo configure:7853: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  am_cv_lib_error_at_line=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  am_cv_lib_error_at_line=no
fi
rm -f conftest*
fi
echo "$ECHO_T""$am_cv_lib_error_at_line" 1>&6
 if test $am_cv_lib_error_at_line = no; then
   LIBOBJS="$LIBOBJS error.$ac_objext"
 fi

  for ac_func in localtime_r
do
ac_ac_var=`echo "ac_cv_func_$ac_func" | $ac_tr_sh`
echo $ECHO_N "checking for $ac_func... $ECHO_C" 1>&6
echo "configure:7870: checking for $ac_func" 1>&5
if eval "test \"\${$ac_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 7875 "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.  */
#ifdef __cplusplus
extern "C"
#endif
/* 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();
char (*f)();

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
f = $ac_func;
#endif

  ;
  return 0;
}
EOF
if { (eval echo configure:7903: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  eval "$ac_ac_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$ac_ac_var=no"
fi
rm -f conftest*
fi
echo "$ECHO_T""`eval echo '${'$ac_ac_var'}'`" 1>&6
if test `eval echo '${'$ac_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $ac_tr_cpp` 1
EOF

fi
done

 for ac_header in limits.h
do
ac_ac_Header=`echo "ac_cv_header_$ac_header" | $ac_tr_sh`
echo $ECHO_N "checking for $ac_header... $ECHO_C" 1>&6
echo "configure:7923: checking for $ac_header" 1>&5
if eval "test \"\${$ac_ac_Header+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else

cat >conftest.$ac_ext <<EOF
#line 7928 "configure"
#include "confdefs.h"
#include <$ac_header>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:7933: \"$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
  eval "$ac_ac_Header=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$ac_ac_Header=no"
fi
rm -f conftest*
fi
echo "$ECHO_T""`eval echo '${'$ac_ac_Header'}'`" 1>&6
if test `eval echo '${'$ac_ac_Header'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_header" | $ac_tr_cpp` 1
EOF

fi
done

 for ac_func in bcopy tzset mempcpy memcpy memset
do
ac_ac_var=`echo "ac_cv_func_$ac_func" | $ac_tr_sh`
echo $ECHO_N "checking for $ac_func... $ECHO_C" 1>&6
echo "configure:7956: checking for $ac_func" 1>&5
if eval "test \"\${$ac_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 7961 "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.  */
#ifdef __cplusplus
extern "C"
#endif
/* 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();
char (*f)();

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
f = $ac_func;
#endif

  ;
  return 0;
}
EOF
if { (eval echo configure:7989: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  eval "$ac_ac_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$ac_ac_var=no"
fi
rm -f conftest*
fi
echo "$ECHO_T""`eval echo '${'$ac_ac_var'}'`" 1>&6
if test `eval echo '${'$ac_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $ac_tr_cpp` 1
EOF

fi
done

 # This defines (or not) HAVE_TZNAME and HAVE_TM_ZONE.

echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" 1>&6
echo "configure:8007: checking for struct tm.tm_zone" 1>&5
if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 8012 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <$ac_cv_struct_tm>

int
main ()
{
struct tm foo;
foo.tm_zone;
  ;
  return 0;
}
EOF
if { (eval echo configure:8025: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  ac_cv_member_struct_tm_tm_zone=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_member_struct_tm_tm_zone=no
fi
rm -f conftest*
fi
echo "$ECHO_T""$ac_cv_member_struct_tm_tm_zone" 1>&6
if test $ac_cv_member_struct_tm_tm_zone = yes; then
  cat >>confdefs.h <<EOF
#define HAVE_STRUCT_TM_TM_ZONE 1
EOF

fi

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

else
  echo $ECHO_N "checking for tzname... $ECHO_C" 1>&6
echo "configure:8046: checking for tzname" 1>&5
if test "${ac_cv_var_tzname+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 8051 "configure"
#include "confdefs.h"
#include <time.h>
#ifndef tzname /* For SGI.  */
extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
#endif

int
main ()
{
atoi(*tzname);
  ;
  return 0;
}
EOF
if { (eval echo configure:8065: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  ac_cv_var_tzname=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_var_tzname=no
fi
rm -f conftest*
fi
echo "$ECHO_T""$ac_cv_var_tzname" 1>&6
  if test $ac_cv_var_tzname = yes; then
    cat >>confdefs.h <<\EOF
#define HAVE_TZNAME 1
EOF

  fi
fi

 for ac_func in mblen mbrlen
do
ac_ac_var=`echo "ac_cv_func_$ac_func" | $ac_tr_sh`
echo $ECHO_N "checking for $ac_func... $ECHO_C" 1>&6
echo "configure:8085: checking for $ac_func" 1>&5
if eval "test \"\${$ac_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 8090 "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.  */
#ifdef __cplusplus
extern "C"
#endif
/* 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();
char (*f)();

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
f = $ac_func;
#endif

  ;
  return 0;
}
EOF
if { (eval echo configure:8118: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  eval "$ac_ac_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$ac_ac_var=no"
fi
rm -f conftest*
fi
echo "$ECHO_T""`eval echo '${'$ac_ac_var'}'`" 1>&6
if test `eval echo '${'$ac_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $ac_tr_cpp` 1
EOF

fi
done

echo $ECHO_N "checking for struct tm.tm_gmtoff... $ECHO_C" 1>&6
echo "configure:8135: checking for struct tm.tm_gmtoff" 1>&5
if test "${ac_cv_member_struct_tm_tm_gmtoff+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 8140 "configure"
#include "confdefs.h"
#include <time.h>

int
main ()
{
struct tm foo;
foo.tm_gmtoff;
  ;
  return 0;
}
EOF
if { (eval echo configure:8152: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  ac_cv_member_struct_tm_tm_gmtoff=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_member_struct_tm_tm_gmtoff=no
fi
rm -f conftest*
fi
echo "$ECHO_T""$ac_cv_member_struct_tm_tm_gmtoff" 1>&6
if test $ac_cv_member_struct_tm_tm_gmtoff = yes; then
  cat >>confdefs.h <<\EOF
#define HAVE_TM_GMTOFF 1
EOF

fi

 for ac_header in sys/time.h
do
ac_ac_Header=`echo "ac_cv_header_$ac_header" | $ac_tr_sh`
echo $ECHO_N "checking for $ac_header... $ECHO_C" 1>&6
echo "configure:8171: checking for $ac_header" 1>&5
if eval "test \"\${$ac_ac_Header+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else

cat >conftest.$ac_ext <<EOF
#line 8176 "configure"
#include "confdefs.h"
#include <$ac_header>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:8181: \"$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
  eval "$ac_ac_Header=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$ac_ac_Header=no"
fi
rm -f conftest*
fi
echo "$ECHO_T""`eval echo '${'$ac_ac_Header'}'`" 1>&6
if test `eval echo '${'$ac_ac_Header'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_header" | $ac_tr_cpp` 1
EOF

fi
done

 echo $ECHO_N "checking for working GNU strftime... $ECHO_C" 1>&6
echo "configure:8201: checking for working GNU strftime" 1>&5
if test "${jm_cv_func_working_gnu_strftime+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  if test "$cross_compiling" = yes; then
  	     jm_cv_func_working_gnu_strftime=no
else
  cat >conftest.$ac_ext <<EOF
#line 8209 "configure"
#include "confdefs.h"
 /* Ulrich Drepper provided parts of the test program.  */
#if STDC_HEADERS
# include <stdlib.h>
#endif

#if TIME_WITH_SYS_TIME
# include <sys/time.h>
# include <time.h>
#else
# if HAVE_SYS_TIME_H
#  include <sys/time.h>
# else
#  include <time.h>
# endif
#endif

static int
compare (const char *fmt, const struct tm *tm, const char *expected)
{
  char buf[99];
  strftime (buf, 99, fmt, tm);
  if (strcmp (buf, expected))
    {
#ifdef SHOW_FAILURES
      printf ("fmt: \"%s\", expected \"%s\", got \"%s\"\n",
	      fmt, expected, buf);
#endif
      return 1;
    }
  return 0;
}

int
main ()
{
  int n_fail = 0;
  struct tm *tm;
  time_t t = 738367; /* Fri Jan  9 13:06:07 1970 */
  tm = gmtime (&t);

  /* This is necessary to make strftime give consistent zone strings and
     e.g., seconds since the epoch (%s).  */
  putenv ("TZ=GMT0");

#undef CMP
#define CMP(Fmt, Expected) n_fail += compare ((Fmt), tm, (Expected))

  CMP ("%-m", "1");		/* GNU */
  CMP ("%A", "Friday");
  CMP ("%^A", "FRIDAY");	/* The ^ is a GNU extension.  */
  CMP ("%B", "January");
  CMP ("%^B", "JANUARY");
  CMP ("%C", "19");		/* POSIX.2 */
  CMP ("%D", "01/09/70");	/* POSIX.2 */
  CMP ("%F", "1970-01-09");
  CMP ("%G", "1970");		/* GNU */
  CMP ("%H", "13");
  CMP ("%I", "01");
  CMP ("%M", "06");
  CMP ("%M", "06");
  CMP ("%R", "13:06");		/* POSIX.2 */
  CMP ("%S", "07");
  CMP ("%T", "13:06:07");	/* POSIX.2 */
  CMP ("%U", "01");
  CMP ("%V", "02");
  CMP ("%W", "01");
  CMP ("%X", "13:06:07");
  CMP ("%Y", "1970");
  CMP ("%Z", "GMT");
  CMP ("%_m", " 1");		/* GNU */
  CMP ("%a", "Fri");
  CMP ("%^a", "FRI");
  CMP ("%b", "Jan");
  CMP ("%^b", "JAN");
  CMP ("%c", "Fri Jan  9 13:06:07 1970");
  CMP ("%^c", "FRI JAN  9 13:06:07 1970");
  CMP ("%d", "09");
  CMP ("%e", " 9");		/* POSIX.2 */
  CMP ("%g", "70");		/* GNU */
  CMP ("%h", "Jan");		/* POSIX.2 */
  CMP ("%^h", "JAN");
  CMP ("%j", "009");
  CMP ("%k", "13");		/* GNU */
  CMP ("%l", " 1");		/* GNU */
  CMP ("%m", "01");
  CMP ("%n", "\n");		/* POSIX.2 */
  CMP ("%p", "PM");
  CMP ("%r", "01:06:07 PM");	/* POSIX.2 */
  CMP ("%s", "738367");		/* GNU */
  CMP ("%t", "\t");		/* POSIX.2 */
  CMP ("%u", "5");		/* POSIX.2 */
  CMP ("%w", "5");
  CMP ("%x", "01/09/70");
  CMP ("%y", "70");
  CMP ("%z", "+0000");		/* GNU */

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

fi
echo "$ECHO_T""$jm_cv_func_working_gnu_strftime" 1>&6
  if test $jm_cv_func_working_gnu_strftime = no; then

    LIBOBJS="$LIBOBJS strftime.$ac_objext"
    cat >>confdefs.h <<EOF
#define strftime gnu_strftime
EOF

  fi

 for ac_func in getgroups
do
ac_ac_var=`echo "ac_cv_func_$ac_func" | $ac_tr_sh`
echo $ECHO_N "checking for $ac_func... $ECHO_C" 1>&6
echo "configure:8325: checking for $ac_func" 1>&5
if eval "test \"\${$ac_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 8330 "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.  */
#ifdef __cplusplus
extern "C"
#endif
/* 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();
char (*f)();

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
f = $ac_func;
#endif

  ;
  return 0;
}
EOF
if { (eval echo configure:8358: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  eval "$ac_ac_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$ac_ac_var=no"
fi
rm -f conftest*
fi
echo "$ECHO_T""`eval echo '${'$ac_ac_var'}'`" 1>&6
if test `eval echo '${'$ac_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $ac_tr_cpp` 1
EOF

fi
done

 # If we don't yet have getgroups, see if it's in -lbsd.
 # This is reported to be necessary on an ITOS 3000WS running SEIUX 3.1.
 if test $ac_cv_func_getgroups = no; then
   jm_cv_sys_getgroups_saved_lib="$LIBS"
   echo $ECHO_N "checking for getgroups in -lbsd... $ECHO_C" 1>&6
echo "configure:8379: checking for getgroups in -lbsd" 1>&5
if test "${ac_cv_lib_bsd_getgroups+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lbsd  $LIBS"
cat >conftest.$ac_ext <<EOF
#line 8386 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char getgroups ();
int
main ()
{
getgroups ();
  ;
  return 0;
}
EOF
if { (eval echo configure:8403: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  ac_cv_lib_bsd_getgroups=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_lib_bsd_getgroups=no
fi
rm -f conftest*
LIBS="$ac_save_LIBS"
fi
echo "$ECHO_T""$ac_cv_lib_bsd_getgroups" 1>&6
if test $ac_cv_lib_bsd_getgroups = yes; then
  GETGROUPS_LIB=-lbsd
fi

   LIBS="$jm_cv_sys_getgroups_saved_lib"
 fi

 # Run the program to test the functionality of the system-supplied
 # getgroups function only if there is such a function.
 if test $ac_cv_func_getgroups = yes; then
   echo $ECHO_N "checking for working getgroups... $ECHO_C" 1>&6
echo "configure:8423: checking for working getgroups" 1>&5
if test "${jm_cv_func_working_getgroups+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  if test "$cross_compiling" = yes; then
  	       jm_cv_func_working_getgroups=no
else
  cat >conftest.$ac_ext <<EOF
#line 8431 "configure"
#include "confdefs.h"

      int
      main ()
      {
	/* On Ultrix 4.3, getgroups (0, 0) always fails.  */
	exit (getgroups (0, 0) == -1 ? 1 : 0);
      }
		
EOF
if { (eval echo configure:8441: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } &&
   test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null; then
  jm_cv_func_working_getgroups=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  jm_cv_func_working_getgroups=no
fi
rm -f conftest*
fi

fi
echo "$ECHO_T""$jm_cv_func_working_getgroups" 1>&6
    if test $jm_cv_func_working_getgroups = no; then

      LIBOBJS="$LIBOBJS getgroups.$ac_objext"
      cat >>confdefs.h <<EOF
#define getgroups rpl_getgroups
EOF

    fi
  fi

echo $ECHO_N "checking for vprintf... $ECHO_C" 1>&6
echo "configure:8461: checking for vprintf" 1>&5
if test "${ac_cv_func_vprintf+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 8466 "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.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char vprintf();
char (*f)();

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
f = vprintf;
#endif

  ;
  return 0;
}
EOF
if { (eval echo configure:8494: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  ac_cv_func_vprintf=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_func_vprintf=no
fi
rm -f conftest*
fi
echo "$ECHO_T""$ac_cv_func_vprintf" 1>&6
if test $ac_cv_func_vprintf = yes; then
  cat >>confdefs.h <<\EOF
#define HAVE_VPRINTF 1
EOF

fi

if test "$ac_cv_func_vprintf" != yes; then
echo $ECHO_N "checking for _doprnt... $ECHO_C" 1>&6
echo "configure:8511: checking for _doprnt" 1>&5
if test "${ac_cv_func__doprnt+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 8516 "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.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char _doprnt();
char (*f)();

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
f = _doprnt;
#endif

  ;
  return 0;
}
EOF
if { (eval echo configure:8544: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  ac_cv_func__doprnt=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_func__doprnt=no
fi
rm -f conftest*
fi
echo "$ECHO_T""$ac_cv_func__doprnt" 1>&6
if test $ac_cv_func__doprnt = yes; then
  cat >>confdefs.h <<\EOF
#define HAVE_DOPRNT 1
EOF

fi

fi

ac_have_func=no # yes means we've found a way to get the load average.

am_cv_saved_LIBS="$LIBS"

# On HPUX9, an unprivileged user can get load averages through this function.
for ac_func in pstat_getdynamic
do
ac_ac_var=`echo "ac_cv_func_$ac_func" | $ac_tr_sh`
echo $ECHO_N "checking for $ac_func... $ECHO_C" 1>&6
echo "configure:8567: checking for $ac_func" 1>&5
if eval "test \"\${$ac_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 8572 "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.  */
#ifdef __cplusplus
extern "C"
#endif
/* 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();
char (*f)();

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
f = $ac_func;
#endif

  ;
  return 0;
}
EOF
if { (eval echo configure:8600: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  eval "$ac_ac_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$ac_ac_var=no"
fi
rm -f conftest*
fi
echo "$ECHO_T""`eval echo '${'$ac_ac_var'}'`" 1>&6
if test `eval echo '${'$ac_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $ac_tr_cpp` 1
EOF

fi
done

# Solaris has libkstat which does not require root.
echo $ECHO_N "checking for kstat_open in -lkstat... $ECHO_C" 1>&6
echo "configure:8618: checking for kstat_open in -lkstat" 1>&5
if test "${ac_cv_lib_kstat_kstat_open+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lkstat  $LIBS"
cat >conftest.$ac_ext <<EOF
#line 8625 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* 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:8642: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  ac_cv_lib_kstat_kstat_open=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_lib_kstat_kstat_open=no
fi
rm -f conftest*
LIBS="$ac_save_LIBS"
fi
echo "$ECHO_T""$ac_cv_lib_kstat_kstat_open" 1>&6
if test $ac_cv_lib_kstat_kstat_open = yes; then
  cat >>confdefs.h <<EOF
#define HAVE_LIBKSTAT 1
EOF

  LIBS="-lkstat $LIBS"

fi

if test $ac_cv_lib_kstat_kstat_open = yes ; then ac_have_func=yes ; fi

# Some systems with -lutil have (and need) -lkvm as well, some do not.
# On Solaris, -lkvm requires nlist from -lelf, so check that first
# to get the right answer into the cache.
# For kstat on solaris, we need libelf to force the definition of SVR4 below.
echo $ECHO_N "checking for elf_begin in -lelf... $ECHO_C" 1>&6
echo "configure:8665: checking for elf_begin in -lelf" 1>&5
if test "${ac_cv_lib_elf_elf_begin+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lelf  $LIBS"
cat >conftest.$ac_ext <<EOF
#line 8672 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char elf_begin ();
int
main ()
{
elf_begin ();
  ;
  return 0;
}
EOF
if { (eval echo configure:8689: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  ac_cv_lib_elf_elf_begin=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_lib_elf_elf_begin=no
fi
rm -f conftest*
LIBS="$ac_save_LIBS"
fi
echo "$ECHO_T""$ac_cv_lib_elf_elf_begin" 1>&6
if test $ac_cv_lib_elf_elf_begin = yes; then
  LIBS="-lelf $LIBS"
fi

if test $ac_have_func = no; then
  echo $ECHO_N "checking for kvm_open in -lkvm... $ECHO_C" 1>&6
echo "configure:8705: checking for kvm_open in -lkvm" 1>&5
if test "${ac_cv_lib_kvm_kvm_open+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lkvm  $LIBS"
cat >conftest.$ac_ext <<EOF
#line 8712 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* 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:8729: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  ac_cv_lib_kvm_kvm_open=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_lib_kvm_kvm_open=no
fi
rm -f conftest*
LIBS="$ac_save_LIBS"
fi
echo "$ECHO_T""$ac_cv_lib_kvm_kvm_open" 1>&6
if test $ac_cv_lib_kvm_kvm_open = yes; then
  LIBS="-lkvm $LIBS"
fi

  # Check for the 4.4BSD definition of getloadavg.
  echo $ECHO_N "checking for getloadavg in -lutil... $ECHO_C" 1>&6
echo "configure:8745: checking for getloadavg in -lutil" 1>&5
if test "${ac_cv_lib_util_getloadavg+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lutil  $LIBS"
cat >conftest.$ac_ext <<EOF
#line 8752 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char getloadavg ();
int
main ()
{
getloadavg ();
  ;
  return 0;
}
EOF
if { (eval echo configure:8769: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  ac_cv_lib_util_getloadavg=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_lib_util_getloadavg=no
fi
rm -f conftest*
LIBS="$ac_save_LIBS"
fi
echo "$ECHO_T""$ac_cv_lib_util_getloadavg" 1>&6
if test $ac_cv_lib_util_getloadavg = yes; then
  LIBS="-lutil $LIBS" ac_have_func=yes ac_cv_func_getloadavg_setgid=yes
fi

fi

if test $ac_have_func = no; then
  # There is a commonly available library for RS/6000 AIX.
  # Since it is not a standard part of AIX, it might be installed locally.
  ac_save_LIBS="$LIBS"
  LIBS="-L/usr/local/lib $LIBS"
  echo $ECHO_N "checking for getloadavg in -lgetloadavg... $ECHO_C" 1>&6
echo "configure:8790: checking for getloadavg in -lgetloadavg" 1>&5
if test "${ac_cv_lib_getloadavg_getloadavg+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lgetloadavg  $LIBS"
cat >conftest.$ac_ext <<EOF
#line 8797 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char getloadavg ();
int
main ()
{
getloadavg ();
  ;
  return 0;
}
EOF
if { (eval echo configure:8814: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  ac_cv_lib_getloadavg_getloadavg=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_lib_getloadavg_getloadavg=no
fi
rm -f conftest*
LIBS="$ac_save_LIBS"
fi
echo "$ECHO_T""$ac_cv_lib_getloadavg_getloadavg" 1>&6
if test $ac_cv_lib_getloadavg_getloadavg = yes; then
  LIBS="-lgetloadavg $LIBS"
else
  LIBS="$ac_save_LIBS"
fi

fi

# Make sure it is really in the library, if we think we found it.
for ac_func in getloadavg
do
ac_ac_var=`echo "ac_cv_func_$ac_func" | $ac_tr_sh`
echo $ECHO_N "checking for $ac_func... $ECHO_C" 1>&6
echo "configure:8836: checking for $ac_func" 1>&5
if eval "test \"\${$ac_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 8841 "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.  */
#ifdef __cplusplus
extern "C"
#endif
/* 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();
char (*f)();

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
f = $ac_func;
#endif

  ;
  return 0;
}
EOF
if { (eval echo configure:8869: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  eval "$ac_ac_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$ac_ac_var=no"
fi
rm -f conftest*
fi
echo "$ECHO_T""`eval echo '${'$ac_ac_var'}'`" 1>&6
if test `eval echo '${'$ac_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $ac_tr_cpp` 1
EOF

else
  LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
fi
done

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

  ac_have_func=yes
else
  cat >>confdefs.h <<\EOF
#define C_GETLOADAVG 1
EOF

  # Figure out what our getloadavg.c needs.
  ac_have_func=no
  echo $ECHO_N "checking for sys/dg_sys_info.h... $ECHO_C" 1>&6
echo "configure:8899: checking for sys/dg_sys_info.h" 1>&5
if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else

cat >conftest.$ac_ext <<EOF
#line 8904 "configure"
#include "confdefs.h"
#include <sys/dg_sys_info.h>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:8909: \"$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
  ac_cv_header_sys_dg_sys_info_h=yes
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_header_sys_dg_sys_info_h=no
fi
rm -f conftest*
fi
echo "$ECHO_T""$ac_cv_header_sys_dg_sys_info_h" 1>&6
if test $ac_cv_header_sys_dg_sys_info_h = yes; then
  ac_have_func=yes; cat >>confdefs.h <<\EOF
#define DGUX 1
EOF

  echo $ECHO_N "checking for dg_sys_info in -ldgc... $ECHO_C" 1>&6
echo "configure:8927: checking for dg_sys_info in -ldgc" 1>&5
if test "${ac_cv_lib_dgc_dg_sys_info+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-ldgc  $LIBS"
cat >conftest.$ac_ext <<EOF
#line 8934 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char dg_sys_info ();
int
main ()
{
dg_sys_info ();
  ;
  return 0;
}
EOF
if { (eval echo configure:8951: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  ac_cv_lib_dgc_dg_sys_info=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_lib_dgc_dg_sys_info=no
fi
rm -f conftest*
LIBS="$ac_save_LIBS"
fi
echo "$ECHO_T""$ac_cv_lib_dgc_dg_sys_info" 1>&6
if test $ac_cv_lib_dgc_dg_sys_info = yes; then
  cat >>confdefs.h <<EOF
#define HAVE_LIBDGC 1
EOF

  LIBS="-ldgc $LIBS"

fi

fi

  echo $ECHO_N "checking for locale.h... $ECHO_C" 1>&6
echo "configure:8970: checking for locale.h" 1>&5
if test "${ac_cv_header_locale_h+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else

cat >conftest.$ac_ext <<EOF
#line 8975 "configure"
#include "confdefs.h"
#include <locale.h>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:8980: \"$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
  ac_cv_header_locale_h=yes
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_header_locale_h=no
fi
rm -f conftest*
fi
echo "$ECHO_T""$ac_cv_header_locale_h" 1>&6

  for ac_func in setlocale
do
ac_ac_var=`echo "ac_cv_func_$ac_func" | $ac_tr_sh`
echo $ECHO_N "checking for $ac_func... $ECHO_C" 1>&6
echo "configure:8997: checking for $ac_func" 1>&5
if eval "test \"\${$ac_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 9002 "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.  */
#ifdef __cplusplus
extern "C"
#endif
/* 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();
char (*f)();

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
f = $ac_func;
#endif

  ;
  return 0;
}
EOF
if { (eval echo configure:9030: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  eval "$ac_ac_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$ac_ac_var=no"
fi
rm -f conftest*
fi
echo "$ECHO_T""`eval echo '${'$ac_ac_var'}'`" 1>&6
if test `eval echo '${'$ac_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $ac_tr_cpp` 1
EOF

fi
done

  # We cannot check for <dwarf.h>, because Solaris 2 does not use dwarf (it
  # uses stabs), but it is still SVR4.  We cannot check for <elf.h> because
  # Irix 4.0.5F has the header but not the library.
  if test $ac_have_func = no && test $ac_cv_lib_elf_elf_begin = yes; then
    ac_have_func=yes; cat >>confdefs.h <<\EOF
#define SVR4 1
EOF

  fi

  if test $ac_have_func = no; then
    echo $ECHO_N "checking for inq_stats/cpustats.h... $ECHO_C" 1>&6
echo "configure:9056: checking for inq_stats/cpustats.h" 1>&5
if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else

cat >conftest.$ac_ext <<EOF
#line 9061 "configure"
#include "confdefs.h"
#include <inq_stats/cpustats.h>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:9066: \"$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
  ac_cv_header_inq_stats_cpustats_h=yes
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_header_inq_stats_cpustats_h=no
fi
rm -f conftest*
fi
echo "$ECHO_T""$ac_cv_header_inq_stats_cpustats_h" 1>&6
if test $ac_cv_header_inq_stats_cpustats_h = yes; then
  ac_have_func=yes; cat >>confdefs.h <<\EOF
#define UMAX 1
EOF

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

fi

  fi

  if test $ac_have_func = no; then
    echo $ECHO_N "checking for sys/cpustats.h... $ECHO_C" 1>&6
echo "configure:9090: checking for sys/cpustats.h" 1>&5
if test "${ac_cv_header_sys_cpustats_h+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else

cat >conftest.$ac_ext <<EOF
#line 9095 "configure"
#include "confdefs.h"
#include <sys/cpustats.h>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:9100: \"$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
  ac_cv_header_sys_cpustats_h=yes
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_header_sys_cpustats_h=no
fi
rm -f conftest*
fi
echo "$ECHO_T""$ac_cv_header_sys_cpustats_h" 1>&6
if test $ac_cv_header_sys_cpustats_h = yes; then
  ac_have_func=yes; cat >>confdefs.h <<\EOF
#define UMAX 1
EOF

fi

  fi

  if test $ac_have_func = no; then
    for ac_header in mach/mach.h
do
ac_ac_Header=`echo "ac_cv_header_$ac_header" | $ac_tr_sh`
echo $ECHO_N "checking for $ac_header... $ECHO_C" 1>&6
echo "configure:9124: checking for $ac_header" 1>&5
if eval "test \"\${$ac_ac_Header+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else

cat >conftest.$ac_ext <<EOF
#line 9129 "configure"
#include "confdefs.h"
#include <$ac_header>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:9134: \"$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
  eval "$ac_ac_Header=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$ac_ac_Header=no"
fi
rm -f conftest*
fi
echo "$ECHO_T""`eval echo '${'$ac_ac_Header'}'`" 1>&6
if test `eval echo '${'$ac_ac_Header'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_header" | $ac_tr_cpp` 1
EOF

fi
done

  fi

  echo $ECHO_N "checking for nlist.h... $ECHO_C" 1>&6
echo "configure:9155: checking for nlist.h" 1>&5
if test "${ac_cv_header_nlist_h+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else

cat >conftest.$ac_ext <<EOF
#line 9160 "configure"
#include "confdefs.h"
#include <nlist.h>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:9165: \"$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
  ac_cv_header_nlist_h=yes
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_header_nlist_h=no
fi
rm -f conftest*
fi
echo "$ECHO_T""$ac_cv_header_nlist_h" 1>&6
if test $ac_cv_header_nlist_h = yes; then
  cat >>confdefs.h <<\EOF
#define NLIST_STRUCT 1
EOF

  echo $ECHO_N "checking for n_un in struct nlist... $ECHO_C" 1>&6
echo "configure:9183: checking for n_un in struct nlist" 1>&5
if test "${ac_cv_struct_nlist_n_un+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 9188 "configure"
#include "confdefs.h"
#include <nlist.h>
int
main ()
{
struct nlist n; n.n_un.n_name = 0;
  ;
  return 0;
}
EOF
if { (eval echo configure:9199: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  ac_cv_struct_nlist_n_un=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_struct_nlist_n_un=no
fi
rm -f conftest*
fi
echo "$ECHO_T""$ac_cv_struct_nlist_n_un" 1>&6
  if test $ac_cv_struct_nlist_n_un = yes; then
    cat >>confdefs.h <<\EOF
#define NLIST_NAME_UNION 1
EOF

  fi

fi
fi # Do not have getloadavg in system libraries.

# Some definitions of getloadavg require that the program be installed setgid.
echo $ECHO_N "checking whether getloadavg requires setgid... $ECHO_C" 1>&6
echo "configure:9218: checking whether getloadavg requires setgid" 1>&5
if test "${ac_cv_func_getloadavg_setgid+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else

cat >conftest.$ac_ext <<EOF
#line 9223 "configure"
#include "confdefs.h"
#include "$srcdir/lib/getloadavg.c"
#ifdef LDAV_PRIVILEGED
Yowza Am I SETGID yet
#endif
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "Yowza Am I SETGID yet" >/dev/null 2>&1; then
  ac_cv_func_getloadavg_setgid=yes
else
  ac_cv_func_getloadavg_setgid=no
fi
rm -f conftest*

fi
echo "$ECHO_T""$ac_cv_func_getloadavg_setgid" 1>&6
if test $ac_cv_func_getloadavg_setgid = yes; then
  NEED_SETGID=true; cat >>confdefs.h <<\EOF
#define GETLOADAVG_PRIVILEGED 1
EOF

else
  NEED_SETGID=false
fi

if test $ac_cv_func_getloadavg_setgid = yes; then
  echo $ECHO_N "checking group of /dev/kmem... $ECHO_C" 1>&6
echo "configure:9248: checking group of /dev/kmem" 1>&5
if test "${ac_cv_group_kmem+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
    # On Solaris, /dev/kmem is a symlink.  Get info on the real file.
  ac_ls_output=`ls -lgL /dev/kmem 2>/dev/null`
  # If we got an error (system does not support symlinks), try without -L.
  test -z "$ac_ls_output" && ac_ls_output=`ls -lg /dev/kmem`
  ac_cv_group_kmem=`echo $ac_ls_output \
    | sed -ne 's/ 	 	*/ /g;
	       s/^.sSrwx-* *0-9* *\(^0-9*\)  *.*/\1/;
	       / /s/.* //;p;'`

fi
echo "$ECHO_T""$ac_cv_group_kmem" 1>&6
  KMEM_GROUP=$ac_cv_group_kmem
fi

if test x = "x$am_cv_saved_LIBS"; then
  GETLOADAVG_LIBS="$LIBS"
else
  GETLOADAVG_LIBS=`echo "$LIBS"|sed "s!$am_cv_saved_LIBS!!"`
fi
LIBS="$am_cv_saved_LIBS"

  echo $ECHO_N "checking for /proc/uptime... $ECHO_C" 1>&6
echo "configure:9271: checking for /proc/uptime" 1>&5
if test "${jm_cv_have_proc_uptime+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  jm_cv_have_proc_uptime=no
    test -f /proc/uptime \
      && test $ac_cv_prog_cc_cross = no \
      && cat < /proc/uptime >/dev/null 2>/dev/null \
      && jm_cv_have_proc_uptime=yes
fi
echo "$ECHO_T""$jm_cv_have_proc_uptime" 1>&6
  if test $jm_cv_have_proc_uptime = yes; then
    cat >>confdefs.h <<\EOF
#define HAVE_PROC_UPTIME 1
EOF

  fi

  for ac_func in ftruncate
do
ac_ac_var=`echo "ac_cv_func_$ac_func" | $ac_tr_sh`
echo $ECHO_N "checking for $ac_func... $ECHO_C" 1>&6
echo "configure:9291: checking for $ac_func" 1>&5
if eval "test \"\${$ac_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 9296 "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.  */
#ifdef __cplusplus
extern "C"
#endif
/* 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();
char (*f)();

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
f = $ac_func;
#endif

  ;
  return 0;
}
EOF
if { (eval echo configure:9324: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  eval "$ac_ac_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$ac_ac_var=no"
fi
rm -f conftest*
fi
echo "$ECHO_T""`eval echo '${'$ac_ac_var'}'`" 1>&6
if test `eval echo '${'$ac_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $ac_tr_cpp` 1
EOF

else
  ftruncate_missing=yes
fi
done

  if test "$ftruncate_missing" = yes; then
    for ac_header in unistd.h
do
ac_ac_Header=`echo "ac_cv_header_$ac_header" | $ac_tr_sh`
echo $ECHO_N "checking for $ac_header... $ECHO_C" 1>&6
echo "configure:9347: checking for $ac_header" 1>&5
if eval "test \"\${$ac_ac_Header+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else

cat >conftest.$ac_ext <<EOF
#line 9352 "configure"
#include "confdefs.h"
#include <$ac_header>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:9357: \"$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
  eval "$ac_ac_Header=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$ac_ac_Header=no"
fi
rm -f conftest*
fi
echo "$ECHO_T""`eval echo '${'$ac_ac_Header'}'`" 1>&6
if test `eval echo '${'$ac_ac_Header'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_header" | $ac_tr_cpp` 1
EOF

fi
done

    echo $ECHO_N "checking fcntl emulation of ftruncate... $ECHO_C" 1>&6
echo "configure:9377: checking fcntl emulation of ftruncate" 1>&5
    if test "${fu_cv_sys_ftruncate_emulation+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 9382 "configure"
#include "confdefs.h"

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

#if !defined(F_CHSIZE) && !defined(F_FREESP)
  chsize();
#endif

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

    echo "$ECHO_T""$fu_cv_sys_ftruncate_emulation" 1>&6
    if test $fu_cv_sys_ftruncate_emulation = yes; then
      LIBOBJS="$LIBOBJS ftruncate.$ac_objext"
    fi
  fi

echo $ECHO_N "checking whether closedir returns void... $ECHO_C" 1>&6
echo "configure:9411: checking whether closedir returns void" 1>&5
if test "${ac_cv_func_closedir_void+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_func_closedir_void=yes
else
  cat >conftest.$ac_ext <<EOF
#line 9419 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <$ac_header_dirent>

int closedir ();
int
main ()
{
  exit (closedir (opendir (".")) != 0);
}
EOF
if { (eval echo configure:9430: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } &&
   test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null; then
  ac_cv_func_closedir_void=no
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_func_closedir_void=yes
fi
rm -f conftest*
fi

fi
echo "$ECHO_T""$ac_cv_func_closedir_void" 1>&6
if test $ac_cv_func_closedir_void = yes; then
  cat >>confdefs.h <<\EOF
#define CLOSEDIR_VOID 1
EOF

fi

  for ac_header in utime.h
do
ac_ac_Header=`echo "ac_cv_header_$ac_header" | $ac_tr_sh`
echo $ECHO_N "checking for $ac_header... $ECHO_C" 1>&6
echo "configure:9451: checking for $ac_header" 1>&5
if eval "test \"\${$ac_ac_Header+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else

cat >conftest.$ac_ext <<EOF
#line 9456 "configure"
#include "confdefs.h"
#include <$ac_header>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:9461: \"$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
  eval "$ac_ac_Header=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$ac_ac_Header=no"
fi
rm -f conftest*
fi
echo "$ECHO_T""`eval echo '${'$ac_ac_Header'}'`" 1>&6
if test `eval echo '${'$ac_ac_Header'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_header" | $ac_tr_cpp` 1
EOF

fi
done

  if test $ac_cv_func_utime_null = no; then
    echo $ECHO_N "checking whether utimes accepts a null argument... $ECHO_C" 1>&6
echo "configure:9482: checking whether utimes accepts a null argument" 1>&5
if test "${ac_cv_func_utimes_null+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  rm -f conftestdata; > conftestdata
if test "$cross_compiling" = yes; then
  ac_cv_func_utimes_null=no
else
  cat >conftest.$ac_ext <<EOF
#line 9491 "configure"
#include "confdefs.h"

/* In case stat has been defined to rpl_stat, undef it here.  */
#undef stat
#include <sys/types.h>
#include <sys/stat.h>
main() {
struct stat s, t;
exit(!(stat ("conftestdata", &s) == 0 && utimes("conftestdata", (long *)0) == 0
&& stat("conftestdata", &t) == 0 && t.st_mtime >= s.st_mtime
&& t.st_mtime - s.st_mtime < 120));
}
EOF
if { (eval echo configure:9504: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } &&
   test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null; then
  ac_cv_func_utimes_null=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_func_utimes_null=no
fi
rm -f conftest*
fi

rm -f core core.* *.core
fi
echo "$ECHO_T""$ac_cv_func_utimes_null" 1>&6

    if test $ac_cv_func_utimes_null = yes; then
      cat >>confdefs.h <<EOF
#define HAVE_UTIMES_NULL 1
EOF

    fi

    for ac_func in utime
do
ac_ac_var=`echo "ac_cv_func_$ac_func" | $ac_tr_sh`
echo $ECHO_N "checking for $ac_func... $ECHO_C" 1>&6
echo "configure:9526: checking for $ac_func" 1>&5
if eval "test \"\${$ac_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 9531 "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.  */
#ifdef __cplusplus
extern "C"
#endif
/* 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();
char (*f)();

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
f = $ac_func;
#endif

  ;
  return 0;
}
EOF
if { (eval echo configure:9559: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  eval "$ac_ac_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$ac_ac_var=no"
fi
rm -f conftest*
fi
echo "$ECHO_T""`eval echo '${'$ac_ac_var'}'`" 1>&6
if test `eval echo '${'$ac_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $ac_tr_cpp` 1
EOF

else
  LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
fi
done

  fi

  GNU_PACKAGE="GNU $PACKAGE"
  cat >>confdefs.h <<EOF
#define GNU_PACKAGE "$GNU_PACKAGE"
EOF

  for ac_header in \
    errno.h  \
    fcntl.h \
    fenv.h \
    float.h \
    limits.h \
    memory.h \
    mntent.h \
    mnttab.h \
    netdb.h \
    paths.h \
    stdlib.h \
    stddef.h \
    string.h \
    sys/acl.h \
    sys/filsys.h \
    sys/fs/s5param.h \
    sys/fs_types.h \
    sys/fstyp.h \
    sys/ioctl.h \
    sys/mntent.h \
    sys/mount.h \
    sys/param.h \
    sys/socket.h \
    sys/statfs.h \
    sys/statvfs.h \
    sys/systeminfo.h \
    sys/time.h \
    sys/timeb.h \
    sys/vfs.h \
    sys/wait.h \
    syslog.h \
    termios.h \
    unistd.h \
    utime.h \
    values.h \

do
ac_ac_Header=`echo "ac_cv_header_$ac_header" | $ac_tr_sh`
echo $ECHO_N "checking for $ac_header... $ECHO_C" 1>&6
echo "configure:9621: checking for $ac_header" 1>&5
if eval "test \"\${$ac_ac_Header+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else

cat >conftest.$ac_ext <<EOF
#line 9626 "configure"
#include "confdefs.h"
#include <$ac_header>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:9631: \"$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
  eval "$ac_ac_Header=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$ac_ac_Header=no"
fi
rm -f conftest*
fi
echo "$ECHO_T""`eval echo '${'$ac_ac_Header'}'`" 1>&6
if test `eval echo '${'$ac_ac_Header'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_header" | $ac_tr_cpp` 1
EOF

fi
done

    # Assume we'll default to using the included regex.c.
    ac_use_included_regex=yes

    # However, if the system regex support is good enough that it passes the
    # the following run test, then default to *not* using the included regex.c.
    # If cross compiling, assume the test would fail and use the included
    # regex.c.  The first failing regular expression is from `Spencer ere
    # test #75' in grep-2.3.
    echo $ECHO_N "checking for working re_compile_pattern... $ECHO_C" 1>&6
echo "configure:9658: checking for working re_compile_pattern" 1>&5
if test "${jm_cv_func_working_re_compile_pattern+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  if test "$cross_compiling" = yes; then
  	       jm_cv_func_working_re_compile_pattern=no
else
  cat >conftest.$ac_ext <<EOF
#line 9666 "configure"
#include "confdefs.h"
#include <stdio.h>
#include <regex.h>
	  int
	  main ()
	  {
	    static struct re_pattern_buffer regex;
	    const char *s;
	    re_set_syntax (RE_SYNTAX_POSIX_EGREP);
	    /* Add this third left square bracket, , to balance the
	       three right ones below.  Otherwise autoconf-2.14 chokes.  */
	    s = re_compile_pattern ("a[[:]:]b\n", 9, &regex);
	    /* This should fail with _Invalid character class name_ error.  */
	    if (!s)
	      exit (1);

	    /* This should succeed, but doesn't for e.g. glibc-2.1.3.  */
	    s = re_compile_pattern ("{1", 2, &regex);

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

fi
echo "$ECHO_T""$jm_cv_func_working_re_compile_pattern" 1>&6
    if test $jm_cv_func_working_re_compile_pattern = yes; then
      ac_use_included_regex=no
    fi

    test -n "lib/regex.c" || { echo "configure: error: missing argument" 1>&2; exit 1; }

	# Check whether --with-included-regex or --without-included-regex was given.
if test "${with_included_regex+set}" = set; then
  withval="$with_included_regex"
  jm_with_regex=$withval
else
  jm_with_regex=$ac_use_included_regex
fi
	if test "$jm_with_regex" = yes; then
	
	  LIBOBJS="$LIBOBJS regex.$ac_objext"
	fi

  test -n "$GETGROUPS_LIB" && LIBS="$GETGROUPS_LIB $LIBS"

  for ac_func in strcasecmp strncasecmp
do
ac_ac_var=`echo "ac_cv_func_$ac_func" | $ac_tr_sh`
echo $ECHO_N "checking for $ac_func... $ECHO_C" 1>&6
echo "configure:9720: checking for $ac_func" 1>&5
if eval "test \"\${$ac_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 9725 "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.  */
#ifdef __cplusplus
extern "C"
#endif
/* 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();
char (*f)();

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
f = $ac_func;
#endif

  ;
  return 0;
}
EOF
if { (eval echo configure:9753: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  eval "$ac_ac_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$ac_ac_var=no"
fi
rm -f conftest*
fi
echo "$ECHO_T""`eval echo '${'$ac_ac_var'}'`" 1>&6
if test `eval echo '${'$ac_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $ac_tr_cpp` 1
EOF

else
  LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
fi
done

  for ac_func in dup2
do
ac_ac_var=`echo "ac_cv_func_$ac_func" | $ac_tr_sh`
echo $ECHO_N "checking for $ac_func... $ECHO_C" 1>&6
echo "configure:9775: checking for $ac_func" 1>&5
if eval "test \"\${$ac_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 9780 "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.  */
#ifdef __cplusplus
extern "C"
#endif
/* 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();
char (*f)();

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
f = $ac_func;
#endif

  ;
  return 0;
}
EOF
if { (eval echo configure:9808: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  eval "$ac_ac_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$ac_ac_var=no"
fi
rm -f conftest*
fi
echo "$ECHO_T""`eval echo '${'$ac_ac_var'}'`" 1>&6
if test `eval echo '${'$ac_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $ac_tr_cpp` 1
EOF

else
  LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
fi
done

  for ac_func in gethostname getusershell
do
ac_ac_var=`echo "ac_cv_func_$ac_func" | $ac_tr_sh`
echo $ECHO_N "checking for $ac_func... $ECHO_C" 1>&6
echo "configure:9830: checking for $ac_func" 1>&5
if eval "test \"\${$ac_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 9835 "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.  */
#ifdef __cplusplus
extern "C"
#endif
/* 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();
char (*f)();

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
f = $ac_func;
#endif

  ;
  return 0;
}
EOF
if { (eval echo configure:9863: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  eval "$ac_ac_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$ac_ac_var=no"
fi
rm -f conftest*
fi
echo "$ECHO_T""`eval echo '${'$ac_ac_var'}'`" 1>&6
if test `eval echo '${'$ac_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $ac_tr_cpp` 1
EOF

else
  LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
fi
done

  for ac_func in stime strcspn stpcpy strstr strtol strtoul
do
ac_ac_var=`echo "ac_cv_func_$ac_func" | $ac_tr_sh`
echo $ECHO_N "checking for $ac_func... $ECHO_C" 1>&6
echo "configure:9885: checking for $ac_func" 1>&5
if eval "test \"\${$ac_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 9890 "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.  */
#ifdef __cplusplus
extern "C"
#endif
/* 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();
char (*f)();

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
f = $ac_func;
#endif

  ;
  return 0;
}
EOF
if { (eval echo configure:9918: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  eval "$ac_ac_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$ac_ac_var=no"
fi
rm -f conftest*
fi
echo "$ECHO_T""`eval echo '${'$ac_ac_var'}'`" 1>&6
if test `eval echo '${'$ac_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $ac_tr_cpp` 1
EOF

else
  LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
fi
done

  for ac_func in strpbrk
do
ac_ac_var=`echo "ac_cv_func_$ac_func" | $ac_tr_sh`
echo $ECHO_N "checking for $ac_func... $ECHO_C" 1>&6
echo "configure:9940: checking for $ac_func" 1>&5
if eval "test \"\${$ac_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 9945 "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.  */
#ifdef __cplusplus
extern "C"
#endif
/* 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();
char (*f)();

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
f = $ac_func;
#endif

  ;
  return 0;
}
EOF
if { (eval echo configure:9973: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  eval "$ac_ac_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$ac_ac_var=no"
fi
rm -f conftest*
fi
echo "$ECHO_T""`eval echo '${'$ac_ac_var'}'`" 1>&6
if test `eval echo '${'$ac_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $ac_tr_cpp` 1
EOF

else
  LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
fi
done

  for ac_func in euidaccess memcmp mkdir rmdir rpmatch strndup strverscmp
do
ac_ac_var=`echo "ac_cv_func_$ac_func" | $ac_tr_sh`
echo $ECHO_N "checking for $ac_func... $ECHO_C" 1>&6
echo "configure:9995: checking for $ac_func" 1>&5
if eval "test \"\${$ac_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 10000 "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.  */
#ifdef __cplusplus
extern "C"
#endif
/* 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();
char (*f)();

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
f = $ac_func;
#endif

  ;
  return 0;
}
EOF
if { (eval echo configure:10028: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  eval "$ac_ac_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$ac_ac_var=no"
fi
rm -f conftest*
fi
echo "$ECHO_T""`eval echo '${'$ac_ac_var'}'`" 1>&6
if test `eval echo '${'$ac_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $ac_tr_cpp` 1
EOF

else
  LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
fi
done

    for ac_func in strdup
do
ac_ac_var=`echo "ac_cv_func_$ac_func" | $ac_tr_sh`
echo $ECHO_N "checking for $ac_func... $ECHO_C" 1>&6
echo "configure:10050: checking for $ac_func" 1>&5
if eval "test \"\${$ac_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 10055 "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.  */
#ifdef __cplusplus
extern "C"
#endif
/* 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();
char (*f)();

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
f = $ac_func;
#endif

  ;
  return 0;
}
EOF
if { (eval echo configure:10083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  eval "$ac_ac_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$ac_ac_var=no"
fi
rm -f conftest*
fi
echo "$ECHO_T""`eval echo '${'$ac_ac_var'}'`" 1>&6
if test `eval echo '${'$ac_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $ac_tr_cpp` 1
EOF

else
  LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
fi
done

  for ac_func in memchr memmove memcpy memset
do
ac_ac_var=`echo "ac_cv_func_$ac_func" | $ac_tr_sh`
echo $ECHO_N "checking for $ac_func... $ECHO_C" 1>&6
echo "configure:10105: checking for $ac_func" 1>&5
if eval "test \"\${$ac_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 10110 "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.  */
#ifdef __cplusplus
extern "C"
#endif
/* 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();
char (*f)();

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
f = $ac_func;
#endif

  ;
  return 0;
}
EOF
if { (eval echo configure:10138: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  eval "$ac_ac_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$ac_ac_var=no"
fi
rm -f conftest*
fi
echo "$ECHO_T""`eval echo '${'$ac_ac_var'}'`" 1>&6
if test `eval echo '${'$ac_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $ac_tr_cpp` 1
EOF

else
  LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
fi
done

  for ac_func in getpagesize
do
ac_ac_var=`echo "ac_cv_func_$ac_func" | $ac_tr_sh`
echo $ECHO_N "checking for $ac_func... $ECHO_C" 1>&6
echo "configure:10160: checking for $ac_func" 1>&5
if eval "test \"\${$ac_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 10165 "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.  */
#ifdef __cplusplus
extern "C"
#endif
/* 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();
char (*f)();

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
f = $ac_func;
#endif

  ;
  return 0;
}
EOF
if { (eval echo configure:10193: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  eval "$ac_ac_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$ac_ac_var=no"
fi
rm -f conftest*
fi
echo "$ECHO_T""`eval echo '${'$ac_ac_var'}'`" 1>&6
if test `eval echo '${'$ac_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $ac_tr_cpp` 1
EOF

fi
done

  # By default, argmatch should fail calling usage (1).
  cat >>confdefs.h <<\EOF
#define ARGMATCH_DIE usage (1)
EOF

  cat >>confdefs.h <<\EOF
#define ARGMATCH_DIE_DECL extern void usage ()
EOF

        echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" 1>&6
echo "configure:10217: checking whether setvbuf arguments are reversed" 1>&5
if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  if test "$cross_compiling" = yes; then
    { echo "configure: error: cannot run test program while cross compiling" 1>&2; exit 1; }
else
  cat >conftest.$ac_ext <<EOF
#line 10225 "configure"
#include "confdefs.h"
#include <stdio.h>
/* If setvbuf has the reversed format, exit 0. */
int
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:10241: \"$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
  ac_cv_func_setvbuf_reversed=no
fi
rm -f conftest*
fi

rm -f core core.* *.core
fi
echo "$ECHO_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

  # used by sleep and shred
  # Solaris 2.5.1 needs -lposix4 to get the clock_gettime function.
  # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.

  echo $ECHO_N "checking for library containing clock_gettime... $ECHO_C" 1>&6
echo "configure:10263: checking for library containing clock_gettime" 1>&5
if test "${ac_cv_search_clock_gettime+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else

    ac_func_search_save_LIBS="$LIBS"
    ac_cv_search_clock_gettime="no"
    cat >conftest.$ac_ext <<EOF
#line 10270 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char clock_gettime ();
int
main ()
{
clock_gettime ();
  ;
  return 0;
}
EOF
if { (eval echo configure:10287: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  ac_cv_search_clock_gettime="none required"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
fi
rm -f conftest*
    if test "$ac_cv_search_clock_gettime" = "no"; then
      for ac_lib in rt posix4; do
	LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
	cat >conftest.$ac_ext <<EOF
#line 10298 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char clock_gettime ();
int
main ()
{
clock_gettime ();
  ;
  return 0;
}
EOF
if { (eval echo configure:10315: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  ac_cv_search_clock_gettime="-l$ac_lib"
	  break
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
fi
rm -f conftest*
      done
    fi
    LIBS="$ac_func_search_save_LIBS"

fi
echo "$ECHO_T""$ac_cv_search_clock_gettime" 1>&6

  if test "$ac_cv_search_clock_gettime" = "no"; then :

  else
    if test "$ac_cv_search_clock_gettime" = "none required"; then :

    else
      LIBS="$ac_cv_search_clock_gettime $LIBS"

    fi
  fi

  for ac_func in clock_gettime
do
ac_ac_var=`echo "ac_cv_func_$ac_func" | $ac_tr_sh`
echo $ECHO_N "checking for $ac_func... $ECHO_C" 1>&6
echo "configure:10339: checking for $ac_func" 1>&5
if eval "test \"\${$ac_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 10344 "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.  */
#ifdef __cplusplus
extern "C"
#endif
/* 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();
char (*f)();

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
f = $ac_func;
#endif

  ;
  return 0;
}
EOF
if { (eval echo configure:10372: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  eval "$ac_ac_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$ac_ac_var=no"
fi
rm -f conftest*
fi
echo "$ECHO_T""`eval echo '${'$ac_ac_var'}'`" 1>&6
if test `eval echo '${'$ac_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $ac_tr_cpp` 1
EOF

fi
done

  for ac_func in gettimeofday
do
ac_ac_var=`echo "ac_cv_func_$ac_func" | $ac_tr_sh`
echo $ECHO_N "checking for $ac_func... $ECHO_C" 1>&6
echo "configure:10392: checking for $ac_func" 1>&5
if eval "test \"\${$ac_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 10397 "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.  */
#ifdef __cplusplus
extern "C"
#endif
/* 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();
char (*f)();

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
f = $ac_func;
#endif

  ;
  return 0;
}
EOF
if { (eval echo configure:10425: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  eval "$ac_ac_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$ac_ac_var=no"
fi
rm -f conftest*
fi
echo "$ECHO_T""`eval echo '${'$ac_ac_var'}'`" 1>&6
if test `eval echo '${'$ac_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $ac_tr_cpp` 1
EOF

fi
done

  for ac_func in \
    acl \
    bcopy \
    endgrent \
    endpwent \
    fchdir \
    fdatasync \
    fseeko \
    ftime \
    ftruncate \
    getcwd \
    gethrtime \
    getmntinfo \
    hasmntopt \
    isascii \
    lchown \
    listmntent \
    localeconv \
    memcpy \
    mempcpy \
    mkfifo \
    realpath \
    resolvepath \
    sethostname \
    strchr \
    strerror \
    strrchr \
    sysinfo \
    tzset \

do
ac_ac_var=`echo "ac_cv_func_$ac_func" | $ac_tr_sh`
echo $ECHO_N "checking for $ac_func... $ECHO_C" 1>&6
echo "configure:10473: checking for $ac_func" 1>&5
if eval "test \"\${$ac_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 10478 "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.  */
#ifdef __cplusplus
extern "C"
#endif
/* 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();
char (*f)();

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
f = $ac_func;
#endif

  ;
  return 0;
}
EOF
if { (eval echo configure:10506: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  eval "$ac_ac_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$ac_ac_var=no"
fi
rm -f conftest*
fi
echo "$ECHO_T""`eval echo '${'$ac_ac_var'}'`" 1>&6
if test `eval echo '${'$ac_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $ac_tr_cpp` 1
EOF

fi
done

    am_getline_needs_run_time_check=no
  echo $ECHO_N "checking for getline... $ECHO_C" 1>&6
echo "configure:10524: checking for getline" 1>&5
if test "${ac_cv_func_getline+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 10529 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char getline(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char getline();
char (*f)();

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_getline) || defined (__stub___getline)
choke me
#else
f = getline;
#endif

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

  if test $am_getline_needs_run_time_check = yes; then
    for ac_header in string.h
do
ac_ac_Header=`echo "ac_cv_header_$ac_header" | $ac_tr_sh`
echo $ECHO_N "checking for $ac_header... $ECHO_C" 1>&6
echo "configure:10577: checking for $ac_header" 1>&5
if eval "test \"\${$ac_ac_Header+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else

cat >conftest.$ac_ext <<EOF
#line 10582 "configure"
#include "confdefs.h"
#include <$ac_header>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:10587: \"$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
  eval "$ac_ac_Header=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$ac_ac_Header=no"
fi
rm -f conftest*
fi
echo "$ECHO_T""`eval echo '${'$ac_ac_Header'}'`" 1>&6
if test `eval echo '${'$ac_ac_Header'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_header" | $ac_tr_cpp` 1
EOF

fi
done

    echo $ECHO_N "checking for working getline function... $ECHO_C" 1>&6
echo "configure:10607: checking for working getline function" 1>&5
if test "${am_cv_func_working_getline+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  echo fooN |tr -d '\012'|tr N '\012' > conftest.data
    if test "$cross_compiling" = yes; then
  am_cv_func_working_getline=no
else
  cat >conftest.$ac_ext <<EOF
#line 10616 "configure"
#include "confdefs.h"

#    include <stdio.h>
#    include <sys/types.h>
#    if HAVE_STRING_H
#     include <string.h>
#    endif
    int main ()
    { /* Based on a test program from Karl Heuer.  */
      char *line = NULL;
      size_t siz = 0;
      int len;
      FILE *in = fopen ("./conftest.data", "r");
      if (!in)
	return 1;
      len = getline (&line, &siz, in);
      exit ((len == 4 && line && strcmp (line, "foo\n") == 0) ? 0 : 1);
    }

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

fi
echo "$ECHO_T""$am_cv_func_working_getline" 1>&6
  fi

  if test $am_cv_func_working_getline = no; then
    LIBOBJS="$LIBOBJS getline.$ac_objext"
      fi

  if test $am_cv_func_working_getline != yes; then
    for ac_func in getdelim
do
ac_ac_var=`echo "ac_cv_func_$ac_func" | $ac_tr_sh`
echo $ECHO_N "checking for $ac_func... $ECHO_C" 1>&6
echo "configure:10656: checking for $ac_func" 1>&5
if eval "test \"\${$ac_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 10661 "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.  */
#ifdef __cplusplus
extern "C"
#endif
/* 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();
char (*f)();

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
f = $ac_func;
#endif

  ;
  return 0;
}
EOF
if { (eval echo configure:10689: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  eval "$ac_ac_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$ac_ac_var=no"
fi
rm -f conftest*
fi
echo "$ECHO_T""`eval echo '${'$ac_ac_var'}'`" 1>&6
if test `eval echo '${'$ac_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $ac_tr_cpp` 1
EOF

fi
done

  fi
  echo $ECHO_N "checking for obstacks... $ECHO_C" 1>&6
echo "configure:10707: checking for obstacks" 1>&5
if test "${am_cv_func_obstack+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 10712 "configure"
#include "confdefs.h"
#include "obstack.h"
int
main ()
{
struct obstack *mem;obstack_free(mem,(char *) 0)
  ;
  return 0;
}
EOF
if { (eval echo configure:10723: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  am_cv_func_obstack=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  am_cv_func_obstack=no
fi
rm -f conftest*
fi
echo "$ECHO_T""$am_cv_func_obstack" 1>&6
 if test $am_cv_func_obstack = yes; then
   cat >>confdefs.h <<\EOF
#define HAVE_OBSTACK 1
EOF

 else
   LIBOBJS="$LIBOBJS obstack.$ac_objext"
 fi

  echo $ECHO_N "checking for working strtod... $ECHO_C" 1>&6
echo "configure:10741: checking for working strtod" 1>&5
if test "${am_cv_func_strtod+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  if test "$cross_compiling" = yes; then
  am_cv_func_strtod=no
else
  cat >conftest.$ac_ext <<EOF
#line 10749 "configure"
#include "confdefs.h"

double strtod ();
int
main()
{
  {
    /* Some versions of Linux strtod mis-parse strings with leading '+'.  */
    char *string = " +69";
    char *term;
    double value;
    value = strtod (string, &term);
    if (value != 69 || term != (string + 4))
      exit (1);
  }

  {
    /* Under Solaris 2.4, strtod returns the wrong value for the
       terminating character under some conditions.  */
    char *string = "NaN";
    char *term;
    strtod (string, &term);
    if (term != string && *(term - 1) == 0)
      exit (1);
  }
  exit (0);
}

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

fi
echo "$ECHO_T""$am_cv_func_strtod" 1>&6
test $am_cv_func_strtod = no && LIBOBJS="$LIBOBJS strtod.$ac_objext"
am_cv_func_strtod_needs_libm=no
if test $am_cv_func_strtod = no; then
  for ac_func in pow
do
ac_ac_var=`echo "ac_cv_func_$ac_func" | $ac_tr_sh`
echo $ECHO_N "checking for $ac_func... $ECHO_C" 1>&6
echo "configure:10795: checking for $ac_func" 1>&5
if eval "test \"\${$ac_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 10800 "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.  */
#ifdef __cplusplus
extern "C"
#endif
/* 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();
char (*f)();

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
f = $ac_func;
#endif

  ;
  return 0;
}
EOF
if { (eval echo configure:10828: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  eval "$ac_ac_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$ac_ac_var=no"
fi
rm -f conftest*
fi
echo "$ECHO_T""`eval echo '${'$ac_ac_var'}'`" 1>&6
if test `eval echo '${'$ac_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $ac_tr_cpp` 1
EOF

fi
done

  if test $ac_cv_func_pow = no; then
    echo $ECHO_N "checking for pow in -lm... $ECHO_C" 1>&6
echo "configure:10846: checking for pow in -lm" 1>&5
if test "${ac_cv_lib_m_pow+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lm  $LIBS"
cat >conftest.$ac_ext <<EOF
#line 10853 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char pow ();
int
main ()
{
pow ();
  ;
  return 0;
}
EOF
if { (eval echo configure:10870: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  ac_cv_lib_m_pow=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_lib_m_pow=no
fi
rm -f conftest*
LIBS="$ac_save_LIBS"
fi
echo "$ECHO_T""$ac_cv_lib_m_pow" 1>&6
if test $ac_cv_lib_m_pow = yes; then
  am_cv_func_strtod_needs_libm=yes
else
  echo "configure: warning: can't find library containing definition of pow" 1>&2
fi

  fi
fi

  test $am_cv_func_strtod_needs_libm = yes && POW_LIBM=-lm

  echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" 1>&6
echo "configure:10890: checking for nl_langinfo and CODESET" 1>&5
if test "${jm_cv_langinfo_codeset+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 10895 "configure"
#include "confdefs.h"
#include <langinfo.h>
int
main ()
{
char* cs = nl_langinfo(CODESET);
  ;
  return 0;
}
EOF
if { (eval echo configure:10906: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  jm_cv_langinfo_codeset=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  jm_cv_langinfo_codeset=no
fi
rm -f conftest*

fi
echo "$ECHO_T""$jm_cv_langinfo_codeset" 1>&6
  if test $jm_cv_langinfo_codeset = yes; then
    cat >>confdefs.h <<\EOF
#define HAVE_LANGINFO_CODESET 1
EOF

  fi

      echo $ECHO_N "checking for iconv... $ECHO_C" 1>&6
echo "configure:10922: checking for iconv" 1>&5
if test "${jm_cv_func_iconv+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else

    jm_cv_func_iconv="no, consider installing libiconv"
    jm_cv_lib_iconv=no
    cat >conftest.$ac_ext <<EOF
#line 10929 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <iconv.h>
int
main ()
{
iconv_t cd = iconv_open("","");
       iconv(cd,NULL,NULL,NULL,NULL);
       iconv_close(cd);
  ;
  return 0;
}
EOF
if { (eval echo configure:10943: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  jm_cv_func_iconv=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
fi
rm -f conftest*
    if test "$jm_cv_func_iconv" != yes; then
      jm_save_LIBS="$LIBS"
      LIBS="$LIBS -liconv"
      cat >conftest.$ac_ext <<EOF
#line 10954 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <iconv.h>
int
main ()
{
iconv_t cd = iconv_open("","");
         iconv(cd,NULL,NULL,NULL,NULL);
         iconv_close(cd);
  ;
  return 0;
}
EOF
if { (eval echo configure:10968: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  jm_cv_lib_iconv=yes
        jm_cv_func_iconv=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
fi
rm -f conftest*
      LIBS="$jm_save_LIBS"
    fi

fi
echo "$ECHO_T""$jm_cv_func_iconv" 1>&6
  if test "$jm_cv_func_iconv" = yes; then
    cat >>confdefs.h <<\EOF
#define HAVE_ICONV 1
EOF

  fi
  LIBICONV=
  if test "$jm_cv_lib_iconv" = yes; then
    LIBICONV="-liconv"
  fi

  # These tests are for df.

# Determine how to get the list of mounted filesystems.
ac_list_mounted_fs=

# If the getmntent function is available but not in the standard library,
# make sure LIBS contains -lsun (on Irix4) or -lseq (on PTX).
# getmntent is in -lsun on Irix 4, -lseq on Dynix/PTX, -lgen on Unixware.
echo $ECHO_N "checking for getmntent in -lsun... $ECHO_C" 1>&6
echo "configure:10996: checking for getmntent in -lsun" 1>&5
if test "${ac_cv_lib_sun_getmntent+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lsun  $LIBS"
cat >conftest.$ac_ext <<EOF
#line 11003 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char getmntent ();
int
main ()
{
getmntent ();
  ;
  return 0;
}
EOF
if { (eval echo configure:11020: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  ac_cv_lib_sun_getmntent=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_lib_sun_getmntent=no
fi
rm -f conftest*
LIBS="$ac_save_LIBS"
fi
echo "$ECHO_T""$ac_cv_lib_sun_getmntent" 1>&6
if test $ac_cv_lib_sun_getmntent = yes; then
  LIBS="-lsun $LIBS"
else
  echo $ECHO_N "checking for getmntent in -lseq... $ECHO_C" 1>&6
echo "configure:11035: checking for getmntent in -lseq" 1>&5
if test "${ac_cv_lib_seq_getmntent+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lseq  $LIBS"
cat >conftest.$ac_ext <<EOF
#line 11042 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char getmntent ();
int
main ()
{
getmntent ();
  ;
  return 0;
}
EOF
if { (eval echo configure:11059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  ac_cv_lib_seq_getmntent=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_lib_seq_getmntent=no
fi
rm -f conftest*
LIBS="$ac_save_LIBS"
fi
echo "$ECHO_T""$ac_cv_lib_seq_getmntent" 1>&6
if test $ac_cv_lib_seq_getmntent = yes; then
  LIBS="-lseq $LIBS"
else
  echo $ECHO_N "checking for getmntent in -lgen... $ECHO_C" 1>&6
echo "configure:11074: checking for getmntent in -lgen" 1>&5
if test "${ac_cv_lib_gen_getmntent+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lgen  $LIBS"
cat >conftest.$ac_ext <<EOF
#line 11081 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char getmntent ();
int
main ()
{
getmntent ();
  ;
  return 0;
}
EOF
if { (eval echo configure:11098: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  ac_cv_lib_gen_getmntent=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_lib_gen_getmntent=no
fi
rm -f conftest*
LIBS="$ac_save_LIBS"
fi
echo "$ECHO_T""$ac_cv_lib_gen_getmntent" 1>&6
if test $ac_cv_lib_gen_getmntent = yes; then
  LIBS="-lgen $LIBS"
fi

fi

fi

echo $ECHO_N "checking for getmntent... $ECHO_C" 1>&6
echo "configure:11115: checking for getmntent" 1>&5
if test "${ac_cv_func_getmntent+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 11120 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char getmntent(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char getmntent();
char (*f)();

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_getmntent) || defined (__stub___getmntent)
choke me
#else
f = getmntent;
#endif

  ;
  return 0;
}
EOF
if { (eval echo configure:11148: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  ac_cv_func_getmntent=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_func_getmntent=no
fi
rm -f conftest*
fi
echo "$ECHO_T""$ac_cv_func_getmntent" 1>&6
if test $ac_cv_func_getmntent = yes; then
  cat >>confdefs.h <<\EOF
#define HAVE_GETMNTENT 1
EOF

fi

# This test must precede the ones for getmntent because Unicos-9 is
# reported to have the getmntent function, but its support is incompatible
# with other getmntent implementations.

# NOTE: Normally, I wouldn't use a check for system type as I've done for
# `CRAY' below since that goes against the whole autoconf philosophy.  But
# I think there is too great a chance that some non-Cray system has a
# function named listmntent to risk the false positive.

if test -z "$ac_list_mounted_fs"; then
  # Cray UNICOS 9
  echo $ECHO_N "checking for listmntent of Cray/Unicos-9... $ECHO_C" 1>&6
echo "configure:11173: checking for listmntent of Cray/Unicos-9" 1>&5
  if test "${fu_cv_sys_mounted_cray_listmntent+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  fu_cv_sys_mounted_cray_listmntent=no

cat >conftest.$ac_ext <<EOF
#line 11179 "configure"
#include "confdefs.h"
#ifdef _CRAY
yes
#endif

EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "yes" >/dev/null 2>&1; then
  test $ac_cv_func_listmntent = yes \
	    && fu_cv_sys_mounted_cray_listmntent=yes

fi
rm -f conftest*

fi

  echo "$ECHO_T""$fu_cv_sys_mounted_cray_listmntent" 1>&6
  if test $fu_cv_sys_mounted_cray_listmntent = yes; then
    ac_list_mounted_fs=found
    cat >>confdefs.h <<\EOF
#define MOUNTED_LISTMNTENT 1
EOF

  fi
fi

if test $ac_cv_func_getmntent = yes; then

  # This system has the getmntent function.
  # Determine whether it's the one-argument variant or the two-argument one.

  if test -z "$ac_list_mounted_fs"; then
    # 4.3BSD, SunOS, HP-UX, Dynix, Irix
    echo $ECHO_N "checking for one-argument getmntent function... $ECHO_C" 1>&6
echo "configure:11206: checking for one-argument getmntent function" 1>&5
    if test "${fu_cv_sys_mounted_getmntent1+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  test $ac_cv_header_mntent_h = yes \
		   && fu_cv_sys_mounted_getmntent1=yes \
		   || fu_cv_sys_mounted_getmntent1=no
fi

    echo "$ECHO_T""$fu_cv_sys_mounted_getmntent1" 1>&6
    if test $fu_cv_sys_mounted_getmntent1 = yes; then
      ac_list_mounted_fs=found
      cat >>confdefs.h <<\EOF
#define MOUNTED_GETMNTENT1 1
EOF

    fi
  fi

  if test -z "$ac_list_mounted_fs"; then
    # SVR4
    echo $ECHO_N "checking for two-argument getmntent function... $ECHO_C" 1>&6
echo "configure:11225: checking for two-argument getmntent function" 1>&5
    if test "${fu_cv_sys_mounted_getmntent2+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else

cat >conftest.$ac_ext <<EOF
#line 11230 "configure"
#include "confdefs.h"
#include <sys/mnttab.h>

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

fi

    echo "$ECHO_T""$fu_cv_sys_mounted_getmntent2" 1>&6
    if test $fu_cv_sys_mounted_getmntent2 = yes; then
      ac_list_mounted_fs=found
      cat >>confdefs.h <<\EOF
#define MOUNTED_GETMNTENT2 1
EOF

    fi
  fi

  if test -z "$ac_list_mounted_fs"; then
    { echo "configure: error: could not determine how to read list of mounted filesystems" 1>&2; exit 1; }
  fi

fi

if test -z "$ac_list_mounted_fs"; then
  # DEC Alpha running OSF/1.
  echo $ECHO_N "checking for getfsstat function... $ECHO_C" 1>&6
echo "configure:11257: checking for getfsstat function" 1>&5
  if test "${fu_cv_sys_mounted_getsstat+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 11262 "configure"
#include "confdefs.h"

#include <sys/types.h>
#include <sys/mount.h>
#include <sys/fs_types.h>
int
main ()
{
struct statfs *stats;
  int numsys = getfsstat ((struct statfs *)0, 0L, MNT_WAIT);
  ;
  return 0;
}
EOF
if { (eval echo configure:11276: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  fu_cv_sys_mounted_getsstat=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  fu_cv_sys_mounted_getsstat=no
fi
rm -f conftest*
fi

  echo "$ECHO_T""$fu_cv_sys_mounted_getsstat" 1>&6
  if test $fu_cv_sys_mounted_getsstat = yes; then
    ac_list_mounted_fs=found
    cat >>confdefs.h <<\EOF
#define MOUNTED_GETFSSTAT 1
EOF

  fi
fi

if test -z "$ac_list_mounted_fs"; then
  # AIX.
  echo $ECHO_N "checking for mntctl function and struct vmount... $ECHO_C" 1>&6
echo "configure:11296: checking for mntctl function and struct vmount" 1>&5
  if test "${fu_cv_sys_mounted_vmount+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else

cat >conftest.$ac_ext <<EOF
#line 11301 "configure"
#include "confdefs.h"
#include <fshelp.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:11306: \"$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
  fu_cv_sys_mounted_vmount=yes
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  fu_cv_sys_mounted_vmount=no
fi
rm -f conftest*
fi

  echo "$ECHO_T""$fu_cv_sys_mounted_vmount" 1>&6
  if test $fu_cv_sys_mounted_vmount = yes; then
    ac_list_mounted_fs=found
    cat >>confdefs.h <<\EOF
#define MOUNTED_VMOUNT 1
EOF

  fi
fi

if test -z "$ac_list_mounted_fs"; then
  # SVR3
  echo $ECHO_N "checking for FIXME existence of three headers... $ECHO_C" 1>&6
echo "configure:11329: checking for FIXME existence of three headers" 1>&5
  if test "${fu_cv_sys_mounted_fread_fstyp+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else

cat >conftest.$ac_ext <<EOF
#line 11334 "configure"
#include "confdefs.h"

#include <sys/statfs.h>
#include <sys/fstyp.h>
#include <mnttab.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:11341: \"$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
  fu_cv_sys_mounted_fread_fstyp=yes
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  fu_cv_sys_mounted_fread_fstyp=no
fi
rm -f conftest*
fi

  echo "$ECHO_T""$fu_cv_sys_mounted_fread_fstyp" 1>&6
  if test $fu_cv_sys_mounted_fread_fstyp = yes; then
    ac_list_mounted_fs=found
    cat >>confdefs.h <<\EOF
#define MOUNTED_FREAD_FSTYP 1
EOF

  fi
fi

if test -z "$ac_list_mounted_fs"; then
  # 4.4BSD and DEC OSF/1.
  echo $ECHO_N "checking for getmntinfo function... $ECHO_C" 1>&6
echo "configure:11364: checking for getmntinfo function" 1>&5
  if test "${fu_cv_sys_mounted_getmntinfo+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else

      ok=
      if test $ac_cv_func_getmntinfo = yes; then
	
cat >conftest.$ac_ext <<EOF
#line 11372 "configure"
#include "confdefs.h"
#include <sys/mount.h>

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

      fi
      test -n "$ok" \
	  && fu_cv_sys_mounted_getmntinfo=yes \
	  || fu_cv_sys_mounted_getmntinfo=no

fi

  echo "$ECHO_T""$fu_cv_sys_mounted_getmntinfo" 1>&6
  if test $fu_cv_sys_mounted_getmntinfo = yes; then
    ac_list_mounted_fs=found
    cat >>confdefs.h <<\EOF
#define MOUNTED_GETMNTINFO 1
EOF

  fi
fi

# FIXME: add a test for netbsd-1.1 here

if test -z "$ac_list_mounted_fs"; then
  # Ultrix
  echo $ECHO_N "checking for getmnt function... $ECHO_C" 1>&6
echo "configure:11398: checking for getmnt function" 1>&5
  if test "${fu_cv_sys_mounted_getmnt+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else

cat >conftest.$ac_ext <<EOF
#line 11403 "configure"
#include "confdefs.h"

#include <sys/fs_types.h>
#include <sys/mount.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:11409: \"$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
  fu_cv_sys_mounted_getmnt=yes
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  fu_cv_sys_mounted_getmnt=no
fi
rm -f conftest*
fi

  echo "$ECHO_T""$fu_cv_sys_mounted_getmnt" 1>&6
  if test $fu_cv_sys_mounted_getmnt = yes; then
    ac_list_mounted_fs=found
    cat >>confdefs.h <<\EOF
#define MOUNTED_GETMNT 1
EOF

  fi
fi

if test -z "$ac_list_mounted_fs"; then
  # SVR2
  echo $ECHO_N "checking whether it is possible to resort to fread on /etc/mnttab... $ECHO_C" 1>&6
echo "configure:11432: checking whether it is possible to resort to fread on /etc/mnttab" 1>&5
  if test "${fu_cv_sys_mounted_fread+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else

cat >conftest.$ac_ext <<EOF
#line 11437 "configure"
#include "confdefs.h"
#include <mnttab.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:11442: \"$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
  fu_cv_sys_mounted_fread=yes
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  fu_cv_sys_mounted_fread=no
fi
rm -f conftest*
fi

  echo "$ECHO_T""$fu_cv_sys_mounted_fread" 1>&6
  if test $fu_cv_sys_mounted_fread = yes; then
    ac_list_mounted_fs=found
    cat >>confdefs.h <<\EOF
#define MOUNTED_FREAD 1
EOF

  fi
fi

if test -z "$ac_list_mounted_fs"; then
  { echo "configure: error: could not determine how to read list of mounted filesystems" 1>&2; exit 1; }
  # FIXME -- no need to abort building the whole package
  # Can't build mountlist.c or anything that needs its functions
fi

if test $ac_list_mounted_fs = found; then
  list_mounted_fs=yes
else
  list_mounted_fs=no
fi

    echo $ECHO_N "checking for f_fstypename in struct statfs... $ECHO_C" 1>&6
echo "configure:11473: checking for f_fstypename in struct statfs" 1>&5
if test "${fu_cv_sys_f_fstypename_in_statfs+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else

	cat >conftest.$ac_ext <<EOF
#line 11478 "configure"
#include "confdefs.h"

#include <sys/param.h>
#include <sys/types.h>
#include <sys/mount.h>
	
int
main ()
{
struct statfs s; int i = sizeof s.f_fstypename;
  ;
  return 0;
}
EOF
if { (eval echo configure:11492: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  fu_cv_sys_f_fstypename_in_statfs=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  fu_cv_sys_f_fstypename_in_statfs=no
	
fi
rm -f conftest*

fi
echo "$ECHO_T""$fu_cv_sys_f_fstypename_in_statfs" 1>&6

    if test $fu_cv_sys_f_fstypename_in_statfs = yes; then
      cat >>confdefs.h <<EOF
#define HAVE_F_FSTYPENAME_IN_STATFS 1
EOF

    fi

echo "checking how to get filesystem space usage" 1>&6
echo "configure:11509: checking how to get filesystem space usage" 1>&5
ac_fsusage_space=no

# Perform only the link test since it seems there are no variants of the
# statvfs function.  This check is more than just AC_CHECK_FUNCS(statvfs)
# because that got a false positive on SCO OSR5.  Adding the declaration
# of a `struct statvfs' causes this test to fail (as it should) on such
# systems.  That system is reported to work fine with STAT_STATFS4 which
# is what it gets when this test fails.
if test $ac_fsusage_space = no; then
  # SVR4
  echo $ECHO_N "checking for statvfs function (SVR4)... $ECHO_C" 1>&6
echo "configure:11520: checking for statvfs function (SVR4)" 1>&5
if test "${fu_cv_sys_stat_statvfs+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 11525 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/statvfs.h>
int
main ()
{
struct statvfs fsd; statvfs (0, &fsd);
  ;
  return 0;
}
EOF
if { (eval echo configure:11537: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  fu_cv_sys_stat_statvfs=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  fu_cv_sys_stat_statvfs=no
fi
rm -f conftest*
fi
echo "$ECHO_T""$fu_cv_sys_stat_statvfs" 1>&6
  if test $fu_cv_sys_stat_statvfs = yes; then
    ac_fsusage_space=yes
    cat >>confdefs.h <<\EOF
#define STAT_STATVFS 1
EOF

  fi
fi

if test $ac_fsusage_space = no; then
  # DEC Alpha running OSF/1
  echo $ECHO_N "checking for 3-argument statfs function (DEC OSF/1)... $ECHO_C" 1>&6
echo "configure:11557: checking for 3-argument statfs function (DEC OSF/1)" 1>&5
  if test "${fu_cv_sys_stat_statfs3_osf1+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  if test "$cross_compiling" = yes; then
  fu_cv_sys_stat_statfs3_osf1=no
else
  cat >conftest.$ac_ext <<EOF
#line 11565 "configure"
#include "confdefs.h"

#include <sys/param.h>
#include <sys/types.h>
#include <sys/mount.h>
  main ()
  {
    struct statfs fsd;
    fsd.f_fsize = 0;
    exit (statfs (".", &fsd, sizeof (struct statfs)));
  }
EOF
if { (eval echo configure:11577: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } &&
   test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null; then
  fu_cv_sys_stat_statfs3_osf1=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  fu_cv_sys_stat_statfs3_osf1=no
fi
rm -f conftest*
fi

fi

  echo "$ECHO_T""$fu_cv_sys_stat_statfs3_osf1" 1>&6
  if test $fu_cv_sys_stat_statfs3_osf1 = yes; then
    ac_fsusage_space=yes
    cat >>confdefs.h <<\EOF
#define STAT_STATFS3_OSF1 1
EOF

  fi
fi

if test $ac_fsusage_space = no; then
# AIX
  echo $ECHO_N "checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)... $ECHO_C" 1>&6
echo "configure:11599: checking for two-argument statfs with statfs.bsize dnl
member (AIX, 4.3BSD)" 1>&5
  if test "${fu_cv_sys_stat_statfs2_bsize+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  if test "$cross_compiling" = yes; then
  fu_cv_sys_stat_statfs2_bsize=no
else
  cat >conftest.$ac_ext <<EOF
#line 11608 "configure"
#include "confdefs.h"

#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
#ifdef HAVE_SYS_MOUNT_H
#include <sys/mount.h>
#endif
#ifdef HAVE_SYS_VFS_H
#include <sys/vfs.h>
#endif
  main ()
  {
  struct statfs fsd;
  fsd.f_bsize = 0;
  exit (statfs (".", &fsd));
  }
EOF
if { (eval echo configure:11626: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } &&
   test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null; then
  fu_cv_sys_stat_statfs2_bsize=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  fu_cv_sys_stat_statfs2_bsize=no
fi
rm -f conftest*
fi

fi

  echo "$ECHO_T""$fu_cv_sys_stat_statfs2_bsize" 1>&6
  if test $fu_cv_sys_stat_statfs2_bsize = yes; then
    ac_fsusage_space=yes
    cat >>confdefs.h <<\EOF
#define STAT_STATFS2_BSIZE 1
EOF

  fi
fi

if test $ac_fsusage_space = no; then
# SVR3
  echo $ECHO_N "checking for four-argument statfs (AIX-3.2.5, SVR3)... $ECHO_C" 1>&6
echo "configure:11648: checking for four-argument statfs (AIX-3.2.5, SVR3)" 1>&5
  if test "${fu_cv_sys_stat_statfs4+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  if test "$cross_compiling" = yes; then
  fu_cv_sys_stat_statfs4=no
else
  cat >conftest.$ac_ext <<EOF
#line 11656 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/statfs.h>
  main ()
  {
  struct statfs fsd;
  exit (statfs (".", &fsd, sizeof fsd, 0));
  }
EOF
if { (eval echo configure:11666: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } &&
   test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null; then
  fu_cv_sys_stat_statfs4=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  fu_cv_sys_stat_statfs4=no
fi
rm -f conftest*
fi

fi

  echo "$ECHO_T""$fu_cv_sys_stat_statfs4" 1>&6
  if test $fu_cv_sys_stat_statfs4 = yes; then
    ac_fsusage_space=yes
    cat >>confdefs.h <<\EOF
#define STAT_STATFS4 1
EOF

  fi
fi

if test $ac_fsusage_space = no; then
# 4.4BSD and NetBSD
  echo $ECHO_N "checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)... $ECHO_C" 1>&6
echo "configure:11688: checking for two-argument statfs with statfs.fsize dnl
member (4.4BSD and NetBSD)" 1>&5
  if test "${fu_cv_sys_stat_statfs2_fsize+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  if test "$cross_compiling" = yes; then
  fu_cv_sys_stat_statfs2_fsize=no
else
  cat >conftest.$ac_ext <<EOF
#line 11697 "configure"
#include "confdefs.h"
#include <sys/types.h>
#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
#ifdef HAVE_SYS_MOUNT_H
#include <sys/mount.h>
#endif
  main ()
  {
  struct statfs fsd;
  fsd.f_fsize = 0;
  exit (statfs (".", &fsd));
  }
EOF
if { (eval echo configure:11713: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } &&
   test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null; then
  fu_cv_sys_stat_statfs2_fsize=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  fu_cv_sys_stat_statfs2_fsize=no
fi
rm -f conftest*
fi

fi

  echo "$ECHO_T""$fu_cv_sys_stat_statfs2_fsize" 1>&6
  if test $fu_cv_sys_stat_statfs2_fsize = yes; then
    ac_fsusage_space=yes
    cat >>confdefs.h <<\EOF
#define STAT_STATFS2_FSIZE 1
EOF

  fi
fi

if test $ac_fsusage_space = no; then
  # Ultrix
  echo $ECHO_N "checking for two-argument statfs with struct fs_data (Ultrix)... $ECHO_C" 1>&6
echo "configure:11735: checking for two-argument statfs with struct fs_data (Ultrix)" 1>&5
  if test "${fu_cv_sys_stat_fs_data+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  if test "$cross_compiling" = yes; then
  fu_cv_sys_stat_fs_data=no
else
  cat >conftest.$ac_ext <<EOF
#line 11743 "configure"
#include "confdefs.h"
#include <sys/types.h>
#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
#ifdef HAVE_SYS_MOUNT_H
#include <sys/mount.h>
#endif
#ifdef HAVE_SYS_FS_TYPES_H
#include <sys/fs_types.h>
#endif
  main ()
  {
  struct fs_data fsd;
  /* Ultrix's statfs returns 1 for success,
     0 for not mounted, -1 for failure.  */
  exit (statfs (".", &fsd) != 1);
  }
EOF
if { (eval echo configure:11763: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } &&
   test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null; then
  fu_cv_sys_stat_fs_data=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  fu_cv_sys_stat_fs_data=no
fi
rm -f conftest*
fi

fi

  echo "$ECHO_T""$fu_cv_sys_stat_fs_data" 1>&6
  if test $fu_cv_sys_stat_fs_data = yes; then
    ac_fsusage_space=yes
    cat >>confdefs.h <<\EOF
#define STAT_STATFS2_FS_DATA 1
EOF

  fi
fi

if test $ac_fsusage_space = no; then
# SVR2

cat >conftest.$ac_ext <<EOF
#line 11785 "configure"
#include "confdefs.h"
#include <sys/filsys.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:11790: \"$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
  cat >>confdefs.h <<\EOF
#define STAT_READ_FILSYS 1
EOF

  ac_fsusage_space=yes
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5

fi
rm -f conftest*
fi

if test $ac_fsusage_space = yes; then
  space=yes
else
  space=no
fi

  if test $list_mounted_fs = yes && test $space = yes; then
    DF_PROG="df"
    LIBOBJS="$LIBOBJS fsusage.$ac_objext"
    LIBOBJS="$LIBOBJS mountlist.$ac_objext"
  fi

echo $ECHO_N "checking whether localtime caches TZ... $ECHO_C" 1>&6
echo "configure:11815: checking whether localtime caches TZ" 1>&5
if test "${utils_cv_localtime_cache+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  if test x$ac_cv_func_tzset = xyes; then
if test "$cross_compiling" = yes; then
  # If we have tzset, assume the worst when cross-compiling.
utils_cv_localtime_cache=yes
else
  cat >conftest.$ac_ext <<EOF
#line 11825 "configure"
#include "confdefs.h"
#include <time.h>
#if STDC_HEADERS
# include <stdlib.h>
#endif
extern char **environ;
unset_TZ ()
{
  char **from, **to;
  for (to = from = environ; (*to = *from); from++)
    if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
      to++;
}
main()
{
  time_t now = time ((time_t *) 0);
  int hour_GMT0, hour_unset;
  if (putenv ("TZ=GMT0") != 0)
    exit (1);
  hour_GMT0 = localtime (&now)->tm_hour;
  unset_TZ ();
  hour_unset = localtime (&now)->tm_hour;
  if (putenv ("TZ=PST8") != 0)
    exit (1);
  if (localtime (&now)->tm_hour == hour_GMT0)
    exit (1);
  unset_TZ ();
  if (localtime (&now)->tm_hour != hour_unset)
    exit (1);
  exit (0);
}
EOF
if { (eval echo configure:11858: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } &&
   test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null; then
  utils_cv_localtime_cache=no
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  utils_cv_localtime_cache=yes
fi
rm -f conftest*
fi

else
	# If we lack tzset, report that localtime does not cache TZ,
	# since we can't invalidate the cache if we don't have tzset.
	utils_cv_localtime_cache=no
fi
fi
echo "$ECHO_T""$utils_cv_localtime_cache" 1>&6
if test $utils_cv_localtime_cache = yes; then
  cat >>confdefs.h <<\EOF
#define LOCALTIME_CACHE 1
EOF

fi

# SCO-ODT-3.0 is reported to need -los to link programs using initgroups
for ac_func in initgroups
do
ac_ac_var=`echo "ac_cv_func_$ac_func" | $ac_tr_sh`
echo $ECHO_N "checking for $ac_func... $ECHO_C" 1>&6
echo "configure:11885: checking for $ac_func" 1>&5
if eval "test \"\${$ac_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 11890 "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.  */
#ifdef __cplusplus
extern "C"
#endif
/* 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();
char (*f)();

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
f = $ac_func;
#endif

  ;
  return 0;
}
EOF
if { (eval echo configure:11918: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  eval "$ac_ac_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$ac_ac_var=no"
fi
rm -f conftest*
fi
echo "$ECHO_T""`eval echo '${'$ac_ac_var'}'`" 1>&6
if test `eval echo '${'$ac_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $ac_tr_cpp` 1
EOF

fi
done

if test $ac_cv_func_initgroups = no; then
  echo $ECHO_N "checking for initgroups in -los... $ECHO_C" 1>&6
echo "configure:11936: checking for initgroups in -los" 1>&5
if test "${ac_cv_lib_os_initgroups+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-los  $LIBS"
cat >conftest.$ac_ext <<EOF
#line 11943 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char initgroups ();
int
main ()
{
initgroups ();
  ;
  return 0;
}
EOF
if { (eval echo configure:11960: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  ac_cv_lib_os_initgroups=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_lib_os_initgroups=no
fi
rm -f conftest*
LIBS="$ac_save_LIBS"
fi
echo "$ECHO_T""$ac_cv_lib_os_initgroups" 1>&6
if test $ac_cv_lib_os_initgroups = yes; then
  cat >>confdefs.h <<EOF
#define HAVE_LIBOS 1
EOF

  LIBS="-los $LIBS"

fi

fi

for ac_func in syslog
do
ac_ac_var=`echo "ac_cv_func_$ac_func" | $ac_tr_sh`
echo $ECHO_N "checking for $ac_func... $ECHO_C" 1>&6
echo "configure:11982: checking for $ac_func" 1>&5
if eval "test \"\${$ac_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 11987 "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.  */
#ifdef __cplusplus
extern "C"
#endif
/* 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();
char (*f)();

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
f = $ac_func;
#endif

  ;
  return 0;
}
EOF
if { (eval echo configure:12015: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  eval "$ac_ac_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$ac_ac_var=no"
fi
rm -f conftest*
fi
echo "$ECHO_T""`eval echo '${'$ac_ac_var'}'`" 1>&6
if test `eval echo '${'$ac_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $ac_tr_cpp` 1
EOF

fi
done

if test $ac_cv_func_syslog = no; then
  # syslog is not in the default libraries.  See if it's in some other.
  for lib in bsd socket inet; do
    ac_ac_Lib=`echo "ac_cv_lib_$lib_syslog" | $ac_tr_sh`
echo $ECHO_N "checking for syslog in -l$lib... $ECHO_C" 1>&6
echo "configure:12036: checking for syslog in -l$lib" 1>&5
if eval "test \"\${$ac_ac_Lib+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-l$lib  $LIBS"
cat >conftest.$ac_ext <<EOF
#line 12043 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char syslog ();
int
main ()
{
syslog ();
  ;
  return 0;
}
EOF
if { (eval echo configure:12060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  eval "$ac_ac_Lib=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$ac_ac_Lib=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"
fi
echo "$ECHO_T""`eval echo '${'$ac_ac_Lib'}'`" 1>&6
if test `eval echo '${'$ac_ac_Lib'}'` = yes; then
  cat >>confdefs.h <<\EOF
#define HAVE_SYSLOG 1
EOF

      LIBS="$LIBS -l$lib"; break
fi

  done
fi

echo $ECHO_N "checking for 3-argument setpriority function... $ECHO_C" 1>&6
echo "configure:12080: checking for 3-argument setpriority function" 1>&5
if test "${utils_cv_func_setpriority+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 12085 "configure"
#include "confdefs.h"
#include <sys/time.h>
#include <sys/resource.h>
int
main ()
{
setpriority(0, 0, 0);
  ;
  return 0;
}
EOF
if { (eval echo configure:12097: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  utils_cv_func_setpriority=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  utils_cv_func_setpriority=no
fi
rm -f conftest*
fi

echo "$ECHO_T""$utils_cv_func_setpriority" 1>&6
if test $utils_cv_func_setpriority = yes; then
  OPTIONAL_BIN_PROGS="$OPTIONAL_BIN_PROGS nice"
  OPTIONAL_BIN_ZCRIPTS="$OPTIONAL_BIN_ZCRIPTS nohup"
  MAN="$MAN nice.1 nohup.1"
else
  echo $ECHO_N "checking for nice function... $ECHO_C" 1>&6
echo "configure:12113: checking for nice function" 1>&5
  if test "${utils_cv_func_nice+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 12118 "configure"
#include "confdefs.h"

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

  echo "$ECHO_T""$utils_cv_func_nice" 1>&6
  if test $utils_cv_func_nice = yes; then
    cat >>confdefs.h <<\EOF
#define NICE_PRIORITY 1
EOF

    OPTIONAL_BIN_PROGS="$OPTIONAL_BIN_PROGS nice"
    OPTIONAL_BIN_ZCRIPTS="$OPTIONAL_BIN_ZCRIPTS nohup"
    MAN="$MAN nice.1 nohup.1"
  fi
fi

echo $ECHO_N "checking ut_host in struct utmp... $ECHO_C" 1>&6
echo "configure:12148: checking ut_host in struct utmp" 1>&5
if test "${su_cv_func_ut_host_in_utmp+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 12153 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <utmp.h>
int
main ()
{
struct utmp ut; ut.ut_host;
  ;
  return 0;
}
EOF
if { (eval echo configure:12165: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  su_cv_func_ut_host_in_utmp=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  su_cv_func_ut_host_in_utmp=no
fi
rm -f conftest*
fi

echo "$ECHO_T""$su_cv_func_ut_host_in_utmp" 1>&6
if test $su_cv_func_ut_host_in_utmp = yes; then
  have_ut_host=1
  cat >>confdefs.h <<\EOF
#define HAVE_UT_HOST 1
EOF

fi

if test -z "$have_ut_host"; then
  echo $ECHO_N "checking ut_host in struct utmpx... $ECHO_C" 1>&6
echo "configure:12183: checking ut_host in struct utmpx" 1>&5
  if test "${su_cv_func_ut_host_in_utmpx+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 12188 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <utmpx.h>
int
main ()
{
struct utmpx ut; ut.ut_host;
  ;
  return 0;
}
EOF
if { (eval echo configure:12200: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  su_cv_func_ut_host_in_utmpx=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  su_cv_func_ut_host_in_utmpx=no
fi
rm -f conftest*
fi

  echo "$ECHO_T""$su_cv_func_ut_host_in_utmpx" 1>&6
  if test $su_cv_func_ut_host_in_utmpx = yes; then
    cat >>confdefs.h <<\EOF
#define HAVE_UTMPX_H 1
EOF

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

  fi
fi

echo $ECHO_N "checking if we can get the system boot time... $ECHO_C" 1>&6
echo "configure:12220: checking if we can get the system boot time" 1>&5
if test "${su_cv_have_boot_time+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else

cat >conftest.$ac_ext <<EOF
#line 12225 "configure"
#include "confdefs.h"
#ifdef HAVE_UTMPX_H
#include <utmpx.h>
#else
#include <utmp.h>
#endif
#ifdef BOOT_TIME
yes
#endif

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

fi

echo "$ECHO_T""$su_cv_have_boot_time" 1>&6
if test X$su_cv_have_boot_time = Xyes
then
  OPTIONAL_BIN_PROGS="$OPTIONAL_BIN_PROGS uptime"
fi

echo $ECHO_N "checking POSIX termios... $ECHO_C" 1>&6
echo "configure:12250: checking POSIX termios" 1>&5
if test "${am_cv_sys_posix_termios+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 12255 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <unistd.h>
#include <termios.h>
int
main ()
{
/* SunOS 4.0.3 has termios.h but not the library calls.  */
   tcgetattr(0, 0);
  ;
  return 0;
}
EOF
if { (eval echo configure:12269: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  am_cv_sys_posix_termios=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  am_cv_sys_posix_termios=no
fi
rm -f conftest*
fi
echo "$ECHO_T""$am_cv_sys_posix_termios" 1>&6

 echo $ECHO_N "checking whether use of TIOCGWINSZ requires termios.h... $ECHO_C" 1>&6
echo "configure:12280: checking whether use of TIOCGWINSZ requires termios.h" 1>&5
if test "${jm_cv_sys_tiocgwinsz_needs_termios_h+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  jm_cv_sys_tiocgwinsz_needs_termios_h=no

   if test $am_cv_sys_posix_termios = yes; then

cat >conftest.$ac_ext <<EOF
#line 12287 "configure"
#include "confdefs.h"
#include <sys/types.h>
#      include <termios.h>
#      ifdef TIOCGWINSZ
         yes
#      endif

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

   fi

fi
echo "$ECHO_T""$jm_cv_sys_tiocgwinsz_needs_termios_h" 1>&6

 echo $ECHO_N "checking whether use of TIOCGWINSZ requires sys/ioctl.h... $ECHO_C" 1>&6
echo "configure:12304: checking whether use of TIOCGWINSZ requires sys/ioctl.h" 1>&5
if test "${jm_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  jm_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no

  if test $jm_cv_sys_tiocgwinsz_needs_termios_h = no; then

cat >conftest.$ac_ext <<EOF
#line 12311 "configure"
#include "confdefs.h"
#include <sys/types.h>
#     include <sys/ioctl.h>
#     ifdef TIOCGWINSZ
        yes
#     endif

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

  fi

fi
echo "$ECHO_T""$jm_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
  if test $jm_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
    cat >>confdefs.h <<\EOF
#define GWINSZ_IN_SYS_IOCTL 1
EOF

  fi

if test $am_cv_sys_posix_termios = yes; then
  OPTIONAL_BIN_PROGS="$OPTIONAL_BIN_PROGS stty" MAN="$MAN stty.1"

  echo $ECHO_N "checking whether termios.h needs _XOPEN_SOURCE... $ECHO_C" 1>&6
echo "configure:12335: checking whether termios.h needs _XOPEN_SOURCE" 1>&5
  if test "${su_cv_sys_termios_needs_xopen_source+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else

cat >conftest.$ac_ext <<EOF
#line 12340 "configure"
#include "confdefs.h"
#include <termios.h>
#ifdef IUCLC
yes
#endif
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "yes" >/dev/null 2>&1; then
  su_cv_sys_termios_needs_xopen_source=no
else

cat >conftest.$ac_ext <<EOF
#line 12352 "configure"
#include "confdefs.h"
#define _XOPEN_SOURCE
#include <termios.h>
#ifdef IUCLC
yes
#endif
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "yes" >/dev/null 2>&1; then
  su_cv_sys_termios_needs_xopen_source=yes
else
  su_cv_sys_termios_needs_xopen_source=no
fi
rm -f conftest*

fi
rm -f conftest*

fi

  echo "$ECHO_T""$su_cv_sys_termios_needs_xopen_source" 1>&6
  test $su_cv_sys_termios_needs_xopen_source = yes &&
    cat >>confdefs.h <<\EOF
#define TERMIOS_NEEDS_XOPEN_SOURCE 1
EOF

  echo $ECHO_N "checking c_line in struct termios... $ECHO_C" 1>&6
echo "configure:12376: checking c_line in struct termios" 1>&5
  if test "${su_cv_sys_c_line_in_termios+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 12381 "configure"
#include "confdefs.h"
#if TERMIOS_NEEDS_XOPEN_SOURCE
#define _XOPEN_SOURCE
#endif
#include <sys/types.h>
#include <termios.h>
int
main ()
{
struct termios t; t.c_line;
  ;
  return 0;
}
EOF
if { (eval echo configure:12396: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  su_cv_sys_c_line_in_termios=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  su_cv_sys_c_line_in_termios=no
fi
rm -f conftest*
fi

  echo "$ECHO_T""$su_cv_sys_c_line_in_termios" 1>&6
  test $su_cv_sys_c_line_in_termios = yes && cat >>confdefs.h <<\EOF
#define HAVE_C_LINE 1
EOF

fi

echo $ECHO_N "checking for sys/ptem.h... $ECHO_C" 1>&6
echo "configure:12411: checking for sys/ptem.h" 1>&5
if test "${ac_cv_header_sys_ptem_h+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else

cat >conftest.$ac_ext <<EOF
#line 12416 "configure"
#include "confdefs.h"
#include <sys/ptem.h>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:12421: \"$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
  ac_cv_header_sys_ptem_h=yes
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_header_sys_ptem_h=no
fi
rm -f conftest*
fi
echo "$ECHO_T""$ac_cv_header_sys_ptem_h" 1>&6
if test $ac_cv_header_sys_ptem_h = yes; then
  cat >>confdefs.h <<\EOF
#define WINSIZE_IN_PTEM 1
EOF

fi

 echo $ECHO_N "checking whether use of TIOCGWINSZ requires termios.h... $ECHO_C" 1>&6
echo "configure:12440: checking whether use of TIOCGWINSZ requires termios.h" 1>&5
if test "${jm_cv_sys_tiocgwinsz_needs_termios_h+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  jm_cv_sys_tiocgwinsz_needs_termios_h=no

   if test $am_cv_sys_posix_termios = yes; then

cat >conftest.$ac_ext <<EOF
#line 12447 "configure"
#include "confdefs.h"
#include <sys/types.h>
#      include <termios.h>
#      ifdef TIOCGWINSZ
         yes
#      endif

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

   fi

fi
echo "$ECHO_T""$jm_cv_sys_tiocgwinsz_needs_termios_h" 1>&6

if test $jm_cv_sys_tiocgwinsz_needs_termios_h = no && \
   test $jm_cv_sys_tiocgwinsz_needs_sys_ioctl_h = no; then
  echo $ECHO_N "checking TIOCGWINSZ in sys/pty.h... $ECHO_C" 1>&6
echo "configure:12466: checking TIOCGWINSZ in sys/pty.h" 1>&5
  if test "${su_cv_sys_tiocgwinsz_in_sys_pty_h+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 12471 "configure"
#include "confdefs.h"
#include <sys/types.h>
#ifdef WINSIZE_IN_PTEM
# include <sys/stream.h>
# include <sys/ptem.h>
#endif
#include <sys/ioctl.h>
#include <sys/tty.h>
#include <sys/pty.h>
int
main ()
{
int x = TIOCGWINSZ;
  ;
  return 0;
}
EOF
if { (eval echo configure:12489: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  su_cv_sys_tiocgwinsz_in_sys_pty_h=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  su_cv_sys_tiocgwinsz_in_sys_pty_h=no
fi
rm -f conftest*
fi

  echo "$ECHO_T""$su_cv_sys_tiocgwinsz_in_sys_pty_h" 1>&6

  test $su_cv_sys_tiocgwinsz_in_sys_pty_h = yes \
      && cat >>confdefs.h <<\EOF
#define GWINSZ_IN_SYS_PTY 1
EOF

fi

  # Check for libypsec.a on Dolphin M88K machines.
  echo $ECHO_N "checking for main in -lypsec... $ECHO_C" 1>&6
echo "configure:12506: checking for main in -lypsec" 1>&5
if test "${ac_cv_lib_ypsec_main+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lypsec  $LIBS"
cat >conftest.$ac_ext <<EOF
#line 12513 "configure"
#include "confdefs.h"

int
main ()
{
main ();
  ;
  return 0;
}
EOF
if { (eval echo configure:12523: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  ac_cv_lib_ypsec_main=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_lib_ypsec_main=no
fi
rm -f conftest*
LIBS="$ac_save_LIBS"
fi
echo "$ECHO_T""$ac_cv_lib_ypsec_main" 1>&6
if test $ac_cv_lib_ypsec_main = yes; then
  cat >>confdefs.h <<EOF
#define HAVE_LIBYPSEC 1
EOF

  LIBS="-lypsec $LIBS"

fi

  # m88k running dgux 5.4 needs this
  echo $ECHO_N "checking for main in -lldgc... $ECHO_C" 1>&6
echo "configure:12542: checking for main in -lldgc" 1>&5
if test "${ac_cv_lib_ldgc_main+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lldgc  $LIBS"
cat >conftest.$ac_ext <<EOF
#line 12549 "configure"
#include "confdefs.h"

int
main ()
{
main ();
  ;
  return 0;
}
EOF
if { (eval echo configure:12559: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  ac_cv_lib_ldgc_main=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_lib_ldgc_main=no
fi
rm -f conftest*
LIBS="$ac_save_LIBS"
fi
echo "$ECHO_T""$ac_cv_lib_ldgc_main" 1>&6
if test $ac_cv_lib_ldgc_main = yes; then
  cat >>confdefs.h <<EOF
#define HAVE_LIBLDGC 1
EOF

  LIBS="-lldgc $LIBS"

fi

  # Some programs need to link with -lm.  printf does if it uses
  # lib/strtod.c which uses pow.  And seq uses the math functions,
  # floor, modf, rint.  And factor uses sqrt.  And sleep uses fesetround.

  # Save a copy of $LIBS and add $FLOOR_LIBM before these tests
  # Check for these math functions used by seq.
  ac_su_saved_lib="$LIBS"
  LIBS="$LIBS -lm"
  for ac_func in floor modf rint
do
ac_ac_var=`echo "ac_cv_func_$ac_func" | $ac_tr_sh`
echo $ECHO_N "checking for $ac_func... $ECHO_C" 1>&6
echo "configure:12587: checking for $ac_func" 1>&5
if eval "test \"\${$ac_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 12592 "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.  */
#ifdef __cplusplus
extern "C"
#endif
/* 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();
char (*f)();

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
f = $ac_func;
#endif

  ;
  return 0;
}
EOF
if { (eval echo configure:12620: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  eval "$ac_ac_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$ac_ac_var=no"
fi
rm -f conftest*
fi
echo "$ECHO_T""`eval echo '${'$ac_ac_var'}'`" 1>&6
if test `eval echo '${'$ac_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $ac_tr_cpp` 1
EOF

fi
done

  LIBS="$ac_su_saved_lib"

  for ac_func in sqrt
do
ac_ac_var=`echo "ac_cv_func_$ac_func" | $ac_tr_sh`
echo $ECHO_N "checking for $ac_func... $ECHO_C" 1>&6
echo "configure:12641: checking for $ac_func" 1>&5
if eval "test \"\${$ac_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 12646 "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.  */
#ifdef __cplusplus
extern "C"
#endif
/* 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();
char (*f)();

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
f = $ac_func;
#endif

  ;
  return 0;
}
EOF
if { (eval echo configure:12674: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  eval "$ac_ac_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$ac_ac_var=no"
fi
rm -f conftest*
fi
echo "$ECHO_T""`eval echo '${'$ac_ac_var'}'`" 1>&6
if test `eval echo '${'$ac_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $ac_tr_cpp` 1
EOF

fi
done

  if test $ac_cv_func_sqrt = no; then
    echo $ECHO_N "checking for sqrt in -lm... $ECHO_C" 1>&6
echo "configure:12692: checking for sqrt in -lm" 1>&5
if test "${ac_cv_lib_m_sqrt+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lm  $LIBS"
cat >conftest.$ac_ext <<EOF
#line 12699 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char sqrt ();
int
main ()
{
sqrt ();
  ;
  return 0;
}
EOF
if { (eval echo configure:12716: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  ac_cv_lib_m_sqrt=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_lib_m_sqrt=no
fi
rm -f conftest*
LIBS="$ac_save_LIBS"
fi
echo "$ECHO_T""$ac_cv_lib_m_sqrt" 1>&6
if test $ac_cv_lib_m_sqrt = yes; then
  SQRT_LIBM=-lm
fi

  fi

  for ac_func in fesetround
do
ac_ac_var=`echo "ac_cv_func_$ac_func" | $ac_tr_sh`
echo $ECHO_N "checking for $ac_func... $ECHO_C" 1>&6
echo "configure:12735: checking for $ac_func" 1>&5
if eval "test \"\${$ac_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 12740 "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.  */
#ifdef __cplusplus
extern "C"
#endif
/* 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();
char (*f)();

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
f = $ac_func;
#endif

  ;
  return 0;
}
EOF
if { (eval echo configure:12768: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  eval "$ac_ac_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$ac_ac_var=no"
fi
rm -f conftest*
fi
echo "$ECHO_T""`eval echo '${'$ac_ac_var'}'`" 1>&6
if test `eval echo '${'$ac_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $ac_tr_cpp` 1
EOF

fi
done

  if test $ac_cv_func_fesetround = no; then
    echo $ECHO_N "checking for fesetround in -lm... $ECHO_C" 1>&6
echo "configure:12786: checking for fesetround in -lm" 1>&5
if test "${ac_cv_lib_m_fesetround+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lm  $LIBS"
cat >conftest.$ac_ext <<EOF
#line 12793 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char fesetround ();
int
main ()
{
fesetround ();
  ;
  return 0;
}
EOF
if { (eval echo configure:12810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  ac_cv_lib_m_fesetround=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_lib_m_fesetround=no
fi
rm -f conftest*
LIBS="$ac_save_LIBS"
fi
echo "$ECHO_T""$ac_cv_lib_m_fesetround" 1>&6
if test $ac_cv_lib_m_fesetround = yes; then
  FESETROUND_LIBM=-lm
fi

  fi

  # The -lsun library is required for YP support on Irix-4.0.5 systems.
  # m88k/svr3 DolphinOS systems using YP need -lypsec for id.

  echo $ECHO_N "checking for library containing yp_match... $ECHO_C" 1>&6
echo "configure:12828: checking for library containing yp_match" 1>&5
if test "${ac_cv_search_yp_match+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else

    ac_func_search_save_LIBS="$LIBS"
    ac_cv_search_yp_match="no"
    cat >conftest.$ac_ext <<EOF
#line 12835 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char yp_match ();
int
main ()
{
yp_match ();
  ;
  return 0;
}
EOF
if { (eval echo configure:12852: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  ac_cv_search_yp_match="none required"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
fi
rm -f conftest*
    if test "$ac_cv_search_yp_match" = "no"; then
      for ac_lib in sun ypsec; do
	LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
	cat >conftest.$ac_ext <<EOF
#line 12863 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char yp_match ();
int
main ()
{
yp_match ();
  ;
  return 0;
}
EOF
if { (eval echo configure:12880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  ac_cv_search_yp_match="-l$ac_lib"
	  break
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
fi
rm -f conftest*
      done
    fi
    LIBS="$ac_func_search_save_LIBS"

fi
echo "$ECHO_T""$ac_cv_search_yp_match" 1>&6

  if test "$ac_cv_search_yp_match" = "no"; then :

  else
    if test "$ac_cv_search_yp_match" = "none required"; then :

    else
      LIBS="$ac_cv_search_yp_match $LIBS"

    fi
  fi

  # SysV needs -lsec, older versions of Linux need -lshadow for
  # shadow passwords.  UnixWare 7 needs -lgen.

  echo $ECHO_N "checking for library containing getspnam... $ECHO_C" 1>&6
echo "configure:12903: checking for library containing getspnam" 1>&5
if test "${ac_cv_search_getspnam+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else

    ac_func_search_save_LIBS="$LIBS"
    ac_cv_search_getspnam="no"
    cat >conftest.$ac_ext <<EOF
#line 12910 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char getspnam ();
int
main ()
{
getspnam ();
  ;
  return 0;
}
EOF
if { (eval echo configure:12927: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  ac_cv_search_getspnam="none required"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
fi
rm -f conftest*
    if test "$ac_cv_search_getspnam" = "no"; then
      for ac_lib in shadow sec gen; do
	LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
	cat >conftest.$ac_ext <<EOF
#line 12938 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char getspnam ();
int
main ()
{
getspnam ();
  ;
  return 0;
}
EOF
if { (eval echo configure:12955: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  ac_cv_search_getspnam="-l$ac_lib"
	  break
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
fi
rm -f conftest*
      done
    fi
    LIBS="$ac_func_search_save_LIBS"

fi
echo "$ECHO_T""$ac_cv_search_getspnam" 1>&6

  if test "$ac_cv_search_getspnam" = "no"; then :

  else
    if test "$ac_cv_search_getspnam" = "none required"; then :

    else
      LIBS="$ac_cv_search_getspnam $LIBS"

    fi
  fi

  # Requirements for su.c.

echo $ECHO_N "checking for struct spwd.sp_pwdp... $ECHO_C" 1>&6
echo "configure:12977: checking for struct spwd.sp_pwdp" 1>&5
if test "${ac_cv_member_struct_spwd_sp_pwdp+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 12982 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
struct spwd foo;
foo.sp_pwdp;
  ;
  return 0;
}
EOF
if { (eval echo configure:12994: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  ac_cv_member_struct_spwd_sp_pwdp=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_member_struct_spwd_sp_pwdp=no
fi
rm -f conftest*
fi
echo "$ECHO_T""$ac_cv_member_struct_spwd_sp_pwdp" 1>&6
if test $ac_cv_member_struct_spwd_sp_pwdp = yes; then
  cat >>confdefs.h <<EOF
#define HAVE_STRUCT_SPWD_SP_PWDP 1
EOF

fi

  for ac_func in getspnam
do
ac_ac_var=`echo "ac_cv_func_$ac_func" | $ac_tr_sh`
echo $ECHO_N "checking for $ac_func... $ECHO_C" 1>&6
echo "configure:13013: checking for $ac_func" 1>&5
if eval "test \"\${$ac_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 13018 "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.  */
#ifdef __cplusplus
extern "C"
#endif
/* 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();
char (*f)();

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
f = $ac_func;
#endif

  ;
  return 0;
}
EOF
if { (eval echo configure:13046: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  eval "$ac_ac_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$ac_ac_var=no"
fi
rm -f conftest*
fi
echo "$ECHO_T""`eval echo '${'$ac_ac_var'}'`" 1>&6
if test `eval echo '${'$ac_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $ac_tr_cpp` 1
EOF

fi
done

  for ac_header in shadow.h
do
ac_ac_Header=`echo "ac_cv_header_$ac_header" | $ac_tr_sh`
echo $ECHO_N "checking for $ac_header... $ECHO_C" 1>&6
echo "configure:13066: checking for $ac_header" 1>&5
if eval "test \"\${$ac_ac_Header+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else

cat >conftest.$ac_ext <<EOF
#line 13071 "configure"
#include "confdefs.h"
#include <$ac_header>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:13076: \"$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
  eval "$ac_ac_Header=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$ac_ac_Header=no"
fi
rm -f conftest*
fi
echo "$ECHO_T""`eval echo '${'$ac_ac_Header'}'`" 1>&6
if test `eval echo '${'$ac_ac_Header'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_header" | $ac_tr_cpp` 1
EOF

fi
done

  # SCO-ODT-3.0 is reported to need -lufc for crypt.
  # NetBSD needs -lcrypt for crypt.
  ac_su_saved_lib="$LIBS"

  echo $ECHO_N "checking for library containing crypt... $ECHO_C" 1>&6
echo "configure:13099: checking for library containing crypt" 1>&5
if test "${ac_cv_search_crypt+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else

    ac_func_search_save_LIBS="$LIBS"
    ac_cv_search_crypt="no"
    cat >conftest.$ac_ext <<EOF
#line 13106 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* 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:13123: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  ac_cv_search_crypt="none required"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
fi
rm -f conftest*
    if test "$ac_cv_search_crypt" = "no"; then
      for ac_lib in ufc crypt; do
	LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
	cat >conftest.$ac_ext <<EOF
#line 13134 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* 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:13151: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  ac_cv_search_crypt="-l$ac_lib"
	  break
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
fi
rm -f conftest*
      done
    fi
    LIBS="$ac_func_search_save_LIBS"

fi
echo "$ECHO_T""$ac_cv_search_crypt" 1>&6

  if test "$ac_cv_search_crypt" = "no"; then :

  else
    if test "$ac_cv_search_crypt" = "none required"; then :

    else
      LIBS="$ac_cv_search_crypt $LIBS"
      LIB_CRYPT="$ac_cv_search_crypt"
    fi
  fi

  LIBS="$ac_su_saved_lib"

for ac_header in stdlib.h unistd.h sys/stat.h
do
ac_ac_Header=`echo "ac_cv_header_$ac_header" | $ac_tr_sh`
echo $ECHO_N "checking for $ac_header... $ECHO_C" 1>&6
echo "configure:13177: checking for $ac_header" 1>&5
if eval "test \"\${$ac_ac_Header+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else

cat >conftest.$ac_ext <<EOF
#line 13182 "configure"
#include "confdefs.h"
#include <$ac_header>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:13187: \"$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
  eval "$ac_ac_Header=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$ac_ac_Header=no"
fi
rm -f conftest*
fi
echo "$ECHO_T""`eval echo '${'$ac_ac_Header'}'`" 1>&6
if test `eval echo '${'$ac_ac_Header'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_header" | $ac_tr_cpp` 1
EOF

fi
done

for ac_func in getpagesize
do
ac_ac_var=`echo "ac_cv_func_$ac_func" | $ac_tr_sh`
echo $ECHO_N "checking for $ac_func... $ECHO_C" 1>&6
echo "configure:13210: checking for $ac_func" 1>&5
if eval "test \"\${$ac_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 13215 "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.  */
#ifdef __cplusplus
extern "C"
#endif
/* 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();
char (*f)();

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
f = $ac_func;
#endif

  ;
  return 0;
}
EOF
if { (eval echo configure:13243: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  eval "$ac_ac_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$ac_ac_var=no"
fi
rm -f conftest*
fi
echo "$ECHO_T""`eval echo '${'$ac_ac_var'}'`" 1>&6
if test `eval echo '${'$ac_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $ac_tr_cpp` 1
EOF

fi
done

echo $ECHO_N "checking for working mmap... $ECHO_C" 1>&6
echo "configure:13260: checking for working mmap" 1>&5
if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_func_mmap_fixed_mapped=no
else
  cat >conftest.$ac_ext <<EOF
#line 13268 "configure"
#include "confdefs.h"
/* Thanks to Mike Haertel and Jim Avera for this test.
   Here is a matrix of mmap possibilities:
	mmap private not fixed
	mmap private fixed at somewhere currently unmapped
	mmap private fixed at somewhere already mapped
	mmap shared not fixed
	mmap shared fixed at somewhere currently unmapped
	mmap shared fixed at somewhere already mapped
   For private mappings, we should verify that changes cannot be read()
   back from the file, nor mmap's back from the file at a different
   address.  (There have been systems where private was not correctly
   implemented like the infamous i386 svr4.0, and systems where the
   VM page cache was not coherent with the file system buffer cache
   like early versions of FreeBSD and possibly contemporary NetBSD.)
   For shared mappings, we should conversely verify that changes get
   propogated back to all the places they're supposed to be.

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

#if HAVE_STDLIB_H
# include <stdlib.h>
#else
char *malloc ();
#endif
#if HAVE_UNISTD_H
# include <unistd.h>
#endif
#if HAVE_SYS_STAT_H
# include <sys/stat.h>
#endif

/* This mess was copied from the GNU getpagesize.h.  */
#if !HAVE_GETPAGESIZE
/* Assume that all systems that can run configure have sys/param.h.  */
# if !HAVE_SYS_PARAM_H
#  define HAVE_SYS_PARAM_H 1
# endif

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

#endif /* no HAVE_GETPAGESIZE */

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

  pagesize = getpagesize ();

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

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

  /* Finally, make sure that changes to the mapped area do not
     percolate back to the file as seen by read().  (This is a bug on
     some variants of i386 svr4.0.)  */
  for (i = 0; i < pagesize; ++i)
    *(data2 + i) = *(data2 + i) + 1;
  data3 = (char *) malloc (pagesize);
  if (!data3)
    exit (1);
  if (read (fd, data3, pagesize) != pagesize)
    exit (1);
  for (i = 0; i < pagesize; ++i)
    if (*(data + i) != *(data3 + i))
      exit (1);
  close (fd);
  unlink ("conftestmmap");
  exit (0);
}
EOF
if { (eval echo configure:13392: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } &&
   test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null; then
  ac_cv_func_mmap_fixed_mapped=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_func_mmap_fixed_mapped=no
fi
rm -f conftest*
fi

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

fi

   for ac_header in argz.h limits.h locale.h nl_types.h malloc.h string.h \
unistd.h sys/param.h
do
ac_ac_Header=`echo "ac_cv_header_$ac_header" | $ac_tr_sh`
echo $ECHO_N "checking for $ac_header... $ECHO_C" 1>&6
echo "configure:13414: checking for $ac_header" 1>&5
if eval "test \"\${$ac_ac_Header+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else

cat >conftest.$ac_ext <<EOF
#line 13419 "configure"
#include "confdefs.h"
#include <$ac_header>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:13424: \"$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
  eval "$ac_ac_Header=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$ac_ac_Header=no"
fi
rm -f conftest*
fi
echo "$ECHO_T""`eval echo '${'$ac_ac_Header'}'`" 1>&6
if test `eval echo '${'$ac_ac_Header'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_header" | $ac_tr_cpp` 1
EOF

fi
done

   for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
strdup __argz_count __argz_stringify __argz_next
do
ac_ac_var=`echo "ac_cv_func_$ac_func" | $ac_tr_sh`
echo $ECHO_N "checking for $ac_func... $ECHO_C" 1>&6
echo "configure:13448: checking for $ac_func" 1>&5
if eval "test \"\${$ac_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 13453 "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.  */
#ifdef __cplusplus
extern "C"
#endif
/* 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();
char (*f)();

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
f = $ac_func;
#endif

  ;
  return 0;
}
EOF
if { (eval echo configure:13481: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  eval "$ac_ac_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$ac_ac_var=no"
fi
rm -f conftest*
fi
echo "$ECHO_T""`eval echo '${'$ac_ac_var'}'`" 1>&6
if test `eval echo '${'$ac_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $ac_tr_cpp` 1
EOF

fi
done

   if test "${ac_cv_func_stpcpy+set}" != "set"; then
     for ac_func in stpcpy
do
ac_ac_var=`echo "ac_cv_func_$ac_func" | $ac_tr_sh`
echo $ECHO_N "checking for $ac_func... $ECHO_C" 1>&6
echo "configure:13502: checking for $ac_func" 1>&5
if eval "test \"\${$ac_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 13507 "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.  */
#ifdef __cplusplus
extern "C"
#endif
/* 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();
char (*f)();

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
f = $ac_func;
#endif

  ;
  return 0;
}
EOF
if { (eval echo configure:13535: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  eval "$ac_ac_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$ac_ac_var=no"
fi
rm -f conftest*
fi
echo "$ECHO_T""`eval echo '${'$ac_ac_var'}'`" 1>&6
if test `eval echo '${'$ac_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $ac_tr_cpp` 1
EOF

fi
done

   fi
   if test "${ac_cv_func_stpcpy}" = "yes"; then
     cat >>confdefs.h <<\EOF
#define HAVE_STPCPY 1
EOF

   fi

   if test $ac_cv_header_locale_h = yes; then
    echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" 1>&6
echo "configure:13559: checking for LC_MESSAGES" 1>&5
if test "${am_cv_val_LC_MESSAGES+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 13564 "configure"
#include "confdefs.h"
#include <locale.h>
int
main ()
{
return LC_MESSAGES
  ;
  return 0;
}
EOF
if { (eval echo configure:13575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  am_cv_val_LC_MESSAGES=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  am_cv_val_LC_MESSAGES=no
fi
rm -f conftest*
fi
echo "$ECHO_T""$am_cv_val_LC_MESSAGES" 1>&6
    if test $am_cv_val_LC_MESSAGES = yes; then
      cat >>confdefs.h <<\EOF
#define HAVE_LC_MESSAGES 1
EOF

    fi
  fi
   echo $ECHO_N "checking whether NLS is requested... $ECHO_C" 1>&6
echo "configure:13592: checking whether NLS is requested" 1>&5
        # Check whether --enable-nls or --disable-nls was given.
if test "${enable_nls+set}" = set; then
  enableval="$enable_nls"
  USE_NLS=$enableval
else
  USE_NLS=yes
fi
    echo "$ECHO_T""$USE_NLS" 1>&6

    USE_INCLUDED_LIBINTL=no

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

      echo $ECHO_N "checking whether included gettext is requested... $ECHO_C" 1>&6
echo "configure:13607: checking whether included gettext is requested" 1>&5
      # Check whether --with-included-gettext or --without-included-gettext was given.
if test "${with_included_gettext+set}" = set; then
  withval="$with_included_gettext"
  nls_cv_force_use_gnu_gettext=$withval
else
  nls_cv_force_use_gnu_gettext=no
fi
      echo "$ECHO_T""$nls_cv_force_use_gnu_gettext" 1>&6

      nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
      if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
                        		nls_cv_header_intl=
	nls_cv_header_libgt=
	CATOBJEXT=NONE

	echo $ECHO_N "checking for libintl.h... $ECHO_C" 1>&6
echo "configure:13622: checking for libintl.h" 1>&5
if test "${ac_cv_header_libintl_h+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else

cat >conftest.$ac_ext <<EOF
#line 13627 "configure"
#include "confdefs.h"
#include <libintl.h>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:13632: \"$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
  ac_cv_header_libintl_h=yes
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_header_libintl_h=no
fi
rm -f conftest*
fi
echo "$ECHO_T""$ac_cv_header_libintl_h" 1>&6
if test $ac_cv_header_libintl_h = yes; then
  echo $ECHO_N "checking for gettext in libc... $ECHO_C" 1>&6
echo "configure:13647: checking for gettext in libc" 1>&5
if test "${gt_cv_func_gettext_libc+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 13652 "configure"
#include "confdefs.h"
#include <libintl.h>
int
main ()
{
return (int) gettext ("")
  ;
  return 0;
}
EOF
if { (eval echo configure:13663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  gt_cv_func_gettext_libc=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  gt_cv_func_gettext_libc=no
fi
rm -f conftest*
fi
echo "$ECHO_T""$gt_cv_func_gettext_libc" 1>&6

	   if test "$gt_cv_func_gettext_libc" != "yes"; then
	     echo $ECHO_N "checking for bindtextdomain in -lintl... $ECHO_C" 1>&6
echo "configure:13675: checking for bindtextdomain in -lintl" 1>&5
if test "${ac_cv_lib_intl_bindtextdomain+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lintl  $LIBS"
cat >conftest.$ac_ext <<EOF
#line 13682 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char bindtextdomain ();
int
main ()
{
bindtextdomain ();
  ;
  return 0;
}
EOF
if { (eval echo configure:13699: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  ac_cv_lib_intl_bindtextdomain=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_lib_intl_bindtextdomain=no
fi
rm -f conftest*
LIBS="$ac_save_LIBS"
fi
echo "$ECHO_T""$ac_cv_lib_intl_bindtextdomain" 1>&6
if test $ac_cv_lib_intl_bindtextdomain = yes; then
  echo $ECHO_N "checking for gettext in -lintl... $ECHO_C" 1>&6
echo "configure:13712: checking for gettext in -lintl" 1>&5
if test "${ac_cv_lib_intl_gettext+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lintl  $LIBS"
cat >conftest.$ac_ext <<EOF
#line 13719 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char gettext ();
int
main ()
{
gettext ();
  ;
  return 0;
}
EOF
if { (eval echo configure:13736: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  ac_cv_lib_intl_gettext=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_lib_intl_gettext=no
fi
rm -f conftest*
LIBS="$ac_save_LIBS"
fi
echo "$ECHO_T""$ac_cv_lib_intl_gettext" 1>&6
if test $ac_cv_lib_intl_gettext = yes; then
  cat >>confdefs.h <<EOF
#define HAVE_LIBINTL 1
EOF

  LIBS="-lintl $LIBS"

fi

fi

	   fi

	   if test "$gt_cv_func_gettext_libc" = "yes" \
	      || test "$ac_cv_lib_intl_gettext" = "yes"; then
	      cat >>confdefs.h <<\EOF
#define HAVE_GETTEXT 1
EOF

	      # Extract the first word of "msgfmt", so it can be a program name with args.
set dummy msgfmt; ac_word=$2
echo $ECHO_N "checking for $ac_word... $ECHO_C" 1>&6
echo "configure:13763: checking for $ac_word" 1>&5
if test "${ac_cv_path_MSGFMT+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  case "$MSGFMT" in
  /*)
  ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  for ac_dir in $PATH; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
	ac_cv_path_MSGFMT="$ac_dir/$ac_word"
	break
      fi
    fi
  done
  IFS="$ac_save_ifs"
  test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
  ;;
esac
fi
MSGFMT="$ac_cv_path_MSGFMT"
if test -n "$MSGFMT"; then
  echo "$ECHO_T""$MSGFMT" 1>&6
else
  echo "$ECHO_T""no" 1>&6
fi
	      if test "$MSGFMT" != "no"; then
		for ac_func in dcgettext
do
ac_ac_var=`echo "ac_cv_func_$ac_func" | $ac_tr_sh`
echo $ECHO_N "checking for $ac_func... $ECHO_C" 1>&6
echo "configure:13798: checking for $ac_func" 1>&5
if eval "test \"\${$ac_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 13803 "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.  */
#ifdef __cplusplus
extern "C"
#endif
/* 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();
char (*f)();

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
f = $ac_func;
#endif

  ;
  return 0;
}
EOF
if { (eval echo configure:13831: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  eval "$ac_ac_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$ac_ac_var=no"
fi
rm -f conftest*
fi
echo "$ECHO_T""`eval echo '${'$ac_ac_var'}'`" 1>&6
if test `eval echo '${'$ac_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $ac_tr_cpp` 1
EOF

fi
done

		# Extract the first word of "gmsgfmt", so it can be a program name with args.
set dummy gmsgfmt; ac_word=$2
echo $ECHO_N "checking for $ac_word... $ECHO_C" 1>&6
echo "configure:13850: checking for $ac_word" 1>&5
if test "${ac_cv_path_GMSGFMT+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  case "$GMSGFMT" in
  [/\\]* | ?:[/\\]*)
  ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
  ;;
  *)
  ac_save_ifs=$IFS; IFS=':'
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f "$ac_dir/$ac_word"; then
      ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
      break
    fi
  done
  IFS=$ac_save_ifs
  test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
  ;;
esac
fi
GMSGFMT="$ac_cv_path_GMSGFMT"
if test -n "$GMSGFMT"; then
  echo "$ECHO_T""$GMSGFMT" 1>&6
else
  echo "$ECHO_T""no" 1>&6
fi

		# Extract the first word of "xgettext", so it can be a program name with args.
set dummy xgettext; ac_word=$2
echo $ECHO_N "checking for $ac_word... $ECHO_C" 1>&6
echo "configure:13882: checking for $ac_word" 1>&5
if test "${ac_cv_path_XGETTEXT+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  case "$XGETTEXT" in
  /*)
  ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  for ac_dir in $PATH; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
	ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
	break
      fi
    fi
  done
  IFS="$ac_save_ifs"
  test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
  ;;
esac
fi
XGETTEXT="$ac_cv_path_XGETTEXT"
if test -n "$XGETTEXT"; then
  echo "$ECHO_T""$XGETTEXT" 1>&6
else
  echo "$ECHO_T""no" 1>&6
fi

		cat >conftest.$ac_ext <<EOF
#line 13913 "configure"
#include "confdefs.h"

int
main ()
{
extern int _nl_msg_cat_cntr;
			       return _nl_msg_cat_cntr
  ;
  return 0;
}
EOF
if { (eval echo configure:13924: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  CATOBJEXT=.gmo
		   DATADIRNAME=share
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  CATOBJEXT=.mo
		   DATADIRNAME=lib
fi
rm -f conftest*
		INSTOBJEXT=.mo
	      fi
	    fi
	
fi

        if test "$CATOBJEXT" = "NONE"; then
	  echo $ECHO_N "checking whether catgets can be used... $ECHO_C" 1>&6
echo "configure:13941: checking whether catgets can be used" 1>&5
	  # Check whether --with-catgets or --without-catgets was given.
if test "${with_catgets+set}" = set; then
  withval="$with_catgets"
  nls_cv_use_catgets=$withval
else
  nls_cv_use_catgets=no
fi
	  echo "$ECHO_T""$nls_cv_use_catgets" 1>&6

	  if test "$nls_cv_use_catgets" = "yes"; then
	    	    echo $ECHO_N "checking for main in -li... $ECHO_C" 1>&6
echo "configure:13952: checking for main in -li" 1>&5
if test "${ac_cv_lib_i_main+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-li  $LIBS"
cat >conftest.$ac_ext <<EOF
#line 13959 "configure"
#include "confdefs.h"

int
main ()
{
main ();
  ;
  return 0;
}
EOF
if { (eval echo configure:13969: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  ac_cv_lib_i_main=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_lib_i_main=no
fi
rm -f conftest*
LIBS="$ac_save_LIBS"
fi
echo "$ECHO_T""$ac_cv_lib_i_main" 1>&6
if test $ac_cv_lib_i_main = yes; then
  cat >>confdefs.h <<EOF
#define HAVE_LIBI 1
EOF

  LIBS="-li $LIBS"

fi

	    echo $ECHO_N "checking for catgets... $ECHO_C" 1>&6
echo "configure:13987: checking for catgets" 1>&5
if test "${ac_cv_func_catgets+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 13992 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char catgets(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char catgets();
char (*f)();

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_catgets) || defined (__stub___catgets)
choke me
#else
f = catgets;
#endif

  ;
  return 0;
}
EOF
if { (eval echo configure:14020: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  ac_cv_func_catgets=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_func_catgets=no
fi
rm -f conftest*
fi
echo "$ECHO_T""$ac_cv_func_catgets" 1>&6
if test $ac_cv_func_catgets = yes; then
  cat >>confdefs.h <<\EOF
#define HAVE_CATGETS 1
EOF

	       INTLOBJS="\$(CATOBJS)"
	       # Extract the first word of "gencat", so it can be a program name with args.
set dummy gencat; ac_word=$2
echo $ECHO_N "checking for $ac_word... $ECHO_C" 1>&6
echo "configure:14038: checking for $ac_word" 1>&5
if test "${ac_cv_path_GENCAT+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  case "$GENCAT" in
  [/\\]* | ?:[/\\]*)
  ac_cv_path_GENCAT="$GENCAT" # Let the user override the test with a path.
  ;;
  *)
  ac_save_ifs=$IFS; IFS=':'
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f "$ac_dir/$ac_word"; then
      ac_cv_path_GENCAT="$ac_dir/$ac_word"
      break
    fi
  done
  IFS=$ac_save_ifs
  test -z "$ac_cv_path_GENCAT" && ac_cv_path_GENCAT="no"
  ;;
esac
fi
GENCAT="$ac_cv_path_GENCAT"
if test -n "$GENCAT"; then
  echo "$ECHO_T""$GENCAT" 1>&6
else
  echo "$ECHO_T""no" 1>&6
fi
	       if test "$GENCAT" != "no"; then
		 # Extract the first word of "gmsgfmt", so it can be a program name with args.
set dummy gmsgfmt; ac_word=$2
echo $ECHO_N "checking for $ac_word... $ECHO_C" 1>&6
echo "configure:14071: checking for $ac_word" 1>&5
if test "${ac_cv_path_GMSGFMT+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  case "$GMSGFMT" in
  [/\\]* | ?:[/\\]*)
  ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
  ;;
  *)
  ac_save_ifs=$IFS; IFS=':'
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f "$ac_dir/$ac_word"; then
      ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
      break
    fi
  done
  IFS=$ac_save_ifs
  test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="no"
  ;;
esac
fi
GMSGFMT="$ac_cv_path_GMSGFMT"
if test -n "$GMSGFMT"; then
  echo "$ECHO_T""$GMSGFMT" 1>&6
else
  echo "$ECHO_T""no" 1>&6
fi

		 if test "$GMSGFMT" = "no"; then
		   # Extract the first word of "msgfmt", so it can be a program name with args.
set dummy msgfmt; ac_word=$2
echo $ECHO_N "checking for $ac_word... $ECHO_C" 1>&6
echo "configure:14104: checking for $ac_word" 1>&5
if test "${ac_cv_path_GMSGFMT+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  case "$GMSGFMT" in
  /*)
  ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  for ac_dir in $PATH; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
	ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
	break
      fi
    fi
  done
  IFS="$ac_save_ifs"
  test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="no"
  ;;
esac
fi
GMSGFMT="$ac_cv_path_GMSGFMT"
if test -n "$GMSGFMT"; then
  echo "$ECHO_T""$GMSGFMT" 1>&6
else
  echo "$ECHO_T""no" 1>&6
fi

		 fi
		 # Extract the first word of "xgettext", so it can be a program name with args.
set dummy xgettext; ac_word=$2
echo $ECHO_N "checking for $ac_word... $ECHO_C" 1>&6
echo "configure:14138: checking for $ac_word" 1>&5
if test "${ac_cv_path_XGETTEXT+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  case "$XGETTEXT" in
  /*)
  ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  for ac_dir in $PATH; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
	ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
	break
      fi
    fi
  done
  IFS="$ac_save_ifs"
  test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
  ;;
esac
fi
XGETTEXT="$ac_cv_path_XGETTEXT"
if test -n "$XGETTEXT"; then
  echo "$ECHO_T""$XGETTEXT" 1>&6
else
  echo "$ECHO_T""no" 1>&6
fi

		 USE_INCLUDED_LIBINTL=yes
		 CATOBJEXT=.cat
		 INSTOBJEXT=.cat
		 DATADIRNAME=lib
		 INTLDEPS='$(top_builddir)/intl/libintl.a'
		 INTLLIBS=$INTLDEPS
		 LIBS=`echo $LIBS | sed -e 's/-lintl//'`
		 nls_cv_header_intl=intl/libintl.h
		 nls_cv_header_libgt=intl/libgettext.h
	       fi
fi

	  fi
        fi

        if test "$CATOBJEXT" = "NONE"; then
	  	  	  nls_cv_use_gnu_gettext=yes
        fi
      fi

      if test "$nls_cv_use_gnu_gettext" = "yes"; then
                INTLOBJS="\$(GETTOBJS)"
        # Extract the first word of "msgfmt", so it can be a program name with args.
set dummy msgfmt; ac_word=$2
echo $ECHO_N "checking for $ac_word... $ECHO_C" 1>&6
echo "configure:14190: checking for $ac_word" 1>&5
if test "${ac_cv_path_MSGFMT+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  case "$MSGFMT" in
  /*)
  ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  for ac_dir in $PATH; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
	ac_cv_path_MSGFMT="$ac_dir/$ac_word"
	break
      fi
    fi
  done
  IFS="$ac_save_ifs"
  test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt"
  ;;
esac
fi
MSGFMT="$ac_cv_path_MSGFMT"
if test -n "$MSGFMT"; then
  echo "$ECHO_T""$MSGFMT" 1>&6
else
  echo "$ECHO_T""no" 1>&6
fi

        # Extract the first word of "gmsgfmt", so it can be a program name with args.
set dummy gmsgfmt; ac_word=$2
echo $ECHO_N "checking for $ac_word... $ECHO_C" 1>&6
echo "configure:14223: checking for $ac_word" 1>&5
if test "${ac_cv_path_GMSGFMT+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  case "$GMSGFMT" in
  [/\\]* | ?:[/\\]*)
  ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
  ;;
  *)
  ac_save_ifs=$IFS; IFS=':'
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f "$ac_dir/$ac_word"; then
      ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
      break
    fi
  done
  IFS=$ac_save_ifs
  test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
  ;;
esac
fi
GMSGFMT="$ac_cv_path_GMSGFMT"
if test -n "$GMSGFMT"; then
  echo "$ECHO_T""$GMSGFMT" 1>&6
else
  echo "$ECHO_T""no" 1>&6
fi

        # Extract the first word of "xgettext", so it can be a program name with args.
set dummy xgettext; ac_word=$2
echo $ECHO_N "checking for $ac_word... $ECHO_C" 1>&6
echo "configure:14255: checking for $ac_word" 1>&5
if test "${ac_cv_path_XGETTEXT+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else
  case "$XGETTEXT" in
  /*)
  ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  for ac_dir in $PATH; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
	ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
	break
      fi
    fi
  done
  IFS="$ac_save_ifs"
  test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
  ;;
esac
fi
XGETTEXT="$ac_cv_path_XGETTEXT"
if test -n "$XGETTEXT"; then
  echo "$ECHO_T""$XGETTEXT" 1>&6
else
  echo "$ECHO_T""no" 1>&6
fi

	USE_INCLUDED_LIBINTL=yes
        CATOBJEXT=.gmo
        INSTOBJEXT=.mo
        DATADIRNAME=share
	INTLDEPS='$(top_builddir)/intl/libintl.a'
	INTLLIBS=$INTLDEPS
	LIBS=`echo $LIBS | sed -e 's/-lintl//'`
        nls_cv_header_intl=intl/libintl.h
        nls_cv_header_libgt=intl/libgettext.h
      fi

            if test "$XGETTEXT" != ":"; then
			if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
	  : ;
	else
	  echo "$ECHO_T""found xgettext program is not GNU xgettext; ignore it" 1>&6
	  XGETTEXT=":"
	fi
      fi

      # We need to process the po/ directory.
      POSUB=po
    else
      DATADIRNAME=share
      nls_cv_header_intl=intl/libintl.h
      nls_cv_header_libgt=intl/libgettext.h
    fi
    if test -z "$nls_cv_header_intl"; then
      # Clean out junk possibly left behind by a previous configuration.
      rm -f intl/libintl.h
    fi

    # If this is used in GNU gettext we have to set USE_NLS to `yes'
    # because some of the sources are only built for this goal.
    if test "$PACKAGE" = gettext; then
      USE_NLS=yes
      USE_INCLUDED_LIBINTL=yes
    fi

                for lang in $ALL_LINGUAS; do
      GMOFILES="$GMOFILES $lang.gmo"
      POFILES="$POFILES $lang.po"
    done

   if test "x$CATOBJEXT" != "x"; then
     if test "x$ALL_LINGUAS" = "x"; then
       LINGUAS=
     else
       echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" 1>&6
echo "configure:14329: checking for catalogs to be installed" 1>&5
       NEW_LINGUAS=
       for lang in ${LINGUAS=$ALL_LINGUAS}; do
         case "$ALL_LINGUAS" in
          *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
         esac
       done
       LINGUAS=$NEW_LINGUAS
       echo "$ECHO_T""$LINGUAS" 1>&6
     fi

          if test -n "$LINGUAS"; then
       for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
     fi
   fi

            if test $ac_cv_header_locale_h = yes; then
     INCLUDE_LOCALE_H="#include <locale.h>"
   else
     INCLUDE_LOCALE_H="\
/* The system does not provide the header <locale.h>.  Take care yourself.  */"
   fi

            test -d intl || mkdir intl
   if test "$CATOBJEXT" = ".cat"; then
     echo $ECHO_N "checking for linux/version.h... $ECHO_C" 1>&6
echo "configure:14352: checking for linux/version.h" 1>&5
if test "${ac_cv_header_linux_version_h+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" 1>&6
else

cat >conftest.$ac_ext <<EOF
#line 14357 "configure"
#include "confdefs.h"
#include <linux/version.h>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:14362: \"$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
  ac_cv_header_linux_version_h=yes
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_header_linux_version_h=no
fi
rm -f conftest*
fi
echo "$ECHO_T""$ac_cv_header_linux_version_h" 1>&6
if test $ac_cv_header_linux_version_h = yes; then
  msgformat=linux
else
  msgformat=xopen
fi

               sed -e '/^#/d' $srcdir/intl/$msgformat-msg.sed > intl/po2msg.sed
   fi
      sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
     $srcdir/intl/po2tbl.sed.in > intl/po2tbl.sed

            if test "$PACKAGE" = "gettext"; then
     GT_NO="#NO#"
     GT_YES=
   else
     GT_NO=
     GT_YES="#YES#"
   fi

            MKINSTALLDIRS=
   if test -n "$ac_aux_dir"; then
     MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
   fi
   if test -z "$MKINSTALLDIRS"; then
     MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
   fi

      l=

         test -d po || mkdir po
   case "$srcdir" in
   .)
     posrcprefix="../" ;;
   /* | [A-Za-z]:*)
     posrcprefix="$srcdir/" ;;
   *)
     posrcprefix="../$srcdir/" ;;
   esac
   rm -f po/POTFILES
   sed -e "/^#/d" -e "/^\$/d" -e "s,.*,	$posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
	< $srcdir/po/POTFILES.in > po/POTFILES

# This is necessary so that .o files in LIBOBJS are also built via
# the ANSI2KNR-filtering rules.
LIBOBJS=`echo $LIBOBJS|sed 's/\.o /\$U.o /g;s/\.o$/\$U.o/'`

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

DEFS=-DHAVE_CONFIG_H

: ${CONFIG_STATUS=./config.status}
trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
echo creating $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.

# Files that config.status was made for.
config_files="\\
  Makefile doc/Makefile intl/Makefile lib/Makefile man/Makefile m4/Makefile
  po/Makefile.in src/Makefile tests/Makefile tests/basename/Makefile
  tests/date/Makefile tests/factor/Makefile tests/seq/Makefile
  tests/stty/Makefile tests/test/Makefile"
config_headers="\\
  config.h"
config_links="\\
  $nls_cv_header_intl:$nls_cv_header_libgt"
config_commands="\\
  default-1 default-2 default-3"

ac_cs_usage="\\
\\\`$CONFIG_STATUS' instantiates files from templates according to the
current configuration.

Usage: $CONFIG_STATUS [OPTIONS] FILE...

  --recheck    Update $CONFIG_STATUS by reconfiguring in the same conditions
  --version    Print the version of Autoconf and exit
  --help       Display this help and exit
  --file=FILE[:TEMPLATE]
               Instantiate the configuration file FILE
  --header=FILE[:TEMPLATE]
               Instantiate the configuration header FILE

Configuration files:
\$config_files

Configuration headers:
\$config_headers

Configuration links:
\$config_links

Configuration commands:
\$config_commands

Report bugs to <bug-autoconf@gnu.org>."

ac_cs_version="\\
$CONFIG_STATUS generated by autoconf version 2.14a.
Configured on host `(hostname || uname -n) 2>/dev/null | sed 1q` by
  `echo "$0 $ac_configure_args" | sed 's/[\\"\`\$]/\\\\&/g'`"

# Root of the tmp file names.  Use pid to allow concurrent executions.
ac_cs_root=cs\$\$
ac_given_srcdir=$srcdir
ac_given_INSTALL="$INSTALL"

# If no file are specified by the user, then we need to provide default
# value.  By we need to know if files were specified by the user.
ac_need_defaults=:
while test \$# != 0
do
  case "\$1" in
  --*=*)
    ac_option=\`echo "\$1" | sed -e 's/=.*//'\`
    ac_optarg=\`echo "\$1" | sed -e 's/[^=]*=//'\`
    shift
    set dummy "\$ac_option" "\$ac_optarg" \${1+"\$@"}
    shift
    ;;
  -*);;
  *) # This is not an option, so the user has probably given explicit
     # arguments.
     ac_need_defaults=false;;
  esac

  case "\$1" in

  # Handling of the options.
  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
    echo "running \${CONFIG_SHELL-/bin/sh} $0 `echo "$ac_configure_args" | sed 's/[\\"\`\$]/\\\\&/g'` --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 "\$ac_cs_version"; exit 0 ;;
  --he | --h)
    # Conflict between --help and --header
    echo "$CONFIG_STATUS: ambiguous option: \$ac_option
Try \\\`$CONFIG_STATUS --help' for more information."; exit 1 ;;
  -help | --help | --hel )
    echo "\$ac_cs_usage"; exit 0 ;;
  --file | --fil | --fi | --f )
    shift
    CONFIG_FILES="\$CONFIG_FILES \$1"
    ac_need_defaults=false;;
  --header | --heade | --head | --hea )
    shift
    CONFIG_HEADERS="\$CONFIG_FILES \$1"
    ac_need_defaults=false;;

  # Handling of arguments.
  'Makefile' ) CONFIG_FILES="\$CONFIG_FILES Makefile" ;;
  'doc/Makefile' ) CONFIG_FILES="\$CONFIG_FILES doc/Makefile" ;;
  'intl/Makefile' ) CONFIG_FILES="\$CONFIG_FILES intl/Makefile" ;;
  'lib/Makefile' ) CONFIG_FILES="\$CONFIG_FILES lib/Makefile" ;;
  'man/Makefile' ) CONFIG_FILES="\$CONFIG_FILES man/Makefile" ;;
  'm4/Makefile' ) CONFIG_FILES="\$CONFIG_FILES m4/Makefile" ;;
  'po/Makefile.in' ) CONFIG_FILES="\$CONFIG_FILES po/Makefile.in" ;;
  'src/Makefile' ) CONFIG_FILES="\$CONFIG_FILES src/Makefile" ;;
  'tests/Makefile' ) CONFIG_FILES="\$CONFIG_FILES tests/Makefile" ;;
  'tests/basename/Makefile' ) CONFIG_FILES="\$CONFIG_FILES tests/basename/Makefile" ;;
  'tests/date/Makefile' ) CONFIG_FILES="\$CONFIG_FILES tests/date/Makefile" ;;
  'tests/factor/Makefile' ) CONFIG_FILES="\$CONFIG_FILES tests/factor/Makefile" ;;
  'tests/seq/Makefile' ) CONFIG_FILES="\$CONFIG_FILES tests/seq/Makefile" ;;
  'tests/stty/Makefile' ) CONFIG_FILES="\$CONFIG_FILES tests/stty/Makefile" ;;
  'tests/test/Makefile' ) CONFIG_FILES="\$CONFIG_FILES tests/test/Makefile" ;;
  '$nls_cv_header_intl' ) CONFIG_LINKS="\$CONFIG_LINKS $nls_cv_header_intl:$nls_cv_header_libgt" ;;
  'default-1' ) CONFIG_COMMANDS="\$CONFIG_COMMANDS default-1" ;;
  'default-2' ) CONFIG_COMMANDS="\$CONFIG_COMMANDS default-2" ;;
  'default-3' ) CONFIG_COMMANDS="\$CONFIG_COMMANDS default-3" ;;
  'config.h' ) CONFIG_HEADERS="\$CONFIG_HEADERS config.h" ;;

  # This is an error.
  -*) echo "$CONFIG_STATUS: unrecognized option: \$1
Try \\\`$CONFIG_STATUS --help' for more information."; exit 1 ;;
  *) echo "$CONFIG_STATUS: invalid argument: \$1"; exit 1 ;;
  esac
  shift
done

EOF

cat >>$CONFIG_STATUS <<\EOF
# If the user did not use the arguments to specify the items to instantiate,
# then the envvar interface is used.  Set only those that are not.
if $ac_need_defaults; then
  : ${CONFIG_FILES=$config_files}
  : ${CONFIG_HEADERS=$config_headers}
  : ${CONFIG_LINKS=$config_links}
  : ${CONFIG_COMMANDS=$config_commands}
fi

# Trap to remove the temp files.
trap 'rm -fr $ac_cs_root*; exit 1' 1 2 15

EOF

cat >>$CONFIG_STATUS <<EOF
#
# INIT-COMMANDS section.
#

AMDEP="$AMDEP"
ac_aux_dir="$ac_aux_dir"

EOF

cat >>$CONFIG_STATUS <<EOF

#
# CONFIG_FILES section.
#

# No need to generate the scripts if there are no CONFIG_FILES.
# This happens for instance when ./config.status config.h
if test -n "\$CONFIG_FILES"; then
  # Protect against being on the right side of a sed subst in config.status.
  sed 's/%@/@@/; s/@%/@@/; s/%;t t\$/@;t t/; /@;t t\$/s/[\\\\&%]/\\\\&/g;
   s/@@/%@/; s/@@/@%/; s/@;t t\$/%;t t/' >\$ac_cs_root.subs <<\\CEOF
s%@SHELL@%$SHELL%;t t
s%@exec_prefix@%$exec_prefix%;t t
s%@prefix@%$prefix%;t t
s%@program_transform_name@%$program_transform_name%;t t
s%@bindir@%$bindir%;t t
s%@sbindir@%$sbindir%;t t
s%@libexecdir@%$libexecdir%;t t
s%@datadir@%$datadir%;t t
s%@sysconfdir@%$sysconfdir%;t t
s%@sharedstatedir@%$sharedstatedir%;t t
s%@localstatedir@%$localstatedir%;t t
s%@libdir@%$libdir%;t t
s%@includedir@%$includedir%;t t
s%@oldincludedir@%$oldincludedir%;t t
s%@infodir@%$infodir%;t t
s%@mandir@%$mandir%;t t
s%@ECHO_C@%$ECHO_C%;t t
s%@ECHO_N@%$ECHO_N%;t t
s%@ECHO_T@%$ECHO_T%;t t
s%@CFLAGS@%$CFLAGS%;t t
s%@CPPFLAGS@%$CPPFLAGS%;t t
s%@CXXFLAGS@%$CXXFLAGS%;t t
s%@FFLAGS@%$FFLAGS%;t t
s%@DEFS@%$DEFS%;t t
s%@LDFLAGS@%$LDFLAGS%;t t
s%@LIBS@%$LIBS%;t t
s%@host@%$host%;t t
s%@host_alias@%$host_alias%;t t
s%@host_cpu@%$host_cpu%;t t
s%@host_vendor@%$host_vendor%;t t
s%@host_os@%$host_os%;t t
s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%;t t
s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%;t t
s%@INSTALL_DATA@%$INSTALL_DATA%;t t
s%@PACKAGE@%$PACKAGE%;t t
s%@VERSION@%$VERSION%;t t
s%@ACLOCAL@%$ACLOCAL%;t t
s%@AUTOCONF@%$AUTOCONF%;t t
s%@AUTOMAKE@%$AUTOMAKE%;t t
s%@AUTOHEADER@%$AUTOHEADER%;t t
s%@MAKEINFO@%$MAKEINFO%;t t
s%@AMTAR@%$AMTAR%;t t
s%@install_sh@%$install_sh%;t t
s%@AWK@%$AWK%;t t
s%@SET_MAKE@%$SET_MAKE%;t t
s%@AMDEP@%$AMDEP%;t t
s%@AMDEPBACKSLASH@%$AMDEPBACKSLASH%;t t
s%@DEPDIR@%$DEPDIR%;t t
s%@PERL@%$PERL%;t t
s%@CC@%$CC%;t t
s%@CPP@%$CPP%;t t
s%@CCDEPMODE@%$CCDEPMODE%;t t
s%@RANLIB@%$RANLIB%;t t
s%@build@%$build%;t t
s%@build_alias@%$build_alias%;t t
s%@build_cpu@%$build_cpu%;t t
s%@build_vendor@%$build_vendor%;t t
s%@build_os@%$build_os%;t t
s%@GETCONF@%$GETCONF%;t t
s%@U@%$U%;t t
s%@ANSI2KNR@%$ANSI2KNR%;t t
s%@LIBOBJS@%$LIBOBJS%;t t
s%@GNU_PACKAGE@%$GNU_PACKAGE%;t t
s%@OPTIONAL_BIN_PROGS@%$OPTIONAL_BIN_PROGS%;t t
s%@OPTIONAL_BIN_ZCRIPTS@%$OPTIONAL_BIN_ZCRIPTS%;t t
s%@MAN@%$MAN%;t t
s%@DF_PROG@%$DF_PROG%;t t
s%@YACC@%$YACC%;t t
s%@ALLOCA@%$ALLOCA%;t t
s%@NEED_SETGID@%$NEED_SETGID%;t t
s%@KMEM_GROUP@%$KMEM_GROUP%;t t
s%@GETLOADAVG_LIBS@%$GETLOADAVG_LIBS%;t t
s%@POW_LIBM@%$POW_LIBM%;t t
s%@LIBICONV@%$LIBICONV%;t t
s%@SQRT_LIBM@%$SQRT_LIBM%;t t
s%@FESETROUND_LIBM@%$FESETROUND_LIBM%;t t
s%@LIB_CRYPT@%$LIB_CRYPT%;t t
s%@USE_NLS@%$USE_NLS%;t t
s%@MSGFMT@%$MSGFMT%;t t
s%@GMSGFMT@%$GMSGFMT%;t t
s%@XGETTEXT@%$XGETTEXT%;t t
s%@GENCAT@%$GENCAT%;t t
s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%;t t
s%@CATALOGS@%$CATALOGS%;t t
s%@CATOBJEXT@%$CATOBJEXT%;t t
s%@DATADIRNAME@%$DATADIRNAME%;t t
s%@GMOFILES@%$GMOFILES%;t t
s%@INSTOBJEXT@%$INSTOBJEXT%;t t
s%@INTLDEPS@%$INTLDEPS%;t t
s%@INTLLIBS@%$INTLLIBS%;t t
s%@INTLOBJS@%$INTLOBJS%;t t
s%@POFILES@%$POFILES%;t t
s%@POSUB@%$POSUB%;t t
s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%;t t
s%@GT_NO@%$GT_NO%;t t
s%@GT_YES@%$GT_YES%;t t
s%@MKINSTALLDIRS@%$MKINSTALLDIRS%;t t
s%@l@%$l%;t t
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_lines=48
  ac_sed_frag=1 # Number of current file.
  ac_beg=1 # First line for current file.
  ac_end=$ac_max_sed_lines # 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" $ac_cs_root.subs >$ac_cs_root.sfrag
    else
      sed "${ac_end}q" $ac_cs_root.subs >$ac_cs_root.sfrag
    fi
    if test ! -s $ac_cs_root.sfrag; then
      ac_more_lines=false
      rm -f $ac_cs_root.sfrag
    else
      # The purpose of the label and of the branching condition is to
      # speed up the sed processing (if there are no `@' at all, there
      # is no need to browse any of the substitutions).
      # These are the two extra sed commands mentioned above.
      (echo ':t
  /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $ac_cs_root.sfrag) >$ac_cs_root.s$ac_sed_frag
      if test -z "$ac_sed_cmds"; then
  	ac_sed_cmds="sed -f $ac_cs_root.s$ac_sed_frag"
      else
  	ac_sed_cmds="$ac_sed_cmds | sed -f $ac_cs_root.s$ac_sed_frag"
      fi
      ac_sed_frag=`expr $ac_sed_frag + 1`
      ac_beg=$ac_end
      ac_end=`expr $ac_end + $ac_max_sed_lines`
    fi
  done
  if test -z "$ac_sed_cmds"; then
    ac_sed_cmds=cat
  fi
fi # test -n "$CONFIG_FILES"

EOF
cat >>$CONFIG_STATUS <<\EOF
for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
  # 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
  *[Mm]akefile*) ac_comsub="1i\\
# $configure_input" ;;
  *) ac_comsub= ;;
  esac

  # Don't redirect the output to AC_FILE directly: use `mv' so that updating
  # is atomic, and doesn't need trapping.
  ac_file_inputs=`echo "$ac_file_in" |
                  sed -e "s%^%$ac_given_srcdir/%;s%:% $ac_given_srcdir/%g"`
  for ac_file_input in $ac_file_inputs;
  do
    test -f "$ac_file_input" ||
        { echo "configure: error: cannot find input file \`$ac_file_input'" 1>&2; exit 1; }
  done
EOF
cat >>$CONFIG_STATUS <<EOF
  sed -e "$ac_comsub
$ac_vpsub
$extrasub
EOF
cat >>$CONFIG_STATUS <<\EOF
:t
/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
s%@configure_input@%$configure_input%;t t
s%@srcdir@%$srcdir%;t t
s%@top_srcdir@%$top_srcdir%;t t
s%@INSTALL@%$INSTALL%;t t
" $ac_file_inputs | (eval "$ac_sed_cmds") >$ac_cs_root.out
  mv $ac_cs_root.out $ac_file

done
rm -f $ac_cs_root.s*
EOF
cat >>$CONFIG_STATUS <<\EOF

#
# CONFIG_HEADER section.
#

# 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=' '
ac_dD='%;t'
# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
ac_uA='s%^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
ac_uB='$%\1#\2define\3'
ac_uC=' '
ac_uD='%;t'

for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
  # 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 $ac_cs_root.frag $ac_cs_root.in $ac_cs_root.out
  ac_file_inputs=`echo "$ac_file_in" |
                  sed -e "s%^%$ac_given_srcdir/%;s%:% $ac_given_srcdir/%g"`
    for ac_file_input in $ac_file_inputs;
  do
    test -f "$ac_file_input" ||
        { echo "configure: error: cannot find input file \`$ac_file_input'" 1>&2; exit 1; }
  done
  # Remove the trailing spaces.
  sed -e 's/[ 	]*$//' $ac_file_inputs >$ac_cs_root.in

EOF

# Transform confdefs.h into two sed scripts, `conftest.defines' and
# `conftest.undefs', that substitutes the proper values into
# config.h.in to produce config.h.  The first handles `#define'
# templates, and the second `#undef' templates.
# 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.defines conftest.undefs
cat >$ac_cs_root.hdr <<\EOF
s/[\\&%]/\\&/g
s%[\\$`]%\\&%g
t clear
: clear
s%^[ 	]*#[ 	]*define[ 	][ 	]*\(\([^ 	(][^ 	(]*\)([^)]*)\)[ 	]*\(.*\)$%${ac_dA}\2${ac_dB}\1${ac_dC}\3${ac_dD}%gp
t cleanup
s%^[ 	]*#[ 	]*define[ 	][ 	]*\([^ 	][^ 	]*\)[ 	]*\(.*\)$%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
: cleanup
EOF
# If some macros were called several times there might be several times
# the same #defines, which is useless.  Nevertheless, we may not want to
# sort them, since we want the *last* AC_DEFINE to be honored.
uniq confdefs.h | sed -n -f $ac_cs_root.hdr >conftest.defines
sed -e 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
rm -f $ac_cs_root.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.undefs <<\EOF
s%^[ 	]*#[ 	]*undef[ 	][ 	]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
EOF

# Break up conftest.defines because some shells have a limit on the size
# of here documents, and old seds have small limits too (100 cmds).
echo '  # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
echo '  if egrep "^[ 	]*#[ 	]*define" $ac_cs_root.in >/dev/null; then' >>$CONFIG_STATUS
echo '  # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
echo '  :' >>$CONFIG_STATUS
rm -f conftest.tail
while grep . conftest.defines >/dev/null
do
  # Write a limited-size here document to $ac_cs_root.frag.
  echo '  cat >$ac_cs_root.frag <<CEOF' >>$CONFIG_STATUS
  echo '/^[ 	]*#[ 	]*define/!b' >>$CONFIG_STATUS
  sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
  echo 'CEOF
  sed -f $ac_cs_root.frag $ac_cs_root.in >$ac_cs_root.out
  rm -f $ac_cs_root.in
  mv $ac_cs_root.out $ac_cs_root.in
' >>$CONFIG_STATUS
  sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
  rm -f conftest.defines
  mv conftest.tail conftest.defines
done
rm -f conftest.defines
echo '  fi # egrep' >>$CONFIG_STATUS
echo >>$CONFIG_STATUS

# Break up conftest.undefs because some shells have a limit on the size
# of here documents, and old seds have small limits too (100 cmds).
echo '  # Handle all the #undef templates' >>$CONFIG_STATUS
rm -f conftest.tail
while grep . conftest.undefs >/dev/null
do
  # Write a limited-size here document to $ac_cs_root.frag.
  echo '  cat >$ac_cs_root.frag <<CEOF' >>$CONFIG_STATUS
  echo '/^[ 	]*#[ 	]*undef/!b' >>$CONFIG_STATUS
  sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
  echo 'CEOF
  sed -f $ac_cs_root.frag $ac_cs_root.in >$ac_cs_root.out
  rm -f $ac_cs_root.in
  mv $ac_cs_root.out $ac_cs_root.in
' >>$CONFIG_STATUS
  sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
  rm -f conftest.undefs
  mv conftest.tail conftest.undefs
done
rm -f conftest.undefs

cat >>$CONFIG_STATUS <<\EOF
  rm -f $ac_cs_root.frag $ac_cs_root.h
  echo "/* $ac_file.  Generated automatically by configure.  */" >$ac_cs_root.h
  cat $ac_cs_root.in >>$ac_cs_root.h
  rm -f $ac_cs_root.in
  if cmp -s $ac_file $ac_cs_root.h 2>/dev/null; then
    echo "$ac_file is unchanged"
    rm -f $ac_cs_root.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 $ac_cs_root.h $ac_file
  fi
done
EOF
cat >>$CONFIG_STATUS <<\EOF

#
# CONFIG_LINKS section.
#
srcdir=$ac_given_srcdir

for ac_file in : $CONFIG_LINKS; do test "x$ac_file" = x: && continue
  ac_dest=`echo "$ac_file" | sed 's%:.*%%'`
  ac_source=`echo "$ac_file" | sed 's%[^:]*:%%'`

  echo "linking $srcdir/$ac_source to $ac_dest"

  if test ! -r $srcdir/$ac_source; then
    { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
  fi
  rm -f $ac_dest

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

  case "$srcdir" in
  [/\\$]* | ?:[/\\]* ) ac_rel_source="$srcdir/$ac_source" ;;
      *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
  esac

  # Make a symlink if possible; otherwise try a hard link.
  if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
     ln $srcdir/$ac_source $ac_dest; then :
  else
    { echo "configure: error: cannot link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
  fi
done
EOF
cat >>$CONFIG_STATUS <<\EOF

#
# CONFIG_COMMANDS section.
#
for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
  ac_dest=`echo "$ac_file" | sed 's%:.*%%'`
  ac_source=`echo "$ac_file" | sed 's%[^:]*:%%'`

  case "$ac_dest" in
    default-1 ) test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h ;;
    default-2 )
test x"$AMDEP" != x"" ||
for mf in $CONFIG_FILES; do
  case "$mf" in
  Makefile) dirpart=.;;
  */Makefile) dirpart=`echo "$mf" | sed -e 's|/[^/]*$||'`;;
  *) continue;;
  esac
  grep '^DEP_FILES *= *[^ #]' < "$mf" > /dev/null || continue
  # Extract the definition of DEP_FILES from the Makefile without
  # running `make'.
  DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
  test -z "$DEPDIR" && continue
  # When using ansi2knr, U may be empty or an underscore; expand it
  U=`sed -n -e '/^U = / s///p' < "$mf"`
  test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
  # We invoke sed twice because it is the simplest approach to
  # changing $(DEPDIR) to its actual value in the expansion.
  for file in `sed -n -e '
    /^DEP_FILES = .*\\\\$/ {
      s/^DEP_FILES = //
      :loop
	s/\\\\$//
	p
	n
	/\\\\$/ b loop
      p
    }
    /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
    # Make sure the directory exists.
    test -f "$dirpart/$file" && continue
    fdir=`echo "$file" | sed -e 's|/[^/]*$||'`
    $ac_aux_dir/mkinstalldirs "$dirpart/$fdir" > /dev/null 2>&1
    # echo "creating $dirpart/$file"
    echo '# dummy' > "$dirpart/$file"
  done
done
 ;;
    default-3 ) case "$CONFIG_FILES" in *po/Makefile.in*)
        sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
      esac ;;
  esac
done
EOF

cat >>$CONFIG_STATUS <<\EOF

exit 0
EOF
chmod +x $CONFIG_STATUS
rm -fr confdefs* $ac_clean_files
trap 'exit 1' 1 2 15

test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1

