view configure @ 4:d329bb5c36d0

Changes making it compile the new upstream release
author Peter Gervai <grin@grin.hu>
date Tue, 10 Mar 2009 14:57:12 +0100
parents c7f6b056b673
children
line wrap: on
line source

#! /bin/sh

# Guess values for system-dependent variables and create Makefiles.

# --S-LICENSE--

# Defaults:
ac_help=
ac_default_prefix=/usr/local
# Any additions from configure.in:
ac_default_prefix=/var/dcc
if test -n "  --with-updatedcc_pfile=FILE of updatedcc parameters"; then
    ac_help="$ac_help  --with-updatedcc_pfile=FILE of updatedcc parameters
"
fi
if test -n "  --with-installroot=DIR    prefix DIR to installation directory paths"; then
    ac_help="$ac_help  --with-installroot=DIR    prefix DIR to installation directory paths
"
fi
if test -n "  --with-configsuffix=STR   append STR to installed configuration file names"; then
    ac_help="$ac_help  --with-configsuffix=STR   append STR to installed configuration file names
"
fi
if test "  --enable-64-bits	    compile for 64-bits on Solaris and Linux PowerPC"; then
    ac_help="$ac_help  --enable-64-bits	    compile for 64-bits on Solaris and Linux PowerPC
"
fi
if test -n ""; then
    ac_help="$ac_help
"
fi
if test -n "  --with-DCC-MD5	    use MD5 code in the DCC source"; then
    ac_help="$ac_help  --with-DCC-MD5	    use MD5 code in the DCC source
"
fi
if test -n "  --with-uid=UID	    set-UID user name for cdcc, dccproc, & dccsight"; then
    ac_help="$ac_help  --with-uid=UID	    set-UID user name for cdcc, dccproc, & dccsight
"
fi
if test "  --disable-sys-inst	    install in private directories and no set-UID"; then
    ac_help="$ac_help  --disable-sys-inst	    install in private directories and no set-UID
"
fi
if test "  --disable-server	    do not build DCC server, dccd"; then
    ac_help="$ac_help  --disable-server	    do not build DCC server, dccd
"
fi
if test "  --disable-dccifd	    do not build DCC program interface, dccifd"; then
    ac_help="$ac_help  --disable-dccifd	    do not build DCC program interface, dccifd
"
fi
if test "  --disable-dccm	    do not build DCC sendmail interface, dccm"; then
    ac_help="$ac_help  --disable-dccm	    do not build DCC sendmail interface, dccm
"
fi
if test -n "  --with-sendmail=DIR	    build dccm with sendmail milter interface in dir"; then
    ac_help="$ac_help  --with-sendmail=DIR	    build dccm with sendmail milter interface in dir
"
fi
if test -n "  --with-cgibin=DIR	    for whitelist CGI scripts [HOMEDIR/cgibin]"; then
    ac_help="$ac_help  --with-cgibin=DIR	    for whitelist CGI scripts [HOMEDIR/cgibin]
"
fi
if test -n "  --with-rundir=DIR	    for PID files and milter socket [/var/run/dcc]"; then
    ac_help="$ac_help  --with-rundir=DIR	    for PID files and milter socket [/var/run/dcc]
"
fi
if test -n "  --with-db-memory=MB	    minimum server database buffer size 32-49152 MBytes"; then
    ac_help="$ac_help  --with-db-memory=MB	    minimum server database buffer size 32-49152 MBytes
"
fi
if test -n "  --with-max-db-mem=MB	    maximum server database buffer size 32-49152 MBytes"; then
    ac_help="$ac_help  --with-max-db-mem=MB	    maximum server database buffer size 32-49152 MBytes
"
fi
if test -n "  --with-max-log-size=KB    maximum log file size; 0=no limit [32]"; then
    ac_help="$ac_help  --with-max-log-size=KB    maximum log file size; 0=no limit [32]
"
fi
if test -n ""; then
    ac_help="$ac_help
"
fi
if test "  --disable-IPv6	    no IPv6 support"; then
    ac_help="$ac_help  --disable-IPv6	    no IPv6 support
"
fi
if test -n "  --with-kludge=FILE	    include header FILE"; then
    ac_help="$ac_help  --with-kludge=FILE	    include header FILE
"
fi
if test -n "  --with-socks[=lib]	    build DCC clients with SOCKS support"; then
    ac_help="$ac_help  --with-socks[=lib]	    build DCC clients with SOCKS support
"
fi

# Initialize some variables set by options.
# The variables have the same names as the options, with
# dashes changed to underlines.
build=NONE
cache_file=./config.cache
exec_prefix=NONE
host=NONE
no_create=
nonopt=NONE
no_recursion=
prefix=NONE
program_prefix=NONE
program_suffix=NONE
program_transform_name=s,x,x,
silent=
site=
sitefile=
srcdir=
target=NONE
x_includes=NONE
x_libraries=NONE
bindir='${exec_prefix}/bin'
libexecdir='${exec_prefix}/libexec'
mandir='${prefix}/man'

# Initialize some other variables.
subdirs=
MFLAGS= MAKEFLAGS=
SHELL=${CONFIG_SHELL-/bin/sh}
# Maximum number of lines to put in a shell here document.
ac_max_here_lines=12

ac_prev=
for ac_option
do

  # If the previous option needs an argument, assign it.
  if test -n "$ac_prev"; then
    eval "$ac_prev=\$ac_option"
    ac_prev=
    continue
  fi

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

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

  case "$ac_option" in

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

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

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

  -enable-* | --enable-*)
    ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
    # Reject names that are not valid shell variable names.
    if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
      { echo "error: $ac_feature: invalid feature name" 1>&2; exit 1; }
    fi
    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
    case "$ac_option" in
      *=*) ;;
      *) ac_optarg=yes ;;
    esac
    eval "enable_${ac_feature}='$ac_optarg'" ;;

  -help | --help | --hel | --he)
    # Omit some internal or obsolete options to make the list less imposing.
    # This message is too long to be a string in the A/UX 3.1 sh.
    cat << EOF
Usage: configure [options]
Options: [defaults in brackets after descriptions]
Configuration:
  --help		    print this message
  --no-create		    do not create output files
  --quiet		    do not print "checking..." messages
  --homedir=HOMEDIR	    DCC home directory [/var/dcc]
  --bindir=DIR		    user executables [/usr/local/bin]
  --libexecdir=DIR	    program executables [HOMEDIR/libexec]
  --mandir=DIR		    documentation [/usr/local/man]
EOF
    if test -n "$ac_help"; then
      echo "$ac_help"
    fi
    exit 0 ;;

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

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

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

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

  --homedir | -homedir | --home | -home)
    ac_prev=homedir ;;
  --homedir=* | -homedir=* | --home=* | -home=*)
    # make homedir absolute to prevent problems with updatedcc
    cwd=`pwd`
    prefix=`echo "$ac_optarg" | sed -e "s@^[^/]@$cwd/&@"`
    if expr "$prefix" : '/.*' >/dev/null; then :
    else
	{ echo "error: --could not make --homedir=$ac_optarg absolute" 1>&2; exit 1; }    fi
    ;;
    

  -prefix | --prefix | -prefix=* | --prefix=*)
    { echo "error: --prefix is not what you think it is.
    Use --homedir, --bindir, --libexecdir, --mandir, --with-installroot,
    and perhaps --disable-sys-inst" 1>&2; exit 1; }    ;;

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

  -with-* | --with-*)
    ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
    # Reject names that are not valid shell variable names.
    if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
      { echo "error: $ac_package: invalid package name" 1>&2; exit 1; }
    fi
    ac_package=`echo $ac_package| sed 's/-/_/g'`
    case "$ac_option" in
      *=*) ;;
      *) ac_optarg=yes ;;
    esac
    eval "with_${ac_package}='$ac_optarg'" ;;

  -without-* | --without-*)
    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
    # Reject names that are not valid shell variable names.
    if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
      { echo "error: $ac_package: invalid package name" 1>&2; exit 1; }
    fi
    ac_package=`echo $ac_package| sed 's/-/_/g'`
    eval "with_${ac_package}=no" ;;

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

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

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

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

  *)
    if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
      echo "warning: $ac_option: invalid host type" 1>&2
    fi
    if test "x$nonopt" != xNONE; then
      { echo "error: can only configure for one host and one target at a time" 1>&2; exit 1; }
    fi
    nonopt="$ac_option"
    ;;

  esac
done

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

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

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

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

# Strip out --no-create and --no-recursion so they do not pile up.
# Also quote any args containing shell metacharacters.
ac_configure_args=
for ac_arg
do
  case "$ac_arg" in
  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  | --no-cr | --no-c) ;;
  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
  *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
  ac_configure_args="$ac_configure_args '$ac_arg'" ;;
  *) ac_configure_args="$ac_configure_args $ac_arg" ;;
  esac
done

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

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

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

# Find the source files, if location was not specified.
if test -z "$srcdir"; then
  ac_srcdir_defaulted=yes
  # Try the directory containing this script, then its parent.
  ac_prog=$0
  ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
  srcdir=$ac_confdir
  if test ! -r $srcdir/$ac_unique_file; then
    srcdir=..
  fi
else
  ac_srcdir_defaulted=no
fi
if test ! -r $srcdir/$ac_unique_file; then
  if test "$ac_srcdir_defaulted" = yes; then
    { echo "error: cannot find sources in $ac_confdir or .." 1>&2; exit 1; }
  else
    { echo "error: cannot find sources in $srcdir" 1>&2; exit 1; }
  fi
