#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by Autoconf 2.52.
#
# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
# Free Software Foundation, Inc.
# This configure script is free software; the Free Software Foundation
# gives unlimited permission to copy, distribute and modify it.

# Avoid depending upon Character Ranges.
as_cr_letters='abcdefghijklmnopqrstuvwxyz'
as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
as_cr_Letters=$as_cr_letters$as_cr_LETTERS
as_cr_digits='0123456789'
as_cr_alnum=$as_cr_Letters$as_cr_digits

# Sed expression to map a string onto a valid variable name.
as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"

# Sed expression to map a string onto a valid CPP name.
as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"

# Be Bourne compatible
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
  emulate sh
  NULLCMD=:
elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
  set -o posix
fi

# Name of the executable.
as_me=`echo "$0" |sed 's,.*[\\/],,'`

if expr a : '\(a\)' >/dev/null 2>&1; then
  as_expr=expr
else
  as_expr=false
fi

rm -f conf$$ conf$$.exe conf$$.file
echo >conf$$.file
if ln -s conf$$.file conf$$ 2>/dev/null; then
  # We could just check for DJGPP; but this test a) works b) is more generic
  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
  if test -f conf$$.exe; then
    # Don't use ln at all; we don't have any links
    as_ln_s='cp -p'
  else
    as_ln_s='ln -s'
  fi
elif ln conf$$.file conf$$ 2>/dev/null; then
  as_ln_s=ln
else
  as_ln_s='cp -p'
fi
rm -f conf$$ conf$$.exe conf$$.file

as_executable_p="test -f"

# Support unset when possible.
if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
  as_unset=unset
else
  as_unset=false
fi

# NLS nuisances.
$as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
$as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
$as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
$as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
$as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
$as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
$as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
$as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }

# IFS
# We need space, tab and new line, in precisely that order.
as_nl='
'
IFS=" 	$as_nl"

# CDPATH.
$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }

# Name of the host.
# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
# so uname gets run too.
ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`

exec 6>&1

#
# Initializations.
#
ac_default_prefix=/usr/local
cross_compiling=no
subdirs=
MFLAGS= MAKEFLAGS=
SHELL=${CONFIG_SHELL-/bin/sh}

# Maximum number of lines to put in a shell here document.
# This variable seems obsolete.  It should probably be removed, and
# only ac_max_sed_lines should be used.
: ${ac_max_here_lines=38}

ac_unique_file="include/includes.h"
ac_default_prefix=/usr/local/samba
# Factoring default headers for most tests.
ac_includes_default="\
#include <stdio.h>
#if HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#if HAVE_SYS_STAT_H
# include <sys/stat.h>
#endif
#if STDC_HEADERS
# include <stdlib.h>
# include <stddef.h>
#else
# if HAVE_STDLIB_H
#  include <stdlib.h>
# endif
#endif
#if HAVE_STRING_H
# if !STDC_HEADERS && HAVE_MEMORY_H
#  include <memory.h>
# endif
# include <string.h>
#endif
#if HAVE_STRINGS_H
# include <strings.h>
#endif
#if HAVE_INTTYPES_H
# include <inttypes.h>
#else
# if HAVE_STDINT_H
#  include <stdint.h>
# endif
#endif
#if HAVE_UNISTD_H
# include <unistd.h>
#endif"

# Initialize some variables set by options.
ac_init_help=
ac_init_version=false
# The variables have the same names as the options, with
# dashes changed to underlines.
cache_file=/dev/null
exec_prefix=NONE
no_create=
no_recursion=
prefix=NONE
program_prefix=NONE
program_suffix=NONE
program_transform_name=s,x,x,
silent=
site=
srcdir=
verbose=
x_includes=NONE
x_libraries=NONE

# Installation directory options.
# These are left unexpanded so users can "make install exec_prefix=/foo"
# and all the variables that are supposed to be based on exec_prefix
# by default will actually change.
# Use braces instead of parens because sh, perl, etc. also accept them.
bindir='${exec_prefix}/bin'
sbindir='${exec_prefix}/sbin'
libexecdir='${exec_prefix}/libexec'
datadir='${prefix}/share'
sysconfdir='${prefix}/etc'
sharedstatedir='${prefix}/com'
localstatedir='${prefix}/var'
libdir='${exec_prefix}/lib'
includedir='${prefix}/include'
oldincludedir='/usr/include'
infodir='${prefix}/info'
mandir='${prefix}/man'

# Identity of this package.
PACKAGE_NAME=
PACKAGE_TARNAME=
PACKAGE_VERSION=
PACKAGE_STRING=
PACKAGE_BUGREPORT=

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

  ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`

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

  case $ac_option in

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

  -build | --build | --buil | --bui | --bu)
    ac_prev=build_alias ;;
  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
    build_alias=$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 ;;

  --config-cache | -C)
    cache_file=config.cache ;;

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

  -disable-* | --disable-*)
    ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
    # Reject names that are not valid shell variable names.
    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
   { (exit 1); exit 1; }; }
    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
    eval "enable_$ac_feature=no" ;;

  -enable-* | --enable-*)
    ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
    # Reject names that are not valid shell variable names.
    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
   { (exit 1); exit 1; }; }
    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
    case $ac_option in
      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
      *) ac_optarg=yes ;;
    esac
    eval "enable_$ac_feature='$ac_optarg'" ;;

  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
  | --exec | --exe | --ex)
    ac_prev=exec_prefix ;;
  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
  | --exec=* | --exe=* | --ex=*)
    exec_prefix=$ac_optarg ;;

  -gas | --gas | --ga | --g)
    # Obsolete; use --with-gas.
    with_gas=yes ;;

  -help | --help | --hel | --he | -h)
    ac_init_help=long ;;
  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
    ac_init_help=recursive ;;
  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
    ac_init_help=short ;;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  -version | --version | --versio | --versi | --vers | -V)
    ac_init_version=: ;;

  -with-* | --with-*)
    ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
    # Reject names that are not valid shell variable names.
    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
      { echo "$as_me: error: invalid package name: $ac_package" >&2
   { (exit 1); exit 1; }; }
    ac_package=`echo $ac_package| sed 's/-/_/g'`
    case $ac_option in
      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
      *) ac_optarg=yes ;;
    esac
    eval "with_$ac_package='$ac_optarg'" ;;

  -without-* | --without-*)
    ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
    # Reject names that are not valid shell variable names.
    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
      { echo "$as_me: error: invalid package name: $ac_package" >&2
   { (exit 1); exit 1; }; }
    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 "$as_me: error: unrecognized option: $ac_option
Try \`$0 --help' for more information." >&2
   { (exit 1); exit 1; }; }
    ;;

  *=*)
    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
    # Reject names that are not valid shell variable names.
    expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
      { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
   { (exit 1); exit 1; }; }
    ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
    eval "$ac_envvar='$ac_optarg'"
    export $ac_envvar ;;

  *)
    # FIXME: should be removed in autoconf 3.0.
    echo "$as_me: WARNING: you should use --build, --host, --target" >&2
    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
      echo "$as_me: WARNING: invalid host type: $ac_option" >&2
    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
    ;;

  esac
done

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

# Be sure to have absolute paths.
for ac_var in exec_prefix prefix
do
  eval ac_val=$`echo $ac_var`
  case $ac_val in
    [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
    *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
   { (exit 1); exit 1; }; };;
  esac
done

# Be sure to have absolute paths.
for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
              localstatedir libdir includedir oldincludedir infodir mandir
do
  eval ac_val=$`echo $ac_var`
  case $ac_val in
    [\\/$]* | ?:[\\/]* ) ;;
    *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
   { (exit 1); exit 1; }; };;
  esac
done

# There might be people who depend on the old broken behavior: `$host'
# used to hold the argument of --host etc.
build=$build_alias
host=$host_alias
target=$target_alias

# FIXME: should be removed in autoconf 3.0.
if test "x$host_alias" != x; then
  if test "x$build_alias" = x; then
    cross_compiling=maybe
    echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
    If a cross compiler is detected then cross compile mode will be used." >&2
  elif test "x$build_alias" != "x$host_alias"; then
    cross_compiling=yes
  fi
fi

ac_tool_prefix=
test -n "$host_alias" && ac_tool_prefix=$host_alias-

test "$silent" = yes && exec 6>/dev/null

# 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 "$as_me: error: cannot find sources in $ac_confdir or .." >&2
   { (exit 1); exit 1; }; }
  else
    { echo "$as_me: error: cannot find sources in $srcdir" >&2
   { (exit 1); exit 1; }; }
  fi
fi
srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
ac_env_build_alias_set=${build_alias+set}
ac_env_build_alias_value=$build_alias
ac_cv_env_build_alias_set=${build_alias+set}
ac_cv_env_build_alias_value=$build_alias
ac_env_host_alias_set=${host_alias+set}
ac_env_host_alias_value=$host_alias
ac_cv_env_host_alias_set=${host_alias+set}
ac_cv_env_host_alias_value=$host_alias
ac_env_target_alias_set=${target_alias+set}
ac_env_target_alias_value=$target_alias
ac_cv_env_target_alias_set=${target_alias+set}
ac_cv_env_target_alias_value=$target_alias
ac_env_CC_set=${CC+set}
ac_env_CC_value=$CC
ac_cv_env_CC_set=${CC+set}
ac_cv_env_CC_value=$CC
ac_env_CFLAGS_set=${CFLAGS+set}
ac_env_CFLAGS_value=$CFLAGS
ac_cv_env_CFLAGS_set=${CFLAGS+set}
ac_cv_env_CFLAGS_value=$CFLAGS
ac_env_LDFLAGS_set=${LDFLAGS+set}
ac_env_LDFLAGS_value=$LDFLAGS
ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
ac_cv_env_LDFLAGS_value=$LDFLAGS
ac_env_CPPFLAGS_set=${CPPFLAGS+set}
ac_env_CPPFLAGS_value=$CPPFLAGS
ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
ac_cv_env_CPPFLAGS_value=$CPPFLAGS
ac_env_CPP_set=${CPP+set}
ac_env_CPP_value=$CPP
ac_cv_env_CPP_set=${CPP+set}
ac_cv_env_CPP_value=$CPP

#
# Report the --help message.
#
if test "$ac_init_help" = "long"; then
  # Omit some internal or obsolete options to make the list less imposing.
  # This message is too long to be a string in the A/UX 3.1 sh.
  cat <<EOF
\`configure' configures this package to adapt to many kinds of systems.

Usage: $0 [OPTION]... [VAR=VALUE]...

To assign environment variables (e.g., CC, CFLAGS...), specify them as
VAR=VALUE.  See below for descriptions of some of the useful variables.

Defaults for the options are specified in brackets.

Configuration:
  -h, --help              display this help and exit
      --help=short        display options specific to this package
      --help=recursive    display the short help of all the included packages
  -V, --version           display version information and exit
  -q, --quiet, --silent   do not print \`checking...' messages
      --cache-file=FILE   cache test results in FILE [disabled]
  -C, --config-cache      alias for \`--cache-file=config.cache'
  -n, --no-create         do not create output files
      --srcdir=DIR        find the sources in DIR [configure dir or \`..']

EOF

  cat <<EOF
Installation directories:
  --prefix=PREFIX         install architecture-independent files in PREFIX
                          [$ac_default_prefix]
  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
                          [PREFIX]

By default, \`make install' will install all the files in
\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
an installation prefix other than \`$ac_default_prefix' using \`--prefix',
for instance \`--prefix=\$HOME'.

For better control, use the options below.

Fine tuning of the installation directories:
  --bindir=DIR           user executables [EPREFIX/bin]
  --sbindir=DIR          system admin executables [EPREFIX/sbin]
  --libexecdir=DIR       program executables [EPREFIX/libexec]
  --datadir=DIR          read-only architecture-independent data [PREFIX/share]
  --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
  --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]
  --localstatedir=DIR    modifiable single-machine data [PREFIX/var]
  --libdir=DIR           object code libraries [EPREFIX/lib]
  --includedir=DIR       C header files [PREFIX/include]
  --oldincludedir=DIR    C header files for non-gcc [/usr/include]
  --infodir=DIR          info documentation [PREFIX/info]
  --mandir=DIR           man documentation [PREFIX/man]
EOF

  cat <<\EOF

System types:
  --build=BUILD     configure for building on BUILD [guessed]
  --host=HOST       build programs to run on HOST [BUILD]
  --target=TARGET   configure for building compilers for TARGET [HOST]
EOF
fi

if test -n "$ac_init_help"; then

  cat <<\EOF

Optional Features:
  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
  --enable-debug          Turn on compiler debugging information (default=no)

Optional Packages:
  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
  --with-fhs              Use FHS-compliant paths (default=no)
  --with-privatedir=DIR   Where to put smbpasswd ($ac_default_prefix/private)
  --with-lockdir=DIR      Where to put lock files ($ac_default_prefix/var/locks)
  --with-piddir=DIR       Where to put pid files ($ac_default_prefix/var/locks)
  --with-swatdir=DIR      Where to put SWAT files ($ac_default_prefix/swat)
  --with-configdir=DIR    Where to put configuration files (\$libdir)
  --with-codepagedir=DIR  Where to put codepage files (\$libdir/codepages)
  --with-logfilebase=DIR  Where to put log files (\$(VARDIR))
  --with-readline=DIR   Look for readline include/libs in DIR (default=auto)
  --with-smbwrapper       Include SMB wrapper support (default=no)
  --with-afs              Include AFS support (default=no)
  --with-dce-dfs          Include DCE/DFS support (default=no)
  --with-krb4=base-dir    Include Kerberos IV support (default=no)
  --with-krb5=base-dir    Include Kerberos 5 support (default=no)
  --with-automount        Include AUTOMOUNT support (default=no)
  --with-smbmount         Include SMBMOUNT (Linux only) support (default=no)
  --with-pam              Include PAM password database support (default=no)
  --with-pam_smbpass      Include the smbpass PAM module (default=no)
  --with-tdbsam           Include experimental TDB SAM support (default=no)
  --with-ldapsam          Include experimental LDAP SAM support (default=no)
  --with-nisplussam       Include NISPLUS SAM support (default=no)
  --with-nisplus-home     Include NISPLUS_HOME support (default=no)
  --with-ssl              Include SSL support (default=no)
  --with-sslinc=DIR          Where the SSL includes are (defaults to /usr/local/ssl/include)
  --with-ssllib=DIR          Where the SSL libraries are (defaults to /usr/local/ssl/lib)
  --with-syslog           Include experimental SYSLOG support (default=no)
  --with-profiling-data   Include gathering source code profile information (default=no)
  --with-quotas           Include experimental disk-quota support (default=no)
  --with-utmp             Include experimental utmp accounting (default=no)
  --with-msdfs            Include MS Dfs support (default=no)
  --with-libsmbclient     Build the libsmbclient shared library (default=no)
  --with-spinlocks        Use spin locks instead of fcntl locks (default=no)
  --with-acl-support      Include ACL support (default=no)
  --with-winbind          Build winbind (default, if supported by OS)
  --with-included-popt    use bundled popt library, not from system

Some influential environment variables:
  CC          C compiler command
  CFLAGS      C compiler flags
  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
              nonstandard directory <lib dir>
  CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
              headers in a nonstandard directory <include dir>
  CPP         C preprocessor

Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.

EOF
fi

if test "$ac_init_help" = "recursive"; then
  # If there are subdirs, report their specific --help.
  ac_popdir=`pwd`
  for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
    cd $ac_subdir
    # A "../" for each directory in /$ac_subdir.
    ac_dots=`echo $ac_subdir |
             sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`

    case $srcdir in
    .) # No --srcdir option.  We are building in place.
      ac_sub_srcdir=$srcdir ;;
    [\\/]* | ?:[\\/]* ) # Absolute path.
      ac_sub_srcdir=$srcdir/$ac_subdir ;;
    *) # Relative path.
      ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
    esac

    # Check for guested configure; otherwise get Cygnus style configure.
    if test -f $ac_sub_srcdir/configure.gnu; then
      echo
      $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
    elif test -f $ac_sub_srcdir/configure; then
      echo
      $SHELL $ac_sub_srcdir/configure  --help=recursive
    elif test -f $ac_sub_srcdir/configure.ac ||
           test -f $ac_sub_srcdir/configure.in; then
      echo
      $ac_configure --help
    else
      echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
    fi
    cd $ac_popdir
  done
fi

test -n "$ac_init_help" && exit 0
if $ac_init_version; then
  cat <<\EOF

Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it.
EOF
  exit 0
fi
exec 5>config.log
cat >&5 <<EOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by $as_me, which was
generated by GNU Autoconf 2.52.  Invocation command line was

  $ $0 $@

EOF
{
cat <<_ASUNAME
## ---------- ##
## Platform.  ##
## ---------- ##

hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
uname -m = `(uname -m) 2>/dev/null || echo unknown`
uname -r = `(uname -r) 2>/dev/null || echo unknown`
uname -s = `(uname -s) 2>/dev/null || echo unknown`
uname -v = `(uname -v) 2>/dev/null || echo unknown`

/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`

/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`

PATH = $PATH

_ASUNAME
} >&5

cat >&5 <<EOF
## ------------ ##
## Core tests.  ##
## ------------ ##

EOF

# Keep a trace of the command line.
# Strip out --no-create and --no-recursion so they do not pile up.
# Also quote any args containing shell meta-characters.
ac_configure_args=
ac_sep=
for ac_arg
do
  case $ac_arg in
  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  | --no-cr | --no-c) ;;
  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
  *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
    ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
    ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
    ac_sep=" " ;;
  *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
     ac_sep=" " ;;
  esac
  # Get rid of the leading space.
done

# When interrupted or exit'd, cleanup temporary files, and complete
# config.log.  We remove comments because anyway the quotes in there
# would cause problems or look ugly.
trap 'exit_status=$?
  # Save into config.log some information that might help in debugging.
  echo >&5
  echo "## ----------------- ##" >&5
  echo "## Cache variables.  ##" >&5
  echo "## ----------------- ##" >&5
  echo >&5
  # The following way of writing the cache mishandles newlines in values,
{
  (set) 2>&1 |
    case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
    *ac_space=\ *)
      sed -n \
        "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
    	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
      ;;
    *)
      sed -n \
        "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
      ;;
    esac;
} >&5
  sed "/^$/d" confdefs.h >conftest.log
  if test -s conftest.log; then
    echo >&5
    echo "## ------------ ##" >&5
    echo "## confdefs.h.  ##" >&5
    echo "## ------------ ##" >&5
    echo >&5
    cat conftest.log >&5
  fi
  (echo; echo) >&5
  test "$ac_signal" != 0 &&
    echo "$as_me: caught signal $ac_signal" >&5
  echo "$as_me: exit $exit_status" >&5
  rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
    exit $exit_status
     ' 0
for ac_signal in 1 2 13 15; do
  trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
done
ac_signal=0

# 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

# Let the site file select an alternate cache file if it wants to.
# Prefer explicitly selected file to automatically selected ones.
if test -z "$CONFIG_SITE"; then
  if test "x$prefix" != xNONE; then
    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
  else
    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
  fi
fi
for ac_site_file in $CONFIG_SITE; do
  if test -r "$ac_site_file"; then
    { echo "$as_me:905: loading site script $ac_site_file" >&5
echo "$as_me: loading site script $ac_site_file" >&6;}
    cat "$ac_site_file" >&5
    . "$ac_site_file"
  fi
done

if test -r "$cache_file"; then
  # Some versions of bash will fail to source /dev/null (special
  # files actually), so we avoid doing that.
  if test -f "$cache_file"; then
    { echo "$as_me:916: loading cache $cache_file" >&5
echo "$as_me: loading cache $cache_file" >&6;}
    case $cache_file in
      [\\/]* | ?:[\\/]* ) . $cache_file;;
      *)                      . ./$cache_file;;
    esac
  fi
else
  { echo "$as_me:924: creating cache $cache_file" >&5
echo "$as_me: creating cache $cache_file" >&6;}
  >$cache_file
fi

# Check that the precious variables saved in the cache have kept the same
# value.
ac_cache_corrupted=false
for ac_var in `(set) 2>&1 |
               sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
  eval ac_old_set=\$ac_cv_env_${ac_var}_set
  eval ac_new_set=\$ac_env_${ac_var}_set
  eval ac_old_val="\$ac_cv_env_${ac_var}_value"
  eval ac_new_val="\$ac_env_${ac_var}_value"
  case $ac_old_set,$ac_new_set in
    set,)
      { echo "$as_me:940: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
      ac_cache_corrupted=: ;;
    ,set)
      { echo "$as_me:944: error: \`$ac_var' was not set in the previous run" >&5
echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
      ac_cache_corrupted=: ;;
    ,);;
    *)
      if test "x$ac_old_val" != "x$ac_new_val"; then
        { echo "$as_me:950: error: \`$ac_var' has changed since the previous run:" >&5
echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
        { echo "$as_me:952:   former value:  $ac_old_val" >&5
echo "$as_me:   former value:  $ac_old_val" >&2;}
        { echo "$as_me:954:   current value: $ac_new_val" >&5
echo "$as_me:   current value: $ac_new_val" >&2;}
        ac_cache_corrupted=:
      fi;;
  esac
  # Pass precious variables to config.status.  It doesn't matter if
  # we pass some twice (in addition to the command line arguments).
  if test "$ac_new_set" = set; then
    case $ac_new_val in
    *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
      ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
      ac_configure_args="$ac_configure_args '$ac_arg'"
      ;;
    *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
       ;;
    esac
  fi
done
if $ac_cache_corrupted; then
  { echo "$as_me:973: error: changes in the environment can compromise the build" >&5
echo "$as_me: error: changes in the environment can compromise the build" >&2;}
  { { echo "$as_me:975: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
   { (exit 1); exit 1; }; }
fi

ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu

case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
  *c*,-n*) ECHO_N= ECHO_C='
' ECHO_T='	' ;;
  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
  *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
esac
echo "#! $SHELL" >conftest.sh
echo  "exit 0"   >>conftest.sh
chmod +x conftest.sh
if { (echo "$as_me:995: PATH=\".;.\"; conftest.sh") >&5
  (PATH=".;."; conftest.sh) 2>&5
  ac_status=$?
  echo "$as_me:998: \$? = $ac_status" >&5
  (exit $ac_status); }; then
  ac_path_separator=';'
else
  ac_path_separator=:
fi
PATH_SEPARATOR="$ac_path_separator"
rm -f conftest.sh

ac_config_headers="$ac_config_headers include/config.h"

#################################################
# Directory handling stuff to support both the
# legacy SAMBA directories and FHS compliant
# ones...

# Check whether --with-fhs or --without-fhs was given.
if test "${with_fhs+set}" = set; then
  withval="$with_fhs"
  codepagedir="\$(DATADIR)/samba/codepages"
    configdir="${sysconfdir}/samba"
    lockdir="\${VARDIR}/cache/samba"
    piddir="\$(VARDIR)/run/samba"
    logfilebase="\${VARDIR}/log/samba"
    privatedir="\${CONFIGDIR}/private"
    swatdir="\${DATADIR}/samba/swat"
else
  codepagedir="\$(LIBDIR)/codepages"
    configdir="\$(LIBDIR)"
    logfilebase="\$(VARDIR)"
    lockdir="\${VARDIR}/locks"
    piddir="\$(VARDIR)/locks"
    privatedir="\${prefix}/private"
    swatdir="\${prefix}/swat"
fi;

#################################################
# set private directory location

# Check whether --with-privatedir or --without-privatedir was given.
if test "${with_privatedir+set}" = set; then
  withval="$with_privatedir"
   case "$withval" in
  yes|no)
  #
  # Just in case anybody calls it without argument
  #
    { echo "$as_me:1045: WARNING: --with-privatedir called without argument - will use default" >&5
echo "$as_me: WARNING: --with-privatedir called without argument - will use default" >&2;}
  ;;
  * )
    privatedir="$withval"
    ;;
  esac
fi;

#################################################
# set lock directory location

# Check whether --with-lockdir or --without-lockdir was given.
if test "${with_lockdir+set}" = set; then
  withval="$with_lockdir"
   case "$withval" in
  yes|no)
  #
  # Just in case anybody calls it without argument
  #
    { echo "$as_me:1065: WARNING: --with-lockdir called without argument - will use default" >&5
echo "$as_me: WARNING: --with-lockdir called without argument - will use default" >&2;}
  ;;
  * )
    lockdir="$withval"
    ;;
  esac
fi;

#################################################
# set pid directory location

# Check whether --with-piddir or --without-piddir was given.
if test "${with_piddir+set}" = set; then
  withval="$with_piddir"
   case "$withval" in
  yes|no)
  #
  # Just in case anybody calls it without argument
  #
    { echo "$as_me:1085: WARNING: --with-piddir called without argument - will use default" >&5
echo "$as_me: WARNING: --with-piddir called without argument - will use default" >&2;}
  ;;
  * )
    piddir="$withval"
    ;;
  esac
fi;

#################################################
# set SWAT directory location

# Check whether --with-swatdir or --without-swatdir was given.
if test "${with_swatdir+set}" = set; then
  withval="$with_swatdir"
   case "$withval" in
  yes|no)
  #
  # Just in case anybody does it
  #
    { echo "$as_me:1105: WARNING: --with-swatdir called without argument - will use default" >&5
echo "$as_me: WARNING: --with-swatdir called without argument - will use default" >&2;}
  ;;
  * )
    swatdir="$withval"
    ;;
  esac
fi;

#################################################
# set configuration directory location

# Check whether --with-configdir or --without-configdir was given.
if test "${with_configdir+set}" = set; then
  withval="$with_configdir"
   case "$withval" in
  yes|no)
  #
  # Just in case anybody does it
  #
    { echo "$as_me:1125: WARNING: --with-configdir called without argument - will use default" >&5
echo "$as_me: WARNING: --with-configdir called without argument - will use default" >&2;}
  ;;
  * )
    configdir="$withval"
    ;;
  esac
fi;

#################################################
# set codepage directory location

# Check whether --with-codepagedir or --without-codepagedir was given.
if test "${with_codepagedir+set}" = set; then
  withval="$with_codepagedir"
   case "$withval" in
  yes|no)
  #
  # Just in case anybody does it
  #
    { echo "$as_me:1145: WARNING: --with-codepagedir called without argument - will use default" >&5
echo "$as_me: WARNING: --with-codepagedir called without argument - will use default" >&2;}
  ;;
  * )
    codepagedir="$withval"
    ;;
  esac
fi;

#################################################
# set log directory location

# Check whether --with-logfilebase or --without-logfilebase was given.
if test "${with_logfilebase+set}" = set; then
  withval="$with_logfilebase"
   case "$withval" in
  yes|no)
  #
  # Just in case anybody does it
  #
    { echo "$as_me:1165: WARNING: --with-logfilebase called without argument - will use default" >&5
echo "$as_me: WARNING: --with-logfilebase called without argument - will use default" >&2;}
  ;;
  * )
    logfilebase="$withval"
    ;;
  esac
fi;

# compile with optimization and without debugging by default
CFLAGS="-O ${CFLAGS}"

# Check whether --enable-debug or --disable-debug was given.
if test "${enable_debug+set}" = set; then
  enableval="$enable_debug"
  if eval "test x$enable_debug = xyes"; then
	CFLAGS="${CFLAGS} -g"
    fi
fi;

ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
if test -n "$ac_tool_prefix"; then
  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
set dummy ${ac_tool_prefix}gcc; ac_word=$2
echo "$as_me:1193: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_CC+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$CC"; then
  ac_cv_prog_CC="$CC" # Let the user override the test.
else
  ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  $as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_CC="${ac_tool_prefix}gcc"
echo "$as_me:1208: found $ac_dir/$ac_word" >&5
break
done

fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
  echo "$as_me:1216: result: $CC" >&5
echo "${ECHO_T}$CC" >&6
else
  echo "$as_me:1219: result: no" >&5
echo "${ECHO_T}no" >&6
fi

fi
if test -z "$ac_cv_prog_CC"; then
  ac_ct_CC=$CC
  # Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo "$as_me:1228: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_CC"; then
  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
else
  ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  $as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_ac_ct_CC="gcc"
echo "$as_me:1243: found $ac_dir/$ac_word" >&5
break
done

fi
fi
ac_ct_CC=$ac_cv_prog_ac_ct_CC
if test -n "$ac_ct_CC"; then
  echo "$as_me:1251: result: $ac_ct_CC" >&5
echo "${ECHO_T}$ac_ct_CC" >&6
else
  echo "$as_me:1254: result: no" >&5
echo "${ECHO_T}no" >&6
fi

  CC=$ac_ct_CC
else
  CC="$ac_cv_prog_CC"
fi

if test -z "$CC"; then
  if test -n "$ac_tool_prefix"; then
  # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
set dummy ${ac_tool_prefix}cc; ac_word=$2
echo "$as_me:1267: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_CC+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$CC"; then
  ac_cv_prog_CC="$CC" # Let the user override the test.
else
  ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  $as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_CC="${ac_tool_prefix}cc"
echo "$as_me:1282: found $ac_dir/$ac_word" >&5
break
done

fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
  echo "$as_me:1290: result: $CC" >&5
echo "${ECHO_T}$CC" >&6
else
  echo "$as_me:1293: result: no" >&5
echo "${ECHO_T}no" >&6
fi

fi
if test -z "$ac_cv_prog_CC"; then
  ac_ct_CC=$CC
  # Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
echo "$as_me:1302: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_CC"; then
  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
else
  ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  $as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_ac_ct_CC="cc"
echo "$as_me:1317: found $ac_dir/$ac_word" >&5
break
done

fi
fi
ac_ct_CC=$ac_cv_prog_ac_ct_CC
if test -n "$ac_ct_CC"; then
  echo "$as_me:1325: result: $ac_ct_CC" >&5
echo "${ECHO_T}$ac_ct_CC" >&6
else
  echo "$as_me:1328: result: no" >&5
echo "${ECHO_T}no" >&6
fi

  CC=$ac_ct_CC
else
  CC="$ac_cv_prog_CC"
fi

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 "$as_me:1341: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_CC+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$CC"; then
  ac_cv_prog_CC="$CC" # Let the user override the test.
else
  ac_prog_rejected=no
  ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  $as_executable_p "$ac_dir/$ac_word" || continue
if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
  ac_prog_rejected=yes
  continue
fi
ac_cv_prog_CC="cc"
echo "$as_me:1361: found $ac_dir/$ac_word" >&5
break
done

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 $# != 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" ${1+"$@"}
    shift
    ac_cv_prog_CC="$@"
  fi
fi
fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
  echo "$as_me:1383: result: $CC" >&5
echo "${ECHO_T}$CC" >&6
else
  echo "$as_me:1386: result: no" >&5
echo "${ECHO_T}no" >&6
fi

fi
if test -z "$CC"; then
  if test -n "$ac_tool_prefix"; then
  for ac_prog in cl
  do
    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
set dummy $ac_tool_prefix$ac_prog; ac_word=$2
echo "$as_me:1397: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_CC+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$CC"; then
  ac_cv_prog_CC="$CC" # Let the user override the test.
else
  ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  $as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
echo "$as_me:1412: found $ac_dir/$ac_word" >&5
break
done

fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
  echo "$as_me:1420: result: $CC" >&5
echo "${ECHO_T}$CC" >&6
else
  echo "$as_me:1423: result: no" >&5
echo "${ECHO_T}no" >&6
fi

    test -n "$CC" && break
  done
fi
if test -z "$CC"; then
  ac_ct_CC=$CC
  for ac_prog in cl
do
  # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo "$as_me:1436: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_CC"; then
  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
else
  ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  $as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_ac_ct_CC="$ac_prog"
echo "$as_me:1451: found $ac_dir/$ac_word" >&5
break
done

fi
fi
ac_ct_CC=$ac_cv_prog_ac_ct_CC
if test -n "$ac_ct_CC"; then
  echo "$as_me:1459: result: $ac_ct_CC" >&5
echo "${ECHO_T}$ac_ct_CC" >&6
else
  echo "$as_me:1462: result: no" >&5
echo "${ECHO_T}no" >&6
fi

  test -n "$ac_ct_CC" && break
done

  CC=$ac_ct_CC
fi

fi

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

# Provide some information about the compiler.
echo "$as_me:1479:" \
     "checking for C compiler version" >&5
ac_compiler=`set X $ac_compile; echo $2`
{ (eval echo "$as_me:1482: \"$ac_compiler --version </dev/null >&5\"") >&5
  (eval $ac_compiler --version </dev/null >&5) 2>&5
  ac_status=$?
  echo "$as_me:1485: \$? = $ac_status" >&5
  (exit $ac_status); }
{ (eval echo "$as_me:1487: \"$ac_compiler -v </dev/null >&5\"") >&5
  (eval $ac_compiler -v </dev/null >&5) 2>&5
  ac_status=$?
  echo "$as_me:1490: \$? = $ac_status" >&5
  (exit $ac_status); }
{ (eval echo "$as_me:1492: \"$ac_compiler -V </dev/null >&5\"") >&5
  (eval $ac_compiler -V </dev/null >&5) 2>&5
  ac_status=$?
  echo "$as_me:1495: \$? = $ac_status" >&5
  (exit $ac_status); }

cat >conftest.$ac_ext <<_ACEOF
#line 1499 "configure"
#include "confdefs.h"

int
main ()
{

  ;
  return 0;
}
_ACEOF
ac_clean_files_save=$ac_clean_files
ac_clean_files="$ac_clean_files a.out a.exe"
# Try to create an executable without -o first, disregard a.out.
# It will help us diagnose broken compilers, and finding out an intuition
# of exeext.
echo "$as_me:1515: checking for C compiler default output" >&5
echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
if { (eval echo "$as_me:1518: \"$ac_link_default\"") >&5
  (eval $ac_link_default) 2>&5
  ac_status=$?
  echo "$as_me:1521: \$? = $ac_status" >&5
  (exit $ac_status); }; then
  # Find the output, starting from the most likely.  This scheme is
# not robust to junk in `.', hence go to wildcards (a.*) only as a last
# resort.
for ac_file in `ls a.exe conftest.exe 2>/dev/null;
                ls a.out conftest 2>/dev/null;
                ls a.* conftest.* 2>/dev/null`; do
  case $ac_file in
    *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
    a.out ) # We found the default executable, but exeext='' is most
            # certainly right.
            break;;
    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
          # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
          export ac_cv_exeext
          break;;
    * ) break;;
  esac
done
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
{ { echo "$as_me:1544: error: C compiler cannot create executables" >&5
echo "$as_me: error: C compiler cannot create executables" >&2;}
   { (exit 77); exit 77; }; }
fi

ac_exeext=$ac_cv_exeext
echo "$as_me:1550: result: $ac_file" >&5
echo "${ECHO_T}$ac_file" >&6

