#!/bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated automatically using autoconf version 1.7.3 
# Copyright (C) 1991, 1992, 1993, 1994 Free Software Foundation, Inc.

# This configure script is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as published
# by the Free Software Foundation; either version 2, or (at your option)
# any later version.

# This script is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General
# Public License for more details.

# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

# Usage: configure [--srcdir=DIR] [--host=HOST] [--gas] [--nfp]
#        [--prefix=PREFIX] [--exec-prefix=PREFIX] [--with-PACKAGE[=VALUE]]
# Ignores all args except --srcdir, --prefix, --exec-prefix, and
# --with-PACKAGE[=VALUE] unless this script has special code to handle it.

for ac_arg
do
  # Handle --exec-prefix with a space before the argument.
  if test x$ac_next_exec_prefix = xyes; then exec_prefix=$ac_arg; ac_next_exec_prefix=
  # Handle --host with a space before the argument.
  elif test x$ac_next_host = xyes; then ac_next_host=
  # Handle --prefix with a space before the argument.
  elif test x$ac_next_prefix = xyes; then prefix=$ac_arg; ac_next_prefix=
  # Handle --srcdir with a space before the argument.
  elif test x$ac_next_srcdir = xyes; then srcdir=$ac_arg; ac_next_srcdir=
  else
    case $ac_arg in
     # For backward compatibility, recognize -exec-prefix and --exec_prefix.
     -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* | --exec=* | --exe=* | --ex=* | --e=*)
	exec_prefix=`echo $ac_arg | sed 's/[-a-z_]*=//'` ;;
     -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- | --exec | --exe | --ex | --e)
	ac_next_exec_prefix=yes ;;

     -gas | --gas | --ga | --g) ;;

     -host=* | --host=* | --hos=* | --ho=* | --h=*) ;;
     -host | --host | --hos | --ho | --h)
	ac_next_host=yes ;;

     -nfp | --nfp | --nf) ;;

     -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
	prefix=`echo $ac_arg | sed 's/[-a-z_]*=//'` ;;
     -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
	ac_next_prefix=yes ;;

     -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=* | --s=*)
	srcdir=`echo $ac_arg | sed 's/[-a-z_]*=//'` ;;
     -srcdir | --srcdir | --srcdi | --srcd | --src | --sr | --s)
	ac_next_srcdir=yes ;;

     -with-* | --with-*)
       ac_package=`echo $ac_arg|sed -e 's/-*with-//' -e 's/=.*//'`
       # Reject names that aren't valid shell variable names.
       if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
         echo "configure: $ac_package: invalid package name" >&2; exit 1
       fi
       ac_package=`echo $ac_package| sed 's/-/_/g'`
       case "$ac_arg" in
         *=*) ac_val="`echo $ac_arg|sed 's/[^=]*=//'`" ;;
         *) ac_val=1 ;;
       esac
       eval "with_$ac_package='$ac_val'" ;;

     -v | -verbose | --verbose | --verbos | --verbo | --verb | --ver | --ve | --v)
       ac_verbose=yes ;;

     *) ;;
    esac
  fi
done

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

# NLS nuisances.
# These must not be set unconditionally because not all systems understand
# e.g. LANG=C (notably SCO).
if test "${LC_ALL+set}" = 'set' ; then LC_ALL=C; export LC_ALL; fi
if test "${LANG+set}"   = 'set' ; then LANG=C;   export LANG;   fi

rm -rf conftest* confdefs.h
# AIX cpp loses on an empty file, so make sure it contains at least a newline.
echo > confdefs.h
compile='${CC-cc} $CFLAGS $LDFLAGS conftest.c -o conftest $LIBS >/dev/null 2>&1'

# 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=policy.h

# 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 `..'.
  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
fi
if test ! -r $srcdir/$ac_unique_file; then
  if test x$ac_srcdir_defaulted = xyes; then
    echo "configure: Can not find sources in \`${ac_confdir}' or \`..'." 1>&2
  else
    echo "configure: Can not find sources in \`${srcdir}'." 1>&2
  fi
  exit 1
fi

# Save the original args to write them into config.status later.
ac_configure_args="$*"


if test -z "$CC"; then
  # Extract the first word of `gcc', so it can be a program name with args.
  set ac_dummy gcc; ac_word=$2
  echo checking for $ac_word
  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
      CC="gcc"
      break
    fi
  done
  IFS="$ac_save_ifs"
fi
test -z "$CC" && CC="cc"
test -n "$CC" && test -n "$ac_verbose" && echo "	setting CC to $CC"

# Find out if we are using GNU C, under whatever name.
cat > conftest.c <<EOF
#ifdef __GNUC__
  yes
#endif
EOF
${CC-cc} -E conftest.c > conftest.out 2>&1
if egrep yes conftest.out >/dev/null 2>&1; then
  GCC=1 # For later tests.
fi
rm -f conftest*

echo checking how to run the C preprocessor
if test -z "$CPP"; then
  # This must be in double quotes, not single quotes, because CPP may get
  # substituted into the Makefile and ``${CC-cc}'' will simply confuse
  # make.  It must be expanded now.
  CPP="${CC-cc} -E"
  cat > conftest.c <<EOF
#include "confdefs.h"
#include <stdio.h>
Syntax Error
EOF
ac_err=`eval "($CPP conftest.c >/dev/null) 2>&1"`
if test -z "$ac_err"; then
  :
else
  rm -rf conftest*
  CPP="${CC-cc} -E -traditional-cpp"
  cat > conftest.c <<EOF
#include "confdefs.h"
#include <stdio.h>
Syntax Error
EOF
ac_err=`eval "($CPP conftest.c >/dev/null) 2>&1"`
if test -z "$ac_err"; then
  :
else
  rm -rf conftest*
  CPP=/lib/cpp
fi
rm -f conftest*
fi
rm -f conftest*
fi
CPP="$CPP \$CFLAGS"
test ".${ac_verbose}" != "." && echo "	setting CPP to $CPP"

if test -n "$GCC"; then
  echo checking whether -traditional is needed
  ac_pattern="Autoconf.*'x'"
  ac_prog='#include <sgtty.h>
Autoconf TIOCGETP'
  cat > conftest.c <<EOF
#include "confdefs.h"
$ac_prog
EOF
eval "$CPP conftest.c > conftest.out 2>&1"
if egrep "$ac_pattern" conftest.out >/dev/null 2>&1; then
  rm -rf conftest*
  ac_need_trad=1

fi
rm -f conftest*


  if test -z "$ac_need_trad"; then
    ac_prog='#include <termio.h>
Autoconf TCGETA'
    cat > conftest.c <<EOF
#include "confdefs.h"
$ac_prog
EOF
eval "$CPP conftest.c > conftest.out 2>&1"
if egrep "$ac_pattern" conftest.out >/dev/null 2>&1; then
  rm -rf conftest*
  ac_need_trad=1

fi
rm -f conftest*

  fi
  test -n "$ac_need_trad" && CC="$CC -traditional"
fi

# Make sure to not get the incompatible SysV /etc/install and
# /usr/sbin/install, which might be in PATH before a BSD-like install,
# or the SunOS /usr/etc/install directory, or the AIX /bin/install,
# or the AFS install, which mishandles nonexistent args, or
# /usr/ucb/install on SVR4, which tries to use the nonexistent group
# `staff', or /sbin/install on IRIX which has incompatible command-line
# syntax.  Sigh.
#
#     On most BSDish systems install is in /usr/bin, not /usr/ucb
#     anyway.
# This turns out not to be true, so the mere pathname isn't an indication
# of whether the program works.  What we really need is a set of tests for
# the install program to see if it actually works in all the required ways.
#
# Avoid using ./install, which might have been erroneously created
# by make from ./install.sh.
if test "z${INSTALL}" = "z" ; then
  echo checking for install
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  for ac_dir in $PATH; do
    case "$ac_dir" in
    ''|.|/etc|/sbin|/usr/sbin|/usr/etc|/usr/afsws/bin|/usr/ucb) ;;
    *)
      if test -f $ac_dir/installbsd; then
	INSTALL="$ac_dir/installbsd -c" # OSF1
	INSTALL_PROGRAM='$(INSTALL)'
	INSTALL_DATA='$(INSTALL) -m 644'
	break
      fi
      if test -f $ac_dir/install; then
	if grep dspmsg $ac_dir/install >/dev/null 2>&1; then
	  : # AIX
	else
	  INSTALL="$ac_dir/install -c"
	  INSTALL_PROGRAM='$(INSTALL)'
	  INSTALL_DATA='$(INSTALL) -m 644'
	  break
	fi
      fi
      ;;
    esac
  done
  IFS="$ac_save_ifs"
fi
if test -z "$INSTALL"; then
  if test -f ${srcdir}/install.sh; then
    # As a last resort, use the slow shell script.
    # We want the top-level source directory, not the subdir's srcdir,
    # so expand srcdir now rather than in the Makefile.
    INSTALL="${srcdir}/install.sh -c"
  else
    # echo "warning: ${srcdir}/install.sh not found; using cp"
    INSTALL=cp
  fi
fi
test -n "$ac_verbose" && echo "	setting INSTALL to $INSTALL"
INSTALL_PROGRAM=${INSTALL_PROGRAM-'$(INSTALL)'}
test -n "$ac_verbose" && echo "	setting INSTALL_PROGRAM to $INSTALL_PROGRAM"
INSTALL_DATA=${INSTALL_DATA-'$(INSTALL)'}
test -n "$ac_verbose" && echo "	setting INSTALL_DATA to $INSTALL_DATA"

AR=${AR-ar}

if test -z "$RANLIB"; then
  # Extract the first word of `ranlib', so it can be a program name with args.
  set ac_dummy ranlib; ac_word=$2
  echo checking for $ac_word
  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
      RANLIB="ranlib"
      break
    fi
  done
  IFS="$ac_save_ifs"
fi
test -z "$RANLIB" && RANLIB=":"
test -n "$RANLIB" && test -n "$ac_verbose" && echo "	setting RANLIB to $RANLIB"

echo checking for POSIXized ISC
if test -d /etc/conf/kconfig.d &&
  grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
then
  ISC=1 # If later tests want to check for ISC.
  
{
test -n "$ac_verbose" && \
echo "	defining _POSIX_SOURCE"
echo "#define" _POSIX_SOURCE "1" >> confdefs.h
DEFS="$DEFS -D_POSIX_SOURCE=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}_POSIX_SOURCE\${ac_dB}_POSIX_SOURCE\${ac_dC}1\${ac_dD}
\${ac_uA}_POSIX_SOURCE\${ac_uB}_POSIX_SOURCE\${ac_uC}1\${ac_uD}
\${ac_eA}_POSIX_SOURCE\${ac_eB}_POSIX_SOURCE\${ac_eC}1\${ac_eD}
"
}

  if test -n "$GCC"; then
    CC="$CC -posix"
  else
    CC="$CC -Xp"
  fi
fi

echo checking for minix/config.h
cat > conftest.c <<EOF
#include "confdefs.h"
#include <minix/config.h>
EOF
ac_err=`eval "($CPP conftest.c >/dev/null) 2>&1"`
if test -z "$ac_err"; then
  rm -rf conftest*
  MINIX=1

fi
rm -f conftest*

# The Minix shell can't assign to the same variable on the same line!
if test -n "$MINIX"; then
  
{
test -n "$ac_verbose" && \
echo "	defining _POSIX_SOURCE"
echo "#define" _POSIX_SOURCE "1" >> confdefs.h
DEFS="$DEFS -D_POSIX_SOURCE=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}_POSIX_SOURCE\${ac_dB}_POSIX_SOURCE\${ac_dC}1\${ac_dD}
\${ac_uA}_POSIX_SOURCE\${ac_uB}_POSIX_SOURCE\${ac_uC}1\${ac_uD}
\${ac_eA}_POSIX_SOURCE\${ac_eB}_POSIX_SOURCE\${ac_eC}1\${ac_eD}
"
}

  
{
test -n "$ac_verbose" && \
echo "	defining" _POSIX_1_SOURCE to be "2"
echo "#define" _POSIX_1_SOURCE "2" >> confdefs.h
DEFS="$DEFS -D_POSIX_1_SOURCE=2"
ac_sed_defs="${ac_sed_defs}\${ac_dA}_POSIX_1_SOURCE\${ac_dB}_POSIX_1_SOURCE\${ac_dC}2\${ac_dD}
\${ac_uA}_POSIX_1_SOURCE\${ac_uB}_POSIX_1_SOURCE\${ac_uC}2\${ac_uD}
\${ac_eA}_POSIX_1_SOURCE\${ac_eB}_POSIX_1_SOURCE\${ac_eC}2\${ac_eD}
"
}

  
{
test -n "$ac_verbose" && \
echo "	defining _MINIX"
echo "#define" _MINIX "1" >> confdefs.h
DEFS="$DEFS -D_MINIX=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}_MINIX\${ac_dB}_MINIX\${ac_dC}1\${ac_dD}
\${ac_uA}_MINIX\${ac_uB}_MINIX\${ac_uC}1\${ac_uD}
\${ac_eA}_MINIX\${ac_eB}_MINIX\${ac_eC}1\${ac_eD}
"
}

fi

echo checking for AIX
cat > conftest.c <<EOF
#include "confdefs.h"
#ifdef _AIX
  yes
#endif

EOF
eval "$CPP conftest.c > conftest.out 2>&1"
if egrep "yes" conftest.out >/dev/null 2>&1; then
  rm -rf conftest*
  
{
test -n "$ac_verbose" && \
echo "	defining _ALL_SOURCE"
echo "#define" _ALL_SOURCE "1" >> confdefs.h
DEFS="$DEFS -D_ALL_SOURCE=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}_ALL_SOURCE\${ac_dB}_ALL_SOURCE\${ac_dC}1\${ac_dD}
\${ac_uA}_ALL_SOURCE\${ac_uB}_ALL_SOURCE\${ac_uC}1\${ac_uD}
\${ac_eA}_ALL_SOURCE\${ac_eB}_ALL_SOURCE\${ac_eC}1\${ac_eD}
"
}


fi
rm -f conftest*


ac_save_LIBS="${LIBS}"
LIBS="${LIBS} -lseq"
ac_have_lib=""
echo checking for -lseq
cat > conftest.c <<EOF
#include "confdefs.h"

int main() { exit(0); }
int t() { main(); }
EOF
if eval $compile; then
  rm -rf conftest*
  ac_have_lib="1"

fi
rm -f conftest*
LIBS="${ac_save_LIBS}"
if test -n "${ac_have_lib}"; then
   :; LIBS="$LIBS -lseq"