fi
srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`

# Prefer explicitly selected file to automatically selected ones.
if test -z "$sitefile"; then
  if test -z "$CONFIG_SITE"; then
    if test "x$prefix" != xNONE; then
      CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
    else
      CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
    fi
  fi
else
  CONFIG_SITE="$sitefile"
fi
for ac_site_file in $CONFIG_SITE; do
  if test -r "$ac_site_file"; then
    echo "loading site script $ac_site_file"
    . "$ac_site_file"
  fi
done

# pay no attention to old autoconf cache files in case the target system
# has been upgraded
if test -f "$cache_file"; then
    old_cache_file=`find "$cache_file" -mtime +1 -type f -size +1c -print`
    if test "$cache_file" = "$old_cache_file"; then
	echo "ignore old cache $cache_file"
	rm $cache_file
    else
	if grep '^ac_cv_DCC_VERSION.*1.3.103' $cache_file 2>&1 1>/dev/null; then : ;
	else
	    echo "ignore stray $cache_file"
	    rm -f $cache_file
	fi
    fi
fi
ac_cv_DCC_VERSION=1.3.103
if test -r "$cache_file"; then
    if test "$silent" != yes; then
	echo "loading cache $cache_file"
    fi
  . $cache_file
else
    if test "$silent" != yes; then
	echo "creating cache $cache_file"
    fi
  > $cache_file
fi

ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross

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



ac_aux_dir=
for ac_dir in autoconf $srcdir/autoconf; do
  if test -f $ac_dir/install-sh; then
    ac_aux_dir=$ac_dir
    ac_install_sh="$ac_aux_dir/install-sh -c"
    break
  elif test -f $ac_dir/install.sh; then
    ac_aux_dir=$ac_dir
    ac_install_sh="$ac_aux_dir/install.sh -c"
    break
  fi
done
if test -z "$ac_aux_dir"; then
  { echo "error: cannot find install-sh or install.sh in autoconf $srcdir/autoconf" 1>&2; exit 1; }
fi
ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.


RCS_REVISION="`echo 'Rhyolite Software DCC 1.3.103-1.204' | sed -e 's/-.*//'`"
echo "$ac_t"""$RCS_REVISION"" 1>&6


TARGET_SYS="`uname`"


# How were we started?
#   Mangle $ac_configure_args to prevent duplicates from updatedcc -cwhatever
DCC_PARMS='
PARM_CACHE		PARM_HOMEDIR		PARM_BINDIR
PARM_LIBEXECDIR		PARM_MANDIR		PARM_MD5
PARM_SYS_INST		PARM_UID		PARM_SERVER
PARM_DCCIFD		PARM_DCCM		PARM_SENDMAIL
PARM_CGIBIN		PARM_RUNDIR		PARM_DB_MEMORY
PARM_MAX_DB_MEM		PARM_MAX_LOG		PARM_RL_MIN_MAX
PARM_IPV6		PARM_64BITS		PARM_KLUDGE
PARM_SOCKS		PARM_WITH_C_WARNINGS	PARM_UPDATEDCC_PFILE
PARM_FETCH_CMD'
for var in $DCC_PARMS; do
    eval $var=
done
var=
for c in $ac_configure_args; do
    if test -z "$var"; then
	var="$c"
	case $var in
	-[[a-z]]*) var="-$var";;
	esac
    else
	var="$var=$c"
    fi

    case $var in
    # allow blank instead of '='
    --homedir|--home|--bindir|--libexecdir|--mandir)
				continue;;

    # allow these but do not record them in updatedcc
    --with-installroot*)	continue;;
    --with-configsuffix*)	continue;;


    # remember these for updatedcc
    --cache-file=*)	PARM_CACHE=" $var";;
    --homedir=*|--home=*)
		PARM_HOMEDIR=" --homedir=`expr X$var : '.*=\(.*\)'`";;
    --quiet|--silent|--no-create)	;;
    --bindir=*)			PARM_BINDIR=" $var";;
    --libexecdir=*)		PARM_LIBEXECDIR=" $var";;
    --mandir=*)			PARM_MANDIR=" $var";;
    --with-DCC[-_]MD5)		PARM_MD5=" $var";;
    --without-DCC[-_]MD5)	PARM_MD5=;;
    --disable-sys[-_]inst)	PARM_SYS_INST=" $var";;
    --enable-sys[-_]inst)	PARM_SYS_INST=;;
    --with-uid=*)		PARM_UID=" $var";;
    --without-uid)		PARM_UID=;;
    --disable-server)		PARM_SERVER=" $var";;
    --enable-server)		PARM_SERVER=;;
    --disable-dccifd)		PARM_DCCIFD=" $var";;
    --enable-dccifd)		PARM_DCCIFD=;;
    --disable-dccm)		PARM_DCCM=" $var";;
    --enable-dccm)		PARM_DCCM=;;
    --with*-sendmail*)		PARM_SENDMAIL=" $var";;
    --with-cgibin=*)		PARM_CGIBIN=" $var";;
    --without-cgibin)		PARM_CGIBIN=;;
    --with-rundir=*)		PARM_RUNDIR=" $var";;
    --without-rundir)		PARM_RUNDIR=;;
    --enable-big[-_]db);;				# obsolete with 1.2.31
    --with-db[-_]memory=*)	PARM_DB_MEMORY=" $var";;
    --without-db[-_]memory)	PARM_DB_MEMORY=;;
    --with-max[-_]db[-_]mem=*)	PARM_MAX_DB_MEM=" $var";;
    --without-max[-_]db[-_]mem)	PARM_MAX_DB_MEM=;;
    --with-max[-_]log[-_]size=*) PARM_MAX_LOG=" $var";;
    --without-max[-_]log[-_]size) PARM_MAX_LOG=;;
    --with-rl[-_]min[-_]max=*)	PARM_RL_MIN_MAX=" $var";;
    --without-rl[-_]min[-_]max=*) PARM_RL_MIN_MAX=;;
    --with-bad[-_]locks);;				# obsolete with 1.3.81
    --without-bad[-_]locks);;				# obsolete with 1.3.81
    --*able-IPv6)		PARM_IPV6=" $var";;
    --*able-64[-_]bits)		PARM_64BITS=" $var";;
    --without-socks)		PARM_SOCKS=;;
    --with*-socks*)		PARM_SOCKS=" $var";;
    --with-kludge=*)		PARM_KLUDGE=" $var";;
    --without-kludge)		PARM_KLUDGE=;;
    --with-c[-_]warnings*)	PARM_WITH_C_WARNINGS=" $var";;
    --without-c[-_]warnings)	PARM_WITH_C_WARNINGS=;;
    --with-updatedcc[-_]pfile=*) PARM_UPDATEDCC_PFILE=" $var";;
    --without-updatedcc[-_]pfile) PARM_UPDATEDCC_PFILE=;;
    --with-fetch[-_]cmd=*)	PARM_FETCH_CMD=" $var";;
    --without-fetch[-_]cmd=*)	PARM_FETCH_CMD=;;
    *)			echo "unofficial configure parameter: $var";;
    esac
    var=
done
eval UPDATEDCC_PARMS=\"`echo $DCC_PARMS | sed -e 's/ *PARM_/$PARM_/g'`\"


# We cannot
#	- use `env -` because that clears $PATH.
#	- just set variables because CC= breaks the C compiler on Solaris.
#	- just unset variables, because unsetting a variable that is not
#	    set generates errors in some versions of sh or bash..
#	- export unset variables because that sets them to null on NetBSD.
UPDATEDCC_ENV='NOMAN DCC_OWN DCC_GRP DCC_MODE MANOWN MANGRP CFLAGS DCC_CFLAGS PTHREAD_CFLAGS LDFLAGS DCC_LDFLAGS PTHREAD_LDFLAGS LIBS PTHREAD_LIBS CC INSTALL DCCD_MAX_FLOODS DBGFLAGS DCC_UPDATEDCC_FAST'
# This assumes that a null value any dcc ./configure environment variable
#   is the same as not setting it.  That is made true by updatedcc even for
#   the BSD /usr/share/mk NOMAN switch.
if test -z "`set | grep '^NOMAN='`"; then
    unset NOMAN
else
    NOMAN=no
fi
UPDATEDCC_ENV_SET=
UPDATEDCC_ENV_EXPORT=
for var in $UPDATEDCC_ENV; do
    # escape characters that might confuse the shell
    val=`eval echo '$'$var | sed -e 's/\([^-_/:=+,.a-zA-Z0-9]\)/\\\\\1/g'`
    if test -n "$val"; then
	UPDATEDCC_ENV_SET="$UPDATEDCC_ENV_SET$var=$val "
	UPDATEDCC_ENV_EXPORT="$UPDATEDCC_ENV_EXPORT $var"
    fi
done
if test -n "$UPDATEDCC_ENV_EXPORT"; then
    UPDATEDCC_ENV_EXPORT="export$UPDATEDCC_ENV_EXPORT"
fi

# Check whether --with-updatedcc-pfile or --without-updatedcc-pfile was given.
if test "${with_updatedcc_pfile+set}" = set; then
  withval="$with_updatedcc_pfile"
  :
fi
if test -n "$with_updatedcc_pfile" -a "$with_updatedcc_pfile" != no	\
	-a "$with_updatedcc_pfile" != yes; then
    UPDATEDCC_PFILE="$with_updatedcc_pfile"
else
    UPDATEDCC_PFILE=""
fi


# Check whether --with-installroot or --without-installroot was given.
if test "${with_installroot+set}" = set; then
  withval="$with_installroot"
  :
fi
if test -n "$with_installroot" -a "$with_installroot" != no; then
   installroot=$with_installroot
fi

# Check whether --with-configsuffix or --without-configsuffix was given.
if test "${with_configsuffix+set}" = set; then
  withval="$with_configsuffix"
  :
fi
if test -n "$with_configsuffix" -a "$with_configsuffix" != no; then
   configsuffix=$with_configsuffix
fi


# add to a shell variable without duplication
appendvar () {
    nm=$1
    eval cur="\$$nm"
    shift

    # echo -n "appending '$*' to $nm='$cur' ... "
    for v in "$*"; do
	pat=`echo "$v" | sed -e 's/[./\]/&/g'`
	if expr " $cur " : ".* $pat " >/dev/null; then 
	    continue
	else
	    cur="$cur $v"
	fi
    done
    cur=`echo "$cur" | sed -e 's/^  *//' -e 's/  *$//'`
    eval "$nm='$cur'"
    # eval echo "$nm=\$$nm"
}


# add to the start of a shell variable without duplication
prependvar () {
    nm=$1
    eval cur="\$$nm"
    shift

    # echo -n "prepending '$*' to $nm='$cur' ... "
    for v in "$*"; do
	pat=`echo "$v" | sed -e 's/[./\]/&/g'`
	cur=`echo " $cur " | sed -e "s/  *$pat  */ /g" -e 's/^  *//'`
	cur="$v $cur"
    done
    cur=`echo "$cur" | sed -e 's/^  *//' -e 's/  *$//'`
    eval "$nm='$cur'"
    # eval echo "$nm=\$$nm"
}


saveflags () {
    OLD_CFLAGS="$CFLAGS"
    OLD_LDFLAGS="$LDFLAGS"
    OLD_LIBS="$LIBS"
}


restoreflags () {
    CFLAGS="$OLD_CFLAGS"
    LDFLAGS="$OLD_LDFLAGS"
    LIBS="$OLD_LIBS"
}

SUBDIR_DISABLED=


# Look for the C compiler only if it is not set explicitly because the
# autoconf system prefers gcc if gcc is present even if cc is also present
# and is not gcc.
DCC_CC="#CC="
if test "$TARGET_SYS" = SunOS -a -z "$CC"; then
    # detect the free, non-compilers shipped by Sun
    CC_INST="`${CC-cc} -v 2>&1 | head -1`"
    if expr X"$CC_INST" : '.*package not installed.*' >/dev/null; then
	echo "$ac_t""$CC_INST; setting CC=gcc" 1>&6
	CC=gcc
	DCC_CC="CC=gcc"
    fi
fi
# the cache conflicts with users alternating `CC=gcc ./configure`
#	with `./configure`, so remove the definition of CC from the cache
unset ac_cv_prog_CC
OLD_CC="$CC"
if test -z "$CC"; then
    # Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$CC"; then
  ac_cv_prog_CC="$CC" # Let the user override the test.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_prog_CC="cc"
      break
    fi
  done
  IFS="$ac_save_ifs"
  test -z "$ac_cv_prog_CC" && ac_cv_prog_CC=""""
fi
fi
CC="$ac_cv_prog_CC"
if test -n "$CC"; then
  echo "$ac_t""$CC" 1>&6
else
  echo "$ac_t""no" 1>&6
fi
fi
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$CC"; then
  ac_cv_prog_CC="$CC" # Let the user override the test.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_prog_CC="gcc"
      break
    fi
  done
  IFS="$ac_save_ifs"
fi
fi
CC="$ac_cv_prog_CC"
if test -n "$CC"; then
  echo "$ac_t""$CC" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

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

  if test -z "$CC"; then
    case "`uname -s`" in
    *win32* | *WIN32*)
      # Extract the first word of "cl", so it can be a program name with args.
set dummy cl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$CC"; then
  ac_cv_prog_CC="$CC" # Let the user override the test.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_prog_CC="cl"
      break
    fi
  done
  IFS="$ac_save_ifs"
fi
fi
CC="$ac_cv_prog_CC"
if test -n "$CC"; then
  echo "$ac_t""$CC" 1>&6
else
  echo "$ac_t""no" 1>&6
fi
 ;;
    esac
  fi
  test -z "$CC" && { echo "error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
fi

echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
echo "configure: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5

ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross

cat > conftest.$ac_ext << EOF

#include "confdefs.h"

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

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

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

echo "$ac_t""$ac_cv_prog_gcc" 1>&6

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

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

fi

echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
if test "$ac_test_CFLAGS" = set; then
  CFLAGS="$ac_save_CFLAGS"
elif test $ac_cv_prog_cc_g = yes; then
  if test "$GCC" = yes; then
    CFLAGS="-g -O2"
  else
    CFLAGS="-g"
  fi
else
  if test "$GCC" = yes; then
    CFLAGS="-O2"
  else
    CFLAGS=
  fi
fi
 if test "$OLD_CC" != "$CC" -a -n "$OLD_CC"; then
    echo "$ac_t""	*** Setting CC=$CC instead of $OLD_CC ***" 1>&6
    DCC_CC="CC=$CC"
fi
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
echo "configure: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
  CPP=
fi
if test -z "$CPP"; then
if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
    # This must be in double quotes, not single quotes, because CPP may get
  # substituted into the Makefile and "${CC-cc}" will confuse make.
  CPP="${CC-cc} -E"
  # On the NeXT, cc -E runs the code through the compiler's parser,
  # not just through cpp.
  cat > conftest.$ac_ext <<EOF
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  :
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  CPP="${CC-cc} -E -traditional-cpp"
  cat > conftest.$ac_ext <<EOF
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  :
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  CPP="${CC-cc} -nologo -E"
  cat > conftest.$ac_ext <<EOF
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  :
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  CPP=/lib/cpp
fi
rm -f conftest*
fi
rm -f conftest*
fi
rm -f conftest*
  ac_cv_prog_CPP="$CPP"
fi
  CPP="$ac_cv_prog_CPP"
else
  ac_cv_prog_CPP="$CPP"
fi
echo "$ac_t""$CPP" 1>&6


# how do we run the C compiler?

# Check whether --enable-64-bits or --disable-64-bits was given.
if test "${enable_64_bits+set}" = set; then
  enableval="$enable_64_bits"
  :
fi

HAVE_CC_M='#do not have cc -M'
appendvar LIBS -lm
RANLIB="ranlib"
HAVE_PTHREADS=
case "$TARGET_SYS" in
    BSD/OS)
	appendvar PTHREAD_LDFLAGS -pthread
	;;
    FreeBSD)
	if test 0`/sbin/sysctl -n kern.osreldate 2>/dev/null` -ge 602000; then
	    # use new POSIX threads starting with 6.2
	    # http://www.freebsd.org/doc/en/books/porters-handbook/freebsd-versions.html
	    appendvar PTHREAD_LIBS -lpthread
	else
	    appendvar PTHREAD_LDFLAGS -pthread
	    # use libc_r on ancient versions
	    if test -s /usr/lib/libc_r.a; then
		appendvar PTHREAD_LIBS -lc_r
	    fi
	fi
	;;
    DragonFly)
	appendvar PTHREAD_LDFLAGS -pthread
	if test -s /usr/lib/libc_r.a; then
	    # use libc_r on ancient versions
	    appendvar PTHREAD_LIBS -lc_r
	fi
	;;
    Darwin)
	RANLIB="ranlib -c"
	appendvar LIBS -lresolv
	;;
    SunOS)
	appendvar PTHREAD_LIBS -lpthread
	prependvar DCC_CFLAGS -D_REENTRANT -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
	prependvar CFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
	appendvar LIBS -lsocket -lnsl -lresolv
	# manual 64-bit versions on Solaris, because it seems to be impossible
	# to figure out whether a 32-bit version of the milter library is used
	if test "$enable_64_bits" != yes				\
		    -o "`isainfo -b 2>/dev/null`" != 64; then
	    ac_cv_have_64bits=no
	else
	    # see if we have a 64-bit system with a 64-bit compiler
	    echo $ac_n "checking compiling 64-bit void*""... $ac_c" 1>&6
echo "configure: checking compiling 64-bit void*" >&5
if eval "test \"`echo '$''{'ac_cv_have_64bits'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  		saveflags
		ac_cv_have_64bits=no
		for OPT in -m64 -xarch=generic64 -xarch=v9; do
		    CFLAGS="$OPT $OLD_CFLAGS"
		    if test "$cross_compiling" = yes; then
  continue
else
  cat > conftest.$ac_ext <<EOF
#include "confdefs.h"
main()
				{exit(sizeof(void*)==8 ? 0 : sizeof(void*));}
