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

# Defaults:
ac_arg_with_help=
ac_arg_enable_help=
ac_arg_var_help=
ac_default_prefix=/usr/local
# Factorizing 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_UNISTD_H
# include <unistd.h>
#endif"
# Any additions from configure.in:
ac_arg_enable_help="$ac_arg_enable_help
  --disable-dependency-tracking Speeds up one-time builds
  --enable-dependency-tracking  Do not reject slow dependency extractors"
ac_arg_var_help="$ac_arg_var_help
  CFLAGS      Extra flags for the C compiler"
ac_arg_enable_help="$ac_arg_enable_help
  --disable-largefile     omit support for large files"
ac_arg_with_help="$ac_arg_with_help
  --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)"
ac_arg_enable_help="$ac_arg_enable_help
  --disable-assert        turn off assertions"
ac_arg_enable_help="$ac_arg_enable_help
  --disable-nls           do not use Native Language Support"
ac_arg_with_help="$ac_arg_with_help
  --with-included-gettext use the GNU gettext library included here"
ac_arg_with_help="$ac_arg_with_help
  --with-catgets          use catgets functions if available"

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

# Initialize some other variables.
subdirs=
MFLAGS= MAKEFLAGS=
SHELL=${CONFIG_SHELL-/bin/sh}
# Maximum number of lines to put in a shell here document.
: ${ac_max_here_lines=12}
# 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'

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

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

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

X features:
  --x-includes=DIR    X include files are in DIR
  --x-libraries=DIR   X library files are in DIR
EOF
    test -n "$ac_arg_enable_help" && echo "
Optional features:
  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]\
$ac_arg_enable_help"
    test -n "$ac_arg_with_help" && echo "
Optional packages:
  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)\
$ac_arg_with_help"
    test -n "$ac_arg_var_help" && echo "
Some influent environment variables:$ac_arg_var_help"
    exit 0 ;;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  -with-* | --with-*)
    ac_package=`echo "$ac_option"|sed -e 's/-*with-//' -e 's/=.*//'`
    # Reject names that are not valid shell variable names.
    if echo "$ac_feature" | 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_feature" | 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_feature" | 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

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

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

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

# Strip out --no-create and --no-recursion so they do not pile up.
# Also quote any args containing shell 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

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

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

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

# Find the source files, if location was not specified.
if test -z "$srcdir"; then
  ac_srcdir_defaulted=yes
  # Try the directory containing this script, then its parent.
  ac_prog=$0
  ac_confdir=`echo "$ac_prog"|sed 's%/[^/][^/]*$%%'`
  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
  srcdir=$ac_confdir
  if test ! -r $srcdir/$ac_unique_file; then
    srcdir=..
  fi
else
  ac_srcdir_defaulted=no
fi
if test ! -r $srcdir/$ac_unique_file; then
  if test "$ac_srcdir_defaulted" = yes; then
    { echo "configure: error: 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%'`

# 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

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

               ac_aux_dir=
for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
  if test -f $ac_dir/install-sh; then
    ac_aux_dir=$ac_dir
    ac_install_sh="$ac_aux_dir/install-sh -c"
    break
  elif test -f $ac_dir/install.sh; then
    ac_aux_dir=$ac_dir
    ac_install_sh="$ac_aux_dir/install.sh -c"
    break
  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 $ac_n "checking host system type... $ac_c" 1>&6
echo "configure:622: 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 $ac_n "(cached) $ac_c" 1>&6
fi

echo "$ac_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 $ac_n "checking for a BSD compatible install... $ac_c" 1>&6
echo "configure:669: checking for a BSD compatible install" 1>&5
if test -z "$INSTALL"; then
if test "${ac_cv_path_install+set}" = set; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
    IFS="${IFS= 	}"; ac_save_IFS="$IFS"; IFS=":"
  for ac_dir in $PATH; do
    # Account for people who put trailing slashes in PATH elements.
    case "$ac_dir/" in
    /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
    *)
      # OSF1 and SCO ODT 3.0 have their own names for install.
      # Don't use installbsd from OSF since it installs stuff as root
      # by default.
      for ac_prog in ginstall scoinst install; do
        if test -f $ac_dir/$ac_prog; then
	  if test $ac_prog = install &&
            grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
	    # AIX install.  It has an incompatible calling convention.
	    :
	  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 "$ac_t""$INSTALL" 1>&6

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

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

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

echo $ac_n "checking whether build environment is sane... $ac_c" 1>&6
echo "configure:726: 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 "$ac_t""yes" 1>&6
if test "$program_transform_name" = s,x,x,; then
  program_transform_name=
else
  # Double any \ or $.  echo might interpret backslashes.
  cat <<\EOF_SED >conftestsed
s,\\,\\\\,g; s,\$,$$,g
EOF_SED
  program_transform_name=`echo $program_transform_name|sed -f conftestsed`
  rm -f conftestsed
fi
test "$program_prefix" != NONE &&
  program_transform_name="s,^,${program_prefix},;$program_transform_name"
# Use a double $ so make ignores it.
test "$program_suffix" != NONE &&
  program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"

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

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=
  echo "configure: warning: \`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 $ac_n "checking for $ac_word... $ac_c" 1>&6
echo "configure:796: checking for $ac_word" 1>&5
if test "${ac_cv_prog_AWK+set}" = set; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$AWK"; then
  ac_cv_prog_AWK="$AWK" # Let the user override the test.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_prog_AWK="$ac_prog"
      break
    fi
  done
  IFS="$ac_save_ifs"
fi
fi
AWK="$ac_cv_prog_AWK"
if test -n "$AWK"; then
  echo "$ac_t""$AWK" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

test -n "$AWK" && break
done

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

# 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=textutils

VERSION=2.0d

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 ja ko nl no pl pt_BR ru sk sv zh"

      echo $ac_n "checking for perl5.003 or newer... $ac_c" 1>&6
echo "configure:930: 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 "$ac_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 $ac_n "checking for $ac_word... $ac_c" 1>&6
echo "configure:968: checking for $ac_word" 1>&5
if test "${ac_cv_prog_CC+set}" = set; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$CC"; then
  ac_cv_prog_CC="$CC" # Let the user override the test.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_prog_CC="gcc"
      break
    fi
  done
  IFS="$ac_save_ifs"
fi
fi
CC="$ac_cv_prog_CC"
if test -n "$CC"; then
  echo "$ac_t""$CC" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

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

    if test -z "$CC"; then
      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 $ac_n "checking for $ac_word... $ac_c" 1>&6
echo "configure:1049: checking for $ac_word" 1>&5
if test "${ac_cv_prog_CC+set}" = set; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$CC"; then
  ac_cv_prog_CC="$CC" # Let the user override the test.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_prog_CC="$ac_prog"
      break
    fi
  done
  IFS="$ac_save_ifs"
fi
fi
CC="$ac_cv_prog_CC"
if test -n "$CC"; then
  echo "$ac_t""$CC" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

test -n "$CC" && break
done

    fi
  fi

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

echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works... $ac_c" 1>&6
echo "configure:1084: 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 1095 "configure"
#include "confdefs.h"

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

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

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

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

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

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

echo $ac_n "checking how to run the C preprocessor... $ac_c" 1>&6
echo "configure:1189: 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 $ac_n "(cached) $ac_c" 1>&6
else
    # This must be in double quotes, not single quotes, because CPP may get
  # substituted into the Makefile and "${CC-cc}" will confuse make.
  CPP="${CC-cc} -E"
  # On the NeXT, cc -E runs the code through the compiler's parser,
  # not just through cpp.
  cat >conftest.$ac_ext <<EOF
#line 1204 "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:1210: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  :
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  CPP="${CC-cc} -E -traditional-cpp"
  cat >conftest.$ac_ext <<EOF
#line 1221 "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:1227: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  :
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  CPP="${CC-cc} -nologo -E"
  cat >conftest.$ac_ext <<EOF
#line 1238 "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:1244: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  :
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  CPP=/lib/cpp
fi
rm -f conftest*
fi
rm -f conftest*
fi
rm -f conftest*
  ac_cv_prog_CPP="$CPP"
fi
  CPP="$ac_cv_prog_CPP"
else
  ac_cv_prog_CPP="$CPP"
fi
echo "$ac_t""$CPP" 1>&6

depcc="$CC"
depcpp="$CPP"
echo $ac_n "checking dependency style of $depcc... $ac_c" 1>&6
echo "configure:1271: checking dependency style of $depcc" 1>&5
if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then
  echo $ac_n "(cached) $ac_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 "$ac_t""$am_cv_CC_dependencies_compiler_type" 1>&6
CCDEPMODE="depmode=$am_cv_CC_dependencies_compiler_type"

echo $ac_n "checking how to run the C preprocessor... $ac_c" 1>&6
echo "configure:1315: 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 $ac_n "(cached) $ac_c" 1>&6
else
    # This must be in double quotes, not single quotes, because CPP may get
  # substituted into the Makefile and "${CC-cc}" will confuse make.
  CPP="${CC-cc} -E"
  # On the NeXT, cc -E runs the code through the compiler's parser,
  # not just through cpp.
  cat >conftest.$ac_ext <<EOF
#line 1330 "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:1336: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  :
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  CPP="${CC-cc} -E -traditional-cpp"
  cat >conftest.$ac_ext <<EOF
#line 1347 "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:1353: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  :
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  CPP="${CC-cc} -nologo -E"
  cat >conftest.$ac_ext <<EOF
#line 1364 "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:1370: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  :
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  CPP=/lib/cpp
fi
rm -f conftest*
fi
rm -f conftest*
fi
rm -f conftest*
  ac_cv_prog_CPP="$CPP"
fi
  CPP="$ac_cv_prog_CPP"
else
  ac_cv_prog_CPP="$CPP"
fi
echo "$ac_t""$CPP" 1>&6

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

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

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

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

echo $ac_n "checking for AIX... $ac_c" 1>&6
echo "configure:1470: checking for AIX" 1>&5
cat >conftest.$ac_ext <<EOF
#line 1472 "configure"
#include "confdefs.h"
#ifdef _AIX
  yes
#endif

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

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

echo $ac_n "checking for minix/config.h... $ac_c" 1>&6
echo "configure:1494: checking for minix/config.h" 1>&5
if test "${ac_cv_header_minix_config_h+set}" = set; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 1499 "configure"
#include "confdefs.h"
#include <minix/config.h>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1505: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  ac_cv_header_minix_config_h=yes
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_header_minix_config_h=no
fi
rm -f conftest*
fi
echo "$ac_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 $ac_n "checking build system type... $ac_c" 1>&6
echo "configure:1542: 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 $ac_n "(cached) $ac_c" 1>&6
fi

echo "$ac_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 $ac_n "checking for $ac_word... $ac_c" 1>&6
echo "configure:1592: checking for $ac_word" 1>&5
if test "${ac_cv_prog_GETCONF+set}" = set; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$GETCONF"; then
  ac_cv_prog_GETCONF="$GETCONF" # Let the user override the test.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_prog_GETCONF="${ac_tool_prefix}getconf"
      break
    fi
  done
  IFS="$ac_save_ifs"
  test -z "$ac_cv_prog_GETCONF" && ac_cv_prog_GETCONF="getconf"
fi
fi
GETCONF="$ac_cv_prog_GETCONF"
if test -n "$GETCONF"; then
  echo "$ac_t""$GETCONF" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

     echo $ac_n "checking for CFLAGS value to request large file support... $ac_c" 1>&6
echo "configure:1620: checking for CFLAGS value to request large file support" 1>&5
if test "${ac_cv_sys_largefile_CFLAGS+set}" = set; then
  echo $ac_n "(cached) $ac_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 1646 "configure"
#include "confdefs.h"