else
   :; 
fi


ac_save_LIBS="${LIBS}"
LIBS="${LIBS} -lsun"
ac_have_lib=""
echo checking for -lsun
cat > conftest.c <<EOF
#include "confdefs.h"

int main() { exit(0); }
int t() { main(); }
EOF
if eval $compile; then
  rm -rf conftest*
  ac_have_lib="1"

fi
rm -f conftest*
LIBS="${ac_save_LIBS}"
if test -n "${ac_have_lib}"; then
   :; LIBS="$LIBS -lsun"
else
   :; 
fi


echo checking whether cross-compiling
# If we cannot run a trivial program, we must be cross compiling.
cat > conftest.c <<EOF
#include "confdefs.h"
main(){exit(0);}
EOF
eval $compile
if test -s conftest && (./conftest; exit) 2>/dev/null; then
  :
else
  cross_compiling=1
fi
rm -fr conftest*

ac_prog='/* 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;
/* 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;
}'
echo checking for lack of working const
cat > conftest.c <<EOF
#include "confdefs.h"

int main() { exit(0); }
int t() { $ac_prog }
EOF
if eval $compile; then
  :
else
  rm -rf conftest*
  
{
test -n "$ac_verbose" && \
echo "	defining" const to be empty
echo "#define" const "" >> confdefs.h
DEFS="$DEFS -Dconst="
ac_sed_defs="${ac_sed_defs}\${ac_dA}const\${ac_dB}const\${ac_dC}\${ac_dD}
\${ac_uA}const\${ac_uB}const\${ac_uC}\${ac_uD}
\${ac_eA}const\${ac_eB}const\${ac_eC}\${ac_eD}
"
}

fi
rm -f conftest*

echo checking for prototypes
cat > conftest.c <<EOF
#include "confdefs.h"
extern int foo (short);
int foo(short i) { return i; }
int main() { exit(0); }
int t() { int i; }
EOF
if eval $compile; then
  rm -rf conftest*
  
{
test -n "$ac_verbose" && \
echo "	defining HAVE_PROTOTYPES"
echo "#define" HAVE_PROTOTYPES "1" >> confdefs.h
DEFS="$DEFS -DHAVE_PROTOTYPES=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_PROTOTYPES\${ac_dB}HAVE_PROTOTYPES\${ac_dC}1\${ac_dD}
\${ac_uA}HAVE_PROTOTYPES\${ac_uB}HAVE_PROTOTYPES\${ac_uC}1\${ac_uD}
\${ac_eA}HAVE_PROTOTYPES\${ac_eB}HAVE_PROTOTYPES\${ac_eC}1\${ac_eD}
"
}


fi
rm -f conftest*

CFLAGS=${CFLAGS--g}
echo "checking if \`#!' works in shell scripts"
echo '#!/bin/cat
exit 69
' > conftest
chmod u+x conftest
(SHELL=/bin/sh; export SHELL; ./conftest > /dev/null)
if test $? -ne 69; then
   :; POUNDBANG=yes
else
   :; POUNDBANG=no
fi
rm -f conftest


echo checking for echo program
if (PATH= echo test) 2>/dev/null | grep test >/dev/null 2>&1; then
 
{
test -n "$ac_verbose" && \
echo "	defining" ECHO_PROGRAM to be ""echo""
echo "#define" ECHO_PROGRAM ""echo"" >> confdefs.h
DEFS="$DEFS -DECHO_PROGRAM="echo""
ac_sed_defs="${ac_sed_defs}\${ac_dA}ECHO_PROGRAM\${ac_dB}ECHO_PROGRAM\${ac_dC}\"echo\"\${ac_dD}
\${ac_uA}ECHO_PROGRAM\${ac_uB}ECHO_PROGRAM\${ac_uC}\"echo\"\${ac_uD}
\${ac_eA}ECHO_PROGRAM\${ac_eB}ECHO_PROGRAM\${ac_eC}\"echo\"\${ac_eD}
"
}

elif test -s /bin/echo; then
 
{
test -n "$ac_verbose" && \
echo "	defining" ECHO_PROGRAM to be ""/bin/echo""
echo "#define" ECHO_PROGRAM ""/bin/echo"" >> confdefs.h
DEFS="$DEFS -DECHO_PROGRAM="/bin/echo""
ac_sed_defs="${ac_sed_defs}\${ac_dA}ECHO_PROGRAM\${ac_dB}ECHO_PROGRAM\${ac_dC}\"/bin/echo\"\${ac_dD}
\${ac_uA}ECHO_PROGRAM\${ac_uB}ECHO_PROGRAM\${ac_uC}\"/bin/echo\"\${ac_uD}
\${ac_eA}ECHO_PROGRAM\${ac_eB}ECHO_PROGRAM\${ac_eC}\"/bin/echo\"\${ac_eD}
"
}

fi
echo checking for ln -s
rm -f conftestdata
if ln -s X conftestdata 2>/dev/null
then
  rm -f conftestdata
  LN_S="ln -s"
else
  LN_S=ln
fi


for ac_hdr in stddef.h stdarg.h string.h strings.h unistd.h stdlib.h
do
ac_tr_hdr=HAVE_`echo $ac_hdr | tr '[a-z]./' '[A-Z]__'`
echo checking for ${ac_hdr}
cat > conftest.c <<EOF
#include "confdefs.h"
#include <${ac_hdr}>
EOF
ac_err=`eval "($CPP conftest.c >/dev/null) 2>&1"`
if test -z "$ac_err"; then
  rm -rf conftest*
  
{
test -n "$ac_verbose" && \
echo "	defining ${ac_tr_hdr}"
echo "#define" ${ac_tr_hdr} "1" >> confdefs.h
DEFS="$DEFS -D${ac_tr_hdr}=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}${ac_tr_hdr}\${ac_dB}${ac_tr_hdr}\${ac_dC}1\${ac_dD}
\${ac_uA}${ac_tr_hdr}\${ac_uB}${ac_tr_hdr}\${ac_uC}1\${ac_uD}
\${ac_eA}${ac_tr_hdr}\${ac_eB}${ac_tr_hdr}\${ac_eC}1\${ac_eD}
"
}


fi
rm -f conftest*
done

for ac_hdr in limits.h time.h sys/wait.h sys/ioctl.h memory.h
do
ac_tr_hdr=HAVE_`echo $ac_hdr | tr '[a-z]./' '[A-Z]__'`
echo checking for ${ac_hdr}
cat > conftest.c <<EOF
#include "confdefs.h"
#include <${ac_hdr}>
EOF
ac_err=`eval "($CPP conftest.c >/dev/null) 2>&1"`
if test -z "$ac_err"; then
  rm -rf conftest*
  
{
test -n "$ac_verbose" && \
echo "	defining ${ac_tr_hdr}"
echo "#define" ${ac_tr_hdr} "1" >> confdefs.h
DEFS="$DEFS -D${ac_tr_hdr}=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}${ac_tr_hdr}\${ac_dB}${ac_tr_hdr}\${ac_dC}1\${ac_dD}
\${ac_uA}${ac_tr_hdr}\${ac_uB}${ac_tr_hdr}\${ac_uC}1\${ac_uD}
\${ac_eA}${ac_tr_hdr}\${ac_eB}${ac_tr_hdr}\${ac_eC}1\${ac_eD}
"
}


fi
rm -f conftest*
done

for ac_hdr in fcntl.h sys/file.h sys/time.h sys/times.h libc.h
do
ac_tr_hdr=HAVE_`echo $ac_hdr | tr '[a-z]./' '[A-Z]__'`
echo checking for ${ac_hdr}
cat > conftest.c <<EOF
#include "confdefs.h"
#include <${ac_hdr}>
EOF
ac_err=`eval "($CPP conftest.c >/dev/null) 2>&1"`
if test -z "$ac_err"; then
  rm -rf conftest*
  
{
test -n "$ac_verbose" && \
echo "	defining ${ac_tr_hdr}"
echo "#define" ${ac_tr_hdr} "1" >> confdefs.h
DEFS="$DEFS -D${ac_tr_hdr}=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}${ac_tr_hdr}\${ac_dB}${ac_tr_hdr}\${ac_dC}1\${ac_dD}
\${ac_uA}${ac_tr_hdr}\${ac_uB}${ac_tr_hdr}\${ac_uC}1\${ac_uD}
\${ac_eA}${ac_tr_hdr}\${ac_eB}${ac_tr_hdr}\${ac_eC}1\${ac_eD}
"
}


fi
rm -f conftest*
done

for ac_hdr in sysexits.h poll.h tiuser.h xti.h sys/tli.h stropts.h ftw.h
do
ac_tr_hdr=HAVE_`echo $ac_hdr | tr '[a-z]./' '[A-Z]__'`
echo checking for ${ac_hdr}
cat > conftest.c <<EOF
#include "confdefs.h"
#include <${ac_hdr}>
EOF
ac_err=`eval "($CPP conftest.c >/dev/null) 2>&1"`
if test -z "$ac_err"; then
  rm -rf conftest*
  
{
test -n "$ac_verbose" && \
echo "	defining ${ac_tr_hdr}"
echo "#define" ${ac_tr_hdr} "1" >> confdefs.h
DEFS="$DEFS -D${ac_tr_hdr}=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}${ac_tr_hdr}\${ac_dB}${ac_tr_hdr}\${ac_dC}1\${ac_dD}
\${ac_uA}${ac_tr_hdr}\${ac_uB}${ac_tr_hdr}\${ac_uC}1\${ac_uD}
\${ac_eA}${ac_tr_hdr}\${ac_eB}${ac_tr_hdr}\${ac_eC}1\${ac_eD}
"
}


fi
rm -f conftest*
done

for ac_hdr in glob.h sys/param.h sys/types.tcp.h
do
ac_tr_hdr=HAVE_`echo $ac_hdr | tr '[a-z]./' '[A-Z]__'`
echo checking for ${ac_hdr}
cat > conftest.c <<EOF
#include "confdefs.h"
#include <${ac_hdr}>
EOF
ac_err=`eval "($CPP conftest.c >/dev/null) 2>&1"`
if test -z "$ac_err"; then
  rm -rf conftest*
  
{
test -n "$ac_verbose" && \
echo "	defining ${ac_tr_hdr}"
echo "#define" ${ac_tr_hdr} "1" >> confdefs.h
DEFS="$DEFS -D${ac_tr_hdr}=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}${ac_tr_hdr}\${ac_dB}${ac_tr_hdr}\${ac_dC}1\${ac_dD}
\${ac_uA}${ac_tr_hdr}\${ac_uB}${ac_tr_hdr}\${ac_uC}1\${ac_uD}
\${ac_eA}${ac_tr_hdr}\${ac_eB}${ac_tr_hdr}\${ac_eC}1\${ac_eD}
"
}


fi
rm -f conftest*
done

# Under Next 3.2 <dirent.h> apparently does not define struct dirent
# by default.
echo checking for dirent.h
cat > conftest.c <<EOF
#include "confdefs.h"
#include <dirent.h>
int main() { exit(0); }
int t() { struct dirent s; }
EOF
if eval $compile; then
  rm -rf conftest*
  
{
test -n "$ac_verbose" && \
echo "	defining HAVE_DIRENT_H"
echo "#define" HAVE_DIRENT_H "1" >> confdefs.h
DEFS="$DEFS -DHAVE_DIRENT_H=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_DIRENT_H\${ac_dB}HAVE_DIRENT_H\${ac_dC}1\${ac_dD}
\${ac_uA}HAVE_DIRENT_H\${ac_uB}HAVE_DIRENT_H\${ac_uC}1\${ac_uD}
\${ac_eA}HAVE_DIRENT_H\${ac_eB}HAVE_DIRENT_H\${ac_eC}1\${ac_eD}
"
}


fi
rm -f conftest*

# Under Next 3.2 <utime.h> apparently does not define struct utimbuf
# by default.
echo checking for utime.h
cat > conftest.c <<EOF
#include "confdefs.h"
#include <sys/types.h>
#if HAVE_TIME_H
#include <time.h>
#endif
#include <utime.h>
int main() { exit(0); }
int t() { struct utimbuf s; }
EOF
if eval $compile; then
  rm -rf conftest*
  
{
test -n "$ac_verbose" && \
echo "	defining HAVE_UTIME_H"
echo "#define" HAVE_UTIME_H "1" >> confdefs.h
DEFS="$DEFS -DHAVE_UTIME_H=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_UTIME_H\${ac_dB}HAVE_UTIME_H\${ac_dC}1\${ac_dD}
\${ac_uA}HAVE_UTIME_H\${ac_uB}HAVE_UTIME_H\${ac_uC}1\${ac_uD}
\${ac_eA}HAVE_UTIME_H\${ac_eB}HAVE_UTIME_H\${ac_eC}1\${ac_eD}
"
}


fi
rm -f conftest*

echo checking for sys/select.h
cat > conftest.c <<EOF
#include "confdefs.h"
#include <sys/select.h>
#include <sys/time.h>
int main() { exit(0); }
int t() { int i; }
EOF
if eval $compile; then
  rm -rf conftest*
  
{
test -n "$ac_verbose" && \
echo "	defining HAVE_SYS_SELECT_H"
echo "#define" HAVE_SYS_SELECT_H "1" >> confdefs.h
DEFS="$DEFS -DHAVE_SYS_SELECT_H=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_SYS_SELECT_H\${ac_dB}HAVE_SYS_SELECT_H\${ac_dC}1\${ac_dD}
\${ac_uA}HAVE_SYS_SELECT_H\${ac_uB}HAVE_SYS_SELECT_H\${ac_uC}1\${ac_uD}
\${ac_eA}HAVE_SYS_SELECT_H\${ac_eB}HAVE_SYS_SELECT_H\${ac_eC}1\${ac_eD}
"
}


fi
rm -f conftest*

echo checking for major, minor and makedev header
cat > conftest.c <<EOF
#include "confdefs.h"
#include <sys/types.h>
int main() { exit(0); }
int t() { return makedev(0, 0); }
EOF
if eval $compile; then
  rm -rf conftest*
  ac_makedev=1

fi
rm -f conftest*

if test -z "$ac_makedev"; then
echo checking for sys/mkdev.h
cat > conftest.c <<EOF
#include "confdefs.h"
#include <sys/mkdev.h>
EOF
ac_err=`eval "($CPP conftest.c >/dev/null) 2>&1"`
if test -z "$ac_err"; then
  rm -rf conftest*
  
{
test -n "$ac_verbose" && \
echo "	defining MAJOR_IN_MKDEV"
echo "#define" MAJOR_IN_MKDEV "1" >> confdefs.h
DEFS="$DEFS -DMAJOR_IN_MKDEV=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}MAJOR_IN_MKDEV\${ac_dB}MAJOR_IN_MKDEV\${ac_dC}1\${ac_dD}
\${ac_uA}MAJOR_IN_MKDEV\${ac_uB}MAJOR_IN_MKDEV\${ac_uC}1\${ac_uD}
\${ac_eA}MAJOR_IN_MKDEV\${ac_eB}MAJOR_IN_MKDEV\${ac_eC}1\${ac_eD}
"
}
 ac_makedev=1

fi
rm -f conftest*

fi
if test -z "$ac_makedev"; then
echo checking for sys/sysmacros.h
cat > conftest.c <<EOF
#include "confdefs.h"
#include <sys/sysmacros.h>
EOF
ac_err=`eval "($CPP conftest.c >/dev/null) 2>&1"`
if test -z "$ac_err"; then
  rm -rf conftest*
  
{
test -n "$ac_verbose" && \
echo "	defining MAJOR_IN_SYSMACROS"
echo "#define" MAJOR_IN_SYSMACROS "1" >> confdefs.h
DEFS="$DEFS -DMAJOR_IN_SYSMACROS=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}MAJOR_IN_SYSMACROS\${ac_dB}MAJOR_IN_SYSMACROS\${ac_dC}1\${ac_dD}
\${ac_uA}MAJOR_IN_SYSMACROS\${ac_uB}MAJOR_IN_SYSMACROS\${ac_uC}1\${ac_uD}
\${ac_eA}MAJOR_IN_SYSMACROS\${ac_eB}MAJOR_IN_SYSMACROS\${ac_eC}1\${ac_eD}
"
}


fi
rm -f conftest*

fi

echo checking for return type of signal handlers
cat > conftest.c <<EOF
#include "confdefs.h"
#include <sys/types.h>
#include <signal.h>
#ifdef signal
#undef signal
#endif
extern void (*signal ()) ();
int main() { exit(0); }
int t() { int i; }
EOF
if eval $compile; then
  rm -rf conftest*
  
{
test -n "$ac_verbose" && \
echo "	defining" RETSIGTYPE to be "void"
echo "#define" RETSIGTYPE "void" >> confdefs.h
DEFS="$DEFS -DRETSIGTYPE=void"
ac_sed_defs="${ac_sed_defs}\${ac_dA}RETSIGTYPE\${ac_dB}RETSIGTYPE\${ac_dC}void\${ac_dD}
\${ac_uA}RETSIGTYPE\${ac_uB}RETSIGTYPE\${ac_uC}void\${ac_uD}
\${ac_eA}RETSIGTYPE\${ac_eB}RETSIGTYPE\${ac_eC}void\${ac_eD}
"
}


else
  rm -rf conftest*
  
{
test -n "$ac_verbose" && \
echo "	defining" RETSIGTYPE to be "int"
echo "#define" RETSIGTYPE "int" >> confdefs.h
DEFS="$DEFS -DRETSIGTYPE=int"
ac_sed_defs="${ac_sed_defs}\${ac_dA}RETSIGTYPE\${ac_dB}RETSIGTYPE\${ac_dC}int\${ac_dD}
\${ac_uA}RETSIGTYPE\${ac_uB}RETSIGTYPE\${ac_uC}int\${ac_uD}
\${ac_eA}RETSIGTYPE\${ac_eB}RETSIGTYPE\${ac_eC}int\${ac_eD}
"
}

fi
rm -f conftest*


echo checking for broken stat file mode macros
cat > conftest.c <<EOF
#include "confdefs.h"
#include <sys/types.h>
#include <sys/stat.h>
#ifdef S_ISBLK
#if S_ISBLK (S_IFDIR)
You lose.
#endif
#ifdef S_IFCHR
#if S_ISBLK (S_IFCHR)
You lose.
#endif
#endif /* S_IFCHR */
#endif /* S_ISBLK */
#ifdef S_ISLNK
#if S_ISLNK (S_IFREG)
You lose.
#endif
#endif /* S_ISLNK */
#ifdef S_ISSOCK
#if S_ISSOCK (S_IFREG)
You lose.
#endif
#endif /* S_ISSOCK */