EOF
if { (eval echo configure: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  ac_cv_have_64bits="$OPT"; break
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  continue
fi
rm -fr conftest*
fi

		done
		restoreflags
fi

echo "$ac_t""$ac_cv_have_64bits" 1>&6
	    # if we have a 64-bit system with a 64-bit compiler, adjust
	    # the flags and libraries so that we will later find that
	    # sizeof(long) and sizeof(void*)=8
	    if test -n "$ac_cv_have_64bits" -a "$ac_cv_have_64bits" != no; then
		prependvar CFLAGS $ac_cv_have_64bits
		prependvar DCC_CFLAGS $ac_cv_have_64bits
		prependvar LIBS $ac_cv_have_64bits
	    fi
	fi
	;;
    HP-UX)
	prependvar DCC_CFLAGS-D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS
	appendvar PTHREAD_LIBS -lpthread
	;;
    AIX)
	cat >> confdefs.h <<\EOF
#define _ALL_SOURCE 1
EOF
	prependvar DCC_CFLAGS -D_THREAD_SAFE
	appendvar PTHREAD_LDFLAGS -pthread
	appendvar PTHREAD_LIBS -lpthreads
	appendvar LIBS -lbsd -lc_r
	;;
    IRIX*)
	appendvar PTHREAD_LIBS -lpthread
	prependvar DCC_CFLAGS -woff 1185
	prependvar CFLAGS -woff 1185
	prependvar DCC_LDFLAGS -LD_MSG:OFF=84
	RANLIB="@#ranlib"
	HAVE_CC_M='HAVE_CC_M=yes'
	;;
    Linux)
	appendvar LIBS -lresolv
	appendvar PTHREAD_LDFLAGS -pthread
	prependvar DCC_CFLAGS -D_FILE_OFFSET_BITS=64
	prependvar CFLAGS -D_FILE_OFFSET_BITS=64
	# generate 64-bit code for 64-bit PowerPC
	if test "$enable_64_bits" = yes					\
		-a -n "`uname -a | grep 'ppc64 GNU/Linux'`"; then
	    appendvar DCC_CFLAGS -m64
	    appendvar CFLAGS -m64
	    appendvar DCC_LDFLAGS -m64
	    appendvar LDFLAGS -m64
	fi
	;;
    OpenBSD)
	appendvar PTHREAD_LDFLAGS -pthread
	;;
    NetBSD)
	appendvar PTHREAD_LDFLAGS -lpthread
	appendvar PTHREAD_CFLAGS -I/usr/pkg/include
	appendvar CPPFLAGS -I/usr/pkg/include
	appendvar PTHREAD_LDFLAGS -L/usr/pkg/lib
	;;
    OSF1)
	# OSF1 is too messy for AC_CHECK_FUNC(pthread_mutex_lock...)
	HAVE_PTHREADS=yes
	appendvar PTHREAD_CFLAGS -pthread -D_REENTRANT
	appendvar PTHREAD_LDFLAGS -pthread
	appendvar PTHREAD_LIBS -lpthread -lexc
	HAVE_CC_M='HAVE_CC_M=yes'
	;;
    OpenUNIX)
	prependvar DCC_CFLAGS -Kthread
	appendvar PTHREAD_LIBS -Kthread
	appendvar LIBS -lsocket -lnsl
	RANLIB="@#ranlib"
	;;
    *)
	echo "warning: 	*** unrecognized system $TARGET_SYS ***" 1>&2
	# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$RANLIB"; then
  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_prog_RANLIB="ranlib"
      break
    fi
  done
  IFS="$ac_save_ifs"
  test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
fi
fi
RANLIB="$ac_cv_prog_RANLIB"
if test -n "$RANLIB"; then
  echo "$ac_t""$RANLIB" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

	if test "$RANLIB" = ':'; then
	    RANLIB="@#ranlib"
	fi
	appendvar PTHREAD_LDFLAGS -pthread
	;;
esac

# decide if we have POSIX threads
if test "$HAVE_PTHREADS" != yes; then
    saveflags
    CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
    LDFLAGS="$LDFLAGS $PTHREAD_LDFLAGS"
    LIBS="$LIBS $PTHREAD_LIBS"
    echo $ac_n "checking for pthread_mutex_lock""... $ac_c" 1>&6
echo "configure: checking for pthread_mutex_lock" >&5
if eval "test \"`echo '$''{'ac_cv_func_pthread_mutex_lock'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char pthread_mutex_lock(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char pthread_mutex_lock();

int main() {

/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_pthread_mutex_lock) || defined (__stub___pthread_mutex_lock)
choke me
#else
pthread_mutex_lock();
#endif

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

if eval "test \"`echo '$ac_cv_func_'pthread_mutex_lock`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  HAVE_PTHREADS=yes
else
  echo "$ac_t""no" 1>&6
fi
    restoreflags
fi
cat > conftest.$ac_ext <<EOF
#include "confdefs.h"
#include <sys/mman.h>
MS_ASYNC
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "^MS_ASYNC$" >/dev/null 2>&1; then
  rm -rf conftest*
  cat >> confdefs.h <<\EOF
#define HAVE_OLD_MSYNC 
EOF

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

fi

echo $ac_n "checking for gcc __attribute__""... $ac_c" 1>&6
echo "configure: checking for gcc __attribute__" >&5
if eval "test \"`echo '$''{'ac_cv_have_gcc_attributes'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#include "confdefs.h"