# Check the compiler produces executables we can run.  If not, either
# the compiler is broken, or we cross compile.
echo "$as_me:1555: checking whether the C compiler works" >&5
echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
# If not cross compiling, check that we can run a simple program.
if test "$cross_compiling" != yes; then
  if { ac_try='./$ac_file'
  { (eval echo "$as_me:1561: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:1564: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
    cross_compiling=no
  else
    if test "$cross_compiling" = maybe; then
	cross_compiling=yes
    else
	{ { echo "$as_me:1571: error: cannot run C compiled programs.
If you meant to cross compile, use \`--host'." >&5
echo "$as_me: error: cannot run C compiled programs.
If you meant to cross compile, use \`--host'." >&2;}
   { (exit 1); exit 1; }; }
    fi
  fi
fi
echo "$as_me:1579: result: yes" >&5
echo "${ECHO_T}yes" >&6

rm -f a.out a.exe conftest$ac_cv_exeext
ac_clean_files=$ac_clean_files_save
# Check the compiler produces executables we can run.  If not, either
# the compiler is broken, or we cross compile.
echo "$as_me:1586: checking whether we are cross compiling" >&5
echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
echo "$as_me:1588: result: $cross_compiling" >&5
echo "${ECHO_T}$cross_compiling" >&6

echo "$as_me:1591: checking for executable suffix" >&5
echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
if { (eval echo "$as_me:1593: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:1596: \$? = $ac_status" >&5
  (exit $ac_status); }; then
  # If both `conftest.exe' and `conftest' are `present' (well, observable)
# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
# work properly (i.e., refer to `conftest.exe'), while it won't with
# `rm'.
for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
  case $ac_file in
    *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
          export ac_cv_exeext
          break;;
    * ) break;;
  esac
done
else
  { { echo "$as_me:1612: error: cannot compute EXEEXT: cannot compile and link" >&5
echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
   { (exit 1); exit 1; }; }
fi

rm -f conftest$ac_cv_exeext
echo "$as_me:1618: result: $ac_cv_exeext" >&5
echo "${ECHO_T}$ac_cv_exeext" >&6

rm -f conftest.$ac_ext
EXEEXT=$ac_cv_exeext
ac_exeext=$EXEEXT
echo "$as_me:1624: checking for object suffix" >&5
echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
if test "${ac_cv_objext+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 1630 "configure"
#include "confdefs.h"

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.o conftest.obj
if { (eval echo "$as_me:1642: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:1645: \$? = $ac_status" >&5
  (exit $ac_status); }; then
  for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
  case $ac_file in
    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;;
    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
       break;;
  esac
done
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
{ { echo "$as_me:1657: error: cannot compute OBJEXT: cannot compile" >&5
echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
   { (exit 1); exit 1; }; }
fi

rm -f conftest.$ac_cv_objext conftest.$ac_ext
fi
echo "$as_me:1664: result: $ac_cv_objext" >&5
echo "${ECHO_T}$ac_cv_objext" >&6
OBJEXT=$ac_cv_objext
ac_objext=$OBJEXT
echo "$as_me:1668: checking whether we are using the GNU C compiler" >&5
echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
if test "${ac_cv_c_compiler_gnu+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 1674 "configure"
#include "confdefs.h"

int
main ()
{
#ifndef __GNUC__
       choke me
#endif

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:1689: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:1692: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:1695: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:1698: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_compiler_gnu=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_compiler_gnu=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
ac_cv_c_compiler_gnu=$ac_compiler_gnu

fi
echo "$as_me:1710: result: $ac_cv_c_compiler_gnu" >&5
echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
GCC=`test $ac_compiler_gnu = yes && echo yes`
ac_test_CFLAGS=${CFLAGS+set}
ac_save_CFLAGS=$CFLAGS
CFLAGS="-g"
echo "$as_me:1716: checking whether $CC accepts -g" >&5
echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
if test "${ac_cv_prog_cc_g+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 1722 "configure"
#include "confdefs.h"

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:1734: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:1737: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:1740: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:1743: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_prog_cc_g=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_prog_cc_g=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:1753: result: $ac_cv_prog_cc_g" >&5
echo "${ECHO_T}$ac_cv_prog_cc_g" >&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
# Some people use a C++ compiler to compile C.  Since we use `exit',
# in C++ we need to declare it.  In case someone uses the same compiler
# for both compiling C and C++ we need to have the C++ compiler decide
# the declaration of exit, since it's the most demanding environment.
cat >conftest.$ac_ext <<_ACEOF
#ifndef __cplusplus
  choke me
#endif
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:1780: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:1783: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:1786: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:1789: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  for ac_declaration in \
   ''\
   '#include <stdlib.h>' \
   'extern "C" void std::exit (int) throw (); using std::exit;' \
   'extern "C" void std::exit (int); using std::exit;' \
   'extern "C" void exit (int) throw ();' \
   'extern "C" void exit (int);' \
   'void exit (int);'
do
  cat >conftest.$ac_ext <<_ACEOF
#line 1801 "configure"
#include "confdefs.h"
#include <stdlib.h>
$ac_declaration
int
main ()
{
exit (42);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:1814: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:1817: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:1820: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:1823: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  :
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
continue
fi
rm -f conftest.$ac_objext conftest.$ac_ext
  cat >conftest.$ac_ext <<_ACEOF
#line 1833 "configure"
#include "confdefs.h"
$ac_declaration
int
main ()
{
exit (42);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:1845: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:1848: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:1851: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:1854: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  break
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest.$ac_objext conftest.$ac_ext
done
rm -f conftest*
if test -n "$ac_declaration"; then
  echo '#ifdef __cplusplus' >>confdefs.h
  echo $ac_declaration      >>confdefs.h
  echo '#endif'             >>confdefs.h
fi

else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest.$ac_objext conftest.$ac_ext
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu

ac_aux_dir=
for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
  if test -f $ac_dir/install-sh; then
    ac_aux_dir=$ac_dir
    ac_install_sh="$ac_aux_dir/install-sh -c"
    break
  elif test -f $ac_dir/install.sh; then
    ac_aux_dir=$ac_dir
    ac_install_sh="$ac_aux_dir/install.sh -c"
    break
  elif test -f $ac_dir/shtool; then
    ac_aux_dir=$ac_dir
    ac_install_sh="$ac_aux_dir/shtool install -c"
    break
  fi
done
if test -z "$ac_aux_dir"; then
  { { echo "$as_me:1898: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
   { (exit 1); exit 1; }; }
fi
ac_config_guess="$SHELL $ac_aux_dir/config.guess"
ac_config_sub="$SHELL $ac_aux_dir/config.sub"
ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.

# Find a good install program.  We prefer a C program (faster),
# so one script is as good as another.  But avoid the broken or
# incompatible versions:
# SysV /etc/install, /usr/sbin/install
# SunOS /usr/etc/install
# IRIX /sbin/install
# AIX /bin/install
# AmigaOS /C/install, which installs bootblocks on floppy discs
# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
# AFS /usr/afsws/bin/install, which mishandles nonexistent args
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo "$as_me:1918: checking for a BSD compatible install" >&5
echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
if test -z "$INSTALL"; then
if test "${ac_cv_path_install+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
    ac_save_IFS=$IFS; IFS=$ac_path_separator
  for ac_dir in $PATH; do
    IFS=$ac_save_IFS
    # Account for people who put trailing slashes in PATH elements.
    case $ac_dir/ in
    / | ./ | .// | /cC/* \
    | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
    | /usr/ucb/* ) ;;
    *)
      # OSF1 and SCO ODT 3.0 have their own names for install.
      # Don't use installbsd from OSF since it installs stuff as root
      # by default.
      for ac_prog in ginstall scoinst install; do
        if $as_executable_p "$ac_dir/$ac_prog"; then
	  if test $ac_prog = install &&
            grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
	    # AIX install.  It has an incompatible calling convention.
	    :
	  elif test $ac_prog = install &&
	    grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
	    # program-specific install script used by HP pwplus--don't use.
	    :
	  else
	    ac_cv_path_install="$ac_dir/$ac_prog -c"
	    break 2
	  fi
	fi
      done
      ;;
    esac
  done

fi
  if test "${ac_cv_path_install+set}" = set; then
    INSTALL=$ac_cv_path_install
  else
    # As a last resort, use the slow shell script.  We don't cache a
    # path for INSTALL within a source directory, because that will
    # break other packages using the cache if that directory is
    # removed, or if the path is relative.
    INSTALL=$ac_install_sh
  fi
fi
echo "$as_me:1967: result: $INSTALL" >&5
echo "${ECHO_T}$INSTALL" >&6

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

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

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

for ac_prog in mawk gawk nawk awk
do
  # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo "$as_me:1982: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_AWK+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$AWK"; then
  ac_cv_prog_AWK="$AWK" # Let the user override the test.
else
  ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  $as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_AWK="$ac_prog"
echo "$as_me:1997: found $ac_dir/$ac_word" >&5
break
done

fi
fi
AWK=$ac_cv_prog_AWK
if test -n "$AWK"; then
  echo "$as_me:2005: result: $AWK" >&5
echo "${ECHO_T}$AWK" >&6
else
  echo "$as_me:2008: result: no" >&5
echo "${ECHO_T}no" >&6
fi

  test -n "$AWK" && break
done

if test "x$CC" != xcc; then
  echo "$as_me:2016: checking whether $CC and cc understand -c and -o together" >&5
echo $ECHO_N "checking whether $CC and cc understand -c and -o together... $ECHO_C" >&6
else
  echo "$as_me:2019: checking whether cc understands -c and -o together" >&5
echo $ECHO_N "checking whether cc understands -c and -o together... $ECHO_C" >&6
fi
set dummy $CC; ac_cc=`echo $2 |
		      sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
if eval "test \"\${ac_cv_prog_cc_${ac_cc}_c_o+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 2028 "configure"
#include "confdefs.h"

int
main ()
{

  ;
  return 0;
}
_ACEOF
# Make sure it works both with $CC and with simple cc.
# We do the test twice because some compilers refuse to overwrite an
# existing .o file with -o, though they will create one.
ac_try='$CC -c conftest.$ac_ext -o conftest.$ac_objext >&5'
if { (eval echo "$as_me:2043: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:2046: \$? = $ac_status" >&5
  (exit $ac_status); } &&
   test -f conftest.$ac_objext && { (eval echo "$as_me:2048: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:2051: \$? = $ac_status" >&5
  (exit $ac_status); };
then
  eval ac_cv_prog_cc_${ac_cc}_c_o=yes
  if test "x$CC" != xcc; then
    # Test first that cc exists at all.
    if { ac_try='cc -c conftest.$ac_ext >&5'
  { (eval echo "$as_me:2058: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:2061: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
      ac_try='cc -c conftest.$ac_ext -o conftest.$ac_objext >&5'
      if { (eval echo "$as_me:2064: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:2067: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 test -f conftest.$ac_objext && { (eval echo "$as_me:2069: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:2072: \$? = $ac_status" >&5
  (exit $ac_status); };
      then
        # cc works too.
        :
      else
        # cc exists but doesn't like -o.
        eval ac_cv_prog_cc_${ac_cc}_c_o=no
      fi
    fi
  fi
else
  eval ac_cv_prog_cc_${ac_cc}_c_o=no
fi
rm -f conftest*

fi
if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then
  echo "$as_me:2090: result: yes" >&5
echo "${ECHO_T}yes" >&6
else
  echo "$as_me:2093: result: no" >&5
echo "${ECHO_T}no" >&6

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

fi

if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then
      BROKEN_CC=
else
      BROKEN_CC=#
fi

echo "$as_me:2108: checking that the C compiler understands volatile" >&5
echo $ECHO_N "checking that the C compiler understands volatile... $ECHO_C" >&6
if test "${samba_cv_volatile+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

cat >conftest.$ac_ext <<_ACEOF
#line 2115 "configure"
#include "confdefs.h"
#include <sys/types.h>
int
main ()
{
volatile int i = 0
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:2127: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:2130: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:2133: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:2136: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  samba_cv_volatile=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
samba_cv_volatile=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:2146: result: $samba_cv_volatile" >&5
echo "${ECHO_T}$samba_cv_volatile" >&6
if test x"$samba_cv_volatile" = x"yes"; then
   cat >>confdefs.h <<\EOF
#define HAVE_VOLATILE 1
EOF

fi

# Make sure we can run config.sub.
$ac_config_sub sun4 >/dev/null 2>&1 ||
  { { echo "$as_me:2157: error: cannot run $ac_config_sub" >&5
echo "$as_me: error: cannot run $ac_config_sub" >&2;}
   { (exit 1); exit 1; }; }

echo "$as_me:2161: checking build system type" >&5
echo $ECHO_N "checking build system type... $ECHO_C" >&6
if test "${ac_cv_build+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_cv_build_alias=$build_alias
test -z "$ac_cv_build_alias" &&
  ac_cv_build_alias=`$ac_config_guess`
test -z "$ac_cv_build_alias" &&
  { { echo "$as_me:2170: error: cannot guess build type; you must specify one" >&5
echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
   { (exit 1); exit 1; }; }
ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
  { { echo "$as_me:2174: error: $ac_config_sub $ac_cv_build_alias failed." >&5
echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
   { (exit 1); exit 1; }; }

fi
echo "$as_me:2179: result: $ac_cv_build" >&5
echo "${ECHO_T}$ac_cv_build" >&6
build=$ac_cv_build
build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`

echo "$as_me:2186: checking host system type" >&5
echo $ECHO_N "checking host system type... $ECHO_C" >&6
if test "${ac_cv_host+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_cv_host_alias=$host_alias
test -z "$ac_cv_host_alias" &&
  ac_cv_host_alias=$ac_cv_build_alias
ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
  { { echo "$as_me:2195: error: $ac_config_sub $ac_cv_host_alias failed" >&5
echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
   { (exit 1); exit 1; }; }

fi
echo "$as_me:2200: result: $ac_cv_host" >&5
echo "${ECHO_T}$ac_cv_host" >&6
host=$ac_cv_host
host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`

echo "$as_me:2207: checking target system type" >&5
echo $ECHO_N "checking target system type... $ECHO_C" >&6
if test "${ac_cv_target+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_cv_target_alias=$target_alias
test "x$ac_cv_target_alias" = "x" &&
  ac_cv_target_alias=$ac_cv_host_alias
ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
  { { echo "$as_me:2216: error: $ac_config_sub $ac_cv_target_alias failed" >&5
echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
   { (exit 1); exit 1; }; }

fi
echo "$as_me:2221: result: $ac_cv_target" >&5
echo "${ECHO_T}$ac_cv_target" >&6
target=$ac_cv_target
target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`

# The aliases save the names the user supplied, while $host etc.
# will get canonicalized.
test -n "$target_alias" &&
  test "$program_prefix$program_suffix$program_transform_name" = \
    NONENONEs,x,x, &&
  program_prefix=${target_alias}-

  case "$host_os" in
	*irix6*) cat >> confdefs.h <<\EOF
#include <standards.h>
EOF

	;;
esac

    echo "$as_me:2243: checking config.cache system type" >&5
echo $ECHO_N "checking config.cache system type... $ECHO_C" >&6
    if { test x"${ac_cv_host_system_type+set}" = x"set" &&
         test x"$ac_cv_host_system_type" != x"$host"; } ||
       { test x"${ac_cv_build_system_type+set}" = x"set" &&
         test x"$ac_cv_build_system_type" != x"$build"; } ||
       { test x"${ac_cv_target_system_type+set}" = x"set" &&
         test x"$ac_cv_target_system_type" != x"$target"; }; then
	echo "$as_me:2251: result: different" >&5
echo "${ECHO_T}different" >&6
	{ { echo "$as_me:2253: error: \"you must remove config.cache and restart configure\"" >&5
echo "$as_me: error: \"you must remove config.cache and restart configure\"" >&2;}
   { (exit 1); exit 1; }; }
    else
	echo "$as_me:2257: result: same" >&5
echo "${ECHO_T}same" >&6
    fi
    ac_cv_host_system_type="$host"
    ac_cv_build_system_type="$build"
    ac_cv_target_system_type="$target"

DYNEXP=

#
# Config CPPFLAG settings for strange OS's that must be set
# before other tests.
#
case "$host_os" in
# Try to work out if this is the native HPUX compiler that uses the -Ae flag.
    *hpux*)
      echo "$as_me:2273: checking whether ${CC-cc} accepts -Ae" >&5
echo $ECHO_N "checking whether ${CC-cc} accepts -Ae... $ECHO_C" >&6
if test "${ac_cv_prog_cc_Ae+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  echo 'void f(){}' > conftest.c
if test -z "`${CC-cc} -Ae -c conftest.c 2>&1`"; then
  ac_cv_prog_cc_Ae=yes
else
  ac_cv_prog_cc_Ae=no
fi
rm -f conftest*

fi
echo "$as_me:2287: result: $ac_cv_prog_cc_Ae" >&5
echo "${ECHO_T}$ac_cv_prog_cc_Ae" >&6
      # mmap on HPUX is completely broken...
      cat >>confdefs.h <<\EOF
#define MMAP_BLACKLIST 1
EOF

      if test $ac_cv_prog_cc_Ae = yes; then
        CPPFLAGS="$CPPFLAGS -Ae"
      fi
#
# Defines needed for HPUX support.
# HPUX has bigcrypt but (sometimes?) doesn't use it for
# password hashing - hence the USE_BOTH_CRYPT_CALLS define.
#
      case `uname -r` in
			*9*|*10*)
				CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_POSIX_SOURCE -D_ALIGNMENT_REQUIRED=1 -D_MAX_ALIGNMENT=4"
		   		cat >>confdefs.h <<\EOF
#define USE_BOTH_CRYPT_CALLS 1
EOF

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

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

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

				cat >>confdefs.h <<\EOF
#define _MAX_ALIGNMENT 4
EOF

				;;
			*11*)
				CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_POSIX_SOURCE -D_LARGEFILE64_SOURCE -D_ALIGNMENT_REQUIRED=1 -D_MAX_ALIGNMENT=4"
				cat >>confdefs.h <<\EOF
#define _HPUX_SOURCE 1
EOF

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

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

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

				cat >>confdefs.h <<\EOF
#define _MAX_ALIGNMENT 4
EOF

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

				;;
      esac
      DYNEXP="-Wl,-E"
      ;;

#
# CRAY Unicos has broken const handling
	*unicos*)
		echo "$as_me:2360: result: disabling const" >&5
echo "${ECHO_T}disabling const" >&6
		CPPFLAGS="$CPPFLAGS -Dconst="
		;;

#
# AIX4.x doesn't even admit to having large
# files *at all* unless the -D_LARGE_FILE or -D_LARGE_FILE_API flags are set.
#
    *aix4*)
	  echo "$as_me:2370: result: enabling large file support" >&5
echo "${ECHO_T}enabling large file support" >&6
      CPPFLAGS="$CPPFLAGS -D_LARGE_FILES"
      cat >>confdefs.h <<\EOF
#define _LARGE_FILES 1
EOF

      ;;
#
# Defines needed for Solaris 2.6/2.7 aka 7.0 to make it admit
# to the existance of large files..
# Note that -D_LARGEFILE64_SOURCE is different from the Sun
# recommendations on large file support, however it makes the
# compile work using gcc 2.7 and 2.8, whereas using the Sun
# recommendation makes the compile fail on gcc2.7. JRA.
#
	*solaris*)
		case `uname -r` in
			5.0*|5.1*|5.2*|5.3*|5.5*)
	  			echo "$as_me:2389: result: no large file support" >&5
echo "${ECHO_T}no large file support" >&6
				;;
			5.*)
			echo "$as_me:2393: result: enabling large file support" >&5
echo "${ECHO_T}enabling large file support" >&6
			if test "$ac_cv_c_compiler_gnu" = yes; then
				${CC-cc} -v >conftest.c 2>&1
				ac_cv_gcc_compiler_version_number=`grep 'gcc version' conftest.c`
				rm -fr conftest.c
				case "$ac_cv_gcc_compiler_version_number" in
					*"gcc version 2.6"*|*"gcc version 2.7"*)
						CPPFLAGS="$CPPFLAGS -D_LARGEFILE64_SOURCE"
						cat >>confdefs.h <<\EOF
#define _LARGEFILE64_SOURCE 1
EOF

						;;
					*)
						CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
						cat >>confdefs.h <<\EOF
#define _LARGEFILE64_SOURCE 1
EOF

						cat >>confdefs.h <<\EOF
#define _FILE_OFFSET_BITS 64
EOF

						;;
				esac
			else
				DYNEXP="-dc -dp"
				CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
				cat >>confdefs.h <<\EOF
#define _LARGEFILE64_SOURCE 1
EOF

				cat >>confdefs.h <<\EOF
#define _FILE_OFFSET_BITS 64
EOF

			fi
			;;
		esac
		;;
#
# Tests needed for SINIX large file support.
#
    *sysv4*)
      if test $host = mips-sni-sysv4 ; then
        echo "$as_me:2439: checking for LFS support" >&5
echo $ECHO_N "checking for LFS support... $ECHO_C" >&6
        old_CPPFLAGS="$CPPFLAGS"
        CPPFLAGS="-D_LARGEFILE64_SOURCE $CPPFLAGS"
        if test "$cross_compiling" = yes; then
  SINIX_LFS_SUPPORT=cross
else
  cat >conftest.$ac_ext <<_ACEOF
#line 2447 "configure"
#include "confdefs.h"

#include <unistd.h>
main () {
#if _LFS64_LARGEFILE == 1
exit(0);
#else
exit(1);
#endif
}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:2460: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:2463: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:2465: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:2468: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  SINIX_LFS_SUPPORT=yes
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
SINIX_LFS_SUPPORT=no
fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
        CPPFLAGS="$old_CPPFLAGS"
        if test x$SINIX_LFS_SUPPORT = xyes ; then
          CPPFLAGS="-D_LARGEFILE64_SOURCE $CPPFLAGS"
          cat >>confdefs.h <<\EOF
#define _LARGEFILE64_SOURCE 1
EOF

          CFLAGS="`getconf LFS64_CFLAGS` $CFLAGS"
          LDFLAGS="`getconf LFS64_LDFLAGS` $LDFLAGS"
          LIBS="`getconf LFS64_LIBS` $LIBS"
        fi
      echo "$as_me:2490: result: $SINIX_LFS_SUPPORT" >&5
echo "${ECHO_T}$SINIX_LFS_SUPPORT" >&6
      fi
    ;;

# Tests for linux LFS support. Need kernel 2.4 and glibc2.2 or greater support.
#
    *linux*)
        echo "$as_me:2498: checking for LFS support" >&5
echo $ECHO_N "checking for LFS support... $ECHO_C" >&6
        old_CPPFLAGS="$CPPFLAGS"
        CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS"
       if test "$cross_compiling" = yes; then
  LINUX_LFS_SUPPORT=cross
else
  cat >conftest.$ac_ext <<_ACEOF
#line 2506 "configure"
#include "confdefs.h"

#include <unistd.h>
#include <sys/utsname.h>
main() {
#if _LFS64_LARGEFILE == 1
       struct utsname uts;
       char *release;
       int major, minor;

       /* Ensure this is glibc 2.2 or higher */
#if defined(__GLIBC__) && defined(__GLIBC_MINOR__)
       int libc_major = __GLIBC__;
       int libc_minor = __GLIBC_MINOR__;

       if (libc_major < 2)
              exit(1);
       if (libc_minor < 2)
              exit(1);
#endif

       /* Ensure this is kernel 2.4 or higher */

       uname(&uts);
       release = uts.release;
       major = atoi(strsep(&release, "."));
       minor = atoi(strsep(&release, "."));

       if (major > 2 || (major == 2 && minor > 3))
               exit(0);
       exit(1);
#else
       exit(1);
#endif
}

_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:2545: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:2548: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:2550: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:2553: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  LINUX_LFS_SUPPORT=yes
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
LINUX_LFS_SUPPORT=no
fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
        CPPFLAGS="$old_CPPFLAGS"
        if test x$LINUX_LFS_SUPPORT = xyes ; then
          CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS"
          cat >>confdefs.h <<\EOF
#define _LARGEFILE64_SOURCE 1
EOF

          cat >>confdefs.h <<\EOF
#define _FILE_OFFSET_BITS 64
EOF

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

        fi
       echo "$as_me:2580: result: $LINUX_LFS_SUPPORT" >&5
echo "${ECHO_T}$LINUX_LFS_SUPPORT" >&6
		;;

    *hurd*)
        echo "$as_me:2585: checking for LFS support" >&5
echo $ECHO_N "checking for LFS support... $ECHO_C" >&6
        old_CPPFLAGS="$CPPFLAGS"
        CPPFLAGS="-D_LARGEFILE64_SOURCE -D_GNU_SOURCE $CPPFLAGS"
        if test "$cross_compiling" = yes; then
  GLIBC_LFS_SUPPORT=cross
else
  cat >conftest.$ac_ext <<_ACEOF
#line 2593 "configure"
#include "confdefs.h"

#include <unistd.h>
main () {
#if _LFS64_LARGEFILE == 1
exit(0);
#else
exit(1);
#endif
}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:2606: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:2609: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:2611: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:2614: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  GLIBC_LFS_SUPPORT=yes
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
GLIBC_LFS_SUPPORT=no
fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
        CPPFLAGS="$old_CPPFLAGS"
        if test x$GLIBC_LFS_SUPPORT = xyes ; then
          CPPFLAGS="-D_LARGEFILE64_SOURCE -D_GNU_SOURCE $CPPFLAGS"
          cat >>confdefs.h <<\EOF
#define _LARGEFILE64_SOURCE 1
EOF

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

        fi
      echo "$as_me:2637: result: $GLIBC_LFS_SUPPORT" >&5
echo "${ECHO_T}$GLIBC_LFS_SUPPORT" >&6
    ;;

esac

echo "$as_me:2643: checking for $CC option to accept ANSI C" >&5
echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
if test "${ac_cv_prog_cc_stdc+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_cv_prog_cc_stdc=no
ac_save_CC=$CC
cat >conftest.$ac_ext <<_ACEOF
#line 2651 "configure"
#include "confdefs.h"
#include <stdarg.h>
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
struct buf { int x; };
FILE * (*rcsopen) (struct buf *, struct stat *, int);
static char *e (p, i)
     char **p;
     int i;
{
  return p[i];
}
static char *f (char * (*g) (char **, int), char **p, ...)
{
  char *s;
  va_list v;
  va_start (v,p);
  s = g (p, va_arg (v,int));
  va_end (v);
  return s;
}
int test (int i, double x);
struct s1 {int (*f) (int a);};
struct s2 {int (*f) (double a);};
int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
int argc;
char **argv;
int
main ()
{
return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
  ;
  return 0;
}
_ACEOF
# Don't try gcc -ansi; that turns off useful extensions and
# breaks some systems' header files.
# AIX			-qlanglvl=ansi
# Ultrix and OSF/1	-std1
# HP-UX 10.20 and later	-Ae
# HP-UX older versions	-Aa -D_HPUX_SOURCE
# SVR4			-Xc -D__EXTENSIONS__
for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
do
  CC="$ac_save_CC $ac_arg"
  rm -f conftest.$ac_objext
if { (eval echo "$as_me:2700: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:2703: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:2706: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:2709: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_prog_cc_stdc=$ac_arg
break
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest.$ac_objext
done
rm -f conftest.$ac_ext conftest.$ac_objext
CC=$ac_save_CC

fi

case "x$ac_cv_prog_cc_stdc" in
  x|xno)
    echo "$as_me:2726: result: none needed" >&5
echo "${ECHO_T}none needed" >&6 ;;
  *)
    echo "$as_me:2729: result: $ac_cv_prog_cc_stdc" >&5
echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
    CC="$CC $ac_cv_prog_cc_stdc" ;;
esac

echo "$as_me:2734: checking for inline" >&5
echo $ECHO_N "checking for inline... $ECHO_C" >&6
if test "${ac_cv_c_inline+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_cv_c_inline=no
for ac_kw in inline __inline__ __inline; do
  cat >conftest.$ac_ext <<_ACEOF
#line 2742 "configure"
#include "confdefs.h"
#ifndef __cplusplus
static $ac_kw int static_foo () {return 0; }
$ac_kw int foo () {return 0; }
#endif

_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:2751: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:2754: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:2757: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:2760: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_c_inline=$ac_kw; break
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest.$ac_objext conftest.$ac_ext
done

fi
echo "$as_me:2771: result: $ac_cv_c_inline" >&5
echo "${ECHO_T}$ac_cv_c_inline" >&6
case $ac_cv_c_inline in
  inline | yes) ;;
  no)
cat >>confdefs.h <<\EOF
#define inline
EOF
 ;;
  *)  cat >>confdefs.h <<EOF
#define inline $ac_cv_c_inline
EOF
 ;;
esac

ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
echo "$as_me:2791: checking how to run the C preprocessor" >&5
echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
  CPP=
fi
if test -z "$CPP"; then
  if test "${ac_cv_prog_CPP+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
      # Double quotes because CPP needs to be expanded
    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
    do
      ac_preproc_ok=false
for ac_c_preproc_warn_flag in '' yes
do
  # Use a header file that comes with gcc, so configuring glibc
  # with a fresh cross-compiler works.
  # On the NeXT, cc -E runs the code through the compiler's parser,
  # not just through cpp. "Syntax error" is here to catch this case.
  cat >conftest.$ac_ext <<_ACEOF
#line 2812 "configure"
#include "confdefs.h"
#include <assert.h>
                     Syntax error
_ACEOF
if { (eval echo "$as_me:2817: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  egrep -v '^ *\+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:2823: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  :
else
  echo "$as_me: failed program was:" >&5
  cat conftest.$ac_ext >&5
  # Broken: fails on valid input.
continue
fi
rm -f conftest.err conftest.$ac_ext

  # OK, works on sane cases.  Now check whether non-existent headers
  # can be detected and how.
  cat >conftest.$ac_ext <<_ACEOF
#line 2846 "configure"
#include "confdefs.h"
#include <ac_nonexistent.h>
_ACEOF
if { (eval echo "$as_me:2850: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  egrep -v '^ *\+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:2856: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  # Broken: success on invalid input.
continue
else
  echo "$as_me: failed program was:" >&5
  cat conftest.$ac_ext >&5
  # Passes both tests.
ac_preproc_ok=:
break
fi
rm -f conftest.err conftest.$ac_ext

done
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
rm -f conftest.err conftest.$ac_ext
if $ac_preproc_ok; then
  break
fi

    done
    ac_cv_prog_CPP=$CPP

fi
  CPP=$ac_cv_prog_CPP
else
  ac_cv_prog_CPP=$CPP
fi
echo "$as_me:2893: result: $CPP" >&5
echo "${ECHO_T}$CPP" >&6
ac_preproc_ok=false
for ac_c_preproc_warn_flag in '' yes
do
  # Use a header file that comes with gcc, so configuring glibc
  # with a fresh cross-compiler works.
  # On the NeXT, cc -E runs the code through the compiler's parser,
  # not just through cpp. "Syntax error" is here to catch this case.
  cat >conftest.$ac_ext <<_ACEOF
#line 2903 "configure"
#include "confdefs.h"
#include <assert.h>
                     Syntax error
_ACEOF
if { (eval echo "$as_me:2908: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  egrep -v '^ *\+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:2914: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  :
else
  echo "$as_me: failed program was:" >&5
  cat conftest.$ac_ext >&5
  # Broken: fails on valid input.
continue
fi
rm -f conftest.err conftest.$ac_ext

  # OK, works on sane cases.  Now check whether non-existent headers
  # can be detected and how.
  cat >conftest.$ac_ext <<_ACEOF
#line 2937 "configure"
#include "confdefs.h"
#include <ac_nonexistent.h>
_ACEOF
if { (eval echo "$as_me:2941: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  egrep -v '^ *\+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:2947: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  # Broken: success on invalid input.
continue
else
  echo "$as_me: failed program was:" >&5
  cat conftest.$ac_ext >&5
  # Passes both tests.
ac_preproc_ok=:
break
fi
rm -f conftest.err conftest.$ac_ext

done
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
rm -f conftest.err conftest.$ac_ext
if $ac_preproc_ok; then
  :
else
  { { echo "$as_me:2975: error: C preprocessor \"$CPP\" fails sanity check" >&5
echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
   { (exit 1); exit 1; }; }
fi

ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu

echo "$as_me:2986: checking for ANSI C header files" >&5
echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
if test "${ac_cv_header_stdc+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 2992 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <float.h>

_ACEOF
if { (eval echo "$as_me:3000: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  egrep -v '^ *\+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:3006: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  ac_cv_header_stdc=yes
else
  echo "$as_me: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_header_stdc=no
fi
rm -f conftest.err conftest.$ac_ext

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

_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "memchr" >/dev/null 2>&1; then
  :
else
  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 <<_ACEOF
#line 3046 "configure"
#include "confdefs.h"
#include <stdlib.h>

_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "free" >/dev/null 2>&1; then
  :
else
  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 <<_ACEOF
#line 3067 "configure"
#include "confdefs.h"
#include <ctype.h>
#if ((' ' & 0x0FF) == 0x020)
# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
#else
# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
                     || ('j' <= (c) && (c) <= 'r') \
                     || ('s' <= (c) && (c) <= 'z'))
# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
#endif

#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
int
main ()
{
  int i;
  for (i = 0; i < 256; i++)
    if (XOR (islower (i), ISLOWER (i))
        || toupper (i) != TOUPPER (i))
      exit(2);
  exit (0);
}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:3093: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:3096: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:3098: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:3101: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  :
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_header_stdc=no
fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
fi
echo "$as_me:3114: result: $ac_cv_header_stdc" >&5
echo "${ECHO_T}$ac_cv_header_stdc" >&6
if test $ac_cv_header_stdc = yes; then

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

fi

ac_header_dirent=no
for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
  as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
echo "$as_me:3127: checking for $ac_hdr that defines DIR" >&5
echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 3133 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <$ac_hdr>

int
main ()
{
if ((DIR *) 0)
return 0;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:3148: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:3151: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:3154: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:3157: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_Header=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_Header=no"
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:3167: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
if test `eval echo '${'$as_ac_Header'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
EOF

ac_header_dirent=$ac_hdr; break
fi

done
# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
if test $ac_header_dirent = dirent.h; then
  echo "$as_me:3180: checking for opendir in -ldir" >&5
echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
if test "${ac_cv_lib_dir_opendir+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-ldir  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 3188 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char opendir ();
int
main ()
{
opendir ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:3207: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:3210: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:3213: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:3216: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_dir_opendir=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_dir_opendir=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:3227: result: $ac_cv_lib_dir_opendir" >&5
echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
if test $ac_cv_lib_dir_opendir = yes; then
  LIBS="$LIBS -ldir"
fi

else
  echo "$as_me:3234: checking for opendir in -lx" >&5
echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
if test "${ac_cv_lib_x_opendir+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lx  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 3242 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char opendir ();
int
main ()
{
opendir ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:3261: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:3264: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:3267: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:3270: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_x_opendir=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_x_opendir=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:3281: result: $ac_cv_lib_x_opendir" >&5
echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
if test $ac_cv_lib_x_opendir = yes; then
  LIBS="$LIBS -lx"
fi

fi

echo "$as_me:3289: checking whether time.h and sys/time.h may both be included" >&5
echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
if test "${ac_cv_header_time+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 3295 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/time.h>
#include <time.h>

int
main ()
{
if ((struct tm *) 0)
return 0;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:3311: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:3314: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:3317: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:3320: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_header_time=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_header_time=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:3330: result: $ac_cv_header_time" >&5
echo "${ECHO_T}$ac_cv_header_time" >&6
if test $ac_cv_header_time = yes; then

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

fi

echo "$as_me:3340: checking for sys/wait.h that is POSIX.1 compatible" >&5
echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6
if test "${ac_cv_header_sys_wait_h+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 3346 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/wait.h>
#ifndef WEXITSTATUS
# define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
#endif
#ifndef WIFEXITED
# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
#endif

int
main ()
{
  int s;
  wait (&s);
  s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:3368: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:3371: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:3374: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:3377: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_header_sys_wait_h=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_header_sys_wait_h=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:3387: result: $ac_cv_header_sys_wait_h" >&5
echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6
if test $ac_cv_header_sys_wait_h = yes; then

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

fi

for ac_header in arpa/inet.h sys/fcntl.h sys/select.h fcntl.h sys/time.h sys/unistd.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
echo "$as_me:3400: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 3406 "configure"
#include "confdefs.h"
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:3410: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  egrep -v '^ *\+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:3416: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  eval "$as_ac_Header=yes"
else
  echo "$as_me: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$as_ac_Header=no"
fi
rm -f conftest.err conftest.$ac_ext
fi
echo "$as_me:3435: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
if test `eval echo '${'$as_ac_Header'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
EOF

fi
done

for ac_header in unistd.h utime.h grp.h sys/id.h limits.h memory.h net/if.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
echo "$as_me:3448: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 3454 "configure"
#include "confdefs.h"
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:3458: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  egrep -v '^ *\+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:3464: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  eval "$as_ac_Header=yes"
else
  echo "$as_me: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$as_ac_Header=no"
fi
rm -f conftest.err conftest.$ac_ext
fi
echo "$as_me:3483: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
if test `eval echo '${'$as_ac_Header'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
EOF

fi
done

for ac_header in compat.h rpc/rpc.h rpcsvc/nis.h rpcsvc/yp_prot.h rpcsvc/ypclnt.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
echo "$as_me:3496: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 3502 "configure"
#include "confdefs.h"
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:3506: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  egrep -v '^ *\+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:3512: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  eval "$as_ac_Header=yes"
else
  echo "$as_me: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$as_ac_Header=no"
fi
rm -f conftest.err conftest.$ac_ext
fi
echo "$as_me:3531: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
if test `eval echo '${'$as_ac_Header'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
EOF

fi
done

for ac_header in sys/param.h ctype.h sys/wait.h sys/resource.h sys/ioctl.h sys/ipc.h sys/mode.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
echo "$as_me:3544: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 3550 "configure"
#include "confdefs.h"
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:3554: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  egrep -v '^ *\+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:3560: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  eval "$as_ac_Header=yes"
else
  echo "$as_me: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$as_ac_Header=no"
fi
rm -f conftest.err conftest.$ac_ext
fi
echo "$as_me:3579: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
if test `eval echo '${'$as_ac_Header'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
EOF

fi
done

for ac_header in sys/mman.h sys/filio.h sys/priv.h sys/shm.h string.h strings.h stdlib.h sys/socket.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
echo "$as_me:3592: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 3598 "configure"
#include "confdefs.h"
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:3602: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  egrep -v '^ *\+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:3608: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  eval "$as_ac_Header=yes"
else
  echo "$as_me: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$as_ac_Header=no"
fi
rm -f conftest.err conftest.$ac_ext
fi
echo "$as_me:3627: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
if test `eval echo '${'$as_ac_Header'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
EOF

fi
done

for ac_header in syslog.h sys/syslog.h sys/mount.h sys/vfs.h sys/fs/s5param.h sys/filsys.h termios.h termio.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
echo "$as_me:3640: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 3646 "configure"
#include "confdefs.h"
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:3650: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  egrep -v '^ *\+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:3656: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  eval "$as_ac_Header=yes"
else
  echo "$as_me: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$as_ac_Header=no"
fi
rm -f conftest.err conftest.$ac_ext
fi
echo "$as_me:3675: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
if test `eval echo '${'$as_ac_Header'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
EOF

fi
done

for ac_header in sys/termio.h sys/statfs.h sys/dustat.h sys/statvfs.h stdarg.h sys/sockio.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
echo "$as_me:3688: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 3694 "configure"
#include "confdefs.h"
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:3698: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  egrep -v '^ *\+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:3704: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  eval "$as_ac_Header=yes"
else
  echo "$as_me: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$as_ac_Header=no"
fi
rm -f conftest.err conftest.$ac_ext
fi
echo "$as_me:3723: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
if test `eval echo '${'$as_ac_Header'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
EOF

fi
done

for ac_header in security/pam_modules.h security/_pam_macros.h dlfcn.h synch.h pthread.h nsswitch.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
echo "$as_me:3736: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 3742 "configure"
#include "confdefs.h"
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:3746: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  egrep -v '^ *\+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:3752: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  eval "$as_ac_Header=yes"
else
  echo "$as_me: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$as_ac_Header=no"
fi
rm -f conftest.err conftest.$ac_ext
fi
echo "$as_me:3771: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
if test `eval echo '${'$as_ac_Header'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
EOF

fi
done

#
# HPUX has a bug in that including shadow.h causes a re-definition of MAXINT.
# This causes configure to fail to detect it. Check for shadow separately on HPUX.
#
case "$host_os" in
    *hpux*)
		cat >conftest.$ac_ext <<_ACEOF
#line 3788 "configure"
#include "confdefs.h"
#include <shadow.h>
int
main ()
{
struct spwd testme
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:3800: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:3803: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:3806: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:3809: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_header_shadow_h=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_header_shadow_h=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
		if test x"$ac_cv_header_shadow_h" = x"yes"; then
		   cat >>confdefs.h <<\EOF
#define HAVE_SHADOW_H 1
EOF

		fi
	;;
esac

for ac_header in shadow.h netinet/ip.h netinet/tcp.h netinet/in_systm.h netinet/in_ip.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
echo "$as_me:3830: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 3836 "configure"
#include "confdefs.h"
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:3840: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  egrep -v '^ *\+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:3846: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  eval "$as_ac_Header=yes"
else
  echo "$as_me: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$as_ac_Header=no"
fi
rm -f conftest.err conftest.$ac_ext
fi
echo "$as_me:3865: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
if test `eval echo '${'$as_ac_Header'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
EOF

fi
done

for ac_header in nss.h nss_common.h ns_api.h sys/security.h security/pam_appl.h security/pam_modules.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
echo "$as_me:3878: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 3884 "configure"
#include "confdefs.h"
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:3888: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  egrep -v '^ *\+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:3894: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  eval "$as_ac_Header=yes"
else
  echo "$as_me: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$as_ac_Header=no"
fi
rm -f conftest.err conftest.$ac_ext
fi
echo "$as_me:3913: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
if test `eval echo '${'$as_ac_Header'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
EOF

fi
done

for ac_header in stropts.h poll.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
echo "$as_me:3926: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 3932 "configure"
#include "confdefs.h"
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:3936: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  egrep -v '^ *\+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:3942: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  eval "$as_ac_Header=yes"
else
  echo "$as_me: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$as_ac_Header=no"
fi
rm -f conftest.err conftest.$ac_ext
fi
echo "$as_me:3961: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
if test `eval echo '${'$as_ac_Header'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
EOF

fi
done

for ac_header in sys/capability.h syscall.h sys/syscall.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
echo "$as_me:3974: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 3980 "configure"
#include "confdefs.h"
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:3984: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  egrep -v '^ *\+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:3990: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  eval "$as_ac_Header=yes"
else
  echo "$as_me: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$as_ac_Header=no"
fi
rm -f conftest.err conftest.$ac_ext
fi
echo "$as_me:4009: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
if test `eval echo '${'$as_ac_Header'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
EOF

fi
done

for ac_header in sys/acl.h sys/cdefs.h glob.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
echo "$as_me:4022: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 4028 "configure"
#include "confdefs.h"
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:4032: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  egrep -v '^ *\+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:4038: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  eval "$as_ac_Header=yes"
else
  echo "$as_me: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$as_ac_Header=no"
fi
rm -f conftest.err conftest.$ac_ext
fi
echo "$as_me:4057: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
if test `eval echo '${'$as_ac_Header'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
EOF

fi
done

# For experimental utmp support (lastlog on some BSD-like systems)

for ac_header in utmp.h utmpx.h lastlog.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
echo "$as_me:4072: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 4078 "configure"
#include "confdefs.h"
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:4082: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  egrep -v '^ *\+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:4088: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  eval "$as_ac_Header=yes"
else
  echo "$as_me: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$as_ac_Header=no"
fi
rm -f conftest.err conftest.$ac_ext
fi
echo "$as_me:4107: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
if test `eval echo '${'$as_ac_Header'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
EOF

fi
done

# For quotas on Veritas VxFS filesystems

for ac_header in sys/fs/vx_quota.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
echo "$as_me:4122: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 4128 "configure"
#include "confdefs.h"
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:4132: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  egrep -v '^ *\+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:4138: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  eval "$as_ac_Header=yes"
else
  echo "$as_me: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$as_ac_Header=no"
fi
rm -f conftest.err conftest.$ac_ext
fi
echo "$as_me:4157: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
if test `eval echo '${'$as_ac_Header'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
EOF

fi
done

# For quotas on Linux XFS filesystems

for ac_header in linux/xqm.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
echo "$as_me:4172: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 4178 "configure"
#include "confdefs.h"
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:4182: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  egrep -v '^ *\+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:4188: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  eval "$as_ac_Header=yes"
else
  echo "$as_me: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$as_ac_Header=no"
fi
rm -f conftest.err conftest.$ac_ext
fi
echo "$as_me:4207: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
if test `eval echo '${'$as_ac_Header'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
EOF

fi
done

# On IRIX 5.3, sys/types and inttypes.h are conflicting.

for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
                  inttypes.h stdint.h unistd.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
echo "$as_me:4223: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 4229 "configure"
#include "confdefs.h"
$ac_includes_default
#include <$ac_header>
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:4235: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:4238: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:4241: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:4244: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_Header=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_Header=no"
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:4254: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
if test `eval echo '${'$as_ac_Header'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
EOF

fi
done

echo "$as_me:4264: checking for int" >&5
echo $ECHO_N "checking for int... $ECHO_C" >&6
if test "${ac_cv_type_int+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 4270 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
if ((int *) 0)
  return 0;
if (sizeof (int))
  return 0;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:4285: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:4288: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:4291: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:4294: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_type_int=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_type_int=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:4304: result: $ac_cv_type_int" >&5
echo "${ECHO_T}$ac_cv_type_int" >&6

echo "$as_me:4307: checking size of int" >&5
echo $ECHO_N "checking size of int... $ECHO_C" >&6
if test "${ac_cv_sizeof_int+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test "$ac_cv_type_int" = yes; then
  if test "$cross_compiling" = yes; then
  # Depending upon the size, compute the lo and hi bounds.
cat >conftest.$ac_ext <<_ACEOF
#line 4316 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
int _array_ [1 - 2 * !((sizeof (int)) >= 0)]
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:4328: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:4331: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:4334: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:4337: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_lo=0 ac_mid=0
  while :; do
    cat >conftest.$ac_ext <<_ACEOF
#line 4342 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
int _array_ [1 - 2 * !((sizeof (int)) <= $ac_mid)]
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:4354: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:4357: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:4360: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:4363: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_hi=$ac_mid; break
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
fi
rm -f conftest.$ac_objext conftest.$ac_ext
  done
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_hi=-1 ac_mid=-1
  while :; do
    cat >conftest.$ac_ext <<_ACEOF
#line 4379 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
int _array_ [1 - 2 * !((sizeof (int)) >= $ac_mid)]
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:4391: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:4394: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:4397: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:4400: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_lo=$ac_mid; break
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
fi
rm -f conftest.$ac_objext conftest.$ac_ext
  done
fi
rm -f conftest.$ac_objext conftest.$ac_ext
# Binary search between lo and hi bounds.
while test "x$ac_lo" != "x$ac_hi"; do
  ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
  cat >conftest.$ac_ext <<_ACEOF
#line 4416 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
int _array_ [1 - 2 * !((sizeof (int)) <= $ac_mid)]
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:4428: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:4431: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:4434: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:4437: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_hi=$ac_mid
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_lo=`expr $ac_mid + 1`
fi
rm -f conftest.$ac_objext conftest.$ac_ext
done
ac_cv_sizeof_int=$ac_lo
else
  if test "$cross_compiling" = yes; then
  { { echo "$as_me:4450: error: cannot run test program while cross compiling" >&5
echo "$as_me: error: cannot run test program while cross compiling" >&2;}
   { (exit 1); exit 1; }; }
else
  cat >conftest.$ac_ext <<_ACEOF
#line 4455 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
FILE *f = fopen ("conftest.val", "w");
if (!f)
  exit (1);
fprintf (f, "%d", (sizeof (int)));
fclose (f);
  ;
  return 0;
}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:4471: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:4474: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:4476: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:4479: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_sizeof_int=`cat conftest.val`
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
rm -f conftest.val
else
  ac_cv_sizeof_int=0
fi
fi
echo "$as_me:4495: result: $ac_cv_sizeof_int" >&5
echo "${ECHO_T}$ac_cv_sizeof_int" >&6
cat >>confdefs.h <<EOF
#define SIZEOF_INT $ac_cv_sizeof_int
EOF

echo "$as_me:4501: checking for long" >&5
echo $ECHO_N "checking for long... $ECHO_C" >&6
if test "${ac_cv_type_long+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 4507 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
if ((long *) 0)
  return 0;
if (sizeof (long))
  return 0;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:4522: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:4525: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:4528: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:4531: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_type_long=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_type_long=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:4541: result: $ac_cv_type_long" >&5
echo "${ECHO_T}$ac_cv_type_long" >&6

echo "$as_me:4544: checking size of long" >&5
echo $ECHO_N "checking size of long... $ECHO_C" >&6
if test "${ac_cv_sizeof_long+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test "$ac_cv_type_long" = yes; then
  if test "$cross_compiling" = yes; then
  # Depending upon the size, compute the lo and hi bounds.
cat >conftest.$ac_ext <<_ACEOF
#line 4553 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
int _array_ [1 - 2 * !((sizeof (long)) >= 0)]
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:4565: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:4568: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:4571: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:4574: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_lo=0 ac_mid=0
  while :; do
    cat >conftest.$ac_ext <<_ACEOF
#line 4579 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
int _array_ [1 - 2 * !((sizeof (long)) <= $ac_mid)]
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:4591: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:4594: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:4597: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:4600: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_hi=$ac_mid; break
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
fi
rm -f conftest.$ac_objext conftest.$ac_ext
  done
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_hi=-1 ac_mid=-1
  while :; do
    cat >conftest.$ac_ext <<_ACEOF
#line 4616 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
int _array_ [1 - 2 * !((sizeof (long)) >= $ac_mid)]
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:4628: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:4631: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:4634: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:4637: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_lo=$ac_mid; break
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
fi
rm -f conftest.$ac_objext conftest.$ac_ext
  done
fi
rm -f conftest.$ac_objext conftest.$ac_ext
# Binary search between lo and hi bounds.
while test "x$ac_lo" != "x$ac_hi"; do
  ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
  cat >conftest.$ac_ext <<_ACEOF
#line 4653 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
int _array_ [1 - 2 * !((sizeof (long)) <= $ac_mid)]
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:4665: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:4668: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:4671: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:4674: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_hi=$ac_mid
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_lo=`expr $ac_mid + 1`
fi
rm -f conftest.$ac_objext conftest.$ac_ext
done
ac_cv_sizeof_long=$ac_lo
else
  if test "$cross_compiling" = yes; then
  { { echo "$as_me:4687: error: cannot run test program while cross compiling" >&5
echo "$as_me: error: cannot run test program while cross compiling" >&2;}
   { (exit 1); exit 1; }; }
else
  cat >conftest.$ac_ext <<_ACEOF
#line 4692 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
FILE *f = fopen ("conftest.val", "w");
if (!f)
  exit (1);
fprintf (f, "%d", (sizeof (long)));
fclose (f);
  ;
  return 0;
}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:4708: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:4711: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:4713: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:4716: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_sizeof_long=`cat conftest.val`
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
rm -f conftest.val
else
  ac_cv_sizeof_long=0
fi
fi
echo "$as_me:4732: result: $ac_cv_sizeof_long" >&5
echo "${ECHO_T}$ac_cv_sizeof_long" >&6
cat >>confdefs.h <<EOF
#define SIZEOF_LONG $ac_cv_sizeof_long
EOF

echo "$as_me:4738: checking for short" >&5
echo $ECHO_N "checking for short... $ECHO_C" >&6
if test "${ac_cv_type_short+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 4744 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
if ((short *) 0)
  return 0;
if (sizeof (short))
  return 0;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:4759: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:4762: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:4765: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:4768: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_type_short=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_type_short=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:4778: result: $ac_cv_type_short" >&5
echo "${ECHO_T}$ac_cv_type_short" >&6

echo "$as_me:4781: checking size of short" >&5
echo $ECHO_N "checking size of short... $ECHO_C" >&6
if test "${ac_cv_sizeof_short+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test "$ac_cv_type_short" = yes; then
  if test "$cross_compiling" = yes; then
  # Depending upon the size, compute the lo and hi bounds.
cat >conftest.$ac_ext <<_ACEOF
#line 4790 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
int _array_ [1 - 2 * !((sizeof (short)) >= 0)]
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:4802: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:4805: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:4808: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:4811: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_lo=0 ac_mid=0
  while :; do
    cat >conftest.$ac_ext <<_ACEOF
#line 4816 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
int _array_ [1 - 2 * !((sizeof (short)) <= $ac_mid)]
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:4828: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:4831: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:4834: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:4837: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_hi=$ac_mid; break
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
fi
rm -f conftest.$ac_objext conftest.$ac_ext
  done
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_hi=-1 ac_mid=-1
  while :; do
    cat >conftest.$ac_ext <<_ACEOF
#line 4853 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
int _array_ [1 - 2 * !((sizeof (short)) >= $ac_mid)]
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:4865: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:4868: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:4871: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:4874: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_lo=$ac_mid; break
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
fi
rm -f conftest.$ac_objext conftest.$ac_ext
  done
fi
rm -f conftest.$ac_objext conftest.$ac_ext
# Binary search between lo and hi bounds.
while test "x$ac_lo" != "x$ac_hi"; do
  ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
  cat >conftest.$ac_ext <<_ACEOF
#line 4890 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
int _array_ [1 - 2 * !((sizeof (short)) <= $ac_mid)]
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:4902: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:4905: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:4908: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:4911: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_hi=$ac_mid
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_lo=`expr $ac_mid + 1`
fi
rm -f conftest.$ac_objext conftest.$ac_ext
done
ac_cv_sizeof_short=$ac_lo
else
  if test "$cross_compiling" = yes; then
  { { echo "$as_me:4924: error: cannot run test program while cross compiling" >&5
echo "$as_me: error: cannot run test program while cross compiling" >&2;}
   { (exit 1); exit 1; }; }
else
  cat >conftest.$ac_ext <<_ACEOF
#line 4929 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
FILE *f = fopen ("conftest.val", "w");
if (!f)
  exit (1);
fprintf (f, "%d", (sizeof (short)));
fclose (f);
  ;
  return 0;
}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:4945: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:4948: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:4950: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:4953: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_sizeof_short=`cat conftest.val`
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
rm -f conftest.val
else
  ac_cv_sizeof_short=0
fi
fi
echo "$as_me:4969: result: $ac_cv_sizeof_short" >&5
echo "${ECHO_T}$ac_cv_sizeof_short" >&6
cat >>confdefs.h <<EOF
#define SIZEOF_SHORT $ac_cv_sizeof_short
EOF

echo "$as_me:4975: checking for an ANSI C-conforming const" >&5
echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
if test "${ac_cv_c_const+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 4981 "configure"
#include "confdefs.h"

int
main ()
{
/* FIXME: Include the comments suggested by Paul. */
#ifndef __cplusplus
  /* Ultrix mips cc rejects this.  */
  typedef int charset[2];
  const charset x;
  /* SunOS 4.1.1 cc rejects this.  */
  char const *const *ccp;
  char **p;
  /* NEC SVR4.0.2 mips cc rejects this.  */
  struct point {int x, y;};
  static struct point const zero = {0,0};
  /* AIX XL C 1.02.0.0 rejects this.
     It does not let you subtract one const X* pointer from another in
     an arm of an if-expression whose if-part is not a constant
     expression */
  const char *g = "string";
  ccp = &g + (g ? g-g : 0);
  /* HPUX 7.0 cc rejects these. */
  ++ccp;
  p = (char**) ccp;
  ccp = (char const *const *) p;
  { /* SCO 3.2v4 cc rejects this.  */
    char *t;
    char const *s = 0 ? (char *) 0 : (char const *) 0;

    *t++ = 0;
  }
  { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
    int x[] = {25, 17};
    const int *foo = &x[0];
    ++foo;
  }
  { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
    typedef const int *iptr;
    iptr p = 0;
    ++p;
  }
  { /* AIX XL C 1.02.0.0 rejects this saying
       "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
    struct s { int j; const int *ap[3]; };
    struct s *b; b->j = 5;
  }
  { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
    const int foo = 10;
  }
#endif

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:5039: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:5042: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:5045: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:5048: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_c_const=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_c_const=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:5058: result: $ac_cv_c_const" >&5
echo "${ECHO_T}$ac_cv_c_const" >&6
if test $ac_cv_c_const = no; then

cat >>confdefs.h <<\EOF
#define const
EOF

fi

echo "$as_me:5068: checking for inline" >&5
echo $ECHO_N "checking for inline... $ECHO_C" >&6
if test "${ac_cv_c_inline+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_cv_c_inline=no
for ac_kw in inline __inline__ __inline; do
  cat >conftest.$ac_ext <<_ACEOF
#line 5076 "configure"
#include "confdefs.h"
#ifndef __cplusplus
static $ac_kw int static_foo () {return 0; }
$ac_kw int foo () {return 0; }
#endif

_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:5085: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:5088: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:5091: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:5094: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_c_inline=$ac_kw; break
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest.$ac_objext conftest.$ac_ext
done

fi
echo "$as_me:5105: result: $ac_cv_c_inline" >&5
echo "${ECHO_T}$ac_cv_c_inline" >&6
case $ac_cv_c_inline in
  inline | yes) ;;
  no)
cat >>confdefs.h <<\EOF
#define inline
EOF
 ;;
  *)  cat >>confdefs.h <<EOF
#define inline $ac_cv_c_inline
EOF
 ;;
esac

echo "$as_me:5120: checking whether byte ordering is bigendian" >&5
echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
if test "${ac_cv_c_bigendian+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_cv_c_bigendian=unknown
# See if sys/param.h defines the BYTE_ORDER macro.
cat >conftest.$ac_ext <<_ACEOF
#line 5128 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/param.h>

int
main ()
{
#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
 bogus endian macros
#endif

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:5145: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:5148: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:5151: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:5154: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  # It does; now see whether it defined to BIG_ENDIAN or not.
cat >conftest.$ac_ext <<_ACEOF
#line 5158 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/param.h>

int
main ()
{
#if BYTE_ORDER != BIG_ENDIAN
 not big endian
#endif

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:5175: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:5178: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:5181: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:5184: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_c_bigendian=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_c_bigendian=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest.$ac_objext conftest.$ac_ext
if test $ac_cv_c_bigendian = unknown; then
if test "$cross_compiling" = yes; then
  { { echo "$as_me:5200: error: cannot run test program while cross compiling" >&5
echo "$as_me: error: cannot run test program while cross compiling" >&2;}
   { (exit 1); exit 1; }; }
else
  cat >conftest.$ac_ext <<_ACEOF
#line 5205 "configure"
#include "confdefs.h"
int
main ()
{
  /* Are we little or big endian?  From Harbison&Steele.  */
  union
  {
    long l;
    char c[sizeof (long)];
  } u;
  u.l = 1;
  exit (u.c[sizeof (long) - 1] == 1);
}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:5221: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:5224: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:5226: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:5229: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_c_bigendian=no
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_c_bigendian=yes
fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
fi
echo "$as_me:5242: result: $ac_cv_c_bigendian" >&5
echo "${ECHO_T}$ac_cv_c_bigendian" >&6
if test $ac_cv_c_bigendian = yes; then

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

fi

echo "$as_me:5252: checking whether char is unsigned" >&5
echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6
if test "${ac_cv_c_char_unsigned+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 5258 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
int _array_ [1 - 2 * !(((char) -1) < 0)]
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:5270: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:5273: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:5276: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:5279: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_c_char_unsigned=no
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_c_char_unsigned=yes
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:5289: result: $ac_cv_c_char_unsigned" >&5
echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6
if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
  cat >>confdefs.h <<\EOF
#define __CHAR_UNSIGNED__ 1
EOF

fi

echo "$as_me:5298: checking return type of signal handlers" >&5
echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
if test "${ac_cv_type_signal+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 5304 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <signal.h>
#ifdef signal
# undef signal
#endif
#ifdef __cplusplus
extern "C" void (*signal (int, void (*)(int)))(int);
#else
void (*signal ()) ();
#endif

int
main ()
{
int i;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:5326: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:5329: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:5332: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:5335: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_type_signal=void
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_type_signal=int
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:5345: result: $ac_cv_type_signal" >&5
echo "${ECHO_T}$ac_cv_type_signal" >&6

cat >>confdefs.h <<EOF
#define RETSIGTYPE $ac_cv_type_signal
EOF

echo "$as_me:5352: checking for uid_t in sys/types.h" >&5
echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
if test "${ac_cv_type_uid_t+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 5358 "configure"
#include "confdefs.h"
#include <sys/types.h>

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

fi
echo "$as_me:5372: result: $ac_cv_type_uid_t" >&5
echo "${ECHO_T}$ac_cv_type_uid_t" >&6
if test $ac_cv_type_uid_t = no; then

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

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

fi

echo "$as_me:5386: checking for mode_t" >&5
echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
if test "${ac_cv_type_mode_t+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 5392 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
if ((mode_t *) 0)
  return 0;
if (sizeof (mode_t))
  return 0;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:5407: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:5410: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:5413: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:5416: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_type_mode_t=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_type_mode_t=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:5426: result: $ac_cv_type_mode_t" >&5
echo "${ECHO_T}$ac_cv_type_mode_t" >&6
if test $ac_cv_type_mode_t = yes; then
  :
else

cat >>confdefs.h <<EOF
#define mode_t int
EOF

fi

echo "$as_me:5438: checking for off_t" >&5
echo $ECHO_N "checking for off_t... $ECHO_C" >&6
if test "${ac_cv_type_off_t+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 5444 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
if ((off_t *) 0)
  return 0;
if (sizeof (off_t))
  return 0;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:5459: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:5462: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:5465: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:5468: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_type_off_t=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_type_off_t=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:5478: result: $ac_cv_type_off_t" >&5
echo "${ECHO_T}$ac_cv_type_off_t" >&6
if test $ac_cv_type_off_t = yes; then
  :
else

cat >>confdefs.h <<EOF
#define off_t long
EOF

fi

echo "$as_me:5490: checking for size_t" >&5
echo $ECHO_N "checking for size_t... $ECHO_C" >&6
if test "${ac_cv_type_size_t+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 5496 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
if ((size_t *) 0)
  return 0;
if (sizeof (size_t))
  return 0;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:5511: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:5514: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:5517: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:5520: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_type_size_t=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_type_size_t=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:5530: result: $ac_cv_type_size_t" >&5
echo "${ECHO_T}$ac_cv_type_size_t" >&6
if test $ac_cv_type_size_t = yes; then
  :
else

cat >>confdefs.h <<EOF
#define size_t unsigned
EOF

fi

echo "$as_me:5542: checking for pid_t" >&5
echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
if test "${ac_cv_type_pid_t+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 5548 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
if ((pid_t *) 0)
  return 0;
if (sizeof (pid_t))
  return 0;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:5563: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:5566: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:5569: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:5572: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_type_pid_t=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_type_pid_t=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:5582: result: $ac_cv_type_pid_t" >&5
echo "${ECHO_T}$ac_cv_type_pid_t" >&6
if test $ac_cv_type_pid_t = yes; then
  :
else

cat >>confdefs.h <<EOF
#define pid_t int
EOF

fi

echo "$as_me:5594: checking for struct stat.st_rdev" >&5
echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6
if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 5600 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
static struct stat ac_aggr;
if (ac_aggr.st_rdev)
return 0;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:5614: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:5617: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:5620: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:5623: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_member_struct_stat_st_rdev=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_member_struct_stat_st_rdev=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:5633: result: $ac_cv_member_struct_stat_st_rdev" >&5
echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6
if test $ac_cv_member_struct_stat_st_rdev = yes; then

cat >>confdefs.h <<EOF
#define HAVE_STRUCT_STAT_ST_RDEV 1
EOF

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

fi

echo "$as_me:5647: checking for d_off in dirent" >&5
echo $ECHO_N "checking for d_off in dirent... $ECHO_C" >&6
if test "${ac_cv_dirent_d_off+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 5653 "configure"
#include "confdefs.h"

#include <unistd.h>
#include <sys/types.h>
#include <dirent.h>
int
main ()
{
struct dirent d; d.d_off;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:5668: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:5671: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:5674: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:5677: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_dirent_d_off=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_dirent_d_off=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:5687: result: $ac_cv_dirent_d_off" >&5
echo "${ECHO_T}$ac_cv_dirent_d_off" >&6
if test $ac_cv_dirent_d_off = yes; then
  cat >>confdefs.h <<\EOF
#define HAVE_DIRENT_D_OFF 1
EOF

fi

echo "$as_me:5696: checking for ino_t" >&5
echo $ECHO_N "checking for ino_t... $ECHO_C" >&6
if test "${ac_cv_type_ino_t+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 5702 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
if ((ino_t *) 0)
  return 0;
if (sizeof (ino_t))
  return 0;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:5717: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:5720: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:5723: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:5726: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_type_ino_t=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_type_ino_t=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:5736: result: $ac_cv_type_ino_t" >&5
echo "${ECHO_T}$ac_cv_type_ino_t" >&6
if test $ac_cv_type_ino_t = yes; then
  :
else

cat >>confdefs.h <<EOF
#define ino_t unsigned
EOF

fi

echo "$as_me:5748: checking for loff_t" >&5
echo $ECHO_N "checking for loff_t... $ECHO_C" >&6
if test "${ac_cv_type_loff_t+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 5754 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
if ((loff_t *) 0)
  return 0;
if (sizeof (loff_t))
  return 0;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:5769: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:5772: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:5775: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:5778: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_type_loff_t=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_type_loff_t=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:5788: result: $ac_cv_type_loff_t" >&5
echo "${ECHO_T}$ac_cv_type_loff_t" >&6
if test $ac_cv_type_loff_t = yes; then
  :
else

cat >>confdefs.h <<EOF
#define loff_t off_t
EOF

fi

echo "$as_me:5800: checking for offset_t" >&5
echo $ECHO_N "checking for offset_t... $ECHO_C" >&6
if test "${ac_cv_type_offset_t+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 5806 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
if ((offset_t *) 0)
  return 0;
if (sizeof (offset_t))
  return 0;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:5821: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:5824: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:5827: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:5830: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_type_offset_t=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_type_offset_t=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:5840: result: $ac_cv_type_offset_t" >&5
echo "${ECHO_T}$ac_cv_type_offset_t" >&6
if test $ac_cv_type_offset_t = yes; then
  :
else

cat >>confdefs.h <<EOF
#define offset_t loff_t
EOF

fi

echo "$as_me:5852: checking for ssize_t" >&5
echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
if test "${ac_cv_type_ssize_t+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 5858 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
if ((ssize_t *) 0)
  return 0;
if (sizeof (ssize_t))
  return 0;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:5873: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:5876: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:5879: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:5882: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_type_ssize_t=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_type_ssize_t=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:5892: result: $ac_cv_type_ssize_t" >&5
echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
if test $ac_cv_type_ssize_t = yes; then
  :
else

cat >>confdefs.h <<EOF
#define ssize_t int
EOF

fi

echo "$as_me:5904: checking for wchar_t" >&5
echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
if test "${ac_cv_type_wchar_t+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 5910 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
if ((wchar_t *) 0)
  return 0;
if (sizeof (wchar_t))
  return 0;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:5925: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:5928: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:5931: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:5934: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_type_wchar_t=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_type_wchar_t=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:5944: result: $ac_cv_type_wchar_t" >&5
echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
if test $ac_cv_type_wchar_t = yes; then
  :
else

cat >>confdefs.h <<EOF
#define wchar_t unsigned short
EOF

fi

############################################
# for cups support we need libcups, and a handful of header files

echo "$as_me:5959: checking for httpConnect in -lcups" >&5
echo $ECHO_N "checking for httpConnect in -lcups... $ECHO_C" >&6
if test "${ac_cv_lib_cups_httpConnect+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lcups  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 5967 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char httpConnect ();
int
main ()
{
httpConnect ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:5986: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:5989: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:5992: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:5995: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_cups_httpConnect=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_cups_httpConnect=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:6006: result: $ac_cv_lib_cups_httpConnect" >&5
echo "${ECHO_T}$ac_cv_lib_cups_httpConnect" >&6
if test $ac_cv_lib_cups_httpConnect = yes; then
  cat >>confdefs.h <<EOF
#define HAVE_LIBCUPS 1
EOF

  LIBS="-lcups $LIBS"

fi

# I wonder if there is a nicer way of doing this?

if test x"$ac_cv_lib_cups_httpConnect" = x"yes"; then

for ac_header in cups/cups.h cups/language.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
echo "$as_me:6024: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 6030 "configure"
#include "confdefs.h"
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:6034: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  egrep -v '^ *\+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:6040: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  eval "$as_ac_Header=yes"
else
  echo "$as_me: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$as_ac_Header=no"
fi
rm -f conftest.err conftest.$ac_ext
fi
echo "$as_me:6059: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
if test `eval echo '${'$as_ac_Header'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
EOF

fi
done

        if test x"$ac_cv_header_cups_cups_h" = x"yes"; then
                if test x"$ac_cv_header_cups_language_h" = x"yes"; then
                        cat >>confdefs.h <<\EOF
#define HAVE_CUPS 1
EOF

                fi
        fi
fi

############################################
# we need dlopen/dlclose/dlsym/dlerror for PAM, the password database plugins and the new VFS code

for ac_func in dlopen
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:6085: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 6091 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func (); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char $ac_func ();
char (*f) ();

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

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:6122: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:6125: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:6128: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:6131: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:6141: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF

fi
done

if test x"$ac_cv_func_dlopen" = x"no"; then
	echo "$as_me:6152: checking for dlopen in -ldl" >&5
echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
if test "${ac_cv_lib_dl_dlopen+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-ldl  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 6160 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char dlopen ();
int
main ()
{
dlopen ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:6179: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:6182: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:6185: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:6188: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_dl_dlopen=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_dl_dlopen=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:6199: result: $ac_cv_lib_dl_dlopen" >&5
echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
if test $ac_cv_lib_dl_dlopen = yes; then
  LIBS="$LIBS -ldl";
	cat >>confdefs.h <<\EOF
#define HAVE_DLOPEN 1
EOF

fi

fi
# dlopen/dlclose/dlsym/dlerror will be checked again later and defines will be set then

############################################
# check if the compiler can do immediate structures
echo "$as_me:6214: checking for immediate structures" >&5
echo $ECHO_N "checking for immediate structures... $ECHO_C" >&6
if test "${samba_cv_immediate_structures+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

    cat >conftest.$ac_ext <<_ACEOF
#line 6221 "configure"
#include "confdefs.h"

#include <stdio.h>
int
main ()
{

	typedef struct {unsigned x;} FOOBAR;
#define X_FOOBAR(x) ((FOOBAR) { x })
#define FOO_ONE X_FOOBAR(1)
	FOOBAR f = FOO_ONE;
	static struct {
	FOOBAR y;
	} f2[] = {
		{FOO_ONE}
	};

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:6244: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:6247: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:6250: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:6253: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  samba_cv_immediate_structures=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
samba_cv_immediate_structures=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:6263: result: $samba_cv_immediate_structures" >&5
echo "${ECHO_T}$samba_cv_immediate_structures" >&6
if test x"$samba_cv_immediate_structures" = x"yes"; then
   cat >>confdefs.h <<\EOF
#define HAVE_IMMEDIATE_STRUCTURES 1
EOF

fi

############################################
# check for unix domain sockets
echo "$as_me:6274: checking for unix domain sockets" >&5
echo $ECHO_N "checking for unix domain sockets... $ECHO_C" >&6
if test "${samba_cv_unixsocket+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

    cat >conftest.$ac_ext <<_ACEOF
#line 6281 "configure"
#include "confdefs.h"

#include <sys/types.h>
#include <stdlib.h>
#include <stddef.h>
#include <sys/socket.h>
#include <sys/un.h>
int
main ()
{

  struct sockaddr_un sunaddr;
  sunaddr.sun_family = AF_UNIX;

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:6301: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:6304: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:6307: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:6310: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  samba_cv_unixsocket=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
samba_cv_unixsocket=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:6320: result: $samba_cv_unixsocket" >&5
echo "${ECHO_T}$samba_cv_unixsocket" >&6
if test x"$samba_cv_unixsocket" = x"yes"; then
   cat >>confdefs.h <<\EOF
#define HAVE_UNIXSOCKET 1
EOF

fi

echo "$as_me:6329: checking for socklen_t type" >&5
echo $ECHO_N "checking for socklen_t type... $ECHO_C" >&6
if test "${samba_cv_socklen_t+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

    cat >conftest.$ac_ext <<_ACEOF
#line 6336 "configure"
#include "confdefs.h"

#include <sys/types.h>
#if STDC_HEADERS
#include <stdlib.h>
#include <stddef.h>
#endif
#include <sys/socket.h>
int
main ()
{
socklen_t i = 0
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:6354: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:6357: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:6360: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:6363: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  samba_cv_socklen_t=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
samba_cv_socklen_t=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:6373: result: $samba_cv_socklen_t" >&5
echo "${ECHO_T}$samba_cv_socklen_t" >&6
if test x"$samba_cv_socklen_t" = x"yes"; then
   cat >>confdefs.h <<\EOF
#define HAVE_SOCKLEN_T_TYPE 1
EOF

fi

echo "$as_me:6382: checking for sig_atomic_t type" >&5
echo $ECHO_N "checking for sig_atomic_t type... $ECHO_C" >&6
if test "${samba_cv_sig_atomic_t+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

    cat >conftest.$ac_ext <<_ACEOF
#line 6389 "configure"
#include "confdefs.h"

#include <sys/types.h>
#if STDC_HEADERS
#include <stdlib.h>
#include <stddef.h>
#endif
#include <signal.h>
int
main ()
{
sig_atomic_t i = 0
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:6407: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:6410: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:6413: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:6416: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  samba_cv_sig_atomic_t=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
samba_cv_sig_atomic_t=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:6426: result: $samba_cv_sig_atomic_t" >&5
echo "${ECHO_T}$samba_cv_sig_atomic_t" >&6
if test x"$samba_cv_sig_atomic_t" = x"yes"; then
   cat >>confdefs.h <<\EOF
#define HAVE_SIG_ATOMIC_T_TYPE 1
EOF

fi

# stupid headers have the functions but no declaration. grrrr.

 echo "$as_me:6437: checking for errno declaration" >&5
echo $ECHO_N "checking for errno declaration... $ECHO_C" >&6
if test "${ac_cv_have_errno_decl+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

    cat >conftest.$ac_ext <<_ACEOF
#line 6444 "configure"
#include "confdefs.h"
#include <errno.h>
int
main ()
{
int i = (int)errno
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:6456: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:6459: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:6462: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:6465: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_have_errno_decl=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_have_errno_decl=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:6475: result: $ac_cv_have_errno_decl" >&5
echo "${ECHO_T}$ac_cv_have_errno_decl" >&6
 if test x"$ac_cv_have_errno_decl" = x"yes"; then
    cat >>confdefs.h <<\EOF
#define HAVE_ERRNO_DECL 1
EOF

 fi

 echo "$as_me:6484: checking for setresuid declaration" >&5
echo $ECHO_N "checking for setresuid declaration... $ECHO_C" >&6
if test "${ac_cv_have_setresuid_decl+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

    cat >conftest.$ac_ext <<_ACEOF
#line 6491 "configure"
#include "confdefs.h"
#include <unistd.h>
int
main ()
{
int i = (int)setresuid
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:6503: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:6506: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:6509: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:6512: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_have_setresuid_decl=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_have_setresuid_decl=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:6522: result: $ac_cv_have_setresuid_decl" >&5
echo "${ECHO_T}$ac_cv_have_setresuid_decl" >&6
 if test x"$ac_cv_have_setresuid_decl" = x"yes"; then
    cat >>confdefs.h <<\EOF
#define HAVE_SETRESUID_DECL 1
EOF

 fi

 echo "$as_me:6531: checking for setresgid declaration" >&5
echo $ECHO_N "checking for setresgid declaration... $ECHO_C" >&6
if test "${ac_cv_have_setresgid_decl+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

    cat >conftest.$ac_ext <<_ACEOF
#line 6538 "configure"
#include "confdefs.h"
#include <unistd.h>
int
main ()
{
int i = (int)setresgid
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:6550: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:6553: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:6556: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:6559: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_have_setresgid_decl=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_have_setresgid_decl=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:6569: result: $ac_cv_have_setresgid_decl" >&5
echo "${ECHO_T}$ac_cv_have_setresgid_decl" >&6
 if test x"$ac_cv_have_setresgid_decl" = x"yes"; then
    cat >>confdefs.h <<\EOF
#define HAVE_SETRESGID_DECL 1
EOF

 fi

 echo "$as_me:6578: checking for asprintf declaration" >&5
echo $ECHO_N "checking for asprintf declaration... $ECHO_C" >&6
if test "${ac_cv_have_asprintf_decl+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

    cat >conftest.$ac_ext <<_ACEOF
#line 6585 "configure"
#include "confdefs.h"
#include <stdio.h>
int
main ()
{
int i = (int)asprintf
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:6597: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:6600: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:6603: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:6606: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_have_asprintf_decl=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_have_asprintf_decl=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:6616: result: $ac_cv_have_asprintf_decl" >&5
echo "${ECHO_T}$ac_cv_have_asprintf_decl" >&6
 if test x"$ac_cv_have_asprintf_decl" = x"yes"; then
    cat >>confdefs.h <<\EOF
#define HAVE_ASPRINTF_DECL 1
EOF

 fi

 echo "$as_me:6625: checking for vasprintf declaration" >&5
echo $ECHO_N "checking for vasprintf declaration... $ECHO_C" >&6
if test "${ac_cv_have_vasprintf_decl+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

    cat >conftest.$ac_ext <<_ACEOF
#line 6632 "configure"
#include "confdefs.h"
#include <stdio.h>
int
main ()
{
int i = (int)vasprintf
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:6644: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:6647: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:6650: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:6653: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_have_vasprintf_decl=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_have_vasprintf_decl=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:6663: result: $ac_cv_have_vasprintf_decl" >&5
echo "${ECHO_T}$ac_cv_have_vasprintf_decl" >&6
 if test x"$ac_cv_have_vasprintf_decl" = x"yes"; then
    cat >>confdefs.h <<\EOF
#define HAVE_VASPRINTF_DECL 1
EOF

 fi

 echo "$as_me:6672: checking for vsnprintf declaration" >&5
echo $ECHO_N "checking for vsnprintf declaration... $ECHO_C" >&6
if test "${ac_cv_have_vsnprintf_decl+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

    cat >conftest.$ac_ext <<_ACEOF
#line 6679 "configure"
#include "confdefs.h"
#include <stdio.h>
int
main ()
{
int i = (int)vsnprintf
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:6691: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:6694: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:6697: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:6700: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_have_vsnprintf_decl=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_have_vsnprintf_decl=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:6710: result: $ac_cv_have_vsnprintf_decl" >&5
echo "${ECHO_T}$ac_cv_have_vsnprintf_decl" >&6
 if test x"$ac_cv_have_vsnprintf_decl" = x"yes"; then
    cat >>confdefs.h <<\EOF
#define HAVE_VSNPRINTF_DECL 1
EOF

 fi

 echo "$as_me:6719: checking for snprintf declaration" >&5
echo $ECHO_N "checking for snprintf declaration... $ECHO_C" >&6
if test "${ac_cv_have_snprintf_decl+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

    cat >conftest.$ac_ext <<_ACEOF
#line 6726 "configure"
#include "confdefs.h"
#include <stdio.h>
int
main ()
{
int i = (int)snprintf
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:6738: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:6741: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:6744: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:6747: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_have_snprintf_decl=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_have_snprintf_decl=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:6757: result: $ac_cv_have_snprintf_decl" >&5
echo "${ECHO_T}$ac_cv_have_snprintf_decl" >&6
 if test x"$ac_cv_have_snprintf_decl" = x"yes"; then
    cat >>confdefs.h <<\EOF
#define HAVE_SNPRINTF_DECL 1
EOF

 fi

# and glibc has setresuid under linux but the function does
# nothing until kernel 2.1.44! very dumb.
echo "$as_me:6768: checking for real setresuid" >&5
echo $ECHO_N "checking for real setresuid... $ECHO_C" >&6
if test "${samba_cv_have_setresuid+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

    if test "$cross_compiling" = yes; then
  samba_cv_have_setresuid=cross
else
  cat >conftest.$ac_ext <<_ACEOF
#line 6778 "configure"
#include "confdefs.h"
#include <errno.h>
main() { setresuid(1,1,1); setresuid(2,2,2); exit(errno==EPERM?0:1);}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:6784: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:6787: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:6789: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:6792: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  samba_cv_have_setresuid=yes
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
samba_cv_have_setresuid=no
fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
echo "$as_me:6804: result: $samba_cv_have_setresuid" >&5
echo "${ECHO_T}$samba_cv_have_setresuid" >&6
if test x"$samba_cv_have_setresuid" = x"yes"; then
    cat >>confdefs.h <<\EOF
#define HAVE_SETRESUID 1
EOF

fi

# Do the same check for setresguid...
#
echo "$as_me:6815: checking for real setresgid" >&5
echo $ECHO_N "checking for real setresgid... $ECHO_C" >&6
if test "${samba_cv_have_setresgid+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

    if test "$cross_compiling" = yes; then
  samba_cv_have_setresgid=cross
else
  cat >conftest.$ac_ext <<_ACEOF
#line 6825 "configure"
#include "confdefs.h"
#include <unistd.h>
#include <errno.h>
main() { errno = 0; setresgid(1,1,1); exit(errno != 0 ? (errno==EPERM ? 0 : 1) : 0);}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:6832: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:6835: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:6837: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:6840: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  samba_cv_have_setresgid=yes
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
samba_cv_have_setresgid=no
fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
echo "$as_me:6852: result: $samba_cv_have_setresgid" >&5
echo "${ECHO_T}$samba_cv_have_setresgid" >&6
if test x"$samba_cv_have_setresgid" = x"yes"; then
    cat >>confdefs.h <<\EOF
#define HAVE_SETRESGID 1
EOF

fi

echo "$as_me:6861: checking for working memcmp" >&5
echo $ECHO_N "checking for working memcmp... $ECHO_C" >&6
if test "${ac_cv_func_memcmp_working+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_func_memcmp_working=no
else
  cat >conftest.$ac_ext <<_ACEOF
#line 6870 "configure"
#include "confdefs.h"

int
main ()
{

  /* Some versions of memcmp are not 8-bit clean.  */
  char c0 = 0x40, c1 = 0x80, c2 = 0x81;
  if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0)
    exit (1);

  /* The Next x86 OpenStep bug shows up only when comparing 16 bytes
     or more and with at least one buffer not starting on a 4-byte boundary.
     William Lewis provided this test program.   */
  {
    char foo[21];
    char bar[21];
    int i;
    for (i = 0; i < 4; i++)
      {
        char *a = foo + i;
        char *b = bar + i;
        strcpy (a, "--------01111111");
        strcpy (b, "--------10000000");
        if (memcmp (a, b, 16) >= 0)
          exit (1);
      }
    exit (0);
  }

  ;
  return 0;
}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:6906: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:6909: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:6911: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:6914: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_func_memcmp_working=yes
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_func_memcmp_working=no
fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
echo "$as_me:6926: result: $ac_cv_func_memcmp_working" >&5
echo "${ECHO_T}$ac_cv_func_memcmp_working" >&6
test $ac_cv_func_memcmp_working = no && LIBOBJS="$LIBOBJS memcmp.$ac_objext"

###############################################
# Readline included by default unless explicitly asked not to
test "${with_readline+set}" != "set" && with_readline=yes

# test for where we get readline() from
echo "$as_me:6935: checking whether to use readline" >&5
echo $ECHO_N "checking whether to use readline... $ECHO_C" >&6

# Check whether --with-readline or --without-readline was given.
if test "${with_readline+set}" = set; then
  withval="$with_readline"
    case "$with_readline" in
  yes)
    echo "$as_me:6943: result: yes" >&5
echo "${ECHO_T}yes" >&6

for ac_header in readline.h history.h readline/readline.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
echo "$as_me:6949: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 6955 "configure"
#include "confdefs.h"
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:6959: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  egrep -v '^ *\+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:6965: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  eval "$as_ac_Header=yes"
else
  echo "$as_me: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$as_ac_Header=no"
fi
rm -f conftest.err conftest.$ac_ext
fi
echo "$as_me:6984: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
if test `eval echo '${'$as_ac_Header'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
EOF

fi
done

for ac_header in readline/history.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
echo "$as_me:6997: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 7003 "configure"
#include "confdefs.h"
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:7007: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  egrep -v '^ *\+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:7013: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  eval "$as_ac_Header=yes"
else
  echo "$as_me: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$as_ac_Header=no"
fi
rm -f conftest.err conftest.$ac_ext
fi
echo "$as_me:7032: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
if test `eval echo '${'$as_ac_Header'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
EOF

fi
done

for ac_header in readline.h readline/readline.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
echo "$as_me:7045: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 7051 "configure"
#include "confdefs.h"
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:7055: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  egrep -v '^ *\+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:7061: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  eval "$as_ac_Header=yes"
else
  echo "$as_me: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$as_ac_Header=no"
fi
rm -f conftest.err conftest.$ac_ext
fi
echo "$as_me:7080: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
if test `eval echo '${'$as_ac_Header'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
EOF

      for termlib in ncurses curses termcap terminfo termlib; do
       as_ac_Lib=`echo "ac_cv_lib_${termlib}''_tgetent" | $as_tr_sh`
echo "$as_me:7089: checking for tgetent in -l${termlib}" >&5
echo $ECHO_N "checking for tgetent in -l${termlib}... $ECHO_C" >&6
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-l${termlib}  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 7097 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char tgetent ();
int
main ()
{
tgetent ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:7116: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:7119: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:7122: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:7125: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_Lib=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_Lib=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:7136: result: `eval echo '${'$as_ac_Lib'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
  TERMLIBS="-l${termlib}"; break
fi

      done
      echo "$as_me:7143: checking for rl_callback_handler_install in -lreadline" >&5
echo $ECHO_N "checking for rl_callback_handler_install in -lreadline... $ECHO_C" >&6
if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lreadline $TERMLIBS $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 7151 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char rl_callback_handler_install ();
int
main ()
{
rl_callback_handler_install ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:7170: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:7173: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:7176: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:7179: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_readline_rl_callback_handler_install=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_readline_rl_callback_handler_install=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:7190: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
echo "${ECHO_T}$ac_cv_lib_readline_rl_callback_handler_install" >&6
if test $ac_cv_lib_readline_rl_callback_handler_install = yes; then
  TERMLIBS="-lreadline $TERMLIBS"
       cat >>confdefs.h <<\EOF
#define HAVE_LIBREADLINE 1
EOF

       break
else
  TERMLIBS=
fi

fi
done

    ;;
  no)
    echo "$as_me:7208: result: no" >&5
echo "${ECHO_T}no" >&6
    ;;
  *)
    echo "$as_me:7212: result: yes" >&5
echo "${ECHO_T}yes" >&6

    # Needed for AC_CHECK_HEADERS and AC_CHECK_LIB to look at
    # alternate readline path
    _ldflags=${LDFLAGS}
    _cppflags=${CPPFLAGS}

    # Add additional search path
    LDFLAGS="-L$with_readline/lib $LDFLAGS"
    CPPFLAGS="-I$with_readline/include $CPPFLAGS"

for ac_header in readline.h history.h readline/readline.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
echo "$as_me:7227: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 7233 "configure"
#include "confdefs.h"
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:7237: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  egrep -v '^ *\+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:7243: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  eval "$as_ac_Header=yes"
else
  echo "$as_me: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$as_ac_Header=no"
fi
rm -f conftest.err conftest.$ac_ext
fi
echo "$as_me:7262: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
if test `eval echo '${'$as_ac_Header'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
EOF

fi
done

for ac_header in readline/history.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
echo "$as_me:7275: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 7281 "configure"
#include "confdefs.h"
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:7285: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  egrep -v '^ *\+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:7291: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  eval "$as_ac_Header=yes"
else
  echo "$as_me: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$as_ac_Header=no"
fi
rm -f conftest.err conftest.$ac_ext
fi
echo "$as_me:7310: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
if test `eval echo '${'$as_ac_Header'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
EOF

fi
done

for ac_header in readline.h readline/readline.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
echo "$as_me:7323: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 7329 "configure"
#include "confdefs.h"
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:7333: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  egrep -v '^ *\+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:7339: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  eval "$as_ac_Header=yes"
else
  echo "$as_me: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$as_ac_Header=no"
fi
rm -f conftest.err conftest.$ac_ext
fi
echo "$as_me:7358: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
if test `eval echo '${'$as_ac_Header'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
EOF

      for termlib in ncurses curses termcap terminfo termlib; do
       as_ac_Lib=`echo "ac_cv_lib_${termlib}''_tgetent" | $as_tr_sh`
echo "$as_me:7367: checking for tgetent in -l${termlib}" >&5
echo $ECHO_N "checking for tgetent in -l${termlib}... $ECHO_C" >&6
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-l${termlib}  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 7375 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char tgetent ();
int
main ()
{
tgetent ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:7394: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:7397: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:7400: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:7403: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_Lib=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_Lib=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:7414: result: `eval echo '${'$as_ac_Lib'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
  TERMLIBS="-l${termlib}"; break
fi

      done
      echo "$as_me:7421: checking for rl_callback_handler_install in -lreadline" >&5
echo $ECHO_N "checking for rl_callback_handler_install in -lreadline... $ECHO_C" >&6
if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lreadline $TERMLIBS $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 7429 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char rl_callback_handler_install ();
int
main ()
{
rl_callback_handler_install ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:7448: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:7451: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:7454: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:7457: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_readline_rl_callback_handler_install=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_readline_rl_callback_handler_install=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:7468: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
echo "${ECHO_T}$ac_cv_lib_readline_rl_callback_handler_install" >&6
if test $ac_cv_lib_readline_rl_callback_handler_install = yes; then
  TERMLDFLAGS="-L$with_readline/lib"
       TERMCPPFLAGS="-I$with_readline/include"
       CPPFLAGS="-I$with_readline/include $CPPFLAGS"
       TERMLIBS="-lreadline $TERMLIBS"
       cat >>confdefs.h <<\EOF
#define HAVE_LIBREADLINE 1
EOF

       break
else
  TERMLIBS= CPPFLAGS=$_cppflags
fi

fi
done

    LDFLAGS=$_ldflags
    ;;
  esac
else
  echo "$as_me:7491: result: no" >&5
echo "${ECHO_T}no" >&6

fi;

# The following test taken from the cvs sources
# If we can't find connect, try looking in -lsocket, -lnsl, and -linet.
# The Irix 5 libc.so has connect and gethostbyname, but Irix 5 also has
# libsocket.so which has a bad implementation of gethostbyname (it
# only looks in /etc/hosts), so we only look for -lsocket if we need
# it.

for ac_func in connect
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:7506: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 7512 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func (); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char $ac_func ();
char (*f) ();

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

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:7543: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:7546: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:7549: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:7552: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:7562: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF

fi
done

if test x"$ac_cv_func_connect" = x"no"; then
    case "$LIBS" in
    *-lnsl*) ;;
    *)
echo "$as_me:7576: checking for printf in -lnsl_s" >&5
echo $ECHO_N "checking for printf in -lnsl_s... $ECHO_C" >&6
if test "${ac_cv_lib_nsl_s_printf+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lnsl_s  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 7584 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char printf ();
int
main ()
{
printf ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:7603: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:7606: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:7609: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:7612: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_nsl_s_printf=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_nsl_s_printf=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:7623: result: $ac_cv_lib_nsl_s_printf" >&5
echo "${ECHO_T}$ac_cv_lib_nsl_s_printf" >&6
if test $ac_cv_lib_nsl_s_printf = yes; then
  cat >>confdefs.h <<EOF
#define HAVE_LIBNSL_S 1
EOF

  LIBS="-lnsl_s $LIBS"

fi
 ;;
    esac
    case "$LIBS" in
    *-lnsl*) ;;
    *)
echo "$as_me:7638: checking for printf in -lnsl" >&5
echo $ECHO_N "checking for printf in -lnsl... $ECHO_C" >&6
if test "${ac_cv_lib_nsl_printf+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lnsl  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 7646 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char printf ();
int
main ()
{
printf ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:7665: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:7668: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:7671: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:7674: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_nsl_printf=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_nsl_printf=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:7685: result: $ac_cv_lib_nsl_printf" >&5
echo "${ECHO_T}$ac_cv_lib_nsl_printf" >&6
if test $ac_cv_lib_nsl_printf = yes; then
  cat >>confdefs.h <<EOF
#define HAVE_LIBNSL 1
EOF

  LIBS="-lnsl $LIBS"

fi
 ;;
    esac
    case "$LIBS" in
    *-lsocket*) ;;
    *)
echo "$as_me:7700: checking for connect in -lsocket" >&5
echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6
if test "${ac_cv_lib_socket_connect+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lsocket  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 7708 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char connect ();
int
main ()
{
connect ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:7727: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:7730: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:7733: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:7736: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_socket_connect=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_socket_connect=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:7747: result: $ac_cv_lib_socket_connect" >&5
echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6
if test $ac_cv_lib_socket_connect = yes; then
  cat >>confdefs.h <<EOF
#define HAVE_LIBSOCKET 1
EOF

  LIBS="-lsocket $LIBS"

fi
 ;;
    esac
    case "$LIBS" in
    *-linet*) ;;
    *)
echo "$as_me:7762: checking for connect in -linet" >&5
echo $ECHO_N "checking for connect in -linet... $ECHO_C" >&6
if test "${ac_cv_lib_inet_connect+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-linet  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 7770 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char connect ();
int
main ()
{
connect ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:7789: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:7792: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:7795: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:7798: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_inet_connect=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_inet_connect=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:7809: result: $ac_cv_lib_inet_connect" >&5
echo "${ECHO_T}$ac_cv_lib_inet_connect" >&6
if test $ac_cv_lib_inet_connect = yes; then
  cat >>confdefs.h <<EOF
#define HAVE_LIBINET 1
EOF

  LIBS="-linet $LIBS"

fi
 ;;
    esac
            if test x"$ac_cv_lib_socket_connect" = x"yes" ||
       test x"$ac_cv_lib_inet_connect" = x"yes"; then
        # ac_cv_func_connect=yes
        # don't!  it would cause AC_CHECK_FUNC to succeed next time configure is run
        cat >>confdefs.h <<\EOF
#define HAVE_CONNECT 1
EOF

    fi
fi

###############################################
# test for where we get get_yp_default_domain() from

for ac_func in yp_get_default_domain
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:7838: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 7844 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func (); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char $ac_func ();
char (*f) ();

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

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:7875: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:7878: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:7881: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:7884: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:7894: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF

fi
done

if test x"$ac_cv_func_yp_get_default_domain" = x"no"; then
	echo "$as_me:7905: checking for yp_get_default_domain in -lnsl" >&5
echo $ECHO_N "checking for yp_get_default_domain in -lnsl... $ECHO_C" >&6
if test "${ac_cv_lib_nsl_yp_get_default_domain+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lnsl  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 7913 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char yp_get_default_domain ();
int
main ()
{
yp_get_default_domain ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:7932: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:7935: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:7938: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:7941: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_nsl_yp_get_default_domain=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_nsl_yp_get_default_domain=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:7952: result: $ac_cv_lib_nsl_yp_get_default_domain" >&5
echo "${ECHO_T}$ac_cv_lib_nsl_yp_get_default_domain" >&6
if test $ac_cv_lib_nsl_yp_get_default_domain = yes; then
  LIBS="$LIBS -lnsl";
	cat >>confdefs.h <<\EOF
#define HAVE_YP_GET_DEFAULT_DOMAIN 1
EOF

fi

fi

# Check if we have execl, if not we need to compile smbrun.

for ac_func in execl
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:7969: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 7975 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func (); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char $ac_func ();
char (*f) ();

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

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:8006: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:8009: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:8012: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:8015: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:8025: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF

fi
done

if test x"$ac_cv_func_execl" = x"no"; then
    RUNPROG="bin/smbrun"
else
    RUNPROG=""
fi

for ac_func in dlopen dlclose dlsym dlerror waitpid getcwd strdup strtoul strerror chown fchown chmod fchmod chroot link
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:8044: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 8050 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func (); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char $ac_func ();
char (*f) ();

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

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:8081: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:8084: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:8087: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:8090: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:8100: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF

fi
done

for ac_func in fstat strchr utime utimes getrlimit fsync bzero memset strlcpy strlcat setpgid mknod mknod64
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:8113: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 8119 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func (); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char $ac_func ();
char (*f) ();

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

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:8150: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:8153: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:8156: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:8159: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:8169: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF

fi
done

for ac_func in memmove vsnprintf snprintf asprintf vasprintf setsid glob strpbrk pipe crypt16 getauthuid
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:8182: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 8188 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func (); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char $ac_func ();
char (*f) ();

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

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:8219: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:8222: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:8225: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:8228: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:8238: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF

fi
done

for ac_func in strftime sigprocmask sigblock sigaction sigset innetgr setnetgrent getnetgrent endnetgrent
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:8251: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 8257 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func (); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char $ac_func ();
char (*f) ();

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

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:8288: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:8291: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:8294: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:8297: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:8307: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF

fi
done

for ac_func in initgroups select poll rdchk getgrnam getgrent pathconf realpath
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:8320: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 8326 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func (); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char $ac_func ();
char (*f) ();

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

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:8357: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:8360: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:8363: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:8366: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:8376: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF

fi
done

for ac_func in setpriv setgidx setuidx setgroups sysconf mktime rename ftruncate stat64 fstat64
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:8389: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 8395 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func (); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char $ac_func ();
char (*f) ();

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

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:8426: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:8429: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:8432: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:8435: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:8445: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF

fi
done

for ac_func in lstat64 fopen64 atexit grantpt dup2 lseek64 ftruncate64 readdir64
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:8458: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 8464 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func (); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char $ac_func ();
char (*f) ();

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

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:8495: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:8498: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:8501: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:8504: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:8514: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF

fi
done

for ac_func in fseek64 fseeko64 ftell64 ftello64 setluid getpwanam setlinebuf
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:8527: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 8533 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func (); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char $ac_func ();
char (*f) ();

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

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:8564: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:8567: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:8570: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:8573: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:8583: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF

fi
done

for ac_func in srandom random srand rand setenv usleep strcasecmp fcvt fcvtl symlink readlink
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:8596: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 8602 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func (); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char $ac_func ();
char (*f) ();

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

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:8633: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:8636: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:8639: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:8642: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:8652: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF

fi
done

for ac_func in syslog vsyslog
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:8665: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 8671 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func (); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char $ac_func ();
char (*f) ();

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

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:8702: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:8705: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:8708: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:8711: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:8721: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF

fi
done

# syscall() is needed for smbwrapper.

for ac_func in syscall
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:8736: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 8742 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func (); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char $ac_func ();
char (*f) ();

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

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:8773: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:8776: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:8779: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:8782: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:8792: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF

fi
done

for ac_func in _dup _dup2 _opendir _readdir _seekdir _telldir _closedir
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:8805: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 8811 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func (); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char $ac_func ();
char (*f) ();

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

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:8842: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:8845: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:8848: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:8851: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:8861: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF

fi
done

for ac_func in __dup __dup2 __opendir __readdir __seekdir __telldir __closedir
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:8874: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 8880 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func (); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char $ac_func ();
char (*f) ();

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

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:8911: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:8914: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:8917: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:8920: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:8930: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF

fi
done

for ac_func in __getcwd _getcwd
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:8943: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 8949 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func (); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char $ac_func ();
char (*f) ();

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

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:8980: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:8983: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:8986: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:8989: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:8999: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF

fi
done

for ac_func in __xstat __fxstat __lxstat
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:9012: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 9018 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func (); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char $ac_func ();
char (*f) ();

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

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:9049: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:9052: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:9055: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:9058: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:9068: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF

fi
done

for ac_func in _stat _lstat _fstat __stat __lstat __fstat
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:9081: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 9087 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func (); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char $ac_func ();
char (*f) ();

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

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:9118: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:9121: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:9124: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:9127: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:9137: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF

fi
done

for ac_func in _acl __acl _facl __facl _open __open _chdir __chdir
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:9150: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 9156 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func (); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char $ac_func ();
char (*f) ();

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

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:9187: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:9190: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:9193: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:9196: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:9206: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF

fi
done

for ac_func in _close __close _fchdir __fchdir _fcntl __fcntl
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:9219: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 9225 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func (); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char $ac_func ();
char (*f) ();

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

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:9256: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:9259: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:9262: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:9265: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:9275: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF

fi
done

for ac_func in getdents _getdents __getdents _lseek __lseek _read __read
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:9288: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 9294 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func (); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char $ac_func ();
char (*f) ();

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

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:9325: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:9328: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:9331: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:9334: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:9344: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF

fi
done

for ac_func in _write __write _fork __fork
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:9357: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 9363 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func (); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char $ac_func ();
char (*f) ();

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

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:9394: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:9397: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:9400: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:9403: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:9413: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF

fi
done

for ac_func in _stat64 __stat64 _fstat64 __fstat64 _lstat64 __lstat64
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:9426: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 9432 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func (); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char $ac_func ();
char (*f) ();

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

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:9463: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:9466: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:9469: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:9472: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:9482: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF

fi
done

for ac_func in __sys_llseek llseek _llseek __llseek readdir64 _readdir64 __readdir64
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:9495: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 9501 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func (); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char $ac_func ();
char (*f) ();

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

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:9532: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:9535: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:9538: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:9541: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:9551: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF

fi
done

for ac_func in pread _pread __pread pread64 _pread64 __pread64
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:9564: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 9570 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func (); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char $ac_func ();
char (*f) ();

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

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:9601: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:9604: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:9607: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:9610: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:9620: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF

fi
done

for ac_func in pwrite _pwrite __pwrite pwrite64 _pwrite64 __pwrite64
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:9633: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 9639 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func (); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char $ac_func ();
char (*f) ();

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

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:9670: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:9673: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:9676: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:9679: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:9689: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF

fi
done

for ac_func in open64 _open64 __open64 creat64
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:9702: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 9708 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func (); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char $ac_func ();
char (*f) ();

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

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:9739: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:9742: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:9745: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:9748: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:9758: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF

fi
done

#
# stat64 family may need <sys/stat.h> on some systems, notably ReliantUNIX
#

if test x$ac_cv_func_stat64 = xno ; then
  echo "$as_me:9773: checking for stat64 in <sys/stat.h>" >&5
echo $ECHO_N "checking for stat64 in <sys/stat.h>... $ECHO_C" >&6
  cat >conftest.$ac_ext <<_ACEOF
#line 9776 "configure"
#include "confdefs.h"

#if defined(HAVE_UNISTD_H)
#include <unistd.h>
#endif
#include <sys/stat.h>

int
main ()
{
struct stat64 st64; exit(stat64(".",&st64));
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:9793: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:9796: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:9799: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:9802: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_func_stat64=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
  echo "$as_me:9810: result: $ac_cv_func_stat64" >&5
echo "${ECHO_T}$ac_cv_func_stat64" >&6
  if test x$ac_cv_func_stat64 = xyes ; then
    cat >>confdefs.h <<\EOF
#define HAVE_STAT64 1
EOF

  fi
fi

if test x$ac_cv_func_lstat64 = xno ; then
  echo "$as_me:9821: checking for lstat64 in <sys/stat.h>" >&5
echo $ECHO_N "checking for lstat64 in <sys/stat.h>... $ECHO_C" >&6
  cat >conftest.$ac_ext <<_ACEOF
#line 9824 "configure"
#include "confdefs.h"

#if defined(HAVE_UNISTD_H)
#include <unistd.h>
#endif
#include <sys/stat.h>

int
main ()
{
struct stat64 st64; exit(lstat64(".",&st64));
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:9841: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:9844: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:9847: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:9850: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_func_lstat64=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
  echo "$as_me:9858: result: $ac_cv_func_lstat64" >&5
echo "${ECHO_T}$ac_cv_func_lstat64" >&6
  if test x$ac_cv_func_lstat64 = xyes ; then
    cat >>confdefs.h <<\EOF
#define HAVE_LSTAT64 1
EOF

  fi
fi

if test x$ac_cv_func_fstat64 = xno ; then
  echo "$as_me:9869: checking for fstat64 in <sys/stat.h>" >&5
echo $ECHO_N "checking for fstat64 in <sys/stat.h>... $ECHO_C" >&6
  cat >conftest.$ac_ext <<_ACEOF
#line 9872 "configure"
#include "confdefs.h"

#if defined(HAVE_UNISTD_H)
#include <unistd.h>
#endif
#include <sys/stat.h>

int
main ()
{
struct stat64 st64; exit(fstat64(0,&st64));
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:9889: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:9892: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:9895: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:9898: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_func_fstat64=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
  echo "$as_me:9906: result: $ac_cv_func_fstat64" >&5
echo "${ECHO_T}$ac_cv_func_fstat64" >&6
  if test x$ac_cv_func_fstat64 = xyes ; then
    cat >>confdefs.h <<\EOF
#define HAVE_FSTAT64 1
EOF

  fi
fi

#
# If no strcasecmp, check for it in some known places
# It is in -lresolv on ReliantUNIX and UnixWare
#   -lresolve *must* follow -lnsl for name resolution to work properly
#

if test x$ac_cv_func_strcasecmp = xno ; then
	echo "$as_me:9923: checking for strcasecmp in -lresolv" >&5
echo $ECHO_N "checking for strcasecmp in -lresolv... $ECHO_C" >&6
if test "${ac_cv_lib_resolv_strcasecmp+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lresolv  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 9931 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char strcasecmp ();
int
main ()
{
strcasecmp ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:9950: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:9953: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:9956: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:9959: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_resolv_strcasecmp=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_resolv_strcasecmp=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:9970: result: $ac_cv_lib_resolv_strcasecmp" >&5
echo "${ECHO_T}$ac_cv_lib_resolv_strcasecmp" >&6
if test $ac_cv_lib_resolv_strcasecmp = yes; then
  LIBS="$LIBS -lresolv"
		cat >>confdefs.h <<\EOF
#define HAVE_STRCASECMP 1
EOF

fi

fi

#
# Check for the functions putprpwnam, set_auth_parameters,
# getspnam, bigcrypt and getprpwnam in -lsec and -lsecurity
# Needed for OSF1 and HPUX.
#

case "$LIBS" in
  *-lsecurity*)
for ac_func in putprpwnam
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:9993: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 9999 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func (); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char $ac_func ();
char (*f) ();

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

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:10030: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:10033: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:10036: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:10039: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:10049: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF

fi
done
 ;;
  *)
echo "$as_me:10060: checking for putprpwnam in -lsecurity" >&5
echo $ECHO_N "checking for putprpwnam in -lsecurity... $ECHO_C" >&6
if test "${ac_cv_lib_security_putprpwnam+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lsecurity  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 10068 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char putprpwnam ();
int
main ()
{
putprpwnam ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:10087: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:10090: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:10093: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:10096: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_security_putprpwnam=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_security_putprpwnam=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:10107: result: $ac_cv_lib_security_putprpwnam" >&5
echo "${ECHO_T}$ac_cv_lib_security_putprpwnam" >&6
if test $ac_cv_lib_security_putprpwnam = yes; then
  cat >>confdefs.h <<EOF
#define HAVE_LIBSECURITY 1
EOF

  LIBS="-lsecurity $LIBS"

fi

for ac_func in putprpwnam
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:10121: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 10127 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func (); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char $ac_func ();
char (*f) ();

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

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:10158: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:10161: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:10164: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:10167: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:10177: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF

fi
done

  ;;
  esac

case "$LIBS" in
  *-lsec*)
for ac_func in putprpwnam
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:10195: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 10201 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func (); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char $ac_func ();
char (*f) ();

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

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:10232: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:10235: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:10238: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:10241: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:10251: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF

fi
done
 ;;
  *)
echo "$as_me:10262: checking for putprpwnam in -lsec" >&5
echo $ECHO_N "checking for putprpwnam in -lsec... $ECHO_C" >&6
if test "${ac_cv_lib_sec_putprpwnam+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lsec  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 10270 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char putprpwnam ();
int
main ()
{
putprpwnam ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:10289: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:10292: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:10295: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:10298: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_sec_putprpwnam=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_sec_putprpwnam=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:10309: result: $ac_cv_lib_sec_putprpwnam" >&5
echo "${ECHO_T}$ac_cv_lib_sec_putprpwnam" >&6
if test $ac_cv_lib_sec_putprpwnam = yes; then
  cat >>confdefs.h <<EOF
#define HAVE_LIBSEC 1
EOF

  LIBS="-lsec $LIBS"

fi

for ac_func in putprpwnam
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:10323: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 10329 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func (); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char $ac_func ();
char (*f) ();

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

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:10360: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:10363: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:10366: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:10369: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:10379: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF

fi
done

  ;;
  esac

case "$LIBS" in
  *-lsecurity*)
for ac_func in set_auth_parameters
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:10397: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 10403 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func (); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char $ac_func ();
char (*f) ();

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

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:10434: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:10437: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:10440: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:10443: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:10453: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF

fi
done
 ;;
  *)
echo "$as_me:10464: checking for set_auth_parameters in -lsecurity" >&5
echo $ECHO_N "checking for set_auth_parameters in -lsecurity... $ECHO_C" >&6
if test "${ac_cv_lib_security_set_auth_parameters+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lsecurity  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 10472 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char set_auth_parameters ();
int
main ()
{
set_auth_parameters ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:10491: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:10494: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:10497: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:10500: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_security_set_auth_parameters=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_security_set_auth_parameters=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:10511: result: $ac_cv_lib_security_set_auth_parameters" >&5
echo "${ECHO_T}$ac_cv_lib_security_set_auth_parameters" >&6
if test $ac_cv_lib_security_set_auth_parameters = yes; then
  cat >>confdefs.h <<EOF
#define HAVE_LIBSECURITY 1
EOF

  LIBS="-lsecurity $LIBS"

fi

for ac_func in set_auth_parameters
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:10525: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 10531 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func (); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char $ac_func ();
char (*f) ();

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

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:10562: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:10565: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:10568: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:10571: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:10581: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF

fi
done

  ;;
  esac

case "$LIBS" in
  *-lsec*)
for ac_func in set_auth_parameters
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:10599: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 10605 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func (); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char $ac_func ();
char (*f) ();

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

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:10636: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:10639: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:10642: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:10645: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:10655: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF

fi
done
 ;;
  *)
echo "$as_me:10666: checking for set_auth_parameters in -lsec" >&5
echo $ECHO_N "checking for set_auth_parameters in -lsec... $ECHO_C" >&6
if test "${ac_cv_lib_sec_set_auth_parameters+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lsec  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 10674 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char set_auth_parameters ();
int
main ()
{
set_auth_parameters ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:10693: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:10696: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:10699: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:10702: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_sec_set_auth_parameters=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_sec_set_auth_parameters=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:10713: result: $ac_cv_lib_sec_set_auth_parameters" >&5
echo "${ECHO_T}$ac_cv_lib_sec_set_auth_parameters" >&6
if test $ac_cv_lib_sec_set_auth_parameters = yes; then
  cat >>confdefs.h <<EOF
#define HAVE_LIBSEC 1
EOF

  LIBS="-lsec $LIBS"

fi

for ac_func in set_auth_parameters
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:10727: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 10733 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func (); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char $ac_func ();
char (*f) ();

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

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:10764: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:10767: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:10770: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:10773: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:10783: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF

fi
done

  ;;
  esac

# UnixWare 7.x has its getspnam in -lgen
case "$LIBS" in
  *-lgen*)
for ac_func in getspnam
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:10802: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 10808 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func (); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char $ac_func ();
char (*f) ();

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

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:10839: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:10842: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:10845: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:10848: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:10858: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF

fi
done
 ;;
  *)
echo "$as_me:10869: checking for getspnam in -lgen" >&5
echo $ECHO_N "checking for getspnam in -lgen... $ECHO_C" >&6
if test "${ac_cv_lib_gen_getspnam+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lgen  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 10877 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char getspnam ();
int
main ()
{
getspnam ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:10896: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:10899: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:10902: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:10905: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_gen_getspnam=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_gen_getspnam=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:10916: result: $ac_cv_lib_gen_getspnam" >&5
echo "${ECHO_T}$ac_cv_lib_gen_getspnam" >&6
if test $ac_cv_lib_gen_getspnam = yes; then
  cat >>confdefs.h <<EOF
#define HAVE_LIBGEN 1
EOF

  LIBS="-lgen $LIBS"

fi

for ac_func in getspnam
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:10930: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 10936 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func (); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char $ac_func ();
char (*f) ();

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

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:10967: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:10970: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:10973: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:10976: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:10986: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF

fi
done

  ;;
  esac

case "$LIBS" in
  *-lsecurity*)
for ac_func in getspnam
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:11004: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 11010 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func (); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char $ac_func ();
char (*f) ();

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

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:11041: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:11044: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:11047: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:11050: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:11060: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF

fi
done
 ;;
  *)
echo "$as_me:11071: checking for getspnam in -lsecurity" >&5
echo $ECHO_N "checking for getspnam in -lsecurity... $ECHO_C" >&6
if test "${ac_cv_lib_security_getspnam+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lsecurity  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 11079 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char getspnam ();
int
main ()
{
getspnam ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:11098: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:11101: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:11104: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:11107: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_security_getspnam=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_security_getspnam=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:11118: result: $ac_cv_lib_security_getspnam" >&5
echo "${ECHO_T}$ac_cv_lib_security_getspnam" >&6
if test $ac_cv_lib_security_getspnam = yes; then
  cat >>confdefs.h <<EOF
#define HAVE_LIBSECURITY 1
EOF

  LIBS="-lsecurity $LIBS"

fi

for ac_func in getspnam
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:11132: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 11138 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func (); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char $ac_func ();
char (*f) ();

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

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:11169: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:11172: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:11175: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:11178: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:11188: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF

fi
done

  ;;
  esac

case "$LIBS" in
  *-lsec*)
for ac_func in getspnam
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:11206: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 11212 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func (); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char $ac_func ();
char (*f) ();

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

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:11243: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:11246: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:11249: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:11252: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:11262: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF

fi
done
 ;;
  *)
echo "$as_me:11273: checking for getspnam in -lsec" >&5
echo $ECHO_N "checking for getspnam in -lsec... $ECHO_C" >&6
if test "${ac_cv_lib_sec_getspnam+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lsec  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 11281 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char getspnam ();
int
main ()
{
getspnam ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:11300: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:11303: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:11306: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:11309: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_sec_getspnam=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_sec_getspnam=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:11320: result: $ac_cv_lib_sec_getspnam" >&5
echo "${ECHO_T}$ac_cv_lib_sec_getspnam" >&6
if test $ac_cv_lib_sec_getspnam = yes; then
  cat >>confdefs.h <<EOF
#define HAVE_LIBSEC 1
EOF

  LIBS="-lsec $LIBS"

fi

for ac_func in getspnam
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:11334: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 11340 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func (); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char $ac_func ();
char (*f) ();

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

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:11371: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:11374: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:11377: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:11380: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:11390: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF

fi
done

  ;;
  esac

case "$LIBS" in
  *-lsecurity*)
for ac_func in bigcrypt
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:11408: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 11414 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func (); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char $ac_func ();
char (*f) ();

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

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:11445: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:11448: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:11451: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:11454: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:11464: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF

fi
done
 ;;
  *)
echo "$as_me:11475: checking for bigcrypt in -lsecurity" >&5
echo $ECHO_N "checking for bigcrypt in -lsecurity... $ECHO_C" >&6
if test "${ac_cv_lib_security_bigcrypt+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lsecurity  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 11483 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char bigcrypt ();
int
main ()
{
bigcrypt ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:11502: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:11505: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:11508: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:11511: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_security_bigcrypt=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_security_bigcrypt=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:11522: result: $ac_cv_lib_security_bigcrypt" >&5
echo "${ECHO_T}$ac_cv_lib_security_bigcrypt" >&6
if test $ac_cv_lib_security_bigcrypt = yes; then
  cat >>confdefs.h <<EOF
#define HAVE_LIBSECURITY 1
EOF

  LIBS="-lsecurity $LIBS"

fi

for ac_func in bigcrypt
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:11536: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 11542 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func (); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char $ac_func ();
char (*f) ();

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

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:11573: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:11576: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:11579: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:11582: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:11592: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF

fi
done

  ;;
  esac

case "$LIBS" in
  *-lsec*)
for ac_func in bigcrypt
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:11610: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 11616 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func (); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char $ac_func ();
char (*f) ();

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

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:11647: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:11650: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:11653: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:11656: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:11666: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF

fi
done
 ;;
  *)
echo "$as_me:11677: checking for bigcrypt in -lsec" >&5
echo $ECHO_N "checking for bigcrypt in -lsec... $ECHO_C" >&6
if test "${ac_cv_lib_sec_bigcrypt+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lsec  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 11685 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char bigcrypt ();
int
main ()
{
bigcrypt ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:11704: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:11707: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:11710: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:11713: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_sec_bigcrypt=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_sec_bigcrypt=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:11724: result: $ac_cv_lib_sec_bigcrypt" >&5
echo "${ECHO_T}$ac_cv_lib_sec_bigcrypt" >&6
if test $ac_cv_lib_sec_bigcrypt = yes; then
  cat >>confdefs.h <<EOF
#define HAVE_LIBSEC 1
EOF

  LIBS="-lsec $LIBS"

fi

for ac_func in bigcrypt
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:11738: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 11744 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func (); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char $ac_func ();
char (*f) ();

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

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:11775: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:11778: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:11781: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:11784: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:11794: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF

fi
done

  ;;
  esac

case "$LIBS" in
  *-lsecurity*)
for ac_func in getprpwnam
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:11812: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 11818 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func (); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char $ac_func ();
char (*f) ();

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

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:11849: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:11852: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:11855: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:11858: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:11868: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF

fi
done
 ;;
  *)
echo "$as_me:11879: checking for getprpwnam in -lsecurity" >&5
echo $ECHO_N "checking for getprpwnam in -lsecurity... $ECHO_C" >&6
if test "${ac_cv_lib_security_getprpwnam+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lsecurity  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 11887 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char getprpwnam ();
int
main ()
{
getprpwnam ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:11906: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:11909: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:11912: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:11915: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_security_getprpwnam=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_security_getprpwnam=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:11926: result: $ac_cv_lib_security_getprpwnam" >&5
echo "${ECHO_T}$ac_cv_lib_security_getprpwnam" >&6
if test $ac_cv_lib_security_getprpwnam = yes; then
  cat >>confdefs.h <<EOF
#define HAVE_LIBSECURITY 1
EOF

  LIBS="-lsecurity $LIBS"

fi

for ac_func in getprpwnam
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:11940: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 11946 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func (); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char $ac_func ();
char (*f) ();

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

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:11977: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:11980: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:11983: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:11986: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:11996: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF

fi
done

  ;;
  esac

case "$LIBS" in
  *-lsec*)
for ac_func in getprpwnam
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:12014: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 12020 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func (); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char $ac_func ();
char (*f) ();

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

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:12051: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:12054: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:12057: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:12060: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:12070: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF

fi
done
 ;;
  *)
echo "$as_me:12081: checking for getprpwnam in -lsec" >&5
echo $ECHO_N "checking for getprpwnam in -lsec... $ECHO_C" >&6
if test "${ac_cv_lib_sec_getprpwnam+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lsec  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 12089 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char getprpwnam ();
int
main ()
{
getprpwnam ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:12108: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:12111: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:12114: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:12117: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_sec_getprpwnam=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_sec_getprpwnam=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:12128: result: $ac_cv_lib_sec_getprpwnam" >&5
echo "${ECHO_T}$ac_cv_lib_sec_getprpwnam" >&6
if test $ac_cv_lib_sec_getprpwnam = yes; then
  cat >>confdefs.h <<EOF
#define HAVE_LIBSEC 1
EOF

  LIBS="-lsec $LIBS"

fi

for ac_func in getprpwnam
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:12142: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 12148 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func (); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char $ac_func ();
char (*f) ();

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

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:12179: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:12182: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:12185: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:12188: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:12198: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF

fi
done

  ;;
  esac

# this bit needs to be modified for each OS that is suported by
# smbwrapper. You need to specify how to created a shared library and
# how to compile C code to produce PIC object files

# these are the defaults, good for lots of systems
HOST_OS="$host_os"
LDSHFLAGS="-shared"
SONAMEFLAG="#"
SHLD="\${CC}"
PICFLAG=""
PICSUFFIX="po.o"
SHLIBEXT="so"
# Assume non-shared by default and override below
BLDSHARED="false"
echo "$as_me:12225: checking ability to build shared libraries" >&5
echo $ECHO_N "checking ability to build shared libraries... $ECHO_C" >&6

# and these are for particular systems
case "$host_os" in
		*linux*)   cat >>confdefs.h <<\EOF
#define LINUX 1
EOF

			BLDSHARED="true"
			LDSHFLAGS="-shared"
			DYNEXP="-Wl,--export-dynamic"
			PICFLAG="-fPIC"
			SONAMEFLAG="-Wl,-soname="
			cat >>confdefs.h <<\EOF
#define STAT_ST_BLOCKSIZE 512
EOF

			;;
		*solaris*) cat >>confdefs.h <<\EOF
#define SUNOS5 1
EOF

			BLDSHARED="true"
			LDSHFLAGS="-G"
			SONAMEFLAG="-h "
			if test "${ac_cv_prog_CC}" = "gcc"; then
				PICFLAG="-fPIC"
			else
				PICFLAG="-KPIC"
				POBAD_CC=""
				PICSUFFIX="po.o"
			fi
			cat >>confdefs.h <<\EOF
#define STAT_ST_BLOCKSIZE 512
EOF

		;;
		*sunos*) cat >>confdefs.h <<\EOF
#define SUNOS4 1
EOF

			BLDSHARED="true"
			LDSHFLAGS="-G"
			SONAMEFLAG="-Wl,-h,"
			PICFLAG="-KPIC"   # Is this correct for SunOS
		;;
		*bsd*)  BLDSHARED="true"
			LDSHFLAGS="-shared"
			SONAMEFLAG="-Wl,-soname,"
			PICFLAG="-fPIC"
			cat >>confdefs.h <<\EOF
#define STAT_ST_BLOCKSIZE 512
EOF

		;;
		*irix*) cat >>confdefs.h <<\EOF
#define IRIX 1
EOF

			case "$host_os" in
			*irix6*) cat >>confdefs.h <<\EOF
#define IRIX6 1
EOF

			;;
			esac
			ATTEMPT_WRAP32_BUILD=yes
			BLDSHARED="true"
			LDSHFLAGS="-set_version sgi1.0 -shared"
			SONAMEFLAG="-soname "
			SHLD="\${LD}"
			if test "${ac_cv_prog_CC}" = "gcc"; then
				PICFLAG="-fPIC"
			else
				PICFLAG="-KPIC"
			fi
			cat >>confdefs.h <<\EOF
#define STAT_ST_BLOCKSIZE 512
EOF

		;;
		*aix*) cat >>confdefs.h <<\EOF
#define AIX 1
EOF

			BLDSHARED="true"
			LDSHFLAGS="-Wl,-bexpall,-bM:SRE,-bnoentry"
			PICFLAG="-O2 -qmaxmem=6000"
			cat >>confdefs.h <<\EOF
#define STAT_ST_BLOCKSIZE DEV_BSIZE
EOF

		;;
		*hpux*) cat >>confdefs.h <<\EOF
#define HPUX 1
EOF

			SHLIBEXT="sl"
			# Use special PIC flags for the native HP-UX compiler.
			if test $ac_cv_prog_cc_Ae = yes; then
				BLDSHARED="true"
				SHLD="/usr/bin/ld"
				LDSHFLAGS="-B symbolic -b -z"
				SONAMEFLAG="+h "
				PICFLAG="+z"
			fi
			DYNEXP="-Wl,-E"
			cat >>confdefs.h <<\EOF
#define STAT_ST_BLOCKSIZE 8192
EOF

			;;
		*qnx*) cat >>confdefs.h <<\EOF
#define QNX 1
EOF
;;
		*osf*) cat >>confdefs.h <<\EOF
#define OSF1 1
EOF

			BLDSHARED="true"
			LDSHFLAGS="-shared"
			SONAMEFLAG="-Wl,-soname,"
			PICFLAG="-fPIC"
		;;
		*sco*) cat >>confdefs.h <<\EOF
#define SCO 1
EOF
;;
		*unixware*) cat >>confdefs.h <<\EOF
#define UNIXWARE 1
EOF

			BLDSHARED="true"
			LDSHFLAGS="-shared"
			SONAMEFLAG="-Wl,-soname,"
			PICFLAG="-KPIC"
		;;
		*next2*) cat >>confdefs.h <<\EOF
#define NEXT2 1
EOF
;;
		*dgux*) # Extract the first word of "groff", so it can be a program name with args.
set dummy groff; ac_word=$2
echo "$as_me:12370: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_ROFF+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ROFF"; then
  ac_cv_prog_ROFF="$ROFF" # Let the user override the test.
else
  ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  $as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_ROFF="groff -etpsR -Tascii -man"
echo "$as_me:12385: found $ac_dir/$ac_word" >&5
break
done

fi
fi
ROFF=$ac_cv_prog_ROFF
if test -n "$ROFF"; then
  echo "$as_me:12393: result: $ROFF" >&5
echo "${ECHO_T}$ROFF" >&6
else
  echo "$as_me:12396: result: no" >&5
echo "${ECHO_T}no" >&6
fi
;;
		*sysv4*)
			case "$host" in
				*-univel-*)     if  test "$GCC" != yes ; then
									cat >>confdefs.h <<\EOF
#define HAVE_MEMSET 1
EOF

								fi
								LDSHFLAGS="-G"
								DYNEXP="-Bexport"
				;;
				*mips-sni-sysv4*) cat >>confdefs.h <<\EOF
#define RELIANTUNIX 1
EOF
;;
			esac
			;;
		*sysv5*)
			if  test "$GCC" != yes ; then
				cat >>confdefs.h <<\EOF
#define HAVE_MEMSET 1
EOF

			fi
			LDSHFLAGS="-G"
			;;
esac

echo "$as_me:12428: result: $BLDSHARED" >&5
echo "${ECHO_T}$BLDSHARED" >&6
echo "$as_me:12430: checking linker flags for shared libraries" >&5
echo $ECHO_N "checking linker flags for shared libraries... $ECHO_C" >&6
echo "$as_me:12432: result: $LDSHFLAGS" >&5
echo "${ECHO_T}$LDSHFLAGS" >&6
echo "$as_me:12434: checking compiler flags for position-independent code" >&5
echo $ECHO_N "checking compiler flags for position-independent code... $ECHO_C" >&6
echo "$as_me:12436: result: $PICFLAGS" >&5
echo "${ECHO_T}$PICFLAGS" >&6

# try to work out how to produce pic code with this compiler
if test x$PICFLAG = x; then
  echo "$as_me:12441: checking whether ${CC-cc} accepts -fpic" >&5
echo $ECHO_N "checking whether ${CC-cc} accepts -fpic... $ECHO_C" >&6
if test "${ac_cv_prog_cc_fpic+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  echo 'void f(){}' > conftest.c
if test -z "`${CC-cc} -fpic -c conftest.c 2>&1`"; then
  ac_cv_prog_cc_fpic=yes
else
  ac_cv_prog_cc_fpic=no
fi
rm -f conftest*

fi
echo "$as_me:12455: result: $ac_cv_prog_cc_fpic" >&5
echo "${ECHO_T}$ac_cv_prog_cc_fpic" >&6
  if test $ac_cv_prog_cc_fpic = yes; then
      PICFLAG="-fpic";
  fi
fi
if test x$PICFLAG = x; then
  echo "$as_me:12462: checking whether ${CC-cc} accepts -KPIC" >&5
echo $ECHO_N "checking whether ${CC-cc} accepts -KPIC... $ECHO_C" >&6
if test "${ac_cv_prog_cc_KPIC+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  echo 'void f(){}' > conftest.c
if test -z "`${CC-cc} -KPIC -c conftest.c 2>&1`"; then
  ac_cv_prog_cc_KPIC=yes
else
  ac_cv_prog_cc_KPIC=no
fi
rm -f conftest*

fi
echo "$as_me:12476: result: $ac_cv_prog_cc_KPIC" >&5
echo "${ECHO_T}$ac_cv_prog_cc_KPIC" >&6
  if test $ac_cv_prog_cc_KPIC = yes; then
    PICFLAG="-KPIC";
  fi
fi
if test x$PICFLAG = x; then
  echo "$as_me:12483: checking whether ${CC-cc} accepts -Kpic" >&5
echo $ECHO_N "checking whether ${CC-cc} accepts -Kpic... $ECHO_C" >&6
if test "${ac_cv_prog_cc_Kpic+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  echo 'void f(){}' > conftest.c
if test -z "`${CC-cc} -Kpic -c conftest.c 2>&1`"; then
  ac_cv_prog_cc_Kpic=yes
else
  ac_cv_prog_cc_Kpic=no
fi
rm -f conftest*

fi
echo "$as_me:12497: result: $ac_cv_prog_cc_Kpic" >&5
echo "${ECHO_T}$ac_cv_prog_cc_Kpic" >&6
  if test $ac_cv_prog_cc_Kpic = yes; then
    PICFLAG="-Kpic";
  fi
fi

################

echo "$as_me:12506: checking for long long" >&5
echo $ECHO_N "checking for long long... $ECHO_C" >&6
if test "${samba_cv_have_longlong+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

if test "$cross_compiling" = yes; then
  samba_cv_have_longlong=cross
else
  cat >conftest.$ac_ext <<_ACEOF
#line 12516 "configure"
#include "confdefs.h"
#include <stdio.h>
main() { long long x = 1000000; x *= x; exit(((x/1000000) == 1000000)? 0: 1); }
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:12522: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:12525: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:12527: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:12530: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  samba_cv_have_longlong=yes
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
samba_cv_have_longlong=no
fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
echo "$as_me:12542: result: $samba_cv_have_longlong" >&5
echo "${ECHO_T}$samba_cv_have_longlong" >&6
if test x"$samba_cv_have_longlong" = x"yes"; then
    cat >>confdefs.h <<\EOF
#define HAVE_LONGLONG 1
EOF

fi

#
# Check if the compiler supports the LL prefix on long long integers.
# AIX needs this.

echo "$as_me:12555: checking for LL suffix on long long integers" >&5
echo $ECHO_N "checking for LL suffix on long long integers... $ECHO_C" >&6
if test "${samba_cv_compiler_supports_ll+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

    cat >conftest.$ac_ext <<_ACEOF
#line 12562 "configure"
#include "confdefs.h"
#include <stdio.h>
int
main ()
{
long long i = 0x8000000000LL
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:12574: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:12577: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:12580: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:12583: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  samba_cv_compiler_supports_ll=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
samba_cv_compiler_supports_ll=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:12593: result: $samba_cv_compiler_supports_ll" >&5
echo "${ECHO_T}$samba_cv_compiler_supports_ll" >&6
if test x"$samba_cv_compiler_supports_ll" = x"yes"; then
   cat >>confdefs.h <<\EOF
#define COMPILER_SUPPORTS_LL 1
EOF

fi

echo "$as_me:12602: checking for 64 bit off_t" >&5
echo $ECHO_N "checking for 64 bit off_t... $ECHO_C" >&6
if test "${samba_cv_SIZEOF_OFF_T+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

if test "$cross_compiling" = yes; then
  samba_cv_SIZEOF_OFF_T=cross
else
  cat >conftest.$ac_ext <<_ACEOF
#line 12612 "configure"
#include "confdefs.h"
#include <stdio.h>
#include <sys/stat.h>
main() { exit((sizeof(off_t) == 8) ? 0 : 1); }
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:12619: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:12622: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:12624: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:12627: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  samba_cv_SIZEOF_OFF_T=yes
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
samba_cv_SIZEOF_OFF_T=no
fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
echo "$as_me:12639: result: $samba_cv_SIZEOF_OFF_T" >&5
echo "${ECHO_T}$samba_cv_SIZEOF_OFF_T" >&6
if test x"$samba_cv_SIZEOF_OFF_T" = x"yes"; then
    cat >>confdefs.h <<\EOF
#define SIZEOF_OFF_T 8
EOF

fi

echo "$as_me:12648: checking for off64_t" >&5
echo $ECHO_N "checking for off64_t... $ECHO_C" >&6
if test "${samba_cv_HAVE_OFF64_T+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

if test "$cross_compiling" = yes; then
  samba_cv_HAVE_OFF64_T=cross
else
  cat >conftest.$ac_ext <<_ACEOF
#line 12658 "configure"
#include "confdefs.h"

#if defined(HAVE_UNISTD_H)
#include <unistd.h>
#endif
#include <stdio.h>
#include <sys/stat.h>
main() { struct stat64 st; off64_t s; if (sizeof(off_t) == sizeof(off64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:12669: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:12672: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:12674: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:12677: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  samba_cv_HAVE_OFF64_T=yes
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
samba_cv_HAVE_OFF64_T=no
fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
echo "$as_me:12689: result: $samba_cv_HAVE_OFF64_T" >&5
echo "${ECHO_T}$samba_cv_HAVE_OFF64_T" >&6
if test x"$samba_cv_HAVE_OFF64_T" = x"yes"; then
    cat >>confdefs.h <<\EOF
#define HAVE_OFF64_T 1
EOF

fi

echo "$as_me:12698: checking for 64 bit ino_t" >&5
echo $ECHO_N "checking for 64 bit ino_t... $ECHO_C" >&6
if test "${samba_cv_SIZEOF_INO_T+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

if test "$cross_compiling" = yes; then
  samba_cv_SIZEOF_INO_T=cross
else
  cat >conftest.$ac_ext <<_ACEOF
#line 12708 "configure"
#include "confdefs.h"
#include <stdio.h>
#include <sys/stat.h>
main() { exit((sizeof(ino_t) == 8) ? 0 : 1); }
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:12715: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:12718: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:12720: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:12723: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  samba_cv_SIZEOF_INO_T=yes
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
samba_cv_SIZEOF_INO_T=no
fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
echo "$as_me:12735: result: $samba_cv_SIZEOF_INO_T" >&5
echo "${ECHO_T}$samba_cv_SIZEOF_INO_T" >&6
if test x"$samba_cv_SIZEOF_INO_T" = x"yes"; then
    cat >>confdefs.h <<\EOF
#define SIZEOF_INO_T 8
EOF

fi

echo "$as_me:12744: checking for ino64_t" >&5
echo $ECHO_N "checking for ino64_t... $ECHO_C" >&6
if test "${samba_cv_HAVE_INO64_T+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

if test "$cross_compiling" = yes; then
  samba_cv_HAVE_INO64_T=cross
else
  cat >conftest.$ac_ext <<_ACEOF
#line 12754 "configure"
#include "confdefs.h"

#if defined(HAVE_UNISTD_H)
#include <unistd.h>
#endif
#include <stdio.h>
#include <sys/stat.h>
main() { struct stat64 st; ino64_t s; if (sizeof(ino_t) == sizeof(ino64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:12765: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:12768: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:12770: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:12773: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  samba_cv_HAVE_INO64_T=yes
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
samba_cv_HAVE_INO64_T=no
fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
echo "$as_me:12785: result: $samba_cv_HAVE_INO64_T" >&5
echo "${ECHO_T}$samba_cv_HAVE_INO64_T" >&6
if test x"$samba_cv_HAVE_INO64_T" = x"yes"; then
    cat >>confdefs.h <<\EOF
#define HAVE_INO64_T 1
EOF

fi

echo "$as_me:12794: checking for dev64_t" >&5
echo $ECHO_N "checking for dev64_t... $ECHO_C" >&6
if test "${samba_cv_HAVE_DEV64_T+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

if test "$cross_compiling" = yes; then
  samba_cv_HAVE_DEV64_T=cross
else
  cat >conftest.$ac_ext <<_ACEOF
#line 12804 "configure"
#include "confdefs.h"

#if defined(HAVE_UNISTD_H)
#include <unistd.h>
#endif
#include <stdio.h>
#include <sys/stat.h>
main() { struct stat64 st; dev64_t s; if (sizeof(dev_t) == sizeof(dev64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:12815: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:12818: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:12820: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:12823: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  samba_cv_HAVE_DEV64_T=yes
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
samba_cv_HAVE_DEV64_T=no
fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
echo "$as_me:12835: result: $samba_cv_HAVE_DEV64_T" >&5
echo "${ECHO_T}$samba_cv_HAVE_DEV64_T" >&6
if test x"$samba_cv_HAVE_DEV64_T" = x"yes"; then
    cat >>confdefs.h <<\EOF
#define HAVE_DEV64_T 1
EOF

fi

echo "$as_me:12844: checking for struct dirent64" >&5
echo $ECHO_N "checking for struct dirent64... $ECHO_C" >&6
if test "${samba_cv_HAVE_STRUCT_DIRENT64+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

cat >conftest.$ac_ext <<_ACEOF
#line 12851 "configure"
#include "confdefs.h"

#if defined(HAVE_UNISTD_H)
#include <unistd.h>
#endif
#include <sys/types.h>
#include <dirent.h>
int
main ()
{
struct dirent64 de;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:12868: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:12871: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:12874: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:12877: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  samba_cv_HAVE_STRUCT_DIRENT64=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
samba_cv_HAVE_STRUCT_DIRENT64=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:12887: result: $samba_cv_HAVE_STRUCT_DIRENT64" >&5
echo "${ECHO_T}$samba_cv_HAVE_STRUCT_DIRENT64" >&6
if test x"$samba_cv_HAVE_STRUCT_DIRENT64" = x"yes"; then
    cat >>confdefs.h <<\EOF
#define HAVE_STRUCT_DIRENT64 1
EOF

fi

echo "$as_me:12896: checking for major macro" >&5
echo $ECHO_N "checking for major macro... $ECHO_C" >&6
if test "${samba_cv_HAVE_DEVICE_MAJOR_FN+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

if test "$cross_compiling" = yes; then
  samba_cv_HAVE_DEVICE_MAJOR_FN=cross
else
  cat >conftest.$ac_ext <<_ACEOF
#line 12906 "configure"
#include "confdefs.h"

#if defined(HAVE_UNISTD_H)
#include <unistd.h>
#endif
#include <sys/types.h>
main() { dev_t dev; int i = major(dev); return 0; }
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:12916: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:12919: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:12921: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:12924: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  samba_cv_HAVE_DEVICE_MAJOR_FN=yes
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
samba_cv_HAVE_DEVICE_MAJOR_FN=no
fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
echo "$as_me:12936: result: $samba_cv_HAVE_DEVICE_MAJOR_FN" >&5
echo "${ECHO_T}$samba_cv_HAVE_DEVICE_MAJOR_FN" >&6
if test x"$samba_cv_HAVE_DEVICE_MAJOR_FN" = x"yes"; then
    cat >>confdefs.h <<\EOF
#define HAVE_DEVICE_MAJOR_FN 1
EOF

fi

echo "$as_me:12945: checking for minor macro" >&5
echo $ECHO_N "checking for minor macro... $ECHO_C" >&6
if test "${samba_cv_HAVE_DEVICE_MINOR_FN+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

if test "$cross_compiling" = yes; then
  samba_cv_HAVE_DEVICE_MINOR_FN=cross
else
  cat >conftest.$ac_ext <<_ACEOF
#line 12955 "configure"
#include "confdefs.h"

#if defined(HAVE_UNISTD_H)
#include <unistd.h>
#endif
#include <sys/types.h>
main() { dev_t dev; int i = minor(dev); return 0; }
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:12965: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:12968: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:12970: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:12973: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  samba_cv_HAVE_DEVICE_MINOR_FN=yes
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
samba_cv_HAVE_DEVICE_MINOR_FN=no
fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
echo "$as_me:12985: result: $samba_cv_HAVE_DEVICE_MINOR_FN" >&5
echo "${ECHO_T}$samba_cv_HAVE_DEVICE_MINOR_FN" >&6
if test x"$samba_cv_HAVE_DEVICE_MINOR_FN" = x"yes"; then
    cat >>confdefs.h <<\EOF
#define HAVE_DEVICE_MINOR_FN 1
EOF

fi

echo "$as_me:12994: checking for makedev macro" >&5
echo $ECHO_N "checking for makedev macro... $ECHO_C" >&6
if test "${samba_cv_HAVE_MAKEDEV_FN+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

if test "$cross_compiling" = yes; then
  samba_cv_HAVE_MAKEDEV_FN=cross
else
  cat >conftest.$ac_ext <<_ACEOF
#line 13004 "configure"
#include "confdefs.h"

#if defined(HAVE_UNISTD_H)
#include <unistd.h>
#endif
#include <sys/types.h>
main() { dev_t dev = makedev(1,2); return 0; }
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:13014: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:13017: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:13019: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:13022: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  samba_cv_HAVE_MAKEDEV_FN=yes
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
samba_cv_HAVE_MAKEDEV_FN=no
fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
echo "$as_me:13034: result: $samba_cv_HAVE_MAKEDEV_FN" >&5
echo "${ECHO_T}$samba_cv_HAVE_MAKEDEV_FN" >&6
if test x"$samba_cv_HAVE_MAKEDEV_FN" = x"yes"; then
    cat >>confdefs.h <<\EOF
#define MAKEDEV_FN 1
EOF

fi

echo "$as_me:13043: checking for unsigned char" >&5
echo $ECHO_N "checking for unsigned char... $ECHO_C" >&6
if test "${samba_cv_HAVE_UNSIGNED_CHAR+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

if test "$cross_compiling" = yes; then
  samba_cv_HAVE_UNSIGNED_CHAR=cross
else
  cat >conftest.$ac_ext <<_ACEOF
#line 13053 "configure"
#include "confdefs.h"
#include <stdio.h>
main() { char c; c=250; exit((c > 0)?0:1); }
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:13059: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:13062: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:13064: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:13067: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  samba_cv_HAVE_UNSIGNED_CHAR=yes
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
samba_cv_HAVE_UNSIGNED_CHAR=no
fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
echo "$as_me:13079: result: $samba_cv_HAVE_UNSIGNED_CHAR" >&5
echo "${ECHO_T}$samba_cv_HAVE_UNSIGNED_CHAR" >&6
if test x"$samba_cv_HAVE_UNSIGNED_CHAR" = x"yes"; then
    cat >>confdefs.h <<\EOF
#define HAVE_UNSIGNED_CHAR 1
EOF

fi

echo "$as_me:13088: checking for sin_len in sock" >&5
echo $ECHO_N "checking for sin_len in sock... $ECHO_C" >&6
if test "${samba_cv_HAVE_SOCK_SIN_LEN+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

cat >conftest.$ac_ext <<_ACEOF
#line 13095 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
int
main ()
{
struct sockaddr_in sock; sock.sin_len = sizeof(sock);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:13109: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:13112: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:13115: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:13118: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  samba_cv_HAVE_SOCK_SIN_LEN=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
samba_cv_HAVE_SOCK_SIN_LEN=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:13128: result: $samba_cv_HAVE_SOCK_SIN_LEN" >&5
echo "${ECHO_T}$samba_cv_HAVE_SOCK_SIN_LEN" >&6
if test x"$samba_cv_HAVE_SOCK_SIN_LEN" = x"yes"; then
    cat >>confdefs.h <<\EOF
#define HAVE_SOCK_SIN_LEN 1
EOF

fi

echo "$as_me:13137: checking whether seekdir returns void" >&5
echo $ECHO_N "checking whether seekdir returns void... $ECHO_C" >&6
if test "${samba_cv_SEEKDIR_RETURNS_VOID+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

cat >conftest.$ac_ext <<_ACEOF
#line 13144 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <dirent.h>
void seekdir(DIR *d, long loc) { return; }
int
main ()
{
return 0;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:13158: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:13161: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:13164: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:13167: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  samba_cv_SEEKDIR_RETURNS_VOID=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
samba_cv_SEEKDIR_RETURNS_VOID=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:13177: result: $samba_cv_SEEKDIR_RETURNS_VOID" >&5
echo "${ECHO_T}$samba_cv_SEEKDIR_RETURNS_VOID" >&6
if test x"$samba_cv_SEEKDIR_RETURNS_VOID" = x"yes"; then
    cat >>confdefs.h <<\EOF
#define SEEKDIR_RETURNS_VOID 1
EOF

fi

echo "$as_me:13186: checking for __FILE__ macro" >&5
echo $ECHO_N "checking for __FILE__ macro... $ECHO_C" >&6
if test "${samba_cv_HAVE_FILE_MACRO+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

cat >conftest.$ac_ext <<_ACEOF
#line 13193 "configure"
#include "confdefs.h"
#include <stdio.h>
int
main ()
{
printf("%s\n", __FILE__);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:13205: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:13208: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:13211: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:13214: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  samba_cv_HAVE_FILE_MACRO=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
samba_cv_HAVE_FILE_MACRO=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:13224: result: $samba_cv_HAVE_FILE_MACRO" >&5
echo "${ECHO_T}$samba_cv_HAVE_FILE_MACRO" >&6
if test x"$samba_cv_HAVE_FILE_MACRO" = x"yes"; then
    cat >>confdefs.h <<\EOF
#define HAVE_FILE_MACRO 1
EOF

fi

echo "$as_me:13233: checking for __FUNCTION__ macro" >&5
echo $ECHO_N "checking for __FUNCTION__ macro... $ECHO_C" >&6
if test "${samba_cv_HAVE_FUNCTION_MACRO+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

cat >conftest.$ac_ext <<_ACEOF
#line 13240 "configure"
#include "confdefs.h"
#include <stdio.h>
int
main ()
{
printf("%s\n", __FUNCTION__);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:13252: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:13255: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:13258: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:13261: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  samba_cv_HAVE_FUNCTION_MACRO=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
samba_cv_HAVE_FUNCTION_MACRO=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:13271: result: $samba_cv_HAVE_FUNCTION_MACRO" >&5
echo "${ECHO_T}$samba_cv_HAVE_FUNCTION_MACRO" >&6
if test x"$samba_cv_HAVE_FUNCTION_MACRO" = x"yes"; then
    cat >>confdefs.h <<\EOF
#define HAVE_FUNCTION_MACRO 1
EOF

fi

echo "$as_me:13280: checking if gettimeofday takes tz argument" >&5
echo $ECHO_N "checking if gettimeofday takes tz argument... $ECHO_C" >&6
if test "${samba_cv_HAVE_GETTIMEOFDAY_TZ+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

if test "$cross_compiling" = yes; then
  samba_cv_HAVE_GETTIMEOFDAY_TZ=cross
else
  cat >conftest.$ac_ext <<_ACEOF
#line 13290 "configure"
#include "confdefs.h"

#include <sys/time.h>
#include <unistd.h>
main() { struct timeval tv; exit(gettimeofday(&tv, NULL));}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:13298: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:13301: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:13303: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:13306: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  samba_cv_HAVE_GETTIMEOFDAY_TZ=yes
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
samba_cv_HAVE_GETTIMEOFDAY_TZ=no
fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
echo "$as_me:13318: result: $samba_cv_HAVE_GETTIMEOFDAY_TZ" >&5
echo "${ECHO_T}$samba_cv_HAVE_GETTIMEOFDAY_TZ" >&6
if test x"$samba_cv_HAVE_GETTIMEOFDAY_TZ" = x"yes"; then
    cat >>confdefs.h <<\EOF
#define HAVE_GETTIMEOFDAY_TZ 1
EOF

fi

echo "$as_me:13327: checking for C99 vsnprintf" >&5
echo $ECHO_N "checking for C99 vsnprintf... $ECHO_C" >&6
if test "${samba_cv_HAVE_C99_VSNPRINTF+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

if test "$cross_compiling" = yes; then
  samba_cv_HAVE_C99_VSNPRINTF=cross
else
  cat >conftest.$ac_ext <<_ACEOF
#line 13337 "configure"
#include "confdefs.h"

#include <sys/types.h>
#include <stdarg.h>
void foo(const char *format, ...) {
	va_list ap;
	int len;
	char buf[5];

	va_start(ap, format);
	len = vsnprintf(buf, 0, format, ap);
	va_end(ap);
	if (len != 5) exit(1);

	va_start(ap, format);
	len = vsnprintf(0, 0, format, ap);
	va_end(ap);
	if (len != 5) exit(1);

	if (snprintf(buf, 3, "hello") != 5 || strcmp(buf, "he") != 0) exit(1);

	exit(0);
}
main() { foo("hello"); }

_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:13365: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:13368: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:13370: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:13373: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  samba_cv_HAVE_C99_VSNPRINTF=yes
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
samba_cv_HAVE_C99_VSNPRINTF=no
fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
echo "$as_me:13385: result: $samba_cv_HAVE_C99_VSNPRINTF" >&5
echo "${ECHO_T}$samba_cv_HAVE_C99_VSNPRINTF" >&6
if test x"$samba_cv_HAVE_C99_VSNPRINTF" = x"yes"; then
	cat >>confdefs.h <<\EOF
#define HAVE_C99_VSNPRINTF 1
EOF

fi

echo "$as_me:13394: checking for broken readdir" >&5
echo $ECHO_N "checking for broken readdir... $ECHO_C" >&6
if test "${samba_cv_HAVE_BROKEN_READDIR+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

if test "$cross_compiling" = yes; then
  samba_cv_HAVE_BROKEN_READDIR=cross
else
  cat >conftest.$ac_ext <<_ACEOF
#line 13404 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <dirent.h>
main() { struct dirent *di; DIR *d = opendir("."); di = readdir(d);
if (di && di->d_name[-2] == '.' && di->d_name[-1] == 0 &&
di->d_name[0] == 0) exit(0); exit(1);}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:13413: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:13416: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:13418: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:13421: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  samba_cv_HAVE_BROKEN_READDIR=yes
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
samba_cv_HAVE_BROKEN_READDIR=no
fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
echo "$as_me:13433: result: $samba_cv_HAVE_BROKEN_READDIR" >&5
echo "${ECHO_T}$samba_cv_HAVE_BROKEN_READDIR" >&6
if test x"$samba_cv_HAVE_BROKEN_READDIR" = x"yes"; then
    cat >>confdefs.h <<\EOF
#define HAVE_BROKEN_READDIR 1
EOF

fi

echo "$as_me:13442: checking for utimbuf" >&5
echo $ECHO_N "checking for utimbuf... $ECHO_C" >&6
if test "${samba_cv_HAVE_UTIMBUF+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

cat >conftest.$ac_ext <<_ACEOF
#line 13449 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <utime.h>
int
main ()
{
struct utimbuf tbuf;  tbuf.actime = 0; tbuf.modtime = 1; exit(utime("foo.c",&tbuf));
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:13462: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:13465: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:13468: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:13471: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  samba_cv_HAVE_UTIMBUF=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
samba_cv_HAVE_UTIMBUF=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:13481: result: $samba_cv_HAVE_UTIMBUF" >&5
echo "${ECHO_T}$samba_cv_HAVE_UTIMBUF" >&6
if test x"$samba_cv_HAVE_UTIMBUF" = x"yes"; then
    cat >>confdefs.h <<\EOF
#define HAVE_UTIMBUF 1
EOF

fi

for ac_func in pututline pututxline updwtmp updwtmpx getutmpx
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:13493: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 13499 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func (); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char $ac_func ();
char (*f) ();

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

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:13530: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:13533: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:13536: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:13539: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:13549: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF

fi
done

echo "$as_me:13559: checking for ut_name in utmp" >&5
echo $ECHO_N "checking for ut_name in utmp... $ECHO_C" >&6
if test "${samba_cv_HAVE_UT_UT_NAME+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

cat >conftest.$ac_ext <<_ACEOF
#line 13566 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <utmp.h>
int
main ()
{
struct utmp ut;  ut.ut_name[0] = 'a';
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:13579: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:13582: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:13585: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:13588: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  samba_cv_HAVE_UT_UT_NAME=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
samba_cv_HAVE_UT_UT_NAME=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:13598: result: $samba_cv_HAVE_UT_UT_NAME" >&5
echo "${ECHO_T}$samba_cv_HAVE_UT_UT_NAME" >&6
if test x"$samba_cv_HAVE_UT_UT_NAME" = x"yes"; then
    cat >>confdefs.h <<\EOF
#define HAVE_UT_UT_NAME 1
EOF

fi

echo "$as_me:13607: checking for ut_user in utmp" >&5
echo $ECHO_N "checking for ut_user in utmp... $ECHO_C" >&6
if test "${samba_cv_HAVE_UT_UT_USER+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

cat >conftest.$ac_ext <<_ACEOF
#line 13614 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <utmp.h>
int
main ()
{
struct utmp ut;  ut.ut_user[0] = 'a';
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:13627: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:13630: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:13633: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:13636: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  samba_cv_HAVE_UT_UT_USER=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
samba_cv_HAVE_UT_UT_USER=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:13646: result: $samba_cv_HAVE_UT_UT_USER" >&5
echo "${ECHO_T}$samba_cv_HAVE_UT_UT_USER" >&6
if test x"$samba_cv_HAVE_UT_UT_USER" = x"yes"; then
    cat >>confdefs.h <<\EOF
#define HAVE_UT_UT_USER 1
EOF

fi

echo "$as_me:13655: checking for ut_id in utmp" >&5
echo $ECHO_N "checking for ut_id in utmp... $ECHO_C" >&6
if test "${samba_cv_HAVE_UT_UT_ID+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

cat >conftest.$ac_ext <<_ACEOF
#line 13662 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <utmp.h>
int
main ()
{
struct utmp ut;  ut.ut_id[0] = 'a';
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:13675: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:13678: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:13681: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:13684: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  samba_cv_HAVE_UT_UT_ID=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
samba_cv_HAVE_UT_UT_ID=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:13694: result: $samba_cv_HAVE_UT_UT_ID" >&5
echo "${ECHO_T}$samba_cv_HAVE_UT_UT_ID" >&6
if test x"$samba_cv_HAVE_UT_UT_ID" = x"yes"; then
    cat >>confdefs.h <<\EOF
#define HAVE_UT_UT_ID 1
EOF

fi

echo "$as_me:13703: checking for ut_host in utmp" >&5
echo $ECHO_N "checking for ut_host in utmp... $ECHO_C" >&6
if test "${samba_cv_HAVE_UT_UT_HOST+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

cat >conftest.$ac_ext <<_ACEOF
#line 13710 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <utmp.h>
int
main ()
{
struct utmp ut;  ut.ut_host[0] = 'a';
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:13723: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:13726: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:13729: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:13732: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  samba_cv_HAVE_UT_UT_HOST=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
samba_cv_HAVE_UT_UT_HOST=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:13742: result: $samba_cv_HAVE_UT_UT_HOST" >&5
echo "${ECHO_T}$samba_cv_HAVE_UT_UT_HOST" >&6
if test x"$samba_cv_HAVE_UT_UT_HOST" = x"yes"; then
    cat >>confdefs.h <<\EOF
#define HAVE_UT_UT_HOST 1
EOF

fi

echo "$as_me:13751: checking for ut_time in utmp" >&5
echo $ECHO_N "checking for ut_time in utmp... $ECHO_C" >&6
if test "${samba_cv_HAVE_UT_UT_TIME+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

cat >conftest.$ac_ext <<_ACEOF
#line 13758 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <utmp.h>
int
main ()
{
struct utmp ut;  time_t t; ut.ut_time = t;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:13771: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:13774: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:13777: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:13780: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  samba_cv_HAVE_UT_UT_TIME=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
samba_cv_HAVE_UT_UT_TIME=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:13790: result: $samba_cv_HAVE_UT_UT_TIME" >&5
echo "${ECHO_T}$samba_cv_HAVE_UT_UT_TIME" >&6
if test x"$samba_cv_HAVE_UT_UT_TIME" = x"yes"; then
    cat >>confdefs.h <<\EOF
#define HAVE_UT_UT_TIME 1
EOF

fi

echo "$as_me:13799: checking for ut_tv in utmp" >&5
echo $ECHO_N "checking for ut_tv in utmp... $ECHO_C" >&6
if test "${samba_cv_HAVE_UT_UT_TV+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

cat >conftest.$ac_ext <<_ACEOF
#line 13806 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <utmp.h>
int
main ()
{
struct utmp ut;  struct timeval tv; ut.ut_tv = tv;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:13819: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:13822: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:13825: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:13828: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  samba_cv_HAVE_UT_UT_TV=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
samba_cv_HAVE_UT_UT_TV=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:13838: result: $samba_cv_HAVE_UT_UT_TV" >&5
echo "${ECHO_T}$samba_cv_HAVE_UT_UT_TV" >&6
if test x"$samba_cv_HAVE_UT_UT_TV" = x"yes"; then
    cat >>confdefs.h <<\EOF
#define HAVE_UT_UT_TV 1
EOF

fi

echo "$as_me:13847: checking for ut_type in utmp" >&5
echo $ECHO_N "checking for ut_type in utmp... $ECHO_C" >&6
if test "${samba_cv_HAVE_UT_UT_TYPE+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

cat >conftest.$ac_ext <<_ACEOF
#line 13854 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <utmp.h>
int
main ()
{
struct utmp ut;  ut.ut_type = 0;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:13867: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:13870: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:13873: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:13876: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  samba_cv_HAVE_UT_UT_TYPE=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
samba_cv_HAVE_UT_UT_TYPE=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:13886: result: $samba_cv_HAVE_UT_UT_TYPE" >&5
echo "${ECHO_T}$samba_cv_HAVE_UT_UT_TYPE" >&6
if test x"$samba_cv_HAVE_UT_UT_TYPE" = x"yes"; then
    cat >>confdefs.h <<\EOF
#define HAVE_UT_UT_TYPE 1
EOF

fi

echo "$as_me:13895: checking for ut_pid in utmp" >&5
echo $ECHO_N "checking for ut_pid in utmp... $ECHO_C" >&6
if test "${samba_cv_HAVE_UT_UT_PID+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

cat >conftest.$ac_ext <<_ACEOF
#line 13902 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <utmp.h>
int
main ()
{
struct utmp ut;  ut.ut_pid = 0;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:13915: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:13918: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:13921: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:13924: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  samba_cv_HAVE_UT_UT_PID=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
samba_cv_HAVE_UT_UT_PID=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:13934: result: $samba_cv_HAVE_UT_UT_PID" >&5
echo "${ECHO_T}$samba_cv_HAVE_UT_UT_PID" >&6
if test x"$samba_cv_HAVE_UT_UT_PID" = x"yes"; then
    cat >>confdefs.h <<\EOF
#define HAVE_UT_UT_PID 1
EOF

fi

echo "$as_me:13943: checking for ut_exit in utmp" >&5
echo $ECHO_N "checking for ut_exit in utmp... $ECHO_C" >&6
if test "${samba_cv_HAVE_UT_UT_EXIT+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

cat >conftest.$ac_ext <<_ACEOF
#line 13950 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <utmp.h>
int
main ()
{
struct utmp ut;  ut.ut_exit.e_exit = 0;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:13963: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:13966: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:13969: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:13972: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  samba_cv_HAVE_UT_UT_EXIT=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
samba_cv_HAVE_UT_UT_EXIT=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:13982: result: $samba_cv_HAVE_UT_UT_EXIT" >&5
echo "${ECHO_T}$samba_cv_HAVE_UT_UT_EXIT" >&6
if test x"$samba_cv_HAVE_UT_UT_EXIT" = x"yes"; then
    cat >>confdefs.h <<\EOF
#define HAVE_UT_UT_EXIT 1
EOF

fi

echo "$as_me:13991: checking for ut_addr in utmp" >&5
echo $ECHO_N "checking for ut_addr in utmp... $ECHO_C" >&6
if test "${samba_cv_HAVE_UT_UT_ADDR+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

cat >conftest.$ac_ext <<_ACEOF
#line 13998 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <utmp.h>
int
main ()
{
struct utmp ut;  ut.ut_addr = 0;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:14011: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:14014: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:14017: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:14020: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  samba_cv_HAVE_UT_UT_ADDR=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
samba_cv_HAVE_UT_UT_ADDR=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:14030: result: $samba_cv_HAVE_UT_UT_ADDR" >&5
echo "${ECHO_T}$samba_cv_HAVE_UT_UT_ADDR" >&6
if test x"$samba_cv_HAVE_UT_UT_ADDR" = x"yes"; then
    cat >>confdefs.h <<\EOF
#define HAVE_UT_UT_ADDR 1
EOF

fi

if test x$ac_cv_func_pututline = xyes ; then
  echo "$as_me:14040: checking whether pututline returns pointer" >&5
echo $ECHO_N "checking whether pututline returns pointer... $ECHO_C" >&6
if test "${samba_cv_PUTUTLINE_RETURNS_UTMP+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

  cat >conftest.$ac_ext <<_ACEOF
#line 14047 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <utmp.h>
int
main ()
{
struct utmp utarg; struct utmp *utreturn; utreturn = pututline(&utarg);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:14060: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:14063: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:14066: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:14069: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  samba_cv_PUTUTLINE_RETURNS_UTMP=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
samba_cv_PUTUTLINE_RETURNS_UTMP=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:14079: result: $samba_cv_PUTUTLINE_RETURNS_UTMP" >&5
echo "${ECHO_T}$samba_cv_PUTUTLINE_RETURNS_UTMP" >&6
  if test x"$samba_cv_PUTUTLINE_RETURNS_UTMP" = x"yes"; then
      cat >>confdefs.h <<\EOF
#define PUTUTLINE_RETURNS_UTMP 1
EOF

  fi
fi

echo "$as_me:14089: checking for ut_syslen in utmpx" >&5
echo $ECHO_N "checking for ut_syslen in utmpx... $ECHO_C" >&6
if test "${samba_cv_HAVE_UX_UT_SYSLEN+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

cat >conftest.$ac_ext <<_ACEOF
#line 14096 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <utmpx.h>
int
main ()
{
struct utmpx ux;  ux.ut_syslen = 0;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:14109: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:14112: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:14115: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:14118: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  samba_cv_HAVE_UX_UT_SYSLEN=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
samba_cv_HAVE_UX_UT_SYSLEN=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:14128: result: $samba_cv_HAVE_UX_UT_SYSLEN" >&5
echo "${ECHO_T}$samba_cv_HAVE_UX_UT_SYSLEN" >&6
if test x"$samba_cv_HAVE_UX_UT_SYSLEN" = x"yes"; then
    cat >>confdefs.h <<\EOF
#define HAVE_UX_UT_SYSLEN 1
EOF

fi

echo "$as_me:14137: checking for Linux kernel oplocks" >&5
echo $ECHO_N "checking for Linux kernel oplocks... $ECHO_C" >&6
if test "${samba_cv_HAVE_KERNEL_OPLOCKS_LINUX+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

if test "$cross_compiling" = yes; then
  samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=cross
else
  cat >conftest.$ac_ext <<_ACEOF
#line 14147 "configure"
#include "confdefs.h"

#include <sys/types.h>
#include <fcntl.h>
#ifndef F_GETLEASE
#define F_GETLEASE	1025
#endif
main() {
       int fd = open("/dev/null", O_RDONLY);
       return fcntl(fd, F_GETLEASE, 0) == -1;
}

_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:14162: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:14165: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:14167: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:14170: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=yes
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=no
fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
echo "$as_me:14182: result: $samba_cv_HAVE_KERNEL_OPLOCKS_LINUX" >&5
echo "${ECHO_T}$samba_cv_HAVE_KERNEL_OPLOCKS_LINUX" >&6
if test x"$samba_cv_HAVE_KERNEL_OPLOCKS_LINUX" = x"yes"; then
    cat >>confdefs.h <<\EOF
#define HAVE_KERNEL_OPLOCKS_LINUX 1
EOF

fi

echo "$as_me:14191: checking for kernel change notify support" >&5
echo $ECHO_N "checking for kernel change notify support... $ECHO_C" >&6
if test "${samba_cv_HAVE_KERNEL_CHANGE_NOTIFY+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

if test "$cross_compiling" = yes; then
  samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=cross
else
  cat >conftest.$ac_ext <<_ACEOF
#line 14201 "configure"
#include "confdefs.h"

#include <sys/types.h>
#include <fcntl.h>
#include <signal.h>
#ifndef F_NOTIFY
#define F_NOTIFY 1026
#endif
main() {
       	exit(fcntl(open("/tmp", O_RDONLY), F_NOTIFY, 0) == -1 ?  1 : 0);
}

_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:14216: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:14219: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:14221: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:14224: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=yes
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=no
fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
echo "$as_me:14236: result: $samba_cv_HAVE_KERNEL_CHANGE_NOTIFY" >&5
echo "${ECHO_T}$samba_cv_HAVE_KERNEL_CHANGE_NOTIFY" >&6
if test x"$samba_cv_HAVE_KERNEL_CHANGE_NOTIFY" = x"yes"; then
    cat >>confdefs.h <<\EOF
#define HAVE_KERNEL_CHANGE_NOTIFY 1
EOF

fi

echo "$as_me:14245: checking for kernel share modes" >&5
echo $ECHO_N "checking for kernel share modes... $ECHO_C" >&6
if test "${samba_cv_HAVE_KERNEL_SHARE_MODES+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

if test "$cross_compiling" = yes; then
  samba_cv_HAVE_KERNEL_SHARE_MODES=cross
else
  cat >conftest.$ac_ext <<_ACEOF
#line 14255 "configure"
#include "confdefs.h"

#include <sys/types.h>
#include <fcntl.h>
#include <signal.h>
#include <sys/file.h>
#ifndef LOCK_MAND
#define LOCK_MAND	32
#define LOCK_READ	64
#endif
main() {
       	exit(flock(open("/dev/null", O_RDWR), LOCK_MAND|LOCK_READ) != 0);
}

_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:14272: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:14275: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:14277: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:14280: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  samba_cv_HAVE_KERNEL_SHARE_MODES=yes
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
samba_cv_HAVE_KERNEL_SHARE_MODES=no
fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
echo "$as_me:14292: result: $samba_cv_HAVE_KERNEL_SHARE_MODES" >&5
echo "${ECHO_T}$samba_cv_HAVE_KERNEL_SHARE_MODES" >&6
if test x"$samba_cv_HAVE_KERNEL_SHARE_MODES" = x"yes"; then
    cat >>confdefs.h <<\EOF
#define HAVE_KERNEL_SHARE_MODES 1
EOF

fi

echo "$as_me:14301: checking for IRIX kernel oplock type definitions" >&5
echo $ECHO_N "checking for IRIX kernel oplock type definitions... $ECHO_C" >&6
if test "${samba_cv_HAVE_KERNEL_OPLOCKS_IRIX+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

cat >conftest.$ac_ext <<_ACEOF
#line 14308 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <fcntl.h>
int
main ()
{
oplock_stat_t t; t.os_state = OP_REVOKE; t.os_dev = 1; t.os_ino = 1;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:14321: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:14324: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:14327: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:14330: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:14340: result: $samba_cv_HAVE_KERNEL_OPLOCKS_IRIX" >&5
echo "${ECHO_T}$samba_cv_HAVE_KERNEL_OPLOCKS_IRIX" >&6
if test x"$samba_cv_HAVE_KERNEL_OPLOCKS_IRIX" = x"yes"; then
    cat >>confdefs.h <<\EOF
#define HAVE_KERNEL_OPLOCKS_IRIX 1
EOF

fi

echo "$as_me:14349: checking for irix specific capabilities" >&5
echo $ECHO_N "checking for irix specific capabilities... $ECHO_C" >&6
if test "${samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

if test "$cross_compiling" = yes; then
  samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=cross
else
  cat >conftest.$ac_ext <<_ACEOF
#line 14359 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/capability.h>
main() {
 cap_t cap;
 if ((cap = cap_get_proc()) == NULL)
   exit(1);
 cap->cap_effective |= CAP_NETWORK_MGT;
 cap->cap_inheritable |= CAP_NETWORK_MGT;
 cap_set_proc(cap);
 exit(0);
}

_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:14375: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:14378: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:14380: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:14383: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=yes
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=no
fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
echo "$as_me:14395: result: $samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES" >&5
echo "${ECHO_T}$samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES" >&6
if test x"$samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES" = x"yes"; then
    cat >>confdefs.h <<\EOF
#define HAVE_IRIX_SPECIFIC_CAPABILITIES 1
EOF

fi

#
# Check for int16, uint16, int32 and uint32 in rpc/types.h included from rpc/rpc.h
# This is *really* broken but some systems (DEC OSF1) do this.... JRA.
#

echo "$as_me:14409: checking for int16 typedef included by rpc/rpc.h" >&5
echo $ECHO_N "checking for int16 typedef included by rpc/rpc.h... $ECHO_C" >&6
if test "${samba_cv_HAVE_INT16_FROM_RPC_RPC_H+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

cat >conftest.$ac_ext <<_ACEOF
#line 14416 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if defined(HAVE_RPC_RPC_H)
#include <rpc/rpc.h>
#endif
int
main ()
{
int16 testvar;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:14431: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:14434: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:14437: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:14440: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  samba_cv_HAVE_INT16_FROM_RPC_RPC_H=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
samba_cv_HAVE_INT16_FROM_RPC_RPC_H=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:14450: result: $samba_cv_HAVE_INT16_FROM_RPC_RPC_H" >&5
echo "${ECHO_T}$samba_cv_HAVE_INT16_FROM_RPC_RPC_H" >&6
if test x"$samba_cv_HAVE_INT16_FROM_RPC_RPC_H" = x"yes"; then
    cat >>confdefs.h <<\EOF
#define HAVE_INT16_FROM_RPC_RPC_H 1
EOF

fi

echo "$as_me:14459: checking for uint16 typedef included by rpc/rpc.h" >&5
echo $ECHO_N "checking for uint16 typedef included by rpc/rpc.h... $ECHO_C" >&6
if test "${samba_cv_HAVE_UINT16_FROM_RPC_RPC_H+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

cat >conftest.$ac_ext <<_ACEOF
#line 14466 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if defined(HAVE_RPC_RPC_H)
#include <rpc/rpc.h>
#endif
int
main ()
{
uint16 testvar;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:14481: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:14484: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:14487: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:14490: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:14500: result: $samba_cv_HAVE_UINT16_FROM_RPC_RPC_H" >&5
echo "${ECHO_T}$samba_cv_HAVE_UINT16_FROM_RPC_RPC_H" >&6
if test x"$samba_cv_HAVE_UINT16_FROM_RPC_RPC_H" = x"yes"; then
    cat >>confdefs.h <<\EOF
#define HAVE_UINT16_FROM_RPC_RPC_H 1
EOF

fi

echo "$as_me:14509: checking for int32 typedef included by rpc/rpc.h" >&5
echo $ECHO_N "checking for int32 typedef included by rpc/rpc.h... $ECHO_C" >&6
if test "${samba_cv_HAVE_INT32_FROM_RPC_RPC_H+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

cat >conftest.$ac_ext <<_ACEOF
#line 14516 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if defined(HAVE_RPC_RPC_H)
#include <rpc/rpc.h>
#endif
int
main ()
{
int32 testvar;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:14531: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:14534: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:14537: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:14540: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  samba_cv_HAVE_INT32_FROM_RPC_RPC_H=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
samba_cv_HAVE_INT32_FROM_RPC_RPC_H=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:14550: result: $samba_cv_HAVE_INT32_FROM_RPC_RPC_H" >&5
echo "${ECHO_T}$samba_cv_HAVE_INT32_FROM_RPC_RPC_H" >&6
if test x"$samba_cv_HAVE_INT32_FROM_RPC_RPC_H" = x"yes"; then
    cat >>confdefs.h <<\EOF
#define HAVE_INT32_FROM_RPC_RPC_H 1
EOF

fi

echo "$as_me:14559: checking for uint32 typedef included by rpc/rpc.h" >&5
echo $ECHO_N "checking for uint32 typedef included by rpc/rpc.h... $ECHO_C" >&6
if test "${samba_cv_HAVE_UINT32_FROM_RPC_RPC_H+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

cat >conftest.$ac_ext <<_ACEOF
#line 14566 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if defined(HAVE_RPC_RPC_H)
#include <rpc/rpc.h>
#endif
int
main ()
{
uint32 testvar;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:14581: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:14584: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:14587: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:14590: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:14600: result: $samba_cv_HAVE_UINT32_FROM_RPC_RPC_H" >&5
echo "${ECHO_T}$samba_cv_HAVE_UINT32_FROM_RPC_RPC_H" >&6
if test x"$samba_cv_HAVE_UINT32_FROM_RPC_RPC_H" = x"yes"; then
    cat >>confdefs.h <<\EOF
#define HAVE_UINT32_FROM_RPC_RPC_H 1
EOF

fi

echo "$as_me:14609: checking for conflicting AUTH_ERROR define in rpc/rpc.h" >&5
echo $ECHO_N "checking for conflicting AUTH_ERROR define in rpc/rpc.h... $ECHO_C" >&6
if test "${samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

cat >conftest.$ac_ext <<_ACEOF
#line 14616 "configure"
#include "confdefs.h"
#include <sys/types.h>
#ifdef HAVE_SYS_SECURITY_H
#include <sys/security.h>
#include <prot.h>
#endif  /* HAVE_SYS_SECURITY_H */
#if defined(HAVE_RPC_RPC_H)
#include <rpc/rpc.h>
#endif
int
main ()
{
int testvar;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:14635: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:14638: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:14641: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:14644: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=no
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=yes
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:14654: result: $samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT" >&5
echo "${ECHO_T}$samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT" >&6
if test x"$samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT" = x"yes"; then
    cat >>confdefs.h <<\EOF
#define HAVE_RPC_AUTH_ERROR_CONFLICT 1
EOF

fi

echo "$as_me:14663: checking for test routines" >&5
echo $ECHO_N "checking for test routines... $ECHO_C" >&6
if test "$cross_compiling" = yes; then
  { echo "$as_me:14666: WARNING: cannot run when cross-compiling" >&5
echo "$as_me: WARNING: cannot run when cross-compiling" >&2;}
else
  cat >conftest.$ac_ext <<_ACEOF
#line 14670 "configure"
#include "confdefs.h"
#include "${srcdir-.}/tests/trivial.c"
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:14675: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:14678: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:14680: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:14683: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  echo "$as_me:14685: result: yes" >&5
echo "${ECHO_T}yes" >&6
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
{ { echo "$as_me:14691: error: cant find test code. Aborting config" >&5
echo "$as_me: error: cant find test code. Aborting config" >&2;}
   { (exit 1); exit 1; }; }
fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi

echo "$as_me:14698: checking for ftruncate extend" >&5
echo $ECHO_N "checking for ftruncate extend... $ECHO_C" >&6
if test "${samba_cv_HAVE_FTRUNCATE_EXTEND+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

if test "$cross_compiling" = yes; then
  samba_cv_HAVE_FTRUNCATE_EXTEND=cross
else
  cat >conftest.$ac_ext <<_ACEOF
#line 14708 "configure"
#include "confdefs.h"
#include "${srcdir-.}/tests/ftruncate.c"
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:14713: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:14716: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:14718: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:14721: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  samba_cv_HAVE_FTRUNCATE_EXTEND=yes
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
samba_cv_HAVE_FTRUNCATE_EXTEND=no
fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
echo "$as_me:14733: result: $samba_cv_HAVE_FTRUNCATE_EXTEND" >&5
echo "${ECHO_T}$samba_cv_HAVE_FTRUNCATE_EXTEND" >&6
if test x"$samba_cv_HAVE_FTRUNCATE_EXTEND" = x"yes"; then
    cat >>confdefs.h <<\EOF
#define HAVE_FTRUNCATE_EXTEND 1
EOF

fi

echo "$as_me:14742: checking for broken getgroups" >&5
echo $ECHO_N "checking for broken getgroups... $ECHO_C" >&6
if test "${samba_cv_HAVE_BROKEN_GETGROUPS+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

if test "$cross_compiling" = yes; then
  samba_cv_HAVE_BROKEN_GETGROUPS=cross
else
  cat >conftest.$ac_ext <<_ACEOF
#line 14752 "configure"
#include "confdefs.h"
#include "${srcdir-.}/tests/getgroups.c"
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:14757: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:14760: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:14762: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:14765: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  samba_cv_HAVE_BROKEN_GETGROUPS=yes
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
samba_cv_HAVE_BROKEN_GETGROUPS=no
fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
echo "$as_me:14777: result: $samba_cv_HAVE_BROKEN_GETGROUPS" >&5
echo "${ECHO_T}$samba_cv_HAVE_BROKEN_GETGROUPS" >&6
if test x"$samba_cv_HAVE_BROKEN_GETGROUPS" = x"yes"; then
    cat >>confdefs.h <<\EOF
#define HAVE_BROKEN_GETGROUPS 1
EOF

fi

echo "$as_me:14786: checking whether getpass should be replaced" >&5
echo $ECHO_N "checking whether getpass should be replaced... $ECHO_C" >&6
if test "${samba_cv_REPLACE_GETPASS+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

SAVE_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS -I${srcdir-.}/ -I${srcdir-.}/include -I${srcdir-.}/ubiqx -I${srcdir-.}/smbwrapper"
cat >conftest.$ac_ext <<_ACEOF
#line 14795 "configure"
#include "confdefs.h"

#define REPLACE_GETPASS 1
#define NO_CONFIG_H 1
#define main dont_declare_main
#include "${srcdir-.}/lib/getsmbpass.c"
#undef main

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:14813: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:14816: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:14819: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:14822: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  samba_cv_REPLACE_GETPASS=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
samba_cv_REPLACE_GETPASS=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
CPPFLAGS="$SAVE_CPPFLAGS"

fi
echo "$as_me:14834: result: $samba_cv_REPLACE_GETPASS" >&5
echo "${ECHO_T}$samba_cv_REPLACE_GETPASS" >&6
if test x"$samba_cv_REPLACE_GETPASS" = x"yes"; then
	cat >>confdefs.h <<\EOF
#define REPLACE_GETPASS 1
EOF

fi

echo "$as_me:14843: checking for broken inet_ntoa" >&5
echo $ECHO_N "checking for broken inet_ntoa... $ECHO_C" >&6
if test "${samba_cv_REPLACE_INET_NTOA+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

if test "$cross_compiling" = yes; then
  samba_cv_REPLACE_INET_NTOA=cross
else
  cat >conftest.$ac_ext <<_ACEOF
#line 14853 "configure"
#include "confdefs.h"

#include <stdio.h>
#include <sys/types.h>
#include <netinet/in.h>
#ifdef HAVE_ARPA_INET_H
#include <arpa/inet.h>
#endif
main() { struct in_addr ip; ip.s_addr = 0x12345678;
if (strcmp(inet_ntoa(ip),"18.52.86.120") &&
    strcmp(inet_ntoa(ip),"120.86.52.18")) { exit(0); }
exit(1);}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:14868: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:14871: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:14873: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:14876: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  samba_cv_REPLACE_INET_NTOA=yes
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
samba_cv_REPLACE_INET_NTOA=no
fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
echo "$as_me:14888: result: $samba_cv_REPLACE_INET_NTOA" >&5
echo "${ECHO_T}$samba_cv_REPLACE_INET_NTOA" >&6
if test x"$samba_cv_REPLACE_INET_NTOA" = x"yes"; then
    cat >>confdefs.h <<\EOF
#define REPLACE_INET_NTOA 1
EOF

fi

echo "$as_me:14897: checking for secure mkstemp" >&5
echo $ECHO_N "checking for secure mkstemp... $ECHO_C" >&6
if test "${samba_cv_HAVE_SECURE_MKSTEMP+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

if test "$cross_compiling" = yes; then
  samba_cv_HAVE_SECURE_MKSTEMP=cross
else
  cat >conftest.$ac_ext <<_ACEOF
#line 14907 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
main() {
  struct stat st;
  char tpl[20]="/tmp/test.XXXXXX";
  int fd = mkstemp(tpl);
  if (fd == -1) exit(1);
  unlink(tpl);
  if (fstat(fd, &st) != 0) exit(1);
  if ((st.st_mode & 0777) != 0600) exit(1);
  exit(0);
}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:14925: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:14928: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:14930: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:14933: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  samba_cv_HAVE_SECURE_MKSTEMP=yes
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
samba_cv_HAVE_SECURE_MKSTEMP=no
fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
echo "$as_me:14945: result: $samba_cv_HAVE_SECURE_MKSTEMP" >&5
echo "${ECHO_T}$samba_cv_HAVE_SECURE_MKSTEMP" >&6
if test x"$samba_cv_HAVE_SECURE_MKSTEMP" = x"yes"; then
    cat >>confdefs.h <<\EOF
#define HAVE_SECURE_MKSTEMP 1
EOF

fi

echo "$as_me:14954: checking for sysconf(_SC_NGROUPS_MAX)" >&5
echo $ECHO_N "checking for sysconf(_SC_NGROUPS_MAX)... $ECHO_C" >&6
if test "${samba_cv_SYSCONF_SC_NGROUPS_MAX+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

if test "$cross_compiling" = yes; then
  samba_cv_SYSCONF_SC_NGROUPS_MAX=cross
else
  cat >conftest.$ac_ext <<_ACEOF
#line 14964 "configure"
#include "confdefs.h"
#include <unistd.h>
main() { exit(sysconf(_SC_NGROUPS_MAX) == -1 ? 1 : 0); }
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:14970: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:14973: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:14975: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:14978: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  samba_cv_SYSCONF_SC_NGROUPS_MAX=yes
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
samba_cv_SYSCONF_SC_NGROUPS_MAX=no
fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
echo "$as_me:14990: result: $samba_cv_SYSCONF_SC_NGROUPS_MAX" >&5
echo "${ECHO_T}$samba_cv_SYSCONF_SC_NGROUPS_MAX" >&6
if test x"$samba_cv_SYSCONF_SC_NGROUPS_MAX" = x"yes"; then
    cat >>confdefs.h <<\EOF
#define SYSCONF_SC_NGROUPS_MAX 1
EOF

fi

echo "$as_me:14999: checking for root" >&5
echo $ECHO_N "checking for root... $ECHO_C" >&6
if test "${samba_cv_HAVE_ROOT+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

if test "$cross_compiling" = yes; then
  samba_cv_HAVE_ROOT=cross
else
  cat >conftest.$ac_ext <<_ACEOF
#line 15009 "configure"
#include "confdefs.h"
main() { exit(getuid() != 0); }
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:15014: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:15017: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:15019: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:15022: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  samba_cv_HAVE_ROOT=yes
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
samba_cv_HAVE_ROOT=no
fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
echo "$as_me:15034: result: $samba_cv_HAVE_ROOT" >&5
echo "${ECHO_T}$samba_cv_HAVE_ROOT" >&6
if test x"$samba_cv_HAVE_ROOT" = x"yes"; then
    cat >>confdefs.h <<\EOF
#define HAVE_ROOT 1
EOF

else
    { echo "$as_me:15042: WARNING: running as non-root will disable some tests" >&5
echo "$as_me: WARNING: running as non-root will disable some tests" >&2;}
fi

##################
# look for a method of finding the list of network interfaces
iface=no;
echo "$as_me:15049: checking for iface AIX" >&5
echo $ECHO_N "checking for iface AIX... $ECHO_C" >&6
if test "${samba_cv_HAVE_IFACE_AIX+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

if test "$cross_compiling" = yes; then
  samba_cv_HAVE_IFACE_AIX=cross
else
  cat >conftest.$ac_ext <<_ACEOF
#line 15059 "configure"
#include "confdefs.h"

#define HAVE_IFACE_AIX 1
#define AUTOCONF_TEST 1
#include "confdefs.h"
#include "${srcdir-.}/lib/interfaces.c"
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:15068: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:15071: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:15073: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:15076: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  samba_cv_HAVE_IFACE_AIX=yes
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
samba_cv_HAVE_IFACE_AIX=no
fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
echo "$as_me:15088: result: $samba_cv_HAVE_IFACE_AIX" >&5
echo "${ECHO_T}$samba_cv_HAVE_IFACE_AIX" >&6
if test x"$samba_cv_HAVE_IFACE_AIX" = x"yes"; then
    iface=yes;cat >>confdefs.h <<\EOF
#define HAVE_IFACE_AIX 1
EOF

fi

if test $iface = no; then
echo "$as_me:15098: checking for iface ifconf" >&5
echo $ECHO_N "checking for iface ifconf... $ECHO_C" >&6
if test "${samba_cv_HAVE_IFACE_IFCONF+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

if test "$cross_compiling" = yes; then
  samba_cv_HAVE_IFACE_IFCONF=cross
else
  cat >conftest.$ac_ext <<_ACEOF
#line 15108 "configure"
#include "confdefs.h"

#define HAVE_IFACE_IFCONF 1
#define AUTOCONF_TEST 1
#include "confdefs.h"
#include "${srcdir-.}/lib/interfaces.c"
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:15117: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:15120: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:15122: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:15125: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  samba_cv_HAVE_IFACE_IFCONF=yes
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
samba_cv_HAVE_IFACE_IFCONF=no
fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
echo "$as_me:15137: result: $samba_cv_HAVE_IFACE_IFCONF" >&5
echo "${ECHO_T}$samba_cv_HAVE_IFACE_IFCONF" >&6
if test x"$samba_cv_HAVE_IFACE_IFCONF" = x"yes"; then
    iface=yes;cat >>confdefs.h <<\EOF
#define HAVE_IFACE_IFCONF 1
EOF

fi
fi

if test $iface = no; then
echo "$as_me:15148: checking for iface ifreq" >&5
echo $ECHO_N "checking for iface ifreq... $ECHO_C" >&6
if test "${samba_cv_HAVE_IFACE_IFREQ+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

if test "$cross_compiling" = yes; then
  samba_cv_HAVE_IFACE_IFREQ=cross
else
  cat >conftest.$ac_ext <<_ACEOF
#line 15158 "configure"
#include "confdefs.h"

#define HAVE_IFACE_IFREQ 1
#define AUTOCONF_TEST 1
#include "confdefs.h"
#include "${srcdir-.}/lib/interfaces.c"
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:15167: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:15170: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:15172: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:15175: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  samba_cv_HAVE_IFACE_IFREQ=yes
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
samba_cv_HAVE_IFACE_IFREQ=no
fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
echo "$as_me:15187: result: $samba_cv_HAVE_IFACE_IFREQ" >&5
echo "${ECHO_T}$samba_cv_HAVE_IFACE_IFREQ" >&6
if test x"$samba_cv_HAVE_IFACE_IFREQ" = x"yes"; then
    iface=yes;cat >>confdefs.h <<\EOF
#define HAVE_IFACE_IFREQ 1
EOF

fi
fi

################################################
# look for a method of setting the effective uid
seteuid=no;
if test $seteuid = no; then
echo "$as_me:15201: checking for setresuid" >&5
echo $ECHO_N "checking for setresuid... $ECHO_C" >&6
if test "${samba_cv_USE_SETRESUID+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

if test "$cross_compiling" = yes; then
  samba_cv_USE_SETRESUID=cross
else
  cat >conftest.$ac_ext <<_ACEOF
#line 15211 "configure"
#include "confdefs.h"

#define AUTOCONF_TEST 1
#define USE_SETRESUID 1
#include "confdefs.h"
#include "${srcdir-.}/lib/util_sec.c"
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:15220: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:15223: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:15225: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:15228: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  samba_cv_USE_SETRESUID=yes
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
samba_cv_USE_SETRESUID=no
fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
echo "$as_me:15240: result: $samba_cv_USE_SETRESUID" >&5
echo "${ECHO_T}$samba_cv_USE_SETRESUID" >&6
if test x"$samba_cv_USE_SETRESUID" = x"yes"; then
    seteuid=yes;cat >>confdefs.h <<\EOF
#define USE_SETRESUID 1
EOF

fi
fi

if test $seteuid = no; then
echo "$as_me:15251: checking for setreuid" >&5
echo $ECHO_N "checking for setreuid... $ECHO_C" >&6
if test "${samba_cv_USE_SETREUID+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

if test "$cross_compiling" = yes; then
  samba_cv_USE_SETREUID=cross
else
  cat >conftest.$ac_ext <<_ACEOF
#line 15261 "configure"
#include "confdefs.h"

#define AUTOCONF_TEST 1
#define USE_SETREUID 1
#include "confdefs.h"
#include "${srcdir-.}/lib/util_sec.c"
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:15270: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:15273: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:15275: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:15278: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  samba_cv_USE_SETREUID=yes
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
samba_cv_USE_SETREUID=no
fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
echo "$as_me:15290: result: $samba_cv_USE_SETREUID" >&5
echo "${ECHO_T}$samba_cv_USE_SETREUID" >&6
if test x"$samba_cv_USE_SETREUID" = x"yes"; then
    seteuid=yes;cat >>confdefs.h <<\EOF
#define USE_SETREUID 1
EOF

fi
fi

if test $seteuid = no; then
echo "$as_me:15301: checking for seteuid" >&5
echo $ECHO_N "checking for seteuid... $ECHO_C" >&6
if test "${samba_cv_USE_SETEUID+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

if test "$cross_compiling" = yes; then
  samba_cv_USE_SETEUID=cross
else
  cat >conftest.$ac_ext <<_ACEOF
#line 15311 "configure"
#include "confdefs.h"

#define AUTOCONF_TEST 1
#define USE_SETEUID 1
#include "confdefs.h"
#include "${srcdir-.}/lib/util_sec.c"
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:15320: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:15323: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:15325: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:15328: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  samba_cv_USE_SETEUID=yes
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
samba_cv_USE_SETEUID=no
fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
echo "$as_me:15340: result: $samba_cv_USE_SETEUID" >&5
echo "${ECHO_T}$samba_cv_USE_SETEUID" >&6
if test x"$samba_cv_USE_SETEUID" = x"yes"; then
    seteuid=yes;cat >>confdefs.h <<\EOF
#define USE_SETEUID 1
EOF

fi
fi

if test $seteuid = no; then
echo "$as_me:15351: checking for setuidx" >&5
echo $ECHO_N "checking for setuidx... $ECHO_C" >&6
if test "${samba_cv_USE_SETUIDX+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

if test "$cross_compiling" = yes; then
  samba_cv_USE_SETUIDX=cross
else
  cat >conftest.$ac_ext <<_ACEOF
#line 15361 "configure"
#include "confdefs.h"

#define AUTOCONF_TEST 1
#define USE_SETUIDX 1
#include "confdefs.h"
#include "${srcdir-.}/lib/util_sec.c"
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:15370: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:15373: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:15375: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:15378: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  samba_cv_USE_SETUIDX=yes
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
samba_cv_USE_SETUIDX=no
fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
echo "$as_me:15390: result: $samba_cv_USE_SETUIDX" >&5
echo "${ECHO_T}$samba_cv_USE_SETUIDX" >&6
if test x"$samba_cv_USE_SETUIDX" = x"yes"; then
    seteuid=yes;cat >>confdefs.h <<\EOF
#define USE_SETUIDX 1
EOF

fi
fi

echo "$as_me:15400: checking for working mmap" >&5
echo $ECHO_N "checking for working mmap... $ECHO_C" >&6
if test "${samba_cv_HAVE_MMAP+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

if test "$cross_compiling" = yes; then
  samba_cv_HAVE_MMAP=cross
else
  cat >conftest.$ac_ext <<_ACEOF
#line 15410 "configure"
#include "confdefs.h"
#include "${srcdir-.}/tests/shared_mmap.c"
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:15415: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:15418: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:15420: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:15423: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  samba_cv_HAVE_MMAP=yes
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
samba_cv_HAVE_MMAP=no
fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
echo "$as_me:15435: result: $samba_cv_HAVE_MMAP" >&5
echo "${ECHO_T}$samba_cv_HAVE_MMAP" >&6
if test x"$samba_cv_HAVE_MMAP" = x"yes"; then
    cat >>confdefs.h <<\EOF
#define HAVE_MMAP 1
EOF

fi

echo "$as_me:15444: checking for ftruncate needs root" >&5
echo $ECHO_N "checking for ftruncate needs root... $ECHO_C" >&6
if test "${samba_cv_FTRUNCATE_NEEDS_ROOT+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

if test "$cross_compiling" = yes; then
  samba_cv_FTRUNCATE_NEEDS_ROOT=cross
else
  cat >conftest.$ac_ext <<_ACEOF
#line 15454 "configure"
#include "confdefs.h"
#include "${srcdir-.}/tests/ftruncroot.c"
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:15459: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:15462: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:15464: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:15467: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  samba_cv_FTRUNCATE_NEEDS_ROOT=yes
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
samba_cv_FTRUNCATE_NEEDS_ROOT=no
fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
echo "$as_me:15479: result: $samba_cv_FTRUNCATE_NEEDS_ROOT" >&5
echo "${ECHO_T}$samba_cv_FTRUNCATE_NEEDS_ROOT" >&6
if test x"$samba_cv_FTRUNCATE_NEEDS_ROOT" = x"yes"; then
    cat >>confdefs.h <<\EOF
#define FTRUNCATE_NEEDS_ROOT 1
EOF

fi

echo "$as_me:15488: checking for fcntl locking" >&5
echo $ECHO_N "checking for fcntl locking... $ECHO_C" >&6
if test "${samba_cv_HAVE_FCNTL_LOCK+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

if test "$cross_compiling" = yes; then
  samba_cv_HAVE_FCNTL_LOCK=cross
else
  cat >conftest.$ac_ext <<_ACEOF
#line 15498 "configure"
#include "confdefs.h"
#include "${srcdir-.}/tests/fcntl_lock.c"
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:15503: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:15506: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:15508: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:15511: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  samba_cv_HAVE_FCNTL_LOCK=yes
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
samba_cv_HAVE_FCNTL_LOCK=no
fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
echo "$as_me:15523: result: $samba_cv_HAVE_FCNTL_LOCK" >&5
echo "${ECHO_T}$samba_cv_HAVE_FCNTL_LOCK" >&6
if test x"$samba_cv_HAVE_FCNTL_LOCK" = x"yes"; then
    cat >>confdefs.h <<\EOF
#define HAVE_FCNTL_LOCK 1
EOF

fi

echo "$as_me:15532: checking for broken (glibc2.1/x86) 64 bit fcntl locking" >&5
echo $ECHO_N "checking for broken (glibc2.1/x86) 64 bit fcntl locking... $ECHO_C" >&6
if test "${samba_cv_HAVE_BROKEN_FCNTL64_LOCKS+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

if test "$cross_compiling" = yes; then
  samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=cross
else
  cat >conftest.$ac_ext <<_ACEOF
#line 15542 "configure"
#include "confdefs.h"
#include "${srcdir-.}/tests/fcntl_lock64.c"
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:15547: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:15550: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:15552: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:15555: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=yes
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=no
fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
echo "$as_me:15567: result: $samba_cv_HAVE_BROKEN_FCNTL64_LOCKS" >&5
echo "${ECHO_T}$samba_cv_HAVE_BROKEN_FCNTL64_LOCKS" >&6
if test x"$samba_cv_HAVE_BROKEN_FCNTL64_LOCKS" = x"yes"; then
    cat >>confdefs.h <<\EOF
#define HAVE_BROKEN_FCNTL64_LOCKS 1
EOF

else

  echo "$as_me:15576: checking for 64 bit fcntl locking" >&5
echo $ECHO_N "checking for 64 bit fcntl locking... $ECHO_C" >&6
if test "${samba_cv_HAVE_STRUCT_FLOCK64+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

  if test "$cross_compiling" = yes; then
  samba_cv_HAVE_STRUCT_FLOCK64=cross
else
  cat >conftest.$ac_ext <<_ACEOF
#line 15586 "configure"
#include "confdefs.h"

#if defined(HAVE_UNISTD_H)
#include <unistd.h>
#endif
#include <stdio.h>
#include <stdlib.h>

#ifdef HAVE_FCNTL_H
#include <fcntl.h>
#endif

#ifdef HAVE_SYS_FCNTL_H
#include <sys/fcntl.h>
#endif
main() { struct flock64 fl64;
#if defined(F_SETLKW64) && defined(F_SETLK64) && defined(F_GETLK64)
exit(0);
#else
exit(1);
#endif
}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:15611: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:15614: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:15616: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:15619: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  samba_cv_HAVE_STRUCT_FLOCK64=yes
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
samba_cv_HAVE_STRUCT_FLOCK64=no
fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
echo "$as_me:15631: result: $samba_cv_HAVE_STRUCT_FLOCK64" >&5
echo "${ECHO_T}$samba_cv_HAVE_STRUCT_FLOCK64" >&6

  if test x"$samba_cv_HAVE_STRUCT_FLOCK64" = x"yes"; then
      cat >>confdefs.h <<\EOF
#define HAVE_STRUCT_FLOCK64 1
EOF

  fi
fi

echo "$as_me:15642: checking for st_blocks in struct stat" >&5
echo $ECHO_N "checking for st_blocks in struct stat... $ECHO_C" >&6
if test "${samba_cv_HAVE_STAT_ST_BLOCKS+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

cat >conftest.$ac_ext <<_ACEOF
#line 15649 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
int
main ()
{
struct stat st;  st.st_blocks = 0;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:15663: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:15666: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:15669: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:15672: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  samba_cv_HAVE_STAT_ST_BLOCKS=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
samba_cv_HAVE_STAT_ST_BLOCKS=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:15682: result: $samba_cv_HAVE_STAT_ST_BLOCKS" >&5
echo "${ECHO_T}$samba_cv_HAVE_STAT_ST_BLOCKS" >&6
if test x"$samba_cv_HAVE_STAT_ST_BLOCKS" = x"yes"; then
    cat >>confdefs.h <<\EOF
#define HAVE_STAT_ST_BLOCKS 1
EOF

fi

case "$host_os" in
*linux*)
echo "$as_me:15693: checking for broken RedHat 7.2 system header files" >&5
echo $ECHO_N "checking for broken RedHat 7.2 system header files... $ECHO_C" >&6
if test "${samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

cat >conftest.$ac_ext <<_ACEOF
#line 15700 "configure"
#include "confdefs.h"

#ifdef HAVE_SYS_VFS_H
#include <sys/vfs.h>
#endif
#ifdef HAVE_SYS_CAPABILITY_H
#include <sys/capability.h>
#endif

int
main ()
{
int i;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:15719: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:15722: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:15725: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:15728: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=no
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=yes
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:15738: result: $samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS" >&5
echo "${ECHO_T}$samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS" >&6
if test x"$samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS" = x"yes"; then
   cat >>confdefs.h <<\EOF
#define BROKEN_REDHAT_7_SYSTEM_HEADERS 1
EOF

fi
;;
esac

echo "$as_me:15749: checking for broken nisplus include files" >&5
echo $ECHO_N "checking for broken nisplus include files... $ECHO_C" >&6
if test "${samba_cv_BROKEN_NISPLUS_INCLUDE_FILES+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

cat >conftest.$ac_ext <<_ACEOF
#line 15756 "configure"
#include "confdefs.h"
#include <sys/acl.h>
#if defined(HAVE_RPCSVC_NIS_H)
#include <rpcsvc/nis.h>
#endif
int
main ()
{
int i;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:15771: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:15774: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:15777: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:15780: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=no
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=yes
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:15790: result: $samba_cv_BROKEN_NISPLUS_INCLUDE_FILES" >&5
echo "${ECHO_T}$samba_cv_BROKEN_NISPLUS_INCLUDE_FILES" >&6
if test x"$samba_cv_BROKEN_NISPLUS_INCLUDE_FILES" = x"yes"; then
    cat >>confdefs.h <<\EOF
#define BROKEN_NISPLUS_INCLUDE_FILES 1
EOF

fi

#################################################
# check for smbwrapper support
echo "$as_me:15801: checking whether to use smbwrapper" >&5
echo $ECHO_N "checking whether to use smbwrapper... $ECHO_C" >&6

# Check whether --with-smbwrapper or --without-smbwrapper was given.
if test "${with_smbwrapper+set}" = set; then
  withval="$with_smbwrapper"
   case "$withval" in
  yes)
    echo "$as_me:15809: result: yes" >&5
echo "${ECHO_T}yes" >&6
    cat >>confdefs.h <<\EOF
#define WITH_SMBWRAPPER 1
EOF

	WRAPPROG="bin/smbsh"
	WRAP="bin/smbwrapper.$SHLIBEXT"

	if test x$ATTEMPT_WRAP32_BUILD = x; then
		WRAP32=""
	else
			WRAP32=bin/smbwrapper.32.$SHLIBEXT
	fi

# Conditions under which smbwrapper should not be built.

	if test x$PICFLAG = x; then
	   echo No support for PIC code - disabling smbwrapper and smbsh
	   WRAPPROG=""
	   WRAP=""
	   WRAP32=""
	elif test x$ac_cv_func_syscall = xno; then
	   echo "$as_me:15832: result: No syscall() -- disabling smbwrapper and smbsh" >&5
echo "${ECHO_T}No syscall() -- disabling smbwrapper and smbsh" >&6
	   WRAPPROG=""
	   WRAP=""
	   WRAP32=""
	fi
    ;;
  *)
    echo "$as_me:15840: result: no" >&5
echo "${ECHO_T}no" >&6
    ;;
  esac
else
  echo "$as_me:15845: result: no" >&5
echo "${ECHO_T}no" >&6

fi;

#################################################
# check for the AFS filesystem
echo "$as_me:15852: checking whether to use AFS" >&5
echo $ECHO_N "checking whether to use AFS... $ECHO_C" >&6

# Check whether --with-afs or --without-afs was given.
if test "${with_afs+set}" = set; then
  withval="$with_afs"
   case "$withval" in
  yes)
    echo "$as_me:15860: result: yes" >&5
echo "${ECHO_T}yes" >&6
    cat >>confdefs.h <<\EOF
#define WITH_AFS 1
EOF

    ;;
  *)
    echo "$as_me:15868: result: no" >&5
echo "${ECHO_T}no" >&6
    ;;
  esac
else
  echo "$as_me:15873: result: no" >&5
echo "${ECHO_T}no" >&6

fi;

#################################################
# check for the DFS auth system
echo "$as_me:15880: checking whether to use DCE/DFS auth" >&5
echo $ECHO_N "checking whether to use DCE/DFS auth... $ECHO_C" >&6

# Check whether --with-dfs or --without-dfs was given.
if test "${with_dfs+set}" = set; then
  withval="$with_dfs"
   case "$withval" in
  yes)
    echo "$as_me:15888: result: yes" >&5
echo "${ECHO_T}yes" >&6
    cat >>confdefs.h <<\EOF
#define WITH_DFS 1
EOF

    ;;
  *)
    echo "$as_me:15896: result: no" >&5
echo "${ECHO_T}no" >&6
    ;;
  esac
else
  echo "$as_me:15901: result: no" >&5
echo "${ECHO_T}no" >&6

fi;

#################################################
# check for Kerberos IV auth system
echo "$as_me:15908: checking whether to use Kerberos IV" >&5
echo $ECHO_N "checking whether to use Kerberos IV... $ECHO_C" >&6

# Check whether --with-krb4 or --without-krb4 was given.
if test "${with_krb4+set}" = set; then
  withval="$with_krb4"
   case "$withval" in
  yes)
    echo "$as_me:15916: result: yes" >&5
echo "${ECHO_T}yes" >&6
    cat >>confdefs.h <<\EOF
#define KRB4_AUTH 1
EOF

echo "$as_me:15922: checking for dn_expand in -lresolv" >&5
echo $ECHO_N "checking for dn_expand in -lresolv... $ECHO_C" >&6
if test "${ac_cv_lib_resolv_dn_expand+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lresolv  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 15930 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char dn_expand ();
int
main ()
{
dn_expand ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:15949: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:15952: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:15955: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:15958: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_resolv_dn_expand=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_resolv_dn_expand=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:15969: result: $ac_cv_lib_resolv_dn_expand" >&5
echo "${ECHO_T}$ac_cv_lib_resolv_dn_expand" >&6
if test $ac_cv_lib_resolv_dn_expand = yes; then
  cat >>confdefs.h <<EOF
#define HAVE_LIBRESOLV 1
EOF

  LIBS="-lresolv $LIBS"

fi

    LIBS="$LIBS -lkrb -ldes"
    CFLAGS="$CFLAGS -I$withval/include"
    LDFLAGS="$LDFLAGS -L$withval/lib"
    ;;
  *)
    echo "$as_me:15985: result: no" >&5
echo "${ECHO_T}no" >&6
    ;;
  esac
else
  echo "$as_me:15990: result: no" >&5
echo "${ECHO_T}no" >&6

fi;

#################################################
# check for Kerberos 5 auth system
echo "$as_me:15997: checking whether to use Kerberos 5" >&5
echo $ECHO_N "checking whether to use Kerberos 5... $ECHO_C" >&6

# Check whether --with-krb5 or --without-krb5 was given.
if test "${with_krb5+set}" = set; then
  withval="$with_krb5"
   case "$withval" in
  yes)
    echo "$as_me:16005: result: yes" >&5
echo "${ECHO_T}yes" >&6
    cat >>confdefs.h <<\EOF
#define KRB5_AUTH 1
EOF

    LIBS="$LIBS -ldes425 -lkrb5 -lcrypto -lcom_err"
    CFLAGS="$CFLAGS -I$withval/include"
    LDFLAGS="$LDFLAGS -L$withval/lib"
    ;;
  *)
    echo "$as_me:16016: result: no" >&5
echo "${ECHO_T}no" >&6
    ;;
  esac
else
  echo "$as_me:16021: result: no" >&5
echo "${ECHO_T}no" >&6

fi;

#################################################
# check for automount support
echo "$as_me:16028: checking whether to use AUTOMOUNT" >&5
echo $ECHO_N "checking whether to use AUTOMOUNT... $ECHO_C" >&6

# Check whether --with-automount or --without-automount was given.
if test "${with_automount+set}" = set; then
  withval="$with_automount"
   case "$withval" in
  yes)
    echo "$as_me:16036: result: yes" >&5
echo "${ECHO_T}yes" >&6
    cat >>confdefs.h <<\EOF
#define WITH_AUTOMOUNT 1
EOF

    ;;
  *)
    echo "$as_me:16044: result: no" >&5
echo "${ECHO_T}no" >&6
    ;;
  esac
else
  echo "$as_me:16049: result: no" >&5
echo "${ECHO_T}no" >&6

fi;

#################################################
# check for smbmount support
echo "$as_me:16056: checking whether to use SMBMOUNT" >&5
echo $ECHO_N "checking whether to use SMBMOUNT... $ECHO_C" >&6

# Check whether --with-smbmount or --without-smbmount was given.
if test "${with_smbmount+set}" = set; then
  withval="$with_smbmount"
   case "$withval" in
  yes)
	case "$host_os" in
	*linux*)
		echo "$as_me:16066: result: yes" >&5
echo "${ECHO_T}yes" >&6
		cat >>confdefs.h <<\EOF
#define WITH_SMBMOUNT 1
EOF

		MPROGS="bin/smbmount bin/smbmnt bin/smbumount"
		;;
	*)
		{ { echo "$as_me:16075: error: not on a linux system!" >&5
echo "$as_me: error: not on a linux system!" >&2;}
   { (exit 1); exit 1; }; }
		;;
	esac
    ;;
  *)
    echo "$as_me:16082: result: no" >&5
echo "${ECHO_T}no" >&6
    MPROGS=
    ;;
  esac
else
  echo "$as_me:16088: result: no" >&5
echo "${ECHO_T}no" >&6
  MPROGS=

fi;

#################################################
# check for a PAM password database
with_pam_for_crypt=no
echo "$as_me:16097: checking whether to use PAM password database" >&5
echo $ECHO_N "checking whether to use PAM password database... $ECHO_C" >&6

# Check whether --with-pam or --without-pam was given.
if test "${with_pam+set}" = set; then
  withval="$with_pam"
   case "$withval" in
  yes)
    echo "$as_me:16105: result: yes" >&5
echo "${ECHO_T}yes" >&6
    cat >>confdefs.h <<\EOF
#define WITH_PAM 1
EOF

    LIBS="$LIBS -lpam"
    with_pam_for_crypt=yes
    ;;
  *)
    echo "$as_me:16115: result: no" >&5
echo "${ECHO_T}no" >&6
    ;;
  esac
else
  echo "$as_me:16120: result: no" >&5
echo "${ECHO_T}no" >&6

fi;

# we can't build a pam module if we don't have pam.
echo "$as_me:16126: checking for pam_get_data in -lpam" >&5
echo $ECHO_N "checking for pam_get_data in -lpam... $ECHO_C" >&6
if test "${ac_cv_lib_pam_pam_get_data+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lpam  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 16134 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char pam_get_data ();
int
main ()
{
pam_get_data ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:16153: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:16156: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:16159: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:16162: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_pam_pam_get_data=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_pam_pam_get_data=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:16173: result: $ac_cv_lib_pam_pam_get_data" >&5
echo "${ECHO_T}$ac_cv_lib_pam_pam_get_data" >&6
if test $ac_cv_lib_pam_pam_get_data = yes; then
  cat >>confdefs.h <<\EOF
#define HAVE_LIBPAM 1
EOF

fi

#################################################
# check for pam_smbpass support
echo "$as_me:16184: checking whether to use pam_smbpass" >&5
echo $ECHO_N "checking whether to use pam_smbpass... $ECHO_C" >&6

# Check whether --with-pam_smbpass or --without-pam_smbpass was given.
if test "${with_pam_smbpass+set}" = set; then
  withval="$with_pam_smbpass"
   case "$withval" in
  yes)
    echo "$as_me:16192: result: yes" >&5
echo "${ECHO_T}yes" >&6

# Conditions under which pam_smbpass should not be built.

       if test x$PICFLAG = x; then
          echo "$as_me:16198: result: No support for PIC code - disabling pam_smbpass" >&5
echo "${ECHO_T}No support for PIC code - disabling pam_smbpass" >&6
          PAM_MOD=""
       elif test x$ac_cv_lib_pam_pam_get_data = xno; then
          echo "$as_me:16202: result: No libpam found -- disabling pam_smbpass" >&5
echo "${ECHO_T}No libpam found -- disabling pam_smbpass" >&6
          PAM_MOD=""
       else
          cat >>confdefs.h <<\EOF
#define WITH_PAM_SMBPASS 1
EOF

          PAM_MOD="bin/pam_smbpass.so"
       fi
    ;;
  *)
    echo "$as_me:16214: result: no" >&5
echo "${ECHO_T}no" >&6
    ;;
  esac
else
  echo "$as_me:16219: result: no" >&5
echo "${ECHO_T}no" >&6

fi;

###############################################
# test for where we get crypt() from, but only
# if not using PAM
if test $with_pam_for_crypt = no; then

for ac_func in crypt
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:16232: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 16238 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func (); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char $ac_func ();
char (*f) ();

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

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:16269: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:16272: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:16275: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:16278: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:16288: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF

fi
done

if test x"$ac_cv_func_crypt" = x"no"; then
    echo "$as_me:16299: checking for crypt in -lcrypt" >&5
echo $ECHO_N "checking for crypt in -lcrypt... $ECHO_C" >&6
if test "${ac_cv_lib_crypt_crypt+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lcrypt  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 16307 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char crypt ();
int
main ()
{
crypt ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:16326: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:16329: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:16332: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:16335: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_crypt_crypt=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_crypt_crypt=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:16346: result: $ac_cv_lib_crypt_crypt" >&5
echo "${ECHO_T}$ac_cv_lib_crypt_crypt" >&6
if test $ac_cv_lib_crypt_crypt = yes; then
  LIBS="$LIBS -lcrypt";
	cat >>confdefs.h <<\EOF
#define HAVE_CRYPT 1
EOF

fi

fi
fi

##
## moved after the check for -lcrypt in order to
## ensure that the necessary libraries are included
## check checking for truncated salt.  Wrapped by the
## $with_pam_for_crypt variable as above   --jerry
##
if test $with_pam_for_crypt = no; then
echo "$as_me:16366: checking for a crypt that needs truncated salt" >&5
echo $ECHO_N "checking for a crypt that needs truncated salt... $ECHO_C" >&6
if test "${samba_cv_HAVE_TRUNCATED_SALT+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

if test "$cross_compiling" = yes; then
  samba_cv_HAVE_TRUNCATED_SALT=cross
else
  cat >conftest.$ac_ext <<_ACEOF
#line 16376 "configure"
#include "confdefs.h"
#include "${srcdir-.}/tests/crypttest.c"
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:16381: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:16384: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:16386: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:16389: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  samba_cv_HAVE_TRUNCATED_SALT=no
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
samba_cv_HAVE_TRUNCATED_SALT=yes
fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
echo "$as_me:16401: result: $samba_cv_HAVE_TRUNCATED_SALT" >&5
echo "${ECHO_T}$samba_cv_HAVE_TRUNCATED_SALT" >&6
if test x"$samba_cv_HAVE_TRUNCATED_SALT" = x"yes"; then
	cat >>confdefs.h <<\EOF
#define HAVE_TRUNCATED_SALT 1
EOF

fi
fi

########################################################################################
##
## TESTS FOR SAM BACKENDS.  KEEP THESE GROUPED TOGETHER
##
########################################################################################

## set the with_smbpasswd_sam as the default
with_smbpasswd_sam=yes

#################################################
# check for a TDB password database
echo "$as_me:16422: checking whether to use TDB SAM database" >&5
echo $ECHO_N "checking whether to use TDB SAM database... $ECHO_C" >&6

# Check whether --with-tdbsam or --without-tdbsam was given.
if test "${with_tdbsam+set}" = set; then
  withval="$with_tdbsam"
   case "$withval" in
  yes)
    echo "$as_me:16430: result: yes" >&5
echo "${ECHO_T}yes" >&6
    cat >>confdefs.h <<\EOF
#define WITH_TDB_SAM 1
EOF

    with_smbpasswd_sam=no
    ;;
  *)
    echo "$as_me:16439: result: no" >&5
echo "${ECHO_T}no" >&6
    ;;
  esac
else
  echo "$as_me:16444: result: no" >&5
echo "${ECHO_T}no" >&6

fi;

#################################################
# check for a LDAP password database
echo "$as_me:16451: checking whether to use LDAP SAM database" >&5
echo $ECHO_N "checking whether to use LDAP SAM database... $ECHO_C" >&6

# Check whether --with-ldapsam or --without-ldapsam was given.
if test "${with_ldapsam+set}" = set; then
  withval="$with_ldapsam"
   case "$withval" in
  yes)
    echo "$as_me:16459: result: yes" >&5
echo "${ECHO_T}yes" >&6
    cat >>confdefs.h <<\EOF
#define WITH_LDAP_SAM 1
EOF

    LIBS="-lldap -llber -lresolv $LIBS"
    with_smbpasswd_sam=no
    ;;
  *)
    echo "$as_me:16469: result: no" >&5
echo "${ECHO_T}no" >&6
    ;;
  esac
else
  echo "$as_me:16474: result: no" >&5
echo "${ECHO_T}no" >&6

fi;

#################################################
# check for a NISPLUS password database
echo "$as_me:16481: checking whether to use NISPLUS SAM database" >&5
echo $ECHO_N "checking whether to use NISPLUS SAM database... $ECHO_C" >&6

# Check whether --with-nisplussam or --without-nisplussam was given.
if test "${with_nisplussam+set}" = set; then
  withval="$with_nisplussam"
   case "$withval" in
  yes)
    echo "$as_me:16489: result: yes" >&5
echo "${ECHO_T}yes" >&6
    cat >>confdefs.h <<\EOF
#define WITH_NISPLUS_SAM 1
EOF

    with_smbpasswd_sam=no
    ;;
  *)
    echo "$as_me:16498: result: no" >&5
echo "${ECHO_T}no" >&6
    ;;
  esac
else
  echo "$as_me:16503: result: no" >&5
echo "${ECHO_T}no" >&6

fi;

################################################
# This test should come last because the
# smbpasswd SAM is only used if another format
# has not been defined
echo "$as_me:16512: checking whether to use traditional smbpasswd file" >&5
echo $ECHO_N "checking whether to use traditional smbpasswd file... $ECHO_C" >&6
if test $with_smbpasswd_sam = yes; then
	echo "$as_me:16515: result: yes" >&5
echo "${ECHO_T}yes" >&6
	cat >>confdefs.h <<\EOF
#define WITH_SMBPASSWD_SAM 1
EOF

	PDBEDIT=""
else
	echo "$as_me:16523: result: no" >&5
echo "${ECHO_T}no" >&6
	PDBEDIT=bin/pdbedit
fi

########################################################################################
##
## END OF TESTS FOR SAM BACKENDS.
##
########################################################################################

#################################################
# check for a NISPLUS_HOME support
echo "$as_me:16536: checking whether to use NISPLUS_HOME" >&5
echo $ECHO_N "checking whether to use NISPLUS_HOME... $ECHO_C" >&6

# Check whether --with-nisplus-home or --without-nisplus-home was given.
if test "${with_nisplus_home+set}" = set; then
  withval="$with_nisplus_home"
   case "$withval" in
  yes)
    echo "$as_me:16544: result: yes" >&5
echo "${ECHO_T}yes" >&6
    cat >>confdefs.h <<\EOF
#define WITH_NISPLUS_HOME 1
EOF

    ;;
  *)
    echo "$as_me:16552: result: no" >&5
echo "${ECHO_T}no" >&6
    ;;
  esac
else
  echo "$as_me:16557: result: no" >&5
echo "${ECHO_T}no" >&6

fi;

#################################################
# check for the secure socket layer
echo "$as_me:16564: checking whether to use SSL" >&5
echo $ECHO_N "checking whether to use SSL... $ECHO_C" >&6

# Check whether --with-ssl or --without-ssl was given.
if test "${with_ssl+set}" = set; then
  withval="$with_ssl"
   case "$withval" in
  yes)
    echo "$as_me:16572: result: yes" >&5
echo "${ECHO_T}yes" >&6
    cat >>confdefs.h <<\EOF
#define WITH_SSL 1
EOF

    withval="/usr/local/ssl"     # default

    if test "${with_sslinc+set}" = set; then

	withval="$with_sslinc"
	case "$withval" in
	yes|no)
	  echo "configure: warning: --with-sslinc called without argument - will use default" 1>&w
	  CFLAGS="-I/usr/local/ssl/include $CFLAGS"
	;;
        * )
          CFLAGS="-I${withval} $CFLAGS"
	;;
	esac

    else

	CFLAGS="-I/usr/local/ssl/include $CFLAGS"

    fi

    if test "${with_ssllib+set}" = set; then

	withval="$with_ssllib"
	case "$withval" in
	yes|no)
	  echo "configure: warning: --with-ssllib called without argument - will use default" 1>&w
	  LDFLAGS="-L/usr/local/ssl/lib $LDFLAGS"
	;;
        * )
  	  LDFLAGS="-L${withval}/lib $LDFLAGS"
	;;
	esac

    else

	LDFLAGS="-L/usr/local/ssl/lib $LDFLAGS"

    fi

    LIBS="-lssl -lcrypto $LIBS"

#    if test ! -d ${withval}; then
#      echo "configure: error: called with --with-ssl, but ssl base directory ${withval} does not exist or is not a directory. Aborting config" 1>&2
#      exit 1
#    fi

    CFLAGS="-DHAVE_CRYPT_DECL $CFLAGS"  # Damn, SSLeay defines its own

    ;;
  *)
    echo "$as_me:16629: result: no" >&5
echo "${ECHO_T}no" >&6
    ;;
  esac
else
  echo "$as_me:16634: result: no" >&5
echo "${ECHO_T}no" >&6

fi;

#################################################
# check for syslog logging
echo "$as_me:16641: checking whether to use syslog logging" >&5
echo $ECHO_N "checking whether to use syslog logging... $ECHO_C" >&6

# Check whether --with-syslog or --without-syslog was given.
if test "${with_syslog+set}" = set; then
  withval="$with_syslog"
   case "$withval" in
  yes)
    echo "$as_me:16649: result: yes" >&5
echo "${ECHO_T}yes" >&6
    cat >>confdefs.h <<\EOF
#define WITH_SYSLOG 1
EOF

    ;;
  *)
    echo "$as_me:16657: result: no" >&5
echo "${ECHO_T}no" >&6
    ;;
  esac
else
  echo "$as_me:16662: result: no" >&5
echo "${ECHO_T}no" >&6

fi;

#################################################
# check for a shared memory profiling support
echo "$as_me:16669: checking whether to use profiling" >&5
echo $ECHO_N "checking whether to use profiling... $ECHO_C" >&6

# Check whether --with-profiling-data or --without-profiling-data was given.
if test "${with_profiling_data+set}" = set; then
  withval="$with_profiling_data"
   case "$withval" in
  yes)
    echo "$as_me:16677: result: yes" >&5
echo "${ECHO_T}yes" >&6
    cat >>confdefs.h <<\EOF
#define WITH_PROFILE 1
EOF

    ;;
  *)
    echo "$as_me:16685: result: no" >&5
echo "${ECHO_T}no" >&6
    ;;
  esac
else
  echo "$as_me:16690: result: no" >&5
echo "${ECHO_T}no" >&6

fi;

#################################################
# check for experimental disk-quotas support
QUOTAOBJS=smbd/noquotas.o

echo "$as_me:16699: checking whether to support disk-quotas" >&5
echo $ECHO_N "checking whether to support disk-quotas... $ECHO_C" >&6

# Check whether --with-quotas or --without-quotas was given.
if test "${with_quotas+set}" = set; then
  withval="$with_quotas"
   case "$withval" in
  yes)
    echo "$as_me:16707: result: yes" >&5
echo "${ECHO_T}yes" >&6
    QUOTAOBJS=smbd/quotas.o
    case "$host_os" in
      *linux*)
        # Check for kernel 2.4.x quota braindamage...
	echo "$as_me:16713: checking for linux 2.4.x quota braindamage.." >&5
echo $ECHO_N "checking for linux 2.4.x quota braindamage..... $ECHO_C" >&6
if test "${samba_cv_linux_2_4_quota_braindamage+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

        cat >conftest.$ac_ext <<_ACEOF
#line 16720 "configure"
#include "confdefs.h"
#include <stdio.h>
#include <sys/types.h>
#include <asm/types.h>
#include <linux/quota.h>
#include <mntent.h>
#include <linux/unistd.h>
int
main ()
{
struct mem_dqblk D;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:16737: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:16740: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:16743: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:16746: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  samba_cv_linux_2_4_quota_braindamage=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
samba_cv_linux_2_4_quota_braindamage=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:16756: result: $samba_cv_linux_2_4_quota_braindamage" >&5
echo "${ECHO_T}$samba_cv_linux_2_4_quota_braindamage" >&6
if test x"$samba_cv_linux_2_4_quota_braindamage" = x"yes"; then
        cat >>confdefs.h <<\EOF
#define LINUX_QUOTAS_2 1
EOF

else
        cat >>confdefs.h <<\EOF
#define LINUX_QUOTAS_1 1
EOF

fi
        ;;
      *)
        ;;
    esac
    ;;
  *)
    echo "$as_me:16775: result: no" >&5
echo "${ECHO_T}no" >&6
    ;;
  esac
else
  echo "$as_me:16780: result: no" >&5
echo "${ECHO_T}no" >&6

fi;

#################################################
# check for experimental utmp accounting

echo "$as_me:16788: checking whether to support utmp accounting" >&5
echo $ECHO_N "checking whether to support utmp accounting... $ECHO_C" >&6

# Check whether --with-utmp or --without-utmp was given.
if test "${with_utmp+set}" = set; then
  withval="$with_utmp"
   case "$withval" in
  yes)
    echo "$as_me:16796: result: yes" >&5
echo "${ECHO_T}yes" >&6
    cat >>confdefs.h <<\EOF
#define WITH_UTMP 1
EOF

    ;;
  *)
    echo "$as_me:16804: result: no" >&5
echo "${ECHO_T}no" >&6
    ;;
  esac
else
  echo "$as_me:16809: result: no" >&5
echo "${ECHO_T}no" >&6

fi;

#################################################
# check for MS Dfs support

echo "$as_me:16817: checking whether to support Microsoft Dfs" >&5
echo $ECHO_N "checking whether to support Microsoft Dfs... $ECHO_C" >&6

# Check whether --with-msdfs or --without-msdfs was given.
if test "${with_msdfs+set}" = set; then
  withval="$with_msdfs"
   case "$withval" in
  yes)
     echo "$as_me:16825: result: yes" >&5
echo "${ECHO_T}yes" >&6
     cat >>confdefs.h <<\EOF
#define WITH_MSDFS 1
EOF

     ;;
  *)
    echo "$as_me:16833: result: no" >&5
echo "${ECHO_T}no" >&6
    ;;
  esac
else
  echo "$as_me:16838: result: no" >&5
echo "${ECHO_T}no" >&6

fi;

#################################################
# should we build libsmbclient?

LIBSMBCLIENT_SHARED=
LIBSMBCLIENT=
echo "$as_me:16848: checking whether to build the libsmbclient shared library" >&5
echo $ECHO_N "checking whether to build the libsmbclient shared library... $ECHO_C" >&6

# Check whether --with-libsmbclient or --without-libsmbclient was given.
if test "${with_libsmbclient+set}" = set; then
  withval="$with_libsmbclient"
   case "$withval" in
  yes)
     if test $BLDSHARED = true; then
        LIBSMBCLIENT_SHARED=bin/libsmbclient.$SHLIBEXT
	LIBSMBCLIENT=libsmbclient
        echo "$as_me:16859: result: yes" >&5
echo "${ECHO_T}yes" >&6
     else
        echo "$as_me:16862: result: no shared library support" >&5
echo "${ECHO_T}no shared library support" >&6
     fi
     ;;
  *)
    echo "$as_me:16867: result: no" >&5
echo "${ECHO_T}no" >&6
    ;;
  esac
else
  echo "$as_me:16872: result: no" >&5
echo "${ECHO_T}no" >&6

fi;

#################################################
# these tests are taken from the GNU fileutils package
{ echo "$as_me:16879: checking how to get filesystem space usage..." >&5
echo "$as_me: checking how to get filesystem space usage..." >&6;}
space=no

# Test for statvfs64.
if test $space = no; then
  # SVR4
  echo "$as_me:16886: checking statvfs64 function (SVR4)" >&5
echo $ECHO_N "checking statvfs64 function (SVR4)... $ECHO_C" >&6
if test "${fu_cv_sys_stat_statvfs64+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test "$cross_compiling" = yes; then
  fu_cv_sys_stat_statvfs64=cross
else
  cat >conftest.$ac_ext <<_ACEOF
#line 16895 "configure"
#include "confdefs.h"

#if defined(HAVE_UNISTD_H)
#include <unistd.h>
#endif
#include <sys/types.h>
#include <sys/statvfs.h>
  main ()
  {
    struct statvfs64 fsd;
    exit (statvfs64 (".", &fsd));
  }
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:16910: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:16913: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:16915: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:16918: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  fu_cv_sys_stat_statvfs64=yes
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
fu_cv_sys_stat_statvfs64=no
fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
echo "$as_me:16930: result: $fu_cv_sys_stat_statvfs64" >&5
echo "${ECHO_T}$fu_cv_sys_stat_statvfs64" >&6
  if test $fu_cv_sys_stat_statvfs64 = yes; then
    space=yes
    cat >>confdefs.h <<\EOF
#define STAT_STATVFS64 1
EOF

  fi
fi

# Perform only the link test since it seems there are no variants of the
# statvfs function.  This check is more than just AC_CHECK_FUNCS(statvfs)
# because that got a false positive on SCO OSR5.  Adding the declaration
# of a `struct statvfs' causes this test to fail (as it should) on such
# systems.  That system is reported to work fine with STAT_STATFS4 which
# is what it gets when this test fails.
if test $space = no; then
  # SVR4
  echo "$as_me:16949: checking statvfs function (SVR4)" >&5
echo $ECHO_N "checking statvfs function (SVR4)... $ECHO_C" >&6
if test "${fu_cv_sys_stat_statvfs+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 16955 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/statvfs.h>
int
main ()
{
struct statvfs fsd; statvfs (0, &fsd);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:16968: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:16971: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:16974: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:16977: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  fu_cv_sys_stat_statvfs=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
fu_cv_sys_stat_statvfs=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:16987: result: $fu_cv_sys_stat_statvfs" >&5
echo "${ECHO_T}$fu_cv_sys_stat_statvfs" >&6
  if test $fu_cv_sys_stat_statvfs = yes; then
    space=yes
    cat >>confdefs.h <<\EOF
#define STAT_STATVFS 1
EOF

  fi
fi

if test $space = no; then
  # DEC Alpha running OSF/1
  echo "$as_me:17000: checking for 3-argument statfs function (DEC OSF/1)" >&5
echo $ECHO_N "checking for 3-argument statfs function (DEC OSF/1)... $ECHO_C" >&6
  if test "${fu_cv_sys_stat_statfs3_osf1+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test "$cross_compiling" = yes; then
  fu_cv_sys_stat_statfs3_osf1=no
else
  cat >conftest.$ac_ext <<_ACEOF
#line 17009 "configure"
#include "confdefs.h"

#include <sys/param.h>
#include <sys/types.h>
#include <sys/mount.h>
  main ()
  {
    struct statfs fsd;
    fsd.f_fsize = 0;
    exit (statfs (".", &fsd, sizeof (struct statfs)));
  }
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:17023: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:17026: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:17028: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:17031: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  fu_cv_sys_stat_statfs3_osf1=yes
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
fu_cv_sys_stat_statfs3_osf1=no
fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi

  echo "$as_me:17044: result: $fu_cv_sys_stat_statfs3_osf1" >&5
echo "${ECHO_T}$fu_cv_sys_stat_statfs3_osf1" >&6
  if test $fu_cv_sys_stat_statfs3_osf1 = yes; then
    space=yes
    cat >>confdefs.h <<\EOF
#define STAT_STATFS3_OSF1 1
EOF

  fi
fi

if test $space = no; then
# AIX
  echo "$as_me:17057: checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)" >&5
echo $ECHO_N "checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)... $ECHO_C" >&6
  if test "${fu_cv_sys_stat_statfs2_bsize+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test "$cross_compiling" = yes; then
  fu_cv_sys_stat_statfs2_bsize=no
else
  cat >conftest.$ac_ext <<_ACEOF
#line 17066 "configure"
#include "confdefs.h"

#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
#ifdef HAVE_SYS_MOUNT_H
#include <sys/mount.h>
#endif
#ifdef HAVE_SYS_VFS_H
#include <sys/vfs.h>
#endif
  main ()
  {
  struct statfs fsd;
  fsd.f_bsize = 0;
  exit (statfs (".", &fsd));
  }
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:17086: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:17089: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:17091: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:17094: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  fu_cv_sys_stat_statfs2_bsize=yes
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
fu_cv_sys_stat_statfs2_bsize=no
fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi

  echo "$as_me:17107: result: $fu_cv_sys_stat_statfs2_bsize" >&5
echo "${ECHO_T}$fu_cv_sys_stat_statfs2_bsize" >&6
  if test $fu_cv_sys_stat_statfs2_bsize = yes; then
    space=yes
    cat >>confdefs.h <<\EOF
#define STAT_STATFS2_BSIZE 1
EOF

  fi
fi

if test $space = no; then
# SVR3
  echo "$as_me:17120: checking for four-argument statfs (AIX-3.2.5, SVR3)" >&5
echo $ECHO_N "checking for four-argument statfs (AIX-3.2.5, SVR3)... $ECHO_C" >&6
  if test "${fu_cv_sys_stat_statfs4+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test "$cross_compiling" = yes; then
  fu_cv_sys_stat_statfs4=no
else
  cat >conftest.$ac_ext <<_ACEOF
#line 17129 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/statfs.h>
  main ()
  {
  struct statfs fsd;
  exit (statfs (".", &fsd, sizeof fsd, 0));
  }
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:17140: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:17143: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:17145: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:17148: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  fu_cv_sys_stat_statfs4=yes
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
fu_cv_sys_stat_statfs4=no
fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi

  echo "$as_me:17161: result: $fu_cv_sys_stat_statfs4" >&5
echo "${ECHO_T}$fu_cv_sys_stat_statfs4" >&6
  if test $fu_cv_sys_stat_statfs4 = yes; then
    space=yes
    cat >>confdefs.h <<\EOF
#define STAT_STATFS4 1
EOF

  fi
fi

if test $space = no; then
# 4.4BSD and NetBSD
  echo "$as_me:17174: checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)" >&5
echo $ECHO_N "checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)... $ECHO_C" >&6
  if test "${fu_cv_sys_stat_statfs2_fsize+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test "$cross_compiling" = yes; then
  fu_cv_sys_stat_statfs2_fsize=no
else
  cat >conftest.$ac_ext <<_ACEOF
#line 17183 "configure"
#include "confdefs.h"
#include <sys/types.h>
#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
#ifdef HAVE_SYS_MOUNT_H
#include <sys/mount.h>
#endif
  main ()
  {
  struct statfs fsd;
  fsd.f_fsize = 0;
  exit (statfs (".", &fsd));
  }
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:17200: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:17203: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:17205: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:17208: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  fu_cv_sys_stat_statfs2_fsize=yes
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
fu_cv_sys_stat_statfs2_fsize=no
fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi

  echo "$as_me:17221: result: $fu_cv_sys_stat_statfs2_fsize" >&5
echo "${ECHO_T}$fu_cv_sys_stat_statfs2_fsize" >&6
  if test $fu_cv_sys_stat_statfs2_fsize = yes; then
    space=yes
    cat >>confdefs.h <<\EOF
#define STAT_STATFS2_FSIZE 1
EOF

  fi
fi

if test $space = no; then
  # Ultrix
  echo "$as_me:17234: checking for two-argument statfs with struct fs_data (Ultrix)" >&5
echo $ECHO_N "checking for two-argument statfs with struct fs_data (Ultrix)... $ECHO_C" >&6
  if test "${fu_cv_sys_stat_fs_data+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test "$cross_compiling" = yes; then
  fu_cv_sys_stat_fs_data=no
else
  cat >conftest.$ac_ext <<_ACEOF
#line 17243 "configure"
#include "confdefs.h"
#include <sys/types.h>
#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
#ifdef HAVE_SYS_MOUNT_H
#include <sys/mount.h>
#endif
#ifdef HAVE_SYS_FS_TYPES_H
#include <sys/fs_types.h>
#endif
  main ()
  {
  struct fs_data fsd;
  /* Ultrix's statfs returns 1 for success,
     0 for not mounted, -1 for failure.  */
  exit (statfs (".", &fsd) != 1);
  }
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:17264: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:17267: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:17269: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:17272: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  fu_cv_sys_stat_fs_data=yes
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
fu_cv_sys_stat_fs_data=no
fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi

  echo "$as_me:17285: result: $fu_cv_sys_stat_fs_data" >&5
echo "${ECHO_T}$fu_cv_sys_stat_fs_data" >&6
  if test $fu_cv_sys_stat_fs_data = yes; then
    space=yes
    cat >>confdefs.h <<\EOF
#define STAT_STATFS2_FS_DATA 1
EOF

  fi
fi

#
# As a gating factor for large file support, in order to
# use <4GB files we must have the following minimal support
# available.
# long long, and a 64 bit off_t or off64_t.
# If we don't have all of these then disable large
# file support.
#
echo "$as_me:17304: checking if large file support can be enabled" >&5
echo $ECHO_N "checking if large file support can be enabled... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
#line 17307 "configure"
#include "confdefs.h"

#if defined(HAVE_LONGLONG) && (defined(HAVE_OFF64_T) || (defined(SIZEOF_OFF_T) && (SIZEOF_OFF_T == 8)))
#include <sys/types.h>
#else
__COMPILE_ERROR_
#endif

int
main ()
{
int i
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:17325: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:17328: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:17331: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:17334: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
if test x"$samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT" = x"yes"; then
    echo "$as_me:17344: result: yes" >&5
echo "${ECHO_T}yes" >&6
    cat >>confdefs.h <<\EOF
#define HAVE_EXPLICIT_LARGEFILE_SUPPORT 1
EOF

else
    echo "$as_me:17351: result: no" >&5
echo "${ECHO_T}no" >&6
fi

# Check whether --with-spinlocks or --without-spinlocks was given.
if test "${with_spinlocks+set}" = set; then
  withval="$with_spinlocks"

fi;
if test "x$with_spinlocks" = "xyes"; then
    cat >>confdefs.h <<\EOF
#define USE_SPINLOCKS 1
EOF

    case "$host_cpu" in
        sparc)
            cat >>confdefs.h <<\EOF
#define SPARC_SPINLOCKS 1
EOF

            ;;

        i386|i486|i586|i686)
            cat >>confdefs.h <<\EOF
#define INTEL_SPINLOCKS 1
EOF

            ;;

        mips)
            cat >>confdefs.h <<\EOF
#define MIPS_SPINLOCKS 1
EOF

            ;;

        powerpc)
            cat >>confdefs.h <<\EOF
#define POWERPC_SPINLOCKS 1
EOF

            ;;
    esac
fi

#################################################
# check for ACL support

echo "$as_me:17399: checking whether to support ACLs" >&5
echo $ECHO_N "checking whether to support ACLs... $ECHO_C" >&6

# Check whether --with-acl-support or --without-acl-support was given.
if test "${with_acl_support+set}" = set; then
  withval="$with_acl_support"
   case "$withval" in
  yes)

		case "$host_os" in
		*sysv5*)
			echo "$as_me:17410: result: Using UnixWare ACLs" >&5
echo "${ECHO_T}Using UnixWare ACLs" >&6
			cat >>confdefs.h <<\EOF
#define HAVE_UNIXWARE_ACLS 1
EOF

			;;
		*solaris*)
			echo "$as_me:17418: result: Using solaris ACLs" >&5
echo "${ECHO_T}Using solaris ACLs" >&6
			cat >>confdefs.h <<\EOF
#define HAVE_SOLARIS_ACLS 1
EOF

			;;
		*hpux*)
			echo "$as_me:17426: result: Using HPUX ACLs" >&5
echo "${ECHO_T}Using HPUX ACLs" >&6
			cat >>confdefs.h <<\EOF
#define HAVE_HPUX_ACLS 1
EOF

			;;
		*irix*)
			echo "$as_me:17434: result: Using IRIX ACLs" >&5
echo "${ECHO_T}Using IRIX ACLs" >&6
			cat >>confdefs.h <<\EOF
#define HAVE_IRIX_ACLS 1
EOF

			;;
		*aix*)
			echo "$as_me:17442: result: Using AIX ACLs" >&5
echo "${ECHO_T}Using AIX ACLs" >&6
			cat >>confdefs.h <<\EOF
#define HAVE_AIX_ACLS 1
EOF

			;;
		*osf*)
			echo "$as_me:17450: result: Using Tru64 ACLs" >&5
echo "${ECHO_T}Using Tru64 ACLs" >&6
			cat >>confdefs.h <<\EOF
#define HAVE_TRU64_ACLS 1
EOF

			LIBS="$LIBS -lpacl"
			;;
		*)

echo "$as_me:17460: checking for acl_get_file in -lacl" >&5
echo $ECHO_N "checking for acl_get_file in -lacl... $ECHO_C" >&6
if test "${ac_cv_lib_acl_acl_get_file+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lacl  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 17468 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char acl_get_file ();
int
main ()
{
acl_get_file ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:17487: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:17490: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:17493: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:17496: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_acl_acl_get_file=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_acl_acl_get_file=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:17507: result: $ac_cv_lib_acl_acl_get_file" >&5
echo "${ECHO_T}$ac_cv_lib_acl_acl_get_file" >&6
if test $ac_cv_lib_acl_acl_get_file = yes; then
  cat >>confdefs.h <<EOF
#define HAVE_LIBACL 1
EOF

  LIBS="-lacl $LIBS"

fi

			echo "$as_me:17518: checking for ACL support" >&5
echo $ECHO_N "checking for ACL support... $ECHO_C" >&6
if test "${samba_cv_HAVE_POSIX_ACLS+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

			cat >conftest.$ac_ext <<_ACEOF
#line 17525 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/acl.h>
int
main ()
{
 acl_t acl; int entry_id; acl_entry_t *entry_p; return acl_get_entry( acl, entry_id, entry_p);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:17538: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:17541: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:17544: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:17547: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  samba_cv_HAVE_POSIX_ACLS=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
samba_cv_HAVE_POSIX_ACLS=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:17557: result: $samba_cv_HAVE_POSIX_ACLS" >&5
echo "${ECHO_T}$samba_cv_HAVE_POSIX_ACLS" >&6
			if test x"$samba_cv_HAVE_POSIX_ACLS" = x"yes"; then
			    echo "$as_me:17560: result: Using posix ACLs" >&5
echo "${ECHO_T}Using posix ACLs" >&6
			    cat >>confdefs.h <<\EOF
#define HAVE_POSIX_ACLS 1
EOF

				echo "$as_me:17566: checking for acl_get_perm_np" >&5
echo $ECHO_N "checking for acl_get_perm_np... $ECHO_C" >&6
if test "${samba_cv_HAVE_ACL_GET_PERM_NP+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

				cat >conftest.$ac_ext <<_ACEOF
#line 17573 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/acl.h>
int
main ()
{
 acl_permset_t permset_d; acl_perm_t perm; return acl_get_perm_np( permset_d, perm);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:17586: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:17589: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:17592: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:17595: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  samba_cv_HAVE_ACL_GET_PERM_NP=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
samba_cv_HAVE_ACL_GET_PERM_NP=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:17605: result: $samba_cv_HAVE_ACL_GET_PERM_NP" >&5
echo "${ECHO_T}$samba_cv_HAVE_ACL_GET_PERM_NP" >&6
				if test x"$samba_cv_HAVE_ACL_GET_PERM_NP" = x"yes"; then
					cat >>confdefs.h <<\EOF
#define HAVE_ACL_GET_PERM_NP 1
EOF

				fi
			fi
			;;
		esac
		;;
  *)
    echo "$as_me:17618: result: no" >&5
echo "${ECHO_T}no" >&6
	cat >>confdefs.h <<\EOF
#define HAVE_NO_ACLS 1
EOF

    ;;
  esac
else
  cat >>confdefs.h <<\EOF
#define HAVE_NO_ACLS 1
EOF

  echo "$as_me:17631: result: no" >&5
echo "${ECHO_T}no" >&6

fi;

#################################################
# check for the historical SAMBA installation

if test "x$prefix" = xNONE -a "$sbindir" = "\${exec_prefix}/sbin"; then
	# Put all binaries under the /usr/local/samba/bin directory.
	sbindir="$bindir"
fi

#################################################
# Check whether winbind is supported on this platform.  If so we need to
# build and install client programs (WINBIND_TARGETS), sbin programs
# (WINBIND_STARGETS) and shared libraries (WINBIND_LTARGETS).

echo "$as_me:17649: checking whether to build winbind" >&5
echo $ECHO_N "checking whether to build winbind... $ECHO_C" >&6

# Initially, the value of $host_os decides whether winbind is supported

case "$host_os" in
        *linux*|*irix*)
		HAVE_WINBIND=yes
                ;;
	*solaris*)
		HAVE_WINBIND=yes
		WINBIND_NSS_EXTRA_OBJS="nsswitch/winbind_nss_solaris.o"
		WINBIND_NSS_EXTRA_LIBS="-lsocket"
		;;
	*hpux11*)
		HAVE_WINBIND=yes
		WINBIND_NSS_EXTRA_OBJS="nsswitch/winbind_nss_solaris.o"
		;;
        *)
		HAVE_WINBIND=no
                winbind_no_reason=", unsupported on $host_os"
                ;;
esac

# Check the setting of --with-winbindd

# Check whether --with-winbind or --without-winbind was given.
if test "${with_winbind+set}" = set; then
  withval="$with_winbind"

  case "$withval" in
	yes)
		HAVE_WINBIND=yes
		;;
        no)
		HAVE_WINBIND=no
                winbind_reason=""
                ;;
  esac
fi;

# We need unix domain sockets for winbind

if test x"$HAVE_WINBIND" = x"yes"; then
	if test x"$samba_cv_unixsocket" = x"no"; then
		winbind_no_reason=", no unix domain socket support on $host_os"
		HAVE_WINBIND=no
	fi
fi

# Display test results

if test x"$HAVE_WINBIND" = x"yes"; then

        echo "$as_me:17703: result: yes" >&5
echo "${ECHO_T}yes" >&6

	WINBIND_TARGETS="bin/wbinfo"
	WINBIND_STARGETS="bin/winbindd"
	case "$host_os" in
        *irix*)
		WINBIND_LTARGETS="nsswitch/libns_winbind.so"
                ;;
        *)
		WINBIND_LTARGETS="nsswitch/libnss_winbind.so"
                ;;
	esac

	case "$with_pam" in
		yes)
			WINBIND_PAM_TARGETS="nsswitch/pam_winbind.so"
		;;
	esac
else
        echo "$as_me:17723: result: no$winbind_no_reason" >&5
echo "${ECHO_T}no$winbind_no_reason" >&6

	WINBIND_TARGETS=""
	WINBIND_STARGETS=""
	WINBIND_LTARGETS=""
	WINBIND_PAM_TARGETS=""
fi

# Check for FreeBSD problem with getgroups
# It returns EGID too many times in the list of groups
# and causes a security problem
echo "$as_me:17735: checking whether or not getgroups returns EGID too many times" >&5
echo $ECHO_N "checking whether or not getgroups returns EGID too many times... $ECHO_C" >&6
if test "${samba_cv_have_getgroups_too_many_egids+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test "$cross_compiling" = yes; then
  samba_cv_have_getgroups_too_many_egids=cross
else
  cat >conftest.$ac_ext <<_ACEOF
#line 17744 "configure"
#include "confdefs.h"

#include <sys/types.h>
#include <stdio.h>

int main(int argc, char *argv[])
{
  gid_t groups[10];
  int n = 10;

  n = getgroups(n, &groups);
  /* Could actually pass back the number of EGIDs there ... */
  exit((n > 1 && groups[0] == getegid() && groups[1] == getegid()) ? 1 : 0);
}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:17761: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:17764: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:17766: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:17769: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  samba_cv_have_getgroups_too_many_egids=no
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
samba_cv_have_getgroups_too_many_egids=yes
fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
echo "$as_me:17781: result: $samba_cv_have_getgroups_too_many_egids" >&5
echo "${ECHO_T}$samba_cv_have_getgroups_too_many_egids" >&6
if test x"$samba_cv_have_getgroups_too_many_egids" = x"yes"; then
    cat >>confdefs.h <<\EOF
#define HAVE_GETGROUPS_TOO_MANY_EGIDS 1
EOF

fi

# Substitution time!

#################################################
# Check to see if we should use the included popt

# Check whether --with-included-popt or --without-included-popt was given.
if test "${with_included_popt+set}" = set; then
  withval="$with_included_popt"

  case "$withval" in
        yes)
                INCLUDED_POPT=yes
                ;;
        no)
                INCLUDED_POPT=no
                ;;
  esac
fi;
if test x"$INCLUDED_POPT" != x"yes"; then
    echo "$as_me:17809: checking for poptGetContext in -lpopt" >&5
echo $ECHO_N "checking for poptGetContext in -lpopt... $ECHO_C" >&6
if test "${ac_cv_lib_popt_poptGetContext+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lpopt  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 17817 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char poptGetContext ();
int
main ()
{
poptGetContext ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:17836: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:17839: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:17842: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:17845: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_popt_poptGetContext=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_popt_poptGetContext=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:17856: result: $ac_cv_lib_popt_poptGetContext" >&5
echo "${ECHO_T}$ac_cv_lib_popt_poptGetContext" >&6
if test $ac_cv_lib_popt_poptGetContext = yes; then
  INCLUDED_POPT=no
else
  INCLUDED_POPT=yes
fi

fi

echo "$as_me:17866: checking whether to use included popt" >&5
echo $ECHO_N "checking whether to use included popt... $ECHO_C" >&6
if test x"$INCLUDED_POPT" = x"yes"; then
    echo "$as_me:17869: result: $srcdir/popt" >&5
echo "${ECHO_T}$srcdir/popt" >&6
    BUILD_POPT='$(POPT_OBJS)'
    FLAGS1="-I$srcdir/popt"
else
    echo "$as_me:17874: result: no" >&5
echo "${ECHO_T}no" >&6
    LIBS="$LIBS -lpopt"
fi

#################################################
# final configure stuff
echo "$as_me:17881: checking configure summary" >&5
echo $ECHO_N "checking configure summary... $ECHO_C" >&6
if test "$cross_compiling" = yes; then
  { echo "$as_me:17884: WARNING: cannot run when cross-compiling" >&5
echo "$as_me: WARNING: cannot run when cross-compiling" >&2;}
else
  cat >conftest.$ac_ext <<_ACEOF
#line 17888 "configure"
#include "confdefs.h"
#include "${srcdir-.}/tests/summary.c"
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:17893: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:17896: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:17898: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:17901: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  echo "$as_me:17903: result: yes" >&5
echo "${ECHO_T}yes" >&6
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
{ { echo "$as_me:17909: error: summary failure. Aborting config" >&5
echo "$as_me: error: summary failure. Aborting config" >&2;}
   { (exit 1); exit 1; }; }; exit 1;
fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi

builddir=`pwd`

ac_config_files="$ac_config_files include/stamp-h Makefile"
cat >confcache <<\_ACEOF
# 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, see configure's option --config-cache.
# It is not useful on other systems.  If it contains results you don't
# want to keep, you may remove or edit it.
#
# config.status only pays attention to the cache file if you give it
# the --recheck option to rerun configure.
#
# `ac_cv_env_foo' variables (set or unset) will be overriden when
# loading this file, other *unset* `ac_cv_foo' will be assigned the
# following values.

_ACEOF

# 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 \
        "s/'/'\\\\''/g;
    	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
      ;;
    *)
      # `set' quotes correctly as required by POSIX, so do not add quotes.
      sed -n \
        "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
      ;;
    esac;
} |
  sed '
     t clear
     : clear
     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
     t end
     /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
     : end' >>confcache
