#! /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

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

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

  case "$ac_option" in

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

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

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

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

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

  -enable-* | --enable-*)
    ac_feature=`echo "$ac_option"|sed -e 's/-*enable-//' -e 's/=.*//'`
    # Reject names that are not valid shell variable names.
    if echo "$ac_feature" | grep '[^-a-zA-Z0-9_]' >/dev/null 2>&1; then
      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
    fi
    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
    case "$ac_option" in
      *=*) ac_optarg=`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)
    # 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:
  --cache-file=FILE   cache test results in FILE
  --help              print this message
  --no-create         do not create output files
  --quiet, --silent   do not print \`checking...' messages
  --version           print the version of autoconf that created configure

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: $ac_package: invalid package name" 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: $ac_package: invalid package name" 1>&2; exit 1; }
    fi
    ac_package=`echo $ac_package| sed 's/-/_/g'`
    eval "with_${ac_package}=no" ;;

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

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

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

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

  *=*)
    ac_envvar=`echo $ac_option|sed -e 's/=.*//'`
    # Reject names that are not valid shell variable names.
    if test -n "`echo $ac_envvar| sed 's/[_a-zA-Z0-9]//g'`"; then
      { echo "configure: error: $ac_envvar: invalid variable name" 1>&2; exit 1; }
    fi
    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: $ac_option: invalid host type" 1>&2
    fi
    if test "x$nonopt" != xNONE; then
      { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
    fi
    nonopt="$ac_option"
    ;;

  esac
done

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

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

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

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

# Strip out --no-create and --no-recursion so they do not pile up.
# Also quote any args containing shell 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:623: 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:670: 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:727: 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:797: 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:827: 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.0b

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 ru sk sv zh"

      echo $ac_n "checking for perl5.003 or newer... $ac_c" 1>&6
echo "configure:931: 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: 
*** 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:969: 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:999: 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:1050: 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:1085: 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 1096 "configure"
#include "confdefs.h"

int main(){return(0);}
EOF
if { (eval echo configure:1101: \"$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:1127: 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:1132: 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:1141: \"$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:1159: 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:1190: 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 1205 "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:1211: \"$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 1222 "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:1228: \"$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 1239 "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:1245: \"$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:1272: 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:1316: 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 1331 "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:1337: \"$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 1348 "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:1354: \"$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 1365 "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:1371: \"$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:1397: 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 1403 "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 1420 "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:1443: 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:1471: checking for AIX" 1>&5
cat >conftest.$ac_ext <<EOF
#line 1473 "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:1495: 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 1500 "configure"
#include "confdefs.h"
#include <minix/config.h>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1506: \"$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:1543: 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:1593: 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:1621: 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 1647 "configure"
#include "confdefs.h"

int
main()
{

  ;
  return 0;
}
EOF
if { (eval echo configure:1658: \"$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:1675: 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:1690: 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:1748: 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:1776: 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:1804: 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:1835: 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 1852 "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:1893: \"$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:1917: 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:1930: 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 1935 "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:1944: \"$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 1961 "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 1980 "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 2002 "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:2027: \"$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:2054: 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 2059 "configure"
#include "confdefs.h"
#include <$ac_header>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2065: \"$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

for ac_header in fcntl.h float.h limits.h memory.h stdlib.h string.h \
                 unistd.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:2095: 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 2100 "configure"
#include "confdefs.h"
#include <$ac_header>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2106: \"$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 inttypes.h... $ac_c" 1>&6
echo "configure:2130: 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 2135 "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:2147: \"$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:2167: 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 2172 "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:2184: \"$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 ${CC-cc} option to accept ANSI C... $ac_c" 1>&6
echo "configure:2205: 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 2222 "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:2260: \"$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 struct timespec... $ac_c" 1>&6
echo "configure:2282: 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 2287 "configure"
#include "confdefs.h"

#include <time.h>
      
int
main ()
{
static struct timespec x; x.tv_sec = x.tv_nsec;
  ;
  return 0;
}
EOF
if { (eval echo configure:2300: \"$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:2322: 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 2327 "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 byte ordering is bigendian... $ac_c" 1>&6
echo "configure:2368: 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 2375 "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:2391: \"$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 2395 "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:2411: \"$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 2431 "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:2446: \"$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 an ANSI C conforming const... $ac_c" 1>&6
echo "configure:2470: 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 2475 "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:2532: \"$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:2552: 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 2559 "configure"
#include "confdefs.h"

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

  ;
  return 0;
}
EOF
if { (eval echo configure:2573: \"$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:2598: 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 2609 "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:2621: \"$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:2649: 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 2654 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <$ac_hdr>

int
main ()
{
DIR *dirp = 0;
  ;
  return 0;
}
EOF
if { (eval echo configure:2667: \"$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:2692: 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 2699 "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:2714: \"$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:2734: 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 2741 "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:2756: \"$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:2777: 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 2782 "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:2791: \"$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 2808 "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 2827 "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 2849 "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:2874: \"$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:2899: 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 2904 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
struct stat foo;
foo.st_blksize;
  ;
  return 0;
}
EOF
if { (eval echo configure:2916: \"$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:2937: 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 2942 "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:2956: \"$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:2983: 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 2988 "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:3001: \"$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:3021: 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 3026 "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:3040: \"$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:3061: 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 3066 "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:3080: \"$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:3106: 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 3111 "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:3125: \"$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:3147: 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 3152 "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:3202: 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 3216 "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:3228: \"$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:3250: 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 3255 "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:3267: \"$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:3291: 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 3299 "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:3324: \"$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 3339 "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:3362: 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 3367 "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:3381: \"$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:3403: 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 3408 "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:3422: \"$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:3444: 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 3449 "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:3463: \"$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:3485: 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 3490 "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:3511: \"$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:3528: 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 3533 "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:3547: \"$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:3569: 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 3574 "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:3603: 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 3608 "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:3622: \"$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:3644: 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 3649 "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:3663: \"$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

  
  

echo $ac_n "checking for strerror in -lcposix... $ac_c" 1>&6
echo "configure:3688: 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 3695 "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:3710: \"$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

for ac_func in fseeko isascii mempcpy strchr strerror strrchr
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:3732: 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 3737 "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:3765: \"$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

# 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:3789: 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 3794 "configure"
#include "confdefs.h"
#include <alloca.h>
int
main()
{
char *p = alloca(2 * sizeof(int));
  ;
  return 0;
}
EOF
if { (eval echo configure:3805: \"$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:3826: 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 3831 "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:3862: \"$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:3893: 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 3898 "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:3923: 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 3928 "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:3956: \"$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:3981: 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 3989 "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:4009: \"$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_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:4034: 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 4039 "configure"
#include "confdefs.h"
#include <$ac_header>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:4045: \"$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:4072: 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 4077 "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:4105: \"$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:4127: 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 4135 "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:4284: \"$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:4304: 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 4312 "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:4343: \"$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:4362: 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 4367 "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:4391: 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 4396 "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 for strerror in -lcposix... $ac_c" 1>&6
echo "configure:4422: 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 4429 "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:4444: \"$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:4469: 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:4487: 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 4492 "configure"
#include "confdefs.h"
#include <$ac_header>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:4498: \"$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:4523: 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 4528 "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:4553: \"$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:4575: 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 4580 "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:4607: \"$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:4631: 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 4636 "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:4663: \"$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>
#ifdef HAVE_STRING_H
# if !STDC_HEADERS && HAVE_MEMORY_H
#  include <memory.h>
# endif
# include <string.h>
#else
# ifdef HAVE_STRINGS_H
#  include <strings.h>
# endif
#endif
#ifdef HAVE_STDLIB_H
# include <stdlib.h>
#endif
#ifdef 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

  fi

  
  for jm_func in free lseek malloc \
                        memchr realloc stpcpy strstr
  do
    
    test -z "$ac_cv_header_memory_h" && for ac_header in memory.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:4746: 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 4751 "configure"
#include "confdefs.h"
#include <$ac_header>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:4757: \"$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

  test -z "$ac_cv_header_string_h" && 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:4784: 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 4789 "configure"
#include "confdefs.h"
#include <$ac_header>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:4795: \"$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

  test -z "$ac_cv_header_strings_h" && for ac_header in strings.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:4822: 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 4827 "configure"
#include "confdefs.h"
#include <$ac_header>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:4833: \"$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

  test -z "$ac_cv_header_stdlib_h" && 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:4860: 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 4865 "configure"
#include "confdefs.h"
#include <$ac_header>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:4871: \"$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

  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:4898: 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 4903 "configure"
#include "confdefs.h"
#include <$ac_header>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:4909: \"$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 $jm_func is declared... $ac_c" 1>&6
echo "configure:4933: 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 4938 "configure"
#include "confdefs.h"
$headers
int
main ()
{

#ifndef $jm_func
char *(*pfn) = (char *(*)) $jm_func
#endif
      
  ;
  return 0;
}
EOF
if { (eval echo configure:4953: \"$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

  
  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:4983: 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 4988 "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:5016: \"$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:5038: 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 5043 "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:5052: \"$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 5069 "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 5088 "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 5110 "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:5135: \"$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 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:5163: 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 5168 "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:5196: \"$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:5221: 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 5226 "configure"
#include "confdefs.h"
#include <$ac_header>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:5232: \"$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:5256: 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 5261 "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:5270: \"$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 5287 "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 5306 "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 5328 "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:5353: \"$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:5379: 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 5384 "configure"
#include "confdefs.h"
#include <alloca.h>
int
main()
{
char *p = alloca(2 * sizeof(int));
  ;
  return 0;
}
EOF
if { (eval echo configure:5395: \"$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:5416: 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 5421 "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:5452: \"$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:5483: 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 5488 "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:5513: 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 5518 "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:5546: \"$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:5571: 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 5579 "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:5599: \"$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:5625: 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 5630 "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:5658: \"$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:5686: 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 5691 "configure"
#include "confdefs.h"
#include <$ac_header>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:5697: \"$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:5721: 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 5729 "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:5758: \"$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:5787: 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 5792 "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:5820: \"$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:5849: 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 5857 "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:5871: \"$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:5897: 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 5910 "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:5927: \"$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:5966: 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 5974 "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:5988: \"$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:6018: 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 6026 "configure"
#include "confdefs.h"

    char *realloc ();
    int
    main ()
    {
      exit (realloc (0, 0) ? 0 : 1);
    }
	  
EOF
if { (eval echo configure:6037: \"$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:6067: 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 6075 "configure"
#include "confdefs.h"

    char *malloc ();
    int
    main ()
    {
      exit (malloc (0) ? 0 : 1);
    }
	  
EOF
if { (eval echo configure:6086: \"$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:6116: 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 6121 "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:6149: \"$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:6175: 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 6180 "configure"
#include "confdefs.h"
#include <$ac_header>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:6186: \"$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:6210: 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 6216 "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:6235: \"$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:6262: 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 6270 "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:6285: \"$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 6298 "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:6313: \"$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:6342: 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=yes
else
  cat >conftest.$ac_ext <<EOF
#line 6350 "configure"
#include "confdefs.h"

#   include <time.h>

    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:6365: \"$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:6394: 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 6399 "configure"
#include "confdefs.h"
#include <$ac_header>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:6405: \"$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:6429: 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 6441 "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:6541: \"$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
    
    test -z "$ac_cv_header_memory_h" && for ac_header in memory.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:6587: 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 6592 "configure"
#include "confdefs.h"
#include <$ac_header>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:6598: \"$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

  test -z "$ac_cv_header_string_h" && 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:6625: 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 6630 "configure"
#include "confdefs.h"
#include <$ac_header>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:6636: \"$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

  test -z "$ac_cv_header_strings_h" && for ac_header in strings.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:6663: 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 6668 "configure"
#include "confdefs.h"
#include <$ac_header>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:6674: \"$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

  test -z "$ac_cv_header_stdlib_h" && 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:6701: 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 6706 "configure"
#include "confdefs.h"
#include <$ac_header>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:6712: \"$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

  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:6739: 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 6744 "configure"
#include "confdefs.h"
#include <$ac_header>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:6750: \"$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 $jm_func is declared... $ac_c" 1>&6
echo "configure:6774: 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 6779 "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:6795: \"$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:6826: 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 6831 "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:6859: \"$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:6889: 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 6894 "configure"
#include "confdefs.h"
#include <$ac_header>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:6900: \"$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:6924: 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 6935 "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:6947: \"$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 "checking for AFS" 1>&6
echo "configure:6980: 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:6992: 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 6997 "configure"
#include "confdefs.h"
#include <$ac_header>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:7003: \"$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:7027: 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 7032 "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:7057: 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 7062 "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:7090: \"$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:7121: 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 7126 "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:7154: \"$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:7181: 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:7191: 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 7196 "configure"
#include "confdefs.h"
#include <$ac_header>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:7202: \"$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 7231 "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:7271: \"$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

  

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

  

    
  
        
    # 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:7315: 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 7323 "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:7342: \"$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
      
  

  
  
  
  
  
  
  

  

  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  

  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:7413: 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 7418 "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:7446: \"$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:7473: 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 7478 "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:7506: \"$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:7533: 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 7538 "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:7566: \"$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
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:7593: 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 7598 "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:7626: \"$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 memmove
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
 
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:7713: 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 7718 "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:7746: \"$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:7777: 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 7785 "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:7801: \"$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:7830: 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 7838 "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:7853: \"$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 7866 "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:7881: \"$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:7913: 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 7918 "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:7946: \"$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:7971: 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 7976 "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:8004: \"$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:8027: 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 8032 "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:8060: \"$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:8084: 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 8089 "configure"
#include "confdefs.h"
#include <$ac_header>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:8095: \"$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:8119: 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 8128 "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:8149: \"$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:8175: 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 8180 "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:8208: \"$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

  
  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:8236: 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 8241 "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:8269: \"$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:8294: 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 8299 "configure"
#include "confdefs.h"
#include <$ac_header>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:8305: \"$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:8332: 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 8337 "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:8365: \"$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:8389: 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 8394 "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:8408: \"$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:8434: 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 8439 "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:8453: \"$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:8478: 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 8483 "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:8511: \"$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:8534: 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 8539 "configure"
#include "confdefs.h"
#include <time.h>

int
main ()
{
struct tm foo;
foo.tm_gmtoff;
  ;
  return 0;
}
EOF
if { (eval echo configure:8552: \"$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_func in strftime
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:8575: 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 8580 "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:8608: \"$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

echo $ac_n "checking for vprintf... $ac_c" 1>&6
echo "configure:8632: 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 8637 "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:8665: \"$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:8687: 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 8692 "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:8720: \"$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

for ac_func in memcpy memset stpcpy strpbrk 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:8746: 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 8751 "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:8779: \"$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

echo $ac_n "checking for working strtod... $ac_c" 1>&6
echo "configure:8803: 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 8811 "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:8841: \"$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:8863: 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 8868 "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:8896: \"$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:8919: 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 8926 "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:8941: \"$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

echo $ac_n "checking for error_at_line... $ac_c" 1>&6
echo "configure:8967: 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 8972 "configure"
#include "confdefs.h"

int
main()
{
error_at_line(0, 0, "", 0, "");
  ;
  return 0;
}
EOF
if { (eval echo configure:8983: \"$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 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:9005: 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 9010 "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:9038: \"$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:9063: 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 9068 "configure"
#include "confdefs.h"
#include <$ac_header>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:9074: \"$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 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:9101: 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 9106 "configure"
#include "confdefs.h"
#include <$ac_header>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:9112: \"$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:9139: 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 9144 "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:9172: \"$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:9194: 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 9202 "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:9334: \"$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:9362: 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 9367 "configure"
#include "confdefs.h"
#include <$ac_header>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:9373: \"$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:9401: 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 9406 "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:9434: \"$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:9460: 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 9465 "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:9493: \"$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:9524: 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 9529 "configure"
#include "confdefs.h"
#include <locale.h>
int
main()
{
return LC_MESSAGES
  ;
  return 0;
}
EOF
if { (eval echo configure:9540: \"$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:9561: 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:9581: 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:9599: 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 9604 "configure"
#include "confdefs.h"
#include <libintl.h>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:9610: \"$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:9627: 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 9632 "configure"
#include "confdefs.h"
#include <libintl.h>
int
main()
{
return (int) gettext ("")
  ;
  return 0;
}
EOF
if { (eval echo configure:9643: \"$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:9659: 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 9666 "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:9681: \"$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:9697: 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 9704 "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:9719: \"$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:9755: 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:9790: 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 9795 "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:9823: \"$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:9847: 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:9880: 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 9912 "configure"
#include "confdefs.h"

int
main()
{
extern int _nl_msg_cat_cntr;
			       return _nl_msg_cat_cntr
  ;
  return 0;
}
EOF
if { (eval echo configure:9924: \"$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:9945: 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:9958: 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 9965 "configure"
#include "confdefs.h"

int
main()
{
main()
  ;
  return 0;
}
EOF
if { (eval echo configure:9976: \"$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:10000: 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 10005 "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:10033: \"$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:10055: 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:10088: 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:10122: 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:10157: 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:10213: 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:10247: 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:10280: 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:10376: 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:10403: 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 10408 "configure"
#include "confdefs.h"
#include <linux/version.h>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:10414: \"$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/uniq/Makefile tests/wc/Makefile"
config_headers="\\
  config.h"
config_links="\\
  $nls_cv_header_intl:$nls_cv_header_libgt"

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

Links to install:
\$config_links

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 running
  $0 $ac_configure_args"

# 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"; 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/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" ;;
  'config.h' ) CONFIG_HEADERS="\$CONFIG_HEADERS config.h" ;;

  # This is an error.
  -*) echo "$CONFIG_STATUS: invalid option: \$1"; 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"}
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

#
# 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%@ALLOCA@%$ALLOCA%;t t
s%@GNU_PACKAGE@%$GNU_PACKAGE%;t t
s%@YACC@%$YACC%;t t
s%@POW_LIBM@%$POW_LIBM%;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.
#

AMDEP="$AMDEP"
ac_aux_dir="$ac_aux_dir"

EOF
cat >>$CONFIG_STATUS <<\EOF
test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h

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

case "$CONFIG_FILES" in *po/Makefile.in*)
        sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
      esac

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

