#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.64 for samba 4.
#
# Report bugs to <samba-technical@samba.org>.
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software
# Foundation, Inc.
#
# This configure script is free software; the Free Software Foundation
# gives unlimited permission to copy, distribute and modify it.
## -------------------- ##
## M4sh Initialization. ##
## -------------------- ##

# Be more Bourne compatible
DUALCASE=1; export DUALCASE # for MKS sh
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
  emulate sh
  NULLCMD=:
  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
  # is contrary to our usage.  Disable this feature.
  alias -g '${1+"$@"}'='"$@"'
  setopt NO_GLOB_SUBST
else
  case `(set -o) 2>/dev/null` in #(
  *posix*) :
    set -o posix ;; #(
  *) :
     ;;
esac
fi


as_nl='
'
export as_nl
# Printing a long string crashes Solaris 7 /usr/bin/printf.
as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
# Prefer a ksh shell builtin over an external printf program on Solaris,
# but without wasting forks for bash or zsh.
if test -z "$BASH_VERSION$ZSH_VERSION" \
    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
  as_echo='print -r --'
  as_echo_n='print -rn --'
elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
  as_echo='printf %s\n'
  as_echo_n='printf %s'
else
  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
    as_echo_n='/usr/ucb/echo -n'
  else
    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
    as_echo_n_body='eval
      arg=$1;
      case $arg in #(
      *"$as_nl"*)
	expr "X$arg" : "X\\(.*\\)$as_nl";
	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
      esac;
      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
    '
    export as_echo_n_body
    as_echo_n='sh -c $as_echo_n_body as_echo'
  fi
  export as_echo_body
  as_echo='sh -c $as_echo_body as_echo'
fi

# The user is always right.
if test "${PATH_SEPARATOR+set}" != set; then
  PATH_SEPARATOR=:
  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
      PATH_SEPARATOR=';'
  }
fi


# IFS
# We need space, tab and new line, in precisely that order.  Quoting is
# there to prevent editors from complaining about space-tab.
# (If _AS_PATH_WALK were called with IFS unset, it would disable word
# splitting by setting IFS to empty value.)
IFS=" ""	$as_nl"

# Find who we are.  Look in the path if we contain no directory separator.
case $0 in #((
  *[\\/]* ) as_myself=$0 ;;
  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
  done
IFS=$as_save_IFS

     ;;
esac
# We did not find ourselves, most probably we were run as `sh COMMAND'
# in which case we are not to be found in the path.
if test "x$as_myself" = x; then
  as_myself=$0
fi
if test ! -f "$as_myself"; then
  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
  exit 1
fi

# Unset variables that we do not need and which cause bugs (e.g. in
# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
# suppresses any "Segmentation fault" message there.  '((' could
# trigger a bug in pdksh 5.2.14.
for as_var in BASH_ENV ENV MAIL MAILPATH
do eval test x\${$as_var+set} = xset \
  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
done
PS1='$ '
PS2='> '
PS4='+ '

# NLS nuisances.
LC_ALL=C
export LC_ALL
LANGUAGE=C
export LANGUAGE

# CDPATH.
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH

if test "x$CONFIG_SHELL" = x; then
  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
  emulate sh
  NULLCMD=:
  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
  # is contrary to our usage.  Disable this feature.
  alias -g '\${1+\"\$@\"}'='\"\$@\"'
  setopt NO_GLOB_SUBST
else
  case \`(set -o) 2>/dev/null\` in #(
  *posix*) :
    set -o posix ;; #(
  *) :
     ;;
esac
fi
"
  as_required="as_fn_return () { (exit \$1); }
as_fn_success () { as_fn_return 0; }
as_fn_failure () { as_fn_return 1; }
as_fn_ret_success () { return 0; }
as_fn_ret_failure () { return 1; }

exitcode=0
as_fn_success || { exitcode=1; echo as_fn_success failed.; }
as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :

else
  exitcode=1; echo positional parameters were not saved.
fi
test x\$exitcode = x0 || exit 1"
  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
test \$(( 1 + 1 )) = 2 || exit 1"
  if (eval "$as_required") 2>/dev/null; then :
  as_have_required=yes
else
  as_have_required=no
fi
  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :

else
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
as_found=false
for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  as_found=:
  case $as_dir in #(
	 /*)
	   for as_base in sh bash ksh sh5; do
	     # Try only shells that exist, to save several forks.
	     as_shell=$as_dir/$as_base
	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
  CONFIG_SHELL=$as_shell as_have_required=yes
		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
  break 2
fi
fi
	   done;;
       esac
  as_found=false
done
$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
  CONFIG_SHELL=$SHELL as_have_required=yes
fi; }
IFS=$as_save_IFS


      if test "x$CONFIG_SHELL" != x; then :
  # We cannot yet assume a decent shell, so we have to provide a
	# neutralization value for shells without unset; and this also
	# works around shells that cannot unset nonexistent variables.
	BASH_ENV=/dev/null
	ENV=/dev/null
	(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
	export CONFIG_SHELL
	exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
fi

    if test x$as_have_required = xno; then :
  $as_echo "$0: This script requires a shell more modern than all"
  $as_echo "$0: the shells that I found on your system."
  if test x${ZSH_VERSION+set} = xset ; then
    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
  else
    $as_echo "$0: Please tell bug-autoconf@gnu.org and
$0: samba-technical@samba.org about your system, including
$0: any error possibly output before this message. Then
$0: install a modern shell, or manually run the script
$0: under such a shell if you do have one."
  fi
  exit 1
fi
fi
fi
SHELL=${CONFIG_SHELL-/bin/sh}
export SHELL
# Unset more variables known to interfere with behavior of common tools.
CLICOLOR_FORCE= GREP_OPTIONS=
unset CLICOLOR_FORCE GREP_OPTIONS

## --------------------- ##
## M4sh Shell Functions. ##
## --------------------- ##
# as_fn_unset VAR
# ---------------
# Portably unset VAR.
as_fn_unset ()
{
  { eval $1=; unset $1;}
}
as_unset=as_fn_unset

# as_fn_set_status STATUS
# -----------------------
# Set $? to STATUS, without forking.
as_fn_set_status ()
{
  return $1
} # as_fn_set_status

# as_fn_exit STATUS
# -----------------
# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
as_fn_exit ()
{
  set +e
  as_fn_set_status $1
  exit $1
} # as_fn_exit

# as_fn_mkdir_p
# -------------
# Create "$as_dir" as a directory, including parents if necessary.
as_fn_mkdir_p ()
{

  case $as_dir in #(
  -*) as_dir=./$as_dir;;
  esac
  test -d "$as_dir" || eval $as_mkdir_p || {
    as_dirs=
    while :; do
      case $as_dir in #(
      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
      *) as_qdir=$as_dir;;
      esac
      as_dirs="'$as_qdir' $as_dirs"
      as_dir=`$as_dirname -- "$as_dir" ||
$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
	 X"$as_dir" : 'X\(//\)[^/]' \| \
	 X"$as_dir" : 'X\(//\)$' \| \
	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
$as_echo X"$as_dir" |
    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)[^/].*/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\).*/{
	    s//\1/
	    q
	  }
	  s/.*/./; q'`
      test -d "$as_dir" && break
    done
    test -z "$as_dirs" || eval "mkdir $as_dirs"
  } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"


} # as_fn_mkdir_p
# as_fn_append VAR VALUE
# ----------------------
# Append the text in VALUE to the end of the definition contained in VAR. Take
# advantage of any shell optimizations that allow amortized linear growth over
# repeated appends, instead of the typical quadratic growth present in naive
# implementations.
if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
  eval 'as_fn_append ()
  {
    eval $1+=\$2
  }'
else
  as_fn_append ()
  {
    eval $1=\$$1\$2
  }
fi # as_fn_append

# as_fn_arith ARG...
# ------------------
# Perform arithmetic evaluation on the ARGs, and store the result in the
# global $as_val. Take advantage of shells that can avoid forks. The arguments
# must be portable across $(()) and expr.
if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
  eval 'as_fn_arith ()
  {
    as_val=$(( $* ))
  }'
else
  as_fn_arith ()
  {
    as_val=`expr "$@" || test $? -eq 1`
  }
fi # as_fn_arith


# as_fn_error ERROR [LINENO LOG_FD]
# ---------------------------------
# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
# script with status $?, using 1 if that was 0.
as_fn_error ()
{
  as_status=$?; test $as_status -eq 0 && as_status=1
  if test "$3"; then
    as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
    $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
  fi
  $as_echo "$as_me: error: $1" >&2
  as_fn_exit $as_status
} # as_fn_error

if expr a : '\(a\)' >/dev/null 2>&1 &&
   test "X`expr 00001 : '.*\(...\)'`" = X001; then
  as_expr=expr
else
  as_expr=false
fi

if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
  as_basename=basename
else
  as_basename=false
fi

if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
  as_dirname=dirname
else
  as_dirname=false
fi

as_me=`$as_basename -- "$0" ||
$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
	 X"$0" : 'X\(//\)$' \| \
	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
$as_echo X/"$0" |
    sed '/^.*\/\([^/][^/]*\)\/*$/{
	    s//\1/
	    q
	  }
	  /^X\/\(\/\/\)$/{
	    s//\1/
	    q
	  }
	  /^X\/\(\/\).*/{
	    s//\1/
	    q
	  }
	  s/.*/./; q'`

# 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


  as_lineno_1=$LINENO as_lineno_1a=$LINENO
  as_lineno_2=$LINENO as_lineno_2a=$LINENO
  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
  sed -n '
    p
    /[$]LINENO/=
  ' <$as_myself |
    sed '
      s/[$]LINENO.*/&-/
      t lineno
      b
      :lineno
      N
      :loop
      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
      t loop
      s/-\n.*//
    ' >$as_me.lineno &&
  chmod +x "$as_me.lineno" ||
    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }

  # Don't try to exec as it changes $[0], causing all sort of problems
  # (the dirname of $[0] is not the place where we might find the
  # original and so on.  Autoconf is especially sensitive to this).
  . "./$as_me.lineno"
  # Exit status is that of the last command.
  exit
}

ECHO_C= ECHO_N= ECHO_T=
case `echo -n x` in #(((((
-n*)
  case `echo 'xy\c'` in
  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
  xy)  ECHO_C='\c';;
  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
       ECHO_T='	';;
  esac;;
*)
  ECHO_N='-n';;
esac

rm -f conf$$ conf$$.exe conf$$.file
if test -d conf$$.dir; then
  rm -f conf$$.dir/conf$$.file
else
  rm -f conf$$.dir
  mkdir conf$$.dir 2>/dev/null
fi
if (echo >conf$$.file) 2>/dev/null; then
  if ln -s conf$$.file conf$$ 2>/dev/null; then
    as_ln_s='ln -s'
    # ... but there are two gotchas:
    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
    # In both cases, we have to default to `cp -p'.
    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
      as_ln_s='cp -p'
  elif ln conf$$.file conf$$ 2>/dev/null; then
    as_ln_s=ln
  else
    as_ln_s='cp -p'
  fi
else
  as_ln_s='cp -p'
fi
rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
rmdir conf$$.dir 2>/dev/null

if mkdir -p . 2>/dev/null; then
  as_mkdir_p='mkdir -p "$as_dir"'
else
  test -d ./-p && rmdir ./-p
  as_mkdir_p=false
fi

if test -x / >/dev/null 2>&1; then
  as_test_x='test -x'
else
  if ls -dL / >/dev/null 2>&1; then
    as_ls_L_option=L
  else
    as_ls_L_option=
  fi
  as_test_x='
    eval sh -c '\''
      if test -d "$1"; then
	test -d "$1/.";
      else
	case $1 in #(
	-*)set "./$1";;
	esac;
	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
	???[sx]*):;;*)false;;esac;fi
    '\'' sh
  '
fi
as_executable_p=$as_test_x

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

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


exec 7<&0 </dev/null 6>&1

# 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`

#
# Initializations.
#
ac_default_prefix=/usr/local
ac_clean_files=
ac_config_libobj_dir=.
LIBOBJS=
cross_compiling=no
subdirs=
MFLAGS=
MAKEFLAGS=

# Identity of this package.
PACKAGE_NAME='samba'
PACKAGE_TARNAME='samba'
PACKAGE_VERSION='4'
PACKAGE_STRING='samba 4'
PACKAGE_BUGREPORT='samba-technical@samba.org'
PACKAGE_URL=''

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

ac_subst_vars='LTLIBOBJS
INSTALL_LINK_FLAGS
INTERN_LDFLAGS
ac_default_prefix
UID_WRAPPER_OBJS
HAVE_UID_WRAPPER
NSS_WRAPPER_OBJS
HAVE_NSS_WRAPPER
SOCKET_WRAPPER_OBJS
HAVE_SOCKET_WRAPPER
DEFAULT_TEST_OPTIONS
ldbdir
TEVENT_LIBS
TEVENT_CFLAGS
TEVENT_OBJ
teventdir
TDB_CFLAGS
TDB_LIBS
TDB_OBJ
tdbdir
EXPORTSFILE
TALLOC_LIBS
TALLOC_CFLAGS
TALLOC_OBJ
tallocdir
PKG_CONFIG
HAVE_PERL_EXTUTILS_MAKEMAKER
POPT_OBJ
poptdir
POPT_CFLAGS
POPT_LIBS
YFLAGS
YACC
LEXLIB
LEX_OUTPUT_ROOT
LEX
LIB_dn_expand
LIB_dns_search
LIB_res_ndestroy
LIB_res_nsearch
LIB_res_search
VOID_RETSIGTYPE
LIBDL
LIBOBJS
pythondir
PYTHON_CONFIG
PYTHON
PYTHON_VER
XSLTPROC
automatic_dependencies
GNU_MAKE_VERSION
MAKE
USESHARED
LIB_PATH_VAR
MDLD_FLAGS
LD_SHLIB_ALLOW_UNDEF_FLAG
MDLD
SHLD_FLAGS
LD_SHLIB_DISALLOW_UNDEF_FLAG
LD_SHLIB_FLAGS
SHLD
LD_SHLIB_LINKER
SONAMEFLAG
SHLIBEXT
LD_EXPORT_DYNAMIC
PICFLAG
STLD_FLAGS
STLD
PROG_AR
HOSTLD
SYS_LDFLAGS
LD
BLDSHARED
PROG_LD
GCOV
HOSTCC
CFLAG_NO_UNUSED_MACROS
CFLAG_NO_CAST_QUAL
visibility_attribute
libreplace_cv_immediate_structures
INSTALL_DATA
INSTALL_SCRIPT
INSTALL_PROGRAM
EGREP
GREP
CPP
OBJEXT
EXEEXT
ac_ct_CC
CPPFLAGS
LDFLAGS
CFLAGS
CC
YAPP
PERL
developer
selftest_prefix
modulesdir
ntp_signd_socket_dir
winbindd_privileged_socket_dir
winbindd_socket_dir
privatedir
logfilebase
piddir
lockdir
target_os
target_vendor
target_cpu
target
host_os
host_vendor
host_cpu
host
build_os
build_vendor
build_cpu
build
LIBREPLACEOBJ
libreplacedir
VPATH
builddir
srcdir
target_alias
host_alias
build_alias
LIBS
ECHO_T
ECHO_N
ECHO_C
DEFS
mandir
localedir
libdir
psdir
pdfdir
dvidir
htmldir
infodir
docdir
oldincludedir
includedir
localstatedir
sharedstatedir
sysconfdir
datadir
datarootdir
libexecdir
sbindir
bindir
program_transform_name
prefix
exec_prefix
PACKAGE_URL
PACKAGE_BUGREPORT
PACKAGE_STRING
PACKAGE_VERSION
PACKAGE_TARNAME
PACKAGE_NAME
PATH_SEPARATOR
SHELL'
ac_subst_files=''
ac_user_opts='
enable_option_checking
enable_fhs
with_modulesdir
with_privatedir
with_winbindd_socket_dir
with_winbindd_privileged_socket_dir
with_ntp_signd_socket_dir
with_lockdir
with_piddir
with_logfilebase
with_selftest_prefix
enable_debug
enable_developer
with_disable_ext_lib
enable_largefile
with_hostcc
with_hostld
enable_dso
enable_automatic_dependencies
with_readline
enable_external_heimdal
with_included_popt
with_libiconv
enable_external_libtalloc
enable_external_libtdb
enable_external_libtevent
enable_external_libldb
with_sqlite3
enable_gnutls
enable_netapi
with_pthreads
with_setproctitle
enable_socket_wrapper
enable_nss_wrapper
enable_uid_wrapper
'
      ac_precious_vars='build_alias
host_alias
target_alias
CC
CFLAGS
LDFLAGS
LIBS
CPPFLAGS
CPP
PYTHON_VER
YACC
YFLAGS'


# Initialize some variables set by options.
ac_init_help=
ac_init_version=false
ac_unrecognized_opts=
ac_unrecognized_sep=
# 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.
# (The list follows the same order as the GNU Coding Standards.)
bindir='${exec_prefix}/bin'
sbindir='${exec_prefix}/sbin'
libexecdir='${exec_prefix}/libexec'
datarootdir='${prefix}/share'
datadir='${datarootdir}'
sysconfdir='${prefix}/etc'
sharedstatedir='${prefix}/com'
localstatedir='${prefix}/var'
includedir='${prefix}/include'
oldincludedir='/usr/include'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
infodir='${datarootdir}/info'
htmldir='${docdir}'
dvidir='${docdir}'
pdfdir='${docdir}'
psdir='${docdir}'
libdir='${exec_prefix}/lib'
localedir='${datarootdir}/locale'
mandir='${datarootdir}/man'

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

  case $ac_option in
  *=*)	ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
  *)	ac_optarg=yes ;;
  esac

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

  case $ac_dashdash$ac_option in
  --)
    ac_dashdash=yes ;;

  -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)
    ac_prev=datadir ;;
  -datadir=* | --datadir=* | --datadi=* | --datad=*)
    datadir=$ac_optarg ;;

  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
  | --dataroo | --dataro | --datar)
    ac_prev=datarootdir ;;
  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
    datarootdir=$ac_optarg ;;

  -disable-* | --disable-*)
    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
    # Reject names that are not valid shell variable names.
    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
      as_fn_error "invalid feature name: $ac_useropt"
    ac_useropt_orig=$ac_useropt
    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
    case $ac_user_opts in
      *"
"enable_$ac_useropt"
"*) ;;
      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
	 ac_unrecognized_sep=', ';;
    esac
    eval enable_$ac_useropt=no ;;

  -docdir | --docdir | --docdi | --doc | --do)
    ac_prev=docdir ;;
  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
    docdir=$ac_optarg ;;

  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
    ac_prev=dvidir ;;
  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
    dvidir=$ac_optarg ;;

  -enable-* | --enable-*)
    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
    # Reject names that are not valid shell variable names.
    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
      as_fn_error "invalid feature name: $ac_useropt"
    ac_useropt_orig=$ac_useropt
    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
    case $ac_user_opts in
      *"
"enable_$ac_useropt"
"*) ;;
      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
	 ac_unrecognized_sep=', ';;
    esac
    eval enable_$ac_useropt=\$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 ;;

  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
    ac_prev=htmldir ;;
  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
  | --ht=*)
    htmldir=$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 ;;

  -localedir | --localedir | --localedi | --localed | --locale)
    ac_prev=localedir ;;
  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
    localedir=$ac_optarg ;;

  -localstatedir | --localstatedir | --localstatedi | --localstated \
  | --localstate | --localstat | --localsta | --localst | --locals)
    ac_prev=localstatedir ;;
  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
    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 | -n)
    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 ;;

  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
    ac_prev=pdfdir ;;
  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
    pdfdir=$ac_optarg ;;

  -psdir | --psdir | --psdi | --psd | --ps)
    ac_prev=psdir ;;
  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
    psdir=$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_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
    # Reject names that are not valid shell variable names.
    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
      as_fn_error "invalid package name: $ac_useropt"
    ac_useropt_orig=$ac_useropt
    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
    case $ac_user_opts in
      *"
"with_$ac_useropt"
"*) ;;
      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
	 ac_unrecognized_sep=', ';;
    esac
    eval with_$ac_useropt=\$ac_optarg ;;

  -without-* | --without-*)
    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
    # Reject names that are not valid shell variable names.
    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
      as_fn_error "invalid package name: $ac_useropt"
    ac_useropt_orig=$ac_useropt
    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
    case $ac_user_opts in
      *"
"with_$ac_useropt"
"*) ;;
      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
	 ac_unrecognized_sep=', ';;
    esac
    eval with_$ac_useropt=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 ;;

  -*) as_fn_error "unrecognized option: \`$ac_option'
Try \`$0 --help' for more information."
    ;;

  *=*)
    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
    # Reject names that are not valid shell variable names.
    case $ac_envvar in #(
      '' | [0-9]* | *[!_$as_cr_alnum]* )
      as_fn_error "invalid variable name: \`$ac_envvar'" ;;
    esac
    eval $ac_envvar=\$ac_optarg
    export $ac_envvar ;;

  *)
    # FIXME: should be removed in autoconf 3.0.
    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
      $as_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'`
  as_fn_error "missing argument to $ac_option"
fi

if test -n "$ac_unrecognized_opts"; then
  case $enable_option_checking in
    no) ;;
    fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
  esac
fi

# Check all directory arguments for consistency.
for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
		datadir sysconfdir sharedstatedir localstatedir includedir \
		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
		libdir localedir mandir
do
  eval ac_val=\$$ac_var
  # Remove trailing slashes.
  case $ac_val in
    */ )
      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
      eval $ac_var=\$ac_val;;
  esac
  # Be sure to have absolute directory names.
  case $ac_val in
    [\\/$]* | ?:[\\/]* )  continue;;
    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
  esac
  as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
done

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

# FIXME: To remove some day.
if test "x$host_alias" != x; then
  if test "x$build_alias" = x; then
    cross_compiling=maybe
    $as_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


ac_pwd=`pwd` && test -n "$ac_pwd" &&
ac_ls_di=`ls -di .` &&
ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
  as_fn_error "working directory cannot be determined"
test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
  as_fn_error "pwd does not report name of working directory"


# 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 the parent directory.
  ac_confdir=`$as_dirname -- "$as_myself" ||
$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
	 X"$as_myself" : 'X\(//\)[^/]' \| \
	 X"$as_myself" : 'X\(//\)$' \| \
	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
$as_echo X"$as_myself" |
    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)[^/].*/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\).*/{
	    s//\1/
	    q
	  }
	  s/.*/./; q'`
  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
  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
  as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
fi
ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
ac_abs_confdir=`(
	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
	pwd)`
# When building in place, set srcdir=.
if test "$ac_abs_confdir" = "$ac_pwd"; then
  srcdir=.
fi
# Remove unnecessary trailing slashes from srcdir.
# Double slashes in file names in object file debugging info
# mess up M-x gdb in Emacs.
case $srcdir in
*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
esac
for ac_var in $ac_precious_vars; do
  eval ac_env_${ac_var}_set=\${${ac_var}+set}
  eval ac_env_${ac_var}_value=\$${ac_var}
  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
  eval ac_cv_env_${ac_var}_value=\$${ac_var}
done

#
# 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 <<_ACEOF
\`configure' configures samba 4 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 \`..']

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]
  --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]
  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
  --infodir=DIR           info documentation [DATAROOTDIR/info]
  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
  --mandir=DIR            man documentation [DATAROOTDIR/man]
  --docdir=DIR            documentation root [DATAROOTDIR/doc/samba]
  --htmldir=DIR           html documentation [DOCDIR]
  --dvidir=DIR            dvi documentation [DOCDIR]
  --pdfdir=DIR            pdf documentation [DOCDIR]
  --psdir=DIR             ps documentation [DOCDIR]
_ACEOF

  cat <<\_ACEOF

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

if test -n "$ac_init_help"; then
  case $ac_init_help in
     short | recursive ) echo "Configuration of samba 4:";;
   esac
  cat <<\_ACEOF

Optional Features:
  --disable-option-checking  ignore unrecognized --enable/--with options
  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
  --enable-fhs            Use FHS-compliant paths (default=no)
  --enable-debug          Turn on compiler debugging information (default=no)
  --enable-developer      Turn on developer warnings and debugging
                          (default=no)
  --disable-largefile     omit support for large files
  --enable-dso 	          Enable using shared libraries internally (experimental)
  --enable-automatic-dependencies Enable automatic dependencies
  --enable-external-heimdal Enable external heimdal libraries (experimental,default=no)
  --enable-external-libtalloc
                          Use external LIBTALLOC instead of built-in
                          (default=auto)
  --enable-external-libtdb
                          Use external LIBTDB instead of built-in
                          (default=auto)
  --enable-external-libtevent
                          Use external LIBTEVENT instead of built-in
                          (default=auto)
  --enable-external-libldb
                          Use external LIBLDB instead of built-in
                          (default=auto)
  --enable-gnutls         Turn on gnutls support (default=yes)
  --enable-netapi         Turn on netapi support (default=auto)
  --enable-socket-wrapper Turn on socket wrapper library (default=no)
  --enable-nss-wrapper    Turn on nss wrapper library (default=no)
  --enable-uid-wrapper    Turn on uid wrapper library (default=no)

Optional Packages:
  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
  --with-modulesdir=DIR   Where to put dynamically loadable modules
                          ($modulesdir)
  --with-privatedir=DIR   Where to put sam.ldb and other private files
                          containing key material ($ac_default_prefix/private)
  --with-winbindd-socket-dir=DIR
                          Where to put the winbindd socket
                          ($winbindd_socket_dir)
  --with-winbindd-privileged-socket-dir=DIR
                          Where to put the winbindd socket
                          ($winbindd_privileged_socket_dir)
  --with-ntp-signd-socket-dir=DIR
                          Where to put the NTP signing deamon socket
                          ($ac_default_prefix/run/ntp_signd)
  --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-logfilebase=DIR  Where to put log files (\$(VARDIR))
  --with-selftest-prefix=DIR
                          The prefix where make test will be run
                          ($selftest_prefix)
  --with-disable-ext-lib=LIB
                          Comma-seperated list of external libraries
  --with-hostcc=compiler  choose host compiler
  --with-hostld=linker    choose host linker
  --with-readline=DIR     Look for readline include/libs in DIR (default=auto)
  --with-included-popt    use bundled popt library, not from system
  --with-libiconv=BASEDIR Use libiconv in BASEDIR/lib and BASEDIR/include (default=auto)
  --with-sqlite3          SQLITE3 backend support (default=no)
  --with-pthreads         Include pthreads (default=no)
  --with-setproctitle     Search for setproctitle support (default=no)

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>
  LIBS        libraries to pass to the linker, e.g. -l<library>
  CPPFLAGS    C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
              you have headers in a nonstandard directory <include dir>
  CPP         C preprocessor
  PYTHON_VER  The installed Python version to use, for example '2.3'. This
              string will be appended to the Python interpreter canonical
              name.
  YACC        The `Yet Another C Compiler' implementation to use. Defaults to
              the first program found out of: `bison -y', `byacc', `yacc'.
  YFLAGS      The list of arguments that will be passed by default to $YACC.
              This script will default YFLAGS to the empty string to avoid a
              default value of `-d' given by some make applications.

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

Report bugs to <samba-technical@samba.org>.
_ACEOF
ac_status=$?
fi

if test "$ac_init_help" = "recursive"; then
  # If there are subdirs, report their specific --help.
  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
    test -d "$ac_dir" ||
      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
      continue
    ac_builddir=.

case "$ac_dir" in
.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
*)
  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
  # A ".." for each directory in $ac_dir_suffix.
  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
  case $ac_top_builddir_sub in
  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
  esac ;;
esac
ac_abs_top_builddir=$ac_pwd
ac_abs_builddir=$ac_pwd$ac_dir_suffix
# for backward compatibility:
ac_top_builddir=$ac_top_build_prefix

case $srcdir in
  .)  # We are building in place.
    ac_srcdir=.
    ac_top_srcdir=$ac_top_builddir_sub
    ac_abs_top_srcdir=$ac_pwd ;;
  [\\/]* | ?:[\\/]* )  # Absolute name.
    ac_srcdir=$srcdir$ac_dir_suffix;
    ac_top_srcdir=$srcdir
    ac_abs_top_srcdir=$srcdir ;;
  *) # Relative name.
    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
    ac_top_srcdir=$ac_top_build_prefix$srcdir
    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
esac
ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix

    cd "$ac_dir" || { ac_status=$?; continue; }
    # Check for guested configure.
    if test -f "$ac_srcdir/configure.gnu"; then
      echo &&
      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
    elif test -f "$ac_srcdir/configure"; then
      echo &&
      $SHELL "$ac_srcdir/configure" --help=recursive
    else
      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
    fi || ac_status=$?
    cd "$ac_pwd" || { ac_status=$?; break; }
  done
fi

test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
  cat <<\_ACEOF
samba configure 4
generated by GNU Autoconf 2.64

Copyright (C) 2009 Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it.
_ACEOF
  exit
fi

## ------------------------ ##
## Autoconf initialization. ##
## ------------------------ ##

# ac_fn_c_try_compile LINENO
# --------------------------
# Try to compile conftest.$ac_ext, and return whether this succeeded.
ac_fn_c_try_compile ()
{
  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  rm -f conftest.$ac_objext
  if { { ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
  (eval "$ac_compile") 2>conftest.err
  ac_status=$?
  if test -s conftest.err; then
    grep -v '^ *+' conftest.err >conftest.er1
    cat conftest.er1 >&5
    mv -f conftest.er1 conftest.err
  fi
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest.$ac_objext; then :
  ac_retval=0
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_retval=1
fi
  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
  return $ac_retval

} # ac_fn_c_try_compile

# ac_fn_c_try_cpp LINENO
# ----------------------
# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
ac_fn_c_try_cpp ()
{
  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  if { { ac_try="$ac_cpp conftest.$ac_ext"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
  ac_status=$?
  if test -s conftest.err; then
    grep -v '^ *+' conftest.err >conftest.er1
    cat conftest.er1 >&5
    mv -f conftest.er1 conftest.err
  fi
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; } >/dev/null && {
	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
	 test ! -s conftest.err
       }; then :
  ac_retval=0
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

    ac_retval=1
fi
  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
  return $ac_retval

} # ac_fn_c_try_cpp

# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
# -------------------------------------------------------
# Tests whether HEADER exists, giving a warning if it cannot be compiled using
# the include files in INCLUDES and setting the cache variable VAR
# accordingly.
ac_fn_c_check_header_mongrel ()
{
  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
$as_echo_n "checking for $2... " >&6; }
if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
  $as_echo_n "(cached) " >&6
fi
eval ac_res=\$$3
	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
else
  # Is the header compilable?
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
$as_echo_n "checking $2 usability... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$4
#include <$2>
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  ac_header_compiler=yes
else
  ac_header_compiler=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
$as_echo "$ac_header_compiler" >&6; }

# Is the header present?
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
$as_echo_n "checking $2 presence... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <$2>
_ACEOF
if ac_fn_c_try_cpp "$LINENO"; then :
  ac_header_preproc=yes
else
  ac_header_preproc=no
fi
rm -f conftest.err conftest.$ac_ext
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
$as_echo "$ac_header_preproc" >&6; }

# So?  What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
  yes:no: )
    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
    ;;
  no:yes:* )
    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
( cat <<\_ASBOX
## ---------------------------------------- ##
## Report this to samba-technical@samba.org ##
## ---------------------------------------- ##
_ASBOX
     ) | sed "s/^/$as_me: WARNING:     /" >&2
    ;;
esac
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
$as_echo_n "checking for $2... " >&6; }
if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
  $as_echo_n "(cached) " >&6
else
  eval "$3=\$ac_header_compiler"
fi
eval ac_res=\$$3
	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
fi
  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}

} # ac_fn_c_check_header_mongrel

# ac_fn_c_try_run LINENO
# ----------------------
# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
# that executables *can* be run.
ac_fn_c_try_run ()
{
  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  if { { ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
  (eval "$ac_link") 2>&5
  ac_status=$?
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
  { { case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; }; then :
  ac_retval=0
else
  $as_echo "$as_me: program exited with status $ac_status" >&5
       $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

       ac_retval=$ac_status
fi
  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
  return $ac_retval

} # ac_fn_c_try_run

# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
# -------------------------------------------------------
# Tests whether HEADER exists and can be compiled using the include files in
# INCLUDES, setting the cache variable VAR accordingly.
ac_fn_c_check_header_compile ()
{
  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
$as_echo_n "checking for $2... " >&6; }
if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$4
#include <$2>
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  eval "$3=yes"
else
  eval "$3=no"
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
eval ac_res=\$$3
	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}

} # ac_fn_c_check_header_compile

# ac_fn_c_try_link LINENO
# -----------------------
# Try to link conftest.$ac_ext, and return whether this succeeded.
ac_fn_c_try_link ()
{
  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  rm -f conftest.$ac_objext conftest$ac_exeext
  if { { ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
  (eval "$ac_link") 2>conftest.err
  ac_status=$?
  if test -s conftest.err; then
    grep -v '^ *+' conftest.err >conftest.er1
    cat conftest.er1 >&5
    mv -f conftest.er1 conftest.err
  fi
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then :
  ac_retval=0
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_retval=1
fi
  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
  # interfere with the next link command; also delete a directory that is
  # left behind by Apple's compiler.  We do this before executing the actions.
  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
  return $ac_retval

} # ac_fn_c_try_link

# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
# -------------------------------------------
# Tests whether TYPE exists after having included INCLUDES, setting cache
# variable VAR accordingly.
ac_fn_c_check_type ()
{
  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
$as_echo_n "checking for $2... " >&6; }
if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
  $as_echo_n "(cached) " >&6
else
  eval "$3=no"
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$4
int
main ()
{
if (sizeof ($2))
	 return 0;
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$4
int
main ()
{
if (sizeof (($2)))
	    return 0;
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :

else
  eval "$3=yes"
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
eval ac_res=\$$3
	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}

} # ac_fn_c_check_type

# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
# --------------------------------------------
# Tries to find the compile-time value of EXPR in a program that includes
# INCLUDES, setting VAR accordingly. Returns whether the value could be
# computed
ac_fn_c_compute_int ()
{
  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  if test "$cross_compiling" = yes; then
    # Depending upon the size, compute the lo and hi bounds.
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$4
int
main ()
{
static int test_array [1 - 2 * !(($2) >= 0)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  ac_lo=0 ac_mid=0
  while :; do
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$4
int
main ()
{
static int test_array [1 - 2 * !(($2) <= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  ac_hi=$ac_mid; break
else
  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
			if test $ac_lo -le $ac_mid; then
			  ac_lo= ac_hi=
			  break
			fi
			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  done
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$4
int
main ()
{
static int test_array [1 - 2 * !(($2) < 0)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  ac_hi=-1 ac_mid=-1
  while :; do
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$4
int
main ()
{
static int test_array [1 - 2 * !(($2) >= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  ac_lo=$ac_mid; break
else
  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
			if test $ac_mid -le $ac_hi; then
			  ac_lo= ac_hi=
			  break
			fi
			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  done
else
  ac_lo= ac_hi=
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
# Binary search between lo and hi bounds.
while test "x$ac_lo" != "x$ac_hi"; do
  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$4
int
main ()
{
static int test_array [1 - 2 * !(($2) <= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  ac_hi=$ac_mid
else
  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
done
case $ac_lo in #((
?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
'') ac_retval=1 ;;
esac
  else
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$4
static long int longval () { return $2; }
static unsigned long int ulongval () { return $2; }
#include <stdio.h>
#include <stdlib.h>
int
main ()
{

  FILE *f = fopen ("conftest.val", "w");
  if (! f)
    return 1;
  if (($2) < 0)
    {
      long int i = longval ();
      if (i != ($2))
	return 1;
      fprintf (f, "%ld", i);
    }
  else
    {
      unsigned long int i = ulongval ();
      if (i != ($2))
	return 1;
      fprintf (f, "%lu", i);
    }
  /* Do not output a trailing newline, as this causes \r\n confusion
     on some platforms.  */
  return ferror (f) || fclose (f) != 0;

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
else
  ac_retval=1
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext
rm -f conftest.val

  fi
  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
  return $ac_retval

} # ac_fn_c_compute_int

# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
# ----------------------------------------------------
# Tries to find if the field MEMBER exists in type AGGR, after including
# INCLUDES, setting cache variable VAR accordingly.
ac_fn_c_check_member ()
{
  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
$as_echo_n "checking for $2.$3... " >&6; }
if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$5
int
main ()
{
static $2 ac_aggr;
if (ac_aggr.$3)
return 0;
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  eval "$4=yes"
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$5
int
main ()
{
static $2 ac_aggr;
if (sizeof ac_aggr.$3)
return 0;
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  eval "$4=yes"
else
  eval "$4=no"
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
eval ac_res=\$$4
	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}

} # ac_fn_c_check_member

# ac_fn_c_check_func LINENO FUNC VAR
# ----------------------------------
# Tests whether FUNC exists, setting the cache variable VAR accordingly
ac_fn_c_check_func ()
{
  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
$as_echo_n "checking for $2... " >&6; }
if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
#define $2 innocuous_$2

/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $2 (); below.
    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
    <limits.h> exists even on freestanding compilers.  */

#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif

#undef $2

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char $2 ();
/* 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_$2 || defined __stub___$2
choke me
#endif

int
main ()
{
return $2 ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  eval "$3=yes"
else
  eval "$3=no"
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
eval ac_res=\$$3
	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}

} # ac_fn_c_check_func

# ac_fn_c_check_decl LINENO SYMBOL VAR
# ------------------------------------
# Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
ac_fn_c_check_decl ()
{
  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $2 is declared" >&5
$as_echo_n "checking whether $2 is declared... " >&6; }
if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$4
int
main ()
{
#ifndef $2
  (void) $2;
#endif

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  eval "$3=yes"
else
  eval "$3=no"
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
eval ac_res=\$$3
	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}

} # ac_fn_c_check_decl
cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by samba $as_me 4, which was
generated by GNU Autoconf 2.64.  Invocation command line was

  $ $0 $@

_ACEOF
exec 5>>config.log
{
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`
/usr/bin/hostinfo      = `(/usr/bin/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`

_ASUNAME

as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    $as_echo "PATH: $as_dir"
  done
IFS=$as_save_IFS

} >&5

cat >&5 <<_ACEOF


## ----------- ##
## Core tests. ##
## ----------- ##

_ACEOF


# Keep a trace of the command line.
# Strip out --no-create and --no-recursion so they do not pile up.
# Strip out --silent because we don't want to record it for future runs.
# Also quote any args containing shell meta-characters.
# Make two passes to allow for proper duplicate-argument suppression.
ac_configure_args=
ac_configure_args0=
ac_configure_args1=
ac_must_keep_next=false
for ac_pass in 1 2
do
  for ac_arg
  do
    case $ac_arg in
    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
    | -silent | --silent | --silen | --sile | --sil)
      continue ;;
    *\'*)
      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
    esac
    case $ac_pass in
    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
    2)
      as_fn_append ac_configure_args1 " '$ac_arg'"
      if test $ac_must_keep_next = true; then
	ac_must_keep_next=false # Got value, back to normal.
      else
	case $ac_arg in
	  *=* | --config-cache | -C | -disable-* | --disable-* \
	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
	  | -with-* | --with-* | -without-* | --without-* | --x)
	    case "$ac_configure_args0 " in
	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
	    esac
	    ;;
	  -* ) ac_must_keep_next=true ;;
	esac
      fi
      as_fn_append ac_configure_args " '$ac_arg'"
      ;;
    esac
  done
done
{ ac_configure_args0=; unset ac_configure_args0;}
{ ac_configure_args1=; unset ac_configure_args1;}

# 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.
# WARNING: Use '\'' to represent an apostrophe within the trap.
# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
trap 'exit_status=$?
  # Save into config.log some information that might help in debugging.
  {
    echo

    cat <<\_ASBOX
## ---------------- ##
## Cache variables. ##
## ---------------- ##
_ASBOX
    echo
    # The following way of writing the cache mishandles newlines in values,
(
  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
    eval ac_val=\$$ac_var
    case $ac_val in #(
    *${as_nl}*)
      case $ac_var in #(
      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
      esac
      case $ac_var in #(
      _ | IFS | as_nl) ;; #(
      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
      *) { eval $ac_var=; unset $ac_var;} ;;
      esac ;;
    esac
  done
  (set) 2>&1 |
    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
    *${as_nl}ac_space=\ *)
      sed -n \
	"s/'\''/'\''\\\\'\'''\''/g;
	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
      ;; #(
    *)
      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
      ;;
    esac |
    sort
)
    echo

    cat <<\_ASBOX
## ----------------- ##
## Output variables. ##
## ----------------- ##
_ASBOX
    echo
    for ac_var in $ac_subst_vars
    do
      eval ac_val=\$$ac_var
      case $ac_val in
      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
      esac
      $as_echo "$ac_var='\''$ac_val'\''"
    done | sort
    echo

    if test -n "$ac_subst_files"; then
      cat <<\_ASBOX
## ------------------- ##
## File substitutions. ##
## ------------------- ##
_ASBOX
      echo
      for ac_var in $ac_subst_files
      do
	eval ac_val=\$$ac_var
	case $ac_val in
	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
	esac
	$as_echo "$ac_var='\''$ac_val'\''"
      done | sort
      echo
    fi

    if test -s confdefs.h; then
      cat <<\_ASBOX
## ----------- ##
## confdefs.h. ##
## ----------- ##
_ASBOX
      echo
      cat confdefs.h
      echo
    fi
    test "$ac_signal" != 0 &&
      $as_echo "$as_me: caught signal $ac_signal"
    $as_echo "$as_me: exit $exit_status"
  } >&5
  rm -f core *.core core.conftest.* &&
    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
    exit $exit_status
' 0
for ac_signal in 1 2 13 15; do
  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
done
ac_signal=0

# confdefs.h avoids OS command line length limits that DEFS can exceed.
rm -f -r conftest* confdefs.h

$as_echo "/* confdefs.h */" > confdefs.h

# Predefined preprocessor variables.

cat >>confdefs.h <<_ACEOF
#define PACKAGE_NAME "$PACKAGE_NAME"
_ACEOF

cat >>confdefs.h <<_ACEOF
#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
_ACEOF

cat >>confdefs.h <<_ACEOF
#define PACKAGE_VERSION "$PACKAGE_VERSION"
_ACEOF

cat >>confdefs.h <<_ACEOF
#define PACKAGE_STRING "$PACKAGE_STRING"
_ACEOF

cat >>confdefs.h <<_ACEOF
#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
_ACEOF

cat >>confdefs.h <<_ACEOF
#define PACKAGE_URL "$PACKAGE_URL"
_ACEOF


# Let the site file select an alternate cache file if it wants to.
# Prefer an explicitly selected file to automatically selected ones.
ac_site_file1=NONE
ac_site_file2=NONE
if test -n "$CONFIG_SITE"; then
  ac_site_file1=$CONFIG_SITE
elif test "x$prefix" != xNONE; then
  ac_site_file1=$prefix/share/config.site
  ac_site_file2=$prefix/etc/config.site
else
  ac_site_file1=$ac_default_prefix/share/config.site
  ac_site_file2=$ac_default_prefix/etc/config.site
fi
for ac_site_file in "$ac_site_file1" "$ac_site_file2"
do
  test "x$ac_site_file" = xNONE && continue
  if test -r "$ac_site_file"; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
$as_echo "$as_me: loading site script $ac_site_file" >&6;}
    sed 's/^/| /' "$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
    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
$as_echo "$as_me: loading cache $cache_file" >&6;}
    case $cache_file in
      [\\/]* | ?:[\\/]* ) . "$cache_file";;
      *)                      . "./$cache_file";;
    esac
  fi
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
$as_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 $ac_precious_vars; 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,)
      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
      ac_cache_corrupted=: ;;
    ,set)
      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
$as_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
	# differences in whitespace do not lead to failure.
	ac_old_val_w=`echo x $ac_old_val`
	ac_new_val_w=`echo x $ac_new_val`
	if test "$ac_old_val_w" != "$ac_new_val_w"; then
	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
	  ac_cache_corrupted=:
	else
	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
	  eval $ac_var=\$ac_old_val
	fi
	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
      fi;;
  esac
  # Pass precious variables to config.status.
  if test "$ac_new_set" = set; then
    case $ac_new_val in
    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
    *) ac_arg=$ac_var=$ac_new_val ;;
    esac
    case " $ac_configure_args " in
      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
    esac
  fi
done
if $ac_cache_corrupted; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
  as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
fi
## -------------------- ##
## Main body of script. ##
## -------------------- ##

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_config_headers="$ac_config_headers include/config_tmp.h"


$as_echo "#define CONFIG_H_IS_FROM_SAMBA 1" >>confdefs.h


# Configuration rules.


export srcdir;

# we always set builddir to "." as that's nicer than
# having the absolute path of the current work directory
builddir=.

export builddir;




VPATH="\$(builddir):\$(srcdir)"

SMB_VERSION_STRING=`cat ${srcdir}/version.h | grep 'SAMBA_VERSION_OFFICIAL_STRING' | cut -d '"' -f2`
echo "SAMBA VERSION: ${SMB_VERSION_STRING}"

SAMBA_VERSION_GIT_COMMIT_FULLREV=`cat ${srcdir}/version.h | grep 'SAMBA_VERSION_GIT_COMMIT_FULLREV' | cut -d ' ' -f3- | cut -d '"' -f2`
if test -n "${SAMBA_VERSION_GIT_COMMIT_FULLREV}";then
	echo "BUILD COMMIT REVISION: ${SAMBA_VERSION_GIT_COMMIT_FULLREV}"
fi
SAMBA_VERSION_GIT_COMMIT_DATE=`cat ${srcdir}/version.h | grep 'SAMBA_VERSION_GIT_COMMIT_DATE' | cut -d ' ' -f3-`
if test -n "${SAMBA_VERSION_GIT_COMMIT_DATE}";then
	echo "BUILD COMMIT DATE: ${SAMBA_VERSION_GIT_COMMIT_DATE}"
fi
SAMBA_VERSION_GIT_COMMIT_TIME=`cat ${srcdir}/version.h | grep 'SAMBA_VERSION_GIT_COMMIT_TIME' | cut -d ' ' -f3-`
if test -n "${SAMBA_VERSION_GIT_COMMIT_TIME}";then
	echo "BUILD COMMIT TIME: ${SAMBA_VERSION_GIT_COMMIT_TIME}"

	# just to keep the build-farm gui happy for now...
	echo "BUILD REVISION: ${SAMBA_VERSION_GIT_COMMIT_TIME}"
fi


ac_aux_dir=
for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
  for ac_t in install-sh install.sh shtool; do
    if test -f "$ac_dir/$ac_t"; then
      ac_aux_dir=$ac_dir
      ac_install_sh="$ac_aux_dir/$ac_t -c"
      break 2
    fi
  done
done
if test -z "$ac_aux_dir"; then
  as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
fi

# These three variables are undocumented and unsupported,
# and are intended to be withdrawn in a future Autoconf release.
# They can cause serious problems if a builder's source tree is in a directory
# whose full name contains unusual characters.
ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.


# Make sure we can run config.sub.
$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
  as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
$as_echo_n "checking build system type... " >&6; }
if test "${ac_cv_build+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  ac_build_alias=$build_alias
test "x$ac_build_alias" = x &&
  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
test "x$ac_build_alias" = x &&
  as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
  as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
$as_echo "$ac_cv_build" >&6; }
case $ac_cv_build in
*-*-*) ;;
*) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
esac
build=$ac_cv_build
ac_save_IFS=$IFS; IFS='-'
set x $ac_cv_build
shift
build_cpu=$1
build_vendor=$2
shift; shift
# Remember, the first character of IFS is used to create $*,
# except with old shells:
build_os=$*
IFS=$ac_save_IFS
case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
$as_echo_n "checking host system type... " >&6; }
if test "${ac_cv_host+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  if test "x$host_alias" = x; then
  ac_cv_host=$ac_cv_build
else
  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
    as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
fi

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
$as_echo "$ac_cv_host" >&6; }
case $ac_cv_host in
*-*-*) ;;
*) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
esac
host=$ac_cv_host
ac_save_IFS=$IFS; IFS='-'
set x $ac_cv_host
shift
host_cpu=$1
host_vendor=$2
shift; shift
# Remember, the first character of IFS is used to create $*,
# except with old shells:
host_os=$*
IFS=$ac_save_IFS
case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
$as_echo_n "checking target system type... " >&6; }
if test "${ac_cv_target+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  if test "x$target_alias" = x; then
  ac_cv_target=$ac_cv_host
else
  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
    as_fn_error "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
fi

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
$as_echo "$ac_cv_target" >&6; }
case $ac_cv_target in
*-*-*) ;;
*) as_fn_error "invalid value of canonical target" "$LINENO" 5;;
esac
target=$ac_cv_target
ac_save_IFS=$IFS; IFS='-'
set x $ac_cv_target
shift
target_cpu=$1
target_vendor=$2
shift; shift
# Remember, the first character of IFS is used to create $*,
# except with old shells:
target_os=$*
IFS=$ac_save_IFS
case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac


# 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}-

echo "LIBREPLACE_LOCATION_CHECKS: START"

libreplacedir=""
libreplacepaths="$srcdir $srcdir/lib/replace $srcdir/libreplace $srcdir/../libreplace $srcdir/../replace $srcdir/../lib/replace $srcdir/../../../lib/replace"
for d in $libreplacepaths; do
	if test -f "$d/replace.c"; then
		libreplacedir="$d"

		break;
	fi
done
if test x"$libreplacedir" = "x"; then
	as_fn_error "cannot find libreplace in $libreplacepaths" "$LINENO" 5
fi
LIBREPLACEOBJ="replace.o"






echo "LIBREPLACE_LOCATION_CHECKS: END"


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


# Defaults and --without-fhs
logfilebase="${localstatedir}"
lockdir="${localstatedir}/locks"
piddir="${localstatedir}/run"
privatedir="\${prefix}/private"
modulesdir="\${prefix}/modules"
winbindd_socket_dir="${localstatedir}/run/winbindd"
winbindd_privileged_socket_dir="${localstatedir}/lib/winbindd_privileged"
ntp_signd_socket_dir="${localstatedir}/run/ntp_signd"

# Check whether --enable-fhs was given.
if test "${enable_fhs+set}" = set; then :
  enableval=$enable_fhs; fhs=$enableval
else
  fhs=no

fi


if test x$fhs = xyes; then
    lockdir="${localstatedir}/lib/samba"
    piddir="${localstatedir}/run/samba"
    logfilebase="${localstatedir}/log/samba"
    privatedir="${localstatedir}/lib/samba/private"
    sysconfdir="${sysconfdir}/samba"
    modulesdir="${libdir}/samba"
    datadir="${datadir}/samba"
    includedir="${includedir}/samba-4.0"
    ntp_signd_socket_dir="${localstatedir}/run/samba/ntp_signd"
    winbindd_socket_dir="${localstatedir}/run/samba/winbindd"
    winbindd_privileged_socket_dir="${localstatedir}/lib/samba/winbindd_privileged"
else
	# Check to prevent installing directly under /usr without the FHS
	if test $prefix = /usr || test $prefix = /usr/local; then :

		as_fn_error "Don't install directly under \"/usr\" or \"/usr/local\" without using the FHS option (--enable-fhs). This could lead to file loss!" "$LINENO" 5

fi
fi

#################################################
# set modules directory location

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


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

# Check whether --with-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
  #
    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-privatedir called without argument - will use default" >&5
$as_echo "$as_me: WARNING: --with-privatedir called without argument - will use default" >&2;}
  ;;
  * )
    privatedir="$withval"
    ;;
  esac
fi


#################################################
# set where the winbindd socket should be put

# Check whether --with-winbindd-socket-dir was given.
if test "${with_winbindd_socket_dir+set}" = set; then :
  withval=$with_winbindd_socket_dir;  case "$withval" in
  yes|no)
  #
  # Just in case anybody calls it without argument
  #
    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-winbind-socketdir called without argument - will use default" >&5
$as_echo "$as_me: WARNING: --with-winbind-socketdir called without argument - will use default" >&2;}
  ;;
  * )
    winbindd_socket_dir="$withval"
    ;;
  esac
fi


#################################################
# set where the winbindd privilaged socket should be put

# Check whether --with-winbindd-privileged-socket-dir was given.
if test "${with_winbindd_privileged_socket_dir+set}" = set; then :
  withval=$with_winbindd_privileged_socket_dir;  case "$withval" in
  yes|no)
  #
  # Just in case anybody calls it without argument
  #
    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-winbind-privileged-socketdir called without argument - will use default" >&5
$as_echo "$as_me: WARNING: --with-winbind-privileged-socketdir called without argument - will use default" >&2;}
  ;;
  * )
    winbindd_privileged_socket_dir="$withval"
    ;;
  esac
fi


#################################################
# set where the NTP signing deamon socket should be put

# Check whether --with-ntp-signd-socket-dir was given.
if test "${with_ntp_signd_socket_dir+set}" = set; then :
  withval=$with_ntp_signd_socket_dir;  case "$withval" in
  yes|no)
  #
  # Just in case anybody calls it without argument
  #
    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ntp-signd-socketdir called without argument - will use default" >&5
$as_echo "$as_me: WARNING: --with-ntp-signd-socketdir called without argument - will use default" >&2;}
  ;;
  * )
    ntp_signd_socket_dir="$withval"
    ;;
  esac
fi


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

# Check whether --with-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
  #
    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-lockdir called without argument - will use default" >&5
$as_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 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
  #
    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-piddir called without argument - will use default" >&5
$as_echo "$as_me: WARNING: --with-piddir called without argument - will use default" >&2;}
  ;;
  * )
    piddir="$withval"
    ;;
  esac
fi


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

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














#################################################
# set prefix for 'make test'
# this is needed to workarround the 108 char
# unix socket path limitation!
#
selftest_prefix="./st"


# Check whether --with-selftest-prefix was given.
if test "${with_selftest_prefix+set}" = set; then :
  withval=$with_selftest_prefix;  case "$withval" in
  yes|no)
    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-selftest-prefix called without argument - will use default" >&5
$as_echo "$as_me: WARNING: --with-selftest-prefix called without argument - will use default" >&2;}
  ;;
  * )
    selftest_prefix="$withval"
    ;;
  esac
fi


debug=no
# Check whether --enable-debug was given.
if test "${enable_debug+set}" = set; then :
  enableval=$enable_debug; if test x$enable_debug = xyes; then
        debug=yes
    fi
fi


developer=no

# Check whether --enable-developer was given.
if test "${enable_developer+set}" = set; then :
  enableval=$enable_developer; if test x$enable_developer = xyes; then
	debug=yes
        developer=yes
    fi
fi



# Check whether --with-disable-ext-lib was given.
if test "${with_disable_ext_lib+set}" = set; then :
  withval=$with_disable_ext_lib;  if test $withval; then
	for i in `echo $withval | sed -e's/,/ /g'`
	do
		eval SMB_$i=NO
	done
fi
fi








case "$host_os" in
	*irix*)
		# On IRIX, we prefer Freeware or Nekoware Perl, because the
		# system perl is so ancient.
		# Extract the first word of "perl", so it can be a program name with args.
set dummy perl; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_PERL+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  case $PERL in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
as_dummy=""/usr/freeware/bin:/usr/nekoware/bin:$PATH""
for as_dir in $as_dummy
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  test -z "$ac_cv_path_PERL" && ac_cv_path_PERL=""""
  ;;
esac
fi
PERL=$ac_cv_path_PERL
if test -n "$PERL"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
$as_echo "$PERL" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


		;;
	*)
		# Extract the first word of "perl", so it can be a program name with args.
set dummy perl; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_PERL+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  case $PERL in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  ;;
esac
fi
PERL=$ac_cv_path_PERL
if test -n "$PERL"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
$as_echo "$PERL" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


		;;
esac

if test x"$PERL" = x""; then
	{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No version of perl was found!" >&5
$as_echo "$as_me: WARNING: No version of perl was found!" >&2;}
	as_fn_error "Please install perl from http://www.perl.com/" "$LINENO" 5
else
	if test x"$debug" = x"yes";then
		PERL="$PERL -W"
	fi
	export PERL

fi


# Extract the first word of "yapp", so it can be a program name with args.
set dummy yapp; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_YAPP+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  case $YAPP in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_YAPP="$YAPP" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_path_YAPP="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  test -z "$ac_cv_path_YAPP" && ac_cv_path_YAPP="false"
  ;;
esac
fi
YAPP=$ac_cv_path_YAPP
if test -n "$YAPP"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YAPP" >&5
$as_echo "$YAPP" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi






echo "LIBREPLACE_CC_CHECKS: START"


ac_cv_prog_cc_Ae=no

savedCFLAGS=$CFLAGS
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
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_CC+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  if test -n "$CC"; then
  ac_cv_prog_CC="$CC" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_CC="${ac_tool_prefix}gcc"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
$as_echo "$CC" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "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
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
  $as_echo_n "(cached) " >&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
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_ac_ct_CC="gcc"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

fi
fi
ac_ct_CC=$ac_cv_prog_ac_ct_CC
if test -n "$ac_ct_CC"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
$as_echo "$ac_ct_CC" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi

  if test "x$ac_ct_CC" = x; then
    CC=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    CC=$ac_ct_CC
  fi
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
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_CC+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  if test -n "$CC"; then
  ac_cv_prog_CC="$CC" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_CC="${ac_tool_prefix}cc"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
$as_echo "$CC" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


  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
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_CC+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  if test -n "$CC"; then
  ac_cv_prog_CC="$CC" # Let the user override the test.
else
  ac_prog_rejected=no
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
       ac_prog_rejected=yes
       continue
     fi
    ac_cv_prog_CC="cc"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

if test $ac_prog_rejected = yes; then
  # We found a bogon in the path, so make sure we never use it.
  set dummy $ac_cv_prog_CC
  shift
  if test $# != 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
    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
  fi
fi
fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
$as_echo "$CC" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


fi
if test -z "$CC"; then
  if test -n "$ac_tool_prefix"; then
  for ac_prog in cl.exe
  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
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_CC+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  if test -n "$CC"; then
  ac_cv_prog_CC="$CC" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
$as_echo "$CC" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


    test -n "$CC" && break
  done
fi
if test -z "$CC"; then
  ac_ct_CC=$CC
  for ac_prog in cl.exe
do
  # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
  $as_echo_n "(cached) " >&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
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_ac_ct_CC="$ac_prog"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

fi
fi
ac_ct_CC=$ac_cv_prog_ac_ct_CC
if test -n "$ac_ct_CC"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
$as_echo "$ac_ct_CC" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


  test -n "$ac_ct_CC" && break
done

  if test "x$ac_ct_CC" = x; then
    CC=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    CC=$ac_ct_CC
  fi
fi

fi


test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error "no acceptable C compiler found in \$PATH
See \`config.log' for more details." "$LINENO" 5; }

# Provide some information about the compiler.
$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
set X $ac_compile
ac_compiler=$2
for ac_option in --version -v -V -qversion; do
  { { ac_try="$ac_compiler $ac_option >&5"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
  ac_status=$?
  if test -s conftest.err; then
    sed '10a\
... rest of stderr output deleted ...
         10q' conftest.err >conftest.er1
    cat conftest.er1 >&5
    rm -f conftest.er1 conftest.err
  fi
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }
done

cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <stdio.h>
int
main ()
{
FILE *f = fopen ("conftest.out", "w");
 return ferror (f) || fclose (f) != 0;

  ;
  return 0;
}
_ACEOF
ac_clean_files_save=$ac_clean_files
ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out"
# 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.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
$as_echo_n "checking for C compiler default output file name... " >&6; }
ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`

# The possible output files:
ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"

ac_rmfiles=
for ac_file in $ac_files
do
  case $ac_file in
    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
  esac
done
rm -f $ac_rmfiles

if { { ac_try="$ac_link_default"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
  (eval "$ac_link_default") 2>&5
  ac_status=$?
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then :
  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
# in a Makefile.  We should not override ac_cv_exeext if it was cached,
# so that the user can short-circuit this test for compilers unknown to
# Autoconf.
for ac_file in $ac_files ''
do
  test -f "$ac_file" || continue
  case $ac_file in
    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
	;;
    [ab].out )
	# We found the default executable, but exeext='' is most
	# certainly right.
	break;;
    *.* )
	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
	then :; else
	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
	fi
	# We set ac_cv_exeext here because the later test for it is not
	# safe: cross compilers may not add the suffix if given an `-o'
	# argument, so we may need to know it at that point already.
	# Even if this section looks crufty: it has the advantage of
	# actually working.
	break;;
    * )
	break;;
  esac
done
test "$ac_cv_exeext" = no && ac_cv_exeext=

else
  ac_file=''
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
$as_echo "$ac_file" >&6; }
if test -z "$ac_file"; then :
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
{ as_fn_set_status 77
as_fn_error "C compiler cannot create executables
See \`config.log' for more details." "$LINENO" 5; }; }
fi
ac_exeext=$ac_cv_exeext

# Check that the compiler produces executables we can run.  If not, either
# the compiler is broken, or we cross compile.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
$as_echo_n "checking whether the C compiler works... " >&6; }
# If not cross compiling, check that we can run a simple program.
if test "$cross_compiling" != yes; then
  if { ac_try='./$ac_file'
  { { case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; }; then
    cross_compiling=no
  else
    if test "$cross_compiling" = maybe; then
	cross_compiling=yes
    else
	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error "cannot run C compiled programs.
If you meant to cross compile, use \`--host'.
See \`config.log' for more details." "$LINENO" 5; }
    fi
  fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }

rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out
ac_clean_files=$ac_clean_files_save
# Check that the compiler produces executables we can run.  If not, either
# the compiler is broken, or we cross compile.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
$as_echo_n "checking whether we are cross compiling... " >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
$as_echo "$cross_compiling" >&6; }

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
$as_echo_n "checking for suffix of executables... " >&6; }
if { { ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
  (eval "$ac_link") 2>&5
  ac_status=$?
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; 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 conftest.exe conftest conftest.*; do
  test -f "$ac_file" || continue
  case $ac_file in
    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
	  break;;
    * ) break;;
  esac
done
else
  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error "cannot compute suffix of executables: cannot compile and link
See \`config.log' for more details." "$LINENO" 5; }
fi
rm -f conftest$ac_cv_exeext
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
$as_echo "$ac_cv_exeext" >&6; }

rm -f conftest.$ac_ext
EXEEXT=$ac_cv_exeext
ac_exeext=$EXEEXT
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
$as_echo_n "checking for suffix of object files... " >&6; }
if test "${ac_cv_objext+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.o conftest.obj
if { { ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
  (eval "$ac_compile") 2>&5
  ac_status=$?
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then :
  for ac_file in conftest.o conftest.obj conftest.*; do
  test -f "$ac_file" || continue;
  case $ac_file in
    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
       break;;
  esac
done
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error "cannot compute suffix of object files: cannot compile
See \`config.log' for more details." "$LINENO" 5; }
fi
rm -f conftest.$ac_cv_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
$as_echo "$ac_cv_objext" >&6; }
OBJEXT=$ac_cv_objext
ac_objext=$OBJEXT
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
if test "${ac_cv_c_compiler_gnu+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

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

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  ac_compiler_gnu=yes
else
  ac_compiler_gnu=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ac_cv_c_compiler_gnu=$ac_compiler_gnu

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
$as_echo "$ac_cv_c_compiler_gnu" >&6; }
if test $ac_compiler_gnu = yes; then
  GCC=yes
else
  GCC=
fi
ac_test_CFLAGS=${CFLAGS+set}
ac_save_CFLAGS=$CFLAGS
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
$as_echo_n "checking whether $CC accepts -g... " >&6; }
if test "${ac_cv_prog_cc_g+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  ac_save_c_werror_flag=$ac_c_werror_flag
   ac_c_werror_flag=yes
   ac_cv_prog_cc_g=no
   CFLAGS="-g"
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  ac_cv_prog_cc_g=yes
else
  CFLAGS=""
      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :

else
  ac_c_werror_flag=$ac_save_c_werror_flag
	 CFLAGS="-g"
	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  ac_cv_prog_cc_g=yes
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
   ac_c_werror_flag=$ac_save_c_werror_flag
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
$as_echo "$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
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
if test "${ac_cv_prog_cc_c89+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  ac_cv_prog_cc_c89=no
ac_save_CC=$CC
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end 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;
}

/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
   function prototypes and stuff, but not '\xHH' hex character constants.
   These don't provoke an error unfortunately, instead are silently treated
   as 'x'.  The following induces an error, until -std is added to get
   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
   array size at least.  It's necessary to write '\x00'==0 to get something
   that's true only with -std.  */
int osf4_cc_array ['\x00' == 0 ? 1 : -1];

/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
   inside strings and character constants.  */
#define FOO(x) 'x'
int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];

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
for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
do
  CC="$ac_save_CC $ac_arg"
  if ac_fn_c_try_compile "$LINENO"; then :
  ac_cv_prog_cc_c89=$ac_arg
fi
rm -f core conftest.err conftest.$ac_objext
  test "x$ac_cv_prog_cc_c89" != "xno" && break
done
rm -f conftest.$ac_ext
CC=$ac_save_CC

fi
# AC_CACHE_VAL
case "x$ac_cv_prog_cc_c89" in
  x)
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
$as_echo "none needed" >&6; } ;;
  xno)
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
$as_echo "unsupported" >&6; } ;;
  *)
    CC="$CC $ac_cv_prog_cc_c89"
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
esac
if test "x$ac_cv_prog_cc_c89" != xno; then :

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

CFLAGS=$savedCFLAGS

if test x"$GCC" != x"yes" ; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
$as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
if test "${ac_cv_prog_cc_c99+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  ac_cv_prog_cc_c99=no
ac_save_CC=$CC
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <stdarg.h>
#include <stdbool.h>
#include <stdlib.h>
#include <wchar.h>
#include <stdio.h>

// Check varargs macros.  These examples are taken from C99 6.10.3.5.
#define debug(...) fprintf (stderr, __VA_ARGS__)
#define showlist(...) puts (#__VA_ARGS__)
#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
static void
test_varargs_macros (void)
{
  int x = 1234;
  int y = 5678;
  debug ("Flag");
  debug ("X = %d\n", x);
  showlist (The first, second, and third items.);
  report (x>y, "x is %d but y is %d", x, y);
}

// Check long long types.
#define BIG64 18446744073709551615ull
#define BIG32 4294967295ul
#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
#if !BIG_OK
  your preprocessor is broken;
#endif
#if BIG_OK
#else
  your preprocessor is broken;
#endif
static long long int bignum = -9223372036854775807LL;
static unsigned long long int ubignum = BIG64;

struct incomplete_array
{
  int datasize;
  double data[];
};

struct named_init {
  int number;
  const wchar_t *name;
  double average;
};

typedef const char *ccp;

static inline int
test_restrict (ccp restrict text)
{
  // See if C++-style comments work.
  // Iterate through items via the restricted pointer.
  // Also check for declarations in for loops.
  for (unsigned int i = 0; *(text+i) != '\0'; ++i)
    continue;
  return 0;
}

// Check varargs and va_copy.
static void
test_varargs (const char *format, ...)
{
  va_list args;
  va_start (args, format);
  va_list args_copy;
  va_copy (args_copy, args);

  const char *str;
  int number;
  float fnumber;

  while (*format)
    {
      switch (*format++)
	{
	case 's': // string
	  str = va_arg (args_copy, const char *);
	  break;
	case 'd': // int
	  number = va_arg (args_copy, int);
	  break;
	case 'f': // float
	  fnumber = va_arg (args_copy, double);
	  break;
	default:
	  break;
	}
    }
  va_end (args_copy);
  va_end (args);
}

int
main ()
{

  // Check bool.
  _Bool success = false;

  // Check restrict.
  if (test_restrict ("String literal") == 0)
    success = true;
  char *restrict newvar = "Another string";

  // Check varargs.
  test_varargs ("s, d' f .", "string", 65, 34.234);
  test_varargs_macros ();

  // Check flexible array members.
  struct incomplete_array *ia =
    malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
  ia->datasize = 10;
  for (int i = 0; i < ia->datasize; ++i)
    ia->data[i] = i * 1.234;

  // Check named initializers.
  struct named_init ni = {
    .number = 34,
    .name = L"Test wide string",
    .average = 543.34343,
  };

  ni.number = 58;

  int dynamic_array[ni.number];
  dynamic_array[ni.number - 1] = 543;

  // work around unused variable warnings
  return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
	  || dynamic_array[ni.number - 1] != 543);

  ;
  return 0;
}
_ACEOF
for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -xc99=all -qlanglvl=extc99
do
  CC="$ac_save_CC $ac_arg"
  if ac_fn_c_try_compile "$LINENO"; then :
  ac_cv_prog_cc_c99=$ac_arg
fi
rm -f core conftest.err conftest.$ac_objext
  test "x$ac_cv_prog_cc_c99" != "xno" && break
done
rm -f conftest.$ac_ext
CC=$ac_save_CC

fi
# AC_CACHE_VAL
case "x$ac_cv_prog_cc_c99" in
  x)
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
$as_echo "none needed" >&6; } ;;
  xno)
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
$as_echo "unsupported" >&6; } ;;
  *)
    CC="$CC $ac_cv_prog_cc_c99"
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
$as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
esac
if test "x$ac_cv_prog_cc_c99" != xno; then :

fi


fi

if test x"$GCC" = x"yes" ; then
	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for version of gcc" >&5
$as_echo_n "checking for version of gcc... " >&6; }
	GCC_VERSION=`$CC -dumpversion`
	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${GCC_VERSION}" >&5
$as_echo "${GCC_VERSION}" >&6; }
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
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
$as_echo_n "checking how to run the C preprocessor... " >&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 :
  $as_echo_n "(cached) " >&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.
  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
  # <limits.h> exists even on freestanding compilers.
  # 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 confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif
		     Syntax error
_ACEOF
if ac_fn_c_try_cpp "$LINENO"; then :

else
  # Broken: fails on valid input.
continue
fi
rm -f conftest.err conftest.$ac_ext

  # OK, works on sane cases.  Now check whether nonexistent headers
  # can be detected and how.
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <ac_nonexistent.h>
_ACEOF
if ac_fn_c_try_cpp "$LINENO"; then :
  # Broken: success on invalid input.
continue
else
  # 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
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
$as_echo "$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.
  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
  # <limits.h> exists even on freestanding compilers.
  # 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 confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif
		     Syntax error
_ACEOF
if ac_fn_c_try_cpp "$LINENO"; then :

else
  # Broken: fails on valid input.
continue
fi
rm -f conftest.err conftest.$ac_ext

  # OK, works on sane cases.  Now check whether nonexistent headers
  # can be detected and how.
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <ac_nonexistent.h>
_ACEOF
if ac_fn_c_try_cpp "$LINENO"; then :
  # Broken: success on invalid input.
continue
else
  # 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
  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error "C preprocessor \"$CPP\" fails sanity check
See \`config.log' for more details." "$LINENO" 5; }
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


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
if test "${ac_cv_path_GREP+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  if test -z "$GREP"; then
  ac_path_GREP_found=false
  # Loop through the user's path and test for each of PROGNAME-LIST
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_prog in grep ggrep; do
    for ac_exec_ext in '' $ac_executable_extensions; do
      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
      { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
# Check for GNU ac_path_GREP and select it if it is found.
  # Check for GNU $ac_path_GREP
case `"$ac_path_GREP" --version 2>&1` in
*GNU*)
  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
*)
  ac_count=0
  $as_echo_n 0123456789 >"conftest.in"
  while :
  do
    cat "conftest.in" "conftest.in" >"conftest.tmp"
    mv "conftest.tmp" "conftest.in"
    cp "conftest.in" "conftest.nl"
    $as_echo 'GREP' >> "conftest.nl"
    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
    as_fn_arith $ac_count + 1 && ac_count=$as_val
    if test $ac_count -gt ${ac_path_GREP_max-0}; then
      # Best one so far, save it but keep looking for a better one
      ac_cv_path_GREP="$ac_path_GREP"
      ac_path_GREP_max=$ac_count
    fi
    # 10*(2^10) chars as input seems more than enough
    test $ac_count -gt 10 && break
  done
  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
esac

      $ac_path_GREP_found && break 3
    done
  done
  done
IFS=$as_save_IFS
  if test -z "$ac_cv_path_GREP"; then
    as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
  fi
else
  ac_cv_path_GREP=$GREP
fi

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
$as_echo "$ac_cv_path_GREP" >&6; }
 GREP="$ac_cv_path_GREP"


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
$as_echo_n "checking for egrep... " >&6; }
if test "${ac_cv_path_EGREP+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
   then ac_cv_path_EGREP="$GREP -E"
   else
     if test -z "$EGREP"; then
  ac_path_EGREP_found=false
  # Loop through the user's path and test for each of PROGNAME-LIST
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_prog in egrep; do
    for ac_exec_ext in '' $ac_executable_extensions; do
      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
      { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
# Check for GNU ac_path_EGREP and select it if it is found.
  # Check for GNU $ac_path_EGREP
case `"$ac_path_EGREP" --version 2>&1` in
*GNU*)
  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
*)
  ac_count=0
  $as_echo_n 0123456789 >"conftest.in"
  while :
  do
    cat "conftest.in" "conftest.in" >"conftest.tmp"
    mv "conftest.tmp" "conftest.in"
    cp "conftest.in" "conftest.nl"
    $as_echo 'EGREP' >> "conftest.nl"
    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
    as_fn_arith $ac_count + 1 && ac_count=$as_val
    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
      # Best one so far, save it but keep looking for a better one
      ac_cv_path_EGREP="$ac_path_EGREP"
      ac_path_EGREP_max=$ac_count
    fi
    # 10*(2^10) chars as input seems more than enough
    test $ac_count -gt 10 && break
  done
  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
esac

      $ac_path_EGREP_found && break 3
    done
  done
  done
IFS=$as_save_IFS
  if test -z "$ac_cv_path_EGREP"; then
    as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
  fi
else
  ac_cv_path_EGREP=$EGREP
fi

   fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
$as_echo "$ac_cv_path_EGREP" >&6; }
 EGREP="$ac_cv_path_EGREP"


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
$as_echo_n "checking for ANSI C header files... " >&6; }
if test "${ac_cv_header_stdc+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <float.h>

int
main ()
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  ac_cv_header_stdc=yes
else
  ac_cv_header_stdc=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext

if test $ac_cv_header_stdc = yes; then
  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end 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 confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end 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 confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <ctype.h>
#include <stdlib.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))
      return 2;
  return 0;
}
_ACEOF
if ac_fn_c_try_run "$LINENO"; then :

else
  ac_cv_header_stdc=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext
fi

fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
$as_echo "$ac_cv_header_stdc" >&6; }
if test $ac_cv_header_stdc = yes; then

$as_echo "#define STDC_HEADERS 1" >>confdefs.h

fi

# 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=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
"
eval as_val=\$$as_ac_Header
   if test "x$as_val" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF

fi

done



  ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
if test "x$ac_cv_header_minix_config_h" = x""yes; then :
  MINIX=yes
else
  MINIX=
fi


  if test "$MINIX" = yes; then

$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h


$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h


$as_echo "#define _MINIX 1" >>confdefs.h

  fi


  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#	  define __EXTENSIONS__ 1
	  $ac_includes_default
int
main ()
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  ac_cv_safe_to_define___extensions__=yes
else
  ac_cv_safe_to_define___extensions__=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
  test $ac_cv_safe_to_define___extensions__ = yes &&
    $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h

  $as_echo "#define _ALL_SOURCE 1" >>confdefs.h

  $as_echo "#define _GNU_SOURCE 1" >>confdefs.h

  $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h

  $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h


 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
if test "${ac_cv_c_bigendian+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  ac_cv_c_bigendian=unknown
    # See if we're dealing with a universal compiler.
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#ifndef __APPLE_CC__
	       not a universal capable compiler
	     #endif
	     typedef int dummy;

_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :

	# Check for potential -arch flags.  It is not universal unless
	# there are at least two -arch flags with different values.
	ac_arch=
	ac_prev=
	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
	 if test -n "$ac_prev"; then
	   case $ac_word in
	     i?86 | x86_64 | ppc | ppc64)
	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
		 ac_arch=$ac_word
	       else
		 ac_cv_c_bigendian=universal
		 break
	       fi
	       ;;
	   esac
	   ac_prev=
	 elif test "x$ac_word" = "x-arch"; then
	   ac_prev=arch
	 fi
       done
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
    if test $ac_cv_c_bigendian = unknown; then
      # See if sys/param.h defines the BYTE_ORDER macro.
      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <sys/types.h>
	     #include <sys/param.h>

int
main ()
{
#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
		     && LITTLE_ENDIAN)
	      bogus endian macros
	     #endif

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  # It does; now see whether it defined to BIG_ENDIAN or not.
	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <sys/types.h>
		#include <sys/param.h>

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

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  ac_cv_c_bigendian=yes
else
  ac_cv_c_bigendian=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
    fi
    if test $ac_cv_c_bigendian = unknown; then
      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <limits.h>

int
main ()
{
#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
	      bogus endian macros
	     #endif

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  # It does; now see whether it defined to _BIG_ENDIAN or not.
	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <limits.h>

int
main ()
{
#ifndef _BIG_ENDIAN
		 not big endian
		#endif

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  ac_cv_c_bigendian=yes
else
  ac_cv_c_bigendian=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
    fi
    if test $ac_cv_c_bigendian = unknown; then
      # Compile a test program.
      if test "$cross_compiling" = yes; then :
  # Try to guess by grepping values from an object file.
	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
short int ascii_mm[] =
		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
		short int ascii_ii[] =
		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
		int use_ascii (int i) {
		  return ascii_mm[i] + ascii_ii[i];
		}
		short int ebcdic_ii[] =
		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
		short int ebcdic_mm[] =
		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
		int use_ebcdic (int i) {
		  return ebcdic_mm[i] + ebcdic_ii[i];
		}
		extern int foo;

int
main ()
{
return use_ascii (foo) == use_ebcdic (foo);
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
	      ac_cv_c_bigendian=yes
	    fi
	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
	      if test "$ac_cv_c_bigendian" = unknown; then
		ac_cv_c_bigendian=no
	      else
		# finding both strings is unlikely to happen, but who knows?
		ac_cv_c_bigendian=unknown
	      fi
	    fi
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{

	     /* Are we little or big endian?  From Harbison&Steele.  */
	     union
	     {
	       long int l;
	       char c[sizeof (long int)];
	     } u;
	     u.l = 1;
	     return u.c[sizeof (long int) - 1] == 1;

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
  ac_cv_c_bigendian=no
else
  ac_cv_c_bigendian=yes
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext
fi

    fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
$as_echo "$ac_cv_c_bigendian" >&6; }
 case $ac_cv_c_bigendian in #(
   yes)
     $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
;; #(
   no)
      ;; #(
   universal)

$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h

     ;; #(
   *)
     as_fn_error "unknown endianness
 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
 esac

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
$as_echo_n "checking for inline... " >&6; }
if test "${ac_cv_c_inline+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  ac_cv_c_inline=no
for ac_kw in inline __inline__ __inline; do
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#ifndef __cplusplus
typedef int foo_t;
static $ac_kw foo_t static_foo () {return 0; }
$ac_kw foo_t foo () {return 0; }
#endif

_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  ac_cv_c_inline=$ac_kw
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  test "$ac_cv_c_inline" != no && break
done

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
$as_echo "$ac_cv_c_inline" >&6; }

case $ac_cv_c_inline in
  inline | yes) ;;
  *)
    case $ac_cv_c_inline in
      no) ac_val=;;
      *) ac_val=$ac_cv_c_inline;;
    esac
    cat >>confdefs.h <<_ACEOF
#ifndef __cplusplus
#define inline $ac_val
#endif
_ACEOF
    ;;
esac


saved_CFLAGS="$CFLAGS";
c99_init=no
if test x"$c99_init" = x"no"; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C99 designated initializers" >&5
$as_echo_n "checking for C99 designated initializers... " >&6; }
    CFLAGS="$saved_CFLAGS";
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <stdio.h>
int
main ()
{
 struct foo {int x;char y;};
       struct foo bar = { .y = 'X', .x = 1 };

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }; c99_init=yes
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
if test x"$c99_init" = x"no"; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C99 designated initializers with -AC99" >&5
$as_echo_n "checking for C99 designated initializers with -AC99... " >&6; }
    CFLAGS="$saved_CFLAGS -AC99";
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <stdio.h>
int
main ()
{
 struct foo {int x;char y;};
       struct foo bar = { .y = 'X', .x = 1 };

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }; c99_init=yes
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
if test x"$c99_init" = x"no"; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C99 designated initializers with -qlanglvl=extc99" >&5
$as_echo_n "checking for C99 designated initializers with -qlanglvl=extc99... " >&6; }
    CFLAGS="$saved_CFLAGS -qlanglvl=extc99";
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <stdio.h>
int
main ()
{
 struct foo {int x;char y;};
       struct foo bar = { .y = 'X', .x = 1 };

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }; c99_init=yes
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
if test x"$c99_init" = x"no"; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C99 designated initializers with -qlanglvl=stdc99" >&5
$as_echo_n "checking for C99 designated initializers with -qlanglvl=stdc99... " >&6; }
    CFLAGS="$saved_CFLAGS -qlanglvl=stdc99";
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <stdio.h>
int
main ()
{
 struct foo {int x;char y;};
       struct foo bar = { .y = 'X', .x = 1 };

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }; c99_init=yes
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
if test x"$c99_init" = x"no"; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C99 designated initializers with -c99" >&5
$as_echo_n "checking for C99 designated initializers with -c99... " >&6; }
    CFLAGS="$saved_CFLAGS -c99"
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <stdio.h>
int
main ()
{
 struct foo {int x;char y;};
       struct foo bar = { .y = 'X', .x = 1 };

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }; c99_init=yes
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi

if test "`uname`" = "HP-UX"; then
  if test "$ac_cv_c_compiler_gnu" = no; then
	# special override for broken HP-UX compiler - I can't find a way to test
	# this properly (its a compiler bug)
	CFLAGS="$CFLAGS -AC99";
	c99_init=yes;
  fi
fi

if test x"$c99_init" = x"yes"; then
    saved_CFLAGS=""

else
    CFLAGS="$saved_CFLAGS"
    saved_CFLAGS=""
    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: c99 structure initializer are not supported" >&5
$as_echo "$as_me: WARNING: c99 structure initializer are not supported" >&2;}
fi


# 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"
# OS/2's system install, which has a completely different semantic
# ./install, which can be erroneously created by make from ./install.sh.
# Reject install programs that cannot install multiple files.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
$as_echo_n "checking for a BSD-compatible install... " >&6; }
if test -z "$INSTALL"; then
if test "${ac_cv_path_install+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    # Account for people who put trailing slashes in PATH elements.
case $as_dir/ in #((
  ./ | .// | /[cC]/* | \
  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
  ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
  /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
      for ac_exec_ext in '' $ac_executable_extensions; do
	if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
	  if test $ac_prog = install &&
	    grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
	    # AIX install.  It has an incompatible calling convention.
	    :
	  elif test $ac_prog = install &&
	    grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
	    # program-specific install script used by HP pwplus--don't use.
	    :
	  else
	    rm -rf conftest.one conftest.two conftest.dir
	    echo one > conftest.one
	    echo two > conftest.two
	    mkdir conftest.dir
	    if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
	      test -s conftest.one && test -s conftest.two &&
	      test -s conftest.dir/conftest.one &&
	      test -s conftest.dir/conftest.two
	    then
	      ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
	      break 3
	    fi
	  fi
	fi
      done
    done
    ;;
esac

  done
IFS=$as_save_IFS

rm -rf conftest.one conftest.two conftest.dir

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.  Don't cache a
    # value for INSTALL within a source directory, because that will
    # break other packages using the cache if that directory is
    # removed, or if the value is a relative name.
    INSTALL=$ac_install_sh
  fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
$as_echo "$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'


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing strerror" >&5
$as_echo_n "checking for library containing strerror... " >&6; }
if test "${ac_cv_search_strerror+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char strerror ();
int
main ()
{
return strerror ();
  ;
  return 0;
}
_ACEOF
for ac_lib in '' cposix; do
  if test -z "$ac_lib"; then
    ac_res="none required"
  else
    ac_res=-l$ac_lib
    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
  fi
  if ac_fn_c_try_link "$LINENO"; then :
  ac_cv_search_strerror=$ac_res
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext
  if test "${ac_cv_search_strerror+set}" = set; then :
  break
fi
done
if test "${ac_cv_search_strerror+set}" = set; then :

else
  ac_cv_search_strerror=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_strerror" >&5
$as_echo "$ac_cv_search_strerror" >&6; }
ac_res=$ac_cv_search_strerror
if test "$ac_res" != no; then :
  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"

fi




 cat >>confdefs.h <<\EOF
#ifndef _XOPEN_SOURCE_EXTENDED
#define _XOPEN_SOURCE_EXTENDED 1
#endif
EOF


# Check whether --enable-largefile was given.
if test "${enable_largefile+set}" = set; then :
  enableval=$enable_largefile;
fi

if test "$enable_largefile" != no; then

  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
if test "${ac_cv_sys_largefile_CC+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  ac_cv_sys_largefile_CC=no
     if test "$GCC" != yes; then
       ac_save_CC=$CC
       while :; do
	 # IRIX 6.2 and later do not support large files by default,
	 # so use the C compiler's -n32 option if that helps.
	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <sys/types.h>
 /* Check that off_t can represent 2**63 - 1 correctly.
    We can't simply define LARGE_OFF_T to be 9223372036854775807,
    since some C++ compilers masquerading as C compilers
    incorrectly reject 9223372036854775807.  */
#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
		       && LARGE_OFF_T % 2147483647 == 1)
		      ? 1 : -1];
int
main ()
{

  ;
  return 0;
}
_ACEOF
	 if ac_fn_c_try_compile "$LINENO"; then :
  break
fi
rm -f core conftest.err conftest.$ac_objext
	 CC="$CC -n32"
	 if ac_fn_c_try_compile "$LINENO"; then :
  ac_cv_sys_largefile_CC=' -n32'; break
fi
rm -f core conftest.err conftest.$ac_objext
	 break
       done
       CC=$ac_save_CC
       rm -f conftest.$ac_ext
    fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
$as_echo "$ac_cv_sys_largefile_CC" >&6; }
  if test "$ac_cv_sys_largefile_CC" != no; then
    CC=$CC$ac_cv_sys_largefile_CC
  fi

  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
if test "${ac_cv_sys_file_offset_bits+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  while :; do
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <sys/types.h>
 /* Check that off_t can represent 2**63 - 1 correctly.
    We can't simply define LARGE_OFF_T to be 9223372036854775807,
    since some C++ compilers masquerading as C compilers
    incorrectly reject 9223372036854775807.  */
#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
		       && LARGE_OFF_T % 2147483647 == 1)
		      ? 1 : -1];
int
main ()
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  ac_cv_sys_file_offset_bits=no; break
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#define _FILE_OFFSET_BITS 64
#include <sys/types.h>
 /* Check that off_t can represent 2**63 - 1 correctly.
    We can't simply define LARGE_OFF_T to be 9223372036854775807,
    since some C++ compilers masquerading as C compilers
    incorrectly reject 9223372036854775807.  */
#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
		       && LARGE_OFF_T % 2147483647 == 1)
		      ? 1 : -1];
int
main ()
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  ac_cv_sys_file_offset_bits=64; break
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  ac_cv_sys_file_offset_bits=unknown
  break
done
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
case $ac_cv_sys_file_offset_bits in #(
  no | unknown) ;;
  *)
cat >>confdefs.h <<_ACEOF
#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
_ACEOF
;;
esac
rm -rf conftest*
  if test $ac_cv_sys_file_offset_bits = unknown; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
if test "${ac_cv_sys_large_files+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  while :; do
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <sys/types.h>
 /* Check that off_t can represent 2**63 - 1 correctly.
    We can't simply define LARGE_OFF_T to be 9223372036854775807,
    since some C++ compilers masquerading as C compilers
    incorrectly reject 9223372036854775807.  */
#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
		       && LARGE_OFF_T % 2147483647 == 1)
		      ? 1 : -1];
int
main ()
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  ac_cv_sys_large_files=no; break
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#define _LARGE_FILES 1
#include <sys/types.h>
 /* Check that off_t can represent 2**63 - 1 correctly.
    We can't simply define LARGE_OFF_T to be 9223372036854775807,
    since some C++ compilers masquerading as C compilers
    incorrectly reject 9223372036854775807.  */
#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
		       && LARGE_OFF_T % 2147483647 == 1)
		      ? 1 : -1];
int
main ()
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  ac_cv_sys_large_files=1; break
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  ac_cv_sys_large_files=unknown
  break
done
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
$as_echo "$ac_cv_sys_large_files" >&6; }
case $ac_cv_sys_large_files in #(
  no | unknown) ;;
  *)
cat >>confdefs.h <<_ACEOF
#define _LARGE_FILES $ac_cv_sys_large_files
_ACEOF
;;
esac
rm -rf conftest*
  fi
fi


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

		;;
	*hpux*)
		# mmap on HPUX is completely broken...

$as_echo "#define MMAP_BLACKLIST 1" >>confdefs.h

		if test "`uname -r`" = "B.11.00" -o "`uname -r`" = "B.11.11"; then
			{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Enabling HPUX 11.00/11.11 header bug workaround" >&5
$as_echo "$as_me: WARNING: Enabling HPUX 11.00/11.11 header bug workaround" >&2;}
			CFLAGS="$CFLAGS -Dpread=pread64 -Dpwrite=pwrite64"
		fi
		if test "`uname -r`" = "B.11.23"; then
			{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Enabling HPUX 11.23 machine/sys/getppdp.h bug workaround" >&5
$as_echo "$as_me: WARNING: Enabling HPUX 11.23 machine/sys/getppdp.h bug workaround" >&2;}
			CFLAGS="$CFLAGS -D_MACHINE_SYS_GETPPDP_INCLUDED"
		fi
		;;
	*aix*)

$as_echo "#define BROKEN_STRNDUP 1" >>confdefs.h


$as_echo "#define BROKEN_STRNLEN 1" >>confdefs.h

		if test "${GCC}" != "yes"; then
			## for funky AIX compiler using strncpy()
			CFLAGS="$CFLAGS -D_LINUX_SOURCE_COMPAT -qmaxmem=32000"
		fi
		;;
	*osf*)
		# this brings in socklen_t



 cat >>confdefs.h <<\EOF
#ifndef _XOPEN_SOURCE
#define _XOPEN_SOURCE 600
#endif
EOF




 cat >>confdefs.h <<\EOF
#ifndef _OSF_SOURCE
#define _OSF_SOURCE 1
#endif
EOF

		;;
	#
	# VOS may need to have POSIX support and System V compatibility enabled.
	#
	*vos*)
		case "$CFLAGS" in
			*-D_POSIX_C_SOURCE*);;
			*)
				CFLAGS="$CFLAGS -D_POSIX_C_SOURCE=200112L"

$as_echo "#define _POSIX_C_SOURCE 200112L" >>confdefs.h

				;;
		esac
		case "$CFLAGS" in
			*-D_SYSV*|*-D_SVID_SOURCE*);;
			*)
				CFLAGS="$CFLAGS -D_SYSV"

$as_echo "#define _SYSV 1" >>confdefs.h

				;;
		esac
		;;
esac



for ac_header in standards.h
do :
  ac_fn_c_check_header_mongrel "$LINENO" "standards.h" "ac_cv_header_standards_h" "$ac_includes_default"
if test "x$ac_cv_header_standards_h" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_STANDARDS_H 1
_ACEOF

fi

done


# Solaris needs HAVE_LONG_LONG defined
ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default"
if test "x$ac_cv_type_long_long" = x""yes; then :

cat >>confdefs.h <<_ACEOF
#define HAVE_LONG_LONG 1
_ACEOF


fi


# The cast to long int works around a bug in the HP C Compiler
# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
# This bug is HP SR number 8606223364.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
$as_echo_n "checking size of int... " >&6; }
if test "${ac_cv_sizeof_int+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int"        "$ac_includes_default"; then :

else
  if test "$ac_cv_type_int" = yes; then
     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
{ as_fn_set_status 77
as_fn_error "cannot compute sizeof (int)
See \`config.log' for more details." "$LINENO" 5; }; }
   else
     ac_cv_sizeof_int=0
   fi
fi

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
$as_echo "$ac_cv_sizeof_int" >&6; }



cat >>confdefs.h <<_ACEOF
#define SIZEOF_INT $ac_cv_sizeof_int
_ACEOF


# The cast to long int works around a bug in the HP C Compiler
# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
# This bug is HP SR number 8606223364.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of char" >&5
$as_echo_n "checking size of char... " >&6; }
if test "${ac_cv_sizeof_char+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (char))" "ac_cv_sizeof_char"        "$ac_includes_default"; then :

else
  if test "$ac_cv_type_char" = yes; then
     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
{ as_fn_set_status 77
as_fn_error "cannot compute sizeof (char)
See \`config.log' for more details." "$LINENO" 5; }; }
   else
     ac_cv_sizeof_char=0
   fi
fi

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_char" >&5
$as_echo "$ac_cv_sizeof_char" >&6; }



cat >>confdefs.h <<_ACEOF
#define SIZEOF_CHAR $ac_cv_sizeof_char
_ACEOF


# The cast to long int works around a bug in the HP C Compiler
# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
# This bug is HP SR number 8606223364.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
$as_echo_n "checking size of short... " >&6; }
if test "${ac_cv_sizeof_short+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short"        "$ac_includes_default"; then :

else
  if test "$ac_cv_type_short" = yes; then
     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
{ as_fn_set_status 77
as_fn_error "cannot compute sizeof (short)
See \`config.log' for more details." "$LINENO" 5; }; }
   else
     ac_cv_sizeof_short=0
   fi
fi

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
$as_echo "$ac_cv_sizeof_short" >&6; }



cat >>confdefs.h <<_ACEOF
#define SIZEOF_SHORT $ac_cv_sizeof_short
_ACEOF


# The cast to long int works around a bug in the HP C Compiler
# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
# This bug is HP SR number 8606223364.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
$as_echo_n "checking size of long... " >&6; }
if test "${ac_cv_sizeof_long+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long"        "$ac_includes_default"; then :

else
  if test "$ac_cv_type_long" = yes; then
     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
{ as_fn_set_status 77
as_fn_error "cannot compute sizeof (long)
See \`config.log' for more details." "$LINENO" 5; }; }
   else
     ac_cv_sizeof_long=0
   fi
fi

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
$as_echo "$ac_cv_sizeof_long" >&6; }



cat >>confdefs.h <<_ACEOF
#define SIZEOF_LONG $ac_cv_sizeof_long
_ACEOF


# The cast to long int works around a bug in the HP C Compiler
# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
# This bug is HP SR number 8606223364.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
$as_echo_n "checking size of long long... " >&6; }
if test "${ac_cv_sizeof_long_long+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long"        "$ac_includes_default"; then :

else
  if test "$ac_cv_type_long_long" = yes; then
     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
{ as_fn_set_status 77
as_fn_error "cannot compute sizeof (long long)
See \`config.log' for more details." "$LINENO" 5; }; }
   else
     ac_cv_sizeof_long_long=0
   fi
fi

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
$as_echo "$ac_cv_sizeof_long_long" >&6; }



cat >>confdefs.h <<_ACEOF
#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
_ACEOF



ac_fn_c_check_type "$LINENO" "uint_t" "ac_cv_type_uint_t" "$ac_includes_default"
if test "x$ac_cv_type_uint_t" = x""yes; then :

else

cat >>confdefs.h <<_ACEOF
#define uint_t unsigned int
_ACEOF

fi

ac_fn_c_check_type "$LINENO" "int8_t" "ac_cv_type_int8_t" "$ac_includes_default"
if test "x$ac_cv_type_int8_t" = x""yes; then :

else

cat >>confdefs.h <<_ACEOF
#define int8_t char
_ACEOF

fi

ac_fn_c_check_type "$LINENO" "uint8_t" "ac_cv_type_uint8_t" "$ac_includes_default"
if test "x$ac_cv_type_uint8_t" = x""yes; then :

else

cat >>confdefs.h <<_ACEOF
#define uint8_t unsigned char
_ACEOF

fi

ac_fn_c_check_type "$LINENO" "int16_t" "ac_cv_type_int16_t" "$ac_includes_default"
if test "x$ac_cv_type_int16_t" = x""yes; then :

else

cat >>confdefs.h <<_ACEOF
#define int16_t short
_ACEOF

fi

ac_fn_c_check_type "$LINENO" "uint16_t" "ac_cv_type_uint16_t" "$ac_includes_default"
if test "x$ac_cv_type_uint16_t" = x""yes; then :

else

cat >>confdefs.h <<_ACEOF
#define uint16_t unsigned short
_ACEOF

fi


if test $ac_cv_sizeof_int -eq 4 ; then
ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
if test "x$ac_cv_type_int32_t" = x""yes; then :

else

cat >>confdefs.h <<_ACEOF
#define int32_t int
_ACEOF

fi

ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
if test "x$ac_cv_type_uint32_t" = x""yes; then :

else

cat >>confdefs.h <<_ACEOF
#define uint32_t unsigned int
_ACEOF

fi

elif test $ac_cv_size_long -eq 4 ; then
ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
if test "x$ac_cv_type_int32_t" = x""yes; then :

else

cat >>confdefs.h <<_ACEOF
#define int32_t long
_ACEOF

fi

ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
if test "x$ac_cv_type_uint32_t" = x""yes; then :

else

cat >>confdefs.h <<_ACEOF
#define uint32_t unsigned long
_ACEOF

fi

else
as_fn_error "LIBREPLACE no 32-bit type found" "$LINENO" 5
fi

ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
if test "x$ac_cv_type_int64_t" = x""yes; then :

else

cat >>confdefs.h <<_ACEOF
#define int64_t long long
_ACEOF

fi

ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
if test "x$ac_cv_type_uint64_t" = x""yes; then :

else

cat >>confdefs.h <<_ACEOF
#define uint64_t unsigned long long
_ACEOF

fi


ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
if test "x$ac_cv_type_size_t" = x""yes; then :

else

cat >>confdefs.h <<_ACEOF
#define size_t unsigned int
_ACEOF

fi

ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
if test "x$ac_cv_type_ssize_t" = x""yes; then :

else

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

fi


# The cast to long int works around a bug in the HP C Compiler
# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
# This bug is HP SR number 8606223364.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
$as_echo_n "checking size of off_t... " >&6; }
if test "${ac_cv_sizeof_off_t+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t"        "$ac_includes_default"; then :

else
  if test "$ac_cv_type_off_t" = yes; then
     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
{ as_fn_set_status 77
as_fn_error "cannot compute sizeof (off_t)
See \`config.log' for more details." "$LINENO" 5; }; }
   else
     ac_cv_sizeof_off_t=0
   fi
fi

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
$as_echo "$ac_cv_sizeof_off_t" >&6; }



cat >>confdefs.h <<_ACEOF
#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
_ACEOF


# The cast to long int works around a bug in the HP C Compiler
# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
# This bug is HP SR number 8606223364.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
$as_echo_n "checking size of size_t... " >&6; }
if test "${ac_cv_sizeof_size_t+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t"        "$ac_includes_default"; then :

else
  if test "$ac_cv_type_size_t" = yes; then
     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
{ as_fn_set_status 77
as_fn_error "cannot compute sizeof (size_t)
See \`config.log' for more details." "$LINENO" 5; }; }
   else
     ac_cv_sizeof_size_t=0
   fi
fi

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
$as_echo "$ac_cv_sizeof_size_t" >&6; }



cat >>confdefs.h <<_ACEOF
#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
_ACEOF


# The cast to long int works around a bug in the HP C Compiler
# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
# This bug is HP SR number 8606223364.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of ssize_t" >&5
$as_echo_n "checking size of ssize_t... " >&6; }
if test "${ac_cv_sizeof_ssize_t+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (ssize_t))" "ac_cv_sizeof_ssize_t"        "$ac_includes_default"; then :

else
  if test "$ac_cv_type_ssize_t" = yes; then
     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
{ as_fn_set_status 77
as_fn_error "cannot compute sizeof (ssize_t)
See \`config.log' for more details." "$LINENO" 5; }; }
   else
     ac_cv_sizeof_ssize_t=0
   fi
fi

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_ssize_t" >&5
$as_echo "$ac_cv_sizeof_ssize_t" >&6; }



cat >>confdefs.h <<_ACEOF
#define SIZEOF_SSIZE_T $ac_cv_sizeof_ssize_t
_ACEOF



ac_fn_c_check_type "$LINENO" "intptr_t" "ac_cv_type_intptr_t" "$ac_includes_default"
if test "x$ac_cv_type_intptr_t" = x""yes; then :

cat >>confdefs.h <<_ACEOF
#define HAVE_INTPTR_T 1
_ACEOF


fi
ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default"
if test "x$ac_cv_type_uintptr_t" = x""yes; then :

cat >>confdefs.h <<_ACEOF
#define HAVE_UINTPTR_T 1
_ACEOF


fi
ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
if test "x$ac_cv_type_ptrdiff_t" = x""yes; then :

cat >>confdefs.h <<_ACEOF
#define HAVE_PTRDIFF_T 1
_ACEOF


fi


if test x"$ac_cv_type_long_long" != x"yes";then
	as_fn_error "LIBREPLACE needs type 'long long'" "$LINENO" 5
fi
if test $ac_cv_sizeof_long_long -lt 8;then
	as_fn_error "LIBREPLACE needs sizeof(long long) >= 8" "$LINENO" 5
fi

############################################
# check if the compiler can do immediate structures

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for immediate structures" >&5
$as_echo_n "checking for immediate structures... " >&6; }
if test "${libreplace_cv_immediate_structures+set}" = set; then :
  $as_echo_n "(cached) " >&6
else

	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end 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 const struct {
			FOOBAR y;
		} f2[] = {
			{FOO_ONE}
		};
		static const FOOBAR f3[] = {FOO_ONE};

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  libreplace_cv_immediate_structures=yes
else
  libreplace_cv_immediate_structures=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libreplace_cv_immediate_structures" >&5
$as_echo "$libreplace_cv_immediate_structures" >&6; }
if test x"$libreplace_cv_immediate_structures" = x"yes"; then

$as_echo "#define HAVE_IMMEDIATE_STRUCTURES 1" >>confdefs.h

fi


echo "LIBREPLACE_CC_CHECKS: END"



#
# Set the debug symbol option if we have
# --enable-*developer or --enable-debug
# and the compiler supports it
#
if test x$ac_cv_prog_cc_g = xyes -a x$debug = xyes; then
	CFLAGS="${CFLAGS} -g"
fi

############################################
# check if the compiler handles c99 struct initialization

saved_CFLAGS="$CFLAGS";
c99_init=no
if test x"$c99_init" = x"no"; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C99 designated initializers" >&5
$as_echo_n "checking for C99 designated initializers... " >&6; }
    CFLAGS="$saved_CFLAGS";
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <stdio.h>
int
main ()
{
 struct foo {int x;char y;};
       struct foo bar = { .y = 'X', .x = 1 };

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }; c99_init=yes
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
if test x"$c99_init" = x"no"; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C99 designated initializers with -AC99" >&5
$as_echo_n "checking for C99 designated initializers with -AC99... " >&6; }
    CFLAGS="$saved_CFLAGS -AC99";
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <stdio.h>
int
main ()
{
 struct foo {int x;char y;};
       struct foo bar = { .y = 'X', .x = 1 };

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }; c99_init=yes
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
if test x"$c99_init" = x"no"; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C99 designated initializers with -qlanglvl=extc99" >&5
$as_echo_n "checking for C99 designated initializers with -qlanglvl=extc99... " >&6; }
    CFLAGS="$saved_CFLAGS -qlanglvl=extc99";
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <stdio.h>
int
main ()
{
 struct foo {int x;char y;};
       struct foo bar = { .y = 'X', .x = 1 };

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }; c99_init=yes
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
if test x"$c99_init" = x"no"; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C99 designated initializers with -qlanglvl=stdc99" >&5
$as_echo_n "checking for C99 designated initializers with -qlanglvl=stdc99... " >&6; }
    CFLAGS="$saved_CFLAGS -qlanglvl=stdc99";
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <stdio.h>
int
main ()
{
 struct foo {int x;char y;};
       struct foo bar = { .y = 'X', .x = 1 };

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }; c99_init=yes
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
if test x"$c99_init" = x"no"; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C99 designated initializers with -c99" >&5
$as_echo_n "checking for C99 designated initializers with -c99... " >&6; }
    CFLAGS="$saved_CFLAGS -c99"
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <stdio.h>
int
main ()
{
 struct foo {int x;char y;};
       struct foo bar = { .y = 'X', .x = 1 };

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }; c99_init=yes
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi

if test "`uname`" = "HP-UX"; then
  if test "$ac_cv_c_compiler_gnu" = no; then
	# special override for broken HP-UX compiler - I can't find a way to test
	# this properly (its a compiler bug)
	CFLAGS="$CFLAGS -AC99";
	c99_init=yes;
  fi
fi

if test x"$c99_init" = x"yes"; then
    saved_CFLAGS=""
    samba_cv_c99_struct_initialization=yes
else
    CFLAGS="$saved_CFLAGS"
    saved_CFLAGS=""
    samba_cv_c99_struct_initialization=no
fi


if test x"$samba_cv_c99_struct_initialization" != x"yes"; then
	{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler does not support c99 struct initialization!" >&5
$as_echo "$as_me: WARNING: C compiler does not support c99 struct initialization!" >&2;}
	as_fn_error "Please Install gcc from http://gcc.gnu.org/" "$LINENO" 5
fi

############################################
# check if the compiler can handle negative enum values
# and don't truncate the values to INT_MAX
# a runtime test is needed here
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that the C compiler understands negative enum values" >&5
$as_echo_n "checking that the C compiler understands negative enum values... " >&6; }
if test "${samba_cv_CC_NEGATIVE_ENUM_VALUES+set}" = set; then :
  $as_echo_n "(cached) " >&6
else

    if test "$cross_compiling" = yes; then :
  samba_cv_CC_NEGATIVE_ENUM_VALUES=yes
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

	#include <stdio.h>
	enum negative_values { NEGATIVE_VALUE = 0xFFFFFFFF };
	int main(void) {
		enum negative_values v1 = NEGATIVE_VALUE;
		unsigned v2 = 0xFFFFFFFF;
		if (v1 != v2) {
			printf("v1=0x%08x v2=0x%08x\n", v1, v2);
			return 1;
		}
		return 0;
	}

_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
  samba_cv_CC_NEGATIVE_ENUM_VALUES=yes
else
  samba_cv_CC_NEGATIVE_ENUM_VALUES=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext
fi

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $samba_cv_CC_NEGATIVE_ENUM_VALUES" >&5
$as_echo "$samba_cv_CC_NEGATIVE_ENUM_VALUES" >&6; }
if test x"$samba_cv_CC_NEGATIVE_ENUM_VALUES" != x"yes"; then

$as_echo "#define USE_UINT_ENUMS 1" >>confdefs.h

fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for test routines" >&5
$as_echo_n "checking for test routines... " >&6; }
if test "$cross_compiling" = yes; then :
  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot run when cross-compiling" >&5
$as_echo "$as_me: WARNING: cannot run when cross-compiling" >&2;}
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include "${srcdir-.}/../tests/trivial.c"
_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
else
  as_fn_error "cant find test code. Aborting config" "$LINENO" 5
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext
fi


#
# Check if the compiler support ELF visibility for symbols
#

visibility_attribute=no
VISIBILITY_CFLAGS=""
if test x"$GCC" = x"yes" ; then
	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking VISIBILITY_CFLAGS for gcc -fvisibility=hidden" >&5
$as_echo_n "checking VISIBILITY_CFLAGS for gcc -fvisibility=hidden... " >&6; }
if test "${ac_cv_cflags_gcc_option__fvisibility_hidden+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  ac_cv_cflags_gcc_option__fvisibility_hidden="no, unknown"

 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_save_CFLAGS="$CFLAGS"
for ac_arg in "-pedantic  % -fvisibility=hidden"     #
do CFLAGS="$ac_save_CFLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main ()
{
return 0;
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  ac_cv_cflags_gcc_option__fvisibility_hidden=`echo $ac_arg | sed -e 's,.*% *,,'` ; break
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
done
 CFLAGS="$ac_save_CFLAGS"
 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


fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cflags_gcc_option__fvisibility_hidden" >&5
$as_echo "$ac_cv_cflags_gcc_option__fvisibility_hidden" >&6; }
case ".$ac_cv_cflags_gcc_option__fvisibility_hidden" in
     .ok|.ok,*)  ;;
   .|.no|.no,*)  ;;
   *)
   if echo " $VISIBILITY_CFLAGS " | grep " $ac_cv_cflags_gcc_option__fvisibility_hidden " 2>&1 >/dev/null
   then { { $as_echo "$as_me:${as_lineno-$LINENO}: : VISIBILITY_CFLAGS does contain \$ac_cv_cflags_gcc_option__fvisibility_hidden"; } >&5
  (: VISIBILITY_CFLAGS does contain $ac_cv_cflags_gcc_option__fvisibility_hidden) 2>&5
  ac_status=$?
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }
   else { { $as_echo "$as_me:${as_lineno-$LINENO}: : VISIBILITY_CFLAGS=\"\$VISIBILITY_CFLAGS \$ac_cv_cflags_gcc_option__fvisibility_hidden\""; } >&5
  (: VISIBILITY_CFLAGS="$VISIBILITY_CFLAGS $ac_cv_cflags_gcc_option__fvisibility_hidden") 2>&5
  ac_status=$?
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }
                      VISIBILITY_CFLAGS="$VISIBILITY_CFLAGS $ac_cv_cflags_gcc_option__fvisibility_hidden"
   fi
 ;;
esac

fi

if test -n "$VISIBILITY_CFLAGS"; then
	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler supports the visibility attribute" >&5
$as_echo_n "checking whether the C compiler supports the visibility attribute... " >&6; }
	OLD_CFLAGS="$CFLAGS"

	CFLAGS="$CFLAGS $VISIBILITY_CFLAGS"
	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

		void vis_foo1(void) {}
		__attribute__((visibility("default"))) void vis_foo2(void) {}

int
main ()
{


  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :

		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }

$as_echo "#define HAVE_VISIBILITY_ATTR 1" >>confdefs.h

		visibility_attribute=yes

else

		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }

fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
	CFLAGS="$OLD_CFLAGS"
fi


#
# Check if the compiler can handle the options we selected by
# --enable-*developer
#
DEVELOPER_CFLAGS=""
if test x$developer = xyes; then
    	OLD_CFLAGS="${CFLAGS}"

	CFLAGS="${CFLAGS} -D_SAMBA_DEVELOPER_DONNOT_USE_O2_"
	DEVELOPER_CFLAGS="-DDEBUG_PASSWORD -DDEVELOPER"
	if test x"$GCC" = x"yes" ; then
	    #
	    # warnings we want...
	    #
	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking DEVELOPER_CFLAGS for gcc -Wall" >&5
$as_echo_n "checking DEVELOPER_CFLAGS for gcc -Wall... " >&6; }
if test "${ac_cv_cflags_gcc_option__Wall+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  ac_cv_cflags_gcc_option__Wall="no, unknown"

 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_save_CFLAGS="$CFLAGS"
for ac_arg in "-pedantic  % -Wall"     #
do CFLAGS="$ac_save_CFLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main ()
{
return 0;
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  ac_cv_cflags_gcc_option__Wall=`echo $ac_arg | sed -e 's,.*% *,,'` ; break
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
done
 CFLAGS="$ac_save_CFLAGS"
 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


fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cflags_gcc_option__Wall" >&5
$as_echo "$ac_cv_cflags_gcc_option__Wall" >&6; }
case ".$ac_cv_cflags_gcc_option__Wall" in
     .ok|.ok,*)  ;;
   .|.no|.no,*)  ;;
   *)
   if echo " $DEVELOPER_CFLAGS " | grep " $ac_cv_cflags_gcc_option__Wall " 2>&1 >/dev/null
   then { { $as_echo "$as_me:${as_lineno-$LINENO}: : DEVELOPER_CFLAGS does contain \$ac_cv_cflags_gcc_option__Wall"; } >&5
  (: DEVELOPER_CFLAGS does contain $ac_cv_cflags_gcc_option__Wall) 2>&5
  ac_status=$?
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }
   else { { $as_echo "$as_me:${as_lineno-$LINENO}: : DEVELOPER_CFLAGS=\"\$DEVELOPER_CFLAGS \$ac_cv_cflags_gcc_option__Wall\""; } >&5
  (: DEVELOPER_CFLAGS="$DEVELOPER_CFLAGS $ac_cv_cflags_gcc_option__Wall") 2>&5
  ac_status=$?
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }
                      DEVELOPER_CFLAGS="$DEVELOPER_CFLAGS $ac_cv_cflags_gcc_option__Wall"
   fi
 ;;
esac

	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking DEVELOPER_CFLAGS for gcc -Wshadow" >&5
$as_echo_n "checking DEVELOPER_CFLAGS for gcc -Wshadow... " >&6; }
if test "${ac_cv_cflags_gcc_option__Wshadow+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  ac_cv_cflags_gcc_option__Wshadow="no, unknown"

 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_save_CFLAGS="$CFLAGS"
for ac_arg in "-pedantic  % -Wshadow"     #
do CFLAGS="$ac_save_CFLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main ()
{
return 0;
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  ac_cv_cflags_gcc_option__Wshadow=`echo $ac_arg | sed -e 's,.*% *,,'` ; break
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
done
 CFLAGS="$ac_save_CFLAGS"
 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


fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cflags_gcc_option__Wshadow" >&5
$as_echo "$ac_cv_cflags_gcc_option__Wshadow" >&6; }
case ".$ac_cv_cflags_gcc_option__Wshadow" in
     .ok|.ok,*)  ;;
   .|.no|.no,*)  ;;
   *)
   if echo " $DEVELOPER_CFLAGS " | grep " $ac_cv_cflags_gcc_option__Wshadow " 2>&1 >/dev/null
   then { { $as_echo "$as_me:${as_lineno-$LINENO}: : DEVELOPER_CFLAGS does contain \$ac_cv_cflags_gcc_option__Wshadow"; } >&5
  (: DEVELOPER_CFLAGS does contain $ac_cv_cflags_gcc_option__Wshadow) 2>&5
  ac_status=$?
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }
   else { { $as_echo "$as_me:${as_lineno-$LINENO}: : DEVELOPER_CFLAGS=\"\$DEVELOPER_CFLAGS \$ac_cv_cflags_gcc_option__Wshadow\""; } >&5
  (: DEVELOPER_CFLAGS="$DEVELOPER_CFLAGS $ac_cv_cflags_gcc_option__Wshadow") 2>&5
  ac_status=$?
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }
                      DEVELOPER_CFLAGS="$DEVELOPER_CFLAGS $ac_cv_cflags_gcc_option__Wshadow"
   fi
 ;;
esac

	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking DEVELOPER_CFLAGS for gcc -Werror-implicit-function-declaration" >&5
$as_echo_n "checking DEVELOPER_CFLAGS for gcc -Werror-implicit-function-declaration... " >&6; }
if test "${ac_cv_cflags_gcc_option__Werror_implicit_function_declaration+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  ac_cv_cflags_gcc_option__Werror_implicit_function_declaration="no, unknown"

 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_save_CFLAGS="$CFLAGS"
for ac_arg in "-pedantic  % -Werror-implicit-function-declaration"     #
do CFLAGS="$ac_save_CFLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main ()
{
return 0;
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  ac_cv_cflags_gcc_option__Werror_implicit_function_declaration=`echo $ac_arg | sed -e 's,.*% *,,'` ; break
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
done
 CFLAGS="$ac_save_CFLAGS"
 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


fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cflags_gcc_option__Werror_implicit_function_declaration" >&5
$as_echo "$ac_cv_cflags_gcc_option__Werror_implicit_function_declaration" >&6; }
case ".$ac_cv_cflags_gcc_option__Werror_implicit_function_declaration" in
     .ok|.ok,*)  ;;
   .|.no|.no,*)  ;;
   *)
   if echo " $DEVELOPER_CFLAGS " | grep " $ac_cv_cflags_gcc_option__Werror_implicit_function_declaration " 2>&1 >/dev/null
   then { { $as_echo "$as_me:${as_lineno-$LINENO}: : DEVELOPER_CFLAGS does contain \$ac_cv_cflags_gcc_option__Werror_implicit_function_declaration"; } >&5
  (: DEVELOPER_CFLAGS does contain $ac_cv_cflags_gcc_option__Werror_implicit_function_declaration) 2>&5
  ac_status=$?
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }
   else { { $as_echo "$as_me:${as_lineno-$LINENO}: : DEVELOPER_CFLAGS=\"\$DEVELOPER_CFLAGS \$ac_cv_cflags_gcc_option__Werror_implicit_function_declaration\""; } >&5
  (: DEVELOPER_CFLAGS="$DEVELOPER_CFLAGS $ac_cv_cflags_gcc_option__Werror_implicit_function_declaration") 2>&5
  ac_status=$?
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }
                      DEVELOPER_CFLAGS="$DEVELOPER_CFLAGS $ac_cv_cflags_gcc_option__Werror_implicit_function_declaration"
   fi
 ;;
esac

	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking DEVELOPER_CFLAGS for gcc -Wstrict-prototypes" >&5
$as_echo_n "checking DEVELOPER_CFLAGS for gcc -Wstrict-prototypes... " >&6; }
if test "${ac_cv_cflags_gcc_option__Wstrict_prototypes+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  ac_cv_cflags_gcc_option__Wstrict_prototypes="no, unknown"

 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_save_CFLAGS="$CFLAGS"
for ac_arg in "-pedantic  % -Wstrict-prototypes"     #
do CFLAGS="$ac_save_CFLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main ()
{
return 0;
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  ac_cv_cflags_gcc_option__Wstrict_prototypes=`echo $ac_arg | sed -e 's,.*% *,,'` ; break
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
done
 CFLAGS="$ac_save_CFLAGS"
 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


fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cflags_gcc_option__Wstrict_prototypes" >&5
$as_echo "$ac_cv_cflags_gcc_option__Wstrict_prototypes" >&6; }
case ".$ac_cv_cflags_gcc_option__Wstrict_prototypes" in
     .ok|.ok,*)  ;;
   .|.no|.no,*)  ;;
   *)
   if echo " $DEVELOPER_CFLAGS " | grep " $ac_cv_cflags_gcc_option__Wstrict_prototypes " 2>&1 >/dev/null
   then { { $as_echo "$as_me:${as_lineno-$LINENO}: : DEVELOPER_CFLAGS does contain \$ac_cv_cflags_gcc_option__Wstrict_prototypes"; } >&5
  (: DEVELOPER_CFLAGS does contain $ac_cv_cflags_gcc_option__Wstrict_prototypes) 2>&5
  ac_status=$?
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }
   else { { $as_echo "$as_me:${as_lineno-$LINENO}: : DEVELOPER_CFLAGS=\"\$DEVELOPER_CFLAGS \$ac_cv_cflags_gcc_option__Wstrict_prototypes\""; } >&5
  (: DEVELOPER_CFLAGS="$DEVELOPER_CFLAGS $ac_cv_cflags_gcc_option__Wstrict_prototypes") 2>&5
  ac_status=$?
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }
                      DEVELOPER_CFLAGS="$DEVELOPER_CFLAGS $ac_cv_cflags_gcc_option__Wstrict_prototypes"
   fi
 ;;
esac

	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking DEVELOPER_CFLAGS for gcc -Wpointer-arith" >&5
$as_echo_n "checking DEVELOPER_CFLAGS for gcc -Wpointer-arith... " >&6; }
if test "${ac_cv_cflags_gcc_option__Wpointer_arith+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  ac_cv_cflags_gcc_option__Wpointer_arith="no, unknown"

 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_save_CFLAGS="$CFLAGS"
for ac_arg in "-pedantic  % -Wpointer-arith"     #
do CFLAGS="$ac_save_CFLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main ()
{
return 0;
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  ac_cv_cflags_gcc_option__Wpointer_arith=`echo $ac_arg | sed -e 's,.*% *,,'` ; break
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
done
 CFLAGS="$ac_save_CFLAGS"
 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


fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cflags_gcc_option__Wpointer_arith" >&5
$as_echo "$ac_cv_cflags_gcc_option__Wpointer_arith" >&6; }
case ".$ac_cv_cflags_gcc_option__Wpointer_arith" in
     .ok|.ok,*)  ;;
   .|.no|.no,*)  ;;
   *)
   if echo " $DEVELOPER_CFLAGS " | grep " $ac_cv_cflags_gcc_option__Wpointer_arith " 2>&1 >/dev/null
   then { { $as_echo "$as_me:${as_lineno-$LINENO}: : DEVELOPER_CFLAGS does contain \$ac_cv_cflags_gcc_option__Wpointer_arith"; } >&5
  (: DEVELOPER_CFLAGS does contain $ac_cv_cflags_gcc_option__Wpointer_arith) 2>&5
  ac_status=$?
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }
   else { { $as_echo "$as_me:${as_lineno-$LINENO}: : DEVELOPER_CFLAGS=\"\$DEVELOPER_CFLAGS \$ac_cv_cflags_gcc_option__Wpointer_arith\""; } >&5
  (: DEVELOPER_CFLAGS="$DEVELOPER_CFLAGS $ac_cv_cflags_gcc_option__Wpointer_arith") 2>&5
  ac_status=$?
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }
                      DEVELOPER_CFLAGS="$DEVELOPER_CFLAGS $ac_cv_cflags_gcc_option__Wpointer_arith"
   fi
 ;;
esac

	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking DEVELOPER_CFLAGS for gcc -Wcast-qual" >&5
$as_echo_n "checking DEVELOPER_CFLAGS for gcc -Wcast-qual... " >&6; }
if test "${ac_cv_cflags_gcc_option__Wcast_qual+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  ac_cv_cflags_gcc_option__Wcast_qual="no, unknown"

 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_save_CFLAGS="$CFLAGS"
for ac_arg in "-pedantic  % -Wcast-qual"     #
do CFLAGS="$ac_save_CFLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main ()
{
return 0;
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  ac_cv_cflags_gcc_option__Wcast_qual=`echo $ac_arg | sed -e 's,.*% *,,'` ; break
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
done
 CFLAGS="$ac_save_CFLAGS"
 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


fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cflags_gcc_option__Wcast_qual" >&5
$as_echo "$ac_cv_cflags_gcc_option__Wcast_qual" >&6; }
case ".$ac_cv_cflags_gcc_option__Wcast_qual" in
     .ok|.ok,*)  ;;
   .|.no|.no,*)  ;;
   *)
   if echo " $DEVELOPER_CFLAGS " | grep " $ac_cv_cflags_gcc_option__Wcast_qual " 2>&1 >/dev/null
   then { { $as_echo "$as_me:${as_lineno-$LINENO}: : DEVELOPER_CFLAGS does contain \$ac_cv_cflags_gcc_option__Wcast_qual"; } >&5
  (: DEVELOPER_CFLAGS does contain $ac_cv_cflags_gcc_option__Wcast_qual) 2>&5
  ac_status=$?
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }
   else { { $as_echo "$as_me:${as_lineno-$LINENO}: : DEVELOPER_CFLAGS=\"\$DEVELOPER_CFLAGS \$ac_cv_cflags_gcc_option__Wcast_qual\""; } >&5
  (: DEVELOPER_CFLAGS="$DEVELOPER_CFLAGS $ac_cv_cflags_gcc_option__Wcast_qual") 2>&5
  ac_status=$?
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }
                      DEVELOPER_CFLAGS="$DEVELOPER_CFLAGS $ac_cv_cflags_gcc_option__Wcast_qual"
   fi
 ;;
esac

	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking DEVELOPER_CFLAGS for gcc -Wcast-align" >&5
$as_echo_n "checking DEVELOPER_CFLAGS for gcc -Wcast-align... " >&6; }
if test "${ac_cv_cflags_gcc_option__Wcast_align+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  ac_cv_cflags_gcc_option__Wcast_align="no, unknown"

 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_save_CFLAGS="$CFLAGS"
for ac_arg in "-pedantic  % -Wcast-align"     #
do CFLAGS="$ac_save_CFLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main ()
{
return 0;
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  ac_cv_cflags_gcc_option__Wcast_align=`echo $ac_arg | sed -e 's,.*% *,,'` ; break
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
done
 CFLAGS="$ac_save_CFLAGS"
 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


fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cflags_gcc_option__Wcast_align" >&5
$as_echo "$ac_cv_cflags_gcc_option__Wcast_align" >&6; }
case ".$ac_cv_cflags_gcc_option__Wcast_align" in
     .ok|.ok,*)  ;;
   .|.no|.no,*)  ;;
   *)
   if echo " $DEVELOPER_CFLAGS " | grep " $ac_cv_cflags_gcc_option__Wcast_align " 2>&1 >/dev/null
   then { { $as_echo "$as_me:${as_lineno-$LINENO}: : DEVELOPER_CFLAGS does contain \$ac_cv_cflags_gcc_option__Wcast_align"; } >&5
  (: DEVELOPER_CFLAGS does contain $ac_cv_cflags_gcc_option__Wcast_align) 2>&5
  ac_status=$?
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }
   else { { $as_echo "$as_me:${as_lineno-$LINENO}: : DEVELOPER_CFLAGS=\"\$DEVELOPER_CFLAGS \$ac_cv_cflags_gcc_option__Wcast_align\""; } >&5
  (: DEVELOPER_CFLAGS="$DEVELOPER_CFLAGS $ac_cv_cflags_gcc_option__Wcast_align") 2>&5
  ac_status=$?
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }
                      DEVELOPER_CFLAGS="$DEVELOPER_CFLAGS $ac_cv_cflags_gcc_option__Wcast_align"
   fi
 ;;
esac

	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking DEVELOPER_CFLAGS for gcc -Wwrite-strings" >&5
$as_echo_n "checking DEVELOPER_CFLAGS for gcc -Wwrite-strings... " >&6; }
if test "${ac_cv_cflags_gcc_option__Wwrite_strings+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  ac_cv_cflags_gcc_option__Wwrite_strings="no, unknown"

 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_save_CFLAGS="$CFLAGS"
for ac_arg in "-pedantic  % -Wwrite-strings"     #
do CFLAGS="$ac_save_CFLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main ()
{
return 0;
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  ac_cv_cflags_gcc_option__Wwrite_strings=`echo $ac_arg | sed -e 's,.*% *,,'` ; break
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
done
 CFLAGS="$ac_save_CFLAGS"
 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


fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cflags_gcc_option__Wwrite_strings" >&5
$as_echo "$ac_cv_cflags_gcc_option__Wwrite_strings" >&6; }
case ".$ac_cv_cflags_gcc_option__Wwrite_strings" in
     .ok|.ok,*)  ;;
   .|.no|.no,*)  ;;
   *)
   if echo " $DEVELOPER_CFLAGS " | grep " $ac_cv_cflags_gcc_option__Wwrite_strings " 2>&1 >/dev/null
   then { { $as_echo "$as_me:${as_lineno-$LINENO}: : DEVELOPER_CFLAGS does contain \$ac_cv_cflags_gcc_option__Wwrite_strings"; } >&5
  (: DEVELOPER_CFLAGS does contain $ac_cv_cflags_gcc_option__Wwrite_strings) 2>&5
  ac_status=$?
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }
   else { { $as_echo "$as_me:${as_lineno-$LINENO}: : DEVELOPER_CFLAGS=\"\$DEVELOPER_CFLAGS \$ac_cv_cflags_gcc_option__Wwrite_strings\""; } >&5
  (: DEVELOPER_CFLAGS="$DEVELOPER_CFLAGS $ac_cv_cflags_gcc_option__Wwrite_strings") 2>&5
  ac_status=$?
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }
                      DEVELOPER_CFLAGS="$DEVELOPER_CFLAGS $ac_cv_cflags_gcc_option__Wwrite_strings"
   fi
 ;;
esac

	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking DEVELOPER_CFLAGS for gcc -Wmissing-format-attribute" >&5
$as_echo_n "checking DEVELOPER_CFLAGS for gcc -Wmissing-format-attribute... " >&6; }
if test "${ac_cv_cflags_gcc_option__Wmissing_format_attribute+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  ac_cv_cflags_gcc_option__Wmissing_format_attribute="no, unknown"

 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_save_CFLAGS="$CFLAGS"
for ac_arg in "-pedantic  % -Wmissing-format-attribute"     #
do CFLAGS="$ac_save_CFLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main ()
{
return 0;
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  ac_cv_cflags_gcc_option__Wmissing_format_attribute=`echo $ac_arg | sed -e 's,.*% *,,'` ; break
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
done
 CFLAGS="$ac_save_CFLAGS"
 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


fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cflags_gcc_option__Wmissing_format_attribute" >&5
$as_echo "$ac_cv_cflags_gcc_option__Wmissing_format_attribute" >&6; }
case ".$ac_cv_cflags_gcc_option__Wmissing_format_attribute" in
     .ok|.ok,*)  ;;
   .|.no|.no,*)  ;;
   *)
   if echo " $DEVELOPER_CFLAGS " | grep " $ac_cv_cflags_gcc_option__Wmissing_format_attribute " 2>&1 >/dev/null
   then { { $as_echo "$as_me:${as_lineno-$LINENO}: : DEVELOPER_CFLAGS does contain \$ac_cv_cflags_gcc_option__Wmissing_format_attribute"; } >&5
  (: DEVELOPER_CFLAGS does contain $ac_cv_cflags_gcc_option__Wmissing_format_attribute) 2>&5
  ac_status=$?
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }
   else { { $as_echo "$as_me:${as_lineno-$LINENO}: : DEVELOPER_CFLAGS=\"\$DEVELOPER_CFLAGS \$ac_cv_cflags_gcc_option__Wmissing_format_attribute\""; } >&5
  (: DEVELOPER_CFLAGS="$DEVELOPER_CFLAGS $ac_cv_cflags_gcc_option__Wmissing_format_attribute") 2>&5
  ac_status=$?
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }
                      DEVELOPER_CFLAGS="$DEVELOPER_CFLAGS $ac_cv_cflags_gcc_option__Wmissing_format_attribute"
   fi
 ;;
esac

	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking DEVELOPER_CFLAGS for gcc -Wformat=2" >&5
$as_echo_n "checking DEVELOPER_CFLAGS for gcc -Wformat=2... " >&6; }
if test "${ac_cv_cflags_gcc_option__Wformat_2+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  ac_cv_cflags_gcc_option__Wformat_2="no, unknown"

 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_save_CFLAGS="$CFLAGS"
for ac_arg in "-pedantic  % -Wformat=2"     #
do CFLAGS="$ac_save_CFLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main ()
{
return 0;
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  ac_cv_cflags_gcc_option__Wformat_2=`echo $ac_arg | sed -e 's,.*% *,,'` ; break
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
done
 CFLAGS="$ac_save_CFLAGS"
 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


fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cflags_gcc_option__Wformat_2" >&5
$as_echo "$ac_cv_cflags_gcc_option__Wformat_2" >&6; }
case ".$ac_cv_cflags_gcc_option__Wformat_2" in
     .ok|.ok,*)  ;;
   .|.no|.no,*)  ;;
   *)
   if echo " $DEVELOPER_CFLAGS " | grep " $ac_cv_cflags_gcc_option__Wformat_2 " 2>&1 >/dev/null
   then { { $as_echo "$as_me:${as_lineno-$LINENO}: : DEVELOPER_CFLAGS does contain \$ac_cv_cflags_gcc_option__Wformat_2"; } >&5
  (: DEVELOPER_CFLAGS does contain $ac_cv_cflags_gcc_option__Wformat_2) 2>&5
  ac_status=$?
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }
   else { { $as_echo "$as_me:${as_lineno-$LINENO}: : DEVELOPER_CFLAGS=\"\$DEVELOPER_CFLAGS \$ac_cv_cflags_gcc_option__Wformat_2\""; } >&5
  (: DEVELOPER_CFLAGS="$DEVELOPER_CFLAGS $ac_cv_cflags_gcc_option__Wformat_2") 2>&5
  ac_status=$?
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }
                      DEVELOPER_CFLAGS="$DEVELOPER_CFLAGS $ac_cv_cflags_gcc_option__Wformat_2"
   fi
 ;;
esac

	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking DEVELOPER_CFLAGS for gcc -Wdeclaration-after-statement" >&5
$as_echo_n "checking DEVELOPER_CFLAGS for gcc -Wdeclaration-after-statement... " >&6; }
if test "${ac_cv_cflags_gcc_option__Wdeclaration_after_statement+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  ac_cv_cflags_gcc_option__Wdeclaration_after_statement="no, unknown"

 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_save_CFLAGS="$CFLAGS"
for ac_arg in "-pedantic  % -Wdeclaration-after-statement"     #
do CFLAGS="$ac_save_CFLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main ()
{
return 0;
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  ac_cv_cflags_gcc_option__Wdeclaration_after_statement=`echo $ac_arg | sed -e 's,.*% *,,'` ; break
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
done
 CFLAGS="$ac_save_CFLAGS"
 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


fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cflags_gcc_option__Wdeclaration_after_statement" >&5
$as_echo "$ac_cv_cflags_gcc_option__Wdeclaration_after_statement" >&6; }
case ".$ac_cv_cflags_gcc_option__Wdeclaration_after_statement" in
     .ok|.ok,*)  ;;
   .|.no|.no,*)  ;;
   *)
   if echo " $DEVELOPER_CFLAGS " | grep " $ac_cv_cflags_gcc_option__Wdeclaration_after_statement " 2>&1 >/dev/null
   then { { $as_echo "$as_me:${as_lineno-$LINENO}: : DEVELOPER_CFLAGS does contain \$ac_cv_cflags_gcc_option__Wdeclaration_after_statement"; } >&5
  (: DEVELOPER_CFLAGS does contain $ac_cv_cflags_gcc_option__Wdeclaration_after_statement) 2>&5
  ac_status=$?
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }
   else { { $as_echo "$as_me:${as_lineno-$LINENO}: : DEVELOPER_CFLAGS=\"\$DEVELOPER_CFLAGS \$ac_cv_cflags_gcc_option__Wdeclaration_after_statement\""; } >&5
  (: DEVELOPER_CFLAGS="$DEVELOPER_CFLAGS $ac_cv_cflags_gcc_option__Wdeclaration_after_statement") 2>&5
  ac_status=$?
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }
                      DEVELOPER_CFLAGS="$DEVELOPER_CFLAGS $ac_cv_cflags_gcc_option__Wdeclaration_after_statement"
   fi
 ;;
esac

	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking DEVELOPER_CFLAGS for gcc -Wunused-macros" >&5
$as_echo_n "checking DEVELOPER_CFLAGS for gcc -Wunused-macros... " >&6; }
if test "${ac_cv_cflags_gcc_option__Wunused_macros+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  ac_cv_cflags_gcc_option__Wunused_macros="no, unknown"

 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_save_CFLAGS="$CFLAGS"
for ac_arg in "-pedantic  % -Wunused-macros"     #
do CFLAGS="$ac_save_CFLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main ()
{
return 0;
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  ac_cv_cflags_gcc_option__Wunused_macros=`echo $ac_arg | sed -e 's,.*% *,,'` ; break
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
done
 CFLAGS="$ac_save_CFLAGS"
 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


fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cflags_gcc_option__Wunused_macros" >&5
$as_echo "$ac_cv_cflags_gcc_option__Wunused_macros" >&6; }
case ".$ac_cv_cflags_gcc_option__Wunused_macros" in
     .ok|.ok,*)  ;;
   .|.no|.no,*)  ;;
   *)
   if echo " $DEVELOPER_CFLAGS " | grep " $ac_cv_cflags_gcc_option__Wunused_macros " 2>&1 >/dev/null
   then { { $as_echo "$as_me:${as_lineno-$LINENO}: : DEVELOPER_CFLAGS does contain \$ac_cv_cflags_gcc_option__Wunused_macros"; } >&5
  (: DEVELOPER_CFLAGS does contain $ac_cv_cflags_gcc_option__Wunused_macros) 2>&5
  ac_status=$?
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }
   else { { $as_echo "$as_me:${as_lineno-$LINENO}: : DEVELOPER_CFLAGS=\"\$DEVELOPER_CFLAGS \$ac_cv_cflags_gcc_option__Wunused_macros\""; } >&5
  (: DEVELOPER_CFLAGS="$DEVELOPER_CFLAGS $ac_cv_cflags_gcc_option__Wunused_macros") 2>&5
  ac_status=$?
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }
                      DEVELOPER_CFLAGS="$DEVELOPER_CFLAGS $ac_cv_cflags_gcc_option__Wunused_macros"
   fi
 ;;
esac

#	    AX_CFLAGS_GCC_OPTION(-Wextra, DEVELOPER_CFLAGS)
#	    AX_CFLAGS_GCC_OPTION(-Wc++-compat, DEVELOPER_CFLAGS)
#	    AX_CFLAGS_GCC_OPTION(-Wmissing-prototypes, DEVELOPER_CFLAGS)
#	    AX_CFLAGS_GCC_OPTION(-Wmissing-declarations, DEVELOPER_CFLAGS)
#	    AX_CFLAGS_GCC_OPTION(-Wmissing-field-initializers, DEVELOPER_CFLAGS)
	    #
	    # warnings we don't want...
	    #
	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking DEVELOPER_CFLAGS for gcc -Wno-format-y2k" >&5
$as_echo_n "checking DEVELOPER_CFLAGS for gcc -Wno-format-y2k... " >&6; }
if test "${ac_cv_cflags_gcc_option__Wno_format_y2k+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  ac_cv_cflags_gcc_option__Wno_format_y2k="no, unknown"

 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_save_CFLAGS="$CFLAGS"
for ac_arg in "-pedantic  % -Wno-format-y2k"     #
do CFLAGS="$ac_save_CFLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main ()
{
return 0;
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  ac_cv_cflags_gcc_option__Wno_format_y2k=`echo $ac_arg | sed -e 's,.*% *,,'` ; break
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
done
 CFLAGS="$ac_save_CFLAGS"
 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


fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cflags_gcc_option__Wno_format_y2k" >&5
$as_echo "$ac_cv_cflags_gcc_option__Wno_format_y2k" >&6; }
case ".$ac_cv_cflags_gcc_option__Wno_format_y2k" in
     .ok|.ok,*)  ;;
   .|.no|.no,*)  ;;
   *)
   if echo " $DEVELOPER_CFLAGS " | grep " $ac_cv_cflags_gcc_option__Wno_format_y2k " 2>&1 >/dev/null
   then { { $as_echo "$as_me:${as_lineno-$LINENO}: : DEVELOPER_CFLAGS does contain \$ac_cv_cflags_gcc_option__Wno_format_y2k"; } >&5
  (: DEVELOPER_CFLAGS does contain $ac_cv_cflags_gcc_option__Wno_format_y2k) 2>&5
  ac_status=$?
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }
   else { { $as_echo "$as_me:${as_lineno-$LINENO}: : DEVELOPER_CFLAGS=\"\$DEVELOPER_CFLAGS \$ac_cv_cflags_gcc_option__Wno_format_y2k\""; } >&5
  (: DEVELOPER_CFLAGS="$DEVELOPER_CFLAGS $ac_cv_cflags_gcc_option__Wno_format_y2k") 2>&5
  ac_status=$?
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }
                      DEVELOPER_CFLAGS="$DEVELOPER_CFLAGS $ac_cv_cflags_gcc_option__Wno_format_y2k"
   fi
 ;;
esac

	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking DEVELOPER_CFLAGS for gcc -Wno-unused-parameter" >&5
$as_echo_n "checking DEVELOPER_CFLAGS for gcc -Wno-unused-parameter... " >&6; }
if test "${ac_cv_cflags_gcc_option__Wno_unused_parameter+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  ac_cv_cflags_gcc_option__Wno_unused_parameter="no, unknown"

 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_save_CFLAGS="$CFLAGS"
for ac_arg in "-pedantic  % -Wno-unused-parameter"     #
do CFLAGS="$ac_save_CFLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main ()
{
return 0;
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  ac_cv_cflags_gcc_option__Wno_unused_parameter=`echo $ac_arg | sed -e 's,.*% *,,'` ; break
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
done
 CFLAGS="$ac_save_CFLAGS"
 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


fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cflags_gcc_option__Wno_unused_parameter" >&5
$as_echo "$ac_cv_cflags_gcc_option__Wno_unused_parameter" >&6; }
case ".$ac_cv_cflags_gcc_option__Wno_unused_parameter" in
     .ok|.ok,*)  ;;
   .|.no|.no,*)  ;;
   *)
   if echo " $DEVELOPER_CFLAGS " | grep " $ac_cv_cflags_gcc_option__Wno_unused_parameter " 2>&1 >/dev/null
   then { { $as_echo "$as_me:${as_lineno-$LINENO}: : DEVELOPER_CFLAGS does contain \$ac_cv_cflags_gcc_option__Wno_unused_parameter"; } >&5
  (: DEVELOPER_CFLAGS does contain $ac_cv_cflags_gcc_option__Wno_unused_parameter) 2>&5
  ac_status=$?
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }
   else { { $as_echo "$as_me:${as_lineno-$LINENO}: : DEVELOPER_CFLAGS=\"\$DEVELOPER_CFLAGS \$ac_cv_cflags_gcc_option__Wno_unused_parameter\""; } >&5
  (: DEVELOPER_CFLAGS="$DEVELOPER_CFLAGS $ac_cv_cflags_gcc_option__Wno_unused_parameter") 2>&5
  ac_status=$?
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }
                      DEVELOPER_CFLAGS="$DEVELOPER_CFLAGS $ac_cv_cflags_gcc_option__Wno_unused_parameter"
   fi
 ;;
esac

	    #
	    # warnings we don't want just for some files e.g. swig bindings
	    #
	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAG_NO_CAST_QUAL for gcc -Wno-cast-qual" >&5
$as_echo_n "checking CFLAG_NO_CAST_QUAL for gcc -Wno-cast-qual... " >&6; }
if test "${ac_cv_cflags_gcc_option__Wno_cast_qual+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  ac_cv_cflags_gcc_option__Wno_cast_qual="no, unknown"

 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_save_CFLAGS="$CFLAGS"
for ac_arg in "-pedantic  % -Wno-cast-qual"     #
do CFLAGS="$ac_save_CFLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main ()
{
return 0;
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  ac_cv_cflags_gcc_option__Wno_cast_qual=`echo $ac_arg | sed -e 's,.*% *,,'` ; break
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
done
 CFLAGS="$ac_save_CFLAGS"
 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


fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cflags_gcc_option__Wno_cast_qual" >&5
$as_echo "$ac_cv_cflags_gcc_option__Wno_cast_qual" >&6; }
case ".$ac_cv_cflags_gcc_option__Wno_cast_qual" in
     .ok|.ok,*)  ;;
   .|.no|.no,*)  ;;
   *)
   if echo " $CFLAG_NO_CAST_QUAL " | grep " $ac_cv_cflags_gcc_option__Wno_cast_qual " 2>&1 >/dev/null
   then { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAG_NO_CAST_QUAL does contain \$ac_cv_cflags_gcc_option__Wno_cast_qual"; } >&5
  (: CFLAG_NO_CAST_QUAL does contain $ac_cv_cflags_gcc_option__Wno_cast_qual) 2>&5
  ac_status=$?
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }
   else { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAG_NO_CAST_QUAL=\"\$CFLAG_NO_CAST_QUAL \$ac_cv_cflags_gcc_option__Wno_cast_qual\""; } >&5
  (: CFLAG_NO_CAST_QUAL="$CFLAG_NO_CAST_QUAL $ac_cv_cflags_gcc_option__Wno_cast_qual") 2>&5
  ac_status=$?
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }
                      CFLAG_NO_CAST_QUAL="$CFLAG_NO_CAST_QUAL $ac_cv_cflags_gcc_option__Wno_cast_qual"
   fi
 ;;
esac


	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAG_NO_UNUSED_MACROS for gcc -Wno-unused-macros" >&5
$as_echo_n "checking CFLAG_NO_UNUSED_MACROS for gcc -Wno-unused-macros... " >&6; }
if test "${ac_cv_cflags_gcc_option__Wno_unused_macros+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  ac_cv_cflags_gcc_option__Wno_unused_macros="no, unknown"

 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_save_CFLAGS="$CFLAGS"
for ac_arg in "-pedantic  % -Wno-unused-macros"     #
do CFLAGS="$ac_save_CFLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main ()
{
return 0;
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  ac_cv_cflags_gcc_option__Wno_unused_macros=`echo $ac_arg | sed -e 's,.*% *,,'` ; break
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
done
 CFLAGS="$ac_save_CFLAGS"
 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


fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cflags_gcc_option__Wno_unused_macros" >&5
$as_echo "$ac_cv_cflags_gcc_option__Wno_unused_macros" >&6; }
case ".$ac_cv_cflags_gcc_option__Wno_unused_macros" in
     .ok|.ok,*)  ;;
   .|.no|.no,*)  ;;
   *)
   if echo " $CFLAG_NO_UNUSED_MACROS " | grep " $ac_cv_cflags_gcc_option__Wno_unused_macros " 2>&1 >/dev/null
   then { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAG_NO_UNUSED_MACROS does contain \$ac_cv_cflags_gcc_option__Wno_unused_macros"; } >&5
  (: CFLAG_NO_UNUSED_MACROS does contain $ac_cv_cflags_gcc_option__Wno_unused_macros) 2>&5
  ac_status=$?
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }
   else { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAG_NO_UNUSED_MACROS=\"\$CFLAG_NO_UNUSED_MACROS \$ac_cv_cflags_gcc_option__Wno_unused_macros\""; } >&5
  (: CFLAG_NO_UNUSED_MACROS="$CFLAG_NO_UNUSED_MACROS $ac_cv_cflags_gcc_option__Wno_unused_macros") 2>&5
  ac_status=$?
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }
                      CFLAG_NO_UNUSED_MACROS="$CFLAG_NO_UNUSED_MACROS $ac_cv_cflags_gcc_option__Wno_unused_macros"
   fi
 ;;
esac


	else
	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking DEVELOPER_CFLAGS for irix/cc -fullwarn" >&5
$as_echo_n "checking DEVELOPER_CFLAGS for irix/cc -fullwarn... " >&6; }
if test "${ac_cv_cflags_irix_option__fullwarn+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  ac_cv_cflags_irix_option__fullwarn="no, unknown"

 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_save_CFLAGS="$CFLAGS"
for ac_arg in "-fullwarn -use_readonly_const % -fullwarn"        #
do CFLAGS="$ac_save_CFLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main ()
{
return 0;
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  ac_cv_cflags_irix_option__fullwarn=`echo $ac_arg | sed -e 's,.*% *,,'` ; break
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
done
 CFLAGS="$ac_save_CFLAGS"
 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


fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cflags_irix_option__fullwarn" >&5
$as_echo "$ac_cv_cflags_irix_option__fullwarn" >&6; }
case ".$ac_cv_cflags_irix_option__fullwarn" in
     .ok|.ok,*)  ;;
   .|.no|.no,*)  ;;
   *)
   if echo " $DEVELOPER_CFLAGS " | grep " $ac_cv_cflags_irix_option__fullwarn " 2>&1 >/dev/null
   then { { $as_echo "$as_me:${as_lineno-$LINENO}: : DEVELOPER_CFLAGS does contain \$ac_cv_cflags_irix_option__fullwarn"; } >&5
  (: DEVELOPER_CFLAGS does contain $ac_cv_cflags_irix_option__fullwarn) 2>&5
  ac_status=$?
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }
   else { { $as_echo "$as_me:${as_lineno-$LINENO}: : DEVELOPER_CFLAGS=\"\$DEVELOPER_CFLAGS \$ac_cv_cflags_irix_option__fullwarn\""; } >&5
  (: DEVELOPER_CFLAGS="$DEVELOPER_CFLAGS $ac_cv_cflags_irix_option__fullwarn") 2>&5
  ac_status=$?
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }
                      DEVELOPER_CFLAGS="$DEVELOPER_CFLAGS $ac_cv_cflags_irix_option__fullwarn"
   fi
 ;;
esac

	fi

    	CFLAGS="${OLD_CFLAGS}"
fi
if test -n "$DEVELOPER_CFLAGS"; then
	OLD_CFLAGS="${CFLAGS}"
	CFLAGS="${CFLAGS} ${DEVELOPER_CFLAGS}"
	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that the C compiler can use the DEVELOPER_CFLAGS" >&5
$as_echo_n "checking that the C compiler can use the DEVELOPER_CFLAGS... " >&6; }
	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
else
  DEVELOPER_CFLAGS=""; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
	CFLAGS="${OLD_CFLAGS}"
fi

# allow for --with-hostcc=gcc

# Check whether --with-hostcc was given.
if test "${with_hostcc+set}" = set; then :
  withval=$with_hostcc; HOSTCC=$withval
else

if test z"$cross_compiling" = "yes"; then
	HOSTCC=cc
else
	HOSTCC=$CC
fi

fi



# Extract the first word of "gcov", so it can be a program name with args.
set dummy gcov; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_GCOV+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  case $GCOV in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_GCOV="$GCOV" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_path_GCOV="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  ;;
esac
fi
GCOV=$ac_cv_path_GCOV
if test -n "$GCOV"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCOV" >&5
$as_echo "$GCOV" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi




# Extract the first word of "ld", so it can be a program name with args.
set dummy ld; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_PROG_LD+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  case $PROG_LD in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_PROG_LD="$PROG_LD" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_path_PROG_LD="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  ;;
esac
fi
PROG_LD=$ac_cv_path_PROG_LD
if test -n "$PROG_LD"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROG_LD" >&5
$as_echo "$PROG_LD" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


LD=${PROG_LD}
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
if test "${ac_cv_prog_gnu_ld+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  # I'd rather use --version here, but apparently some GNU ld's only accept -v.
if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
  ac_cv_prog_gnu_ld=yes
else
  ac_cv_prog_gnu_ld=no
fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gnu_ld" >&5
$as_echo "$ac_cv_prog_gnu_ld" >&6; }

LD=""






# Assume non-shared by default and override below
# these are the defaults, good for lots of systems
BLDSHARED="false"
LD="${CC}"
PICFLAG=""

# allow for --with-hostld=gcc

# Check whether --with-hostld was given.
if test "${with_hostld+set}" = set; then :
  withval=$with_hostld; HOSTLD=$withval
else
  HOSTLD=$HOSTCC
fi


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to try to build shared libraries on $host_os" >&5
$as_echo_n "checking whether to try to build shared libraries on $host_os... " >&6; }

# and these are for particular systems
case "$host_os" in
	*linux*)
		BLDSHARED="true"
		SYS_LDFLAGS="-Wl,--export-dynamic"
		;;
	*solaris*)
		BLDSHARED="true"
		if test "${GCC}" = "yes"; then
			if test "${ac_cv_prog_gnu_ld}" = "yes"; then
				SYS_LDFLAGS="-Wl,-E"
			fi
		fi
		;;
	*sunos*)
		BLDSHARED="true"
		;;
	*netbsd* | *freebsd* | *dragonfly* )
		BLDSHARED="true"
		SYS_LDFLAGS="-Wl,--export-dynamic"
		;;
	*openbsd*)
		BLDSHARED="true"
		SYS_LDFLAGS="-Wl,-Bdynamic"
		;;
	*irix*)
		BLDSHARED="true"
		;;
	*aix*)
		BLDSHARED="true"
		SYS_LDFLAGS="-Wl,-brtl,-bexpall,-bbigtoc"
		;;
	*hpux*)
		# Use special PIC flags for the native HP-UX compiler.
		BLDSHARED="true" # I hope this is correct
		if test "$host_cpu" = "ia64"; then
			SYS_LDFLAGS="-Wl,-E,+b/usr/local/lib/hpux32:/usr/lib/hpux32"
		else
			SYS_LDFLAGS="-Wl,-E,+b/usr/local/lib:/usr/lib"
		fi
		;;
	*osf*)
		BLDSHARED="true"
		;;
	*unixware*)
		BLDSHARED="true"
		;;
	*darwin*)
		BLDSHARED="true"
		;;
esac

{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $BLDSHARED" >&5
$as_echo "$BLDSHARED" >&6; }

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LD" >&5
$as_echo_n "checking LD... " >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
$as_echo "$LD" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDFLAGS" >&5
$as_echo_n "checking LDFLAGS... " >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDFLAGS" >&5
$as_echo "$LDFLAGS" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SYS_LDFLAGS" >&5
$as_echo_n "checking SYS_LDFLAGS... " >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYS_LDFLAGS" >&5
$as_echo "$SYS_LDFLAGS" >&6; }




	# Extract the first word of "ar", so it can be a program name with args.
set dummy ar; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_PROG_AR+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  case $PROG_AR in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_PROG_AR="$PROG_AR" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_path_PROG_AR="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  ;;
esac
fi
PROG_AR=$ac_cv_path_PROG_AR
if test -n "$PROG_AR"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROG_AR" >&5
$as_echo "$PROG_AR" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi



	STLD=${PROG_AR}




	STLD_FLAGS="-rcs"



{ $as_echo "$as_me:${as_lineno-$LINENO}: checking STLD" >&5
$as_echo_n "checking STLD... " >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $STLD" >&5
$as_echo "$STLD" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking STLD_FLAGS" >&5
$as_echo_n "checking STLD_FLAGS... " >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $STLD_FLAGS" >&5
$as_echo "$STLD_FLAGS" >&6; }


case "$host_os" in
	*linux*|*gnu*)
		PICFLAG="-fPIC"
		;;
	*solaris*)
		if test "${GCC}" = "yes"; then
			PICFLAG="-fPIC"
		else
			PICFLAG="-KPIC"
		fi
		;;
	*sunos*)
		PICFLAG="-KPIC"   # Is this correct for SunOS
		;;
	*netbsd* | *freebsd* | *dragonfly* )
		PICFLAG="-fPIC -DPIC"
		;;
	*openbsd*)
		PICFLAG="-fPIC"
		;;
	*irix*)
		if test "${GCC}" = "yes"; then
			PICFLAG="-fPIC"
		else
			PICFLAG="-KPIC"
		fi
		;;
	*aix*)
		# as AIX code is always position independent...
		PICFLAG="-O2"
		;;
	*hpux*)
		if test "${GCC}" = "yes"; then
			PICFLAG="-fPIC"
		elif test "$host_cpu" = "ia64"; then
		        PICFLAG="+z"
		elif test $ac_cv_prog_cc_Ae = yes; then
			PICFLAG="+z +ESnolit"
		fi
		;;
	*osf*)
		PICFLAG="-fPIC"
		;;
	*unixware*)
		PICFLAG="-KPIC"
		;;
	*darwin*)
		PICFLAG="-fno-common"
		;;
esac



saved_LDFLAGS="$LDFLAGS"
if { ac_try='${CC-cc} $CFLAGS -Wl,--version 2>&1 | grep "GNU ld" >/dev/null'
  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; }; then
	LD_EXPORT_DYNAMIC="-Wl,-export-dynamic"
else
	case "$host_os" in
		hpux* )
		  LD_EXPORT_DYNAMIC="-Wl,-E"
		  ;;
		*)
		  LD_EXPORT_DYNAMIC=""
		  ;;
	  esac
fi

LDFLAGS="$saved_LDFLAGS"


	SHLIBEXT="so"
	case "$host_os" in
		*hpux*)
			if test "$host_cpu" = "ia64"; then
				SHLIBEXT="so"
			else
				SHLIBEXT="sl"
			fi
		;;
		*darwin*)
			SHLIBEXT="dylib"
		;;
	esac




	SONAMEFLAG=""
	case "$host_os" in
		*linux*|*gnu*|*qnx*)
			SONAMEFLAG="-Wl,-soname="
			;;
		*solaris*)
			SONAMEFLAG="-h "
			if test "${GCC}" = "yes"; then
				SONAMEFLAG="-Wl,-soname="
			fi
			;;
		*sunos*)
			SONAMEFLAG="-Wl,-h,"
			;;
		*netbsd* | *freebsd* | *dragonfly* )
			SONAMEFLAG="-Wl,-soname,"
			;;
		*openbsd*)
			SONAMEFLAG="-Wl,-soname,"
			;;
		*irix*)
			SONAMEFLAG="-Wl,-soname,"
			;;
		*hpux*)
			SONAMEFLAG="-Wl,+h,"
			;;
		*osf*)
			SONAMEFLAG="-Wl,-soname,"
			;;
		*unixware*)
			SONAMEFLAG="-Wl,-soname,"
			;;
		*darwin*)
			SONAMEFLAG="#"
			;;
		*aix*)
			# Not supported
			SONAMEFLAG="#"
			;;
		esac


	LD_SHLIB_LINKER="${CC}"

	case "$host_os" in
		*irix*)
			LD_SHLIB_LINKER="${PROG_LD}"
			;;
	esac





	SHLD="$LD_SHLIB_LINKER"



	LD_SHLIB_FLAGS="-shared"

	case "$host_os" in
		*linux*|*gnu*)
			LD_SHLIB_FLAGS="-shared -Wl,-Bsymbolic"
			;;
		*solaris*)
			LD_SHLIB_FLAGS="-G"
			if test "${GCC}" = "no"; then
				## ${CFLAGS} added for building 64-bit shared
				## libs using Sun's Compiler
				LD_SHLIB_FLAGS="-G \${CFLAGS}"
			fi
			;;
		*sunos*)
			LD_SHLIB_FLAGS="-G"
			;;
		*irix*)
			LD_SHLIB_FLAGS="-shared"
			;;
		*aix*)
			LD_SHLIB_FLAGS="-Wl,-G,-bexpall,-bbigtoc"
			;;
		*hpux*)
			if test "${GCC}" = "yes"; then
				LD_SHLIB_FLAGS="-shared"
			else
				LD_SHLIB_FLAGS="-b"
			fi
			;;
		*osf*)
			LD_SHLIB_FLAGS="-shared"
			;;
		*darwin*)
			LD_SHLIB_FLAGS="-dynamiclib -Wl,-search_paths_first"
			;;
	esac




	LD_SHLIB_DISALLOW_UNDEF_FLAG=""

	#
	# TODO: enforce error not only warnings
	#
	# NOTE: -Wl,--no-allow-shlib-undefined isn't what we want...
	#       as it bails out on broken system libraries
	#
	case "$host_os" in
		*osf*)
			LD_SHLIB_DISALLOW_UNDEF_FLAG="-warning_unresolved"
			;;
		*darwin*)
			LD_SHLIB_DISALLOW_UNDEF_FLAG="-undefined error"
			;;
	esac






	SHLD_FLAGS="$LD_SHLIB_FLAGS $LD_SHLIB_DISALLOW_UNDEF_FLAG"




	MDLD="$LD_SHLIB_LINKER"



	LD_ALLOW_SHLIB_UNDEF_FLAG=""

	case "$host_os" in
		*linux*|*gnu*)
			LD_SHLIB_ALLOW_UNDEF_FLAG="-Wl,--allow-shlib-undefined"
			;;
		*osf*)
			LD_SHLIB_ALLOW_UNDEF_FLAG="-Wl,-expect_unresolved,\"*\""
			;;
		*darwin*)
			LD_SHLIB_ALLOW_UNDEF_FLAG="-undefined dynamic_lookup"
			;;
		*aix*)
			LD_SHLIB_ALLOW_UNDEF_FLAG="-Wl,-bnoentry"
			;;
	esac






	MDLD_FLAGS="$LD_SHLIB_FLAGS $LD_SHLIB_ALLOW_UNDEF_FLAG"



	case "$host_os" in
		*linux*|*gnu*)
			LIB_PATH_VAR=LD_LIBRARY_PATH
		;;
		*bsd*)
			LIB_PATH_VAR=LD_LIBRARY_PATH
		;;
		*solaris*)
			LIB_PATH_VAR=LD_LIBRARY_PATH
		;;
		*hpux*)
			LIB_PATH_VAR=SHLIB_PATH
		;;
		*osf*)
			LIB_PATH_VAR=LD_LIBRARY_PATH
		;;
		*aix*)
			LIB_PATH_VAR=LIBPATH
			;;
		*irix*)
			LIB_PATH_VAR=LD_LIBRARY_PATH
			;;
		*darwin*)
			LIB_PATH_VAR=DYLD_LIBRARY_PATH
			;;
		*)
			LIB_PATH_VAR=LD_LIBRARY_PATH
			;;
	esac




#######################################################
# test whether building a shared library actually works
if test $BLDSHARED = true; then

	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLD" >&5
$as_echo_n "checking SHLD... " >&6; }
	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLD" >&5
$as_echo "$SHLD" >&6; }
	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLD_FLAGS" >&5
$as_echo_n "checking SHLD_FLAGS... " >&6; }
	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLD_FLAGS" >&5
$as_echo "$SHLD_FLAGS" >&6; }

	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MDLD" >&5
$as_echo_n "checking MDLD... " >&6; }
	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MDLD" >&5
$as_echo "$MDLD" >&6; }
	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MDLD_FLAGS" >&5
$as_echo_n "checking MDLD_FLAGS... " >&6; }
	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MDLD_FLAGS" >&5
$as_echo "$MDLD_FLAGS" >&6; }

	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBEXT" >&5
$as_echo_n "checking SHLIBEXT... " >&6; }
	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBEXT" >&5
$as_echo "$SHLIBEXT" >&6; }
	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SONAMEFLAG" >&5
$as_echo_n "checking SONAMEFLAG... " >&6; }
	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SONAMEFLAG" >&5
$as_echo "$SONAMEFLAG" >&6; }

	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking PICFLAG" >&5
$as_echo_n "checking PICFLAG... " >&6; }
	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PICFLAG" >&5
$as_echo "$PICFLAG" >&6; }

	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether building shared libraries actually works" >&5
$as_echo_n "checking whether building shared libraries actually works... " >&6; }
if test "${ac_cv_shlib_works+set}" = set; then :
  $as_echo_n "(cached) " >&6
else

			ac_cv_shlib_works=no
			# try building a trivial shared library
			# TODO: also test SONAMEFLAG
			${CC} ${CFLAGS} ${PICFLAG} -c ${srcdir-.}/../tests/shlib.c -o shlib.o &&
				${SHLD} ${SHLD_FLAGS} -o shlib.${SHLIBEXT} shlib.o &&
				ac_cv_shlib_works=yes
			rm -f shlib.${SHLIBEXT} shlib.o

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_shlib_works" >&5
$as_echo "$ac_cv_shlib_works" >&6; }
	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether building shared modules actually works" >&5
$as_echo_n "checking whether building shared modules actually works... " >&6; }
if test "${ac_cv_shmod_works+set}" = set; then :
  $as_echo_n "(cached) " >&6
else

			ac_cv_shmod_works=no
			# try building a trivial shared library
			${CC} ${CFLAGS} ${PICFLAG} -c ${srcdir-.}/../tests/shlib.c -o shlib.o &&
				${MDLD} ${MDLD_FLAGS} -o shlib.${SHLIBEXT} shlib.o &&
				ac_cv_shmod_works=yes
			rm -f shlib.${SHLIBEXT} shlib.o

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_shmod_works" >&5
$as_echo "$ac_cv_shmod_works" >&6; }
	if test $ac_cv_shlib_works = no; then
		as_fn_error "unable to build shared libraries" "$LINENO" 5
	fi
	if test $ac_cv_shmod_works = no; then
		as_fn_error "unable to build shared modules" "$LINENO" 5
	fi
fi


cat >>confdefs.h <<_ACEOF
#define SHLIBEXT "$SHLIBEXT"
_ACEOF


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can link using the selected flags" >&5
$as_echo_n "checking if we can link using the selected flags... " >&6; }
if test "$cross_compiling" = yes; then :
  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot run when cross-compiling" >&5
$as_echo "$as_me: WARNING: cannot run when cross-compiling" >&2;}
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include "${srcdir-.}/../tests/trivial.c"
_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
else
  as_fn_error "we cannot link with the selected cc and ld flags. Aborting configure" "$LINENO" 5
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext
fi



USESHARED=false


# Check whether --enable-dso was given.
if test "${enable_dso+set}" = set; then :
  enableval=$enable_dso;
else
  enable_dso=no
fi


if test x"$enable_dso" = x"yes" -a x"$BLDSHARED" != x"true"; then
	as_fn_error "--enable-dso: no support for shared libraries" "$LINENO" 5
fi

if test x"$enable_dso" != x"no"; then
	USESHARED=$BLDSHARED
fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if binaries will use shared libraries" >&5
$as_echo_n "checking if binaries will use shared libraries... " >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $USESHARED" >&5
$as_echo "$USESHARED" >&6; }








for ac_prog in gmake make
do
  # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_MAKE+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  case $MAKE in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_path_MAKE="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  ;;
esac
fi
MAKE=$ac_cv_path_MAKE
if test -n "$MAKE"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
$as_echo "$MAKE" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


  test -n "$MAKE" && break
done


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we have GNU make" >&5
$as_echo_n "checking whether we have GNU make... " >&6; }
if test "${samba_cv_gnu_make+set}" = set; then :
  $as_echo_n "(cached) " >&6
else

if ! $ac_cv_path_MAKE --version | head -1 | grep GNU 2>/dev/null >/dev/null
then
	samba_cv_gnu_make=no
else
	samba_cv_gnu_make=yes
fi

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $samba_cv_gnu_make" >&5
$as_echo "$samba_cv_gnu_make" >&6; }
if test x$samba_cv_gnu_make = xyes; then
	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5
$as_echo "found" >&6; }
else
	as_fn_error "Unable to find GNU make" "$LINENO" 5
fi


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking GNU make version" >&5
$as_echo_n "checking GNU make version... " >&6; }
if test "${samba_cv_gnu_make_version+set}" = set; then :
  $as_echo_n "(cached) " >&6
else

		samba_cv_gnu_make_version=`$ac_cv_path_MAKE --version | head -1 | cut -d " " -f 3 2>/dev/null`

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $samba_cv_gnu_make_version" >&5
$as_echo "$samba_cv_gnu_make_version" >&6; }

GNU_MAKE_VERSION=$samba_cv_gnu_make_version


new_make=no
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU make >= 3.81" >&5
$as_echo_n "checking for GNU make >= 3.81... " >&6; }
if $PERL -e " \$_ = '$GNU_MAKE_VERSION'; s/[^\d\.].*//g; exit (\$_ < 3.81);"; then
	new_make=yes
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $new_make" >&5
$as_echo "$new_make" >&6; }
automatic_dependencies=no
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGS for gcc -M -MT conftest.d -MF conftest.o" >&5
$as_echo_n "checking CFLAGS for gcc -M -MT conftest.d -MF conftest.o... " >&6; }
if test "${ac_cv_cflags_gcc_option__M__MT_conftest_d__MF_conftest_o+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  ac_cv_cflags_gcc_option__M__MT_conftest_d__MF_conftest_o="no, unknown"

 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_save_CFLAGS="$CFLAGS"
for ac_arg in "-pedantic  % -M -MT conftest.d -MF conftest.o"     #
do CFLAGS="$ac_save_CFLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main ()
{
return 0;
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  ac_cv_cflags_gcc_option__M__MT_conftest_d__MF_conftest_o=`echo $ac_arg | sed -e 's,.*% *,,'` ; break
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
done
 CFLAGS="$ac_save_CFLAGS"
 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


fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cflags_gcc_option__M__MT_conftest_d__MF_conftest_o" >&5
$as_echo "$ac_cv_cflags_gcc_option__M__MT_conftest_d__MF_conftest_o" >&6; }
case ".$ac_cv_cflags_gcc_option__M__MT_conftest_d__MF_conftest_o" in
     .ok|.ok,*) automatic_dependencies=$new_make
 ;;
   .|.no|.no,*)  ;;
   *) automatic_dependencies=$new_make
 ;;
esac

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Whether to use automatic dependencies" >&5
$as_echo_n "checking Whether to use automatic dependencies... " >&6; }
# Check whether --enable-automatic-dependencies was given.
if test "${enable_automatic_dependencies+set}" = set; then :
  enableval=$enable_automatic_dependencies;  automatic_dependencies=$enableval
else
   automatic_dependencies=no
fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $automatic_dependencies" >&5
$as_echo "$automatic_dependencies" >&6; }


# Extract the first word of "xsltproc", so it can be a program name with args.
set dummy xsltproc; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_XSLTPROC+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  case $XSLTPROC in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  ;;
esac
fi
XSLTPROC=$ac_cv_path_XSLTPROC
if test -n "$XSLTPROC"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
$as_echo "$XSLTPROC" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi














	if test -z "$PYTHON_VER"; then
		for ac_prog in python2.6 python2.5 python2.4 python
do
  # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_PYTHON+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  case $PYTHON in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  ;;
esac
fi
PYTHON=$ac_cv_path_PYTHON
if test -n "$PYTHON"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
$as_echo "$PYTHON" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


  test -n "$PYTHON" && break
done

	else
		# Extract the first word of "python[$PYTHON_VER]", so it can be a program name with args.
set dummy python$PYTHON_VER; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_PYTHON+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  case $PYTHON in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  ;;
esac
fi
PYTHON=$ac_cv_path_PYTHON
if test -n "$PYTHON"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
$as_echo "$PYTHON" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


	fi
	if test -z "$PYTHON"; then
		working_python=no
		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No python found" >&5
$as_echo "$as_me: WARNING: No python found" >&2;}
	fi

		working_python=no

	if test -z "$PYTHON_VER"; then
		for ac_prog in python2.6-config python2.5-config python2.4-config python-config
do
  # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_PYTHON_CONFIG+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  case $PYTHON_CONFIG in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_PYTHON_CONFIG="$PYTHON_CONFIG" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_path_PYTHON_CONFIG="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  ;;
esac
fi
PYTHON_CONFIG=$ac_cv_path_PYTHON_CONFIG
if test -n "$PYTHON_CONFIG"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_CONFIG" >&5
$as_echo "$PYTHON_CONFIG" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


  test -n "$PYTHON_CONFIG" && break
done

	else
		# Extract the first word of "python[$PYTHON_VER]-config", so it can be a program name with args.
set dummy python$PYTHON_VER-config; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_PYTHON_CONFIG+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  case $PYTHON_CONFIG in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_PYTHON_CONFIG="$PYTHON_CONFIG" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_path_PYTHON_CONFIG="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  ;;
esac
fi
PYTHON_CONFIG=$ac_cv_path_PYTHON_CONFIG
if test -n "$PYTHON_CONFIG"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_CONFIG" >&5
$as_echo "$PYTHON_CONFIG" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


	fi

	if test -z "$PYTHON_CONFIG"; then
		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No python-config found" >&5
$as_echo "$as_me: WARNING: No python-config found" >&2;}
	else

	if test $working_python = no; then
		ac_save_LIBS="$LIBS"
		ac_save_CFLAGS="$CFLAGS"
		LIBS="$LIBS `$PYTHON_CONFIG --ldflags`"
		CFLAGS="$CFLAGS `$PYTHON_CONFIG --includes`"

		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

                                #undef HAVE_UINTPTR_T
				/* we have our own configure tests */
				#include <Python.h>

int
main ()
{

				Py_InitModule(NULL, NULL);

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :

				PYTHON_LDFLAGS="`$PYTHON_CONFIG --ldflags`"
				PYTHON_CFLAGS="`$PYTHON_CONFIG --includes`"
				working_python=yes

fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
		LIBS="$ac_save_LIBS"
		CFLAGS="$ac_save_CFLAGS"
	fi


	if test $working_python = no; then
		ac_save_LIBS="$LIBS"
		ac_save_CFLAGS="$CFLAGS"
		LIBS="$LIBS `$PYTHON_CONFIG --ldflags`"
		CFLAGS="$CFLAGS `$PYTHON_CONFIG --cflags`"

		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

                                #undef HAVE_UINTPTR_T
				/* we have our own configure tests */
				#include <Python.h>

int
main ()
{

				Py_InitModule(NULL, NULL);

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :

				PYTHON_LDFLAGS="`$PYTHON_CONFIG --ldflags`"
				PYTHON_CFLAGS="`$PYTHON_CONFIG --cflags`"
				working_python=yes

fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
		LIBS="$ac_save_LIBS"
		CFLAGS="$ac_save_CFLAGS"
	fi

		if test x$working_python = xno; then
			# It seems the library path isn't included on some systems
			base=`$PYTHON_CONFIG --prefix`

	if test $working_python = no; then
		ac_save_LIBS="$LIBS"
		ac_save_CFLAGS="$CFLAGS"
		LIBS="$LIBS `echo -n -L${base}/lib " "; $PYTHON_CONFIG --ldflags`"
		CFLAGS="$CFLAGS `$PYTHON_CONFIG --includes`"

		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

                                #undef HAVE_UINTPTR_T
				/* we have our own configure tests */
				#include <Python.h>

int
main ()
{

				Py_InitModule(NULL, NULL);

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :

				PYTHON_LDFLAGS="`echo -n -L${base}/lib " "; $PYTHON_CONFIG --ldflags`"
				PYTHON_CFLAGS="`$PYTHON_CONFIG --includes`"
				working_python=yes

fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
		LIBS="$ac_save_LIBS"
		CFLAGS="$ac_save_CFLAGS"
	fi


	if test $working_python = no; then
		ac_save_LIBS="$LIBS"
		ac_save_CFLAGS="$CFLAGS"
		LIBS="$LIBS `echo -n -L${base}/lib " "; $PYTHON_CONFIG --ldflags`"
		CFLAGS="$CFLAGS `$PYTHON_CONFIG --cflags`"

		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

                                #undef HAVE_UINTPTR_T
				/* we have our own configure tests */
				#include <Python.h>

int
main ()
{

				Py_InitModule(NULL, NULL);

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :

				PYTHON_LDFLAGS="`echo -n -L${base}/lib " "; $PYTHON_CONFIG --ldflags`"
				PYTHON_CFLAGS="`$PYTHON_CONFIG --cflags`"
				working_python=yes

fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
		LIBS="$ac_save_LIBS"
		CFLAGS="$ac_save_CFLAGS"
	fi

		fi
	fi

	if test x$PYTHON != x
	then
		DISTUTILS_CFLAGS=`$PYTHON -c "from distutils import sysconfig; \
					      print '-I%s -I%s %s' % ( \
							sysconfig.get_python_inc(), \
							sysconfig.get_python_inc(plat_specific=1), \
							sysconfig.get_config_var('CFLAGS'))"`
		DISTUTILS_LDFLAGS=`$PYTHON -c "from distutils import sysconfig; \
					       print '%s %s -lpython%s -L%s %s -L%s' % ( \
							sysconfig.get_config_var('LIBS'), \
							sysconfig.get_config_var('SYSLIBS'), \
							sysconfig.get_config_var('VERSION'), \
							sysconfig.get_config_var('LIBDIR'), \
							sysconfig.get_config_var('LDFLAGS'), \
							sysconfig.get_config_var('LIBPL'))"`

	if test $working_python = no; then
		ac_save_LIBS="$LIBS"
		ac_save_CFLAGS="$CFLAGS"
		LIBS="$LIBS $DISTUTILS_LDFLAGS"
		CFLAGS="$CFLAGS $DISTUTILS_CFLAGS"

		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

                                #undef HAVE_UINTPTR_T
				/* we have our own configure tests */
				#include <Python.h>

int
main ()
{

				Py_InitModule(NULL, NULL);

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :

				PYTHON_LDFLAGS="$DISTUTILS_LDFLAGS"
				PYTHON_CFLAGS="$DISTUTILS_CFLAGS"
				working_python=yes

fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
		LIBS="$ac_save_LIBS"
		CFLAGS="$ac_save_CFLAGS"
	fi

	fi

	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking working python module support" >&5
$as_echo_n "checking working python module support... " >&6; }
	if test $working_python = yes; then
		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }


MAKE_SETTINGS="$MAKE_SETTINGS
EXT_LIB_PYTHON_LIBS = $PYTHON_LDFLAGS
EXT_LIB_PYTHON_CFLAGS = $PYTHON_CFLAGS
EXT_LIB_PYTHON_CPPFLAGS =
EXT_LIB_PYTHON_LDFLAGS =
"



	MAKE_SETTINGS="$MAKE_SETTINGS
EXT_LIB_PYTHON_ENABLE = YES
"
SMB_INFO_ENABLES="$SMB_INFO_ENABLES
\$enabled{\"EXT_LIB_PYTHON\"} = \"YES\";"


	MAKE_SETTINGS="$MAKE_SETTINGS
LIBPYTHON_ENABLE = YES
"
SMB_INFO_ENABLES="$SMB_INFO_ENABLES
\$enabled{\"LIBPYTHON\"} = \"YES\";"


	else
		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }

as_fn_error "Python not found. Please install Python 2.x and its development headers/libraries." "$LINENO" 5

	fi


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking python library directory" >&5
$as_echo_n "checking python library directory... " >&6; }
pythondir=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib(1, 0, '\\${prefix}')"`
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pythondir" >&5
$as_echo "$pythondir" >&6; }




echo "LIBREPLACE_BROKEN_CHECKS: START"

libreplacedir=""
libreplacepaths="$srcdir $srcdir/lib/replace $srcdir/libreplace $srcdir/../libreplace $srcdir/../replace $srcdir/../lib/replace $srcdir/../../../lib/replace"
for d in $libreplacepaths; do
	if test -f "$d/replace.c"; then
		libreplacedir="$d"

		break;
	fi
done
if test x"$libreplacedir" = "x"; then
	as_fn_error "cannot find libreplace in $libreplacepaths" "$LINENO" 5
fi

LIBREPLACEOBJ="$libreplacedir/replace.o"


LIBREPLACEOBJ="${LIBREPLACEOBJ} $libreplacedir/snprintf.o"

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
$as_echo_n "checking return type of signal handlers... " >&6; }
if test "${ac_cv_type_signal+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <sys/types.h>
#include <signal.h>

int
main ()
{
return *(signal (0, 0)) (0) == 1;
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  ac_cv_type_signal=int
else
  ac_cv_type_signal=void
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
$as_echo "$ac_cv_type_signal" >&6; }

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


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
if test "${ac_cv_type_uid_t+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end 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
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
$as_echo "$ac_cv_type_uid_t" >&6; }
if test $ac_cv_type_uid_t = no; then

$as_echo "#define uid_t int" >>confdefs.h


$as_echo "#define gid_t int" >>confdefs.h

fi

ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
if test "x$ac_cv_type_mode_t" = x""yes; then :

else

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

fi

ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
if test "x$ac_cv_type_off_t" = x""yes; then :

else

cat >>confdefs.h <<_ACEOF
#define off_t long int
_ACEOF

fi

ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
if test "x$ac_cv_type_size_t" = x""yes; then :

else

cat >>confdefs.h <<_ACEOF
#define size_t unsigned int
_ACEOF

fi

ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
if test "x$ac_cv_type_pid_t" = x""yes; then :

else

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

fi

ac_fn_c_check_member "$LINENO" "struct stat" "st_rdev" "ac_cv_member_struct_stat_st_rdev" "$ac_includes_default"
if test "x$ac_cv_member_struct_stat_st_rdev" = x""yes; then :

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


$as_echo "#define HAVE_ST_RDEV 1" >>confdefs.h

fi


ac_fn_c_check_type "$LINENO" "ino_t" "ac_cv_type_ino_t" "$ac_includes_default"
if test "x$ac_cv_type_ino_t" = x""yes; then :

else

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

fi

ac_fn_c_check_type "$LINENO" "loff_t" "ac_cv_type_loff_t" "$ac_includes_default"
if test "x$ac_cv_type_loff_t" = x""yes; then :

else

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

fi

ac_fn_c_check_type "$LINENO" "offset_t" "ac_cv_type_offset_t" "$ac_includes_default"
if test "x$ac_cv_type_offset_t" = x""yes; then :

else

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

fi


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working memcmp" >&5
$as_echo_n "checking for working memcmp... " >&6; }
if test "${ac_cv_func_memcmp_working+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  if test "$cross_compiling" = yes; then :
  ac_cv_func_memcmp_working=no
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{

  /* Some versions of memcmp are not 8-bit clean.  */
  char c0 = '\100', c1 = '\200', c2 = '\201';
  if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0)
    return 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)
	  return 1;
      }
    return 0;
  }

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
  ac_cv_func_memcmp_working=yes
else
  ac_cv_func_memcmp_working=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext
fi

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_memcmp_working" >&5
$as_echo "$ac_cv_func_memcmp_working" >&6; }
test $ac_cv_func_memcmp_working = no && case " $LIBOBJS " in
  *" memcmp.$ac_objext "* ) ;;
  *) LIBOBJS="$LIBOBJS memcmp.$ac_objext"
 ;;
esac



for ac_func in pipe strftime srandom random srand rand usleep setbuffer lstat getpgrp utime utimes
do :
  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
eval as_val=\$$as_ac_var
   if test "x$as_val" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF

fi
done


for ac_header in stdbool.h stdint.h sys/select.h
do :
  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
eval as_val=\$$as_ac_Header
   if test "x$as_val" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF

fi

done

for ac_header in setjmp.h utime.h
do :
  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
eval as_val=\$$as_ac_Header
   if test "x$as_val" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF

fi

done


ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
if test "x$ac_cv_header_stdint_h" = x""yes; then :
   ac_config_commands="$ac_config_commands rm-stdint.h"

else
   ac_config_commands="$ac_config_commands mk-stdint.h"


fi



ac_fn_c_check_header_mongrel "$LINENO" "stdbool.h" "ac_cv_header_stdbool_h" "$ac_includes_default"
if test "x$ac_cv_header_stdbool_h" = x""yes; then :
   ac_config_commands="$ac_config_commands rm-stdbool.h"

else
   ac_config_commands="$ac_config_commands mk-stdbool.h"


fi




ac_fn_c_check_type "$LINENO" "bool" "ac_cv_type_bool" "
$ac_includes_default
#ifdef HAVE_STDBOOL_H
#include <stdbool.h>
#endif

"
if test "x$ac_cv_type_bool" = x""yes; then :

$as_echo "#define HAVE_BOOL 1" >>confdefs.h

fi


ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "
$ac_includes_default
#ifdef HAVE_STDBOOL_H
#include <stdbool.h>
#endif

"
if test "x$ac_cv_type__Bool" = x""yes; then :

$as_echo "#define HAVE__Bool 1" >>confdefs.h

fi


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
$as_echo_n "checking for working mmap... " >&6; }
if test "${libreplace_cv_HAVE_MMAP+set}" = set; then :
  $as_echo_n "(cached) " >&6
else

if test "$cross_compiling" = yes; then :
  libreplace_cv_HAVE_MMAP=cross
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include "$libreplacedir/test/shared_mmap.c"
_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
  libreplace_cv_HAVE_MMAP=yes
else
  libreplace_cv_HAVE_MMAP=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext
fi

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libreplace_cv_HAVE_MMAP" >&5
$as_echo "$libreplace_cv_HAVE_MMAP" >&6; }
if test x"$libreplace_cv_HAVE_MMAP" = x"yes"; then

$as_echo "#define HAVE_MMAP 1" >>confdefs.h

fi


for ac_header in sys/syslog.h syslog.h
do :
  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
eval as_val=\$$as_ac_Header
   if test "x$as_val" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF

fi

done

for ac_header in sys/time.h time.h
do :
  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
eval as_val=\$$as_ac_Header
   if test "x$as_val" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF

fi

done

for ac_header in stdarg.h vararg.h
do :
  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
eval as_val=\$$as_ac_Header
   if test "x$as_val" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF

fi

done

for ac_header in sys/mount.h mntent.h
do :
  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
eval as_val=\$$as_ac_Header
   if test "x$as_val" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF

fi

done

for ac_header in stropts.h
do :
  ac_fn_c_check_header_mongrel "$LINENO" "stropts.h" "ac_cv_header_stropts_h" "$ac_includes_default"
if test "x$ac_cv_header_stropts_h" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_STROPTS_H 1
_ACEOF

fi

done

for ac_header in unix.h
do :
  ac_fn_c_check_header_mongrel "$LINENO" "unix.h" "ac_cv_header_unix_h" "$ac_includes_default"
if test "x$ac_cv_header_unix_h" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_UNIX_H 1
_ACEOF

fi

done


for ac_func in seteuid setresuid setegid setresgid chroot bzero strerror
do :
  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
eval as_val=\$$as_ac_var
   if test "x$as_val" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF

fi
done

for ac_func in vsyslog setlinebuf mktime ftruncate chsize rename
do :
  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
eval as_val=\$$as_ac_var
   if test "x$as_val" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF

fi
done

for ac_func in waitpid wait4 strlcpy strlcat initgroups memmove strdup
do :
  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
eval as_val=\$$as_ac_var
   if test "x$as_val" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF

fi
done

for ac_func in pread pwrite strndup strcasestr strtok_r mkdtemp dup2
do :
  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
eval as_val=\$$as_ac_var
   if test "x$as_val" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF

fi
done

for ac_func in isatty chown lchown link readlink symlink realpath
do :
  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
eval as_val=\$$as_ac_var
   if test "x$as_val" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF

fi
done


 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for setresuid declaration" >&5
$as_echo_n "checking for setresuid declaration... " >&6; }
if test "${ac_cv_have_setresuid_decl+set}" = set; then :
  $as_echo_n "(cached) " >&6
else

    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <unistd.h>
int
main ()
{
int i = (int)setresuid
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  ac_cv_have_setresuid_decl=yes
else
  ac_cv_have_setresuid_decl=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_setresuid_decl" >&5
$as_echo "$ac_cv_have_setresuid_decl" >&6; }
 if test x"$ac_cv_have_setresuid_decl" = x"yes"; then

$as_echo "#define HAVE_SETRESUID_DECL 1" >>confdefs.h

 fi


 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for setresgid declaration" >&5
$as_echo_n "checking for setresgid declaration... " >&6; }
if test "${ac_cv_have_setresgid_decl+set}" = set; then :
  $as_echo_n "(cached) " >&6
else

    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <unistd.h>
int
main ()
{
int i = (int)setresgid
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  ac_cv_have_setresgid_decl=yes
else
  ac_cv_have_setresgid_decl=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_setresgid_decl" >&5
$as_echo "$ac_cv_have_setresgid_decl" >&6; }
 if test x"$ac_cv_have_setresgid_decl" = x"yes"; then

$as_echo "#define HAVE_SETRESGID_DECL 1" >>confdefs.h

 fi


 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for errno declaration" >&5
$as_echo_n "checking for errno declaration... " >&6; }
if test "${ac_cv_have_errno_decl+set}" = set; then :
  $as_echo_n "(cached) " >&6
else

    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <errno.h>
int
main ()
{
int i = (int)errno
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  ac_cv_have_errno_decl=yes
else
  ac_cv_have_errno_decl=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_errno_decl" >&5
$as_echo "$ac_cv_have_errno_decl" >&6; }
 if test x"$ac_cv_have_errno_decl" = x"yes"; then

$as_echo "#define HAVE_ERRNO_DECL 1" >>confdefs.h

 fi


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for secure mkstemp" >&5
$as_echo_n "checking for secure mkstemp... " >&6; }
if test "${libreplace_cv_HAVE_SECURE_MKSTEMP+set}" = set; then :
  $as_echo_n "(cached) " >&6
else

if test "$cross_compiling" = yes; then :
  libreplace_cv_HAVE_SECURE_MKSTEMP=cross
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end 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
if ac_fn_c_try_run "$LINENO"; then :
  libreplace_cv_HAVE_SECURE_MKSTEMP=yes
else
  libreplace_cv_HAVE_SECURE_MKSTEMP=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext
fi

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libreplace_cv_HAVE_SECURE_MKSTEMP" >&5
$as_echo "$libreplace_cv_HAVE_SECURE_MKSTEMP" >&6; }
if test x"$libreplace_cv_HAVE_SECURE_MKSTEMP" = x"yes"; then

$as_echo "#define HAVE_SECURE_MKSTEMP 1" >>confdefs.h

fi

for ac_header in stdio.h strings.h
do :
  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
eval as_val=\$$as_ac_Header
   if test "x$as_val" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF

fi

done

ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
if test "x$ac_cv_have_decl_snprintf" = x""yes; then :
  ac_have_decl=1
else
  ac_have_decl=0
fi

cat >>confdefs.h <<_ACEOF
#define HAVE_DECL_SNPRINTF $ac_have_decl
_ACEOF
ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
if test "x$ac_cv_have_decl_vsnprintf" = x""yes; then :
  ac_have_decl=1
else
  ac_have_decl=0
fi

cat >>confdefs.h <<_ACEOF
#define HAVE_DECL_VSNPRINTF $ac_have_decl
_ACEOF
ac_fn_c_check_decl "$LINENO" "asprintf" "ac_cv_have_decl_asprintf" "$ac_includes_default"
if test "x$ac_cv_have_decl_asprintf" = x""yes; then :
  ac_have_decl=1
else
  ac_have_decl=0
fi

cat >>confdefs.h <<_ACEOF
#define HAVE_DECL_ASPRINTF $ac_have_decl
_ACEOF
ac_fn_c_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default"
if test "x$ac_cv_have_decl_vasprintf" = x""yes; then :
  ac_have_decl=1
else
  ac_have_decl=0
fi

cat >>confdefs.h <<_ACEOF
#define HAVE_DECL_VASPRINTF $ac_have_decl
_ACEOF

for ac_func in snprintf vsnprintf asprintf vasprintf
do :
  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
eval as_val=\$$as_ac_var
   if test "x$as_val" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF

fi
done


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C99 vsnprintf" >&5
$as_echo_n "checking for C99 vsnprintf... " >&6; }
if test "${libreplace_cv_HAVE_C99_VSNPRINTF+set}" = set; then :
  $as_echo_n "(cached) " >&6
else

if test "$cross_compiling" = yes; then :
  libreplace_cv_HAVE_C99_VSNPRINTF=cross
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include <sys/types.h>
#include <stdio.h>
#include <stdarg.h>
#include <stdlib.h>
void foo(const char *format, ...) {
       va_list ap;
       int len;
       char buf[20];
       long long l = 1234567890;
       l *= 100;

       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(2);

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

       if (snprintf(buf, 20, "%lld", l) != 12 || strcmp(buf, "123456789000") != 0) exit(4);
       if (snprintf(buf, 20, "%zu", 123456789) != 9 || strcmp(buf, "123456789") != 0) exit(5);
       if (snprintf(buf, 20, "%2\$d %1\$d", 3, 4) != 3 || strcmp(buf, "4 3") != 0) exit(6);
       if (snprintf(buf, 20, "%s", 0) < 3) exit(7);

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

_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
  libreplace_cv_HAVE_C99_VSNPRINTF=yes
else
  libreplace_cv_HAVE_C99_VSNPRINTF=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext
fi

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libreplace_cv_HAVE_C99_VSNPRINTF" >&5
$as_echo "$libreplace_cv_HAVE_C99_VSNPRINTF" >&6; }
if test x"$libreplace_cv_HAVE_C99_VSNPRINTF" = x"yes"; then

$as_echo "#define HAVE_C99_VSNPRINTF 1" >>confdefs.h

fi


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for va_copy" >&5
$as_echo_n "checking for va_copy... " >&6; }
if test "${libreplace_cv_HAVE_VA_COPY+set}" = set; then :
  $as_echo_n "(cached) " >&6
else

cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <stdarg.h>
va_list ap1,ap2;
int
main ()
{
va_copy(ap1,ap2);
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  libreplace_cv_HAVE_VA_COPY=yes
else
  libreplace_cv_HAVE_VA_COPY=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libreplace_cv_HAVE_VA_COPY" >&5
$as_echo "$libreplace_cv_HAVE_VA_COPY" >&6; }
if test x"$libreplace_cv_HAVE_VA_COPY" = x"yes"; then

$as_echo "#define HAVE_VA_COPY 1" >>confdefs.h

fi

if test x"$libreplace_cv_HAVE_VA_COPY" != x"yes"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __va_copy" >&5
$as_echo_n "checking for __va_copy... " >&6; }
if test "${libreplace_cv_HAVE___VA_COPY+set}" = set; then :
  $as_echo_n "(cached) " >&6
else

cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <stdarg.h>
va_list ap1,ap2;
int
main ()
{
__va_copy(ap1,ap2);
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  libreplace_cv_HAVE___VA_COPY=yes
else
  libreplace_cv_HAVE___VA_COPY=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libreplace_cv_HAVE___VA_COPY" >&5
$as_echo "$libreplace_cv_HAVE___VA_COPY" >&6; }
if test x"$libreplace_cv_HAVE___VA_COPY" = x"yes"; then

$as_echo "#define HAVE___VA_COPY 1" >>confdefs.h

fi
fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __FUNCTION__ macro" >&5
$as_echo_n "checking for __FUNCTION__ macro... " >&6; }
if test "${libreplace_cv_HAVE_FUNCTION_MACRO+set}" = set; then :
  $as_echo_n "(cached) " >&6
else

cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <stdio.h>
int
main ()
{
printf("%s\n", __FUNCTION__);
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  libreplace_cv_HAVE_FUNCTION_MACRO=yes
else
  libreplace_cv_HAVE_FUNCTION_MACRO=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libreplace_cv_HAVE_FUNCTION_MACRO" >&5
$as_echo "$libreplace_cv_HAVE_FUNCTION_MACRO" >&6; }
if test x"$libreplace_cv_HAVE_FUNCTION_MACRO" = x"yes"; then

$as_echo "#define HAVE_FUNCTION_MACRO 1" >>confdefs.h

else
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __func__ macro" >&5
$as_echo_n "checking for __func__ macro... " >&6; }
if test "${libreplace_cv_HAVE_func_MACRO+set}" = set; then :
  $as_echo_n "(cached) " >&6
else

    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <stdio.h>
int
main ()
{
printf("%s\n", __func__);
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  libreplace_cv_HAVE_func_MACRO=yes
else
  libreplace_cv_HAVE_func_MACRO=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libreplace_cv_HAVE_func_MACRO" >&5
$as_echo "$libreplace_cv_HAVE_func_MACRO" >&6; }
    if test x"$libreplace_cv_HAVE_func_MACRO" = x"yes"; then

$as_echo "#define HAVE_func_MACRO 1" >>confdefs.h

    fi
fi

for ac_header in sys/param.h limits.h
do :
  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
eval as_val=\$$as_ac_Header
   if test "x$as_val" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF

fi

done


ac_fn_c_check_type "$LINENO" "comparison_fn_t" "ac_cv_type_comparison_fn_t" "$ac_includes_default"
if test "x$ac_cv_type_comparison_fn_t" = x""yes; then :

$as_echo "#define HAVE_COMPARISON_FN_T 1" >>confdefs.h

fi



 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for setenv declaration" >&5
$as_echo_n "checking for setenv declaration... " >&6; }
if test "${ac_cv_have_setenv_decl+set}" = set; then :
  $as_echo_n "(cached) " >&6
else

    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <stdlib.h>
int
main ()
{
int i = (int)setenv
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  ac_cv_have_setenv_decl=yes
else
  ac_cv_have_setenv_decl=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_setenv_decl" >&5
$as_echo "$ac_cv_have_setenv_decl" >&6; }
 if test x"$ac_cv_have_setenv_decl" = x"yes"; then

$as_echo "#define HAVE_SETENV_DECL 1" >>confdefs.h

 fi

for ac_func in setenv unsetenv
do :
  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
eval as_val=\$$as_ac_var
   if test "x$as_val" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF

fi
done


 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for environ declaration" >&5
$as_echo_n "checking for environ declaration... " >&6; }
if test "${ac_cv_have_environ_decl+set}" = set; then :
  $as_echo_n "(cached) " >&6
else

    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <unistd.h>
int
main ()
{
int i = (int)environ
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  ac_cv_have_environ_decl=yes
else
  ac_cv_have_environ_decl=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_environ_decl" >&5
$as_echo "$ac_cv_have_environ_decl" >&6; }
 if test x"$ac_cv_have_environ_decl" = x"yes"; then

$as_echo "#define HAVE_ENVIRON_DECL 1" >>confdefs.h

 fi


for ac_func in strnlen
do :
  ac_fn_c_check_func "$LINENO" "strnlen" "ac_cv_func_strnlen"
if test "x$ac_cv_func_strnlen" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_STRNLEN 1
_ACEOF

fi
done

for ac_func in strtoull __strtoull strtouq strtoll __strtoll strtoq
do :
  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
eval as_val=\$$as_ac_var
   if test "x$as_val" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF

fi
done


# this test disabled as we don't actually need __VA_ARGS__ yet
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#define eprintf(...) fprintf(stderr, __VA_ARGS__)
eprintf("bla", "bar");

_ACEOF
if ac_fn_c_try_cpp "$LINENO"; then :

$as_echo "#define HAVE__VA_ARGS__MACRO 1" >>confdefs.h

fi
rm -f conftest.err conftest.$ac_ext


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sig_atomic_t type" >&5
$as_echo_n "checking for sig_atomic_t type... " >&6; }
if test "${libreplace_cv_sig_atomic_t+set}" = set; then :
  $as_echo_n "(cached) " >&6
else

    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end 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
if ac_fn_c_try_compile "$LINENO"; then :
  libreplace_cv_sig_atomic_t=yes
else
  libreplace_cv_sig_atomic_t=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libreplace_cv_sig_atomic_t" >&5
$as_echo "$libreplace_cv_sig_atomic_t" >&6; }
if test x"$libreplace_cv_sig_atomic_t" = x"yes"; then

$as_echo "#define HAVE_SIG_ATOMIC_T_TYPE 1" >>confdefs.h

fi


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for O_DIRECT flag to open(2)" >&5
$as_echo_n "checking for O_DIRECT flag to open(2)... " >&6; }
if test "${libreplace_cv_HAVE_OPEN_O_DIRECT+set}" = set; then :
  $as_echo_n "(cached) " >&6
else

cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include <unistd.h>
#ifdef HAVE_FCNTL_H
#include <fcntl.h>
#endif
int
main ()
{
int fd = open("/dev/null", O_DIRECT);
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  libreplace_cv_HAVE_OPEN_O_DIRECT=yes
else
  libreplace_cv_HAVE_OPEN_O_DIRECT=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libreplace_cv_HAVE_OPEN_O_DIRECT" >&5
$as_echo "$libreplace_cv_HAVE_OPEN_O_DIRECT" >&6; }
if test x"$libreplace_cv_HAVE_OPEN_O_DIRECT" = x"yes"; then

$as_echo "#define HAVE_OPEN_O_DIRECT 1" >>confdefs.h

fi


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that the C compiler understands volatile" >&5
$as_echo_n "checking that the C compiler understands volatile... " >&6; }
if test "${libreplace_cv_volatile+set}" = set; then :
  $as_echo_n "(cached) " >&6
else

	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <sys/types.h>
int
main ()
{
volatile int i = 0
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  libreplace_cv_volatile=yes
else
  libreplace_cv_volatile=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libreplace_cv_volatile" >&5
$as_echo "$libreplace_cv_volatile" >&6; }
if test x"$libreplace_cv_volatile" = x"yes"; then

$as_echo "#define HAVE_VOLATILE 1" >>confdefs.h

fi

# filesys
ac_header_dirent=no
for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
  as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <sys/types.h>
#include <$ac_hdr>

int
main ()
{
if ((DIR *) 0)
return 0;
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  eval "$as_ac_Header=yes"
else
  eval "$as_ac_Header=no"
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
eval ac_res=\$$as_ac_Header
	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
eval as_val=\$$as_ac_Header
   if test "x$as_val" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
_ACEOF

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
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
$as_echo_n "checking for library containing opendir... " >&6; }
if test "${ac_cv_search_opendir+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char opendir ();
int
main ()
{
return opendir ();
  ;
  return 0;
}
_ACEOF
for ac_lib in '' dir; do
  if test -z "$ac_lib"; then
    ac_res="none required"
  else
    ac_res=-l$ac_lib
    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
  fi
  if ac_fn_c_try_link "$LINENO"; then :
  ac_cv_search_opendir=$ac_res
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext
  if test "${ac_cv_search_opendir+set}" = set; then :
  break
fi
done
if test "${ac_cv_search_opendir+set}" = set; then :

else
  ac_cv_search_opendir=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
$as_echo "$ac_cv_search_opendir" >&6; }
ac_res=$ac_cv_search_opendir
if test "$ac_res" != no; then :
  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"

fi

else
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
$as_echo_n "checking for library containing opendir... " >&6; }
if test "${ac_cv_search_opendir+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char opendir ();
int
main ()
{
return opendir ();
  ;
  return 0;
}
_ACEOF
for ac_lib in '' x; do
  if test -z "$ac_lib"; then
    ac_res="none required"
  else
    ac_res=-l$ac_lib
    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
  fi
  if ac_fn_c_try_link "$LINENO"; then :
  ac_cv_search_opendir=$ac_res
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext
  if test "${ac_cv_search_opendir+set}" = set; then :
  break
fi
done
if test "${ac_cv_search_opendir+set}" = set; then :

else
  ac_cv_search_opendir=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
$as_echo "$ac_cv_search_opendir" >&6; }
ac_res=$ac_cv_search_opendir
if test "$ac_res" != no; then :
  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"

fi

fi

for ac_header in fcntl.h sys/fcntl.h sys/resource.h sys/ioctl.h sys/mode.h sys/filio.h sys/fs/s5param.h sys/filsys.h
do :
  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
eval as_val=\$$as_ac_Header
   if test "x$as_val" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF

fi

done

for ac_header in sys/acl.h acl/libacl.h
do :
  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
eval as_val=\$$as_ac_Header
   if test "x$as_val" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF

fi

done


# select
for ac_header in sys/select.h
do :
  ac_fn_c_check_header_mongrel "$LINENO" "sys/select.h" "ac_cv_header_sys_select_h" "$ac_includes_default"
if test "x$ac_cv_header_sys_select_h" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_SYS_SELECT_H 1
_ACEOF

fi

done


# time
for ac_header in sys/time.h utime.h
do :
  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
eval as_val=\$$as_ac_Header
   if test "x$as_val" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF

fi

done

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
if test "${ac_cv_header_time+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <sys/types.h>
#include <sys/time.h>
#include <time.h>

int
main ()
{
if ((struct tm *) 0)
return 0;
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  ac_cv_header_time=yes
else
  ac_cv_header_time=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
$as_echo "$ac_cv_header_time" >&6; }
if test $ac_cv_header_time = yes; then

$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h

fi

for ac_func in utime utimes
do :
  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
eval as_val=\$$as_ac_var
   if test "x$as_val" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF

fi
done


# wait
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5
$as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; }
if test "${ac_cv_header_sys_wait_h+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <sys/types.h>
#include <sys/wait.h>
#ifndef WEXITSTATUS
# define WEXITSTATUS(stat_val) ((unsigned int) (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
if ac_fn_c_try_compile "$LINENO"; then :
  ac_cv_header_sys_wait_h=yes
else
  ac_cv_header_sys_wait_h=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5
$as_echo "$ac_cv_header_sys_wait_h" >&6; }
if test $ac_cv_header_sys_wait_h = yes; then

$as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h

fi


# capability
for ac_header in sys/capability.h
do :
  ac_fn_c_check_header_mongrel "$LINENO" "sys/capability.h" "ac_cv_header_sys_capability_h" "$ac_includes_default"
if test "x$ac_cv_header_sys_capability_h" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_SYS_CAPABILITY_H 1
_ACEOF

fi

done


case "$host_os" in
*linux*)
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken RedHat 7.2 system header files" >&5
$as_echo_n "checking for broken RedHat 7.2 system header files... " >&6; }
if test "${libreplace_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS+set}" = set; then :
  $as_echo_n "(cached) " >&6
else

cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end 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
if ac_fn_c_try_compile "$LINENO"; then :
  libreplace_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=no
else
  libreplace_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=yes

fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libreplace_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS" >&5
$as_echo "$libreplace_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS" >&6; }
if test x"$libreplace_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS" = x"yes"; then

$as_echo "#define BROKEN_REDHAT_7_SYSTEM_HEADERS 1" >>confdefs.h

fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken RHEL5 sys/capability.h" >&5
$as_echo_n "checking for broken RHEL5 sys/capability.h... " >&6; }
if test "${libreplace_cv_BROKEN_RHEL5_SYS_CAP_HEADER+set}" = set; then :
  $as_echo_n "(cached) " >&6
else

cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

	#ifdef HAVE_SYS_CAPABILITY_H
	#include <sys/capability.h>
	#endif
	#include <linux/types.h>

int
main ()
{

	__s8 i;

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  libreplace_cv_BROKEN_RHEL5_SYS_CAP_HEADER=no
else
  libreplace_cv_BROKEN_RHEL5_SYS_CAP_HEADER=yes

fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libreplace_cv_BROKEN_RHEL5_SYS_CAP_HEADER" >&5
$as_echo "$libreplace_cv_BROKEN_RHEL5_SYS_CAP_HEADER" >&6; }
if test x"$libreplace_cv_BROKEN_RHEL5_SYS_CAP_HEADER" = x"yes"; then

$as_echo "#define BROKEN_RHEL5_SYS_CAP_HEADER 1" >>confdefs.h

fi
;;
esac

# passwd
for ac_header in grp.h sys/id.h compat.h shadow.h sys/priv.h pwd.h sys/security.h
do :
  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
eval as_val=\$$as_ac_Header
   if test "x$as_val" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF

fi

done

for ac_func in getpwnam_r getpwuid_r getpwent_r
do :
  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
eval as_val=\$$as_ac_var
   if test "x$as_val" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF

fi
done


 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpwent_r declaration" >&5
$as_echo_n "checking for getpwent_r declaration... " >&6; }
if test "${ac_cv_have_getpwent_r_decl+set}" = set; then :
  $as_echo_n "(cached) " >&6
else

    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

	#include <unistd.h>
	#include <pwd.h>

int
main ()
{
int i = (int)getpwent_r
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  ac_cv_have_getpwent_r_decl=yes
else
  ac_cv_have_getpwent_r_decl=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getpwent_r_decl" >&5
$as_echo "$ac_cv_have_getpwent_r_decl" >&6; }
 if test x"$ac_cv_have_getpwent_r_decl" = x"yes"; then

$as_echo "#define HAVE_GETPWENT_R_DECL 1" >>confdefs.h

 fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototype struct passwd *getpwent_r(struct passwd *src, char *buf, int buflen)" >&5
$as_echo_n "checking for prototype struct passwd *getpwent_r(struct passwd *src, char *buf, int buflen)... " >&6; }
if test "${ac_cv_c_prototype_struct_passwd_pgetpwent_r_struct_passwd_psrc__char_pbuf__int_buflen_+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

		$ac_includes_default

	#include <unistd.h>
	#include <pwd.h>

		struct passwd *getpwent_r(struct passwd *src, char *buf, int buflen)
		{

	#ifndef HAVE_GETPWENT_R_DECL
	#error missing getpwent_r prototype
	#endif
	return NULL;

		}

_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :

		ac_cv_c_prototype_struct_passwd_pgetpwent_r_struct_passwd_psrc__char_pbuf__int_buflen_=yes

else

		ac_cv_c_prototype_struct_passwd_pgetpwent_r_struct_passwd_psrc__char_pbuf__int_buflen_=no

fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_prototype_struct_passwd_pgetpwent_r_struct_passwd_psrc__char_pbuf__int_buflen_" >&5
$as_echo "$ac_cv_c_prototype_struct_passwd_pgetpwent_r_struct_passwd_psrc__char_pbuf__int_buflen_" >&6; }
if test $ac_cv_c_prototype_struct_passwd_pgetpwent_r_struct_passwd_psrc__char_pbuf__int_buflen_ = yes; then :


$as_echo "#define SOLARIS_GETPWENT_R 1" >>confdefs.h


fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototype struct passwd *getpwent_r(struct passwd *src, char *buf, size_t buflen)" >&5
$as_echo_n "checking for prototype struct passwd *getpwent_r(struct passwd *src, char *buf, size_t buflen)... " >&6; }
if test "${ac_cv_c_prototype_struct_passwd_pgetpwent_r_struct_passwd_psrc__char_pbuf__size_t_buflen_+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

		$ac_includes_default

	#include <unistd.h>
	#include <pwd.h>

		struct passwd *getpwent_r(struct passwd *src, char *buf, size_t buflen)
		{

	#ifndef HAVE_GETPWENT_R_DECL
	#error missing getpwent_r prototype
	#endif
	return NULL;

		}

_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :

		ac_cv_c_prototype_struct_passwd_pgetpwent_r_struct_passwd_psrc__char_pbuf__size_t_buflen_=yes

else

		ac_cv_c_prototype_struct_passwd_pgetpwent_r_struct_passwd_psrc__char_pbuf__size_t_buflen_=no

fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_prototype_struct_passwd_pgetpwent_r_struct_passwd_psrc__char_pbuf__size_t_buflen_" >&5
$as_echo "$ac_cv_c_prototype_struct_passwd_pgetpwent_r_struct_passwd_psrc__char_pbuf__size_t_buflen_" >&6; }
if test $ac_cv_c_prototype_struct_passwd_pgetpwent_r_struct_passwd_psrc__char_pbuf__size_t_buflen_ = yes; then :


$as_echo "#define SOLARIS_GETPWENT_R 1" >>confdefs.h


fi

for ac_func in getgrnam_r getgrgid_r getgrent_r
do :
  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
eval as_val=\$$as_ac_var
   if test "x$as_val" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF

fi
done


 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getgrent_r declaration" >&5
$as_echo_n "checking for getgrent_r declaration... " >&6; }
if test "${ac_cv_have_getgrent_r_decl+set}" = set; then :
  $as_echo_n "(cached) " >&6
else

    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

	#include <unistd.h>
	#include <grp.h>

int
main ()
{
int i = (int)getgrent_r
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  ac_cv_have_getgrent_r_decl=yes
else
  ac_cv_have_getgrent_r_decl=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getgrent_r_decl" >&5
$as_echo "$ac_cv_have_getgrent_r_decl" >&6; }
 if test x"$ac_cv_have_getgrent_r_decl" = x"yes"; then

$as_echo "#define HAVE_GETGRENT_R_DECL 1" >>confdefs.h

 fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototype struct group *getgrent_r(struct group *src, char *buf, int buflen)" >&5
$as_echo_n "checking for prototype struct group *getgrent_r(struct group *src, char *buf, int buflen)... " >&6; }
if test "${ac_cv_c_prototype_struct_group_pgetgrent_r_struct_group_psrc__char_pbuf__int_buflen_+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

		$ac_includes_default

	#include <unistd.h>
	#include <grp.h>

		struct group *getgrent_r(struct group *src, char *buf, int buflen)
		{

	#ifndef HAVE_GETGRENT_R_DECL
	#error missing getgrent_r prototype
	#endif
	return NULL;

		}

_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :

		ac_cv_c_prototype_struct_group_pgetgrent_r_struct_group_psrc__char_pbuf__int_buflen_=yes

else

		ac_cv_c_prototype_struct_group_pgetgrent_r_struct_group_psrc__char_pbuf__int_buflen_=no

fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_prototype_struct_group_pgetgrent_r_struct_group_psrc__char_pbuf__int_buflen_" >&5
$as_echo "$ac_cv_c_prototype_struct_group_pgetgrent_r_struct_group_psrc__char_pbuf__int_buflen_" >&6; }
if test $ac_cv_c_prototype_struct_group_pgetgrent_r_struct_group_psrc__char_pbuf__int_buflen_ = yes; then :


$as_echo "#define SOLARIS_GETGRENT_R 1" >>confdefs.h


fi


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototype struct group *getgrent_r(struct group *src, char *buf, size_t buflen)" >&5
$as_echo_n "checking for prototype struct group *getgrent_r(struct group *src, char *buf, size_t buflen)... " >&6; }
if test "${ac_cv_c_prototype_struct_group_pgetgrent_r_struct_group_psrc__char_pbuf__size_t_buflen_+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

		$ac_includes_default

	#include <unistd.h>
	#include <grp.h>

		struct group *getgrent_r(struct group *src, char *buf, size_t buflen)
		{

	#ifndef HAVE_GETGRENT_R_DECL
	#error missing getgrent_r prototype
	#endif
	return NULL;

		}

_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :

		ac_cv_c_prototype_struct_group_pgetgrent_r_struct_group_psrc__char_pbuf__size_t_buflen_=yes

else

		ac_cv_c_prototype_struct_group_pgetgrent_r_struct_group_psrc__char_pbuf__size_t_buflen_=no

fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_prototype_struct_group_pgetgrent_r_struct_group_psrc__char_pbuf__size_t_buflen_" >&5
$as_echo "$ac_cv_c_prototype_struct_group_pgetgrent_r_struct_group_psrc__char_pbuf__size_t_buflen_" >&6; }
if test $ac_cv_c_prototype_struct_group_pgetgrent_r_struct_group_psrc__char_pbuf__size_t_buflen_ = yes; then :


$as_echo "#define SOLARIS_GETGRENT_R 1" >>confdefs.h


fi

for ac_func in getgrouplist
do :
  ac_fn_c_check_func "$LINENO" "getgrouplist" "ac_cv_func_getgrouplist"
if test "x$ac_cv_func_getgrouplist" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_GETGROUPLIST 1
_ACEOF

fi
done


# locale
for ac_header in ctype.h locale.h langinfo.h
do :
  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
eval as_val=\$$as_ac_Header
   if test "x$as_val" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF

fi

done


# glob
for ac_header in fnmatch.h
do :
  ac_fn_c_check_header_mongrel "$LINENO" "fnmatch.h" "ac_cv_header_fnmatch_h" "$ac_includes_default"
if test "x$ac_cv_header_fnmatch_h" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_FNMATCH_H 1
_ACEOF

fi

done


# shmem
for ac_header in sys/ipc.h sys/mman.h sys/shm.h
do :
  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
eval as_val=\$$as_ac_Header
   if test "x$as_val" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF

fi

done


# terminal
for ac_header in termios.h termio.h sys/termio.h
do :
  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
eval as_val=\$$as_ac_Header
   if test "x$as_val" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF

fi

done



save_LIBS="$LIBS"
LIBS=""

libreplace_cv_dlfcn=no
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
$as_echo_n "checking for library containing dlopen... " >&6; }
if test "${ac_cv_search_dlopen+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char dlopen ();
int
main ()
{
return dlopen ();
  ;
  return 0;
}
_ACEOF
for ac_lib in '' dl; do
  if test -z "$ac_lib"; then
    ac_res="none required"
  else
    ac_res=-l$ac_lib
    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
  fi
  if ac_fn_c_try_link "$LINENO"; then :
  ac_cv_search_dlopen=$ac_res
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext
  if test "${ac_cv_search_dlopen+set}" = set; then :
  break
fi
done
if test "${ac_cv_search_dlopen+set}" = set; then :

else
  ac_cv_search_dlopen=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
$as_echo "$ac_cv_search_dlopen" >&6; }
ac_res=$ac_cv_search_dlopen
if test "$ac_res" != no; then :
  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"

fi


for ac_header in dlfcn.h
do :
  ac_fn_c_check_header_mongrel "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default"
if test "x$ac_cv_header_dlfcn_h" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_DLFCN_H 1
_ACEOF

fi

done

for ac_func in dlopen dlsym dlerror dlclose
do :
  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
eval as_val=\$$as_ac_var
   if test "x$as_val" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF

else
  libreplace_cv_dlfcn=yes
fi
done


libreplace_cv_shl=no
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shl_load" >&5
$as_echo_n "checking for library containing shl_load... " >&6; }
if test "${ac_cv_search_shl_load+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char shl_load ();
int
main ()
{
return shl_load ();
  ;
  return 0;
}
_ACEOF
for ac_lib in '' sl; do
  if test -z "$ac_lib"; then
    ac_res="none required"
  else
    ac_res=-l$ac_lib
    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
  fi
  if ac_fn_c_try_link "$LINENO"; then :
  ac_cv_search_shl_load=$ac_res
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext
  if test "${ac_cv_search_shl_load+set}" = set; then :
  break
fi
done
if test "${ac_cv_search_shl_load+set}" = set; then :

else
  ac_cv_search_shl_load=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shl_load" >&5
$as_echo "$ac_cv_search_shl_load" >&6; }
ac_res=$ac_cv_search_shl_load
if test "$ac_res" != no; then :
  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"

fi

for ac_header in dl.h
do :
  ac_fn_c_check_header_mongrel "$LINENO" "dl.h" "ac_cv_header_dl_h" "$ac_includes_default"
if test "x$ac_cv_header_dl_h" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_DL_H 1
_ACEOF

fi

done

for ac_func in shl_load shl_unload shl_findsym
do :
  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
eval as_val=\$$as_ac_var
   if test "x$as_val" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF

else
  libreplace_cv_shl=yes
fi
done


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototype void *dlopen(const char* filename, unsigned int flags)" >&5
$as_echo_n "checking for prototype void *dlopen(const char* filename, unsigned int flags)... " >&6; }
if test "${ac_cv_c_prototype_void_pdlopen_const_charp_filename__unsigned_int_flags_+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

		$ac_includes_default

	#include <dlfcn.h>

		void *dlopen(const char* filename, unsigned int flags)
		{

	return 0;

		}

_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :

		ac_cv_c_prototype_void_pdlopen_const_charp_filename__unsigned_int_flags_=yes

else

		ac_cv_c_prototype_void_pdlopen_const_charp_filename__unsigned_int_flags_=no

fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_prototype_void_pdlopen_const_charp_filename__unsigned_int_flags_" >&5
$as_echo "$ac_cv_c_prototype_void_pdlopen_const_charp_filename__unsigned_int_flags_" >&6; }
if test $ac_cv_c_prototype_void_pdlopen_const_charp_filename__unsigned_int_flags_ = yes; then :


$as_echo "#define DLOPEN_TAKES_UNSIGNED_FLAGS 1" >>confdefs.h


fi


if test x"${libreplace_cv_dlfcn}" = x"yes";then
	LIBREPLACEOBJ="${LIBREPLACEOBJ} dlfcn.o"
fi

LIBDL="$LIBS"

LIBS="$save_LIBS"

ac_fn_c_check_func "$LINENO" "getpass" "ac_cv_func_getpass"
if test "x$ac_cv_func_getpass" = x""yes; then :
  libreplace_cv_HAVE_GETPASS=yes
fi

ac_fn_c_check_func "$LINENO" "getpassphrase" "ac_cv_func_getpassphrase"
if test "x$ac_cv_func_getpassphrase" = x""yes; then :
  libreplace_cv_HAVE_GETPASSPHRASE=yes
fi

if test x"$libreplace_cv_HAVE_GETPASS" = x"yes" -a x"$libreplace_cv_HAVE_GETPASSPHRASE" = x"yes"; then

$as_echo "#define REPLACE_GETPASS_BY_GETPASSPHRASE 1" >>confdefs.h


$as_echo "#define REPLACE_GETPASS 1" >>confdefs.h

	LIBREPLACEOBJ="${LIBREPLACEOBJ} $libreplacedir/getpass.o"
else

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getpass should be replaced" >&5
$as_echo_n "checking whether getpass should be replaced... " >&6; }
if test "${libreplace_cv_REPLACE_GETPASS+set}" = set; then :
  $as_echo_n "(cached) " >&6
else

SAVE_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS -I$libreplacedir/"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include "confdefs.h"
#define NO_CONFIG_H
#include "$libreplacedir/getpass.c"

int
main ()
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  libreplace_cv_REPLACE_GETPASS=yes
else
  libreplace_cv_REPLACE_GETPASS=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
CPPFLAGS="$SAVE_CPPFLAGS"

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libreplace_cv_REPLACE_GETPASS" >&5
$as_echo "$libreplace_cv_REPLACE_GETPASS" >&6; }
if test x"$libreplace_cv_REPLACE_GETPASS" = x"yes"; then

$as_echo "#define REPLACE_GETPASS 1" >>confdefs.h

	LIBREPLACEOBJ="${LIBREPLACEOBJ} $libreplacedir/getpass.o"
fi

fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strptime is available and works" >&5
$as_echo_n "checking whether strptime is available and works... " >&6; }
if test "${libreplace_cv_STRPTIME_OK+set}" = set; then :
  $as_echo_n "(cached) " >&6
else

	if test "$cross_compiling" = yes; then :
  libreplace_cv_STRPTIME_OK="assuming not"
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

		#define LIBREPLACE_CONFIGURE_TEST_STRPTIME
		#include "$libreplacedir/test/strptime.c"

_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
  libreplace_cv_STRPTIME_OK=yes
else
  libreplace_cv_STRPTIME_OK=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext
fi


fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libreplace_cv_STRPTIME_OK" >&5
$as_echo "$libreplace_cv_STRPTIME_OK" >&6; }
if test x"$libreplace_cv_STRPTIME_OK" != x"yes"; then

$as_echo "#define REPLACE_STRPTIME 1" >>confdefs.h

        LIBREPLACEOBJ="${LIBREPLACEOBJ} strptime.o"
fi

for ac_header in direct.h windows.h winsock2.h ws2tcpip.h
do :
  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
eval as_val=\$$as_ac_Header
   if test "x$as_val" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF

fi

done


#######################################
# Check for mkdir mode
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mkdir supports mode" >&5
$as_echo_n "checking whether mkdir supports mode... " >&6; }
if test "${libreplace_cv_mkdir_has_mode+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

		#include <stdio.h>
		#ifdef HAVE_DIRECT_H
		#include <direct.h>
		#endif
int
main ()
{

			mkdir("foo",0777);
			return 0;

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  libreplace_cv_mkdir_has_mode="yes"
else
  libreplace_cv_mkdir_has_mode="no"
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libreplace_cv_mkdir_has_mode" >&5
$as_echo "$libreplace_cv_mkdir_has_mode" >&6; }

if test "$libreplace_cv_mkdir_has_mode" = "yes"
then

$as_echo "#define HAVE_MKDIR_MODE 1" >>confdefs.h

fi

for ac_func in timegm
do :
  ac_fn_c_check_func "$LINENO" "timegm" "ac_cv_func_timegm"
if test "x$ac_cv_func_timegm" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_TIMEGM 1
_ACEOF

else
  LIBREPLACEOBJ="${LIBREPLACEOBJ} timegm.o"
fi
done


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken readdir" >&5
$as_echo_n "checking for broken readdir... " >&6; }
if test "${libreplace_cv_READDIR_NEEDED+set}" = set; then :
  $as_echo_n "(cached) " >&6
else

	if test "$cross_compiling" = yes; then :
  libreplace_cv_READDIR_NEEDED="assuming not"
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#define test_readdir_os2_delete main
#include "$libreplacedir/test/os2_delete.c"
_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
  libreplace_cv_READDIR_NEEDED=no
else
  libreplace_cv_READDIR_NEEDED=yes
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext
fi


fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libreplace_cv_READDIR_NEEDED" >&5
$as_echo "$libreplace_cv_READDIR_NEEDED" >&6; }

for ac_func in dirfd
do :
  ac_fn_c_check_func "$LINENO" "dirfd" "ac_cv_func_dirfd"
if test "x$ac_cv_func_dirfd" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_DIRFD 1
_ACEOF

fi
done


 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dirfd declaration" >&5
$as_echo_n "checking for dirfd declaration... " >&6; }
if test "${ac_cv_have_dirfd_decl+set}" = set; then :
  $as_echo_n "(cached) " >&6
else

    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <dirent.h>
int
main ()
{
int i = (int)dirfd
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  ac_cv_have_dirfd_decl=yes
else
  ac_cv_have_dirfd_decl=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_dirfd_decl" >&5
$as_echo "$ac_cv_have_dirfd_decl" >&6; }
 if test x"$ac_cv_have_dirfd_decl" = x"yes"; then

$as_echo "#define HAVE_DIRFD_DECL 1" >>confdefs.h

 fi


#
# try to replace with getdirentries() if needed
#
if test x"$libreplace_cv_READDIR_NEEDED" = x"yes"; then
for ac_func in getdirentries
do :
  ac_fn_c_check_func "$LINENO" "getdirentries" "ac_cv_func_getdirentries"
if test "x$ac_cv_func_getdirentries" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_GETDIRENTRIES 1
_ACEOF

fi
done

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototype long telldir(const DIR *dir)" >&5
$as_echo_n "checking for prototype long telldir(const DIR *dir)... " >&6; }
if test "${ac_cv_c_prototype_long_telldir_const_DIR_pdir_+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

		$ac_includes_default

	#include <dirent.h>

		long telldir(const DIR *dir)
		{

	return 0;

		}

_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :

		ac_cv_c_prototype_long_telldir_const_DIR_pdir_=yes

else

		ac_cv_c_prototype_long_telldir_const_DIR_pdir_=no

fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_prototype_long_telldir_const_DIR_pdir_" >&5
$as_echo "$ac_cv_c_prototype_long_telldir_const_DIR_pdir_" >&6; }
if test $ac_cv_c_prototype_long_telldir_const_DIR_pdir_ = yes; then :


$as_echo "#define TELLDIR_TAKES_CONST_DIR 1" >>confdefs.h


fi


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototype int seekdir(DIR *dir, long ofs)" >&5
$as_echo_n "checking for prototype int seekdir(DIR *dir, long ofs)... " >&6; }
if test "${ac_cv_c_prototype_int_seekdir_DIR_pdir__long_ofs_+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

		$ac_includes_default

	#include <dirent.h>

		int seekdir(DIR *dir, long ofs)
		{

	return 0;

		}

_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :

		ac_cv_c_prototype_int_seekdir_DIR_pdir__long_ofs_=yes

else

		ac_cv_c_prototype_int_seekdir_DIR_pdir__long_ofs_=no

fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_prototype_int_seekdir_DIR_pdir__long_ofs_" >&5
$as_echo "$ac_cv_c_prototype_int_seekdir_DIR_pdir__long_ofs_" >&6; }
if test $ac_cv_c_prototype_int_seekdir_DIR_pdir__long_ofs_ = yes; then :


$as_echo "#define SEEKDIR_RETURNS_INT 1" >>confdefs.h


fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for replacing readdir using getdirentries()" >&5
$as_echo_n "checking for replacing readdir using getdirentries()... " >&6; }
if test "${libreplace_cv_READDIR_GETDIRENTRIES+set}" = set; then :
  $as_echo_n "(cached) " >&6
else

	if test "$cross_compiling" = yes; then :
  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error "cannot run test program while cross compiling
See \`config.log' for more details." "$LINENO" 5; }
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#define _LIBREPLACE_REPLACE_H
#include "$libreplacedir/repdir_getdirentries.c"
#define test_readdir_os2_delete main
#include "$libreplacedir/test/os2_delete.c"
_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
  libreplace_cv_READDIR_GETDIRENTRIES=yes
else
  libreplace_cv_READDIR_GETDIRENTRIES=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext
fi


fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libreplace_cv_READDIR_GETDIRENTRIES" >&5
$as_echo "$libreplace_cv_READDIR_GETDIRENTRIES" >&6; }
fi
if test x"$libreplace_cv_READDIR_GETDIRENTRIES" = x"yes"; then

$as_echo "#define REPLACE_READDIR 1" >>confdefs.h


$as_echo "#define REPLACE_READDIR_GETDIRENTRIES 1" >>confdefs.h

	LIBREPLACEOBJ="${LIBREPLACEOBJ} repdir_getdirentries.o"
	libreplace_cv_READDIR_NEEDED=no
fi

#
# try to replace with getdents() if needed
#
if test x"$libreplace_cv_READDIR_NEEDED" = x"yes"; then
for ac_func in getdents
do :
  ac_fn_c_check_func "$LINENO" "getdents" "ac_cv_func_getdents"
if test "x$ac_cv_func_getdents" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_GETDENTS 1
_ACEOF

fi
done

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for replacing readdir using getdents()" >&5
$as_echo_n "checking for replacing readdir using getdents()... " >&6; }
if test "${libreplace_cv_READDIR_GETDENTS+set}" = set; then :
  $as_echo_n "(cached) " >&6
else

	if test "$cross_compiling" = yes; then :
  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error "cannot run test program while cross compiling
See \`config.log' for more details." "$LINENO" 5; }
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#define _LIBREPLACE_REPLACE_H
#error _donot_use_getdents_replacement_anymore
#include "$libreplacedir/repdir_getdents.c"
#define test_readdir_os2_delete main
#include "$libreplacedir/test/os2_delete.c"
_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
  libreplace_cv_READDIR_GETDENTS=yes
else
  libreplace_cv_READDIR_GETDENTS=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext
fi


fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libreplace_cv_READDIR_GETDENTS" >&5
$as_echo "$libreplace_cv_READDIR_GETDENTS" >&6; }
fi
if test x"$libreplace_cv_READDIR_GETDENTS" = x"yes"; then

$as_echo "#define REPLACE_READDIR 1" >>confdefs.h


$as_echo "#define REPLACE_READDIR_GETDENTS 1" >>confdefs.h

	LIBREPLACEOBJ="${LIBREPLACEOBJ} repdir_getdents.o"
	libreplace_cv_READDIR_NEEDED=no
fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking a usable readdir()" >&5
$as_echo_n "checking a usable readdir()... " >&6; }
if test x"$libreplace_cv_READDIR_NEEDED" = x"yes"; then
	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
	{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: the provided readdir() is broken" >&5
$as_echo "$as_me: WARNING: the provided readdir() is broken" >&2;}
else
	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
fi

###############################################
# test for where we get crypt() from
for ac_header in crypt.h
do :
  ac_fn_c_check_header_mongrel "$LINENO" "crypt.h" "ac_cv_header_crypt_h" "$ac_includes_default"
if test "x$ac_cv_header_crypt_h" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_CRYPT_H 1
_ACEOF

fi

done

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt" >&5
$as_echo_n "checking for library containing crypt... " >&6; }
if test "${ac_cv_search_ext_crypt+set}" = set; then :
  $as_echo_n "(cached) " >&6
else

ac_func_search_ext_save_LIBS=$LIBS
ac_cv_search_ext_crypt=no
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char crypt ();
int
main ()
{
return crypt ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  ac_cv_search_ext_crypt="none required"
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
if test "$ac_cv_search_ext_crypt" = no; then
  for ac_lib in crypt; do
    LIBS="-l$ac_lib $CRYPT_LIBS  $ac_func_search_save_ext_LIBS"
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char crypt ();
int
main ()
{
return crypt ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  ac_cv_search_ext_crypt="-l$ac_lib"
break
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
  done
fi
LIBS=$ac_func_search_ext_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_ext_crypt" >&5
$as_echo "$ac_cv_search_ext_crypt" >&6; }
if test "$ac_cv_search_ext_crypt" != no; then :
  test "$ac_cv_search_ext_crypt" = "none required" || CRYPT_LIBS="$ac_cv_search_ext_crypt $CRYPT_LIBS"

$as_echo "#define HAVE_CRYPT 1" >>confdefs.h

else
   LIBREPLACEOBJ="${LIBREPLACEOBJ} crypt.o"
fi


for ac_func in printf memset memcpy
do :
  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
eval as_val=\$$as_ac_var
   if test "x$as_val" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF

else
  as_fn_error "Required function not found" "$LINENO" 5
fi
done


echo "LIBREPLACE_BROKEN_CHECKS: END"


echo "LIBREPLACE_NETWORK_CHECKS: START"


$as_echo "#define LIBREPLACE_NETWORK_CHECKS 1" >>confdefs.h

LIBREPLACE_NETWORK_OBJS=""
LIBREPLACE_NETWORK_LIBS=""

for ac_header in sys/socket.h netinet/in.h netdb.h arpa/inet.h
do :
  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
eval as_val=\$$as_ac_Header
   if test "x$as_val" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF

fi

done

for ac_header in netinet/in_systm.h
do :
  ac_fn_c_check_header_mongrel "$LINENO" "netinet/in_systm.h" "ac_cv_header_netinet_in_systm_h" "$ac_includes_default"
if test "x$ac_cv_header_netinet_in_systm_h" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_NETINET_IN_SYSTM_H 1
_ACEOF

fi

done

for ac_header in netinet/ip.h
do :
  ac_fn_c_check_header_compile "$LINENO" "netinet/ip.h" "ac_cv_header_netinet_ip_h" "
	#include <sys/types.h>
	#ifdef HAVE_NETINET_IN_H
	#include <netinet/in.h>
	#endif
	#ifdef HAVE_NETINET_IN_SYSTM_H
	#include <netinet/in_systm.h>
	#endif

"
if test "x$ac_cv_header_netinet_ip_h" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_NETINET_IP_H 1
_ACEOF

fi

done

for ac_header in netinet/tcp.h netinet/in_ip.h
do :
  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
eval as_val=\$$as_ac_Header
   if test "x$as_val" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF

fi

done

for ac_header in sys/sockio.h sys/un.h
do :
  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
eval as_val=\$$as_ac_Header
   if test "x$as_val" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF

fi

done

for ac_header in sys/uio.h
do :
  ac_fn_c_check_header_mongrel "$LINENO" "sys/uio.h" "ac_cv_header_sys_uio_h" "$ac_includes_default"
if test "x$ac_cv_header_sys_uio_h" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_SYS_UIO_H 1
_ACEOF

fi

done


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable net/if.h" >&5
$as_echo_n "checking for usable net/if.h... " >&6; }
if test "${libreplace_cv_USABLE_NET_IF_H+set}" = set; then :
  $as_echo_n "(cached) " >&6
else

	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

		$ac_includes_default
		#if HAVE_SYS_SOCKET_H
		# include <sys/socket.h>
		#endif
		#include <net/if.h>
		int main(void) {return 0;}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  libreplace_cv_USABLE_NET_IF_H=yes
else
  libreplace_cv_USABLE_NET_IF_H=no

fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libreplace_cv_USABLE_NET_IF_H" >&5
$as_echo "$libreplace_cv_USABLE_NET_IF_H" >&6; }
if test x"$libreplace_cv_USABLE_NET_IF_H" = x"yes";then

$as_echo "#define HAVE_NET_IF_H 1" >>confdefs.h

fi



cv=`echo "socklen_t" | sed 'y%./+- %__p__%'`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socklen_t" >&5
$as_echo_n "checking for socklen_t... " >&6; }
if { as_var=ac_cv_type_$cv; eval "test \"\${$as_var+set}\" = set"; }; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

$ac_includes_default
#include <sys/socket.h>
int
main ()
{
socklen_t foo;
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  eval "ac_cv_type_$cv=yes"
else
  eval "ac_cv_type_$cv=no"
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
ac_foo=`eval echo \\$ac_cv_type_$cv`
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_foo" >&5
$as_echo "$ac_foo" >&6; }
if test "$ac_foo" = yes; then
  ac_tr_hdr=HAVE_`echo socklen_t | sed 'y%abcdefghijklmnopqrstuvwxyz./- %ABCDEFGHIJKLMNOPQRSTUVWXYZ____%'`
if false; then
	ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "$ac_includes_default"
if test "x$ac_cv_type_socklen_t" = x""yes; then :

cat >>confdefs.h <<_ACEOF
#define HAVE_SOCKLEN_T 1
_ACEOF


fi

fi

cat >>confdefs.h <<_ACEOF
#define $ac_tr_hdr 1
_ACEOF

fi



cv=`echo "sa_family_t" | sed 'y%./+- %__p__%'`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sa_family_t" >&5
$as_echo_n "checking for sa_family_t... " >&6; }
if { as_var=ac_cv_type_$cv; eval "test \"\${$as_var+set}\" = set"; }; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

$ac_includes_default
#include <sys/socket.h>
int
main ()
{
sa_family_t foo;
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  eval "ac_cv_type_$cv=yes"
else
  eval "ac_cv_type_$cv=no"
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
ac_foo=`eval echo \\$ac_cv_type_$cv`
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_foo" >&5
$as_echo "$ac_foo" >&6; }
if test "$ac_foo" = yes; then
  ac_tr_hdr=HAVE_`echo sa_family_t | sed 'y%abcdefghijklmnopqrstuvwxyz./- %ABCDEFGHIJKLMNOPQRSTUVWXYZ____%'`
if false; then
	ac_fn_c_check_type "$LINENO" "sa_family_t" "ac_cv_type_sa_family_t" "$ac_includes_default"
if test "x$ac_cv_type_sa_family_t" = x""yes; then :

cat >>confdefs.h <<_ACEOF
#define HAVE_SA_FAMILY_T 1
_ACEOF


fi

fi

cat >>confdefs.h <<_ACEOF
#define $ac_tr_hdr 1
_ACEOF

fi



cv=`echo "struct addrinfo" | sed 'y%./+- %__p__%'`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct addrinfo" >&5
$as_echo_n "checking for struct addrinfo... " >&6; }
if { as_var=ac_cv_type_$cv; eval "test \"\${$as_var+set}\" = set"; }; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

$ac_includes_default
#include <netdb.h>
int
main ()
{
struct addrinfo foo;
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  eval "ac_cv_type_$cv=yes"
else
  eval "ac_cv_type_$cv=no"
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
ac_foo=`eval echo \\$ac_cv_type_$cv`
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_foo" >&5
$as_echo "$ac_foo" >&6; }
if test "$ac_foo" = yes; then
  ac_tr_hdr=HAVE_`echo struct addrinfo | sed 'y%abcdefghijklmnopqrstuvwxyz./- %ABCDEFGHIJKLMNOPQRSTUVWXYZ____%'`
if false; then
	ac_fn_c_check_type "$LINENO" "struct addrinfo" "ac_cv_type_struct_addrinfo" "$ac_includes_default"
if test "x$ac_cv_type_struct_addrinfo" = x""yes; then :

cat >>confdefs.h <<_ACEOF
#define HAVE_STRUCT_ADDRINFO 1
_ACEOF


fi

fi

cat >>confdefs.h <<_ACEOF
#define $ac_tr_hdr 1
_ACEOF

fi



cv=`echo "struct sockaddr" | sed 'y%./+- %__p__%'`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct sockaddr" >&5
$as_echo_n "checking for struct sockaddr... " >&6; }
if { as_var=ac_cv_type_$cv; eval "test \"\${$as_var+set}\" = set"; }; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

$ac_includes_default
#include <sys/socket.h>
int
main ()
{
struct sockaddr foo;
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  eval "ac_cv_type_$cv=yes"
else
  eval "ac_cv_type_$cv=no"
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
ac_foo=`eval echo \\$ac_cv_type_$cv`
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_foo" >&5
$as_echo "$ac_foo" >&6; }
if test "$ac_foo" = yes; then
  ac_tr_hdr=HAVE_`echo struct sockaddr | sed 'y%abcdefghijklmnopqrstuvwxyz./- %ABCDEFGHIJKLMNOPQRSTUVWXYZ____%'`
if false; then
	ac_fn_c_check_type "$LINENO" "struct sockaddr" "ac_cv_type_struct_sockaddr" "$ac_includes_default"
if test "x$ac_cv_type_struct_sockaddr" = x""yes; then :

cat >>confdefs.h <<_ACEOF
#define HAVE_STRUCT_SOCKADDR 1
_ACEOF


fi

fi

cat >>confdefs.h <<_ACEOF
#define $ac_tr_hdr 1
_ACEOF

fi



cv=`echo "struct sockaddr_storage" | sed 'y%./+- %__p__%'`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct sockaddr_storage" >&5
$as_echo_n "checking for struct sockaddr_storage... " >&6; }
if { as_var=ac_cv_type_$cv; eval "test \"\${$as_var+set}\" = set"; }; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

$ac_includes_default

#include <sys/socket.h>
#include <sys/types.h>
#include <netinet/in.h>

int
main ()
{
struct sockaddr_storage foo;
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  eval "ac_cv_type_$cv=yes"
else
  eval "ac_cv_type_$cv=no"
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
ac_foo=`eval echo \\$ac_cv_type_$cv`
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_foo" >&5
$as_echo "$ac_foo" >&6; }
if test "$ac_foo" = yes; then
  ac_tr_hdr=HAVE_`echo struct sockaddr_storage | sed 'y%abcdefghijklmnopqrstuvwxyz./- %ABCDEFGHIJKLMNOPQRSTUVWXYZ____%'`
if false; then
	ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" "$ac_includes_default"
if test "x$ac_cv_type_struct_sockaddr_storage" = x""yes; then :

cat >>confdefs.h <<_ACEOF
#define HAVE_STRUCT_SOCKADDR_STORAGE 1
_ACEOF


fi

fi

cat >>confdefs.h <<_ACEOF
#define $ac_tr_hdr 1
_ACEOF

fi



cv=`echo "struct sockaddr_in6" | sed 'y%./+- %__p__%'`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct sockaddr_in6" >&5
$as_echo_n "checking for struct sockaddr_in6... " >&6; }
if { as_var=ac_cv_type_$cv; eval "test \"\${$as_var+set}\" = set"; }; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

$ac_includes_default

#include <sys/socket.h>
#include <sys/types.h>
#include <netinet/in.h>

int
main ()
{
struct sockaddr_in6 foo;
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  eval "ac_cv_type_$cv=yes"
else
  eval "ac_cv_type_$cv=no"
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
ac_foo=`eval echo \\$ac_cv_type_$cv`
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_foo" >&5
$as_echo "$ac_foo" >&6; }
if test "$ac_foo" = yes; then
  ac_tr_hdr=HAVE_`echo struct sockaddr_in6 | sed 'y%abcdefghijklmnopqrstuvwxyz./- %ABCDEFGHIJKLMNOPQRSTUVWXYZ____%'`
if false; then
	ac_fn_c_check_type "$LINENO" "struct sockaddr_in6" "ac_cv_type_struct_sockaddr_in6" "$ac_includes_default"
if test "x$ac_cv_type_struct_sockaddr_in6" = x""yes; then :

cat >>confdefs.h <<_ACEOF
#define HAVE_STRUCT_SOCKADDR_IN6 1
_ACEOF


fi

fi

cat >>confdefs.h <<_ACEOF
#define $ac_tr_hdr 1
_ACEOF

fi


if test x"$ac_cv_type_struct_sockaddr_storage" = x"yes"; then
ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_family" "ac_cv_member_struct_sockaddr_storage_ss_family" "
#include <sys/socket.h>
#include <sys/types.h>
#include <netinet/in.h>

"
if test "x$ac_cv_member_struct_sockaddr_storage_ss_family" = x""yes; then :

$as_echo "#define HAVE_SS_FAMILY 1" >>confdefs.h

fi


if test x"$ac_cv_member_struct_sockaddr_storage_ss_family" != x"yes"; then
ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "__ss_family" "ac_cv_member_struct_sockaddr_storage___ss_family" "
#include <sys/socket.h>
#include <sys/types.h>
#include <netinet/in.h>

"
if test "x$ac_cv_member_struct_sockaddr_storage___ss_family" = x""yes; then :

$as_echo "#define HAVE___SS_FAMILY 1" >>confdefs.h

fi

fi
fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sin_len in sock" >&5
$as_echo_n "checking for sin_len in sock... " >&6; }
if test "${libreplace_cv_HAVE_SOCK_SIN_LEN+set}" = set; then :
  $as_echo_n "(cached) " >&6
else

	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end 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
if ac_fn_c_try_compile "$LINENO"; then :

		libreplace_cv_HAVE_SOCK_SIN_LEN=yes

else

		libreplace_cv_HAVE_SOCK_SIN_LEN=no

fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libreplace_cv_HAVE_SOCK_SIN_LEN" >&5
$as_echo "$libreplace_cv_HAVE_SOCK_SIN_LEN" >&6; }
if test x"$libreplace_cv_HAVE_SOCK_SIN_LEN" = x"yes"; then

$as_echo "#define HAVE_SOCK_SIN_LEN 1" >>confdefs.h

fi

############################################
# check for unix domain sockets
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for unix domain sockets" >&5
$as_echo_n "checking for unix domain sockets... " >&6; }
if test "${libreplace_cv_HAVE_UNIXSOCKET+set}" = set; then :
  $as_echo_n "(cached) " >&6
else

	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end 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
if ac_fn_c_try_compile "$LINENO"; then :

		libreplace_cv_HAVE_UNIXSOCKET=yes

else

		libreplace_cv_HAVE_UNIXSOCKET=no

fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libreplace_cv_HAVE_UNIXSOCKET" >&5
$as_echo "$libreplace_cv_HAVE_UNIXSOCKET" >&6; }
if test x"$libreplace_cv_HAVE_UNIXSOCKET" = x"yes"; then

$as_echo "#define HAVE_UNIXSOCKET 1" >>confdefs.h

fi

for ac_func in connect
do :
  ac_fn_c_check_func "$LINENO" "connect" "ac_cv_func_connect"
if test "x$ac_cv_func_connect" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_CONNECT 1
_ACEOF

fi
done

if test x"$ac_cv_func_connect" = x"no"; then


ac_check_lib_ext_save_LIBS=$LIBS
LIBS="-lnsl_s $LIBREPLACE_NETWORK_LIBS  $LIBS"



        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lnsl_s" >&5
$as_echo_n "checking for connect in -lnsl_s... " >&6; }
if test "${ac_cv_lib_ext_nsl_s_connect+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char connect ();
int
main ()
{
return connect ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  ac_cv_lib_ext_nsl_s_connect=yes;
		  ac_cv_lib_ext_nsl_s=yes
else
  ac_cv_lib_ext_nsl_s_connect=no;
		  ac_cv_lib_ext_nsl_s=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ext_nsl_s_connect" >&5
$as_echo "$ac_cv_lib_ext_nsl_s_connect" >&6; }
    if test $ac_cv_lib_ext_nsl_s_connect = yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_CONNECT 1
_ACEOF

fi
LIBS=$ac_check_lib_ext_save_LIBS

if test $ac_cv_lib_ext_nsl_s = yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_LIBNSL_S 1
_ACEOF

		case "$LIBREPLACE_NETWORK_LIBS" in
		    *-lnsl_s*)
			;;
		    *)
			LIBREPLACE_NETWORK_LIBS="-lnsl_s $LIBREPLACE_NETWORK_LIBS"
			;;
		esac


fi


ac_check_lib_ext_save_LIBS=$LIBS
LIBS="-lnsl $LIBREPLACE_NETWORK_LIBS  $LIBS"



        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lnsl" >&5
$as_echo_n "checking for connect in -lnsl... " >&6; }
if test "${ac_cv_lib_ext_nsl_connect+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char connect ();
int
main ()
{
return connect ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  ac_cv_lib_ext_nsl_connect=yes;
		  ac_cv_lib_ext_nsl=yes
else
  ac_cv_lib_ext_nsl_connect=no;
		  ac_cv_lib_ext_nsl=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ext_nsl_connect" >&5
$as_echo "$ac_cv_lib_ext_nsl_connect" >&6; }
    if test $ac_cv_lib_ext_nsl_connect = yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_CONNECT 1
_ACEOF

fi
LIBS=$ac_check_lib_ext_save_LIBS

if test $ac_cv_lib_ext_nsl = yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_LIBNSL 1
_ACEOF

		case "$LIBREPLACE_NETWORK_LIBS" in
		    *-lnsl*)
			;;
		    *)
			LIBREPLACE_NETWORK_LIBS="-lnsl $LIBREPLACE_NETWORK_LIBS"
			;;
		esac


fi


ac_check_lib_ext_save_LIBS=$LIBS
LIBS="-lsocket $LIBREPLACE_NETWORK_LIBS  $LIBS"



        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
$as_echo_n "checking for connect in -lsocket... " >&6; }
if test "${ac_cv_lib_ext_socket_connect+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char connect ();
int
main ()
{
return connect ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  ac_cv_lib_ext_socket_connect=yes;
		  ac_cv_lib_ext_socket=yes
else
  ac_cv_lib_ext_socket_connect=no;
		  ac_cv_lib_ext_socket=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ext_socket_connect" >&5
$as_echo "$ac_cv_lib_ext_socket_connect" >&6; }
    if test $ac_cv_lib_ext_socket_connect = yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_CONNECT 1
_ACEOF

fi
LIBS=$ac_check_lib_ext_save_LIBS

if test $ac_cv_lib_ext_socket = yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_LIBSOCKET 1
_ACEOF

		case "$LIBREPLACE_NETWORK_LIBS" in
		    *-lsocket*)
			;;
		    *)
			LIBREPLACE_NETWORK_LIBS="-lsocket $LIBREPLACE_NETWORK_LIBS"
			;;
		esac


fi


ac_check_lib_ext_save_LIBS=$LIBS
LIBS="-linet $LIBREPLACE_NETWORK_LIBS  $LIBS"



        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -linet" >&5
$as_echo_n "checking for connect in -linet... " >&6; }
if test "${ac_cv_lib_ext_inet_connect+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char connect ();
int
main ()
{
return connect ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  ac_cv_lib_ext_inet_connect=yes;
		  ac_cv_lib_ext_inet=yes
else
  ac_cv_lib_ext_inet_connect=no;
		  ac_cv_lib_ext_inet=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ext_inet_connect" >&5
$as_echo "$ac_cv_lib_ext_inet_connect" >&6; }
    if test $ac_cv_lib_ext_inet_connect = yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_CONNECT 1
_ACEOF

fi
LIBS=$ac_check_lib_ext_save_LIBS

if test $ac_cv_lib_ext_inet = yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_LIBINET 1
_ACEOF

		case "$LIBREPLACE_NETWORK_LIBS" in
		    *-linet*)
			;;
		    *)
			LIBREPLACE_NETWORK_LIBS="-linet $LIBREPLACE_NETWORK_LIBS"
			;;
		esac


fi
			if test x"$ac_cv_lib_ext_nsl_s_connect" = x"yes" ||
		test x"$ac_cv_lib_ext_nsl_connect" = x"yes" ||
		test x"$ac_cv_lib_ext_socket_connect" = x"yes" ||
		test x"$ac_cv_lib_ext_inet_connect" = x"yes"
	then

$as_echo "#define HAVE_CONNECT 1" >>confdefs.h

	fi
fi

for ac_func in gethostbyname
do :
  ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
if test "x$ac_cv_func_gethostbyname" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_GETHOSTBYNAME 1
_ACEOF

fi
done

if test x"$ac_cv_func_gethostbyname" = x"no"; then


ac_check_lib_ext_save_LIBS=$LIBS
LIBS="-lnsl_s $LIBREPLACE_NETWORK_LIBS  $LIBS"



        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl_s" >&5
$as_echo_n "checking for gethostbyname in -lnsl_s... " >&6; }
if test "${ac_cv_lib_ext_nsl_s_gethostbyname+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char gethostbyname ();
int
main ()
{
return gethostbyname ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  ac_cv_lib_ext_nsl_s_gethostbyname=yes;
		  ac_cv_lib_ext_nsl_s=yes
else
  ac_cv_lib_ext_nsl_s_gethostbyname=no;
		  ac_cv_lib_ext_nsl_s=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ext_nsl_s_gethostbyname" >&5
$as_echo "$ac_cv_lib_ext_nsl_s_gethostbyname" >&6; }
    if test $ac_cv_lib_ext_nsl_s_gethostbyname = yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_GETHOSTBYNAME 1
_ACEOF

fi
LIBS=$ac_check_lib_ext_save_LIBS

if test $ac_cv_lib_ext_nsl_s = yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_LIBNSL_S 1
_ACEOF

		case "$LIBREPLACE_NETWORK_LIBS" in
		    *-lnsl_s*)
			;;
		    *)
			LIBREPLACE_NETWORK_LIBS="-lnsl_s $LIBREPLACE_NETWORK_LIBS"
			;;
		esac


fi


ac_check_lib_ext_save_LIBS=$LIBS
LIBS="-lnsl $LIBREPLACE_NETWORK_LIBS  $LIBS"



        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
if test "${ac_cv_lib_ext_nsl_gethostbyname+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char gethostbyname ();
int
main ()
{
return gethostbyname ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  ac_cv_lib_ext_nsl_gethostbyname=yes;
		  ac_cv_lib_ext_nsl=yes
else
  ac_cv_lib_ext_nsl_gethostbyname=no;
		  ac_cv_lib_ext_nsl=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ext_nsl_gethostbyname" >&5
$as_echo "$ac_cv_lib_ext_nsl_gethostbyname" >&6; }
    if test $ac_cv_lib_ext_nsl_gethostbyname = yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_GETHOSTBYNAME 1
_ACEOF

fi
LIBS=$ac_check_lib_ext_save_LIBS

if test $ac_cv_lib_ext_nsl = yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_LIBNSL 1
_ACEOF

		case "$LIBREPLACE_NETWORK_LIBS" in
		    *-lnsl*)
			;;
		    *)
			LIBREPLACE_NETWORK_LIBS="-lnsl $LIBREPLACE_NETWORK_LIBS"
			;;
		esac


fi


ac_check_lib_ext_save_LIBS=$LIBS
LIBS="-lsocket $LIBREPLACE_NETWORK_LIBS  $LIBS"



        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lsocket" >&5
$as_echo_n "checking for gethostbyname in -lsocket... " >&6; }
if test "${ac_cv_lib_ext_socket_gethostbyname+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char gethostbyname ();
int
main ()
{
return gethostbyname ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  ac_cv_lib_ext_socket_gethostbyname=yes;
		  ac_cv_lib_ext_socket=yes
else
  ac_cv_lib_ext_socket_gethostbyname=no;
		  ac_cv_lib_ext_socket=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ext_socket_gethostbyname" >&5
$as_echo "$ac_cv_lib_ext_socket_gethostbyname" >&6; }
    if test $ac_cv_lib_ext_socket_gethostbyname = yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_GETHOSTBYNAME 1
_ACEOF

fi
LIBS=$ac_check_lib_ext_save_LIBS

if test $ac_cv_lib_ext_socket = yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_LIBSOCKET 1
_ACEOF

		case "$LIBREPLACE_NETWORK_LIBS" in
		    *-lsocket*)
			;;
		    *)
			LIBREPLACE_NETWORK_LIBS="-lsocket $LIBREPLACE_NETWORK_LIBS"
			;;
		esac


fi
			if test x"$ac_cv_lib_ext_nsl_s_gethostbyname" = x"yes" ||
		test x"$ac_cv_lib_ext_nsl_gethostbyname" = x"yes" ||
		test x"$ac_cv_lib_ext_socket_gethostbyname" = x"yes"
	then

$as_echo "#define HAVE_GETHOSTBYNAME 1" >>confdefs.h

	fi
fi

for ac_func in if_nametoindex
do :
  ac_fn_c_check_func "$LINENO" "if_nametoindex" "ac_cv_func_if_nametoindex"
if test "x$ac_cv_func_if_nametoindex" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_IF_NAMETOINDEX 1
_ACEOF

fi
done

if test x"$ac_cv_func_if_nametoindex" = x"no"; then


ac_check_lib_ext_save_LIBS=$LIBS
LIBS="-lipv6 $LIBREPLACE_NETWORK_LIBS  $LIBS"



        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for if_nametoindex in -lipv6" >&5
$as_echo_n "checking for if_nametoindex in -lipv6... " >&6; }
if test "${ac_cv_lib_ext_ipv6_if_nametoindex+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char if_nametoindex ();
int
main ()
{
return if_nametoindex ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  ac_cv_lib_ext_ipv6_if_nametoindex=yes;
		  ac_cv_lib_ext_ipv6=yes
else
  ac_cv_lib_ext_ipv6_if_nametoindex=no;
		  ac_cv_lib_ext_ipv6=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ext_ipv6_if_nametoindex" >&5
$as_echo "$ac_cv_lib_ext_ipv6_if_nametoindex" >&6; }
    if test $ac_cv_lib_ext_ipv6_if_nametoindex = yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_IF_NAMETOINDEX 1
_ACEOF

fi
LIBS=$ac_check_lib_ext_save_LIBS

if test $ac_cv_lib_ext_ipv6 = yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_LIBIPV6 1
_ACEOF

		case "$LIBREPLACE_NETWORK_LIBS" in
		    *-lipv6*)
			;;
		    *)
			LIBREPLACE_NETWORK_LIBS="-lipv6 $LIBREPLACE_NETWORK_LIBS"
			;;
		esac


fi
			if test x"$ac_cv_lib_ext_ipv6_if_nametoindex" = x"yes"
	then

$as_echo "#define HAVE_IF_NAMETOINDEX 1" >>confdefs.h

	fi
fi

# The following tests need LIBS="${LIBREPLACE_NETWORK_LIBS}"
old_LIBS=$LIBS
LIBS="${LIBREPLACE_NETWORK_LIBS}"
libreplace_SAVE_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS -I$libreplacedir"

for ac_func in socketpair
do :
  ac_fn_c_check_func "$LINENO" "socketpair" "ac_cv_func_socketpair"
if test "x$ac_cv_func_socketpair" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_SOCKETPAIR 1
_ACEOF

else
  LIBREPLACE_NETWORK_OBJS="${LIBREPLACE_NETWORK_OBJS} socketpair.o"
fi
done


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken inet_ntoa" >&5
$as_echo_n "checking for broken inet_ntoa... " >&6; }
if test "${libreplace_cv_REPLACE_INET_NTOA+set}" = set; then :
  $as_echo_n "(cached) " >&6
else

if test "$cross_compiling" = yes; then :
  libreplace_cv_REPLACE_INET_NTOA=cross
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include <stdio.h>
#include <unistd.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
if ac_fn_c_try_run "$LINENO"; then :
  libreplace_cv_REPLACE_INET_NTOA=yes
else
  libreplace_cv_REPLACE_INET_NTOA=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext
fi

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libreplace_cv_REPLACE_INET_NTOA" >&5
$as_echo "$libreplace_cv_REPLACE_INET_NTOA" >&6; }

for ac_func in inet_ntoa
do :
  ac_fn_c_check_func "$LINENO" "inet_ntoa" "ac_cv_func_inet_ntoa"
if test "x$ac_cv_func_inet_ntoa" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_INET_NTOA 1
_ACEOF

else
  libreplace_cv_REPLACE_INET_NTOA=yes
fi
done

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

$as_echo "#define REPLACE_INET_NTOA 1" >>confdefs.h

    LIBREPLACE_NETWORK_OBJS="${LIBREPLACE_NETWORK_OBJS} inet_ntoa.o"
fi

for ac_func in inet_aton
do :
  ac_fn_c_check_func "$LINENO" "inet_aton" "ac_cv_func_inet_aton"
if test "x$ac_cv_func_inet_aton" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_INET_ATON 1
_ACEOF

else
  LIBREPLACE_NETWORK_OBJS="${LIBREPLACE_NETWORK_OBJS} inet_aton.o"
fi
done


for ac_func in inet_ntop
do :
  ac_fn_c_check_func "$LINENO" "inet_ntop" "ac_cv_func_inet_ntop"
if test "x$ac_cv_func_inet_ntop" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_INET_NTOP 1
_ACEOF

else
  LIBREPLACE_NETWORK_OBJS="${LIBREPLACE_NETWORK_OBJS} inet_ntop.o"
fi
done


for ac_func in inet_pton
do :
  ac_fn_c_check_func "$LINENO" "inet_pton" "ac_cv_func_inet_pton"
if test "x$ac_cv_func_inet_pton" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_INET_PTON 1
_ACEOF

else
  LIBREPLACE_NETWORK_OBJS="${LIBREPLACE_NETWORK_OBJS} inet_pton.o"
fi
done


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
$as_echo_n "checking for getaddrinfo... " >&6; }
if test "${libreplace_cv_HAVE_GETADDRINFO+set}" = set; then :
  $as_echo_n "(cached) " >&6
else

cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include <sys/types.h>
#if STDC_HEADERS
#include <stdlib.h>
#include <stddef.h>
#endif
#include <sys/socket.h>
#include <netdb.h>
int
main ()
{

struct sockaddr sa;
struct addrinfo *ai = NULL;
int ret = getaddrinfo(NULL, NULL, NULL, &ai);
if (ret != 0) {
	const char *es = gai_strerror(ret);
}
freeaddrinfo(ai);
ret = getnameinfo(&sa, sizeof(sa),
		NULL, 0,
		NULL, 0, 0);


  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  libreplace_cv_HAVE_GETADDRINFO=yes
else
  libreplace_cv_HAVE_GETADDRINFO=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libreplace_cv_HAVE_GETADDRINFO" >&5
$as_echo "$libreplace_cv_HAVE_GETADDRINFO" >&6; }
if test x"$libreplace_cv_HAVE_GETADDRINFO" = x"yes"; then

$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h


$as_echo "#define HAVE_GETNAMEINFO 1" >>confdefs.h


$as_echo "#define HAVE_FREEADDRINFO 1" >>confdefs.h


$as_echo "#define HAVE_GAI_STRERROR 1" >>confdefs.h

else
	LIBREPLACE_NETWORK_OBJS="${LIBREPLACE_NETWORK_OBJS} getaddrinfo.o"
fi

for ac_header in ifaddrs.h
do :
  ac_fn_c_check_header_mongrel "$LINENO" "ifaddrs.h" "ac_cv_header_ifaddrs_h" "$ac_includes_default"
if test "x$ac_cv_header_ifaddrs_h" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_IFADDRS_H 1
_ACEOF

fi

done


ac_fn_c_check_member "$LINENO" "struct sockaddr" "sa_len" "ac_cv_member_struct_sockaddr_sa_len" "#include <sys/socket.h>
"
if test "x$ac_cv_member_struct_sockaddr_sa_len" = x""yes; then :

cat >>confdefs.h <<_ACEOF
#define HAVE_STRUCT_SOCKADDR_SA_LEN 1
_ACEOF


$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h

fi


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getifaddrs and freeifaddrs" >&5
$as_echo_n "checking for getifaddrs and freeifaddrs... " >&6; }
if test "${libreplace_cv_HAVE_GETIFADDRS+set}" = set; then :
  $as_echo_n "(cached) " >&6
else

cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include <sys/types.h>
#if STDC_HEADERS
#include <stdlib.h>
#include <stddef.h>
#endif
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <ifaddrs.h>
#include <netdb.h>
int
main ()
{

struct ifaddrs *ifp = NULL;
int ret = getifaddrs (&ifp);
freeifaddrs(ifp);

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  libreplace_cv_HAVE_GETIFADDRS=yes
else
  libreplace_cv_HAVE_GETIFADDRS=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libreplace_cv_HAVE_GETIFADDRS" >&5
$as_echo "$libreplace_cv_HAVE_GETIFADDRS" >&6; }
if test x"$libreplace_cv_HAVE_GETIFADDRS" = x"yes"; then

$as_echo "#define HAVE_GETIFADDRS 1" >>confdefs.h


$as_echo "#define HAVE_FREEIFADDRS 1" >>confdefs.h


$as_echo "#define HAVE_STRUCT_IFADDRS 1" >>confdefs.h

fi

##################
# look for a method of finding the list of network interfaces
iface=no;
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for iface getifaddrs" >&5
$as_echo_n "checking for iface getifaddrs... " >&6; }
if test "${libreplace_cv_HAVE_IFACE_GETIFADDRS+set}" = set; then :
  $as_echo_n "(cached) " >&6
else

if test "$cross_compiling" = yes; then :
  libreplace_cv_HAVE_IFACE_GETIFADDRS=cross
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#define HAVE_IFACE_GETIFADDRS 1
#define NO_CONFIG_H 1
#define AUTOCONF_TEST 1
#define SOCKET_WRAPPER_NOT_REPLACE
#include "$libreplacedir/replace.c"
#include "$libreplacedir/inet_ntop.c"
#include "$libreplacedir/snprintf.c"
#include "$libreplacedir/getifaddrs.c"
#define getifaddrs_test main
#include "$libreplacedir/test/getifaddrs.c"
_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
  libreplace_cv_HAVE_IFACE_GETIFADDRS=yes
else
  libreplace_cv_HAVE_IFACE_GETIFADDRS=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext
fi

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libreplace_cv_HAVE_IFACE_GETIFADDRS" >&5
$as_echo "$libreplace_cv_HAVE_IFACE_GETIFADDRS" >&6; }
if test x"$libreplace_cv_HAVE_IFACE_GETIFADDRS" = x"yes"; then
    iface=yes;
$as_echo "#define HAVE_IFACE_GETIFADDRS 1" >>confdefs.h

else
	LIBREPLACE_NETWORK_OBJS="${LIBREPLACE_NETWORK_OBJS} getifaddrs.o"
fi


if test $iface = no; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for iface AIX" >&5
$as_echo_n "checking for iface AIX... " >&6; }
if test "${libreplace_cv_HAVE_IFACE_AIX+set}" = set; then :
  $as_echo_n "(cached) " >&6
else

if test "$cross_compiling" = yes; then :
  libreplace_cv_HAVE_IFACE_AIX=cross
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#define HAVE_IFACE_AIX 1
#define NO_CONFIG_H 1
#define AUTOCONF_TEST 1
#undef _XOPEN_SOURCE_EXTENDED
#define SOCKET_WRAPPER_NOT_REPLACE
#include "$libreplacedir/replace.c"
#include "$libreplacedir/inet_ntop.c"
#include "$libreplacedir/snprintf.c"
#include "$libreplacedir/getifaddrs.c"
#define getifaddrs_test main
#include "$libreplacedir/test/getifaddrs.c"
_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
  libreplace_cv_HAVE_IFACE_AIX=yes
else
  libreplace_cv_HAVE_IFACE_AIX=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext
fi

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libreplace_cv_HAVE_IFACE_AIX" >&5
$as_echo "$libreplace_cv_HAVE_IFACE_AIX" >&6; }
if test x"$libreplace_cv_HAVE_IFACE_AIX" = x"yes"; then
    iface=yes;
$as_echo "#define HAVE_IFACE_AIX 1" >>confdefs.h

fi
fi


if test $iface = no; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for iface ifconf" >&5
$as_echo_n "checking for iface ifconf... " >&6; }
if test "${libreplace_cv_HAVE_IFACE_IFCONF+set}" = set; then :
  $as_echo_n "(cached) " >&6
else

if test "$cross_compiling" = yes; then :
  libreplace_cv_HAVE_IFACE_IFCONF=cross
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#define HAVE_IFACE_IFCONF 1
#define NO_CONFIG_H 1
#define AUTOCONF_TEST 1
#define SOCKET_WRAPPER_NOT_REPLACE
#include "$libreplacedir/replace.c"
#include "$libreplacedir/inet_ntop.c"
#include "$libreplacedir/snprintf.c"
#include "$libreplacedir/getifaddrs.c"
#define getifaddrs_test main
#include "$libreplacedir/test/getifaddrs.c"
_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
  libreplace_cv_HAVE_IFACE_IFCONF=yes
else
  libreplace_cv_HAVE_IFACE_IFCONF=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext
fi

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libreplace_cv_HAVE_IFACE_IFCONF" >&5
$as_echo "$libreplace_cv_HAVE_IFACE_IFCONF" >&6; }
if test x"$libreplace_cv_HAVE_IFACE_IFCONF" = x"yes"; then
    iface=yes;
$as_echo "#define HAVE_IFACE_IFCONF 1" >>confdefs.h

fi
fi

if test $iface = no; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for iface ifreq" >&5
$as_echo_n "checking for iface ifreq... " >&6; }
if test "${libreplace_cv_HAVE_IFACE_IFREQ+set}" = set; then :
  $as_echo_n "(cached) " >&6
else

if test "$cross_compiling" = yes; then :
  libreplace_cv_HAVE_IFACE_IFREQ=cross
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#define HAVE_IFACE_IFREQ 1
#define NO_CONFIG_H 1
#define AUTOCONF_TEST 1
#define SOCKET_WRAPPER_NOT_REPLACE
#include "$libreplacedir/replace.c"
#include "$libreplacedir/inet_ntop.c"
#include "$libreplacedir/snprintf.c"
#include "$libreplacedir/getifaddrs.c"
#define getifaddrs_test main
#include "$libreplacedir/test/getifaddrs.c"
_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
  libreplace_cv_HAVE_IFACE_IFREQ=yes
else
  libreplace_cv_HAVE_IFACE_IFREQ=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext
fi

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libreplace_cv_HAVE_IFACE_IFREQ" >&5
$as_echo "$libreplace_cv_HAVE_IFACE_IFREQ" >&6; }
if test x"$libreplace_cv_HAVE_IFACE_IFREQ" = x"yes"; then
    iface=yes;
$as_echo "#define HAVE_IFACE_IFREQ 1" >>confdefs.h

fi
fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ipv6 support" >&5
$as_echo_n "checking for ipv6 support... " >&6; }
if test "${libreplace_cv_HAVE_IPV6+set}" = set; then :
  $as_echo_n "(cached) " >&6
else

	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include <stdlib.h> /* for NULL */
#include <sys/socket.h>
#include <sys/types.h>
#include <netdb.h>
#include <netinet/in.h>

int
main ()
{

struct sockaddr_storage sa_store;
struct addrinfo *ai = NULL;
struct in6_addr in6addr;
int idx = if_nametoindex("iface1");
int s = socket(AF_INET6, SOCK_STREAM, 0);
int ret = getaddrinfo(NULL, NULL, NULL, &ai);
if (ret != 0) {
	const char *es = gai_strerror(ret);
}
freeaddrinfo(ai);

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :

		libreplace_cv_HAVE_IPV6=yes

else

		libreplace_cv_HAVE_IPV6=no

fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libreplace_cv_HAVE_IPV6" >&5
$as_echo "$libreplace_cv_HAVE_IPV6" >&6; }
if test x"$libreplace_cv_HAVE_IPV6" = x"yes"; then

$as_echo "#define HAVE_IPV6 1" >>confdefs.h

fi

LIBS=$old_LIBS
CPPFLAGS="$libreplace_SAVE_CPPFLAGS"

LIBREPLACEOBJ="${LIBREPLACEOBJ} ${LIBREPLACE_NETWORK_OBJS}"

echo "LIBREPLACE_NETWORK_CHECKS: END"



MAKE_SETTINGS="$MAKE_SETTINGS
LIBREPLACE_EXT_LIBS = ${LIBDL} ${CRYPT_LIBS}
LIBREPLACE_EXT_CFLAGS =
LIBREPLACE_EXT_CPPFLAGS =
LIBREPLACE_EXT_LDFLAGS =
"



	MAKE_SETTINGS="$MAKE_SETTINGS
LIBREPLACE_EXT_ENABLE =
"
SMB_INFO_ENABLES="$SMB_INFO_ENABLES
\$enabled{\"LIBREPLACE_EXT\"} = \"\";"



MAKE_SETTINGS="$MAKE_SETTINGS
LIBREPLACE_NETWORK_LIBS = ${LIBREPLACE_NETWORK_LIBS}
LIBREPLACE_NETWORK_CFLAGS =
LIBREPLACE_NETWORK_CPPFLAGS =
LIBREPLACE_NETWORK_LDFLAGS =
"



	MAKE_SETTINGS="$MAKE_SETTINGS
LIBREPLACE_NETWORK_ENABLE =
"
SMB_INFO_ENABLES="$SMB_INFO_ENABLES
\$enabled{\"LIBREPLACE_NETWORK\"} = \"\";"


# remove leading ./
LIBREPLACE_DIR=`echo ${libreplacedir} |sed -e 's/^\.\///g'`

# remove leading srcdir .. we are looking for the relative
# path within the samba source tree or wherever libreplace is.
# We need to make sure the object is not forced to end up in
# the source directory because we might be using a separate
# build directory.
LIBREPLACE_DIR=`echo ${LIBREPLACE_DIR} | sed -e "s|^$srcdir/||g"`

LIBREPLACE_OBJS="${LIBREPLACEOBJ}"


MAKE_SETTINGS="$MAKE_SETTINGS
LIBREPLACE_CFLAGS = -Ilib/replace
LIBREPLACE_ENABLE = YES
LIBREPLACE_OBJ_FILES = ${LIBREPLACE_OBJS}
"

SMB_INFO_SUBSYSTEMS="$SMB_INFO_SUBSYSTEMS
###################################
# Start Subsystem LIBREPLACE
[SUBSYSTEM::LIBREPLACE]
PRIVATE_DEPENDENCIES = LIBREPLACE_EXT LIBREPLACE_NETWORK
CFLAGS = \$(LIBREPLACE_CFLAGS)
ENABLE = YES
# End Subsystem LIBREPLACE
###################################
"


LIBREPLACE_HOSTCC_OBJS=`echo ${LIBREPLACE_OBJS} |sed -e 's/\.o/\.ho/g'`


MAKE_SETTINGS="$MAKE_SETTINGS
LIBREPLACE_HOSTCC_CFLAGS = -Ilib/replace
LIBREPLACE_HOSTCC_ENABLE = YES
LIBREPLACE_HOSTCC_OBJ_FILES = ${LIBREPLACE_HOSTCC_OBJS}
"

SMB_INFO_SUBSYSTEMS="$SMB_INFO_SUBSYSTEMS
###################################
# Start Subsystem LIBREPLACE_HOSTCC
[SUBSYSTEM::LIBREPLACE_HOSTCC]
PRIVATE_DEPENDENCIES =
CFLAGS = \$(LIBREPLACE_HOSTCC_CFLAGS)
ENABLE = YES
# End Subsystem LIBREPLACE_HOSTCC
###################################
"


for ac_func in syslog
do :
  ac_fn_c_check_func "$LINENO" "syslog" "ac_cv_func_syslog"
if test "x$ac_cv_func_syslog" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_SYSLOG 1
_ACEOF

else
  as_fn_error "Required function not found" "$LINENO" 5
fi
done


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

EXTERNAL_READLINE=no
# test for where we get readline() from
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use readline" >&5
$as_echo_n "checking whether to use readline... " >&6; }

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

    for ac_header in readline.h history.h readline/readline.h
do :
  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
eval as_val=\$$as_ac_Header
   if test "x$as_val" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF

fi

done

    for ac_header in readline/history.h
do :
  ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
if test "x$ac_cv_header_readline_history_h" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_READLINE_HISTORY_H 1
_ACEOF

fi

done


    for ac_header in readline.h readline/readline.h
do :
  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
eval as_val=\$$as_ac_Header
   if test "x$as_val" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF

      for termlib in ncurses curses termcap terminfo termlib tinfo; do
       as_ac_Lib=`$as_echo "ac_cv_lib_${termlib}''_tgetent" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -l${termlib}" >&5
$as_echo_n "checking for tgetent in -l${termlib}... " >&6; }
if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
  $as_echo_n "(cached) " >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-l${termlib}  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char tgetent ();
int
main ()
{
return tgetent ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  eval "$as_ac_Lib=yes"
else
  eval "$as_ac_Lib=no"
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
eval ac_res=\$$as_ac_Lib
	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
eval as_val=\$$as_ac_Lib
   if test "x$as_val" = x""yes; then :
  TERMLIBS="-l${termlib}"; break
fi

      done
      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lreadline $TERMLIBS $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char rl_callback_handler_install ();
int
main ()
{
return rl_callback_handler_install ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  ac_cv_lib_readline_rl_callback_handler_install=yes
else
  ac_cv_lib_readline_rl_callback_handler_install=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
if test "x$ac_cv_lib_readline_rl_callback_handler_install" = x""yes; then :
  TERMLIBS="-lreadline $TERMLIBS"
       EXTERNAL_READLINE=yes
       break
else
  TERMLIBS=
fi

fi

done

    ;;
  no)
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
    ;;
  *)
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "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=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
eval as_val=\$$as_ac_Header
   if test "x$as_val" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF

fi

done

    for ac_header in readline/history.h
do :
  ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
if test "x$ac_cv_header_readline_history_h" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_READLINE_HISTORY_H 1
_ACEOF

fi

done


    for ac_header in readline.h readline/readline.h
do :
  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
eval as_val=\$$as_ac_Header
   if test "x$as_val" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF

      for termlib in ncurses curses termcap terminfo termlib; do
       as_ac_Lib=`$as_echo "ac_cv_lib_${termlib}''_tgetent" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -l${termlib}" >&5
$as_echo_n "checking for tgetent in -l${termlib}... " >&6; }
if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
  $as_echo_n "(cached) " >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-l${termlib}  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char tgetent ();
int
main ()
{
return tgetent ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  eval "$as_ac_Lib=yes"
else
  eval "$as_ac_Lib=no"
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
eval ac_res=\$$as_ac_Lib
	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
eval as_val=\$$as_ac_Lib
   if test "x$as_val" = x""yes; then :
  TERMLIBS="-l${termlib}"; break
fi

      done
      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lreadline $TERMLIBS $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char rl_callback_handler_install ();
int
main ()
{
return rl_callback_handler_install ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  ac_cv_lib_readline_rl_callback_handler_install=yes
else
  ac_cv_lib_readline_rl_callback_handler_install=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
if test "x$ac_cv_lib_readline_rl_callback_handler_install" = x""yes; then :
  TERMLDFLAGS="-L$with_readline/lib"
       TERMCPPFLAGS="-I$with_readline/include"
       LDFLAGS="-L$with_readline/lib $LDFLAGS"
       CPPFLAGS="-I$with_readline/include $CPPFLAGS"
       TERMLIBS="-lreadline $TERMLIBS"
       EXTERNAL_READLINE=yes
       break
else
  TERMLIBS= CPPFLAGS=$_cppflags
fi

fi

done


    ;;
  esac
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }

fi


# The readline API changed slightly from readline3 to readline4, so
# code will generate warnings on one of them unless we have a few
# special cases.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lreadline $TERMLIBS $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char rl_completion_matches ();
int
main ()
{
return rl_completion_matches ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  ac_cv_lib_readline_rl_completion_matches=yes
else
  ac_cv_lib_readline_rl_completion_matches=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
if test "x$ac_cv_lib_readline_rl_completion_matches" = x""yes; then :

$as_echo "#define HAVE_NEW_LIBREADLINE 1" >>confdefs.h

fi


# not all readline libs have rl_event_hook or history_list
ac_fn_c_check_decl "$LINENO" "rl_event_hook" "ac_cv_have_decl_rl_event_hook" "
    #include <stdio.h>
    #include <readline/readline.h>

"
if test "x$ac_cv_have_decl_rl_event_hook" = x""yes; then :
  ac_have_decl=1
else
  ac_have_decl=0
fi

cat >>confdefs.h <<_ACEOF
#define HAVE_DECL_RL_EVENT_HOOK $ac_have_decl
_ACEOF

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for history_list in -lreadline" >&5
$as_echo_n "checking for history_list in -lreadline... " >&6; }
if test "${ac_cv_lib_readline_history_list+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lreadline $TERMLIBS $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char history_list ();
int
main ()
{
return history_list ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  ac_cv_lib_readline_history_list=yes
else
  ac_cv_lib_readline_history_list=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_history_list" >&5
$as_echo "$ac_cv_lib_readline_history_list" >&6; }
if test "x$ac_cv_lib_readline_history_list" = x""yes; then :

$as_echo "#define HAVE_HISTORY_LIST 1" >>confdefs.h

fi


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use extern readline" >&5
$as_echo_n "checking whether to use extern readline... " >&6; }
if test x"$EXTERNAL_READLINE" = x"yes"; then
	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }

$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h


MAKE_SETTINGS="$MAKE_SETTINGS
SMBREADLINE_CFLAGS =
SMBREADLINE_ENABLE = YES
SMBREADLINE_OBJ_FILES = \$(smbreadlinesrcdir)/smbreadline.o
"

SMB_INFO_SUBSYSTEMS="$SMB_INFO_SUBSYSTEMS
###################################
# Start Subsystem SMBREADLINE
[SUBSYSTEM::SMBREADLINE]
PRIVATE_DEPENDENCIES = READLINE
CFLAGS = \$(SMBREADLINE_CFLAGS)
ENABLE = YES
# End Subsystem SMBREADLINE
###################################
"


MAKE_SETTINGS="$MAKE_SETTINGS
READLINE_LIBS = ${TERMLIBS}
READLINE_CFLAGS =
READLINE_CPPFLAGS =
READLINE_LDFLAGS =
"



	MAKE_SETTINGS="$MAKE_SETTINGS
READLINE_ENABLE = YES
"
SMB_INFO_ENABLES="$SMB_INFO_ENABLES
\$enabled{\"READLINE\"} = \"YES\";"

else

MAKE_SETTINGS="$MAKE_SETTINGS
SMBREADLINE_CFLAGS =
SMBREADLINE_ENABLE = YES
SMBREADLINE_OBJ_FILES = \$(smbreadlinesrcdir)/smbreadline.o
"

SMB_INFO_SUBSYSTEMS="$SMB_INFO_SUBSYSTEMS
###################################
# Start Subsystem SMBREADLINE
[SUBSYSTEM::SMBREADLINE]
PRIVATE_DEPENDENCIES =
CFLAGS = \$(SMBREADLINE_CFLAGS)
ENABLE = YES
# End Subsystem SMBREADLINE
###################################
"

	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


external_heimdal=no
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Whether to use external heimdal libraries" >&5
$as_echo_n "checking Whether to use external heimdal libraries... " >&6; }
# Check whether --enable-external-heimdal was given.
if test "${enable_external_heimdal+set}" = set; then :
  enableval=$enable_external_heimdal;  external_heimdal=$enableval
else
   external_heimdal=no
fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $external_heimdal" >&5
$as_echo "$external_heimdal" >&6; }

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

# external_heimdal_start
# This is every experimental
# We should really add configure checks
# to verify the installed heimdal libraries
# are good enough for our usage!!!

HEIMDAL_KRB5_LIBS="-lkrb5 -lcom_err"
HEIMDAL_KRB5_CFLAGS=""
HEIMDAL_KRB5_CPPFLAGS=""
HEIMDAL_KRB5_LDFLAGS=""

MAKE_SETTINGS="$MAKE_SETTINGS
HEIMDAL_KRB5_LIBS = ${HEIMDAL_KRB5_LIBS}
HEIMDAL_KRB5_CFLAGS = ${HEIMDAL_KRB5_CFLAGS}
HEIMDAL_KRB5_CPPFLAGS = ${HEIMDAL_KRB5_CPPFLAGS}
HEIMDAL_KRB5_LDFLAGS = ${HEIMDAL_KRB5_LDFLAGS}
"



	MAKE_SETTINGS="$MAKE_SETTINGS
HEIMDAL_KRB5_ENABLE =
"
SMB_INFO_ENABLES="$SMB_INFO_ENABLES
\$enabled{\"HEIMDAL_KRB5\"} = \"\";"


$as_echo "#define HAVE_KRB5 1" >>confdefs.h

HAVE_KRB5=YES

$as_echo "#define HAVE_COM_ERR 1" >>confdefs.h

HAVE_COM_ERR=YES

HEIMDAL_GSSAPI_LIBS="-lgssapi"
HEIMDAL_GSSAPI_CFLAGS=""
HEIMDAL_GSSAPI_CPPFLAGS=""
HEIMDAL_GSSAPI_LDFLAGS=""

MAKE_SETTINGS="$MAKE_SETTINGS
HEIMDAL_GSSAPI_LIBS = ${HEIMDAL_GSSAPI_LIBS}
HEIMDAL_GSSAPI_CFLAGS = ${HEIMDAL_GSSAPI_CFLAGS}
HEIMDAL_GSSAPI_CPPFLAGS = ${HEIMDAL_GSSAPI_CPPFLAGS}
HEIMDAL_GSSAPI_LDFLAGS = ${HEIMDAL_GSSAPI_LDFLAGS}
"



	MAKE_SETTINGS="$MAKE_SETTINGS
HEIMDAL_GSSAPI_ENABLE =
"
SMB_INFO_ENABLES="$SMB_INFO_ENABLES
\$enabled{\"HEIMDAL_GSSAPI\"} = \"\";"


$as_echo "#define HAVE_GSSAPI 1" >>confdefs.h

HAVE_GSSAPI=YES

HEIMDAL_HDB_LIBS="-lhdb"
HEIMDAL_HDB_CFLAGS=""
HEIMDAL_HDB_CPPFLAGS=""
HEIMDAL_HDB_LDFLAGS=""

MAKE_SETTINGS="$MAKE_SETTINGS
HEIMDAL_HDB_LIBS = ${HEIMDAL_HDB_LIBS}
HEIMDAL_HDB_CFLAGS = ${HEIMDAL_HDB_CFLAGS}
HEIMDAL_HDB_CPPFLAGS = ${HEIMDAL_HDB_CPPFLAGS}
HEIMDAL_HDB_LDFLAGS = ${HEIMDAL_HDB_LDFLAGS}
"



	MAKE_SETTINGS="$MAKE_SETTINGS
HEIMDAL_HDB_ENABLE =
"
SMB_INFO_ENABLES="$SMB_INFO_ENABLES
\$enabled{\"HEIMDAL_HDB\"} = \"\";"


HEIMDAL_KDC_LIBS="-lkdc"
HEIMDAL_KDC_CFLAGS=""
HEIMDAL_KDC_CPPFLAGS=""
HEIMDAL_KDC_LDFLAGS=""

MAKE_SETTINGS="$MAKE_SETTINGS
HEIMDAL_KDC_LIBS = ${HEIMDAL_KDC_LIBS}
HEIMDAL_KDC_CFLAGS = ${HEIMDAL_KDC_CFLAGS}
HEIMDAL_KDC_CPPFLAGS = ${HEIMDAL_KDC_CPPFLAGS}
HEIMDAL_KDC_LDFLAGS = ${HEIMDAL_KDC_LDFLAGS}
"



	MAKE_SETTINGS="$MAKE_SETTINGS
HEIMDAL_KDC_ENABLE =
"
SMB_INFO_ENABLES="$SMB_INFO_ENABLES
\$enabled{\"HEIMDAL_KDC\"} = \"\";"


# external_heimdal_end

else

# internal_heimdal_start





ac_fn_c_check_type "$LINENO" "u_char" "ac_cv_type_u_char" "$ac_includes_default"
if test "x$ac_cv_type_u_char" = x""yes; then :

else

cat >>confdefs.h <<_ACEOF
#define u_char uint8_t
_ACEOF

fi

ac_fn_c_check_type "$LINENO" "u_int32_t" "ac_cv_type_u_int32_t" "$ac_includes_default"
if test "x$ac_cv_type_u_int32_t" = x""yes; then :

else

cat >>confdefs.h <<_ACEOF
#define u_int32_t uint32_t
_ACEOF

fi


for ac_header in err.h
do :
  ac_fn_c_check_header_mongrel "$LINENO" "err.h" "ac_cv_header_err_h" "$ac_includes_default"
if test "x$ac_cv_header_err_h" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_ERR_H 1
_ACEOF

else
   cp heimdal/lib/roken/err.hin heimdal_build/err.h
fi

done


for ac_header in ifaddrs.h
do :
  ac_fn_c_check_header_mongrel "$LINENO" "ifaddrs.h" "ac_cv_header_ifaddrs_h" "$ac_includes_default"
if test "x$ac_cv_header_ifaddrs_h" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_IFADDRS_H 1
_ACEOF

else
   cp heimdal_build/ifaddrs.hin heimdal_build/ifaddrs.h
fi

done


for ac_header in 				\
	crypt.h					\
	curses.h				\
	errno.h					\
	inttypes.h				\
	netdb.h					\
	signal.h				\
	sys/bswap.h				\
	sys/file.h				\
	sys/stropts.h				\
	sys/timeb.h				\
	sys/times.h				\
	sys/uio.h				\
	sys/un.h				\
	sys/utsname.h				\
	term.h					\
	termcap.h				\
	time.h					\
	timezone.h				\
	ttyname.h				\
	netinet/in.h				\
	netinet/in6.h				\
	netinet6/in6.h				\
	libintl.h

do :
  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
eval as_val=\$$as_ac_Header
   if test "x$as_val" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF

fi

done


for ac_func in 				\
	atexit					\
	cgetent					\
	getprogname				\
	setprogname				\
	inet_aton				\
	gethostname				\
	getnameinfo				\
	iruserok				\
	putenv					\
	rcmd					\
	readv					\
	sendmsg					\
	setitimer				\
	socket					\
	strlwr					\
	strncasecmp				\
	strptime				\
	strsep					\
	strsep_copy				\
	strtok_r				\
	strupr					\
	swab					\
	umask					\
	uname					\
	unsetenv				\
	closefrom				\
	hstrerror				\
	err					\
	warn					\
	errx					\
	warnx					\
	flock					\
	getipnodebyname				\
	getipnodebyaddr				\
	freehostent				\
	writev

do :
  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
eval as_val=\$$as_ac_var
   if test "x$as_val" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF

fi
done




{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for bswap16" >&5
$as_echo_n "checking for bswap16... " >&6; }
if test "${ac_cv_love_func_bswap16+set}" = set; then :
  $as_echo_n "(cached) " >&6
else

cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#ifdef HAVE_SYS_BSWAP_H
#include <sys/bswap.h>
#endif
int
main ()
{
bswap16(0)
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  eval "ac_cv_love_func_bswap16=yes"
else
  eval "ac_cv_love_func_bswap16=no"
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi


eval "ac_res=\$ac_cv_love_func_bswap16"

if false; then
	for ac_func in bswap16
do :
  ac_fn_c_check_func "$LINENO" "bswap16" "ac_cv_func_bswap16"
if test "x$ac_cv_func_bswap16" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_BSWAP16 1
_ACEOF

fi
done

fi
# bswap16
eval "ac_tr_func=HAVE_`echo bswap16 | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`"

case "$ac_res" in
	yes)
	cat >>confdefs.h <<_ACEOF
#define $ac_tr_func 1
_ACEOF

	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
	;;
	no)
	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
	;;
esac






{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for bswap32" >&5
$as_echo_n "checking for bswap32... " >&6; }
if test "${ac_cv_love_func_bswap32+set}" = set; then :
  $as_echo_n "(cached) " >&6
else

cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#ifdef HAVE_SYS_BSWAP_H
#include <sys/bswap.h>
#endif
int
main ()
{
bswap32(0)
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  eval "ac_cv_love_func_bswap32=yes"
else
  eval "ac_cv_love_func_bswap32=no"
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi


eval "ac_res=\$ac_cv_love_func_bswap32"

if false; then
	for ac_func in bswap32
do :
  ac_fn_c_check_func "$LINENO" "bswap32" "ac_cv_func_bswap32"
if test "x$ac_cv_func_bswap32" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_BSWAP32 1
_ACEOF

fi
done

fi
# bswap32
eval "ac_tr_func=HAVE_`echo bswap32 | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`"

case "$ac_res" in
	yes)
	cat >>confdefs.h <<_ACEOF
#define $ac_tr_func 1
_ACEOF

	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
	;;
	no)
	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
	;;
esac







{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct winsize" >&5
$as_echo_n "checking for struct winsize... " >&6; }
if test "${ac_cv_struct_winsize+set}" = set; then :
  $as_echo_n "(cached) " >&6
else

ac_cv_struct_winsize=no
for i in sys/termios.h sys/ioctl.h; do
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <$i>

_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  $EGREP "struct[ 	]*winsize" >/dev/null 2>&1; then :
  ac_cv_struct_winsize=yes; break
fi
rm -f conftest*
done

fi

if test "$ac_cv_struct_winsize" = "yes"; then

$as_echo "#define HAVE_STRUCT_WINSIZE 1" >>confdefs.h

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_winsize" >&5
$as_echo "$ac_cv_struct_winsize" >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <termios.h>

_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  $EGREP "ws_xpixel" >/dev/null 2>&1; then :

$as_echo "#define HAVE_WS_XPIXEL 1" >>confdefs.h

fi
rm -f conftest*

cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <termios.h>

_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  $EGREP "ws_ypixel" >/dev/null 2>&1; then :

$as_echo "#define HAVE_WS_YPIXEL 1" >>confdefs.h

fi
rm -f conftest*



{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
$as_echo_n "checking return type of signal handlers... " >&6; }
if test "${ac_cv_type_signal+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <sys/types.h>
#include <signal.h>

int
main ()
{
return *(signal (0, 0)) (0) == 1;
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  ac_cv_type_signal=int
else
  ac_cv_type_signal=void
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
$as_echo "$ac_cv_type_signal" >&6; }

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


if test "$ac_cv_type_signal" = "void" ; then

$as_echo "#define VOID_RETSIGTYPE 1" >>confdefs.h

fi






# This is what autoupdate's m4 run will expand.  It fires
# the warning (with _au_warn_XXX), outputs it into the
# updated configure.ac (with AC_DIAGNOSE), and then outputs
# the replacement expansion.


# This is an auxiliary macro that is also run when
# autoupdate runs m4.  It simply calls m4_warning, but
# we need a wrapper so that each warning is emitted only
# once.  We break the quoting in m4_warning's argument in
# order to expand this macro's arguments, not AU_DEFUN's.


# Finally, this is the expansion that is picked up by
# autoconf.  It tells the user to run autoupdate, and
# then outputs the replacement expansion.  We do not care
# about autoupdate's warning because that contains
# information on what to do *after* running autoupdate.




{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for h_errno" >&5
$as_echo_n "checking for h_errno... " >&6; }
if test "${ac_cv_var_h_errno+set}" = set; then :
  $as_echo_n "(cached) " >&6
else


	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_NETDB_H
#include <netdb.h>
#endif
	void * foo(void) { return &h_errno; }
int
main ()
{
foo()
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  ac_cv_var_h_errno=yes
else
  ac_cv_var_h_errno=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
if test "$ac_cv_var_h_errno" != yes ; then
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
extern int h_errno;
int foo(void) { return h_errno; }
int
main ()
{
foo()
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  ac_cv_var_h_errno=yes
else
  ac_cv_var_h_errno=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi

fi

ac_foo=`eval echo \\$ac_cv_var_h_errno`
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_foo" >&5
$as_echo "$ac_foo" >&6; }
if test "$ac_foo" = yes; then

cat >>confdefs.h <<_ACEOF
#define HAVE_H_ERRNO 1
_ACEOF

	ac_fn_c_check_decl "$LINENO" "h_errno" "ac_cv_have_decl_h_errno" "#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_NETDB_H
#include <netdb.h>
#endif
"
if test "x$ac_cv_have_decl_h_errno" = x""yes; then :
  ac_have_decl=1
else
  ac_have_decl=0
fi

cat >>confdefs.h <<_ACEOF
#define HAVE_DECL_H_ERRNO $ac_have_decl
_ACEOF

fi














for ac_header in pty.h util.h libutil.h
do :
  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
eval as_val=\$$as_ac_Header
   if test "x$as_val" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF

fi

done




ac_check_lib_ext_save_LIBS=$LIBS
LIBS="-lutil $OPENPTY_LIBS  $LIBS"



        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
$as_echo_n "checking for openpty in -lutil... " >&6; }
if test "${ac_cv_lib_ext_util_openpty+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char openpty ();
int
main ()
{
return openpty ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  ac_cv_lib_ext_util_openpty=yes;
		  ac_cv_lib_ext_util=yes
else
  ac_cv_lib_ext_util_openpty=no;
		  ac_cv_lib_ext_util=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ext_util_openpty" >&5
$as_echo "$ac_cv_lib_ext_util_openpty" >&6; }
    if test $ac_cv_lib_ext_util_openpty = yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_OPENPTY 1
_ACEOF

fi
LIBS=$ac_check_lib_ext_save_LIBS

if test $ac_cv_lib_ext_util = yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_LIBUTIL 1
_ACEOF

		case "$OPENPTY_LIBS" in
		    *-lutil*)
			;;
		    *)
			OPENPTY_LIBS="-lutil $OPENPTY_LIBS"
			;;
		esac


fi


	MAKE_SETTINGS="$MAKE_SETTINGS
OPENPTY_ENABLE = YES
"
SMB_INFO_ENABLES="$SMB_INFO_ENABLES
\$enabled{\"OPENPTY\"} = \"YES\";"



MAKE_SETTINGS="$MAKE_SETTINGS
OPENPTY_LIBS = ${OPENPTY_LIBS}
OPENPTY_CFLAGS = ${OPENPTY_CFLAGS}
OPENPTY_CPPFLAGS = ${OPENPTY_CPPFLAGS}
OPENPTY_LDFLAGS = ${OPENPTY_LDFLAGS}
"





ac_check_lib_ext_save_LIBS=$LIBS
LIBS="-lintl $INTL_LIBS  $LIBS"



        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gettext in -lintl" >&5
$as_echo_n "checking for gettext in -lintl... " >&6; }
if test "${ac_cv_lib_ext_intl_gettext+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char gettext ();
int
main ()
{
return gettext ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  ac_cv_lib_ext_intl_gettext=yes;
		  ac_cv_lib_ext_intl=yes
else
  ac_cv_lib_ext_intl_gettext=no;
		  ac_cv_lib_ext_intl=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ext_intl_gettext" >&5
$as_echo "$ac_cv_lib_ext_intl_gettext" >&6; }
    if test $ac_cv_lib_ext_intl_gettext = yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_GETTEXT 1
_ACEOF

fi
LIBS=$ac_check_lib_ext_save_LIBS

if test $ac_cv_lib_ext_intl = yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_LIBINTL 1
_ACEOF

		case "$INTL_LIBS" in
		    *-lintl*)
			;;
		    *)
			INTL_LIBS="-lintl $INTL_LIBS"
			;;
		esac


fi


	MAKE_SETTINGS="$MAKE_SETTINGS
INTL_ENABLE = YES
"
SMB_INFO_ENABLES="$SMB_INFO_ENABLES
\$enabled{\"INTL\"} = \"YES\";"



MAKE_SETTINGS="$MAKE_SETTINGS
INTL_LIBS = $INTL_LIBS
INTL_CFLAGS =
INTL_CPPFLAGS =
INTL_LDFLAGS =
"



smb_save_LIBS=$LIBS
RESOLV_LIBS=""
LIBS=""



for ac_header in arpa/nameser.h dns.h
do :
  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
eval as_val=\$$as_ac_Header
   if test "x$as_val" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF

fi

done


for ac_header in resolv.h
do :
  ac_fn_c_check_header_compile "$LINENO" "resolv.h" "ac_cv_header_resolv_h" "$ac_includes_default
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
#ifdef HAVE_ARPA_NAMESER_H
#include <arpa/nameser.h>
#endif

"
if test "x$ac_cv_header_resolv_h" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_RESOLV_H 1
_ACEOF

fi

done






{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_search" >&5
$as_echo_n "checking for res_search... " >&6; }
if test "${ac_cv_funclib_res_search+set}" = set; then :
  $as_echo_n "(cached) " >&6
else

if eval "test \"\$ac_cv_func_res_search\" != yes" ; then
	ac_save_LIBS="$LIBS"
	for ac_lib in "" resolv; do
		case "$ac_lib" in
		"") ;;
		yes) ac_lib="" ;;
		no) continue ;;
		-l*) ;;
		*) ac_lib="-l$ac_lib" ;;
		esac
		LIBS=" $ac_lib  $ac_save_LIBS"
		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include <stdio.h>
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
#ifdef HAVE_ARPA_NAMESER_H
#include <arpa/nameser.h>
#endif
#ifdef HAVE_RESOLV_H
#include <resolv.h>
#endif

int
main ()
{
res_search(0,0,0,0,0)
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  eval "if test -n \"$ac_lib\";then ac_cv_funclib_res_search=$ac_lib; else ac_cv_funclib_res_search=yes; fi";break
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
	done
	eval "ac_cv_funclib_res_search=\${ac_cv_funclib_res_search-no}"
	LIBS="$ac_save_LIBS"
fi

fi


eval "ac_res=\$ac_cv_funclib_res_search"

if false; then
	for ac_func in res_search
do :
  ac_fn_c_check_func "$LINENO" "res_search" "ac_cv_func_res_search"
if test "x$ac_cv_func_res_search" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_RES_SEARCH 1
_ACEOF

fi
done

fi
# res_search
eval "ac_tr_func=HAVE_`echo res_search | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`"
eval "ac_tr_lib=HAVE_LIB`echo $ac_res | sed -e 's/-l//' | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`"
eval "LIB_res_search=$ac_res"

case "$ac_res" in
	yes)
	eval "ac_cv_func_res_search=yes"
	eval "LIB_res_search="
	cat >>confdefs.h <<_ACEOF
#define $ac_tr_func 1
_ACEOF

	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
	;;
	no)
	eval "ac_cv_func_res_search=no"
	eval "LIB_res_search="
	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
	;;
	*)
	eval "ac_cv_func_res_search=yes"
	eval "ac_cv_lib_`echo "$ac_res" | sed 's/-l//'`=yes"
	cat >>confdefs.h <<_ACEOF
#define $ac_tr_func 1
_ACEOF

	cat >>confdefs.h <<_ACEOF
#define $ac_tr_lib 1
_ACEOF

	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, in $ac_res" >&5
$as_echo "yes, in $ac_res" >&6; }
	;;
esac


if test -n "$LIB_res_search"; then
	LIBS="$LIB_res_search $LIBS"
fi






{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_nsearch" >&5
$as_echo_n "checking for res_nsearch... " >&6; }
if test "${ac_cv_funclib_res_nsearch+set}" = set; then :
  $as_echo_n "(cached) " >&6
else

if eval "test \"\$ac_cv_func_res_nsearch\" != yes" ; then
	ac_save_LIBS="$LIBS"
	for ac_lib in "" resolv; do
		case "$ac_lib" in
		"") ;;
		yes) ac_lib="" ;;
		no) continue ;;
		-l*) ;;
		*) ac_lib="-l$ac_lib" ;;
		esac
		LIBS=" $ac_lib  $ac_save_LIBS"
		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include <stdio.h>
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
#ifdef HAVE_ARPA_NAMESER_H
#include <arpa/nameser.h>
#endif
#ifdef HAVE_RESOLV_H
#include <resolv.h>
#endif

int
main ()
{
res_nsearch(0,0,0,0,0,0)
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  eval "if test -n \"$ac_lib\";then ac_cv_funclib_res_nsearch=$ac_lib; else ac_cv_funclib_res_nsearch=yes; fi";break
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
	done
	eval "ac_cv_funclib_res_nsearch=\${ac_cv_funclib_res_nsearch-no}"
	LIBS="$ac_save_LIBS"
fi

fi


eval "ac_res=\$ac_cv_funclib_res_nsearch"

if false; then
	for ac_func in res_nsearch
do :
  ac_fn_c_check_func "$LINENO" "res_nsearch" "ac_cv_func_res_nsearch"
if test "x$ac_cv_func_res_nsearch" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_RES_NSEARCH 1
_ACEOF

fi
done

fi
# res_nsearch
eval "ac_tr_func=HAVE_`echo res_nsearch | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`"
eval "ac_tr_lib=HAVE_LIB`echo $ac_res | sed -e 's/-l//' | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`"
eval "LIB_res_nsearch=$ac_res"

case "$ac_res" in
	yes)
	eval "ac_cv_func_res_nsearch=yes"
	eval "LIB_res_nsearch="
	cat >>confdefs.h <<_ACEOF
#define $ac_tr_func 1
_ACEOF

	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
	;;
	no)
	eval "ac_cv_func_res_nsearch=no"
	eval "LIB_res_nsearch="
	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
	;;
	*)
	eval "ac_cv_func_res_nsearch=yes"
	eval "ac_cv_lib_`echo "$ac_res" | sed 's/-l//'`=yes"
	cat >>confdefs.h <<_ACEOF
#define $ac_tr_func 1
_ACEOF

	cat >>confdefs.h <<_ACEOF
#define $ac_tr_lib 1
_ACEOF

	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, in $ac_res" >&5
$as_echo "yes, in $ac_res" >&6; }
	;;
esac


if test -n "$LIB_res_nsearch"; then
	LIBS="$LIB_res_nsearch $LIBS"
fi






{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_ndestroy" >&5
$as_echo_n "checking for res_ndestroy... " >&6; }
if test "${ac_cv_funclib_res_ndestroy+set}" = set; then :
  $as_echo_n "(cached) " >&6
else

if eval "test \"\$ac_cv_func_res_ndestroy\" != yes" ; then
	ac_save_LIBS="$LIBS"
	for ac_lib in "" resolv; do
		case "$ac_lib" in
		"") ;;
		yes) ac_lib="" ;;
		no) continue ;;
		-l*) ;;
		*) ac_lib="-l$ac_lib" ;;
		esac
		LIBS=" $ac_lib  $ac_save_LIBS"
		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include <stdio.h>
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
#ifdef HAVE_ARPA_NAMESER_H
#include <arpa/nameser.h>
#endif
#ifdef HAVE_RESOLV_H
#include <resolv.h>
#endif

int
main ()
{
res_ndestroy(0)
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  eval "if test -n \"$ac_lib\";then ac_cv_funclib_res_ndestroy=$ac_lib; else ac_cv_funclib_res_ndestroy=yes; fi";break
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
	done
	eval "ac_cv_funclib_res_ndestroy=\${ac_cv_funclib_res_ndestroy-no}"
	LIBS="$ac_save_LIBS"
fi

fi


eval "ac_res=\$ac_cv_funclib_res_ndestroy"

if false; then
	for ac_func in res_ndestroy
do :
  ac_fn_c_check_func "$LINENO" "res_ndestroy" "ac_cv_func_res_ndestroy"
if test "x$ac_cv_func_res_ndestroy" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_RES_NDESTROY 1
_ACEOF

fi
done

fi
# res_ndestroy
eval "ac_tr_func=HAVE_`echo res_ndestroy | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`"
eval "ac_tr_lib=HAVE_LIB`echo $ac_res | sed -e 's/-l//' | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`"
eval "LIB_res_ndestroy=$ac_res"

case "$ac_res" in
	yes)
	eval "ac_cv_func_res_ndestroy=yes"
	eval "LIB_res_ndestroy="
	cat >>confdefs.h <<_ACEOF
#define $ac_tr_func 1
_ACEOF

	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
	;;
	no)
	eval "ac_cv_func_res_ndestroy=no"
	eval "LIB_res_ndestroy="
	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
	;;
	*)
	eval "ac_cv_func_res_ndestroy=yes"
	eval "ac_cv_lib_`echo "$ac_res" | sed 's/-l//'`=yes"
	cat >>confdefs.h <<_ACEOF
#define $ac_tr_func 1
_ACEOF

	cat >>confdefs.h <<_ACEOF
#define $ac_tr_lib 1
_ACEOF

	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, in $ac_res" >&5
$as_echo "yes, in $ac_res" >&6; }
	;;
esac


if test -n "$LIB_res_ndestroy"; then
	LIBS="$LIB_res_ndestroy $LIBS"
fi





{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dns_search" >&5
$as_echo_n "checking for dns_search... " >&6; }
if test "${ac_cv_funclib_dns_search+set}" = set; then :
  $as_echo_n "(cached) " >&6
else

if eval "test \"\$ac_cv_func_dns_search\" != yes" ; then
	ac_save_LIBS="$LIBS"
	for ac_lib in "" ; do
		case "$ac_lib" in
		"") ;;
		yes) ac_lib="" ;;
		no) continue ;;
		-l*) ;;
		*) ac_lib="-l$ac_lib" ;;
		esac
		LIBS=" $ac_lib  $ac_save_LIBS"
		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#ifdef HAVE_DNS_H
#include <dns.h>
#endif

int
main ()
{
dns_search(0,0,0,0,0,0,0,0)
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  eval "if test -n \"$ac_lib\";then ac_cv_funclib_dns_search=$ac_lib; else ac_cv_funclib_dns_search=yes; fi";break
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
	done
	eval "ac_cv_funclib_dns_search=\${ac_cv_funclib_dns_search-no}"
	LIBS="$ac_save_LIBS"
fi

fi


eval "ac_res=\$ac_cv_funclib_dns_search"

if false; then
	for ac_func in dns_search
do :
  ac_fn_c_check_func "$LINENO" "dns_search" "ac_cv_func_dns_search"
if test "x$ac_cv_func_dns_search" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_DNS_SEARCH 1
_ACEOF

fi
done

fi
# dns_search
eval "ac_tr_func=HAVE_`echo dns_search | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`"
eval "ac_tr_lib=HAVE_LIB`echo $ac_res | sed -e 's/-l//' | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`"
eval "LIB_dns_search=$ac_res"

case "$ac_res" in
	yes)
	eval "ac_cv_func_dns_search=yes"
	eval "LIB_dns_search="
	cat >>confdefs.h <<_ACEOF
#define $ac_tr_func 1
_ACEOF

	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
	;;
	no)
	eval "ac_cv_func_dns_search=no"
	eval "LIB_dns_search="
	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
	;;
	*)
	eval "ac_cv_func_dns_search=yes"
	eval "ac_cv_lib_`echo "$ac_res" | sed 's/-l//'`=yes"
	cat >>confdefs.h <<_ACEOF
#define $ac_tr_func 1
_ACEOF

	cat >>confdefs.h <<_ACEOF
#define $ac_tr_lib 1
_ACEOF

	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, in $ac_res" >&5
$as_echo "yes, in $ac_res" >&6; }
	;;
esac








{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dn_expand" >&5
$as_echo_n "checking for dn_expand... " >&6; }
if test "${ac_cv_funclib_dn_expand+set}" = set; then :
  $as_echo_n "(cached) " >&6
else

if eval "test \"\$ac_cv_func_dn_expand\" != yes" ; then
	ac_save_LIBS="$LIBS"
	for ac_lib in "" resolv; do
		case "$ac_lib" in
		"") ;;
		yes) ac_lib="" ;;
		no) continue ;;
		-l*) ;;
		*) ac_lib="-l$ac_lib" ;;
		esac
		LIBS=" $ac_lib  $ac_save_LIBS"
		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include <stdio.h>
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
#ifdef HAVE_ARPA_NAMESER_H
#include <arpa/nameser.h>
#endif
#ifdef HAVE_RESOLV_H
#include <resolv.h>
#endif

int
main ()
{
dn_expand(0,0,0,0,0)
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  eval "if test -n \"$ac_lib\";then ac_cv_funclib_dn_expand=$ac_lib; else ac_cv_funclib_dn_expand=yes; fi";break
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
	done
	eval "ac_cv_funclib_dn_expand=\${ac_cv_funclib_dn_expand-no}"
	LIBS="$ac_save_LIBS"
fi

fi


eval "ac_res=\$ac_cv_funclib_dn_expand"

if false; then
	for ac_func in dn_expand
do :
  ac_fn_c_check_func "$LINENO" "dn_expand" "ac_cv_func_dn_expand"
if test "x$ac_cv_func_dn_expand" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_DN_EXPAND 1
_ACEOF

fi
done

fi
# dn_expand
eval "ac_tr_func=HAVE_`echo dn_expand | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`"
eval "ac_tr_lib=HAVE_LIB`echo $ac_res | sed -e 's/-l//' | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`"
eval "LIB_dn_expand=$ac_res"

case "$ac_res" in
	yes)
	eval "ac_cv_func_dn_expand=yes"
	eval "LIB_dn_expand="
	cat >>confdefs.h <<_ACEOF
#define $ac_tr_func 1
_ACEOF

	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
	;;
	no)
	eval "ac_cv_func_dn_expand=no"
	eval "LIB_dn_expand="
	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
	;;
	*)
	eval "ac_cv_func_dn_expand=yes"
	eval "ac_cv_lib_`echo "$ac_res" | sed 's/-l//'`=yes"
	cat >>confdefs.h <<_ACEOF
#define $ac_tr_func 1
_ACEOF

	cat >>confdefs.h <<_ACEOF
#define $ac_tr_lib 1
_ACEOF

	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, in $ac_res" >&5
$as_echo "yes, in $ac_res" >&6; }
	;;
esac


if test -n "$LIB_dn_expand"; then
	LIBS="$LIB_dn_expand $LIBS"
fi



{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _res" >&5
$as_echo_n "checking for _res... " >&6; }
if test "${ac_cv_var__res+set}" = set; then :
  $as_echo_n "(cached) " >&6
else


	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <stdio.h>
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
#ifdef HAVE_ARPA_NAMESER_H
#include <arpa/nameser.h>
#endif
#ifdef HAVE_RESOLV_H
#include <resolv.h>
#endif
	void * foo(void) { return &_res; }
int
main ()
{
foo()
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  ac_cv_var__res=yes
else
  ac_cv_var__res=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
if test "$ac_cv_var__res" != yes ; then
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
extern int _res;
int foo(void) { return _res; }
int
main ()
{
foo()
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  ac_cv_var__res=yes
else
  ac_cv_var__res=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi

fi

ac_foo=`eval echo \\$ac_cv_var__res`
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_foo" >&5
$as_echo "$ac_foo" >&6; }
if test "$ac_foo" = yes; then

cat >>confdefs.h <<_ACEOF
#define HAVE__RES 1
_ACEOF

	ac_fn_c_check_decl "$LINENO" "_res" "ac_cv_have_decl__res" "#include <stdio.h>
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
#ifdef HAVE_ARPA_NAMESER_H
#include <arpa/nameser.h>
#endif
#ifdef HAVE_RESOLV_H
#include <resolv.h>
#endif
"
if test "x$ac_cv_have_decl__res" = x""yes; then :
  ac_have_decl=1
else
  ac_have_decl=0
fi

cat >>confdefs.h <<_ACEOF
#define HAVE_DECL__RES $ac_have_decl
_ACEOF

fi





	MAKE_SETTINGS="$MAKE_SETTINGS
RESOLV_ENABLE = YES
"
SMB_INFO_ENABLES="$SMB_INFO_ENABLES
\$enabled{\"RESOLV\"} = \"YES\";"


if test x"$LIBS" != "x"; then
	RESOLV_LIBS=$LIBS
fi

LIBS=$smb_save_LIBS


MAKE_SETTINGS="$MAKE_SETTINGS
RESOLV_LIBS = ${RESOLV_LIBS}
RESOLV_CFLAGS = ${RESOLV_CFLAGS}
RESOLV_CPPFLAGS = ${RESOLV_CPPFLAGS}
RESOLV_LDFLAGS = ${RESOLV_LDFLAGS}
"




# these are disabled unless heimdal is found below

	MAKE_SETTINGS="$MAKE_SETTINGS
KERBEROS_LIB_ENABLE = NO
"
SMB_INFO_ENABLES="$SMB_INFO_ENABLES
\$enabled{\"KERBEROS_LIB\"} = \"NO\";"


	MAKE_SETTINGS="$MAKE_SETTINGS
asn1_compile_ENABLE = NO
"
SMB_INFO_ENABLES="$SMB_INFO_ENABLES
\$enabled{\"asn1_compile\"} = \"NO\";"


	MAKE_SETTINGS="$MAKE_SETTINGS
compile_et_ENABLE = NO
"
SMB_INFO_ENABLES="$SMB_INFO_ENABLES
\$enabled{\"compile_et\"} = \"NO\";"


#
# We need bison -y and flex in new versions
# Otherwise we get random runtime failures
#
LEX_YACC_COMBINATIONS=""
LEX_YACC_COMBINATIONS="$LEX_YACC_COMBINATIONS flex-2.5.33:bison-2.3"
LEX_YACC_COMBINATIONS="$LEX_YACC_COMBINATIONS flex-2.5.34:bison-2.3"

for ac_prog in flex lex
do
  # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_LEX+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  if test -n "$LEX"; then
  ac_cv_prog_LEX="$LEX" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_LEX="$ac_prog"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

fi
fi
LEX=$ac_cv_prog_LEX
if test -n "$LEX"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LEX" >&5
$as_echo "$LEX" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


  test -n "$LEX" && break
done
test -n "$LEX" || LEX=":"

if test "x$LEX" != "x:"; then
  cat >conftest.l <<_ACEOF
%%
a { ECHO; }
b { REJECT; }
c { yymore (); }
d { yyless (1); }
e { yyless (input () != 0); }
f { unput (yytext[0]); }
. { BEGIN INITIAL; }
%%
#ifdef YYTEXT_POINTER
extern char *yytext;
#endif
int
main (void)
{
  return ! yylex () + ! yywrap ();
}
_ACEOF
{ { ac_try="$LEX conftest.l"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
  (eval "$LEX conftest.l") 2>&5
  ac_status=$?
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking lex output file root" >&5
$as_echo_n "checking lex output file root... " >&6; }
if test "${ac_cv_prog_lex_root+set}" = set; then :
  $as_echo_n "(cached) " >&6
else

if test -f lex.yy.c; then
  ac_cv_prog_lex_root=lex.yy
elif test -f lexyy.c; then
  ac_cv_prog_lex_root=lexyy
else
  as_fn_error "cannot find output from $LEX; giving up" "$LINENO" 5
fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_root" >&5
$as_echo "$ac_cv_prog_lex_root" >&6; }
LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root

if test -z "${LEXLIB+set}"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking lex library" >&5
$as_echo_n "checking lex library... " >&6; }
if test "${ac_cv_lib_lex+set}" = set; then :
  $as_echo_n "(cached) " >&6
else

    ac_save_LIBS=$LIBS
    ac_cv_lib_lex='none needed'
    for ac_lib in '' -lfl -ll; do
      LIBS="$ac_lib $ac_save_LIBS"
      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
`cat $LEX_OUTPUT_ROOT.c`
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  ac_cv_lib_lex=$ac_lib
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
      test "$ac_cv_lib_lex" != 'none needed' && break
    done
    LIBS=$ac_save_LIBS

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lex" >&5
$as_echo "$ac_cv_lib_lex" >&6; }
  test "$ac_cv_lib_lex" != 'none needed' && LEXLIB=$ac_cv_lib_lex
fi


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether yytext is a pointer" >&5
$as_echo_n "checking whether yytext is a pointer... " >&6; }
if test "${ac_cv_prog_lex_yytext_pointer+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  # POSIX says lex can declare yytext either as a pointer or an array; the
# default is implementation-dependent.  Figure out which it is, since
# not all implementations provide the %pointer and %array declarations.
ac_cv_prog_lex_yytext_pointer=no
ac_save_LIBS=$LIBS
LIBS="$LEXLIB $ac_save_LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#define YYTEXT_POINTER 1
`cat $LEX_OUTPUT_ROOT.c`
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  ac_cv_prog_lex_yytext_pointer=yes
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_save_LIBS

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_yytext_pointer" >&5
$as_echo "$ac_cv_prog_lex_yytext_pointer" >&6; }
if test $ac_cv_prog_lex_yytext_pointer = yes; then

$as_echo "#define YYTEXT_POINTER 1" >>confdefs.h

fi
rm -f conftest.l $LEX_OUTPUT_ROOT.c

fi
LEX_BASENAME=`basename "$LEX"`
if test x"$LEX_BASENAME" = x"flex"; then
	# "flex 2.5.33"
	FLEX_VERSION=`$LEX --version | cut -d ' ' -f2`
	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking flex version" >&5
$as_echo_n "checking flex version... " >&6; }
	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $FLEX_VERSION" >&5
$as_echo "$FLEX_VERSION" >&6; }
	FLEX_MAJOR=`echo $FLEX_VERSION | cut -d '.' -f1`
	FLEX_MINOR=`echo $FLEX_VERSION | cut -d '.' -f2`
	FLEX_RELEASE=`echo $FLEX_VERSION | cut -d '.' -f3`

	LEX_VERSION="flex-$FLEX_MAJOR.$FLEX_MINOR.$FLEX_RELEASE"
fi

for ac_prog in 'bison -y' byacc
do
  # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_YACC+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  if test -n "$YACC"; then
  ac_cv_prog_YACC="$YACC" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_YACC="$ac_prog"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

fi
fi
YACC=$ac_cv_prog_YACC
if test -n "$YACC"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
$as_echo "$YACC" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


  test -n "$YACC" && break
done
test -n "$YACC" || YACC="yacc"

YACC_BASENAME=`basename "$YACC"`
if test x"$YACC_BASENAME" = x"bison -y"; then
	# bison (GNU Bison) 2.3
	BISON_VERSION=`$YACC --version | head -1 | cut -d ' ' -f4`
	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking bison version" >&5
$as_echo_n "checking bison version... " >&6; }
	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON_VERSION" >&5
$as_echo "$BISON_VERSION" >&6; }
	BISON_MAJOR=`echo $BISON_VERSION | cut -d '.' -f1`
	BISON_MINOR=`echo $BISON_VERSION | cut -d '.' -f2`

	YACC_VERSION="bison-$BISON_MAJOR.$BISON_MINOR"
fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking working LEX YACC combination" >&5
$as_echo_n "checking working LEX YACC combination... " >&6; }
LEX_YACC="no"
if test x"$LEX_VERSION" != x"" -a x"$YACC_VERSION" != x""; then
	V="$LEX_VERSION:$YACC_VERSION"
	for C in $LEX_YACC_COMBINATIONS; do
		if test x"$V" = x"$C"; then
			LEX_YACC=$V
			break;
		fi
	done
fi
if test x"$LEX_YACC" = x"no"; then
	LEX=false
	YACC=false
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LEX_YACC" >&5
$as_echo "$LEX_YACC" >&6; }

# Portions of heimdal kerberos are unpacked into source/heimdal
# of the samba source tree.

# if we ever get to using a host kerberos, we might add conditionals here

$as_echo "#define HAVE_COM_ERR 1" >>confdefs.h

HAVE_COM_ERR=YES

$as_echo "#define HAVE_KRB5 1" >>confdefs.h

HAVE_KRB5=YES

$as_echo "#define HAVE_GSSAPI 1" >>confdefs.h

HAVE_GSSAPI=YES

	MAKE_SETTINGS="$MAKE_SETTINGS
KERBEROS_LIB_ENABLE = YES
"
SMB_INFO_ENABLES="$SMB_INFO_ENABLES
\$enabled{\"KERBEROS_LIB\"} = \"YES\";"


	MAKE_SETTINGS="$MAKE_SETTINGS
asn1_compile_ENABLE = YES
"
SMB_INFO_ENABLES="$SMB_INFO_ENABLES
\$enabled{\"asn1_compile\"} = \"YES\";"


	MAKE_SETTINGS="$MAKE_SETTINGS
compile_et_ENABLE = YES
"
SMB_INFO_ENABLES="$SMB_INFO_ENABLES
\$enabled{\"compile_et\"} = \"YES\";"


# only add closefrom if needed

	MAKE_SETTINGS="$MAKE_SETTINGS
HEIMDAL_ROKEN_CLOSEFROM_ENABLE = NO
"
SMB_INFO_ENABLES="$SMB_INFO_ENABLES
\$enabled{\"HEIMDAL_ROKEN_CLOSEFROM\"} = \"NO\";"


	MAKE_SETTINGS="$MAKE_SETTINGS
HEIMDAL_ROKEN_CLOSEFROM_H_ENABLE = NO
"
SMB_INFO_ENABLES="$SMB_INFO_ENABLES
\$enabled{\"HEIMDAL_ROKEN_CLOSEFROM_H\"} = \"NO\";"

if test t$ac_cv_func_closefrom != tyes; then

	MAKE_SETTINGS="$MAKE_SETTINGS
HEIMDAL_ROKEN_CLOSEFROM_ENABLE = YES
"
SMB_INFO_ENABLES="$SMB_INFO_ENABLES
\$enabled{\"HEIMDAL_ROKEN_CLOSEFROM\"} = \"YES\";"


	MAKE_SETTINGS="$MAKE_SETTINGS
HEIMDAL_ROKEN_CLOSEFROM_H_ENABLE = YES
"
SMB_INFO_ENABLES="$SMB_INFO_ENABLES
\$enabled{\"HEIMDAL_ROKEN_CLOSEFROM_H\"} = \"YES\";"

fi

# only add getprogname if needed

	MAKE_SETTINGS="$MAKE_SETTINGS
HEIMDAL_ROKEN_PROGNAME_ENABLE = NO
"
SMB_INFO_ENABLES="$SMB_INFO_ENABLES
\$enabled{\"HEIMDAL_ROKEN_PROGNAME\"} = \"NO\";"


	MAKE_SETTINGS="$MAKE_SETTINGS
HEIMDAL_ROKEN_PROGNAME_H_ENABLE = NO
"
SMB_INFO_ENABLES="$SMB_INFO_ENABLES
\$enabled{\"HEIMDAL_ROKEN_PROGNAME_H\"} = \"NO\";"

if test t$ac_cv_func_getprogname != tyes; then

	MAKE_SETTINGS="$MAKE_SETTINGS
HEIMDAL_ROKEN_PROGNAME_ENABLE = YES
"
SMB_INFO_ENABLES="$SMB_INFO_ENABLES
\$enabled{\"HEIMDAL_ROKEN_PROGNAME\"} = \"YES\";"


	MAKE_SETTINGS="$MAKE_SETTINGS
HEIMDAL_ROKEN_PROGNAME_H_ENABLE = YES
"
SMB_INFO_ENABLES="$SMB_INFO_ENABLES
\$enabled{\"HEIMDAL_ROKEN_PROGNAME_H\"} = \"YES\";"

fi

VPATH="$VPATH:\$(HEIMDAL_VPATH)"


$as_echo "#define SAMBA4_INTERNAL_HEIMDAL 1" >>confdefs.h



SMB_INFO_EXT_LIBS="$SMB_INFO_EXT_LIBS
mkinclude heimdal_build/internal.mk
"


# internal_heimdal_end

fi


for ac_header in execinfo.h
do :
  ac_fn_c_check_header_mongrel "$LINENO" "execinfo.h" "ac_cv_header_execinfo_h" "$ac_includes_default"
if test "x$ac_cv_header_execinfo_h" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_EXECINFO_H 1
_ACEOF

fi

done

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing backtrace" >&5
$as_echo_n "checking for library containing backtrace... " >&6; }
if test "${ac_cv_search_ext_backtrace+set}" = set; then :
  $as_echo_n "(cached) " >&6
else

ac_func_search_ext_save_LIBS=$LIBS
ac_cv_search_ext_backtrace=no
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char backtrace ();
int
main ()
{
return backtrace ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  ac_cv_search_ext_backtrace="none required"
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
if test "$ac_cv_search_ext_backtrace" = no; then
  for ac_lib in execinfo; do
    LIBS="-l$ac_lib $EXECINFO_LIBS  $ac_func_search_save_ext_LIBS"
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char backtrace ();
int
main ()
{
return backtrace ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  ac_cv_search_ext_backtrace="-l$ac_lib"
break
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
  done
fi
LIBS=$ac_func_search_ext_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_ext_backtrace" >&5
$as_echo "$ac_cv_search_ext_backtrace" >&6; }
if test "$ac_cv_search_ext_backtrace" != no; then :
  test "$ac_cv_search_ext_backtrace" = "none required" || EXECINFO_LIBS="$ac_cv_search_ext_backtrace $EXECINFO_LIBS"

fi


    ac_check_func_ext_save_LIBS=$LIBS
    LIBS="$EXECINFO_LIBS $LIBS"
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for backtrace" >&5
$as_echo_n "checking for backtrace... " >&6; }
if test "${ac_cv_func_ext_backtrace+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
/* Define backtrace to an innocuous variant, in case <limits.h> declares backtrace.
   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
#define backtrace innocuous_backtrace

/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char backtrace (); below.
    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
    <limits.h> exists even on freestanding compilers.  */

#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif

#undef backtrace

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char backtrace ();
/* 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_backtrace || defined __stub___backtrace
choke me
#endif

int
main ()
{
return backtrace ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  ac_cv_func_ext_backtrace=yes
else
  ac_cv_func_ext_backtrace=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_ext_backtrace" >&5
$as_echo "$ac_cv_func_ext_backtrace" >&6; }
    LIBS=$ac_check_func_ext_save_LIBS
    if test $ac_cv_func_ext_backtrace = yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_BACKTRACE 1
_ACEOF

fi


if test x"$ac_cv_header_execinfo_h" = x"yes" -a x"$ac_cv_func_ext_backtrace" = x"yes";then

	MAKE_SETTINGS="$MAKE_SETTINGS
EXECINFO_ENABLE = YES
"
SMB_INFO_ENABLES="$SMB_INFO_ENABLES
\$enabled{\"EXECINFO\"} = \"YES\";"

	EXECINFO_CFLAGS="$CFLAGS"
	EXECINFO_CPPFLAGS="$CPPFLAGS"
	EXECINFO_LDFLAGS="$LDFLAGS"

  ac_new_flags=""
  l=""
  for i in $EXECINFO_LDFLAGS; do
    case $l$i in
    -L/usr/lib) ;;
    -L/usr/lib/) ;;
    -L/usr/lib64) ;;
    -L/usr/lib64/) ;;
    -Wl,-rpath,/usr/lib) l="";;
    -Wl,-rpath,/usr/lib/) l="";;
    -Wl,-rpath,/usr/lib64) l="";;
    -Wl,-rpath,/usr/lib64/) l="";;
    -Wl,-rpath) l=$i;;
    -Wl,-rpath-Wl,/usr/lib) l="";;
    -Wl,-rpath-Wl,/usr/lib/) l="";;
    -Wl,-rpath-Wl,/usr/lib64) l="";;
    -Wl,-rpath-Wl,/usr/lib64/) l="";;
    *)
    	s=" "
        if test x"$ac_new_flags" = x""; then
            s="";
	fi
        if test x"$l" = x""; then
            ac_new_flags="$ac_new_flags$s$i";
        else
            ac_new_flags="$ac_new_flags$s$l $i";
        fi
        l=""
        ;;
    esac
  done
  EXECINFO_LDFLAGS=$ac_new_flags


  ac_new_flags=""
  for i in $EXECINFO_CFLAGS; do
    case $i in
    -I/usr/include|-I/usr/include/) ;;
    *) ac_new_flags="$ac_new_flags $i" ;;
    esac
  done
  EXECINFO_CFLAGS=$ac_new_flags


  ac_new_flags=""
  for i in $EXECINFO_CPPFLAGS; do
    case $i in
    -I/usr/include|-I/usr/include/) ;;
    *) ac_new_flags="$ac_new_flags $i" ;;
    esac
  done
  EXECINFO_CPPFLAGS=$ac_new_flags

else

	MAKE_SETTINGS="$MAKE_SETTINGS
EXECINFO_ENABLE = NO
"
SMB_INFO_ENABLES="$SMB_INFO_ENABLES
\$enabled{\"EXECINFO\"} = \"NO\";"

fi


MAKE_SETTINGS="$MAKE_SETTINGS
EXECINFO_LIBS = ${EXECINFO_LIBS}
EXECINFO_CFLAGS = ${EXECINFO_CFLAGS}
EXECINFO_CPPFLAGS = ${EXECINFO_CPPFLAGS}
EXECINFO_LDFLAGS = ${EXECINFO_LDFLAGS}
"



for ac_func in sigprocmask sigblock sigaction
do :
  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
eval as_val=\$$as_ac_var
   if test "x$as_val" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF

fi
done


for ac_func in setsid
do :
  ac_fn_c_check_func "$LINENO" "setsid" "ac_cv_func_setsid"
if test "x$ac_cv_func_setsid" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_SETSID 1
_ACEOF

fi
done


#################################################
# these tests are taken from the GNU fileutils package
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to get filesystem space usage..." >&5
$as_echo "$as_me: checking how to get filesystem space usage..." >&6;}
for ac_header in sys/statfs.h sys/statvfs.h sys/vfs.h
do :
  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
eval as_val=\$$as_ac_Header
   if test "x$as_val" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF

fi

done


for ac_header in sys/mount.h
do :
  ac_fn_c_check_header_compile "$LINENO" "sys/mount.h" "ac_cv_header_sys_mount_h" "$ac_includes_default
#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
"
if test "x$ac_cv_header_sys_mount_h" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_SYS_MOUNT_H 1
_ACEOF

fi

done


space=no

# Test for statvfs64.
if test $space = no; then
  # SVR4
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking statvfs64 function (SVR4)" >&5
$as_echo_n "checking statvfs64 function (SVR4)... " >&6; }
if test "${fu_cv_sys_stat_statvfs64+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  if test "$cross_compiling" = yes; then :
  fu_cv_sys_stat_statvfs64=cross
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end 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
if ac_fn_c_try_run "$LINENO"; then :
  fu_cv_sys_stat_statvfs64=yes
else
  fu_cv_sys_stat_statvfs64=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext
fi

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $fu_cv_sys_stat_statvfs64" >&5
$as_echo "$fu_cv_sys_stat_statvfs64" >&6; }
  if test $fu_cv_sys_stat_statvfs64 = yes; then
    space=yes

$as_echo "#define STAT_STATVFS64 1" >>confdefs.h

  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
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking statvfs function (SVR4)" >&5
$as_echo_n "checking statvfs function (SVR4)... " >&6; }
if test "${fu_cv_sys_stat_statvfs+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <sys/types.h>
#include <sys/statvfs.h>
int
main ()
{
struct statvfs fsd; statvfs (0, &fsd);
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  fu_cv_sys_stat_statvfs=yes
else
  fu_cv_sys_stat_statvfs=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $fu_cv_sys_stat_statvfs" >&5
$as_echo "$fu_cv_sys_stat_statvfs" >&6; }
  if test $fu_cv_sys_stat_statvfs = yes; then
    space=yes

$as_echo "#define STAT_STATVFS 1" >>confdefs.h

  fi
fi

# fsusage.c assumes that statvfs has an f_frsize entry. Some weird
# systems use f_bsize.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that statvfs.f_frsize works" >&5
$as_echo_n "checking that statvfs.f_frsize works... " >&6; }
if test "${samba_cv_frsize+set}" = set; then :
  $as_echo_n "(cached) " >&6
else

    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <sys/types.h>
#include <sys/statvfs.h>
int
main ()
{
struct statvfs buf; buf.f_frsize = 0
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  samba_cv_frsize=yes
else
  samba_cv_frsize=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $samba_cv_frsize" >&5
$as_echo "$samba_cv_frsize" >&6; }
if test x"$samba_cv_frsize" = x"yes"; then

$as_echo "#define HAVE_FRSIZE 1" >>confdefs.h

fi

if test $space = no; then
  # DEC Alpha running OSF/1
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 3-argument statfs function (DEC OSF/1)" >&5
$as_echo_n "checking for 3-argument statfs function (DEC OSF/1)... " >&6; }
  if test "${fu_cv_sys_stat_statfs3_osf1+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  if test "$cross_compiling" = yes; then :
  fu_cv_sys_stat_statfs3_osf1=no
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end 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
if ac_fn_c_try_run "$LINENO"; then :
  fu_cv_sys_stat_statfs3_osf1=yes
else
  fu_cv_sys_stat_statfs3_osf1=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext
fi

fi

  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fu_cv_sys_stat_statfs3_osf1" >&5
$as_echo "$fu_cv_sys_stat_statfs3_osf1" >&6; }
  if test $fu_cv_sys_stat_statfs3_osf1 = yes; then
    space=yes

$as_echo "#define STAT_STATFS3_OSF1 1" >>confdefs.h

  fi
fi

if test $space = no; then
# AIX
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)" >&5
$as_echo_n "checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)... " >&6; }
  if test "${fu_cv_sys_stat_statfs2_bsize+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  if test "$cross_compiling" = yes; then :
  fu_cv_sys_stat_statfs2_bsize=no
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end 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
if ac_fn_c_try_run "$LINENO"; then :
  fu_cv_sys_stat_statfs2_bsize=yes
else
  fu_cv_sys_stat_statfs2_bsize=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext
fi

fi

  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fu_cv_sys_stat_statfs2_bsize" >&5
$as_echo "$fu_cv_sys_stat_statfs2_bsize" >&6; }
  if test $fu_cv_sys_stat_statfs2_bsize = yes; then
    space=yes

$as_echo "#define STAT_STATFS2_BSIZE 1" >>confdefs.h

  fi
fi

if test $space = no; then
# SVR3
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for four-argument statfs (AIX-3.2.5, SVR3)" >&5
$as_echo_n "checking for four-argument statfs (AIX-3.2.5, SVR3)... " >&6; }
  if test "${fu_cv_sys_stat_statfs4+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  if test "$cross_compiling" = yes; then :
  fu_cv_sys_stat_statfs4=no
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <sys/types.h>
#include <sys/statfs.h>
  main ()
  {
  struct statfs fsd;
  exit (statfs (".", &fsd, sizeof fsd, 0));
  }
_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
  fu_cv_sys_stat_statfs4=yes
else
  fu_cv_sys_stat_statfs4=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext
fi

fi

  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fu_cv_sys_stat_statfs4" >&5
$as_echo "$fu_cv_sys_stat_statfs4" >&6; }
  if test $fu_cv_sys_stat_statfs4 = yes; then
    space=yes

$as_echo "#define STAT_STATFS4 1" >>confdefs.h

  fi
fi

if test $space = no; then
# 4.4BSD and NetBSD
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)" >&5
$as_echo_n "checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)... " >&6; }
  if test "${fu_cv_sys_stat_statfs2_fsize+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  if test "$cross_compiling" = yes; then :
  fu_cv_sys_stat_statfs2_fsize=no
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end 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
if ac_fn_c_try_run "$LINENO"; then :
  fu_cv_sys_stat_statfs2_fsize=yes
else
  fu_cv_sys_stat_statfs2_fsize=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext
fi

fi

  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fu_cv_sys_stat_statfs2_fsize" >&5
$as_echo "$fu_cv_sys_stat_statfs2_fsize" >&6; }
  if test $fu_cv_sys_stat_statfs2_fsize = yes; then
    space=yes

$as_echo "#define STAT_STATFS2_FSIZE 1" >>confdefs.h

  fi
fi

if test $space = no; then
  # Ultrix
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for two-argument statfs with struct fs_data (Ultrix)" >&5
$as_echo_n "checking for two-argument statfs with struct fs_data (Ultrix)... " >&6; }
  if test "${fu_cv_sys_stat_fs_data+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  if test "$cross_compiling" = yes; then :
  fu_cv_sys_stat_fs_data=no
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end 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
if ac_fn_c_try_run "$LINENO"; then :
  fu_cv_sys_stat_fs_data=yes
else
  fu_cv_sys_stat_fs_data=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext
fi

fi

  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fu_cv_sys_stat_fs_data" >&5
$as_echo "$fu_cv_sys_stat_fs_data" >&6; }
  if test $fu_cv_sys_stat_fs_data = yes; then
    space=yes

$as_echo "#define STAT_STATFS2_FS_DATA 1" >>confdefs.h

  fi
fi

for ac_header in sys/attributes.h attr/xattr.h sys/xattr.h
do :
  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
eval as_val=\$$as_ac_Header
   if test "x$as_val" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF

fi

done

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing flistxattr" >&5
$as_echo_n "checking for library containing flistxattr... " >&6; }
if test "${ac_cv_search_ext_flistxattr+set}" = set; then :
  $as_echo_n "(cached) " >&6
else

ac_func_search_ext_save_LIBS=$LIBS
ac_cv_search_ext_flistxattr=no
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char flistxattr ();
int
main ()
{
return flistxattr ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  ac_cv_search_ext_flistxattr="none required"
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
if test "$ac_cv_search_ext_flistxattr" = no; then
  for ac_lib in attr; do
    LIBS="-l$ac_lib $XATTR_LIBS  $ac_func_search_save_ext_LIBS"
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char flistxattr ();
int
main ()
{
return flistxattr ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  ac_cv_search_ext_flistxattr="-l$ac_lib"
break
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
  done
fi
LIBS=$ac_func_search_ext_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_ext_flistxattr" >&5
$as_echo "$ac_cv_search_ext_flistxattr" >&6; }
if test "$ac_cv_search_ext_flistxattr" != no; then :
  test "$ac_cv_search_ext_flistxattr" = "none required" || XATTR_LIBS="$ac_cv_search_ext_flistxattr $XATTR_LIBS"

fi


    ac_check_func_ext_save_LIBS=$LIBS
    LIBS="$XATTR_LIBS $LIBS"
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flistxattr" >&5
$as_echo_n "checking for flistxattr... " >&6; }
if test "${ac_cv_func_ext_flistxattr+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
/* Define flistxattr to an innocuous variant, in case <limits.h> declares flistxattr.
   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
#define flistxattr innocuous_flistxattr

/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char flistxattr (); below.
    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
    <limits.h> exists even on freestanding compilers.  */

#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif

#undef flistxattr

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char flistxattr ();
/* 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_flistxattr || defined __stub___flistxattr
choke me
#endif

int
main ()
{
return flistxattr ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  ac_cv_func_ext_flistxattr=yes
else
  ac_cv_func_ext_flistxattr=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_ext_flistxattr" >&5
$as_echo "$ac_cv_func_ext_flistxattr" >&6; }
    LIBS=$ac_check_func_ext_save_LIBS
    if test $ac_cv_func_ext_flistxattr = yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_FLISTXATTR 1
_ACEOF

fi

MAKE_SETTINGS="$MAKE_SETTINGS
XATTR_LIBS = ${XATTR_LIBS}
XATTR_CFLAGS = ${XATTR_CFLAGS}
XATTR_CPPFLAGS = ${XATTR_CPPFLAGS}
XATTR_LDFLAGS = ${XATTR_LDFLAGS}
"


if test x"$ac_cv_func_ext_flistxattr" = x"yes"; then
	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether xattr interface takes additional options" >&5
$as_echo_n "checking whether xattr interface takes additional options... " >&6; }
if test "${smb_attr_cv_xattr_add_opt+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  old_LIBS=$LIBS
	 LIBS="$LIBS $XATTRLIBS"
	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

	 	#include <sys/types.h>
		#if HAVE_ATTR_XATTR_H
		#include <attr/xattr.h>
		#elif HAVE_SYS_XATTR_H
		#include <sys/xattr.h>
		#endif
		#ifndef NULL
		#define NULL ((void *)0)
		#endif

int
main ()
{

		getxattr(NULL, NULL, NULL, 0, 0, 0);

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  smb_attr_cv_xattr_add_opt=yes
else
  smb_attr_cv_xattr_add_opt=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
	  LIBS=$old_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $smb_attr_cv_xattr_add_opt" >&5
$as_echo "$smb_attr_cv_xattr_add_opt" >&6; }
	if test x"$smb_attr_cv_xattr_add_opt" = x"yes"; then

$as_echo "#define XATTR_ADDITIONAL_OPTIONS 1" >>confdefs.h

	fi

$as_echo "#define HAVE_XATTR_SUPPORT 1" >>confdefs.h


	MAKE_SETTINGS="$MAKE_SETTINGS
XATTR_ENABLE = YES
"
SMB_INFO_ENABLES="$SMB_INFO_ENABLES
\$enabled{\"XATTR\"} = \"YES\";"

fi


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for irix specific capabilities" >&5
$as_echo_n "checking for irix specific capabilities... " >&6; }
if test "${samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES+set}" = set; then :
  $as_echo_n "(cached) " >&6
else

if test "$cross_compiling" = yes; then :
  samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=cross
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end 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
if ac_fn_c_try_run "$LINENO"; then :
  samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=yes
else
  samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext
fi

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES" >&5
$as_echo "$samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES" >&6; }
if test x"$samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES" = x"yes"; then

$as_echo "#define HAVE_IRIX_SPECIFIC_CAPABILITIES 1" >>confdefs.h

fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if gettimeofday takes tz argument" >&5
$as_echo_n "checking if gettimeofday takes tz argument... " >&6; }
if test "${samba_cv_HAVE_GETTIMEOFDAY_TZ+set}" = set; then :
  $as_echo_n "(cached) " >&6
else

if test "$cross_compiling" = yes; then :
  samba_cv_HAVE_GETTIMEOFDAY_TZ=yes
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include <sys/time.h>
#include <unistd.h>
main() { struct timeval tv; exit(gettimeofday(&tv, NULL));}
_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
  samba_cv_HAVE_GETTIMEOFDAY_TZ=yes
else
  samba_cv_HAVE_GETTIMEOFDAY_TZ=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext
fi

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $samba_cv_HAVE_GETTIMEOFDAY_TZ" >&5
$as_echo "$samba_cv_HAVE_GETTIMEOFDAY_TZ" >&6; }
if test x"$samba_cv_HAVE_GETTIMEOFDAY_TZ" = x"yes"; then

$as_echo "#define HAVE_GETTIMEOFDAY_TZ 1" >>confdefs.h

fi


INCLUDED_POPT=auto

# Check whether --with-included-popt was given.
if test "${with_included_popt+set}" = set; then :
  withval=$with_included_popt;  INCLUDED_POPT=$withval
fi





if test x"$INCLUDED_POPT" != x"yes"; then
	for ac_header in popt.h
do :
  ac_fn_c_check_header_mongrel "$LINENO" "popt.h" "ac_cv_header_popt_h" "$ac_includes_default"
if test "x$ac_cv_header_popt_h" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_POPT_H 1
_ACEOF

fi

done

	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for poptGetContext in -lpopt" >&5
$as_echo_n "checking for poptGetContext in -lpopt... " >&6; }
if test "${ac_cv_lib_popt_poptGetContext+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lpopt  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char poptGetContext ();
int
main ()
{
return poptGetContext ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  ac_cv_lib_popt_poptGetContext=yes
else
  ac_cv_lib_popt_poptGetContext=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_popt_poptGetContext" >&5
$as_echo "$ac_cv_lib_popt_poptGetContext" >&6; }
if test "x$ac_cv_lib_popt_poptGetContext" = x""yes; then :
   POPT_LIBS="-lpopt"
fi

	if test x"$ac_cv_header_popt_h" = x"no" -o x"$ac_cv_lib_popt_poptGetContext" = x"no"; then
		INCLUDED_POPT=yes
		POPT_CFLAGS=""
	else
		INCLUDED_POPT=no
	fi
fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use included popt" >&5
$as_echo_n "checking whether to use included popt... " >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INCLUDED_POPT" >&5
$as_echo "$INCLUDED_POPT" >&6; }
if test x"$INCLUDED_POPT" != x"no"; then
			poptdir=""
	poptpaths="$srcdir $srcdir/lib/popt $srcdir/popt $srcdir/../popt $srcdir/../lib/popt"
	for d in $poptpaths; do
		if test -f "$d/popt.c"; then
			poptdir="$d"
			POPT_CFLAGS="-I$d"

			break
		fi
	done
        if test x"$poptdir" = "x"; then
		as_fn_error "cannot find popt source in $poptpaths" "$LINENO" 5
	fi
	POPT_OBJ="popt.o findme.o poptconfig.o popthelp.o poptparse.o"

	for ac_header in float.h alloca.h
do :
  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
eval as_val=\$$as_ac_Header
   if test "x$as_val" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF

fi

done

fi


if test x"$POPT_OBJ" = "x"; then

MAKE_SETTINGS="$MAKE_SETTINGS
LIBPOPT_LIBS = ${POPT_LIBS}
LIBPOPT_CFLAGS =
LIBPOPT_CPPFLAGS =
LIBPOPT_LDFLAGS =
"


else

SMB_INFO_EXT_LIBS="$SMB_INFO_EXT_LIBS
mkinclude ../lib/popt/config.mk
"

fi






ICONV_FOUND=no
LOOK_DIRS="/usr /usr/local /sw"

# Check whether --with-libiconv was given.
if test "${with_libiconv+set}" = set; then :
  withval=$with_libiconv;
  if test "$withval" = "no" ; then
    as_fn_error "I won't take no for an answer" "$LINENO" 5
  else
     if test "$withval" != "yes" ; then

	save_CPPFLAGS="$CPPFLAGS"
	save_LDFLAGS="$LDFLAGS"
	save_LIBS="$LIBS"
	CPPFLAGS="-I$withval/include"
	LDFLAGS="-L$withval/lib"
	LIBS=-liconv


  { $as_echo "$as_me:${as_lineno-$LINENO}: checking Whether iconv.h is present" >&5
$as_echo_n "checking Whether iconv.h is present... " >&6; }
  if test "$cross_compiling" = yes; then :
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross" >&5
$as_echo "cross" >&6; };
        LIBS=-lgiconv

  { $as_echo "$as_me:${as_lineno-$LINENO}: checking Whether giconv.h is present" >&5
$as_echo_n "checking Whether giconv.h is present... " >&6; }
  if test "$cross_compiling" = yes; then :
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross" >&5
$as_echo "cross" >&6; }; as_fn_error "No iconv library found in $withval" "$LINENO" 5
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <stdlib.h>
#include <giconv.h>

int main()
{
   iconv_t cd = iconv_open("ASCII","UCS-2LE");
   if (cd == 0 || cd == (iconv_t)-1) return -1;
   return 0;
}

_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; };
$as_echo "#define HAVE_GICONV_H 1" >>confdefs.h

		ICONV_FOUND=yes;
		ICONV_CPPFLAGS="$CPPFLAGS"
		ICONV_LIBS="$LIBS"
		ICONV_LDFLAGS="$LDFLAGS"

else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }; as_fn_error "No iconv library found in $withval" "$LINENO" 5
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext
fi



else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <stdlib.h>
#include <iconv.h>

int main()
{
   iconv_t cd = iconv_open("ASCII","UCS-2LE");
   if (cd == 0 || cd == (iconv_t)-1) return -1;
   return 0;
}

_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; };
$as_echo "#define HAVE_ICONV_H 1" >>confdefs.h

		ICONV_FOUND=yes;
		ICONV_CPPFLAGS="$CPPFLAGS"
		ICONV_LIBS="$LIBS"
		ICONV_LDFLAGS="$LDFLAGS"

else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; };
        LIBS=-lgiconv

  { $as_echo "$as_me:${as_lineno-$LINENO}: checking Whether giconv.h is present" >&5
$as_echo_n "checking Whether giconv.h is present... " >&6; }
  if test "$cross_compiling" = yes; then :
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross" >&5
$as_echo "cross" >&6; }; as_fn_error "No iconv library found in $withval" "$LINENO" 5
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <stdlib.h>
#include <giconv.h>

int main()
{
   iconv_t cd = iconv_open("ASCII","UCS-2LE");
   if (cd == 0 || cd == (iconv_t)-1) return -1;
   return 0;
}

_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; };
$as_echo "#define HAVE_GICONV_H 1" >>confdefs.h

		ICONV_FOUND=yes;
		ICONV_CPPFLAGS="$CPPFLAGS"
		ICONV_LIBS="$LIBS"
		ICONV_LDFLAGS="$LDFLAGS"

else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }; as_fn_error "No iconv library found in $withval" "$LINENO" 5
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext
fi



fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext
fi



	CPPFLAGS="$save_CPPFLAGS"
	LDFLAGS="$save_LDFLAGS"
	LIBS="$save_LIBS"

     fi
  fi

fi


if test x$ICONV_FOUND = xno; then

  { $as_echo "$as_me:${as_lineno-$LINENO}: checking Whether iconv.h is present" >&5
$as_echo_n "checking Whether iconv.h is present... " >&6; }
  if test "$cross_compiling" = yes; then :
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross" >&5
$as_echo "cross" >&6; };
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <stdlib.h>
#include <iconv.h>

int main()
{
   iconv_t cd = iconv_open("ASCII","UCS-2LE");
   if (cd == 0 || cd == (iconv_t)-1) return -1;
   return 0;
}

_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; };
$as_echo "#define HAVE_ICONV_H 1" >>confdefs.h
 ICONV_FOUND=yes
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; };
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext
fi


fi

for i in $LOOK_DIRS ; do
	if test x$ICONV_FOUND = xyes; then
		break
	fi


	save_CPPFLAGS="$CPPFLAGS"
	save_LDFLAGS="$LDFLAGS"
	save_LIBS="$LIBS"
	CPPFLAGS="-I$i/include"
	LDFLAGS="-L$i/lib"
	LIBS=-liconv


  { $as_echo "$as_me:${as_lineno-$LINENO}: checking Whether iconv.h is present" >&5
$as_echo_n "checking Whether iconv.h is present... " >&6; }
  if test "$cross_compiling" = yes; then :
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross" >&5
$as_echo "cross" >&6; };
        LIBS=-lgiconv

  { $as_echo "$as_me:${as_lineno-$LINENO}: checking Whether giconv.h is present" >&5
$as_echo_n "checking Whether giconv.h is present... " >&6; }
  if test "$cross_compiling" = yes; then :
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross" >&5
$as_echo "cross" >&6; };
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <stdlib.h>
#include <giconv.h>

int main()
{
   iconv_t cd = iconv_open("ASCII","UCS-2LE");
   if (cd == 0 || cd == (iconv_t)-1) return -1;
   return 0;
}

_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; };
$as_echo "#define HAVE_GICONV_H 1" >>confdefs.h

		ICONV_FOUND=yes
		ICONV_CPPFLAGS="$CPPFLAGS"
		ICONV_LIBS="$LIBS"
		ICONV_LDFLAGS="$LDFLAGS"

else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; };
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext
fi



else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <stdlib.h>
#include <iconv.h>

int main()
{
   iconv_t cd = iconv_open("ASCII","UCS-2LE");
   if (cd == 0 || cd == (iconv_t)-1) return -1;
   return 0;
}

_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; };
$as_echo "#define HAVE_ICONV_H 1" >>confdefs.h

		ICONV_FOUND=yes
		ICONV_CPPFLAGS="$CPPFLAGS"
		ICONV_LIBS="$LIBS"
		ICONV_LDFLAGS="$LDFLAGS"

else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; };
        LIBS=-lgiconv

  { $as_echo "$as_me:${as_lineno-$LINENO}: checking Whether giconv.h is present" >&5
$as_echo_n "checking Whether giconv.h is present... " >&6; }
  if test "$cross_compiling" = yes; then :
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross" >&5
$as_echo "cross" >&6; };
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <stdlib.h>
#include <giconv.h>

int main()
{
   iconv_t cd = iconv_open("ASCII","UCS-2LE");
   if (cd == 0 || cd == (iconv_t)-1) return -1;
   return 0;
}

_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; };
$as_echo "#define HAVE_GICONV_H 1" >>confdefs.h

		ICONV_FOUND=yes
		ICONV_CPPFLAGS="$CPPFLAGS"
		ICONV_LIBS="$LIBS"
		ICONV_LDFLAGS="$LDFLAGS"

else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; };
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext
fi



fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext
fi



	CPPFLAGS="$save_CPPFLAGS"
	LDFLAGS="$save_LDFLAGS"
	LIBS="$save_LIBS"

done

if test x"$ICONV_FOUND" = x"no"; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Sufficient support for iconv function was not found.
    Install libiconv from http://www.gnu.org/software/libiconv/ for better charset compatibility!" >&5
$as_echo "$as_me: WARNING: Sufficient support for iconv function was not found.
    Install libiconv from http://www.gnu.org/software/libiconv/ for better charset compatibility!" >&2;}

	MAKE_SETTINGS="$MAKE_SETTINGS
ICONV_ENABLE = NO
"
SMB_INFO_ENABLES="$SMB_INFO_ENABLES
\$enabled{\"ICONV\"} = \"NO\";"

else

$as_echo "#define HAVE_NATIVE_ICONV 1" >>confdefs.h


	MAKE_SETTINGS="$MAKE_SETTINGS
ICONV_ENABLE = YES
"
SMB_INFO_ENABLES="$SMB_INFO_ENABLES
\$enabled{\"ICONV\"} = \"YES\";"

fi


MAKE_SETTINGS="$MAKE_SETTINGS
ICONV_LIBS = ${ICONV_LIBS}
ICONV_CFLAGS = ${ICONV_CFLAGS}
ICONV_CPPFLAGS = ${ICONV_CPPFLAGS}
ICONV_LDFLAGS = ${ICONV_LDFLAGS}
"



for ac_func in writev
do :
  ac_fn_c_check_func "$LINENO" "writev" "ac_cv_func_writev"
if test "x$ac_cv_func_writev" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_WRITEV 1
_ACEOF

fi
done

for ac_func in readv
do :
  ac_fn_c_check_func "$LINENO" "readv" "ac_cv_func_readv"
if test "x$ac_cv_func_readv" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_READV 1
_ACEOF

fi
done


############################################
# check for unix domain sockets
# done by AC_LIBREPLACE_NETWORK_CHECKS

	MAKE_SETTINGS="$MAKE_SETTINGS
socket_unix_ENABLE = NO
"
SMB_INFO_ENABLES="$SMB_INFO_ENABLES
\$enabled{\"socket_unix\"} = \"NO\";"

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

	MAKE_SETTINGS="$MAKE_SETTINGS
socket_unix_ENABLE = YES
"
SMB_INFO_ENABLES="$SMB_INFO_ENABLES
\$enabled{\"socket_unix\"} = \"YES\";"

fi

############################################
# check for ipv6
# done by AC_LIBREPLACE_NETWORK_CHECKS

	MAKE_SETTINGS="$MAKE_SETTINGS
socket_ipv6_ENABLE = NO
"
SMB_INFO_ENABLES="$SMB_INFO_ENABLES
\$enabled{\"socket_ipv6\"} = \"NO\";"

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

	MAKE_SETTINGS="$MAKE_SETTINGS
socket_ipv6_ENABLE = YES
"
SMB_INFO_ENABLES="$SMB_INFO_ENABLES
\$enabled{\"socket_ipv6\"} = \"YES\";"

fi





for ac_header in zlib.h
do :
  ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
if test "x$ac_cv_header_zlib_h" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_ZLIB_H 1
_ACEOF

fi

done




ac_check_lib_ext_save_LIBS=$LIBS
LIBS="-lz $ZLIB_LIBS  $LIBS"



        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for zlibVersion in -lz" >&5
$as_echo_n "checking for zlibVersion in -lz... " >&6; }
if test "${ac_cv_lib_ext_z_zlibVersion+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char zlibVersion ();
int
main ()
{
return zlibVersion ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  ac_cv_lib_ext_z_zlibVersion=yes;
		  ac_cv_lib_ext_z=yes
else
  ac_cv_lib_ext_z_zlibVersion=no;
		  ac_cv_lib_ext_z=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ext_z_zlibVersion" >&5
$as_echo "$ac_cv_lib_ext_z_zlibVersion" >&6; }
    if test $ac_cv_lib_ext_z_zlibVersion = yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_ZLIBVERSION 1
_ACEOF

fi
LIBS=$ac_check_lib_ext_save_LIBS

if test $ac_cv_lib_ext_z = yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_LIBZ 1
_ACEOF

		case "$ZLIB_LIBS" in
		    *-lz*)
			;;
		    *)
			ZLIB_LIBS="-lz $ZLIB_LIBS"
			;;
		esac


fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for zlib >= 1.2.3" >&5
$as_echo_n "checking for zlib >= 1.2.3... " >&6; }
if test "${samba_cv_zlib_1_2_3+set}" = set; then :
  $as_echo_n "(cached) " >&6
else

	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

		#include <zlib.h>

int
main ()
{

		#if (ZLIB_VERNUM >= 0x1230)
		#else
		#error "ZLIB_VERNUM < 0x1230"
		#endif

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :

		samba_cv_zlib_1_2_3=yes

else

		samba_cv_zlib_1_2_3=no

fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $samba_cv_zlib_1_2_3" >&5
$as_echo "$samba_cv_zlib_1_2_3" >&6; }

if test x"$ac_cv_header_zlib_h" = x"yes" -a \
	x"$ac_cv_lib_ext_z_zlibVersion" = x"yes" -a \
	x"$samba_cv_zlib_1_2_3" = x"yes"; then


MAKE_SETTINGS="$MAKE_SETTINGS
ZLIB_LIBS = ${ZLIB_LIBS}
ZLIB_CFLAGS =
ZLIB_CPPFLAGS =
ZLIB_LDFLAGS =
"



else


SMB_INFO_EXT_LIBS="$SMB_INFO_EXT_LIBS
mkinclude lib/zlib.mk
"


fi

case "$host_os" in
	*linux*)

	MAKE_SETTINGS="$MAKE_SETTINGS
nsstest_ENABLE = YES
"
SMB_INFO_ENABLES="$SMB_INFO_ENABLES
\$enabled{\"nsstest\"} = \"YES\";"

	;;
	*)

	MAKE_SETTINGS="$MAKE_SETTINGS
nsstest_ENABLE = NO
"
SMB_INFO_ENABLES="$SMB_INFO_ENABLES
\$enabled{\"nsstest\"} = \"NO\";"

	;;
esac

# Check whether ExtUtils::ExtMaker is available

if perl -e "use ExtUtils::MakeMaker" 2>/dev/null; then
	HAVE_PERL_EXTUTILS_MAKEMAKER=1
else
	HAVE_PERL_EXTUTILS_MAKEMAKER=0
fi



case "$host_os" in
  *linux*)

	MAKE_SETTINGS="$MAKE_SETTINGS
mount.cifs_ENABLE = YES
"
SMB_INFO_ENABLES="$SMB_INFO_ENABLES
\$enabled{\"mount.cifs\"} = \"YES\";"


	MAKE_SETTINGS="$MAKE_SETTINGS
umount.cifs_ENABLE = YES
"
SMB_INFO_ENABLES="$SMB_INFO_ENABLES
\$enabled{\"umount.cifs\"} = \"YES\";"


	MAKE_SETTINGS="$MAKE_SETTINGS
cifs.upcall_ENABLE = NO
"
SMB_INFO_ENABLES="$SMB_INFO_ENABLES
\$enabled{\"cifs.upcall\"} = \"NO\";"
 # Disabled for now
	;;
   *)

	MAKE_SETTINGS="$MAKE_SETTINGS
mount.cifs_ENABLE = NO
"
SMB_INFO_ENABLES="$SMB_INFO_ENABLES
\$enabled{\"mount.cifs\"} = \"NO\";"


	MAKE_SETTINGS="$MAKE_SETTINGS
umount.cifs_ENABLE = NO
"
SMB_INFO_ENABLES="$SMB_INFO_ENABLES
\$enabled{\"umount.cifs\"} = \"NO\";"


	MAKE_SETTINGS="$MAKE_SETTINGS
cifs.upcall_ENABLE = NO
"
SMB_INFO_ENABLES="$SMB_INFO_ENABLES
\$enabled{\"cifs.upcall\"} = \"NO\";"

	;;
esac



ac_config_files="$ac_config_files lib/registry/registry.pc"

ac_config_files="$ac_config_files librpc/dcerpc.pc"

ac_config_files="$ac_config_files ../librpc/ndr.pc"

ac_config_files="$ac_config_files ../librpc/ndr_standard.pc"

ac_config_files="$ac_config_files ../lib/torture/torture.pc"

ac_config_files="$ac_config_files auth/gensec/gensec.pc"

ac_config_files="$ac_config_files param/samba-hostconfig.pc"

ac_config_files="$ac_config_files librpc/dcerpc_samr.pc"

ac_config_files="$ac_config_files librpc/dcerpc_atsvc.pc"


# Minimum and exact required versions for various libraries
# if we use the ones installed in the system.







	# Check whether --enable-external-libtalloc was given.
if test "${enable_external_libtalloc+set}" = set; then :
  enableval=$enable_external_libtalloc;
else
  enableval=auto
fi


	if test $enableval = yes -o $enableval = auto; then


	if test -z "$PKG_CONFIG"; then
		# Extract the first word of "pkg-config", so it can be a program name with args.
set dummy pkg-config; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  case $PKG_CONFIG in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
  ;;
esac
fi
PKG_CONFIG=$ac_cv_path_PKG_CONFIG
if test -n "$PKG_CONFIG"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
$as_echo "$PKG_CONFIG" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


	fi

	if test "$PKG_CONFIG" = "no" ; then
		echo "*** The pkg-config script could not be found. Make sure it is"
		echo "*** in your path, or set the PKG_CONFIG environment variable"
		echo "*** to the full path to pkg-config."
		echo "*** Or see http://pkg-config.freedesktop.org/ to get pkg-config."
			ac_cv_LIBTALLOC_found=no
	else
		SAMBA_PKG_CONFIG_MIN_VERSION="0.9.0"
		if $PKG_CONFIG --atleast-pkgconfig-version $SAMBA_PKG_CONFIG_MIN_VERSION; then
			{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for talloc >= 2.0.0" >&5
$as_echo_n "checking for talloc >= 2.0.0... " >&6; }

			if $PKG_CONFIG --exists 'talloc >= 2.0.0' ; then
				{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }

				LIBTALLOC_CFLAGS="`$PKG_CONFIG --cflags 'talloc >= 2.0.0'`"
				OLD_CFLAGS="$CFLAGS"
				CFLAGS="$CFLAGS $LIBTALLOC_CFLAGS"
				{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that the C compiler can use the LIBTALLOC_CFLAGS" >&5
$as_echo_n "checking that the C compiler can use the LIBTALLOC_CFLAGS... " >&6; }
				if test "$cross_compiling" = yes; then :
  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot run when cross-compiling" >&5
$as_echo "$as_me: WARNING: cannot run when cross-compiling" >&2;}
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include "${srcdir-.}/../tests/trivial.c"
_ACEOF
if ac_fn_c_try_run "$LINENO"; then :

	MAKE_SETTINGS="$MAKE_SETTINGS
LIBTALLOC_ENABLE = YES
"
SMB_INFO_ENABLES="$SMB_INFO_ENABLES
\$enabled{\"LIBTALLOC\"} = \"YES\";"

					{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext
fi

				CFLAGS="$OLD_CFLAGS"

				ac_cv_LIBTALLOC_libs_only_other="`$PKG_CONFIG --libs-only-other 'talloc >= 2.0.0'` `$PKG_CONFIG --libs-only-L 'talloc >= 2.0.0'`"

  ac_new_flags=""
  l=""
  for i in $ac_cv_LIBTALLOC_libs_only_other; do
    case $l$i in
    -L/usr/lib) ;;
    -L/usr/lib/) ;;
    -L/usr/lib64) ;;
    -L/usr/lib64/) ;;
    -Wl,-rpath,/usr/lib) l="";;
    -Wl,-rpath,/usr/lib/) l="";;
    -Wl,-rpath,/usr/lib64) l="";;
    -Wl,-rpath,/usr/lib64/) l="";;
    -Wl,-rpath) l=$i;;
    -Wl,-rpath-Wl,/usr/lib) l="";;
    -Wl,-rpath-Wl,/usr/lib/) l="";;
    -Wl,-rpath-Wl,/usr/lib64) l="";;
    -Wl,-rpath-Wl,/usr/lib64/) l="";;
    *)
    	s=" "
        if test x"$ac_new_flags" = x""; then
            s="";
	fi
        if test x"$l" = x""; then
            ac_new_flags="$ac_new_flags$s$i";
        else
            ac_new_flags="$ac_new_flags$s$l $i";
        fi
        l=""
        ;;
    esac
  done
  ac_cv_LIBTALLOC_libs_only_other=$ac_new_flags

				ac_cv_LIBTALLOC_includedir_only="`$PKG_CONFIG --cflags-only-I 'talloc >= 2.0.0'`"

  ac_new_flags=""
  for i in $ac_cv_LIBTALLOC_includedir_only; do
    case $i in
    -I/usr/include|-I/usr/include/) ;;
    *) ac_new_flags="$ac_new_flags $i" ;;
    esac
  done
  ac_cv_LIBTALLOC_includedir_only=$ac_new_flags


MAKE_SETTINGS="$MAKE_SETTINGS
LIBTALLOC_LIBS = `$PKG_CONFIG --libs-only-l 'talloc >= 2.0.0'`
LIBTALLOC_CFLAGS = `$PKG_CONFIG --cflags-only-other 'talloc >= 2.0.0'`
LIBTALLOC_CPPFLAGS = $ac_cv_LIBTALLOC_includedir_only
LIBTALLOC_LDFLAGS = $ac_cv_LIBTALLOC_libs_only_other
"


				ac_cv_LIBTALLOC_found=yes

			else
				{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
				$PKG_CONFIG --errors-to-stdout --print-errors 'talloc >= 2.0.0'
				ac_cv_LIBTALLOC_found=no
			fi
		else
			echo "*** Your version of pkg-config is too old. You need version $SAMBA_PKG_CONFIG_MIN_VERSION or newer."
			echo "*** See http://pkg-config.freedesktop.org/"
			ac_cv_LIBTALLOC_found=no
		fi
	fi
	if test x$ac_cv_LIBTALLOC_found = x"yes"; then
		echo -n ""
	else

			if test $enableval = yes; then
				as_fn_error "Unable to find external LIBTALLOC" "$LINENO" 5
			fi
			enableval=no

	fi

	fi
	if test $enableval = no; then

		tallocdir=""
tallocpaths=". lib/talloc talloc ../talloc ../lib/talloc"
for d in $tallocpaths; do
	if test -f "$srcdir/$d/talloc.c"; then
		tallocdir="$d"

		break;
	fi
done
if test x"$tallocdir" = "x"; then
   as_fn_error "cannot find talloc source in $tallocpaths" "$LINENO" 5
fi
TALLOC_OBJ="talloc.o"


TALLOC_CFLAGS="-I$srcdir/$tallocdir"


TALLOC_LIBS=""


# The cast to long int works around a bug in the HP C Compiler
# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
# This bug is HP SR number 8606223364.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
$as_echo_n "checking size of size_t... " >&6; }
if test "${ac_cv_sizeof_size_t+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t"        "$ac_includes_default"; then :

else
  if test "$ac_cv_type_size_t" = yes; then
     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
{ as_fn_set_status 77
as_fn_error "cannot compute sizeof (size_t)
See \`config.log' for more details." "$LINENO" 5; }; }
   else
     ac_cv_sizeof_size_t=0
   fi
fi

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
$as_echo "$ac_cv_sizeof_size_t" >&6; }



cat >>confdefs.h <<_ACEOF
#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
_ACEOF


# The cast to long int works around a bug in the HP C Compiler
# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
# This bug is HP SR number 8606223364.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
$as_echo_n "checking size of void *... " >&6; }
if test "${ac_cv_sizeof_void_p+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p"        "$ac_includes_default"; then :

else
  if test "$ac_cv_type_void_p" = yes; then
     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
{ as_fn_set_status 77
as_fn_error "cannot compute sizeof (void *)
See \`config.log' for more details." "$LINENO" 5; }; }
   else
     ac_cv_sizeof_void_p=0
   fi
fi

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
$as_echo "$ac_cv_sizeof_void_p" >&6; }



cat >>confdefs.h <<_ACEOF
#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
_ACEOF



if test $ac_cv_sizeof_size_t -lt $ac_cv_sizeof_void_p; then
	{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: size_t cannot represent the amount of used memory of a process" >&5
$as_echo "$as_me: WARNING: size_t cannot represent the amount of used memory of a process" >&2;}
	{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: please report this to <samba-technical@samba.org>" >&5
$as_echo "$as_me: WARNING: please report this to <samba-technical@samba.org>" >&2;}
	{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: sizeof(size_t) = $ac_cv_sizeof_size_t" >&5
$as_echo "$as_me: WARNING: sizeof(size_t) = $ac_cv_sizeof_size_t" >&2;}
	{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: sizeof(void *) = $ac_cv_sizeof_void_p" >&5
$as_echo "$as_me: WARNING: sizeof(void *) = $ac_cv_sizeof_void_p" >&2;}
	as_fn_error "sizeof(size_t) < sizeof(void *)" "$LINENO" 5
fi

if test x"$VERSIONSCRIPT" != "x"; then
    EXPORTSFILE=talloc.exports

fi


SMB_INFO_EXT_LIBS="$SMB_INFO_EXT_LIBS
mkinclude ../lib/talloc/config.mk
"



	fi



	# Check whether --enable-external-libtdb was given.
if test "${enable_external_libtdb+set}" = set; then :
  enableval=$enable_external_libtdb;
else
  enableval=auto
fi


	if test $enableval = yes -o $enableval = auto; then


	if test -z "$PKG_CONFIG"; then
		# Extract the first word of "pkg-config", so it can be a program name with args.
set dummy pkg-config; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  case $PKG_CONFIG in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
  ;;
esac
fi
PKG_CONFIG=$ac_cv_path_PKG_CONFIG
if test -n "$PKG_CONFIG"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
$as_echo "$PKG_CONFIG" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


	fi

	if test "$PKG_CONFIG" = "no" ; then
		echo "*** The pkg-config script could not be found. Make sure it is"
		echo "*** in your path, or set the PKG_CONFIG environment variable"
		echo "*** to the full path to pkg-config."
		echo "*** Or see http://pkg-config.freedesktop.org/ to get pkg-config."
			ac_cv_LIBTDB_found=no
	else
		SAMBA_PKG_CONFIG_MIN_VERSION="0.9.0"
		if $PKG_CONFIG --atleast-pkgconfig-version $SAMBA_PKG_CONFIG_MIN_VERSION; then
			{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tdb >= 1.1.5" >&5
$as_echo_n "checking for tdb >= 1.1.5... " >&6; }

			if $PKG_CONFIG --exists 'tdb >= 1.1.5' ; then
				{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }

				LIBTDB_CFLAGS="`$PKG_CONFIG --cflags 'tdb >= 1.1.5'`"
				OLD_CFLAGS="$CFLAGS"
				CFLAGS="$CFLAGS $LIBTDB_CFLAGS"
				{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that the C compiler can use the LIBTDB_CFLAGS" >&5
$as_echo_n "checking that the C compiler can use the LIBTDB_CFLAGS... " >&6; }
				if test "$cross_compiling" = yes; then :
  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot run when cross-compiling" >&5
$as_echo "$as_me: WARNING: cannot run when cross-compiling" >&2;}
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include "${srcdir-.}/../tests/trivial.c"
_ACEOF
if ac_fn_c_try_run "$LINENO"; then :

	MAKE_SETTINGS="$MAKE_SETTINGS
LIBTDB_ENABLE = YES
"
SMB_INFO_ENABLES="$SMB_INFO_ENABLES
\$enabled{\"LIBTDB\"} = \"YES\";"

					{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext
fi

				CFLAGS="$OLD_CFLAGS"

				ac_cv_LIBTDB_libs_only_other="`$PKG_CONFIG --libs-only-other 'tdb >= 1.1.5'` `$PKG_CONFIG --libs-only-L 'tdb >= 1.1.5'`"

  ac_new_flags=""
  l=""
  for i in $ac_cv_LIBTDB_libs_only_other; do
    case $l$i in
    -L/usr/lib) ;;
    -L/usr/lib/) ;;
    -L/usr/lib64) ;;
    -L/usr/lib64/) ;;
    -Wl,-rpath,/usr/lib) l="";;
    -Wl,-rpath,/usr/lib/) l="";;
    -Wl,-rpath,/usr/lib64) l="";;
    -Wl,-rpath,/usr/lib64/) l="";;
    -Wl,-rpath) l=$i;;
    -Wl,-rpath-Wl,/usr/lib) l="";;
    -Wl,-rpath-Wl,/usr/lib/) l="";;
    -Wl,-rpath-Wl,/usr/lib64) l="";;
    -Wl,-rpath-Wl,/usr/lib64/) l="";;
    *)
    	s=" "
        if test x"$ac_new_flags" = x""; then
            s="";
	fi
        if test x"$l" = x""; then
            ac_new_flags="$ac_new_flags$s$i";
        else
            ac_new_flags="$ac_new_flags$s$l $i";
        fi
        l=""
        ;;
    esac
  done
  ac_cv_LIBTDB_libs_only_other=$ac_new_flags

				ac_cv_LIBTDB_includedir_only="`$PKG_CONFIG --cflags-only-I 'tdb >= 1.1.5'`"

  ac_new_flags=""
  for i in $ac_cv_LIBTDB_includedir_only; do
    case $i in
    -I/usr/include|-I/usr/include/) ;;
    *) ac_new_flags="$ac_new_flags $i" ;;
    esac
  done
  ac_cv_LIBTDB_includedir_only=$ac_new_flags


MAKE_SETTINGS="$MAKE_SETTINGS
LIBTDB_LIBS = `$PKG_CONFIG --libs-only-l 'tdb >= 1.1.5'`
LIBTDB_CFLAGS = `$PKG_CONFIG --cflags-only-other 'tdb >= 1.1.5'`
LIBTDB_CPPFLAGS = $ac_cv_LIBTDB_includedir_only
LIBTDB_LDFLAGS = $ac_cv_LIBTDB_libs_only_other
"


				ac_cv_LIBTDB_found=yes

			else
				{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
				$PKG_CONFIG --errors-to-stdout --print-errors 'tdb >= 1.1.5'
				ac_cv_LIBTDB_found=no
			fi
		else
			echo "*** Your version of pkg-config is too old. You need version $SAMBA_PKG_CONFIG_MIN_VERSION or newer."
			echo "*** See http://pkg-config.freedesktop.org/"
			ac_cv_LIBTDB_found=no
		fi
	fi
	if test x$ac_cv_LIBTDB_found = x"yes"; then

		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python TDB bindings" >&5
$as_echo_n "checking for Python TDB bindings... " >&6; }
		if $PYTHON -c "from tdb import open" 2>/dev/null; then
			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
		else

SMB_INFO_EXT_LIBS="$SMB_INFO_EXT_LIBS
mkinclude ../lib/tdb/python.mk
"

			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
		fi

	else

			if test $enableval = yes; then
				as_fn_error "Unable to find external LIBTDB" "$LINENO" 5
			fi
			enableval=no

	fi

	fi
	if test $enableval = no; then

		tdbdir=""
tdbpaths=". lib/tdb tdb ../tdb ../lib/tdb"
for d in $tdbpaths; do
	if test -f "$srcdir/$d/common/tdb.c"; then
		tdbdir="$d"

		break;
	fi
done
if test x"$tdbdir" = "x"; then
   as_fn_error "cannot find tdb source in $tdbpaths" "$LINENO" 5
fi
TDB_OBJ="common/tdb.o common/dump.o common/transaction.o common/error.o common/traverse.o"
TDB_OBJ="$TDB_OBJ common/freelist.o common/freelistcheck.o common/io.o common/lock.o common/open.o"



TDB_LIBS=""


TDB_CFLAGS="-I$tdbdir/include"


for ac_func in mmap pread pwrite getpagesize utime
do :
  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
eval as_val=\$$as_ac_var
   if test "x$as_val" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF

fi
done

for ac_header in getopt.h sys/select.h sys/time.h
do :
  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
eval as_val=\$$as_ac_Header
   if test "x$as_val" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF

fi

done



 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pread declaration" >&5
$as_echo_n "checking for pread declaration... " >&6; }
if test "${ac_cv_have_pread_decl+set}" = set; then :
  $as_echo_n "(cached) " >&6
else

    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <unistd.h>
int
main ()
{
int i = (int)pread
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  ac_cv_have_pread_decl=yes
else
  ac_cv_have_pread_decl=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_pread_decl" >&5
$as_echo "$ac_cv_have_pread_decl" >&6; }
 if test x"$ac_cv_have_pread_decl" = x"yes"; then

$as_echo "#define HAVE_PREAD_DECL 1" >>confdefs.h

 fi


 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pwrite declaration" >&5
$as_echo_n "checking for pwrite declaration... " >&6; }
if test "${ac_cv_have_pwrite_decl+set}" = set; then :
  $as_echo_n "(cached) " >&6
else

    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <unistd.h>
int
main ()
{
int i = (int)pwrite
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  ac_cv_have_pwrite_decl=yes
else
  ac_cv_have_pwrite_decl=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_pwrite_decl" >&5
$as_echo "$ac_cv_have_pwrite_decl" >&6; }
 if test x"$ac_cv_have_pwrite_decl" = x"yes"; then

$as_echo "#define HAVE_PWRITE_DECL 1" >>confdefs.h

 fi


if test x"$VERSIONSCRIPT" != "x"; then
    EXPORTSFILE=tdb.exports

fi


SMB_INFO_EXT_LIBS="$SMB_INFO_EXT_LIBS
mkinclude ../lib/tdb/config.mk
"


SMB_INFO_EXT_LIBS="$SMB_INFO_EXT_LIBS
mkinclude ../lib/tdb/python.mk
"



	fi



	# Check whether --enable-external-libtevent was given.
if test "${enable_external_libtevent+set}" = set; then :
  enableval=$enable_external_libtevent;
else
  enableval=auto
fi


	if test $enableval = yes -o $enableval = auto; then


	if test -z "$PKG_CONFIG"; then
		# Extract the first word of "pkg-config", so it can be a program name with args.
set dummy pkg-config; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  case $PKG_CONFIG in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
  ;;
esac
fi
PKG_CONFIG=$ac_cv_path_PKG_CONFIG
if test -n "$PKG_CONFIG"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
$as_echo "$PKG_CONFIG" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


	fi

	if test "$PKG_CONFIG" = "no" ; then
		echo "*** The pkg-config script could not be found. Make sure it is"
		echo "*** in your path, or set the PKG_CONFIG environment variable"
		echo "*** to the full path to pkg-config."
		echo "*** Or see http://pkg-config.freedesktop.org/ to get pkg-config."
			ac_cv_LIBTEVENT_found=no
	else
		SAMBA_PKG_CONFIG_MIN_VERSION="0.9.0"
		if $PKG_CONFIG --atleast-pkgconfig-version $SAMBA_PKG_CONFIG_MIN_VERSION; then
			{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tevent = 0.9.8" >&5
$as_echo_n "checking for tevent = 0.9.8... " >&6; }

			if $PKG_CONFIG --exists 'tevent = 0.9.8' ; then
				{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }

				LIBTEVENT_CFLAGS="`$PKG_CONFIG --cflags 'tevent = 0.9.8'`"
				OLD_CFLAGS="$CFLAGS"
				CFLAGS="$CFLAGS $LIBTEVENT_CFLAGS"
				{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that the C compiler can use the LIBTEVENT_CFLAGS" >&5
$as_echo_n "checking that the C compiler can use the LIBTEVENT_CFLAGS... " >&6; }
				if test "$cross_compiling" = yes; then :
  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot run when cross-compiling" >&5
$as_echo "$as_me: WARNING: cannot run when cross-compiling" >&2;}
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include "${srcdir-.}/../tests/trivial.c"
_ACEOF
if ac_fn_c_try_run "$LINENO"; then :

	MAKE_SETTINGS="$MAKE_SETTINGS
LIBTEVENT_ENABLE = YES
"
SMB_INFO_ENABLES="$SMB_INFO_ENABLES
\$enabled{\"LIBTEVENT\"} = \"YES\";"

					{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext
fi

				CFLAGS="$OLD_CFLAGS"

				ac_cv_LIBTEVENT_libs_only_other="`$PKG_CONFIG --libs-only-other 'tevent = 0.9.8'` `$PKG_CONFIG --libs-only-L 'tevent = 0.9.8'`"

  ac_new_flags=""
  l=""
  for i in $ac_cv_LIBTEVENT_libs_only_other; do
    case $l$i in
    -L/usr/lib) ;;
    -L/usr/lib/) ;;
    -L/usr/lib64) ;;
    -L/usr/lib64/) ;;
    -Wl,-rpath,/usr/lib) l="";;
    -Wl,-rpath,/usr/lib/) l="";;
    -Wl,-rpath,/usr/lib64) l="";;
    -Wl,-rpath,/usr/lib64/) l="";;
    -Wl,-rpath) l=$i;;
    -Wl,-rpath-Wl,/usr/lib) l="";;
    -Wl,-rpath-Wl,/usr/lib/) l="";;
    -Wl,-rpath-Wl,/usr/lib64) l="";;
    -Wl,-rpath-Wl,/usr/lib64/) l="";;
    *)
    	s=" "
        if test x"$ac_new_flags" = x""; then
            s="";
	fi
        if test x"$l" = x""; then
            ac_new_flags="$ac_new_flags$s$i";
        else
            ac_new_flags="$ac_new_flags$s$l $i";
        fi
        l=""
        ;;
    esac
  done
  ac_cv_LIBTEVENT_libs_only_other=$ac_new_flags

				ac_cv_LIBTEVENT_includedir_only="`$PKG_CONFIG --cflags-only-I 'tevent = 0.9.8'`"

  ac_new_flags=""
  for i in $ac_cv_LIBTEVENT_includedir_only; do
    case $i in
    -I/usr/include|-I/usr/include/) ;;
    *) ac_new_flags="$ac_new_flags $i" ;;
    esac
  done
  ac_cv_LIBTEVENT_includedir_only=$ac_new_flags


MAKE_SETTINGS="$MAKE_SETTINGS
LIBTEVENT_LIBS = `$PKG_CONFIG --libs-only-l 'tevent = 0.9.8'`
LIBTEVENT_CFLAGS = `$PKG_CONFIG --cflags-only-other 'tevent = 0.9.8'`
LIBTEVENT_CPPFLAGS = $ac_cv_LIBTEVENT_includedir_only
LIBTEVENT_LDFLAGS = $ac_cv_LIBTEVENT_libs_only_other
"


				ac_cv_LIBTEVENT_found=yes

			else
				{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
				$PKG_CONFIG --errors-to-stdout --print-errors 'tevent = 0.9.8'
				ac_cv_LIBTEVENT_found=no
			fi
		else
			echo "*** Your version of pkg-config is too old. You need version $SAMBA_PKG_CONFIG_MIN_VERSION or newer."
			echo "*** See http://pkg-config.freedesktop.org/"
			ac_cv_LIBTEVENT_found=no
		fi
	fi
	if test x$ac_cv_LIBTEVENT_found = x"yes"; then
		echo -n ""
	else

			if test $enableval = yes; then
				as_fn_error "Unable to find external LIBTEVENT" "$LINENO" 5
			fi
			enableval=no

	fi

	fi
	if test $enableval = no; then

teventdir="\$(libteventsrcdir)"



if test x"$teventdir" = "x"; then
	teventdir=""
	teventpaths="$srcdir $srcdir/../lib/tevent $srcdir/tevent $srcdir/../tevent"
	for d in $teventpaths; do
		if test -f "$d/tevent.c"; then
			teventdir="$d"
			break;
		fi
	done
	if test x"$teventdir" = "x"; then
	   as_fn_error "cannot find libtevent source in $teventpaths" "$LINENO" 5
	fi
fi

TEVENT_OBJ=""
TEVENT_CFLAGS=""
TEVENT_LIBS=""




TEVENT_CFLAGS="-I$teventdir"

TEVENT_OBJ="tevent.o tevent_debug.o tevent_util.o"
TEVENT_OBJ="$TEVENT_OBJ tevent_fd.o tevent_timed.o tevent_immediate.o tevent_signal.o"
TEVENT_OBJ="$TEVENT_OBJ tevent_req.o tevent_wakeup.o tevent_queue.o"
TEVENT_OBJ="$TEVENT_OBJ tevent_standard.o tevent_select.o"

for ac_header in sys/epoll.h
do :
  ac_fn_c_check_header_mongrel "$LINENO" "sys/epoll.h" "ac_cv_header_sys_epoll_h" "$ac_includes_default"
if test "x$ac_cv_header_sys_epoll_h" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_SYS_EPOLL_H 1
_ACEOF

fi

done

for ac_func in epoll_create
do :
  ac_fn_c_check_func "$LINENO" "epoll_create" "ac_cv_func_epoll_create"
if test "x$ac_cv_func_epoll_create" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_EPOLL_CREATE 1
_ACEOF

fi
done

if test x"$ac_cv_header_sys_epoll_h" = x"yes" -a x"$ac_cv_func_epoll_create" = x"yes"; then
   TEVENT_OBJ="$TEVENT_OBJ tevent_epoll.o"

$as_echo "#define HAVE_EPOLL 1" >>confdefs.h

fi

if test x"$VERSIONSCRIPT" != "x"; then
    EXPORTSFILE=tevent.exports

fi




MAKE_SETTINGS="$MAKE_SETTINGS
LIBTEVENT_EXT_LIBS = ${TEVENT_LIBS}
LIBTEVENT_EXT_CFLAGS =
LIBTEVENT_EXT_CPPFLAGS =
LIBTEVENT_EXT_LDFLAGS =
"



	MAKE_SETTINGS="$MAKE_SETTINGS
LIBTEVENT_EXT_ENABLE =
"
SMB_INFO_ENABLES="$SMB_INFO_ENABLES
\$enabled{\"LIBTEVENT_EXT\"} = \"\";"



MAKE_SETTINGS="$MAKE_SETTINGS
LIBTEVENT_CFLAGS = ${TEVENT_CFLAGS}
LIBTEVENT_ENABLE = YES
LIBTEVENT_OBJ_FILES = \$(addprefix \$(libteventsrcdir)/, ${TEVENT_OBJ})
"

SMB_INFO_SUBSYSTEMS="$SMB_INFO_SUBSYSTEMS
###################################
# Start Subsystem LIBTEVENT
[SUBSYSTEM::LIBTEVENT]
PRIVATE_DEPENDENCIES = LIBTEVENT_EXT
CFLAGS = \$(LIBTEVENT_CFLAGS)
ENABLE = YES
# End Subsystem LIBTEVENT
###################################
"



	fi



	# Check whether --enable-external-libldb was given.
if test "${enable_external_libldb+set}" = set; then :
  enableval=$enable_external_libldb;
else
  enableval=auto
fi


	if test $enableval = yes -o $enableval = auto; then


	if test -z "$PKG_CONFIG"; then
		# Extract the first word of "pkg-config", so it can be a program name with args.
set dummy pkg-config; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  case $PKG_CONFIG in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
  ;;
esac
fi
PKG_CONFIG=$ac_cv_path_PKG_CONFIG
if test -n "$PKG_CONFIG"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
$as_echo "$PKG_CONFIG" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


	fi

	if test "$PKG_CONFIG" = "no" ; then
		echo "*** The pkg-config script could not be found. Make sure it is"
		echo "*** in your path, or set the PKG_CONFIG environment variable"
		echo "*** to the full path to pkg-config."
		echo "*** Or see http://pkg-config.freedesktop.org/ to get pkg-config."
			ac_cv_LIBLDB_found=no
	else
		SAMBA_PKG_CONFIG_MIN_VERSION="0.9.0"
		if $PKG_CONFIG --atleast-pkgconfig-version $SAMBA_PKG_CONFIG_MIN_VERSION; then
			{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldb = 0.9.6" >&5
$as_echo_n "checking for ldb = 0.9.6... " >&6; }

			if $PKG_CONFIG --exists 'ldb = 0.9.6' ; then
				{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }

				LIBLDB_CFLAGS="`$PKG_CONFIG --cflags 'ldb = 0.9.6'`"
				OLD_CFLAGS="$CFLAGS"
				CFLAGS="$CFLAGS $LIBLDB_CFLAGS"
				{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that the C compiler can use the LIBLDB_CFLAGS" >&5
$as_echo_n "checking that the C compiler can use the LIBLDB_CFLAGS... " >&6; }
				if test "$cross_compiling" = yes; then :
  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot run when cross-compiling" >&5
$as_echo "$as_me: WARNING: cannot run when cross-compiling" >&2;}
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include "${srcdir-.}/../tests/trivial.c"
_ACEOF
if ac_fn_c_try_run "$LINENO"; then :

	MAKE_SETTINGS="$MAKE_SETTINGS
LIBLDB_ENABLE = YES
"
SMB_INFO_ENABLES="$SMB_INFO_ENABLES
\$enabled{\"LIBLDB\"} = \"YES\";"

					{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext
fi

				CFLAGS="$OLD_CFLAGS"

				ac_cv_LIBLDB_libs_only_other="`$PKG_CONFIG --libs-only-other 'ldb = 0.9.6'` `$PKG_CONFIG --libs-only-L 'ldb = 0.9.6'`"

  ac_new_flags=""
  l=""
  for i in $ac_cv_LIBLDB_libs_only_other; do
    case $l$i in
    -L/usr/lib) ;;
    -L/usr/lib/) ;;
    -L/usr/lib64) ;;
    -L/usr/lib64/) ;;
    -Wl,-rpath,/usr/lib) l="";;
    -Wl,-rpath,/usr/lib/) l="";;
    -Wl,-rpath,/usr/lib64) l="";;
    -Wl,-rpath,/usr/lib64/) l="";;
    -Wl,-rpath) l=$i;;
    -Wl,-rpath-Wl,/usr/lib) l="";;
    -Wl,-rpath-Wl,/usr/lib/) l="";;
    -Wl,-rpath-Wl,/usr/lib64) l="";;
    -Wl,-rpath-Wl,/usr/lib64/) l="";;
    *)
    	s=" "
        if test x"$ac_new_flags" = x""; then
            s="";
	fi
        if test x"$l" = x""; then
            ac_new_flags="$ac_new_flags$s$i";
        else
            ac_new_flags="$ac_new_flags$s$l $i";
        fi
        l=""
        ;;
    esac
  done
  ac_cv_LIBLDB_libs_only_other=$ac_new_flags

				ac_cv_LIBLDB_includedir_only="`$PKG_CONFIG --cflags-only-I 'ldb = 0.9.6'`"

  ac_new_flags=""
  for i in $ac_cv_LIBLDB_includedir_only; do
    case $i in
    -I/usr/include|-I/usr/include/) ;;
    *) ac_new_flags="$ac_new_flags $i" ;;
    esac
  done
  ac_cv_LIBLDB_includedir_only=$ac_new_flags


MAKE_SETTINGS="$MAKE_SETTINGS
LIBLDB_LIBS = `$PKG_CONFIG --libs-only-l 'ldb = 0.9.6'`
LIBLDB_CFLAGS = `$PKG_CONFIG --cflags-only-other 'ldb = 0.9.6'`
LIBLDB_CPPFLAGS = $ac_cv_LIBLDB_includedir_only
LIBLDB_LDFLAGS = $ac_cv_LIBLDB_libs_only_other
"


				ac_cv_LIBLDB_found=yes

			else
				{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
				$PKG_CONFIG --errors-to-stdout --print-errors 'ldb = 0.9.6'
				ac_cv_LIBLDB_found=no
			fi
		else
			echo "*** Your version of pkg-config is too old. You need version $SAMBA_PKG_CONFIG_MIN_VERSION or newer."
			echo "*** See http://pkg-config.freedesktop.org/"
			ac_cv_LIBLDB_found=no
		fi
	fi
	if test x$ac_cv_LIBLDB_found = x"yes"; then


SMB_INFO_EXT_LIBS="$SMB_INFO_EXT_LIBS
mkinclude lib/ldb/ldb_ildap/config.mk
"


SMB_INFO_EXT_LIBS="$SMB_INFO_EXT_LIBS
mkinclude lib/ldb/tools/config.mk
"

		define_ldb_modulesdir=no
		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python LDB bindings" >&5
$as_echo_n "checking for Python LDB bindings... " >&6; }
		if $PYTHON -c "import ldb" 2>/dev/null; then
			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
		else

SMB_INFO_EXT_LIBS="$SMB_INFO_EXT_LIBS
mkinclude lib/ldb/python.mk
"

			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
		fi


	else

			if test $enableval = yes; then
				as_fn_error "Unable to find external LIBLDB" "$LINENO" 5
			fi
			enableval=no

	fi

	fi
	if test $enableval = no; then

		# Here we need to do some tricks
		# with AC_CONFIG_COMMANDS_PRE
		# as that's the deferrs the commands
		# to location after $prefix and $exec_prefix
		# have usefull values and directly before
		# creating config.status.
		#
		# The 'eval eval echo' trick is used to
		# actually get the raw absolute directory
		# path as this is needed in config.h
		define_ldb_modulesdir=yes

		ldbdir=lib/ldb

		########################################################
# Compile with SQLITE3 support?

SQLITE3_LIBS=""
with_sqlite3_support=no
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SQLITE3 support" >&5
$as_echo_n "checking for SQLITE3 support... " >&6; }


# Check whether --with-sqlite3 was given.
if test "${with_sqlite3+set}" = set; then :
  withval=$with_sqlite3;  case "$withval" in
    yes|no|auto)
	with_sqlite3_support=$withval
	;;
  esac
fi


{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_sqlite3_support" >&5
$as_echo "$with_sqlite3_support" >&6; }

if test x"$with_sqlite3_support" != x"no"; then
  ##################################################################
  # first test for sqlite3.h
  for ac_header in sqlite3.h
do :
  ac_fn_c_check_header_mongrel "$LINENO" "sqlite3.h" "ac_cv_header_sqlite3_h" "$ac_includes_default"
if test "x$ac_cv_header_sqlite3_h" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_SQLITE3_H 1
_ACEOF

fi

done


  if test x"$ac_cv_header_sqlite3_h" != x"yes"; then
	if test x"$with_sqlite3_support" = x"yes"; then
	 as_fn_error "sqlite3.h is needed for SQLITE3 support" "$LINENO" 5
	else
	 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: sqlite3.h is needed for SQLITE3 support" >&5
$as_echo "$as_me: WARNING: sqlite3.h is needed for SQLITE3 support" >&2;}
	fi

	with_sqlite3_support=no
  fi
fi

if test x"$with_sqlite3_support" != x"no"; then
  ac_save_LIBS=$LIBS

  ########################################################
  # now see if we can find the sqlite3 libs in standard paths


ac_check_lib_ext_save_LIBS=$LIBS
LIBS="-lsqlite3 $SQLITE3_LIBS  $LIBS"



        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqlite3_open in -lsqlite3" >&5
$as_echo_n "checking for sqlite3_open in -lsqlite3... " >&6; }
if test "${ac_cv_lib_ext_sqlite3_sqlite3_open+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char sqlite3_open ();
int
main ()
{
return sqlite3_open ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  ac_cv_lib_ext_sqlite3_sqlite3_open=yes;
		  ac_cv_lib_ext_sqlite3=yes
else
  ac_cv_lib_ext_sqlite3_sqlite3_open=no;
		  ac_cv_lib_ext_sqlite3=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ext_sqlite3_sqlite3_open" >&5
$as_echo "$ac_cv_lib_ext_sqlite3_sqlite3_open" >&6; }
    if test $ac_cv_lib_ext_sqlite3_sqlite3_open = yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_SQLITE3_OPEN 1
_ACEOF

fi
LIBS=$ac_check_lib_ext_save_LIBS

if test $ac_cv_lib_ext_sqlite3 = yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_LIBSQLITE3 1
_ACEOF

		case "$SQLITE3_LIBS" in
		    *-lsqlite3*)
			;;
		    *)
			SQLITE3_LIBS="-lsqlite3 $SQLITE3_LIBS"
			;;
		esac


fi

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

$as_echo "#define HAVE_SQLITE3 1" >>confdefs.h


$as_echo "#define HAVE_LDB_SQLITE3 1" >>confdefs.h

    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether SQLITE3 support is used" >&5
$as_echo_n "checking whether SQLITE3 support is used... " >&6; }
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
    with_sqlite3_support=yes

	MAKE_SETTINGS="$MAKE_SETTINGS
SQLITE3_ENABLE = YES
"
SMB_INFO_ENABLES="$SMB_INFO_ENABLES
\$enabled{\"SQLITE3\"} = \"YES\";"

  else
    if test x"$with_sqlite3_support" = x"yes"; then
	as_fn_error "libsqlite3 is needed for SQLITE3 support" "$LINENO" 5
    else
	{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libsqlite3 is needed for SQLITE3 support" >&5
$as_echo "$as_me: WARNING: libsqlite3 is needed for SQLITE3 support" >&2;}
    fi

    SQLITE3_LIBS=""
    with_sqlite3_support=no
  fi

  LIBS=$ac_save_LIBS;
fi


MAKE_SETTINGS="$MAKE_SETTINGS
SQLITE3_LIBS = ${SQLITE3_LIBS}
SQLITE3_CFLAGS = ${SQLITE3_CFLAGS}
SQLITE3_CPPFLAGS = ${SQLITE3_CPPFLAGS}
SQLITE3_LDFLAGS = ${SQLITE3_LDFLAGS}
"




# disable ldb_sqlite3 by default

	MAKE_SETTINGS="$MAKE_SETTINGS
ldb_sqlite3_ENABLE = NO
"
SMB_INFO_ENABLES="$SMB_INFO_ENABLES
\$enabled{\"ldb_sqlite3\"} = \"NO\";"


#if test x"$with_sqlite3_support" = x"yes"; then
#	SMB_ENABLE(ldb_sqlite3, YES)
#fi


SMB_INFO_EXT_LIBS="$SMB_INFO_EXT_LIBS
mkinclude lib/ldb/config.mk
"

		ac_config_files="$ac_config_files lib/ldb/ldb.pc"


SMB_INFO_EXT_LIBS="$SMB_INFO_EXT_LIBS
mkinclude lib/ldb/python.mk
"


	fi


###############################
# start SMB_EXT_LIB_GNUTLS
# check for gnutls/gnutls.h and -lgnutls

use_gnutls=auto
# Check whether --enable-gnutls was given.
if test "${enable_gnutls+set}" = set; then :
  enableval=$enable_gnutls; if test x$enable_gnutls = xno; then
        use_gnutls=no
    fi
fi



if test x$use_gnutls = xauto && pkg-config --exists gnutls; then


	if test -z "$PKG_CONFIG"; then
		# Extract the first word of "pkg-config", so it can be a program name with args.
set dummy pkg-config; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  case $PKG_CONFIG in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
  ;;
esac
fi
PKG_CONFIG=$ac_cv_path_PKG_CONFIG
if test -n "$PKG_CONFIG"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
$as_echo "$PKG_CONFIG" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


	fi

	if test "$PKG_CONFIG" = "no" ; then
		echo "*** The pkg-config script could not be found. Make sure it is"
		echo "*** in your path, or set the PKG_CONFIG environment variable"
		echo "*** to the full path to pkg-config."
		echo "*** Or see http://pkg-config.freedesktop.org/ to get pkg-config."
			ac_cv_GNUTLS_found=no
	else
		SAMBA_PKG_CONFIG_MIN_VERSION="0.9.0"
		if $PKG_CONFIG --atleast-pkgconfig-version $SAMBA_PKG_CONFIG_MIN_VERSION; then
			{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gnutls >= 1.4.0" >&5
$as_echo_n "checking for gnutls >= 1.4.0... " >&6; }

			if $PKG_CONFIG --exists 'gnutls >= 1.4.0' ; then
				{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }

				GNUTLS_CFLAGS="`$PKG_CONFIG --cflags 'gnutls >= 1.4.0'`"
				OLD_CFLAGS="$CFLAGS"
				CFLAGS="$CFLAGS $GNUTLS_CFLAGS"
				{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that the C compiler can use the GNUTLS_CFLAGS" >&5
$as_echo_n "checking that the C compiler can use the GNUTLS_CFLAGS... " >&6; }
				if test "$cross_compiling" = yes; then :
  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot run when cross-compiling" >&5
$as_echo "$as_me: WARNING: cannot run when cross-compiling" >&2;}
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include "${srcdir-.}/../tests/trivial.c"
_ACEOF
if ac_fn_c_try_run "$LINENO"; then :

	MAKE_SETTINGS="$MAKE_SETTINGS
GNUTLS_ENABLE = YES
"
SMB_INFO_ENABLES="$SMB_INFO_ENABLES
\$enabled{\"GNUTLS\"} = \"YES\";"

					{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext
fi

				CFLAGS="$OLD_CFLAGS"

				ac_cv_GNUTLS_libs_only_other="`$PKG_CONFIG --libs-only-other 'gnutls >= 1.4.0'` `$PKG_CONFIG --libs-only-L 'gnutls >= 1.4.0'`"

  ac_new_flags=""
  l=""
  for i in $ac_cv_GNUTLS_libs_only_other; do
    case $l$i in
    -L/usr/lib) ;;
    -L/usr/lib/) ;;
    -L/usr/lib64) ;;
    -L/usr/lib64/) ;;
    -Wl,-rpath,/usr/lib) l="";;
    -Wl,-rpath,/usr/lib/) l="";;
    -Wl,-rpath,/usr/lib64) l="";;
    -Wl,-rpath,/usr/lib64/) l="";;
    -Wl,-rpath) l=$i;;
    -Wl,-rpath-Wl,/usr/lib) l="";;
    -Wl,-rpath-Wl,/usr/lib/) l="";;
    -Wl,-rpath-Wl,/usr/lib64) l="";;
    -Wl,-rpath-Wl,/usr/lib64/) l="";;
    *)
    	s=" "
        if test x"$ac_new_flags" = x""; then
            s="";
	fi
        if test x"$l" = x""; then
            ac_new_flags="$ac_new_flags$s$i";
        else
            ac_new_flags="$ac_new_flags$s$l $i";
        fi
        l=""
        ;;
    esac
  done
  ac_cv_GNUTLS_libs_only_other=$ac_new_flags

				ac_cv_GNUTLS_includedir_only="`$PKG_CONFIG --cflags-only-I 'gnutls >= 1.4.0'`"

  ac_new_flags=""
  for i in $ac_cv_GNUTLS_includedir_only; do
    case $i in
    -I/usr/include|-I/usr/include/) ;;
    *) ac_new_flags="$ac_new_flags $i" ;;
    esac
  done
  ac_cv_GNUTLS_includedir_only=$ac_new_flags


MAKE_SETTINGS="$MAKE_SETTINGS
GNUTLS_LIBS = `$PKG_CONFIG --libs-only-l 'gnutls >= 1.4.0'`
GNUTLS_CFLAGS = `$PKG_CONFIG --cflags-only-other 'gnutls >= 1.4.0'`
GNUTLS_CPPFLAGS = $ac_cv_GNUTLS_includedir_only
GNUTLS_LDFLAGS = $ac_cv_GNUTLS_libs_only_other
"


				ac_cv_GNUTLS_found=yes

			else
				{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
				$PKG_CONFIG --errors-to-stdout --print-errors 'gnutls >= 1.4.0'
				ac_cv_GNUTLS_found=no
			fi
		else
			echo "*** Your version of pkg-config is too old. You need version $SAMBA_PKG_CONFIG_MIN_VERSION or newer."
			echo "*** See http://pkg-config.freedesktop.org/"
			ac_cv_GNUTLS_found=no
		fi
	fi
	if test x$ac_cv_GNUTLS_found = x"yes"; then
		use_gnutls=yes
	else
		use_gnutls=no
	fi

fi

if test x$use_gnutls = xauto; then
	for ac_header in gnutls/gnutls.h
do :
  ac_fn_c_check_header_mongrel "$LINENO" "gnutls/gnutls.h" "ac_cv_header_gnutls_gnutls_h" "$ac_includes_default"
if test "x$ac_cv_header_gnutls_gnutls_h" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_GNUTLS_GNUTLS_H 1
_ACEOF

fi

done



ac_check_lib_ext_save_LIBS=$LIBS
LIBS="-lgnutls $GNUTLS_LIBS  $LIBS"



        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gnutls_global_init in -lgnutls" >&5
$as_echo_n "checking for gnutls_global_init in -lgnutls... " >&6; }
if test "${ac_cv_lib_ext_gnutls_gnutls_global_init+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char gnutls_global_init ();
int
main ()
{
return gnutls_global_init ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  ac_cv_lib_ext_gnutls_gnutls_global_init=yes;
		  ac_cv_lib_ext_gnutls=yes
else
  ac_cv_lib_ext_gnutls_gnutls_global_init=no;
		  ac_cv_lib_ext_gnutls=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ext_gnutls_gnutls_global_init" >&5
$as_echo "$ac_cv_lib_ext_gnutls_gnutls_global_init" >&6; }
    if test $ac_cv_lib_ext_gnutls_gnutls_global_init = yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_GNUTLS_GLOBAL_INIT 1
_ACEOF

fi
LIBS=$ac_check_lib_ext_save_LIBS

if test $ac_cv_lib_ext_gnutls = yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_LIBGNUTLS 1
_ACEOF

		case "$GNUTLS_LIBS" in
		    *-lgnutls*)
			;;
		    *)
			GNUTLS_LIBS="-lgnutls $GNUTLS_LIBS"
			;;
		esac


fi
	ac_fn_c_check_decl "$LINENO" "gnutls_x509_crt_set_version" "ac_cv_have_decl_gnutls_x509_crt_set_version" "
	#include <gnutls/gnutls.h>
	#include <gnutls/x509.h>

"
if test "x$ac_cv_have_decl_gnutls_x509_crt_set_version" = x""yes; then :

$as_echo "#define HAVE_GNUTLS_X509_CRT_SET_VERSION 1" >>confdefs.h

fi

	if test x"$ac_cv_header_gnutls_gnutls_h" = x"yes" -a x"$ac_cv_lib_ext_gnutls_gnutls_global_init" = x"yes" -a x"$ac_cv_have_decl_gnutls_x509_crt_set_version" = x"yes";then

	MAKE_SETTINGS="$MAKE_SETTINGS
GNUTLS_ENABLE = YES
"
SMB_INFO_ENABLES="$SMB_INFO_ENABLES
\$enabled{\"GNUTLS\"} = \"YES\";"

		ac_fn_c_check_decl "$LINENO" "gnutls_x509_crt_set_subject_key_id" "ac_cv_have_decl_gnutls_x509_crt_set_subject_key_id" "
	#include <gnutls/gnutls.h>
	#include <gnutls/x509.h>

"
if test "x$ac_cv_have_decl_gnutls_x509_crt_set_subject_key_id" = x""yes; then :

$as_echo "#define HAVE_GNUTLS_X509_CRT_SET_SUBJECT_KEY_ID 1" >>confdefs.h

fi

	fi

MAKE_SETTINGS="$MAKE_SETTINGS
GNUTLS_LIBS = $GNUTLS_LIBS
GNUTLS_CFLAGS =
GNUTLS_CPPFLAGS =
GNUTLS_LDFLAGS =
"


fi
if test x$use_gnutls = xyes; then
	#Some older versions have a different type name
	ac_fn_c_check_type "$LINENO" "gnutls_datum" "ac_cv_type_gnutls_datum" "#include \"gnutls/gnutls.h\"
"
if test "x$ac_cv_type_gnutls_datum" = x""yes; then :

cat >>confdefs.h <<_ACEOF
#define HAVE_GNUTLS_DATUM 1
_ACEOF


fi

	ac_fn_c_check_type "$LINENO" "gnutls_datum_t" "ac_cv_type_gnutls_datum_t" "#include \"gnutls/gnutls.h\"
"
if test "x$ac_cv_type_gnutls_datum_t" = x""yes; then :

cat >>confdefs.h <<_ACEOF
#define HAVE_GNUTLS_DATUM_T 1
_ACEOF


fi


$as_echo "#define ENABLE_GNUTLS 1" >>confdefs.h

	for ac_header in gcrypt.h
do :
  ac_fn_c_check_header_mongrel "$LINENO" "gcrypt.h" "ac_cv_header_gcrypt_h" "$ac_includes_default"
if test "x$ac_cv_header_gcrypt_h" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_GCRYPT_H 1
_ACEOF

fi

done



ac_check_lib_ext_save_LIBS=$LIBS
LIBS="-lgcrypt $GCRYPT_LIBS  $LIBS"



        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcry_control in -lgcrypt" >&5
$as_echo_n "checking for gcry_control in -lgcrypt... " >&6; }
if test "${ac_cv_lib_ext_gcrypt_gcry_control+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char gcry_control ();
int
main ()
{
return gcry_control ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  ac_cv_lib_ext_gcrypt_gcry_control=yes;
		  ac_cv_lib_ext_gcrypt=yes
else
  ac_cv_lib_ext_gcrypt_gcry_control=no;
		  ac_cv_lib_ext_gcrypt=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ext_gcrypt_gcry_control" >&5
$as_echo "$ac_cv_lib_ext_gcrypt_gcry_control" >&6; }
    if test $ac_cv_lib_ext_gcrypt_gcry_control = yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_GCRY_CONTROL 1
_ACEOF

fi
LIBS=$ac_check_lib_ext_save_LIBS

if test $ac_cv_lib_ext_gcrypt = yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_LIBGCRYPT 1
_ACEOF

		case "$GCRYPT_LIBS" in
		    *-lgcrypt*)
			;;
		    *)
			GCRYPT_LIBS="-lgcrypt $GCRYPT_LIBS"
			;;
		esac


fi

MAKE_SETTINGS="$MAKE_SETTINGS
GCRYPT_LIBS = $GCRYPT_LIBS
GCRYPT_CFLAGS =
GCRYPT_CPPFLAGS =
GCRYPT_LDFLAGS =
"


fi

###############################
# start SMB_EXT_LIB_NETAPI
# check for netapi.h and -lnetapi

use_netapi=auto
# Check whether --enable-netapi was given.
if test "${enable_netapi+set}" = set; then :
  enableval=$enable_netapi; if test x$enable_netapi = xno; then
        use_netapi=no
    fi
fi



#if test x$use_netapi = xauto && pkg-config --exists netapi; then
#	SMB_EXT_LIB_FROM_PKGCONFIG(NETAPI, netapi < 0.1,
#							   [use_netapi=yes],
#							   [use_netapi=no])
#fi


	MAKE_SETTINGS="$MAKE_SETTINGS
TORTURE_LIBNETAPI_ENABLE = NO
"
SMB_INFO_ENABLES="$SMB_INFO_ENABLES
\$enabled{\"TORTURE_LIBNETAPI\"} = \"NO\";"

if test x$use_netapi != xno; then
	for ac_header in netapi.h
do :
  ac_fn_c_check_header_mongrel "$LINENO" "netapi.h" "ac_cv_header_netapi_h" "$ac_includes_default"
if test "x$ac_cv_header_netapi_h" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_NETAPI_H 1
_ACEOF

fi

done



ac_check_lib_ext_save_LIBS=$LIBS
LIBS="-lnetapi $NETAPI_LIBS  $LIBS"



        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libnetapi_init in -lnetapi" >&5
$as_echo_n "checking for libnetapi_init in -lnetapi... " >&6; }
if test "${ac_cv_lib_ext_netapi_libnetapi_init+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char libnetapi_init ();
int
main ()
{
return libnetapi_init ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  ac_cv_lib_ext_netapi_libnetapi_init=yes;
		  ac_cv_lib_ext_netapi=yes
else
  ac_cv_lib_ext_netapi_libnetapi_init=no;
		  ac_cv_lib_ext_netapi=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ext_netapi_libnetapi_init" >&5
$as_echo "$ac_cv_lib_ext_netapi_libnetapi_init" >&6; }
    if test $ac_cv_lib_ext_netapi_libnetapi_init = yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_LIBNETAPI_INIT 1
_ACEOF

fi
LIBS=$ac_check_lib_ext_save_LIBS

if test $ac_cv_lib_ext_netapi = yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_LIBNETAPI 1
_ACEOF

		case "$NETAPI_LIBS" in
		    *-lnetapi*)
			;;
		    *)
			NETAPI_LIBS="-lnetapi $NETAPI_LIBS"
			;;
		esac


fi


ac_check_lib_ext_save_LIBS=$LIBS
LIBS="-lnetapi $NETAPI_LIBS  $LIBS"



        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NetUserModalsGet in -lnetapi" >&5
$as_echo_n "checking for NetUserModalsGet in -lnetapi... " >&6; }
if test "${ac_cv_lib_ext_netapi_NetUserModalsGet+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char NetUserModalsGet ();
int
main ()
{
return NetUserModalsGet ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  ac_cv_lib_ext_netapi_NetUserModalsGet=yes;
		  ac_cv_lib_ext_netapi=yes
else
  ac_cv_lib_ext_netapi_NetUserModalsGet=no;
		  ac_cv_lib_ext_netapi=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ext_netapi_NetUserModalsGet" >&5
$as_echo "$ac_cv_lib_ext_netapi_NetUserModalsGet" >&6; }
    if test $ac_cv_lib_ext_netapi_NetUserModalsGet = yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_NETUSERMODALSGET 1
_ACEOF

fi
LIBS=$ac_check_lib_ext_save_LIBS

if test $ac_cv_lib_ext_netapi = yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_LIBNETAPI 1
_ACEOF

		case "$NETAPI_LIBS" in
		    *-lnetapi*)
			;;
		    *)
			NETAPI_LIBS="-lnetapi $NETAPI_LIBS"
			;;
		esac


fi


ac_check_lib_ext_save_LIBS=$LIBS
LIBS="-lnetapi $NETAPI_LIBS  $LIBS"



        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NetUserGetGroups in -lnetapi" >&5
$as_echo_n "checking for NetUserGetGroups in -lnetapi... " >&6; }
if test "${ac_cv_lib_ext_netapi_NetUserGetGroups+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char NetUserGetGroups ();
int
main ()
{
return NetUserGetGroups ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  ac_cv_lib_ext_netapi_NetUserGetGroups=yes;
		  ac_cv_lib_ext_netapi=yes
else
  ac_cv_lib_ext_netapi_NetUserGetGroups=no;
		  ac_cv_lib_ext_netapi=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ext_netapi_NetUserGetGroups" >&5
$as_echo "$ac_cv_lib_ext_netapi_NetUserGetGroups" >&6; }
    if test $ac_cv_lib_ext_netapi_NetUserGetGroups = yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_NETUSERGETGROUPS 1
_ACEOF

fi
LIBS=$ac_check_lib_ext_save_LIBS

if test $ac_cv_lib_ext_netapi = yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_LIBNETAPI 1
_ACEOF

		case "$NETAPI_LIBS" in
		    *-lnetapi*)
			;;
		    *)
			NETAPI_LIBS="-lnetapi $NETAPI_LIBS"
			;;
		esac


fi


ac_check_lib_ext_save_LIBS=$LIBS
LIBS="-lnetapi $NETAPI_LIBS  $LIBS"



        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NetUserGetInfo in -lnetapi" >&5
$as_echo_n "checking for NetUserGetInfo in -lnetapi... " >&6; }
if test "${ac_cv_lib_ext_netapi_NetUserGetInfo+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char NetUserGetInfo ();
int
main ()
{
return NetUserGetInfo ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  ac_cv_lib_ext_netapi_NetUserGetInfo=yes;
		  ac_cv_lib_ext_netapi=yes
else
  ac_cv_lib_ext_netapi_NetUserGetInfo=no;
		  ac_cv_lib_ext_netapi=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ext_netapi_NetUserGetInfo" >&5
$as_echo "$ac_cv_lib_ext_netapi_NetUserGetInfo" >&6; }
    if test $ac_cv_lib_ext_netapi_NetUserGetInfo = yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_NETUSERGETINFO 1
_ACEOF

fi
LIBS=$ac_check_lib_ext_save_LIBS

if test $ac_cv_lib_ext_netapi = yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_LIBNETAPI 1
_ACEOF

		case "$NETAPI_LIBS" in
		    *-lnetapi*)
			;;
		    *)
			NETAPI_LIBS="-lnetapi $NETAPI_LIBS"
			;;
		esac


fi


ac_check_lib_ext_save_LIBS=$LIBS
LIBS="-lnetapi $NETAPI_LIBS  $LIBS"



        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NetUserSetInfo in -lnetapi" >&5
$as_echo_n "checking for NetUserSetInfo in -lnetapi... " >&6; }
if test "${ac_cv_lib_ext_netapi_NetUserSetInfo+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char NetUserSetInfo ();
int
main ()
{
return NetUserSetInfo ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  ac_cv_lib_ext_netapi_NetUserSetInfo=yes;
		  ac_cv_lib_ext_netapi=yes
else
  ac_cv_lib_ext_netapi_NetUserSetInfo=no;
		  ac_cv_lib_ext_netapi=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ext_netapi_NetUserSetInfo" >&5
$as_echo "$ac_cv_lib_ext_netapi_NetUserSetInfo" >&6; }
    if test $ac_cv_lib_ext_netapi_NetUserSetInfo = yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_NETUSERSETINFO 1
_ACEOF

fi
LIBS=$ac_check_lib_ext_save_LIBS

if test $ac_cv_lib_ext_netapi = yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_LIBNETAPI 1
_ACEOF

		case "$NETAPI_LIBS" in
		    *-lnetapi*)
			;;
		    *)
			NETAPI_LIBS="-lnetapi $NETAPI_LIBS"
			;;
		esac


fi
	if test x"$ac_cv_header_netapi_h" = x"yes" -a x"$ac_cv_lib_ext_netapi_libnetapi_init" = x"yes" -a x"$ac_cv_lib_ext_netapi_NetUserModalsGet" = x"yes" -a x"$ac_cv_lib_ext_netapi_NetUserGetGroups" = x"yes" -a x"$ac_cv_lib_ext_netapi_NetUserGetInfo" = x"yes" -a x"$ac_cv_lib_ext_netapi_NetUserSetInfo" = x"yes";then

$as_echo "#define ENABLE_LIBNETAPI 1" >>confdefs.h


	MAKE_SETTINGS="$MAKE_SETTINGS
NETAPI_ENABLE = YES
"
SMB_INFO_ENABLES="$SMB_INFO_ENABLES
\$enabled{\"NETAPI\"} = \"YES\";"


	MAKE_SETTINGS="$MAKE_SETTINGS
TORTURE_LIBNETAPI_ENABLE = YES
"
SMB_INFO_ENABLES="$SMB_INFO_ENABLES
\$enabled{\"TORTURE_LIBNETAPI\"} = \"YES\";"

	else
		if test x$use_netapi != xauto; then
			as_fn_error "--enable-netapi: libnetapi not found" "$LINENO" 5
		fi
	fi

MAKE_SETTINGS="$MAKE_SETTINGS
NETAPI_LIBS = $NETAPI_LIBS
NETAPI_CFLAGS =
NETAPI_CPPFLAGS =
NETAPI_LDFLAGS =
"


fi



	MAKE_SETTINGS="$MAKE_SETTINGS
gensec_krb5_ENABLE = $HAVE_KRB5
"
SMB_INFO_ENABLES="$SMB_INFO_ENABLES
\$enabled{\"gensec_krb5\"} = \"$HAVE_KRB5\";"


	MAKE_SETTINGS="$MAKE_SETTINGS
gensec_gssapi_ENABLE = $HAVE_KRB5
"
SMB_INFO_ENABLES="$SMB_INFO_ENABLES
\$enabled{\"gensec_gssapi\"} = \"$HAVE_KRB5\";"




	MAKE_SETTINGS="$MAKE_SETTINGS
process_model_thread_ENABLE = NO
"
SMB_INFO_ENABLES="$SMB_INFO_ENABLES
\$enabled{\"process_model_thread\"} = \"NO\";"


#################################################
# check for pthread support
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use pthreads" >&5
$as_echo_n "checking whether to use pthreads... " >&6; }

# Check whether --with-pthreads was given.
if test "${with_pthreads+set}" = set; then :
  withval=$with_pthreads;  case "$withval" in
	yes)
		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
		if test x"$ac_cv_func_pread" != x"yes" -o x"$ac_cv_func_pwrite" != x"yes";then
			as_fn_error "You cannot enable threads when you don't have pread/pwrite!" "$LINENO" 5
		fi

	MAKE_SETTINGS="$MAKE_SETTINGS
process_model_thread_ENABLE = YES
"
SMB_INFO_ENABLES="$SMB_INFO_ENABLES
\$enabled{\"process_model_thread\"} = \"YES\";"


	MAKE_SETTINGS="$MAKE_SETTINGS
PTHREAD_ENABLE = YES
"
SMB_INFO_ENABLES="$SMB_INFO_ENABLES
\$enabled{\"PTHREAD\"} = \"YES\";"

	;;
	*)
		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
	;;
  esac
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }

fi



MAKE_SETTINGS="$MAKE_SETTINGS
PTHREAD_LIBS = -lpthread
PTHREAD_CFLAGS =
PTHREAD_CPPFLAGS =
PTHREAD_LDFLAGS =
"



{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to search for setproctitle support" >&5
$as_echo_n "checking whether to search for setproctitle support... " >&6; }

# Check whether --with-setproctitle was given.
if test "${with_setproctitle+set}" = set; then :
  withval=$with_setproctitle;  case "$withval" in
	yes)
		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
		for ac_header in setproctitle.h
do :
  ac_fn_c_check_header_mongrel "$LINENO" "setproctitle.h" "ac_cv_header_setproctitle_h" "$ac_includes_default"
if test "x$ac_cv_header_setproctitle_h" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_SETPROCTITLE_H 1
_ACEOF

fi

done

		ac_fn_c_check_func "$LINENO" "setproctitle" "ac_cv_func_setproctitle"
if test "x$ac_cv_func_setproctitle" = x""yes; then :

else



ac_check_lib_ext_save_LIBS=$LIBS
LIBS="-lsetproctitle $SETPROCTITLE_LIBS  $LIBS"



        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for setproctitle in -lsetproctitle" >&5
$as_echo_n "checking for setproctitle in -lsetproctitle... " >&6; }
if test "${ac_cv_lib_ext_setproctitle_setproctitle+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char setproctitle ();
int
main ()
{
return setproctitle ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  ac_cv_lib_ext_setproctitle_setproctitle=yes;
		  ac_cv_lib_ext_setproctitle=yes
else
  ac_cv_lib_ext_setproctitle_setproctitle=no;
		  ac_cv_lib_ext_setproctitle=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ext_setproctitle_setproctitle" >&5
$as_echo "$ac_cv_lib_ext_setproctitle_setproctitle" >&6; }
    if test $ac_cv_lib_ext_setproctitle_setproctitle = yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_SETPROCTITLE 1
_ACEOF

fi
LIBS=$ac_check_lib_ext_save_LIBS

if test $ac_cv_lib_ext_setproctitle = yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_LIBSETPROCTITLE 1
_ACEOF

		case "$SETPROCTITLE_LIBS" in
		    *-lsetproctitle*)
			;;
		    *)
			SETPROCTITLE_LIBS="-lsetproctitle $SETPROCTITLE_LIBS"
			;;
		esac


fi

fi

		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use setproctitle" >&5
$as_echo_n "checking whether to use setproctitle... " >&6; }
		if test x"$ac_cv_func_setproctitle" = x"yes" -o \
		   \( x"$ac_cv_header_setproctitle_h" = x"yes" -a \
		    x"$ac_cv_lib_ext_setproctitle_setproctitle" = x"yes" \) ; then
			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }

	MAKE_SETTINGS="$MAKE_SETTINGS
SETPROCTITLE_ENABLE = YES
"
SMB_INFO_ENABLES="$SMB_INFO_ENABLES
\$enabled{\"SETPROCTITLE\"} = \"YES\";"


$as_echo "#define HAVE_SETPROCTITLE 1" >>confdefs.h

		else
			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
		fi
	;;
	*)
		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
	;;
  esac
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }

fi



MAKE_SETTINGS="$MAKE_SETTINGS
SETPROCTITLE_LIBS = ${SETPROCTITLE_LIBS}
SETPROCTITLE_CFLAGS = ${SETPROCTITLE_CFLAGS}
SETPROCTITLE_CPPFLAGS = ${SETPROCTITLE_CPPFLAGS}
SETPROCTITLE_LDFLAGS = ${SETPROCTITLE_LDFLAGS}
"





{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec nanosecond fields in struct stat" >&5
$as_echo_n "checking for tv_nsec nanosecond fields in struct stat... " >&6; }
if test "${ac_cv_have_stat_tv_nsec+set}" = set; then :
  $as_echo_n "(cached) " >&6
else

cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>

int
main ()
{
struct stat st;
 st.st_mtim.tv_nsec;
 st.st_atim.tv_nsec;
 st.st_ctim.tv_nsec;

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  ac_cv_decl_have_stat_tv_nsec=yes
else
  ac_cv_decl_have_stat_tv_nsec=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_stat_tv_nsec" >&5
$as_echo "$ac_cv_have_stat_tv_nsec" >&6; }
if test x"$ac_cv_decl_have_stat_tv_nsec" = x"yes"; then

$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h

fi

for ac_header in blkid/blkid.h
do :
  ac_fn_c_check_header_mongrel "$LINENO" "blkid/blkid.h" "ac_cv_header_blkid_blkid_h" "$ac_includes_default"
if test "x$ac_cv_header_blkid_blkid_h" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_BLKID_BLKID_H 1
_ACEOF

fi

done

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing blkid_get_cache" >&5
$as_echo_n "checking for library containing blkid_get_cache... " >&6; }
if test "${ac_cv_search_ext_blkid_get_cache+set}" = set; then :
  $as_echo_n "(cached) " >&6
else

ac_func_search_ext_save_LIBS=$LIBS
ac_cv_search_ext_blkid_get_cache=no
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char blkid_get_cache ();
int
main ()
{
return blkid_get_cache ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  ac_cv_search_ext_blkid_get_cache="none required"
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
if test "$ac_cv_search_ext_blkid_get_cache" = no; then
  for ac_lib in blkid; do
    LIBS="-l$ac_lib $BLKID_LIBS  $ac_func_search_save_ext_LIBS"
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char blkid_get_cache ();
int
main ()
{
return blkid_get_cache ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  ac_cv_search_ext_blkid_get_cache="-l$ac_lib"
break
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
  done
fi
LIBS=$ac_func_search_ext_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_ext_blkid_get_cache" >&5
$as_echo "$ac_cv_search_ext_blkid_get_cache" >&6; }
if test "$ac_cv_search_ext_blkid_get_cache" != no; then :
  test "$ac_cv_search_ext_blkid_get_cache" = "none required" || BLKID_LIBS="$ac_cv_search_ext_blkid_get_cache $BLKID_LIBS"

fi


    ac_check_func_ext_save_LIBS=$LIBS
    LIBS="$BLKID_LIBS $LIBS"
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for blkid_get_cache" >&5
$as_echo_n "checking for blkid_get_cache... " >&6; }
if test "${ac_cv_func_ext_blkid_get_cache+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
/* Define blkid_get_cache to an innocuous variant, in case <limits.h> declares blkid_get_cache.
   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
#define blkid_get_cache innocuous_blkid_get_cache

/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char blkid_get_cache (); below.
    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
    <limits.h> exists even on freestanding compilers.  */

#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif

#undef blkid_get_cache

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char blkid_get_cache ();
/* 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_blkid_get_cache || defined __stub___blkid_get_cache
choke me
#endif

int
main ()
{
return blkid_get_cache ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  ac_cv_func_ext_blkid_get_cache=yes
else
  ac_cv_func_ext_blkid_get_cache=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_ext_blkid_get_cache" >&5
$as_echo "$ac_cv_func_ext_blkid_get_cache" >&6; }
    LIBS=$ac_check_func_ext_save_LIBS
    if test $ac_cv_func_ext_blkid_get_cache = yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_BLKID_GET_CACHE 1
_ACEOF

fi

MAKE_SETTINGS="$MAKE_SETTINGS
BLKID_LIBS = ${BLKID_LIBS}
BLKID_CFLAGS = ${BLKID_CFLAGS}
BLKID_CPPFLAGS = ${BLKID_CPPFLAGS}
BLKID_LDFLAGS = ${BLKID_LDFLAGS}
"


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

$as_echo "#define HAVE_LIBBLKID 1" >>confdefs.h


	MAKE_SETTINGS="$MAKE_SETTINGS
BLKID_ENABLE = YES
"
SMB_INFO_ENABLES="$SMB_INFO_ENABLES
\$enabled{\"BLKID\"} = \"YES\";"

fi


	MAKE_SETTINGS="$MAKE_SETTINGS
pvfs_aio_ENABLE = NO
"
SMB_INFO_ENABLES="$SMB_INFO_ENABLES
\$enabled{\"pvfs_aio\"} = \"NO\";"

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

	MAKE_SETTINGS="$MAKE_SETTINGS
pvfs_aio_ENABLE = YES
"
SMB_INFO_ENABLES="$SMB_INFO_ENABLES
\$enabled{\"pvfs_aio\"} = \"YES\";"

fi

for ac_func in setgroups
do :
  ac_fn_c_check_func "$LINENO" "setgroups" "ac_cv_func_setgroups"
if test "x$ac_cv_func_setgroups" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_SETGROUPS 1
_ACEOF

fi
done


# Check whether --enable-socket-wrapper was given.
if test "${enable_socket_wrapper+set}" = set; then :
  enableval=$enable_socket_wrapper;
fi


DEFAULT_TEST_OPTIONS=
HAVE_SOCKET_WRAPPER=no

if eval "test x$developer = xyes"; then
	enable_socket_wrapper=yes
fi

if eval "test x$enable_socket_wrapper = xyes"; then

$as_echo "#define SOCKET_WRAPPER 1" >>confdefs.h

	DEFAULT_TEST_OPTIONS=--socket-wrapper
	HAVE_SOCKET_WRAPPER=yes

	# this is only used for samba3
	SOCKET_WRAPPER_OBJS="../lib/socket_wrapper/socket_wrapper.o"
fi





# Check whether --enable-nss-wrapper was given.
if test "${enable_nss_wrapper+set}" = set; then :
  enableval=$enable_nss_wrapper;
fi


HAVE_NSS_WRAPPER=no

if eval "test x$developer = xyes"; then
	enable_nss_wrapper=yes
fi

if eval "test x$enable_nss_wrapper = xyes"; then

$as_echo "#define NSS_WRAPPER 1" >>confdefs.h

	HAVE_NSS_WRAPPER=yes

	# this is only used for samba3
	NSS_WRAPPER_OBJS="../lib/nss_wrapper/nss_wrapper.o"
fi




# Check whether --enable-uid-wrapper was given.
if test "${enable_uid_wrapper+set}" = set; then :
  enableval=$enable_uid_wrapper;
fi


HAVE_UID_WRAPPER=no

if eval "test x$developer = xyes"; then
	enable_uid_wrapper=yes
fi

if eval "test x$enable_uid_wrapper = xyes"; then

$as_echo "#define UID_WRAPPER 1" >>confdefs.h

	HAVE_UID_WRAPPER=yes
fi




###############################
# start SMB_EXT_LIB_PAM
# check for security/pam_appl.h and -lpam
for ac_header in security/pam_appl.h
do :
  ac_fn_c_check_header_mongrel "$LINENO" "security/pam_appl.h" "ac_cv_header_security_pam_appl_h" "$ac_includes_default"
if test "x$ac_cv_header_security_pam_appl_h" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_SECURITY_PAM_APPL_H 1
_ACEOF

fi

done



ac_check_lib_ext_save_LIBS=$LIBS
LIBS="-lpam $PAM_LIBS  $LIBS"



        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pam_start in -lpam" >&5
$as_echo_n "checking for pam_start in -lpam... " >&6; }
if test "${ac_cv_lib_ext_pam_pam_start+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char pam_start ();
int
main ()
{
return pam_start ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  ac_cv_lib_ext_pam_pam_start=yes;
		  ac_cv_lib_ext_pam=yes
else
  ac_cv_lib_ext_pam_pam_start=no;
		  ac_cv_lib_ext_pam=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ext_pam_pam_start" >&5
$as_echo "$ac_cv_lib_ext_pam_pam_start" >&6; }
    if test $ac_cv_lib_ext_pam_pam_start = yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_PAM_START 1
_ACEOF

fi
LIBS=$ac_check_lib_ext_save_LIBS

if test $ac_cv_lib_ext_pam = yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_LIBPAM 1
_ACEOF

		case "$PAM_LIBS" in
		    *-lpam*)
			;;
		    *)
			PAM_LIBS="-lpam $PAM_LIBS"
			;;
		esac


fi
if test x"$ac_cv_header_security_pam_appl_h" = x"yes" -a x"$ac_cv_lib_ext_pam_pam_start" = x"yes";then

	MAKE_SETTINGS="$MAKE_SETTINGS
PAM_ENABLE = YES
"
SMB_INFO_ENABLES="$SMB_INFO_ENABLES
\$enabled{\"PAM\"} = \"YES\";"

fi

MAKE_SETTINGS="$MAKE_SETTINGS
PAM_LIBS = $PAM_LIBS
PAM_CFLAGS =
PAM_CPPFLAGS =
PAM_LDFLAGS =
"


# end SMB_EXT_LIB_PAM
###############################

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


ac_check_lib_ext_save_LIBS=$LIBS
LIBS="-lcrypt $CRYPT_LIBS  $LIBS"



        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for crypt in -lcrypt" >&5
$as_echo_n "checking for crypt in -lcrypt... " >&6; }
if test "${ac_cv_lib_ext_crypt_crypt+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char crypt ();
int
main ()
{
return crypt ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  ac_cv_lib_ext_crypt_crypt=yes;
		  ac_cv_lib_ext_crypt=yes
else
  ac_cv_lib_ext_crypt_crypt=no;
		  ac_cv_lib_ext_crypt=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ext_crypt_crypt" >&5
$as_echo "$ac_cv_lib_ext_crypt_crypt" >&6; }
    if test $ac_cv_lib_ext_crypt_crypt = yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_CRYPT 1
_ACEOF

fi
LIBS=$ac_check_lib_ext_save_LIBS

if test $ac_cv_lib_ext_crypt = yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_LIBCRYPT 1
_ACEOF

		case "$CRYPT_LIBS" in
		    *-lcrypt*)
			;;
		    *)
			CRYPT_LIBS="-lcrypt $CRYPT_LIBS"
			;;
		esac


fi

	MAKE_SETTINGS="$MAKE_SETTINGS
CRYPT_ENABLE = YES
"
SMB_INFO_ENABLES="$SMB_INFO_ENABLES
\$enabled{\"CRYPT\"} = \"YES\";"


MAKE_SETTINGS="$MAKE_SETTINGS
CRYPT_LIBS = $CRYPT_LIBS
CRYPT_CFLAGS =
CRYPT_CPPFLAGS =
CRYPT_LDFLAGS =
"



for ac_func in crypt16 getauthuid getpwanam
do :
  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
eval as_val=\$$as_ac_var
   if test "x$as_val" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF

fi
done


for ac_header in sasl/sasl.h
do :
  ac_fn_c_check_header_mongrel "$LINENO" "sasl/sasl.h" "ac_cv_header_sasl_sasl_h" "$ac_includes_default"
if test "x$ac_cv_header_sasl_sasl_h" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_SASL_SASL_H 1
_ACEOF

fi

done



ac_check_lib_ext_save_LIBS=$LIBS
LIBS="-lsasl2 $SASL_LIBS  $LIBS"



        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sasl_client_init in -lsasl2" >&5
$as_echo_n "checking for sasl_client_init in -lsasl2... " >&6; }
if test "${ac_cv_lib_ext_sasl2_sasl_client_init+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char sasl_client_init ();
int
main ()
{
return sasl_client_init ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  ac_cv_lib_ext_sasl2_sasl_client_init=yes;
		  ac_cv_lib_ext_sasl2=yes
else
  ac_cv_lib_ext_sasl2_sasl_client_init=no;
		  ac_cv_lib_ext_sasl2=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ext_sasl2_sasl_client_init" >&5
$as_echo "$ac_cv_lib_ext_sasl2_sasl_client_init" >&6; }
    if test $ac_cv_lib_ext_sasl2_sasl_client_init = yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_SASL_CLIENT_INIT 1
_ACEOF

fi
LIBS=$ac_check_lib_ext_save_LIBS

if test $ac_cv_lib_ext_sasl2 = yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_LIBSASL2 1
_ACEOF

		case "$SASL_LIBS" in
		    *-lsasl2*)
			;;
		    *)
			SASL_LIBS="-lsasl2 $SASL_LIBS"
			;;
		esac


fi

if test x"$ac_cv_header_sasl_sasl_h" = x"yes" -a x"$ac_cv_lib_ext_sasl2_sasl_client_init" = x"yes";then

	MAKE_SETTINGS="$MAKE_SETTINGS
SASL_ENABLE = YES
"
SMB_INFO_ENABLES="$SMB_INFO_ENABLES
\$enabled{\"SASL\"} = \"YES\";"


	MAKE_SETTINGS="$MAKE_SETTINGS
cyrus_sasl_ENABLE = YES
"
SMB_INFO_ENABLES="$SMB_INFO_ENABLES
\$enabled{\"cyrus_sasl\"} = \"YES\";"

	SASL_CFLAGS="$CFLAGS"
	SASL_CPPFLAGS="$CPPFLAGS"
	SASL_LDFLAGS="$LDFLAGS"

  ac_new_flags=""
  l=""
  for i in $SASL_LDFLAGS; do
    case $l$i in
    -L/usr/lib) ;;
    -L/usr/lib/) ;;
    -L/usr/lib64) ;;
    -L/usr/lib64/) ;;
    -Wl,-rpath,/usr/lib) l="";;
    -Wl,-rpath,/usr/lib/) l="";;
    -Wl,-rpath,/usr/lib64) l="";;
    -Wl,-rpath,/usr/lib64/) l="";;
    -Wl,-rpath) l=$i;;
    -Wl,-rpath-Wl,/usr/lib) l="";;
    -Wl,-rpath-Wl,/usr/lib/) l="";;
    -Wl,-rpath-Wl,/usr/lib64) l="";;
    -Wl,-rpath-Wl,/usr/lib64/) l="";;
    *)
    	s=" "
        if test x"$ac_new_flags" = x""; then
            s="";
	fi
        if test x"$l" = x""; then
            ac_new_flags="$ac_new_flags$s$i";
        else
            ac_new_flags="$ac_new_flags$s$l $i";
        fi
        l=""
        ;;
    esac
  done
  SASL_LDFLAGS=$ac_new_flags


  ac_new_flags=""
  for i in $SASL_CPPFLAGS; do
    case $i in
    -I/usr/include|-I/usr/include/) ;;
    *) ac_new_flags="$ac_new_flags $i" ;;
    esac
  done
  SASL_CPPFLAGS=$ac_new_flags


  ac_new_flags=""
  for i in $SASL_CFLAGS; do
    case $i in
    -I/usr/include|-I/usr/include/) ;;
    *) ac_new_flags="$ac_new_flags $i" ;;
    esac
  done
  SASL_CFLAGS=$ac_new_flags

else

	MAKE_SETTINGS="$MAKE_SETTINGS
cyrus_sasl_ENABLE = NO
"
SMB_INFO_ENABLES="$SMB_INFO_ENABLES
\$enabled{\"cyrus_sasl\"} = \"NO\";"

fi


MAKE_SETTINGS="$MAKE_SETTINGS
SASL_LIBS = $SASL_LIBS
SASL_CFLAGS = ${SASL_CFLAGS}
SASL_CPPFLAGS = ${SASL_CPPFLAGS}
SASL_LDFLAGS = ${SASL_LDFLAGS}
"




	MAKE_SETTINGS="$MAKE_SETTINGS
server_service_kdc_ENABLE = $HAVE_KRB5
"
SMB_INFO_ENABLES="$SMB_INFO_ENABLES
\$enabled{\"server_service_kdc\"} = \"$HAVE_KRB5\";"


for ac_header in linux/inotify.h asm/unistd.h sys/inotify.h
do :
  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
eval as_val=\$$as_ac_Header
   if test "x$as_val" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF

fi

done

ac_fn_c_check_func "$LINENO" "inotify_init" "ac_cv_func_inotify_init"
if test "x$ac_cv_func_inotify_init" = x""yes; then :

fi


 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __NR_inotify_init declaration" >&5
$as_echo_n "checking for __NR_inotify_init declaration... " >&6; }
if test "${ac_cv_have___NR_inotify_init_decl+set}" = set; then :
  $as_echo_n "(cached) " >&6
else

    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <asm/unistd.h>
int
main ()
{
int i = (int)__NR_inotify_init
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  ac_cv_have___NR_inotify_init_decl=yes
else
  ac_cv_have___NR_inotify_init_decl=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have___NR_inotify_init_decl" >&5
$as_echo "$ac_cv_have___NR_inotify_init_decl" >&6; }
 if test x"$ac_cv_have___NR_inotify_init_decl" = x"yes"; then

$as_echo "#define HAVE___NR_INOTIFY_INIT_DECL 1" >>confdefs.h

 fi



	MAKE_SETTINGS="$MAKE_SETTINGS
sys_notify_inotify_ENABLE = NO
"
SMB_INFO_ENABLES="$SMB_INFO_ENABLES
\$enabled{\"sys_notify_inotify\"} = \"NO\";"


if test x"$ac_cv_func_inotify_init" = x"yes" -a x"$ac_cv_header_sys_inotify_h" = x"yes"; then

	MAKE_SETTINGS="$MAKE_SETTINGS
sys_notify_inotify_ENABLE = YES
"
SMB_INFO_ENABLES="$SMB_INFO_ENABLES
\$enabled{\"sys_notify_inotify\"} = \"YES\";"

fi

if test x"$ac_cv_func_inotify_init" = x"yes" -a x"$ac_cv_header_linux_inotify_h" = x"yes"; then

	MAKE_SETTINGS="$MAKE_SETTINGS
sys_notify_inotify_ENABLE = YES
"
SMB_INFO_ENABLES="$SMB_INFO_ENABLES
\$enabled{\"sys_notify_inotify\"} = \"YES\";"

fi

if test x"$ac_cv_header_linux_inotify_h" = x"yes" -a x"$ac_cv_have___NR_inotify_init_decl" = x"yes"; then

	MAKE_SETTINGS="$MAKE_SETTINGS
sys_notify_inotify_ENABLE = YES
"
SMB_INFO_ENABLES="$SMB_INFO_ENABLES
\$enabled{\"sys_notify_inotify\"} = \"YES\";"

fi


 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for F_SETLEASE declaration" >&5
$as_echo_n "checking for F_SETLEASE declaration... " >&6; }
if test "${ac_cv_have_F_SETLEASE_decl+set}" = set; then :
  $as_echo_n "(cached) " >&6
else

    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <fcntl.h>
int
main ()
{
int i = (int)F_SETLEASE
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  ac_cv_have_F_SETLEASE_decl=yes
else
  ac_cv_have_F_SETLEASE_decl=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_F_SETLEASE_decl" >&5
$as_echo "$ac_cv_have_F_SETLEASE_decl" >&6; }
 if test x"$ac_cv_have_F_SETLEASE_decl" = x"yes"; then

$as_echo "#define HAVE_F_SETLEASE_DECL 1" >>confdefs.h

 fi


 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SA_SIGINFO declaration" >&5
$as_echo_n "checking for SA_SIGINFO declaration... " >&6; }
if test "${ac_cv_have_SA_SIGINFO_decl+set}" = set; then :
  $as_echo_n "(cached) " >&6
else

    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <signal.h>
int
main ()
{
int i = (int)SA_SIGINFO
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  ac_cv_have_SA_SIGINFO_decl=yes
else
  ac_cv_have_SA_SIGINFO_decl=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_SA_SIGINFO_decl" >&5
$as_echo "$ac_cv_have_SA_SIGINFO_decl" >&6; }
 if test x"$ac_cv_have_SA_SIGINFO_decl" = x"yes"; then

$as_echo "#define HAVE_SA_SIGINFO_DECL 1" >>confdefs.h

 fi



	MAKE_SETTINGS="$MAKE_SETTINGS
sys_lease_linux_ENABLE = NO
"
SMB_INFO_ENABLES="$SMB_INFO_ENABLES
\$enabled{\"sys_lease_linux\"} = \"NO\";"


if test x"$ac_cv_have_F_SETLEASE_decl" = x"yes" \
	-a x"$ac_cv_have_SA_SIGINFO_decl" = x"yes"; then

	MAKE_SETTINGS="$MAKE_SETTINGS
sys_lease_linux_ENABLE = YES
"
SMB_INFO_ENABLES="$SMB_INFO_ENABLES
\$enabled{\"sys_lease_linux\"} = \"YES\";"

fi

for ac_header in nss.h nss_common.h ns_api.h
do :
  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
eval as_val=\$$as_ac_Header
   if test "x$as_val" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF

fi

done


case "$host_os" in
	*linux*)

MAKE_SETTINGS="$MAKE_SETTINGS
nss_winbind_CFLAGS =
nss_winbind_LDFLAGS =
n1_ENABLE = YES
nss_winbind_OBJ_FILES = ../nsswitch/winbind_nss_linux.o
"

SMB_INFO_LIBRARIES="$SMB_INFO_LIBRARIES
###################################
# Start Library nss_winbind
[LIBRARY::nss_winbind]
PRIVATE_DEPENDENCIES = LIBWINBIND-CLIENT
CFLAGS = \$(nss_winbind_CFLAGS)
LDFLAGS = \$(nss_winbind_LDFLAGS)
ENABLE = YES
# End Library nss_winbind
###################################
"

	;;
	*)
	;;
esac


#################################################
# add *_CFLAGS only for the real build
CFLAGS="${CFLAGS} ${DEVELOPER_CFLAGS}"

#################################################
# final configure stuff

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking configure summary" >&5
$as_echo_n "checking configure summary... " >&6; }
if test "$cross_compiling" = yes; then :
  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot run when cross-compiling" >&5
$as_echo "$as_me: WARNING: cannot run when cross-compiling" >&2;}
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include "${srcdir-.}/../tests/summary.c"
_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
else
  as_fn_error "summary failure. Aborting config" "$LINENO" 5; exit 1;
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext
fi


LIBS=`echo $LIBS | sed -e 's/ *//g'`
if test x"$LIBS" != x""; then
	echo "LIBS: $LIBS"
	{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: the global \$LIBS variable contains some libraries!" >&5
$as_echo "$as_me: WARNING: the global \$LIBS variable contains some libraries!" >&2;}
	{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: this should not happen, please report to samba-technical@lists.samba.org!" >&5
$as_echo "$as_me: WARNING: this should not happen, please report to samba-technical@lists.samba.org!" >&2;}
	as_fn_error "only _EXT macros from aclocal.m4 should be used!" "$LINENO" 5
fi


  ac_new_flags=""
  l=""
  for i in $LDFLAGS; do
    case $l$i in
    -L/usr/lib) ;;
    -L/usr/lib/) ;;
    -L/usr/lib64) ;;
    -L/usr/lib64/) ;;
    -Wl,-rpath,/usr/lib) l="";;
    -Wl,-rpath,/usr/lib/) l="";;
    -Wl,-rpath,/usr/lib64) l="";;
    -Wl,-rpath,/usr/lib64/) l="";;
    -Wl,-rpath) l=$i;;
    -Wl,-rpath-Wl,/usr/lib) l="";;
    -Wl,-rpath-Wl,/usr/lib/) l="";;
    -Wl,-rpath-Wl,/usr/lib64) l="";;
    -Wl,-rpath-Wl,/usr/lib64/) l="";;
    *)
    	s=" "
        if test x"$ac_new_flags" = x""; then
            s="";
	fi
        if test x"$l" = x""; then
            ac_new_flags="$ac_new_flags$s$i";
        else
            ac_new_flags="$ac_new_flags$s$l $i";
        fi
        l=""
        ;;
    esac
  done
  LDFLAGS=$ac_new_flags


  ac_new_flags=""
  l=""
  for i in $LIBS; do
    case $l$i in
    -L/usr/lib) ;;
    -L/usr/lib/) ;;
    -L/usr/lib64) ;;
    -L/usr/lib64/) ;;
    -Wl,-rpath,/usr/lib) l="";;
    -Wl,-rpath,/usr/lib/) l="";;
    -Wl,-rpath,/usr/lib64) l="";;
    -Wl,-rpath,/usr/lib64/) l="";;
    -Wl,-rpath) l=$i;;
    -Wl,-rpath-Wl,/usr/lib) l="";;
    -Wl,-rpath-Wl,/usr/lib/) l="";;
    -Wl,-rpath-Wl,/usr/lib64) l="";;
    -Wl,-rpath-Wl,/usr/lib64/) l="";;
    *)
    	s=" "
        if test x"$ac_new_flags" = x""; then
            s="";
	fi
        if test x"$l" = x""; then
            ac_new_flags="$ac_new_flags$s$i";
        else
            ac_new_flags="$ac_new_flags$s$l $i";
        fi
        l=""
        ;;
    esac
  done
  LIBS=$ac_new_flags



  ac_new_flags=""
  for i in $CFLAGS; do
    case $i in
    -I/usr/include|-I/usr/include/) ;;
    *) ac_new_flags="$ac_new_flags $i" ;;
    esac
  done
  CFLAGS=$ac_new_flags


  ac_new_flags=""
  for i in $CPPFLAGS; do
    case $i in
    -I/usr/include|-I/usr/include/) ;;
    *) ac_new_flags="$ac_new_flags $i" ;;
    esac
  done
  CPPFLAGS=$ac_new_flags




for d in build/smb_build bin include ; do
    test -d ${builddir}/$d || as_dir=${builddir}/$d; as_fn_mkdir_p
done



if test $USESHARED = "true";
then
	INTERN_LDFLAGS="-L\$(shliboutputdir) -L\${builddir}/bin/static"
	INSTALL_LINK_FLAGS="-Wl,-rpath-link,\$(shliboutputdir)";
else
	INTERN_LDFLAGS="-L\${builddir}/bin/static -L\$(shliboutputdir)"
fi

builddir_headers=""

if test "x$ac_abs_srcdir" != "x$ac_abs_builddir"
then
	builddir_headers="-I\$(builddir)/include -I\$(builddir) -I\$(builddir)/lib ";
fi

CPPFLAGS="$builddir_headers-I\$(srcdir)/include -I\$(srcdir) -I\$(srcdir)/lib -I\$(srcdir)/../lib/replace -I\$(srcdir)/../lib/talloc -I\$(srcdir)/.. -D_SAMBA_BUILD_=4 -DHAVE_CONFIG_H $CPPFLAGS"


echo "configure: creating build/smb_build/config.pm"
cat >build/smb_build/config.pm<<CEOF
# config.pm - Autogenerate by configure. DO NOT EDIT!

package config;
require Exporter;
@ISA = qw(Exporter);
@EXPORT_OK = qw(%enabled %config);
use strict;

use vars qw(%enabled %config);

%config = (
CEOF

for ac_var in $ac_subst_vars
do
	eval ac_val=\$$ac_var
	# quote ' (\x27) inside '...' and make sure \ isn't eaten by shells, so use perl:
	QAC_VAL=$ac_val QAC_VAR=$ac_var perl -e '$myval="$ENV{QAC_VAL}"; $myval =~ s/\x27/\\\x27/g ; print $ENV{QAC_VAR}." => \x27$myval\x27,\n"' >> build/smb_build/config.pm
done

cat >>build/smb_build/config.pm<<CEOF
);
$SMB_INFO_ENABLES
1;
CEOF


echo "configure: creating config.mk"
cat >config.mk<<CEOF
# config.mk - Autogenerated by configure, DO NOT EDIT!
$SMB_INFO_EXT_LIBS
$SMB_INFO_SUBSYSTEMS
$SMB_INFO_LIBRARIES
CEOF


ac_config_commands="$ac_config_commands default-1"


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 overridden 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, we kill variables containing newlines.
# 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.
(
  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
    eval ac_val=\$$ac_var
    case $ac_val in #(
    *${as_nl}*)
      case $ac_var in #(
      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
      esac
      case $ac_var in #(
      _ | IFS | as_nl) ;; #(
      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
      *) { eval $ac_var=; unset $ac_var;} ;;
      esac ;;
    esac
  done

  (set) 2>&1 |
    case $as_nl`(ac_space=' '; set) 2>&1` in #(
    *${as_nl}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 "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
      ;;
    esac |
    sort
) |
  sed '
     /^ac_cv_env_/b end
     t clear
     :clear
     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
     t end
     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
     :end' >>confcache
if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
  if test -w "$cache_file"; then
    test "x$cache_file" != "x/dev/null" &&
      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
$as_echo "$as_me: updating cache $cache_file" >&6;}
    cat confcache >$cache_file
  else
    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
  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}'

DEFS=-DHAVE_CONFIG_H

ac_libobjs=
ac_ltlibobjs=
for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
  # 1. Remove the extension, and $U if already installed.
  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
  #    will be set to the directory where LIBOBJS objects are built.
  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
done
LIBOBJS=$ac_libobjs

LTLIBOBJS=$ac_ltlibobjs




		if test x"$define_ldb_modulesdir" = x"yes";then
			LDB_MODULESDIR=`eval eval echo ${modulesdir}/ldb`

cat >>confdefs.h <<_ACEOF
#define LDB_MODULESDIR "${LDB_MODULESDIR}"
_ACEOF

		fi


: ${CONFIG_STATUS=./config.status}
ac_write_fail=0
ac_clean_files_save=$ac_clean_files
ac_clean_files="$ac_clean_files $CONFIG_STATUS"
{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
as_write_fail=0
cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
#! $SHELL
# Generated by $as_me.
# 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
ac_cs_recheck=false
ac_cs_silent=false

SHELL=\${CONFIG_SHELL-$SHELL}
export SHELL
_ASEOF
cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
## -------------------- ##
## M4sh Initialization. ##
## -------------------- ##

# Be more Bourne compatible
DUALCASE=1; export DUALCASE # for MKS sh
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
  emulate sh
  NULLCMD=:
  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
  # is contrary to our usage.  Disable this feature.
  alias -g '${1+"$@"}'='"$@"'
  setopt NO_GLOB_SUBST
else
  case `(set -o) 2>/dev/null` in #(
  *posix*) :
    set -o posix ;; #(
  *) :
     ;;
esac
fi


as_nl='
'
export as_nl
# Printing a long string crashes Solaris 7 /usr/bin/printf.
as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
# Prefer a ksh shell builtin over an external printf program on Solaris,
# but without wasting forks for bash or zsh.
if test -z "$BASH_VERSION$ZSH_VERSION" \
    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
  as_echo='print -r --'
  as_echo_n='print -rn --'
elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
  as_echo='printf %s\n'
  as_echo_n='printf %s'
else
  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
    as_echo_n='/usr/ucb/echo -n'
  else
    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
    as_echo_n_body='eval
      arg=$1;
      case $arg in #(
      *"$as_nl"*)
	expr "X$arg" : "X\\(.*\\)$as_nl";
	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
      esac;
      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
    '
    export as_echo_n_body
    as_echo_n='sh -c $as_echo_n_body as_echo'
  fi
  export as_echo_body
  as_echo='sh -c $as_echo_body as_echo'
fi

# The user is always right.
if test "${PATH_SEPARATOR+set}" != set; then
  PATH_SEPARATOR=:
  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
      PATH_SEPARATOR=';'
  }
fi


# IFS
# We need space, tab and new line, in precisely that order.  Quoting is
# there to prevent editors from complaining about space-tab.
# (If _AS_PATH_WALK were called with IFS unset, it would disable word
# splitting by setting IFS to empty value.)
IFS=" ""	$as_nl"

# Find who we are.  Look in the path if we contain no directory separator.
case $0 in #((
  *[\\/]* ) as_myself=$0 ;;
  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
  done
IFS=$as_save_IFS

     ;;
esac
# We did not find ourselves, most probably we were run as `sh COMMAND'
# in which case we are not to be found in the path.
if test "x$as_myself" = x; then
  as_myself=$0
fi
if test ! -f "$as_myself"; then
  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
  exit 1
fi

# Unset variables that we do not need and which cause bugs (e.g. in
# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
# suppresses any "Segmentation fault" message there.  '((' could
# trigger a bug in pdksh 5.2.14.
for as_var in BASH_ENV ENV MAIL MAILPATH
do eval test x\${$as_var+set} = xset \
  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
done
PS1='$ '
PS2='> '
PS4='+ '

# NLS nuisances.
LC_ALL=C
export LC_ALL
LANGUAGE=C
export LANGUAGE

# CDPATH.
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH


# as_fn_error ERROR [LINENO LOG_FD]
# ---------------------------------
# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
# script with status $?, using 1 if that was 0.
as_fn_error ()
{
  as_status=$?; test $as_status -eq 0 && as_status=1
  if test "$3"; then
    as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
    $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
  fi
  $as_echo "$as_me: error: $1" >&2
  as_fn_exit $as_status
} # as_fn_error


# as_fn_set_status STATUS
# -----------------------
# Set $? to STATUS, without forking.
as_fn_set_status ()
{
  return $1
} # as_fn_set_status

# as_fn_exit STATUS
# -----------------
# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
as_fn_exit ()
{
  set +e
  as_fn_set_status $1
  exit $1
} # as_fn_exit

# as_fn_unset VAR
# ---------------
# Portably unset VAR.
as_fn_unset ()
{
  { eval $1=; unset $1;}
}
as_unset=as_fn_unset
# as_fn_append VAR VALUE
# ----------------------
# Append the text in VALUE to the end of the definition contained in VAR. Take
# advantage of any shell optimizations that allow amortized linear growth over
# repeated appends, instead of the typical quadratic growth present in naive
# implementations.
if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
  eval 'as_fn_append ()
  {
    eval $1+=\$2
  }'
else
  as_fn_append ()
  {
    eval $1=\$$1\$2
  }
fi # as_fn_append

# as_fn_arith ARG...
# ------------------
# Perform arithmetic evaluation on the ARGs, and store the result in the
# global $as_val. Take advantage of shells that can avoid forks. The arguments
# must be portable across $(()) and expr.
if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
  eval 'as_fn_arith ()
  {
    as_val=$(( $* ))
  }'
else
  as_fn_arith ()
  {
    as_val=`expr "$@" || test $? -eq 1`
  }
fi # as_fn_arith


if expr a : '\(a\)' >/dev/null 2>&1 &&
   test "X`expr 00001 : '.*\(...\)'`" = X001; then
  as_expr=expr
else
  as_expr=false
fi

if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
  as_basename=basename
else
  as_basename=false
fi

if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
  as_dirname=dirname
else
  as_dirname=false
fi

as_me=`$as_basename -- "$0" ||
$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
	 X"$0" : 'X\(//\)$' \| \
	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
$as_echo X/"$0" |
    sed '/^.*\/\([^/][^/]*\)\/*$/{
	    s//\1/
	    q
	  }
	  /^X\/\(\/\/\)$/{
	    s//\1/
	    q
	  }
	  /^X\/\(\/\).*/{
	    s//\1/
	    q
	  }
	  s/.*/./; q'`

# 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

ECHO_C= ECHO_N= ECHO_T=
case `echo -n x` in #(((((
-n*)
  case `echo 'xy\c'` in
  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
  xy)  ECHO_C='\c';;
  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
       ECHO_T='	';;
  esac;;
*)
  ECHO_N='-n';;
esac

rm -f conf$$ conf$$.exe conf$$.file
if test -d conf$$.dir; then
  rm -f conf$$.dir/conf$$.file
else
  rm -f conf$$.dir
  mkdir conf$$.dir 2>/dev/null
fi
if (echo >conf$$.file) 2>/dev/null; then
  if ln -s conf$$.file conf$$ 2>/dev/null; then
    as_ln_s='ln -s'
    # ... but there are two gotchas:
    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
    # In both cases, we have to default to `cp -p'.
    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
      as_ln_s='cp -p'
  elif ln conf$$.file conf$$ 2>/dev/null; then
    as_ln_s=ln
  else
    as_ln_s='cp -p'
  fi
else
  as_ln_s='cp -p'
fi
rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
rmdir conf$$.dir 2>/dev/null


# as_fn_mkdir_p
# -------------
# Create "$as_dir" as a directory, including parents if necessary.
as_fn_mkdir_p ()
{

  case $as_dir in #(
  -*) as_dir=./$as_dir;;
  esac
  test -d "$as_dir" || eval $as_mkdir_p || {
    as_dirs=
    while :; do
      case $as_dir in #(
      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
      *) as_qdir=$as_dir;;
      esac
      as_dirs="'$as_qdir' $as_dirs"
      as_dir=`$as_dirname -- "$as_dir" ||
$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
	 X"$as_dir" : 'X\(//\)[^/]' \| \
	 X"$as_dir" : 'X\(//\)$' \| \
	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
$as_echo X"$as_dir" |
    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)[^/].*/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\).*/{
	    s//\1/
	    q
	  }
	  s/.*/./; q'`
      test -d "$as_dir" && break
    done
    test -z "$as_dirs" || eval "mkdir $as_dirs"
  } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"


} # as_fn_mkdir_p
if mkdir -p . 2>/dev/null; then
  as_mkdir_p='mkdir -p "$as_dir"'
else
  test -d ./-p && rmdir ./-p
  as_mkdir_p=false
fi

if test -x / >/dev/null 2>&1; then
  as_test_x='test -x'
else
  if ls -dL / >/dev/null 2>&1; then
    as_ls_L_option=L
  else
    as_ls_L_option=
  fi
  as_test_x='
    eval sh -c '\''
      if test -d "$1"; then
	test -d "$1/.";
      else
	case $1 in #(
	-*)set "./$1";;
	esac;
	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
	???[sx]*):;;*)false;;esac;fi
    '\'' sh
  '
fi
as_executable_p=$as_test_x

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

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


exec 6>&1
## ----------------------------------- ##
## Main body of $CONFIG_STATUS script. ##
## ----------------------------------- ##
_ASEOF
test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1

cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# Save the log message, to keep $0 and so on meaningful, and to
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by samba $as_me 4, which was
generated by GNU Autoconf 2.64.  Invocation command line was

  CONFIG_FILES    = $CONFIG_FILES
  CONFIG_HEADERS  = $CONFIG_HEADERS
  CONFIG_LINKS    = $CONFIG_LINKS
  CONFIG_COMMANDS = $CONFIG_COMMANDS
  $ $0 $@

on `(hostname || uname -n) 2>/dev/null | sed 1q`
"

_ACEOF

case $ac_config_files in *"
"*) set x $ac_config_files; shift; ac_config_files=$*;;
esac

case $ac_config_headers in *"
"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
esac


cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
# Files that config.status was made for.
config_files="$ac_config_files"
config_headers="$ac_config_headers"
config_commands="$ac_config_commands"

_ACEOF

cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
ac_cs_usage="\
\`$as_me' instantiates files and other configuration actions
from templates according to the current configuration.  Unless the files
and actions are specified as TAGs, all are instantiated by default.

Usage: $0 [OPTION]... [TAG]...

  -h, --help       print this help, then exit
  -V, --version    print version number and configuration settings, then exit
  -q, --quiet, --silent
                   do not print progress messages
  -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

Configuration commands:
$config_commands

Report bugs to <samba-technical@samba.org>."

_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_version="\\
samba config.status 4
configured by $0, generated by GNU Autoconf 2.64,
  with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"

Copyright (C) 2009 Free Software Foundation, Inc.
This config.status script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it."

ac_pwd='$ac_pwd'
srcdir='$srcdir'
INSTALL='$INSTALL'
test -n "\$AWK" || AWK=awk
_ACEOF

cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# The default lists apply if the user does not specify any file.
ac_need_defaults=:
while test $# != 0
do
  case $1 in
  --*=*)
    ac_option=`expr "X$1" : 'X\([^=]*\)='`
    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
    ac_shift=:
    ;;
  *)
    ac_option=$1
    ac_optarg=$2
    ac_shift=shift
    ;;
  esac

  case $ac_option in
  # Handling of the options.
  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
    ac_cs_recheck=: ;;
  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
    $as_echo "$ac_cs_version"; exit ;;
  --debug | --debu | --deb | --de | --d | -d )
    debug=: ;;
  --file | --fil | --fi | --f )
    $ac_shift
    case $ac_optarg in
    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
    esac
    as_fn_append CONFIG_FILES " '$ac_optarg'"
    ac_need_defaults=false;;
  --header | --heade | --head | --hea )
    $ac_shift
    case $ac_optarg in
    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
    esac
    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
    ac_need_defaults=false;;
  --he | --h)
    # Conflict between --help and --header
    as_fn_error "ambiguous option: \`$1'
Try \`$0 --help' for more information.";;
  --help | --hel | -h )
    $as_echo "$ac_cs_usage"; exit ;;
  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
  | -silent | --silent | --silen | --sile | --sil | --si | --s)
    ac_cs_silent=: ;;

  # This is an error.
  -*) as_fn_error "unrecognized option: \`$1'
Try \`$0 --help' for more information." ;;

  *) as_fn_append ac_config_targets " $1"
     ac_need_defaults=false ;;

  esac
  shift
done

ac_configure_extra_args=

if $ac_cs_silent; then
  exec 6>/dev/null
  ac_configure_extra_args="$ac_configure_extra_args --silent"
fi

_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
if \$ac_cs_recheck; then
  set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
  shift
  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
  CONFIG_SHELL='$SHELL'
  export CONFIG_SHELL
  exec "\$@"
fi

_ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
exec 5>>config.log
{
  echo
  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
## Running $as_me. ##
_ASBOX
  $as_echo "$ac_log"
} >&5

_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
#
# INIT-COMMANDS
#
libreplacedir=$libreplacedir
libreplacedir=$libreplacedir
libreplacedir=$libreplacedir
libreplacedir=$libreplacedir

srcdir="$srcdir"
builddir="$builddir"
PERL="$PERL"

export PERL
export srcdir
export builddir


_ACEOF

cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1

# Handling of arguments.
for ac_config_target in $ac_config_targets
do
  case $ac_config_target in
    "include/config_tmp.h") CONFIG_HEADERS="$CONFIG_HEADERS include/config_tmp.h" ;;
    "rm-stdint.h") CONFIG_COMMANDS="$CONFIG_COMMANDS rm-stdint.h" ;;
    "mk-stdint.h") CONFIG_COMMANDS="$CONFIG_COMMANDS mk-stdint.h" ;;
    "rm-stdbool.h") CONFIG_COMMANDS="$CONFIG_COMMANDS rm-stdbool.h" ;;
    "mk-stdbool.h") CONFIG_COMMANDS="$CONFIG_COMMANDS mk-stdbool.h" ;;
    "lib/registry/registry.pc") CONFIG_FILES="$CONFIG_FILES lib/registry/registry.pc" ;;
    "librpc/dcerpc.pc") CONFIG_FILES="$CONFIG_FILES librpc/dcerpc.pc" ;;
    "../librpc/ndr.pc") CONFIG_FILES="$CONFIG_FILES ../librpc/ndr.pc" ;;
    "../librpc/ndr_standard.pc") CONFIG_FILES="$CONFIG_FILES ../librpc/ndr_standard.pc" ;;
    "../lib/torture/torture.pc") CONFIG_FILES="$CONFIG_FILES ../lib/torture/torture.pc" ;;
    "auth/gensec/gensec.pc") CONFIG_FILES="$CONFIG_FILES auth/gensec/gensec.pc" ;;
    "param/samba-hostconfig.pc") CONFIG_FILES="$CONFIG_FILES param/samba-hostconfig.pc" ;;
    "librpc/dcerpc_samr.pc") CONFIG_FILES="$CONFIG_FILES librpc/dcerpc_samr.pc" ;;
    "librpc/dcerpc_atsvc.pc") CONFIG_FILES="$CONFIG_FILES librpc/dcerpc_atsvc.pc" ;;
    "lib/ldb/ldb.pc") CONFIG_FILES="$CONFIG_FILES lib/ldb/ldb.pc" ;;
    "default-1") CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;

  *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
  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
  test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
fi

# Have a temporary directory for convenience.  Make it in the build tree
# simply because there is no reason against having it here, and in addition,
# creating and moving files from /tmp can sometimes cause problems.
# Hook for its removal unless debugging.
# Note that there is a small window in which the directory will not be cleaned:
# after its creation but before its name has been assigned to `$tmp'.
$debug ||
{
  tmp=
  trap 'exit_status=$?
  { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
' 0
  trap 'as_fn_exit 1' 1 2 13 15
}
# Create a (secure) tmp directory for tmp files.

{
  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
  test -n "$tmp" && test -d "$tmp"
}  ||
{
  tmp=./conf$$-$RANDOM
  (umask 077 && mkdir "$tmp")
} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5

# Set up the scripts for CONFIG_FILES section.
# No need to generate them if there are no CONFIG_FILES.
# This happens for instance with `./config.status config.h'.
if test -n "$CONFIG_FILES"; then


ac_cr=`echo X | tr X '\015'`
# On cygwin, bash can eat \r inside `` if the user requested igncr.
# But we know of no other shell where ac_cr would be empty at this
# point, so we can use a bashism as a fallback.
if test "x$ac_cr" = x; then
  eval ac_cr=\$\'\\r\'
fi
ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
  ac_cs_awk_cr='\r'
else
  ac_cs_awk_cr=$ac_cr
fi

echo 'BEGIN {' >"$tmp/subs1.awk" &&
_ACEOF


{
  echo "cat >conf$$subs.awk <<_ACEOF" &&
  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
  echo "_ACEOF"
} >conf$$subs.sh ||
  as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
ac_delim='%!_!# '
for ac_last_try in false false false false false :; do
  . ./conf$$subs.sh ||
    as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5

  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
  if test $ac_delim_n = $ac_delim_num; then
    break
  elif $ac_last_try; then
    as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
  else
    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
  fi
done
rm -f conf$$subs.sh

cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
_ACEOF
sed -n '
h
s/^/S["/; s/!.*/"]=/
p
g
s/^[^!]*!//
:repl
t repl
s/'"$ac_delim"'$//
t delim
:nl
h
s/\(.\{148\}\).*/\1/
t more1
s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
p
n
b repl
:more1
s/["\\]/\\&/g; s/^/"/; s/$/"\\/
p
g
s/.\{148\}//
t nl
:delim
h
s/\(.\{148\}\).*/\1/
t more2
s/["\\]/\\&/g; s/^/"/; s/$/"/
p
b
:more2
s/["\\]/\\&/g; s/^/"/; s/$/"\\/
p
g
s/.\{148\}//
t delim
' <conf$$subs.awk | sed '
/^[^""]/{
  N
  s/\n//
}
' >>$CONFIG_STATUS || ac_write_fail=1
rm -f conf$$subs.awk
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
_ACAWK
cat >>"\$tmp/subs1.awk" <<_ACAWK &&
  for (key in S) S_is_set[key] = 1
  FS = ""

}
{
  line = $ 0
  nfields = split(line, field, "@")
  substed = 0
  len = length(field[1])
  for (i = 2; i < nfields; i++) {
    key = field[i]
    keylen = length(key)
    if (S_is_set[key]) {
      value = S[key]
      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
      len += length(value) + length(field[++i])
      substed = 1
    } else
      len += 1 + keylen
  }

  print line
}

_ACAWK
_ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
else
  cat
fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
  || as_fn_error "could not setup config files machinery" "$LINENO" 5
_ACEOF

# 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

cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
fi # test -n "$CONFIG_FILES"

# Set up the scripts for CONFIG_HEADERS section.
# No need to generate them if there are no CONFIG_HEADERS.
# This happens for instance with `./config.status Makefile'.
if test -n "$CONFIG_HEADERS"; then
cat >"$tmp/defines.awk" <<\_ACAWK ||
BEGIN {
_ACEOF

# Transform confdefs.h into an awk script `defines.awk', embedded as
# here-document in config.status, that substitutes the proper values into
# config.h.in to produce config.h.

# Create a delimiter string that does not exist in confdefs.h, to ease
# handling of long lines.
ac_delim='%!_!# '
for ac_last_try in false false :; do
  ac_t=`sed -n "/$ac_delim/p" confdefs.h`
  if test -z "$ac_t"; then
    break
  elif $ac_last_try; then
    as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
  else
    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
  fi
done

# For the awk script, D is an array of macro values keyed by name,
# likewise P contains macro parameters if any.  Preserve backslash
# newline sequences.

ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
sed -n '
s/.\{148\}/&'"$ac_delim"'/g
t rset
:rset
s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
t def
d
:def
s/\\$//
t bsnl
s/["\\]/\\&/g
s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
D["\1"]=" \3"/p
s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
d
:bsnl
s/["\\]/\\&/g
s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
D["\1"]=" \3\\\\\\n"\\/p
t cont
s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
t cont
d
:cont
n
s/.\{148\}/&'"$ac_delim"'/g
t clear
:clear
s/\\$//
t bsnlc
s/["\\]/\\&/g; s/^/"/; s/$/"/p
d
:bsnlc
s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
b cont
' <confdefs.h | sed '
s/'"$ac_delim"'/"\\\
"/g' >>$CONFIG_STATUS || ac_write_fail=1

cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
  for (key in D) D_is_set[key] = 1
  FS = ""
}
/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
  line = \$ 0
  split(line, arg, " ")
  if (arg[1] == "#") {
    defundef = arg[2]
    mac1 = arg[3]
  } else {
    defundef = substr(arg[1], 2)
    mac1 = arg[2]
  }
  split(mac1, mac2, "(") #)
  macro = mac2[1]
  prefix = substr(line, 1, index(line, defundef) - 1)
  if (D_is_set[macro]) {
    # Preserve the white space surrounding the "#".
    print prefix "define", macro P[macro] D[macro]
    next
  } else {
    # Replace #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.
    if (defundef == "undef") {
      print "/*", prefix defundef, macro, "*/"
      next
    }
  }
}
{ print }
_ACAWK
_ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
  as_fn_error "could not setup config headers machinery" "$LINENO" 5
fi # test -n "$CONFIG_HEADERS"


eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS"
shift
for ac_tag
do
  case $ac_tag in
  :[FHLC]) ac_mode=$ac_tag; continue;;
  esac
  case $ac_mode$ac_tag in
  :[FHL]*:*);;
  :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
  :[FH]-) ac_tag=-:-;;
  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
  esac
  ac_save_IFS=$IFS
  IFS=:
  set x $ac_tag
  IFS=$ac_save_IFS
  shift
  ac_file=$1
  shift

  case $ac_mode in
  :L) ac_source=$1;;
  :[FH])
    ac_file_inputs=
    for ac_f
    do
      case $ac_f in
      -) ac_f="$tmp/stdin";;
      *) # Look for the file first in the build tree, then in the source tree
	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
	 # because $ac_f cannot contain `:'.
	 test -f "$ac_f" ||
	   case $ac_f in
	   [\\/$]*) false;;
	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
	   esac ||
	   as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
      esac
      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
      as_fn_append ac_file_inputs " '$ac_f'"
    done

    # 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 by config.status.  */
    configure_input='Generated from '`
	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
	`' by configure.'
    if test x"$ac_file" != x-; then
      configure_input="$ac_file.  $configure_input"
      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
$as_echo "$as_me: creating $ac_file" >&6;}
    fi
    # Neutralize special characters interpreted by sed in replacement strings.
    case $configure_input in #(
    *\&* | *\|* | *\\* )
       ac_sed_conf_input=`$as_echo "$configure_input" |
       sed 's/[\\\\&|]/\\\\&/g'`;; #(
    *) ac_sed_conf_input=$configure_input;;
    esac

    case $ac_tag in
    *:-:* | *:-) cat >"$tmp/stdin" \
      || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
    esac
    ;;
  esac

  ac_dir=`$as_dirname -- "$ac_file" ||
$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
	 X"$ac_file" : 'X\(//\)[^/]' \| \
	 X"$ac_file" : 'X\(//\)$' \| \
	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
$as_echo X"$ac_file" |
    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)[^/].*/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\).*/{
	    s//\1/
	    q
	  }
	  s/.*/./; q'`
  as_dir="$ac_dir"; as_fn_mkdir_p
  ac_builddir=.

case "$ac_dir" in
.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
*)
  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
  # A ".." for each directory in $ac_dir_suffix.
  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
  case $ac_top_builddir_sub in
  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
  esac ;;
esac
ac_abs_top_builddir=$ac_pwd
ac_abs_builddir=$ac_pwd$ac_dir_suffix
# for backward compatibility:
ac_top_builddir=$ac_top_build_prefix

case $srcdir in
  .)  # We are building in place.
    ac_srcdir=.
    ac_top_srcdir=$ac_top_builddir_sub
    ac_abs_top_srcdir=$ac_pwd ;;
  [\\/]* | ?:[\\/]* )  # Absolute name.
    ac_srcdir=$srcdir$ac_dir_suffix;
    ac_top_srcdir=$srcdir
    ac_abs_top_srcdir=$srcdir ;;
  *) # Relative name.
    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
    ac_top_srcdir=$ac_top_build_prefix$srcdir
    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
esac
ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix


  case $ac_mode in
  :F)
  #
  # CONFIG_FILE
  #

  case $INSTALL in
  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
  *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
  esac
_ACEOF

cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# If the template does not know about datarootdir, expand it.
# FIXME: This hack should be removed a few years after 2.60.
ac_datarootdir_hack=; ac_datarootdir_seen=
ac_sed_dataroot='
/datarootdir/ {
  p
  q
}
/@datadir@/p
/@docdir@/p
/@infodir@/p
/@localedir@/p
/@mandir@/p'
case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
*datarootdir*) ac_datarootdir_seen=yes;;
*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
  ac_datarootdir_hack='
  s&@datadir@&$datadir&g
  s&@docdir@&$docdir&g
  s&@infodir@&$infodir&g
  s&@localedir@&$localedir&g
  s&@mandir@&$mandir&g
  s&\\\${datarootdir}&$datarootdir&g' ;;
esac
_ACEOF

# Neutralize VPATH when `$srcdir' = `.'.
# Shell code in configure.ac might set extrasub.
# FIXME: do we really want to maintain this feature?
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_sed_extra="$ac_vpsub
$extrasub
_ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
:t
/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
s|@configure_input@|$ac_sed_conf_input|;t t
s&@top_builddir@&$ac_top_builddir_sub&;t t
s&@top_build_prefix@&$ac_top_build_prefix&;t t
s&@srcdir@&$ac_srcdir&;t t
s&@abs_srcdir@&$ac_abs_srcdir&;t t
s&@top_srcdir@&$ac_top_srcdir&;t t
s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
s&@builddir@&$ac_builddir&;t t
s&@abs_builddir@&$ac_abs_builddir&;t t
s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
s&@INSTALL@&$ac_INSTALL&;t t
$ac_datarootdir_hack
"
eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
  || as_fn_error "could not create $ac_file" "$LINENO" 5

test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
  { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
which seems to be undefined.  Please make sure it is defined." >&5
$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
which seems to be undefined.  Please make sure it is defined." >&2;}

  rm -f "$tmp/stdin"
  case $ac_file in
  -) cat "$tmp/out" && rm -f "$tmp/out";;
  *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
  esac \
  || as_fn_error "could not create $ac_file" "$LINENO" 5
 ;;
  :H)
  #
  # CONFIG_HEADER
  #
  if test x"$ac_file" != x-; then
    {
      $as_echo "/* $configure_input  */" \
      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
    } >"$tmp/config.h" \
      || as_fn_error "could not create $ac_file" "$LINENO" 5
    if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
$as_echo "$as_me: $ac_file is unchanged" >&6;}
    else
      rm -f "$ac_file"
      mv "$tmp/config.h" "$ac_file" \
	|| as_fn_error "could not create $ac_file" "$LINENO" 5
    fi
  else
    $as_echo "/* $configure_input  */" \
      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
      || as_fn_error "could not create -" "$LINENO" 5
  fi
 ;;

  :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
$as_echo "$as_me: executing $ac_file commands" >&6;}
 ;;
  esac


  case $ac_file$ac_mode in
    "rm-stdint.h":C) rm -f $libreplacedir/stdint.h ;;
    "mk-stdint.h":C) echo "#include \"replace.h\"" > $libreplacedir/stdint.h ;;
    "rm-stdbool.h":C) rm -f $libreplacedir/stdbool.h ;;
    "mk-stdbool.h":C) echo "#include \"replace.h\"" > $libreplacedir/stdbool.h ;;
    "default-1":C)
test "x$ac_abs_srcdir" != "x$ac_abs_builddir" && (
	cd $builddir;
	# NOTE: We *must* use -R so we don't follow symlinks (at least on BSD
	# systems).
	test -d heimdal || cp -R $srcdir/heimdal $builddir/
	test -d heimdal_build || cp -R $srcdir/heimdal_build $builddir/
	test -d build || builddir="$builddir" \
			srcdir="$srcdir" \
			$PERL ${srcdir}/script/buildtree.pl
 )

$PERL -I${builddir} -I${builddir}/build \
    -I${srcdir} -I${srcdir}/build \
    ${srcdir}/build/smb_build/main.pl --output=data.mk main.mk || exit $?
 ;;

  esac
done # for ac_tag


as_fn_exit 0
_ACEOF
ac_clean_files=$ac_clean_files_save

test $ac_write_fail = 0 ||
  as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5


# 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=:
  ac_config_status_args=
  test "$silent" = yes &&
    ac_config_status_args="$ac_config_status_args --quiet"
  exec 5>/dev/null
  $SHELL $CONFIG_STATUS $ac_config_status_args || 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 || as_fn_exit $?
fi
if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
fi


cmp include/config_tmp.h include/config.h >/dev/null 2>&1
CMP_RET=$?
if test $CMP_RET != 0; then
	cp include/config_tmp.h include/config.h
fi


echo "configure: creating mkconfig.mk"
cat >mkconfig.mk<<CEOF
# mkconfig.mk - Autogenerated by configure, DO NOT EDIT!
$MAKE_SETTINGS
CEOF
skip_vars="  "
for ac_var in $ac_subst_vars
do
    eval ac_val=\$$ac_var
	if echo "$skip_vars" | grep -v " $ac_var " >/dev/null 2>/dev/null; then
		echo "$ac_var = $ac_val" >> mkconfig.mk
	fi
done


if test $USESHARED = true
then
	echo "To run binaries without installing, set the following environment variable:"
	echo "$LIB_PATH_VAR=$builddir/bin/shared"
fi

echo
echo "To build Samba, run $MAKE"