if cmp -s $cache_file confcache; then :; else
  if test -w $cache_file; then
    test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
    cat confcache >$cache_file
  else
    echo "not updating unwritable cache $cache_file"
  fi
fi
rm -f confcache

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

# VPATH may cause trouble with some makes, so we remove $(srcdir),
# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
# trailing colons and then remove the whole line if VPATH becomes empty
# (actually we leave an empty line to preserve line numbers).
if test "x$srcdir" = x.; then
  ac_vpsub='/^[ 	]*VPATH[ 	]*=/{
s/:*\$(srcdir):*/:/;
s/:*\${srcdir}:*/:/;
s/:*@srcdir@:*/:/;
s/^\([^=]*=[ 	]*\):*/\1/;
s/:*$//;
s/^[^=]*=[ 	]*$//;
}'
fi

DEFS=-DHAVE_CONFIG_H

: ${CONFIG_STATUS=./config.status}
ac_clean_files_save=$ac_clean_files
ac_clean_files="$ac_clean_files $CONFIG_STATUS"
{ echo "$as_me:17998: creating $CONFIG_STATUS" >&5
echo "$as_me: creating $CONFIG_STATUS" >&6;}
cat >$CONFIG_STATUS <<_ACEOF
#! $SHELL
# Generated automatically by configure.
# Run this file to recreate the current configuration.
# Compiler output produced by configure, useful for debugging
# configure, is in config.log if it exists.