int main() {
extern void __attribute((noreturn)) ck(); ck();
; return 0; }
EOF
if { (eval echo configure: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_have_gcc_attributes=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_have_gcc_attributes=no
fi
rm -f conftest*
fi

echo "$ac_t""$ac_cv_have_gcc_attributes" 1>&6
if test "$ac_cv_have_gcc_attributes" = yes; then
    cat >> confdefs.h <<\EOF
#define HAVE_GCC_ATTRIBUTES 1
EOF
    cat >> confdefs.h <<\EOF
#define HAVE_GCC_INLINE 1
EOF
    # if we have gcc attributes, see if we have the real gcc instead of
    #	Sun Studio compilers that use -xM for gcc -M
    if test -n "`${CC-cc} -v 2>&1 | grep '^gcc version'`"; then
	HAVE_CC_M='HAVE_CC_M=yes'
    fi
fi


# Check whether --with-c-warnings or --without-c-warnings was given.
if test "${with_c_warnings+set}" = set; then
  withval="$with_c_warnings"
  :
fi
CWRN1="#CWARN"
CWRN2="#CWARN"
CWRN3="#CWARN"
if test "$with_c_warnings" = yes; then
    with_c_warnings=1
fi
if test -z "$with_c_warnings" -o "$with_c_warnings" = no; then
    with_c_warnings=0
fi
if test "$with_c_warnings" -ge 1; then
    CWRN1="CWARN"
fi
if test "$with_c_warnings" -ge 2; then
    CWRN2="CWARN"
fi
if test "$with_c_warnings" -ge 3; then
    CWRN3="CWARN"
fi

# does this system have 64 bit longs, pointers and off_t?
echo $ac_n "checking sizeof(long)""... $ac_c" 1>&6
echo "configure: checking sizeof(long)" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_sizeof_long=0
else
  cat > conftest.$ac_ext <<EOF
#include "confdefs.h"
#include <stdio.h>
#include <sys/stat.h>
#include <sys/types.h>
main()
{
  FILE *f=fopen("conftestval", "w");
  if (!f) exit(1);
  fprintf(f, "ac_cv_sizeof_long=%d\n", sizeof(long));
  fprintf(f, "ac_cv_sizeof_ptr=%d\n", sizeof((void *)0));
  fprintf(f, "ac_cv_sizeof_off_t=%d\n", sizeof(off_t));
  exit(0);
}
EOF
if { (eval echo configure: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  . ./conftestval
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  echo "test type size program failed"
fi
rm -fr conftest*
fi

fi

echo "$ac_t""$ac_cv_sizeof_long" 1>&6
if test 0$ac_cv_sizeof_long -eq 8; then
    cat >> confdefs.h <<\EOF
#define HAVE_64BIT_LONG 1
EOF
fi
if test 0$ac_cv_sizeof_ptr -eq 8; then
    cat >> confdefs.h <<\EOF
#define HAVE_64BIT_PTR 1
EOF
fi
if test 0$ac_cv_sizeof_off_t -eq 8; then
    cat >> confdefs.h <<\EOF
#define HAVE_BIG_FILES 1
EOF
fi


# set switches to generate the meat of a makefile
echo $ac_n "checking for gmake""... $ac_c" 1>&6
echo "configure: checking for gmake" >&5
if make -v nosuchtarget 2>&1 | grep '^GNU Make' >/dev/null; then
    echo "$ac_t""yes, make is gmake but called make" 1>&6
    MAKE_TYPE=gmake
    DCCMAKE=make
else
    if test -f /usr/share/mk/bsd.prog.mk; then
	echo "$ac_t""no, assume 4.4BSD make" 1>&6
	MAKE_TYPE=make
	DCCMAKE=make
    else
	echo "warning: 	*** You must install and use gmake on $TARGET_SYS ***" 1>&2
	MAKE_TYPE=gmake
	DCCMAKE=gmake
    fi
fi
DEPTH=.
if test "$MAKE_TYPE" = gmake; then
    MAKE_DOT=
    MAKE_INC='#include "$(DEPTH)/Makefile.inc"'
    MAKE_INC2='include $(DEPTH)/Makefile.inc2'
    MAKE_PROG='include $(DEPTH)/gmake.inc'
    MAKE_SUBDIR='include $(DEPTH)/gmake.inc'
    MAKE_LIB='include $(DEPTH)/gmake.inc\
include $(DEPTH)/Makefile.inc2'
else
    MAKE_DOT="."
    MAKE_INC='.include "$(DEPTH)/Makefile.inc"'
    MAKE_INC2='.include "$(DEPTH)/Makefile.inc2"'
    MAKE_PROG='.include <bsd.prog.mk>'
    if test "$TARGET_SYS" = 'NetBSD'; then
	MAKE_SUBDIR='.include <bsd.subdir.mk>'
    else
	MAKE_SUBDIR='.include <bsd.prog.mk>'
    fi
    MAKE_LIB='.include <bsd.lib.mk>\
.include "$(DEPTH)/Makefile.inc2"\
LDADD	=			# BSD/OS 4.2 gives $(LDADD) to ar'
fi


# On some systems `logger` does not have -s
case "$TARGET_SYS" in
    SunOS|AIX|OSF1)
	DCC_LOGGER="\$DCC_LIBEXEC/logger -p \${DCC_ERROR_LOG_FACILITY-mail.err} -t \${LOGGER_TAG-DCC}"
		;;
    BSD/OS|FreeBSD|DragonFly|Darwin|Linux|OpenBSD|NetBSD)
	DCC_LOGGER="logger -s -p \${DCC_ERROR_LOG_FACILITY-mail.err} -t \${LOGGER_TAG-DCC}"
		;;
    *)
	# Extract the first word of "logger", so it can be a program name with args.
set dummy logger; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_DCC_LOGGER'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$DCC_LOGGER"; then
  ac_cv_prog_DCC_LOGGER="$DCC_LOGGER" # Let the user override the test.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_prog_DCC_LOGGER="logger -s -p \${DCC_ERROR_LOG_FACILITY-mail.err} -t \${LOGGER_TAG-DCC}"
      break
    fi
  done
  IFS="$ac_save_ifs"
  test -z "$ac_cv_prog_DCC_LOGGER" && ac_cv_prog_DCC_LOGGER="echo 1>&2"
fi
fi
DCC_LOGGER="$ac_cv_prog_DCC_LOGGER"
if test -n "$DCC_LOGGER"; then
  echo "$ac_t""$DCC_LOGGER" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

    ;;
esac

# Deal xargs that run even if there is nothing to do.
#   GNU's version has -r but does the wrong thing with only -n
#   Solaris does not have -r but does nothing with xargs -n1000 </dev/null
# Get the absolute path of the command to prevent confusion on Solaris systems
#   with confused paths.
# Extract the first word of "xargs", so it can be a program name with args.
set dummy xargs; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_DCC_XARGS'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$DCC_XARGS" in
  /*)
  ac_cv_path_DCC_XARGS="$DCC_XARGS" # Let the user override the test with a path.
  ;;
  ?:/*)
  ac_cv_path_DCC_XARGS="$DCC_XARGS" # Let the user override the test with a dos path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_path_DCC_XARGS="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  test -z "$ac_cv_path_DCC_XARGS" && ac_cv_path_DCC_XARGS="xargs"
  ;;
esac
fi
DCC_XARGS="$ac_cv_path_DCC_XARGS"
if test -n "$DCC_XARGS"; then
  echo "$ac_t""$DCC_XARGS" 1>&6
else
  echo "$ac_t""no" 1>&6
fi
if test -n "`$DCC_XARGS echo bad </dev/null 2>&1`"; then
    if test -z "`$DCC_XARGS -r echo bad </dev/null 2>&1`"; then
	DCC_XARGS="$DCC_XARGS -r"
    else
	if test -z "`$DCC_XARGS -n1000 echo bad </dev/null 2>&1`"; then
	    DCC_XARGS="$DCC_XARGS -n1000"
	fi
    fi
fi

# How can we fetch a file specified by URL?
#   Fall back to ftp and just hope it understands URL.
if test -n "$with_fetch_cmd" -a "$with_fetch_cmd" != yes; then
   FETCH_CMD="$with_fetch_cmd"
else
    for ac_prog in wget fetch curl
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_FETCH_CMD'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$FETCH_CMD" in
  /*)
  ac_cv_path_FETCH_CMD="$FETCH_CMD" # Let the user override the test with a path.
  ;;
  ?:/*)
  ac_cv_path_FETCH_CMD="$FETCH_CMD" # Let the user override the test with a dos path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_path_FETCH_CMD="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  ;;
esac
fi
FETCH_CMD="$ac_cv_path_FETCH_CMD"
if test -n "$FETCH_CMD"; then
  echo "$ac_t""$FETCH_CMD" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

test -n "$FETCH_CMD" && break
done
test -n "$FETCH_CMD" || FETCH_CMD="ftp"

fi
FETCH_WGET_OPTS=
if expr "$FETCH_CMD" : '.*wget' >/dev/null 2>&1; then
    if test -n "`wget --help </dev/null 2>&1 | grep 'referer.*URL'`"; then
	FETCH_WGET_OPTS="$FETCH_WGET_OPTS --referer=\$HTTP_REFERER"
    fi
    #default 20 retries is far, far too many
    if test -n "`wget --help </dev/null 2>&1 | grep 'tries=NUMBER'`"; then
	FETCH_WGET_OPTS="$FETCH_WGET_OPTS --tries=1"
    fi
fi
if expr "$FETCH_CMD" : '.*curl' >/dev/null 2>&1; then
    if test -n "`curl --help </dev/null 2>&1 | grep 'referer.*URL'`"; then
	FETCH_CURL_OPTS="--referer \$HTTP_REFERER"
    fi
fi

# Extract the first word of "perl", so it can be a program name with args.
set dummy perl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$PERL" in
  /*)
  ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
  ;;
  ?:/*)
  ac_cv_path_PERL="$PERL" # Let the user override the test with a dos path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_path_PERL="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  test -z "$ac_cv_path_PERL" && ac_cv_path_PERL="/usr/local/bin/perl"
  ;;
esac
fi
PERL="$ac_cv_path_PERL"
if test -n "$PERL"; then
  echo "$ac_t""$PERL" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

# for cgi-bin/webuser-notify
# Extract the first word of "sendmail", so it can be a program name with args.
set dummy sendmail; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_NOTIFYMAILER'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$NOTIFYMAILER" in
  /*)
  ac_cv_path_NOTIFYMAILER="$NOTIFYMAILER" # Let the user override the test with a path.
  ;;
  ?:/*)
  ac_cv_path_NOTIFYMAILER="$NOTIFYMAILER" # Let the user override the test with a dos path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH:/usr/sbin:/usr/lib"
  for ac_dir in $ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_path_NOTIFYMAILER="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  test -z "$ac_cv_path_NOTIFYMAILER" && ac_cv_path_NOTIFYMAILER="mail"
  ;;
esac
fi
NOTIFYMAILER="$ac_cv_path_NOTIFYMAILER"
if test -n "$NOTIFYMAILER"; then
  echo "$ac_t""$NOTIFYMAILER" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

# for the CGI-bin scripts
# Extract the first word of "htpasswd", so it can be a program name with args.
set dummy htpasswd; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_HTPASSWD'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$HTPASSWD" in
  /*)
  ac_cv_path_HTPASSWD="$HTPASSWD" # Let the user override the test with a path.
  ;;
  ?:/*)
  ac_cv_path_HTPASSWD="$HTPASSWD" # Let the user override the test with a dos path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_path_HTPASSWD="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  test -z "$ac_cv_path_HTPASSWD" && ac_cv_path_HTPASSWD="/usr/local/bin/htpasswd"
  ;;
esac
fi
HTPASSWD="$ac_cv_path_HTPASSWD"
if test -n "$HTPASSWD"; then
  echo "$ac_t""$HTPASSWD" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

# for the graphs
# Extract the first word of "rrdtool", so it can be a program name with args.
set dummy rrdtool; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_RRDTOOL'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$RRDTOOL" in
  /*)
  ac_cv_path_RRDTOOL="$RRDTOOL" # Let the user override the test with a path.
  ;;
  ?:/*)
  ac_cv_path_RRDTOOL="$RRDTOOL" # Let the user override the test with a dos path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_path_RRDTOOL="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  test -z "$ac_cv_path_RRDTOOL" && ac_cv_path_RRDTOOL="/usr/local/bin/rrdtool"
  ;;
esac
fi
RRDTOOL="$ac_cv_path_RRDTOOL"
if test -n "$RRDTOOL"; then
  echo "$ac_t""$RRDTOOL" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

# choose between `su` and `su -`
case "$TARGET_SYS" in
    Linux|BSD/OS|FreeBSD|NetBSD|DragonFly)
	# `su -` is required on Linux and desirable where it works
	# clear $TERM because some too smart by half systems spew /etc/motd
	DCC_SU="TERM= su -";;
    SunOS|Darwin)
	# `su -` is known to not work or has bad side effects on some systems
	DCC_SU="su";;
    *)
	# be considervative the rest of the time
	DCC_SU="su";;
esac

# check for 4.4BSD sockets
# look for sockets with lengths
echo $ac_n "checking for sa_len""... $ac_c" 1>&6
echo "configure: checking for sa_len" >&5
if eval "test \"`echo '$''{'ac_cv_have_sa_len'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
      cat > conftest.$ac_ext <<EOF
#include "confdefs.h"
#include <sys/socket.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "[^_]sa_len[^_a-z0-9]" >/dev/null 2>&1; then
  rm -rf conftest*
  	ac_cv_have_sa_len=yes
else
  rm -rf conftest*
  ac_cv_have_sa_len=no
fi
rm -f conftest*

fi

echo "$ac_t""$ac_cv_have_sa_len" 1>&6
if test "$ac_cv_have_sa_len" = yes; then
    cat >> confdefs.h <<\EOF
#define HAVE_SA_LEN 1
EOF
fi
# many systems want recvfrom() to use a pointer to a socklen_t
echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
echo "configure: checking for socklen_t" >&5
if eval "test \"`echo '$''{'ac_cv_have_socklen_t'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
      cat > conftest.$ac_ext <<EOF
#include "confdefs.h"
#include <sys/socket.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "typedef.*[^_]socklen_t[^_a-z0-9]" >/dev/null 2>&1; then
  rm -rf conftest*
  	ac_cv_have_socklen_t=yes
else
  rm -rf conftest*
  ac_cv_have_socklen_t=no
fi
rm -f conftest*

fi

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

echo $ac_n "checking for AF_LOCAL""... $ac_c" 1>&6
echo "configure: checking for AF_LOCAL" >&5
if eval "test \"`echo '$''{'ac_cv_have_af_local'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
      cat > conftest.$ac_ext <<EOF
#include "confdefs.h"
#include <sys/socket.h>
#ifdef AF_LOCAL
 have_af_local
#endif
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "have_af_local" >/dev/null 2>&1; then
  rm -rf conftest*
  ac_cv_have_af_local=yes
else
  rm -rf conftest*
  ac_cv_have_af_local=no
fi
rm -f conftest*

fi

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

echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
echo "configure: checking for ANSI C header files" >&5
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  ac_cv_header_stdc=yes
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_header_stdc=no
fi
rm -f conftest*

if test $ac_cv_header_stdc = yes; then
  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
#include "confdefs.h"
#include <string.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "memchr" >/dev/null 2>&1; then
  :
else
  rm -rf conftest*
  ac_cv_header_stdc=no
fi
rm -f conftest*

fi

if test $ac_cv_header_stdc = yes; then
  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
#include "confdefs.h"
#include <stdlib.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "free" >/dev/null 2>&1; then
  :
else
  rm -rf conftest*
  ac_cv_header_stdc=no
fi
rm -f conftest*

fi

if test $ac_cv_header_stdc = yes; then
  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
if test "$cross_compiling" = yes; then
  :
else
  cat > conftest.$ac_ext <<EOF
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
int main () { int i; for (i = 0; i < 256; i++)
if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
exit (0); }

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

fi
fi

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

fi

echo $ac_n "checking for pid_t""... $ac_c" 1>&6
echo "configure: checking for pid_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
#include <stdlib.h>
#include <stddef.h>
#endif
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
  rm -rf conftest*
  ac_cv_type_pid_t=yes
else
  rm -rf conftest*
  ac_cv_type_pid_t=no
fi
rm -f conftest*

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

fi

if test "$ac_cv_type_pid_t" != no; then
    cat >> confdefs.h <<\EOF
#define HAVE_PID_T 1
EOF
fi

# Some systems have uint32_t, others have u_int32_t, and some have both.
#   Then there is OpenUNIX but in sys/types.h and */bitypes.h which
#   is included by network header files.
echo $ac_n "checking for u_int32_t""... $ac_c" 1>&6
echo "configure: checking for u_int32_t" >&5
if eval "test \"`echo '$''{'ac_cv_have_u_int32_t'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
      cat > conftest.$ac_ext <<EOF
#include "confdefs.h"
#include <sys/types.h>
#include <sys/socket.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "u_int32_t" >/dev/null 2>&1; then
  rm -rf conftest*
  ac_cv_have_u_int32_t=yes
else
  rm -rf conftest*
  ac_cv_have_u_int32_t=no
fi
rm -f conftest*

fi

echo "$ac_t""$ac_cv_have_u_int32_t" 1>&6
if test "$ac_cv_have_u_int32_t" = yes; then
    cat >> confdefs.h <<\EOF
#define DCC_HAVE_U_INT32_T 1
EOF
fi
# and then there is u_*int64_t
echo $ac_n "checking for u_int64_t""... $ac_c" 1>&6
echo "configure: checking for u_int64_t" >&5
if eval "test \"`echo '$''{'ac_cv_have_u_int64_t'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
      cat > conftest.$ac_ext <<EOF
#include "confdefs.h"
#include <sys/types.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "u_int64_t" >/dev/null 2>&1; then
  rm -rf conftest*
  ac_cv_have_u_int64_t=yes
else
  rm -rf conftest*
  ac_cv_have_u_int64_t=no
fi
rm -f conftest*

fi

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

echo $ac_n "checking need for string.h""... $ac_c" 1>&6
echo "configure: checking need for string.h" >&5
if eval "test \"`echo '$''{'ac_cv_need_strings_h'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#include "confdefs.h"
#include <string.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "strcasecmp" >/dev/null 2>&1; then
  rm -rf conftest*
  ac_cv_need_strings_h=no
else
  rm -rf conftest*
  ac_cv_need_strings_h=yes
fi
rm -f conftest*

fi

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

# Checks for library functions and headers.
echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
echo "configure: checking whether time.h and sys/time.h may both be included" >&5
if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#include "confdefs.h"
#include <sys/types.h>
#include <sys/time.h>
#include <time.h>
int main() {
struct tm *tp;
; return 0; }
EOF
if { (eval echo configure: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_header_time=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_header_time=no
fi
rm -f conftest*
fi

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

fi

for ac_hdr in strings.h paths.h sys/cdefs.h pthread.h arpa/nameser.h 	resolv.h utime.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
 
else
  echo "$ac_t""no" 1>&6
fi
done

for ac_func in vsyslog getipnodebyname getipnodebyaddr freehostent		getaddrinfo getnameinfo freeaddrinfo gai_strerror hstrerror		_res res_init res_query dn_expand					inet_ntop inet_aton gethostid						localtime_r gmtime_r timegm altzone futimes setpgid poll		strlcpy strlcat getprogname daemon siginterrupt eaccess
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();

int main() {

/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
$ac_func();
#endif

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

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


# deal with Linux "improvements" to the BIND resolver library
#   They #define the standard BIND names in resolv.h
if test "$ac_cv_func__res" = no -a "$ac_cv_header_resolv_h" = yes \
	-a "$TARGET_SYS" = Linux; then
    for ac_func in __res_state __res_init __res_query __dn_expand
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();

int main() {

/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
$ac_func();
#endif

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

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

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

    fi
    if test "$ac_cv_func___res_init" = yes; then
	cat >> confdefs.h <<\EOF
#define HAVE_RES_INIT 1
EOF

    fi
    if test "$ac_cv_func___res_query" = yes; then
	cat >> confdefs.h <<\EOF
#define HAVE_RES_QUERY 1
EOF

    fi
    if test "$ac_cv_func___dn_expand" = yes; then
	cat >> confdefs.h <<\EOF
#define HAVE_DN_EXPAND 1
EOF

    fi
fi

for ac_func in getifaddrs
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();

int main() {

/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
$ac_func();
#endif

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

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 
else
  echo "$ac_t""no" 1>&6
fi
done
if test "$ac_cv_func_getifaddrs" = yes; then
    for ac_func in freeifaddrs
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();

int main() {

/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
$ac_func();
#endif

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

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 
else
  echo "$ac_t""no" 1>&6
fi
done
else
    echo $ac_n "checking getifaddrs replacement""... $ac_c" 1>&6
echo "configure: checking getifaddrs replacement" >&5
if eval "test \"`echo '$''{'ac_cv_use_dcc_getifaddrs'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
      saveflags
    CFLAGS="$CFLAGS -I include"
    cat > conftest.$ac_ext <<EOF
#include "confdefs.h"
#define TEST_DCC_GETIFADDRS
#include "dcclib/getifaddrs.c"
int main() {

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

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

# Try to use a local md5.h and md5.c.  Some systems such as RedHat 7.3
#   have versions of /usr/include/md5.h that are not directly usable.
#   Then there are the odd versions that are installed on systems.
# Check whether --with-DCC-MD5 or --without-DCC-MD5 was given.
if test "${with_DCC_MD5+set}" = set; then
  withval="$with_DCC_MD5"
  :
fi
if test "$with_DCC_MD5" = yes; then
    unset ac_cv_header_md5_h
    unset ac_cv_search_MD5Init
else
    ac_safe=`echo "md5.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for md5.h""... $ac_c" 1>&6
echo "configure: checking for md5.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#include "confdefs.h"
#include <md5.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  cat > conftest.$ac_ext <<EOF
#include "confdefs.h"
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
#include <sys/param.h>
#include <md5.h>
int main() {

; return 0; }
EOF
if { (eval echo configure: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  echo $ac_n "checking for library containing MD5Init""... $ac_c" 1>&6
echo "configure: checking for library containing MD5Init" >&5
if eval "test \"`echo '$''{'ac_cv_search_MD5Init'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_func_search_save_LIBS="$LIBS"
ac_cv_search_MD5Init="no"
cat > conftest.$ac_ext <<EOF
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char MD5Init();

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

int main() {
MD5Init()
; return 0; }
EOF
if { (eval echo configure: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  ac_cv_search_MD5Init="-l$i"
break
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
fi
rm -f conftest*
done
LIBS="$ac_func_search_save_LIBS"
fi

echo "$ac_t""$ac_cv_search_MD5Init" 1>&6
if test "$ac_cv_search_MD5Init" != "no"; then
  test "$ac_cv_search_MD5Init" = "none required" || LIBS="$ac_cv_search_MD5Init $LIBS"
  cat >> confdefs.h <<\EOF
#define HAVE_MD5 1
EOF

else :
  ac_cv_header_md5_h=no
fi
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  echo "$ac_t"" but that md5.h does not compile" 1>&6; ac_cv_header_md5_h=no
fi
rm -f conftest*
else
  echo "$ac_t""no" 1>&6
fi
fi

# How can the database code discover the size of physical memory?
GOT_PHYSMEM=
# Solaris sysconf()
if test -z "$GOT_PHYSMEM"; then
    echo $ac_n "checking for sysconf(_SC_PHYS_PAGES)+sysconf(_SC_PAGESIZE)""... $ac_c" 1>&6
echo "configure: checking for sysconf(_SC_PHYS_PAGES)+sysconf(_SC_PAGESIZE)" >&5
if eval "test \"`echo '$''{'ac_cv_have_sysconf_pages'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
      cat > conftest.$ac_ext <<EOF
#include "confdefs.h"
#include <unistd.h>
int main() {
sysconf(_SC_PHYS_PAGES)+sysconf(_SC_PAGESIZE)
; return 0; }
EOF
if { (eval echo configure: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_have_sysconf_pages=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_have_sysconf_pages=no
fi
rm -f conftest*
fi

echo "$ac_t""$ac_cv_have_sysconf_pages" 1>&6
    if test "$ac_cv_have_sysconf_pages" = yes; then
	GOT_PHYSMEM=1
	cat >> confdefs.h <<\EOF
#define HAVE__SC_PHYS_PAGES 1
EOF
    fi
fi
# BSD sysctl()
if test -z "$GOT_PHYSMEM"; then
    echo $ac_n "checking for sysctl(HW_PHYSMEM)""... $ac_c" 1>&6
echo "configure: checking for sysctl(HW_PHYSMEM)" >&5
if eval "test \"`echo '$''{'ac_cv_have_hw_physmem'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
      cat > conftest.$ac_ext <<EOF
#include "confdefs.h"
#include <sys/types.h>
	#include <sys/param.h>
	#include <sys/sysctl.h>
int main() {
sysctl(0,CTL_HW+HW_PHYSMEM,0,0,0,0)
; return 0; }
EOF
if { (eval echo configure: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_have_hw_physmem=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_have_hw_physmem=no
fi
rm -f conftest*
fi

echo "$ac_t""$ac_cv_have_hw_physmem" 1>&6
    if test "$ac_cv_have_hw_physmem" = yes; then
	GOT_PHYSMEM=1
	cat >> confdefs.h <<\EOF
#define HAVE_HW_PHYSMEM 1
EOF
    fi
fi
# HP-UX pstat_getstatic()
if test -z "$GOT_PHYSMEM"; then
    echo $ac_n "checking for pstat_getstatic()""... $ac_c" 1>&6
echo "configure: checking for pstat_getstatic()" >&5
if eval "test \"`echo '$''{'ac_cv_have_pstat_getstatic'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
      cat > conftest.$ac_ext <<EOF
#include "confdefs.h"
#include <sys/types.h>
	#include <sys/pstat.h>
int main() {
struct pst_static pss; pstat_getstatic(&pss, sizeof(pss), 1, 0)
; return 0; }
EOF
if { (eval echo configure: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_have_pstat_getstatic=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_have_pstat_getstatic=no
fi
rm -f conftest*
fi

echo "$ac_t""$ac_cv_have_pstat_getstatic" 1>&6
    if test "$ac_cv_have_pstat_getstatic" = yes; then
	GOT_PHYSMEM=1
	cat >> confdefs.h <<\EOF
#define HAVE_PSTAT_GETSTATIC 1
EOF
    fi
fi
if test -n "$GOT_PHYSMEM"; then
    cat >> confdefs.h <<\EOF
#define GOT_PHYSMEM 1
EOF
fi

echo $ac_n "checking for __progname""... $ac_c" 1>&6
echo "configure: checking for __progname" >&5
if eval "test \"`echo '$''{'ac_cv_have___progname'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#include "confdefs.h"

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

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


# how big is NUM_CWFS
echo $ac_n "checking FD_SETSIZE to compute NUM_CWFS""... $ac_c" 1>&6
echo "configure: checking FD_SETSIZE to compute NUM_CWFS" >&5
if eval "test \"`echo '$''{'ac_cv_num_cwfs'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_num_cwfs=32
else
  cat > conftest.$ac_ext <<EOF
#include "confdefs.h"
#include <stdio.h>
#include <sys/types.h>
#include <sys/socket.h>
#undef max
#define max(a,b) ((a) > (b) ? (a) : (b))
#undef min
#define min(a,b) ((a) < (b) ? (a) : (b))
main()
{
  FILE *f=fopen("conftestval", "w");
  if (!f) exit(1);
  fprintf(f, "%d\n", max(2, min(20, FD_SETSIZE-32)));
  exit(0);
}
EOF
if { (eval echo configure: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  ac_cv_num_cwfs=`cat conftestval`
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_num_cwfs=32
fi
rm -fr conftest*
fi

fi

echo "$ac_t""$ac_cv_num_cwfs" 1>&6
cat >> confdefs.h <<EOF
#define NUM_CWFS $ac_cv_num_cwfs
EOF


# Check whether --with-uid or --without-uid was given.
if test "${with_uid+set}" = set; then
  withval="$with_uid"
  :
fi

# Check whether --enable-chown or --disable-chown was given.
if test "${enable_chown+set}" = set; then
  enableval="$enable_chown"
  :
fi

case "$TARGET_SYS" in
    Darwin)
	DCCSUID=root
	DCC_OWN=daemon
	DCC_GRP=daemon
	;;
    FreeBSD|NetBSD)
	DCCSUID=root
	DCC_OWN=root
	DCC_GRP=wheel
	;;
    *)
	DCCSUID=root
	DCC_OWN=bin
	DCC_GRP=bin
	;;
esac

if test -n "$with_uid" -a "$with_uid" != no; then
    DCCSUID="$with_uid"
else
    with_uid=
    PARM_UID=
fi

if test "$enable_sys_install" = no; then
    #correct common misspelling
    enable_sys_inst=no
    PARM_SYS_INST="--disable-sys-inst"
fi
if test "$enable_sys_inst" != no; then
    NO_SYS_INSTALL="#install man pages"
    NO_SUID="#cdcc, dccproc, ... set-UID $DCCSUID"
else
    # Do not install the man pages if not installing on the system.
    NO_SYS_INSTALL="NO_SYS_INSTALL=not-system-install"

    # avoid chown and chgrp if we are not root
    # not all systems have `id -n`
    uid=`id | sed -n \
		-e 's/.*uid=[0-9][0-9]*(\([^)][^)]*\)).*/\1/p' \
		-e 's/.*uid=\([0-9][0-9]*\).*/\1/p'`
    if test -n "$uid"; then
	DCC_OWN="$uid"
    fi
    gid=`id | sed -n \
		-e 's/.*gid=[0-9][0-9]*(\([^)][^)]*\)).*/\1/p' \
		-e 's/.*gid=\([0-9][0-9]*\).*/\1/p'`
    if test -n "$gid"; then
	DCC_GRP="$gid"
    fi

    # set-UID even with disable-sys-inst if we been given a UID
    if test -n "$with_uid"; then
	NO_SUID="#./configure run as root; cdcc, dccproc, ... set-UID $DCCSUID"
    else
	NO_SUID="NO_SUID=no-set-UID"
	if test -n "$uid"; then
	    DCCSUID="$uid"
	fi
    fi
fi

if test -s dccd/dccd.c; then
# Check whether --enable-server or --disable-server was given.
if test "${enable_server+set}" = set; then
  enableval="$enable_server"
  :
fi
fi
# Check whether --enable-dccifd or --disable-dccifd was given.
if test "${enable_dccifd+set}" = set; then
  enableval="$enable_dccifd"
  :
fi
# Check whether --enable-dccm or --disable-dccm was given.
if test "${enable_dccm+set}" = set; then
  enableval="$enable_dccm"
  :
fi

# Look for sendmail
#	dccm requires the sendmail milter header file and library.
#	Without an explicit hint in the SENDMAIL environment variable,
#	look for them first in a sendmail directory parallel to the DCC
#	source directory containing a standard sendmail source and build tree
#	from sendmail.org
# Check whether --with-sendmail or --without-sendmail was given.
if test "${with_sendmail+set}" = set; then
  withval="$with_sendmail"
  :
fi
if test "$enable_dccm" = no -o "$with_sendmail" = no -o ! -d dccm; then
    with_sendmail=no
    enable_dccm=no
    SENDMAIL=no
    SENDMAIL_OBJ=/dev/null
    SENDMAIL_LIB=/usr/lib
else
    SENDMAIL_OBJ=
    SENDMAIL_LIB=
fi
if test -n "$with_sendmail" -a "$with_sendmail" != yes -a "$with_sendmail" != no; then
    SENDMAIL="$with_sendmail"
    SENDMAIL_EVAL="$SENDMAIL"
    with_sendmail=yes
fi
if test -z "$SENDMAIL"; then
    # prefer a parallel ../sendmail directory
    DEPTH=.
    SENDMAIL='${DEPTH}/../sendmail'
    eval SENDMAIL_EVAL=$SENDMAIL
    # notice native sendmail installation on FreeBSD 4.6 and elsewhere
    #	prefer a shared library, without depending on test getting the
    #	precedent of -a and -o right.  One might hope that a FreeBSD system
    #	with native sendmail milter would not have an old broken test command,
    #	but who knows?
    if test ! -d $SENDMAIL_EVAL						\
	    -a -f /usr/include/libmilter/mfapi.h; then
	if test -f /usr/lib/libmilter.so; then
	    SENDMAIL=/usr/include
	    SENDMAIL_EVAL=$SENDMAIL
	    SENDMAIL_OBJ=/usr/lib
	    SENDMAIL_OBJ_EVAL=$SENDMAIL_OBJ
	    SENDMAIL_LIB=$SENDMAIL_OBJ/libmilter.so
	fi
	if test ! -d $SENDMAIL_EVAL					\
		-a -f /usr/lib/libmilter.a; then
	    SENDMAIL=/usr/include
	    SENDMAIL_EVAL=$SENDMAIL
	    SENDMAIL_OBJ=/usr/lib
	    SENDMAIL_OBJ_EVAL=$SENDMAIL_OBJ
	    SENDMAIL_LIB=$SENDMAIL_OBJ/libmilter.a
	    # RedHat 7.3 put old libsmutil.a in /usr/lib
	    if test -f /usr/lib/libsmutil.a; then
		SENDMAIL_LIB="$SENDMAIL_LIB /usr/lib/libsmutil.a"
	    fi
	fi
    fi
    # notice a FreeBSD sendmail package if there is only one
    if test ! -d $SENDMAIL_EVAL; then
	SENDMAIL_PKG=`echo /usr/ports/mail/sendmail/work/sendmail*`
	if test -d "$SENDMAIL_PKG"; then
	    SENDMAIL="$SENDMAIL_PKG"
	    SENDMAIL_EVAL="$SENDMAIL"
	fi
    fi
    # notice native installation on some versions of NetBSD
    if test ! -d $SENDMAIL_EVAL						\
	    -a -f /usr/pkg/include/libmilter/mfapi.h			\
	    -a -f /usr/pkg/lib/libmilter.a; then
	SENDMAIL=/usr/pkg/include
	SENDMAIL_EVAL=$SENDMAIL
	SENDMAIL_OBJ=/usr/pkg/lib
	SENDMAIL_OBJ_EVAL=$SENDMAIL_OBJ
	SENDMAIL_LIB=$SENDMAIL_OBJ/libmilter.a
    fi
    # notice native installation on some flavors of Linux
    if test ! -d $SENDMAIL_EVAL						\
	    -a -f /usr/include/libmilter/mfapi.h			\
	    -a -f /usr/lib/libmilter/libmilter.a; then
	SENDMAIL=/usr/include
	SENDMAIL_EVAL=$SENDMAIL
	SENDMAIL_OBJ=/usr/lib/libmilter
	SENDMAIL_OBJ_EVAL=$SENDMAIL_OBJ
	SENDMAIL_LIB=$SENDMAIL_OBJ/libmilter.a
	# RedHat 7.3 put old libsmutil.a in /usr/lib
	if test -f /usr/lib/libsmutil.a; then
	    SENDMAIL_LIB="$SENDMAIL_LIB /usr/lib/libsmutil.a"
	fi
    fi
fi
# Look for an object directory in a standard sendmail.org distribution tree
#   if we still lack libmilter.a
if test -z "$SENDMAIL_LIB"; then
    case "$TARGET_SYS" in
    AIX)
	# sendmail thinks all AIX systems are "PPC"
	PLATFORM=`uname -vs | tr ' /' '.\-'`.`uname -r`.PPC;;
    SunOS)
	# sendmail does not like the trailing 'u' in sun4u
	PLATFORM=`uname -rsm | tr ' /' '.\-'				\
		| sed -e 's/sun4u$/sun4/'`;;
    Darwin)
	# sendmail does not like the period in the middle of Power.Macintosh
	PLATFORM=`uname -rsm | tr ' /' '.\-'				\
	    | sed -e 's/Power.Macintosh/PowerMacintosh/'`;;
    *)
	PLATFORM=`uname -rsm | tr ' /' '.\-'`;;
    esac
    SENDMAIL_OBJ="$SENDMAIL/obj.$PLATFORM"
    SENDMAIL_LIB="$SENDMAIL_OBJ/libmilter/libmilter.a"

    # If there is no libmilter.a in the sendmail.org standard place,
    #	then maybe we are being run by a FreeBSD port
    if test ! -f $SENDMAIL_LIB -a -f $SENDMAIL/include/libmilter/mfapi.h    \
	    -a -f $SENDMAIL/lib/libmilter.a; then
	SENDMAIL_OBJ=$SENDMAIL/lib
	SENDMAIL_OBJ_EVAL=$SENDMAIL_OBJ
	SENDMAIL_LIB=$SENDMAIL_OBJ/libmilter.a
    fi

    eval SENDMAIL_OBJ_EVAL="\"$SENDMAIL_OBJ\""

    # add the odd old sendmail 8.11 milter extra library
    if test -f "$SENDMAIL_OBJ_EVAL/libsmutil/libsmutil.a"; then
	SENDMAIL_LIB="$SENDMAIL_LIB $SENDMAIL_OBJ/libsmutil/libsmutil.a"
    fi
    # and the odd libsm.a that 8.12.1 needs for sm_printf()
    if test -f "$SENDMAIL_OBJ_EVAL/libsm/libsm.a"; then
	SENDMAIL_LIB="$SENDMAIL_LIB $SENDMAIL_OBJ/libsm/libsm.a"
    fi
fi

# figure out -I for dccm/Makefile
#   If we are using a sendmail source directory, then cc must look in both
#   the sendmail and include directories.
SENDMAIL_INC=
SENDMAIL_INC_DIRS=
if test -n "$SENDMAIL"; then
    for DIR in $SENDMAIL $SENDMAIL/sendmail $SENDMAIL/include; do
	eval DIR_EVAL="$DIR"
	if test -d "$DIR_EVAL" -a "$DIR" != /usr/include -a "$DIR" != /usr; then
	    appendvar SENDMAIL_INC -I$DIR
	    appendvar SENDMAIL_INC_DIRS $DIR_EVAL
	fi
    done
fi


# Check whether --with-cgibin or --without-cgibin was given.
if test "${with_cgibin+set}" = set; then
  withval="$with_cgibin"
  :
fi
if test -n "$with_cgibin" -a "$with_cgi_bin" != no; then
    cgibin="$with_cgibin"
fi


# where is a good place to put the dccm and dccifd sockets and PID files?
# Check whether --with-rundir or --without-rundir was given.
if test "${with_rundir+set}" = set; then
  withval="$with_rundir"
  :
fi
dcc_rundir=/var/run/dcc
if test -n "$with_rundir" -a "$with_rundir" != no; then
    unset ac_cv_path_varrun
    dcc_rundir="$with_rundir"
else
    echo $ac_n "checking run directory""... $ac_c" 1>&6
echo "configure: checking run directory" >&5
if eval "test \"`echo '$''{'ac_cv_path_varrun'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
      if test "$cross_compiling" = yes; then
  ac_cv_path_varrun=/var/run
else
  cat > conftest.$ac_ext <<EOF
#include "confdefs.h"
#include <stdio.h>
#include "include/dcc_paths.h"
main()
{
    FILE *f=fopen("conftestval", "w");
    if (!f) exit(1);
    fprintf(f, _PATH_VARRUN"\n");
    exit(0);
}
EOF
if { (eval echo configure: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  x=`cat conftestval`; ac_cv_path_varrun=`expr "$x" \: '\(.*\)/$' \| "$x"`
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_path_varrun=/var/run
fi
rm -fr conftest*
fi

fi

echo "$ac_t""$ac_cv_path_varrun" 1>&6
    dcc_rundir=$ac_cv_path_varrun/dcc
fi
cat >> confdefs.h <<EOF
#define DCC_RUNDIR "$dcc_rundir"
EOF



# Check whether --with-db-memory or --without-db-memory was given.
if test "${with_db_memory+set}" = set; then
  withval="$with_db_memory"
  :
fi
if test -z "$with_db_memory" -o "$with_db_memory" = no; then
    with_db_memory=0
fi
if test -n "`expr "$with_db_memory" : '[0-9]*\(.*\)'`"; then
    echo "warning: --with-db-memory=X requires a number" 1>&2
    with_db_memory=0
fi
if test "$with_db_memory" -ne 0; then
    # related to MAX_MAX_DB_MBYTE in db.c, help string here, and INSTALL.html
    if test "$with_db_memory" -lt 32 -o $with_db_memory -gt 49152; then
	echo "warning: --with-db-memory=X must be between 32 MBytes and 49152 MBytes" 1>&2
	with_db_memory=0
    fi
fi
cat >> confdefs.h <<EOF
#define DB_MIN_MBYTE $with_db_memory
EOF

# Check whether --with-max-db-mem or --without-max-db-mem was given.
if test "${with_max_db_mem+set}" = set; then
  withval="$with_max_db_mem"
  :
fi
if test -z "$with_max_db_mem" -o "$with_max_db_mem" = no; then
    with_max_db_mem=0
fi
if test -n "`expr "$with_max_db_mem" : '[0-9]*\(.*\)'`"; then
    echo "warning: --with-max-db_mem=X requires a number" 1>&2
    with_max_db_mem=0
fi
if test "$with_max_db_mem" -ne 0; then
    if test "$with_max_db_mem" -lt 32 -o $with_max_db_mem -gt 49152; then
	echo "warning: --with-max-db_mem=X must be between 32 MBytes and 49152 MBytes" 1>&2
	with_max_db_mem=0
    fi
    if test "$with_db_memory" -ne 0	\
		-a "$with_max_db_mem" -lt $with_db_memory; then
	echo "warning: --with-max-db_mem=$with_max_db_mem less than --with-db-memory=$with_db_memory" 1>&2
	with_max_db_mem=0
    fi
fi

cat >> confdefs.h <<EOF
#define DB_MAX_MBYTE $with_max_db_mem
EOF


# Check whether --with-max-log-size or --without-max-log-size was given.
if test "${with_max_log_size+set}" = set; then
  withval="$with_max_log_size"
  :
fi
if test "$with_max_log_size" = no; then
    with_max_log_size=
fi
if test -n "$with_max_log_size"	\
	-a -n "`expr 0$with_max_log_size : '[0-9]*\(.*\)'`"; then
    echo "warning: --with-max-log-size=X requires a number" 1>&2
    with_max_log_size=
fi
if test -z "$with_max_log_size"; then
    with_max_log_size=32
fi
# assume it is in bytes instead of KBytes if it is more than 2*1024*1024, 
if test 0$with_max_log_size -ge 2097152; then
    with_max_log_size=`expr \( 0$with_max_log_size + 1023 \) / 1024`
fi
# "unlimited is really 2 GBbyte
if test $with_max_log_size -eq 0; then
    with_max_log_size=2097152
fi
cat >> confdefs.h <<EOF
#define MAX_LOG_KBYTE $with_max_log_size
EOF


# Check whether --with-rl-min-max or --without-rl-min-max was given.
if test "${with_rl_min_max+set}" = set; then
  withval="$with_rl_min_max"
  :
fi
if test "$with_rl_min_max" = no; then
    with_rl_min_max=
fi
if test -n "$with_rl_min_max"	\
	-a -n "`expr 0$with_rl_min_max : '[0-9]*\(.*\)'`"; then
    echo "warning: --with-rl-min-max=X requires a number" 1>&2
    with_rl_min_max=
fi
if test -n "$with_rl_min_max"; then
    cat >> confdefs.h <<EOF
#define RL_MIN_MAX $with_rl_min_max
EOF
fi


echo $ac_n "checking for sysctl(kern.boottime)""... $ac_c" 1>&6
echo "configure: checking for sysctl(kern.boottime)" >&5
if eval "test \"`echo '$''{'ac_cv_have_boottime'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
      cat > conftest.$ac_ext <<EOF
#include "confdefs.h"
#include <sys/types.h>
	#include <sys/param.h>
	#include <sys/sysctl.h>
int main() {
sysctl(0,CTL_KERN+KERN_BOOTTIME,0,0,0,0)
; return 0; }
EOF
if { (eval echo configure: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_have_boottime=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_have_boottime=no
fi
rm -f conftest*
fi

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


# Decide whether we should try to build IPv6 support.  Be conservative
#	and give up at the first sign of trouble.
# Also check for some other network related system oddities.
# Check whether --enable-IPv6 or --disable-IPv6 was given.
if test "${enable_IPv6+set}" = set; then
  enableval="$enable_IPv6"
  :
fi
# some systems think they have IPv6 but don't or have odd definitions
#   for the structure tags
case "$TARGET_SYS" in
    SunOS)
	cat >> confdefs.h <<\EOF
#define CONF_S6_ADDR32 _S6_un._S6_u32
EOF
	# use poll() instead of select() on Solaris because socket() can yield
	# file descriptors larger than FD_SETSIZE
	if test "$ac_cv_func_poll" = yes; then
	    cat >> confdefs.h <<\EOF
#define USE_POLL 1
EOF
	fi
	# use `dbclean -F` on Solaris to force less unneeded disk I/O
	cat >> confdefs.h <<\EOF
#define USE_DBCLEAN_F 1
EOF
	cat >> confdefs.h <<\EOF
#define HAVE_COHERENT_MMAP 1
EOF
	;;
    OSF1)
	cat >> confdefs.h <<\EOF
#define CONF_S6_ADDR32 s6_laddr
EOF
	;;
    OpenUNIX)
	enable_IPv6=no
	cat >> confdefs.h <<\EOF
#define CONF_S6_ADDR32 S6_un.S6_l
EOF
	;;
    Linux)
	# allow file descriptors larger than FD_SETSIZE
	if test "$ac_cv_func_poll" = yes; then
	    cat >> confdefs.h <<\EOF
#define USE_POLL 1
EOF
	fi
	;;
    FreeBSD|DragonFly)
	# allow file descriptors larger than FD_SETSIZE
	if test "$ac_cv_func_poll" = yes; then
	    cat >> confdefs.h <<\EOF
#define USE_POLL 1
EOF
	fi
	cat >> confdefs.h <<\EOF
#define CONF_S6_ADDR32 __u6_addr.__u6_addr32
EOF
	cat >> confdefs.h <<\EOF
#define HAVE_COHERENT_MMAP 1
EOF
	;;
    HP-UX)
	# allow file descriptors larger than FD_SETSIZE
	if test "$ac_cv_func_poll" = yes; then
	    cat >> confdefs.h <<\EOF
#define USE_POLL 1
EOF
	fi
	# at least some versions of HP-UX do not have working select()
	#   poll(), and shutdown() on AF_UNIX sockets.
	if test `uname -r | sed -e 's/^[A-Z.]*//' -e 's/\.//g'` -le 1100; then
	    cat >> confdefs.h <<\EOF
#define HP_UX_BAD_AF_UNIX 1
EOF
	fi
	;;
    *)
	cat >> confdefs.h <<\EOF
#define CONF_S6_ADDR32 __u6_addr.__u6_addr32
EOF
	;;
esac
if test "$enable_IPv6"SET = noSET -o "$enable_IPV6"SET = noSET	\
	-o "$enable_ipv6"SET = noSET; then
    NO_IPV6="disabled"
else
    if test "$ac_cv_func_gai_strerror" != yes; then
	no_getaddrinfo="no gai_strerror()"
    fi
    if test "$ac_cv_func_freeaddrinfo" != yes; then
	no_getaddrinfo="no freeaddrinfo()"
    fi
    if test "$ac_cv_func_getaddrinfo" != yes; then
	no_getaddrinfo="no getaddrinfo()"
    fi
    if test "$ac_cv_func_freehostent" != yes; then
	no_getipnodebyname="no freehostent()"
    fi
    if test "$ac_cv_func_getipnodebyaddr" != yes; then
	no_getipnodebyname="no getipnodebyaddr()"
    fi
    if test "$ac_cv_func_getipnodebyname" != yes; then
	no_getipnodebyname="no getipnodebyname()"
    fi
    if test -n "$no_getipnodebyname" -a -n "$no_getaddrinfo"; then
	NO_IPV6="$no_getipnodebyname and $no_getaddrinfo"
    fi
fi
echo $ac_n "checking for IPv6""... $ac_c" 1>&6
echo "configure: checking for IPv6" >&5
cat > conftest.$ac_ext <<EOF
#include "confdefs.h"
#include <netinet/in.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "sockaddr_in6" >/dev/null 2>&1; then
  :
else
  rm -rf conftest*
  NO_IPV6="no sockaddr_in6"
fi
rm -f conftest*
cat > conftest.$ac_ext <<EOF
#include "confdefs.h"
#include <netinet/in.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "in6_addr" >/dev/null 2>&1; then
  :
else
  rm -rf conftest*
  NO_IPV6="no in6_addr"
fi
rm -f conftest*
cat > conftest.$ac_ext <<EOF
#include "confdefs.h"
#include<sys/socket.h>
AF_INET6
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "^AF_INET6$" >/dev/null 2>&1; then
  rm -rf conftest*
  NO_IPV6="no AF_INET6"
    cat >> confdefs.h <<\EOF
#define NO_AF_INET6 1
EOF

fi
rm -f conftest*

if test -z "$NO_IPV6"; then
    echo "$ac_t""yes" 1>&6
else
    echo "$ac_t""$NO_IPV6" 1>&6
    cat >> confdefs.h <<EOF
#define NO_IPV6 "$NO_IPV6"
EOF
fi



# Decide about man pages and what to build
if test "$prefix" = NONE; then
    if test -z "$DCC_HOMEDIR"; then
	DCC_HOMEDIR=$ac_default_prefix
    fi
    prefix=$DCC_HOMEDIR
fi
cat >> confdefs.h <<EOF
#define DCC_HOMEDIR "$prefix"
EOF
if test "$libexecdir" = '${exec_prefix}/libexec'; then
    libexecdir=$prefix/libexec
fi
cat >> confdefs.h <<EOF
#define DCC_LIBEXECDIR "$libexecdir"
EOF
if test "$bindir" = '${exec_prefix}/bin'; then
    if test "$enable_sys_inst" = no -a ! -w /usr/local/bin -a -d $HOME/bin; then
	bindir=$HOME/bin
	echo "$ac_t""install binaries in $bindir" 1>&6
    else
	bindir=/usr/local/bin
    fi
fi

# default cgibin after $prefix has been figured out
if test -z "$cgibin"; then
    cgibin="$prefix/cgi-bin"
fi

# Pick the default target location of the man pages and
#	decide whether to install .8 or .0 files.
case "$TARGET_SYS" in
    Linux)
	# default to /usr/local/man/man8 and use roff files
	mancat=man
	MAN8='dcc.8 $(SUBDIR_MAN8)'
	MAN8INST=''
	USE_DCCMANINSTALL='maninstall:dccmaninstall'
	;;
    OpenBSD)
	# default to /usr/local/man/cat8 and whatever.0 names
	mancat=cat
	MAN8='dcc.0 $(SUBDIR_MAN0)'
	MAN8INST=''
	USE_DCCMANINSTALL='maninstall:dccmaninstall'
	;;
    HP-UX)
	# default to /usr/local/man/cat8 and use cleartext files and
	#   whatever.8 names
	mancat=cat
	MAN8='dcc.0 $(SUBDIR_MAN0)'
	MAN8INST='/`expr $$NM : "\(.*\)".0`.8'
	USE_DCCMANINSTALL='maninstall:dccmaninstall'
	;;
    IRIX*)
	# default to /usr/local/man/man8 and use cleartext files and
	#   whatever.8 names
	mancat=man
	MAN8='dcc.0 $(SUBDIR_MAN0)'
	MAN8INST='/`expr $$NM : "\(.*\)".0`.8'
	USE_DCCMANINSTALL='maninstall:dccmaninstall'
	;;
    SunOS)
	# default to /usr/local/man/cat8 and use cleartext files,
	#   use our installation rule, and whatever.8 names
	mancat=cat
	MAN8='dcc.0 $(SUBDIR_MAN0)'
	MAN8INST='/`expr $$NM : "\(.*\)".0`.8'
	USE_DCCMANINSTALL='maninstall:dccmaninstall'
	;;
    FreeBSD)
	# default to /usr/local/man/man8 and use nroff files, possibly
	#   compressed via /usr/share/mk
	mancat=man
	MAN8='dcc.8 $(SUBDIR_MAN8)'
	MAN8INST=''
	USE_DCCMANINSTALL='# do not use dccmaninstall; instead use the built in maninstall'
	;;
    DragonFly)
	# default to /usr/local/man/man8 and use nroff files, possibly
	#   compressed via /usr/share/mk
	mancat=man
	MAN8='dcc.8 $(SUBDIR_MAN8)'
	MAN8INST=''
	USE_DCCMANINSTALL='# do not use dccmaninstall; instead use the built in maninstall'
	;;
    Darwin)
	# default to /usr/local/man/man8 and use nroff files
	mancat=man
	MAN8='dcc.8 $(SUBDIR_MAN8)'
	MAN8INST=''
	USE_DCCMANINSTALL='maninstall:dccmaninstall'
	;;
    NetBSD)
	# default to /usr/local/man/man8 and use nroff files, possibly
	#   compressed via /usr/share/mk on versions well after 1.4.2.
	mancat=cat
	MAN8='dcc.0 $(SUBDIR_MAN0)'
	MAN8INST=''
	# force NetBSD to install the man pages
	USE_DCCMANINSTALL='install maninstall: dccmaninstall'
	;;
    BSD/OS)
	# default to /usr/local/man/cat8 and use cleartext files, possibly
	#   compressed via /usr/share/mk, and named whatever.0
	mancat=cat
	MAN8='dcc.0 $(SUBDIR_MAN0)'
	MAN8INST=''
	USE_DCCMANINSTALL='# do not use dccmaninstall; instead use the built in maninstall'
	;;
    AIX)
	# default to /usr/local/man/cat8, use our installation rule,
	#   and use cleartext files named whatever.8
	mancat=cat
	MAN8='dcc.0 $(SUBDIR_MAN0)'
	MAN8INST='/`expr $$NM : "\(.*\)".0`.8'
	USE_DCCMANINSTALL='maninstall:dccmaninstall'
	;;
    OpenUNIX)
	# default to /usr/local/man/cat8 and use cleartext files named
	#   whatever.8
	mancat=cat
	MAN8='dcc.0 $(SUBDIR_MAN0)'
	MAN8INST='/`expr $$NM : "\(.*\)".0`.8'
	USE_DCCMANINSTALL='maninstall:dccmaninstall'
	;;
    *)
	echo "warning: 	*** Cannot install man pages on unfamiliar systems ***" 1>&2
	mancat=fixme
	MAN8=
	MAN8INST=
	USE_DCCMANINSTALL='maninstall:dccmaninstall'
	;;
