#!/bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated automatically using autoconf version 1.7.1 
# Copyright (C) 1991, 1992, 1993 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.

trap 'rm -fr conftest* confdefs* core ; exit 1' 1 3 15

#set -x
verbose=1

# 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

if test -z "$CC"; then
  # Extract the first word of `gcc', so it can be a program name with args.
  set dummy gcc; word=$2
  echo checking for $word
  IFS="${IFS= 	}"; saveifs="$IFS"; IFS="${IFS}:"
  for dir in $PATH; do
    test -z "$dir" && dir=.
    if test -f $dir/$word; then
      CC="gcc"
      break
    fi
  done
  IFS="$saveifs"
fi
test -z "$CC" && CC="cc"
test -n "$CC" && test -n "$verbose" && echo "	setting CC to $CC"

echo > confdefs.h

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
err=`eval "($CPP conftest.c >/dev/null) 2>&1"`
if test -z "$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
err=`eval "($CPP conftest.c >/dev/null) 2>&1"`
if test -z "$err"; then
  :
else
  rm -rf conftest*
  CPP=/lib/cpp
fi
rm -f conftest*
fi
rm -f conftest*
fi
test ".${verbose}" != "." && echo "	setting CPP to $CPP"

for hdr in arpa/inet.h ctype.h curses.h stdarg.h dirent.h fcntl.h fnmatch.h \
	getopt.h sys/types.h grp.h sys/ioctl.h stddef.h math.h netdb.h \
	netinet/in.h pwd.h setjmp.h signal.h string.h stdio.h stdlib.h \
	sys/resource.h sys/socket.h sys/stat.h sys/time.h \
	sys/timeb.h sys/uio.h sys/utsname.h sys/wait.h termios.h time.h \
	unistd.h sys/param.h utime.h termcap.h rpc/rpcent.h sys/mman.h
do
trhdr=HAVE_`echo $hdr | tr '[a-z]./' '[A-Z]__'`
echo checking for ${hdr}
cat > conftest.c <<EOF
#include "confdefs.h"
#include <${hdr}>
EOF
err=`eval "($CPP conftest.c >/dev/null) 2>&1"`
if test -z "$err"; then
  rm -rf conftest*
  
{
test -n "$verbose" && \
echo "	defining ${trhdr}"
echo "#define ${trhdr} 1" >> confdefs.h
DEFS="$DEFS -D${trhdr}=1"
}


fi
rm -f conftest*
done

cat > conftest.c <<EOF
#include "confdefs.h"
#ifdef HAVE_ARPA_INET_H
#include <arpa/inet.h>
#endif
#ifdef HAVE_CTYPE_H
#include <ctype.h>
#endif
#ifdef HAVE_CURSES_H
#ifdef HAVE_TERMIOS_H
#include <termios.h>
#endif
#include <curses.h>
#endif
#ifdef HAVE_STDARG_H
#include <stdarg.h>
#endif
#ifdef HAVE_DIRENT_H
#include <dirent.h>
#endif
#ifdef HAVE_FCNTL_H
#include <fcntl.h>
#endif
#ifdef HAVE_FNMATCH_H
#include <fnmatch.h>
#endif
#ifdef HAVE_GETOPT_H
#include <getopt.h>
#endif
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_GRP_H
#include <grp.h>
#endif
#ifdef HAVE_SYS_IOCTL_H
#include <sys/ioctl.h>
#endif
#ifdef HAVE_STDDEF_H
#include <stddef.h>
#endif
#ifdef HAVE_MATH_H
#include <math.h>
#endif
#ifdef HAVE_NETDB_H
#include <netdb.h>
#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
#ifdef HAVE_PWD_H
#include <pwd.h>
#endif
#ifdef HAVE_SETJMP_H
#include <setjmp.h>
#endif
#ifdef HAVE_SIGNAL_H
#include <signal.h>
#endif
#ifdef HAVE_STRING_H
#include <string.h>
#endif
#ifdef HAVE_STDIO_H
#include <stdio.h>
#endif
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
#ifdef HAVE_SYS_RESOURCE_H
#include <sys/resource.h>
#endif
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
#ifdef HAVE_SYS_STAT_H
#include <sys/stat.h>
#endif
#ifdef HAVE_SYS_TIMEB_H
#include <sys/timeb.h>
#endif
#ifdef HAVE_SYS_UIO_H
#include <sys/uio.h>
#endif
#ifdef HAVE_SYS_UTSNAME_H
#include <sys/utsname.h>
#endif
#ifdef HAVE_SYS_WAIT_H
#include <sys/wait.h>
#endif
#ifdef HAVE_TERMIOS_H
#include <termios.h>
#endif
#ifdef HAVE_TIME_H
#include <time.h>
#endif
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
#ifdef HAVE_UTIME_H
#include <utime.h>
#endif
#ifdef HAVE_TERMCAP_H
#ifdef HAVE_TERMIOS_H
#include <termios.h>
#endif
#include <termcap.h>
#endif
#ifdef HAVE_RPC_RPCENT_H
#include <rpc/rpcent.h>
#endif
#ifdef HAVE_SYS_MMAN_H
#include <sys/mman.h>
#endif
EOF

#echo $CC
set -x

err=`eval "(${CC-cc} -S -o /dev/null -aux-info header.aux conftest.c) 2>&1"`
if test -z "$err"; then
  exit 1
fi
# echo $DEFS