EOF
eval "$CPP conftest.c > conftest.out 2>&1"
if egrep "You lose" conftest.out >/dev/null 2>&1; then
  rm -rf conftest*
  
{
test -n "$ac_verbose" && \
echo "	defining STAT_MACROS_BROKEN"
echo "#define" STAT_MACROS_BROKEN "1" >> confdefs.h
DEFS="$DEFS -DSTAT_MACROS_BROKEN=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}STAT_MACROS_BROKEN\${ac_dB}STAT_MACROS_BROKEN\${ac_dC}1\${ac_dD}
\${ac_uA}STAT_MACROS_BROKEN\${ac_uB}STAT_MACROS_BROKEN\${ac_uC}1\${ac_uD}
\${ac_eA}STAT_MACROS_BROKEN\${ac_eB}STAT_MACROS_BROKEN\${ac_eC}1\${ac_eD}
"
}


fi
rm -f conftest*

echo checking for whether time.h and sys/time.h may both be included
cat > conftest.c <<EOF
#include "confdefs.h"
#include <sys/types.h>
#include <sys/time.h>
#include <time.h>
int main() { exit(0); }
int t() { struct tm *tp; }
EOF
if eval $compile; then
  rm -rf conftest*
  
{
test -n "$ac_verbose" && \
echo "	defining TIME_WITH_SYS_TIME"
echo "#define" TIME_WITH_SYS_TIME "1" >> confdefs.h
DEFS="$DEFS -DTIME_WITH_SYS_TIME=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}TIME_WITH_SYS_TIME\${ac_dB}TIME_WITH_SYS_TIME\${ac_dC}1\${ac_dD}
\${ac_uA}TIME_WITH_SYS_TIME\${ac_uB}TIME_WITH_SYS_TIME\${ac_uC}1\${ac_uD}
\${ac_eA}TIME_WITH_SYS_TIME\${ac_eB}TIME_WITH_SYS_TIME\${ac_eC}1\${ac_eD}
"
}


fi
rm -f conftest*

echo checking for struct tm in time.h
cat > conftest.c <<EOF
#include "confdefs.h"
#include <sys/types.h>
#include <time.h>
int main() { exit(0); }
int t() { struct tm *tp; tp->tm_sec; }
EOF
if eval $compile; then
  :
else
  rm -rf conftest*
  
{
test -n "$ac_verbose" && \
echo "	defining TM_IN_SYS_TIME"
echo "#define" TM_IN_SYS_TIME "1" >> confdefs.h
DEFS="$DEFS -DTM_IN_SYS_TIME=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}TM_IN_SYS_TIME\${ac_dB}TM_IN_SYS_TIME\${ac_dC}1\${ac_dD}
\${ac_uA}TM_IN_SYS_TIME\${ac_uB}TM_IN_SYS_TIME\${ac_uC}1\${ac_uD}
\${ac_eA}TM_IN_SYS_TIME\${ac_eB}TM_IN_SYS_TIME\${ac_eC}1\${ac_eD}
"
}

fi
rm -f conftest*

echo checking for termios.h and sys/ioctl.h being included together
cat > conftest.c <<EOF
#include "confdefs.h"
#include <termios.h>
#include <sys/ioctl.h>
int main() { exit(0); }
int t() { int i; }
EOF
if eval $compile; then
  rm -rf conftest*
  
{
test -n "$ac_verbose" && \
echo "	defining HAVE_TERMIOS_AND_SYS_IOCTL_H"
echo "#define" HAVE_TERMIOS_AND_SYS_IOCTL_H "1" >> confdefs.h
DEFS="$DEFS -DHAVE_TERMIOS_AND_SYS_IOCTL_H=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_TERMIOS_AND_SYS_IOCTL_H\${ac_dB}HAVE_TERMIOS_AND_SYS_IOCTL_H\${ac_dC}1\${ac_dD}
\${ac_uA}HAVE_TERMIOS_AND_SYS_IOCTL_H\${ac_uB}HAVE_TERMIOS_AND_SYS_IOCTL_H\${ac_uC}1\${ac_uD}
\${ac_eA}HAVE_TERMIOS_AND_SYS_IOCTL_H\${ac_eB}HAVE_TERMIOS_AND_SYS_IOCTL_H\${ac_eC}1\${ac_eD}
"
}


fi
rm -f conftest*

echo checking for CBREAK
cat > conftest.c <<EOF
#include "confdefs.h"
#include <sgtty.h>
int main() { exit(0); }
int t() { int i = CBREAK; }
EOF
if eval $compile; then
  rm -rf conftest*
  
{
test -n "$ac_verbose" && \
echo "	defining HAVE_CBREAK"
echo "#define" HAVE_CBREAK "1" >> confdefs.h
DEFS="$DEFS -DHAVE_CBREAK=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_CBREAK\${ac_dB}HAVE_CBREAK\${ac_dC}1\${ac_dD}
\${ac_uA}HAVE_CBREAK\${ac_uB}HAVE_CBREAK\${ac_uC}1\${ac_uD}
\${ac_eA}HAVE_CBREAK\${ac_eB}HAVE_CBREAK\${ac_eC}1\${ac_eD}
"
}


fi
rm -f conftest*

echo checking for pid_t in sys/types.h
cat > conftest.c <<EOF
#include "confdefs.h"
#include <sys/types.h>
int main() { exit(0); }
int t() { pid_t x; }
EOF
if eval $compile; then
  :
else
  rm -rf conftest*
  
{
test -n "$ac_verbose" && \
echo "	defining" PID_T to be "int"
echo "#define" PID_T "int" >> confdefs.h
DEFS="$DEFS -DPID_T=int"
ac_sed_defs="${ac_sed_defs}\${ac_dA}PID_T\${ac_dB}PID_T\${ac_dC}int\${ac_dD}
\${ac_uA}PID_T\${ac_uB}PID_T\${ac_uC}int\${ac_uD}
\${ac_eA}PID_T\${ac_eB}PID_T\${ac_eC}int\${ac_eD}
"
}

fi
rm -f conftest*

echo checking for uid_t in sys/types.h
cat > conftest.c <<EOF
#include "confdefs.h"
#include <sys/types.h>
int main() { exit(0); }
int t() { uid_t x; }
EOF
if eval $compile; then
  :
else
  rm -rf conftest*
  
{
test -n "$ac_verbose" && \
echo "	defining" UID_T to be "int"
echo "#define" UID_T "int" >> confdefs.h
DEFS="$DEFS -DUID_T=int"
ac_sed_defs="${ac_sed_defs}\${ac_dA}UID_T\${ac_dB}UID_T\${ac_dC}int\${ac_dD}
\${ac_uA}UID_T\${ac_uB}UID_T\${ac_uC}int\${ac_uD}
\${ac_eA}UID_T\${ac_eB}UID_T\${ac_eC}int\${ac_eD}
"
}

fi
rm -f conftest*

echo checking for gid_t in sys/types.h
cat > conftest.c <<EOF
#include "confdefs.h"
#include <sys/types.h>
int main() { exit(0); }
int t() { gid_t x; }
EOF
if eval $compile; then
  :
else
  rm -rf conftest*
  
{
test -n "$ac_verbose" && \
echo "	defining" GID_T to be "int"
echo "#define" GID_T "int" >> confdefs.h
DEFS="$DEFS -DGID_T=int"
ac_sed_defs="${ac_sed_defs}\${ac_dA}GID_T\${ac_dB}GID_T\${ac_dC}int\${ac_dD}
\${ac_uA}GID_T\${ac_uB}GID_T\${ac_uC}int\${ac_uD}
\${ac_eA}GID_T\${ac_eB}GID_T\${ac_eC}int\${ac_eD}
"
}

fi
rm -f conftest*

echo checking for off_t in sys/types.h
cat > conftest.c <<EOF
#include "confdefs.h"
#include <sys/types.h>
int main() { exit(0); }
int t() { off_t x; }
EOF
if eval $compile; then
  :
else
  rm -rf conftest*
  
{
test -n "$ac_verbose" && \
echo "	defining" OFF_T to be "long"
echo "#define" OFF_T "long" >> confdefs.h
DEFS="$DEFS -DOFF_T=long"
ac_sed_defs="${ac_sed_defs}\${ac_dA}OFF_T\${ac_dB}OFF_T\${ac_dC}long\${ac_dD}
\${ac_uA}OFF_T\${ac_uB}OFF_T\${ac_uC}long\${ac_uD}
\${ac_eA}OFF_T\${ac_eB}OFF_T\${ac_eC}long\${ac_eD}
"
}

fi
rm -f conftest*

echo checking for sig_atomic_t in signal.h
cat > conftest.c <<EOF
#include "confdefs.h"
#include <signal.h>
int main() { exit(0); }
int t() { sig_atomic_t x; }
EOF
if eval $compile; then
  rm -rf conftest*
  
{
test -n "$ac_verbose" && \
echo "	defining HAVE_SIG_ATOMIC_T_IN_SIGNAL_H"
echo "#define" HAVE_SIG_ATOMIC_T_IN_SIGNAL_H "1" >> confdefs.h
DEFS="$DEFS -DHAVE_SIG_ATOMIC_T_IN_SIGNAL_H=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_SIG_ATOMIC_T_IN_SIGNAL_H\${ac_dB}HAVE_SIG_ATOMIC_T_IN_SIGNAL_H\${ac_dC}1\${ac_dD}
\${ac_uA}HAVE_SIG_ATOMIC_T_IN_SIGNAL_H\${ac_uB}HAVE_SIG_ATOMIC_T_IN_SIGNAL_H\${ac_uC}1\${ac_uD}
\${ac_eA}HAVE_SIG_ATOMIC_T_IN_SIGNAL_H\${ac_eB}HAVE_SIG_ATOMIC_T_IN_SIGNAL_H\${ac_eC}1\${ac_eD}
"
}


fi
rm -f conftest*

echo checking for sig_atomic_t in sys/types.h
cat > conftest.c <<EOF
#include "confdefs.h"
#include <sys/types.h>
int main() { exit(0); }
int t() { sig_atomic_t x; }
EOF
if eval $compile; then
  rm -rf conftest*
  