esac
if test "$mandir" = '${prefix}/man'; then
    if test "$DCC_MANDIR"SET != SET; then
	mandir="$DCC_MANDIR"
    else
	mandir=/usr/local/man
    fi
fi
mandir="$mandir/$mancat"
USE_GROFF='USE_GROFF=no'
if expr "$MAN8" : 'dcc\.0' >/dev/null; then
   if groff -Tascii -mtty-char -mdoc </dev/null >/dev/null; then
	USE_GROFF='USE_GROFF=yes'
	echo "$ac_t""use groff to customize .0 man pages" 1>&6
    else
	echo "$ac_t""need to but cannot use groff to customize .0 man pages" 1>&6
    fi
else
    echo "$ac_t""ignore .0 man pages" 1>&6    
fi

# Enough systems have idiosyncratic native install programs and we install
#   few enough files that it is usually best to use the autoconf script.
#   A few systems cannot tolerate the autoconf script.
case "$TARGET_SYS" in
    CYGWIN*)
	DCCINSTALL=install
	;;
    *)
	DCCINSTALL='$(DEPTH)/autoconf/install-sh -c'
	# some systems do not have UNIX file permissions
	cat >> confdefs.h <<\EOF
#define HAVE_PRIVATE_FILES 1
EOF
	;;