int
main()
{

  ;
  return 0;
}
EOF
if { (eval echo configure:1657: \"$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
  rm -rf conftest*
  ac_cv_sys_largefile_CFLAGS=no
fi
rm -f conftest*

	     CC="$ac_save_CC"
	   fi
      fi
      rm -f conftest*
fi
echo "$ac_t""$ac_cv_sys_largefile_CFLAGS" 1>&6
     echo $ac_n "checking for LDFLAGS value to request large file support... $ac_c" 1>&6
echo "configure:1674: checking for LDFLAGS value to request large file support" 1>&5
if test "${ac_cv_sys_largefile_LDFLAGS+set}" = set; then
  echo $ac_n "(cached) $ac_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 "$ac_t""$ac_cv_sys_largefile_LDFLAGS" 1>&6
     echo $ac_n "checking for LIBS value to request large file support... $ac_c" 1>&6
echo "configure:1689: checking for LIBS value to request large file support" 1>&5
if test "${ac_cv_sys_largefile_LIBS+set}" = set; then
  echo $ac_n "(cached) $ac_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 "$ac_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 $ac_n "checking for _FILE_OFFSET_BITS... $ac_c" 1>&6
echo "configure:1747: checking for _FILE_OFFSET_BITS" 1>&5
if test "${ac_cv_sys_file_offset_bits+set}" = set; then
  echo $ac_n "(cached) $ac_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 "$ac_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 $ac_n "checking for _LARGEFILE_SOURCE... $ac_c" 1>&6
echo "configure:1775: checking for _LARGEFILE_SOURCE" 1>&5
if test "${ac_cv_sys_largefile_source+set}" = set; then
  echo $ac_n "(cached) $ac_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 "$ac_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 $ac_n "checking for _LARGE_FILES... $ac_c" 1>&6
echo "configure:1803: checking for _LARGE_FILES" 1>&5
if test "${ac_cv_sys_large_files+set}" = set; then
  echo $ac_n "(cached) $ac_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 "$ac_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 $ac_n "checking for ${CC-cc} option to accept ANSI C... $ac_c" 1>&6
echo "configure:1834: checking for ${CC-cc} option to accept ANSI C" 1>&5
if test "${am_cv_prog_cc_stdc+set}" = set; then
  echo $ac_n "(cached) $ac_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 1851 "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:1892: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  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 "$ac_t""none needed" 1>&6
else
  echo "$ac_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 $ac_n "checking for function prototypes... $ac_c" 1>&6
echo "configure:1916: checking for function prototypes" 1>&5
if test "$am_cv_prog_cc_stdc" != no; then
  echo "$ac_t""yes" 1>&6
  cat >>confdefs.h <<\EOF
#define PROTOTYPES 1
EOF

  U= ANSI2KNR=
else
  echo "$ac_t""no" 1>&6
  U=_ ANSI2KNR=./ansi2knr
  # Ensure some checks needed by ansi2knr itself.
  echo $ac_n "checking for ANSI C header files... $ac_c" 1>&6
echo "configure:1929: checking for ANSI C header files" 1>&5
if test "${ac_cv_header_stdc+set}" = set; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 1934 "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:1943: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  ac_cv_header_stdc=yes
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_header_stdc=no
fi
rm -f conftest*

if test $ac_cv_header_stdc = yes; then
  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat >conftest.$ac_ext <<EOF
#line 1960 "configure"
#include "confdefs.h"
#include <string.h>

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

fi

if test $ac_cv_header_stdc = yes; then
  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat >conftest.$ac_ext <<EOF
#line 1979 "configure"
#include "confdefs.h"
#include <stdlib.h>

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

fi

if test $ac_cv_header_stdc = yes; then
  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
if test "$cross_compiling" = yes; then
  :
else
  cat >conftest.$ac_ext <<EOF
#line 2001 "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:2026: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  :
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_header_stdc=no
fi
rm -fr conftest*

fi

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

fi

  for ac_header in string.h
do
ac_ac_Header=`echo "ac_cv_header_$ac_header" | $ac_tr_sh`
echo $ac_n "checking for $ac_header... $ac_c" 1>&6
echo "configure:2053: checking for $ac_header" 1>&5
if eval "test \"\${$ac_ac_Header+set}\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 2058 "configure"
#include "confdefs.h"
#include <$ac_header>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2064: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "$ac_ac_Header=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "$ac_ac_Header=no"
fi
rm -f conftest*
fi
echo "$ac_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 $ac_n "checking for inttypes.h... $ac_c" 1>&6
echo "configure:2090: checking for inttypes.h" 1>&5
if test "${jm_ac_cv_header_inttypes_h+set}" = set; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 2095 "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:2107: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  jm_ac_cv_header_inttypes_h=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  jm_ac_cv_header_inttypes_h=no
fi
rm -f conftest*
fi
echo "$ac_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 $ac_n "checking for unsigned long long... $ac_c" 1>&6
echo "configure:2127: checking for unsigned long long" 1>&5
if test "${ac_cv_type_unsigned_long_long+set}" = set; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 2132 "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:2144: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  ac_cv_type_unsigned_long_long=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_type_unsigned_long_long=no
fi
rm -f conftest*

fi
echo "$ac_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 $ac_n "checking for struct timespec... $ac_c" 1>&6
echo "configure:2165: checking for struct timespec" 1>&5
if test "${fu_cv_sys_struct_timespec+set}" = set; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
    cat >conftest.$ac_ext <<EOF
#line 2171 "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:2193: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  fu_cv_sys_struct_timespec=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  fu_cv_sys_struct_timespec=no
fi
rm -f conftest*
    
fi
echo "$ac_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 $ac_n "checking for uid_t in sys/types.h... $ac_c" 1>&6
echo "configure:2215: checking for uid_t in sys/types.h" 1>&5
if test "${ac_cv_type_uid_t+set}" = set; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 2220 "configure"
#include "confdefs.h"
#include <sys/types.h>

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

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

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

fi

  
  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 $ac_n "checking whether sys/types.h defines makedev... $ac_c" 1>&6
echo "configure:2261: checking whether sys/types.h defines makedev" 1>&5
if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 2266 "configure"
#include "confdefs.h"
#include <sys/types.h>

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

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

if test $ac_cv_header_sys_types_h_makedev = no; then
echo $ac_n "checking for sys/mkdev.h... $ac_c" 1>&6
echo "configure:2294: checking for sys/mkdev.h" 1>&5
if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 2299 "configure"
#include "confdefs.h"
#include <sys/mkdev.h>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2305: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  ac_cv_header_sys_mkdev_h=yes
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_header_sys_mkdev_h=no
fi
rm -f conftest*
fi
echo "$ac_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 $ac_n "checking for sys/sysmacros.h... $ac_c" 1>&6
echo "configure:2329: checking for sys/sysmacros.h" 1>&5
if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 2334 "configure"
#include "confdefs.h"
#include <sys/sysmacros.h>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2340: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  ac_cv_header_sys_sysmacros_h=yes
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_header_sys_sysmacros_h=no
fi
rm -f conftest*
fi
echo "$ac_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 $ac_n "checking whether byte ordering is bigendian... $ac_c" 1>&6
echo "configure:2366: checking whether byte ordering is bigendian" 1>&5
if test "${ac_cv_c_bigendian+set}" = set; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_cv_c_bigendian=unknown
# See if sys/param.h defines the BYTE_ORDER macro.
cat >conftest.$ac_ext <<EOF
#line 2373 "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:2389: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  # It does; now see whether it defined to BIG_ENDIAN or not.
cat >conftest.$ac_ext <<EOF
#line 2393 "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:2409: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_c_bigendian=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_c_bigendian=no
fi
rm -f conftest*
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
fi
rm -f conftest*
if test $ac_cv_c_bigendian = unknown; then
if test "$cross_compiling" = yes; then
    { echo "configure: error: cannot run test program while cross compiling" 1>&2; exit 1; }
else
  cat >conftest.$ac_ext <<EOF
#line 2429 "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:2444: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  ac_cv_c_bigendian=no
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_c_bigendian=yes
fi
rm -fr conftest*

fi

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

fi

  echo $ac_n "checking for ${CC-cc} option to accept ANSI C... $ac_c" 1>&6
echo "configure:2468: checking for ${CC-cc} option to accept ANSI C" 1>&5
if test "${ac_cv_prog_cc_stdc+set}" = set; then
  echo $ac_n "(cached) $ac_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 2485 "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:2523: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  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 "$ac_t""none needed" 1>&6 ;;
  *)
    echo "$ac_t""$ac_cv_prog_cc_stdc" 1>&6
    CC="$CC $ac_cv_prog_cc_stdc" ;;
esac

  echo $ac_n "checking for an ANSI C conforming const... $ac_c" 1>&6
echo "configure:2545: checking for an ANSI C conforming const" 1>&5
if test "${ac_cv_c_const+set}" = set; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 2550 "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:2607: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_c_const=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_c_const=no
fi
rm -f conftest*
fi
echo "$ac_t""$ac_cv_c_const" 1>&6
if test $ac_cv_c_const = no; then
  cat >>confdefs.h <<\EOF
#define const 
EOF

fi

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

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

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

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

  echo $ac_n "checking for long double... $ac_c" 1>&6
echo "configure:2673: checking for long double" 1>&5
if test "${ac_cv_c_long_double+set}" = set; then
  echo $ac_n "(cached) $ac_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 2684 "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:2696: \"$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
  rm -fr conftest*
  ac_cv_c_long_double=no
fi
rm -fr conftest*

fi

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

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

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

LIBS="$ac_save_LIBS"
fi
echo "$ac_t""$ac_cv_lib_dir_opendir" 1>&6
if test $ac_cv_lib_dir_opendir = yes; then
  LIBS="$LIBS -ldir"
fi

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

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

LIBS="$ac_save_LIBS"
fi
echo "$ac_t""$ac_cv_lib_x_opendir" 1>&6
if test $ac_cv_lib_x_opendir = yes; then
  LIBS="$LIBS -lx"
fi

fi

  echo $ac_n "checking for ANSI C header files... $ac_c" 1>&6
echo "configure:2852: checking for ANSI C header files" 1>&5
if test "${ac_cv_header_stdc+set}" = set; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 2857 "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:2866: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  ac_cv_header_stdc=yes
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_header_stdc=no
fi
rm -f conftest*

if test $ac_cv_header_stdc = yes; then
  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat >conftest.$ac_ext <<EOF
#line 2883 "configure"
#include "confdefs.h"
#include <string.h>

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

fi

if test $ac_cv_header_stdc = yes; then
  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat >conftest.$ac_ext <<EOF
#line 2902 "configure"
#include "confdefs.h"
#include <stdlib.h>

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

fi

if test $ac_cv_header_stdc = yes; then
  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
if test "$cross_compiling" = yes; then
  :
else
  cat >conftest.$ac_ext <<EOF
#line 2924 "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:2949: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  :
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_header_stdc=no
fi
rm -fr conftest*

fi

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

fi

  
echo $ac_n "checking for struct stat.st_blksize... $ac_c" 1>&6
echo "configure:2974: checking for struct stat.st_blksize" 1>&5
if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 2979 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
struct stat foo;
foo.st_blksize;
  ;
  return 0;
}
EOF
if { (eval echo configure:2991: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_member_struct_stat_st_blksize=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_member_struct_stat_st_blksize=no
fi
rm -f conftest*
fi
echo "$ac_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 $ac_n "checking for struct stat.st_blocks... $ac_c" 1>&6
echo "configure:3012: checking for struct stat.st_blocks" 1>&5
if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 3017 "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:3031: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_member_struct_stat_st_blocks=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_member_struct_stat_st_blocks=no
fi
rm -f conftest*
fi
echo "$ac_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 $ac_n "checking whether struct tm is in sys/time.h or time.h... $ac_c" 1>&6
echo "configure:3058: checking whether struct tm is in sys/time.h or time.h" 1>&5
if test "${ac_cv_struct_tm+set}" = set; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 3063 "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:3076: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_struct_tm=time.h
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_struct_tm=sys/time.h
fi
rm -f conftest*
fi
echo "$ac_t""$ac_cv_struct_tm" 1>&6
if test $ac_cv_struct_tm = sys/time.h; then
  cat >>confdefs.h <<\EOF
#define TM_IN_SYS_TIME 1
EOF

fi

  echo $ac_n "checking whether time.h and sys/time.h may both be included... $ac_c" 1>&6
echo "configure:3096: checking whether time.h and sys/time.h may both be included" 1>&5
if test "${ac_cv_header_time+set}" = set; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 3101 "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:3115: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_header_time=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_header_time=no
fi
rm -f conftest*
fi
echo "$ac_t""$ac_cv_header_time" 1>&6
if test $ac_cv_header_time = yes; then
  cat >>confdefs.h <<\EOF
#define TIME_WITH_SYS_TIME 1
EOF

fi

  
echo $ac_n "checking for struct tm.tm_zone... $ac_c" 1>&6
echo "configure:3136: checking for struct tm.tm_zone" 1>&5
if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 3141 "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:3155: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_member_struct_tm_tm_zone=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_member_struct_tm_tm_zone=no
fi
rm -f conftest*
fi
echo "$ac_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 $ac_n "checking for tzname... $ac_c" 1>&6
echo "configure:3181: checking for tzname" 1>&5
if test "${ac_cv_var_tzname+set}" = set; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 3186 "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:3200: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  ac_cv_var_tzname=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_var_tzname=no
fi
rm -f conftest*

fi
echo "$ac_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 $ac_n "checking whether stat file-mode macros are broken... $ac_c" 1>&6
echo "configure:3222: checking whether stat file-mode macros are broken" 1>&5
if test "${ac_cv_header_stat_broken+set}" = set; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 3227 "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
  rm -rf conftest*
  ac_cv_header_stat_broken=yes
else
  rm -rf conftest*
  ac_cv_header_stat_broken=no
fi
rm -f conftest*

fi
echo "$ac_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 $ac_n "checking for nanoseconds member of struct stat.st_mtim... $ac_c" 1>&6
echo "configure:3277: checking for nanoseconds member of struct stat.st_mtim" 1>&5
if test "${ac_cv_struct_st_mtim_nsec+set}" = set; then
  echo $ac_n "(cached) $ac_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 3291 "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:3303: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  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 "$ac_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 $ac_n "checking for st_dm_mode in struct stat... $ac_c" 1>&6
echo "configure:3325: checking for st_dm_mode in struct stat" 1>&5
if test "${ac_cv_struct_st_dm_mode+set}" = set; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 3330 "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:3342: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_struct_st_dm_mode=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_struct_st_dm_mode=no
fi
rm -f conftest*
fi
echo "$ac_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 $ac_n "checking type of array argument to getgroups... $ac_c" 1>&6
echo "configure:3366: checking type of array argument to getgroups" 1>&5
if test "${ac_cv_type_getgroups+set}" = set; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_type_getgroups=cross
else
  cat >conftest.$ac_ext <<EOF
#line 3374 "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:3399: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
    ac_cv_type_getgroups=gid_t
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_type_getgroups=int
fi
rm -fr conftest*

fi

if test $ac_cv_type_getgroups = cross; then
        cat >conftest.$ac_ext <<EOF
#line 3414 "configure"
#include "confdefs.h"
#include <unistd.h>

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

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

  echo $ac_n "checking for mode_t... $ac_c" 1>&6
echo "configure:3437: checking for mode_t" 1>&5
if test "${ac_cv_type_mode_t+set}" = set; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 3442 "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:3456: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_type_mode_t=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_type_mode_t=no
fi
rm -f conftest*
fi
echo "$ac_t""$ac_cv_type_mode_t" 1>&6
if test $ac_cv_type_mode_t = yes; then
  :
else
  cat >>confdefs.h <<EOF
#define mode_t int
EOF

fi

  echo $ac_n "checking for off_t... $ac_c" 1>&6
echo "configure:3478: checking for off_t" 1>&5
if test "${ac_cv_type_off_t+set}" = set; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 3483 "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:3497: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_type_off_t=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_type_off_t=no
fi
rm -f conftest*
fi
echo "$ac_t""$ac_cv_type_off_t" 1>&6
if test $ac_cv_type_off_t = yes; then
  :
else
  cat >>confdefs.h <<EOF
#define off_t long
EOF

fi

  echo $ac_n "checking for pid_t... $ac_c" 1>&6
echo "configure:3519: checking for pid_t" 1>&5
if test "${ac_cv_type_pid_t+set}" = set; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 3524 "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:3538: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_type_pid_t=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_type_pid_t=no
fi
rm -f conftest*
fi
echo "$ac_t""$ac_cv_type_pid_t" 1>&6
if test $ac_cv_type_pid_t = yes; then
  :
else
  cat >>confdefs.h <<EOF
#define pid_t int
EOF

fi

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

  echo $ac_n "checking for size_t... $ac_c" 1>&6
echo "configure:3603: checking for size_t" 1>&5
if test "${ac_cv_type_size_t+set}" = set; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 3608 "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:3622: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_type_size_t=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_type_size_t=no
fi
rm -f conftest*
fi
echo "$ac_t""$ac_cv_type_size_t" 1>&6
if test $ac_cv_type_size_t = yes; then
  :
else
  cat >>confdefs.h <<EOF
#define size_t unsigned
EOF

fi

  echo $ac_n "checking for uid_t in sys/types.h... $ac_c" 1>&6
echo "configure:3644: checking for uid_t in sys/types.h" 1>&5
if test "${ac_cv_type_uid_t+set}" = set; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 3649 "configure"
#include "confdefs.h"
#include <sys/types.h>

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

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

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

fi

  echo $ac_n "checking for ino_t... $ac_c" 1>&6
echo "configure:3678: checking for ino_t" 1>&5
if test "${ac_cv_type_ino_t+set}" = set; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 3683 "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:3697: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_type_ino_t=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_type_ino_t=no
fi
rm -f conftest*
fi
echo "$ac_t""$ac_cv_type_ino_t" 1>&6
if test $ac_cv_type_ino_t = yes; then
  :
else
  cat >>confdefs.h <<EOF
#define ino_t unsigned long
EOF

fi

      echo $ac_n "checking for ssize_t... $ac_c" 1>&6
echo "configure:3719: checking for ssize_t" 1>&5
if test "${ac_cv_type_ssize_t+set}" = set; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 3724 "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:3738: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_type_ssize_t=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_type_ssize_t=no
fi
rm -f conftest*
fi
echo "$ac_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
do
ac_ac_Header=`echo "ac_cv_header_$ac_header" | $ac_tr_sh`
echo $ac_n "checking for $ac_header... $ac_c" 1>&6
echo "configure:3770: checking for $ac_header" 1>&5
if eval "test \"\${$ac_ac_Header+set}\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 3775 "configure"
#include "confdefs.h"
#include <$ac_header>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:3781: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "$ac_ac_Header=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "$ac_ac_Header=no"
fi
rm -f conftest*
fi
echo "$ac_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 $ac_n "checking for $ac_header... $ac_c" 1>&6
echo "configure:3808: checking for $ac_header" 1>&5
if eval "test \"\${$ac_ac_Header+set}\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 3813 "configure"
#include "confdefs.h"
#include <$ac_header>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:3819: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "$ac_ac_Header=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "$ac_ac_Header=no"
fi
rm -f conftest*
fi
echo "$ac_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 $ac_n "checking for $ac_func... $ac_c" 1>&6
echo "configure:3846: checking for $ac_func" 1>&5
if eval "test \"\${$ac_ac_var+set}\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 3851 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();
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:3879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "$ac_ac_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "$ac_ac_var=no"
fi
rm -f conftest*

fi
echo "$ac_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 $ac_n "checking for working mktime... $ac_c" 1>&6
echo "configure:3901: checking for working mktime" 1>&5
if test "${ac_cv_func_working_mktime+set}" = set; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_func_working_mktime=no
else
  cat >conftest.$ac_ext <<EOF
#line 3909 "configure"
#include "confdefs.h"
/* Test program from Paul Eggert (eggert@twinsun.com)
   and Tony Leneis (tony@plaza.ds.adp.com).  */
#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:4058: \"$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
  rm -fr conftest*
  ac_cv_func_working_mktime=no
fi
rm -fr conftest*

fi

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

echo $ac_n "checking for working memcmp... $ac_c" 1>&6
echo "configure:4078: checking for working memcmp" 1>&5
if test "${jm_cv_func_memcmp_working+set}" = set; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  jm_cv_func_memcmp_working=no
else
  cat >conftest.$ac_ext <<EOF
#line 4086 "configure"
#include "confdefs.h"

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:4117: \"$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
  rm -fr conftest*
  jm_cv_func_memcmp_working=no
fi
rm -fr conftest*

fi

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

    echo $ac_n "checking whether we are using the GNU C Library... $ac_c" 1>&6
echo "configure:4136: checking whether we are using the GNU C Library" 1>&5
if test "${ac_cv_gnu_library+set}" = set; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 4141 "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
  rm -rf conftest*
  ac_cv_gnu_library=yes
else
  rm -rf conftest*
  ac_cv_gnu_library=no
fi
rm -f conftest*

      
    
fi
echo "$ac_t""$ac_cv_gnu_library" 1>&6
    echo $ac_n "checking for version 2 of the GNU C Library... $ac_c" 1>&6
echo "configure:4165: checking for version 2 of the GNU C Library" 1>&5
if test "${ac_cv_glibc+set}" = set; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 4170 "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
  rm -rf conftest*
  ac_cv_glibc=yes
else
  rm -rf conftest*
  ac_cv_glibc=no
fi
rm -f conftest*

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

echo $ac_n "checking whether utime accepts a null argument... $ac_c" 1>&6
echo "configure:4196: checking whether utime accepts a null argument" 1>&5
if test "${ac_cv_func_utime_null+set}" = set; then
  echo $ac_n "(cached) $ac_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 4206 "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:4221: \"$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
  rm -fr conftest*
  ac_cv_func_utime_null=no
fi
rm -fr conftest*

fi

rm -f core core.* *.core
fi
echo "$ac_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 $ac_n "checking for strerror in -lcposix... $ac_c" 1>&6
echo "configure:4245: checking for strerror in -lcposix" 1>&5
if test "${ac_cv_lib_cposix_strerror+set}" = set; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lcposix  $LIBS"
cat >conftest.$ac_ext <<EOF
#line 4252 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char strerror();

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

LIBS="$ac_save_LIBS"
fi
echo "$ac_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 $ac_n "checking whether to enable assertions... $ac_c" 1>&6
echo "configure:4292: 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 "$ac_t""no" 1>&6
	  cat >>confdefs.h <<\EOF
#define NDEBUG 1
EOF
 
else
   echo "$ac_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 $ac_n "checking for $ac_header... $ac_c" 1>&6
echo "configure:4310: checking for $ac_header" 1>&5
if eval "test \"\${$ac_ac_Header+set}\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 4315 "configure"
#include "confdefs.h"
#include <$ac_header>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:4321: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "$ac_ac_Header=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "$ac_ac_Header=no"
fi
rm -f conftest*
fi
echo "$ac_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 $ac_n "checking for struct utimbuf... $ac_c" 1>&6
echo "configure:4346: checking for struct utimbuf" 1>&5
if test "${fu_cv_sys_struct_utimbuf+set}" = set; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 4351 "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:4376: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  fu_cv_sys_struct_utimbuf=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  fu_cv_sys_struct_utimbuf=no
fi
rm -f conftest*
    
fi
echo "$ac_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 $ac_n "checking for d_type member in directory struct... $ac_c" 1>&6
echo "configure:4398: checking for d_type member in directory struct" 1>&5
if test "${jm_cv_struct_dirent_d_type+set}" = set; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 4403 "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:4430: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  jm_cv_struct_dirent_d_type=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  jm_cv_struct_dirent_d_type=no
fi
rm -f conftest*

     
   
fi
echo "$ac_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 $ac_n "checking for d_ino member in directory struct... $ac_c" 1>&6
echo "configure:4454: checking for d_ino member in directory struct" 1>&5
if test "${jm_cv_struct_dirent_d_ino+set}" = set; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 4459 "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:4486: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  jm_cv_struct_dirent_d_ino=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  jm_cv_struct_dirent_d_ino=no
fi
rm -f conftest*

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

  if test x = y; then
                        cat >>confdefs.h <<\EOF
#define HAVE_DECL_FREE 1
EOF

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

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

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

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

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

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

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

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

  fi

  
  for jm_func in free lseek malloc \
                        memchr realloc stpcpy strstr strtoul strtoull
  do
    
  echo $ac_n "checking whether $jm_func is declared... $ac_c" 1>&6
echo "configure:4575: checking whether $jm_func is declared" 1>&5
  if eval "test \"\${jm_cv_func_decl_$jm_func+set}\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 4580 "configure"
#include "confdefs.h"
$headers
int
main ()
{

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

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

  
    echo $ac_n "checking for long file names... $ac_c" 1>&6
echo "configure:4622: checking for long file names" 1>&5
if test "${ac_cv_sys_long_file_names+set}" = set; then
  echo $ac_n "(cached) $ac_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.
  (echo 1 >$ac_dir/conftest9012345) 2>/dev/null
  (echo 2 >$ac_dir/conftest9012346) 2>/dev/null
  ac_val=`cat $ac_dir/conftest9012345 2>/dev/null`
  if test ! -f $ac_dir/conftest9012345 || test "$ac_val" != 1; then
    ac_cv_sys_long_file_names=no
    rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
    break
  fi
  rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
done
fi
echo "$ac_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

  echo $ac_n "checking for pathconf... $ac_c" 1>&6
echo "configure:4665: checking for pathconf" 1>&5
if test "${ac_cv_func_pathconf+set}" = set; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 4670 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char pathconf(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char pathconf();
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_pathconf) || defined (__stub___pathconf)
choke me
#else
f = pathconf;
#endif

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

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

  for ac_header in limits.h string.h unistd.h
do
ac_ac_Header=`echo "ac_cv_header_$ac_header" | $ac_tr_sh`
echo $ac_n "checking for $ac_header... $ac_c" 1>&6
echo "configure:4716: checking for $ac_header" 1>&5
if eval "test \"\${$ac_ac_Header+set}\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 4721 "configure"
#include "confdefs.h"
#include <$ac_header>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:4727: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "$ac_ac_Header=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "$ac_ac_Header=no"
fi
rm -f conftest*
fi
echo "$ac_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 $ac_n "checking for library containing gethostbyname... $ac_c" 1>&6
echo "configure:4754: checking for library containing gethostbyname" 1>&5
if test "${ac_cv_search_gethostbyname+set}" = set; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
    ac_func_search_save_LIBS="$LIBS"
    ac_cv_search_gethostbyname="no"
    cat >conftest.$ac_ext <<EOF
#line 4762 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char gethostbyname();

int
main()
{
gethostbyname()
  ;
  return 0;
}
EOF
if { (eval echo configure:4777: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  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 4790 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char gethostbyname();

int
main()
{
gethostbyname()
  ;
  return 0;
}
EOF
if { (eval echo configure:4805: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  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 "$ac_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 $ac_n "checking for $ac_func... $ac_c" 1>&6
echo "configure:4837: checking for $ac_func" 1>&5
if eval "test \"\${$ac_ac_var+set}\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 4842 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();
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:4870: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "$ac_ac_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "$ac_ac_var=no"
fi
rm -f conftest*

fi
echo "$ac_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 $ac_n "checking for $ac_func... $ac_c" 1>&6
echo "configure:4895: checking for $ac_func" 1>&5
if eval "test \"\${$ac_ac_var+set}\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 4900 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();
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:4928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "$ac_ac_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "$ac_ac_var=no"
fi
rm -f conftest*

fi
echo "$ac_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 $ac_n "checking for $ac_header... $ac_c" 1>&6
echo "configure:4954: checking for $ac_header" 1>&5
if eval "test \"\${$ac_ac_Header+set}\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 4959 "configure"
#include "confdefs.h"
#include <$ac_header>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:4965: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "$ac_ac_Header=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "$ac_ac_Header=no"
fi
rm -f conftest*
fi
echo "$ac_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 $ac_n "checking for $ac_func... $ac_c" 1>&6
echo "configure:4993: checking for $ac_func" 1>&5
if eval "test \"\${$ac_ac_var+set}\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 4998 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();
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:5026: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "$ac_ac_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "$ac_ac_var=no"
fi
rm -f conftest*

fi
echo "$ac_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 $ac_n "checking for ANSI C header files... $ac_c" 1>&6
echo "configure:5048: checking for ANSI C header files" 1>&5
if test "${ac_cv_header_stdc+set}" = set; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 5053 "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:5062: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  ac_cv_header_stdc=yes
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_header_stdc=no
fi
rm -f conftest*

if test $ac_cv_header_stdc = yes; then
  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat >conftest.$ac_ext <<EOF
#line 5079 "configure"
#include "confdefs.h"
#include <string.h>

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

fi

if test $ac_cv_header_stdc = yes; then
  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat >conftest.$ac_ext <<EOF
#line 5098 "configure"
#include "confdefs.h"
#include <stdlib.h>

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

fi

if test $ac_cv_header_stdc = yes; then
  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
if test "$cross_compiling" = yes; then
  :
else
  cat >conftest.$ac_ext <<EOF
#line 5120 "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:5145: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  :
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_header_stdc=no
fi
rm -fr conftest*

fi

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

fi

  
  for ac_func in isascii mbrtowc
do
ac_ac_var=`echo "ac_cv_func_$ac_func" | $ac_tr_sh`
echo $ac_n "checking for $ac_func... $ac_c" 1>&6
echo "configure:5173: checking for $ac_func" 1>&5
if eval "test \"\${$ac_ac_var+set}\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 5178 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();
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:5206: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "$ac_ac_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "$ac_ac_var=no"
fi
rm -f conftest*

fi
echo "$ac_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 $ac_n "checking for $ac_header... $ac_c" 1>&6
echo "configure:5231: checking for $ac_header" 1>&5
if eval "test \"\${$ac_ac_Header+set}\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 5236 "configure"
#include "confdefs.h"
#include <$ac_header>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:5242: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "$ac_ac_Header=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "$ac_ac_Header=no"
fi
rm -f conftest*
fi
echo "$ac_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 $ac_n "checking for ANSI C header files... $ac_c" 1>&6
echo "configure:5266: checking for ANSI C header files" 1>&5
if test "${ac_cv_header_stdc+set}" = set; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 5271 "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:5280: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  ac_cv_header_stdc=yes
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_header_stdc=no
fi
rm -f conftest*

if test $ac_cv_header_stdc = yes; then
  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat >conftest.$ac_ext <<EOF
#line 5297 "configure"
#include "confdefs.h"
#include <string.h>

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

fi

if test $ac_cv_header_stdc = yes; then
  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat >conftest.$ac_ext <<EOF
#line 5316 "configure"
#include "confdefs.h"
#include <stdlib.h>

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

fi

if test $ac_cv_header_stdc = yes; then
  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
if test "$cross_compiling" = yes; then
  :
else
  cat >conftest.$ac_ext <<EOF
#line 5338 "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:5363: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  :
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_header_stdc=no
fi
rm -fr conftest*

fi

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

fi

  
  echo $ac_n "checking whether backslash-a works in strings... $ac_c" 1>&6
echo "configure:5388: checking whether backslash-a works in strings" 1>&5
if test "${ac_cv_c_backslash_a+set}" = set; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 5393 "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:5411: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_c_backslash_a=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_c_backslash_a=no
fi
rm -f conftest*
fi
echo "$ac_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 $ac_n "checking for function prototypes... $ac_c" 1>&6
echo "configure:5433: checking for function prototypes" 1>&5
if test "$am_cv_prog_cc_stdc" != no; then
  echo "$ac_t""yes" 1>&6
  cat >>confdefs.h <<\EOF
#define PROTOTYPES 1
EOF

  U= ANSI2KNR=
else
  echo "$ac_t""no" 1>&6
  U=_ ANSI2KNR=./ansi2knr
  # Ensure some checks needed by ansi2knr itself.
  echo $ac_n "checking for ANSI C header files... $ac_c" 1>&6
echo "configure:5446: checking for ANSI C header files" 1>&5
if test "${ac_cv_header_stdc+set}" = set; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 5451 "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:5460: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  ac_cv_header_stdc=yes
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_header_stdc=no
fi
rm -f conftest*

if test $ac_cv_header_stdc = yes; then
  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat >conftest.$ac_ext <<EOF
#line 5477 "configure"
#include "confdefs.h"
#include <string.h>

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

fi

if test $ac_cv_header_stdc = yes; then
  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat >conftest.$ac_ext <<EOF
#line 5496 "configure"
#include "confdefs.h"
#include <stdlib.h>

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

fi

if test $ac_cv_header_stdc = yes; then
  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
if test "$cross_compiling" = yes; then
  :
else
  cat >conftest.$ac_ext <<EOF
#line 5518 "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:5543: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  :
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_header_stdc=no
fi
rm -fr conftest*

fi

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

fi

  for ac_header in string.h
do
ac_ac_Header=`echo "ac_cv_header_$ac_header" | $ac_tr_sh`
echo $ac_n "checking for $ac_header... $ac_c" 1>&6
echo "configure:5570: checking for $ac_header" 1>&5
if eval "test \"\${$ac_ac_Header+set}\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 5575 "configure"
#include "confdefs.h"
#include <$ac_header>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:5581: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "$ac_ac_Header=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "$ac_ac_Header=no"
fi
rm -f conftest*
fi
echo "$ac_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 $ac_n "checking for ANSI C header files... $ac_c" 1>&6
echo "configure:5608: checking for ANSI C header files" 1>&5
if test "${ac_cv_header_stdc+set}" = set; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 5613 "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:5622: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  ac_cv_header_stdc=yes
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_header_stdc=no
fi
rm -f conftest*

if test $ac_cv_header_stdc = yes; then
  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat >conftest.$ac_ext <<EOF
#line 5639 "configure"
#include "confdefs.h"
#include <string.h>

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

fi

if test $ac_cv_header_stdc = yes; then
  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat >conftest.$ac_ext <<EOF
#line 5658 "configure"
#include "confdefs.h"
#include <stdlib.h>

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

fi

if test $ac_cv_header_stdc = yes; then
  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
if test "$cross_compiling" = yes; then
  :
else
  cat >conftest.$ac_ext <<EOF
#line 5680 "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:5705: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  :
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_header_stdc=no
fi
rm -fr conftest*

fi

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

fi

  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 $ac_n "checking for $ac_header... $ac_c" 1>&6
echo "configure:5732: checking for $ac_header" 1>&5
if eval "test \"\${$ac_ac_Header+set}\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 5737 "configure"
#include "confdefs.h"
#include <$ac_header>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:5743: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "$ac_ac_Header=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "$ac_ac_Header=no"
fi
rm -f conftest*
fi
echo "$ac_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 $ac_n "checking for $ac_func... $ac_c" 1>&6
echo "configure:5770: checking for $ac_func" 1>&5
if eval "test \"\${$ac_ac_var+set}\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 5775 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();
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:5803: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "$ac_ac_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "$ac_ac_var=no"
fi
rm -f conftest*

fi
echo "$ac_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 $ac_n "checking for function prototypes... $ac_c" 1>&6
echo "configure:5827: checking for function prototypes" 1>&5
if test "$am_cv_prog_cc_stdc" != no; then
  echo "$ac_t""yes" 1>&6
  cat >>confdefs.h <<\EOF
#define PROTOTYPES 1
EOF

  U= ANSI2KNR=
else
  echo "$ac_t""no" 1>&6
  U=_ ANSI2KNR=./ansi2knr
  # Ensure some checks needed by ansi2knr itself.
  echo $ac_n "checking for ANSI C header files... $ac_c" 1>&6
echo "configure:5840: checking for ANSI C header files" 1>&5
if test "${ac_cv_header_stdc+set}" = set; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 5845 "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:5854: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  ac_cv_header_stdc=yes
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_header_stdc=no
fi
rm -f conftest*

if test $ac_cv_header_stdc = yes; then
  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat >conftest.$ac_ext <<EOF
#line 5871 "configure"
#include "confdefs.h"
#include <string.h>

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

fi

if test $ac_cv_header_stdc = yes; then
  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat >conftest.$ac_ext <<EOF
#line 5890 "configure"
#include "confdefs.h"
#include <stdlib.h>

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

fi

if test $ac_cv_header_stdc = yes; then
  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
if test "$cross_compiling" = yes; then
  :
else
  cat >conftest.$ac_ext <<EOF
#line 5912 "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:5937: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  :
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_header_stdc=no
fi
rm -fr conftest*

fi

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

fi

  for ac_header in string.h
do
ac_ac_Header=`echo "ac_cv_header_$ac_header" | $ac_tr_sh`
echo $ac_n "checking for $ac_header... $ac_c" 1>&6
echo "configure:5964: checking for $ac_header" 1>&5
if eval "test \"\${$ac_ac_Header+set}\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 5969 "configure"
#include "confdefs.h"
#include <$ac_header>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:5975: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "$ac_ac_Header=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "$ac_ac_Header=no"
fi
rm -f conftest*
fi
echo "$ac_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 $ac_n "checking for struct utmpx.ut_user... $ac_c" 1>&6
echo "configure:6010: checking for struct utmpx.ut_user" 1>&5
if test "${ac_cv_member_struct_utmpx_ut_user+set}" = set; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 6015 "configure"
#include "confdefs.h"
$utmp_includes

int
main ()
{
struct utmpx foo;
foo.ut_user;
  ;
  return 0;
}
EOF
if { (eval echo configure:6028: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_member_struct_utmpx_ut_user=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_member_struct_utmpx_ut_user=no
fi
rm -f conftest*
fi
echo "$ac_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 $ac_n "checking for struct utmp.ut_user... $ac_c" 1>&6
echo "configure:6049: checking for struct utmp.ut_user" 1>&5
if test "${ac_cv_member_struct_utmp_ut_user+set}" = set; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 6054 "configure"
#include "confdefs.h"
$utmp_includes

int
main ()
{
struct utmp foo;
foo.ut_user;
  ;
  return 0;
}
EOF
if { (eval echo configure:6067: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_member_struct_utmp_ut_user=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_member_struct_utmp_ut_user=no
fi
rm -f conftest*
fi
echo "$ac_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 $ac_n "checking for struct utmpx.ut_name... $ac_c" 1>&6
echo "configure:6088: checking for struct utmpx.ut_name" 1>&5
if test "${ac_cv_member_struct_utmpx_ut_name+set}" = set; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 6093 "configure"
#include "confdefs.h"
$utmp_includes

int
main ()
{
struct utmpx foo;
foo.ut_name;
  ;
  return 0;
}
EOF
if { (eval echo configure:6106: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_member_struct_utmpx_ut_name=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_member_struct_utmpx_ut_name=no
fi
rm -f conftest*
fi
echo "$ac_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 $ac_n "checking for struct utmp.ut_name... $ac_c" 1>&6
echo "configure:6127: checking for struct utmp.ut_name" 1>&5
if test "${ac_cv_member_struct_utmp_ut_name+set}" = set; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 6132 "configure"
#include "confdefs.h"
$utmp_includes

int
main ()
{
struct utmp foo;
foo.ut_name;
  ;
  return 0;
}
EOF
if { (eval echo configure:6145: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_member_struct_utmp_ut_name=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_member_struct_utmp_ut_name=no
fi
rm -f conftest*
fi
echo "$ac_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 $ac_n "checking for $ac_func... $ac_c" 1>&6
echo "configure:6169: checking for $ac_func" 1>&5
if eval "test \"\${$ac_ac_var+set}\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 6174 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();
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:6202: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "$ac_ac_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "$ac_ac_var=no"
fi
rm -f conftest*

fi
echo "$ac_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 $ac_n "checking for $ac_header... $ac_c" 1>&6
echo "configure:6227: checking for $ac_header" 1>&5
if eval "test \"\${$ac_ac_Header+set}\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 6232 "configure"
#include "confdefs.h"
#include <$ac_header>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:6238: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "$ac_ac_Header=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "$ac_ac_Header=no"
fi
rm -f conftest*
fi
echo "$ac_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 $ac_n "checking for ANSI C header files... $ac_c" 1>&6
echo "configure:6262: checking for ANSI C header files" 1>&5
if test "${ac_cv_header_stdc+set}" = set; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 6267 "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:6276: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  ac_cv_header_stdc=yes
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_header_stdc=no
fi
rm -f conftest*

if test $ac_cv_header_stdc = yes; then
  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat >conftest.$ac_ext <<EOF
#line 6293 "configure"
#include "confdefs.h"
#include <string.h>

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

fi

if test $ac_cv_header_stdc = yes; then
  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat >conftest.$ac_ext <<EOF
#line 6312 "configure"
#include "confdefs.h"
#include <stdlib.h>

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

fi

if test $ac_cv_header_stdc = yes; then
  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
if test "$cross_compiling" = yes; then
  :
else
  cat >conftest.$ac_ext <<EOF
#line 6334 "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:6359: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  :
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_header_stdc=no
fi
rm -fr conftest*

fi

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

fi

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

fi
echo "$ac_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 $ac_n "checking for alloca... $ac_c" 1>&6
echo "configure:6422: checking for alloca" 1>&5
if test "${ac_cv_func_alloca_works+set}" = set; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 6427 "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:6458: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  ac_cv_func_alloca_works=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_func_alloca_works=no
fi
rm -f conftest*

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

fi

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

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

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

fi
echo "$ac_t""$ac_cv_os_cray" 1>&6
if test $ac_cv_os_cray = yes; then
for ac_func in _getb67 GETB67 getb67; do
  ac_ac_var=`echo "ac_cv_func_$ac_func" | $ac_tr_sh`
echo $ac_n "checking for $ac_func... $ac_c" 1>&6
echo "configure:6519: checking for $ac_func" 1>&5
if eval "test \"\${$ac_ac_var+set}\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 6524 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();
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:6552: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "$ac_ac_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "$ac_ac_var=no"
fi
rm -f conftest*

fi
echo "$ac_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 $ac_n "checking stack direction for C alloca... $ac_c" 1>&6
echo "configure:6577: checking stack direction for C alloca" 1>&5
if test "${ac_cv_c_stack_direction+set}" = set; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_c_stack_direction=0
else
  cat >conftest.$ac_ext <<EOF
#line 6585 "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:6605: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  ac_cv_c_stack_direction=1
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_c_stack_direction=-1
fi
rm -fr conftest*

fi

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

fi

  
  for ac_func in lchown
do
ac_ac_var=`echo "ac_cv_func_$ac_func" | $ac_tr_sh`
echo $ac_n "checking for $ac_func... $ac_c" 1>&6
echo "configure:6631: checking for $ac_func" 1>&5
if eval "test \"\${$ac_ac_var+set}\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 6636 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();
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:6664: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "$ac_ac_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "$ac_ac_var=no"
fi
rm -f conftest*

fi
echo "$ac_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 $ac_n "checking for $ac_header... $ac_c" 1>&6
echo "configure:6692: checking for $ac_header" 1>&5
if eval "test \"\${$ac_ac_Header+set}\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 6697 "configure"
#include "confdefs.h"
#include <$ac_header>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:6703: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "$ac_ac_Header=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "$ac_ac_Header=no"
fi
rm -f conftest*
fi
echo "$ac_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 $ac_n "checking for working chown... $ac_c" 1>&6
echo "configure:6727: checking for working chown" 1>&5
if test "${jm_cv_func_working_chown+set}" = set; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  	     jm_cv_func_working_chown=no
else
  cat >conftest.$ac_ext <<EOF
#line 6735 "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:6764: \"$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
  rm -fr conftest*
  jm_cv_func_working_chown=no
fi
rm -fr conftest*

fi

  
fi
echo "$ac_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 $ac_n "checking for $ac_func... $ac_c" 1>&6
echo "configure:6793: checking for $ac_func" 1>&5
if eval "test \"\${$ac_ac_var+set}\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 6798 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();
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:6826: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "$ac_ac_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "$ac_ac_var=no"
fi
rm -f conftest*

fi
echo "$ac_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 $ac_n "checking whether lstat accepts an empty string... $ac_c" 1>&6
echo "configure:6855: checking whether lstat accepts an empty string" 1>&5
if test "${jm_cv_func_lstat_empty_string_bug+set}" = set; then
  echo $ac_n "(cached) $ac_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 6863 "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:6877: \"$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
  rm -fr conftest*
  jm_cv_func_lstat_empty_string_bug=no
fi
rm -fr conftest*

fi

  
fi
echo "$ac_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 $ac_n "checking whether lstat dereferences a symlink specified with a trailing slash... $ac_c" 1>&6
echo "configure:6903: 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 $ac_n "(cached) $ac_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 6916 "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:6933: \"$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
  rm -fr conftest*
  jm_cv_func_lstat_dereferences_slashed_symlink=no
fi
rm -fr 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 "$ac_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 $ac_n "checking whether stat accepts an empty string... $ac_c" 1>&6
echo "configure:6972: checking whether stat accepts an empty string" 1>&5
if test "${jm_cv_func_stat_empty_string_bug+set}" = set; then
  echo $ac_n "(cached) $ac_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 6980 "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:6994: \"$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
  rm -fr conftest*
  jm_cv_func_stat_empty_string_bug=no
fi
rm -fr conftest*

fi

  
fi
echo "$ac_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 $ac_n "checking for working realloc... $ac_c" 1>&6
echo "configure:7024: checking for working realloc" 1>&5
if test "${jm_cv_func_working_realloc+set}" = set; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  	 jm_cv_func_working_realloc=no
else
  cat >conftest.$ac_ext <<EOF
#line 7032 "configure"
#include "confdefs.h"

    char *realloc ();
    int
    main ()
    {
      exit (realloc (0, 0) ? 0 : 1);
    }
	  
EOF
if { (eval echo configure:7043: \"$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
  rm -fr conftest*
  jm_cv_func_working_realloc=no
fi
rm -fr conftest*

fi

  
fi
echo "$ac_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 $ac_n "checking for working malloc... $ac_c" 1>&6
echo "configure:7073: checking for working malloc" 1>&5
if test "${jm_cv_func_working_malloc+set}" = set; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  	 jm_cv_func_working_malloc=no
else
  cat >conftest.$ac_ext <<EOF
#line 7081 "configure"
#include "confdefs.h"

    char *malloc ();
    int
    main ()
    {
      exit (malloc (0) ? 0 : 1);
    }
	  
EOF
if { (eval echo configure:7092: \"$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
  rm -fr conftest*
  jm_cv_func_working_malloc=no
fi
rm -fr conftest*

fi

  
fi
echo "$ac_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 $ac_n "checking for $ac_func... $ac_c" 1>&6
echo "configure:7122: checking for $ac_func" 1>&5
if eval "test \"\${$ac_ac_var+set}\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 7127 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();
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:7155: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "$ac_ac_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "$ac_ac_var=no"
fi
rm -f conftest*

fi
echo "$ac_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 $ac_n "checking for $ac_header... $ac_c" 1>&6
echo "configure:7181: checking for $ac_header" 1>&5
if eval "test \"\${$ac_ac_Header+set}\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 7186 "configure"
#include "confdefs.h"
#include <$ac_header>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:7192: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "$ac_ac_Header=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "$ac_ac_Header=no"
fi
rm -f conftest*
fi
echo "$ac_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 $ac_n "checking for working strerror_r... $ac_c" 1>&6
echo "configure:7216: checking for working strerror_r" 1>&5
if test "${jm_cv_func_working_strerror_r+set}" = set; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
      cat >conftest.$ac_ext <<EOF
#line 7222 "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:7241: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  jm_cv_func_working_strerror_r=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  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 "$ac_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 $ac_n "checking for library containing nanosleep... $ac_c" 1>&6
echo "configure:7268: checking for library containing nanosleep" 1>&5
if test "${ac_cv_search_nanosleep+set}" = set; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
    ac_func_search_save_LIBS="$LIBS"
    ac_cv_search_nanosleep="no"
    cat >conftest.$ac_ext <<EOF
#line 7276 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char nanosleep();

int
main()
{
nanosleep()
  ;
  return 0;
}
EOF
if { (eval echo configure:7291: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  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 7304 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char nanosleep();

int
main()
{
nanosleep()
  ;
  return 0;
}
EOF
if { (eval echo configure:7319: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  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 "$ac_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 $ac_n "checking whether nanosleep works... $ac_c" 1>&6
echo "configure:7348: checking whether nanosleep works" 1>&5
if test "${jm_cv_func_nanosleep_works+set}" = set; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
   
   if test "$cross_compiling" = yes; then
  	 jm_cv_func_nanosleep_works=no
else
  cat >conftest.$ac_ext <<EOF
#line 7358 "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:7382: \"$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
  rm -fr conftest*
  jm_cv_func_nanosleep_works=no
fi
rm -fr conftest*

fi

  
fi
echo "$ac_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 gnu_nanosleep
EOF

  fi

for ac_header in string.h
do
ac_ac_Header=`echo "ac_cv_header_$ac_header" | $ac_tr_sh`
echo $ac_n "checking for $ac_header... $ac_c" 1>&6
echo "configure:7411: checking for $ac_header" 1>&5
if eval "test \"\${$ac_ac_Header+set}\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 7416 "configure"
#include "confdefs.h"
#include <$ac_header>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:7422: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "$ac_ac_Header=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "$ac_ac_Header=no"
fi
rm -f conftest*
fi
echo "$ac_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 $ac_n "checking for working readdir... $ac_c" 1>&6
echo "configure:7446: checking for working readdir" 1>&5
if test "${jm_cv_func_working_readdir+set}" = set; then
  echo $ac_n "(cached) $ac_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 7458 "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:7558: \"$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
  rm -fr conftest*
  jm_cv_func_working_readdir=no
fi
rm -fr conftest*

fi

fi
echo "$ac_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.
      
  for jm_func in $jm_io_func
  do
    
  echo $ac_n "checking whether $jm_func is declared... $ac_c" 1>&6
echo "configure:7601: checking whether $jm_func is declared" 1>&5
  if eval "test \"\${jm_cv_func_decl_$jm_func+set}\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 7606 "configure"
#include "confdefs.h"
#include <stdio.h>
			    
int
main ()
{

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

  if eval "test \"`echo '$jm_cv_func_decl_'$jm_func`\" = yes"; then
    echo "$ac_t""yes" 1>&6
    
      jm_tr_func=HAVE_DECL_`echo $jm_func | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`
      cat >>confdefs.h <<EOF
#define $jm_tr_func 1
EOF
 jm_declared=yes
  else
    echo "$ac_t""no" 1>&6
    jm_declared=no
  fi
  done

      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 $ac_n "checking for $ac_func... $ac_c" 1>&6
echo "configure:7653: checking for $ac_func" 1>&5
if eval "test \"\${$ac_ac_var+set}\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 7658 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();
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:7686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "$ac_ac_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "$ac_ac_var=no"
fi
rm -f conftest*

fi
echo "$ac_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 $ac_n "checking for $ac_header... $ac_c" 1>&6
echo "configure:7716: checking for $ac_header" 1>&5
if eval "test \"\${$ac_ac_Header+set}\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 7721 "configure"
#include "confdefs.h"
#include <$ac_header>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:7727: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "$ac_ac_Header=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "$ac_ac_Header=no"
fi
rm -f conftest*
fi
echo "$ac_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 $ac_n "checking for working fnmatch... $ac_c" 1>&6
echo "configure:7751: checking for working fnmatch" 1>&5
if test "${ac_cv_func_fnmatch_works+set}" = set; then
  echo $ac_n "(cached) $ac_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 7762 "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:7774: \"$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
  rm -fr conftest*
  ac_cv_func_fnmatch_works=no
fi
rm -fr conftest*

fi

fi
echo "$ac_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 $ac_n "checking for group_member... $ac_c" 1>&6
echo "configure:7807: checking for group_member" 1>&5
if test "${ac_cv_func_group_member+set}" = set; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 7812 "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.  */
/* 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:7840: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  ac_cv_func_group_member=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_func_group_member=no
fi
rm -f conftest*

fi
echo "$ac_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 $ac_n "checking for SVID conformant putenv... $ac_c" 1>&6
echo "configure:7863: checking for SVID conformant putenv" 1>&5
if test "${jm_cv_func_svid_putenv+set}" = set; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  	     jm_cv_func_svid_putenv=no
else
  cat >conftest.$ac_ext <<EOF
#line 7871 "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:7893: \"$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
  rm -fr conftest*
  jm_cv_func_svid_putenv=no
fi
rm -fr conftest*

fi

  
fi
echo "$ac_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:7919: 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 $ac_n "checking for $ac_header... $ac_c" 1>&6
echo "configure:7931: checking for $ac_header" 1>&5
if eval "test \"\${$ac_ac_Header+set}\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 7936 "configure"
#include "confdefs.h"
#include <$ac_header>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:7942: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "$ac_ac_Header=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "$ac_ac_Header=no"
fi
rm -f conftest*
fi
echo "$ac_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 $ac_n "checking whether <inttypes.h> defines strtoumax as a macro... $ac_c" 1>&6
echo "configure:7966: checking whether <inttypes.h> defines strtoumax as a macro" 1>&5
if test "${jm_cv_func_strtoumax_macro+set}" = set; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 7971 "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
  rm -rf conftest*
  jm_cv_func_strtoumax_macro=yes
else
  rm -rf conftest*
  jm_cv_func_strtoumax_macro=no
fi
rm -f conftest*

fi
echo "$ac_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 $ac_n "checking for $ac_func... $ac_c" 1>&6
echo "configure:7996: checking for $ac_func" 1>&5
if eval "test \"\${$ac_ac_var+set}\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 8001 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();
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:8029: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "$ac_ac_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "$ac_ac_var=no"
fi
rm -f conftest*

fi
echo "$ac_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 $ac_n "checking for $ac_func... $ac_c" 1>&6
echo "configure:8060: checking for $ac_func" 1>&5
if eval "test \"\${$ac_ac_var+set}\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 8065 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();
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:8093: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "$ac_ac_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "$ac_ac_var=no"
fi
rm -f conftest*

fi
echo "$ac_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 $ac_n "checking whether link(2) follows symlinks... $ac_c" 1>&6
echo "configure:8120: checking whether link(2) follows symlinks" 1>&5
if test "${jm_ac_cv_func_link_follows_symlink+set}" = set; then
  echo $ac_n "(cached) $ac_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 $ac_n "checking for $ac_header... $ac_c" 1>&6
echo "configure:8130: checking for $ac_header" 1>&5
if eval "test \"\${$ac_ac_Header+set}\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 8135 "configure"
#include "confdefs.h"
#include <$ac_header>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:8141: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "$ac_ac_Header=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "$ac_ac_Header=no"
fi
rm -f conftest*
fi
echo "$ac_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 8170 "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:8210: \"$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
  rm -fr conftest*
  jm_ac_cv_func_link_follows_symlink=no
fi
rm -fr conftest*

fi

  
fi
echo "$ac_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 $ac_n "checking for error_at_line... $ac_c" 1>&6
echo "configure:8234: checking for error_at_line" 1>&5
if test "${am_cv_lib_error_at_line+set}" = set; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 8239 "configure"
#include "confdefs.h"

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

fi
echo "$ac_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 $ac_n "checking for $ac_func... $ac_c" 1>&6
echo "configure:8273: checking for $ac_func" 1>&5
if eval "test \"\${$ac_ac_var+set}\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 8278 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();
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:8306: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "$ac_ac_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "$ac_ac_var=no"
fi
rm -f conftest*

fi
echo "$ac_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 $ac_n "checking for $ac_header... $ac_c" 1>&6
echo "configure:8331: checking for $ac_header" 1>&5
if eval "test \"\${$ac_ac_Header+set}\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 8336 "configure"
#include "confdefs.h"
#include <$ac_header>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:8342: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "$ac_ac_Header=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "$ac_ac_Header=no"
fi
rm -f conftest*
fi
echo "$ac_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 $ac_n "checking for $ac_func... $ac_c" 1>&6
echo "configure:8369: checking for $ac_func" 1>&5
if eval "test \"\${$ac_ac_var+set}\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 8374 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();
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:8402: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "$ac_ac_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "$ac_ac_var=no"
fi
rm -f conftest*

fi
echo "$ac_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 $ac_n "checking for struct tm.tm_zone... $ac_c" 1>&6
echo "configure:8426: checking for struct tm.tm_zone" 1>&5
if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 8431 "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:8445: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_member_struct_tm_tm_zone=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_member_struct_tm_tm_zone=no
fi
rm -f conftest*
fi
echo "$ac_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 $ac_n "checking for tzname... $ac_c" 1>&6
echo "configure:8471: checking for tzname" 1>&5
if test "${ac_cv_var_tzname+set}" = set; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 8476 "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:8490: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  ac_cv_var_tzname=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_var_tzname=no
fi
rm -f conftest*

fi
echo "$ac_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 $ac_n "checking for $ac_func... $ac_c" 1>&6
echo "configure:8515: checking for $ac_func" 1>&5
if eval "test \"\${$ac_ac_var+set}\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 8520 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();
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:8548: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "$ac_ac_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "$ac_ac_var=no"
fi
rm -f conftest*

fi
echo "$ac_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 $ac_n "checking for struct tm.tm_gmtoff... $ac_c" 1>&6
echo "configure:8571: checking for struct tm.tm_gmtoff" 1>&5
if test "${ac_cv_member_struct_tm_tm_gmtoff+set}" = set; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 8576 "configure"
#include "confdefs.h"
#include <time.h>

int
main ()
{
struct tm foo;
foo.tm_gmtoff;
  ;
  return 0;
}
EOF
if { (eval echo configure:8589: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_member_struct_tm_tm_gmtoff=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_member_struct_tm_tm_gmtoff=no
fi
rm -f conftest*
fi
echo "$ac_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 $ac_n "checking for $ac_header... $ac_c" 1>&6
echo "configure:8612: checking for $ac_header" 1>&5
if eval "test \"\${$ac_ac_Header+set}\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 8617 "configure"
#include "confdefs.h"
#include <$ac_header>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:8623: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "$ac_ac_Header=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "$ac_ac_Header=no"
fi
rm -f conftest*
fi
echo "$ac_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 $ac_n "checking for working GNU strftime... $ac_c" 1>&6
echo "configure:8647: checking for working GNU strftime" 1>&5
if test "${jm_cv_func_working_gnu_strftime+set}" = set; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  	     jm_cv_func_working_gnu_strftime=no
else
  cat >conftest.$ac_ext <<EOF
#line 8655 "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:8757: \"$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
  rm -fr conftest*
  jm_cv_func_working_gnu_strftime=no
fi
rm -fr conftest*

fi

  
fi
echo "$ac_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 $ac_n "checking for $ac_func... $ac_c" 1>&6
echo "configure:8786: checking for $ac_func" 1>&5
if eval "test \"\${$ac_ac_var+set}\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 8791 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();
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:8819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "$ac_ac_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "$ac_ac_var=no"
fi
rm -f conftest*

fi
echo "$ac_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 $ac_n "checking for getgroups in -lbsd... $ac_c" 1>&6
echo "configure:8845: checking for getgroups in -lbsd" 1>&5
if test "${ac_cv_lib_bsd_getgroups+set}" = set; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lbsd  $LIBS"
cat >conftest.$ac_ext <<EOF
#line 8852 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char getgroups();

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

LIBS="$ac_save_LIBS"
fi
echo "$ac_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 $ac_n "checking for working getgroups... $ac_c" 1>&6
echo "configure:8892: checking for working getgroups" 1>&5
if test "${jm_cv_func_working_getgroups+set}" = set; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  	       jm_cv_func_working_getgroups=no
else
  cat >conftest.$ac_ext <<EOF
#line 8900 "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:8911: \"$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
  rm -fr conftest*
  jm_cv_func_working_getgroups=no
fi
rm -fr conftest*

fi

    
fi
echo "$ac_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 $ac_n "checking for vprintf... $ac_c" 1>&6
echo "configure:8938: checking for vprintf" 1>&5
if test "${ac_cv_func_vprintf+set}" = set; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 8943 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char vprintf(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char vprintf();
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:8971: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  ac_cv_func_vprintf=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_func_vprintf=no
fi
rm -f conftest*

fi
echo "$ac_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 $ac_n "checking for _doprnt... $ac_c" 1>&6
echo "configure:8993: checking for _doprnt" 1>&5
if test "${ac_cv_func__doprnt+set}" = set; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 8998 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char _doprnt(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char _doprnt();
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:9026: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  ac_cv_func__doprnt=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_func__doprnt=no
fi
rm -f conftest*

fi
echo "$ac_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 $ac_n "checking for $ac_func... $ac_c" 1>&6
echo "configure:9057: checking for $ac_func" 1>&5
if eval "test \"\${$ac_ac_var+set}\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 9062 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();
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:9090: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "$ac_ac_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "$ac_ac_var=no"
fi
rm -f conftest*

fi
echo "$ac_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 $ac_n "checking for kstat_open in -lkstat... $ac_c" 1>&6
echo "configure:9113: checking for kstat_open in -lkstat" 1>&5
if test "${ac_cv_lib_kstat_kstat_open+set}" = set; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lkstat  $LIBS"
cat >conftest.$ac_ext <<EOF
#line 9120 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char kstat_open();

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

LIBS="$ac_save_LIBS"
fi
echo "$ac_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 $ac_n "checking for elf_begin in -lelf... $ac_c" 1>&6
echo "configure:9165: checking for elf_begin in -lelf" 1>&5
if test "${ac_cv_lib_elf_elf_begin+set}" = set; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lelf  $LIBS"
cat >conftest.$ac_ext <<EOF
#line 9172 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char elf_begin();

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

LIBS="$ac_save_LIBS"
fi
echo "$ac_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 $ac_n "checking for kvm_open in -lkvm... $ac_c" 1>&6
echo "configure:9207: checking for kvm_open in -lkvm" 1>&5
if test "${ac_cv_lib_kvm_kvm_open+set}" = set; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lkvm  $LIBS"
cat >conftest.$ac_ext <<EOF
#line 9214 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char kvm_open();

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

LIBS="$ac_save_LIBS"
fi
echo "$ac_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 $ac_n "checking for getloadavg in -lutil... $ac_c" 1>&6
echo "configure:9249: checking for getloadavg in -lutil" 1>&5
if test "${ac_cv_lib_util_getloadavg+set}" = set; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lutil  $LIBS"
cat >conftest.$ac_ext <<EOF
#line 9256 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char getloadavg();

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

LIBS="$ac_save_LIBS"
fi
echo "$ac_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 $ac_n "checking for getloadavg in -lgetloadavg... $ac_c" 1>&6
echo "configure:9297: checking for getloadavg in -lgetloadavg" 1>&5
if test "${ac_cv_lib_getloadavg_getloadavg+set}" = set; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lgetloadavg  $LIBS"
cat >conftest.$ac_ext <<EOF
#line 9304 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char getloadavg();

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

LIBS="$ac_save_LIBS"
fi
echo "$ac_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 $ac_n "checking for $ac_func... $ac_c" 1>&6
echo "configure:9346: checking for $ac_func" 1>&5
if eval "test \"\${$ac_ac_var+set}\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 9351 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();
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:9379: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "$ac_ac_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "$ac_ac_var=no"
fi
rm -f conftest*

fi
echo "$ac_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 $ac_n "checking for sys/dg_sys_info.h... $ac_c" 1>&6
echo "configure:9416: checking for sys/dg_sys_info.h" 1>&5
if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 9421 "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:9427: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  ac_cv_header_sys_dg_sys_info_h=yes
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_header_sys_dg_sys_info_h=no
fi
rm -f conftest*
fi
echo "$ac_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 $ac_n "checking for dg_sys_info in -ldgc... $ac_c" 1>&6
echo "configure:9448: checking for dg_sys_info in -ldgc" 1>&5
if test "${ac_cv_lib_dgc_dg_sys_info+set}" = set; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-ldgc  $LIBS"
cat >conftest.$ac_ext <<EOF
#line 9455 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char dg_sys_info();

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

LIBS="$ac_save_LIBS"
fi
echo "$ac_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 $ac_n "checking for locale.h... $ac_c" 1>&6
echo "configure:9496: checking for locale.h" 1>&5
if test "${ac_cv_header_locale_h+set}" = set; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 9501 "configure"
#include "confdefs.h"
#include <locale.h>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:9507: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  ac_cv_header_locale_h=yes
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_header_locale_h=no
fi
rm -f conftest*
fi
echo "$ac_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 $ac_n "checking for $ac_func... $ac_c" 1>&6
echo "configure:9527: checking for $ac_func" 1>&5
if eval "test \"\${$ac_ac_var+set}\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 9532 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();
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:9560: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "$ac_ac_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "$ac_ac_var=no"
fi
rm -f conftest*

fi
echo "$ac_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 $ac_n "checking for inq_stats/cpustats.h... $ac_c" 1>&6
echo "configure:9593: checking for inq_stats/cpustats.h" 1>&5
if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 9598 "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:9604: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  ac_cv_header_inq_stats_cpustats_h=yes
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_header_inq_stats_cpustats_h=no
fi
rm -f conftest*
fi
echo "$ac_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 $ac_n "checking for sys/cpustats.h... $ac_c" 1>&6
echo "configure:9634: checking for sys/cpustats.h" 1>&5
if test "${ac_cv_header_sys_cpustats_h+set}" = set; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 9639 "configure"
#include "confdefs.h"
#include <sys/cpustats.h>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:9645: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  ac_cv_header_sys_cpustats_h=yes
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_header_sys_cpustats_h=no
fi
rm -f conftest*
fi
echo "$ac_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 $ac_n "checking for $ac_header... $ac_c" 1>&6
echo "configure:9674: checking for $ac_header" 1>&5
if eval "test \"\${$ac_ac_Header+set}\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 9679 "configure"
#include "confdefs.h"
#include <$ac_header>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:9685: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "$ac_ac_Header=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "$ac_ac_Header=no"
fi
rm -f conftest*
fi
echo "$ac_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 $ac_n "checking for nlist.h... $ac_c" 1>&6
echo "configure:9711: checking for nlist.h" 1>&5
if test "${ac_cv_header_nlist_h+set}" = set; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 9716 "configure"
#include "confdefs.h"
#include <nlist.h>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:9722: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  ac_cv_header_nlist_h=yes
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_header_nlist_h=no
fi
rm -f conftest*
fi
echo "$ac_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 $ac_n "checking for n_un in struct nlist... $ac_c" 1>&6
echo "configure:9743: checking for n_un in struct nlist" 1>&5
if test "${ac_cv_struct_nlist_n_un+set}" = set; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 9748 "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:9759: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_struct_nlist_n_un=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_struct_nlist_n_un=no
fi
rm -f conftest*
fi
echo "$ac_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 $ac_n "checking whether getloadavg requires setgid... $ac_c" 1>&6
echo "configure:9783: checking whether getloadavg requires setgid" 1>&5
if test "${ac_cv_func_getloadavg_setgid+set}" = set; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 9788 "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
  rm -rf conftest*
  ac_cv_func_getloadavg_setgid=yes
else
  rm -rf conftest*
  ac_cv_func_getloadavg_setgid=no
fi
rm -f conftest*

fi
echo "$ac_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 $ac_n "checking group of /dev/kmem... $ac_c" 1>&6
echo "configure:9818: checking group of /dev/kmem" 1>&5
if test "${ac_cv_group_kmem+set}" = set; then
  echo $ac_n "(cached) $ac_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 "$ac_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 $ac_n "checking for /proc/uptime... $ac_c" 1>&6
echo "configure:9846: checking for /proc/uptime" 1>&5
if test "${jm_cv_have_proc_uptime+set}" = set; then
  echo $ac_n "(cached) $ac_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 "$ac_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 $ac_n "checking for $ac_func... $ac_c" 1>&6
echo "configure:9868: checking for $ac_func" 1>&5
if eval "test \"\${$ac_ac_var+set}\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 9873 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();
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:9901: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "$ac_ac_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "$ac_ac_var=no"
fi
rm -f conftest*

fi
echo "$ac_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 $ac_n "checking for $ac_header... $ac_c" 1>&6
echo "configure:9929: checking for $ac_header" 1>&5
if eval "test \"\${$ac_ac_Header+set}\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 9934 "configure"
#include "confdefs.h"
#include <$ac_header>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:9940: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "$ac_ac_Header=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "$ac_ac_Header=no"
fi
rm -f conftest*
fi
echo "$ac_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 $ac_n "checking fcntl emulation of ftruncate... $ac_c" 1>&6
echo "configure:9964: checking fcntl emulation of ftruncate" 1>&5
    if test "${fu_cv_sys_ftruncate_emulation+set}" = set; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 9969 "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:9986: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  fu_cv_sys_ftruncate_emulation=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  fu_cv_sys_ftruncate_emulation=no
fi
rm -f conftest*

fi

    echo "$ac_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 $ac_n "checking whether closedir returns void... $ac_c" 1>&6
echo "configure:10006: checking whether closedir returns void" 1>&5
if test "${ac_cv_func_closedir_void+set}" = set; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_func_closedir_void=yes
else
  cat >conftest.$ac_ext <<EOF
#line 10014 "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:10026: \"$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
  rm -fr conftest*
  ac_cv_func_closedir_void=yes
fi
rm -fr conftest*

fi

fi
echo "$ac_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 $ac_n "checking for $ac_header... $ac_c" 1>&6
echo "configure:10052: checking for $ac_header" 1>&5
if eval "test \"\${$ac_ac_Header+set}\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 10057 "configure"
#include "confdefs.h"
#include <$ac_header>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:10063: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "$ac_ac_Header=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "$ac_ac_Header=no"
fi
rm -f conftest*
fi
echo "$ac_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 $ac_n "checking whether utimes accepts a null argument... $ac_c" 1>&6
echo "configure:10091: checking whether utimes accepts a null argument" 1>&5
if test "${ac_cv_func_utimes_null+set}" = set; then
  echo $ac_n "(cached) $ac_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 10100 "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:10114: \"$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
  rm -fr conftest*
  ac_cv_func_utimes_null=no
fi
rm -fr conftest*

fi

rm -f core core.* *.core
fi
echo "$ac_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 $ac_n "checking for $ac_func... $ac_c" 1>&6
echo "configure:10143: checking for $ac_func" 1>&5
if eval "test \"\${$ac_ac_var+set}\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 10148 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();
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:10176: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "$ac_ac_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "$ac_ac_var=no"
fi
rm -f conftest*

fi
echo "$ac_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 \
    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 $ac_n "checking for $ac_header... $ac_c" 1>&6
echo "configure:10255: checking for $ac_header" 1>&5
if eval "test \"\${$ac_ac_Header+set}\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 10260 "configure"
#include "confdefs.h"
#include <$ac_header>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:10266: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "$ac_ac_Header=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "$ac_ac_Header=no"
fi
rm -f conftest*
fi
echo "$ac_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 failing regular expression is from `Spencer ere test #75'
    # in grep-2.3.
    echo $ac_n "checking for working re_compile_pattern... $ac_c" 1>&6
echo "configure:10300: checking for working re_compile_pattern" 1>&5
if test "${jm_cv_func_working_re_compile_pattern+set}" = set; then
  echo $ac_n "(cached) $ac_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 10308 "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.  */
	    exit (s ? 0 : 1);
	  }
	
EOF
if { (eval echo configure:10327: \"$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
  rm -fr conftest*
  jm_cv_func_working_re_compile_pattern=no
fi
rm -fr conftest*

fi

fi
echo "$ac_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 $ac_n "checking for $ac_func... $ac_c" 1>&6
echo "configure:10412: checking for $ac_func" 1>&5
if eval "test \"\${$ac_ac_var+set}\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 10417 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();
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:10445: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "$ac_ac_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "$ac_ac_var=no"
fi
rm -f conftest*

fi
echo "$ac_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 $ac_n "checking for $ac_func... $ac_c" 1>&6
echo "configure:10472: checking for $ac_func" 1>&5
if eval "test \"\${$ac_ac_var+set}\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 10477 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();
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:10505: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "$ac_ac_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "$ac_ac_var=no"
fi
rm -f conftest*

fi
echo "$ac_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 $ac_n "checking for $ac_func... $ac_c" 1>&6
echo "configure:10532: checking for $ac_func" 1>&5
if eval "test \"\${$ac_ac_var+set}\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 10537 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();
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:10565: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "$ac_ac_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "$ac_ac_var=no"
fi
rm -f conftest*

fi
echo "$ac_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 $ac_n "checking for $ac_func... $ac_c" 1>&6
echo "configure:10592: checking for $ac_func" 1>&5
if eval "test \"\${$ac_ac_var+set}\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 10597 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();
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:10625: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "$ac_ac_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "$ac_ac_var=no"
fi
rm -f conftest*

fi
echo "$ac_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 $ac_n "checking for $ac_func... $ac_c" 1>&6
echo "configure:10652: checking for $ac_func" 1>&5
if eval "test \"\${$ac_ac_var+set}\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 10657 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();
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:10685: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "$ac_ac_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "$ac_ac_var=no"
fi
rm -f conftest*

fi
echo "$ac_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 $ac_n "checking for $ac_func... $ac_c" 1>&6
echo "configure:10712: checking for $ac_func" 1>&5
if eval "test \"\${$ac_ac_var+set}\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 10717 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();
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:10745: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "$ac_ac_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "$ac_ac_var=no"
fi
rm -f conftest*

fi
echo "$ac_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 $ac_n "checking for $ac_func... $ac_c" 1>&6
echo "configure:10772: checking for $ac_func" 1>&5
if eval "test \"\${$ac_ac_var+set}\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 10777 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();
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:10805: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "$ac_ac_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "$ac_ac_var=no"
fi
rm -f conftest*

fi
echo "$ac_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 $ac_n "checking for $ac_func... $ac_c" 1>&6
echo "configure:10832: checking for $ac_func" 1>&5
if eval "test \"\${$ac_ac_var+set}\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 10837 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();
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:10865: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "$ac_ac_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "$ac_ac_var=no"
fi
rm -f conftest*

fi
echo "$ac_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 $ac_n "checking for $ac_func... $ac_c" 1>&6
echo "configure:10892: checking for $ac_func" 1>&5
if eval "test \"\${$ac_ac_var+set}\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 10897 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();
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:10925: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "$ac_ac_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "$ac_ac_var=no"
fi
rm -f conftest*

fi
echo "$ac_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 $ac_n "checking whether setvbuf arguments are reversed... $ac_c" 1>&6
echo "configure:10956: checking whether setvbuf arguments are reversed" 1>&5
if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
    { echo "configure: error: cannot run test program while cross compiling" 1>&2; exit 1; }
else
  cat >conftest.$ac_ext <<EOF
#line 10964 "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:10980: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  ac_cv_func_setvbuf_reversed=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_func_setvbuf_reversed=no
fi
rm -fr conftest*

fi

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

fi

  # 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 $ac_n "checking for library containing clock_gettime... $ac_c" 1>&6
echo "configure:11009: checking for library containing clock_gettime" 1>&5
if test "${ac_cv_search_clock_gettime+set}" = set; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
    ac_func_search_save_LIBS="$LIBS"
    ac_cv_search_clock_gettime="no"
    cat >conftest.$ac_ext <<EOF
#line 11017 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char clock_gettime();

int
main()
{
clock_gettime()
  ;
  return 0;
}
EOF
if { (eval echo configure:11032: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  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 11045 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char clock_gettime();

int
main()
{
clock_gettime()
  ;
  return 0;
}
EOF
if { (eval echo configure:11060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  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 "$ac_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 $ac_n "checking for $ac_func... $ac_c" 1>&6
echo "configure:11092: checking for $ac_func" 1>&5
if eval "test \"\${$ac_ac_var+set}\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 11097 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();
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:11125: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "$ac_ac_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "$ac_ac_var=no"
fi
rm -f conftest*

fi
echo "$ac_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 $ac_n "checking for $ac_func... $ac_c" 1>&6
echo "configure:11150: checking for $ac_func" 1>&5
if eval "test \"\${$ac_ac_var+set}\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 11155 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();
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:11183: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "$ac_ac_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "$ac_ac_var=no"
fi
rm -f conftest*

fi
echo "$ac_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 $ac_n "checking for $ac_func... $ac_c" 1>&6
echo "configure:11240: checking for $ac_func" 1>&5
if eval "test \"\${$ac_ac_var+set}\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 11245 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();
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:11273: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "$ac_ac_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "$ac_ac_var=no"
fi
rm -f conftest*

fi
echo "$ac_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 $ac_n "checking for getline... $ac_c" 1>&6
echo "configure:11296: checking for getline" 1>&5
if test "${ac_cv_func_getline+set}" = set; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 11301 "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.  */
/* 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:11329: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  ac_cv_func_getline=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_func_getline=no
fi
rm -f conftest*

fi
echo "$ac_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 $ac_n "checking for $ac_header... $ac_c" 1>&6
echo "configure:11353: checking for $ac_header" 1>&5
if eval "test \"\${$ac_ac_Header+set}\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 11358 "configure"
#include "confdefs.h"
#include <$ac_header>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:11364: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "$ac_ac_Header=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "$ac_ac_Header=no"
fi
rm -f conftest*
fi
echo "$ac_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 $ac_n "checking for working getline function... $ac_c" 1>&6
echo "configure:11388: checking for working getline function" 1>&5
if test "${am_cv_func_working_getline+set}" = set; then
  echo $ac_n "(cached) $ac_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 11397 "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:11418: \"$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
  rm -fr conftest*
  am_cv_func_working_getline=no     
fi
rm -fr conftest*

fi

fi
echo "$ac_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 $ac_n "checking for $ac_func... $ac_c" 1>&6
echo "configure:11444: checking for $ac_func" 1>&5
if eval "test \"\${$ac_ac_var+set}\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 11449 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();
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:11477: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "$ac_ac_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "$ac_ac_var=no"
fi
rm -f conftest*

fi
echo "$ac_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 $ac_n "checking for obstacks... $ac_c" 1>&6
echo "configure:11500: checking for obstacks" 1>&5
if test "${am_cv_func_obstack+set}" = set; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 11505 "configure"
#include "confdefs.h"
#include "obstack.h"
int
main()
{
struct obstack *mem;obstack_free(mem,(char *) 0)
  ;
  return 0;
}
EOF
if { (eval echo configure:11516: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  am_cv_func_obstack=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  am_cv_func_obstack=no
fi
rm -f conftest*

fi
echo "$ac_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 $ac_n "checking for working strtod... $ac_c" 1>&6
echo "configure:11539: checking for working strtod" 1>&5
if test "${am_cv_func_strtod+set}" = set; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  am_cv_func_strtod=no
else
  cat >conftest.$ac_ext <<EOF
#line 11547 "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:11577: \"$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
  rm -fr conftest*
  am_cv_func_strtod=no
fi
rm -fr conftest*

fi

fi
echo "$ac_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 $ac_n "checking for $ac_func... $ac_c" 1>&6
echo "configure:11599: checking for $ac_func" 1>&5
if eval "test \"\${$ac_ac_var+set}\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 11604 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();
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:11632: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "$ac_ac_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "$ac_ac_var=no"
fi
rm -f conftest*

fi
echo "$ac_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 $ac_n "checking for pow in -lm... $ac_c" 1>&6
echo "configure:11655: checking for pow in -lm" 1>&5
if test "${ac_cv_lib_m_pow+set}" = set; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lm  $LIBS"
cat >conftest.$ac_ext <<EOF
#line 11662 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char pow();

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

LIBS="$ac_save_LIBS"
fi
echo "$ac_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

  # 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 $ac_n "checking for getmntent in -lsun... $ac_c" 1>&6
echo "configure:11712: checking for getmntent in -lsun" 1>&5
if test "${ac_cv_lib_sun_getmntent+set}" = set; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lsun  $LIBS"
cat >conftest.$ac_ext <<EOF
#line 11719 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char getmntent();

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

LIBS="$ac_save_LIBS"
fi
echo "$ac_t""$ac_cv_lib_sun_getmntent" 1>&6
if test $ac_cv_lib_sun_getmntent = yes; then
  LIBS="-lsun $LIBS"
else
  echo $ac_n "checking for getmntent in -lseq... $ac_c" 1>&6
echo "configure:11752: checking for getmntent in -lseq" 1>&5
if test "${ac_cv_lib_seq_getmntent+set}" = set; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lseq  $LIBS"
cat >conftest.$ac_ext <<EOF
#line 11759 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char getmntent();

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

LIBS="$ac_save_LIBS"
fi
echo "$ac_t""$ac_cv_lib_seq_getmntent" 1>&6
if test $ac_cv_lib_seq_getmntent = yes; then
  LIBS="-lseq $LIBS"
else
  echo $ac_n "checking for getmntent in -lgen... $ac_c" 1>&6
echo "configure:11792: checking for getmntent in -lgen" 1>&5
if test "${ac_cv_lib_gen_getmntent+set}" = set; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lgen  $LIBS"
cat >conftest.$ac_ext <<EOF
#line 11799 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char getmntent();

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

LIBS="$ac_save_LIBS"
fi
echo "$ac_t""$ac_cv_lib_gen_getmntent" 1>&6
if test $ac_cv_lib_gen_getmntent = yes; then
  LIBS="-lgen $LIBS"
fi

fi

fi

echo $ac_n "checking for getmntent... $ac_c" 1>&6
echo "configure:11837: checking for getmntent" 1>&5
if test "${ac_cv_func_getmntent+set}" = set; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 11842 "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.  */
/* 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:11870: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  ac_cv_func_getmntent=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_func_getmntent=no
fi
rm -f conftest*

fi
echo "$ac_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 $ac_n "checking for listmntent of Cray/Unicos-9... $ac_c" 1>&6
echo "configure:11902: checking for listmntent of Cray/Unicos-9" 1>&5
  if test "${fu_cv_sys_mounted_cray_listmntent+set}" = set; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  fu_cv_sys_mounted_cray_listmntent=no
      cat >conftest.$ac_ext <<EOF
#line 11908 "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
  rm -rf conftest*
  test $ac_cv_func_listmntent = yes \
	    && fu_cv_sys_mounted_cray_listmntent=yes
      
fi
rm -f conftest*

    
  
fi

  echo "$ac_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 $ac_n "checking for one-argument getmntent function... $ac_c" 1>&6
echo "configure:11946: checking for one-argument getmntent function" 1>&5
    if test "${fu_cv_sys_mounted_getmntent1+set}" = set; then
  echo $ac_n "(cached) $ac_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 "$ac_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 $ac_n "checking for two-argument getmntent function... $ac_c" 1>&6
echo "configure:11968: checking for two-argument getmntent function" 1>&5
    if test "${fu_cv_sys_mounted_getmntent2+set}" = set; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 11973 "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
  rm -rf conftest*
  fu_cv_sys_mounted_getmntent2=yes
else
  rm -rf conftest*
  fu_cv_sys_mounted_getmntent2=no
fi
rm -f conftest*

fi

    echo "$ac_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 $ac_n "checking for getfsstat function... $ac_c" 1>&6
echo "configure:12009: checking for getfsstat function" 1>&5
  if test "${fu_cv_sys_mounted_getsstat+set}" = set; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 12014 "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:12029: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  fu_cv_sys_mounted_getsstat=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  fu_cv_sys_mounted_getsstat=no
fi
rm -f conftest*

fi

  echo "$ac_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 $ac_n "checking for mntctl function and struct vmount... $ac_c" 1>&6
echo "configure:12055: checking for mntctl function and struct vmount" 1>&5
  if test "${fu_cv_sys_mounted_vmount+set}" = set; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 12060 "configure"
#include "confdefs.h"
#include <fshelp.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:12065: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  fu_cv_sys_mounted_vmount=yes
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  fu_cv_sys_mounted_vmount=no
fi
rm -f conftest*
fi

  echo "$ac_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 $ac_n "checking for FIXME existence of three headers... $ac_c" 1>&6
echo "configure:12093: checking for FIXME existence of three headers" 1>&5
  if test "${fu_cv_sys_mounted_fread_fstyp+set}" = set; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 12098 "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:12106: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  fu_cv_sys_mounted_fread_fstyp=yes
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  fu_cv_sys_mounted_fread_fstyp=no
fi
rm -f conftest*
fi

  echo "$ac_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 $ac_n "checking for getmntinfo function... $ac_c" 1>&6
echo "configure:12134: checking for getmntinfo function" 1>&5
  if test "${fu_cv_sys_mounted_getmntinfo+set}" = set; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
      ok=
      if test $ac_cv_func_getmntinfo = yes; then
	cat >conftest.$ac_ext <<EOF
#line 12142 "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
  rm -rf conftest*
  ok=yes
fi
rm -f conftest*

      fi
      test -n "$ok" \
	  && fu_cv_sys_mounted_getmntinfo=yes \
	  || fu_cv_sys_mounted_getmntinfo=no
    
fi

  echo "$ac_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 $ac_n "checking for getmnt function... $ac_c" 1>&6
echo "configure:12176: checking for getmnt function" 1>&5
  if test "${fu_cv_sys_mounted_getmnt+set}" = set; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 12181 "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:12188: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  fu_cv_sys_mounted_getmnt=yes
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  fu_cv_sys_mounted_getmnt=no
fi
rm -f conftest*
fi

  echo "$ac_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 $ac_n "checking whether it is possible to resort to fread on /etc/mnttab... $ac_c" 1>&6
echo "configure:12216: 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 $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 12221 "configure"
#include "confdefs.h"
#include <mnttab.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:12226: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  fu_cv_sys_mounted_fread=yes
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  fu_cv_sys_mounted_fread=no
fi
rm -f conftest*
fi

  echo "$ac_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 $ac_n "checking for f_fstypename in struct statfs... $ac_c" 1>&6
echo "configure:12266: checking for f_fstypename in struct statfs" 1>&5
if test "${fu_cv_sys_f_fstypename_in_statfs+set}" = set; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
	cat >conftest.$ac_ext <<EOF
#line 12272 "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:12287: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  fu_cv_sys_f_fstypename_in_statfs=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  fu_cv_sys_f_fstypename_in_statfs=no
	
fi
rm -f conftest*
      
    
fi
echo "$ac_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:12314: 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 $ac_n "checking for statvfs function (SVR4)... $ac_c" 1>&6
echo "configure:12326: checking for statvfs function (SVR4)" 1>&5
if test "${fu_cv_sys_stat_statvfs+set}" = set; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 12331 "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:12343: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  fu_cv_sys_stat_statvfs=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  fu_cv_sys_stat_statvfs=no
fi
rm -f conftest*

fi
echo "$ac_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 $ac_n "checking for 3-argument statfs function (DEC OSF/1)... $ac_c" 1>&6
echo "configure:12368: checking for 3-argument statfs function (DEC OSF/1)" 1>&5
  if test "${fu_cv_sys_stat_statfs3_osf1+set}" = set; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  fu_cv_sys_stat_statfs3_osf1=no
else
  cat >conftest.$ac_ext <<EOF
#line 12376 "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:12389: \"$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
  rm -fr conftest*
  fu_cv_sys_stat_statfs3_osf1=no
fi
rm -fr conftest*

fi

fi

  echo "$ac_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 $ac_n "checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)... $ac_c" 1>&6
echo "configure:12417: 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 $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  fu_cv_sys_stat_statfs2_bsize=no
else
  cat >conftest.$ac_ext <<EOF
#line 12426 "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:12445: \"$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
  rm -fr conftest*
  fu_cv_sys_stat_statfs2_bsize=no
fi
rm -fr conftest*

fi

fi

  echo "$ac_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 $ac_n "checking for four-argument statfs (AIX-3.2.5, SVR3)... $ac_c" 1>&6
echo "configure:12473: checking for four-argument statfs (AIX-3.2.5, SVR3)" 1>&5
  if test "${fu_cv_sys_stat_statfs4+set}" = set; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  fu_cv_sys_stat_statfs4=no
else
  cat >conftest.$ac_ext <<EOF
#line 12481 "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:12491: \"$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
  rm -fr conftest*
  fu_cv_sys_stat_statfs4=no
fi
rm -fr conftest*

fi

fi

  echo "$ac_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 $ac_n "checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)... $ac_c" 1>&6
echo "configure:12519: 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 $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  fu_cv_sys_stat_statfs2_fsize=no
else
  cat >conftest.$ac_ext <<EOF
#line 12528 "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:12544: \"$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
  rm -fr conftest*
  fu_cv_sys_stat_statfs2_fsize=no
fi
rm -fr conftest*

fi

fi

  echo "$ac_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 $ac_n "checking for two-argument statfs with struct fs_data (Ultrix)... $ac_c" 1>&6
echo "configure:12572: checking for two-argument statfs with struct fs_data (Ultrix)" 1>&5
  if test "${fu_cv_sys_stat_fs_data+set}" = set; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  fu_cv_sys_stat_fs_data=no
else
  cat >conftest.$ac_ext <<EOF
#line 12580 "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:12600: \"$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
  rm -fr conftest*
  fu_cv_sys_stat_fs_data=no
fi
rm -fr conftest*

fi

fi

  echo "$ac_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 12628 "configure"
#include "confdefs.h"
#include <sys/filsys.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:12633: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  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

for ac_func in nl_langinfo
do
ac_ac_var=`echo "ac_cv_func_$ac_func" | $ac_tr_sh`
echo $ac_n "checking for $ac_func... $ac_c" 1>&6
echo "configure:12666: checking for $ac_func" 1>&5
if eval "test \"\${$ac_ac_var+set}\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 12671 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();
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:12699: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "$ac_ac_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "$ac_ac_var=no"
fi
rm -f conftest*

fi
echo "$ac_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 langinfo.h
do
ac_ac_Header=`echo "ac_cv_header_$ac_header" | $ac_tr_sh`
echo $ac_n "checking for $ac_header... $ac_c" 1>&6
echo "configure:12724: checking for $ac_header" 1>&5
if eval "test \"\${$ac_ac_Header+set}\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 12729 "configure"
#include "confdefs.h"
#include <$ac_header>

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

  # Check for libypsec.a on Dolphin M88K machines.
  echo $ac_n "checking for main in -lypsec... $ac_c" 1>&6
echo "configure:12760: checking for main in -lypsec" 1>&5
if test "${ac_cv_lib_ypsec_main+set}" = set; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lypsec  $LIBS"
cat >conftest.$ac_ext <<EOF
#line 12767 "configure"
#include "confdefs.h"

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

LIBS="$ac_save_LIBS"
fi
echo "$ac_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 $ac_n "checking for main in -lldgc... $ac_c" 1>&6
echo "configure:12803: checking for main in -lldgc" 1>&5
if test "${ac_cv_lib_ldgc_main+set}" = set; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lldgc  $LIBS"
cat >conftest.$ac_ext <<EOF
#line 12810 "configure"
#include "confdefs.h"

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

LIBS="$ac_save_LIBS"
fi
echo "$ac_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 $ac_n "checking for $ac_func... $ac_c" 1>&6
echo "configure:12856: checking for $ac_func" 1>&5
if eval "test \"\${$ac_ac_var+set}\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 12861 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();
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:12889: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "$ac_ac_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "$ac_ac_var=no"
fi
rm -f conftest*

fi
echo "$ac_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 $ac_n "checking for $ac_func... $ac_c" 1>&6
echo "configure:12917: checking for $ac_func" 1>&5
if eval "test \"\${$ac_ac_var+set}\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 12922 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();
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:12950: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "$ac_ac_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "$ac_ac_var=no"
fi
rm -f conftest*

fi
echo "$ac_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 $ac_n "checking for sqrt in -lm... $ac_c" 1>&6
echo "configure:12973: checking for sqrt in -lm" 1>&5
if test "${ac_cv_lib_m_sqrt+set}" = set; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lm  $LIBS"
cat >conftest.$ac_ext <<EOF
#line 12980 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char sqrt();

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

LIBS="$ac_save_LIBS"
fi
echo "$ac_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 $ac_n "checking for $ac_func... $ac_c" 1>&6
echo "configure:13020: checking for $ac_func" 1>&5
if eval "test \"\${$ac_ac_var+set}\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 13025 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();
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:13053: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "$ac_ac_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "$ac_ac_var=no"
fi
rm -f conftest*

fi
echo "$ac_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 $ac_n "checking for fesetround in -lm... $ac_c" 1>&6
echo "configure:13076: checking for fesetround in -lm" 1>&5
if test "${ac_cv_lib_m_fesetround+set}" = set; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lm  $LIBS"
cat >conftest.$ac_ext <<EOF
#line 13083 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char fesetround();

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

LIBS="$ac_save_LIBS"
fi
echo "$ac_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 $ac_n "checking for library containing yp_match... $ac_c" 1>&6
echo "configure:13123: checking for library containing yp_match" 1>&5
if test "${ac_cv_search_yp_match+set}" = set; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
    ac_func_search_save_LIBS="$LIBS"
    ac_cv_search_yp_match="no"
    cat >conftest.$ac_ext <<EOF
#line 13131 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char yp_match();

int
main()
{
yp_match()
  ;
  return 0;
}
EOF
if { (eval echo configure:13146: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  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 13159 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char yp_match();

int
main()
{
yp_match()
  ;
  return 0;
}
EOF
if { (eval echo configure:13174: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  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 "$ac_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.
  
  
  echo $ac_n "checking for library containing getspnam... $ac_c" 1>&6
echo "configure:13207: checking for library containing getspnam" 1>&5
if test "${ac_cv_search_getspnam+set}" = set; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
    ac_func_search_save_LIBS="$LIBS"
    ac_cv_search_getspnam="no"
    cat >conftest.$ac_ext <<EOF
#line 13215 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char getspnam();

int
main()
{
getspnam()
  ;
  return 0;
}
EOF
if { (eval echo configure:13230: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  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; do
	LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
	cat >conftest.$ac_ext <<EOF
#line 13243 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char getspnam();

int
main()
{
getspnam()
  ;
  return 0;
}
EOF
if { (eval echo configure:13258: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  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 "$ac_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 $ac_n "checking for struct passwd.sp_pwdp... $ac_c" 1>&6
echo "configure:13289: checking for struct passwd.sp_pwdp" 1>&5
if test "${ac_cv_member_struct_passwd_sp_pwdp+set}" = set; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 13294 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
struct passwd foo;
foo.sp_pwdp;
  ;
  return 0;
}
EOF
if { (eval echo configure:13306: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_member_struct_passwd_sp_pwdp=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_member_struct_passwd_sp_pwdp=no
fi
rm -f conftest*
fi
echo "$ac_t""$ac_cv_member_struct_passwd_sp_pwdp" 1>&6
if test $ac_cv_member_struct_passwd_sp_pwdp = yes; then
  cat >>confdefs.h <<EOF
#define HAVE_STRUCT_PASSWD_SP_PWDP 1
EOF

fi

  for ac_func in getspnam
do
ac_ac_var=`echo "ac_cv_func_$ac_func" | $ac_tr_sh`
echo $ac_n "checking for $ac_func... $ac_c" 1>&6
echo "configure:13329: checking for $ac_func" 1>&5
if eval "test \"\${$ac_ac_var+set}\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 13334 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();
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:13362: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "$ac_ac_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "$ac_ac_var=no"
fi
rm -f conftest*

fi
echo "$ac_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 $ac_n "checking for $ac_header... $ac_c" 1>&6
echo "configure:13387: checking for $ac_header" 1>&5
if eval "test \"\${$ac_ac_Header+set}\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 13392 "configure"
#include "confdefs.h"
#include <$ac_header>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:13398: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "$ac_ac_Header=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "$ac_ac_Header=no"
fi
rm -f conftest*
fi
echo "$ac_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 $ac_n "checking for library containing crypt... $ac_c" 1>&6
echo "configure:13427: checking for library containing crypt" 1>&5
if test "${ac_cv_search_crypt+set}" = set; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
    ac_func_search_save_LIBS="$LIBS"
    ac_cv_search_crypt="no"
    cat >conftest.$ac_ext <<EOF
#line 13435 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char crypt();

int
main()
{
crypt()
  ;
  return 0;
}
EOF
if { (eval echo configure:13450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  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 13463 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char crypt();

int
main()
{
crypt()
  ;
  return 0;
}
EOF
if { (eval echo configure:13478: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  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 "$ac_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 unistd.h
do
ac_ac_Header=`echo "ac_cv_header_$ac_header" | $ac_tr_sh`
echo $ac_n "checking for $ac_header... $ac_c" 1>&6
echo "configure:13513: checking for $ac_header" 1>&5
if eval "test \"\${$ac_ac_Header+set}\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 13518 "configure"
#include "confdefs.h"
#include <$ac_header>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:13524: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "$ac_ac_Header=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "$ac_ac_Header=no"
fi
rm -f conftest*
fi
echo "$ac_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 $ac_n "checking for $ac_func... $ac_c" 1>&6
echo "configure:13551: checking for $ac_func" 1>&5
if eval "test \"\${$ac_ac_var+set}\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 13556 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();
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:13584: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "$ac_ac_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "$ac_ac_var=no"
fi
rm -f conftest*

fi
echo "$ac_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 $ac_n "checking for working mmap... $ac_c" 1>&6
echo "configure:13606: checking for working mmap" 1>&5
if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_func_mmap_fixed_mapped=no
else
  cat >conftest.$ac_ext <<EOF
#line 13614 "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>

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

/* 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 */

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

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

  pagesize = getpagesize ();

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

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

  /* Finally, make sure that changes to the mapped area do not
     percolate back to the file as seen by read().  (This is a bug on
     some variants of i386 svr4.0.)  */
  for (i = 0; i < pagesize; ++i)
    *(data2 + i) = *(data2 + i) + 1;
  data3 = malloc (pagesize);
  if (!data3)
    exit (1);
  if (read (fd, data3, pagesize) != pagesize)
    exit (1);
  for (i = 0; i < pagesize; ++i)
    if (*(data + i) != *(data3 + i))
      exit (1);
  close (fd);
  unlink ("conftestmmap");
  exit (0);
}
EOF
if { (eval echo configure:13746: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  ac_cv_func_mmap_fixed_mapped=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_func_mmap_fixed_mapped=no
fi
rm -fr conftest*

fi

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

fi

                              
   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 $ac_n "checking for $ac_header... $ac_c" 1>&6
echo "configure:13774: checking for $ac_header" 1>&5
if eval "test \"\${$ac_ac_Header+set}\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 13779 "configure"
#include "confdefs.h"
#include <$ac_header>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:13785: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "$ac_ac_Header=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "$ac_ac_Header=no"
fi
rm -f conftest*
fi
echo "$ac_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 $ac_n "checking for $ac_func... $ac_c" 1>&6
echo "configure:13813: checking for $ac_func" 1>&5
if eval "test \"\${$ac_ac_var+set}\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 13818 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();
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:13846: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "$ac_ac_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "$ac_ac_var=no"
fi
rm -f conftest*

fi
echo "$ac_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 $ac_n "checking for $ac_func... $ac_c" 1>&6
echo "configure:13872: checking for $ac_func" 1>&5
if eval "test \"\${$ac_ac_var+set}\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 13877 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();
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:13905: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "$ac_ac_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "$ac_ac_var=no"
fi
rm -f conftest*

fi
echo "$ac_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 $ac_n "checking for LC_MESSAGES... $ac_c" 1>&6
echo "configure:13936: checking for LC_MESSAGES" 1>&5
if test "${am_cv_val_LC_MESSAGES+set}" = set; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 13941 "configure"
#include "confdefs.h"
#include <locale.h>
int
main()
{
return LC_MESSAGES
  ;
  return 0;
}
EOF
if { (eval echo configure:13952: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  am_cv_val_LC_MESSAGES=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  am_cv_val_LC_MESSAGES=no
fi
rm -f conftest*

fi
echo "$ac_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 $ac_n "checking whether NLS is requested... $ac_c" 1>&6
echo "configure:13973: 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 "$ac_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 $ac_n "checking whether included gettext is requested... $ac_c" 1>&6
echo "configure:13993: 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 "$ac_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 $ac_n "checking for libintl.h... $ac_c" 1>&6
echo "configure:14011: checking for libintl.h" 1>&5
if test "${ac_cv_header_libintl_h+set}" = set; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 14016 "configure"
#include "confdefs.h"
#include <libintl.h>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:14022: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  ac_cv_header_libintl_h=yes
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_header_libintl_h=no
fi
rm -f conftest*
fi
echo "$ac_t""$ac_cv_header_libintl_h" 1>&6
if test $ac_cv_header_libintl_h = yes; then
  echo $ac_n "checking for gettext in libc... $ac_c" 1>&6
echo "configure:14039: checking for gettext in libc" 1>&5
if test "${gt_cv_func_gettext_libc+set}" = set; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 14044 "configure"
#include "confdefs.h"
#include <libintl.h>
int
main()
{
return (int) gettext ("")
  ;
  return 0;
}
EOF
if { (eval echo configure:14055: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  gt_cv_func_gettext_libc=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  gt_cv_func_gettext_libc=no
fi
rm -f conftest*

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

	   if test "$gt_cv_func_gettext_libc" != "yes"; then
	     echo $ac_n "checking for bindtextdomain in -lintl... $ac_c" 1>&6
echo "configure:14071: checking for bindtextdomain in -lintl" 1>&5
if test "${ac_cv_lib_intl_bindtextdomain+set}" = set; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lintl  $LIBS"
cat >conftest.$ac_ext <<EOF
#line 14078 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char bindtextdomain();

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

LIBS="$ac_save_LIBS"
fi
echo "$ac_t""$ac_cv_lib_intl_bindtextdomain" 1>&6
if test $ac_cv_lib_intl_bindtextdomain = yes; then
  echo $ac_n "checking for gettext in -lintl... $ac_c" 1>&6
echo "configure:14109: checking for gettext in -lintl" 1>&5
if test "${ac_cv_lib_intl_gettext+set}" = set; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lintl  $LIBS"
cat >conftest.$ac_ext <<EOF
#line 14116 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char gettext();

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

LIBS="$ac_save_LIBS"
fi
echo "$ac_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 $ac_n "checking for $ac_word... $ac_c" 1>&6
echo "configure:14167: checking for $ac_word" 1>&5
if test "${ac_cv_path_MSGFMT+set}" = set; then
  echo $ac_n "(cached) $ac_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 "$ac_t""$MSGFMT" 1>&6
else
  echo "$ac_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 $ac_n "checking for $ac_func... $ac_c" 1>&6
echo "configure:14202: checking for $ac_func" 1>&5
if eval "test \"\${$ac_ac_var+set}\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 14207 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();
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:14235: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "$ac_ac_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "$ac_ac_var=no"
fi
rm -f conftest*

fi
echo "$ac_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 $ac_n "checking for $ac_word... $ac_c" 1>&6
echo "configure:14259: checking for $ac_word" 1>&5
if test "${ac_cv_path_GMSGFMT+set}" = set; then
  echo $ac_n "(cached) $ac_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=":"
  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 "$ac_t""$GMSGFMT" 1>&6
else
  echo "$ac_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 $ac_n "checking for $ac_word... $ac_c" 1>&6
echo "configure:14292: checking for $ac_word" 1>&5
if test "${ac_cv_path_XGETTEXT+set}" = set; then
  echo $ac_n "(cached) $ac_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 "$ac_t""$XGETTEXT" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

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

int
main()
{
extern int _nl_msg_cat_cntr;
			       return _nl_msg_cat_cntr
  ;
  return 0;
}
EOF
if { (eval echo configure:14336: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  CATOBJEXT=.gmo
		   DATADIRNAME=share
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  CATOBJEXT=.mo
		   DATADIRNAME=lib
fi
rm -f conftest*

		INSTOBJEXT=.mo
	      fi
	    fi
	
fi

        if test "$CATOBJEXT" = "NONE"; then
	  echo $ac_n "checking whether catgets can be used... $ac_c" 1>&6
echo "configure:14357: 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 "$ac_t""$nls_cv_use_catgets" 1>&6

	  if test "$nls_cv_use_catgets" = "yes"; then
	    	    echo $ac_n "checking for main in -li... $ac_c" 1>&6
echo "configure:14370: checking for main in -li" 1>&5
if test "${ac_cv_lib_i_main+set}" = set; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-li  $LIBS"
cat >conftest.$ac_ext <<EOF
#line 14377 "configure"
#include "confdefs.h"

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

LIBS="$ac_save_LIBS"
fi
echo "$ac_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 $ac_n "checking for catgets... $ac_c" 1>&6
echo "configure:14412: checking for catgets" 1>&5
if test "${ac_cv_func_catgets+set}" = set; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 14417 "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.  */
/* 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:14445: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  ac_cv_func_catgets=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_func_catgets=no
fi
rm -f conftest*

fi
echo "$ac_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 $ac_n "checking for $ac_word... $ac_c" 1>&6
echo "configure:14467: checking for $ac_word" 1>&5
if test "${ac_cv_path_GENCAT+set}" = set; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$GENCAT" in
  /* | ?:/*)
  ac_cv_path_GENCAT="$GENCAT" # Let the user override the test with a path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f "$ac_dir/$ac_word"; then
      ac_cv_path_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 "$ac_t""$GENCAT" 1>&6
else
  echo "$ac_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 $ac_n "checking for $ac_word... $ac_c" 1>&6
echo "configure:14500: checking for $ac_word" 1>&5
if test "${ac_cv_path_GMSGFMT+set}" = set; then
  echo $ac_n "(cached) $ac_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=":"
  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 "$ac_t""$GMSGFMT" 1>&6
else
  echo "$ac_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 $ac_n "checking for $ac_word... $ac_c" 1>&6
echo "configure:14534: checking for $ac_word" 1>&5
if test "${ac_cv_path_GMSGFMT+set}" = set; then
  echo $ac_n "(cached) $ac_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 "$ac_t""$GMSGFMT" 1>&6
else
  echo "$ac_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 $ac_n "checking for $ac_word... $ac_c" 1>&6
echo "configure:14569: checking for $ac_word" 1>&5
if test "${ac_cv_path_XGETTEXT+set}" = set; then
  echo $ac_n "(cached) $ac_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 "$ac_t""$XGETTEXT" 1>&6
else
  echo "$ac_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 $ac_n "checking for $ac_word... $ac_c" 1>&6
echo "configure:14625: checking for $ac_word" 1>&5
if test "${ac_cv_path_MSGFMT+set}" = set; then
  echo $ac_n "(cached) $ac_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 "$ac_t""$MSGFMT" 1>&6
else
  echo "$ac_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 $ac_n "checking for $ac_word... $ac_c" 1>&6
echo "configure:14659: checking for $ac_word" 1>&5
if test "${ac_cv_path_GMSGFMT+set}" = set; then
  echo $ac_n "(cached) $ac_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=":"
  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 "$ac_t""$GMSGFMT" 1>&6
else
  echo "$ac_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 $ac_n "checking for $ac_word... $ac_c" 1>&6
echo "configure:14692: checking for $ac_word" 1>&5
if test "${ac_cv_path_XGETTEXT+set}" = set; then
  echo $ac_n "(cached) $ac_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 "$ac_t""$XGETTEXT" 1>&6
else
  echo "$ac_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 "$ac_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 $ac_n "checking for catalogs to be installed... $ac_c" 1>&6
echo "configure:14788: 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 "$ac_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 $ac_n "checking for linux/version.h... $ac_c" 1>&6
echo "configure:14815: checking for linux/version.h" 1>&5
if test "${ac_cv_header_linux_version_h+set}" = set; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.$ac_ext <<EOF
#line 14820 "configure"
#include "confdefs.h"
#include <linux/version.h>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:14826: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  ac_cv_header_linux_version_h=yes
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_header_linux_version_h=no
fi
rm -f conftest*
fi
echo "$ac_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 djgpp/Makefile tests/Makefile tests/cut/Makefile
  tests/head/Makefile tests/join/Makefile tests/md5sum/Makefile
  tests/pr/Makefile tests/sort/Makefile tests/tac/Makefile tests/tail/Makefile
  tests/tail-2/Makefile tests/tr/Makefile tests/tsort/Makefile
  tests/unexpand/Makefile tests/uniq/Makefile tests/wc/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" ;;
  'djgpp/Makefile' ) CONFIG_FILES="\$CONFIG_FILES djgpp/Makefile" ;;
  'tests/Makefile' ) CONFIG_FILES="\$CONFIG_FILES tests/Makefile" ;;
  'tests/cut/Makefile' ) CONFIG_FILES="\$CONFIG_FILES tests/cut/Makefile" ;;
  'tests/head/Makefile' ) CONFIG_FILES="\$CONFIG_FILES tests/head/Makefile" ;;
  'tests/join/Makefile' ) CONFIG_FILES="\$CONFIG_FILES tests/join/Makefile" ;;
  'tests/md5sum/Makefile' ) CONFIG_FILES="\$CONFIG_FILES tests/md5sum/Makefile" ;;
  'tests/pr/Makefile' ) CONFIG_FILES="\$CONFIG_FILES tests/pr/Makefile" ;;
  'tests/sort/Makefile' ) CONFIG_FILES="\$CONFIG_FILES tests/sort/Makefile" ;;
  'tests/tac/Makefile' ) CONFIG_FILES="\$CONFIG_FILES tests/tac/Makefile" ;;
  'tests/tail/Makefile' ) CONFIG_FILES="\$CONFIG_FILES tests/tail/Makefile" ;;
  'tests/tail-2/Makefile' ) CONFIG_FILES="\$CONFIG_FILES tests/tail-2/Makefile" ;;
  'tests/tr/Makefile' ) CONFIG_FILES="\$CONFIG_FILES tests/tr/Makefile" ;;
  'tests/tsort/Makefile' ) CONFIG_FILES="\$CONFIG_FILES tests/tsort/Makefile" ;;
  'tests/unexpand/Makefile' ) CONFIG_FILES="\$CONFIG_FILES tests/unexpand/Makefile" ;;
  'tests/uniq/Makefile' ) CONFIG_FILES="\$CONFIG_FILES tests/uniq/Makefile" ;;
  'tests/wc/Makefile' ) CONFIG_FILES="\$CONFIG_FILES tests/wc/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

# Remove all the CONFIG_FILES, and trap to remove the temp files.
rm -fr \`echo "\$CONFIG_FILES" | sed "s/:[^ ]*//g"\`
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%@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%@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%@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%@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 if test "x$ac_file" != x..; then
  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
  case "$ac_file" in
  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  *) ac_file_in="${ac_file}.in" ;;
  esac

  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.

  # Remove last slash and all that follows it.  Not all systems have dirname.
  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
    # The file is in a subdirectory.
    test ! -d "$ac_dir" && mkdir "$ac_dir"
    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
    # A "../" for each directory in $ac_dir_suffix.
    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
  else
    ac_dir_suffix= ac_dots=
  fi

  case "$ac_given_srcdir" in
  .)  srcdir=.
      if test -z "$ac_dots"; then top_srcdir=.
      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
  *) # Relative path.
    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
    top_srcdir="$ac_dots$ac_given_srcdir" ;;
  esac

  case "$ac_given_INSTALL" in
  [/$]*) INSTALL="$ac_given_INSTALL" ;;
  *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
  esac

  echo creating "$ac_file"
  rm -f "$ac_file"
  configure_input="Generated automatically from `echo $ac_file_in |
                                                 sed 's%.*/%%'` by configure."
  case "$ac_file" in
  *[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

fi; 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='\3'
ac_dD='%;t 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 t'

for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
  case "$ac_file" in
  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  *) ac_file_in="${ac_file}.in" ;;
  esac

  echo creating $ac_file

  rm -f $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 ': t' >>$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 ': t' >>$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
fi; done
EOF
cat >>$CONFIG_STATUS <<\EOF

#
# CONFIG_LINKS section.
#
srcdir=$ac_given_srcdir

for ac_file in : $CONFIG_LINKS; do if test "x$ac_file" != x:; then
  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

  # Try to make a relative symlink, i.e., relatively to the directory of the destination,
  # not relatively to cwd.  Otherwise, hard link.
  test -f $srcdir/$ac_source ||
    { echo "configure: error: cannot link to nonexistent file \`$ac_rel_source'" 1>&2; exit 1; }
  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
fi; done
EOF
cat >>$CONFIG_STATUS <<\EOF

#
# CONFIG_COMMANDS section.
#
for ac_file in .. $CONFIG_COMMANDS; do if test "x$ac_file" != x..; then
  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
fi;done
EOF

cat >>$CONFIG_STATUS <<\EOF

#
# CONFIG_COMMANDS section.
#

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