{
test -n "$ac_verbose" && \
echo "	defining HAVE_SIG_ATOMIC_T_IN_TYPES_H"
echo "#define" HAVE_SIG_ATOMIC_T_IN_TYPES_H "1" >> confdefs.h
DEFS="$DEFS -DHAVE_SIG_ATOMIC_T_IN_TYPES_H=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_SIG_ATOMIC_T_IN_TYPES_H\${ac_dB}HAVE_SIG_ATOMIC_T_IN_TYPES_H\${ac_dC}1\${ac_dD}
\${ac_uA}HAVE_SIG_ATOMIC_T_IN_TYPES_H\${ac_uB}HAVE_SIG_ATOMIC_T_IN_TYPES_H\${ac_uC}1\${ac_uD}
\${ac_eA}HAVE_SIG_ATOMIC_T_IN_TYPES_H\${ac_eB}HAVE_SIG_ATOMIC_T_IN_TYPES_H\${ac_eC}1\${ac_eD}
"
}


fi
rm -f conftest*

case $DEFS in
*HAVE_STDDEF_H*)
  echo checking for size_t in stddef.h
cat > conftest.c <<EOF
#include "confdefs.h"
#include <stddef.h>
int main() { exit(0); }
int t() { size_t x; }
EOF
if eval $compile; then
  rm -rf conftest*
  
{
test -n "$ac_verbose" && \
echo "	defining HAVE_SIZE_T_IN_STDDEF_H"
echo "#define" HAVE_SIZE_T_IN_STDDEF_H "1" >> confdefs.h
DEFS="$DEFS -DHAVE_SIZE_T_IN_STDDEF_H=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_SIZE_T_IN_STDDEF_H\${ac_dB}HAVE_SIZE_T_IN_STDDEF_H\${ac_dC}1\${ac_dD}
\${ac_uA}HAVE_SIZE_T_IN_STDDEF_H\${ac_uB}HAVE_SIZE_T_IN_STDDEF_H\${ac_uC}1\${ac_uD}
\${ac_eA}HAVE_SIZE_T_IN_STDDEF_H\${ac_eB}HAVE_SIZE_T_IN_STDDEF_H\${ac_eC}1\${ac_eD}
"
}


fi
rm -f conftest*
 ;;
esac
echo checking for size_t in sys/types.h
cat > conftest.c <<EOF
#include "confdefs.h"
#include <sys/types.h>
int main() { exit(0); }
int t() { size_t x; }
EOF
if eval $compile; then
  rm -rf conftest*
  
{
test -n "$ac_verbose" && \
echo "	defining HAVE_SIZE_T_IN_TYPES_H"
echo "#define" HAVE_SIZE_T_IN_TYPES_H "1" >> confdefs.h
DEFS="$DEFS -DHAVE_SIZE_T_IN_TYPES_H=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_SIZE_T_IN_TYPES_H\${ac_dB}HAVE_SIZE_T_IN_TYPES_H\${ac_dC}1\${ac_dD}
\${ac_uA}HAVE_SIZE_T_IN_TYPES_H\${ac_uB}HAVE_SIZE_T_IN_TYPES_H\${ac_uC}1\${ac_uD}
\${ac_eA}HAVE_SIZE_T_IN_TYPES_H\${ac_eB}HAVE_SIZE_T_IN_TYPES_H\${ac_eC}1\${ac_eD}
"
}


fi
rm -f conftest*

echo checking for time_t in time.h
cat > conftest.c <<EOF
#include "confdefs.h"
#include <time.h>
int main() { exit(0); }
int t() { time_t i; }
EOF
if eval $compile; then
  rm -rf conftest*
  
{
test -n "$ac_verbose" && \
echo "	defining HAVE_TIME_T_IN_TIME_H"
echo "#define" HAVE_TIME_T_IN_TIME_H "1" >> confdefs.h
DEFS="$DEFS -DHAVE_TIME_T_IN_TIME_H=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_TIME_T_IN_TIME_H\${ac_dB}HAVE_TIME_T_IN_TIME_H\${ac_dC}1\${ac_dD}
\${ac_uA}HAVE_TIME_T_IN_TIME_H\${ac_uB}HAVE_TIME_T_IN_TIME_H\${ac_uC}1\${ac_uD}
\${ac_eA}HAVE_TIME_T_IN_TIME_H\${ac_eB}HAVE_TIME_T_IN_TIME_H\${ac_eC}1\${ac_eD}
"
}


fi
rm -f conftest*

echo checking for time_t in sys/types.h
cat > conftest.c <<EOF
#include "confdefs.h"
#include <sys/types.h>
int main() { exit(0); }
int t() { time_t i; }
EOF
if eval $compile; then
  rm -rf conftest*
  
{
test -n "$ac_verbose" && \
echo "	defining HAVE_TIME_T_IN_TYPES_H"
echo "#define" HAVE_TIME_T_IN_TYPES_H "1" >> confdefs.h
DEFS="$DEFS -DHAVE_TIME_T_IN_TYPES_H=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_TIME_T_IN_TYPES_H\${ac_dB}HAVE_TIME_T_IN_TYPES_H\${ac_dC}1\${ac_dD}
\${ac_uA}HAVE_TIME_T_IN_TYPES_H\${ac_uB}HAVE_TIME_T_IN_TYPES_H\${ac_uC}1\${ac_uD}
\${ac_eA}HAVE_TIME_T_IN_TYPES_H\${ac_eB}HAVE_TIME_T_IN_TYPES_H\${ac_eC}1\${ac_eD}
"
}


fi
rm -f conftest*

echo checking for void
cat > conftest.c <<EOF
#include "confdefs.h"

int main() { exit(0); }
int t() { extern void foo (); (void) exit (0); }
EOF
if eval $compile; then
  rm -rf conftest*
  
{
test -n "$ac_verbose" && \
echo "	defining HAVE_VOID"
echo "#define" HAVE_VOID "1" >> confdefs.h
DEFS="$DEFS -DHAVE_VOID=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_VOID\${ac_dB}HAVE_VOID\${ac_dC}1\${ac_dD}
\${ac_uA}HAVE_VOID\${ac_uB}HAVE_VOID\${ac_uC}1\${ac_uD}
\${ac_eA}HAVE_VOID\${ac_eB}HAVE_VOID\${ac_eC}1\${ac_eD}
"
}


fi
rm -f conftest*

echo checking for unsigned char
cat > conftest.c <<EOF
#include "confdefs.h"

int main() { exit(0); }
int t() { unsigned char i = (unsigned char) -1; }
EOF
if eval $compile; then
  rm -rf conftest*
  
{
test -n "$ac_verbose" && \
echo "	defining HAVE_UNSIGNED_CHAR"
echo "#define" HAVE_UNSIGNED_CHAR "1" >> confdefs.h
DEFS="$DEFS -DHAVE_UNSIGNED_CHAR=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_UNSIGNED_CHAR\${ac_dB}HAVE_UNSIGNED_CHAR\${ac_dC}1\${ac_dD}
\${ac_uA}HAVE_UNSIGNED_CHAR\${ac_uB}HAVE_UNSIGNED_CHAR\${ac_uC}1\${ac_uD}
\${ac_eA}HAVE_UNSIGNED_CHAR\${ac_eB}HAVE_UNSIGNED_CHAR\${ac_eC}1\${ac_eD}
"
}


fi
rm -f conftest*

echo checking for errno
cat > conftest.c <<EOF
#include "confdefs.h"
#include <errno.h>
int main() { exit(0); }
int t() { int i = errno; errno = 1; }
EOF
if eval $compile; then
  rm -rf conftest*
  
{
test -n "$ac_verbose" && \
echo "	defining HAVE_ERRNO_DECLARATION"
echo "#define" HAVE_ERRNO_DECLARATION "1" >> confdefs.h
DEFS="$DEFS -DHAVE_ERRNO_DECLARATION=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_ERRNO_DECLARATION\${ac_dB}HAVE_ERRNO_DECLARATION\${ac_dC}1\${ac_dD}
\${ac_uA}HAVE_ERRNO_DECLARATION\${ac_uB}HAVE_ERRNO_DECLARATION\${ac_uC}1\${ac_uD}
\${ac_eA}HAVE_ERRNO_DECLARATION\${ac_eB}HAVE_ERRNO_DECLARATION\${ac_eC}1\${ac_eD}
"
}


fi
rm -f conftest*

echo checking for TXADDCD
cat > conftest.c <<EOF
#include "confdefs.h"
#include <sys/ioctl.h>
int main() { exit(0); }
int t() { int i = (int) TXADDCD; }
EOF
if eval $compile; then
  rm -rf conftest*
  
{
test -n "$ac_verbose" && \
echo "	defining HAVE_TXADDCD"
echo "#define" HAVE_TXADDCD "1" >> confdefs.h
DEFS="$DEFS -DHAVE_TXADDCD=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_TXADDCD\${ac_dB}HAVE_TXADDCD\${ac_dC}1\${ac_dD}
\${ac_uA}HAVE_TXADDCD\${ac_uB}HAVE_TXADDCD\${ac_uC}1\${ac_uD}
\${ac_eA}HAVE_TXADDCD\${ac_eB}HAVE_TXADDCD\${ac_eC}1\${ac_eD}
"
}


fi
rm -f conftest*


for ac_func in memset memcmp memchr memcpy bcopy bcmp bzero
do
ac_tr_func=HAVE_`echo $ac_func | tr '[a-z]' '[A-Z]'`
echo checking for ${ac_func}
cat > conftest.c <<EOF
#include "confdefs.h"
#include <ctype.h>
int main() { exit(0); }
int t() { 
/* 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
/* Override any gcc2 internal prototype to avoid an error.  */
extern char ${ac_func}(); ${ac_func}();
#endif
 }
EOF
if eval $compile; then
  rm -rf conftest*
  {
test -n "$ac_verbose" && \
echo "	defining ${ac_tr_func}"
echo "#define" ${ac_tr_func} "1" >> confdefs.h
DEFS="$DEFS -D${ac_tr_func}=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}${ac_tr_func}\${ac_dB}${ac_tr_func}\${ac_dC}1\${ac_dD}
\${ac_uA}${ac_tr_func}\${ac_uB}${ac_tr_func}\${ac_uC}1\${ac_uD}
\${ac_eA}${ac_tr_func}\${ac_eB}${ac_tr_func}\${ac_eC}1\${ac_eD}
"
}


fi
rm -f conftest*
done

for ac_func in strchr strrchr index rindex strerror strtol strtoul strstr
do
ac_tr_func=HAVE_`echo $ac_func | tr '[a-z]' '[A-Z]'`
echo checking for ${ac_func}
cat > conftest.c <<EOF
#include "confdefs.h"
#include <ctype.h>
int main() { exit(0); }
int t() { 
/* 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
/* Override any gcc2 internal prototype to avoid an error.  */
extern char ${ac_func}(); ${ac_func}();
#endif
 }
EOF
if eval $compile; then
  rm -rf conftest*
  {
test -n "$ac_verbose" && \
echo "	defining ${ac_tr_func}"
echo "#define" ${ac_tr_func} "1" >> confdefs.h
DEFS="$DEFS -D${ac_tr_func}=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}${ac_tr_func}\${ac_dB}${ac_tr_func}\${ac_dC}1\${ac_dD}
\${ac_uA}${ac_tr_func}\${ac_uB}${ac_tr_func}\${ac_uC}1\${ac_uD}
\${ac_eA}${ac_tr_func}\${ac_eB}${ac_tr_func}\${ac_eC}1\${ac_eD}
"
}


fi
rm -f conftest*
done

for ac_func in strdup strcasecmp strncasecmp stricmp strnicmp
do
ac_tr_func=HAVE_`echo $ac_func | tr '[a-z]' '[A-Z]'`
echo checking for ${ac_func}
cat > conftest.c <<EOF
#include "confdefs.h"
#include <ctype.h>
int main() { exit(0); }
int t() { 
/* 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
/* Override any gcc2 internal prototype to avoid an error.  */
extern char ${ac_func}(); ${ac_func}();
#endif
 }
EOF
if eval $compile; then
  rm -rf conftest*
  {
test -n "$ac_verbose" && \
echo "	defining ${ac_tr_func}"
echo "#define" ${ac_tr_func} "1" >> confdefs.h
DEFS="$DEFS -D${ac_tr_func}=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}${ac_tr_func}\${ac_dB}${ac_tr_func}\${ac_dC}1\${ac_dD}
\${ac_uA}${ac_tr_func}\${ac_uB}${ac_tr_func}\${ac_uC}1\${ac_uD}
\${ac_eA}${ac_tr_func}\${ac_eB}${ac_tr_func}\${ac_eC}1\${ac_eD}
"
}


fi
rm -f conftest*
done

for ac_func in bsearch vfprintf
do
ac_tr_func=HAVE_`echo $ac_func | tr '[a-z]' '[A-Z]'`
echo checking for ${ac_func}
cat > conftest.c <<EOF
#include "confdefs.h"
#include <ctype.h>
int main() { exit(0); }
int t() { 
/* 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
/* Override any gcc2 internal prototype to avoid an error.  */
extern char ${ac_func}(); ${ac_func}();
#endif
 }
EOF
if eval $compile; then
  rm -rf conftest*
  {
test -n "$ac_verbose" && \
echo "	defining ${ac_tr_func}"
echo "#define" ${ac_tr_func} "1" >> confdefs.h
DEFS="$DEFS -D${ac_tr_func}=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}${ac_tr_func}\${ac_dB}${ac_tr_func}\${ac_dC}1\${ac_dD}
\${ac_uA}${ac_tr_func}\${ac_uB}${ac_tr_func}\${ac_uC}1\${ac_uD}
\${ac_eA}${ac_tr_func}\${ac_eB}${ac_tr_func}\${ac_eC}1\${ac_eD}
"
}


fi
rm -f conftest*
done

for ac_func in remove ftruncate ltrunc rename opendir dup2 waitpid wait4
do
ac_tr_func=HAVE_`echo $ac_func | tr '[a-z]' '[A-Z]'`
echo checking for ${ac_func}
cat > conftest.c <<EOF
#include "confdefs.h"
#include <ctype.h>
int main() { exit(0); }
int t() { 
/* 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
/* Override any gcc2 internal prototype to avoid an error.  */
extern char ${ac_func}(); ${ac_func}();
#endif
 }
EOF
if eval $compile; then
  rm -rf conftest*
  {
test -n "$ac_verbose" && \
echo "	defining ${ac_tr_func}"
echo "#define" ${ac_tr_func} "1" >> confdefs.h
DEFS="$DEFS -D${ac_tr_func}=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}${ac_tr_func}\${ac_dB}${ac_tr_func}\${ac_dC}1\${ac_dD}
\${ac_uA}${ac_tr_func}\${ac_uB}${ac_tr_func}\${ac_uC}1\${ac_uD}
\${ac_eA}${ac_tr_func}\${ac_eB}${ac_tr_func}\${ac_eC}1\${ac_eD}
"
}