debug=false
SHELL=\${CONFIG_SHELL-$SHELL}
ac_cs_invocation="\$0 \$@"

_ACEOF

cat >>$CONFIG_STATUS <<\_ACEOF
# Be Bourne compatible
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
  emulate sh
  NULLCMD=:
elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
  set -o posix
fi

# Name of the executable.
as_me=`echo "$0" |sed 's,.*[\\/],,'`

if expr a : '\(a\)' >/dev/null 2>&1; then
  as_expr=expr
else
  as_expr=false
fi

rm -f conf$$ conf$$.exe conf$$.file
echo >conf$$.file
if ln -s conf$$.file conf$$ 2>/dev/null; then
  # We could just check for DJGPP; but this test a) works b) is more generic
  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
  if test -f conf$$.exe; then
    # Don't use ln at all; we don't have any links
    as_ln_s='cp -p'
  else
    as_ln_s='ln -s'
  fi
elif ln conf$$.file conf$$ 2>/dev/null; then
  as_ln_s=ln
else
  as_ln_s='cp -p'
fi
rm -f conf$$ conf$$.exe conf$$.file

as_executable_p="test -f"

# Support unset when possible.
if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
  as_unset=unset
else
  as_unset=false
fi

# NLS nuisances.
$as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
$as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
$as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
$as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
$as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
$as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
$as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
$as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }

# IFS
# We need space, tab and new line, in precisely that order.
as_nl='
'
IFS=" 	$as_nl"

# CDPATH.
$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }

exec 6>&1

_ACEOF

# Files that config.status was made for.
if test -n "$ac_config_files"; then
  echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
fi

if test -n "$ac_config_headers"; then
  echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
fi

if test -n "$ac_config_links"; then
  echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
fi

if test -n "$ac_config_commands"; then
  echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
fi

cat >>$CONFIG_STATUS <<\EOF

ac_cs_usage="\
\`$as_me' instantiates files from templates according to the
current configuration.

Usage: $0 [OPTIONS] [FILE]...

  -h, --help       print this help, then exit
  -V, --version    print version number, then exit
  -d, --debug      don't remove temporary files
      --recheck    update $as_me by reconfiguring in the same conditions
  --file=FILE[:TEMPLATE]
                   instantiate the configuration file FILE
  --header=FILE[:TEMPLATE]
                   instantiate the configuration header FILE

Configuration files:
$config_files

Configuration headers:
$config_headers

Report bugs to <bug-autoconf@gnu.org>."
EOF

cat >>$CONFIG_STATUS <<EOF
ac_cs_version="\\
config.status
configured by $0, generated by GNU Autoconf 2.52,
  with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"

Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
Free Software Foundation, Inc.
This config.status script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it."
srcdir=$srcdir
INSTALL="$INSTALL"
EOF