esac

SUBDIR_DCCIFD=
if test "$enable_dccifd" != no; then
    if test "$HAVE_PTHREADS" = yes; then
	SUBDIR_DCCIFD=dccifd
    else
	echo "warning: 	*** cannot build dccifd without threads ***" 1>&2
    fi
fi
if test -z "$SUBDIR_DCCIFD"; then
    SUBDIR_DISABLED="$SUBDIR_DISABLED dccifd"
fi

# disable server for DCC Reputation trials
if test ! -s dccd/dccd.c; then
    enable_server=no
fi
# allow varient --disable-dccd
if test "$enable_server" = no -o "$enable_dccd" = no; then
    SUBDIR_DCCD=
    SUBDIR_SRVRLIB=
    SUBDIR_DISABLED="$SUBDIR_DISABLED dccd dbclean dblist srvrlib"
else
    SUBDIR_DCCD="dbclean dccd dblist"
    SUBDIR_SRVRLIB="srvrlib"
fi

# We have already chosen the sendmail source directory.  Here we only
#	check that the milter library is present and turn dccm on or off.
SUBDIR_DCCM=
if test "$with_sendmail"SET != noSET -a "$enable_dccm"SET != noSET; then
    SUBDIR_DCCM=dccm
    if test -n "$SENDMAIL_INC"; then
	echo "$ac_t""look for milter headers in $SENDMAIL_INC_DIRS" 1>&6
    else
	echo "$ac_t""look for milter headers only in common directory" 1>&6
    fi
    MFAPI=`find $SENDMAIL_INC_DIRS /usr/include				\
		-type d -name libmilter 2>/dev/null`
    if test -n "$MFAPI"; then
	MFAPI="`find $MFAPI -name mfapi.h`"
    fi
    if test -z "$MFAPI"; then
	echo "warning: 	*** cannot build dccm without mfapi.h ***" 1>&2
	SUBDIR_DCCM=
    fi
    echo "$ac_t""look for milter library in $SENDMAIL_OBJ_EVAL" 1>&6
    if test ! -d $SENDMAIL_OBJ_EVAL; then
	echo "warning: 	*** cannot build dccm without sendmail libraries in $SENDMAIL_OBJ_EVAL ***" 1>&2
	SUBDIR_DCCM=
    fi
    if test "$HAVE_PTHREADS" != yes; then
	echo "warning: 	*** cannot build dccm without threads ***" 1>&2
	SUBDIR_DCCM=
    fi