fi
rm -f conftest*
done

for ac_func in sigsetjmp setret sigaction sigvec sigset
do
ac_tr_func=HAVE_`echo $ac_func | tr '[a-z]' '[A-Z]'`
echo checking for ${ac_func}
cat > conftest.c <<EOF
#include "confdefs.h"
#include <ctype.h>
int main() { exit(0); }
int t() { 
/* 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
/* Override any gcc2 internal prototype to avoid an error.  */
extern char ${ac_func}(); ${ac_func}();
#endif
 }
EOF
if eval $compile; then
  rm -rf conftest*
  {
test -n "$ac_verbose" && \
echo "	defining ${ac_tr_func}"
echo "#define" ${ac_tr_func} "1" >> confdefs.h
DEFS="$DEFS -D${ac_tr_func}=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}${ac_tr_func}\${ac_dB}${ac_tr_func}\${ac_dC}1\${ac_dD}
\${ac_uA}${ac_tr_func}\${ac_uB}${ac_tr_func}\${ac_uC}1\${ac_uD}
\${ac_eA}${ac_tr_func}\${ac_eB}${ac_tr_func}\${ac_eC}1\${ac_eD}
"
}


fi
rm -f conftest*
done

for ac_func in sigprocmask sigblock sighold getdtablesize sysconf
do
ac_tr_func=HAVE_`echo $ac_func | tr '[a-z]' '[A-Z]'`
echo checking for ${ac_func}
cat > conftest.c <<EOF
#include "confdefs.h"
#include <ctype.h>
int main() { exit(0); }
int t() { 
/* 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
/* Override any gcc2 internal prototype to avoid an error.  */
extern char ${ac_func}(); ${ac_func}();
#endif
 }
EOF
if eval $compile; then
  rm -rf conftest*
  {
test -n "$ac_verbose" && \
echo "	defining ${ac_tr_func}"
echo "#define" ${ac_tr_func} "1" >> confdefs.h
DEFS="$DEFS -D${ac_tr_func}=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}${ac_tr_func}\${ac_dB}${ac_tr_func}\${ac_dC}1\${ac_dD}
\${ac_uA}${ac_tr_func}\${ac_uB}${ac_tr_func}\${ac_uC}1\${ac_uD}
\${ac_eA}${ac_tr_func}\${ac_eB}${ac_tr_func}\${ac_eC}1\${ac_eD}
"
}


fi
rm -f conftest*
done

for ac_func in setpgrp setsid setreuid gethostname uname
do
ac_tr_func=HAVE_`echo $ac_func | tr '[a-z]' '[A-Z]'`
echo checking for ${ac_func}
cat > conftest.c <<EOF
#include "confdefs.h"
#include <ctype.h>
int main() { exit(0); }
int t() { 
/* 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
/* Override any gcc2 internal prototype to avoid an error.  */
extern char ${ac_func}(); ${ac_func}();
#endif
 }
EOF
if eval $compile; then
  rm -rf conftest*
  {
test -n "$ac_verbose" && \
echo "	defining ${ac_tr_func}"
echo "#define" ${ac_tr_func} "1" >> confdefs.h
DEFS="$DEFS -D${ac_tr_func}=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}${ac_tr_func}\${ac_dB}${ac_tr_func}\${ac_dC}1\${ac_dD}
\${ac_uA}${ac_tr_func}\${ac_uB}${ac_tr_func}\${ac_uC}1\${ac_uD}
\${ac_eA}${ac_tr_func}\${ac_eB}${ac_tr_func}\${ac_eC}1\${ac_eD}
"
}


fi
rm -f conftest*
done

for ac_func in gettimeofday ftw glob dev_info
do
ac_tr_func=HAVE_`echo $ac_func | tr '[a-z]' '[A-Z]'`
echo checking for ${ac_func}
cat > conftest.c <<EOF
#include "confdefs.h"
#include <ctype.h>
int main() { exit(0); }
int t() { 
/* 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
/* Override any gcc2 internal prototype to avoid an error.  */
extern char ${ac_func}(); ${ac_func}();
#endif
 }
EOF
if eval $compile; then
  rm -rf conftest*
  {
test -n "$ac_verbose" && \
echo "	defining ${ac_tr_func}"
echo "#define" ${ac_tr_func} "1" >> confdefs.h
DEFS="$DEFS -D${ac_tr_func}=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}${ac_tr_func}\${ac_dB}${ac_tr_func}\${ac_dC}1\${ac_dD}
\${ac_uA}${ac_tr_func}\${ac_uB}${ac_tr_func}\${ac_uC}1\${ac_uD}
\${ac_eA}${ac_tr_func}\${ac_eB}${ac_tr_func}\${ac_eC}1\${ac_eD}
"
}


fi
rm -f conftest*
done

SAVELIBS="$LIBS"
LIBS=`echo $LIBS | sed 's/-linet//'`
for ac_func in getline
do
ac_tr_func=HAVE_`echo $ac_func | tr '[a-z]' '[A-Z]'`
echo checking for ${ac_func}
cat > conftest.c <<EOF
#include "confdefs.h"
#include <ctype.h>
int main() { exit(0); }
int t() { 
/* 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
/* Override any gcc2 internal prototype to avoid an error.  */
extern char ${ac_func}(); ${ac_func}();
#endif
 }
EOF
if eval $compile; then
  rm -rf conftest*
  {
test -n "$ac_verbose" && \
echo "	defining ${ac_tr_func}"
echo "#define" ${ac_tr_func} "1" >> confdefs.h
DEFS="$DEFS -D${ac_tr_func}=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}${ac_tr_func}\${ac_dB}${ac_tr_func}\${ac_dC}1\${ac_dD}
\${ac_uA}${ac_tr_func}\${ac_uB}${ac_tr_func}\${ac_uC}1\${ac_uD}
\${ac_eA}${ac_tr_func}\${ac_eB}${ac_tr_func}\${ac_eC}1\${ac_eD}
"
}


fi
rm -f conftest*
done

LIBS="$SAVELIBS"
echo checking for ftime
cat > conftest.c <<EOF
#include "confdefs.h"
#include <ctype.h>
int main() { exit(0); }
int t() { 
/* 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_ftime) || defined (__stub___ftime)
choke me
#else
/* Override any gcc2 internal prototype to avoid an error.  */
extern char ftime(); ftime();
#endif
 }
EOF
if eval $compile; then
  rm -rf conftest*
  if test -n "$cross_compiling"
then
  
{
test -n "$ac_verbose" && \
echo "	defining HAVE_FTIME"
echo "#define" HAVE_FTIME "1" >> confdefs.h
DEFS="$DEFS -DHAVE_FTIME=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_FTIME\${ac_dB}HAVE_FTIME\${ac_dC}1\${ac_dD}
\${ac_uA}HAVE_FTIME\${ac_uB}HAVE_FTIME\${ac_uC}1\${ac_uD}
\${ac_eA}HAVE_FTIME\${ac_eB}HAVE_FTIME\${ac_eC}1\${ac_eD}
"
}

else
cat > conftest.c <<EOF
#include "confdefs.h"

#include <sys/types.h>
#include <sys/timeb.h>
main ()
{
  struct timeb s, slast;
  int c = 0;
  ftime (&slast);
  while (c < 10)
    {
      ftime (&s);
      if (s.time < slast.time
	  || (s.time == slast.time && s.millitm < slast.millitm))
	exit (1);
      if (s.time != slast.time)
	++c;
      slast.time = s.time;
      slast.millitm = s.millitm;
    }
  exit (0);
}

EOF
eval $compile
if test -s conftest && (./conftest; exit) 2>/dev/null; then
  
{
test -n "$ac_verbose" && \
echo "	defining HAVE_FTIME"
echo "#define" HAVE_FTIME "1" >> confdefs.h
DEFS="$DEFS -DHAVE_FTIME=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_FTIME\${ac_dB}HAVE_FTIME\${ac_dC}1\${ac_dD}
\${ac_uA}HAVE_FTIME\${ac_uB}HAVE_FTIME\${ac_uC}1\${ac_uD}
\${ac_eA}HAVE_FTIME\${ac_eB}HAVE_FTIME\${ac_eC}1\${ac_eD}
"
}


else
  echo 1>&2 "Your ftime seems to be buggy"
fi
fi
rm -fr conftest*

fi
rm -f conftest*

for ac_func in times
do
ac_tr_func=HAVE_`echo $ac_func | tr '[a-z]' '[A-Z]'`
echo checking for ${ac_func}
cat > conftest.c <<EOF
#include "confdefs.h"
#include <ctype.h>
int main() { exit(0); }
int t() { 
/* 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
/* Override any gcc2 internal prototype to avoid an error.  */
extern char ${ac_func}(); ${ac_func}();
#endif
 }
EOF
if eval $compile; then
  rm -rf conftest*
  {
test -n "$ac_verbose" && \
echo "	defining ${ac_tr_func}"
echo "#define" ${ac_tr_func} "1" >> confdefs.h
DEFS="$DEFS -D${ac_tr_func}=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}${ac_tr_func}\${ac_dB}${ac_tr_func}\${ac_dC}1\${ac_dD}
\${ac_uA}${ac_tr_func}\${ac_uB}${ac_tr_func}\${ac_uC}1\${ac_uD}
\${ac_eA}${ac_tr_func}\${ac_eB}${ac_tr_func}\${ac_eC}1\${ac_eD}
"
}


fi
rm -f conftest*
done

for ac_func in napms nap usleep poll select
do
ac_tr_func=HAVE_`echo $ac_func | tr '[a-z]' '[A-Z]'`
echo checking for ${ac_func}
cat > conftest.c <<EOF
#include "confdefs.h"
#include <ctype.h>
int main() { exit(0); }
int t() { 
/* 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
/* Override any gcc2 internal prototype to avoid an error.  */
extern char ${ac_func}(); ${ac_func}();
#endif
 }
EOF
if eval $compile; then
  rm -rf conftest*
  {
test -n "$ac_verbose" && \
echo "	defining ${ac_tr_func}"
echo "#define" ${ac_tr_func} "1" >> confdefs.h
DEFS="$DEFS -D${ac_tr_func}=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}${ac_tr_func}\${ac_dB}${ac_tr_func}\${ac_dC}1\${ac_dD}
\${ac_uA}${ac_tr_func}\${ac_uB}${ac_tr_func}\${ac_uC}1\${ac_uD}
\${ac_eA}${ac_tr_func}\${ac_eB}${ac_tr_func}\${ac_eC}1\${ac_eD}
"
}


fi
rm -f conftest*
done

case $DEFS in
*HAVE_NAPMS*) ;;
*HAVE_NAP*)  ;;
*HAVE_USLEEP*) ;;
*HAVE_POLL*) ;;
*HAVE_SELECT*) ;;
*) echo 1>&2 'WARNING: No way to sleep for less than one second'
   echo 1>&2 '         \p in chat scripts will sleep for a full second'
   ;;
esac
for ac_func in getgrent
do
ac_tr_func=HAVE_`echo $ac_func | tr '[a-z]' '[A-Z]'`
echo checking for ${ac_func}
cat > conftest.c <<EOF
#include "confdefs.h"
#include <ctype.h>
int main() { exit(0); }
int t() { 
/* 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
/* Override any gcc2 internal prototype to avoid an error.  */
extern char ${ac_func}(); ${ac_func}();
#endif
 }
EOF
if eval $compile; then
  rm -rf conftest*
  {
test -n "$ac_verbose" && \
echo "	defining ${ac_tr_func}"
echo "#define" ${ac_tr_func} "1" >> confdefs.h
DEFS="$DEFS -D${ac_tr_func}=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}${ac_tr_func}\${ac_dB}${ac_tr_func}\${ac_dC}1\${ac_dD}
\${ac_uA}${ac_tr_func}\${ac_uB}${ac_tr_func}\${ac_uC}1\${ac_uD}
\${ac_eA}${ac_tr_func}\${ac_eB}${ac_tr_func}\${ac_eC}1\${ac_eD}
"
}


fi
rm -f conftest*
done

trfrom='[a-z]' trto='[A-Z]'
for i in socket t_open; do
  def=HAVE_`echo $i|tr "$trfrom" "$trto"`
  echo checking for $i
cat > conftest.c <<EOF
#include "confdefs.h"
#include <ctype.h>
int main() { exit(0); }
int t() { 
/* 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_$i) || defined (__stub___$i)
choke me
#else
/* Override any gcc2 internal prototype to avoid an error.  */
extern char $i(); $i();
#endif
 }
EOF
if eval $compile; then
  rm -rf conftest*
  
{
test -n "$ac_verbose" && \
echo "	defining $def"
echo "#define" $def "1" >> confdefs.h
DEFS="$DEFS -D$def=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}$def\${ac_dB}$def\${ac_dC}1\${ac_dD}
\${ac_uA}$def\${ac_uB}$def\${ac_uC}1\${ac_uD}
\${ac_eA}$def\${ac_eB}$def\${ac_eC}1\${ac_eD}
"
}


else
  rm -rf conftest*
  missing=1
fi
rm -f conftest*
  for lib in "-lsocket" "-lnsl" "-lsocket -lnsl" "-lxti"; do
    if test -n "$missing"; then
      case $LIBS in
      *${lib}*) ;;
      *)
	SAVELIBS="$LIBS"
	LIBS="$LIBS $lib"
	missing=
	echo checking for $i with $lib
cat > conftest.c <<EOF
#include "confdefs.h"

int main() { exit(0); }
int t() { extern char $i(); $i(); }
EOF
if eval $compile; then
  rm -rf conftest*
  
{
test -n "$ac_verbose" && \
echo "	defining $def"
echo "#define" $def "1" >> confdefs.h
DEFS="$DEFS -D$def=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}$def\${ac_dB}$def\${ac_dC}1\${ac_dD}
\${ac_uA}$def\${ac_uB}$def\${ac_uC}1\${ac_uD}
\${ac_eA}$def\${ac_eB}$def\${ac_eC}1\${ac_eD}
"
}


else
  rm -rf conftest*
  missing=1; LIBS="$SAVELIBS"
fi
rm -f conftest*
	;;
      esac
    fi
  done