cat >>$CONFIG_STATUS <<\EOF
# If no file are specified by the user, then we need to provide default
# value.  By we need to know if files were specified by the user.
ac_need_defaults=:
while test $# != 0
do
  case $1 in
  --*=*)
    ac_option=`expr "x$1" : 'x\([^=]*\)='`
    ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
    shift
    set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
    shift
    ;;
  -*);;
  *) # This is not an option, so the user has probably given explicit
     # arguments.
     ac_need_defaults=false;;
  esac

  case $1 in
  # Handling of the options.
EOF
cat >>$CONFIG_STATUS <<EOF
  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
    echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
    exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
EOF
cat >>$CONFIG_STATUS <<\EOF
  --version | --vers* | -V )
    echo "$ac_cs_version"; exit 0 ;;
  --he | --h)
    # Conflict between --help and --header
    { { echo "$as_me:18171: error: ambiguous option: $1
Try \`$0 --help' for more information." >&5
echo "$as_me: error: ambiguous option: $1
Try \`$0 --help' for more information." >&2;}
   { (exit 1); exit 1; }; };;
  --help | --hel | -h )
    echo "$ac_cs_usage"; exit 0 ;;
  --debug | --d* | -d )
    debug=: ;;
  --file | --fil | --fi | --f )
    shift
    CONFIG_FILES="$CONFIG_FILES $1"
    ac_need_defaults=false;;
  --header | --heade | --head | --hea )
    shift
    CONFIG_HEADERS="$CONFIG_HEADERS $1"
    ac_need_defaults=false;;

  # This is an error.
  -*) { { echo "$as_me:18190: error: unrecognized option: $1
Try \`$0 --help' for more information." >&5
echo "$as_me: error: unrecognized option: $1
Try \`$0 --help' for more information." >&2;}
   { (exit 1); exit 1; }; } ;;

  *) ac_config_targets="$ac_config_targets $1" ;;

  esac
  shift
done

exec 5>>config.log
cat >&5 << _ACEOF

## ----------------------- ##
## Running config.status.  ##
## ----------------------- ##

This file was extended by $as_me 2.52, executed with
  CONFIG_FILES    = $CONFIG_FILES
  CONFIG_HEADERS  = $CONFIG_HEADERS
  CONFIG_LINKS    = $CONFIG_LINKS
  CONFIG_COMMANDS = $CONFIG_COMMANDS
  > $ac_cs_invocation
on `(hostname || uname -n) 2>/dev/null | sed 1q`

_ACEOF
EOF

cat >>$CONFIG_STATUS <<\EOF
for ac_config_target in $ac_config_targets
do
  case "$ac_config_target" in
  # Handling of arguments.
  "include/stamp-h" ) CONFIG_FILES="$CONFIG_FILES include/stamp-h" ;;
  "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
  "include/config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/config.h" ;;
  *) { { echo "$as_me:18228: error: invalid argument: $ac_config_target" >&5
echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
   { (exit 1); exit 1; }; };;
  esac
done

# If the user did not use the arguments to specify the items to instantiate,
# then the envvar interface is used.  Set only those that are not.
# We use the long form for the default assignment because of an extremely
# bizarre bug on SunOS 4.1.3.
if $ac_need_defaults; then
  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
fi

# Create a temporary directory, and hook for its removal unless debugging.
$debug ||
{
  trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
  trap '{ (exit 1); exit 1; }' 1 2 13 15
}

# Create a (secure) tmp directory for tmp files.
: ${TMPDIR=/tmp}
{
  tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
  test -n "$tmp" && test -d "$tmp"
}  ||
{
  tmp=$TMPDIR/cs$$-$RANDOM
  (umask 077 && mkdir $tmp)
} ||
{
   echo "$me: cannot create a temporary directory in $TMPDIR" >&2
   { (exit 1); exit 1; }
}

EOF

cat >>$CONFIG_STATUS <<EOF

#
# CONFIG_FILES section.
#

# No need to generate the scripts if there are no CONFIG_FILES.
# This happens for instance when ./config.status config.h
if test -n "\$CONFIG_FILES"; then
  # Protect against being on the right side of a sed subst in config.status.
  sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
   s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
s,@SHELL@,$SHELL,;t t
s,@exec_prefix@,$exec_prefix,;t t
s,@prefix@,$prefix,;t t
s,@program_transform_name@,$program_transform_name,;t t
s,@bindir@,$bindir,;t t
s,@sbindir@,$sbindir,;t t
s,@libexecdir@,$libexecdir,;t t
s,@datadir@,$datadir,;t t
s,@sysconfdir@,$sysconfdir,;t t
s,@sharedstatedir@,$sharedstatedir,;t t
s,@localstatedir@,$localstatedir,;t t
s,@libdir@,$libdir,;t t
s,@includedir@,$includedir,;t t
s,@oldincludedir@,$oldincludedir,;t t
s,@infodir@,$infodir,;t t
s,@mandir@,$mandir,;t t
s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
s,@build_alias@,$build_alias,;t t
s,@host_alias@,$host_alias,;t t
s,@target_alias@,$target_alias,;t t
s,@ECHO_C@,$ECHO_C,;t t
s,@ECHO_N@,$ECHO_N,;t t
s,@ECHO_T@,$ECHO_T,;t t
s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
s,@DEFS@,$DEFS,;t t
s,@LIBS@,$LIBS,;t t
s,@codepagedir@,$codepagedir,;t t
s,@configdir@,$configdir,;t t
s,@lockdir@,$lockdir,;t t
s,@piddir@,$piddir,;t t
s,@logfilebase@,$logfilebase,;t t
s,@privatedir@,$privatedir,;t t
s,@swatdir@,$swatdir,;t t
s,@RUNPROG@,$RUNPROG,;t t
s,@MPROGS@,$MPROGS,;t t
s,@LDSHFLAGS@,$LDSHFLAGS,;t t
s,@SONAMEFLAG@,$SONAMEFLAG,;t t
s,@SHLD@,$SHLD,;t t
s,@HOST_OS@,$HOST_OS,;t t
s,@PAM_MOD@,$PAM_MOD,;t t
s,@PDBEDIT@,$PDBEDIT,;t t
s,@WRAP@,$WRAP,;t t
s,@WRAP32@,$WRAP32,;t t
s,@WRAPPROG@,$WRAPPROG,;t t
s,@PICFLAG@,$PICFLAG,;t t
s,@PICSUFFIX@,$PICSUFFIX,;t t
s,@SHLIBEXT@,$SHLIBEXT,;t t
s,@BLDSHARED@,$BLDSHARED,;t t
s,@LIBSMBCLIENT_SHARED@,$LIBSMBCLIENT_SHARED,;t t
s,@LIBSMBCLIENT@,$LIBSMBCLIENT,;t t
s,@CC@,$CC,;t t
s,@CFLAGS@,$CFLAGS,;t t
s,@LDFLAGS@,$LDFLAGS,;t t
s,@CPPFLAGS@,$CPPFLAGS,;t t
s,@ac_ct_CC@,$ac_ct_CC,;t t
s,@EXEEXT@,$EXEEXT,;t t
s,@OBJEXT@,$OBJEXT,;t t
s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
s,@INSTALL_DATA@,$INSTALL_DATA,;t t
s,@AWK@,$AWK,;t t
s,@BROKEN_CC@,$BROKEN_CC,;t t
s,@build@,$build,;t t
s,@build_cpu@,$build_cpu,;t t
s,@build_vendor@,$build_vendor,;t t
s,@build_os@,$build_os,;t t
s,@host@,$host,;t t
s,@host_cpu@,$host_cpu,;t t
s,@host_vendor@,$host_vendor,;t t
s,@host_os@,$host_os,;t t
s,@target@,$target,;t t
s,@target_cpu@,$target_cpu,;t t
s,@target_vendor@,$target_vendor,;t t
s,@target_os@,$target_os,;t t
s,@CPP@,$CPP,;t t
s,@LIBOBJS@,$LIBOBJS,;t t
s,@TERMLIBS@,$TERMLIBS,;t t
s,@TERMLDFLAGS@,$TERMLDFLAGS,;t t
s,@ROFF@,$ROFF,;t t
s,@DYNEXP@,$DYNEXP,;t t
s,@QUOTAOBJS@,$QUOTAOBJS,;t t
s,@WINBIND_TARGETS@,$WINBIND_TARGETS,;t t
s,@WINBIND_STARGETS@,$WINBIND_STARGETS,;t t
s,@WINBIND_LTARGETS@,$WINBIND_LTARGETS,;t t
s,@WINBIND_PAM_TARGETS@,$WINBIND_PAM_TARGETS,;t t
s,@WINBIND_NSS_EXTRA_OBJS@,$WINBIND_NSS_EXTRA_OBJS,;t t
s,@WINBIND_NSS_EXTRA_LIBS@,$WINBIND_NSS_EXTRA_LIBS,;t t
s,@BUILD_POPT@,$BUILD_POPT,;t t
s,@FLAGS1@,$FLAGS1,;t t
s,@builddir@,$builddir,;t t
CEOF

EOF

  cat >>$CONFIG_STATUS <<\EOF
  # Split the substitutions into bite-sized pieces for seds with
  # small command number limits, like on Digital OSF/1 and HP-UX.
  ac_max_sed_lines=48
  ac_sed_frag=1 # Number of current file.
  ac_beg=1 # First line for current file.
  ac_end=$ac_max_sed_lines # Line after last line for current file.
  ac_more_lines=:
  ac_sed_cmds=
  while $ac_more_lines; do
    if test $ac_beg -gt 1; then
      sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
    else
      sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
    fi
    if test ! -s $tmp/subs.frag; then
      ac_more_lines=false
    else
      # The purpose of the label and of the branching condition is to
      # speed up the sed processing (if there are no `@' at all, there
      # is no need to browse any of the substitutions).
      # These are the two extra sed commands mentioned above.
      (echo ':t
  /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
      if test -z "$ac_sed_cmds"; then
  	ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
      else
  	ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
      fi
      ac_sed_frag=`expr $ac_sed_frag + 1`
      ac_beg=$ac_end
      ac_end=`expr $ac_end + $ac_max_sed_lines`
    fi
  done
  if test -z "$ac_sed_cmds"; then
    ac_sed_cmds=cat
  fi
fi # test -n "$CONFIG_FILES"

EOF
cat >>$CONFIG_STATUS <<\EOF
for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
  case $ac_file in
  - | *:- | *:-:* ) # input from stdin
        cat >$tmp/stdin
        ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
  * )   ac_file_in=$ac_file.in ;;
  esac

  # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
  ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
         X"$ac_file" : 'X\(//\)[^/]' \| \
         X"$ac_file" : 'X\(//\)$' \| \
         X"$ac_file" : 'X\(/\)' \| \
         .     : '\(.\)' 2>/dev/null ||
echo X"$ac_file" |
    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
  	  /^X\(\/\/\)$/{ s//\1/; q; }
  	  /^X\(\/\).*/{ s//\1/; q; }
  	  s/.*/./; q'`
  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
    { case "$ac_dir" in
  [\\/]* | ?:[\\/]* ) as_incr_dir=;;
  *)                      as_incr_dir=.;;
esac
as_dummy="$ac_dir"
for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
  case $as_mkdir_dir in
    # Skip DOS drivespec
    ?:) as_incr_dir=$as_mkdir_dir ;;
    *)
      as_incr_dir=$as_incr_dir/$as_mkdir_dir
      test -d "$as_incr_dir" || mkdir "$as_incr_dir"
    ;;
  esac