# If dccm has been installed but there is no sendmail library or headers,
# then assume something is recently broken and try to build dccm regardless.
# This prevents bad things like losing a sendmail directory from letting
# a DCC build appear to succeed.
    if test -x "$libexecdir/dccm"; then
	if test -z "$SUBDIR_DCCM"; then
	    echo "$ac_t""	*** try to rebuild dccm because it is already installed ***" 1>&6
	fi
	SUBDIR_DCCM=dccm
    fi
fi
if test -z "$SUBDIR_DCCM"; then
    SUBDIR_DISABLED="$SUBDIR_DISABLED dccm"
fi
if test -z "$SUBDIR_DCCM$SUBDIR_DCCIFD"; then
    SUBDIR_DISABLED="$SUBDIR_DISABLED thrlib"
    SUBDIR_THRLIB=
else
    SUBDIR_THRLIB="dns-helper thrlib"
fi


# Check whether --with-kludge or --without-kludge was given.
if test "${with_kludge+set}" = set; then
  withval="$with_kludge"
  :
fi
if test -n "$with_kludge" -a "$with_kludge" != no; then
    kludge_h="$with_kludge"
    cat >> confdefs.h <<\EOF
#define NEED_KLUDGE_H 1
EOF
else
    kludge_h="@kludge_h@"
fi


# Check whether --with-socks or --without-socks was given.
if test "${with_socks+set}" = set; then
  withval="$with_socks"
  :
fi
if test "$with_socks" = no; then
    with_socks=
fi
if test "$ac_cv_lib_socks" != "$with_socks"; then
    unset ac_cv_func_Rsendto
fi
ac_cv_lib_socks="$with_socks"
if test "$with_socks" != yes -a -n "$with_socks"; then
    if expr "$with_socks" : '.*/.*' >/dev/null; then
	LIBS="$LIBS $with_socks"
    else
	LIBS="$LIBS -l$with_socks"
    fi
fi
for ac_func in Rsendto
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();

int main() {

/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
$ac_func();
#endif

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

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 
else
  echo "$ac_t""no" 1>&6
if test "$with_socks" != yes -a -n "$with_socks"; then
	echo "$ac_t""	warning: SOCKS functions including Rsendto() not found in -l$with_socks" 1>&6
	unset ac_cv_func_Rsendto
    fi
    if test "$with_socks" = yes; then
	echo "$ac_t""	warning: SOCKS functions including Rsendto() not found" 1>&6
	unset ac_cv_func_Rsendto
    fi
fi
done


trap '' 1 2 15
cat > confcache <<\EOF
# This file is a shell script that caches the results of configure
# tests run on this system so they can be shared between configure
# scripts and configure runs.  It is not useful on other systems.
# If it contains results you don't want to keep, you may remove or edit it.
#
# By default, configure uses ./config.cache as the cache file,
# creating it if it does not exist already.  You can give configure
# the --cache-file=FILE option to use a different cache file; that is
# what configure does when it calls configure scripts in
# subdirectories, so they share the cache.
# Giving --cache-file=/dev/null disables caching, for debugging configure.
# config.status only pays attention to the cache file if you give it the
# --recheck option to rerun configure.
#
EOF
# The following way of writing the cache mishandles newlines in values,
# but we know of no workaround that is simple, portable, and efficient.
# So, don't put newlines in cache variables' values.
# Ultrix sh set writes to stderr and can't be redirected directly,
# and sets the high bit in the cache file unless we assign to the vars.
(set) 2>&1 |
  case `(ac_space=' '; set | grep ac_space) 2>&1` in
  *ac_space=\ *)
    # `set' does not quote correctly, so add quotes (double-quote substitution
    # turns \\\\ into \\, and sed turns \\ into \).
    sed -n \
      -e "s/'/'\\\\''/g" \
      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
    ;;
  *)
    # `set' quotes correctly as required by POSIX, so do not add quotes.
    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
    ;;
  esac >> confcache
if cmp -s $cache_file confcache; then
  :
else
  if test -w $cache_file; then
    if test "$silent" != yes; then
	echo "updating cache $cache_file"
    fi
    cat confcache > $cache_file
  else
    echo "not updating unwritable cache $cache_file"
  fi
fi
rm -f confcache

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

test "x$prefix" = xNONE && prefix=$ac_default_prefix
# Let make expand exec_prefix.
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'

# Any assignment to VPATH causes Sun make to only execute
# the first set of double-colon rules, so remove it if not needed.
# If there is a colon in the path, we need to keep it.
if test "x$srcdir" = x.; then
  ac_vpsub='/^[ 	]*VPATH[ 	]*=[^:]*$/d'
fi

trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15

DEFS=-DHAVE_CONFIG_H