done
for ac_func in getcwd getwd
do
ac_tr_func=HAVE_`echo $ac_func | tr '[a-z]' '[A-Z]'`
echo checking for ${ac_func}
cat > conftest.c <<EOF
#include "confdefs.h"
#include <ctype.h>
int main() { exit(0); }
int t() { 
/* 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
/* Override any gcc2 internal prototype to avoid an error.  */
extern char ${ac_func}(); ${ac_func}();
#endif
 }
EOF
if eval $compile; then
  rm -rf conftest*
  {
test -n "$ac_verbose" && \
echo "	defining ${ac_tr_func}"
echo "#define" ${ac_tr_func} "1" >> confdefs.h
DEFS="$DEFS -D${ac_tr_func}=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}${ac_tr_func}\${ac_dB}${ac_tr_func}\${ac_dC}1\${ac_dD}
\${ac_uA}${ac_tr_func}\${ac_uB}${ac_tr_func}\${ac_uC}1\${ac_uD}
\${ac_eA}${ac_tr_func}\${ac_eB}${ac_tr_func}\${ac_eC}1\${ac_eD}
"
}


fi
rm -f conftest*
done

case $DEFS in
*HAVE_GETCWD*) ;;
*HAVE_GETWD*) ;;
*) UNIXOBJS="$UNIXOBJS getcwd.o"
   if test -s /bin/pwd; then
     
{
test -n "$ac_verbose" && \
echo "	defining" PWD_PROGRAM to be ""/bin/pwd""
echo "#define" PWD_PROGRAM ""/bin/pwd"" >> confdefs.h
DEFS="$DEFS -DPWD_PROGRAM="/bin/pwd""
ac_sed_defs="${ac_sed_defs}\${ac_dA}PWD_PROGRAM\${ac_dB}PWD_PROGRAM\${ac_dC}\"/bin/pwd\"\${ac_dD}
\${ac_uA}PWD_PROGRAM\${ac_uB}PWD_PROGRAM\${ac_uC}\"/bin/pwd\"\${ac_uD}
\${ac_eA}PWD_PROGRAM\${ac_eB}PWD_PROGRAM\${ac_eC}\"/bin/pwd\"\${ac_eD}
"
}

   fi ;;
esac
for ac_func in mkdir
do
ac_tr_func=HAVE_`echo $ac_func | tr '[a-z]' '[A-Z]'`
echo checking for ${ac_func}
cat > conftest.c <<EOF
#include "confdefs.h"
#include <ctype.h>
int main() { exit(0); }
int t() { 
/* 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
/* Override any gcc2 internal prototype to avoid an error.  */
extern char ${ac_func}(); ${ac_func}();
#endif
 }
EOF
if eval $compile; then
  rm -rf conftest*
  {
test -n "$ac_verbose" && \
echo "	defining ${ac_tr_func}"
echo "#define" ${ac_tr_func} "1" >> confdefs.h
DEFS="$DEFS -D${ac_tr_func}=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}${ac_tr_func}\${ac_dB}${ac_tr_func}\${ac_dC}1\${ac_dD}
\${ac_uA}${ac_tr_func}\${ac_uB}${ac_tr_func}\${ac_uC}1\${ac_uD}
\${ac_eA}${ac_tr_func}\${ac_eB}${ac_tr_func}\${ac_eC}1\${ac_eD}
"
}


fi
rm -f conftest*
done

case $DEFS in
*HAVE_MKDIR*) UUDIR='# ' ;;
*) UUDIR=
   UNIXOBJS="$UNIXOBJS mkdir.o"
   if test -s /bin/mkdir; then
     
{
test -n "$ac_verbose" && \
echo "	defining" MKDIR_PROGRAM to be ""/bin/mkdir""
echo "#define" MKDIR_PROGRAM ""/bin/mkdir"" >> confdefs.h
DEFS="$DEFS -DMKDIR_PROGRAM="/bin/mkdir""
ac_sed_defs="${ac_sed_defs}\${ac_dA}MKDIR_PROGRAM\${ac_dB}MKDIR_PROGRAM\${ac_dC}\"/bin/mkdir\"\${ac_dD}
\${ac_uA}MKDIR_PROGRAM\${ac_uB}MKDIR_PROGRAM\${ac_uC}\"/bin/mkdir\"\${ac_uD}
\${ac_eA}MKDIR_PROGRAM\${ac_eB}MKDIR_PROGRAM\${ac_eC}\"/bin/mkdir\"\${ac_eD}
"
}

   fi ;;
esac
for ac_func in rmdir
do
ac_tr_func=HAVE_`echo $ac_func | tr '[a-z]' '[A-Z]'`
echo checking for ${ac_func}
cat > conftest.c <<EOF
#include "confdefs.h"
#include <ctype.h>
int main() { exit(0); }
int t() { 
/* 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
/* Override any gcc2 internal prototype to avoid an error.  */
extern char ${ac_func}(); ${ac_func}();
#endif
 }
EOF
if eval $compile; then
  rm -rf conftest*
  {
test -n "$ac_verbose" && \
echo "	defining ${ac_tr_func}"
echo "#define" ${ac_tr_func} "1" >> confdefs.h
DEFS="$DEFS -D${ac_tr_func}=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}${ac_tr_func}\${ac_dB}${ac_tr_func}\${ac_dC}1\${ac_dD}
\${ac_uA}${ac_tr_func}\${ac_uB}${ac_tr_func}\${ac_uC}1\${ac_uD}
\${ac_eA}${ac_tr_func}\${ac_eB}${ac_tr_func}\${ac_eC}1\${ac_eD}
"
}


fi
rm -f conftest*
done

case $DEFS in
*HAVE_RMDIR*) ;;
*) UNIXOBJS="$UNIXOBJS rmdir.o"
   if test -s /bin/rmdir; then
     
{
test -n "$ac_verbose" && \
echo "	defining" RMDIR_PROGRAM to be ""/bin/rmdir""
echo "#define" RMDIR_PROGRAM ""/bin/rmdir"" >> confdefs.h
DEFS="$DEFS -DRMDIR_PROGRAM="/bin/rmdir""
ac_sed_defs="${ac_sed_defs}\${ac_dA}RMDIR_PROGRAM\${ac_dB}RMDIR_PROGRAM\${ac_dC}\"/bin/rmdir\"\${ac_dD}
\${ac_uA}RMDIR_PROGRAM\${ac_uB}RMDIR_PROGRAM\${ac_uC}\"/bin/rmdir\"\${ac_uD}
\${ac_eA}RMDIR_PROGRAM\${ac_eB}RMDIR_PROGRAM\${ac_eC}\"/bin/rmdir\"\${ac_eD}
"
}

   fi ;;
esac
case $DEFS in
*HAVE_BSEARCH*) ;;
*) LIBOBJS="$LIBOBJS bsrch.o" ;;
esac
case $DEFS in
*HAVE_BZERO*) ;;
*HAVE_MEMSET*) ;;
*) LIBOBJS="$LIBOBJS bzero.o" ;;
esac
case $DEFS in
*HAVE_GETLINE*) ;;
*) LIBOBJS="$LIBOBJS getlin.o" ;;
esac
case $DEFS in
*HAVE_MEMCHR*) ;;
*) LIBOBJS="$LIBOBJS memchr.o" ;;
esac
case $DEFS in
*HAVE_MEMCMP*) ;;
*HAVE_BCMP*) ;;
*) LIBOBJS="$LIBOBJS memcmp.o" ;;
esac
case $DEFS in
*HAVE_MEMCPY*) ;;
*HAVE_BCOPY*) ;;
*) LIBOBJS="$LIBOBJS memcpy.o" ;;
esac
case $DEFS in
*HAVE_STRCASECMP*) ;;
*HAVE_STRICMP*) ;;
*) LIBOBJS="$LIBOBJS strcas.o" ;;
esac
case $DEFS in
*HAVE_STRCHR*) ;;
*HAVE_INDEX*) ;;
*) LIBOBJS="$LIBOBJS strchr.o" ;;
esac
case $DEFS in
*HAVE_STRDUP*) ;;
*) LIBOBJS="$LIBOBJS strdup.o" ;;
esac
case $DEFS in
*HAVE_STRNCASECMP*) ;;
*HAVE_STRNICMP*) ;;
*) LIBOBJS="$LIBOBJS strncs.o" ;;
esac
case $DEFS in
*HAVE_STRRCHR*) ;;
*HAVE_RINDEX*) ;;
*) LIBOBJS="$LIBOBJS strrch.o" ;;
esac
case $DEFS in
*HAVE_STRSTR*) ;;
*) LIBOBJS="$LIBOBJS strstr.o" ;;
esac
case $DEFS in
*HAVE_STRTOL*) ;;
*) LIBOBJS="$LIBOBJS strtol.o" ;;
esac
case $DEFS in
*HAVE_STRTOUL*) ;;
*) LIBOBJS="$LIBOBJS strtou.o" ;;
esac
case $DEFS in
*HAVE_OPENDIR*) ;;
*) UNIXOBJS="$UNIXOBJS dirent.o" ;;
esac
case $DEFS in
*HAVE_DUP2*) ;;
*) UNIXOBJS="$UNIXOBJS dup2.o" ;;
esac
case $DEFS in
*HAVE_FTW=*) ;;
*) UNIXOBJS="$UNIXOBJS ftw.o" ;;
esac
case $DEFS in
*HAVE_REMOVE*) ;;
*) UNIXOBJS="$UNIXOBJS remove.o" ;;
esac
case $DEFS in
*HAVE_RENAME*) ;;
*) UNIXOBJS="$UNIXOBJS rename.o" ;;
esac
case $DEFS in
*HAVE_STRERROR*) ;;
*) UNIXOBJS="$UNIXOBJS strerr.o" ;;
esac

case $DEFS in
*HAVE_SIGVEC*)
  echo checking for sv_flags
cat > conftest.c <<EOF
#include "confdefs.h"
#include <signal.h>
int main() { exit(0); }
int t() { struct sigvec s; s.sv_flags = 0; }
EOF
if eval $compile; then
  rm -rf conftest*
  
{
test -n "$ac_verbose" && \
echo "	defining HAVE_SIGVEC_SV_FLAGS"
echo "#define" HAVE_SIGVEC_SV_FLAGS "1" >> confdefs.h
DEFS="$DEFS -DHAVE_SIGVEC_SV_FLAGS=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_SIGVEC_SV_FLAGS\${ac_dB}HAVE_SIGVEC_SV_FLAGS\${ac_dC}1\${ac_dD}
\${ac_uA}HAVE_SIGVEC_SV_FLAGS\${ac_uB}HAVE_SIGVEC_SV_FLAGS\${ac_uC}1\${ac_uD}
\${ac_eA}HAVE_SIGVEC_SV_FLAGS\${ac_eB}HAVE_SIGVEC_SV_FLAGS\${ac_eC}1\${ac_eD}
"
}


fi
rm -f conftest*
 ;;
esac
echo checking how to get filesystem space usage
# SVR4
echo checking for sys/statvfs.h
cat > conftest.c <<EOF
#include "confdefs.h"
#include <sys/statvfs.h>
EOF
ac_err=`eval "($CPP conftest.c >/dev/null) 2>&1"`
if test -z "$ac_err"; then
  rm -rf conftest*
  echo checking for statvfs
cat > conftest.c <<EOF
#include "confdefs.h"
#include <ctype.h>
int main() { exit(0); }
int t() { 
/* 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_statvfs) || defined (__stub___statvfs)
choke me
#else
/* Override any gcc2 internal prototype to avoid an error.  */
extern char statvfs(); statvfs();
#endif
 }
EOF
if eval $compile; then
  rm -rf conftest*
  {
test -n "$ac_verbose" && \
echo "	defining STAT_STATVFS"
echo "#define" STAT_STATVFS "1" >> confdefs.h
DEFS="$DEFS -DSTAT_STATVFS=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}STAT_STATVFS\${ac_dB}STAT_STATVFS\${ac_dC}1\${ac_dD}
\${ac_uA}STAT_STATVFS\${ac_uB}STAT_STATVFS\${ac_uC}1\${ac_uD}
\${ac_eA}STAT_STATVFS\${ac_eB}STAT_STATVFS\${ac_eC}1\${ac_eD}
"
}
 space=1

fi
rm -f conftest*


fi
rm -f conftest*

if test -z "$space"; then
  echo checking for statfs
cat > conftest.c <<EOF
#include "confdefs.h"
#include <ctype.h>
int main() { exit(0); }
int t() { 
/* 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_statfs) || defined (__stub___statfs)
choke me
#else
/* Override any gcc2 internal prototype to avoid an error.  */
extern char statfs(); statfs();
#endif
 }
EOF
if eval $compile; then
  rm -rf conftest*
      # AIX
    echo '#include "confdefs.h"
#include <sys/statfs.h>' > conftest.c
eval "$CPP conftest.c > conftest.out 2>&1"
if egrep "f_nlsdirtype" conftest.out >/dev/null 2>&1; then
  rm -rf conftest*
  
{
test -n "$ac_verbose" && \
echo "	defining STAT_STATFS2_BSIZE"
echo "#define" STAT_STATFS2_BSIZE "1" >> confdefs.h
DEFS="$DEFS -DSTAT_STATFS2_BSIZE=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}STAT_STATFS2_BSIZE\${ac_dB}STAT_STATFS2_BSIZE\${ac_dC}1\${ac_dD}
\${ac_uA}STAT_STATFS2_BSIZE\${ac_uB}STAT_STATFS2_BSIZE\${ac_uC}1\${ac_uD}
\${ac_eA}STAT_STATFS2_BSIZE\${ac_eB}STAT_STATFS2_BSIZE\${ac_eC}1\${ac_eD}
"
}
 space=1

fi
rm -f conftest*

    if test -z "$space"; then
      # SVR3
      echo checking for sys/statfs.h
cat > conftest.c <<EOF
#include "confdefs.h"
#include <sys/statfs.h>
EOF
ac_err=`eval "($CPP conftest.c >/dev/null) 2>&1"`
if test -z "$ac_err"; then
  rm -rf conftest*
  
{
test -n "$ac_verbose" && \
echo "	defining STAT_STATFS4"
echo "#define" STAT_STATFS4 "1" >> confdefs.h
DEFS="$DEFS -DSTAT_STATFS4=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}STAT_STATFS4\${ac_dB}STAT_STATFS4\${ac_dC}1\${ac_dD}
\${ac_uA}STAT_STATFS4\${ac_uB}STAT_STATFS4\${ac_uC}1\${ac_uD}
\${ac_eA}STAT_STATFS4\${ac_eB}STAT_STATFS4\${ac_eC}1\${ac_eD}
"
}
 space=1