done; }

    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 $srcdir in
  .)  ac_srcdir=.
      if test -z "$ac_dots"; then
         ac_top_srcdir=.
      else
         ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
      fi ;;
  [\\/]* | ?:[\\/]* )
      ac_srcdir=$srcdir$ac_dir_suffix;
      ac_top_srcdir=$srcdir ;;
  *) # Relative path.
    ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
    ac_top_srcdir=$ac_dots$srcdir ;;
  esac

  case $INSTALL in
  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
  *) ac_INSTALL=$ac_dots$INSTALL ;;
  esac

  if test x"$ac_file" != x-; then
    { echo "$as_me:18487: creating $ac_file" >&5
echo "$as_me: creating $ac_file" >&6;}
    rm -f "$ac_file"
  fi
  # Let's still pretend it is `configure' which instantiates (i.e., don't
  # use $as_me), people would be surprised to read:
  #    /* config.h.  Generated automatically by config.status.  */
  configure_input="Generated automatically from `echo $ac_file_in |
                                                 sed 's,.*/,,'` by configure."

  # First look for the input files in the build tree, otherwise in the
  # src tree.
  ac_file_inputs=`IFS=:
    for f in $ac_file_in; do
      case $f in
      -) echo $tmp/stdin ;;
      [\\/$]*)
         # Absolute (can't be DOS-style, as IFS=:)
         test -f "$f" || { { echo "$as_me:18505: error: cannot find input file: $f" >&5
echo "$as_me: error: cannot find input file: $f" >&2;}
   { (exit 1); exit 1; }; }
         echo $f;;
      *) # Relative
         if test -f "$f"; then
           # Build tree
           echo $f
         elif test -f "$srcdir/$f"; then
           # Source tree
           echo $srcdir/$f
         else
           # /dev/null tree
           { { echo "$as_me:18518: error: cannot find input file: $f" >&5
echo "$as_me: error: cannot find input file: $f" >&2;}
   { (exit 1); exit 1; }; }
         fi;;
      esac
    done` || { (exit 1); exit 1; }
EOF
cat >>$CONFIG_STATUS <<EOF
  sed "$ac_vpsub
$extrasub
EOF
cat >>$CONFIG_STATUS <<\EOF
:t
/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
s,@configure_input@,$configure_input,;t t
s,@srcdir@,$ac_srcdir,;t t
s,@top_srcdir@,$ac_top_srcdir,;t t
s,@INSTALL@,$ac_INSTALL,;t t
" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
  rm -f $tmp/stdin
  if test x"$ac_file" != x-; then
    mv $tmp/out $ac_file
  else
    cat $tmp/out
    rm -f $tmp/out
  fi

done
EOF
cat >>$CONFIG_STATUS <<\EOF

#
# CONFIG_HEADER section.
#

# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
# NAME is the cpp macro being defined and VALUE is the value it is being given.
#
# ac_d sets the value in "#define NAME VALUE" lines.
ac_dA='s,^\([ 	]*\)#\([ 	]*define[ 	][ 	]*\)'
ac_dB='[ 	].*$,\1#\2'
ac_dC=' '
ac_dD=',;t'
# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
ac_uA='s,^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
ac_uB='$,\1#\2define\3'
ac_uC=' '
ac_uD=',;t'

for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
  case $ac_file in
  - | *:- | *:-:* ) # input from stdin
        cat >$tmp/stdin
        ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
  * )   ac_file_in=$ac_file.in ;;
  esac

  test x"$ac_file" != x- && { echo "$as_me:18579: creating $ac_file" >&5
echo "$as_me: creating $ac_file" >&6;}

  # First look for the input files in the build tree, otherwise in the
  # src tree.
  ac_file_inputs=`IFS=:
    for f in $ac_file_in; do
      case $f in
      -) echo $tmp/stdin ;;
      [\\/$]*)
         # Absolute (can't be DOS-style, as IFS=:)
         test -f "$f" || { { echo "$as_me:18590: error: cannot find input file: $f" >&5
echo "$as_me: error: cannot find input file: $f" >&2;}
   { (exit 1); exit 1; }; }
         echo $f;;
      *) # Relative
         if test -f "$f"; then
           # Build tree
           echo $f
         elif test -f "$srcdir/$f"; then
           # Source tree
           echo $srcdir/$f
         else
           # /dev/null tree
           { { echo "$as_me:18603: error: cannot find input file: $f" >&5
echo "$as_me: error: cannot find input file: $f" >&2;}
   { (exit 1); exit 1; }; }
         fi;;
      esac
    done` || { (exit 1); exit 1; }
  # Remove the trailing spaces.
  sed 's/[ 	]*$//' $ac_file_inputs >$tmp/in

EOF

# Transform confdefs.h into two sed scripts, `conftest.defines' and
# `conftest.undefs', that substitutes the proper values into
# config.h.in to produce config.h.  The first handles `#define'
# templates, and the second `#undef' templates.
# And first: Protect against being on the right side of a sed subst in
# config.status.  Protect against being in an unquoted here document
# in config.status.
rm -f conftest.defines conftest.undefs
# Using a here document instead of a string reduces the quoting nightmare.
# Putting comments in sed scripts is not portable.
#
# `end' is used to avoid that the second main sed command (meant for
# 0-ary CPP macros) applies to n-ary macro definitions.
# See the Autoconf documentation for `clear'.
cat >confdef2sed.sed <<\EOF
s/[\\&,]/\\&/g
s,[\\$`],\\&,g
t clear
: clear
s,^[ 	]*#[ 	]*define[ 	][ 	]*\(\([^ 	(][^ 	(]*\)([^)]*)\)[ 	]*\(.*\)$,${ac_dA}\2${ac_dB}\1${ac_dC}\3${ac_dD},gp
t end
s,^[ 	]*#[ 	]*define[ 	][ 	]*\([^ 	][^ 	]*\)[ 	]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
: end
EOF
# If some macros were called several times there might be several times
# the same #defines, which is useless.  Nevertheless, we may not want to
# sort them, since we want the *last* AC-DEFINE to be honored.
uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
rm -f confdef2sed.sed

# This sed command replaces #undef with comments.  This is necessary, for
# example, in the case of _POSIX_SOURCE, which is predefined and required
# on some systems where configure will not decide to define it.
cat >>conftest.undefs <<\EOF
s,^[ 	]*#[ 	]*undef[ 	][ 	]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
EOF

# Break up conftest.defines because some shells have a limit on the size
# of here documents, and old seds have small limits too (100 cmds).
echo '  # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
echo '  if egrep "^[ 	]*#[ 	]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
echo '  # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
echo '  :' >>$CONFIG_STATUS
rm -f conftest.tail
while grep . conftest.defines >/dev/null
do
  # Write a limited-size here document to $tmp/defines.sed.
  echo '  cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
  # Speed up: don't consider the non `#define' lines.
  echo '/^[ 	]*#[ 	]*define/!b' >>$CONFIG_STATUS
  # Work around the forget-to-reset-the-flag bug.
  echo 't clr' >>$CONFIG_STATUS
  echo ': clr' >>$CONFIG_STATUS
  sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
  echo 'CEOF
  sed -f $tmp/defines.sed $tmp/in >$tmp/out
  rm -f $tmp/in
  mv $tmp/out $tmp/in
' >>$CONFIG_STATUS
  sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
  rm -f conftest.defines
  mv conftest.tail conftest.defines
done
rm -f conftest.defines
echo '  fi # egrep' >>$CONFIG_STATUS
echo >>$CONFIG_STATUS

# Break up conftest.undefs because some shells have a limit on the size
# of here documents, and old seds have small limits too (100 cmds).
echo '  # Handle all the #undef templates' >>$CONFIG_STATUS
rm -f conftest.tail
while grep . conftest.undefs >/dev/null
do
  # Write a limited-size here document to $tmp/undefs.sed.
  echo '  cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
  # Speed up: don't consider the non `#undef'
  echo '/^[ 	]*#[ 	]*undef/!b' >>$CONFIG_STATUS
  # Work around the forget-to-reset-the-flag bug.
  echo 't clr' >>$CONFIG_STATUS
  echo ': clr' >>$CONFIG_STATUS
  sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
  echo 'CEOF
  sed -f $tmp/undefs.sed $tmp/in >$tmp/out
  rm -f $tmp/in
  mv $tmp/out $tmp/in
' >>$CONFIG_STATUS
  sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
  rm -f conftest.undefs
  mv conftest.tail conftest.undefs
done
rm -f conftest.undefs

cat >>$CONFIG_STATUS <<\EOF
  # Let's still pretend it is `configure' which instantiates (i.e., don't
  # use $as_me), people would be surprised to read:
  #    /* config.h.  Generated automatically by config.status.  */
  if test x"$ac_file" = x-; then
    echo "/* Generated automatically by configure.  */" >$tmp/config.h
  else
    echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
  fi
  cat $tmp/in >>$tmp/config.h
  rm -f $tmp/in
  if test x"$ac_file" != x-; then
    if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
      { echo "$as_me:18720: $ac_file is unchanged" >&5
echo "$as_me: $ac_file is unchanged" >&6;}
    else
      ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
         X"$ac_file" : 'X\(//\)[^/]' \| \
         X"$ac_file" : 'X\(//\)$' \| \
         X"$ac_file" : 'X\(/\)' \| \
         .     : '\(.\)' 2>/dev/null ||
echo X"$ac_file" |
    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
  	  /^X\(\/\/\)$/{ s//\1/; q; }
  	  /^X\(\/\).*/{ s//\1/; q; }
  	  s/.*/./; q'`
      if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
        { case "$ac_dir" in
  [\\/]* | ?:[\\/]* ) as_incr_dir=;;
  *)                      as_incr_dir=.;;
esac
as_dummy="$ac_dir"
for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
  case $as_mkdir_dir in
    # Skip DOS drivespec
    ?:) as_incr_dir=$as_mkdir_dir ;;
    *)
      as_incr_dir=$as_incr_dir/$as_mkdir_dir
      test -d "$as_incr_dir" || mkdir "$as_incr_dir"
    ;;
  esac
done; }

      fi
      rm -f $ac_file
      mv $tmp/config.h $ac_file
    fi
  else
    cat $tmp/config.h
    rm -f $tmp/config.h
  fi
done
EOF

cat >>$CONFIG_STATUS <<\EOF

{ (exit 0); exit 0; }
EOF
chmod +x $CONFIG_STATUS
ac_clean_files=$ac_clean_files_save

# configure is writing to config.log, and then calls config.status.
# config.status does its own redirection, appending to config.log.
# Unfortunately, on DOS this fails, as config.log is still kept open
# by configure, so config.status won't be able to write to it; its
# output is simply discarded.  So we exec the FD to /dev/null,
# effectively closing config.log, so it can be properly (re)opened and
# appended to by config.status.  When coming back to configure, we
# need to make the FD available again.
if test "$no_create" != yes; then
  ac_cs_success=:
  exec 5>/dev/null
  $SHELL $CONFIG_STATUS || ac_cs_success=false
  exec 5>>config.log
  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
  # would make configure fail if this is the last instruction.
  $ac_cs_success || { (exit 1); exit 1; }
fi