# Without the "./", some shells look in PATH for config.status.
: ${CONFIG_STATUS=./config.status}

if test "$silent" != yes; then
    echo creating $CONFIG_STATUS
fi
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
#
# Compiler output produced by configure, useful for debugging
# configure, is in ./config.log if it exists.

ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
for ac_option
do
  case "\$ac_option" in
  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
  -help | --help | --hel | --he | --h)
    echo "\$ac_cs_usage"; exit 0 ;;
  *) echo "\$ac_cs_usage"; exit 1 ;;
  esac
done

ac_given_srcdir=$srcdir

trap 'rm -fr `echo "./Makefile ./Makefile.inc ./Makefile.inc2 ./cdcc/Makefile ./cgi-bin/Makefile ./cgi-bin/chgpasswd ./cgi-bin/common ./cgi-bin/edit-whiteclnt ./cgi-bin/list-log ./cgi-bin/list-msg ./cgi-bin/webuser-notify ./dbclean/Makefile ./dblist/Makefile ./dccd/Makefile ./dccd/dump-clients/Makefile ./dccifd/Makefile ./dccifd/dccif-test/Makefile ./dccifd/dccif.pl ./dcclib/Makefile ./dccm/Makefile ./dccproc/Makefile ./dccsight/Makefile ./dns-helper/Makefile ./gmake.inc ./homedir/Makefile ./homedir/dcc_conf ./include/kludge.h ./misc/Makefile ./misc/cron-dccd ./misc/crontab ./misc/dcc-stats-collect ./misc/dcc-stats-graph ./misc/dcc-stats-init ./misc/dcc.m4 ./misc/fetch-testmsg-whitelist ./misc/fetchblack ./misc/fetchids ./misc/list-clients ./misc/newwebuser ./misc/rcDCC ./misc/start-dccd ./misc/start-dccifd ./misc/start-dccm ./misc/start-grey ./misc/stats-get ./misc/stop-dccd ./misc/uninstalldcc ./misc/updatedcc ./rrd-combine/Makefile ./srvrlib/Makefile ./thrlib/Makefile ./cdcc.8 ./dbclean.8 ./dblist.8 ./dcc.8 ./dccd.8 ./dccifd.8 ./dccm.8 ./dccproc.8 ./dccsight.8 ./FAQ.html ./INSTALL.html ./cdcc.html ./dbclean.html ./dblist.html ./dcc.html ./dccd.html ./dccifd.html ./dccm.html ./dccproc.html ./dccsight.html  include/dcc_config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
EOF
cat >> $CONFIG_STATUS <<EOF

# Protect against being on the right side of a sed subst in config.status.
sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
$ac_vpsub
$extrasub
s%@SHELL@%$SHELL%g
s%@CFLAGS@%$CFLAGS%g
s%@CPPFLAGS@%$CPPFLAGS%g
s%@CXXFLAGS@%$CXXFLAGS%g
s%@FFLAGS@%$FFLAGS%g
s%@DEFS@%$DEFS%g
s%@LDFLAGS@%$LDFLAGS%g
s%@LIBS@%$LIBS%g
s%@exec_prefix@%$exec_prefix%g
s%@prefix@%$prefix%g
s%@program_transform_name@%$program_transform_name%g
s%@bindir@%$bindir%g
s%@libexecdir@%$libexecdir%g
s%@mandir@%$mandir%g
s%@UPDATEDCC_PARMS@%$UPDATEDCC_PARMS%g
s%@UPDATEDCC_ENV@%$UPDATEDCC_ENV%g
s%@UPDATEDCC_ENV_SET@%$UPDATEDCC_ENV_SET%g
s%@UPDATEDCC_ENV_EXPORT@%$UPDATEDCC_ENV_EXPORT%g
s%@UPDATEDCC_PFILE@%$UPDATEDCC_PFILE%g
s%@installroot@%$installroot%g
s%@configsuffix@%$configsuffix%g
s%@CC@%$CC%g
s%@DCC_CC@%$DCC_CC%g
s%@RANLIB@%$RANLIB%g
s%@CPP@%$CPP%g
s%@DCC_CFLAGS@%$DCC_CFLAGS%g
s%@DCC_LDFLAGS@%$DCC_LDFLAGS%g
s%@PTHREAD_CFLAGS@%$PTHREAD_CFLAGS%g
s%@PTHREAD_LDFLAGS@%$PTHREAD_LDFLAGS%g
s%@PTHREAD_LIBS@%$PTHREAD_LIBS%g
s%@HAVE_CC_M@%$HAVE_CC_M%g
s%@CWRN1@%$CWRN1%g
s%@CWRN2@%$CWRN2%g
s%@CWRN3@%$CWRN3%g
s%@DCCMAKE@%$DCCMAKE%g
s%@MAKE_INC@%$MAKE_INC%g
s%@MAKE_INC2@%$MAKE_INC2%g
s%@MAKE_PROG@%$MAKE_PROG%g
s%@MAKE_SUBDIR@%$MAKE_SUBDIR%g
s%@MAKE_LIB@%$MAKE_LIB%g
s%@MAKE_DOT@%$MAKE_DOT%g
s%@DCC_LOGGER@%$DCC_LOGGER%g
s%@DCC_XARGS@%$DCC_XARGS%g
s%@FETCH_CMD@%$FETCH_CMD%g
s%@FETCH_WGET_OPTS@%$FETCH_WGET_OPTS%g
s%@FETCH_CURL_OPTS@%$FETCH_CURL_OPTS%g
s%@PERL@%$PERL%g
s%@NOTIFYMAILER@%$NOTIFYMAILER%g
s%@HTPASSWD@%$HTPASSWD%g
s%@RRDTOOL@%$RRDTOOL%g
s%@DCC_SU@%$DCC_SU%g
s%@NO_SYS_INSTALL@%$NO_SYS_INSTALL%g
s%@NO_SUID@%$NO_SUID%g
s%@DCCSUID@%$DCCSUID%g
s%@DCC_OWN@%$DCC_OWN%g
s%@DCC_GRP@%$DCC_GRP%g
s%@SENDMAIL_LIB@%$SENDMAIL_LIB%g
s%@SENDMAIL_INC@%$SENDMAIL_INC%g
s%@cgibin@%$cgibin%g
s%@dcc_rundir@%$dcc_rundir%g
s%@MAN8@%$MAN8%g
s%@MAN8INST@%$MAN8INST%g
s%@USE_DCCMANINSTALL@%$USE_DCCMANINSTALL%g
s%@USE_GROFF@%$USE_GROFF%g
s%@DCCINSTALL@%$DCCINSTALL%g
s%@SUBDIR_DCCIFD@%$SUBDIR_DCCIFD%g
s%@SUBDIR_DCCD@%$SUBDIR_DCCD%g
s%@SUBDIR_SRVRLIB@%$SUBDIR_SRVRLIB%g
s%@SUBDIR_DCCM@%$SUBDIR_DCCM%g
s%@SUBDIR_THRLIB@%$SUBDIR_THRLIB%g
s%@SUBDIR_DISABLED@%$SUBDIR_DISABLED%g
s%@kludge_h@%$kludge_h%g

CEOF
EOF

cat >> $CONFIG_STATUS <<\EOF

# Split the substitutions into bite-sized pieces for seds with
# small command number limits, like on Digital OSF/1 and HP-UX.
ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
ac_file=1 # Number of current file.
ac_beg=1 # First line for current file.
ac_end=$ac_max_sed_cmds # Line after last line for current file.
ac_more_lines=:
ac_sed_cmds=""
while $ac_more_lines; do
  if test $ac_beg -gt 1; then
    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
  else
    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
  fi
  if test ! -s conftest.s$ac_file; then
    ac_more_lines=false
    rm -f conftest.s$ac_file
  else
    if test -z "$ac_sed_cmds"; then
      ac_sed_cmds="sed -f conftest.s$ac_file"
    else
      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
    fi
    ac_file=`expr $ac_file + 1`
    ac_beg=$ac_end
    ac_end=`expr $ac_end + $ac_max_sed_cmds`
  fi
done
if test -z "$ac_sed_cmds"; then
  ac_sed_cmds=cat
fi
EOF

cat >> $CONFIG_STATUS <<EOF

CONFIG_FILES=\${CONFIG_FILES-"./Makefile ./Makefile.inc ./Makefile.inc2 ./cdcc/Makefile ./cgi-bin/Makefile ./cgi-bin/chgpasswd ./cgi-bin/common ./cgi-bin/edit-whiteclnt ./cgi-bin/list-log ./cgi-bin/list-msg ./cgi-bin/webuser-notify ./dbclean/Makefile ./dblist/Makefile ./dccd/Makefile ./dccd/dump-clients/Makefile ./dccifd/Makefile ./dccifd/dccif-test/Makefile ./dccifd/dccif.pl ./dcclib/Makefile ./dccm/Makefile ./dccproc/Makefile ./dccsight/Makefile ./dns-helper/Makefile ./gmake.inc ./homedir/Makefile ./homedir/dcc_conf ./include/kludge.h ./misc/Makefile ./misc/cron-dccd ./misc/crontab ./misc/dcc-stats-collect ./misc/dcc-stats-graph ./misc/dcc-stats-init ./misc/dcc.m4 ./misc/fetch-testmsg-whitelist ./misc/fetchblack ./misc/fetchids ./misc/list-clients ./misc/newwebuser ./misc/rcDCC ./misc/start-dccd ./misc/start-dccifd ./misc/start-dccm ./misc/start-grey ./misc/stats-get ./misc/stop-dccd ./misc/uninstalldcc ./misc/updatedcc ./rrd-combine/Makefile ./srvrlib/Makefile ./thrlib/Makefile ./cdcc.8 ./dbclean.8 ./dblist.8 ./dcc.8 ./dccd.8 ./dccifd.8 ./dccm.8 ./dccproc.8 ./dccsight.8 ./FAQ.html ./INSTALL.html ./cdcc.html ./dbclean.html ./dblist.html ./dcc.html ./dccd.html ./dccifd.html ./dccm.html ./dccproc.html ./dccsight.html "}
EOF
cat >> $CONFIG_STATUS <<\EOF
for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
  case "$ac_file" in
  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  *) ac_file_in="${ac_file}.in" ;;
  esac

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

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

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


  echo . | tr -d '\n'
  rm -f "$ac_file"
  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."

  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
  sed -e "s%@configure_input@%$configure_input%g
s%@srcdir@%$srcdir%g
s%@top_srcdir@%$top_srcdir%g
" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
fi; done
rm -f conftest.s*

# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
# NAME is the cpp macro being defined and VALUE is the value it is being given.
#
# ac_d sets the value in "#define NAME VALUE" lines.
ac_dA='s%^\([ 	]*\)#\([ 	]*define[ 	][ 	]*\)'
ac_dB='\([ 	][ 	]*\)[^ 	]*%\1#\2'
ac_dC='\3'
ac_dD='%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'

if test "${CONFIG_HEADERS+set}" != set; then
EOF
cat >> $CONFIG_STATUS <<EOF
  CONFIG_HEADERS="include/dcc_config.h"
EOF
cat >> $CONFIG_STATUS <<\EOF
fi
for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
  case "$ac_file" in
  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  *) ac_file_in="${ac_file}.in" ;;
  esac

  echo creating $ac_file

  rm -f conftest.frag conftest.in conftest.out
  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
  cat $ac_file_inputs > conftest.in

EOF

# Transform confdefs.h into a sed script conftest.vals that substitutes
# the proper values into config.h.in to produce config.h.  And first:
# Protect against being on the right side of a sed subst in config.status.
# Protect against being in an unquoted here document in config.status.
rm -f conftest.vals
cat > conftest.hdr <<\EOF
s/[\\&%]/\\&/g
s%[\\$`]%\\&%g
s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
s%ac_d%ac_u%gp
s%ac_u%ac_e%gp
EOF
sed -n -f conftest.hdr confdefs.h > conftest.vals
rm -f conftest.hdr

# Break up conftest.vals because some shells have a limit on
# the size of here documents, and old seds have small limits too.

rm -f conftest.tail
while :
do
  ac_lines=`grep -c . conftest.vals`
  # grep -c gives empty output for an empty file on some AIX systems.
  if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
  # Write a limited-size here document to conftest.frag.
  echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
  sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
  echo 'CEOF
  sed -f conftest.frag conftest.in > conftest.out
  rm -f conftest.in
  mv conftest.out conftest.in
' >> $CONFIG_STATUS
  sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
  rm -f conftest.vals
  mv conftest.tail conftest.vals
done
rm -f conftest.vals

cat >> $CONFIG_STATUS <<\EOF
  rm -f conftest.frag conftest.h
  sed -e "s%@configure_input@%Generated automatically by configure%g" conftest.in >conftest.h
  rm -f conftest.in
  if cmp -s $ac_file conftest.h 2>/dev/null; then
    echo "$ac_file is unchanged"
    rm -f conftest.h
  else
    # Remove last slash and all that follows it.  Not all systems have dirname.
      ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
      if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
      # The file is in a subdirectory.
      test ! -d "$ac_dir" && mkdir "$ac_dir"
    fi
    rm -f $ac_file
    mv conftest.h $ac_file
  fi
fi; done

EOF
cat >> $CONFIG_STATUS <<EOF

EOF
cat >> $CONFIG_STATUS <<\EOF

exit 0
EOF
chmod +x $CONFIG_STATUS
rm -fr confdefs* $ac_clean_files
test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1







sed -e 's@\(HREF="[^"]*\)\.in">@\1">@' INSTALL.html > INSTALL.html$$
/bin/rm -f INSTALL.html; mv INSTALL.html$$ INSTALL.html


sed -e 's@\(HREF="[^"]*\)\.in">@\1">@' FAQ.html > FAQ.html$$
/bin/rm -f FAQ.html; mv FAQ.html$$ FAQ.html