fi
rm -f conftest*

    fi
    if test -z "$space"; then
      # 4.3BSD
      echo checking for sys/vfs.h
cat > conftest.c <<EOF
#include "confdefs.h"
#include <sys/vfs.h>
EOF
ac_err=`eval "($CPP conftest.c >/dev/null) 2>&1"`
if test -z "$ac_err"; then
  rm -rf conftest*
  
{
test -n "$ac_verbose" && \
echo "	defining STAT_STATFS2_BSIZE"
echo "#define" STAT_STATFS2_BSIZE "1" >> confdefs.h
DEFS="$DEFS -DSTAT_STATFS2_BSIZE=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}STAT_STATFS2_BSIZE\${ac_dB}STAT_STATFS2_BSIZE\${ac_dC}1\${ac_dD}
\${ac_uA}STAT_STATFS2_BSIZE\${ac_uB}STAT_STATFS2_BSIZE\${ac_uC}1\${ac_uD}
\${ac_eA}STAT_STATFS2_BSIZE\${ac_eB}STAT_STATFS2_BSIZE\${ac_eC}1\${ac_eD}
"
}
 space=1

fi
rm -f conftest*

    fi
    if test -z "$space"; then
      # 4.4BSD
      cat > conftest.c <<EOF
#include "confdefs.h"
#include <sys/mount.h>
#ifdef MOUNT_UFS
found_mount_ufs
#endif
EOF
eval "$CPP conftest.c > conftest.out 2>&1"
if egrep "found_mount_ufs" conftest.out >/dev/null 2>&1; then
  rm -rf conftest*
  
{
test -n "$ac_verbose" && \
echo "	defining STAT_STATFS2_FSIZE"
echo "#define" STAT_STATFS2_FSIZE "1" >> confdefs.h
DEFS="$DEFS -DSTAT_STATFS2_FSIZE=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}STAT_STATFS2_FSIZE\${ac_dB}STAT_STATFS2_FSIZE\${ac_dC}1\${ac_dD}
\${ac_uA}STAT_STATFS2_FSIZE\${ac_uB}STAT_STATFS2_FSIZE\${ac_uC}1\${ac_uD}
\${ac_eA}STAT_STATFS2_FSIZE\${ac_eB}STAT_STATFS2_FSIZE\${ac_eC}1\${ac_eD}
"
}
 space=1

fi
rm -f conftest*

    fi
    if test -z "$space"; then
      # Ultrix
      echo checking for sys/mount.h
cat > conftest.c <<EOF
#include "confdefs.h"
#include <sys/mount.h>
EOF
ac_err=`eval "($CPP conftest.c >/dev/null) 2>&1"`
if test -z "$ac_err"; then
  rm -rf conftest*
  
{
test -n "$ac_verbose" && \
echo "	defining STAT_STATFS2_FS_DATA"
echo "#define" STAT_STATFS2_FS_DATA "1" >> confdefs.h
DEFS="$DEFS -DSTAT_STATFS2_FS_DATA=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}STAT_STATFS2_FS_DATA\${ac_dB}STAT_STATFS2_FS_DATA\${ac_dC}1\${ac_dD}
\${ac_uA}STAT_STATFS2_FS_DATA\${ac_uB}STAT_STATFS2_FS_DATA\${ac_uC}1\${ac_uD}
\${ac_eA}STAT_STATFS2_FS_DATA\${ac_eB}STAT_STATFS2_FS_DATA\${ac_eC}1\${ac_eD}
"
}
 space=1

fi
rm -f conftest*

    fi
  

fi
rm -f conftest*
fi
if test -z "$space"; then
  # AIX PS/2
  echo checking for sys/dustat.h
cat > conftest.c <<EOF
#include "confdefs.h"
#include <sys/dustat.h>
EOF
ac_err=`eval "($CPP conftest.c >/dev/null) 2>&1"`
if test -z "$ac_err"; then
  rm -rf conftest*
  echo checking for dustat
cat > conftest.c <<EOF
#include "confdefs.h"
#include <ctype.h>
int main() { exit(0); }
int t() { 
/* 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_dustat) || defined (__stub___dustat)
choke me
#else
/* Override any gcc2 internal prototype to avoid an error.  */
extern char dustat(); dustat();
#endif
 }
EOF
if eval $compile; then
  rm -rf conftest*
  {
test -n "$ac_verbose" && \
echo "	defining STAT_DUSTAT"
echo "#define" STAT_DUSTAT "1" >> confdefs.h
DEFS="$DEFS -DSTAT_DUSTAT=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}STAT_DUSTAT\${ac_dB}STAT_DUSTAT\${ac_dC}1\${ac_dD}
\${ac_uA}STAT_DUSTAT\${ac_uB}STAT_DUSTAT\${ac_uC}1\${ac_uD}
\${ac_eA}STAT_DUSTAT\${ac_eB}STAT_DUSTAT\${ac_eC}1\${ac_eD}
"
}
 space=1

fi
rm -f conftest*


fi
rm -f conftest*

fi
if test -z "$space"; then
  echo checking for ustat
cat > conftest.c <<EOF
#include "confdefs.h"
#include <ctype.h>
int main() { exit(0); }
int t() { 
/* 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_ustat) || defined (__stub___ustat)
choke me
#else
/* Override any gcc2 internal prototype to avoid an error.  */
extern char ustat(); ustat();
#endif
 }
EOF
if eval $compile; then
  rm -rf conftest*
  {
test -n "$ac_verbose" && \
echo "	defining STAT_USTAT"
echo "#define" STAT_USTAT "1" >> confdefs.h
DEFS="$DEFS -DSTAT_USTAT=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}STAT_USTAT\${ac_dB}STAT_USTAT\${ac_dC}1\${ac_dD}
\${ac_uA}STAT_USTAT\${ac_uB}STAT_USTAT\${ac_uC}1\${ac_uD}
\${ac_eA}STAT_USTAT\${ac_eB}STAT_USTAT\${ac_eC}1\${ac_eD}
"
}
 space=1

fi
rm -f conftest*

fi
if test -z "$space"; then
  # QNX
  echo checking for disk_space
cat > conftest.c <<EOF
#include "confdefs.h"
#include <ctype.h>
int main() { exit(0); }
int t() { 
/* 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_disk_space) || defined (__stub___disk_space)
choke me
#else
/* Override any gcc2 internal prototype to avoid an error.  */
extern char disk_space(); disk_space();
#endif
 }
EOF
if eval $compile; then
  rm -rf conftest*
  {
test -n "$ac_verbose" && \
echo "	defining STAT_DISK_SPACE"
echo "#define" STAT_DISK_SPACE "1" >> confdefs.h
DEFS="$DEFS -DSTAT_DISK_SPACE=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}STAT_DISK_SPACE\${ac_dB}STAT_DISK_SPACE\${ac_dC}1\${ac_dD}
\${ac_uA}STAT_DISK_SPACE\${ac_uB}STAT_DISK_SPACE\${ac_uC}1\${ac_uD}
\${ac_eA}STAT_DISK_SPACE\${ac_eB}STAT_DISK_SPACE\${ac_eC}1\${ac_eD}
"
}
 space=1

fi
rm -f conftest*

fi

trfrom='[a-z]' trto='[A-Z]'
echo checking for times declared as "long"
cat > conftest.c <<EOF
#include "confdefs.h"
#include <sys/types.h>
#include <pwd.h>
#include <grp.h>
#ifdef HAVE_LIBC_H
#include <libc.h>
#endif
#ifdef HAVE_SYS_TIMES_H
#include <sys/times.h>
#endif
extern long times ();
int main() { exit(0); }
int t() {  }
EOF
if eval $compile; then
  rm -rf conftest*
  
{
test -n "$ac_verbose" && \
echo "	defining `echo times | tr "$trfrom" "$trto"`_DECLARATION_OK"
echo "#define" `echo times | tr "$trfrom" "$trto"`_DECLARATION_OK "1" >> confdefs.h
DEFS="$DEFS -D`echo times | tr "$trfrom" "$trto"`_DECLARATION_OK=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}`echo times | tr "$trfrom" "$trto"`_DECLARATION_OK\${ac_dB}`echo times | tr "$trfrom" "$trto"`_DECLARATION_OK\${ac_dC}1\${ac_dD}
\${ac_uA}`echo times | tr "$trfrom" "$trto"`_DECLARATION_OK\${ac_uB}`echo times | tr "$trfrom" "$trto"`_DECLARATION_OK\${ac_uC}1\${ac_uD}
\${ac_eA}`echo times | tr "$trfrom" "$trto"`_DECLARATION_OK\${ac_eB}`echo times | tr "$trfrom" "$trto"`_DECLARATION_OK\${ac_eC}1\${ac_eD}
"
}


fi
rm -f conftest*

trfrom='[a-z]' trto='[A-Z]'
echo checking for getpwnam declared as "struct passwd *"
cat > conftest.c <<EOF
#include "confdefs.h"
#include <sys/types.h>
#include <pwd.h>
#include <grp.h>
#ifdef HAVE_LIBC_H
#include <libc.h>
#endif
#ifdef HAVE_SYS_TIMES_H
#include <sys/times.h>
#endif
extern struct passwd * getpwnam ();
int main() { exit(0); }
int t() {  }
EOF
if eval $compile; then
  rm -rf conftest*
  
{
test -n "$ac_verbose" && \
echo "	defining `echo getpwnam | tr "$trfrom" "$trto"`_DECLARATION_OK"
echo "#define" `echo getpwnam | tr "$trfrom" "$trto"`_DECLARATION_OK "1" >> confdefs.h
DEFS="$DEFS -D`echo getpwnam | tr "$trfrom" "$trto"`_DECLARATION_OK=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}`echo getpwnam | tr "$trfrom" "$trto"`_DECLARATION_OK\${ac_dB}`echo getpwnam | tr "$trfrom" "$trto"`_DECLARATION_OK\${ac_dC}1\${ac_dD}
\${ac_uA}`echo getpwnam | tr "$trfrom" "$trto"`_DECLARATION_OK\${ac_uB}`echo getpwnam | tr "$trfrom" "$trto"`_DECLARATION_OK\${ac_uC}1\${ac_uD}
\${ac_eA}`echo getpwnam | tr "$trfrom" "$trto"`_DECLARATION_OK\${ac_eB}`echo getpwnam | tr "$trfrom" "$trto"`_DECLARATION_OK\${ac_eC}1\${ac_eD}
"
}


fi
rm -f conftest*

trfrom='[a-z]' trto='[A-Z]'
echo checking for getpwuid declared as "struct passwd *"
cat > conftest.c <<EOF
#include "confdefs.h"
#include <sys/types.h>
#include <pwd.h>
#include <grp.h>
#ifdef HAVE_LIBC_H
#include <libc.h>
#endif
#ifdef HAVE_SYS_TIMES_H
#include <sys/times.h>
#endif
extern struct passwd * getpwuid ();
int main() { exit(0); }
int t() {  }
EOF
if eval $compile; then
  rm -rf conftest*
  
{
test -n "$ac_verbose" && \
echo "	defining `echo getpwuid | tr "$trfrom" "$trto"`_DECLARATION_OK"
echo "#define" `echo getpwuid | tr "$trfrom" "$trto"`_DECLARATION_OK "1" >> confdefs.h
DEFS="$DEFS -D`echo getpwuid | tr "$trfrom" "$trto"`_DECLARATION_OK=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}`echo getpwuid | tr "$trfrom" "$trto"`_DECLARATION_OK\${ac_dB}`echo getpwuid | tr "$trfrom" "$trto"`_DECLARATION_OK\${ac_dC}1\${ac_dD}
\${ac_uA}`echo getpwuid | tr "$trfrom" "$trto"`_DECLARATION_OK\${ac_uB}`echo getpwuid | tr "$trfrom" "$trto"`_DECLARATION_OK\${ac_uC}1\${ac_uD}
\${ac_eA}`echo getpwuid | tr "$trfrom" "$trto"`_DECLARATION_OK\${ac_eB}`echo getpwuid | tr "$trfrom" "$trto"`_DECLARATION_OK\${ac_eC}1\${ac_eD}
"
}


fi
rm -f conftest*

trfrom='[a-z]' trto='[A-Z]'
echo checking for getgrent declared as "struct group *"
cat > conftest.c <<EOF
#include "confdefs.h"
#include <sys/types.h>
#include <pwd.h>
#include <grp.h>
#ifdef HAVE_LIBC_H
#include <libc.h>
#endif
#ifdef HAVE_SYS_TIMES_H
#include <sys/times.h>
#endif
extern struct group * getgrent ();
int main() { exit(0); }
int t() {  }
EOF
if eval $compile; then
  rm -rf conftest*
  
{
test -n "$ac_verbose" && \
echo "	defining `echo getgrent | tr "$trfrom" "$trto"`_DECLARATION_OK"
echo "#define" `echo getgrent | tr "$trfrom" "$trto"`_DECLARATION_OK "1" >> confdefs.h
DEFS="$DEFS -D`echo getgrent | tr "$trfrom" "$trto"`_DECLARATION_OK=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}`echo getgrent | tr "$trfrom" "$trto"`_DECLARATION_OK\${ac_dB}`echo getgrent | tr "$trfrom" "$trto"`_DECLARATION_OK\${ac_dC}1\${ac_dD}
\${ac_uA}`echo getgrent | tr "$trfrom" "$trto"`_DECLARATION_OK\${ac_uB}`echo getgrent | tr "$trfrom" "$trto"`_DECLARATION_OK\${ac_uC}1\${ac_uD}
\${ac_eA}`echo getgrent | tr "$trfrom" "$trto"`_DECLARATION_OK\${ac_eB}`echo getgrent | tr "$trfrom" "$trto"`_DECLARATION_OK\${ac_eC}1\${ac_eD}
"
}


fi
rm -f conftest*

echo checking for BSD setpgrp
cat > conftest.c <<EOF
#include "confdefs.h"
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
int main() { exit(0); }
int t() { getpgrp (0); setpgrp (0, 0); }
EOF
if eval $compile; then
  rm -rf conftest*
  
{
test -n "$ac_verbose" && \
echo "	defining HAVE_BSD_PGRP"
echo "#define" HAVE_BSD_PGRP "1" >> confdefs.h
DEFS="$DEFS -DHAVE_BSD_PGRP=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_BSD_PGRP\${ac_dB}HAVE_BSD_PGRP\${ac_dC}1\${ac_dD}
\${ac_uA}HAVE_BSD_PGRP\${ac_uB}HAVE_BSD_PGRP\${ac_uC}1\${ac_uD}
\${ac_eA}HAVE_BSD_PGRP\${ac_eB}HAVE_BSD_PGRP\${ac_eC}1\${ac_eD}
"
}


fi
rm -f conftest*

echo checking for union wait
cat > conftest.c <<EOF
#include "confdefs.h"
#include <sys/wait.h>
#ifndef WIFEXITED
#define WIFEXITED(u) ((u).w_termsig == 0)
#endif
int main() { exit(0); }
int t() { union wait u; if (WIFEXITED (u)) wait (&u); }
EOF
if eval $compile; then
  rm -rf conftest*
  
{
test -n "$ac_verbose" && \
echo "	defining HAVE_UNION_WAIT"
echo "#define" HAVE_UNION_WAIT "1" >> confdefs.h
DEFS="$DEFS -DHAVE_UNION_WAIT=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_UNION_WAIT\${ac_dB}HAVE_UNION_WAIT\${ac_dC}1\${ac_dD}
\${ac_uA}HAVE_UNION_WAIT\${ac_uB}HAVE_UNION_WAIT\${ac_uC}1\${ac_uD}
\${ac_eA}HAVE_UNION_WAIT\${ac_eB}HAVE_UNION_WAIT\${ac_eC}1\${ac_eD}
"
}


fi
rm -f conftest*

if test -n "$cross_compiling"; then
 
{
test -n "$ac_verbose" && \
echo "	defining" HAVE_LONG_FILE_NAMES to be "0"
echo "#define" HAVE_LONG_FILE_NAMES "0" >> confdefs.h
DEFS="$DEFS -DHAVE_LONG_FILE_NAMES=0"
ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_LONG_FILE_NAMES\${ac_dB}HAVE_LONG_FILE_NAMES\${ac_dC}0\${ac_dD}
\${ac_uA}HAVE_LONG_FILE_NAMES\${ac_uB}HAVE_LONG_FILE_NAMES\${ac_uC}0\${ac_uD}
\${ac_eA}HAVE_LONG_FILE_NAMES\${ac_eB}HAVE_LONG_FILE_NAMES\${ac_eC}0\${ac_eD}
"
}

 
{
test -n "$ac_verbose" && \
echo "	defining" HAVE_RESTARTABLE_SYSCALLS to be "-1"
echo "#define" HAVE_RESTARTABLE_SYSCALLS "-1" >> confdefs.h
DEFS="$DEFS -DHAVE_RESTARTABLE_SYSCALLS=-1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_RESTARTABLE_SYSCALLS\${ac_dB}HAVE_RESTARTABLE_SYSCALLS\${ac_dC}-1\${ac_dD}
\${ac_uA}HAVE_RESTARTABLE_SYSCALLS\${ac_uB}HAVE_RESTARTABLE_SYSCALLS\${ac_uC}-1\${ac_uD}
\${ac_eA}HAVE_RESTARTABLE_SYSCALLS\${ac_eB}HAVE_RESTARTABLE_SYSCALLS\${ac_eC}-1\${ac_eD}
"
}

else
 echo checking for restartable system calls
cat > conftest.c <<EOF
#include "confdefs.h"
/* Exit 0 (true) if wait returns something other than -1,
   i.e. the pid of the child, which means that wait was restarted
   after getting the signal.  */
#include <sys/types.h>
#include <signal.h>
ucatch (isig) { }
main () {
  int i = fork (), status;
  if (i == 0) { sleep (3); kill (getppid (), SIGINT); sleep (3); exit (0); }
  signal (SIGINT, ucatch);
  status = wait(&i);
  if (status == -1) wait(&i);
  exit (status == -1);
}

EOF
eval $compile
if test -s conftest && (./conftest; exit) 2>/dev/null; then
  
{
test -n "$ac_verbose" && \
echo "	defining HAVE_RESTARTABLE_SYSCALLS"
echo "#define" HAVE_RESTARTABLE_SYSCALLS "1" >> confdefs.h
DEFS="$DEFS -DHAVE_RESTARTABLE_SYSCALLS=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_RESTARTABLE_SYSCALLS\${ac_dB}HAVE_RESTARTABLE_SYSCALLS\${ac_dC}1\${ac_dD}
\${ac_uA}HAVE_RESTARTABLE_SYSCALLS\${ac_uB}HAVE_RESTARTABLE_SYSCALLS\${ac_uC}1\${ac_uD}
\${ac_eA}HAVE_RESTARTABLE_SYSCALLS\${ac_eB}HAVE_RESTARTABLE_SYSCALLS\${ac_eC}1\${ac_eD}
"
}


fi
rm -fr conftest*

 echo checking for long file names
ac_some_dir_failed=false
# Test for long file names in all the places we know might matter:
#      .		the current directory, where building will happen
#      /tmp		where it might want to write temporary files
#      /var/tmp		likewise
#      /usr/tmp		likewise
#      $prefix/lib	where we will be installing things
#      $exec_prefix/lib	likewise
# eval it to expand exec_prefix.
for ac_dir in `eval echo . /tmp /var/tmp /usr/tmp $prefix/lib $exec_prefix/lib` ; do
  test -d $ac_dir || continue
  test -w $ac_dir || continue # It's less confusing to not echo anything here.
  (echo 1 > $ac_dir/conftest9012345) 2>/dev/null
  (echo 2 > $ac_dir/conftest9012346) 2>/dev/null
  val=`cat $ac_dir/conftest9012345 2>/dev/null`
  test -f $ac_dir/conftest9012345 && test "$val" = 1 || ac_some_dir_failed=true
  rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2> /dev/null
done
$ac_some_dir_failed || 
{
test -n "$ac_verbose" && \
echo "	defining HAVE_LONG_FILE_NAMES"
echo "#define" HAVE_LONG_FILE_NAMES "1" >> confdefs.h
DEFS="$DEFS -DHAVE_LONG_FILE_NAMES=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_LONG_FILE_NAMES\${ac_dB}HAVE_LONG_FILE_NAMES\${ac_dC}1\${ac_dD}
\${ac_uA}HAVE_LONG_FILE_NAMES\${ac_uB}HAVE_LONG_FILE_NAMES\${ac_uC}1\${ac_uD}
\${ac_eA}HAVE_LONG_FILE_NAMES\${ac_eB}HAVE_LONG_FILE_NAMES\${ac_eC}1\${ac_eD}
"
}


fi
# Set default prefixes.
if test "z$prefix" != 'z' ; then
  test "z$exec_prefix" = 'z' && exec_prefix='${prefix}'
  ac_prsub="s%^prefix\\([ 	]*\\)=\\([ 	]*\\).*$%prefix\\1=\\2$prefix%"
fi
if test -n "$exec_prefix"; then
  ac_prsub="$ac_prsub
s%^exec_prefix\\([ 	]*\\)=\\([ 	]*\\).*$%exec_prefix\\1=\\2$exec_prefix%"
fi
# Any assignment to VPATH causes Sun make to only execute
# the first set of double-colon rules, so remove it if not needed.
if test "x$srcdir" = x.; then
  ac_vpsub='/^[ 	]*VPATH[ 	]*=[ 	]*/d'
fi

# Quote sed substitution magic chars in DEFS.
cat >conftest.def <<EOF
$DEFS
EOF
ac_escape_ampersand_and_backslash='s%[&\\]%\\&%g'
DEFS=`sed "$ac_escape_ampersand_and_backslash" <conftest.def`
rm -f conftest.def
# Substitute for predefined variables.

trap 'rm -f config.status; exit 1' 1 2 15
echo creating config.status
rm -f config.status
cat > config.status <<EOF
#!/bin/sh
# Generated automatically by configure.
# Run this file to recreate the current configuration.
# This directory was configured as follows,
# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
#
# $0 $ac_configure_args

for ac_arg
do
  case "\$ac_arg" in
    -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
    echo running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args
    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args ;;
    *) echo "Usage: config.status --recheck" 2>&1; exit 1 ;;
  esac
done

trap 'rm -fr Makefile uuconf/Makefile lib/Makefile unix/Makefile config.h conftest*; exit 1' 1 2 15
CC='$CC'
CPP='$CPP'
INSTALL='$INSTALL'
INSTALL_PROGRAM='$INSTALL_PROGRAM'
INSTALL_DATA='$INSTALL_DATA'
AR='$AR'
RANLIB='$RANLIB'
CFLAGS='$CFLAGS'
LDFLAGS='$LDFLAGS'
POUNDBANG='$POUNDBANG'
LN_S='$LN_S'
UUDIR='$UUDIR'
LIBOBJS='$LIBOBJS'
UNIXOBJS='$UNIXOBJS'
LIBS='$LIBS'
srcdir='$srcdir'
prefix='$prefix'
exec_prefix='$exec_prefix'
ac_prsub='$ac_prsub'
ac_vpsub='$ac_vpsub'
extrasub='$extrasub'
EOF
cat >> config.status <<\EOF

ac_top_srcdir=$srcdir

CONFIG_FILES=${CONFIG_FILES-"Makefile uuconf/Makefile lib/Makefile unix/Makefile"}
for ac_file in .. ${CONFIG_FILES}; do if test "x$ac_file" != x..; then
  # 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"; then
    # The file is in a subdirectory.
    test ! -d "$ac_dir" && mkdir "$ac_dir"
    ac_dir_suffix="/$ac_dir"
  else
    ac_dir_suffix=
  fi

  case "$ac_top_srcdir" in
  .)  srcdir=. ;;
  /*) srcdir="$ac_top_srcdir$ac_dir_suffix" ;;
  *)
    # Relative path.  Prepend a "../" for each directory in $ac_dir_suffix.
    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
    srcdir="$ac_dots$ac_top_srcdir$ac_dir_suffix" ;;
  esac

  echo creating "$ac_file"
  rm -f "$ac_file"
  comment_str="Generated automatically from `echo $ac_file|sed 's|.*/||'`.in by configure."
  case "$ac_file" in
    *.c | *.h | *.C | *.cc | *.m )  echo "/* $comment_str */" > "$ac_file" ;;
    * )          echo "# $comment_str"     > "$ac_file" ;;
  esac
  sed -e "
$ac_prsub
$ac_vpsub
$extrasub
s%@CC@%$CC%g
s%@CPP@%$CPP%g
s%@INSTALL@%$INSTALL%g
s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
s%@INSTALL_DATA@%$INSTALL_DATA%g
s%@AR@%$AR%g
s%@RANLIB@%$RANLIB%g
s%@CFLAGS@%$CFLAGS%g
s%@LDFLAGS@%$LDFLAGS%g
s%@POUNDBANG@%$POUNDBANG%g
s%@LN_S@%$LN_S%g
s%@UUDIR@%$UUDIR%g
s%@LIBOBJS@%$LIBOBJS%g
s%@UNIXOBJS@%$UNIXOBJS%g
s%@LIBS@%$LIBS%g
s%@srcdir@%$srcdir%g
s%@DEFS@%-DHAVE_CONFIG_H%" $ac_top_srcdir/${ac_file}.in >> $ac_file
fi; done

# These sed commands are put into ac_sed_defs when defining a macro.
# They are broken into pieces to make the sed script easier to manage.
# They 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.
# Each defining turns into a single global substitution command.
# Hopefully no one uses "!" as a variable value.
# Other candidates for the sed separators, like , and @, do get used.
#
# ac_d sets the value in "#define NAME VALUE" lines.
ac_dA='s!^\([ 	]*\)#\([ 	]*define[ 	][ 	]*\)'
ac_dB='\([ 	][ 	]*\)[^ 	]*!\1#\2'
ac_dC='\3'
ac_dD='!g'
# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
ac_uA='s!^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
ac_uB='\([ 	]\)!\1#\2define\3'
ac_uC=' '
ac_uD='\4!g'
# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
ac_eA='s!^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
ac_eB='$!\1#\2define\3'
ac_eC=' '
ac_eD='!g'
rm -f conftest.sed
EOF
# Turn off quoting long enough to insert the sed commands.
rm -f conftest.sh
cat > conftest.sh <<EOF
$ac_sed_defs
EOF

# Break up $ac_sed_defs (now in conftest.sh) because some shells have a limit
# on the size of here documents.

# Maximum number of lines to put in a single here document.
ac_max_sh_lines=9

while :
do
  # wc gives bogus results for an empty file on some systems.
  ac_lines=`grep -c . conftest.sh`
  if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
  rm -f conftest.s1 conftest.s2
  sed ${ac_max_sh_lines}q conftest.sh > conftest.s1 # Like head -20.
  sed 1,${ac_max_sh_lines}d conftest.sh > conftest.s2 # Like tail +21.
  # Write a limited-size here document to append to conftest.sed.
  echo 'cat >> conftest.sed <<CONFEOF' >> config.status
  cat conftest.s1 >> config.status
  echo 'CONFEOF' >> config.status
  rm -f conftest.s1 conftest.sh
  mv conftest.s2 conftest.sh
done
rm -f conftest.sh

# Now back to your regularly scheduled config.status.
cat >> config.status <<\EOF
# This sed command replaces #undef's 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 in
# config.h.
cat >> conftest.sed <<\CONFEOF
s,^[ 	]*#[ 	]*undef[ 	][ 	]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
CONFEOF
rm -f conftest.h
# Break up the sed commands because old seds have small limits.
ac_max_sed_lines=20

CONFIG_HEADERS=${CONFIG_HEADERS-"config.h"}
for ac_file in .. ${CONFIG_HEADERS}; do if test "x$ac_file" != x..; then
  echo creating $ac_file

  cp $ac_top_srcdir/$ac_file.in conftest.h1
  while :
  do
    ac_lines=`grep -c . conftest.sed`
    if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
    rm -f conftest.s1 conftest.s2 conftest.h2
    sed ${ac_max_sed_lines}q conftest.sed > conftest.s1 # Like head -20.
    sed 1,${ac_max_sed_lines}d conftest.sed > conftest.s2 # Like tail +21.
    sed -f conftest.s1 < conftest.h1 > conftest.h2
    rm -f conftest.s1 conftest.h1 conftest.sed
    mv conftest.h2 conftest.h1
    mv conftest.s2 conftest.sed
  done
  rm -f conftest.sed conftest.h
  echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
  cat conftest.h1 >> conftest.h
  rm -f conftest.h1
  if cmp -s $ac_file conftest.h 2>/dev/null; then
    # The file exists and we would not be changing it.
    echo "$ac_file is unchanged"
    rm -f conftest.h
  else
    rm -f $ac_file
    mv conftest.h $ac_file
  fi
fi; done



exit 0
EOF
chmod +x config.status
${CONFIG_SHELL-/bin/sh} config.status

