[Pkg-samba-maint] r3223 - trunk/samba/debian/patches

bubulle at alioth.debian.org bubulle at alioth.debian.org
Tue Jan 12 21:38:43 UTC 2010


Author: bubulle
Date: 2010-01-12 21:38:33 +0000 (Tue, 12 Jan 2010)
New Revision: 3223

Modified:
   trunk/samba/debian/patches/autoconf.patch
Log:
Update for 3.4.4


Modified: trunk/samba/debian/patches/autoconf.patch
===================================================================
--- trunk/samba/debian/patches/autoconf.patch	2010-01-12 21:38:16 UTC (rev 3222)
+++ trunk/samba/debian/patches/autoconf.patch	2010-01-12 21:38:33 UTC (rev 3223)
@@ -25,23 +25,25 @@
  quilt refresh
  find . -name '*.rej' | xargs rm
 
-Index: b/source3/configure
+Index: samba/source3/configure
 ===================================================================
---- a/source3/configure	2009-11-08 15:54:25.000000000 +0100
-+++ b/source3/configure	2009-11-08 15:55:39.000000000 +0100
-@@ -1,20 +1,22 @@
+--- samba.orig/source3/configure
++++ samba/source3/configure
+@@ -1,20 +1,24 @@
  #! /bin/sh
  # Guess values for system-dependent variables and create Makefiles.
 -# Generated by GNU Autoconf 2.63 for Samba 3.
-+# Generated by GNU Autoconf 2.64 for Samba 3.
++# Generated by GNU Autoconf 2.65 for Samba 3.
  #
  # Report bugs to <samba-technical at samba.org>.
  #
++#
  # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
 -# 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
-+# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software
-+# Foundation, Inc.
++# 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.
 -## --------------------- ##
@@ -58,7 +60,7 @@
    emulate sh
    NULLCMD=:
    # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
-@@ -22,23 +24,15 @@
+@@ -22,23 +26,15 @@
    alias -g '${1+"$@"}'='"$@"'
    setopt NO_GLOB_SUBST
  else
@@ -87,7 +89,7 @@
  as_nl='
  '
  export as_nl
-@@ -46,7 +40,13 @@
+@@ -46,7 +42,13 @@
  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
@@ -102,7 +104,7 @@
    as_echo='printf %s\n'
    as_echo_n='printf %s'
  else
-@@ -57,7 +57,7 @@
+@@ -57,7 +59,7 @@
      as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
      as_echo_n_body='eval
        arg=$1;
@@ -111,7 +113,7 @@
        *"$as_nl"*)
  	expr "X$arg" : "X\\(.*\\)$as_nl";
  	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
-@@ -80,13 +80,6 @@
+@@ -80,13 +82,6 @@
    }
  fi
  
@@ -125,7 +127,7 @@
  
  # IFS
  # We need space, tab and new line, in precisely that order.  Quoting is
-@@ -96,15 +89,15 @@
+@@ -96,15 +91,15 @@
  IFS=" ""	$as_nl"
  
  # Find who we are.  Look in the path if we contain no directory separator.
@@ -144,7 +146,7 @@
  IFS=$as_save_IFS
  
       ;;
-@@ -116,12 +109,16 @@
+@@ -116,12 +111,16 @@
  fi
  if test ! -f "$as_myself"; then
    $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
@@ -165,7 +167,7 @@
  done
  PS1='$ '
  PS2='> '
-@@ -133,330 +130,300 @@
+@@ -133,330 +132,300 @@
  LANGUAGE=C
  export LANGUAGE
  
@@ -742,7 +744,7 @@
    sed -n '
      p
      /[$]LINENO/=
-@@ -473,8 +440,7 @@
+@@ -473,8 +442,7 @@
        s/-\n.*//
      ' >$as_me.lineno &&
    chmod +x "$as_me.lineno" ||
@@ -752,7 +754,7 @@
  
    # 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
-@@ -484,29 +450,18 @@
+@@ -484,29 +452,18 @@
    exit
  }
  
@@ -787,7 +789,7 @@
  
  rm -f conf$$ conf$$.exe conf$$.file
  if test -d conf$$.dir; then
-@@ -536,7 +491,7 @@
+@@ -536,7 +493,7 @@
  rmdir conf$$.dir 2>/dev/null
  
  if mkdir -p . 2>/dev/null; then
@@ -796,7 +798,7 @@
  else
    test -d ./-p && rmdir ./-p
    as_mkdir_p=false
-@@ -555,10 +510,10 @@
+@@ -555,10 +512,10 @@
        if test -d "$1"; then
  	test -d "$1/.";
        else
@@ -809,15 +811,18 @@
  	???[sx]*):;;*)false;;esac;fi
      '\'' sh
    '
-@@ -572,7 +527,6 @@
+@@ -572,8 +529,8 @@
  as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
  
  
 -
- exec 7<&0 </dev/null 6>&1
+-exec 7<&0 </dev/null 6>&1
++test -n "$DJDIR" || exec 7<&0 </dev/null
++exec 6>&1
  
  # Name of the host.
-@@ -591,7 +545,6 @@
+ # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
+@@ -591,7 +548,6 @@
  subdirs=
  MFLAGS=
  MAKEFLAGS=
@@ -825,7 +830,7 @@
  
  # Identity of this package.
  PACKAGE_NAME='Samba'
-@@ -599,6 +552,7 @@
+@@ -599,6 +555,7 @@
  PACKAGE_VERSION='3'
  PACKAGE_STRING='Samba 3'
  PACKAGE_BUGREPORT='samba-technical at samba.org'
@@ -833,7 +838,7 @@
  
  ac_unique_file="include/includes.h"
  ac_default_prefix=/usr/local/samba
-@@ -945,6 +899,7 @@
+@@ -945,6 +902,7 @@
  program_transform_name
  prefix
  exec_prefix
@@ -841,7 +846,7 @@
  PACKAGE_BUGREPORT
  PACKAGE_STRING
  PACKAGE_VERSION
-@@ -1164,8 +1119,7 @@
+@@ -1164,8 +1122,7 @@
      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 &&
@@ -851,7 +856,7 @@
      ac_useropt_orig=$ac_useropt
      ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
      case $ac_user_opts in
-@@ -1191,8 +1145,7 @@
+@@ -1191,8 +1148,7 @@
      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 &&
@@ -861,7 +866,7 @@
      ac_useropt_orig=$ac_useropt
      ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
      case $ac_user_opts in
-@@ -1396,8 +1349,7 @@
+@@ -1396,8 +1352,7 @@
      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 &&
@@ -871,7 +876,7 @@
      ac_useropt_orig=$ac_useropt
      ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
      case $ac_user_opts in
-@@ -1413,8 +1365,7 @@
+@@ -1413,8 +1368,7 @@
      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 &&
@@ -881,7 +886,7 @@
      ac_useropt_orig=$ac_useropt
      ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
      case $ac_user_opts in
-@@ -1444,17 +1395,17 @@
+@@ -1444,17 +1398,17 @@
    | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
      x_libraries=$ac_optarg ;;
  
@@ -905,7 +910,7 @@
      eval $ac_envvar=\$ac_optarg
      export $ac_envvar ;;
  
-@@ -1471,15 +1422,13 @@
+@@ -1471,15 +1425,13 @@
  
  if test -n "$ac_prev"; then
    ac_option=--`echo $ac_prev | sed 's/_/-/g'`
@@ -923,7 +928,7 @@
      *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
    esac
  fi
-@@ -1502,8 +1451,7 @@
+@@ -1502,8 +1454,7 @@
      [\\/$]* | ?:[\\/]* )  continue;;
      NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
    esac
@@ -933,7 +938,7 @@
  done
  
  # There might be people who depend on the old broken behavior: `$host'
-@@ -1533,11 +1481,9 @@
+@@ -1533,11 +1484,9 @@
  ac_pwd=`pwd` && test -n "$ac_pwd" &&
  ac_ls_di=`ls -di .` &&
  ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
@@ -947,7 +952,7 @@
  
  
  # Find the source files, if location was not specified.
-@@ -1576,13 +1522,11 @@
+@@ -1576,13 +1525,11 @@
  fi
  if test ! -r "$srcdir/$ac_unique_file"; then
    test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
@@ -963,12 +968,21 @@
  	pwd)`
  # When building in place, set srcdir=.
  if test "$ac_abs_confdir" = "$ac_pwd"; then
-@@ -1904,181 +1848,866 @@
+@@ -1820,7 +1767,7 @@
+   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
++  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
+               you have headers in a nonstandard directory <include dir>
+   CPP         C preprocessor
+   PKG_CONFIG  path to pkg-config utility
+@@ -1904,178 +1851,863 @@
  if $ac_init_version; then
    cat <<\_ACEOF
  Samba configure 3
 -generated by GNU Autoconf 2.63
-+generated by GNU Autoconf 2.64
++generated by GNU Autoconf 2.65
  
 -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
 -2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
@@ -1023,7 +1037,7 @@
 +	ac_retval=1
 +fi
 +  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
-+  return $ac_retval
++  as_fn_set_status $ac_retval
  
 -_ACEOF
 -exec 5>>config.log
@@ -1071,7 +1085,7 @@
 +    ac_retval=1
 +fi
 +  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
-+  return $ac_retval
++  as_fn_set_status $ac_retval
  
 -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
 -/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
@@ -1226,7 +1240,7 @@
 +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
++  as_fn_set_status $ac_retval
  
 -## ----------- ##
 -## Core tests. ##
@@ -1362,7 +1376,7 @@
 +  # 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
++  as_fn_set_status $ac_retval
  
 -    cat <<\_ASBOX
 -## ---------------- ##
@@ -1413,9 +1427,6 @@
 -    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'\''"
 +# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
 +# -------------------------------------------
 +# Tests whether TYPE exists after having included INCLUDES, setting cache
@@ -1644,7 +1655,7 @@
 +
 +  fi
 +  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
-+  return $ac_retval
++  as_fn_set_status $ac_retval
 +
 +} # ac_fn_c_compute_int
 +
@@ -1815,7 +1826,7 @@
 +running configure, to aid debugging if configure makes a mistake.
 +
 +It was created by Samba $as_me 3, which was
-+generated by GNU Autoconf 2.64.  Invocation command line was
++generated by GNU Autoconf 2.65.  Invocation command line was
 +
 +  $ $0 $@
 +
@@ -1973,13 +1984,10 @@
 +    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
- 
-@@ -2119,39 +2748,41 @@
+       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+       esac
+       $as_echo "$ac_var='\''$ac_val'\''"
+@@ -2119,39 +2751,41 @@
      exit $exit_status
  ' 0
  for ac_signal in 1 2 13 15; do
@@ -2026,25 +2034,33 @@
  
  # Let the site file select an alternate cache file if it wants to.
  # Prefer an explicitly selected file to automatically selected ones.
-@@ -2170,7 +2801,7 @@
+@@ -2169,8 +2803,8 @@
+ 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
+-  if test -r "$ac_site_file"; then
 -    { $as_echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
++  if test /dev/null != "$ac_site_file" && 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"
-@@ -2181,7 +2812,7 @@
-   # Some versions of bash will fail to source /dev/null (special
-   # files actually), so we avoid doing that.
-   if test -f "$cache_file"; then
+@@ -2178,10 +2812,10 @@
+ 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:$LINENO: loading cache $cache_file" >&5
++  # Some versions of bash will fail to source /dev/null (special files
++  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
++  if test /dev/null != "$cache_file" && 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";;
-@@ -2189,7 +2820,7 @@
+@@ -2189,7 +2823,7 @@
      esac
    fi
  else
@@ -2053,7 +2069,7 @@
  $as_echo "$as_me: creating cache $cache_file" >&6;}
    >$cache_file
  fi
-@@ -2204,11 +2835,11 @@
+@@ -2204,11 +2838,11 @@
    eval ac_new_val=\$ac_env_${ac_var}_value
    case $ac_old_set,$ac_new_set in
      set,)
@@ -2067,7 +2083,7 @@
  $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
        ac_cache_corrupted=: ;;
      ,);;
-@@ -2218,17 +2849,17 @@
+@@ -2218,17 +2852,17 @@
  	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
@@ -2089,7 +2105,7 @@
  $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
        fi;;
    esac
-@@ -2240,43 +2871,20 @@
+@@ -2240,43 +2874,20 @@
      esac
      case " $ac_configure_args " in
        *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
@@ -2140,7 +2156,7 @@
  
  ac_ext=c
  ac_cpp='$CPP $CPPFLAGS'
-@@ -2290,14 +2898,12 @@
+@@ -2290,14 +2901,12 @@
  ac_config_headers="$ac_config_headers include/config.h"
  
  
@@ -2157,7 +2173,7 @@
  $as_echo "$as_me: WARNING: \$PATH contains /usr/ucb - build errors may follow" >&2;}
  	;;
  esac
-@@ -2329,24 +2935,16 @@
+@@ -2329,24 +2938,16 @@
  
  ac_aux_dir=
  for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
@@ -2190,7 +2206,7 @@
  fi
  
  # These three variables are undocumented and unsupported,
-@@ -2358,57 +2956,29 @@
+@@ -2358,57 +2959,29 @@
  ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
  
  
@@ -2255,7 +2271,7 @@
  esac
  build=$ac_cv_build
  ac_save_IFS=$IFS; IFS='-'
-@@ -2424,28 +2994,24 @@
+@@ -2424,28 +2997,24 @@
  case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
  
  
@@ -2289,7 +2305,7 @@
  esac
  host=$ac_cv_host
  ac_save_IFS=$IFS; IFS='-'
-@@ -2461,28 +3027,24 @@
+@@ -2461,28 +3030,24 @@
  case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
  
  
@@ -2323,7 +2339,7 @@
  esac
  target=$ac_cv_target
  ac_save_IFS=$IFS; IFS='-'
-@@ -2505,6 +3067,27 @@
+@@ -2505,6 +3070,27 @@
      NONENONEs,x,x, &&
    program_prefix=${target_alias}-
  
@@ -2351,7 +2367,7 @@
  echo "LIBREPLACE_LOCATION_CHECKS: END"
  
  
-@@ -2533,7 +3116,7 @@
+@@ -2533,7 +3119,7 @@
  
  
  # Check whether --with-fhs was given.
@@ -2360,7 +2376,7 @@
    withval=$with_fhs;  case "$withval" in
    yes)
      lockdir="\${VARDIR}/lib/samba"
-@@ -2550,9 +3133,7 @@
+@@ -2550,9 +3136,7 @@
      cachedir="\${VARDIR}/lib/samba"
      ncalrpcdir="\${VARDIR}/ncalrpc"
  
@@ -2371,7 +2387,7 @@
  
      ;;
    esac
-@@ -2563,13 +3144,13 @@
+@@ -2563,13 +3147,13 @@
  # set private directory location
  
  # Check whether --with-privatedir was given.
@@ -2387,7 +2403,7 @@
  $as_echo "$as_me: WARNING: --with-privatedir called without argument - will use default" >&2;}
    ;;
    * )
-@@ -2583,13 +3164,13 @@
+@@ -2583,13 +3167,13 @@
  # set root sbin directory location
  
  # Check whether --with-rootsbindir was given.
@@ -2403,7 +2419,7 @@
  $as_echo "$as_me: WARNING: --with-rootsbindir called without argument - will use default" >&2;}
    ;;
    * )
-@@ -2603,13 +3184,13 @@
+@@ -2603,13 +3187,13 @@
  # set lock directory location
  
  # Check whether --with-lockdir was given.
@@ -2419,7 +2435,7 @@
  $as_echo "$as_me: WARNING: --with-lockdir called without argument - will use default" >&2;}
    ;;
    * )
-@@ -2623,13 +3204,13 @@
+@@ -2623,13 +3207,13 @@
  # set state directory location
  
  # Check whether --with-statedir was given.
@@ -2435,7 +2451,7 @@
  $as_echo "$as_me: WARNING: --with-statedir called without argument - will use default" >&2;}
    ;;
    * )
-@@ -2643,13 +3224,13 @@
+@@ -2643,13 +3227,13 @@
  # set cache directory location
  
  # Check whether --with-cachedir was given.
@@ -2451,7 +2467,7 @@
  $as_echo "$as_me: WARNING: --with-cachedir called without argument - will use default" >&2;}
    ;;
    * )
-@@ -2663,13 +3244,13 @@
+@@ -2663,13 +3247,13 @@
  # set pid directory location
  
  # Check whether --with-piddir was given.
@@ -2467,7 +2483,7 @@
  $as_echo "$as_me: WARNING: --with-piddir called without argument - will use default" >&2;}
    ;;
    * )
-@@ -2683,13 +3264,13 @@
+@@ -2683,13 +3267,13 @@
  # set ncalrpc directory location
  
  # Check whether --with-ncalprcdir was given.
@@ -2483,7 +2499,7 @@
  $as_echo "$as_me: WARNING: --with-ncalrpcdir called without argument - will use default" >&2;}
    ;;
    * )
-@@ -2703,13 +3284,13 @@
+@@ -2703,13 +3287,13 @@
  # set SWAT directory location
  
  # Check whether --with-swatdir was given.
@@ -2499,7 +2515,7 @@
  $as_echo "$as_me: WARNING: --with-swatdir called without argument - will use default" >&2;}
    ;;
    * )
-@@ -2723,13 +3304,13 @@
+@@ -2723,13 +3307,13 @@
  # set configuration directory location
  
  # Check whether --with-configdir was given.
@@ -2515,7 +2531,7 @@
  $as_echo "$as_me: WARNING: --with-configdir called without argument - will use default" >&2;}
    ;;
    * )
-@@ -2743,13 +3324,13 @@
+@@ -2743,13 +3327,13 @@
  # set log directory location
  
  # Check whether --with-logfilebase was given.
@@ -2531,7 +2547,7 @@
  $as_echo "$as_me: WARNING: --with-logfilebase called without argument - will use default" >&2;}
    ;;
    * )
-@@ -2764,13 +3345,13 @@
+@@ -2764,13 +3348,13 @@
  # set shared modules (internal lib) directory location
  
  # Check whether --with-modulesdir was given.
@@ -2547,7 +2563,7 @@
  $as_echo "$as_me: WARNING: --with-modulesdir without argument - will use default" >&2;}
    ;;
    * )
-@@ -2784,13 +3365,13 @@
+@@ -2784,13 +3368,13 @@
  # set PAM modules directory location
  
  # Check whether --with-pammodulesdir was given.
@@ -2563,7 +2579,7 @@
  $as_echo "$as_me: WARNING: --with-pammodulesdir called without argument - will use default" >&2;}
    ;;
    * )
-@@ -2804,13 +3385,13 @@
+@@ -2804,13 +3388,13 @@
  # set man directory location
  
  # Check whether --with-mandir was given.
@@ -2579,7 +2595,7 @@
  $as_echo "$as_me: WARNING: --with-mandir without argument - will use default" >&2;}
    ;;
    * )
-@@ -2824,13 +3405,13 @@
+@@ -2824,13 +3408,13 @@
  # set locale directory location
  
  # Check whether --with-localedir was given.
@@ -2595,7 +2611,7 @@
  $as_echo "$as_me: WARNING: --with-localedir called without argument - will use default" >&2;}
    ;;
    *)
-@@ -2864,10 +3445,10 @@
+@@ -2864,10 +3448,10 @@
  
  
  # Check whether --with-selftest-prefix was given.
@@ -2608,7 +2624,7 @@
  $as_echo "$as_me: WARNING: --with-selftest-prefix called without argument - will use default" >&2;}
    ;;
    * )
-@@ -2884,10 +3465,10 @@
+@@ -2884,10 +3468,10 @@
  
  
  # Check whether --with-selftest-shrdir was given.
@@ -2621,7 +2637,7 @@
  $as_echo "$as_me: WARNING: --with-selftest-shrdir called without argument - will use default" >&2;}
    ;;
    * )
-@@ -2906,19 +3487,15 @@
+@@ -2906,19 +3490,15 @@
  
  
  # Check whether --with-smbtorture4_path was given.
@@ -2644,7 +2660,7 @@
      fi
      smbtorture4_option="-t $withval"
    ;;
-@@ -2933,19 +3510,15 @@
+@@ -2933,19 +3513,15 @@
  
  
  # Check whether --with-selftest_custom_conf was given.
@@ -2667,7 +2683,7 @@
      fi
      selftest_custom_conf="-c $withval"
    ;;
-@@ -2958,7 +3531,7 @@
+@@ -2958,7 +3534,7 @@
  ## so that we don't mix -O and -g
  debug=no
  # Check whether --enable-debug was given.
@@ -2676,7 +2692,7 @@
    enableval=$enable_debug; if eval "test x$enable_debug = xyes"; then
  	debug=yes
      fi
-@@ -2968,7 +3541,7 @@
+@@ -2968,7 +3544,7 @@
  
  developer=no
  # Check whether --enable-developer was given.
@@ -2685,7 +2701,7 @@
    enableval=$enable_developer; if eval "test x$enable_developer = xyes"; then
          debug=yes
          developer=yes
-@@ -2978,7 +3551,7 @@
+@@ -2978,7 +3554,7 @@
  
  krb5developer=no
  # Check whether --enable-krb5developer was given.
@@ -2694,7 +2710,7 @@
    enableval=$enable_krb5developer; if eval "test x$enable_krb5developer = xyes"; then
          debug=yes
          developer=yes
-@@ -2989,7 +3562,7 @@
+@@ -2989,7 +3565,7 @@
  
  picky_developer=no
  # Check whether --enable-picky-developer was given.
@@ -2703,7 +2719,7 @@
    enableval=$enable_picky_developer; if eval "test x$enable_picky_developer = xyes"; then
          debug=yes
          developer=yes
-@@ -3000,7 +3573,7 @@
+@@ -3000,7 +3576,7 @@
  
  
  # Check whether --with-cfenc was given.
@@ -2712,7 +2728,7 @@
    withval=$with_cfenc;
  # May be in source $withval/CoreFoundation/StringEncodings.subproj.
  # Should have been in framework $withval/CoreFoundation.framework/Headers.
-@@ -3097,9 +3670,9 @@
+@@ -3097,9 +3673,9 @@
  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
@@ -2724,7 +2740,7 @@
    $as_echo_n "(cached) " >&6
  else
    if test -n "$CC"; then
-@@ -3110,24 +3683,24 @@
+@@ -3110,24 +3686,24 @@
  do
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
@@ -2754,7 +2770,7 @@
  $as_echo "no" >&6; }
  fi
  
-@@ -3137,9 +3710,9 @@
+@@ -3137,9 +3713,9 @@
    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
@@ -2766,7 +2782,7 @@
    $as_echo_n "(cached) " >&6
  else
    if test -n "$ac_ct_CC"; then
-@@ -3150,24 +3723,24 @@
+@@ -3150,24 +3726,24 @@
  do
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
@@ -2796,7 +2812,7 @@
  $as_echo "no" >&6; }
  fi
  
-@@ -3176,7 +3749,7 @@
+@@ -3176,7 +3752,7 @@
    else
      case $cross_compiling:$ac_tool_warned in
  yes:)
@@ -2805,7 +2821,7 @@
  $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
  ac_tool_warned=yes ;;
  esac
-@@ -3190,9 +3763,9 @@
+@@ -3190,9 +3766,9 @@
            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
@@ -2817,7 +2833,7 @@
    $as_echo_n "(cached) " >&6
  else
    if test -n "$CC"; then
-@@ -3203,24 +3776,24 @@
+@@ -3203,24 +3779,24 @@
  do
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
@@ -2847,7 +2863,7 @@
  $as_echo "no" >&6; }
  fi
  
-@@ -3230,9 +3803,9 @@
+@@ -3230,9 +3806,9 @@
  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
@@ -2859,7 +2875,7 @@
    $as_echo_n "(cached) " >&6
  else
    if test -n "$CC"; then
-@@ -3244,18 +3817,18 @@
+@@ -3244,18 +3820,18 @@
  do
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
@@ -2881,7 +2897,7 @@
  IFS=$as_save_IFS
  
  if test $ac_prog_rejected = yes; then
-@@ -3274,10 +3847,10 @@
+@@ -3274,10 +3850,10 @@
  fi
  CC=$ac_cv_prog_CC
  if test -n "$CC"; then
@@ -2894,7 +2910,7 @@
  $as_echo "no" >&6; }
  fi
  
-@@ -3289,9 +3862,9 @@
+@@ -3289,9 +3865,9 @@
    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
@@ -2906,7 +2922,7 @@
    $as_echo_n "(cached) " >&6
  else
    if test -n "$CC"; then
-@@ -3302,24 +3875,24 @@
+@@ -3302,24 +3878,24 @@
  do
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
@@ -2936,7 +2952,7 @@
  $as_echo "no" >&6; }
  fi
  
-@@ -3333,9 +3906,9 @@
+@@ -3333,9 +3909,9 @@
  do
    # Extract the first word of "$ac_prog", so it can be a program name with args.
  set dummy $ac_prog; ac_word=$2
@@ -2948,7 +2964,7 @@
    $as_echo_n "(cached) " >&6
  else
    if test -n "$ac_ct_CC"; then
-@@ -3346,24 +3919,24 @@
+@@ -3346,24 +3922,24 @@
  do
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
@@ -2978,7 +2994,7 @@
  $as_echo "no" >&6; }
  fi
  
-@@ -3376,7 +3949,7 @@
+@@ -3376,7 +3952,7 @@
    else
      case $cross_compiling:$ac_tool_warned in
  yes:)
@@ -2987,7 +3003,7 @@
  $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
  ac_tool_warned=yes ;;
  esac
-@@ -3387,73 +3960,55 @@
+@@ -3387,57 +3963,37 @@
  fi
  
  
@@ -3008,17 +3024,6 @@
  set X $ac_compile
  ac_compiler=$2
 -{ (ac_try="$ac_compiler --version >&5"
--case "(($ac_try" in
--  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
--  *) ac_try_echo=$ac_try;;
--esac
--eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
--$as_echo "$ac_try_echo") >&5
--  (eval "$ac_compiler --version >&5") 2>&5
--  ac_status=$?
--  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
--  (exit $ac_status); }
--{ (ac_try="$ac_compiler -v >&5"
 +for ac_option in --version -v -V -qversion; do
 +  { { ac_try="$ac_compiler $ac_option >&5"
  case "(($ac_try" in
@@ -3027,13 +3032,24 @@
  esac
 -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 -$as_echo "$ac_try_echo") >&5
--  (eval "$ac_compiler -v >&5") 2>&5
+-  (eval "$ac_compiler --version >&5") 2>&5
 +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=$?
 -  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
 -  (exit $ac_status); }
+-{ (ac_try="$ac_compiler -v >&5"
+-case "(($ac_try" in
+-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+-  *) ac_try_echo=$ac_try;;
+-esac
+-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+-$as_echo "$ac_try_echo") >&5
+-  (eval "$ac_compiler -v >&5") 2>&5
+-  ac_status=$?
+-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }
 -{ (ac_try="$ac_compiler -V >&5"
 -case "(($ac_try" in
 -  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -3050,8 +3066,8 @@
 +... rest of stderr output deleted ...
 +         10q' conftest.err >conftest.er1
 +    cat conftest.er1 >&5
-+    rm -f conftest.er1 conftest.err
 +  fi
++  rm -f conftest.er1 conftest.err
 +  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
 +  test $ac_status = 0; }
 +done
@@ -3063,30 +3079,20 @@
 -cat >>conftest.$ac_ext <<_ACEOF
 +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"
-+ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out"
+@@ -3453,8 +4009,8 @@
  # 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:$LINENO: checking for C compiler default output file name" >&5
-+{ $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; }
+-$as_echo_n "checking for C compiler default output file name... " >&6; }
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
++$as_echo_n "checking whether the C compiler works... " >&6; }
  ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
  
-@@ -3470,17 +4025,17 @@
+ # The possible output files:
+@@ -3470,17 +4026,17 @@
  done
  rm -f $ac_rmfiles
  
@@ -3109,7 +3115,7 @@
    # 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,
-@@ -3497,7 +4052,7 @@
+@@ -3497,7 +4053,7 @@
  	# certainly right.
  	break;;
      *.* )
@@ -3118,17 +3124,19 @@
  	then :; else
  	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
  	fi
-@@ -3516,84 +4071,75 @@
+@@ -3516,84 +4072,42 @@
  else
    ac_file=''
  fi
 -
 -{ $as_echo "$as_me:$LINENO: result: $ac_file" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
- $as_echo "$ac_file" >&6; }
+-$as_echo "$ac_file" >&6; }
 -if test -z "$ac_file"; then
+-  $as_echo "$as_me: failed program was:" >&5
 +if test -z "$ac_file"; then :
-   $as_echo "$as_me: failed program was:" >&5
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++$as_echo "$as_me: failed program was:" >&5
  sed 's/^/| /' conftest.$ac_ext >&5
  
 -{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
@@ -3142,70 +3150,64 @@
 +{ as_fn_set_status 77
 +as_fn_error "C compiler cannot create executables
 +See \`config.log' for more details." "$LINENO" 5; }; }
++else
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }
  fi
 -
++{ $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; }
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
++$as_echo "$ac_file" >&6; }
  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.
+-# Check that the compiler produces executables we can run.  If not, either
+-# the compiler is broken, or we cross compile.
 -{ $as_echo "$as_me:$LINENO: checking whether the C compiler works" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
- $as_echo_n "checking whether the C compiler works... " >&6; }
+-$as_echo_n "checking whether the C compiler works... " >&6; }
 -# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
- # If not cross compiling, check that we can run a simple program.
- if test "$cross_compiling" != yes; then
-   if { ac_try='./$ac_file'
+-# 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
-+  { { case "(($ac_try" in
-   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-   *) ac_try_echo=$ac_try;;
- esac
+-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+-  *) ac_try_echo=$ac_try;;
+-esac
 -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 -$as_echo "$ac_try_echo") >&5
-+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=$?
+-  (eval "$ac_try") 2>&5
+-  ac_status=$?
 -  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
 -  (exit $ac_status); }; }; then
-+  $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
+-    cross_compiling=no
+-  else
+-    if test "$cross_compiling" = maybe; then
+-	cross_compiling=yes
+-    else
 -	{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-+	{ { $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: error: in \`$ac_pwd':" >&2;}
 -{ { $as_echo "$as_me:$LINENO: error: cannot run C compiled programs.
-+as_fn_error "cannot run C compiled programs.
- If you meant to cross compile, use \`--host'.
+-If you meant to cross compile, use \`--host'.
 -See \`config.log' for more details." >&5
 -$as_echo "$as_me: error: cannot run C compiled programs.
 -If you meant to cross compile, use \`--host'.
 -See \`config.log' for more details." >&2;}
 -   { (exit 1); exit 1; }; }; }
-+See \`config.log' for more details." "$LINENO" 5; }
-     fi
-   fi
- fi
+-    fi
+-  fi
+-fi
 -{ $as_echo "$as_me:$LINENO: result: yes" >&5
-+{ $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
-+rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out
+-$as_echo "yes" >&6; }
+-
+ rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.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.
+-# Check that the compiler produces executables we can run.  If not, either
+-# the compiler is broken, or we cross compile.
 -{ $as_echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
-+{ $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_n "checking whether we are cross compiling... " >&6; }
 -{ $as_echo "$as_me:$LINENO: result: $cross_compiling" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
- $as_echo "$cross_compiling" >&6; }
- 
+-$as_echo "$cross_compiling" >&6; }
+-
 -{ $as_echo "$as_me:$LINENO: checking for suffix of executables" >&5
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
  $as_echo_n "checking for suffix of executables... " >&6; }
@@ -3228,7 +3230,7 @@
    # 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
-@@ -3608,32 +4154,24 @@
+@@ -3608,32 +4122,83 @@
    esac
  done
  else
@@ -3244,8 +3246,9 @@
 +See \`config.log' for more details." "$LINENO" 5; }
  fi
 -
- rm -f conftest$ac_cv_exeext
+-rm -f conftest$ac_cv_exeext
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
++rm -f conftest conftest$ac_cv_exeext
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
  $as_echo "$ac_cv_exeext" >&6; }
  
@@ -3253,6 +3256,65 @@
  EXEEXT=$ac_cv_exeext
  ac_exeext=$EXEEXT
 -{ $as_echo "$as_me:$LINENO: checking for suffix of object files" >&5
++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="$ac_clean_files conftest.out"
++# 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; }
++if test "$cross_compiling" != yes; then
++  { { 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; }
++  if { ac_try='./conftest$ac_cv_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
++    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: $cross_compiling" >&5
++$as_echo "$cross_compiling" >&6; }
++
++rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
++ac_clean_files=$ac_clean_files_save
 +{ $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
@@ -3268,7 +3330,7 @@
  /* end confdefs.h.  */
  
  int
-@@ -3645,17 +4183,17 @@
+@@ -3645,17 +4210,17 @@
  }
  _ACEOF
  rm -f conftest.o conftest.obj
@@ -3291,7 +3353,7 @@
    for ac_file in conftest.o conftest.obj conftest.*; do
    test -f "$ac_file" || continue;
    case $ac_file in
-@@ -3668,31 +4206,23 @@
+@@ -3668,31 +4233,23 @@
    $as_echo "$as_me: failed program was:" >&5
  sed 's/^/| /' conftest.$ac_ext >&5
  
@@ -3330,7 +3392,7 @@
  /* end confdefs.h.  */
  
  int
-@@ -3706,37 +4236,16 @@
+@@ -3706,37 +4263,16 @@
    return 0;
  }
  _ACEOF
@@ -3371,7 +3433,7 @@
  $as_echo "$ac_cv_c_compiler_gnu" >&6; }
  if test $ac_compiler_gnu = yes; then
    GCC=yes
-@@ -3745,20 +4254,16 @@
+@@ -3745,20 +4281,16 @@
  fi
  ac_test_CFLAGS=${CFLAGS+set}
  ac_save_CFLAGS=$CFLAGS
@@ -3395,7 +3457,7 @@
  /* end confdefs.h.  */
  
  int
-@@ -3769,35 +4274,11 @@
+@@ -3769,35 +4301,11 @@
    return 0;
  }
  _ACEOF
@@ -3434,7 +3496,7 @@
  /* end confdefs.h.  */
  
  int
-@@ -3808,36 +4289,12 @@
+@@ -3808,36 +4316,12 @@
    return 0;
  }
  _ACEOF
@@ -3475,7 +3537,7 @@
  /* end confdefs.h.  */
  
  int
-@@ -3848,42 +4305,17 @@
+@@ -3848,42 +4332,17 @@
    return 0;
  }
  _ACEOF
@@ -3520,7 +3582,7 @@
  $as_echo "$ac_cv_prog_cc_g" >&6; }
  if test "$ac_test_CFLAGS" = set; then
    CFLAGS=$ac_save_CFLAGS
-@@ -3900,18 +4332,14 @@
+@@ -3900,18 +4359,14 @@
      CFLAGS=
    fi
  fi
@@ -3542,7 +3604,7 @@
  /* end confdefs.h.  */
  #include <stdarg.h>
  #include <stdio.h>
-@@ -3968,32 +4396,9 @@
+@@ -3968,32 +4423,9 @@
  	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
  do
    CC="$ac_save_CC $ac_arg"
@@ -3576,7 +3638,7 @@
  rm -f core conftest.err conftest.$ac_objext
    test "x$ac_cv_prog_cc_c89" != "xno" && break
  done
-@@ -4004,17 +4409,19 @@
+@@ -4004,17 +4436,19 @@
  # AC_CACHE_VAL
  case "x$ac_cv_prog_cc_c89" in
    x)
@@ -3599,7 +3661,7 @@
  
  ac_ext=c
  ac_cpp='$CPP $CPPFLAGS'
-@@ -4025,18 +4432,14 @@
+@@ -4025,18 +4459,14 @@
  CFLAGS=$savedCFLAGS
  
  if test x"$GCC" != x"yes" ; then
@@ -3621,7 +3683,7 @@
  /* end confdefs.h.  */
  #include <stdarg.h>
  #include <stdbool.h>
-@@ -4178,32 +4581,9 @@
+@@ -4178,32 +4608,9 @@
  for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -xc99=all -qlanglvl=extc99
  do
    CC="$ac_save_CC $ac_arg"
@@ -3655,7 +3717,7 @@
  rm -f core conftest.err conftest.$ac_objext
    test "x$ac_cv_prog_cc_c99" != "xno" && break
  done
-@@ -4214,26 +4594,28 @@
+@@ -4214,26 +4621,28 @@
  # AC_CACHE_VAL
  case "x$ac_cv_prog_cc_c99" in
    x)
@@ -3689,7 +3751,7 @@
  $as_echo "${GCC_VERSION}" >&6; }
  fi
  
-@@ -4242,14 +4624,14 @@
+@@ -4242,14 +4651,14 @@
  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
@@ -3706,7 +3768,7 @@
    $as_echo_n "(cached) " >&6
  else
        # Double quotes because CPP needs to be expanded
-@@ -4264,11 +4646,7 @@
+@@ -4264,11 +4673,7 @@
    # <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.
@@ -3719,7 +3781,7 @@
  /* end confdefs.h.  */
  #ifdef __STDC__
  # include <limits.h>
-@@ -4277,78 +4655,34 @@
+@@ -4277,78 +4682,34 @@
  #endif
  		     Syntax error
  _ACEOF
@@ -3803,7 +3865,7 @@
    break
  fi
  
-@@ -4360,7 +4694,7 @@
+@@ -4360,7 +4721,7 @@
  else
    ac_cv_prog_CPP=$CPP
  fi
@@ -3812,7 +3874,7 @@
  $as_echo "$CPP" >&6; }
  ac_preproc_ok=false
  for ac_c_preproc_warn_flag in '' yes
-@@ -4371,11 +4705,7 @@
+@@ -4371,11 +4732,7 @@
    # <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.
@@ -3825,7 +3887,7 @@
  /* end confdefs.h.  */
  #ifdef __STDC__
  # include <limits.h>
-@@ -4384,87 +4714,40 @@
+@@ -4384,87 +4741,40 @@
  #endif
  		     Syntax error
  _ACEOF
@@ -3922,7 +3984,7 @@
  fi
  
  ac_ext=c
-@@ -4474,9 +4757,9 @@
+@@ -4474,9 +4784,9 @@
  ac_compiler_gnu=$ac_cv_c_compiler_gnu
  
  
@@ -3934,7 +3996,7 @@
    $as_echo_n "(cached) " >&6
  else
    if test -z "$GREP"; then
-@@ -4487,7 +4770,7 @@
+@@ -4487,7 +4797,7 @@
  do
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
@@ -3943,7 +4005,7 @@
      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
-@@ -4507,7 +4790,7 @@
+@@ -4507,7 +4817,7 @@
      $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
@@ -3952,7 +4014,7 @@
      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"
-@@ -4522,26 +4805,24 @@
+@@ -4522,26 +4832,24 @@
        $ac_path_GREP_found && break 3
      done
    done
@@ -3984,7 +4046,7 @@
    $as_echo_n "(cached) " >&6
  else
    if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
-@@ -4555,7 +4836,7 @@
+@@ -4555,7 +4863,7 @@
  do
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
@@ -3993,7 +4055,7 @@
      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
-@@ -4575,7 +4856,7 @@
+@@ -4575,7 +4883,7 @@
      $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
@@ -4002,7 +4064,7 @@
      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"
-@@ -4590,12 +4871,10 @@
+@@ -4590,12 +4898,10 @@
        $ac_path_EGREP_found && break 3
      done
    done
@@ -4017,7 +4079,7 @@
    fi
  else
    ac_cv_path_EGREP=$EGREP
-@@ -4603,21 +4882,17 @@
+@@ -4603,21 +4909,17 @@
  
     fi
  fi
@@ -4043,7 +4105,7 @@
  /* end confdefs.h.  */
  #include <stdlib.h>
  #include <stdarg.h>
-@@ -4632,48 +4907,23 @@
+@@ -4632,48 +4934,23 @@
    return 0;
  }
  _ACEOF
@@ -4097,7 +4159,7 @@
  else
    ac_cv_header_stdc=no
  fi
-@@ -4683,18 +4933,14 @@
+@@ -4683,18 +4960,14 @@
  
  if test $ac_cv_header_stdc = yes; then
    # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
@@ -4119,7 +4181,7 @@
  else
    ac_cv_header_stdc=no
  fi
-@@ -4704,14 +4950,10 @@
+@@ -4704,14 +4977,10 @@
  
  if test $ac_cv_header_stdc = yes; then
    # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
@@ -4136,7 +4198,7 @@
  /* end confdefs.h.  */
  #include <ctype.h>
  #include <stdlib.h>
-@@ -4738,118 +4980,34 @@
+@@ -4738,118 +5007,34 @@
    return 0;
  }
  _ACEOF
@@ -4268,7 +4330,7 @@
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
-@@ -4860,139 +5018,8 @@
+@@ -4860,139 +5045,8 @@
  
  
  
@@ -4410,7 +4472,7 @@
    MINIX=yes
  else
    MINIX=
-@@ -5001,34 +5028,23 @@
+@@ -5001,34 +5055,23 @@
  
    if test "$MINIX" = yes; then
  
@@ -4451,7 +4513,7 @@
  /* end confdefs.h.  */
  
  #	  define __EXTENSIONS__ 1
-@@ -5041,71 +5057,35 @@
+@@ -5041,71 +5084,35 @@
    return 0;
  }
  _ACEOF
@@ -4534,7 +4596,7 @@
  /* end confdefs.h.  */
  #ifndef __APPLE_CC__
  	       not a universal capable compiler
-@@ -5113,46 +5093,34 @@
+@@ -5113,46 +5120,34 @@
  	     typedef int dummy;
  
  _ACEOF
@@ -4603,7 +4665,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  	     #include <sys/param.h>
-@@ -5170,30 +5138,9 @@
+@@ -5170,30 +5165,9 @@
    return 0;
  }
  _ACEOF
@@ -4636,7 +4698,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  		#include <sys/param.h>
-@@ -5209,49 +5156,18 @@
+@@ -5209,49 +5183,18 @@
    return 0;
  }
  _ACEOF
@@ -4689,7 +4751,7 @@
  /* end confdefs.h.  */
  #include <limits.h>
  
-@@ -5266,30 +5182,9 @@
+@@ -5266,30 +5209,9 @@
    return 0;
  }
  _ACEOF
@@ -4722,7 +4784,7 @@
  /* end confdefs.h.  */
  #include <limits.h>
  
-@@ -5304,51 +5199,20 @@
+@@ -5304,51 +5226,20 @@
    return 0;
  }
  _ACEOF
@@ -4778,7 +4840,7 @@
  /* end confdefs.h.  */
  short int ascii_mm[] =
  		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
-@@ -5374,24 +5238,7 @@
+@@ -5374,24 +5265,7 @@
    return 0;
  }
  _ACEOF
@@ -4804,7 +4866,7 @@
    if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
  	      ac_cv_c_bigendian=yes
  	    fi
-@@ -5403,20 +5250,10 @@
+@@ -5403,20 +5277,10 @@
  		ac_cv_c_bigendian=unknown
  	      fi
  	    fi
@@ -4826,7 +4888,7 @@
  /* end confdefs.h.  */
  $ac_includes_default
  int
-@@ -5436,81 +5273,43 @@
+@@ -5436,81 +5300,43 @@
    return 0;
  }
  _ACEOF
@@ -4920,7 +4982,7 @@
  /* end confdefs.h.  */
  #ifndef __cplusplus
  typedef int foo_t;
-@@ -5519,41 +5318,17 @@
+@@ -5519,41 +5345,17 @@
  #endif
  
  _ACEOF
@@ -4964,7 +5026,7 @@
  case $ac_cv_c_inline in
    inline | yes) ;;
    *)
-@@ -5573,14 +5348,10 @@
+@@ -5573,14 +5375,10 @@
  saved_CFLAGS="$CFLAGS";
  c99_init=no
  if test x"$c99_init" = x"no"; then
@@ -4981,7 +5043,7 @@
  /* end confdefs.h.  */
  #include <stdio.h>
  int
-@@ -5593,45 +5364,20 @@
+@@ -5593,45 +5391,20 @@
    return 0;
  }
  _ACEOF
@@ -5032,7 +5094,7 @@
  /* end confdefs.h.  */
  #include <stdio.h>
  int
-@@ -5644,45 +5390,20 @@
+@@ -5644,45 +5417,20 @@
    return 0;
  }
  _ACEOF
@@ -5083,7 +5145,7 @@
  /* end confdefs.h.  */
  #include <stdio.h>
  int
-@@ -5695,45 +5416,20 @@
+@@ -5695,45 +5443,20 @@
    return 0;
  }
  _ACEOF
@@ -5134,7 +5196,7 @@
  /* end confdefs.h.  */
  #include <stdio.h>
  int
-@@ -5746,45 +5442,20 @@
+@@ -5746,45 +5469,20 @@
    return 0;
  }
  _ACEOF
@@ -5185,7 +5247,7 @@
  /* end confdefs.h.  */
  #include <stdio.h>
  int
-@@ -5797,34 +5468,13 @@
+@@ -5797,34 +5495,13 @@
    return 0;
  }
  _ACEOF
@@ -5223,7 +5285,7 @@
  rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  fi
  
-@@ -5843,7 +5493,7 @@
+@@ -5843,7 +5520,7 @@
  else
      CFLAGS="$saved_CFLAGS"
      saved_CFLAGS=""
@@ -5232,7 +5294,7 @@
  $as_echo "$as_me: WARNING: c99 structure initializer are not supported" >&2;}
  fi
  
-@@ -5862,10 +5512,10 @@
+@@ -5862,10 +5539,10 @@
  # 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.
@@ -5245,7 +5307,7 @@
    $as_echo_n "(cached) " >&6
  else
    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-@@ -5873,11 +5523,11 @@
+@@ -5873,11 +5550,11 @@
  do
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
@@ -5261,7 +5323,7 @@
    /usr/ucb/* ) ;;
    *)
      # OSF1 and SCO ODT 3.0 have their own names for install.
-@@ -5914,7 +5564,7 @@
+@@ -5914,7 +5591,7 @@
      ;;
  esac
  
@@ -5270,7 +5332,7 @@
  IFS=$as_save_IFS
  
  rm -rf conftest.one conftest.two conftest.dir
-@@ -5930,7 +5580,7 @@
+@@ -5930,7 +5607,7 @@
      INSTALL=$ac_install_sh
    fi
  fi
@@ -5279,7 +5341,7 @@
  $as_echo "$INSTALL" >&6; }
  
  # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-@@ -5942,17 +5592,13 @@
+@@ -5942,17 +5619,13 @@
  test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
  
  
@@ -5300,7 +5362,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -5977,54 +5623,27 @@
+@@ -5977,54 +5650,27 @@
      ac_res=-l$ac_lib
      LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
    fi
@@ -5363,7 +5425,7 @@
    test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
  
  fi
-@@ -6032,7 +5651,6 @@
+@@ -6032,7 +5678,6 @@
  
  
  
@@ -5371,7 +5433,7 @@
   cat >>confdefs.h <<\EOF
  #ifndef _XOPEN_SOURCE_EXTENDED
  #define _XOPEN_SOURCE_EXTENDED 1
-@@ -6041,15 +5659,15 @@
+@@ -6041,15 +5686,15 @@
  
  
  # Check whether --enable-largefile was given.
@@ -5390,7 +5452,7 @@
    $as_echo_n "(cached) " >&6
  else
    ac_cv_sys_largefile_CC=no
-@@ -6058,11 +5676,7 @@
+@@ -6058,11 +5703,7 @@
         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.
@@ -5403,7 +5465,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
   /* Check that off_t can represent 2**63 - 1 correctly.
-@@ -6081,60 +5695,14 @@
+@@ -6081,60 +5722,14 @@
    return 0;
  }
  _ACEOF
@@ -5466,7 +5528,7 @@
  rm -f core conftest.err conftest.$ac_objext
  	 break
         done
-@@ -6142,23 +5710,19 @@
+@@ -6142,23 +5737,19 @@
         rm -f conftest.$ac_ext
      fi
  fi
@@ -5494,7 +5556,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
   /* Check that off_t can represent 2**63 - 1 correctly.
-@@ -6177,38 +5741,11 @@
+@@ -6177,38 +5768,11 @@
    return 0;
  }
  _ACEOF
@@ -5535,7 +5597,7 @@
  /* end confdefs.h.  */
  #define _FILE_OFFSET_BITS 64
  #include <sys/types.h>
-@@ -6228,38 +5765,15 @@
+@@ -6228,38 +5792,15 @@
    return 0;
  }
  _ACEOF
@@ -5576,7 +5638,7 @@
  $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
  case $ac_cv_sys_file_offset_bits in #(
    no | unknown) ;;
-@@ -6271,17 +5785,13 @@
+@@ -6271,17 +5812,13 @@
  esac
  rm -rf conftest*
    if test $ac_cv_sys_file_offset_bits = unknown; then
@@ -5597,7 +5659,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
   /* Check that off_t can represent 2**63 - 1 correctly.
-@@ -6300,38 +5810,11 @@
+@@ -6300,38 +5837,11 @@
    return 0;
  }
  _ACEOF
@@ -5638,7 +5700,7 @@
  /* end confdefs.h.  */
  #define _LARGE_FILES 1
  #include <sys/types.h>
-@@ -6351,38 +5834,15 @@
+@@ -6351,38 +5861,15 @@
    return 0;
  }
  _ACEOF
@@ -5679,7 +5741,7 @@
  $as_echo "$ac_cv_sys_large_files" >&6; }
  case $ac_cv_sys_large_files in #(
    no | unknown) ;;
-@@ -6406,31 +5866,25 @@
+@@ -6406,31 +5893,25 @@
  	*hpux*)
  		# mmap on HPUX is completely broken...
  
@@ -5716,7 +5778,7 @@
  
  		if test "${GCC}" != "yes"; then
  			## for funky AIX compiler using strncpy()
-@@ -6442,7 +5896,6 @@
+@@ -6442,7 +5923,6 @@
  
  
  
@@ -5724,7 +5786,7 @@
   cat >>confdefs.h <<\EOF
  #ifndef _XOPEN_SOURCE
  #define _XOPEN_SOURCE 600
-@@ -6452,7 +5905,6 @@
+@@ -6452,7 +5932,6 @@
  
  
  
@@ -5732,7 +5794,7 @@
   cat >>confdefs.h <<\EOF
  #ifndef _OSF_SOURCE
  #define _OSF_SOURCE 1
-@@ -6469,9 +5921,7 @@
+@@ -6469,9 +5948,7 @@
  			*)
  				CFLAGS="$CFLAGS -D_POSIX_C_SOURCE=200112L"
  
@@ -5743,7 +5805,7 @@
  
  				;;
  		esac
-@@ -6480,9 +5930,7 @@
+@@ -6480,9 +5957,7 @@
  			*)
  				CFLAGS="$CFLAGS -D_SYSV"
  
@@ -5754,7 +5816,7 @@
  
  				;;
  		esac
-@@ -6491,978 +5939,385 @@
+@@ -6491,978 +5966,385 @@
  
  
  
@@ -6163,7 +6225,8 @@
 -{
 -static int test_array [1 - 2 * !(((long int) (sizeof (int))) >= 0)];
 -test_array [0] = 0
--
++  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long"        "$ac_includes_default"; then :
+ 
 -  ;
 -  return 0;
 -}
@@ -6200,8 +6263,7 @@
 -{
 -static int test_array [1 - 2 * !(((long int) (sizeof (int))) <= $ac_mid)];
 -test_array [0] = 0
-+  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long"        "$ac_includes_default"; then :
- 
+-
 -  ;
 -  return 0;
 -}
@@ -6572,10 +6634,7 @@
 -  # Depending upon the size, compute the lo and hi bounds.
 -cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
-+
-+cat >>confdefs.h <<_ACEOF
-+#define uint32_t unsigned int
- _ACEOF
+-_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
@@ -6612,7 +6671,9 @@
 -  while :; do
 -    cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
--_ACEOF
++cat >>confdefs.h <<_ACEOF
++#define uint32_t unsigned int
+ _ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
@@ -6622,11 +6683,6 @@
 -{
 -static int test_array [1 - 2 * !(((long int) (sizeof (char))) <= $ac_mid)];
 -test_array [0] = 0
-+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 :
  
 -  ;
 -  return 0;
@@ -6651,6 +6707,12 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_hi=$ac_mid; break
++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
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
@@ -6988,7 +7050,7 @@
  _ACEOF
  
  
-@@ -7470,717 +6325,429 @@
+@@ -7470,27613 +6352,429 @@
  # 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.
@@ -7014,7 +7076,8 @@
 -{
 -static int test_array [1 - 2 * !(((long int) (sizeof (short))) >= 0)];
 -test_array [0] = 0
--
++  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t"        "$ac_includes_default"; then :
+ 
 -  ;
 -  return 0;
 -}
@@ -7051,12 +7114,30 @@
 -{
 -static int test_array [1 - 2 * !(((long int) (sizeof (short))) <= $ac_mid)];
 -test_array [0] = 0
-+  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
  
 -  ;
 -  return 0;
 -}
--_ACEOF
++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
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -7076,24 +7157,36 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_hi=$ac_mid; break
++
++
++# 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
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
++  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (ssize_t))" "ac_cv_sizeof_ssize_t"        "$ac_includes_default"; then :
+ 
 -	ac_lo=`expr $ac_mid + 1`
 -			if test $ac_lo -le $ac_mid; then
 -			  ac_lo= ac_hi=
 -			  break
 -			fi
 -			ac_mid=`expr 2 '*' $ac_mid + 1`
-+  if test "$ac_cv_type_size_t" = yes; 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 (size_t)
++as_fn_error "cannot compute sizeof (ssize_t)
 +See \`config.log' for more details." "$LINENO" 5; }; }
 +   else
-+     ac_cv_sizeof_size_t=0
++     ac_cv_sizeof_ssize_t=0
 +   fi
  fi
  
@@ -7103,8 +7196,8 @@
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 +fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
-+$as_echo "$ac_cv_sizeof_size_t" >&6; }
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_ssize_t" >&5
++$as_echo "$ac_cv_sizeof_ssize_t" >&6; }
  
 -	cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
@@ -7145,7 +7238,10 @@
 -  while :; do
 -    cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
--_ACEOF
++
++cat >>confdefs.h <<_ACEOF
++#define SIZEOF_SSIZE_T $ac_cv_sizeof_ssize_t
+ _ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
@@ -7159,8 +7255,15 @@
 -  ;
 -  return 0;
 -}
++
++
++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 :
++
++else
++
 +cat >>confdefs.h <<_ACEOF
-+#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
++#define intptr_t long long
  _ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
@@ -7181,7 +7284,13 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_lo=$ac_mid; break
--else
++
++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 :
++
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
  
@@ -7191,40 +7300,36 @@
 -			  break
 -			fi
 -			ac_mid=`expr 2 '*' $ac_mid`
--fi
++cat >>confdefs.h <<_ACEOF
++#define uintptr_t unsigned long long
++_ACEOF
++
+ fi
  
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -  done
-+# 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
++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 :
++
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (ssize_t))" "ac_cv_sizeof_ssize_t"        "$ac_includes_default"; then :
  
 -	ac_lo= ac_hi=
-+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
++cat >>confdefs.h <<_ACEOF
++#define ptrdiff_t unsigned long long
++_ACEOF
++
  fi
  
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++
++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
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_ssize_t" >&5
-+$as_echo "$ac_cv_sizeof_ssize_t" >&6; }
  
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -# Binary search between lo and hi bounds.
@@ -7235,20 +7340,41 @@
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
++############################################
++# 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.  */
 -$ac_includes_default
--int
--main ()
--{
++
++		#include <stdio.h>
++
+ int
+ main ()
+ {
 -static int test_array [1 - 2 * !(((long int) (sizeof (short))) <= $ac_mid)];
 -test_array [0] = 0
++
++		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;
--}
-+
-+cat >>confdefs.h <<_ACEOF
-+#define SIZEOF_SSIZE_T $ac_cv_sizeof_ssize_t
+   ;
+   return 0;
+ }
  _ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
@@ -7269,12 +7395,24 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_hi=$ac_mid
--else
++if ac_fn_c_try_compile "$LINENO"; then :
++  libreplace_cv_immediate_structures=yes
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
++  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
  
 -	ac_lo=`expr '(' $ac_mid ')' + 1`
--fi
+ fi
  
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -done
@@ -7293,16 +7431,17 @@
 -   fi ;;
 -esac
 +
-+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 :
++echo "LIBREPLACE_CC_CHECKS: END"
 +
++
++
++# Check whether --enable-external_libtalloc was given.
++if test "${enable_external_libtalloc+set}" = set; then :
++  enableval=$enable_external_libtalloc;  enable_external_libtalloc=$enableval
  else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
-+
-+cat >>confdefs.h <<_ACEOF
-+#define intptr_t long long
- _ACEOF
+-_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
@@ -7314,6 +7453,8 @@
 -int
 -main ()
 -{
++   enable_external_libtalloc=auto
++fi
  
 -  FILE *f = fopen ("conftest.val", "w");
 -  if (! f)
@@ -7335,11 +7476,7 @@
 -  /* Do not output a trailing newline, as this causes \r\n confusion
 -     on some platforms.  */
 -  return ferror (f) || fclose (f) != 0;
-+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 :
- 
+-
 -  ;
 -  return 0;
 -}
@@ -7367,11 +7504,11 @@
 -  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
 -  (exit $ac_status); }; }; then
 -  ac_cv_sizeof_short=`cat conftest.val`
- else
+-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
- 
+-
 -( exit $ac_status )
 -if test "$ac_cv_type_short" = yes; then
 -     { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
@@ -7389,26 +7526,17 @@
 -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 -fi
 -rm -f conftest.val
-+cat >>confdefs.h <<_ACEOF
-+#define uintptr_t unsigned long long
-+_ACEOF
-+
- fi
+-fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
 -$as_echo "$ac_cv_sizeof_short" >&6; }
- 
-+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 :
- 
-+else
- 
- cat >>confdefs.h <<_ACEOF
+-
+-
+-
+-cat >>confdefs.h <<_ACEOF
 -#define SIZEOF_SHORT $ac_cv_sizeof_short
-+#define ptrdiff_t unsigned long long
- _ACEOF
- 
-+fi
- 
+-_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]];'.
@@ -7416,22 +7544,8 @@
 -{ $as_echo "$as_me:$LINENO: checking size of long" >&5
 -$as_echo_n "checking size of long... " >&6; }
 -if test "${ac_cv_sizeof_long+set}" = set; then
-+
-+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
+-  $as_echo_n "(cached) " >&6
+-else
 -  if test "$cross_compiling" = yes; then
 -  # Depending upon the size, compute the lo and hi bounds.
 -cat >conftest.$ac_ext <<_ACEOF
@@ -7446,7 +7560,7 @@
 -{
 -static int test_array [1 - 2 * !(((long int) (sizeof (long))) >= 0)];
 -test_array [0] = 0
- 
+-
 -  ;
 -  return 0;
 -}
@@ -7476,33 +7590,18 @@
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
+-/* end confdefs.h.  */
 -$ac_includes_default
-+
-+		#include <stdio.h>
-+
- int
- main ()
- {
+-int
+-main ()
+-{
 -static int test_array [1 - 2 * !(((long int) (sizeof (long))) <= $ac_mid)];
 -test_array [0] = 0
-+
-+		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
+-
+-  ;
+-  return 0;
+-}
+-_ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -7522,33 +7621,24 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_hi=$ac_mid; break
-+if ac_fn_c_try_compile "$LINENO"; then :
-+  libreplace_cv_immediate_structures=yes
- else
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+  libreplace_cv_immediate_structures=no
-+fi
-+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- 
+-
 -	ac_lo=`expr $ac_mid + 1`
 -			if test $ac_lo -le $ac_mid; then
 -			  ac_lo= ac_hi=
 -			  break
 -			fi
 -			ac_mid=`expr 2 '*' $ac_mid + 1`
- 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
- 
+-fi
+-
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -  done
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+$as_echo "#define HAVE_IMMEDIATE_STRUCTURES 1" >>confdefs.h
- 
+-
 -	cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
@@ -7561,8 +7651,7 @@
 -{
 -static int test_array [1 - 2 * !(((long int) (sizeof (long))) < 0)];
 -test_array [0] = 0
-+fi
- 
+-
 -  ;
 -  return 0;
 -}
@@ -7599,7 +7688,7 @@
 -{
 -static int test_array [1 - 2 * !(((long int) (sizeof (long))) >= $ac_mid)];
 -test_array [0] = 0
- 
+-
 -  ;
 -  return 0;
 -}
@@ -7623,148 +7712,30 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_lo=$ac_mid; break
-+echo "LIBREPLACE_CC_CHECKS: END"
-+
-+
-+
-+# Check whether --enable-external_libtalloc was given.
-+if test "${enable_external_libtalloc+set}" = set; then :
-+  enableval=$enable_external_libtalloc;  enable_external_libtalloc=$enableval
- else
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+   enable_external_libtalloc=auto
-+fi
- 
+-
 -	ac_hi=`expr '(' $ac_mid ')' - 1`
 -			if test $ac_mid -le $ac_hi; then
 -			  ac_lo= ac_hi=
 -			  break
 -			fi
 -			ac_mid=`expr 2 '*' $ac_mid`
-+
-+if test "x$enable_external_libtalloc" != xno
-+then
-+
-+
-+if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
-+	if test -n "$ac_tool_prefix"; then
-+  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
-+set dummy ${ac_tool_prefix}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
-+
-+  ;;
-+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
+-
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-+
-+fi
-+if test -z "$ac_cv_path_PKG_CONFIG"; then
-+  ac_pt_PKG_CONFIG=$PKG_CONFIG
-+  # 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_ac_pt_PKG_CONFIG+set}" = set; then :
-+  $as_echo_n "(cached) " >&6
-+else
-+  case $ac_pt_PKG_CONFIG in
-+  [\\/]* | ?:[\\/]*)
-+  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_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_ac_pt_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
-+
-+  ;;
-+esac
-+fi
-+ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
-+if test -n "$ac_pt_PKG_CONFIG"; then
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
-+$as_echo "$ac_pt_PKG_CONFIG" >&6; }
- else
+-  done
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-+$as_echo "no" >&6; }
-+fi
- 
+-
 -	ac_lo= ac_hi=
-+  if test "x$ac_pt_PKG_CONFIG" = x; then
-+    PKG_CONFIG=""
-+  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
-+    PKG_CONFIG=$ac_pt_PKG_CONFIG
-+  fi
-+else
-+  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
- fi
- 
+-fi
+-
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
-+if test -n "$PKG_CONFIG"; then
-+	_pkg_min_version=0.9.0
-+	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
-+$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
-+	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
-+		{ $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; }
-+		PKG_CONFIG=""
-+	fi
- 
+-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
@@ -7781,8 +7752,7 @@
 -{
 -static int test_array [1 - 2 * !(((long int) (sizeof (long))) <= $ac_mid)];
 -test_array [0] = 0
-+fi
- 
+-
 -  ;
 -  return 0;
 -}
@@ -7796,18 +7766,7 @@
 -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 -$as_echo "$ac_try_echo") >&5
 -  (eval "$ac_compile") 2>conftest.er1
-+pkg_failed=no
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for TALLOC" >&5
-+$as_echo_n "checking for TALLOC... " >&6; }
-+
-+if test -n "$PKG_CONFIG"; then
-+    if test -n "$TALLOC_CFLAGS"; then
-+        pkg_cv_TALLOC_CFLAGS="$TALLOC_CFLAGS"
-+    else
-+        if test -n "$PKG_CONFIG" && \
-+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"talloc >= 1.3.0\""; } >&5
-+  ($PKG_CONFIG --exists --print-errors "talloc >= 1.3.0") 2>&5
-   ac_status=$?
+-  ac_status=$?
 -  grep -v '^ *+' conftest.er1 >conftest.err
 -  rm -f conftest.er1
 -  cat conftest.err >&5
@@ -7817,70 +7776,13 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_hi=$ac_mid
-+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-+  test $ac_status = 0; }; then
-+  pkg_cv_TALLOC_CFLAGS=`$PKG_CONFIG --cflags "talloc >= 1.3.0" 2>/dev/null`
- else
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+  pkg_failed=yes
-+fi
-+    fi
-+else
-+	pkg_failed=untried
-+fi
-+if test -n "$PKG_CONFIG"; then
-+    if test -n "$TALLOC_LIBS"; then
-+        pkg_cv_TALLOC_LIBS="$TALLOC_LIBS"
-+    else
-+        if test -n "$PKG_CONFIG" && \
-+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"talloc >= 1.3.0\""; } >&5
-+  ($PKG_CONFIG --exists --print-errors "talloc >= 1.3.0") 2>&5
-+  ac_status=$?
-+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-+  test $ac_status = 0; }; then
-+  pkg_cv_TALLOC_LIBS=`$PKG_CONFIG --libs "talloc >= 1.3.0" 2>/dev/null`
-+else
-+  pkg_failed=yes
-+fi
-+    fi
-+else
-+	pkg_failed=untried
-+fi
- 
+-
 -	ac_lo=`expr '(' $ac_mid ')' + 1`
-+
-+
-+if test $pkg_failed = yes; then
-+
-+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
-+        _pkg_short_errors_supported=yes
-+else
-+        _pkg_short_errors_supported=no
- fi
-+        if test $_pkg_short_errors_supported = yes; then
-+	        TALLOC_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "talloc >= 1.3.0"`
-+        else
-+	        TALLOC_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "talloc >= 1.3.0"`
-+        fi
-+	# Put the nasty error message in config.log where it belongs
-+	echo "$TALLOC_PKG_ERRORS" >&5
-+
-+	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-+$as_echo "no" >&6; }
-+                 if x$enable_external_libtalloc = xyes; then
-+		 	as_fn_error "Unable to find libtalloc" "$LINENO" 5
-+	      else
-+			enable_external_libtalloc=no
-+		  fi
-+
-+elif test $pkg_failed = untried; then
-+	 if x$enable_external_libtalloc = xyes; then
-+		 	as_fn_error "Unable to find libtalloc" "$LINENO" 5
-+	      else
-+			enable_external_libtalloc=no
-+		  fi
- 
+-fi
+-
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -done
 -case $ac_lo in
@@ -7897,7 +7799,7 @@
 -     ac_cv_sizeof_long=0
 -   fi ;;
 -esac
- else
+-else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
@@ -7912,14 +7814,7 @@
 -int
 -main ()
 -{
-+	TALLOC_CFLAGS=$pkg_cv_TALLOC_CFLAGS
-+	TALLOC_LIBS=$pkg_cv_TALLOC_LIBS
-+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-+$as_echo "yes" >&6; }
-+	 enable_external_libtalloc=yes
-+fi
-+fi
- 
+-
 -  FILE *f = fopen ("conftest.val", "w");
 -  if (! f)
 -    return 1;
@@ -7940,14 +7835,7 @@
 -  /* Do not output a trailing newline, as this causes \r\n confusion
 -     on some platforms.  */
 -  return ferror (f) || fclose (f) != 0;
-+if test "x$enable_external_libtalloc" != xyes
-+then
-+	tallocdir=""
-+tallocpaths=". lib/talloc talloc ../talloc ../lib/talloc"
-+for d in $tallocpaths; do
-+	if test -f "$srcdir/$d/talloc.c"; then
-+		tallocdir="$d"
- 
+-
 -  ;
 -  return 0;
 -}
@@ -7975,86 +7863,48 @@
 -  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
 -  (exit $ac_status); }; }; then
 -  ac_cv_sizeof_long=`cat conftest.val`
-+		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
+-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
-+  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t"        "$ac_includes_default"; then :
- 
+-
 -( exit $ac_status )
 -if test "$ac_cv_type_long" = yes; then
 -     { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-+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_echo "$as_me: error: in \`$ac_pwd':" >&2;}
 -{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long)
 -See \`config.log' for more details." >&5
 -$as_echo "$as_me: error: cannot compute sizeof (long)
 -See \`config.log' for more details." >&2;}
 -   { (exit 77); exit 77; }; }; }
-+{ as_fn_set_status 77
-+as_fn_error "cannot compute sizeof (size_t)
-+See \`config.log' for more details." "$LINENO" 5; }; }
-    else
+-   else
 -     ac_cv_sizeof_long=0
-+     ac_cv_sizeof_size_t=0
-    fi
- fi
+-   fi
+-fi
 -rm -rf conftest.dSYM
 -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 -fi
 -rm -f conftest.val
-+
- fi
+-fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
 -$as_echo "$ac_cv_sizeof_long" >&6; }
-+{ $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
+-
+-
+-
+-cat >>confdefs.h <<_ACEOF
 -#define SIZEOF_LONG $ac_cv_sizeof_long
-+#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
- _ACEOF
- 
- 
-@@ -8188,30229 +6755,1920 @@
- # 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.
+-_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:$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 "$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
+-  $as_echo_n "(cached) " >&6
+-else
 -  if test "$cross_compiling" = yes; then
 -  # Depending upon the size, compute the lo and hi bounds.
 -cat >conftest.$ac_ext <<_ACEOF
@@ -8106,8 +7956,7 @@
 -{
 -static int test_array [1 - 2 * !(((long int) (sizeof (long long))) <= $ac_mid)];
 -test_array [0] = 0
-+  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p"        "$ac_includes_default"; then :
- 
+-
 -  ;
 -  return 0;
 -}
@@ -8131,36 +7980,24 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_hi=$ac_mid; break
- else
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+  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
- 
+-
 -	ac_lo=`expr $ac_mid + 1`
 -			if test $ac_lo -le $ac_mid; then
 -			  ac_lo= ac_hi=
 -			  break
 -			fi
 -			ac_mid=`expr 2 '*' $ac_mid + 1`
- fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
-+$as_echo "$ac_cv_sizeof_void_p" >&6; }
- 
+-fi
+-
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -  done
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
- 
+-
 -	cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
@@ -8173,7 +8010,7 @@
 -{
 -static int test_array [1 - 2 * !(((long int) (sizeof (long long))) < 0)];
 -test_array [0] = 0
- 
+-
 -  ;
 -  return 0;
 -}
@@ -8200,9 +8037,7 @@
 -  while :; do
 -    cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
-+cat >>confdefs.h <<_ACEOF
-+#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
- _ACEOF
+-_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
@@ -8212,7 +8047,7 @@
 -{
 -static int test_array [1 - 2 * !(((long int) (sizeof (long long))) >= $ac_mid)];
 -test_array [0] = 0
- 
+-
 -  ;
 -  return 0;
 -}
@@ -8239,54 +8074,27 @@
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
- 
+-
 -	ac_hi=`expr '(' $ac_mid ')' - 1`
 -			if test $ac_mid -le $ac_hi; then
 -			  ac_lo= ac_hi=
 -			  break
 -			fi
 -			ac_mid=`expr 2 '*' $ac_mid`
-+
-+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 at samba.org>" >&5
-+$as_echo "$as_me: WARNING: please report this to <samba-technical at 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
- 
+-fi
+-
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -  done
- else
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	ac_lo= ac_hi=
-+	tallocdir=../lib/talloc
- fi
- 
+-fi
+-
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-+
-+
-+
-+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
- 
+-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
@@ -8303,30 +8111,11 @@
 -{
 -static int test_array [1 - 2 * !(((long int) (sizeof (long long))) <= $ac_mid)];
 -test_array [0] = 0
-+TEVENT_OBJ=""
-+TEVENT_CFLAGS=""
-+TEVENT_LIBS=""
- 
+-
 -  ;
 -  return 0;
 -}
-+
-+
-+
-+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
+-_ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -8349,12 +8138,12 @@
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
- 
+-
 -	ac_lo=`expr '(' $ac_mid ')' + 1`
- fi
- 
+-fi
+-
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- done
+-done
 -case $ac_lo in
 -?*) ac_cv_sizeof_long_long=$ac_lo;;
 -'') if test "$ac_cv_type_long_long" = yes; then
@@ -8384,7 +8173,7 @@
 -int
 -main ()
 -{
- 
+-
 -  FILE *f = fopen ("conftest.val", "w");
 -  if (! f)
 -    return 1;
@@ -8409,13 +8198,7 @@
 -  ;
 -  return 0;
 -}
-+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
+-_ACEOF
 -rm -f conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -8443,7 +8226,7 @@
 -  $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
- 
+-
 -( exit $ac_status )
 -if test "$ac_cv_type_long_long" = yes; then
 -     { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
@@ -8456,42 +8239,23 @@
 -   else
 -     ac_cv_sizeof_long_long=0
 -   fi
- fi
+-fi
 -rm -rf conftest.dSYM
 -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-+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
+-fi
 -rm -f conftest.val
-+
-+if test x"$VERSIONSCRIPT" != "x"; then
-+    EXPORTSFILE=tevent.exports
-+
- fi
+-fi
 -{ $as_echo "$as_me:$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
-+LIBTEVENT_OBJ0=""
-+for obj in ${TEVENT_OBJ}; do
-+	LIBTEVENT_OBJ0="${LIBTEVENT_OBJ0} ${teventdir}/${obj}"
-+done
- 
-+LIBS="${LIBS} ${TEVENT_LIBS}"
- 
-+# TODO: These should come from m4_include(lib/tdb/libtdb.m4)
-+# but currently this fails: things have to get merged from s4.
-+tdbdir="../lib/tdb"
- 
+-
+-
+-
 -{ $as_echo "$as_me:$LINENO: checking for uint_t" >&5
 -$as_echo_n "checking for uint_t... " >&6; }
 -if test "${ac_cv_type_uint_t+set}" = set; then
@@ -8570,53 +8334,32 @@
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+TDB_CFLAGS="-I${srcdir-.}/$tdbdir/include"
- 
+-
 -	ac_cv_type_uint_t=yes
 -fi
- 
+-
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+LIBTDB_OBJ0=""
-+for o in common/tdb.o common/dump.o common/transaction.o common/error.o \
-+	     common/traverse.o common/freelist.o common/freelistcheck.o \
-+		 common/io.o common/lock.o common/open.o;
-+do
-+	LIBTDB_OBJ0="$LIBTDB_OBJ0 $tdbdir/$o"
-+done
- 
- 
+-
+-
 -fi
-+SAMBA_CPPFLAGS="-Iinclude -I${srcdir-.}/include  -I. -I${srcdir-.}"
-+SAMBA_CPPFLAGS="${SAMBA_CPPFLAGS} -I${srcdir-.}/../lib/replace"
-+SAMBA_CPPFLAGS="${SAMBA_CPPFLAGS} ${TALLOC_CFLAGS}"
-+SAMBA_CPPFLAGS="${SAMBA_CPPFLAGS} ${TEVENT_CFLAGS}"
-+SAMBA_CPPFLAGS="${SAMBA_CPPFLAGS} ${TDB_CFLAGS}"
-+SAMBA_CPPFLAGS="${SAMBA_CPPFLAGS} -I${srcdir-.}/libaddns"
-+SAMBA_CPPFLAGS="${SAMBA_CPPFLAGS} -I${srcdir-.}/librpc"
-+SAMBA_CPPFLAGS="${SAMBA_CPPFLAGS} -I${srcdir-.}/.."
- 
+-
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-+SAMBA_CONFIGURE_CPPFLAGS="${SAMBA_CPPFLAGS} -I${srcdir-.}/../lib/popt"
-+
-+## cleanup the $(srcdir) in the Makefile if we are outside of the tree
-+if test "x${srcdir-.}" != "x."; then
-+	SAMBA_CPPFLAGS=`echo ${SAMBA_CPPFLAGS} | sed -e "s;${srcdir};\$\(srcdir\);g"`
- fi
+-fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_uint_t" >&5
 -$as_echo "$ac_cv_type_uint_t" >&6; }
 -if test "x$ac_cv_type_uint_t" = x""yes; then
 -  :
 -else
- 
+-
 -cat >>confdefs.h <<_ACEOF
 -#define uint_t unsigned int
 -_ACEOF
- 
+-
 -fi
- 
+-
 -{ $as_echo "$as_me:$LINENO: checking for int8_t" >&5
 -$as_echo_n "checking for int8_t... " >&6; }
 -if test "${ac_cv_type_int8_t+set}" = set; then
@@ -8695,18 +8438,18 @@
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
- 
+-
 -	ac_cv_type_int8_t=yes
 -fi
- 
+-
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
- 
- 
+-
+-
 -fi
- 
+-
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_int8_t" >&5
@@ -8714,13 +8457,13 @@
 -if test "x$ac_cv_type_int8_t" = x""yes; then
 -  :
 -else
- 
+-
 -cat >>confdefs.h <<_ACEOF
 -#define int8_t char
 -_ACEOF
- 
+-
 -fi
- 
+-
 -{ $as_echo "$as_me:$LINENO: checking for uint8_t" >&5
 -$as_echo_n "checking for uint8_t... " >&6; }
 -if test "${ac_cv_type_uint8_t+set}" = set; then
@@ -8799,18 +8542,18 @@
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
- 
+-
 -	ac_cv_type_uint8_t=yes
 -fi
- 
+-
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
- 
- 
+-
+-
 -fi
- 
+-
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_uint8_t" >&5
@@ -8818,13 +8561,13 @@
 -if test "x$ac_cv_type_uint8_t" = x""yes; then
 -  :
 -else
- 
+-
 -cat >>confdefs.h <<_ACEOF
 -#define uint8_t unsigned char
 -_ACEOF
- 
+-
 -fi
- 
+-
 -{ $as_echo "$as_me:$LINENO: checking for int16_t" >&5
 -$as_echo_n "checking for int16_t... " >&6; }
 -if test "${ac_cv_type_int16_t+set}" = set; then
@@ -8903,18 +8646,18 @@
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
- 
+-
 -	ac_cv_type_int16_t=yes
 -fi
- 
+-
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
- 
- 
+-
+-
 -fi
- 
+-
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_int16_t" >&5
@@ -8922,13 +8665,13 @@
 -if test "x$ac_cv_type_int16_t" = x""yes; then
 -  :
 -else
- 
+-
 -cat >>confdefs.h <<_ACEOF
 -#define int16_t short
 -_ACEOF
- 
+-
 -fi
- 
+-
 -{ $as_echo "$as_me:$LINENO: checking for uint16_t" >&5
 -$as_echo_n "checking for uint16_t... " >&6; }
 -if test "${ac_cv_type_uint16_t+set}" = set; then
@@ -9007,18 +8750,18 @@
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
- 
+-
 -	ac_cv_type_uint16_t=yes
 -fi
- 
+-
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
- 
- 
+-
+-
 -fi
- 
+-
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_uint16_t" >&5
@@ -9026,14 +8769,14 @@
 -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
 -{ $as_echo "$as_me:$LINENO: checking for int32_t" >&5
 -$as_echo_n "checking for int32_t... " >&6; }
@@ -9113,67 +8856,32 @@
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
- 
+-
 -	ac_cv_type_int32_t=yes
 -fi
- 
+-
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
- 
- 
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+# compile with optimization and without debugging by default, but
-+# allow people to set their own preference.
-+# do this here since AC_CACHE_CHECK apparently sets the CFLAGS to "-g -O2"
-+# if it has no value.  This prevent *very* large debug binaries from occurring
-+# by default.
-+if test "x$debug" = "xyes" ; then
-+	CFLAGS="${CFLAGS} -g"
-+fi
-+if test "x$CFLAGS" = x; then
-+  CFLAGS="-O"
- fi
- 
+-
+-
+-fi
+-
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-+# Check whether --enable-socket-wrapper was given.
-+if test "${enable_socket_wrapper+set}" = set; then :
-+  enableval=$enable_socket_wrapper;
- fi
+-fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_int32_t" >&5
 -$as_echo "$ac_cv_type_int32_t" >&6; }
 -if test "x$ac_cv_type_int32_t" = x""yes; then
 -  :
 -else
- 
+-
 -cat >>confdefs.h <<_ACEOF
 -#define int32_t int
 -_ACEOF
- 
-+DEFAULT_TEST_OPTIONS=
-+HAVE_SOCKET_WRAPPER=no
-+
-+if eval "test x$developer = xyes"; then
-+	enable_socket_wrapper=yes
- fi
- 
+-
+-fi
+-
 -{ $as_echo "$as_me:$LINENO: checking for uint32_t" >&5
 -$as_echo_n "checking for uint32_t... " >&6; }
 -if test "${ac_cv_type_uint32_t+set}" = set; then
@@ -9252,57 +8960,32 @@
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+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
- 
+-
 -	ac_cv_type_uint32_t=yes
-+	# this is only used for samba3
-+	SOCKET_WRAPPER_OBJS="../lib/socket_wrapper/socket_wrapper.o"
- fi
- 
+-fi
+-
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
- 
- 
-+
-+
-+# Check whether --enable-nss-wrapper was given.
-+if test "${enable_nss_wrapper+set}" = set; then :
-+  enableval=$enable_nss_wrapper;
- fi
- 
+-
+-
+-fi
+-
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-+
-+HAVE_NSS_WRAPPER=no
-+
-+if eval "test x$developer = xyes"; then
-+	enable_nss_wrapper=yes
- fi
+-fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_uint32_t" >&5
 -$as_echo "$ac_cv_type_uint32_t" >&6; }
 -if test "x$ac_cv_type_uint32_t" = x""yes; then
 -  :
 -else
- 
+-
 -cat >>confdefs.h <<_ACEOF
 -#define uint32_t unsigned int
 -_ACEOF
-+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
- 
+-
+-fi
+-
 -elif test $ac_cv_size_long -eq 4 ; then
 -{ $as_echo "$as_me:$LINENO: checking for int32_t" >&5
 -$as_echo_n "checking for int32_t... " >&6; }
@@ -9385,15 +9068,15 @@
 -
 -	ac_cv_type_int32_t=yes
 -fi
- 
+-
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
- 
- 
+-
+-
 -fi
- 
+-
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_int32_t" >&5
@@ -9401,15 +9084,13 @@
 -if test "x$ac_cv_type_int32_t" = x""yes; then
 -  :
 -else
- 
+-
 -cat >>confdefs.h <<_ACEOF
 -#define int32_t long
 -_ACEOF
- 
+-
 -fi
-+SWAT_SBIN_TARGETS='bin/swat$(EXEEXT)'
-+SWAT_INSTALL_TARGETS=installswat
- 
+-
 -{ $as_echo "$as_me:$LINENO: checking for uint32_t" >&5
 -$as_echo_n "checking for uint32_t... " >&6; }
 -if test "${ac_cv_type_uint32_t+set}" = set; then
@@ -9488,27 +9169,18 @@
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+# Check whether --enable-swat was given.
-+if test "${enable_swat+set}" = set; then :
-+  enableval=$enable_swat;
-+    case "$enable_swat" in
-+	no)
-+	    SWAT_SBIN_TARGETS=''
-+	    SWAT_INSTALL_TARGETS=''
-+	    ;;
-+    esac
- 
+-
 -	ac_cv_type_uint32_t=yes
- fi
- 
+-fi
+-
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
- 
- 
+-
+-
 -fi
- 
+-
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_uint32_t" >&5
@@ -9516,46 +9188,24 @@
 -if test "x$ac_cv_type_uint32_t" = x""yes; then
 -  :
 -else
- 
+-
 -cat >>confdefs.h <<_ACEOF
 -#define uint32_t unsigned long
 -_ACEOF
- 
+-
 -fi
- 
-+# Probe the gcc version for extra CFLAGS. We always stash these in
-+# DEVELOPER_CFLAGS, so that you can turn them on and off with a simple
-+# Makefile edit, avoiding the need to re-run configure.
-+if test x"$ac_cv_c_compiler_gnu" = x"yes" ; then
-+    	DEVELOPER_CFLAGS="-g -Wall -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -DDEBUG_PASSWORD -DDEVELOPER"
-+	# Add -Wdeclaration-after-statement if compiler supports it
-+	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that the C compiler understands -Wdeclaration-after-statement" >&5
-+$as_echo_n "checking that the C compiler understands -Wdeclaration-after-statement... " >&6; }
-+if test "${samba_cv_HAVE_Wdeclaration_after_statement+set}" = set; then :
-+  $as_echo_n "(cached) " >&6
- else
+-
+-else
 -{ { $as_echo "$as_me:$LINENO: error: LIBREPLACE no 32-bit type found" >&5
 -$as_echo "$as_me: error: LIBREPLACE no 32-bit type found" >&2;}
 -   { (exit 1); exit 1; }; }
 -fi
- 
+-
 -{ $as_echo "$as_me:$LINENO: checking for int64_t" >&5
 -$as_echo_n "checking for int64_t... " >&6; }
 -if test "${ac_cv_type_int64_t+set}" = set; then
 -  $as_echo_n "(cached) " >&6
-+
-+	old_CFLAGS="$CFLAGS";
-+	CFLAGS="-Wdeclaration-after-statement";
-+	export CFLAGS;
-+	old_CPPFLAGS="$CPPFLAGS";
-+	CPPFLAGS="$CPPFLAGS";
-+	export CPPFLAGS;
-+	old_LDFLAGS="$LDFLAGS";
-+	LDFLAGS="$LDFLAGS";
-+	export LDFLAGS;
-+	if test "$cross_compiling" = yes; then :
-+  samba_cv_HAVE_Wdeclaration_after_statement=cross
- else
+-else
 -  ac_cv_type_int64_t=no
 -cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
@@ -9596,8 +9246,7 @@
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
+-/* end confdefs.h.  */
 -$ac_includes_default
 -int
 -main ()
@@ -9607,12 +9256,7 @@
 -  ;
 -  return 0;
 -}
-+
-+	    int main(void)
-+	    {
-+	    	return 0;
-+	    }
- _ACEOF
+-_ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -9632,38 +9276,21 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  :
-+if ac_fn_c_try_run "$LINENO"; then :
-+  samba_cv_HAVE_Wdeclaration_after_statement=yes
- else
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	ac_cv_type_int64_t=yes
-+  samba_cv_HAVE_Wdeclaration_after_statement=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
+-
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+	CFLAGS="$old_CFLAGS";
-+	old_CFLAGS="";
-+	export CFLAGS;
-+	CPPFLAGS="$old_CPPFLAGS";
-+	old_CPPFLAGS="";
-+	export CPPFLAGS;
-+	LDFLAGS="$old_LDFLAGS";
-+	old_LDFLAGS="";
-+	export LDFLAGS;
- 
- 
- fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $samba_cv_HAVE_Wdeclaration_after_statement" >&5
-+$as_echo "$samba_cv_HAVE_Wdeclaration_after_statement" >&6; }
- 
+-
+-
+-fi
+-
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_int64_t" >&5
@@ -9671,46 +9298,25 @@
 -if test "x$ac_cv_type_int64_t" = x""yes; then
 -  :
 -else
-+	if test x"$samba_cv_HAVE_Wdeclaration_after_statement" = x"yes"; then
-+	    DEVELOPER_CFLAGS="${DEVELOPER_CFLAGS} -Wdeclaration-after-statement"
-+	fi
- 
+-
 -cat >>confdefs.h <<_ACEOF
 -#define int64_t long long
 -_ACEOF
-+	#-Werror-implicit-function-declaration
-+	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that the C compiler understands -Werror-implicit-function-declaration" >&5
-+$as_echo_n "checking that the C compiler understands -Werror-implicit-function-declaration... " >&6; }
-+if test "${samba_cv_HAVE_Werror_implicit_function_declaration+set}" = set; then :
-+  $as_echo_n "(cached) " >&6
-+else
- 
+-
 -fi
- 
+-
 -{ $as_echo "$as_me:$LINENO: checking for uint64_t" >&5
 -$as_echo_n "checking for uint64_t... " >&6; }
 -if test "${ac_cv_type_uint64_t+set}" = set; then
 -  $as_echo_n "(cached) " >&6
-+	old_CFLAGS="$CFLAGS";
-+	CFLAGS="-Werror-implicit-function-declaration";
-+	export CFLAGS;
-+	old_CPPFLAGS="$CPPFLAGS";
-+	CPPFLAGS="$CPPFLAGS";
-+	export CPPFLAGS;
-+	old_LDFLAGS="$LDFLAGS";
-+	LDFLAGS="$LDFLAGS";
-+	export LDFLAGS;
-+	if test "$cross_compiling" = yes; then :
-+  samba_cv_HAVE_Werror_implicit_function_declaration=cross
- else
+-else
 -  ac_cv_type_uint64_t=no
 -cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
+-/* end confdefs.h.  */
 -$ac_includes_default
 -int
 -main ()
@@ -9754,12 +9360,7 @@
 -  ;
 -  return 0;
 -}
-+
-+	    int main(void)
-+	    {
-+	    	return 0;
-+	    }
- _ACEOF
+-_ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -9779,121 +9380,41 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  :
-+if ac_fn_c_try_run "$LINENO"; then :
-+  samba_cv_HAVE_Werror_implicit_function_declaration=yes
- else
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+  samba_cv_HAVE_Werror_implicit_function_declaration=no
-+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";
-+	old_CFLAGS="";
-+	export CFLAGS;
-+	CPPFLAGS="$old_CPPFLAGS";
-+	old_CPPFLAGS="";
-+	export CPPFLAGS;
-+	LDFLAGS="$old_LDFLAGS";
-+	old_LDFLAGS="";
-+	export LDFLAGS;
-+
- 
+-
 -	ac_cv_type_uint64_t=yes
- fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $samba_cv_HAVE_Werror_implicit_function_declaration" >&5
-+$as_echo "$samba_cv_HAVE_Werror_implicit_function_declaration" >&6; }
-+       if test x"$samba_cv_HAVE_Werror_implicit_function_declaration" = x"yes"; then
-+	    DEVELOPER_CFLAGS="${DEVELOPER_CFLAGS} -Werror-implicit-function-declaration"
-+       fi
- 
+-fi
+-
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+	# krb5developer is like developer, except we don't get
-+	# -Wstrict-prototypes.
-+       if test x"$krb5_developer" != x"$yes" ; then
-+	    DEVELOPER_CFLAGS="$DEVELOPER_CFLAGS -Wstrict-prototypes"
-+       fi
- 
-+       if test x"$picky_developer" = x"yes"; then
-+	    DEVELOPER_CFLAGS="$DEVELOPER_CFLAGS -Werror"
-+       fi
-+fi
- 
-+# Check whether --enable-dmalloc was given.
-+if test "${enable_dmalloc+set}" = set; then :
-+  enableval=$enable_dmalloc;
- fi
- 
+-
+-
+-fi
+-
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-+
-+if test "x$enable_dmalloc" = xyes
-+then
-+
-+$as_echo "#define ENABLE_DMALLOC 1" >>confdefs.h
-+
-+
-+$as_echo "#define DMALLOC_FUNC_CHECK 1" >>confdefs.h
-+
-+	LIBS="$LIBS -ldmalloc"
- fi
+-fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_uint64_t" >&5
 -$as_echo "$ac_cv_type_uint64_t" >&6; }
 -if test "x$ac_cv_type_uint64_t" = x""yes; then
 -  :
 -else
- 
+-
 -cat >>confdefs.h <<_ACEOF
 -#define uint64_t unsigned long long
 -_ACEOF
-+#################################################
-+# check for a shared memory profiling support
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use profiling" >&5
-+$as_echo_n "checking whether to use profiling... " >&6; }
-+
-+# Check whether --with-profiling-data was given.
-+if test "${with_profiling_data+set}" = set; then :
-+  withval=$with_profiling_data;  case "$withval" in
-+  yes)
-+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-+$as_echo "yes" >&6; }
-+
-+$as_echo "#define WITH_PROFILE 1" >>confdefs.h
-+
-+    samba_cv_WITH_PROFILE=yes
-+    ;;
-+  *)
-+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-+$as_echo "no" >&6; }
-+    samba_cv_WITH_PROFILE=no
-+    ;;
-+  esac
-+else
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-+$as_echo "no" >&6; }
- 
- fi
- 
- 
+-
+-fi
+-
+-
 -{ $as_echo "$as_me:$LINENO: checking for size_t" >&5
 -$as_echo_n "checking for size_t... " >&6; }
 -if test "${ac_cv_type_size_t+set}" = set; then
-+merged_build_possible=yes
-+
-+
-+for ac_prog in gawk mawk nawk awk
-+do
-+  # Extract the first word of "$ac_prog", so it can be a program name with args.
-+set dummy $ac_prog; ac_word=$2
-+{ $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_AWK+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
+-  $as_echo_n "(cached) " >&6
+-else
 -  ac_cv_type_size_t=no
 -cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
@@ -9964,49 +9485,21 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  :
-+  if test -n "$AWK"; then
-+  ac_cv_prog_AWK="$AWK" # Let the user override the test.
- else
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+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_AWK="$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
- 
+-
 -	ac_cv_type_size_t=yes
- fi
+-fi
 -
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-+fi
-+AWK=$ac_cv_prog_AWK
-+if test -n "$AWK"; then
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
-+$as_echo "$AWK" >&6; }
- else
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-+$as_echo "no" >&6; }
-+fi
- 
- 
+-
+-
 -fi
-+  test -n "$AWK" && break
-+done
-+
-+# Check for GNU make
- 
+-
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
@@ -10014,27 +9507,18 @@
 -if test "x$ac_cv_type_size_t" = x""yes; then
 -  :
 -else
- 
+-
 -cat >>confdefs.h <<_ACEOF
 -#define size_t unsigned int
 -_ACEOF
- 
+-
 -fi
- 
+-
 -{ $as_echo "$as_me:$LINENO: checking for ssize_t" >&5
 -$as_echo_n "checking for ssize_t... " >&6; }
 -if test "${ac_cv_type_ssize_t+set}" = set; then
-+
-+
-+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
+-  $as_echo_n "(cached) " >&6
+-else
 -  ac_cv_type_ssize_t=no
 -cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
@@ -10091,28 +9575,7 @@
 -case "(($ac_try" in
 -  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
 -  *) ac_try_echo=$ac_try;;
-+  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
+-esac
 -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 -$as_echo "$ac_try_echo") >&5
 -  (eval "$ac_compile") 2>conftest.er1
@@ -10126,64 +9589,36 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  :
-+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
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	ac_cv_type_ssize_t=yes
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-+$as_echo "no" >&6; }
- fi
- 
+-fi
+-
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+
-+  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
+-
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
+-fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
 -$as_echo "$ac_cv_type_ssize_t" >&6; }
 -if test "x$ac_cv_type_ssize_t" = x""yes; then
 -  :
-+{ $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
-+	true
- else
-+	merged_build_possible=no
-+fi
- 
+-else
+-
 -cat >>confdefs.h <<_ACEOF
 -#define ssize_t int
 -_ACEOF
- 
+-
 -fi
-+# Check for perl
- 
- 
+-
+-
 -# 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]];'.
@@ -11854,7 +11289,7 @@
 -
 -	{ $as_echo "$as_me:$LINENO: result: no" >&5
 -$as_echo "no" >&6; }
--                 if x$enable_external_libtalloc = xyes; then
+-                 if test "x$enable_external_libtalloc" = xyes; then
 -		 	{ { $as_echo "$as_me:$LINENO: error: Unable to find libtalloc" >&5
 -$as_echo "$as_me: error: Unable to find libtalloc" >&2;}
 -   { (exit 1); exit 1; }; }
@@ -11863,7 +11298,7 @@
 -		  fi
 -
 -elif test $pkg_failed = untried; then
--	 if x$enable_external_libtalloc = xyes; then
+-	 if test "x$enable_external_libtalloc" = xyes; then
 -		 	{ { $as_echo "$as_me:$LINENO: error: Unable to find libtalloc" >&5
 -$as_echo "$as_me: error: Unable to find libtalloc" >&2;}
 -   { (exit 1); exit 1; }; }
@@ -34536,14 +33971,16 @@
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
+ 
 -	ac_header_compiler=no
 -fi
--
++if test "x$enable_external_libtalloc" != xno
++then
+ 
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 -$as_echo "$ac_header_compiler" >&6; }
--
+ 
 -# Is the header present?
 -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
 -$as_echo_n "checking $ac_header presence... " >&6; }
@@ -34573,7 +34010,15 @@
 -	 test ! -s conftest.err
 -       }; then
 -  ac_header_preproc=yes
--else
++if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
++	if test -n "$ac_tool_prefix"; then
++  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
++set dummy ${ac_tool_prefix}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
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
@@ -34583,7 +34028,26 @@
 -rm -f conftest.err conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
 -$as_echo "$ac_header_preproc" >&6; }
--
++  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
+ 
 -# So?  What about this header?
 -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
 -  yes:no: )
@@ -34613,19 +34077,27 @@
 -_ASBOX
 -     ) | sed "s/^/$as_me: WARNING:     /" >&2
 -    ;;
--esac
++  ;;
+ esac
 -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
 -$as_echo_n "checking for $ac_header... " >&6; }
 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
 -  $as_echo_n "(cached) " >&6
--else
++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
 -  eval "$as_ac_Header=\$ac_header_preproc"
--fi
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
+ fi
 -ac_res=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
 -$as_echo "$ac_res" >&6; }
--
+ 
 -fi
 -as_val=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
@@ -34633,9 +34105,9 @@
 -  cat >>confdefs.h <<_ACEOF
 -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
 -_ACEOF
+ 
+ fi
 -
--fi
--
 -done
 -
 -
@@ -34646,8 +34118,15 @@
 -{ $as_echo "$as_me:$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 test -z "$ac_cv_path_PKG_CONFIG"; then
++  ac_pt_PKG_CONFIG=$PKG_CONFIG
++  # 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_ac_pt_PKG_CONFIG+set}" = set; then :
+   $as_echo_n "(cached) " >&6
+ else
 -  if test "$cross_compiling" = yes; then
 -  # Depending upon the size, compute the lo and hi bounds.
 -cat >conftest.$ac_ext <<_ACEOF
@@ -34699,7 +34178,26 @@
 -{
 -static int test_array [1 - 2 * !(((long int) (sizeof (int))) <= $ac_mid)];
 -test_array [0] = 0
--
++  case $ac_pt_PKG_CONFIG in
++  [\\/]* | ?:[\\/]*)
++  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_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_ac_pt_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
+ 
 -  ;
 -  return 0;
 -}
@@ -34709,7 +34207,8 @@
 -case "(($ac_try" in
 -  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
 -  *) ac_try_echo=$ac_try;;
--esac
++  ;;
+ esac
 -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 -$as_echo "$ac_try_echo") >&5
 -  (eval "$ac_compile") 2>conftest.er1
@@ -34733,11 +34232,15 @@
 -			  break
 -			fi
 -			ac_mid=`expr 2 '*' $ac_mid + 1`
--fi
+ fi
 -
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -  done
--else
++ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
++if test -n "$ac_pt_PKG_CONFIG"; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
++$as_echo "$ac_pt_PKG_CONFIG" >&6; }
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
@@ -34790,7 +34293,10 @@
 -{
 -static int test_array [1 - 2 * !(((long int) (sizeof (int))) >= $ac_mid)];
 -test_array [0] = 0
--
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++fi
+ 
 -  ;
 -  return 0;
 -}
@@ -34800,7 +34306,15 @@
 -case "(($ac_try" in
 -  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
 -  *) ac_try_echo=$ac_try;;
--esac
++  if test "x$ac_pt_PKG_CONFIG" = x; then
++    PKG_CONFIG=""
++  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
 -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 -$as_echo "$ac_try_echo") >&5
 -  (eval "$ac_compile") 2>conftest.er1
@@ -34814,7 +34328,9 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_lo=$ac_mid; break
--else
++    PKG_CONFIG=$ac_pt_PKG_CONFIG
++  fi
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
@@ -34824,8 +34340,9 @@
 -			  break
 -			fi
 -			ac_mid=`expr 2 '*' $ac_mid`
--fi
--
++  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
+ fi
+ 
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -  done
 -else
@@ -34833,11 +34350,23 @@
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	ac_lo= ac_hi=
--fi
--
+ fi
++if test -n "$PKG_CONFIG"; then
++	_pkg_min_version=0.9.0
++	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
++$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
++	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
++		{ $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; }
++		PKG_CONFIG=""
++	fi
+ 
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
--fi
--
+ 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
@@ -34854,7 +34383,10 @@
 -{
 -static int test_array [1 - 2 * !(((long int) (sizeof (int))) <= $ac_mid)];
 -test_array [0] = 0
--
++pkg_failed=no
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for TALLOC" >&5
++$as_echo_n "checking for TALLOC... " >&6; }
+ 
 -  ;
 -  return 0;
 -}
@@ -34868,7 +34400,14 @@
 -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 -$as_echo "$ac_try_echo") >&5
 -  (eval "$ac_compile") 2>conftest.er1
--  ac_status=$?
++if test -n "$PKG_CONFIG"; then
++    if test -n "$TALLOC_CFLAGS"; then
++        pkg_cv_TALLOC_CFLAGS="$TALLOC_CFLAGS"
++    else
++        if test -n "$PKG_CONFIG" && \
++    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"talloc >= 1.3.0\""; } >&5
++  ($PKG_CONFIG --exists --print-errors "talloc >= 1.3.0") 2>&5
+   ac_status=$?
 -  grep -v '^ *+' conftest.er1 >conftest.err
 -  rm -f conftest.er1
 -  cat conftest.err >&5
@@ -34878,12 +34417,16 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_hi=$ac_mid
--else
++  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++  test $ac_status = 0; }; then
++  pkg_cv_TALLOC_CFLAGS=`$PKG_CONFIG --cflags "talloc >= 1.3.0" 2>/dev/null`
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	ac_lo=`expr '(' $ac_mid ')' + 1`
--fi
++  pkg_failed=yes
+ fi
 -
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -done
@@ -34901,7 +34444,8 @@
 -     ac_cv_sizeof_int=0
 -   fi ;;
 -esac
--else
++    fi
+ else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
@@ -34961,11 +34505,23 @@
 -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 -$as_echo "$ac_try_echo") >&5
 -  (eval "$ac_try") 2>&5
--  ac_status=$?
++	pkg_failed=untried
++fi
++if test -n "$PKG_CONFIG"; then
++    if test -n "$TALLOC_LIBS"; then
++        pkg_cv_TALLOC_LIBS="$TALLOC_LIBS"
++    else
++        if test -n "$PKG_CONFIG" && \
++    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"talloc >= 1.3.0\""; } >&5
++  ($PKG_CONFIG --exists --print-errors "talloc >= 1.3.0") 2>&5
+   ac_status=$?
 -  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
 -  (exit $ac_status); }; }; then
 -  ac_cv_sizeof_int=`cat conftest.val`
--else
++  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++  test $ac_status = 0; }; then
++  pkg_cv_TALLOC_LIBS=`$PKG_CONFIG --libs "talloc >= 1.3.0" 2>/dev/null`
+ 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
@@ -34985,9 +34541,13 @@
 -fi
 -rm -rf conftest.dSYM
 -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
--fi
++  pkg_failed=yes
+ fi
 -rm -f conftest.val
--fi
++    fi
++else
++	pkg_failed=untried
+ fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
 -$as_echo "$ac_cv_sizeof_int" >&6; }
 -
@@ -34996,8 +34556,8 @@
 -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]];'.
@@ -35021,7 +34581,7 @@
 -{
 -static int test_array [1 - 2 * !(((long int) (sizeof (long))) >= 0)];
 -test_array [0] = 0
--
+ 
 -  ;
 -  return 0;
 -}
@@ -35058,7 +34618,8 @@
 -{
 -static int test_array [1 - 2 * !(((long int) (sizeof (long))) <= $ac_mid)];
 -test_array [0] = 0
--
++if test $pkg_failed = yes; then
+ 
 -  ;
 -  return 0;
 -}
@@ -35082,7 +34643,9 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_hi=$ac_mid; break
--else
++if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
++        _pkg_short_errors_supported=yes
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
@@ -35092,8 +34655,16 @@
 -			  break
 -			fi
 -			ac_mid=`expr 2 '*' $ac_mid + 1`
--fi
--
++        _pkg_short_errors_supported=no
+ fi
++        if test $_pkg_short_errors_supported = yes; then
++	        TALLOC_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "talloc >= 1.3.0"`
++        else
++	        TALLOC_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "talloc >= 1.3.0"`
++        fi
++	# Put the nasty error message in config.log where it belongs
++	echo "$TALLOC_PKG_ERRORS" >&5
+ 
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -  done
 -else
@@ -35112,7 +34683,14 @@
 -{
 -static int test_array [1 - 2 * !(((long int) (sizeof (long))) < 0)];
 -test_array [0] = 0
--
++	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++                 if test "x$enable_external_libtalloc" = xyes; then
++		 	as_fn_error "Unable to find libtalloc" "$LINENO" 5
++	      else
++			enable_external_libtalloc=no
++		  fi
+ 
 -  ;
 -  return 0;
 -}
@@ -35149,7 +34727,13 @@
 -{
 -static int test_array [1 - 2 * !(((long int) (sizeof (long))) >= $ac_mid)];
 -test_array [0] = 0
--
++elif test $pkg_failed = untried; then
++	 if test "x$enable_external_libtalloc" = xyes; then
++		 	as_fn_error "Unable to find libtalloc" "$LINENO" 5
++	      else
++			enable_external_libtalloc=no
++		  fi
+ 
 -  ;
 -  return 0;
 -}
@@ -35173,7 +34757,7 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_lo=$ac_mid; break
--else
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
@@ -35183,7 +34767,12 @@
 -			  break
 -			fi
 -			ac_mid=`expr 2 '*' $ac_mid`
--fi
++	TALLOC_CFLAGS=$pkg_cv_TALLOC_CFLAGS
++	TALLOC_LIBS=$pkg_cv_TALLOC_LIBS
++        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }
++	 enable_external_libtalloc=yes
+ fi
 -
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -  done
@@ -35192,11 +34781,25 @@
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	ac_lo= ac_hi=
--fi
--
+ fi
+ 
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
--fi
--
++if test "x$enable_external_libtalloc" != xyes
++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"
+ 
 -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
@@ -35213,7 +34816,7 @@
 -{
 -static int test_array [1 - 2 * !(((long int) (sizeof (long))) <= $ac_mid)];
 -test_array [0] = 0
--
+ 
 -  ;
 -  return 0;
 -}
@@ -35240,10 +34843,11 @@
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
++TALLOC_CFLAGS="-I$srcdir/$tallocdir"
+ 
 -	ac_lo=`expr '(' $ac_mid ')' + 1`
 -fi
--
+ 
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -done
 -case $ac_lo in
@@ -35275,7 +34879,8 @@
 -int
 -main ()
 -{
--
++TALLOC_LIBS=""
+ 
 -  FILE *f = fopen ("conftest.val", "w");
 -  if (! f)
 -    return 1;
@@ -35296,7 +34901,7 @@
 -  /* Do not output a trailing newline, as this causes \r\n confusion
 -     on some platforms.  */
 -  return ferror (f) || fclose (f) != 0;
--
+ 
 -  ;
 -  return 0;
 -}
@@ -35324,48 +34929,71 @@
 -  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
 -  (exit $ac_status); }; }; then
 -  ac_cv_sizeof_long=`cat conftest.val`
--else
++# 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
 -  $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
--
++  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t"        "$ac_includes_default"; then :
+ 
 -( exit $ac_status )
 -if test "$ac_cv_type_long" = yes; then
 -     { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
--$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
++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_echo "$as_me:$LINENO: error: cannot compute sizeof (long)
 -See \`config.log' for more details." >&5
 -$as_echo "$as_me: error: cannot compute sizeof (long)
 -See \`config.log' for more details." >&2;}
 -   { (exit 77); exit 77; }; }; }
--   else
++{ 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_long=0
--   fi
--fi
++     ac_cv_sizeof_size_t=0
+    fi
+ fi
 -rm -rf conftest.dSYM
 -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 -fi
 -rm -f conftest.val
--fi
++
+ fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
 -$as_echo "$ac_cv_sizeof_long" >&6; }
--
--
--
--cat >>confdefs.h <<_ACEOF
++{ $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_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.
++#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
+ _ACEOF
+ 
+ 
+@@ -35084,4202 +6782,2108 @@
+ # 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:$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
++{ $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 test "$cross_compiling" = yes; then
 -  # Depending upon the size, compute the lo and hi bounds.
 -cat >conftest.$ac_ext <<_ACEOF
@@ -35417,7 +35045,8 @@
 -{
 -static int test_array [1 - 2 * !(((long int) (sizeof (long long))) <= $ac_mid)];
 -test_array [0] = 0
--
++  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p"        "$ac_includes_default"; then :
+ 
 -  ;
 -  return 0;
 -}
@@ -35441,24 +35070,36 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_hi=$ac_mid; break
--else
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
++  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
+ 
 -	ac_lo=`expr $ac_mid + 1`
 -			if test $ac_lo -le $ac_mid; then
 -			  ac_lo= ac_hi=
 -			  break
 -			fi
 -			ac_mid=`expr 2 '*' $ac_mid + 1`
--fi
--
+ fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
++$as_echo "$ac_cv_sizeof_void_p" >&6; }
+ 
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -  done
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
+ 
 -	cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
@@ -35471,7 +35112,7 @@
 -{
 -static int test_array [1 - 2 * !(((long int) (sizeof (long long))) < 0)];
 -test_array [0] = 0
--
+ 
 -  ;
 -  return 0;
 -}
@@ -35498,7 +35139,9 @@
 -  while :; do
 -    cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
--_ACEOF
++cat >>confdefs.h <<_ACEOF
++#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
+ _ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
@@ -35508,7 +35151,7 @@
 -{
 -static int test_array [1 - 2 * !(((long int) (sizeof (long long))) >= $ac_mid)];
 -test_array [0] = 0
--
+ 
 -  ;
 -  return 0;
 -}
@@ -35535,27 +35178,54 @@
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
+ 
 -	ac_hi=`expr '(' $ac_mid ')' - 1`
 -			if test $ac_mid -le $ac_hi; then
 -			  ac_lo= ac_hi=
 -			  break
 -			fi
 -			ac_mid=`expr 2 '*' $ac_mid`
--fi
--
++
++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 at samba.org>" >&5
++$as_echo "$as_me: WARNING: please report this to <samba-technical at 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
+ 
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -  done
--else
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	ac_lo= ac_hi=
--fi
--
++	tallocdir=../lib/talloc
+ fi
+ 
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
--fi
--
++
++
++
++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
+ 
 -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
@@ -35572,11 +35242,30 @@
 -{
 -static int test_array [1 - 2 * !(((long int) (sizeof (long long))) <= $ac_mid)];
 -test_array [0] = 0
--
++TEVENT_OBJ=""
++TEVENT_CFLAGS=""
++TEVENT_LIBS=""
+ 
 -  ;
 -  return 0;
 -}
--_ACEOF
++
++
++
++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
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -35599,12 +35288,12 @@
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
+ 
 -	ac_lo=`expr '(' $ac_mid ')' + 1`
--fi
--
+ fi
+ 
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
--done
+ done
 -case $ac_lo in
 -?*) ac_cv_sizeof_long_long=$ac_lo;;
 -'') if test "$ac_cv_type_long_long" = yes; then
@@ -35655,11 +35344,17 @@
 -  /* Do not output a trailing newline, as this causes \r\n confusion
 -     on some platforms.  */
 -  return ferror (f) || fclose (f) != 0;
--
+ 
 -  ;
 -  return 0;
 -}
--_ACEOF
++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
 -rm -f conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -35687,7 +35382,7 @@
 -  $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
--
+ 
 -( exit $ac_status )
 -if test "$ac_cv_type_long_long" = yes; then
 -     { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
@@ -35700,22 +35395,38 @@
 -   else
 -     ac_cv_sizeof_long_long=0
 -   fi
--fi
+ fi
 -rm -rf conftest.dSYM
 -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
--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
 -rm -f conftest.val
--fi
++
++if test x"$VERSIONSCRIPT" != "x"; then
++    EXPORTSFILE=tevent.exports
++
+ fi
 -{ $as_echo "$as_me:$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
--
++LIBTEVENT_OBJ0=""
++for obj in ${TEVENT_OBJ}; do
++	LIBTEVENT_OBJ0="${LIBTEVENT_OBJ0} ${teventdir}/${obj}"
++done
  
++LIBS="${LIBS} ${TEVENT_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]];'.
@@ -35723,17 +35434,8 @@
 -{ $as_echo "$as_me:$LINENO: checking size of short" >&5
 -$as_echo_n "checking size of short... " >&6; }
 -if test "${ac_cv_sizeof_short+set}" = set; then
-+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
+-  $as_echo_n "(cached) " >&6
+-else
 -  if test "$cross_compiling" = yes; then
 -  # Depending upon the size, compute the lo and hi bounds.
 -cat >conftest.$ac_ext <<_ACEOF
@@ -35748,7 +35450,10 @@
 -{
 -static int test_array [1 - 2 * !(((long int) (sizeof (short))) >= 0)];
 -test_array [0] = 0
--
++# TODO: These should come from m4_include(lib/tdb/libtdb.m4)
++# but currently this fails: things have to get merged from s4.
++tdbdir="../lib/tdb"
+ 
 -  ;
 -  return 0;
 -}
@@ -35785,7 +35490,8 @@
 -{
 -static int test_array [1 - 2 * !(((long int) (sizeof (short))) <= $ac_mid)];
 -test_array [0] = 0
--
++TDB_CFLAGS="-I${srcdir-.}/$tdbdir/include"
+ 
 -  ;
 -  return 0;
 -}
@@ -35812,39 +35518,44 @@
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
+ 
 -	ac_lo=`expr $ac_mid + 1`
 -			if test $ac_lo -le $ac_mid; then
 -			  ac_lo= ac_hi=
 -			  break
 -			fi
 -			ac_mid=`expr 2 '*' $ac_mid + 1`
--fi
--
--rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-+  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
++LIBTDB_OBJ0=""
++for o in common/tdb.o common/dump.o common/transaction.o common/error.o \
++	     common/traverse.o common/freelist.o common/freelistcheck.o \
++		 common/io.o common/lock.o common/open.o;
 +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
++	LIBTDB_OBJ0="$LIBTDB_OBJ0 $tdbdir/$o"
 +done
-   done
++
++
++SAMBA_CPPFLAGS="-Iinclude -I${srcdir-.}/include  -I. -I${srcdir-.}"
++SAMBA_CPPFLAGS="${SAMBA_CPPFLAGS} -I${srcdir-.}/../lib/replace"
++SAMBA_CPPFLAGS="${SAMBA_CPPFLAGS} ${TALLOC_CFLAGS}"
++SAMBA_CPPFLAGS="${SAMBA_CPPFLAGS} ${TEVENT_CFLAGS}"
++SAMBA_CPPFLAGS="${SAMBA_CPPFLAGS} ${TDB_CFLAGS}"
++SAMBA_CPPFLAGS="${SAMBA_CPPFLAGS} -I${srcdir-.}/libaddns"
++SAMBA_CPPFLAGS="${SAMBA_CPPFLAGS} -I${srcdir-.}/librpc"
++SAMBA_CPPFLAGS="${SAMBA_CPPFLAGS} -I${srcdir-.}/.."
++
++SAMBA_CONFIGURE_CPPFLAGS="${SAMBA_CPPFLAGS} -I${srcdir-.}/../lib/popt"
++
++## cleanup the $(srcdir) in the Makefile if we are outside of the tree
++if test "x${srcdir-.}" != "x."; then
++	SAMBA_CPPFLAGS=`echo ${SAMBA_CPPFLAGS} | sed -e "s;${srcdir};\$\(srcdir\);g"`
+ fi
+ 
+-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+-  done
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
+ 
 -	cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
@@ -35857,7 +35568,7 @@
 -{
 -static int test_array [1 - 2 * !(((long int) (sizeof (short))) < 0)];
 -test_array [0] = 0
--
+ 
 -  ;
 -  return 0;
 -}
@@ -35894,7 +35605,6 @@
 -{
 -static int test_array [1 - 2 * !(((long int) (sizeof (short))) >= $ac_mid)];
 -test_array [0] = 0
-+IFS=$as_save_IFS
  
 -  ;
 -  return 0;
@@ -35905,9 +35615,7 @@
 -case "(($ac_try" in
 -  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
 -  *) ac_try_echo=$ac_try;;
-+  test -z "$ac_cv_path_PERL" && ac_cv_path_PERL=""""
-+  ;;
- esac
+-esac
 -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 -$as_echo "$ac_try_echo") >&5
 -  (eval "$ac_compile") 2>conftest.er1
@@ -35924,32 +35632,26 @@
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
+ 
 -	ac_hi=`expr '(' $ac_mid ')' - 1`
 -			if test $ac_mid -le $ac_hi; then
 -			  ac_lo= ac_hi=
 -			  break
 -			fi
 -			ac_mid=`expr 2 '*' $ac_mid`
- fi
--
+-fi
+ 
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -  done
-+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
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
+ 
 -	ac_lo= ac_hi=
 -fi
--
+ 
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-+$as_echo "no" >&6; }
- fi
+-fi
  
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -# Binary search between lo and hi bounds.
@@ -35991,39 +35693,15 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_hi=$ac_mid
-+		;;
-+	*)
-+		# 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
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
+ 
 -	ac_lo=`expr '(' $ac_mid ')' + 1`
 -fi
--
+ 
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-+  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
 -case $ac_lo in
 -?*) ac_cv_sizeof_short=$ac_lo;;
 -'') if test "$ac_cv_type_short" = yes; then
@@ -36053,7 +35731,7 @@
 -int
 -main ()
 -{
--
+ 
 -  FILE *f = fopen ("conftest.val", "w");
 -  if (! f)
 -    return 1;
@@ -36074,8 +35752,6 @@
 -  /* Do not output a trailing newline, as this causes \r\n confusion
 -     on some platforms.  */
 -  return ferror (f) || fclose (f) != 0;
-+  done
-+IFS=$as_save_IFS
  
 -  ;
 -  return 0;
@@ -36096,8 +35772,7 @@
 -  { (case "(($ac_try" in
 -  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
 -  *) ac_try_echo=$ac_try;;
-+  ;;
- esac
+-esac
 -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 -$as_echo "$ac_try_echo") >&5
 -  (eval "$ac_try") 2>&5
@@ -36109,7 +35784,7 @@
 -  $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
--
+ 
 -( exit $ac_status )
 -if test "$ac_cv_type_short" = yes; then
 -     { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
@@ -36122,61 +35797,35 @@
 -   else
 -     ac_cv_sizeof_short=0
 -   fi
- fi
+-fi
 -rm -rf conftest.dSYM
 -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 -fi
 -rm -f conftest.val
-+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
+-fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
 -$as_echo "$ac_cv_sizeof_short" >&6; }
  
  
-+		;;
-+esac
  
 -cat >>confdefs.h <<_ACEOF
 -#define SIZEOF_SHORT $ac_cv_sizeof_short
 -_ACEOF
--
-+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;}
-+	merged_build_possible=no
-+else
-+	if test x"$debug" = x"yes";then
-+		PERL="$PERL -W"
-+	fi
-+	export PERL
-+	true
-+fi
  
  
+ 
 -{ $as_echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
 -$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
 -if test "${ac_cv_c_const+set}" = set; then
-+if test -n "$ac_tool_prefix"; then
-+  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
-+set dummy ${ac_tool_prefix}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_prog_AR+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
+-  $as_echo_n "(cached) " >&6
+-else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
--
+ 
 -int
 -main ()
 -{
@@ -36204,7 +35853,7 @@
 -  { /* SCO 3.2v4 cc rejects this.  */
 -    char *t;
 -    char const *s = 0 ? (char *) 0 : (char const *) 0;
--
+ 
 -    *t++ = 0;
 -    if (s) return 0;
 -  }
@@ -36229,7 +35878,7 @@
 -  }
 -  return !cs[0] && !zero.x;
 -#endif
--
+ 
 -  ;
 -  return 0;
 -}
@@ -36253,41 +35902,25 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_cv_c_const=yes
-+  if test -n "$AR"; then
-+  ac_cv_prog_AR="$AR" # Let the user override the test.
- else
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
+ 
 -	ac_cv_c_const=no
 -fi
-+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_AR="${ac_tool_prefix}ar"
-+    $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
  
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
+-fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
 -$as_echo "$ac_cv_c_const" >&6; }
 -if test $ac_cv_c_const = no; then
--
+ 
 -cat >>confdefs.h <<\_ACEOF
 -#define const /**/
 -_ACEOF
--
- fi
--
+ 
+-fi
+ 
 -{ $as_echo "$as_me:$LINENO: checking for inline" >&5
 -$as_echo_n "checking for inline... " >&6; }
 -if test "${ac_cv_c_inline+set}" = set; then
@@ -36306,7 +35939,7 @@
 -static $ac_kw foo_t static_foo () {return 0; }
 -$ac_kw foo_t foo () {return 0; }
 -#endif
--
+ 
 -_ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
@@ -36327,28 +35960,59 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_cv_c_inline=$ac_kw
-+AR=$ac_cv_prog_AR
-+if test -n "$AR"; then
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
-+$as_echo "$AR" >&6; }
- else
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
--
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-+$as_echo "no" >&6; }
- fi
  
+ 
+-fi
+ 
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -  test "$ac_cv_c_inline" != no && break
 -done
  
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++# compile with optimization and without debugging by default, but
++# allow people to set their own preference.
++# do this here since AC_CACHE_CHECK apparently sets the CFLAGS to "-g -O2"
++# if it has no value.  This prevent *very* large debug binaries from occurring
++# by default.
++if test "x$debug" = "xyes" ; then
++	CFLAGS="${CFLAGS} -g"
++fi
++if test "x$CFLAGS" = x; then
++  CFLAGS="-O"
  fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
 -$as_echo "$ac_cv_c_inline" >&6; }
--
--
+ 
++# Check whether --enable-socket-wrapper was given.
++if test "${enable_socket_wrapper+set}" = set; then :
++  enableval=$enable_socket_wrapper;
++fi
+ 
 -case $ac_cv_c_inline in
 -  inline | yes) ;;
 -  *)
@@ -36363,20 +36027,15 @@
 -_ACEOF
 -    ;;
 -esac
--
--
+ 
++DEFAULT_TEST_OPTIONS=
++HAVE_SOCKET_WRAPPER=no
+ 
 - { $as_echo "$as_me:$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
-+if test -z "$ac_cv_prog_AR"; then
-+  ac_ct_AR=$AR
-+  # 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_prog_ac_ct_AR+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
+-  $as_echo_n "(cached) " >&6
+-else
 -  ac_cv_c_bigendian=unknown
 -    # See if we're dealing with a universal compiler.
 -    cat >conftest.$ac_ext <<_ACEOF
@@ -36389,7 +36048,10 @@
 -	       not a universal capable compiler
 -	     #endif
 -	     typedef int dummy;
--
++if eval "test x$developer = xyes"; then
++	enable_socket_wrapper=yes
++fi
+ 
 -_ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
@@ -36409,23 +36071,7 @@
 -	 test -z "$ac_c_werror_flag" ||
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
-+  if test -n "$ac_ct_AR"; then
-+  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # 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_AR="ar"
-+    $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 eval "test x$enable_socket_wrapper = xyes"; then
  
 -	# Check for potential -arch flags.  It is not universal unless
 -	# there are some -arch flags.  Note that *ppc* also matches
@@ -36433,19 +36079,16 @@
 -	case "${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}" in  #(
 -	  *-arch*ppc*|*-arch*i386*|*-arch*x86_64*) ac_cv_c_bigendian=universal;;
 -	esac
-+fi
-+fi
-+ac_ct_AR=$ac_cv_prog_ac_ct_AR
-+if test -n "$ac_ct_AR"; then
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
-+$as_echo "$ac_ct_AR" >&6; }
- else
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
--
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-+$as_echo "no" >&6; }
++$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
  
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
@@ -36459,7 +36102,7 @@
 -/* end confdefs.h.  */
 -#include <sys/types.h>
 -	     #include <sys/param.h>
--
+ 
 -int
 -main ()
 -{
@@ -36468,7 +36111,7 @@
 -		     && LITTLE_ENDIAN)
 -	      bogus endian macros
 -	     #endif
--
+ 
 -  ;
 -  return 0;
 -}
@@ -36478,15 +36121,7 @@
 -case "(($ac_try" in
 -  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
 -  *) ac_try_echo=$ac_try;;
-+  if test "x$ac_ct_AR" = x; then
-+    AR=""
-+  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
+-esac
 -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 -$as_echo "$ac_try_echo") >&5
 -  (eval "$ac_compile") 2>conftest.er1
@@ -36508,11 +36143,6 @@
 -/* end confdefs.h.  */
 -#include <sys/types.h>
 -		#include <sys/param.h>
-+    AR=$ac_ct_AR
-+  fi
-+else
-+  AR="$ac_cv_prog_AR"
-+fi
  
 -int
 -main ()
@@ -36544,79 +36174,36 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_cv_c_bigendian=yes
-+LD=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
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+  # 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
++# Check whether --enable-nss-wrapper was given.
++if test "${enable_nss_wrapper+set}" = set; then :
++  enableval=$enable_nss_wrapper;
 +fi
-+fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gnu_ld" >&5
-+$as_echo "$ac_cv_prog_gnu_ld" >&6; }
 +
  
 -	ac_cv_c_bigendian=no
-+if test "$ac_cv_prog_gnu_ld" = "yes"; then
-+	ac_cv_gnu_ld_version=`$LD -v 2>/dev/null | head -1`
-+	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking GNU ld release date" >&5
-+$as_echo_n "checking GNU ld release date... " >&6; }
-+		ac_cv_gnu_ld_date=`echo $ac_cv_gnu_ld_version | sed -n 's,^.*\([2-9][0-9][0-9][0-9]\)[-]*\([01][0-9]\)[-]*\([0-3][0-9]\).*$,\1\2\3,p'`
-+		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_cv_gnu_ld_date}" >&5
-+$as_echo "${ac_cv_gnu_ld_date}" >&6; }
-+        if test -n "$ac_cv_gnu_ld_date"; then
-+ 	if test "$ac_cv_gnu_ld_date" -lt 20030217; then
-+ 		ac_cv_gnu_ld_no_default_allow_shlib_undefined=yes
-+ 	fi
-+	if test "$ac_cv_gnu_ld_date" -gt 20030101; then
-+		ac_cv_gnu_ld_version_script=yes
-+	fi
-+        else
-+           { $as_echo "$as_me:${as_lineno-$LINENO}: checking GNU ld release version" >&5
-+$as_echo_n "checking GNU ld release version... " >&6; }
-+                      ac_cv_gnu_ld_vernr=`echo $ac_cv_gnu_ld_version | sed -n 's,^[^0-9]*\([1-9][0-9]*\.[0-9][0-9]*\).*$,\1,p'`
-+           ac_cv_gnu_ld_vernr_major=`echo $ac_cv_gnu_ld_vernr | cut -d '.' -f 1`
-+           ac_cv_gnu_ld_vernr_minor=`echo $ac_cv_gnu_ld_vernr | cut -d '.' -f 2`
-+                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_cv_gnu_ld_vernr}" >&5
-+$as_echo "${ac_cv_gnu_ld_vernr}" >&6; }
-+           { $as_echo "$as_me:${as_lineno-$LINENO}: checking GNU ld release version major" >&5
-+$as_echo_n "checking GNU ld release version major... " >&6; }
-+           { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_cv_gnu_ld_vernr_major}" >&5
-+$as_echo "${ac_cv_gnu_ld_vernr_major}" >&6; }
-+           { $as_echo "$as_me:${as_lineno-$LINENO}: checking GNU ld release version minor" >&5
-+$as_echo_n "checking GNU ld release version minor... " >&6; }
-+           { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_cv_gnu_ld_vernr_minor}" >&5
-+$as_echo "${ac_cv_gnu_ld_vernr_minor}" >&6; }
-+           if test "$ac_cv_gnu_ld_vernr_major" -lt 2 || test "$ac_cv_gnu_ld_vernr_minor" -lt 14; then
-+             ac_cv_gnu_ld_no_default_allow_shlib_undefined=yes
-+           fi
-+           if test "$ac_cv_gnu_ld_vernr_major" -gt 2 || test "$ac_cv_gnu_ld_vernr_major" = 2 && test "$ac_cv_gnu_ld_vernr_minor" -ge 12; then
-+             ac_cv_gnu_ld_version_script=yes
-+           fi
-+        fi
++HAVE_NSS_WRAPPER=no
++
++if eval "test x$developer = xyes"; then
++	enable_nss_wrapper=yes
  fi
  
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
++if eval "test x$enable_nss_wrapper = xyes"; then
++
++$as_echo "#define NSS_WRAPPER 1" >>confdefs.h
  
++	HAVE_NSS_WRAPPER=yes
  
-+if test "x$CC" != xcc; then
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5
-+$as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; }
-+else
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5
-+$as_echo_n "checking whether cc understands -c and -o together... " >&6; }
++	# this is only used for samba3
++	NSS_WRAPPER_OBJS="../lib/nss_wrapper/nss_wrapper.o"
  fi
--
+ 
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -    fi
 -    if test $ac_cv_c_bigendian = unknown; then
@@ -36626,45 +36213,30 @@
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+set dummy $CC; ac_cc=`$as_echo "$2" |
-+		      sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
-+if { as_var=ac_cv_prog_cc_${ac_cc}_c_o; eval "test \"\${$as_var+set}\" = set"; }; then :
-+  $as_echo_n "(cached) " >&6
-+else
-+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
+-/* end confdefs.h.  */
 -#include <limits.h>
  
- int
- main ()
- {
+-int
+-main ()
+-{
 -#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
 -	      bogus endian macros
 -	     #endif
  
-   ;
-   return 0;
- }
- _ACEOF
+-  ;
+-  return 0;
+-}
+-_ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
-+# Make sure it works both with $CC and with simple cc.
-+# We do the test twice because some compilers refuse to overwrite an
-+# existing .o file with -o, though they will create one.
-+ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
-+rm -f conftest2.*
-+if { { case "(($ac_try" in
-   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-   *) ac_try_echo=$ac_try;;
- esac
+-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+-  *) ac_try_echo=$ac_try;;
+-esac
 -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 -$as_echo "$ac_try_echo") >&5
 -  (eval "$ac_compile") 2>conftest.er1
-+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=$?
+-  ac_status=$?
 -  grep -v '^ *+' conftest.er1 >conftest.err
 -  rm -f conftest.er1
 -  cat conftest.err >&5
@@ -36681,14 +36253,14 @@
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
 -#include <limits.h>
--
+ 
 -int
 -main ()
 -{
 -#ifndef _BIG_ENDIAN
 -		 not big endian
 -		#endif
--
+ 
 -  ;
 -  return 0;
 -}
@@ -36696,19 +36268,13 @@
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
-+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-+  test $ac_status = 0; } &&
-+   test -f conftest2.$ac_objext && { { case "(($ac_try" in
-   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-   *) ac_try_echo=$ac_try;;
- esac
+-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+-  *) ac_try_echo=$ac_try;;
+-esac
 -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 -$as_echo "$ac_try_echo") >&5
 -  (eval "$ac_compile") 2>conftest.er1
-+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=$?
+-  ac_status=$?
 -  grep -v '^ *+' conftest.er1 >conftest.err
 -  rm -f conftest.er1
 -  cat conftest.err >&5
@@ -36721,18 +36287,29 @@
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
+ 
 -	ac_cv_c_bigendian=no
 -fi
--
+ 
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
--
--fi
--
++SWAT_SBIN_TARGETS='bin/swat$(EXEEXT)'
++SWAT_INSTALL_TARGETS=installswat
+ 
++# Check whether --enable-swat was given.
++if test "${enable_swat+set}" = set; then :
++  enableval=$enable_swat;
++    case "$enable_swat" in
++	no)
++	    SWAT_SBIN_TARGETS=''
++	    SWAT_INSTALL_TARGETS=''
++	    ;;
++    esac
+ 
+ fi
+ 
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -    fi
 -    if test $ac_cv_c_bigendian = unknown; then
@@ -36760,7 +36337,7 @@
 -		  return ebcdic_mm[i] + ebcdic_ii[i];
 -		}
 -		extern int foo;
--
+ 
 -int
 -main ()
 -{
@@ -36772,24 +36349,13 @@
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
-+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-+  test $ac_status = 0; };
-+then
-+  eval ac_cv_prog_cc_${ac_cc}_c_o=yes
-+  if test "x$CC" != xcc; then
-+    # Test first that cc exists at all.
-+    if { ac_try='cc -c conftest.$ac_ext >&5'
-+  { { case "(($ac_try" in
-   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-   *) ac_try_echo=$ac_try;;
- esac
+-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+-  *) ac_try_echo=$ac_try;;
+-esac
 -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 -$as_echo "$ac_try_echo") >&5
 -  (eval "$ac_compile") 2>conftest.er1
-+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=$?
+-  ac_status=$?
 -  grep -v '^ *+' conftest.er1 >conftest.err
 -  rm -f conftest.er1
 -  cat conftest.err >&5
@@ -36812,12 +36378,24 @@
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
--
+ 
+ 
 -fi
--
+ 
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
--else
++
++
++# Probe the gcc version for extra CFLAGS. We always stash these in
++# DEVELOPER_CFLAGS, so that you can turn them on and off with a simple
++# Makefile edit, avoiding the need to re-run configure.
++if test x"$ac_cv_c_compiler_gnu" = x"yes" ; then
++    	DEVELOPER_CFLAGS="-g -Wall -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -DDEBUG_PASSWORD -DDEVELOPER"
++	# Add -Wdeclaration-after-statement if compiler supports it
++	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that the C compiler understands -Wdeclaration-after-statement" >&5
++$as_echo_n "checking that the C compiler understands -Wdeclaration-after-statement... " >&6; }
++if test "${samba_cv_HAVE_Wdeclaration_after_statement+set}" = set; then :
++  $as_echo_n "(cached) " >&6
+ else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
@@ -36828,7 +36406,7 @@
 -int
 -main ()
 -{
--
+ 
 -	     /* Are we little or big endian?  From Harbison&Steele.  */
 -	     union
 -	     {
@@ -36837,7 +36415,7 @@
 -	     } u;
 -	     u.l = 1;
 -	     return u.c[sizeof (long int) - 1] == 1;
--
+ 
 -  ;
 -  return 0;
 -}
@@ -36845,75 +36423,74 @@
 -rm -f conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
-+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-+  test $ac_status = 0; }; }; then
-+      ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
-+      rm -f conftest2.*
-+      if { { case "(($ac_try" in
-   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-   *) ac_try_echo=$ac_try;;
- esac
+-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+-  *) ac_try_echo=$ac_try;;
+-esac
 -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 -$as_echo "$ac_try_echo") >&5
 -  (eval "$ac_link") 2>&5
-+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=$?
+-  ac_status=$?
 -  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
 -  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
 -  { (case "(($ac_try" in
-+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-+  test $ac_status = 0; } &&
-+	 test -f conftest2.$ac_objext && { { case "(($ac_try" in
-   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-   *) ac_try_echo=$ac_try;;
- esac
+-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+-  *) ac_try_echo=$ac_try;;
+-esac
 -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 -$as_echo "$ac_try_echo") >&5
-+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=$?
+-  (eval "$ac_try") 2>&5
+-  ac_status=$?
 -  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
 -  (exit $ac_status); }; }; then
 -  ac_cv_c_bigendian=no
-+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-+  test $ac_status = 0; };
-+      then
-+	# cc works too.
-+	:
-+      else
-+	# cc exists but doesn't like -o.
-+	eval ac_cv_prog_cc_${ac_cc}_c_o=no
-+      fi
-+    fi
-+  fi
++	old_CFLAGS="$CFLAGS";
++	CFLAGS="-Wdeclaration-after-statement";
++	export CFLAGS;
++	old_CPPFLAGS="$CPPFLAGS";
++	CPPFLAGS="$CPPFLAGS";
++	export CPPFLAGS;
++	old_LDFLAGS="$LDFLAGS";
++	LDFLAGS="$LDFLAGS";
++	export LDFLAGS;
++	if test "$cross_compiling" = yes; then :
++  samba_cv_HAVE_Wdeclaration_after_statement=cross
  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
--
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
+ 
 -( exit $ac_status )
 -ac_cv_c_bigendian=yes
-+  eval ac_cv_prog_cc_${ac_cc}_c_o=no
++	    int main(void)
++	    {
++	    	return 0;
++	    }
++_ACEOF
++if ac_fn_c_try_run "$LINENO"; then :
++  samba_cv_HAVE_Wdeclaration_after_statement=yes
++else
++  samba_cv_HAVE_Wdeclaration_after_statement=no
  fi
 -rm -rf conftest.dSYM
 -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-+rm -f core conftest*
-+
++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
++  conftest.$ac_objext conftest.beam conftest.$ac_ext
  fi
-+if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then
-+  { $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; }
  
-+$as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h
++	CFLAGS="$old_CFLAGS";
++	old_CFLAGS="";
++	export CFLAGS;
++	CPPFLAGS="$old_CPPFLAGS";
++	old_CPPFLAGS="";
++	export CPPFLAGS;
++	LDFLAGS="$old_LDFLAGS";
++	old_LDFLAGS="";
++	export LDFLAGS;
  
 -    fi
- fi
+-fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
 -$as_echo "$ac_cv_c_bigendian" >&6; }
 - case $ac_cv_c_bigendian in #(
@@ -36938,19 +36515,21 @@
 - presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
 -   { (exit 1); exit 1; }; } ;;
 - esac
-+if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then
-+      BROKEN_CC=
-+else
-+      BROKEN_CC=#
 +fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $samba_cv_HAVE_Wdeclaration_after_statement" >&5
++$as_echo "$samba_cv_HAVE_Wdeclaration_after_statement" >&6; }
  
++	if test x"$samba_cv_HAVE_Wdeclaration_after_statement" = x"yes"; then
++	    DEVELOPER_CFLAGS="${DEVELOPER_CFLAGS} -Wdeclaration-after-statement"
++	fi
  
 -{ $as_echo "$as_me:$LINENO: checking whether char is unsigned" >&5
 -$as_echo_n "checking whether char is unsigned... " >&6; }
 -if test "${ac_cv_c_char_unsigned+set}" = set; then
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that the C compiler understands -Werror" >&5
-+$as_echo_n "checking that the C compiler understands -Werror... " >&6; }
-+if test "${samba_cv_HAVE_Werror+set}" = set; then :
++	#-Werror-implicit-function-declaration
++	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that the C compiler understands -Werror-implicit-function-declaration" >&5
++$as_echo_n "checking that the C compiler understands -Werror-implicit-function-declaration... " >&6; }
++if test "${samba_cv_HAVE_Werror_implicit_function_declaration+set}" = set; then :
    $as_echo_n "(cached) " >&6
  else
 -  cat >conftest.$ac_ext <<_ACEOF
@@ -36961,7 +36540,7 @@
 +
 +
 +	old_CFLAGS="$CFLAGS";
-+	CFLAGS="-Werror";
++	CFLAGS="-Werror-implicit-function-declaration";
 +	export CFLAGS;
 +	old_CPPFLAGS="$CPPFLAGS";
 +	CPPFLAGS="$CPPFLAGS";
@@ -36970,7 +36549,7 @@
 +	LDFLAGS="$LDFLAGS";
 +	export LDFLAGS;
 +	if test "$cross_compiling" = yes; then :
-+  samba_cv_HAVE_Werror=cross
++  samba_cv_HAVE_Werror_implicit_function_declaration=cross
 +else
 +  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
@@ -36984,10 +36563,10 @@
 -  ;
 -  return 0;
 -}
-+  int main(void)
-+  {
-+  	return 0;
-+  }
++	    int main(void)
++	    {
++	    	return 0;
++	    }
  _ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
@@ -37009,25 +36588,15 @@
 -       } && test -s conftest.$ac_objext; then
 -  ac_cv_c_char_unsigned=no
 +if ac_fn_c_try_run "$LINENO"; then :
-+  samba_cv_HAVE_Werror=yes
++  samba_cv_HAVE_Werror_implicit_function_declaration=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
--	ac_cv_c_char_unsigned=yes
-+  samba_cv_HAVE_Werror=no
- fi
--
--rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++  samba_cv_HAVE_Werror_implicit_function_declaration=no
++fi
 +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
 +  conftest.$ac_objext conftest.beam conftest.$ac_ext
- fi
--{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
--$as_echo "$ac_cv_c_char_unsigned" >&6; }
--if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
--  cat >>confdefs.h <<\_ACEOF
--#define __CHAR_UNSIGNED__ 1
--_ACEOF
++fi
 +
 +	CFLAGS="$old_CFLAGS";
 +	old_CFLAGS="";
@@ -37038,45 +36607,55 @@
 +	LDFLAGS="$old_LDFLAGS";
 +	old_LDFLAGS="";
 +	export LDFLAGS;
++
  
+-	ac_cv_c_char_unsigned=yes
  fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $samba_cv_HAVE_Werror" >&5
-+$as_echo "$samba_cv_HAVE_Werror" >&6; }
-+if test x"$samba_cv_HAVE_Werror" = x"yes"; then
-+   Werror_FLAGS="-Werror"
-+else
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that the C compiler understands -w2" >&5
-+$as_echo_n "checking that the C compiler understands -w2... " >&6; }
-+if test "${samba_cv_HAVE_w2+set}" = set; then :
-+  $as_echo_n "(cached) " >&6
-+else
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $samba_cv_HAVE_Werror_implicit_function_declaration" >&5
++$as_echo "$samba_cv_HAVE_Werror_implicit_function_declaration" >&6; }
++       if test x"$samba_cv_HAVE_Werror_implicit_function_declaration" = x"yes"; then
++	    DEVELOPER_CFLAGS="${DEVELOPER_CFLAGS} -Werror-implicit-function-declaration"
++       fi
  
+-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++	# krb5developer is like developer, except we don't get
++	# -Wstrict-prototypes.
++       if test x"$krb5_developer" != x"$yes" ; then
++	    DEVELOPER_CFLAGS="$DEVELOPER_CFLAGS -Wstrict-prototypes"
++       fi
++
++       if test x"$picky_developer" = x"yes"; then
++	    DEVELOPER_CFLAGS="$DEVELOPER_CFLAGS -Werror"
++       fi
+ fi
+-{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
+-$as_echo "$ac_cv_c_char_unsigned" >&6; }
+-if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
+-  cat >>confdefs.h <<\_ACEOF
+-#define __CHAR_UNSIGNED__ 1
+-_ACEOF
  
++# Check whether --enable-dmalloc was given.
++if test "${enable_dmalloc+set}" = set; then :
++  enableval=$enable_dmalloc;
+ fi
+ 
+ 
 -{ $as_echo "$as_me:$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
-+	old_CFLAGS="$CFLAGS";
-+	CFLAGS="-w2";
-+	export CFLAGS;
-+	old_CPPFLAGS="$CPPFLAGS";
-+	CPPFLAGS="$CPPFLAGS";
-+	export CPPFLAGS;
-+	old_LDFLAGS="$LDFLAGS";
-+	LDFLAGS="$LDFLAGS";
-+	export LDFLAGS;
-+	if test "$cross_compiling" = yes; then :
-+  samba_cv_HAVE_w2=cross
- else
+-else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
+-/* end confdefs.h.  */
 -#include <sys/types.h>
 -#include <signal.h>
++if test "x$enable_dmalloc" = xyes
++then
  
 -int
 -main ()
@@ -37085,11 +36664,7 @@
 -  ;
 -  return 0;
 -}
-+  int main(void)
-+  {
-+  	return 0;
-+  }
- _ACEOF
+-_ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -37109,90 +36684,70 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_cv_type_signal=int
-+if ac_fn_c_try_run "$LINENO"; then :
-+  samba_cv_HAVE_w2=yes
- else
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
++$as_echo "#define ENABLE_DMALLOC 1" >>confdefs.h
+ 
 -	ac_cv_type_signal=void
-+  samba_cv_HAVE_w2=no
- fi
--
+-fi
+ 
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-+  conftest.$ac_objext conftest.beam conftest.$ac_ext
++$as_echo "#define DMALLOC_FUNC_CHECK 1" >>confdefs.h
++
++	LIBS="$LIBS -ldmalloc"
  fi
 -{ $as_echo "$as_me:$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
++#################################################
++# check for a shared memory profiling support
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use profiling" >&5
++$as_echo_n "checking whether to use profiling... " >&6; }
  
-+	CFLAGS="$old_CFLAGS";
-+	old_CFLAGS="";
-+	export CFLAGS;
-+	CPPFLAGS="$old_CPPFLAGS";
-+	old_CPPFLAGS="";
-+	export CPPFLAGS;
-+	LDFLAGS="$old_LDFLAGS";
-+	old_LDFLAGS="";
-+	export LDFLAGS;
++# Check whether --with-profiling-data was given.
++if test "${with_profiling_data+set}" = set; then :
++  withval=$with_profiling_data;  case "$withval" in
++  yes)
++    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }
  
 -{ $as_echo "$as_me:$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
-+fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $samba_cv_HAVE_w2" >&5
-+$as_echo "$samba_cv_HAVE_w2" >&6; }
-+if test x"$samba_cv_HAVE_w2" = x"yes"; then
-+   Werror_FLAGS="-w2"
-+else
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that the C compiler understands -errwarn" >&5
-+$as_echo_n "checking that the C compiler understands -errwarn... " >&6; }
-+if test "${samba_cv_HAVE_errwarn+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
+-  $as_echo_n "(cached) " >&6
+-else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+
-+
-+	old_CFLAGS="$CFLAGS";
-+	CFLAGS="-errwarn=%all";
-+	export CFLAGS;
-+	old_CPPFLAGS="$CPPFLAGS";
-+	CPPFLAGS="$CPPFLAGS";
-+	export CPPFLAGS;
-+	old_LDFLAGS="$LDFLAGS";
-+	LDFLAGS="$LDFLAGS";
-+	export LDFLAGS;
-+	if test "$cross_compiling" = yes; then :
-+  samba_cv_HAVE_errwarn=cross
-+else
-+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
+-/* end confdefs.h.  */
 -#include <sys/types.h>
++$as_echo "#define WITH_PROFILE 1" >>confdefs.h
  
-+   int main(void)
-+   {
-+	return 0;
-+   }
- _ACEOF
+-_ACEOF
 -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
 -  $EGREP "uid_t" >/dev/null 2>&1; then
 -  ac_cv_type_uid_t=yes
-+if ac_fn_c_try_run "$LINENO"; then :
-+  samba_cv_HAVE_errwarn=yes
++    samba_cv_WITH_PROFILE=yes
++    ;;
++  *)
++    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++    samba_cv_WITH_PROFILE=no
++    ;;
++  esac
  else
 -  ac_cv_type_uid_t=no
 -fi
 -rm -f conftest*
--
-+  samba_cv_HAVE_errwarn=no
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
+ 
  fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
 -$as_echo "$ac_cv_type_uid_t" >&6; }
@@ -37201,21 +36756,27 @@
 -cat >>confdefs.h <<\_ACEOF
 -#define uid_t int
 -_ACEOF
--
--
+ 
+ 
 -cat >>confdefs.h <<\_ACEOF
 -#define gid_t int
 -_ACEOF
--
-+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-+  conftest.$ac_objext conftest.beam conftest.$ac_ext
- fi
++merged_build_possible=yes
  
+-fi
+ 
 -{ $as_echo "$as_me:$LINENO: checking for mode_t" >&5
 -$as_echo_n "checking for mode_t... " >&6; }
 -if test "${ac_cv_type_mode_t+set}" = set; then
--  $as_echo_n "(cached) " >&6
--else
++for ac_prog in gawk mawk nawk awk
++do
++  # Extract the first word of "$ac_prog", so it can be a program name with args.
++set dummy $ac_prog; ac_word=$2
++{ $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_AWK+set}" = set; then :
+   $as_echo_n "(cached) " >&6
+ else
 -  ac_cv_type_mode_t=no
 -cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
@@ -37286,59 +36847,75 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  :
--else
++  if test -n "$AWK"; then
++  ac_cv_prog_AWK="$AWK" # Let the user override the test.
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+	CFLAGS="$old_CFLAGS";
-+	old_CFLAGS="";
-+	export CFLAGS;
-+	CPPFLAGS="$old_CPPFLAGS";
-+	old_CPPFLAGS="";
-+	export CPPFLAGS;
-+	LDFLAGS="$old_LDFLAGS";
-+	old_LDFLAGS="";
-+	export LDFLAGS;
++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_AWK="$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
  
 -	ac_cv_type_mode_t=yes
  fi
 -
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
--else
++fi
++AWK=$ac_cv_prog_AWK
++if test -n "$AWK"; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
++$as_echo "$AWK" >&6; }
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
--
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $samba_cv_HAVE_errwarn" >&5
-+$as_echo "$samba_cv_HAVE_errwarn" >&6; }
-+if test x"$samba_cv_HAVE_errwarn" = x"yes"; then
-+   Werror_FLAGS="-errwarn=%all"
- fi
--
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++fi
+ 
+ 
+-fi
++  test -n "$AWK" && break
++done
++
++# Check for GNU make
++
+ 
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
+-fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
 -$as_echo "$ac_cv_type_mode_t" >&6; }
 -if test "x$ac_cv_type_mode_t" = x""yes; then
 -  :
 -else
--
+ 
 -cat >>confdefs.h <<_ACEOF
 -#define mode_t int
 -_ACEOF
--
- fi
  
+-fi
+ 
 -{ $as_echo "$as_me:$LINENO: checking for off_t" >&5
 -$as_echo_n "checking for off_t... " >&6; }
 -if test "${ac_cv_type_off_t+set}" = set; then
-+############################################
-+# 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 :
++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
 -  ac_cv_type_off_t=no
@@ -37397,7 +36974,28 @@
 -case "(($ac_try" in
 -  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
 -  *) ac_try_echo=$ac_try;;
--esac
++  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
 -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 -$as_echo "$ac_try_echo") >&5
 -  (eval "$ac_compile") 2>conftest.er1
@@ -37411,50 +37009,40 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  :
-+
-+    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; }
++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: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h.  */
- 
+-
 -	ac_cv_type_off_t=yes
--fi
-+	#include <stdio.h>
-+	enum negative_values { NEGATIVE_VALUE = 0xFFFFFFFF };
-+	int main(void) {
-+		enum negative_values v1 = NEGATIVE_VALUE;
-+		unsigned v2 = NEGATIVE_VALUE;
++  { $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
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+		if (v1 != 0xFFFFFFFF) {
-+			printf("%u != 0xFFFFFFFF\n", v1);
-+			return 1;
-+		}
-+		if (v2 != 0xFFFFFFFF) {
-+			printf("%u != 0xFFFFFFFF\n", v2);
-+			return 1;
-+		}
  
-+		return 0;
-+	}
++  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
  
-+_ACEOF
-+if ac_fn_c_try_run "$LINENO"; then :
-+  samba_cv_CC_NEGATIVE_ENUM_VALUES=yes
++if ! $ac_cv_path_MAKE --version | head -1 | grep GNU 2>/dev/null >/dev/null
++then
++	samba_cv_gnu_make=no
 +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
++	samba_cv_gnu_make=yes
  fi
  
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
@@ -37463,13 +37051,12 @@
 -$as_echo "$ac_cv_type_off_t" >&6; }
 -if test "x$ac_cv_type_off_t" = x""yes; then
 -  :
--else
-+{ $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 "$as_me:${as_lineno-$LINENO}: WARNING: using --uint-enums for pidl" >&5
-+$as_echo "$as_me: WARNING: using --uint-enums for pidl" >&2;}
-+	PIDL_ARGS="$PIDL_ARGS --uint-enums"
++{ $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
++	true
+ else
++	merged_build_possible=no
 +fi
  
 -cat >>confdefs.h <<_ACEOF
@@ -37477,6 +37064,7 @@
 -_ACEOF
  
 -fi
++# Check for perl
  
 -{ $as_echo "$as_me:$LINENO: checking for size_t" >&5
 -$as_echo_n "checking for size_t... " >&6; }
@@ -37523,28 +37111,17 @@
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+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.  */
+-/* end confdefs.h.  */
 -$ac_includes_default
-+#include <stdio.h>
- int
- main ()
- {
+-int
+-main ()
+-{
 -if (sizeof ((size_t)))
 -	  return 0;
-+ struct foo {int x;char y;};
-+       struct foo bar = { .y = 'X', .x = 1 };
-+
-   ;
-   return 0;
- }
- _ACEOF
+-  ;
+-  return 0;
+-}
+-_ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -37567,68 +37144,102 @@
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
+ 
 -	ac_cv_type_size_t=yes
 -fi
--
+ 
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-+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
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
--
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-+$as_echo "no" >&6; }
+ 
+ 
+-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
+ 
+-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++  test -z "$ac_cv_path_PERL" && ac_cv_path_PERL=""""
++  ;;
++esac
  fi
--
- rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
 -$as_echo "$ac_cv_type_size_t" >&6; }
 -if test "x$ac_cv_type_size_t" = x""yes; then
 -  :
--else
++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
 -
 -cat >>confdefs.h <<_ACEOF
 -#define size_t unsigned int
 -_ACEOF
 -
--fi
--
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
+ fi
+ 
 -{ $as_echo "$as_me:$LINENO: checking for pid_t" >&5
 -$as_echo_n "checking for pid_t... " >&6; }
 -if test "${ac_cv_type_pid_t+set}" = set; then
--  $as_echo_n "(cached) " >&6
--else
++
++		;;
++	*)
++		# 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
 -  ac_cv_type_pid_t=no
 -cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+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.  */
+-/* end confdefs.h.  */
 -$ac_includes_default
-+#include <stdio.h>
- int
- main ()
- {
+-int
+-main ()
+-{
 -if (sizeof (pid_t))
 -       return 0;
-+ struct foo {int x;char y;};
-+       struct foo bar = { .y = 'X', .x = 1 };
-+
-   ;
-   return 0;
- }
- _ACEOF
+-  ;
+-  return 0;
+-}
+-_ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -37652,41 +37263,44 @@
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_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.  */
+-/* end confdefs.h.  */
 -$ac_includes_default
-+#include <stdio.h>
- int
- main ()
- {
+-int
+-main ()
+-{
 -if (sizeof ((pid_t)))
 -	  return 0;
-+ struct foo {int x;char y;};
-+       struct foo bar = { .y = 'X', .x = 1 };
-+
-   ;
-   return 0;
- }
- _ACEOF
+-  ;
+-  return 0;
+-}
+-_ACEOF
 -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
++  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
 -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 -$as_echo "$ac_try_echo") >&5
 -  (eval "$ac_compile") 2>conftest.er1
@@ -37700,71 +37314,118 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  :
--else
++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: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++fi
++
++
++		;;
++esac
+ 
 -	ac_cv_type_pid_t=yes
--fi
--
++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;}
++	merged_build_possible=no
++else
++	if test x"$debug" = x"yes";then
++		PERL="$PERL -W"
++	fi
++	export PERL
++	true
+ fi
+ 
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-+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
++
++if test -n "$ac_tool_prefix"; then
++  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
++set dummy ${ac_tool_prefix}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_prog_AR+set}" = set; then :
++  $as_echo_n "(cached) " >&6
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
--
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-+$as_echo "no" >&6; }
++  if test -n "$AR"; then
++  ac_cv_prog_AR="$AR" # 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_AR="${ac_tool_prefix}ar"
++    $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
 -
- rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
 -$as_echo "$ac_cv_type_pid_t" >&6; }
 -if test "x$ac_cv_type_pid_t" = x""yes; then
 -  :
--else
--
++AR=$ac_cv_prog_AR
++if test -n "$AR"; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
++$as_echo "$AR" >&6; }
+ else
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++fi
+ 
 -cat >>confdefs.h <<_ACEOF
 -#define pid_t int
 -_ACEOF
+ 
+ fi
 -
--fi
--
 -{ $as_echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
 -$as_echo_n "checking for struct stat.st_rdev... " >&6; }
 -if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
--  $as_echo_n "(cached) " >&6
--else
++if test -z "$ac_cv_prog_AR"; then
++  ac_ct_AR=$AR
++  # 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_prog_ac_ct_AR+set}" = set; then :
+   $as_echo_n "(cached) " >&6
+ else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+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.  */
+-/* end confdefs.h.  */
 -$ac_includes_default
-+#include <stdio.h>
- int
- main ()
- {
+-int
+-main ()
+-{
 -static struct stat ac_aggr;
 -if (ac_aggr.st_rdev)
 -return 0;
-+ struct foo {int x;char y;};
-+       struct foo bar = { .y = 'X', .x = 1 };
-+
-   ;
-   return 0;
- }
- _ACEOF
+-  ;
+-  return 0;
+-}
+-_ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -37784,10 +37445,7 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_cv_member_struct_stat_st_rdev=yes
-+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
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
@@ -37796,32 +37454,18 @@
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+  { $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.  */
+-/* end confdefs.h.  */
 -$ac_includes_default
-+#include <stdio.h>
- int
- main ()
- {
+-int
+-main ()
+-{
 -static struct stat ac_aggr;
 -if (sizeof ac_aggr.st_rdev)
 -return 0;
-+ struct foo {int x;char y;};
-+       struct foo bar = { .y = 'X', .x = 1 };
-+
-   ;
-   return 0;
- }
- _ACEOF
+-  ;
+-  return 0;
+-}
+-_ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -37841,80 +37485,86 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_cv_member_struct_stat_st_rdev=yes
-+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
++  if test -n "$ac_ct_AR"; then
++  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
++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_AR="ar"
++    $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
+ 
 -	ac_cv_member_struct_stat_st_rdev=no
-+  { $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
+-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  fi
- 
+-
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-+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
++ac_ct_AR=$ac_cv_prog_ac_ct_AR
++if test -n "$ac_ct_AR"; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
++$as_echo "$ac_ct_AR" >&6; }
++else
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
  fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
 -$as_echo "$ac_cv_member_struct_stat_st_rdev" >&6; }
 -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
-+if test x"$c99_init" = x"yes"; then
-+    saved_CFLAGS=""
- 
-+else
-+    CFLAGS="$saved_CFLAGS"
-+    saved_CFLAGS=""
-+    as_fn_error "c99 structure initializer are not supported" "$LINENO" 5
-+fi
- 
+-
+-
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_ST_RDEV 1
 -_ACEOF
  
--fi
-+UNAME_S=`(uname -s) 2>/dev/null` || UNAME_S="unknown"
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking uname -s" >&5
-+$as_echo_n "checking uname -s... " >&6; }
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNAME_S}" >&5
-+$as_echo "${UNAME_S}" >&6; }
++  if test "x$ac_ct_AR" = x; then
++    AR=""
++  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
++    AR=$ac_ct_AR
++  fi
++else
++  AR="$ac_cv_prog_AR"
+ fi
  
-+UNAME_R=`(uname -r) 2>/dev/null` || UNAME_R="unknown"
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking uname -r" >&5
-+$as_echo_n "checking uname -r... " >&6; }
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNAME_R}" >&5
-+$as_echo "${UNAME_R}" >&6; }
  
 -{ $as_echo "$as_me:$LINENO: checking for d_off in dirent" >&5
 -$as_echo_n "checking for d_off in dirent... " >&6; }
 -if test "${ac_cv_dirent_d_off+set}" = set; then
--  $as_echo_n "(cached) " >&6
--else
++LD=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
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
-+UNAME_M=`(uname -m) 2>/dev/null` || UNAME_M="unknown"
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking uname -m" >&5
-+$as_echo_n "checking uname -m... " >&6; }
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNAME_M}" >&5
-+$as_echo "${UNAME_M}" >&6; }
- 
+-
 -#include <unistd.h>
 -#include <sys/types.h>
 -#include <dirent.h>
@@ -37945,77 +37595,124 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_cv_dirent_d_off=yes
--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
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+UNAME_P=`(uname -p) 2>/dev/null` || UNAME_P="unknown"
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking uname -p" >&5
-+$as_echo_n "checking uname -p... " >&6; }
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNAME_P}" >&5
-+$as_echo "${UNAME_P}" >&6; }
- 
+-
 -	ac_cv_dirent_d_off=no
--fi
-+UNAME_I=`(uname -i) 2>/dev/null` || UNAME_I="unknown"
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking uname -i" >&5
-+$as_echo_n "checking uname -i... " >&6; }
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNAME_I}" >&5
-+$as_echo "${UNAME_I}" >&6; }
- 
++  ac_cv_prog_gnu_ld=no
+ fi
+-
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
--fi
+ fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_dirent_d_off" >&5
 -$as_echo "$ac_cv_dirent_d_off" >&6; }
 -if test $ac_cv_dirent_d_off = yes; then
-+  case "$host_os" in
-+	*irix6*)
-+		#TODO add to libreplace
-+		if test x"$ac_cv_c_compiler_gnu" != x"yes" ; then
-+																								CFLAGS="$CFLAGS -diag_error 1035"
-+												CFLAGS="$CFLAGS -woff 1209,1174,3201"
-+		fi
-+	;;
-+esac
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gnu_ld" >&5
++$as_echo "$ac_cv_prog_gnu_ld" >&6; }
  
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_DIRENT_D_OFF 1
 -_ACEOF
-+DYNEXP=
  
--fi
++if test "$ac_cv_prog_gnu_ld" = "yes"; then
++	ac_cv_gnu_ld_version=`$LD -v 2>/dev/null | head -1`
++	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking GNU ld release date" >&5
++$as_echo_n "checking GNU ld release date... " >&6; }
++		ac_cv_gnu_ld_date=`echo $ac_cv_gnu_ld_version | sed -n 's,^.*\([2-9][0-9][0-9][0-9]\)[-]*\([01][0-9]\)[-]*\([0-3][0-9]\).*$,\1\2\3,p'`
++		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_cv_gnu_ld_date}" >&5
++$as_echo "${ac_cv_gnu_ld_date}" >&6; }
++        if test -n "$ac_cv_gnu_ld_date"; then
++ 	if test "$ac_cv_gnu_ld_date" -lt 20030217; then
++ 		ac_cv_gnu_ld_no_default_allow_shlib_undefined=yes
++ 	fi
++	if test "$ac_cv_gnu_ld_date" -gt 20030101; then
++		ac_cv_gnu_ld_version_script=yes
++	fi
++        else
++           { $as_echo "$as_me:${as_lineno-$LINENO}: checking GNU ld release version" >&5
++$as_echo_n "checking GNU ld release version... " >&6; }
++                      ac_cv_gnu_ld_vernr=`echo $ac_cv_gnu_ld_version | sed -n 's,^[^0-9]*\([1-9][0-9]*\.[0-9][0-9]*\).*$,\1,p'`
++           ac_cv_gnu_ld_vernr_major=`echo $ac_cv_gnu_ld_vernr | cut -d '.' -f 1`
++           ac_cv_gnu_ld_vernr_minor=`echo $ac_cv_gnu_ld_vernr | cut -d '.' -f 2`
++                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_cv_gnu_ld_vernr}" >&5
++$as_echo "${ac_cv_gnu_ld_vernr}" >&6; }
++           { $as_echo "$as_me:${as_lineno-$LINENO}: checking GNU ld release version major" >&5
++$as_echo_n "checking GNU ld release version major... " >&6; }
++           { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_cv_gnu_ld_vernr_major}" >&5
++$as_echo "${ac_cv_gnu_ld_vernr_major}" >&6; }
++           { $as_echo "$as_me:${as_lineno-$LINENO}: checking GNU ld release version minor" >&5
++$as_echo_n "checking GNU ld release version minor... " >&6; }
++           { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_cv_gnu_ld_vernr_minor}" >&5
++$as_echo "${ac_cv_gnu_ld_vernr_minor}" >&6; }
++           if test "$ac_cv_gnu_ld_vernr_major" -lt 2 || test "$ac_cv_gnu_ld_vernr_minor" -lt 14; then
++             ac_cv_gnu_ld_no_default_allow_shlib_undefined=yes
++           fi
++           if test "$ac_cv_gnu_ld_vernr_major" -gt 2 || test "$ac_cv_gnu_ld_vernr_major" = 2 && test "$ac_cv_gnu_ld_vernr_minor" -ge 12; then
++             ac_cv_gnu_ld_version_script=yes
++           fi
++        fi
+ fi
  
 -{ $as_echo "$as_me:$LINENO: checking for ssize_t" >&5
 -$as_echo_n "checking for ssize_t... " >&6; }
 -if test "${ac_cv_type_ssize_t+set}" = set; then
--  $as_echo_n "(cached) " >&6
--else
++
++
++if test "x$CC" != xcc; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5
++$as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; }
++else
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5
++$as_echo_n "checking whether cc understands -c and -o together... " >&6; }
++fi
++set dummy $CC; ac_cc=`$as_echo "$2" |
++		      sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
++if { as_var=ac_cv_prog_cc_${ac_cc}_c_o; eval "test \"\${$as_var+set}\" = set"; }; then :
+   $as_echo_n "(cached) " >&6
+ else
 -  ac_cv_type_ssize_t=no
 -cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
 -$ac_includes_default
--int
--main ()
--{
++
+ int
+ main ()
+ {
 -if (sizeof (ssize_t))
 -       return 0;
--  ;
--  return 0;
--}
--_ACEOF
++
+   ;
+   return 0;
+ }
+ _ACEOF
 -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
++# Make sure it works both with $CC and with simple cc.
++# We do the test twice because some compilers refuse to overwrite an
++# existing .o file with -o, though they will create one.
++ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
++rm -f conftest2.*
++if { { case "(($ac_try" in
+   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+   *) ac_try_echo=$ac_try;;
+ esac
 -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 -$as_echo "$ac_try_echo") >&5
 -  (eval "$ac_compile") 2>conftest.er1
--  ac_status=$?
++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=$?
 -  grep -v '^ *+' conftest.er1 >conftest.err
 -  rm -f conftest.er1
 -  cat conftest.err >&5
@@ -38043,13 +37740,19 @@
 -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
++  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++  test $ac_status = 0; } &&
++   test -f conftest2.$ac_objext && { { case "(($ac_try" in
+   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+   *) ac_try_echo=$ac_try;;
+ esac
 -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 -$as_echo "$ac_try_echo") >&5
 -  (eval "$ac_compile") 2>conftest.er1
--  ac_status=$?
++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=$?
 -  grep -v '^ *+' conftest.er1 >conftest.err
 -  rm -f conftest.er1
 -  cat conftest.err >&5
@@ -38062,42 +37765,18 @@
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+default_static_modules="pdb_smbpasswd pdb_tdbsam pdb_wbc_sam rpc_lsarpc rpc_samr rpc_winreg rpc_initshutdown rpc_dssetup rpc_wkssvc rpc_svcctl rpc_ntsvcs rpc_netlogon rpc_netdfs rpc_srvsvc rpc_spoolss rpc_eventlog auth_sam auth_unix auth_winbind auth_wbc auth_server auth_domain auth_builtin auth_netlogond vfs_default nss_info_template"
-+
-+default_shared_modules="vfs_recycle vfs_audit vfs_extd_audit vfs_full_audit vfs_netatalk vfs_fake_perms vfs_default_quota vfs_readonly vfs_cap vfs_expand_msdfs vfs_shadow_copy vfs_shadow_copy2 charset_CP850 charset_CP437 auth_script vfs_readahead vfs_xattr_tdb vfs_streams_xattr vfs_streams_depot vfs_acl_xattr vfs_acl_tdb vfs_smb_traffic_analyzer vfs_preopen"
- 
+-
 -	ac_cv_type_ssize_t=yes
-+if test "x$developer" = xyes; then
-+   default_static_modules="$default_static_modules rpc_rpcecho"
-+   default_shared_modules="$default_shared_modules charset_weird perfcount_test"
- fi
- 
+-fi
+-
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+#
-+# Config CPPFLAG settings for strange OS's that must be set
-+# before other tests. Do NOT invoke AC_CHECK_HEADERS within this
-+# case statement; its first reference must be unconditional.
-+#
-+case "$host_os" in
-+    *hpux*)
-+#
-+# Defines needed for HPUX support.
-+# HPUX has bigcrypt but (sometimes?) doesn't use it for
-+# password hashing - hence the USE_BOTH_CRYPT_CALLS define.
-+#
-+      case `uname -r` in
-+		*9*|*10*|*11)
- 
-+$as_echo "#define USE_BOTH_CRYPT_CALLS 1" >>confdefs.h
- 
+-
+-
 -fi
-+		;;
-+      esac
-+      ;;
- 
+-
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
@@ -38105,29 +37784,13 @@
 -if test "x$ac_cv_type_ssize_t" = x""yes; then
 -  :
 -else
-+#
-+# CRAY Unicos has broken const handling
-+       *unicos*)
-+	  { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabling const" >&5
-+$as_echo "disabling const" >&6; }
-+	  CPPFLAGS="$CPPFLAGS -Dconst="
-+	  ;;
- 
+-
 -cat >>confdefs.h <<_ACEOF
 -#define ssize_t int
 -_ACEOF
-+#
-+# AIX4.x doesn't even admit to having large
-+# files *at all* unless the -D_LARGE_FILE or -D_LARGE_FILE_API flags are set.
-+#
-+    *aix4*)
-+	  { $as_echo "$as_me:${as_lineno-$LINENO}: result: enabling large file support" >&5
-+$as_echo "enabling large file support" >&6; }
-+      CPPFLAGS="$CPPFLAGS -D_LARGE_FILES"
- 
+-
 -fi
-+$as_echo "#define _LARGE_FILES 1" >>confdefs.h
- 
+-
 -{ $as_echo "$as_me:$LINENO: checking for wchar_t" >&5
 -$as_echo_n "checking for wchar_t... " >&6; }
 -if test "${ac_cv_type_wchar_t+set}" = set; then
@@ -38153,13 +37816,24 @@
 -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
++  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++  test $ac_status = 0; };
++then
++  eval ac_cv_prog_cc_${ac_cc}_c_o=yes
++  if test "x$CC" != xcc; then
++    # Test first that cc exists at all.
++    if { ac_try='cc -c conftest.$ac_ext >&5'
++  { { case "(($ac_try" in
+   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+   *) ac_try_echo=$ac_try;;
+ esac
 -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 -$as_echo "$ac_try_echo") >&5
 -  (eval "$ac_compile") 2>conftest.er1
--  ac_status=$?
++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=$?
 -  grep -v '^ *+' conftest.er1 >conftest.err
 -  rm -f conftest.er1
 -  cat conftest.err >&5
@@ -38187,13 +37861,21 @@
 -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
++  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++  test $ac_status = 0; }; }; then
++      ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
++      rm -f conftest2.*
++      if { { case "(($ac_try" in
+   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+   *) ac_try_echo=$ac_try;;
+ esac
 -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 -$as_echo "$ac_try_echo") >&5
 -  (eval "$ac_compile") 2>conftest.er1
--  ac_status=$?
++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=$?
 -  grep -v '^ *+' conftest.er1 >conftest.err
 -  rm -f conftest.er1
 -  cat conftest.err >&5
@@ -38203,56 +37885,50 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  :
--else
++  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++  test $ac_status = 0; } &&
++	 test -f conftest2.$ac_objext && { { 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
++	# cc works too.
++	:
++      else
++	# cc exists but doesn't like -o.
++	eval ac_cv_prog_cc_${ac_cc}_c_o=no
++      fi
++    fi
++  fi
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+      ;;
-+#
-+# Defines needed for Solaris 2.6/2.7 aka 7.0 to make it admit
-+# to the existance of large files..
-+# Note that -D_LARGEFILE64_SOURCE is different from the Sun
-+# recommendations on large file support, however it makes the
-+# compile work using gcc 2.7 and 2.8, whereas using the Sun
-+# recommendation makes the compile fail on gcc2.7. JRA.
-+#
-+# Solaris uses SYSV printing.  Make sure to set that here.  --jerry
-+#
-+	*solaris*)
- 
+-
 -	ac_cv_type_wchar_t=yes
--fi
-+$as_echo "#define SYSV 1" >>confdefs.h
-+
-+		case `uname -r` in
-+			5.0|5.0.*|5.1|5.1.*|5.2|5.2.*|5.3|5.3.*|5.5|5.5.*)
-+	  			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no large file support" >&5
-+$as_echo "no large file support" >&6; }
-+				;;
-+			5.*)
-+			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: enabling large file support" >&5
-+$as_echo "enabling large file support" >&6; }
-+			if test "$ac_cv_c_compiler_gnu" = yes; then
-+				${CC-cc} -v >conftest.c 2>&1
-+				ac_cv_gcc_compiler_version_number=`grep 'gcc version' conftest.c`
-+				rm -fr conftest.c
-+				case "$ac_cv_gcc_compiler_version_number" in
-+					*"gcc version 2.6"*|*"gcc version 2.7"*)
-+						CPPFLAGS="$CPPFLAGS -D_LARGEFILE64_SOURCE -D_REENTRANT"
-+						LDFLAGS="$LDFLAGS -lthread"
++  eval ac_cv_prog_cc_${ac_cc}_c_o=no
+ fi
++rm -f core conftest*
  
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
--else
++fi
++if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+$as_echo "#define _LARGEFILE64_SOURCE 1" >>confdefs.h
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
  
-+						;;
-+					*)
-+						CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_REENTRANT -D_FILE_OFFSET_BITS=64"
-+						LDFLAGS="$LDFLAGS -lthread"
++$as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h
  
--fi
-+$as_echo "#define _LARGEFILE64_SOURCE 1" >>confdefs.h
+ fi
  
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -fi
@@ -38260,39 +37936,31 @@
 -$as_echo "$ac_cv_type_wchar_t" >&6; }
 -if test "x$ac_cv_type_wchar_t" = x""yes; then
 -  :
--else
- 
++if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then
++      BROKEN_CC=
+ else
+-
 -cat >>confdefs.h <<_ACEOF
 -#define wchar_t unsigned short
 -_ACEOF
-+$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
+-
++      BROKEN_CC=#
+ fi
  
--fi
-+						;;
-+				esac
-+			else
-+				CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_REENTRANT -D_FILE_OFFSET_BITS=64"
-+				LDFLAGS="$LDFLAGS -lthread"
  
-+$as_echo "#define _LARGEFILE64_SOURCE 1" >>confdefs.h
- 
 -############################################
 -# for cups support we need libcups, and a handful of header files
- 
+-
 -# Check whether --enable-cups was given.
 -if test "${enable_cups+set}" = set; then
 -  enableval=$enable_cups;
 -fi
-+$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that the C compiler understands -Werror" >&5
++$as_echo_n "checking that the C compiler understands -Werror... " >&6; }
++if test "${samba_cv_HAVE_Werror+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
  
-+			fi
-+			;;
-+		esac
-+		;;
-+#
-+# IRIX uses SYSV printing.  Make sure to set that here
-+#
-+	*irix*)
  
 -if test x$enable_cups != xno; then
 -	# Extract the first word of "cups-config", so it can be a program name with args.
@@ -38301,7 +37969,18 @@
 -$as_echo_n "checking for $ac_word... " >&6; }
 -if test "${ac_cv_path_CUPS_CONFIG+set}" = set; then
 -  $as_echo_n "(cached) " >&6
--else
++	old_CFLAGS="$CFLAGS";
++	CFLAGS="-Werror";
++	export CFLAGS;
++	old_CPPFLAGS="$CPPFLAGS";
++	CPPFLAGS="$CPPFLAGS";
++	export CPPFLAGS;
++	old_LDFLAGS="$LDFLAGS";
++	LDFLAGS="$LDFLAGS";
++	export LDFLAGS;
++	if test "$cross_compiling" = yes; then :
++  samba_cv_HAVE_Werror=cross
+ else
 -  case $CUPS_CONFIG in
 -  [\\/]* | ?:[\\/]*)
 -  ac_cv_path_CUPS_CONFIG="$CUPS_CONFIG" # Let the user override the test with a path.
@@ -38321,7 +38000,8 @@
 -done
 -done
 -IFS=$as_save_IFS
-+$as_echo "#define SYSV 1" >>confdefs.h
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
  
 -  ;;
 -esac
@@ -38330,45 +38010,43 @@
 -if test -n "$CUPS_CONFIG"; then
 -  { $as_echo "$as_me:$LINENO: result: $CUPS_CONFIG" >&5
 -$as_echo "$CUPS_CONFIG" >&6; }
--else
++  int main(void)
++  {
++  	return 0;
++  }
++_ACEOF
++if ac_fn_c_try_run "$LINENO"; then :
++  samba_cv_HAVE_Werror=yes
+ else
 -  { $as_echo "$as_me:$LINENO: result: no" >&5
 -$as_echo "no" >&6; }
--fi
-+		;;
-+	*freebsd*|*dragonfly*)
++  samba_cv_HAVE_Werror=no
++fi
++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
++  conftest.$ac_objext conftest.beam conftest.$ac_ext
+ fi
  
-+$as_echo "#define FREEBSD 1" >>confdefs.h
++	CFLAGS="$old_CFLAGS";
++	old_CFLAGS="";
++	export CFLAGS;
++	CPPFLAGS="$old_CPPFLAGS";
++	old_CPPFLAGS="";
++	export CPPFLAGS;
++	LDFLAGS="$old_LDFLAGS";
++	old_LDFLAGS="";
++	export LDFLAGS;
  
-+		;;
-+#
-+# VOS may need to have POSIX support and System V compatibility enabled.
-+#
-+    *vos*)
-+    case "$CPPFLAGS" in
-+	  *-D_POSIX_C_SOURCE*)
-+		;;
-+	  *)
-+		CPPFLAGS="$CPPFLAGS -D_POSIX_C_SOURCE=200112L"
- 
+-
 -        if test "x$CUPS_CONFIG" != x; then
-+$as_echo "#define _POSIX_C_SOURCE 200112L" >>confdefs.h
- 
+-
 -		ac_save_CFLAGS=$CFLAGS
 -		ac_save_LDFLAGS=$LDFLAGS
 -		ac_save_PRINT_LIBS=$PRINT_LIBS
 -		CFLAGS="$CFLAGS `$CUPS_CONFIG --cflags`"
 -		LDFLAGS="$LDFLAGS `$CUPS_CONFIG --ldflags`"
 -		PRINT_LIBS="$PRINT_LIBS `$CUPS_CONFIG --libs`"
-+		;;
-+    esac
-+    case "$CPPFLAGS" in
-+	  *-D_SYSV*|*-D_SVID_SOURCE*)
-+		;;
-+	  *)
-+		CPPFLAGS="$CPPFLAGS -D_SYSV"
- 
-+$as_echo "#define _SYSV 1" >>confdefs.h
- 
+-
+-
 -for ac_header in cups/cups.h cups/language.h
 -do
 -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
@@ -38377,24 +38055,15 @@
 -$as_echo_n "checking for $ac_header... " >&6; }
 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
 -  $as_echo_n "(cached) " >&6
--fi
+ fi
 -ac_res=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
 -$as_echo "$ac_res" >&6; }
-+    esac
-+    ;;
-+#
-+# Tests needed for SINIX large file support.
-+#
-+    *sysv4*)
-+      if test $host = mips-sni-sysv4 ; then
-+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LFS support" >&5
-+$as_echo_n "checking for LFS support... " >&6; }
-+        old_CPPFLAGS="$CPPFLAGS"
-+        CPPFLAGS="-D_LARGEFILE64_SOURCE $CPPFLAGS"
-+        if test "$cross_compiling" = yes; then :
-+  SINIX_LFS_SUPPORT=cross
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $samba_cv_HAVE_Werror" >&5
++$as_echo "$samba_cv_HAVE_Werror" >&6; }
++if test x"$samba_cv_HAVE_Werror" = x"yes"; then
++   Werror_FLAGS="-Werror"
  else
 -  # Is the header compilable?
 -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
@@ -38404,8 +38073,7 @@
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
+-/* end confdefs.h.  */
 -$ac_includes_default
 -#include <$ac_header>
 -_ACEOF
@@ -38428,10 +38096,14 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_header_compiler=yes
--else
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that the C compiler understands -w2" >&5
++$as_echo_n "checking that the C compiler understands -w2... " >&6; }
++if test "${samba_cv_HAVE_w2+set}" = set; then :
++  $as_echo_n "(cached) " >&6
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
+ 
 -	ac_header_compiler=no
 -fi
 -
@@ -38447,16 +38119,26 @@
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
++	old_CFLAGS="$CFLAGS";
++	CFLAGS="-w2";
++	export CFLAGS;
++	old_CPPFLAGS="$CPPFLAGS";
++	CPPFLAGS="$CPPFLAGS";
++	export CPPFLAGS;
++	old_LDFLAGS="$LDFLAGS";
++	LDFLAGS="$LDFLAGS";
++	export LDFLAGS;
++	if test "$cross_compiling" = yes; then :
++  samba_cv_HAVE_w2=cross
++else
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
 -#include <$ac_header>
-+#include <unistd.h>
-+main () {
-+#if _LFS64_LARGEFILE == 1
-+exit(0);
-+#else
-+exit(1);
-+#endif
-+}
++
++  int main(void)
++  {
++  	return 0;
++  }
  _ACEOF
 -if { (ac_try="$ac_cpp conftest.$ac_ext"
 -case "(($ac_try" in
@@ -38476,12 +38158,15 @@
 -	 test ! -s conftest.err
 -       }; then
 -  ac_header_preproc=yes
--else
++if ac_fn_c_try_run "$LINENO"; then :
++  samba_cv_HAVE_w2=yes
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -  ac_header_preproc=no
--fi
++  samba_cv_HAVE_w2=no
+ fi
 -
 -rm -f conftest.err conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
@@ -38521,50 +38206,72 @@
 -$as_echo_n "checking for $ac_header... " >&6; }
 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
 -  $as_echo_n "(cached) " >&6
-+if ac_fn_c_try_run "$LINENO"; then :
-+  SINIX_LFS_SUPPORT=yes
- else
+-else
 -  eval "$as_ac_Header=\$ac_header_preproc"
--fi
++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
++  conftest.$ac_objext conftest.beam conftest.$ac_ext
+ fi
 -ac_res=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
 -$as_echo "$ac_res" >&6; }
--
-+  SINIX_LFS_SUPPORT=no
- fi
+ 
+-fi
 -as_val=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
 -  cat >>confdefs.h <<_ACEOF
 -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
 -_ACEOF
--
-+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-+  conftest.$ac_objext conftest.beam conftest.$ac_ext
++	CFLAGS="$old_CFLAGS";
++	old_CFLAGS="";
++	export CFLAGS;
++	CPPFLAGS="$old_CPPFLAGS";
++	old_CPPFLAGS="";
++	export CPPFLAGS;
++	LDFLAGS="$old_LDFLAGS";
++	old_LDFLAGS="";
++	export LDFLAGS;
+ 
  fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $samba_cv_HAVE_w2" >&5
++$as_echo "$samba_cv_HAVE_w2" >&6; }
++if test x"$samba_cv_HAVE_w2" = x"yes"; then
++   Werror_FLAGS="-w2"
++else
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that the C compiler understands -errwarn" >&5
++$as_echo_n "checking that the C compiler understands -errwarn... " >&6; }
++if test "${samba_cv_HAVE_errwarn+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
  
 -done
-+        CPPFLAGS="$old_CPPFLAGS"
-+        if test x$SINIX_LFS_SUPPORT = xyes ; then
-+          CPPFLAGS="-D_LARGEFILE64_SOURCE $CPPFLAGS"
  
 -		if test x"$ac_cv_header_cups_cups_h" = xyes -a \
 -		        x"$ac_cv_header_cups_language_h" = xyes; then
-+$as_echo "#define _LARGEFILE64_SOURCE 1" >>confdefs.h
++	old_CFLAGS="$CFLAGS";
++	CFLAGS="-errwarn=%all";
++	export CFLAGS;
++	old_CPPFLAGS="$CPPFLAGS";
++	CPPFLAGS="$CPPFLAGS";
++	export CPPFLAGS;
++	old_LDFLAGS="$LDFLAGS";
++	LDFLAGS="$LDFLAGS";
++	export LDFLAGS;
++	if test "$cross_compiling" = yes; then :
++  samba_cv_HAVE_errwarn=cross
++else
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
  
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_CUPS 1
--_ACEOF
-+          CFLAGS="`getconf LFS64_CFLAGS` $CFLAGS"
-+          LDFLAGS="`getconf LFS64_LDFLAGS` $LDFLAGS"
-+          LIBS="`getconf LFS64_LIBS` $LIBS"
-+        fi
-+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SINIX_LFS_SUPPORT" >&5
-+$as_echo "$SINIX_LFS_SUPPORT" >&6; }
-+      fi
-+    ;;
- 
++   int main(void)
++   {
++	return 0;
++   }
+ _ACEOF
+-
 -			samba_cv_HAVE_CUPS=yes
 -		else
 -			{ $as_echo "$as_me:$LINENO: WARNING: cups-config around but cups-devel not installed" >&5
@@ -38573,64 +38280,82 @@
 -			LDFLAGS=$ac_save_LDFLAGS
 -			PRINT_LIBS=$ac_save_PRINT_LIBS
 -		fi
-+# Systems with LFS support.
-+#
-+    gnu* | k*bsd*-gnu | kopensolaris*-gnu)
-+	CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS"
- 
+-
 -	elif test x"$enable_cups" = x"yes"; then
 -		{ { $as_echo "$as_me:$LINENO: error: Cups support required but cups-config not located.  Make sure cups-devel related files are installed." >&5
 -$as_echo "$as_me: error: Cups support required but cups-config not located.  Make sure cups-devel related files are installed." >&2;}
 -   { (exit 1); exit 1; }; }
 -        fi
--fi
-+$as_echo "#define _LARGEFILE64_SOURCE 1" >>confdefs.h
- 
++if ac_fn_c_try_run "$LINENO"; then :
++  samba_cv_HAVE_errwarn=yes
++else
++  samba_cv_HAVE_errwarn=no
+ fi
+-
 -# Check whether --enable-iprint was given.
 -if test "${enable_iprint+set}" = set; then
 -  enableval=$enable_iprint;
--fi
++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
++  conftest.$ac_objext conftest.beam conftest.$ac_ext
+ fi
  
-+$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
++	CFLAGS="$old_CFLAGS";
++	old_CFLAGS="";
++	export CFLAGS;
++	CPPFLAGS="$old_CPPFLAGS";
++	old_CPPFLAGS="";
++	export CPPFLAGS;
++	LDFLAGS="$old_LDFLAGS";
++	old_LDFLAGS="";
++	export LDFLAGS;
  
 -if test x$enable_iprint != xno; then
 -	if test x"$samba_cv_HAVE_CUPS" = xyes; then
- 
+-
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_IPRINT 1
 -_ACEOF
-+$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
- 
+-
 -	elif test x"$enable_iprint" = x"yes"; then
 -		{ { $as_echo "$as_me:$LINENO: error: iPrint support required but cups not enabled.  Make sure cups-devel related files are installed and that cups is enabled." >&5
 -$as_echo "$as_me: error: iPrint support required but cups not enabled.  Make sure cups-devel related files are installed and that cups is enabled." >&2;}
 -   { (exit 1); exit 1; }; }
 -        fi
--fi
-+	;;
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $samba_cv_HAVE_errwarn" >&5
++$as_echo "$samba_cv_HAVE_errwarn" >&6; }
++if test x"$samba_cv_HAVE_errwarn" = x"yes"; then
++   Werror_FLAGS="-errwarn=%all"
++fi
++fi
+ fi
  
--############################################
+ ############################################
 -# check if the compiler will optimize out function calls
 -{ $as_echo "$as_me:$LINENO: checking if the compiler will optimize out function calls" >&5
 -$as_echo_n "checking if the compiler will optimize out function calls... " >&6; }
 -if test "${samba_cv_optimize_out_funcation_calls+set}" = set; then
--  $as_echo_n "(cached) " >&6
-+# Tests for linux LFS support. Need kernel 2.4 and glibc2.2 or greater support.
-+#
-+    *linux*)
-+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LFS support" >&5
-+$as_echo_n "checking for LFS support... " >&6; }
-+        old_CPPFLAGS="$CPPFLAGS"
-+        CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS"
-+       if test "$cross_compiling" = yes; then :
-+  LINUX_LFS_SUPPORT=cross
++# 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
--
+ 
 -    cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
++    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.  */
  
@@ -38638,49 +38363,31 @@
 -int
 -main ()
 -{
-+#include <unistd.h>
-+#include <sys/utsname.h>
-+#include <string.h>
-+#include <stdlib.h>
-+main() {
-+#if _LFS64_LARGEFILE == 1
-+       struct utsname uts;
-+       char *release;
-+       int major, minor;
++	#include <stdio.h>
++	enum negative_values { NEGATIVE_VALUE = 0xFFFFFFFF };
++	int main(void) {
++		enum negative_values v1 = NEGATIVE_VALUE;
++		unsigned v2 = NEGATIVE_VALUE;
  
 -		if (0) {
 -		   this_function_does_not_exist();
 -		} else {
 -		  return 1;
--		}
-+       /* Ensure this is glibc 2.2 or higher */
-+#if defined(__GLIBC__) && defined(__GLIBC_MINOR__)
-+       int libc_major = __GLIBC__;
-+       int libc_minor = __GLIBC_MINOR__;
-+
-+       if (libc_major < 2)
-+              exit(1);
-+       if (libc_minor < 2)
-+              exit(1);
-+#endif
++		if (v1 != 0xFFFFFFFF) {
++			printf("%u != 0xFFFFFFFF\n", v1);
++			return 1;
++		}
++		if (v2 != 0xFFFFFFFF) {
++			printf("%u != 0xFFFFFFFF\n", v2);
++			return 1;
+ 		}
  
-+       /* Ensure this is kernel 2.4 or higher */
++		return 0;
++	}
  
 -  ;
 -  return 0;
-+       uname(&uts);
-+       release = strdup(uts.release);
-+       major = atoi(strsep(&release, "."));
-+       minor = atoi(strsep(&release, "."));
-+
-+       if (major > 2 || (major == 2 && minor > 3))
-+               exit(0);
-+       exit(1);
-+#else
-+       exit(1);
-+#endif
- }
-+
+-}
  _ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
@@ -38705,13 +38412,13 @@
 -       }; then
 -  samba_cv_optimize_out_funcation_calls=yes
 +if ac_fn_c_try_run "$LINENO"; then :
-+  LINUX_LFS_SUPPORT=yes
++  samba_cv_CC_NEGATIVE_ENUM_VALUES=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	samba_cv_optimize_out_funcation_calls=no
-+  LINUX_LFS_SUPPORT=no
++  samba_cv__CC_NEGATIVE_ENUM_VALUES=no
  fi
 -
 -rm -rf conftest.dSYM
@@ -38723,16 +38430,19 @@
 -{ $as_echo "$as_me:$LINENO: result: $samba_cv_optimize_out_funcation_calls" >&5
 -$as_echo "$samba_cv_optimize_out_funcation_calls" >&6; }
 -if test x"$samba_cv_optimize_out_funcation_calls" = x"yes"; then
- 
+-
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_COMPILER_WILL_OPTIMIZE_OUT_FNS 1
 -_ACEOF
-+	CPPFLAGS="$old_CPPFLAGS"
-+	if test x$LINUX_LFS_SUPPORT = xyes ; then
-+		CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS"
  
--fi
-+$as_echo "#define _LARGEFILE64_SOURCE 1" >>confdefs.h
+ 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 "$as_me:${as_lineno-$LINENO}: WARNING: using --uint-enums for pidl" >&5
++$as_echo "$as_me: WARNING: using --uint-enums for pidl" >&2;}
++	PIDL_ARGS="$PIDL_ARGS --uint-enums"
++fi
  
 -#############################################
 -# check for fd passing struct via msg_control
@@ -38748,17 +38458,25 @@
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
-+$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
  
 -#include <sys/types.h>
 -#include <stdlib.h>
 -#include <stddef.h>
 -#include <sys/socket.h>
 -#include <sys/un.h>
--int
--main ()
--{
- 
++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 msghdr msg;
 -	union {
 -	      struct cmsghdr cm;
@@ -38766,12 +38484,13 @@
 -	} control_un;
 -	msg.msg_control = control_un.control;
 -	msg.msg_controllen = sizeof(control_un.control);
-+$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
++ struct foo {int x;char y;};
++       struct foo bar = { .y = 'X', .x = 1 };
  
--  ;
--  return 0;
--}
--_ACEOF
+   ;
+   return 0;
+ }
+ _ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -38791,84 +38510,69 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  samba_cv_msghdr_msg_control=yes
--else
++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: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+	fi
-+	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINUX_LFS_SUPPORT" >&5
-+$as_echo "$LINUX_LFS_SUPPORT" >&6; }
-+	;;
- 
+-
 -	samba_cv_msghdr_msg_control=no
--fi
-+#
-+# MacOS X is the *only* system that uses compose character in utf8. This
-+# is so horribly broken....
-+#
-+    *darwin*)
- 
--rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
--fi
++  { $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
 -{ $as_echo "$as_me:$LINENO: result: $samba_cv_msghdr_msg_control" >&5
 -$as_echo "$samba_cv_msghdr_msg_control" >&6; }
 -if test x"$samba_cv_msghdr_msg_control" = x"yes"; then
-+$as_echo "#define BROKEN_UNICODE_COMPOSE_CHARACTERS 1" >>confdefs.h
- 
+-
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_MSGHDR_MSG_CONTROL 1
 -_ACEOF
- 
+-
 -fi
-+# Add a system specific charset module.
-+	default_shared_modules="$default_shared_modules charset_macosxfs"
- 
+-
 -#############################################
 -# check for fd passing struct via msg_acctrights
 -{ $as_echo "$as_me:$LINENO: checking for fd passing via msg_acctrights" >&5
 -$as_echo_n "checking for fd passing via msg_acctrights... " >&6; }
 -if test "${samba_cv_msghdr_msg_acctrights+set}" = set; then
 -  $as_echo_n "(cached) " >&6
-+	;;
-+    *hurd*)
-+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LFS support" >&5
-+$as_echo_n "checking for LFS support... " >&6; }
-+        old_CPPFLAGS="$CPPFLAGS"
-+        CPPFLAGS="-D_LARGEFILE64_SOURCE -D_GNU_SOURCE $CPPFLAGS"
-+        if test "$cross_compiling" = yes; then :
-+  GLIBC_LFS_SUPPORT=cross
- else
+-else
 -
 -    cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++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 <sys/types.h>
 -#include <stdlib.h>
 -#include <stddef.h>
 -#include <sys/socket.h>
 -#include <sys/un.h>
--int
--main ()
--{
++#include <stdio.h>
+ int
+ main ()
+ {
 -
 -	struct msghdr msg;
 -	int fd;
 -	msg.msg_acctrights = (caddr_t) &fd;
 -	msg.msg_acctrightslen = sizeof(fd);
--
--  ;
--  return 0;
-+#include <unistd.h>
-+main () {
-+#if _LFS64_LARGEFILE == 1
-+exit(0);
-+#else
-+exit(1);
-+#endif
++ struct foo {int x;char y;};
++       struct foo bar = { .y = 'X', .x = 1 };
+ 
+   ;
+   return 0;
  }
  _ACEOF
 -rm -f conftest.$ac_objext
@@ -38890,35 +38594,31 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  samba_cv_msghdr_msg_acctrights=yes
-+if ac_fn_c_try_run "$LINENO"; then :
-+  GLIBC_LFS_SUPPORT=yes
++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: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	samba_cv_msghdr_msg_acctrights=no
-+  GLIBC_LFS_SUPPORT=no
++  { $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
-+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  fi
 -{ $as_echo "$as_me:$LINENO: result: $samba_cv_msghdr_msg_acctrights" >&5
 -$as_echo "$samba_cv_msghdr_msg_acctrights" >&6; }
 -if test x"$samba_cv_msghdr_msg_acctrights" = x"yes"; then
- 
+-
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_MSGHDR_MSG_ACCTRIGHTS 1
 -_ACEOF
 -
 -fi
-+        CPPFLAGS="$old_CPPFLAGS"
-+        if test x$GLIBC_LFS_SUPPORT = xyes ; then
-+          CPPFLAGS="-D_LARGEFILE64_SOURCE -D_GNU_SOURCE $CPPFLAGS"
- 
-+$as_echo "#define _LARGEFILE64_SOURCE 1" >>confdefs.h
- 
+-
+-
 -for ac_func in dirfd
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
@@ -38932,30 +38632,29 @@
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
++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.  */
 -/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
 -   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
 -#define $ac_func innocuous_$ac_func
- 
+-
 -/* System header to define __stub macros and hopefully few prototypes,
 -    which can conflict with char $ac_func (); below.
 -    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
 -    <limits.h> exists even on freestanding compilers.  */
-+$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
- 
+-
 -#ifdef __STDC__
 -# include <limits.h>
 -#else
 -# include <assert.h>
 -#endif
-+        fi
-+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GLIBC_LFS_SUPPORT" >&5
-+$as_echo "$GLIBC_LFS_SUPPORT" >&6; }
-+    ;;
- 
+-
 -#undef $ac_func
-+esac
- 
+-
 -/* 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.  */
@@ -38969,17 +38668,19 @@
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
 -#endif
-+SAVE_CPPFLAGS="${CPPFLAGS}"
-+CPPFLAGS="${CPPFLAGS} ${SAMBA_CONFIGURE_CPPFLAGS}"
- 
--int
--main ()
--{
+-
++#include <stdio.h>
+ int
+ main ()
+ {
 -return $ac_func ();
--  ;
--  return 0;
--}
--_ACEOF
++ struct foo {int x;char y;};
++       struct foo bar = { .y = 'X', .x = 1 };
++
+   ;
+   return 0;
+ }
+ _ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -39002,14 +38703,16 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  eval "$as_ac_var=yes"
--else
++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: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
- 
+-
 -	eval "$as_ac_var=no"
 -fi
-+echo "LIBREPLACE_BROKEN_CHECKS: START"
- 
+-
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
@@ -39024,23 +38727,17 @@
 -  cat >>confdefs.h <<_ACEOF
 -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 -_ACEOF
-+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"
- 
--fi
-+		break;
-+	fi
- done
 -
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
+ fi
+-done
+-
 -if test x"$ac_cv_func_dirfd" = x"yes"; then
 -	default_shared_modules="$default_shared_modules vfs_syncops vfs_dirsort"
-+if test x"$libreplacedir" = "x"; then
-+	as_fn_error "cannot find libreplace in $libreplacepaths" "$LINENO" 5
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  fi
- 
+-
 -{ $as_echo "$as_me:$LINENO: checking for struct sigevent type" >&5
 -$as_echo_n "checking for struct sigevent type... " >&6; }
 -if test "${samba_cv_struct_sigevent+set}" = set; then
@@ -39052,7 +38749,12 @@
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
++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 <sys/types.h>
 -#if STDC_HEADERS
@@ -39060,14 +38762,18 @@
 -#include <stddef.h>
 -#endif
 -#include <signal.h>
--int
--main ()
--{
++#include <stdio.h>
+ int
+ main ()
+ {
 -struct sigevent s;
--  ;
--  return 0;
--}
--_ACEOF
++ struct foo {int x;char y;};
++       struct foo bar = { .y = 'X', .x = 1 };
++
+   ;
+   return 0;
+ }
+ _ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -39087,51 +38793,60 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  samba_cv_struct_sigevent=yes
--else
++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: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	samba_cv_struct_sigevent=no
--fi
-+LIBREPLACEOBJ="replace.o"
- 
--rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
--fi
++  { $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
 -{ $as_echo "$as_me:$LINENO: result: $samba_cv_struct_sigevent" >&5
 -$as_echo "$samba_cv_struct_sigevent" >&6; }
 -if test x"$samba_cv_struct_sigevent" = x"yes"; then
- 
+-
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_STRUCT_SIGEVENT 1
 -_ACEOF
-+LIBREPLACEOBJ="${LIBREPLACEOBJ} snprintf.o"
- 
+-
 -   { $as_echo "$as_me:$LINENO: checking for struct sigevent.sigev_value.sival_ptr" >&5
 -$as_echo_n "checking for struct sigevent.sigev_value.sival_ptr... " >&6; }
 -if test "${ac_cv_member_struct_sigevent_sigev_value_sival_ptr+set}" = set; then
-+{ $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
+-  $as_echo_n "(cached) " >&6
+-else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
++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 <signal.h>
 -
--int
--main ()
--{
++#include <stdio.h>
+ int
+ main ()
+ {
 -static struct sigevent ac_aggr;
 -if (ac_aggr.sigev_value.sival_ptr)
 -return 0;
--  ;
--  return 0;
--}
--_ACEOF
++ struct foo {int x;char y;};
++       struct foo bar = { .y = 'X', .x = 1 };
++
+   ;
+   return 0;
+ }
+ _ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -39151,31 +38866,44 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_cv_member_struct_sigevent_sigev_value_sival_ptr=yes
--else
++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: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
++  { $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
+ 
 -	cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
-+#include <sys/types.h>
- #include <signal.h>
+-/* end confdefs.h.  */
+-#include <signal.h>
++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
  
- int
- main ()
- {
+-int
+-main ()
+-{
 -static struct sigevent ac_aggr;
 -if (sizeof ac_aggr.sigev_value.sival_ptr)
 -return 0;
-+return *(signal (0, 0)) (0) == 1;
-   ;
-   return 0;
- }
- _ACEOF
+-  ;
+-  return 0;
+-}
+-_ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -39195,41 +38923,233 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_cv_member_struct_sigevent_sigev_value_sival_ptr=yes
-+if ac_fn_c_try_compile "$LINENO"; then :
-+  ac_cv_type_signal=int
- else
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
++if test x"$c99_init" = x"yes"; then
++    saved_CFLAGS=""
+ 
 -	ac_cv_member_struct_sigevent_sigev_value_sival_ptr=no
--fi
--
++else
++    CFLAGS="$saved_CFLAGS"
++    saved_CFLAGS=""
++    as_fn_error "c99 structure initializer are not supported" "$LINENO" 5
+ fi
+ 
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-+  ac_cv_type_signal=void
++
++UNAME_S=`(uname -s) 2>/dev/null` || UNAME_S="unknown"
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking uname -s" >&5
++$as_echo_n "checking uname -s... " >&6; }
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNAME_S}" >&5
++$as_echo "${UNAME_S}" >&6; }
++
++UNAME_R=`(uname -r) 2>/dev/null` || UNAME_R="unknown"
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking uname -r" >&5
++$as_echo_n "checking uname -r... " >&6; }
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNAME_R}" >&5
++$as_echo "${UNAME_R}" >&6; }
++
++UNAME_M=`(uname -m) 2>/dev/null` || UNAME_M="unknown"
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking uname -m" >&5
++$as_echo_n "checking uname -m... " >&6; }
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNAME_M}" >&5
++$as_echo "${UNAME_M}" >&6; }
++
++UNAME_P=`(uname -p) 2>/dev/null` || UNAME_P="unknown"
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking uname -p" >&5
++$as_echo_n "checking uname -p... " >&6; }
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNAME_P}" >&5
++$as_echo "${UNAME_P}" >&6; }
++
++UNAME_I=`(uname -i) 2>/dev/null` || UNAME_I="unknown"
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking uname -i" >&5
++$as_echo_n "checking uname -i... " >&6; }
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNAME_I}" >&5
++$as_echo "${UNAME_I}" >&6; }
++
++  case "$host_os" in
++	*irix6*)
++		#TODO add to libreplace
++		if test x"$ac_cv_c_compiler_gnu" != x"yes" ; then
++																								CFLAGS="$CFLAGS -diag_error 1035"
++												CFLAGS="$CFLAGS -woff 1209,1174,3201"
++		fi
++	;;
++esac
++
++DYNEXP=
++
++
++default_static_modules="pdb_smbpasswd pdb_tdbsam pdb_wbc_sam rpc_lsarpc rpc_samr rpc_winreg rpc_initshutdown rpc_dssetup rpc_wkssvc rpc_svcctl rpc_ntsvcs rpc_netlogon rpc_netdfs rpc_srvsvc rpc_spoolss rpc_eventlog auth_sam auth_unix auth_winbind auth_wbc auth_server auth_domain auth_builtin auth_netlogond vfs_default nss_info_template"
++
++default_shared_modules="vfs_recycle vfs_audit vfs_extd_audit vfs_full_audit vfs_netatalk vfs_fake_perms vfs_default_quota vfs_readonly vfs_cap vfs_expand_msdfs vfs_shadow_copy vfs_shadow_copy2 charset_CP850 charset_CP437 auth_script vfs_readahead vfs_xattr_tdb vfs_streams_xattr vfs_streams_depot vfs_acl_xattr vfs_acl_tdb vfs_smb_traffic_analyzer vfs_preopen"
++
++if test "x$developer" = xyes; then
++   default_static_modules="$default_static_modules rpc_rpcecho"
++   default_shared_modules="$default_shared_modules charset_weird perfcount_test"
  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
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_sigevent_sigev_value_sival_ptr" >&5
 -$as_echo "$ac_cv_member_struct_sigevent_sigev_value_sival_ptr" >&6; }
 -if test "x$ac_cv_member_struct_sigevent_sigev_value_sival_ptr" = x""yes; then
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
-+$as_echo "$ac_cv_type_signal" >&6; }
++#
++# Config CPPFLAG settings for strange OS's that must be set
++# before other tests. Do NOT invoke AC_CHECK_HEADERS within this
++# case statement; its first reference must be unconditional.
++#
++case "$host_os" in
++    *hpux*)
++#
++# Defines needed for HPUX support.
++# HPUX has bigcrypt but (sometimes?) doesn't use it for
++# password hashing - hence the USE_BOTH_CRYPT_CALLS define.
++#
++      case `uname -r` in
++		*9*|*10*|*11)
++
++$as_echo "#define USE_BOTH_CRYPT_CALLS 1" >>confdefs.h
++
++		;;
++      esac
++      ;;
++
++#
++# CRAY Unicos has broken const handling
++       *unicos*)
++	  { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabling const" >&5
++$as_echo "disabling const" >&6; }
++	  CPPFLAGS="$CPPFLAGS -Dconst="
++	  ;;
++
++#
++# AIX4.x doesn't even admit to having large
++# files *at all* unless the -D_LARGE_FILE or -D_LARGE_FILE_API flags are set.
++#
++    *aix4*)
++	  { $as_echo "$as_me:${as_lineno-$LINENO}: result: enabling large file support" >&5
++$as_echo "enabling large file support" >&6; }
++      CPPFLAGS="$CPPFLAGS -D_LARGE_FILES"
++
++$as_echo "#define _LARGE_FILES 1" >>confdefs.h
++
++      ;;
++#
++# Defines needed for Solaris 2.6/2.7 aka 7.0 to make it admit
++# to the existance of large files..
++# Note that -D_LARGEFILE64_SOURCE is different from the Sun
++# recommendations on large file support, however it makes the
++# compile work using gcc 2.7 and 2.8, whereas using the Sun
++# recommendation makes the compile fail on gcc2.7. JRA.
++#
++# Solaris uses SYSV printing.  Make sure to set that here.  --jerry
++#
++	*solaris*)
++
++$as_echo "#define SYSV 1" >>confdefs.h
++
++		case `uname -r` in
++			5.0|5.0.*|5.1|5.1.*|5.2|5.2.*|5.3|5.3.*|5.5|5.5.*)
++	  			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no large file support" >&5
++$as_echo "no large file support" >&6; }
++				;;
++			5.*)
++			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: enabling large file support" >&5
++$as_echo "enabling large file support" >&6; }
++			if test "$ac_cv_c_compiler_gnu" = yes; then
++				${CC-cc} -v >conftest.c 2>&1
++				ac_cv_gcc_compiler_version_number=`grep 'gcc version' conftest.c`
++				rm -fr conftest.c
++				case "$ac_cv_gcc_compiler_version_number" in
++					*"gcc version 2.6"*|*"gcc version 2.7"*)
++						CPPFLAGS="$CPPFLAGS -D_LARGEFILE64_SOURCE -D_REENTRANT"
++						LDFLAGS="$LDFLAGS -lthread"
++
++$as_echo "#define _LARGEFILE64_SOURCE 1" >>confdefs.h
++
++						;;
++					*)
++						CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_REENTRANT -D_FILE_OFFSET_BITS=64"
++						LDFLAGS="$LDFLAGS -lthread"
++
++$as_echo "#define _LARGEFILE64_SOURCE 1" >>confdefs.h
++
++
++$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
++
++						;;
++				esac
++			else
++				CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_REENTRANT -D_FILE_OFFSET_BITS=64"
++				LDFLAGS="$LDFLAGS -lthread"
++
++$as_echo "#define _LARGEFILE64_SOURCE 1" >>confdefs.h
++
++
++$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
++
++			fi
++			;;
++		esac
++		;;
++#
++# IRIX uses SYSV printing.  Make sure to set that here
++#
++	*irix*)
++
++$as_echo "#define SYSV 1" >>confdefs.h
++
++		;;
++	*freebsd*|*dragonfly*)
++
++$as_echo "#define FREEBSD 1" >>confdefs.h
++
++		;;
++#
++# VOS may need to have POSIX support and System V compatibility enabled.
++#
++    *vos*)
++    case "$CPPFLAGS" in
++	  *-D_POSIX_C_SOURCE*)
++		;;
++	  *)
++		CPPFLAGS="$CPPFLAGS -D_POSIX_C_SOURCE=200112L"
++
++$as_echo "#define _POSIX_C_SOURCE 200112L" >>confdefs.h
  
- cat >>confdefs.h <<_ACEOF
+-cat >>confdefs.h <<_ACEOF
 -#define HAVE_STRUCT_SIGEVENT_SIGEV_VALUE_SIVAL_PTR 1
-+#define RETSIGTYPE $ac_cv_type_signal
- _ACEOF
+-_ACEOF
++		;;
++    esac
++    case "$CPPFLAGS" in
++	  *-D_SYSV*|*-D_SVID_SOURCE*)
++		;;
++	  *)
++		CPPFLAGS="$CPPFLAGS -D_SYSV"
  
++$as_echo "#define _SYSV 1" >>confdefs.h
  
 -fi
 -{ $as_echo "$as_me:$LINENO: checking for struct sigevent.sigev_value.sigval_ptr" >&5
 -$as_echo_n "checking for struct sigevent.sigev_value.sigval_ptr... " >&6; }
 -if test "${ac_cv_member_struct_sigevent_sigev_value_sigval_ptr+set}" = set; then
-+{ $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
+-  $as_echo_n "(cached) " >&6
++    esac
++    ;;
++#
++# Tests needed for SINIX large file support.
++#
++    *sysv4*)
++      if test $host = mips-sni-sysv4 ; then
++        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LFS support" >&5
++$as_echo_n "checking for LFS support... " >&6; }
++        old_CPPFLAGS="$CPPFLAGS"
++        CPPFLAGS="-D_LARGEFILE64_SOURCE $CPPFLAGS"
++        if test "$cross_compiling" = yes; then :
++  SINIX_LFS_SUPPORT=cross
  else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
@@ -39239,7 +39159,6 @@
 +  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
 -#include <signal.h>
-+#include <sys/types.h>
  
 -int
 -main ()
@@ -39249,7 +39168,14 @@
 -return 0;
 -  ;
 -  return 0;
--}
++#include <unistd.h>
++main () {
++#if _LFS64_LARGEFILE == 1
++exit(0);
++#else
++exit(1);
++#endif
+ }
  _ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
@@ -39270,15 +39196,16 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_cv_member_struct_sigevent_sigev_value_sigval_ptr=yes
-+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-+  $EGREP "uid_t" >/dev/null 2>&1; then :
-+  ac_cv_type_uid_t=yes
++if ac_fn_c_try_run "$LINENO"; then :
++  SINIX_LFS_SUPPORT=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+  ac_cv_type_uid_t=no
++  SINIX_LFS_SUPPORT=no
 +fi
-+rm -f conftest*
++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
++  conftest.$ac_objext conftest.beam conftest.$ac_ext
++fi
  
 -	cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
@@ -39287,10 +39214,9 @@
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
 -#include <signal.h>
-+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
++        CPPFLAGS="$old_CPPFLAGS"
++        if test x$SINIX_LFS_SUPPORT = xyes ; then
++          CPPFLAGS="-D_LARGEFILE64_SOURCE $CPPFLAGS"
  
 -int
 -main ()
@@ -39324,56 +39250,75 @@
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+$as_echo "#define uid_t int" >>confdefs.h
++$as_echo "#define _LARGEFILE64_SOURCE 1" >>confdefs.h
  
 -	ac_cv_member_struct_sigevent_sigev_value_sigval_ptr=no
 -fi
++          CFLAGS="`getconf LFS64_CFLAGS` $CFLAGS"
++          LDFLAGS="`getconf LFS64_LDFLAGS` $LDFLAGS"
++          LIBS="`getconf LFS64_LIBS` $LIBS"
++        fi
++      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SINIX_LFS_SUPPORT" >&5
++$as_echo "$SINIX_LFS_SUPPORT" >&6; }
++      fi
++    ;;
  
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -fi
-+$as_echo "#define gid_t int" >>confdefs.h
++# Systems with LFS support.
++#
++    gnu* | k*bsd*-gnu | kopensolaris*-gnu)
++	CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS"
  
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
+-fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_sigevent_sigev_value_sigval_ptr" >&5
 -$as_echo "$ac_cv_member_struct_sigevent_sigev_value_sigval_ptr" >&6; }
 -if test "x$ac_cv_member_struct_sigevent_sigev_value_sigval_ptr" = x""yes; then
-+
-+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
++$as_echo "#define _LARGEFILE64_SOURCE 1" >>confdefs.h
  
- cat >>confdefs.h <<_ACEOF
+-cat >>confdefs.h <<_ACEOF
 -#define HAVE_STRUCT_SIGEVENT_SIGEV_VALUE_SIGVAL_PTR 1
-+#define mode_t int
- _ACEOF
+-_ACEOF
  
--
- fi
++$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
  
 -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 :
  
+-fi
++$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
+ 
 -{ $as_echo "$as_me:$LINENO: checking for struct timespec type" >&5
 -$as_echo_n "checking for struct timespec type... " >&6; }
 -if test "${samba_cv_struct_timespec+set}" = set; then
 -  $as_echo_n "(cached) " >&6
- else
+-else
++	;;
  
 -    cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
-+cat >>confdefs.h <<_ACEOF
-+#define off_t long int
- _ACEOF
+-_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
++# Tests for linux LFS support. Need kernel 2.4 and glibc2.2 or greater support.
++#
++    *linux*)
++        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LFS support" >&5
++$as_echo_n "checking for LFS support... " >&6; }
++        old_CPPFLAGS="$CPPFLAGS"
++        CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS"
++       if test "$cross_compiling" = yes; then :
++  LINUX_LFS_SUPPORT=cross
++else
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
  
 -#include <sys/types.h>
 -#if STDC_HEADERS
--#include <stdlib.h>
++#include <unistd.h>
++#include <sys/utsname.h>
++#include <string.h>
+ #include <stdlib.h>
 -#include <stddef.h>
 -#endif
 -#if TIME_WITH_SYS_TIME
@@ -39386,11 +39331,7 @@
 -#  include <time.h>
 -# endif
 -#endif
-+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 :
- 
+-
 -int
 -main ()
 -{
@@ -39418,34 +39359,43 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  samba_cv_struct_timespec=yes
- else
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
++main() {
++#if _LFS64_LARGEFILE == 1
++       struct utsname uts;
++       char *release;
++       int major, minor;
  
 -	samba_cv_struct_timespec=no
 -fi
-+cat >>confdefs.h <<_ACEOF
-+#define size_t unsigned int
-+_ACEOF
++       /* Ensure this is glibc 2.2 or higher */
++#if defined(__GLIBC__) && defined(__GLIBC_MINOR__)
++       int libc_major = __GLIBC__;
++       int libc_minor = __GLIBC_MINOR__;
  
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
+-fi
 -{ $as_echo "$as_me:$LINENO: result: $samba_cv_struct_timespec" >&5
 -$as_echo "$samba_cv_struct_timespec" >&6; }
 -if test x"$samba_cv_struct_timespec" = x"yes"; then
++       if (libc_major < 2)
++              exit(1);
++       if (libc_minor < 2)
++              exit(1);
++#endif
  
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_STRUCT_TIMESPEC 1
-+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
+-_ACEOF
++       /* Ensure this is kernel 2.4 or higher */
  
- fi
+-fi
++       uname(&uts);
++       release = strdup(uts.release);
++       major = atoi(strsep(&release, "."));
++       minor = atoi(strsep(&release, "."));
  
 -# and glibc has setresuid under linux but the function does
 -# nothing until kernel 2.1.44! very dumb.
@@ -39454,8 +39404,13 @@
 -if test "${samba_cv_have_setresuid+set}" = set; then
 -  $as_echo_n "(cached) " >&6
 -else
-+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 :
++       if (major > 2 || (major == 2 && minor > 3))
++               exit(0);
++       exit(1);
++#else
++       exit(1);
++#endif
++}
  
 -    if test "$cross_compiling" = yes; then
 -  samba_cv_have_setresuid=cross
@@ -39468,8 +39423,6 @@
 -/* end confdefs.h.  */
 -#include <errno.h>
 -main() { setresuid(1,1,1); setresuid(2,2,2); exit(errno==EPERM?0:1);}
-+cat >>confdefs.h <<_ACEOF
-+#define HAVE_STRUCT_STAT_ST_RDEV 1
  _ACEOF
 -rm -f conftest$ac_exeext
 -if { (ac_try="$ac_link"
@@ -39494,38 +39447,39 @@
 -  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
 -  (exit $ac_status); }; }; then
 -  samba_cv_have_setresuid=yes
--else
++if ac_fn_c_try_run "$LINENO"; then :
++  LINUX_LFS_SUPPORT=yes
+ 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
- 
+-
 -( exit $ac_status )
 -samba_cv_have_setresuid=no
--fi
++  LINUX_LFS_SUPPORT=no
+ fi
 -rm -rf conftest.dSYM
 -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
--fi
++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
++  conftest.$ac_objext conftest.beam conftest.$ac_ext
+ fi
  
-+$as_echo "#define HAVE_ST_RDEV 1" >>confdefs.h
++	CPPFLAGS="$old_CPPFLAGS"
++	if test x$LINUX_LFS_SUPPORT = xyes ; then
++		CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS"
  
- fi
+-fi
 -{ $as_echo "$as_me:$LINENO: result: $samba_cv_have_setresuid" >&5
 -$as_echo "$samba_cv_have_setresuid" >&6; }
 -if test x"$samba_cv_have_setresuid" = x"yes"; then
++$as_echo "#define _LARGEFILE64_SOURCE 1" >>confdefs.h
  
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_SETRESUID 1
-+
-+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
+-_ACEOF
  
- fi
+-fi
++$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
  
 -# Do the same check for setresguid...
 -#
@@ -39534,12 +39488,10 @@
 -if test "${samba_cv_have_setresgid+set}" = set; then
 -  $as_echo_n "(cached) " >&6
 -else
-+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 :
  
 -    if test "$cross_compiling" = yes; then
 -  samba_cv_have_setresgid=cross
- else
+-else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
@@ -39549,10 +39501,7 @@
 -#include <unistd.h>
 -#include <errno.h>
 -main() { errno = 0; setresgid(1,1,1); exit(errno != 0 ? (errno==EPERM ? 0 : 1) : 0);}
-+
-+cat >>confdefs.h <<_ACEOF
-+#define loff_t off_t
- _ACEOF
+-_ACEOF
 -rm -f conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -39580,42 +39529,54 @@
 -  $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
++$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
  
 -( exit $ac_status )
 -samba_cv_have_setresgid=no
 -fi
 -rm -rf conftest.dSYM
 -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
- fi
+-fi
++	fi
++	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINUX_LFS_SUPPORT" >&5
++$as_echo "$LINUX_LFS_SUPPORT" >&6; }
++	;;
  
-+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 :
++#
++# MacOS X is the *only* system that uses compose character in utf8. This
++# is so horribly broken....
++#
++    *darwin*)
  
 -fi
 -{ $as_echo "$as_me:$LINENO: result: $samba_cv_have_setresgid" >&5
 -$as_echo "$samba_cv_have_setresgid" >&6; }
 -if test x"$samba_cv_have_setresgid" = x"yes"; then
-+else
++$as_echo "#define BROKEN_UNICODE_COMPOSE_CHARACTERS 1" >>confdefs.h
  
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_SETRESGID 1
-+cat >>confdefs.h <<_ACEOF
-+#define offset_t loff_t
- _ACEOF
+-_ACEOF
  
- fi
+-fi
++# Add a system specific charset module.
++	default_shared_modules="$default_shared_modules charset_macosxfs"
  
 -{ $as_echo "$as_me:$LINENO: checking for working memcmp" >&5
-+
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working memcmp" >&5
- $as_echo_n "checking for working memcmp... " >&6; }
+-$as_echo_n "checking for working memcmp... " >&6; }
 -if test "${ac_cv_func_memcmp_working+set}" = set; then
-+if test "${ac_cv_func_memcmp_working+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
+-  $as_echo_n "(cached) " >&6
+-else
 -  if test "$cross_compiling" = yes; then
-+  if test "$cross_compiling" = yes; then :
-   ac_cv_func_memcmp_working=no
+-  ac_cv_func_memcmp_working=no
++	;;
++    *hurd*)
++        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LFS support" >&5
++$as_echo_n "checking for LFS support... " >&6; }
++        old_CPPFLAGS="$CPPFLAGS"
++        CPPFLAGS="-D_LARGEFILE64_SOURCE -D_GNU_SOURCE $CPPFLAGS"
++        if test "$cross_compiling" = yes; then :
++  GLIBC_LFS_SUPPORT=cross
  else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
@@ -39624,10 +39585,44 @@
 -cat >>conftest.$ac_ext <<_ACEOF
 +  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
- $ac_includes_default
- int
-@@ -38445,44 +8703,17 @@
-   return 0;
+-$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;
++#include <unistd.h>
++main () {
++#if _LFS64_LARGEFILE == 1
++exit(0);
++#else
++exit(1);
++#endif
  }
  _ACEOF
 -rm -f conftest$ac_exeext
@@ -39652,8 +39647,9 @@
 -  ac_status=$?
 -  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
 -  (exit $ac_status); }; }; then
+-  ac_cv_func_memcmp_working=yes
 +if ac_fn_c_try_run "$LINENO"; then :
-   ac_cv_func_memcmp_working=yes
++  GLIBC_LFS_SUPPORT=yes
  else
 -  $as_echo "$as_me: program exited with status $ac_status" >&5
 -$as_echo "$as_me: failed program was:" >&5
@@ -39661,7 +39657,7 @@
 -
 -( exit $ac_status )
 -ac_cv_func_memcmp_working=no
-+  ac_cv_func_memcmp_working=no
++  GLIBC_LFS_SUPPORT=no
  fi
 -rm -rf conftest.dSYM
 -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
@@ -39669,35 +39665,46 @@
 +  conftest.$ac_objext conftest.beam conftest.$ac_ext
  fi
  
--
- fi
++        CPPFLAGS="$old_CPPFLAGS"
++        if test x$GLIBC_LFS_SUPPORT = xyes ; then
++          CPPFLAGS="-D_LARGEFILE64_SOURCE -D_GNU_SOURCE $CPPFLAGS"
++
++$as_echo "#define _LARGEFILE64_SOURCE 1" >>confdefs.h
++
++
++$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
++
++        fi
++      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GLIBC_LFS_SUPPORT" >&5
++$as_echo "$GLIBC_LFS_SUPPORT" >&6; }
++    ;;
+ 
+-fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_memcmp_working" >&5
-+{ $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 "* ) ;;
-@@ -38492,166 +8723,418 @@
+-$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
  
++SAVE_CPPFLAGS="${CPPFLAGS}"
++CPPFLAGS="${CPPFLAGS} ${SAMBA_CONFIGURE_CPPFLAGS}"
  
  
 -###############################################
 -# Readline included by default unless explicitly asked not to
 -test "${with_readline+set}" != "set" && with_readline=yes
-+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
++echo "LIBREPLACE_BROKEN_CHECKS: START"
  
 -# test for where we get readline() from
 -{ $as_echo "$as_me:$LINENO: checking whether to use readline" >&5
 -$as_echo_n "checking whether to use readline... " >&6; }
-+fi
-+done
++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"
  
 -# Check whether --with-readline was given.
 -if test "${with_readline+set}" = set; then
@@ -39705,20 +39712,17 @@
 -  yes)
 -    { $as_echo "$as_me:$LINENO: result: yes" >&5
 -$as_echo "yes" >&6; }
++		break;
++	fi
++done
++if test x"$libreplacedir" = "x"; then
++	as_fn_error "cannot find libreplace in $libreplacepaths" "$LINENO" 5
++fi
  
-+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
++LIBREPLACEOBJ="replace.o"
  
-+fi
  
-+done
++LIBREPLACEOBJ="${LIBREPLACEOBJ} snprintf.o"
  
 -for ac_header in readline.h history.h readline/readline.h
 -do
@@ -39727,300 +39731,35 @@
 -  { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
 -$as_echo_n "checking for $ac_header... " >&6; }
 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-+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 "$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
-+
-+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
+-fi
 -ac_res=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
 -$as_echo "$ac_res" >&6; }
-+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_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 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
 -  # Is the header compilable?
 -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
 -$as_echo_n "checking $ac_header usability... " >&6; }
 -cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
-+
-+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h.  */
-+#include <unistd.h>
-+int
-+main ()
-+{
-+int i = (int)setresuid
-+  ;
-+  return 0;
-+}
- _ACEOF
+-_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_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
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
 -$ac_includes_default
 -#include <$ac_header>
-+#include <unistd.h>
++#include <sys/types.h>
++#include <signal.h>
++
 +int
 +main ()
 +{
-+int i = (int)setresgid
++return *(signal (0, 0)) (0) == 1;
 +  ;
 +  return 0;
 +}
@@ -40045,54 +39784,21 @@
 -       } && test -s conftest.$ac_objext; then
 -  ac_header_compiler=yes
 +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
++  ac_cv_type_signal=int
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
- 
+-
 -	ac_header_compiler=no
-+    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
++  ac_cv_type_signal=void
  fi
 -
  rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 -$as_echo "$ac_header_compiler" >&6; }
 +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 "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
++$as_echo "$ac_cv_type_signal" >&6; }
  
 -# Is the header present?
 -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
@@ -40102,37 +39808,10 @@
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+$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.  */
+-/* end confdefs.h.  */
 -#include <$ac_header>
-+#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);
-+}
++cat >>confdefs.h <<_ACEOF
++#define RETSIGTYPE $ac_cv_type_signal
  _ACEOF
 -if { (ac_try="$ac_cpp conftest.$ac_ext"
 -case "(($ac_try" in
@@ -40152,27 +39831,16 @@
 -	 test ! -s conftest.err
 -       }; then
 -  ac_header_preproc=yes
-+if ac_fn_c_try_run "$LINENO"; then :
-+  libreplace_cv_HAVE_SECURE_MKSTEMP=yes
- else
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+  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
- 
+-
 -  ac_header_preproc=no
- 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
+-fi
  
 -rm -f conftest.err conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
 -$as_echo "$ac_header_preproc" >&6; }
-+$as_echo "#define HAVE_SECURE_MKSTEMP 1" >>confdefs.h
  
 -# So?  What about this header?
 -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
@@ -40207,33 +39875,45 @@
 -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
 -$as_echo_n "checking for $ac_header... " >&6; }
 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
--  $as_echo_n "(cached) " >&6
--else
++{ $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
 -  eval "$as_ac_Header=\$ac_header_preproc"
- fi
+-fi
 -ac_res=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
 -$as_echo "$ac_res" >&6; }
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++#include <sys/types.h>
  
 -fi
 -as_val=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+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
+-  cat >>confdefs.h <<_ACEOF
+-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
-@@ -38660,626 +9143,265 @@
++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*
  
- done
+ 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
  
--
+-done
++$as_echo "#define uid_t int" >>confdefs.h
+ 
+ 
 -for ac_header in readline/history.h
 -do
 -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
@@ -40247,10 +39927,7 @@
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
 -$as_echo "$ac_res" >&6; }
-+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
+-else
 -  # Is the header compilable?
 -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
 -$as_echo_n "checking $ac_header usability... " >&6; }
@@ -40262,12 +39939,7 @@
 -/* end confdefs.h.  */
 -$ac_includes_default
 -#include <$ac_header>
-+  ac_have_decl=0
-+fi
-+
-+cat >>confdefs.h <<_ACEOF
-+#define HAVE_DECL_SNPRINTF $ac_have_decl
- _ACEOF
+-_ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -40287,21 +39959,20 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_header_compiler=yes
-+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
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
++$as_echo "#define gid_t int" >>confdefs.h
+ 
 -	ac_header_compiler=no
-+  ac_have_decl=0
  fi
  
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 -$as_echo "$ac_header_compiler" >&6; }
--
++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 :
+ 
 -# Is the header present?
 -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
 -$as_echo_n "checking $ac_header presence... " >&6; }
@@ -40312,9 +39983,7 @@
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
 -#include <$ac_header>
-+cat >>confdefs.h <<_ACEOF
-+#define HAVE_DECL_VSNPRINTF $ac_have_decl
- _ACEOF
+-_ACEOF
 -if { (ac_try="$ac_cpp conftest.$ac_ext"
 -case "(($ac_try" in
 -  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -40333,21 +40002,23 @@
 -	 test ! -s conftest.err
 -       }; then
 -  ac_header_preproc=yes
-+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
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
+ 
 -  ac_header_preproc=no
-+  ac_have_decl=0
++cat >>confdefs.h <<_ACEOF
++#define mode_t int
++_ACEOF
++
  fi
  
 -rm -f conftest.err conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
 -$as_echo "$ac_header_preproc" >&6; }
--
++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 :
+ 
 -# So?  What about this header?
 -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
 -  yes:no: )
@@ -40382,47 +40053,57 @@
 -$as_echo_n "checking for $ac_header... " >&6; }
 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
 -  $as_echo_n "(cached) " >&6
+ else
+-  eval "$as_ac_Header=\$ac_header_preproc"
++
 +cat >>confdefs.h <<_ACEOF
-+#define HAVE_DECL_ASPRINTF $ac_have_decl
++#define off_t long int
 +_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
--  eval "$as_ac_Header=\$ac_header_preproc"
-+  ac_have_decl=0
++
  fi
 -ac_res=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
 -$as_echo "$ac_res" >&6; }
++
++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
+ fi
 -as_val=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
+-  cat >>confdefs.h <<_ACEOF
+-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
++
++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 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_header" | $as_tr_cpp` 1
-+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
++#define pid_t int
  _ACEOF
  
  fi
--
- done
  
+-done
++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
+ 
 -for ac_header in readline.h readline/readline.h
 -do
 -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
@@ -40430,15 +40111,17 @@
 -  { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
 -$as_echo_n "checking for $ac_header... " >&6; }
 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-+{ $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
--fi
+-  $as_echo_n "(cached) " >&6
+ fi
 -ac_res=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
 -$as_echo "$ac_res" >&6; }
++
++
++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
 -  # Is the header compilable?
 -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
@@ -40451,7 +40134,10 @@
 -/* end confdefs.h.  */
 -$ac_includes_default
 -#include <$ac_header>
--_ACEOF
++
++cat >>confdefs.h <<_ACEOF
++#define ino_t unsigned
+ _ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -40471,51 +40157,18 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_header_compiler=yes
-+
-+if test "$cross_compiling" = yes; then :
-+  libreplace_cv_HAVE_C99_VSNPRINTF=cross
- else
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h.  */
  
 -	ac_header_compiler=no
--fi
-+#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;
+ fi
  
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 -$as_echo "$ac_header_compiler" >&6; }
-+       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"); }
++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 :
  
 -# Is the header present?
 -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
@@ -40527,7 +40180,7 @@
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
 -#include <$ac_header>
- _ACEOF
+-_ACEOF
 -if { (ac_try="$ac_cpp conftest.$ac_ext"
 -case "(($ac_try" in
 -  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -40546,27 +40199,22 @@
 -	 test ! -s conftest.err
 -       }; then
 -  ac_header_preproc=yes
-+if ac_fn_c_try_run "$LINENO"; then :
-+  libreplace_cv_HAVE_C99_VSNPRINTF=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+  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
  
 -  ac_header_preproc=no
++cat >>confdefs.h <<_ACEOF
++#define loff_t off_t
++_ACEOF
++
  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
  
 -rm -f conftest.err conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
 -$as_echo "$ac_header_preproc" >&6; }
-+$as_echo "#define HAVE_C99_VSNPRINTF 1" >>confdefs.h
++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 :
  
 -# So?  What about this header?
 -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
@@ -40602,9 +40250,9 @@
 -$as_echo_n "checking for $ac_header... " >&6; }
 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
 -  $as_echo_n "(cached) " >&6
--else
+ else
 -  eval "$as_ac_Header=\$ac_header_preproc"
- fi
+-fi
 -ac_res=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
@@ -40616,16 +40264,21 @@
 -   if test "x$as_val" = x""yes; then
 -  cat >>confdefs.h <<_ACEOF
 -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
--_ACEOF
++cat >>confdefs.h <<_ACEOF
++#define offset_t loff_t
+ _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:$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 "$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 :
++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
 -  ac_check_lib_save_LIBS=$LIBS
@@ -40635,8 +40288,12 @@
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
- 
++  if test "$cross_compiling" = yes; then :
++  ac_cv_func_memcmp_working=no
++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.  */
@@ -40644,15 +40301,36 @@
 -extern "C"
 -#endif
 -char tgetent ();
-+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h.  */
-+#include <stdarg.h>
-+va_list ap1,ap2;
++$ac_includes_default
  int
  main ()
  {
 -return tgetent ();
-+va_copy(ap1,ap2);
++
++  /* 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;
  }
@@ -40679,22 +40357,22 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  eval "$as_ac_Lib=yes"
-+if ac_fn_c_try_link "$LINENO"; then :
-+  libreplace_cv_HAVE_VA_COPY=yes
++if ac_fn_c_try_run "$LINENO"; then :
++  ac_cv_func_memcmp_working=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	eval "$as_ac_Lib=no"
-+  libreplace_cv_HAVE_VA_COPY=no
++  ac_cv_func_memcmp_working=no
  fi
 -
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
 -LIBS=$ac_check_lib_save_LIBS
-+rm -f core conftest.err conftest.$ac_objext \
-+    conftest$ac_exeext conftest.$ac_ext
++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
++  conftest.$ac_objext conftest.beam conftest.$ac_ext
  fi
 -ac_res=`eval 'as_val=${'$as_ac_Lib'}
 -		 $as_echo "$as_val"'`
@@ -40704,24 +40382,22 @@
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
 -  TERMLIBS="-l${termlib}"; break
-+{ $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
++{ $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
  
 -      done
 -      { $as_echo "$as_me:$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
-+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
+-  $as_echo_n "(cached) " >&6
+-else
 -  ac_check_lib_save_LIBS=$LIBS
 -LIBS="-lreadline $TERMLIBS $LIBS"
 -cat >conftest.$ac_ext <<_ACEOF
@@ -40738,18 +40414,22 @@
 -extern "C"
 -#endif
 -char rl_callback_handler_install ();
-+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h.  */
-+#include <stdarg.h>
-+va_list ap1,ap2;
- int
- main ()
- {
+-int
+-main ()
+-{
 -return rl_callback_handler_install ();
-+__va_copy(ap1,ap2);
-   ;
-   return 0;
- }
+-  ;
+-  return 0;
+-}
++
++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
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
@@ -40773,45 +40453,57 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  ac_cv_lib_readline_rl_callback_handler_install=yes
-+if ac_fn_c_try_link "$LINENO"; then :
-+  libreplace_cv_HAVE___VA_COPY=yes
- else
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
+ 
 -	ac_cv_lib_readline_rl_callback_handler_install=no
-+  libreplace_cv_HAVE___VA_COPY=no
  fi
--
++done
+ 
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
 -LIBS=$ac_check_lib_save_LIBS
-+rm -f core conftest.err conftest.$ac_objext \
-+    conftest$ac_exeext conftest.$ac_ext
- fi
+-fi
 -{ $as_echo "$as_me:$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"
-+{ $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
  
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_LIBREADLINE 1
--_ACEOF
-+$as_echo "#define HAVE___VA_COPY 1" >>confdefs.h
++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
  
 -       break
 -else
 -  TERMLIBS=
  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
--
+ done
+ 
 -    ;;
 -  no)
 -    { $as_echo "$as_me:$LINENO: result: no" >&5
@@ -40820,19 +40512,25 @@
 -  *)
 -    { $as_echo "$as_me:$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}
--
++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"
+ 
 -    # Add additional search path
 -    LDFLAGS="-L$with_readline/lib $LDFLAGS"
 -    CPPFLAGS="-I$with_readline/include $CPPFLAGS"
--
--
--
--
++else
++   ac_config_commands="$ac_config_commands mk-stdint.h"
+ 
+ 
++fi
+ 
+ 
 -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`
@@ -40840,15 +40538,17 @@
 -  { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
 -$as_echo_n "checking for $ac_header... " >&6; }
 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-+{ $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
+-  $as_echo_n "(cached) " >&6
 -fi
 -ac_res=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
 -$as_echo "$ac_res" >&6; }
++
++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
 -  # Is the header compilable?
 -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
@@ -40858,20 +40558,19 @@
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
++   ac_config_commands="$ac_config_commands mk-stdbool.h"
 +
-+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
--$ac_includes_default
++
++fi
++
++
++
++
++ac_fn_c_check_type "$LINENO" "bool" "ac_cv_type_bool" "
+ $ac_includes_default
 -#include <$ac_header>
-+#include <stdio.h>
-+int
-+main ()
-+{
-+printf("%s\n", __FUNCTION__);
-+  ;
-+  return 0;
-+}
- _ACEOF
+-_ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -40891,23 +40590,24 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_header_compiler=yes
-+if ac_fn_c_try_compile "$LINENO"; then :
-+  libreplace_cv_HAVE_FUNCTION_MACRO=yes
- else
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
++#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
+ 
 -	ac_header_compiler=no
-+  libreplace_cv_HAVE_FUNCTION_MACRO=no
  fi
--
- rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ 
+-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 -$as_echo "$ac_header_compiler" >&6; }
-+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
  
 -# Is the header present?
 -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
@@ -40917,27 +40617,9 @@
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+$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.  */
+-/* end confdefs.h.  */
 -#include <$ac_header>
-+#include <stdio.h>
-+int
-+main ()
-+{
-+printf("%s\n", __func__);
-+  ;
-+  return 0;
-+}
- _ACEOF
+-_ACEOF
 -if { (ac_try="$ac_cpp conftest.$ac_ext"
 -case "(($ac_try" in
 -  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -40956,25 +40638,26 @@
 -	 test ! -s conftest.err
 -       }; then
 -  ac_header_preproc=yes
-+if ac_fn_c_try_compile "$LINENO"; then :
-+  libreplace_cv_HAVE_func_MACRO=yes
- else
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
++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
+ 
 -  ac_header_preproc=no
-+  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
  
 -rm -f conftest.err conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
 -$as_echo "$ac_header_preproc" >&6; }
-+$as_echo "#define HAVE_func_MACRO 1" >>confdefs.h
  
 -# So?  What about this header?
 -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
@@ -41009,21 +40692,47 @@
 -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
 -$as_echo_n "checking for $ac_header... " >&6; }
 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
--  $as_echo_n "(cached) " >&6
--else
++{ $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
 -  eval "$as_ac_Header=\$ac_header_preproc"
-+    fi
++
++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
 -ac_res=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
 -$as_echo "$ac_res" >&6; }
++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
+ fi
 -as_val=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+for ac_header in sys/param.h limits.h
++
++
++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"
@@ -41032,10 +40741,11 @@
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
-@@ -39289,393 +9411,295 @@
+@@ -39288,149 +8892,40 @@
+ 
  done
  
- 
+-
 -for ac_header in readline/history.h
 -do
 -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
@@ -41044,24 +40754,12 @@
 -$as_echo_n "checking for $ac_header... " >&6; }
 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
 -  $as_echo_n "(cached) " >&6
-+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
+-fi
 -ac_res=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
 -$as_echo "$ac_res" >&6; }
-+
-+
-+
-+ { $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
+-else
 -  # Is the header compilable?
 -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
 -$as_echo_n "checking $ac_header usability... " >&6; }
@@ -41070,19 +40768,17 @@
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+
-+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
+-/* end confdefs.h.  */
 -$ac_includes_default
 -#include <$ac_header>
-+#include <stdlib.h>
-+int
-+main ()
-+{
-+int i = (int)setenv
-+  ;
-+  return 0;
-+}
++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
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
@@ -41103,23 +40799,17 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_header_compiler=yes
-+if ac_fn_c_try_compile "$LINENO"; then :
-+  ac_cv_have_setenv_decl=yes
- else
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
+ 
 -	ac_header_compiler=no
-+  ac_cv_have_setenv_decl=no
  fi
--
- rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ 
+-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 -$as_echo "$ac_header_compiler" >&6; }
-+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
++done
  
 -# Is the header present?
 -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
@@ -41131,18 +40821,14 @@
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
 -#include <$ac_header>
-+$as_echo "#define HAVE_SETENV_DECL 1" >>confdefs.h
-+
-+ fi
-+
-+for ac_func in setenv unsetenv
++for ac_header in stdarg.h vararg.h
 +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
++  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_func" | $as_tr_cpp` 1
++#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
 -if { (ac_try="$ac_cpp conftest.$ac_ext"
 -case "(($ac_try" in
@@ -41168,12 +40854,11 @@
  
 -  ac_header_preproc=no
  fi
-+done
  
 -rm -f conftest.err conftest.$ac_ext
 -{ $as_echo "$as_me:$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: )
@@ -41207,61 +40892,47 @@
 -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
 -$as_echo_n "checking for $ac_header... " >&6; }
 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-+ { $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
+-  $as_echo_n "(cached) " >&6
+-else
 -  eval "$as_ac_Header=\$ac_header_preproc"
-+
-+    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
+-fi
 -ac_res=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
 -$as_echo "$ac_res" >&6; }
--
-+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
++done
+ 
+-fi
 -as_val=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+{ $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
++for ac_header in sys/mount.h mntent.h
 +do :
-+  ac_fn_c_check_func "$LINENO" "strnlen" "ac_cv_func_strnlen"
-+if test "x$ac_cv_func_strnlen" = x""yes; then :
++  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
-+#define HAVE_STRNLEN 1
+ #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
+@@ -39439,733 +8934,557 @@
  
- 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_func in strtoull __strtoull strtouq strtoll __strtoll strtoq
+ 
+ 
++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"
@@ -41271,22 +40942,6 @@
 +#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
- 
 -for ac_header in readline.h readline/readline.h
 -do
 -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
@@ -41300,14 +40955,7 @@
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
 -$as_echo "$ac_res" >&6; }
-+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
+-else
 -  # Is the header compilable?
 -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
 -$as_echo_n "checking $ac_header usability... " >&6; }
@@ -41316,25 +40964,19 @@
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+
-+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
+-/* end confdefs.h.  */
 -$ac_includes_default
 -#include <$ac_header>
++done
 +
-+#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;
-+}
++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
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
@@ -41355,57 +40997,60 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_header_compiler=yes
-+if ac_fn_c_try_compile "$LINENO"; then :
-+  libreplace_cv_sig_atomic_t=yes
- else
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+  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
  
 -	ac_header_compiler=no
  fi
++done
  
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 -$as_echo "$ac_header_compiler" >&6; }
++for ac_func in waitpid 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
  
 -# Is the header present?
 -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
 -$as_echo_n "checking $ac_header presence... " >&6; }
 -cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
--_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
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+{ $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.  */
+-/* end confdefs.h.  */
 -#include <$ac_header>
 +
-+#include <unistd.h>
-+#ifdef HAVE_FCNTL_H
-+#include <fcntl.h>
-+#endif
-+int
-+main ()
-+{
-+int fd = open("/dev/null", O_DIRECT);
-+  ;
-+  return 0;
-+}
++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
 -if { (ac_try="$ac_cpp conftest.$ac_ext"
 -case "(($ac_try" in
@@ -41425,23 +41070,13 @@
 -	 test ! -s conftest.err
 -       }; then
 -  ac_header_preproc=yes
-+if ac_fn_c_try_compile "$LINENO"; then :
-+  libreplace_cv_HAVE_OPEN_O_DIRECT=yes
- else
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+  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
  
 -  ac_header_preproc=no
  fi
++done
  
 -rm -f conftest.err conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
@@ -41480,61 +41115,59 @@
 -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
 -$as_echo_n "checking for $ac_header... " >&6; }
 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-+{ $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 "$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
 -  eval "$as_ac_Header=\$ac_header_preproc"
-+
-+	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+-fi
+-ac_res=`eval 'as_val=${'$as_ac_Header'}
+-		 $as_echo "$as_val"'`
+-	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+-$as_echo "$ac_res" >&6; }
+ 
+-fi
+-as_val=`eval 'as_val=${'$as_ac_Header'}
+-		 $as_echo "$as_val"'`
+-   if test "x$as_val" = x""yes; then
+-  cat >>confdefs.h <<_ACEOF
+-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
++    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 +/* end confdefs.h.  */
-+#include <sys/types.h>
++#include <unistd.h>
 +int
 +main ()
 +{
-+volatile int i = 0
++int i = (int)setresuid
 +  ;
 +  return 0;
 +}
-+_ACEOF
+ _ACEOF
 +if ac_fn_c_try_compile "$LINENO"; then :
-+  libreplace_cv_volatile=yes
++  ac_cv_have_setresuid_decl=yes
 +else
-+  libreplace_cv_volatile=no
- fi
--ac_res=`eval 'as_val=${'$as_ac_Header'}
--		 $as_echo "$as_val"'`
--	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
--$as_echo "$ac_res" >&6; }
++  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: $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
++{ $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
  
- fi
--as_val=`eval 'as_val=${'$as_ac_Header'}
--		 $as_echo "$as_val"'`
--   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:$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
-+# 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 "#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
 -  ac_check_lib_save_LIBS=$LIBS
@@ -41544,10 +41177,7 @@
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
-+#include <sys/types.h>
-+#include <$ac_hdr>
+-/* end confdefs.h.  */
  
 -/* Override any GCC internal prototype to avoid an error.
 -   Use char because int might match the return type of a GCC
@@ -41556,12 +41186,14 @@
 -extern "C"
 -#endif
 -char tgetent ();
++    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++#include <unistd.h>
  int
  main ()
  {
 -return tgetent ();
-+if ((DIR *) 0)
-+return 0;
++int i = (int)setresgid
    ;
    return 0;
  }
@@ -41589,50 +41221,46 @@
 -       }; then
 -  eval "$as_ac_Lib=yes"
 +if ac_fn_c_try_compile "$LINENO"; then :
-+  eval "$as_ac_Header=yes"
++  ac_cv_have_setresgid_decl=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	eval "$as_ac_Lib=no"
-+  eval "$as_ac_Header=no"
- fi
+-fi
 -
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
 -LIBS=$ac_check_lib_save_LIBS
-+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++  ac_cv_have_setresgid_decl=no
  fi
 -ac_res=`eval 'as_val=${'$as_ac_Lib'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-+eval ac_res=\$$as_ac_Header
-+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
- $as_echo "$ac_res" >&6; }
+-$as_echo "$ac_res" >&6; }
 -as_val=`eval 'as_val=${'$as_ac_Lib'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
 -  TERMLIBS="-l${termlib}"; break
-+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
++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
  
 -      done
 -      { $as_echo "$as_me:$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
-+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 "#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
 -  ac_check_lib_save_LIBS=$LIBS
@@ -41642,22 +41270,23 @@
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+  ac_func_search_save_LIBS=$LIBS
-+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
+-/* end confdefs.h.  */
  
- /* Override any GCC internal prototype to avoid an error.
-@@ -39684,98 +9708,55 @@
- #ifdef __cplusplus
- extern "C"
- #endif
+-/* 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 ();
-+char opendir ();
++    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++#include <errno.h>
  int
  main ()
  {
 -return rl_callback_handler_install ();
-+return opendir ();
++int i = (int)errno
    ;
    return 0;
  }
@@ -41684,30 +41313,64 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  ac_cv_lib_readline_rl_callback_handler_install=yes
--else
++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
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
+ 
 -	ac_cv_lib_readline_rl_callback_handler_install=no
-+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
++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
--
+ 
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
 -LIBS=$ac_check_lib_save_LIBS
-+rm -f core conftest.err conftest.$ac_objext \
-+    conftest$ac_exeext
-+  if test "${ac_cv_search_opendir+set}" = set; then :
-+  break
  fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
 -$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
@@ -41716,53 +41379,103 @@
 -       TERMCPPFLAGS="-I$with_readline/include"
 -       CPPFLAGS="-I$with_readline/include $CPPFLAGS"
 -       TERMLIBS="-lreadline $TERMLIBS"
--
++{ $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
+ 
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_LIBREADLINE 1
 -_ACEOF
-+done
-+if test "${ac_cv_search_opendir+set}" = set; then :
++$as_echo "#define HAVE_SECURE_MKSTEMP 1" >>confdefs.h
  
 -       break
- else
+-else
 -  TERMLIBS= CPPFLAGS=$_cppflags
-+  ac_cv_search_opendir=no
  fi
--
-+rm conftest.$ac_ext
-+LIBS=$ac_func_search_save_LIBS
+ 
++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
--
--
+ 
+ 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
+ 
 -    LDFLAGS=$_ldflags
 -    ;;
 -  esac
--else
++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
 -  { $as_echo "$as_me:$LINENO: result: no" >&5
 -$as_echo "no" >&6; }
-+{ $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"
++  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
+ 
 -# 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:$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
-+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 :
++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
 -  ac_check_lib_save_LIBS=$LIBS
@@ -41772,25 +41485,58 @@
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+  ac_func_search_save_LIBS=$LIBS
-+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++
++if test "$cross_compiling" = yes; then :
++  libreplace_cv_HAVE_C99_VSNPRINTF=cross
++else
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
  
- /* Override any GCC internal prototype to avoid an error.
-@@ -39784,601 +9765,461 @@
- #ifdef __cplusplus
- extern "C"
- #endif
+-/* 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 ();
-+char opendir ();
- int
- main ()
- {
+-int
+-main ()
+-{
 -return rl_completion_matches ();
-+return opendir ();
-   ;
-   return 0;
+-  ;
+-  return 0;
++#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
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
@@ -41814,39 +41560,17 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  ac_cv_lib_readline_rl_completion_matches=yes
-+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 :
-+
++if ac_fn_c_try_run "$LINENO"; then :
++  libreplace_cv_HAVE_C99_VSNPRINTF=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+  ac_cv_search_opendir=no
+-
+-	ac_cv_lib_readline_rl_completion_matches=no
++  libreplace_cv_HAVE_C99_VSNPRINTF=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"
- 
--	ac_cv_lib_readline_rl_completion_matches=no
++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
++  conftest.$ac_objext conftest.beam conftest.$ac_ext
  fi
  
 -rm -rf conftest.dSYM
@@ -41857,57 +41581,51 @@
 -{ $as_echo "$as_me:$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 "$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
  
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_NEW_LIBREADLINE 1
-+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
+-_ACEOF
++$as_echo "#define HAVE_C99_VSNPRINTF 1" >>confdefs.h
  
  fi
  
-+done
  
 -# not all readline libs have rl_event_hook or history_list
 -{ $as_echo "$as_me:$LINENO: checking whether rl_event_hook is declared" >&5
 -$as_echo_n "checking whether rl_event_hook is declared... " >&6; }
 -if test "${ac_cv_have_decl_rl_event_hook+set}" = set; then
--  $as_echo_n "(cached) " >&6
--else
++{ $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 >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
-+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
+-_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
 -#include <readline/readline.h>
  
--int
--main ()
--{
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++#include <stdarg.h>
++va_list ap1,ap2;
+ int
+ main ()
+ {
 -#ifndef rl_event_hook
 -  (void) rl_event_hook;
 -#endif
-+fi
- 
--  ;
--  return 0;
--}
--_ACEOF
+-
++va_copy(ap1,ap2);
+   ;
+   return 0;
+ }
+ _ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -41927,59 +41645,79 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_cv_have_decl_rl_event_hook=yes
--else
++if ac_fn_c_try_link "$LINENO"; then :
++  libreplace_cv_HAVE_VA_COPY=yes
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+done
- 
+-
 -	ac_cv_have_decl_rl_event_hook=no
--fi
- 
++  libreplace_cv_HAVE_VA_COPY=no
+ fi
+-
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-+# 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
-+
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
  fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_rl_event_hook" >&5
 -$as_echo "$ac_cv_have_decl_rl_event_hook" >&6; }
 -if test "x$ac_cv_have_decl_rl_event_hook" = x""yes; then
++{ $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
  
 -cat >>confdefs.h <<_ACEOF
 -#define HAVE_DECL_RL_EVENT_HOOK 1
 -_ACEOF
-+done
++$as_echo "#define HAVE_VA_COPY 1" >>confdefs.h
  
++fi
  
--else
-+# 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
++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
 -#define HAVE_DECL_RL_EVENT_HOOK 0
-+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
++
++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
  
-+done
- 
+-
 -{ $as_echo "$as_me:$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 "$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 "$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
 -  ac_check_lib_save_LIBS=$LIBS
@@ -41989,11 +41727,7 @@
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
-+#include <sys/types.h>
-+#include <sys/time.h>
-+#include <time.h>
+-/* end confdefs.h.  */
  
 -/* Override any GCC internal prototype to avoid an error.
 -   Use char because int might match the return type of a GCC
@@ -42002,12 +41736,14 @@
 -extern "C"
 -#endif
 -char history_list ();
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++#include <stdio.h>
  int
  main ()
  {
 -return history_list ();
-+if ((struct tm *) 0)
-+return 0;
++printf("%s\n", __FUNCTION__);
    ;
    return 0;
  }
@@ -42035,56 +41771,45 @@
 -       }; then
 -  ac_cv_lib_readline_history_list=yes
 +if ac_fn_c_try_compile "$LINENO"; then :
-+  ac_cv_header_time=yes
++  libreplace_cv_HAVE_FUNCTION_MACRO=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	ac_cv_lib_readline_history_list=no
-+  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
+-
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
 -LIBS=$ac_check_lib_save_LIBS
++  libreplace_cv_HAVE_FUNCTION_MACRO=no
  fi
 -{ $as_echo "$as_me:$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
- 
+-
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_HISTORY_LIST 1
-+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
- 
+-_ACEOF
+-
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  fi
-+done
++{ $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
  
 -###############################################
 -# test for where we get yp_get_default_domain() from
 -{ $as_echo "$as_me:$LINENO: checking for library containing yp_get_default_domain" >&5
 -$as_echo_n "checking for library containing yp_get_default_domain... " >&6; }
 -if test "${ac_cv_search_yp_get_default_domain+set}" = set; then
-+# 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 :
++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
 -  ac_func_search_save_LIBS=$LIBS
@@ -42093,31 +41818,23 @@
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
--
+-/* 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"
-+#include <sys/types.h>
-+#include <sys/wait.h>
-+#ifndef WEXITSTATUS
-+# define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
- #endif
+-#endif
 -char yp_get_default_domain ();
-+#ifndef WIFEXITED
-+# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
-+#endif
-+
++    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++#include <stdio.h>
  int
  main ()
  {
 -return yp_get_default_domain ();
-+  int s;
-+  wait (&s);
-+  s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
++printf("%s\n", __func__);
    ;
    return 0;
  }
@@ -42152,20 +41869,21 @@
 -       }; then
 -  ac_cv_search_yp_get_default_domain=$ac_res
 +if ac_fn_c_try_compile "$LINENO"; then :
-+  ac_cv_header_sys_wait_h=yes
++  libreplace_cv_HAVE_func_MACRO=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+  ac_cv_header_sys_wait_h=no
++  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: $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 "$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_SYS_WAIT_H 1" >>confdefs.h
++$as_echo "#define HAVE_func_MACRO 1" >>confdefs.h
  
++    fi
  fi
  
 -rm -rf conftest.dSYM
@@ -42173,8 +41891,19 @@
 -      conftest$ac_exeext
 -  if test "${ac_cv_search_yp_get_default_domain+set}" = set; then
 -  break
--fi
--done
++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
 -if test "${ac_cv_search_yp_get_default_domain+set}" = set; then
 -  :
 -else
@@ -42188,19 +41917,11 @@
 -ac_res=$ac_cv_search_yp_get_default_domain
 -if test "$ac_res" != no; then
 -  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
-+
-+# 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
+-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 :
  
 -for ac_func in yp_get_default_domain
 -do
@@ -42208,68 +41929,32 @@
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
 -$as_echo_n "checking for $ac_func... " >&6; }
 -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-+
-+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
+-  $as_echo_n "(cached) " >&6
+-else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+
-+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
+-/* end confdefs.h.  */
 -/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
 -   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
 -#define $ac_func innocuous_$ac_func
++$as_echo "#define HAVE_COMPARISON_FN_T 1" >>confdefs.h
  
 -/* System header to define __stub macros and hopefully few prototypes,
 -    which can conflict with char $ac_func (); below.
 -    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
 -    <limits.h> exists even on freestanding compilers.  */
-+	#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
  
 -#ifdef __STDC__
 -# include <limits.h>
 -#else
 -# include <assert.h>
 -#endif
-+$as_echo "#define BROKEN_REDHAT_7_SYSTEM_HEADERS 1" >>confdefs.h
  
 -#undef $ac_func
-+fi
  
 -/* Override any GCC internal prototype to avoid an error.
 -   Use char because int might match the return type of a GCC
@@ -42284,27 +41969,20 @@
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
 -#endif
-+{ $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 "$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
+ 
++    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 +/* end confdefs.h.  */
-+
-+	#ifdef HAVE_SYS_CAPABILITY_H
-+	#include <sys/capability.h>
-+	#endif
-+	#include <linux/types.h>
- 
++#include <stdlib.h>
  int
  main ()
  {
 -return $ac_func ();
-+
-+	__s8 i;
-+
++int i = (int)setenv
    ;
    return 0;
  }
@@ -42332,25 +42010,19 @@
 -       }; then
 -  eval "$as_ac_var=yes"
 +if ac_fn_c_try_compile "$LINENO"; then :
-+  libreplace_cv_BROKEN_RHEL5_SYS_CAP_HEADER=no
++  ac_cv_have_setenv_decl=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+  libreplace_cv_BROKEN_RHEL5_SYS_CAP_HEADER=yes
- 
+-
 -	eval "$as_ac_var=no"
++  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: $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
- 
+-
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  fi
 -ac_res=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
@@ -42359,49 +42031,38 @@
 -as_val=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+;;
-+esac
++{ $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
 +
-+# 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_func" | $as_tr_cpp` 1
-+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
- _ACEOF
- 
- fi
++$as_echo "#define HAVE_SETENV_DECL 1" >>confdefs.h
 +
- done
- 
-+for ac_func in getpwnam_r getpwuid_r getpwent_r
++ 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
+   cat >>confdefs.h <<_ACEOF
+ #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+ _ACEOF
+@@ -40174,101 +9493,56 @@
+ done
  
+ 
 -# Check if we have execl, if not we need to compile smbrun.
-+fi
-+done
- 
+-
 -for ac_func in execl
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
 -$as_echo_n "checking for $ac_func... " >&6; }
 -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-+
-+ { $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 "$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 >conftest.$ac_ext <<_ACEOF
@@ -42424,11 +42085,9 @@
 -#else
 -# include <assert.h>
 -#endif
- 
+-
 -#undef $ac_func
-+    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.  */
@@ -42442,14 +42101,15 @@
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
 -#endif
-+	#include <unistd.h>
-+	#include <pwd.h>
  
++    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++#include <unistd.h>
  int
  main ()
  {
 -return $ac_func ();
-+int i = (int)getpwent_r
++int i = (int)environ
    ;
    return 0;
  }
@@ -42477,19 +42137,36 @@
 -       }; then
 -  eval "$as_ac_var=yes"
 +if ac_fn_c_try_compile "$LINENO"; then :
-+  ac_cv_have_getpwent_r_decl=yes
++  ac_cv_have_environ_decl=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	eval "$as_ac_var=no"
-+  ac_cv_have_getpwent_r_decl=no
++  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
+ 
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
-+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  fi
 -ac_res=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
@@ -42498,76 +42175,50 @@
 -as_val=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
--  cat >>confdefs.h <<_ACEOF
--#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-+{ $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
++done
 +
-+$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;
-+
-+		}
-+
++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
-+if ac_fn_c_try_compile "$LINENO"; then :
+@@ -40276,353 +9550,184 @@
+ fi
+ done
  
--fi
--done
-+		ac_cv_c_prototype_struct_passwd_pgetpwent_r_struct_passwd_psrc__char_pbuf__int_buflen_=yes
- 
 -if test x"$ac_cv_func_execl" = x"no"; then
 -    EXTRA_BIN_PROGS="$EXTRA_BIN_PROGS bin/smbrun\$(EXEEXT)"
 -fi
-+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
++# this test disabled as we don't actually need __VA_ARGS__ yet
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
  
-+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 :
++#define eprintf(...) fprintf(stderr, __VA_ARGS__)
++eprintf("bla", "bar");
  
++_ACEOF
++if ac_fn_c_try_cpp "$LINENO"; then :
  
-+$as_echo "#define SOLARIS_GETPWENT_R 1" >>confdefs.h
++$as_echo "#define HAVE__VA_ARGS__MACRO 1" >>confdefs.h
  
- 
 +fi
++rm -f conftest.err conftest.$ac_ext
  
+ 
 -for ac_func in getcwd fchown chmod fchmod mknod mknod64
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
 -$as_echo_n "checking for $ac_func... " >&6; }
 -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-+{ $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 "$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 >conftest.$ac_ext <<_ACEOF
@@ -42575,29 +42226,25 @@
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
+-/* end confdefs.h.  */
 -/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
 -   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
 -#define $ac_func innocuous_$ac_func
- 
+-
 -/* System header to define __stub macros and hopefully few prototypes,
 -    which can conflict with char $ac_func (); below.
 -    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
 -    <limits.h> exists even on freestanding compilers.  */
-+		$ac_includes_default
- 
+-
 -#ifdef __STDC__
 -# include <limits.h>
 -#else
 -# include <assert.h>
 -#endif
-+	#include <unistd.h>
-+	#include <pwd.h>
  
 -#undef $ac_func
-+		struct passwd *getpwent_r(struct passwd *src, char *buf, size_t buflen)
-+		{
++    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
@@ -42611,21 +42258,21 @@
 -    something starting with __ and the normal name is an alias.  */
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
--#endif
-+	#ifndef HAVE_GETPWENT_R_DECL
-+	#error missing getpwent_r prototype
-+	#endif
-+	return NULL;
-+
-+		}
- 
--int
--main ()
--{
++#include <sys/types.h>
++#if STDC_HEADERS
++#include <stdlib.h>
++#include <stddef.h>
+ #endif
+-
++#include <signal.h>
+ int
+ main ()
+ {
 -return $ac_func ();
--  ;
--  return 0;
--}
++sig_atomic_t i = 0
+   ;
+   return 0;
+ }
  _ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
@@ -42650,22 +42297,19 @@
 -       }; then
 -  eval "$as_ac_var=yes"
 +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
-+
++  libreplace_cv_sig_atomic_t=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
- 
+-
 -	eval "$as_ac_var=no"
-+		ac_cv_c_prototype_struct_passwd_pgetpwent_r_struct_passwd_psrc__char_pbuf__size_t_buflen_=no
-+
++  libreplace_cv_sig_atomic_t=no
  fi
-+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- 
+-
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  fi
 -ac_res=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
@@ -42674,38 +42318,28 @@
 -as_val=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+{ $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 :
+-  cat >>confdefs.h <<_ACEOF
+-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+-_ACEOF
++{ $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 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
-@@ -40387,242 +10228,210 @@
- done
++$as_echo "#define HAVE_SIG_ATOMIC_T_TYPE 1" >>confdefs.h
  
+ fi
+-done
  
+ 
 -for ac_func in strtol
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
 -$as_echo_n "checking for $ac_func... " >&6; }
 -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-+ { $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 "$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 >conftest.$ac_ext <<_ACEOF
@@ -42717,7 +42351,7 @@
 -/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
 -   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
 -#define $ac_func innocuous_$ac_func
--
+ 
 -/* System header to define __stub macros and hopefully few prototypes,
 -    which can conflict with char $ac_func (); below.
 -    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
@@ -42728,9 +42362,9 @@
 -#else
 -# include <assert.h>
 -#endif
- 
+-
 -#undef $ac_func
-+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 +/* end confdefs.h.  */
  
 -/* Override any GCC internal prototype to avoid an error.
@@ -42745,15 +42379,16 @@
 -    something starting with __ and the normal name is an alias.  */
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
--#endif
-+	#include <unistd.h>
-+	#include <grp.h>
- 
++#include <unistd.h>
++#ifdef HAVE_FCNTL_H
++#include <fcntl.h>
+ #endif
+-
  int
  main ()
  {
 -return $ac_func ();
-+int i = (int)getgrent_r
++int fd = open("/dev/null", O_DIRECT);
    ;
    return 0;
  }
@@ -42781,13 +42416,13 @@
 -       }; then
 -  eval "$as_ac_var=yes"
 +if ac_fn_c_try_compile "$LINENO"; then :
-+  ac_cv_have_getgrent_r_decl=yes
++  libreplace_cv_HAVE_OPEN_O_DIRECT=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	eval "$as_ac_var=no"
-+  ac_cv_have_getgrent_r_decl=no
++  libreplace_cv_HAVE_OPEN_O_DIRECT=no
  fi
 -
 -rm -rf conftest.dSYM
@@ -42804,71 +42439,27 @@
 -   if test "x$as_val" = x""yes; then
 -  cat >>confdefs.h <<_ACEOF
 -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-+{ $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
+-_ACEOF
++{ $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
  
- fi
+-fi
 -done
-+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-+
++$as_echo "#define HAVE_OPEN_O_DIRECT 1" >>confdefs.h
+ 
 +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
- 
 -for ac_func in strchr chflags
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
 -$as_echo_n "checking for $ac_func... " >&6; }
 -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-+
-+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 "$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 >conftest.$ac_ext <<_ACEOF
@@ -42876,8 +42467,7 @@
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
+-/* end confdefs.h.  */
 -/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
 -   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
 -#define $ac_func innocuous_$ac_func
@@ -42886,19 +42476,37 @@
 -    which can conflict with char $ac_func (); below.
 -    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
 -    <limits.h> exists even on freestanding compilers.  */
-+		$ac_includes_default
++	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
  
 -#ifdef __STDC__
 -# include <limits.h>
 -#else
 -# include <assert.h>
 -#endif
-+	#include <unistd.h>
-+	#include <grp.h>
++$as_echo "#define HAVE_VOLATILE 1" >>confdefs.h
  
 -#undef $ac_func
-+		struct group *getgrent_r(struct group *src, char *buf, size_t buflen)
-+		{
++fi
  
 -/* Override any GCC internal prototype to avoid an error.
 -   Use char because int might match the return type of a GCC
@@ -42913,20 +42521,29 @@
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
 -#endif
-+	#ifndef HAVE_GETGRENT_R_DECL
-+	#error missing getgrent_r prototype
-+	#endif
-+	return NULL;
-+
-+		}
++# 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 ()
--{
+ int
+ main ()
+ {
 -return $ac_func ();
--  ;
--  return 0;
--}
++if ((DIR *) 0)
++return 0;
+   ;
+   return 0;
+ }
  _ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
@@ -42951,147 +42568,86 @@
 -       }; then
 -  eval "$as_ac_var=yes"
 +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
-+
++  eval "$as_ac_Header=yes"
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
- 
+-
 -	eval "$as_ac_var=no"
-+		ac_cv_c_prototype_struct_group_pgetgrent_r_struct_group_psrc__char_pbuf__size_t_buflen_=no
-+
++  eval "$as_ac_Header=no"
  fi
-+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- 
+-
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  fi
 -ac_res=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
--$as_echo "$ac_res" >&6; }
++eval ac_res=\$$as_ac_Header
++	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+ $as_echo "$ac_res" >&6; }
 -as_val=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+{ $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
-+
-+
-+# locale
-+for ac_header in ctype.h locale.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_func" | $as_tr_cpp` 1
-+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
++#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
  _ACEOF
  
++ac_header_dirent=$ac_hdr; break
  fi
-+
- done
+-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
- 
- 
+-
+-
 -for ac_func in getrlimit fsync fdatasync setpgid
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
 -$as_echo_n "checking for $ac_func... " >&6; }
 -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
--  $as_echo_n "(cached) " >&6
--else
++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
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
-+# 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
+-_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
++  ac_func_search_save_LIBS=$LIBS
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
 -/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
 -   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
 -#define $ac_func innocuous_$ac_func
- 
+-
 -/* System header to define __stub macros and hopefully few prototypes,
 -    which can conflict with char $ac_func (); below.
 -    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
 -    <limits.h> exists even on freestanding compilers.  */
-+fi
- 
+-
 -#ifdef __STDC__
 -# include <limits.h>
 -#else
 -# include <assert.h>
 -#endif
-+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=""
- 
+-
 -#undef $ac_func
-+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
-@@ -40630,104 +10439,85 @@
+@@ -40630,104 +9735,56 @@
  #ifdef __cplusplus
  extern "C"
  #endif
@@ -43103,12 +42659,12 @@
 -choke me
 -#endif
 -
-+char dlopen ();
++char opendir ();
  int
  main ()
  {
 -return $ac_func ();
-+return dlopen ();
++return opendir ();
    ;
    return 0;
  }
@@ -43138,7 +42694,14 @@
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+for ac_lib in '' dl; do
+-
+-	eval "$as_ac_var=no"
+-fi
+-
+-rm -rf conftest.dSYM
+-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+-      conftest$ac_exeext conftest.$ac_ext
++for ac_lib in '' dir; do
 +  if test -z "$ac_lib"; then
 +    ac_res="none required"
 +  else
@@ -43146,33 +42709,8 @@
 +    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 :
- 
--	eval "$as_ac_var=no"
-+else
-+  ac_cv_search_dlopen=no
-+fi
-+rm conftest.$ac_ext
-+LIBS=$ac_func_search_save_LIBS
++  ac_cv_search_opendir=$ac_res
  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"
- 
--rm -rf conftest.dSYM
--rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
--      conftest$ac_exeext conftest.$ac_ext
- fi
 -ac_res=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
@@ -43180,49 +42718,45 @@
 -as_val=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+
-+
-+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
+-  cat >>confdefs.h <<_ACEOF
 -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-+#define HAVE_DLFCN_H 1
- _ACEOF
- 
+-_ACEOF
+-
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext
++  if test "${ac_cv_search_opendir+set}" = set; then :
++  break
  fi
--done
--
+ done
++if test "${ac_cv_search_opendir+set}" = set; then :
  
-+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
++  ac_cv_search_opendir=no
 +fi
-+done
++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
  
+-
+-
+-
 -for ac_func in setsid glob strpbrk crypt16 getauthuid
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
 -$as_echo_n "checking for $ac_func... " >&6; }
 -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-+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 :
++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
 -  cat >conftest.$ac_ext <<_ACEOF
@@ -43230,7 +42764,9 @@
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
++  ac_func_search_save_LIBS=$LIBS
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
 -/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
 -   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
 -#define $ac_func innocuous_$ac_func
@@ -43247,13 +42783,10 @@
 -#endif
 -
 -#undef $ac_func
-+  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
-@@ -40735,841 +10525,612 @@
+@@ -40735,170 +9792,148 @@
  #ifdef __cplusplus
  extern "C"
  #endif
@@ -43265,12 +42798,12 @@
 -choke me
 -#endif
 -
-+char shl_load ();
++char opendir ();
  int
  main ()
  {
 -return $ac_func ();
-+return shl_load ();
++return opendir ();
    ;
    return 0;
  }
@@ -43297,7 +42830,7 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  eval "$as_ac_var=yes"
-+for ac_lib in '' sl; do
++for ac_lib in '' x; do
 +  if test -z "$ac_lib"; then
 +    ac_res="none required"
 +  else
@@ -43305,27 +42838,27 @@
 +    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
++  ac_cv_search_opendir=$ac_res
 +fi
 +rm -f core conftest.err conftest.$ac_objext \
 +    conftest$ac_exeext
-+  if test "${ac_cv_search_shl_load+set}" = set; then :
++  if test "${ac_cv_search_opendir+set}" = set; then :
 +  break
 +fi
 +done
-+if test "${ac_cv_search_shl_load+set}" = set; then :
++if test "${ac_cv_search_opendir+set}" = set; then :
 +
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+  ac_cv_search_shl_load=no
++  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_shl_load" >&5
-+$as_echo "$ac_cv_search_shl_load" >&6; }
-+ac_res=$ac_cv_search_shl_load
++{ $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"
  
@@ -43335,14 +42868,6 @@
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
-+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
 -ac_res=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
@@ -43352,47 +42877,49 @@
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
 +
-+done
-+
-+for ac_func in shl_load shl_unload shl_findsym
++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_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
++  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_func" | $as_tr_cpp` 1
+-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
++#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
  
-+else
-+  libreplace_cv_shl=yes
  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
  
-+{ $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
++fi
  
-+	#include <dlfcn.h>
++done
  
-+		void *dlopen(const char* filename, unsigned int flags)
-+		{
  
-+	return 0;
++# 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
  
-+_ACEOF
-+if ac_fn_c_try_compile "$LINENO"; then :
++done
  
-+		ac_cv_c_prototype_void_pdlopen_const_charp_filename__unsigned_int_flags_=yes
  
 -for ac_func in sigprocmask sigblock sigaction sigset innetgr setnetgrent getnetgrent endnetgrent
 -do
@@ -43401,10 +42928,19 @@
 -$as_echo_n "checking for $ac_func... " >&6; }
 -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
 -  $as_echo_n "(cached) " >&6
- else
+-else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
--_ACEOF
++# 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
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
@@ -43416,21 +42952,16 @@
 -    which can conflict with char $ac_func (); below.
 -    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
 -    <limits.h> exists even on freestanding compilers.  */
-+		ac_cv_c_prototype_void_pdlopen_const_charp_filename__unsigned_int_flags_=no
- 
+-
 -#ifdef __STDC__
 -# include <limits.h>
 -#else
 -# include <assert.h>
 -#endif
 +fi
-+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  
 -#undef $ac_func
-+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 :
++done
  
 -/* Override any GCC internal prototype to avoid an error.
 -   Use char because int might match the return type of a GCC
@@ -43445,15 +42976,27 @@
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
 -#endif
++{ $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 ()
--{
+ int
+ main ()
+ {
 -return $ac_func ();
--  ;
--  return 0;
--}
--_ACEOF
++if ((struct tm *) 0)
++return 0;
+   ;
+   return 0;
+ }
+ _ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -43476,13 +43019,22 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  eval "$as_ac_var=yes"
--else
++if ac_fn_c_try_compile "$LINENO"; then :
++  ac_cv_header_time=yes
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+$as_echo "#define DLOPEN_TAKES_UNSIGNED_FLAGS 1" >>confdefs.h
- 
+-
 -	eval "$as_ac_var=no"
--fi
++  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
  
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
@@ -43495,49 +43047,36 @@
 -as_val=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
--  cat >>confdefs.h <<_ACEOF
--#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
--_ACEOF
- 
 +
-+if test x"${libreplace_cv_dlfcn}" = x"yes";then
-+	LIBREPLACEOBJ="${LIBREPLACEOBJ} dlfcn.o"
- fi
--done
++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
+@@ -40907,530 +9942,311 @@
+ done
  
-+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} getpass.o"
-+else
- 
+-
+-
+-
+-
+-
+-
 -for ac_func in initgroups select poll rdchk getgrnam getgrent pathconf
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
 -$as_echo_n "checking for $ac_func... " >&6; }
 -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-+{ $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 :
++# 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 >conftest.$ac_ext <<_ACEOF
@@ -43545,7 +43084,8 @@
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
 -/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
 -   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
 -#define $ac_func innocuous_$ac_func
@@ -43560,35 +43100,36 @@
 -#else
 -# include <assert.h>
 -#endif
- 
+-
 -#undef $ac_func
-+SAVE_CPPFLAGS="$CPPFLAGS"
-+CPPFLAGS="$CPPFLAGS -I$libreplacedir/"
-+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
++#include <sys/types.h>
++#include <sys/wait.h>
++#ifndef WEXITSTATUS
++# define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
+ #endif
 -char $ac_func ();
 -/* The GNU C library defines this for functions which it implements
 -    to always fail with ENOSYS.  Some functions are actually named
 -    something starting with __ and the normal name is an alias.  */
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
--#endif
-+#include "confdefs.h"
-+#define NO_CONFIG_H
-+#include "$libreplacedir/getpass.c"
++#ifndef WIFEXITED
++# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
+ #endif
  
  int
  main ()
  {
 -return $ac_func ();
-+
++  int s;
++  wait (&s);
++  s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
    ;
    return 0;
  }
@@ -43616,27 +43157,18 @@
 -       }; then
 -  eval "$as_ac_var=yes"
 +if ac_fn_c_try_compile "$LINENO"; then :
-+  libreplace_cv_REPLACE_GETPASS=yes
++  ac_cv_header_sys_wait_h=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+  libreplace_cv_REPLACE_GETPASS=no
-+fi
-+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-+CPPFLAGS="$SAVE_CPPFLAGS"
- 
+-
 -	eval "$as_ac_var=no"
- 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
- 
+-fi
+-
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
-+$as_echo "#define REPLACE_GETPASS 1" >>confdefs.h
-+
-+	LIBREPLACEOBJ="${LIBREPLACEOBJ} getpass.o"
++  ac_cv_header_sys_wait_h=no
  fi
 -ac_res=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
@@ -43648,45 +43180,32 @@
 -  cat >>confdefs.h <<_ACEOF
 -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 -_ACEOF
- 
+-
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  fi
 -done
++{ $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 "$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.  */
++$as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
  
-+		#define LIBREPLACE_CONFIGURE_TEST_STRPTIME
-+		#include "$libreplacedir/test/strptime.c"
++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
-+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
++done
  
-+        LIBREPLACEOBJ="${LIBREPLACEOBJ} strptime.o"
-+fi
  
 -for ac_func in setpriv setgidx setuidx setgroups sysconf stat64 fstat64
 -do
@@ -43694,40 +43213,37 @@
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
 -$as_echo_n "checking for $ac_func... " >&6; }
 -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
--  $as_echo_n "(cached) " >&6
--else
++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 >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
-+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
+-_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
 -/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
 -   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
 -#define $ac_func innocuous_$ac_func
- 
+-
 -/* System header to define __stub macros and hopefully few prototypes,
 -    which can conflict with char $ac_func (); below.
 -    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
 -    <limits.h> exists even on freestanding compilers.  */
-+fi
- 
+-
 -#ifdef __STDC__
 -# include <limits.h>
 -#else
 -# include <assert.h>
 -#endif
-+done
  
 -#undef $ac_func
++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
@@ -43742,27 +43258,19 @@
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
 -#endif
-+#######################################
-+# 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.  */
++	#ifdef HAVE_SYS_VFS_H
++	#include <sys/vfs.h>
++	#endif
++	#ifdef HAVE_SYS_CAPABILITY_H
++	#include <sys/capability.h>
++	#endif
  
-+		#include <stdio.h>
-+		#ifdef HAVE_DIRECT_H
-+		#include <direct.h>
-+		#endif
  int
  main ()
  {
 -return $ac_func ();
 +
-+			mkdir("foo",0777);
-+			return 0;
++	int i;
 +
    ;
    return 0;
@@ -43791,28 +43299,19 @@
 -       }; then
 -  eval "$as_ac_var=yes"
 +if ac_fn_c_try_compile "$LINENO"; then :
-+  libreplace_cv_mkdir_has_mode="yes"
++  libreplace_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=no
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
++  libreplace_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=yes
+ 
 -	eval "$as_ac_var=no"
-+  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
- 
+-
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
- fi
+-fi
 -ac_res=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
@@ -43820,68 +43319,39 @@
 -as_val=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+
-+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
+-  cat >>confdefs.h <<_ACEOF
 -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-+#define HAVE_TIMEGM 1
- _ACEOF
- 
-+else
-+  LIBREPLACEOBJ="${LIBREPLACEOBJ} timegm.o"
+-_ACEOF
+-
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  fi
- done
+-done
+-
+-
+-
+-
++{ $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
  
-+{ $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 lstat64 fopen64 atexit grantpt lseek64 ftruncate64
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
 -$as_echo_n "checking for $ac_func... " >&6; }
 -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
--  $as_echo_n "(cached) " >&6
--else
++{ $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 >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
-+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
+-_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
@@ -43893,16 +43363,16 @@
 -    which can conflict with char $ac_func (); 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
-+fi
-+done
  
 -#undef $ac_func
++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
@@ -43917,20 +43387,18 @@
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
 -#endif
-+ { $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
++	#ifdef HAVE_SYS_CAPABILITY_H
++	#include <sys/capability.h>
++	#endif
++	#include <linux/types.h>
  
-+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h.  */
-+#include <dirent.h>
  int
  main ()
  {
 -return $ac_func ();
-+int i = (int)dirfd
++
++	__s8 i;
++
    ;
    return 0;
  }
@@ -43958,18 +43426,25 @@
 -       }; then
 -  eval "$as_ac_var=yes"
 +if ac_fn_c_try_compile "$LINENO"; then :
-+  ac_cv_have_dirfd_decl=yes
++  libreplace_cv_BROKEN_RHEL5_SYS_CAP_HEADER=no
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
++  libreplace_cv_BROKEN_RHEL5_SYS_CAP_HEADER=yes
+ 
 -	eval "$as_ac_var=no"
--fi
--
+ 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
+ 
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
-+  ac_cv_have_dirfd_decl=no
  fi
 -ac_res=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
@@ -43978,47 +43453,51 @@
 -as_val=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
--  cat >>confdefs.h <<_ACEOF
++;;
++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_func" | $as_tr_cpp` 1
--_ACEOF
--
-+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+ _ACEOF
+ 
  fi
 -done
 -
-+{ $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
++done
  
-+ fi
- 
- 
-+#
-+# try to replace with getdirentries() if needed
-+#
-+if test x"$libreplace_cv_READDIR_NEEDED" = x"yes"; then
-+for ac_func in getdirentries
++for ac_func in getpwnam_r getpwuid_r getpwent_r
 +do :
-+  ac_fn_c_check_func "$LINENO" "getdirentries" "ac_cv_func_getdirentries"
-+if test "x$ac_cv_func_getdirentries" = x""yes; then :
++  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 HAVE_GETDIRENTRIES 1
++#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 +_ACEOF
  
 +fi
 +done
  
+ 
 -for ac_func in fseek64 fseeko64 ftell64 ftello64 setluid getpwanam
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
 -$as_echo_n "checking for $ac_func... " >&6; }
 -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-+{ $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 "$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 >conftest.$ac_ext <<_ACEOF
@@ -44026,28 +43505,25 @@
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
+-/* end confdefs.h.  */
 -/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
 -   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
 -#define $ac_func innocuous_$ac_func
- 
+-
 -/* System header to define __stub macros and hopefully few prototypes,
 -    which can conflict with char $ac_func (); below.
 -    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
 -    <limits.h> exists even on freestanding compilers.  */
-+		$ac_includes_default
- 
+-
 -#ifdef __STDC__
 -# include <limits.h>
 -#else
 -# include <assert.h>
 -#endif
-+	#include <dirent.h>
  
 -#undef $ac_func
-+		long telldir(const DIR *dir)
-+		{
++    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
@@ -44062,17 +43538,17 @@
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
 -#endif
-+	return 0;
-+
-+		}
++	#include <unistd.h>
++	#include <pwd.h>
  
--int
--main ()
--{
+ int
+ main ()
+ {
 -return $ac_func ();
--  ;
--  return 0;
--}
++int i = (int)getpwent_r
+   ;
+   return 0;
+ }
  _ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
@@ -44097,20 +43573,19 @@
 -       }; then
 -  eval "$as_ac_var=yes"
 +if ac_fn_c_try_compile "$LINENO"; then :
-+
-+		ac_cv_c_prototype_long_telldir_const_DIR_pdir_=yes
-+
++  ac_cv_have_getpwent_r_decl=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
- 
+-
 -	eval "$as_ac_var=no"
--fi
-+		ac_cv_c_prototype_long_telldir_const_DIR_pdir_=no
- 
++  ac_cv_have_getpwent_r_decl=no
+ fi
+-
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  fi
 -ac_res=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
@@ -44121,32 +43596,71 @@
 -   if test "x$as_val" = x""yes; then
 -  cat >>confdefs.h <<_ACEOF
 -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
--_ACEOF
-+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++{ $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 :
  
- fi
+-fi
 -done
--
-+{ $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 :
++		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
  
-+$as_echo "#define TELLDIR_TAKES_CONST_DIR 1" >>confdefs.h
++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
  
- 
 -for ac_func in opendir64 readdir64 seekdir64 telldir64 rewinddir64 closedir64
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
 -$as_echo_n "checking for $ac_func... " >&6; }
 -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-+{ $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 "$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 >conftest.$ac_ext <<_ACEOF
@@ -44171,10 +43685,11 @@
 -#else
 -# include <assert.h>
 -#endif
-+	#include <dirent.h>
++	#include <unistd.h>
++	#include <pwd.h>
  
 -#undef $ac_func
-+		int seekdir(DIR *dir, long ofs)
++		struct passwd *getpwent_r(struct passwd *src, char *buf, size_t buflen)
 +		{
  
 -/* Override any GCC internal prototype to avoid an error.
@@ -44190,7 +43705,10 @@
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
 -#endif
-+	return 0;
++	#ifndef HAVE_GETPWENT_R_DECL
++	#error missing getpwent_r prototype
++	#endif
++	return NULL;
 +
 +		}
  
@@ -44226,75 +43744,21 @@
 -  eval "$as_ac_var=yes"
 +if ac_fn_c_try_compile "$LINENO"; then :
 +
-+		ac_cv_c_prototype_int_seekdir_DIR_pdir__long_ofs_=yes
++		ac_cv_c_prototype_struct_passwd_pgetpwent_r_struct_passwd_psrc__char_pbuf__size_t_buflen_=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
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+  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
  
 -	eval "$as_ac_var=no"
++		ac_cv_c_prototype_struct_passwd_pgetpwent_r_struct_passwd_psrc__char_pbuf__size_t_buflen_=no
 +
-+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
-+
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
-+$as_echo "#define REPLACE_READDIR_GETDIRENTRIES 1" >>confdefs.h
-+
-+	LIBREPLACEOBJ="${LIBREPLACEOBJ} repdir_getdirentries.o"
-+	libreplace_cv_READDIR_NEEDED=no
  fi
 -ac_res=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
@@ -44303,33 +43767,38 @@
 -as_val=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
++{ $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 :
 +
-+#
-+# try to replace with getdents() if needed
-+#
-+if test x"$libreplace_cv_READDIR_NEEDED" = x"yes"; then
-+for ac_func in getdents
++
++$as_echo "#define SOLARIS_GETPWENT_R 1" >>confdefs.h
++
++
++fi
++
++for ac_func in getgrnam_r getgrgid_r getgrent_r
 +do :
-+  ac_fn_c_check_func "$LINENO" "getdents" "ac_cv_func_getdents"
-+if test "x$ac_cv_func_getdents" = x""yes; then :
++  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
-+#define HAVE_GETDENTS 1
+ #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
  _ACEOF
- 
- fi
+@@ -41439,446 +10255,210 @@
  done
  
--
+ 
 -for ac_func in getpwent_r
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
 -$as_echo_n "checking for $ac_func... " >&6; }
 -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-+{ $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 "$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 >conftest.$ac_ext <<_ACEOF
@@ -44337,38 +43806,16 @@
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+
-+	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.  */
+-/* end confdefs.h.  */
 -/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
 -   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
 -#define $ac_func innocuous_$ac_func
- 
+-
 -/* System header to define __stub macros and hopefully few prototypes,
 -    which can conflict with char $ac_func (); below.
 -    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
 -    <limits.h> exists even on freestanding compilers.  */
-+#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
- 
+-
 -#ifdef __STDC__
 -# include <limits.h>
 -#else
@@ -44376,11 +43823,8 @@
 -#endif
  
 -#undef $ac_func
-+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
++    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
@@ -44395,16 +43839,18 @@
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
 -#endif
-+$as_echo "#define REPLACE_READDIR 1" >>confdefs.h
++	#include <unistd.h>
++	#include <grp.h>
  
--int
--main ()
--{
+ int
+ main ()
+ {
 -return $ac_func ();
--  ;
--  return 0;
--}
--_ACEOF
++int i = (int)getgrent_r
+   ;
+   return 0;
+ }
+ _ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -44427,30 +43873,20 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  eval "$as_ac_var=yes"
--else
++if ac_fn_c_try_compile "$LINENO"; then :
++  ac_cv_have_getgrent_r_decl=yes
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
- 
+-
 -	eval "$as_ac_var=no"
-+$as_echo "#define REPLACE_READDIR_GETDENTS 1" >>confdefs.h
-+
-+	LIBREPLACEOBJ="${LIBREPLACEOBJ} repdir_getdents.o"
-+	libreplace_cv_READDIR_NEEDED=no
++  ac_cv_have_getgrent_r_decl=no
  fi
- 
+-
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
-+{ $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; }
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  fi
 -ac_res=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
@@ -44459,22 +43895,18 @@
 -as_val=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+
-+###############################################
-+# 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
+-  cat >>confdefs.h <<_ACEOF
 -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-+#define HAVE_CRYPT_H 1
- _ACEOF
+-_ACEOF
++{ $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
  
- fi
+-fi
 -done
++$as_echo "#define HAVE_GETGRENT_R_DECL 1" >>confdefs.h
  
-+done
++ fi
  
 -for ac_func in getdents64
 -do
@@ -44482,9 +43914,9 @@
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
 -$as_echo_n "checking for $ac_func... " >&6; }
 -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-+{ $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 "$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 >conftest.$ac_ext <<_ACEOF
@@ -44492,34 +43924,36 @@
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
 -/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
 -   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
 -#define $ac_func innocuous_$ac_func
--
+ 
 -/* System header to define __stub macros and hopefully few prototypes,
 -    which can conflict with char $ac_func (); below.
 -    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
 -    <limits.h> exists even on freestanding compilers.  */
++		$ac_includes_default
  
 -#ifdef __STDC__
 -# include <limits.h>
 -#else
 -# include <assert.h>
 -#endif
--
++	#include <unistd.h>
++	#include <grp.h>
+ 
 -#undef $ac_func
-+ac_func_search_ext_save_LIBS=$LIBS
-+ac_cv_search_ext_crypt=no
-+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h.  */
++		struct group *getgrent_r(struct group *src, char *buf, int buflen)
++		{
  
- /* Override any GCC internal prototype to avoid an error.
-    Use char because int might match the return type of a GCC
-@@ -41577,103 +11138,25 @@
- #ifdef __cplusplus
- extern "C"
- #endif
+-/* 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 $ac_func ();
 -/* The GNU C library defines this for functions which it implements
 -    to always fail with ENOSYS.  Some functions are actually named
@@ -44527,16 +43961,20 @@
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
 -#endif
--
-+char crypt ();
- int
- main ()
- {
++	#ifndef HAVE_GETGRENT_R_DECL
++	#error missing getgrent_r prototype
++	#endif
++	return NULL;
++
++		}
+ 
+-int
+-main ()
+-{
 -return $ac_func ();
-+return crypt ();
-   ;
-   return 0;
- }
+-  ;
+-  return 0;
+-}
  _ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
@@ -44560,17 +43998,22 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  eval "$as_ac_var=yes"
--else
++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
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
+ 
 -	eval "$as_ac_var=no"
 -fi
--
++		ac_cv_c_prototype_struct_group_pgetgrent_r_struct_group_psrc__char_pbuf__int_buflen_=no
+ 
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
--fi
+ fi
 -ac_res=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
@@ -44581,59 +44024,67 @@
 -  cat >>confdefs.h <<_ACEOF
 -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 -_ACEOF
--
-+if ac_fn_c_try_link "$LINENO"; then :
-+  ac_cv_search_ext_crypt="none required"
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ 
  fi
 -done
--
--
--
--
--
++{ $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
+ 
 -for ac_func in setenv strcasecmp fcvt fcvtl
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
 -$as_echo_n "checking for $ac_func... " >&6; }
 -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
--  $as_echo_n "(cached) " >&6
--else
++
++{ $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 >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+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
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
 -/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
 -   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
 -#define $ac_func innocuous_$ac_func
--
+ 
 -/* System header to define __stub macros and hopefully few prototypes,
 -    which can conflict with char $ac_func (); below.
 -    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
 -    <limits.h> exists even on freestanding compilers.  */
--
++		$ac_includes_default
+ 
 -#ifdef __STDC__
 -# include <limits.h>
 -#else
 -# include <assert.h>
 -#endif
--
++	#include <unistd.h>
++	#include <grp.h>
+ 
 -#undef $ac_func
++		struct group *getgrent_r(struct group *src, char *buf, size_t buflen)
++		{
  
- /* Override any GCC internal prototype to avoid an error.
-    Use char because int might match the return type of a GCC
-@@ -41681,1312 +11164,653 @@
- #ifdef __cplusplus
- extern "C"
- #endif
+-/* 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 $ac_func ();
 -/* The GNU C library defines this for functions which it implements
 -    to always fail with ENOSYS.  Some functions are actually named
@@ -44641,16 +44092,20 @@
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
 -#endif
--
-+char crypt ();
- int
- main ()
- {
++	#ifndef HAVE_GETGRENT_R_DECL
++	#error missing getgrent_r prototype
++	#endif
++	return NULL;
++
++		}
+ 
+-int
+-main ()
+-{
 -return $ac_func ();
-+return crypt ();
-   ;
-   return 0;
- }
+-  ;
+-  return 0;
+-}
  _ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
@@ -44674,33 +44129,23 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  eval "$as_ac_var=yes"
--else
++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
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
+ 
 -	eval "$as_ac_var=no"
-+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
++		ac_cv_c_prototype_struct_group_pgetgrent_r_struct_group_psrc__char_pbuf__size_t_buflen_=no
++
  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"
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
-+$as_echo "#define HAVE_CRYPT 1" >>confdefs.h
-+
-+else
-+   LIBREPLACEOBJ="${LIBREPLACEOBJ} crypt.o"
  fi
 -ac_res=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
@@ -44709,27 +44154,36 @@
 -as_val=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
++{ $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 :
 +
 +
-+for ac_func in syslog printf memset memcpy
++$as_echo "#define SOLARIS_GETGRENT_R 1" >>confdefs.h
++
++
++fi
++
++
++# locale
++for ac_header in ctype.h locale.h
 +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
++  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_func" | $as_tr_cpp` 1
+-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
++#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
  
-+else
-+  as_fn_error "Required function not found" "$LINENO" 5
  fi
- done
+-done
+-
  
++done
  
-+echo "LIBREPLACE_BROKEN_CHECKS: END"
  
- 
 -for ac_func in syslog vsyslog timegm
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
@@ -44740,7 +44194,14 @@
 -else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
--_ACEOF
++# 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
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
@@ -44752,16 +44213,16 @@
 -    which can conflict with char $ac_func (); below.
 -    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
 -    <limits.h> exists even on freestanding compilers.  */
-+echo "LIBREPLACE_NETWORK_CHECKS: START"
  
 -#ifdef __STDC__
 -# include <limits.h>
 -#else
 -# include <assert.h>
 -#endif
++fi
  
 -#undef $ac_func
-+$as_echo "#define LIBREPLACE_NETWORK_CHECKS 1" >>confdefs.h
++done
  
 -/* Override any GCC internal prototype to avoid an error.
 -   Use char because int might match the return type of a GCC
@@ -44776,8 +44237,6 @@
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
 -#endif
-+LIBREPLACE_NETWORK_OBJS=""
-+LIBREPLACE_NETWORK_LIBS=""
  
 -int
 -main ()
@@ -44786,15 +44245,7 @@
 -  ;
 -  return 0;
 -}
-+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
+-_ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -44820,6 +44271,16 @@
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
++# 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
  
 -	eval "$as_ac_var=no"
  fi
@@ -44837,30 +44298,24 @@
 -   if test "x$as_val" = x""yes; then
 +done
 +
-+for ac_header in netinet/in_systm.h
++
++# terminal
++for ac_header in termios.h termio.h sys/termio.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 :
++  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_func" | $as_tr_cpp` 1
-+#define HAVE_NETINET_IN_SYSTM_H 1
++#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
  
  fi
--done
++
+ done
  
-+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
  
 -for ac_func in setlocale nl_langinfo
 -do
@@ -44868,52 +44323,46 @@
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
 -$as_echo_n "checking for $ac_func... " >&6; }
 -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
--  $as_echo_n "(cached) " >&6
--else
++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
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
-+"
-+if test "x$ac_cv_header_netinet_ip_h" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define HAVE_NETINET_IP_H 1
- _ACEOF
+-_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
++  ac_func_search_save_LIBS=$LIBS
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
 -/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
 -   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
 -#define $ac_func innocuous_$ac_func
- 
+-
 -/* System header to define __stub macros and hopefully few prototypes,
 -    which can conflict with char $ac_func (); below.
 -    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
 -    <limits.h> exists even on freestanding compilers.  */
-+fi
- 
+-
 -#ifdef __STDC__
 -# include <limits.h>
 -#else
 -# include <assert.h>
 -#endif
-+done
- 
+-
 -#undef $ac_func
-+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
  
--/* 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
+ /* Override any GCC internal prototype to avoid an error.
+    Use char because int might match the return type of a GCC
+@@ -41886,100 +10466,85 @@
+ #ifdef __cplusplus
+ extern "C"
+ #endif
 -char $ac_func ();
 -/* The GNU C library defines this for functions which it implements
 -    to always fail with ENOSYS.  Some functions are actually named
@@ -44921,25 +44370,16 @@
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
 -#endif
-+fi
- 
--int
--main ()
--{
+-
++char dlopen ();
+ int
+ main ()
+ {
 -return $ac_func ();
--  ;
--  return 0;
--}
-+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
++return dlopen ();
+   ;
+   return 0;
+ }
  _ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
@@ -44963,9 +44403,37 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  eval "$as_ac_var=yes"
--else
++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
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
++  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"
  
 -	eval "$as_ac_var=no"
  fi
@@ -44973,7 +44441,16 @@
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
--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
 -ac_res=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
@@ -44981,19 +44458,22 @@
 -as_val=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
++
 +done
 +
-+for ac_header in sys/uio.h
++for ac_func in dlopen dlsym dlerror dlclose
 +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 :
++  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
-+#define HAVE_SYS_UIO_H 1
+ #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
  _ACEOF
  
++else
++  libreplace_cv_dlfcn=yes
  fi
-+
  done
  
  
@@ -45003,9 +44483,10 @@
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
 -$as_echo_n "checking for $ac_func... " >&6; }
 -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-+{ $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 :
++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
 -  cat >conftest.$ac_ext <<_ACEOF
@@ -45013,7 +44494,9 @@
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
++  ac_func_search_save_LIBS=$LIBS
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
 -/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
 -   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
 -#define $ac_func innocuous_$ac_func
@@ -45022,7 +44505,7 @@
 -    which can conflict with char $ac_func (); 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
@@ -45030,13 +44513,13 @@
 -#endif
 -
 -#undef $ac_func
--
--/* 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
+ 
+ /* Override any GCC internal prototype to avoid an error.
+    Use char because int might match the return type of a GCC
+@@ -41987,1000 +10552,611 @@
+ #ifdef __cplusplus
+ extern "C"
+ #endif
 -char $ac_func ();
 -/* The GNU C library defines this for functions which it implements
 -    to always fail with ENOSYS.  Some functions are actually named
@@ -45044,22 +44527,16 @@
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
 -#endif
-+	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h.  */
- 
--int
--main ()
--{
+-
++char shl_load ();
+ int
+ main ()
+ {
 -return $ac_func ();
--  ;
--  return 0;
--}
-+		$ac_includes_default
-+		#if HAVE_SYS_SOCKET_H
-+		# include <sys/socket.h>
-+		#endif
-+		#include <net/if.h>
-+		int main(void) {return 0;}
++return shl_load ();
+   ;
+   return 0;
+ }
  _ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
@@ -45083,20 +44560,52 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  eval "$as_ac_var=yes"
-+if ac_fn_c_try_compile "$LINENO"; then :
-+  libreplace_cv_USABLE_NET_IF_H=yes
++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
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+  libreplace_cv_USABLE_NET_IF_H=no
++  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"
  
 -	eval "$as_ac_var=no"
  fi
-+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
++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
 -ac_res=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
@@ -45105,41 +44614,56 @@
 -as_val=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -   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_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
++
++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_check_lib_ext_save_LIBS=$LIBS
 -LIBS="-lrt $LIBS  $LIBS"
-+$as_echo "#define HAVE_NET_IF_H 1" >>confdefs.h
++		$ac_includes_default
  
-+fi
++	#include <dlfcn.h>
  
++		void *dlopen(const char* filename, unsigned int flags)
++		{
  
++	return 0;
  
 -        { $as_echo "$as_me:$LINENO: checking for nanosleep in -lrt" >&5
 -$as_echo_n "checking for nanosleep in -lrt... " >&6; }
 -if test "${ac_cv_lib_ext_rt_nanosleep+set}" = set; then
-+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
+-  $as_echo_n "(cached) " >&6
+-else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
+-/* end confdefs.h.  */
++		}
  
 -/* Override any GCC internal prototype to avoid an error.
 -   Use char because int might match the return type of a GCC
@@ -45148,16 +44672,13 @@
 -extern "C"
 -#endif
 -char nanosleep ();
-+$ac_includes_default
-+#include <sys/socket.h>
- int
- main ()
- {
+-int
+-main ()
+-{
 -return nanosleep ();
-+socklen_t foo;
-   ;
-   return 0;
- }
+-  ;
+-  return 0;
+-}
  _ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
@@ -45183,20 +44704,24 @@
 -  ac_cv_lib_ext_rt_nanosleep=yes;
 -		  ac_cv_lib_ext_rt=yes
 +if ac_fn_c_try_compile "$LINENO"; then :
-+  eval "ac_cv_type_$cv=yes"
++
++		ac_cv_c_prototype_void_pdlopen_const_charp_filename__unsigned_int_flags_=yes
++
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
+ 
 -	ac_cv_lib_ext_rt_nanosleep=no;
 -		  ac_cv_lib_ext_rt=no
 -fi
--
++		ac_cv_c_prototype_void_pdlopen_const_charp_filename__unsigned_int_flags_=no
+ 
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
--
-+  eval "ac_cv_type_$cv=no"
++fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ 
  fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ext_rt_nanosleep" >&5
 -$as_echo "$ac_cv_lib_ext_rt_nanosleep" >&6; }
@@ -45204,26 +44729,25 @@
 -  cat >>confdefs.h <<_ACEOF
 -#define HAVE_NANOSLEEP 1
 -_ACEOF
--
-+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++{ $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
-+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 :
  
 -LIBS=$ac_check_lib_ext_save_LIBS
--
+ 
 -if test $ac_cv_lib_ext_rt = yes; then
 -  cat >>confdefs.h <<_ACEOF
 -#define HAVE_LIBRT 1
-+cat >>confdefs.h <<_ACEOF
-+#define HAVE_SOCKLEN_T 1
- _ACEOF
+-_ACEOF
++if test x"${libreplace_cv_dlfcn}" = x"yes";then
++	LIBREPLACEOBJ="${LIBREPLACEOBJ} dlfcn.o"
++fi
  
 -		case "$LIBS" in
 -		    *-lrt*)
@@ -45232,17 +44756,28 @@
 -			LIBS="-lrt $LIBS"
 -			;;
 -		esac
--
++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
 -done
--
  
--
--
--
++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
+ 
 -for ac_func in mlock munlock mlockall munlockall
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
@@ -45250,32 +44785,39 @@
 -$as_echo_n "checking for $ac_func... " >&6; }
 -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
 -  $as_echo_n "(cached) " >&6
--else
++	LIBREPLACEOBJ="${LIBREPLACEOBJ} getpass.o"
+ else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
-+cat >>confdefs.h <<_ACEOF
-+#define $ac_tr_hdr 1
- _ACEOF
+-_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
 -/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
 -   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
 -#define $ac_func innocuous_$ac_func
--
+ 
 -/* System header to define __stub macros and hopefully few prototypes,
 -    which can conflict with char $ac_func (); 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
-+fi
++{ $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
  
 -#undef $ac_func
++SAVE_CPPFLAGS="$CPPFLAGS"
++CPPFLAGS="$CPPFLAGS -I$libreplacedir/"
++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
@@ -45290,23 +44832,15 @@
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
 -#endif
++#include "confdefs.h"
++#define NO_CONFIG_H
++#include "$libreplacedir/getpass.c"
  
-+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 ()
  {
 -return $ac_func ();
-+sa_family_t foo;
++
    ;
    return 0;
  }
@@ -45334,34 +44868,27 @@
 -       }; then
 -  eval "$as_ac_var=yes"
 +if ac_fn_c_try_compile "$LINENO"; then :
-+  eval "ac_cv_type_$cv=yes"
++  libreplace_cv_REPLACE_GETPASS=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+  eval "ac_cv_type_$cv=no"
++  libreplace_cv_REPLACE_GETPASS=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
-+
++CPPFLAGS="$SAVE_CPPFLAGS"
  
 -	eval "$as_ac_var=no"
  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
  
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
++$as_echo "#define REPLACE_GETPASS 1" >>confdefs.h
++
++	LIBREPLACEOBJ="${LIBREPLACEOBJ} getpass.o"
  fi
 -ac_res=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
@@ -45372,53 +44899,87 @@
 -   if test "x$as_val" = x""yes; then
 -  cat >>confdefs.h <<_ACEOF
 -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-+
-+cat >>confdefs.h <<_ACEOF
-+#define $ac_tr_hdr 1
- _ACEOF
+-_ACEOF
  
  fi
 -done
  
++{ $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"
+ 
 -for ac_func in memalign posix_memalign hstrerror
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
 -$as_echo_n "checking for $ac_func... " >&6; }
 -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-+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
+-  $as_echo_n "(cached) " >&6
++_ACEOF
++if ac_fn_c_try_run "$LINENO"; then :
++  libreplace_cv_STRPTIME_OK=yes
  else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
--_ACEOF
++  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
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
+-/* end confdefs.h.  */
 -/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
 -   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
 -#define $ac_func innocuous_$ac_func
--
+ 
 -/* System header to define __stub macros and hopefully few prototypes,
 -    which can conflict with char $ac_func (); below.
 -    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
 -    <limits.h> exists even on freestanding compilers.  */
--
++fi
+ 
 -#ifdef __STDC__
 -# include <limits.h>
 -#else
 -# include <assert.h>
 -#endif
--
++done
+ 
 -#undef $ac_func
--
+ 
 -/* 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.  */
@@ -45432,14 +44993,28 @@
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
 -#endif
++#######################################
++# 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.  */
  
-+$ac_includes_default
-+#include <netdb.h>
++		#include <stdio.h>
++		#ifdef HAVE_DIRECT_H
++		#include <direct.h>
++		#endif
  int
  main ()
  {
 -return $ac_func ();
-+struct addrinfo foo;
++
++			mkdir("foo",0777);
++			return 0;
++
    ;
    return 0;
  }
@@ -45467,31 +45042,24 @@
 -       }; then
 -  eval "$as_ac_var=yes"
 +if ac_fn_c_try_compile "$LINENO"; then :
-+  eval "ac_cv_type_$cv=yes"
++  libreplace_cv_mkdir_has_mode="yes"
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+  eval "ac_cv_type_$cv=no"
+-
+-	eval "$as_ac_var=no"
++  libreplace_cv_mkdir_has_mode="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 :
+ fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libreplace_cv_mkdir_has_mode" >&5
++$as_echo "$libreplace_cv_mkdir_has_mode" >&6; }
 +
-+cat >>confdefs.h <<_ACEOF
-+#define HAVE_STRUCT_ADDRINFO 1
-+_ACEOF
++if test "$libreplace_cv_mkdir_has_mode" = "yes"
++then
 +
++$as_echo "#define HAVE_MKDIR_MODE 1" >>confdefs.h
  
--	eval "$as_ac_var=no"
- fi
- 
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
@@ -45503,15 +45071,20 @@
 -as_val=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
--  cat >>confdefs.h <<_ACEOF
++
++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 `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-+
-+cat >>confdefs.h <<_ACEOF
-+#define $ac_tr_hdr 1
++#define HAVE_TIMEGM 1
  _ACEOF
  
++else
++  LIBREPLACEOBJ="${LIBREPLACEOBJ} timegm.o"
  fi
--done
+ done
  
  
 -for ac_header in sys/mman.h
@@ -45521,11 +45094,9 @@
 -  { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
 -$as_echo_n "checking for $ac_header... " >&6; }
 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-+
-+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 "$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
 -fi
 -ac_res=`eval 'as_val=${'$as_ac_Header'}
@@ -45541,20 +45112,10 @@
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
-+
- $ac_includes_default
+-/* end confdefs.h.  */
+-$ac_includes_default
 -#include <$ac_header>
-+#include <sys/socket.h>
-+int
-+main ()
-+{
-+struct sockaddr foo;
-+  ;
-+  return 0;
-+}
- _ACEOF
+-_ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -45574,29 +45135,17 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_header_compiler=yes
-+if ac_fn_c_try_compile "$LINENO"; then :
-+  eval "ac_cv_type_$cv=yes"
- else
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
+ 
 -	ac_header_compiler=no
-+  eval "ac_cv_type_$cv=no"
- fi
+-fi
 -
- rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 -$as_echo "$ac_header_compiler" >&6; }
-+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 :
- 
+-
 -# Is the header present?
 -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
 -$as_echo_n "checking $ac_header presence... " >&6; }
@@ -45605,10 +45154,15 @@
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
++	if test "$cross_compiling" = yes; then :
++  libreplace_cv_READDIR_NEEDED="assuming not"
++else
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
 -#include <$ac_header>
-+cat >>confdefs.h <<_ACEOF
-+#define HAVE_STRUCT_SOCKADDR 1
++
++#define test_readdir_os2_delete main
++#include "$libreplacedir/test/os2_delete.c"
  _ACEOF
 -if { (ac_try="$ac_cpp conftest.$ac_ext"
 -case "(($ac_try" in
@@ -45628,12 +45182,18 @@
 -	 test ! -s conftest.err
 -       }; then
 -  ac_header_preproc=yes
--else
++if ac_fn_c_try_run "$LINENO"; then :
++  libreplace_cv_READDIR_NEEDED=no
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -  ac_header_preproc=no
--fi
++  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
  
 -rm -f conftest.err conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
@@ -45680,35 +45240,38 @@
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
 -$as_echo "$ac_res" >&6; }
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libreplace_cv_READDIR_NEEDED" >&5
++$as_echo "$libreplace_cv_READDIR_NEEDED" >&6; }
  
- fi
+-fi
 -as_val=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
--  cat >>confdefs.h <<_ACEOF
++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 `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-+
-+cat >>confdefs.h <<_ACEOF
-+#define $ac_tr_hdr 1
++#define HAVE_DIRFD 1
  _ACEOF
  
  fi
+-
+ done
  
--done
+-# setbuffer, shmget, shm_open are needed for smbtorture
 -
--# setbuffer, shmget, shm_open are needed for smbtorture
  
- 
 -for ac_func in shmget shm_open
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
 -$as_echo_n "checking for $ac_func... " >&6; }
 -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-+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 "$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 >conftest.$ac_ext <<_ACEOF
@@ -45716,8 +45279,7 @@
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
+-/* end confdefs.h.  */
 -/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
 -   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
 -#define $ac_func innocuous_$ac_func
@@ -45732,10 +45294,9 @@
 -#else
 -# include <assert.h>
 -#endif
- 
+-
 -#undef $ac_func
-+$ac_includes_default
- 
+-
 -/* 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.  */
@@ -45749,15 +45310,15 @@
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
 -#endif
-+#include <sys/socket.h>
-+#include <sys/types.h>
-+#include <netinet/in.h>
  
++    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++#include <dirent.h>
  int
  main ()
  {
 -return $ac_func ();
-+struct sockaddr_storage foo;
++int i = (int)dirfd
    ;
    return 0;
  }
@@ -45785,30 +45346,153 @@
 -       }; then
 -  eval "$as_ac_var=yes"
 +if ac_fn_c_try_compile "$LINENO"; then :
-+  eval "ac_cv_type_$cv=yes"
++  ac_cv_have_dirfd_decl=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+  eval "ac_cv_type_$cv=no"
+-
+-	eval "$as_ac_var=no"
++  ac_cv_have_dirfd_decl=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 :
+ 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
+ 
+-rm -rf conftest.dSYM
+-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+-      conftest$ac_exeext conftest.$ac_ext
+-fi
+-ac_res=`eval 'as_val=${'$as_ac_var'}
+-		 $as_echo "$as_val"'`
+-	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+-$as_echo "$ac_res" >&6; }
+-as_val=`eval 'as_val=${'$as_ac_var'}
+-		 $as_echo "$as_val"'`
+-   if test "x$as_val" = x""yes; then
++$as_echo "#define HAVE_DIRFD_DECL 1" >>confdefs.h
 +
-+cat >>confdefs.h <<_ACEOF
-+#define HAVE_STRUCT_SOCKADDR_STORAGE 1
-+_ACEOF
++ 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 `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
++#define HAVE_GETDIRENTRIES 1
+ _ACEOF
  
+ fi
+ done
+ 
+-
+-
+-for ac_func in gettext dgettext
+-do
+-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
+-$as_echo_n "checking for $ac_func... " >&6; }
+-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
++{ $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 >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+-#define $ac_func innocuous_$ac_func
+ 
+-/* System header to define __stub macros and hopefully few prototypes,
+-    which can conflict with char $ac_func (); below.
+-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+-    <limits.h> exists even on freestanding compilers.  */
++		$ac_includes_default
+ 
+-#ifdef __STDC__
+-# include <limits.h>
+-#else
+-# include <assert.h>
+-#endif
++	#include <dirent.h>
+ 
+-#undef $ac_func
++		long telldir(const DIR *dir)
++		{
+ 
+-/* 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 $ac_func ();
+-/* The GNU C library defines this for functions which it implements
+-    to always fail with ENOSYS.  Some functions are actually named
+-    something starting with __ and the normal name is an alias.  */
+-#if defined __stub_$ac_func || defined __stub___$ac_func
+-choke me
+-#endif
++	return 0;
++
++		}
+ 
+-int
+-main ()
+-{
+-return $ac_func ();
+-  ;
+-  return 0;
+-}
+ _ACEOF
+-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:$LINENO: $ac_try_echo\""
+-$as_echo "$ac_try_echo") >&5
+-  (eval "$ac_link") 2>conftest.er1
+-  ac_status=$?
+-  grep -v '^ *+' conftest.er1 >conftest.err
+-  rm -f conftest.er1
+-  cat conftest.err >&5
+-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); } && {
+-	 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
+-  eval "$as_ac_var=yes"
++if ac_fn_c_try_compile "$LINENO"; then :
++
++		ac_cv_c_prototype_long_telldir_const_DIR_pdir_=yes
++
+ else
+-  $as_echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+ 
 -	eval "$as_ac_var=no"
++		ac_cv_c_prototype_long_telldir_const_DIR_pdir_=no
++
  fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
@@ -45823,26 +45507,28 @@
 -   if test "x$as_val" = x""yes; then
 -  cat >>confdefs.h <<_ACEOF
 -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+-_ACEOF
++{ $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 :
 +
-+cat >>confdefs.h <<_ACEOF
-+#define $ac_tr_hdr 1
- _ACEOF
++
++$as_echo "#define TELLDIR_TAKES_CONST_DIR 1" >>confdefs.h
++
  
  fi
 -done
  
  
- 
--for ac_func in gettext dgettext
+-for ac_func in strupr
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
 -$as_echo_n "checking for $ac_func... " >&6; }
 -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-+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 "$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 >conftest.$ac_ext <<_ACEOF
@@ -45855,20 +45541,23 @@
 -/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
 -   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
 -#define $ac_func innocuous_$ac_func
--
+ 
 -/* System header to define __stub macros and hopefully few prototypes,
 -    which can conflict with char $ac_func (); below.
 -    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
 -    <limits.h> exists even on freestanding compilers.  */
++		$ac_includes_default
  
 -#ifdef __STDC__
 -# include <limits.h>
 -#else
 -# include <assert.h>
 -#endif
--
++	#include <dirent.h>
+ 
 -#undef $ac_func
-+$ac_includes_default
++		int seekdir(DIR *dir, long ofs)
++		{
  
 -/* Override any GCC internal prototype to avoid an error.
 -   Use char because int might match the return type of a GCC
@@ -45883,18 +45572,17 @@
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
 -#endif
-+#include <sys/socket.h>
-+#include <sys/types.h>
-+#include <netinet/in.h>
++	return 0;
++
++		}
  
- int
- main ()
- {
+-int
+-main ()
+-{
 -return $ac_func ();
-+struct sockaddr_in6 foo;
-   ;
-   return 0;
- }
+-  ;
+-  return 0;
+-}
  _ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
@@ -45919,30 +45607,16 @@
 -       }; then
 -  eval "$as_ac_var=yes"
 +if ac_fn_c_try_compile "$LINENO"; then :
-+  eval "ac_cv_type_$cv=yes"
++
++		ac_cv_c_prototype_int_seekdir_DIR_pdir__long_ofs_=yes
++
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+  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
-+
  
 -	eval "$as_ac_var=no"
- fi
+-fi
++		ac_cv_c_prototype_int_seekdir_DIR_pdir__long_ofs_=no
  
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
@@ -45957,26 +45631,21 @@
 -   if test "x$as_val" = x""yes; then
 -  cat >>confdefs.h <<_ACEOF
 -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-+
-+cat >>confdefs.h <<_ACEOF
-+#define $ac_tr_hdr 1
- _ACEOF
+-_ACEOF
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  
  fi
 -done
++{ $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 :
  
  
 -# Find a method of generating a stack trace
-+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>
++$as_echo "#define SEEKDIR_RETURNS_INT 1" >>confdefs.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
  
 -for ac_header in execinfo.h libexc.h libunwind.h
 -do
@@ -45985,13 +45654,16 @@
 -  { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
 -$as_echo_n "checking for $ac_header... " >&6; }
 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
--  $as_echo_n "(cached) " >&6
- 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
+-fi
 -ac_res=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
 -$as_echo "$ac_res" >&6; }
--else
+ else
 -  # Is the header compilable?
 -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
 -$as_echo_n "checking $ac_header usability... " >&6; }
@@ -46000,10 +45672,23 @@
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
++
++	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.  */
 -$ac_includes_default
 -#include <$ac_header>
--_ACEOF
++
++#define _LIBREPLACE_REPLACE_H
++#include "$libreplacedir/repdir_getdirentries.c"
++#define test_readdir_os2_delete main
++#include "$libreplacedir/test/os2_delete.c"
+ _ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -46023,33 +45708,81 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_header_compiler=yes
--else
++if ac_fn_c_try_run "$LINENO"; then :
++  libreplace_cv_READDIR_GETDIRENTRIES=yes
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
++  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
++
  
 -	ac_header_compiler=no
--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
  
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 -$as_echo "$ac_header_compiler" >&6; }
-+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>
++$as_echo "#define REPLACE_READDIR 1" >>confdefs.h
  
 -# Is the header present?
 -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
 -$as_echo_n "checking $ac_header presence... " >&6; }
 -cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
--_ACEOF
++
++$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
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
++
++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.  */
 -#include <$ac_header>
--_ACEOF
++
++#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_try="$ac_cpp conftest.$ac_ext"
 -case "(($ac_try" in
 -  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -46068,22 +45801,29 @@
 -	 test ! -s conftest.err
 -       }; then
 -  ac_header_preproc=yes
--else
++if ac_fn_c_try_run "$LINENO"; then :
++  libreplace_cv_READDIR_GETDENTS=yes
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+"
-+if test "x$ac_cv_member_struct_sockaddr_storage___ss_family" = x""yes; then :
-+
-+$as_echo "#define HAVE___SS_FAMILY 1" >>confdefs.h
++  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
  
 -  ac_header_preproc=no
++
++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
  
 -rm -f conftest.err conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
 -$as_echo "$ac_header_preproc" >&6; }
-+fi
-+fi
++$as_echo "#define REPLACE_READDIR 1" >>confdefs.h
  
 -# So?  What about this header?
 -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
@@ -46118,71 +45858,57 @@
 -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
 -$as_echo_n "checking for $ac_header... " >&6; }
 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-+{ $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
+-  $as_echo_n "(cached) " >&6
+-else
 -  eval "$as_ac_Header=\$ac_header_preproc"
--fi
++
++$as_echo "#define REPLACE_READDIR_GETDENTS 1" >>confdefs.h
++
++	LIBREPLACEOBJ="${LIBREPLACEOBJ} repdir_getdents.o"
++	libreplace_cv_READDIR_NEEDED=no
+ fi
 -ac_res=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
 -$as_echo "$ac_res" >&6; }
  
--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
 -as_val=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
--  cat >>confdefs.h <<_ACEOF
++
++###############################################
++# 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 `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-+	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;
-+}
++#define HAVE_CRYPT_H 1
  _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
  
--done
-+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
+ done
  
 -# libexecinfo provides backtrace_symbols on FreeBSD
 -{ $as_echo "$as_me:$LINENO: checking for library containing backtrace_symbols" >&5
 -$as_echo_n "checking for library containing backtrace_symbols... " >&6; }
 -if test "${ac_cv_search_backtrace_symbols+set}" = set; 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 "$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_save_LIBS=$LIBS
@@ -46192,30 +45918,23 @@
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
 +
-+	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++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
+ /* Override any GCC internal prototype to avoid an error.
+@@ -42989,105 +11165,25 @@
+ #ifdef __cplusplus
+ extern "C"
+ #endif
 -char backtrace_symbols ();
-+#include <sys/types.h>
-+#include <stdlib.h>
-+#include <stddef.h>
-+#include <sys/socket.h>
-+#include <sys/un.h>
-+
++char crypt ();
  int
  main ()
  {
 -return backtrace_symbols ();
-+
-+struct sockaddr_un sunaddr;
-+sunaddr.sun_family = AF_UNIX;
-+
++return crypt ();
    ;
    return 0;
  }
@@ -46249,19 +45968,13 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  ac_cv_search_backtrace_symbols=$ac_res
-+if ac_fn_c_try_compile "$LINENO"; then :
-+
-+		libreplace_cv_HAVE_UNIXSOCKET=yes
-+
- else
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
- 
-+		libreplace_cv_HAVE_UNIXSOCKET=no
- 
- fi
-+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- 
+-
+-
+-fi
+-
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext
@@ -46273,35 +45986,21 @@
 -  :
 -else
 -  ac_cv_search_backtrace_symbols=no
- fi
+-fi
 -rm conftest.$ac_ext
 -LIBS=$ac_func_search_save_LIBS
-+{ $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
+-fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_backtrace_symbols" >&5
 -$as_echo "$ac_cv_search_backtrace_symbols" >&6; }
 -ac_res=$ac_cv_search_backtrace_symbols
 -if test "$ac_res" != no; then
 -  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
-+
-+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
- 
+-
++if ac_fn_c_try_link "$LINENO"; then :
++  ac_cv_search_ext_crypt="none required"
  fi
-+done
- 
-+if test x"$ac_cv_func_connect" = x"no"; then
- 
+-
+-
 -for ac_func in backtrace_symbols
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
@@ -46315,37 +46014,33 @@
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
++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.  */
 -/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
 -   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
 -#define $ac_func innocuous_$ac_func
- 
+-
 -/* System header to define __stub macros and hopefully few prototypes,
 -    which can conflict with char $ac_func (); below.
 -    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
 -    <limits.h> exists even on freestanding compilers.  */
-+ac_check_lib_ext_save_LIBS=$LIBS
-+LIBS="-lnsl_s $LIBREPLACE_NETWORK_LIBS  $LIBS"
- 
+-
 -#ifdef __STDC__
 -# include <limits.h>
 -#else
 -# include <assert.h>
 -#endif
- 
+-
 -#undef $ac_func
-+
-+        { $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
-@@ -42994,82 +11818,64 @@
+@@ -43095,1082 +11191,653 @@
  #ifdef __cplusplus
  extern "C"
  #endif
@@ -46357,12 +46052,12 @@
 -choke me
 -#endif
 -
-+char connect ();
++char crypt ();
  int
  main ()
  {
 -return $ac_func ();
-+return connect ();
++return crypt ();
    ;
    return 0;
  }
@@ -46389,30 +46084,33 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  eval "$as_ac_var=yes"
-+if ac_fn_c_try_link "$LINENO"; then :
-+  ac_cv_lib_ext_nsl_s_connect=yes;
-+		  ac_cv_lib_ext_nsl_s=yes
- else
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+  ac_cv_lib_ext_nsl_s_connect=no;
-+		  ac_cv_lib_ext_nsl_s=no
+-
+-	eval "$as_ac_var=no"
++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
- 
--	eval "$as_ac_var=no"
++  done
++fi
++LIBS=$ac_func_search_ext_save_LIBS
  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
++{ $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"
  
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
++$as_echo "#define HAVE_CRYPT 1" >>confdefs.h
++
++else
++   LIBREPLACEOBJ="${LIBREPLACEOBJ} crypt.o"
  fi
 -ac_res=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
@@ -46421,65 +46119,81 @@
 -as_val=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+LIBS=$ac_check_lib_ext_save_LIBS
 +
-+if test $ac_cv_lib_ext_nsl_s = yes; then :
++
++for ac_func in syslog 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
-+#define HAVE_LIBNSL_S 1
+ #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
  _ACEOF
  
-+		case "$LIBREPLACE_NETWORK_LIBS" in
-+		    *-lnsl_s*)
-+			;;
-+		    *)
-+			LIBREPLACE_NETWORK_LIBS="-lnsl_s $LIBREPLACE_NETWORK_LIBS"
-+			;;
-+		esac
-+
-+
++else
++  as_fn_error "Required function not found" "$LINENO" 5
  fi
--done
+ done
  
  
 -{ $as_echo "$as_me:$LINENO: checking for trace_back_stack in -lexc" >&5
 -$as_echo_n "checking for trace_back_stack in -lexc... " >&6; }
 -if test "${ac_cv_lib_exc_trace_back_stack+set}" = set; then
-+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
+-  $as_echo_n "(cached) " >&6
+-else
 -  ac_check_lib_save_LIBS=$LIBS
 -LIBS="-lexc  $LIBS"
 -cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
--_ACEOF
++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
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
+-/* end confdefs.h.  */
  
- /* Override any GCC internal prototype to avoid an error.
-@@ -43078,93 +11884,65 @@
- #ifdef __cplusplus
- extern "C"
- #endif
+-/* 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 trace_back_stack ();
-+char connect ();
- int
- main ()
- {
+-int
+-main ()
+-{
 -return trace_back_stack ();
-+return connect ();
-   ;
-   return 0;
- }
+-  ;
+-  return 0;
+-}
++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
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
@@ -46503,59 +46217,83 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  ac_cv_lib_exc_trace_back_stack=yes
-+if ac_fn_c_try_link "$LINENO"; then :
-+  ac_cv_lib_ext_nsl_connect=yes;
-+		  ac_cv_lib_ext_nsl=yes
- else
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+  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
  
 -	ac_cv_lib_exc_trace_back_stack=no
  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
  
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
 -LIBS=$ac_check_lib_save_LIBS
++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
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_exc_trace_back_stack" >&5
 -$as_echo "$ac_cv_lib_exc_trace_back_stack" >&6; }
 -if test "x$ac_cv_lib_exc_trace_back_stack" = x""yes; then
-+LIBS=$ac_check_lib_ext_save_LIBS
 +
-+if test $ac_cv_lib_ext_nsl = yes; then :
++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 HAVE_LIBEXC 1
-+#define HAVE_LIBNSL 1
++#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
  
 -  LIBS="-lexc $LIBS"
-+		case "$LIBREPLACE_NETWORK_LIBS" in
-+		    *-lnsl*)
-+			;;
-+		    *)
-+			LIBREPLACE_NETWORK_LIBS="-lnsl $LIBREPLACE_NETWORK_LIBS"
-+			;;
-+		esac
++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
  
 -# check for sysctlbyname for BSD systems
-+ac_check_lib_ext_save_LIBS=$LIBS
-+LIBS="-lsocket $LIBREPLACE_NETWORK_LIBS  $LIBS"
++fi
  
 -for ac_func in sysctlbyname
 -do
@@ -46563,11 +46301,12 @@
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
 -$as_echo_n "checking for $ac_func... " >&6; }
 -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
++done
 +
 +
-+        { $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 "$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 >conftest.$ac_ext <<_ACEOF
@@ -46575,31 +46314,49 @@
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++
++	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
 -/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
 -   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
 -#define $ac_func innocuous_$ac_func
--
+ 
 -/* System header to define __stub macros and hopefully few prototypes,
 -    which can conflict with char $ac_func (); below.
 -    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
 -    <limits.h> exists even on freestanding compilers.  */
--
++		$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
+ 
 -#ifdef __STDC__
 -# include <limits.h>
 -#else
 -# include <assert.h>
 -#endif
--
++fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ 
 -#undef $ac_func
++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
  
- /* Override any GCC internal prototype to avoid an error.
-    Use char because int might match the return type of a GCC
-@@ -43172,513 +11950,373 @@
- #ifdef __cplusplus
- extern "C"
- #endif
+-/* 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 $ac_func ();
 -/* The GNU C library defines this for functions which it implements
 -    to always fail with ENOSYS.  Some functions are actually named
@@ -46607,13 +46364,28 @@
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
 -#endif
--
-+char connect ();
++$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 ()
  {
 -return $ac_func ();
-+return connect ();
++socklen_t foo;
    ;
    return 0;
  }
@@ -46640,26 +46412,31 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  eval "$as_ac_var=yes"
-+if ac_fn_c_try_link "$LINENO"; then :
-+  ac_cv_lib_ext_socket_connect=yes;
-+		  ac_cv_lib_ext_socket=yes
++if ac_fn_c_try_compile "$LINENO"; then :
++  eval "ac_cv_type_$cv=yes"
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+  ac_cv_lib_ext_socket_connect=no;
-+		  ac_cv_lib_ext_socket=no
++  eval "ac_cv_type_$cv=no"
 +fi
-+rm -f core conftest.err conftest.$ac_objext \
-+    conftest$ac_exeext conftest.$ac_ext
++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
++
  
 -	eval "$as_ac_var=no"
  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
  
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
@@ -46672,74 +46449,69 @@
 -as_val=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+LIBS=$ac_check_lib_ext_save_LIBS
+-  cat >>confdefs.h <<_ACEOF
+-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 +
-+if test $ac_cv_lib_ext_socket = yes; then :
-   cat >>confdefs.h <<_ACEOF
--#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-+#define HAVE_LIBSOCKET 1
++cat >>confdefs.h <<_ACEOF
++#define $ac_tr_hdr 1
  _ACEOF
  
-+		case "$LIBREPLACE_NETWORK_LIBS" in
-+		    *-lsocket*)
-+			;;
-+		    *)
-+			LIBREPLACE_NETWORK_LIBS="-lsocket $LIBREPLACE_NETWORK_LIBS"
-+			;;
-+		esac
-+
-+
  fi
 -done
  
  
--printf "%s" "checking for GPFS GPL libs... "
--save_LIBS="$LIBS"
--LIBS="$LIBS -lgpfs_gpl"
+-#############################
+-# check if building with gpfs
+ 
+-for ac_header in gpfs_gpl.h
+-do
+-as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+-  { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+-$as_echo_n "checking for $ac_header... " >&6; }
+-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
++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
+-fi
+-ac_res=`eval 'as_val=${'$as_ac_Header'}
+-		 $as_echo "$as_val"'`
+-	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+-$as_echo "$ac_res" >&6; }
+ else
+-  # Is the header compilable?
+-{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
+-$as_echo_n "checking $ac_header usability... " >&6; }
 -cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+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.  */
--#include <gpfs_gpl.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 ()
- {
--gpfs_set_share(0,GPFS_SHARE_READ,GPFS_DENY_NONE)
-+return connect ();
-   ;
-   return 0;
- }
+ $ac_includes_default
+-#include <$ac_header>
++#include <sys/socket.h>
++int
++main ()
++{
++sa_family_t foo;
++  ;
++  return 0;
++}
  _ACEOF
--rm -f conftest.$ac_objext conftest$ac_exeext
--if { (ac_try="$ac_link"
+-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:$LINENO: $ac_try_echo\""
 -$as_echo "$ac_try_echo") >&5
--  (eval "$ac_link") 2>conftest.er1
+-  (eval "$ac_compile") 2>conftest.er1
 -  ac_status=$?
 -  grep -v '^ *+' conftest.er1 >conftest.err
 -  rm -f conftest.er1
@@ -46748,191 +46520,138 @@
 -  (exit $ac_status); } && {
 -	 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
--  samba_cv_HAVE_GPFS=yes
-+if ac_fn_c_try_link "$LINENO"; then :
-+  ac_cv_lib_ext_inet_connect=yes;
-+		  ac_cv_lib_ext_inet=yes
+-       } && test -s conftest.$ac_objext; then
+-  ac_header_compiler=yes
++if ac_fn_c_try_compile "$LINENO"; then :
++  eval "ac_cv_type_$cv=yes"
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+  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
- 
--	samba_cv_HAVE_GPFS=no
+-
+-	ac_header_compiler=no
++  eval "ac_cv_type_$cv=no"
  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
- 
--rm -rf conftest.dSYM
--rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
--      conftest$ac_exeext conftest.$ac_ext
--echo $samba_cv_HAVE_GPFS
--if test x"$samba_cv_HAVE_GPFS" = x"yes"; then
+-
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+-{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+-$as_echo "$ac_header_compiler" >&6; }
 +fi
-+LIBS=$ac_check_lib_ext_save_LIBS
++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_GPFS 1
-+if test $ac_cv_lib_ext_inet = yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define HAVE_LIBINET 1
- _ACEOF
- 
--    default_shared_modules="$default_shared_modules vfs_gpfs"
-+		case "$LIBREPLACE_NETWORK_LIBS" in
-+		    *-linet*)
-+			;;
-+		    *)
-+			LIBREPLACE_NETWORK_LIBS="-linet $LIBREPLACE_NETWORK_LIBS"
-+			;;
-+		esac
-+
-+
- fi
--LIBS="$save_LIBS"
-+			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
- 
--printf "%s" "checking for GPFS libs (with 3.2.1 PTF8 available as GPL)... "
--save_LIBS="$LIBS"
--LIBS="$LIBS -lgpfs"
+-# Is the header present?
+-{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
+-$as_echo_n "checking $ac_header presence... " >&6; }
 -cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
-+$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
+-_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_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.  */
--#include <gpfs.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 ()
- {
--gpfs_set_share(0,GPFS_SHARE_READ,GPFS_DENY_NONE)
-+return gethostbyname ();
-   ;
-   return 0;
- }
+-/* end confdefs.h.  */
+-#include <$ac_header>
++cat >>confdefs.h <<_ACEOF
++#define HAVE_SA_FAMILY_T 1
  _ACEOF
--rm -f conftest.$ac_objext conftest$ac_exeext
--if { (ac_try="$ac_link"
+-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:$LINENO: $ac_try_echo\""
 -$as_echo "$ac_try_echo") >&5
--  (eval "$ac_link") 2>conftest.er1
+-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
 -  ac_status=$?
 -  grep -v '^ *+' conftest.er1 >conftest.err
 -  rm -f conftest.er1
 -  cat conftest.err >&5
 -  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
--  (exit $ac_status); } && {
--	 test -z "$ac_c_werror_flag" ||
+-  (exit $ac_status); } >/dev/null && {
+-	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
 -	 test ! -s conftest.err
--       } && test -s conftest$ac_exeext && {
--	 test "$cross_compiling" = yes ||
--	 $as_test_x conftest$ac_exeext
 -       }; then
--  samba_cv_HAVE_GPFS=yes
-+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_header_preproc=yes
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+  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
+-
+-  ac_header_preproc=no
+-fi
  
--	samba_cv_HAVE_GPFS=no
+-rm -f conftest.err conftest.$ac_ext
+-{ $as_echo "$as_me:$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:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+-$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+-$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+-    ac_header_preproc=yes
+-    ;;
+-  no:yes:* )
+-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+-$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+-$as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+-$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+-$as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+-$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+-$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+-    ( cat <<\_ASBOX
+-## ---------------------------------------- ##
+-## Report this to samba-technical at samba.org ##
+-## ---------------------------------------- ##
+-_ASBOX
+-     ) | sed "s/^/$as_me: WARNING:     /" >&2
+-    ;;
+-esac
+-{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+-$as_echo_n "checking for $ac_header... " >&6; }
+-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+-  $as_echo_n "(cached) " >&6
+-else
+-  eval "$as_ac_Header=\$ac_header_preproc"
  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
+-ac_res=`eval 'as_val=${'$as_ac_Header'}
+-		 $as_echo "$as_val"'`
+-	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+-$as_echo "$ac_res" >&6; }
  
--rm -rf conftest.dSYM
--rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
--      conftest$ac_exeext conftest.$ac_ext
--echo $samba_cv_HAVE_GPFS
--if test x"$samba_cv_HAVE_GPFS" = x"yes"; then
-+fi
-+LIBS=$ac_check_lib_ext_save_LIBS
+ fi
+-as_val=`eval 'as_val=${'$as_ac_Header'}
+-		 $as_echo "$as_val"'`
+-   if test "x$as_val" = x""yes; then
+-  cat >>confdefs.h <<_ACEOF
+-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
++
++cat >>confdefs.h <<_ACEOF
++#define $ac_tr_hdr 1
+ _ACEOF
  
+ fi
+ 
+-done
+-
+-if test x"$ac_cv_header_gpfs_gpl_h" = x"yes"; then
+-
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_GPFS 1
-+if test $ac_cv_lib_ext_nsl_s = yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define HAVE_LIBNSL_S 1
- _ACEOF
+-_ACEOF
  
 -    default_shared_modules="$default_shared_modules vfs_gpfs"
-+		case "$LIBREPLACE_NETWORK_LIBS" in
-+		    *-lnsl_s*)
-+			;;
-+		    *)
-+			LIBREPLACE_NETWORK_LIBS="-lnsl_s $LIBREPLACE_NETWORK_LIBS"
-+			;;
-+		esac
-+
-+
- fi
--LIBS="$save_LIBS"
+-fi
  
 -#############################################
 -# check if building on Isilon OneFS
@@ -46944,33 +46663,23 @@
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+
-+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 :
++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.  */
 -#include <isi_version/isi_version.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 ();
++$ac_includes_default
++#include <netdb.h>
  int
  main ()
  {
 -get_isilon_copyright()
-+return gethostbyname ();
++struct addrinfo foo;
    ;
    return 0;
  }
@@ -46997,40 +46706,36 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  samba_cv_HAVE_ONEFS=yes
-+if ac_fn_c_try_link "$LINENO"; then :
-+  ac_cv_lib_ext_nsl_gethostbyname=yes;
-+		  ac_cv_lib_ext_nsl=yes
++if ac_fn_c_try_compile "$LINENO"; then :
++  eval "ac_cv_type_$cv=yes"
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+  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
- 
+-
 -	samba_cv_HAVE_ONEFS=no
++  eval "ac_cv_type_$cv=no"
  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
++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 :
  
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
 -echo $samba_cv_HAVE_ONEFS
 -if test x"$samba_cv_HAVE_ONEFS" = x"yes"; then
-+fi
-+LIBS=$ac_check_lib_ext_save_LIBS
- 
+-
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_ONEFS 1
-+if test $ac_cv_lib_ext_nsl = yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define HAVE_LIBNSL 1
++cat >>confdefs.h <<_ACEOF
++#define HAVE_STRUCT_ADDRINFO 1
  _ACEOF
  
 -    default_shared_modules="$default_shared_modules vfs_onefs vfs_onefs_shadow_copy perfcount_onefs"
@@ -47038,18 +46743,11 @@
 -    ONEFS_LIBS="-lisi_acl -lisi_ecs -lisi_event -lisi_util"
 -    # Need to also add general libs for oplocks support
 -    save_LIBS="$save_LIBS -lisi_ecs -lisi_event -lisi_util -ldevstat"
-+		case "$LIBREPLACE_NETWORK_LIBS" in
-+		    *-lnsl*)
-+			;;
-+		    *)
-+			LIBREPLACE_NETWORK_LIBS="-lnsl $LIBREPLACE_NETWORK_LIBS"
-+			;;
-+		esac
 +
-+
  fi
  
 -LIBS="$save_LIBS"
++fi
  
 -# Note that all the libunwind symbols in the API are defined to internal
 -# platform-specific version, so we must include libunwind.h before checking
@@ -47057,8 +46755,9 @@
 -{ $as_echo "$as_me:$LINENO: checking for libunwind" >&5
 -$as_echo_n "checking for libunwind... " >&6; }
 -save_LIBS=$LIBS
-+ac_check_lib_ext_save_LIBS=$LIBS
-+LIBS="-lsocket $LIBREPLACE_NETWORK_LIBS  $LIBS"
++cat >>confdefs.h <<_ACEOF
++#define $ac_tr_hdr 1
++_ACEOF
  
 -UNWIND_ARCH="unknown"
 -if test x"$UNAME_I" != x"unknown"; then
@@ -47067,7 +46766,7 @@
 -	UNWIND_ARCH="$UNAME_M"
 -elif test x"$UNAME_P" != x"unknown"; then
 -	UNWIND_ARCH="$UNAME_P"
--fi
+ fi
  
 -case "$UNWIND_ARCH" in
 -	unknown)
@@ -47091,24 +46790,22 @@
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+        { $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 :
+-/* end confdefs.h.  */
+ 
+-#ifdef HAVE_LIBUNWIND_H
+-#include <libunwind.h>
+-#endif
++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.  */
++/* end confdefs.h.  */
  
--#ifdef HAVE_LIBUNWIND_H
--#include <libunwind.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 ();
++$ac_includes_default
++#include <sys/socket.h>
  int
  main ()
  {
@@ -47118,7 +46815,7 @@
 -	unw_getcontext(&ctx); unw_init_local(&cur, &ctx);
 -	unw_get_proc_name(&cur, buf, sizeof(buf), &off);
 -
-+return gethostbyname ();
++struct sockaddr foo;
    ;
    return 0;
  }
@@ -47144,27 +46841,44 @@
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
--
++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 :
+ 
 -	{ $as_echo "$as_me:$LINENO: result: yes" >&5
 -$as_echo "yes" >&6; }
--
++cat >>confdefs.h <<_ACEOF
++#define HAVE_STRUCT_SOCKADDR 1
++_ACEOF
++
++
++fi
+ 
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_LIBUNWIND 1
--_ACEOF
--
--
++fi
++
++cat >>confdefs.h <<_ACEOF
++#define $ac_tr_hdr 1
+ _ACEOF
+ 
++fi
+ 
 -	# If we have libunwind, test whether we also have libunwind-ptrace
 -	# which would let us unwind arbitrary processes.
 -	save_LIBS=$LIBS
-+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
  
 -for ac_header in libunwind-ptrace.h
 -do
@@ -47173,13 +46887,18 @@
 -  { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
 -$as_echo_n "checking for $ac_header... " >&6; }
 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
--  $as_echo_n "(cached) " >&6
- 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
+-fi
 -ac_res=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
 -$as_echo "$ac_res" >&6; }
--else
+ else
 -  # Is the header compilable?
 -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
 -$as_echo_n "checking $ac_header usability... " >&6; }
@@ -47188,14 +46907,23 @@
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
--$ac_includes_default
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
++
+ $ac_includes_default
 -#include <$ac_header>
-+{ $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
++
++#include <sys/socket.h>
++#include <sys/types.h>
++#include <netinet/in.h>
++
++int
++main ()
++{
++struct sockaddr_storage foo;
++  ;
++  return 0;
++}
  _ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
@@ -47216,18 +46944,29 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_header_compiler=yes
--else
++if ac_fn_c_try_compile "$LINENO"; then :
++  eval "ac_cv_type_$cv=yes"
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
- 
+-
 -	ac_header_compiler=no
++  eval "ac_cv_type_$cv=no"
  fi
-+LIBS=$ac_check_lib_ext_save_LIBS
- 
--rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+-
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 -$as_echo "$ac_header_compiler" >&6; }
--
++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 :
+ 
 -# Is the header present?
 -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
 -$as_echo_n "checking $ac_header presence... " >&6; }
@@ -47238,9 +46977,8 @@
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
 -#include <$ac_header>
-+if test $ac_cv_lib_ext_socket = yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define HAVE_LIBSOCKET 1
++cat >>confdefs.h <<_ACEOF
++#define HAVE_STRUCT_SOCKADDR_STORAGE 1
  _ACEOF
 -if { (ac_try="$ac_cpp conftest.$ac_ext"
 -case "(($ac_try" in
@@ -47263,16 +47001,9 @@
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
- 
+-
 -  ac_header_preproc=no
 -fi
-+		case "$LIBREPLACE_NETWORK_LIBS" in
-+		    *-lsocket*)
-+			;;
-+		    *)
-+			LIBREPLACE_NETWORK_LIBS="-lsocket $LIBREPLACE_NETWORK_LIBS"
-+			;;
-+		esac
  
 -rm -f conftest.err conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
@@ -47319,46 +47050,30 @@
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
 -$as_echo "$ac_res" >&6; }
-+			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
 -as_val=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
+-  cat >>confdefs.h <<_ACEOF
+-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
 +
-+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 `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-+#define HAVE_IF_NAMETOINDEX 1
++cat >>confdefs.h <<_ACEOF
++#define $ac_tr_hdr 1
  _ACEOF
  
  fi
--
- done
  
+-done
+ 
 -	{ $as_echo "$as_me:$LINENO: checking for _UPT_create in -lunwind-ptrace" >&5
 -$as_echo_n "checking for _UPT_create in -lunwind-ptrace... " >&6; }
 -if test "${ac_cv_lib_unwind_ptrace__UPT_create+set}" = set; then
-+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 :
++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
 -  ac_check_lib_save_LIBS=$LIBS
@@ -47371,18 +47086,24 @@
 +  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
  
- /* Override any GCC internal prototype to avoid an error.
-@@ -43687,3344 +12325,2215 @@
- #ifdef __cplusplus
- extern "C"
- #endif
+-/* 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 _UPT_create ();
-+char if_nametoindex ();
++$ac_includes_default
++
++#include <sys/socket.h>
++#include <sys/types.h>
++#include <netinet/in.h>
++
  int
  main ()
  {
 -return _UPT_create ();
-+return if_nametoindex ();
++struct sockaddr_in6 foo;
    ;
    return 0;
  }
@@ -47409,99 +47130,92 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  ac_cv_lib_unwind_ptrace__UPT_create=yes
-+if ac_fn_c_try_link "$LINENO"; then :
-+  ac_cv_lib_ext_ipv6_if_nametoindex=yes;
-+		  ac_cv_lib_ext_ipv6=yes
++if ac_fn_c_try_compile "$LINENO"; then :
++  eval "ac_cv_type_$cv=yes"
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	ac_cv_lib_unwind_ptrace__UPT_create=no
-+  ac_cv_lib_ext_ipv6_if_nametoindex=no;
-+		  ac_cv_lib_ext_ipv6=no
++  eval "ac_cv_type_$cv=no"
  fi
-+rm -f core conftest.err conftest.$ac_objext \
-+    conftest$ac_exeext conftest.$ac_ext
- 
+-
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
 -LIBS=$ac_check_lib_save_LIBS
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_unwind_ptrace__UPT_create" >&5
 -$as_echo "$ac_cv_lib_unwind_ptrace__UPT_create" >&6; }
 -if test "x$ac_cv_lib_unwind_ptrace__UPT_create" = x""yes; then
-+{ $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
- 
+-
 -		LIBUNWIND_PTRACE="-lunwind-ptrace";
-+fi
-+LIBS=$ac_check_lib_ext_save_LIBS
++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_LIBUNWIND_PTRACE 1
-+if test $ac_cv_lib_ext_ipv6 = yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define HAVE_LIBIPV6 1
++cat >>confdefs.h <<_ACEOF
++#define HAVE_STRUCT_SOCKADDR_IN6 1
  _ACEOF
  
-+		case "$LIBREPLACE_NETWORK_LIBS" in
-+		    *-lipv6*)
-+			;;
-+		    *)
-+			LIBREPLACE_NETWORK_LIBS="-lipv6 $LIBREPLACE_NETWORK_LIBS"
-+			;;
-+		esac
  
 -else
 -   LIBUNWIND_PTRACE=""
--fi
+ fi
  
 +fi
-+			if test x"$ac_cv_lib_ext_ipv6_if_nametoindex" = x"yes"
-+	then
  
 -	LIBS=$save_LIBS
-+$as_echo "#define HAVE_IF_NAMETOINDEX 1" >>confdefs.h
++cat >>confdefs.h <<_ACEOF
++#define $ac_tr_hdr 1
++_ACEOF
  
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+	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"
  
 -	{ $as_echo "$as_me:$LINENO: result: no" >&5
 -$as_echo "no" >&6; }
 -	LIBS=$save_LIBS
-+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
++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
  
-+else
-+  LIBREPLACE_NETWORK_OBJS="${LIBREPLACE_NETWORK_OBJS} socketpair.o"
  fi
-+done
  
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
--
+ 
 -# To use libunwind-ptrace, we also need to make some ptrace system calls.
 -if test x"$LIBUNWIND_PTRACE" != x"" ; then
++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
  
 -for ac_header in sys/ptrace.h
 -do
@@ -47510,16 +47224,13 @@
 -  { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
 -$as_echo_n "checking for $ac_header... " >&6; }
 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-+{ $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
--fi
+-  $as_echo_n "(cached) " >&6
+ fi
 -ac_res=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
 -$as_echo "$ac_res" >&6; }
- else
+-else
 -  # Is the header compilable?
 -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
 -$as_echo_n "checking $ac_header usability... " >&6; }
@@ -47528,27 +47239,10 @@
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+
-+if test "$cross_compiling" = yes; then :
-+  libreplace_cv_REPLACE_INET_NTOA=cross
-+else
-+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
+-/* end confdefs.h.  */
 -$ac_includes_default
 -#include <$ac_header>
-+
-+#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
+-_ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -47568,25 +47262,22 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_header_compiler=yes
-+if ac_fn_c_try_run "$LINENO"; then :
-+  libreplace_cv_REPLACE_INET_NTOA=yes
- else
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
+ 
 -	ac_header_compiler=no
-+  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
  
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 -$as_echo "$ac_header_compiler" >&6; }
-+fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libreplace_cv_REPLACE_INET_NTOA" >&5
-+$as_echo "$libreplace_cv_REPLACE_INET_NTOA" >&6; }
++{ $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
  
 -# Is the header present?
 -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
@@ -47596,15 +47287,10 @@
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
++	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
 -#include <$ac_header>
-+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
+-_ACEOF
 -if { (ac_try="$ac_cpp conftest.$ac_ext"
 -case "(($ac_try" in
 -  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -47623,32 +47309,32 @@
 -	 test ! -s conftest.err
 -       }; then
 -  ac_header_preproc=yes
-+
- else
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+  libreplace_cv_REPLACE_INET_NTOA=yes
-+fi
-+done
  
 -  ac_header_preproc=no
-+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
+-fi
++#include <sys/types.h>
++#include <sys/socket.h>
++#include <netinet/in.h>
  
 -rm -f conftest.err conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
 -$as_echo "$ac_header_preproc" >&6; }
-+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
++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
  
 -# So?  What about this header?
 -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
@@ -47686,76 +47372,61 @@
 -  $as_echo_n "(cached) " >&6
  else
 -  eval "$as_ac_Header=\$ac_header_preproc"
-+  LIBREPLACE_NETWORK_OBJS="${LIBREPLACE_NETWORK_OBJS} inet_aton.o"
++
++		libreplace_cv_HAVE_SOCK_SIN_LEN=no
++
  fi
 -ac_res=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
 -$as_echo "$ac_res" >&6; }
-+done
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  
--fi
+ fi
 -as_val=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
+-  cat >>confdefs.h <<_ACEOF
+-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+-_ACEOF
++{ $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
 +
-+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 `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-+#define HAVE_INET_NTOP 1
- _ACEOF
++$as_echo "#define HAVE_SOCK_SIN_LEN 1" >>confdefs.h
  
-+else
-+  LIBREPLACE_NETWORK_OBJS="${LIBREPLACE_NETWORK_OBJS} inet_ntop.o"
  fi
--
- done
  
+-done
++############################################
++# 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
+ 
 -    { $as_echo "$as_me:$LINENO: checking for the Linux ptrace(2) interface" >&5
 -$as_echo_n "checking for the Linux ptrace(2) interface... " >&6; }
 -    cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
-+
-+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
+-_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_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
++	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
  
 -#if HAVE_SYS_TYPES_H
  #include <sys/types.h>
-+#if STDC_HEADERS
-+#include <stdlib.h>
-+#include <stddef.h>
- #endif
+-#endif
 -#if HAVE_SYS_PTRACE_H
 -#include <sys/ptrace.h>
 -#endif
--
++#include <stdlib.h>
++#include <stddef.h>
 +#include <sys/socket.h>
-+#include <netdb.h>
++#include <sys/un.h>
+ 
  int
  main ()
  {
@@ -47764,17 +47435,8 @@
 -		ptrace(PTRACE_ATTACH, me, 0, 0);
 -		ptrace(PTRACE_DETACH, me, 0, 0);
 -		return 0;
-+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);
-+
++struct sockaddr_un sunaddr;
++sunaddr.sun_family = AF_UNIX;
  
    ;
    return 0;
@@ -47808,59 +47470,72 @@
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_LINUX_PTRACE 1
 -_ACEOF
--
--
-+if ac_fn_c_try_link "$LINENO"; then :
-+  libreplace_cv_HAVE_GETADDRINFO=yes
++if ac_fn_c_try_compile "$LINENO"; then :
+ 
++		libreplace_cv_HAVE_UNIXSOCKET=yes
+ 
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
--
+ 
 -		{ $as_echo "$as_me:$LINENO: result: no" >&5
 -$as_echo "no" >&6; }
 -		LIBUNWIND_PTRACE=""
--
-+  libreplace_cv_HAVE_GETADDRINFO=no
++		libreplace_cv_HAVE_UNIXSOCKET=no
+ 
  fi
--
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ 
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
-+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 "$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_GETADDRINFO 1" >>confdefs.h
++$as_echo "#define HAVE_UNIXSOCKET 1" >>confdefs.h
  
++fi
  
-+$as_echo "#define HAVE_GETNAMEINFO 1" >>confdefs.h
++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
  
-+$as_echo "#define HAVE_FREEADDRINFO 1" >>confdefs.h
++if test x"$ac_cv_func_connect" = x"no"; then
  
  
-+$as_echo "#define HAVE_GAI_STRERROR 1" >>confdefs.h
++ac_check_lib_ext_save_LIBS=$LIBS
++LIBS="-lnsl_s $LIBREPLACE_NETWORK_LIBS  $LIBS"
  
--
--
+ 
+ 
 -for ac_func in _dup _dup2 _opendir _readdir _seekdir _telldir _closedir
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
 -$as_echo_n "checking for $ac_func... " >&6; }
 -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
--  $as_echo_n "(cached) " >&6
--else
++        { $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 >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
 -/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
 -   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
 -#define $ac_func innocuous_$ac_func
@@ -47877,13 +47552,13 @@
 -#endif
 -
 -#undef $ac_func
--
--/* 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
+ 
+ /* Override any GCC internal prototype to avoid an error.
+    Use char because int might match the return type of a GCC
+@@ -44178,106 +11845,65 @@
+ #ifdef __cplusplus
+ extern "C"
+ #endif
 -char $ac_func ();
 -/* The GNU C library defines this for functions which it implements
 -    to always fail with ENOSYS.  Some functions are actually named
@@ -47892,14 +47567,16 @@
 -choke me
 -#endif
 -
--int
--main ()
--{
++char connect ();
+ int
+ main ()
+ {
 -return $ac_func ();
--  ;
--  return 0;
--}
--_ACEOF
++return connect ();
+   ;
+   return 0;
+ }
+ _ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -47922,18 +47599,24 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  eval "$as_ac_var=yes"
++if ac_fn_c_try_link "$LINENO"; then :
++  ac_cv_lib_ext_nsl_s_connect=yes;
++		  ac_cv_lib_ext_nsl_s=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	eval "$as_ac_var=no"
-+	LIBREPLACE_NETWORK_OBJS="${LIBREPLACE_NETWORK_OBJS} getaddrinfo.o"
++  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
  
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
--fi
+ fi
 -ac_res=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
@@ -47941,32 +47624,38 @@
 -as_val=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+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 :
++{ $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 `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-+#define HAVE_IFADDRS_H 1
++#define HAVE_CONNECT 1
  _ACEOF
  
  fi
+-done
++LIBS=$ac_check_lib_ext_save_LIBS
 +
- done
++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
  
-+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
++fi
  
  
-+$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
++ac_check_lib_ext_save_LIBS=$LIBS
++LIBS="-lnsl $LIBREPLACE_NETWORK_LIBS  $LIBS"
  
-+fi
  
  
 -for ac_func in __dup __dup2 __opendir __readdir __seekdir __telldir __closedir
@@ -47975,9 +47664,9 @@
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
 -$as_echo_n "checking for $ac_func... " >&6; }
 -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-+{ $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 "$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 >conftest.$ac_ext <<_ACEOF
@@ -47985,7 +47674,8 @@
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
 -/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
 -   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
 -#define $ac_func innocuous_$ac_func
@@ -48000,43 +47690,29 @@
 -#else
 -# include <assert.h>
 -#endif
- 
+-
 -#undef $ac_func
-+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
+ /* Override any GCC internal prototype to avoid an error.
+    Use char because int might match the return type of a GCC
+@@ -44285,101 +11911,65 @@
+ #ifdef __cplusplus
+ extern "C"
+ #endif
 -char $ac_func ();
 -/* The GNU C library defines this for functions which it implements
 -    to always fail with ENOSYS.  Some functions are actually named
 -    something starting with __ and the normal name is an alias.  */
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
-+#include <sys/types.h>
-+#if STDC_HEADERS
-+#include <stdlib.h>
-+#include <stddef.h>
- #endif
+-#endif
 -
-+#include <sys/socket.h>
-+#include <netinet/in.h>
-+#include <arpa/inet.h>
-+#include <ifaddrs.h>
-+#include <netdb.h>
++char connect ();
  int
  main ()
  {
 -return $ac_func ();
-+
-+struct ifaddrs *ifp = NULL;
-+int ret = getifaddrs (&ifp);
-+freeifaddrs(ifp);
-+
++return connect ();
    ;
    return 0;
  }
@@ -48064,20 +47740,29 @@
 -       }; then
 -  eval "$as_ac_var=yes"
 +if ac_fn_c_try_link "$LINENO"; then :
-+  libreplace_cv_HAVE_GETIFADDRS=yes
++  ac_cv_lib_ext_nsl_connect=yes;
++		  ac_cv_lib_ext_nsl=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
++  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
+ 
 -	eval "$as_ac_var=no"
-+  libreplace_cv_HAVE_GETIFADDRS=no
  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
+ 
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
-+rm -f core conftest.err conftest.$ac_objext \
-+    conftest$ac_exeext conftest.$ac_ext
  fi
 -ac_res=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
@@ -48086,19 +47771,30 @@
 -as_val=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
--  cat >>confdefs.h <<_ACEOF
++LIBS=$ac_check_lib_ext_save_LIBS
++
++if test $ac_cv_lib_ext_nsl = yes; then :
+   cat >>confdefs.h <<_ACEOF
 -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
--_ACEOF
-+{ $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
++#define HAVE_LIBNSL 1
+ _ACEOF
  
--fi
++		case "$LIBREPLACE_NETWORK_LIBS" in
++		    *-lnsl*)
++			;;
++		    *)
++			LIBREPLACE_NETWORK_LIBS="-lnsl $LIBREPLACE_NETWORK_LIBS"
++			;;
++		esac
++
++
+ fi
 -done
-+$as_echo "#define HAVE_GETIFADDRS 1" >>confdefs.h
  
  
-+$as_echo "#define HAVE_FREEIFADDRS 1" >>confdefs.h
++ac_check_lib_ext_save_LIBS=$LIBS
++LIBS="-lsocket $LIBREPLACE_NETWORK_LIBS  $LIBS"
++
  
 -for ac_func in __getcwd _getcwd
 -do
@@ -48106,47 +47802,42 @@
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
 -$as_echo_n "checking for $ac_func... " >&6; }
 -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
--  $as_echo_n "(cached) " >&6
--else
++
++        { $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 >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
 -/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
 -   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
 -#define $ac_func innocuous_$ac_func
- 
+-
 -/* System header to define __stub macros and hopefully few prototypes,
 -    which can conflict with char $ac_func (); below.
 -    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
 -    <limits.h> exists even on freestanding compilers.  */
-+$as_echo "#define HAVE_STRUCT_IFADDRS 1" >>confdefs.h
- 
+-
 -#ifdef __STDC__
 -# include <limits.h>
 -#else
 -# include <assert.h>
 -#endif
-+fi
- 
+-
 -#undef $ac_func
-+##################
-+# 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
  
--/* 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
+ /* Override any GCC internal prototype to avoid an error.
+    Use char because int might match the return type of a GCC
+@@ -44387,102 +11977,65 @@
+ #ifdef __cplusplus
+ extern "C"
+ #endif
 -char $ac_func ();
 -/* The GNU C library defines this for functions which it implements
 -    to always fail with ENOSYS.  Some functions are actually named
@@ -48154,29 +47845,16 @@
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
 -#endif
-+if test "$cross_compiling" = yes; then :
-+  libreplace_cv_HAVE_IFACE_GETIFADDRS=cross
-+else
-+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h.  */
- 
--int
--main ()
--{
+-
++char connect ();
+ int
+ main ()
+ {
 -return $ac_func ();
--  ;
--  return 0;
--}
-+#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"
++return connect ();
+   ;
+   return 0;
+ }
  _ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
@@ -48200,21 +47878,30 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  eval "$as_ac_var=yes"
-+if ac_fn_c_try_run "$LINENO"; then :
-+  libreplace_cv_HAVE_IFACE_GETIFADDRS=yes
++if ac_fn_c_try_link "$LINENO"; then :
++  ac_cv_lib_ext_socket_connect=yes;
++		  ac_cv_lib_ext_socket=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
++  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
+ 
 -	eval "$as_ac_var=no"
-+  libreplace_cv_HAVE_IFACE_GETIFADDRS=no
  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
+ 
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
-+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-+  conftest.$ac_objext conftest.beam conftest.$ac_ext
  fi
 -ac_res=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
@@ -48223,34 +47910,41 @@
 -as_val=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
--  cat >>confdefs.h <<_ACEOF
++LIBS=$ac_check_lib_ext_save_LIBS
++
++if test $ac_cv_lib_ext_socket = yes; then :
+   cat >>confdefs.h <<_ACEOF
 -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
--_ACEOF
++#define HAVE_LIBSOCKET 1
+ _ACEOF
  
++		case "$LIBREPLACE_NETWORK_LIBS" in
++		    *-lsocket*)
++			;;
++		    *)
++			LIBREPLACE_NETWORK_LIBS="-lsocket $LIBREPLACE_NETWORK_LIBS"
++			;;
++		esac
++
++
  fi
 -done
--
-+{ $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
  
++ac_check_lib_ext_save_LIBS=$LIBS
++LIBS="-linet $LIBREPLACE_NETWORK_LIBS  $LIBS"
++
  
+ 
 -for ac_func in __xstat __fxstat __lxstat
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
 -$as_echo_n "checking for $ac_func... " >&6; }
 -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-+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 "$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 >conftest.$ac_ext <<_ACEOF
@@ -48258,7 +47952,8 @@
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
 -/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
 -   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
 -#define $ac_func innocuous_$ac_func
@@ -48276,12 +47971,12 @@
 -
 -#undef $ac_func
  
--/* 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
+ /* Override any GCC internal prototype to avoid an error.
+    Use char because int might match the return type of a GCC
+@@ -44490,105 +12043,88 @@
+ #ifdef __cplusplus
+ extern "C"
+ #endif
 -char $ac_func ();
 -/* The GNU C library defines this for functions which it implements
 -    to always fail with ENOSYS.  Some functions are actually named
@@ -48289,20 +47984,17 @@
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
 -#endif
-+if test "$cross_compiling" = yes; then :
-+  libreplace_cv_HAVE_IFACE_AIX=cross
-+else
-+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h.  */
- 
--int
--main ()
--{
+-
++char connect ();
+ int
+ main ()
+ {
 -return $ac_func ();
--  ;
--  return 0;
--}
--_ACEOF
++return connect ();
+   ;
+   return 0;
+ }
+ _ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -48325,30 +48017,19 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  eval "$as_ac_var=yes"
-+#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
++if ac_fn_c_try_link "$LINENO"; then :
++  ac_cv_lib_ext_inet_connect=yes;
++		  ac_cv_lib_ext_inet=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	eval "$as_ac_var=no"
-+  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
++  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
  
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
@@ -48361,62 +48042,43 @@
 -as_val=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
--  cat >>confdefs.h <<_ACEOF
++{ $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 `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
--_ACEOF
-+{ $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
++#define HAVE_CONNECT 1
+ _ACEOF
  
  fi
 -done
-+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
  
-+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
++		case "$LIBREPLACE_NETWORK_LIBS" in
++		    *-linet*)
++			;;
++		    *)
++			LIBREPLACE_NETWORK_LIBS="-linet $LIBREPLACE_NETWORK_LIBS"
++			;;
++		esac
  
-+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
++			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
  
-+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
++$as_echo "#define HAVE_CONNECT 1" >>confdefs.h
  
++	fi
 +fi
-+fi
  
 -for ac_func in _stat _lstat _fstat __stat __lstat __fstat
 -do
@@ -48424,23 +48086,20 @@
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
 -$as_echo_n "checking for $ac_func... " >&6; }
 -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-+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
+-  $as_echo_n "(cached) " >&6
+-else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
--_ACEOF
++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
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+
-+if test "$cross_compiling" = yes; then :
-+  libreplace_cv_HAVE_IFACE_IFREQ=cross
-+else
-+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
+-/* end confdefs.h.  */
 -/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
 -   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
 -#define $ac_func innocuous_$ac_func
@@ -48449,48 +48108,37 @@
 -    which can conflict with char $ac_func (); below.
 -    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
 -    <limits.h> exists even on freestanding compilers.  */
-+#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
++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"
  
 -#ifdef __STDC__
 -# include <limits.h>
 -#else
 -# include <assert.h>
 -#endif
-+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
  
 -#undef $ac_func
-+fi
-+fi
++
++        { $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
+ /* Override any GCC internal prototype to avoid an error.
+    Use char because int might match the return type of a GCC
+@@ -44596,107 +12132,65 @@
+ #ifdef __cplusplus
+ extern "C"
+ #endif
 -char $ac_func ();
 -/* The GNU C library defines this for functions which it implements
 -    to always fail with ENOSYS.  Some functions are actually named
@@ -48498,37 +48146,13 @@
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
 -#endif
-+{ $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>
- 
+-
++char gethostbyname ();
  int
  main ()
  {
 -return $ac_func ();
-+
-+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 gethostbyname ();
    ;
    return 0;
  }
@@ -48556,16 +48180,18 @@
 -       }; then
 -  eval "$as_ac_var=yes"
 +if ac_fn_c_try_link "$LINENO"; then :
-+
-+		libreplace_cv_HAVE_IPV6=yes
-+
++  ac_cv_lib_ext_nsl_s_gethostbyname=yes;
++		  ac_cv_lib_ext_nsl_s=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
- 
+-
 -	eval "$as_ac_var=no"
--fi
-+		libreplace_cv_HAVE_IPV6=no
++  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
  
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
@@ -48578,78 +48204,81 @@
 -as_val=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
--  cat >>confdefs.h <<_ACEOF
++{ $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 `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
--_ACEOF
-+rm -f core conftest.err conftest.$ac_objext \
-+    conftest$ac_exeext conftest.$ac_ext
++#define HAVE_GETHOSTBYNAME 1
+ _ACEOF
  
  fi
 -done
--
-+{ $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
++LIBS=$ac_check_lib_ext_save_LIBS
  
-+$as_echo "#define HAVE_IPV6 1" >>confdefs.h
++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
  
-+LIBS=$old_LIBS
-+CPPFLAGS="$libreplace_SAVE_CPPFLAGS"
  
-+LIBREPLACEOBJ="${LIBREPLACEOBJ} ${LIBREPLACE_NETWORK_OBJS}"
++ac_check_lib_ext_save_LIBS=$LIBS
++LIBS="-lnsl $LIBREPLACE_NETWORK_LIBS  $LIBS"
  
-+echo "LIBREPLACE_NETWORK_CHECKS: END"
  
  
-+CPPFLAGS="${SAVE_CPPFLAGS}"
- 
 -for ac_func in _acl __acl _facl __facl _open __open _chdir __chdir
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
 -$as_echo_n "checking for $ac_func... " >&6; }
 -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
--  $as_echo_n "(cached) " >&6
--else
++        { $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 >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
 -/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
 -   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
 -#define $ac_func innocuous_$ac_func
-+LIBREPLACE_DIR=`echo ${libreplacedir} | sed -e "s;${srcdir};;" -e "s;^/;;"`
- 
+-
 -/* System header to define __stub macros and hopefully few prototypes,
 -    which can conflict with char $ac_func (); below.
 -    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
 -    <limits.h> exists even on freestanding compilers.  */
-+LIBREPLACE_OBJS=""
-+for obj in ${LIBREPLACEOBJ}; do
-+	LIBREPLACE_OBJS="${LIBREPLACE_OBJS} ${LIBREPLACE_DIR}/${obj}"
-+done
- 
+-
 -#ifdef __STDC__
 -# include <limits.h>
 -#else
 -# include <assert.h>
 -#endif
- 
+-
 -#undef $ac_func
-+# add -ldl to the global LIBS
-+LIBS="${LIBS} ${LIBDL} ${LIBREPLACE_NETWORK_LIBS}"
-+AUTH_LIBS="${AUTH_LIBS} ${CRYPT_LIBS}"
  
--/* 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
+ /* Override any GCC internal prototype to avoid an error.
+    Use char because int might match the return type of a GCC
+@@ -44704,105 +12198,65 @@
+ #ifdef __cplusplus
+ extern "C"
+ #endif
 -char $ac_func ();
 -/* The GNU C library defines this for functions which it implements
 -    to always fail with ENOSYS.  Some functions are actually named
@@ -48657,22 +48286,16 @@
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
 -#endif
- 
--int
--main ()
--{
+-
++char gethostbyname ();
+ int
+ main ()
+ {
 -return $ac_func ();
--  ;
--  return 0;
--}
-+for ac_header in aio.h sys/fcntl.h sys/select.h fcntl.h sys/time.h sys/unistd.h rpc/nettype.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
++return gethostbyname ();
+   ;
+   return 0;
+ }
  _ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
@@ -48696,17 +48319,24 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  eval "$as_ac_var=yes"
--else
++if ac_fn_c_try_link "$LINENO"; then :
++  ac_cv_lib_ext_nsl_gethostbyname=yes;
++		  ac_cv_lib_ext_nsl=yes
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
- 
+-
 -	eval "$as_ac_var=no"
++  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
  
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
--fi
+ fi
 -ac_res=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
@@ -48714,62 +48344,58 @@
 -as_val=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+done
-+
-+for ac_header in unistd.h grp.h sys/id.h memory.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 :
++{ $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 `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
++#define HAVE_GETHOSTBYNAME 1
  _ACEOF
  
  fi
 -done
--
--
++LIBS=$ac_check_lib_ext_save_LIBS
  
-+done
- 
-+for ac_header in limits.h float.h pthread.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 :
++if test $ac_cv_lib_ext_nsl = yes; then :
 +  cat >>confdefs.h <<_ACEOF
-+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
++#define HAVE_LIBNSL 1
 +_ACEOF
++
++		case "$LIBREPLACE_NETWORK_LIBS" in
++		    *-lnsl*)
++			;;
++		    *)
++			LIBREPLACE_NETWORK_LIBS="-lnsl $LIBREPLACE_NETWORK_LIBS"
++			;;
++		esac
  
+ 
 +fi
  
-+done
  
++ac_check_lib_ext_save_LIBS=$LIBS
++LIBS="-lsocket $LIBREPLACE_NETWORK_LIBS  $LIBS"
+ 
+ 
 -for ac_func in _close __close _fchdir __fchdir _fcntl __fcntl
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
 -$as_echo_n "checking for $ac_func... " >&6; }
 -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
--  $as_echo_n "(cached) " >&6
--else
++
++        { $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 >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
-+for ac_header in rpc/rpc.h rpcsvc/nis.h rpcsvc/ypclnt.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
+-_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
 -/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
 -   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
 -#define $ac_func innocuous_$ac_func
@@ -48784,16 +48410,15 @@
 -#else
 -# include <assert.h>
 -#endif
- 
+-
 -#undef $ac_func
-+fi
  
--/* 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
+ /* Override any GCC internal prototype to avoid an error.
+    Use char because int might match the return type of a GCC
+@@ -44810,105 +12264,87 @@
+ #ifdef __cplusplus
+ extern "C"
+ #endif
 -char $ac_func ();
 -/* The GNU C library defines this for functions which it implements
 -    to always fail with ENOSYS.  Some functions are actually named
@@ -48801,23 +48426,16 @@
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
 -#endif
-+done
- 
--int
--main ()
--{
+-
++char gethostbyname ();
+ int
+ main ()
+ {
 -return $ac_func ();
--  ;
--  return 0;
--}
-+for ac_header in sys/param.h ctype.h sys/wait.h sys/resource.h sys/ioctl.h sys/ipc.h sys/prctl.h sys/sysctl.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
++return gethostbyname ();
+   ;
+   return 0;
+ }
  _ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
@@ -48841,17 +48459,24 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  eval "$as_ac_var=yes"
--else
++if ac_fn_c_try_link "$LINENO"; then :
++  ac_cv_lib_ext_socket_gethostbyname=yes;
++		  ac_cv_lib_ext_socket=yes
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
- 
+-
 -	eval "$as_ac_var=no"
++  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
  
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
--fi
+ fi
 -ac_res=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
@@ -48859,51 +48484,43 @@
 -as_val=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+done
-+
-+for ac_header in sys/mman.h sys/filio.h sys/priv.h sys/shm.h string.h strings.h stdlib.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 :
++{ $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 `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
++#define HAVE_GETHOSTBYNAME 1
  _ACEOF
  
  fi
-+
- done
+-done
++LIBS=$ac_check_lib_ext_save_LIBS
  
-+for ac_header in sys/mount.h sys/vfs.h sys/fs/s5param.h sys/filsys.h termios.h 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 :
++if test $ac_cv_lib_ext_socket = yes; then :
 +  cat >>confdefs.h <<_ACEOF
-+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
++#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
  
-+done
++$as_echo "#define HAVE_GETHOSTBYNAME 1" >>confdefs.h
  
-+for ac_header in sys/termio.h sys/statfs.h sys/dustat.h sys/statvfs.h stdarg.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
 +fi
  
-+done
- 
 -for ac_func in getdents __getdents _lseek __lseek _read __read
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
@@ -48914,12 +48531,12 @@
 -else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
-+for ac_header in sys/sysmacros.h
++for ac_func in if_nametoindex
 +do :
-+  ac_fn_c_check_header_mongrel "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default"
-+if test "x$ac_cv_header_sys_sysmacros_h" = x""yes; then :
++  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_SYS_SYSMACROS_H 1
++#define HAVE_IF_NAMETOINDEX 1
  _ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
@@ -48927,12 +48544,21 @@
 -/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
 -   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
 -#define $ac_func innocuous_$ac_func
--
+ 
 -/* System header to define __stub macros and hopefully few prototypes,
 -    which can conflict with char $ac_func (); below.
 -    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
 -    <limits.h> exists even on freestanding compilers.  */
--
++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"
++
+ 
 -#ifdef __STDC__
 -# include <limits.h>
 -#else
@@ -48940,14 +48566,20 @@
 -#endif
  
 -#undef $ac_func
-+fi
++        { $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
+ /* Override any GCC internal prototype to avoid an error.
+    Use char because int might match the return type of a GCC
+@@ -44916,2861 +12352,2216 @@
+ #ifdef __cplusplus
+ extern "C"
+ #endif
 -char $ac_func ();
 -/* The GNU C library defines this for functions which it implements
 -    to always fail with ENOSYS.  Some functions are actually named
@@ -48955,23 +48587,16 @@
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
 -#endif
-+done
- 
--int
--main ()
--{
+-
++char if_nametoindex ();
+ int
+ main ()
+ {
 -return $ac_func ();
--  ;
--  return 0;
--}
-+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
++return if_nametoindex ();
+   ;
+   return 0;
+ }
  _ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
@@ -48995,17 +48620,24 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  eval "$as_ac_var=yes"
--else
++if ac_fn_c_try_link "$LINENO"; then :
++  ac_cv_lib_ext_ipv6_if_nametoindex=yes;
++		  ac_cv_lib_ext_ipv6=yes
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
- 
+-
 -	eval "$as_ac_var=no"
++  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
  
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
--fi
+ fi
 -ac_res=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
@@ -49013,37 +48645,41 @@
 -as_val=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+done
-+
-+for ac_header in langinfo.h locale.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 :
++{ $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 `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
++#define HAVE_IF_NAMETOINDEX 1
  _ACEOF
  
  fi
 -done
--
- 
-+done
- 
-+for ac_header in xfs/libxfs.h
-+do :
-+  ac_fn_c_check_header_mongrel "$LINENO" "xfs/libxfs.h" "ac_cv_header_xfs_libxfs_h" "$ac_includes_default"
-+if test "x$ac_cv_header_xfs_libxfs_h" = x""yes; then :
++LIBS=$ac_check_lib_ext_save_LIBS
++
++if test $ac_cv_lib_ext_ipv6 = yes; then :
 +  cat >>confdefs.h <<_ACEOF
-+#define HAVE_XFS_LIBXFS_H 1
++#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
  
-+done
++$as_echo "#define HAVE_IF_NAMETOINDEX 1" >>confdefs.h
  
++	fi
++fi
+ 
 -for ac_func in getdirentries _write __write _fork __fork
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
@@ -49054,12 +48690,18 @@
 -else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
-+for ac_header in netgroup.h
++# 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_header_mongrel "$LINENO" "netgroup.h" "ac_cv_header_netgroup_h" "$ac_includes_default"
-+if test "x$ac_cv_header_netgroup_h" = x""yes; then :
++  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_NETGROUP_H 1
++#define HAVE_SOCKETPAIR 1
  _ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
@@ -49072,16 +48714,23 @@
 -    which can conflict with char $ac_func (); below.
 -    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
 -    <limits.h> exists even on freestanding compilers.  */
++else
++  LIBREPLACE_NETWORK_OBJS="${LIBREPLACE_NETWORK_OBJS} socketpair.o"
 +fi
++done
  
 -#ifdef __STDC__
 -# include <limits.h>
 -#else
 -# include <assert.h>
 -#endif
-+done
  
 -#undef $ac_func
++{ $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
  
 -/* Override any GCC internal prototype to avoid an error.
 -   Use char because int might match the return type of a GCC
@@ -49095,12 +48744,12 @@
 -    something starting with __ and the normal name is an alias.  */
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
-+for ac_header in rpcsvc/yp_prot.h
-+do :
-+  ac_fn_c_check_header_compile "$LINENO" "rpcsvc/yp_prot.h" "ac_cv_header_rpcsvc_yp_prot_h" "
-+#if HAVE_RPC_RPC_H
-+#include <rpc/rpc.h>
- #endif
+-#endif
++if test "$cross_compiling" = yes; then :
++  libreplace_cv_REPLACE_INET_NTOA=cross
++else
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
  
 -int
 -main ()
@@ -49109,10 +48758,17 @@
 -  ;
 -  return 0;
 -}
-+"
-+if test "x$ac_cv_header_rpcsvc_yp_prot_h" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define HAVE_RPCSVC_YP_PROT_H 1
++#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
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
@@ -49136,17 +48792,23 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  eval "$as_ac_var=yes"
--else
++if ac_fn_c_try_run "$LINENO"; then :
++  libreplace_cv_REPLACE_INET_NTOA=yes
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
- 
+-
 -	eval "$as_ac_var=no"
++  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
  
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
--fi
+ fi
 -ac_res=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
@@ -49154,50 +48816,52 @@
 -as_val=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+done
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libreplace_cv_REPLACE_INET_NTOA" >&5
++$as_echo "$libreplace_cv_REPLACE_INET_NTOA" >&6; }
 +
-+
-+## These fail to compile on IRIX so just check for their presence
-+for ac_header in sys/mode.h
++for ac_func in inet_ntoa
 +do :
-+  ac_fn_c_check_header_mongrel "$LINENO" "sys/mode.h" "ac_cv_header_sys_mode_h" "$ac_includes_default"
-+if test "x$ac_cv_header_sys_mode_h" = x""yes; then :
++  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 `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-+#define HAVE_SYS_MODE_H 1
++#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
  
-+# Look for Darwin headers
-+old_CPPFLAGS="$CPPFLAGS"
-+CPPFLAGS="-Iinclude $CPPFLAGS"
-+for ac_header in CoreFoundation/CFStringEncodingConverter.h
++    LIBREPLACE_NETWORK_OBJS="${LIBREPLACE_NETWORK_OBJS} inet_ntoa.o"
++fi
+ 
++for ac_func in inet_aton
 +do :
-+  ac_fn_c_check_header_mongrel "$LINENO" "CoreFoundation/CFStringEncodingConverter.h" "ac_cv_header_CoreFoundation_CFStringEncodingConverter_h" "$ac_includes_default"
-+if test "x$ac_cv_header_CoreFoundation_CFStringEncodingConverter_h" = x""yes; then :
++  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_COREFOUNDATION_CFSTRINGENCODINGCONVERTER_H 1
++#define HAVE_INET_ATON 1
 +_ACEOF
  
 +else
-+  for ac_header in CFStringEncodingConverter.h
++  LIBREPLACE_NETWORK_OBJS="${LIBREPLACE_NETWORK_OBJS} inet_aton.o"
++fi
++done
+ 
+ 
++for ac_func in inet_ntop
 +do :
-+  ac_fn_c_check_header_mongrel "$LINENO" "CFStringEncodingConverter.h" "ac_cv_header_CFStringEncodingConverter_h" "$ac_includes_default"
-+if test "x$ac_cv_header_CFStringEncodingConverter_h" = x""yes; then :
++  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_CFSTRINGENCODINGCONVERTER_H 1
++#define HAVE_INET_NTOP 1
 +_ACEOF
  
-+fi
- 
-+done
- 
-+fi
- 
 -for ac_func in _stat64 __stat64 _fstat64 __fstat64 _lstat64 __lstat64
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
@@ -49205,43 +48869,49 @@
 -$as_echo_n "checking for $ac_func... " >&6; }
 -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
 -  $as_echo_n "(cached) " >&6
--else
+ else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
--_ACEOF
++  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
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
 -/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
 -   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
 -#define $ac_func innocuous_$ac_func
-+done
  
 -/* System header to define __stub macros and hopefully few prototypes,
 -    which can conflict with char $ac_func (); below.
 -    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
 -    <limits.h> exists even on freestanding compilers.  */
-+CPPFLAGS="$old_CPPFLAGS"
++else
++  LIBREPLACE_NETWORK_OBJS="${LIBREPLACE_NETWORK_OBJS} inet_pton.o"
++fi
++done
  
 -#ifdef __STDC__
 -# include <limits.h>
 -#else
 -# include <assert.h>
 -#endif
-+# In valgrind 1.0.x, it's just valgrind.h.  In 1.9.x+ there's a
-+# subdirectory of headers.
-+for ac_header in valgrind.h valgrind/valgrind.h valgrind/memcheck.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
  
 -#undef $ac_func
-+fi
++{ $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
  
 -/* Override any GCC internal prototype to avoid an error.
 -   Use char because int might match the return type of a GCC
@@ -49256,23 +48926,33 @@
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
 -#endif
-+done
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
  
-+
-+#
-+# HPUX has a bug in that including shadow.h causes a re-definition of MAXINT.
-+# This causes configure to fail to detect it. Check for shadow separately on HPUX.
-+#
-+case "$host_os" in
-+    *hpux*)
-+		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h.  */
-+#include <shadow.h>
++#include <sys/types.h>
++#if STDC_HEADERS
++#include <stdlib.h>
++#include <stddef.h>
++#endif
++#include <sys/socket.h>
++#include <netdb.h>
  int
  main ()
  {
 -return $ac_func ();
-+struct spwd testme
++
++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;
  }
@@ -49299,34 +48979,38 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  eval "$as_ac_var=yes"
-+if ac_fn_c_try_compile "$LINENO"; then :
-+  ac_cv_header_shadow_h=yes
++if ac_fn_c_try_link "$LINENO"; then :
++  libreplace_cv_HAVE_GETADDRINFO=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	eval "$as_ac_var=no"
-+  ac_cv_header_shadow_h=no
++  libreplace_cv_HAVE_GETADDRINFO=no
++fi
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
  fi
-+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-+		if test x"$ac_cv_header_shadow_h" = x"yes"; then
++{ $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_SHADOW_H 1" >>confdefs.h
++$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
 +
-+		fi
-+	;;
-+esac
-+for ac_header in shadow.h
-+do :
-+  ac_fn_c_check_header_mongrel "$LINENO" "shadow.h" "ac_cv_header_shadow_h" "$ac_includes_default"
-+if test "x$ac_cv_header_shadow_h" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define HAVE_SHADOW_H 1
-+_ACEOF
  
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
++$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
 -ac_res=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
@@ -49336,51 +49020,33 @@
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
 +
-+done
-+
-+for ac_header in nss.h nss_common.h nsswitch.h ns_api.h sys/security.h
++for ac_header in ifaddrs.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 :
++  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 `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
++#define HAVE_IFADDRS_H 1
  _ACEOF
  
  fi
 +
  done
  
-+for ac_header in syscall.h sys/syscall.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
++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 :
  
-+done
++cat >>confdefs.h <<_ACEOF
++#define HAVE_STRUCT_SOCKADDR_SA_LEN 1
++_ACEOF
  
  
-+for ac_header in sys/attributes.h attr/xattr.h sys/xattr.h sys/extattr.h sys/uio.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
++$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
  
 +fi
  
-+done
  
 -for ac_func in __sys_llseek llseek _llseek __llseek readdir64 _readdir64 __readdir64
 -do
@@ -49388,19 +49054,14 @@
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
 -$as_echo_n "checking for $ac_func... " >&6; }
 -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
--  $as_echo_n "(cached) " >&6
--else
++{ $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 >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
-+for ac_header in sys/ea.h sys/proplist.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
+-_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
@@ -49412,16 +49073,16 @@
 -    which can conflict with char $ac_func (); 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
-+fi
  
 -#undef $ac_func
-+done
++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
@@ -49435,23 +49096,29 @@
 -    something starting with __ and the normal name is an alias.  */
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
--#endif
- 
--int
--main ()
--{
++#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 ()
+ {
 -return $ac_func ();
--  ;
--  return 0;
--}
-+for ac_header in sys/cdefs.h glob.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
++
++struct ifaddrs *ifp = NULL;
++int ret = getifaddrs (&ifp);
++freeifaddrs(ifp);
++
+   ;
+   return 0;
+ }
  _ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
@@ -49475,17 +49142,20 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  eval "$as_ac_var=yes"
--else
++if ac_fn_c_try_link "$LINENO"; then :
++  libreplace_cv_HAVE_GETIFADDRS=yes
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
- 
+-
 -	eval "$as_ac_var=no"
- fi
- 
+-fi
+-
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
--fi
++  libreplace_cv_HAVE_GETIFADDRS=no
+ fi
 -ac_res=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
@@ -49493,54 +49163,27 @@
 -as_val=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+done
-+
-+
-+# For experimental utmp support (lastlog on some BSD-like systems)
-+for ac_header in utmp.h utmpx.h lastlog.h
-+do :
-+  as_ac_Header=`$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
+-  cat >>confdefs.h <<_ACEOF
 -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
- _ACEOF
- 
+-_ACEOF
+-
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
  fi
-+
- done
+-done
++{ $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
  
-+# 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
++$as_echo "#define HAVE_FREEIFADDRS 1" >>confdefs.h
  
-+fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
-+$as_echo "$ac_cv_sizeof_int" >&6; }
  
++$as_echo "#define HAVE_STRUCT_IFADDRS 1" >>confdefs.h
  
++fi
  
 -for ac_func in pread _pread __pread pread64 _pread64 __pread64
 -do
@@ -49548,18 +49191,12 @@
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
 -$as_echo_n "checking for $ac_func... " >&6; }
 -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-+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 long" >&5
-+$as_echo_n "checking size of long... " >&6; }
-+if test "${ac_cv_sizeof_long+set}" = set; then :
++##################
++# 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
 -  cat >conftest.$ac_ext <<_ACEOF
@@ -49567,27 +49204,39 @@
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
++
++if test "$cross_compiling" = yes; then :
++  libreplace_cv_HAVE_IFACE_GETIFADDRS=cross
++else
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
 -/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
 -   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
 -#define $ac_func innocuous_$ac_func
-+  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long"        "$ac_includes_default"; then :
  
 -/* System header to define __stub macros and hopefully few prototypes,
 -    which can conflict with char $ac_func (); below.
 -    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
 -    <limits.h> exists even on freestanding compilers.  */
++#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
-+  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
++  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
  
 -#ifdef __STDC__
 -# include <limits.h>
@@ -49595,10 +49244,16 @@
 -# include <assert.h>
 -#endif
 +fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
-+$as_echo "$ac_cv_sizeof_long" >&6; }
++{ $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
  
 -#undef $ac_func
++else
++	LIBREPLACE_NETWORK_OBJS="${LIBREPLACE_NETWORK_OBJS} getifaddrs.o"
++fi
  
 -/* Override any GCC internal prototype to avoid an error.
 -   Use char because int might match the return type of a GCC
@@ -49621,8 +49276,30 @@
 -  ;
 -  return 0;
 -}
-+cat >>confdefs.h <<_ACEOF
-+#define SIZEOF_LONG $ac_cv_sizeof_long
++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
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
@@ -49646,33 +49323,24 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  eval "$as_ac_var=yes"
-+
-+
-+# 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
++if ac_fn_c_try_run "$LINENO"; then :
++  libreplace_cv_HAVE_IFACE_AIX=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long"        "$ac_includes_default"; then :
++  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
  
 -	eval "$as_ac_var=no"
-+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
++{ $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
  
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
@@ -49687,51 +49355,95 @@
 -   if test "x$as_val" = x""yes; then
 -  cat >>confdefs.h <<_ACEOF
 -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
-+$as_echo "$ac_cv_sizeof_long_long" >&6; }
++fi
 +
 +
-+
-+cat >>confdefs.h <<_ACEOF
-+#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_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 short" >&5
-+$as_echo_n "checking size of short... " >&6; }
-+if test "${ac_cv_sizeof_short+set}" = set; then :
++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 ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short"        "$ac_includes_default"; then :
 +
++if test "$cross_compiling" = yes; then :
++  libreplace_cv_HAVE_IFACE_IFCONF=cross
 +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
++  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
 -done
++{ $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
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
-+$as_echo "$ac_cv_sizeof_short" >&6; }
++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.  */
  
-+cat >>confdefs.h <<_ACEOF
-+#define SIZEOF_SHORT $ac_cv_sizeof_short
++#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
  
 -for ac_func in pwrite _pwrite __pwrite pwrite64 _pwrite64 __pwrite64
 -do
@@ -49739,9 +49451,9 @@
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
 -$as_echo_n "checking for $ac_func... " >&6; }
 -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
-+$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
-+if test "${ac_cv_c_const+set}" = set; then :
++{ $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 >conftest.$ac_ext <<_ACEOF
@@ -49749,25 +49461,34 @@
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
+-/* end confdefs.h.  */
 -/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
 -   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
 -#define $ac_func innocuous_$ac_func
--
+ 
 -/* System header to define __stub macros and hopefully few prototypes,
 -    which can conflict with char $ac_func (); below.
 -    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
 -    <limits.h> exists even on freestanding compilers.  */
--
++	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
+ 
 -#ifdef __STDC__
 -# include <limits.h>
 -#else
 -# include <assert.h>
 -#endif
--
++#include <stdlib.h> /* for NULL */
++#include <sys/socket.h>
++#include <sys/types.h>
++#include <netdb.h>
++#include <netinet/in.h>
+ 
 -#undef $ac_func
--
++int
++main ()
++{
+ 
 -/* 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.  */
@@ -49781,61 +49502,21 @@
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
 -#endif
++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);
  
- int
- main ()
- {
+-int
+-main ()
+-{
 -return $ac_func ();
-+/* FIXME: Include the comments suggested by Paul. */
-+#ifndef __cplusplus
-+  /* Ultrix mips cc rejects this.  */
-+  typedef int charset[2];
-+  const charset cs;
-+  /* SunOS 4.1.1 cc rejects this.  */
-+  char const *const *pcpcc;
-+  char **ppc;
-+  /* NEC SVR4.0.2 mips cc rejects this.  */
-+  struct point {int x, y;};
-+  static struct point const zero = {0,0};
-+  /* AIX XL C 1.02.0.0 rejects this.
-+     It does not let you subtract one const X* pointer from another in
-+     an arm of an if-expression whose if-part is not a constant
-+     expression */
-+  const char *g = "string";
-+  pcpcc = &g + (g ? g-g : 0);
-+  /* HPUX 7.0 cc rejects these. */
-+  ++pcpcc;
-+  ppc = (char**) pcpcc;
-+  pcpcc = (char const *const *) ppc;
-+  { /* SCO 3.2v4 cc rejects this.  */
-+    char *t;
-+    char const *s = 0 ? (char *) 0 : (char const *) 0;
-+
-+    *t++ = 0;
-+    if (s) return 0;
-+  }
-+  { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
-+    int x[] = {25, 17};
-+    const int *foo = &x[0];
-+    ++foo;
-+  }
-+  { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
-+    typedef const int *iptr;
-+    iptr p = 0;
-+    ++p;
-+  }
-+  { /* AIX XL C 1.02.0.0 rejects this saying
-+       "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
-+    struct s { int j; const int *ap[3]; };
-+    struct s *b; b->j = 5;
-+  }
-+  { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
-+    const int foo = 10;
-+    if (!foo) return 0;
-+  }
-+  return !cs[0] && !zero.x;
-+#endif
-+
    ;
    return 0;
  }
@@ -49862,20 +49543,24 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  eval "$as_ac_var=yes"
-+if ac_fn_c_try_compile "$LINENO"; then :
-+  ac_cv_c_const=yes
++if ac_fn_c_try_link "$LINENO"; then :
++
++		libreplace_cv_HAVE_IPV6=yes
++
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
+ 
 -	eval "$as_ac_var=no"
-+  ac_cv_c_const=no
++		libreplace_cv_HAVE_IPV6=no
++
  fi
--
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
+ 
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
-+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  fi
 -ac_res=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
@@ -49887,56 +49572,22 @@
 -  cat >>confdefs.h <<_ACEOF
 -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 -_ACEOF
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
-+$as_echo "$ac_cv_c_const" >&6; }
-+if test $ac_cv_c_const = no; then
++{ $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 const /**/" >>confdefs.h
++$as_echo "#define HAVE_IPV6 1" >>confdefs.h
  
  fi
 -done
  
-+{ $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
++LIBS=$old_LIBS
++CPPFLAGS="$libreplace_SAVE_CPPFLAGS"
  
-+_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
++LIBREPLACEOBJ="${LIBREPLACEOBJ} ${LIBREPLACE_NETWORK_OBJS}"
  
-+fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
-+$as_echo "$ac_cv_c_inline" >&6; }
++echo "LIBREPLACE_NETWORK_CHECKS: END"
  
-+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
  
 -for ac_func in open64 _open64 __open64 creat64
 -do
@@ -49944,79 +49595,36 @@
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
 -$as_echo_n "checking for $ac_func... " >&6; }
 -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-+ { $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
+-  $as_echo_n "(cached) " >&6
+-else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+  ac_cv_c_bigendian=unknown
-+    # See if we're dealing with a universal compiler.
-+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
+-/* end confdefs.h.  */
 -/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
 -   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
 -#define $ac_func innocuous_$ac_func
-+#ifndef __APPLE_CC__
-+	       not a universal capable compiler
-+	     #endif
-+	     typedef int dummy;
++CPPFLAGS="${SAVE_CPPFLAGS}"
  
 -/* System header to define __stub macros and hopefully few prototypes,
 -    which can conflict with char $ac_func (); below.
 -    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
 -    <limits.h> exists even on freestanding compilers.  */
-+_ACEOF
-+if ac_fn_c_try_compile "$LINENO"; then :
++LIBREPLACE_DIR=`echo ${libreplacedir} | sed -e "s;${srcdir};;" -e "s;^/;;"`
  
 -#ifdef __STDC__
 -# include <limits.h>
 -#else
 -# include <assert.h>
 -#endif
-+	# 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>
++LIBREPLACE_OBJS=""
++for obj in ${LIBREPLACEOBJ}; do
++	LIBREPLACE_OBJS="${LIBREPLACE_OBJS} ${LIBREPLACE_DIR}/${obj}"
++done
  
 -#undef $ac_func
-+int
-+main ()
-+{
-+#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
-+		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
-+		     && LITTLE_ENDIAN)
-+	      bogus endian macros
-+	     #endif
  
 -/* Override any GCC internal prototype to avoid an error.
 -   Use char because int might match the return type of a GCC
@@ -50031,28 +49639,26 @@
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
 -#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>
++# add -ldl to the global LIBS
++LIBS="${LIBS} ${LIBDL} ${LIBREPLACE_NETWORK_LIBS}"
++AUTH_LIBS="${AUTH_LIBS} ${CRYPT_LIBS}"
  
- int
- main ()
- {
+-int
+-main ()
+-{
 -return $ac_func ();
-+#if BYTE_ORDER != BIG_ENDIAN
-+		 not big endian
-+		#endif
+-  ;
+-  return 0;
+-}
 +
-   ;
-   return 0;
- }
++for ac_header in aio.h sys/fcntl.h sys/select.h fcntl.h sys/time.h sys/unistd.h rpc/nettype.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
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
@@ -50076,20 +49682,17 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  eval "$as_ac_var=yes"
-+if ac_fn_c_try_compile "$LINENO"; then :
-+  ac_cv_c_bigendian=yes
- else
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
+ 
 -	eval "$as_ac_var=no"
--fi
--
+ fi
+ 
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
-+  ac_cv_c_bigendian=no
- fi
+-fi
 -ac_res=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
@@ -50097,27 +49700,23 @@
 -as_val=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
--  cat >>confdefs.h <<_ACEOF
++done
++
++for ac_header in unistd.h grp.h sys/id.h memory.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_func" | $as_tr_cpp` 1
--_ACEOF
--
-+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+ _ACEOF
+ 
  fi
 -done
-+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
++done
  
 -for ac_func in prctl
 -do
@@ -50129,33 +49728,48 @@
 -else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
-+  ;
-+  return 0;
-+}
++for ac_header in limits.h float.h pthread.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
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_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.  */
+-/* end confdefs.h.  */
 -/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
 -   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
 -#define $ac_func innocuous_$ac_func
--
+ 
 -/* System header to define __stub macros and hopefully few prototypes,
 -    which can conflict with char $ac_func (); below.
 -    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
 -    <limits.h> exists even on freestanding compilers.  */
--
++fi
+ 
 -#ifdef __STDC__
 -# include <limits.h>
 -#else
 -# include <assert.h>
 -#endif
--
++done
++
++for ac_header in rpc/rpc.h rpcsvc/nis.h rpcsvc/ypclnt.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
+ 
 -#undef $ac_func
--
++fi
+ 
 -/* 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.  */
@@ -50169,19 +49783,23 @@
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
 -#endif
-+#include <limits.h>
++done
  
- int
- main ()
- {
+-int
+-main ()
+-{
 -return $ac_func ();
-+#ifndef _BIG_ENDIAN
-+		 not big endian
-+		#endif
-+
-   ;
-   return 0;
- }
+-  ;
+-  return 0;
+-}
++for ac_header in sys/param.h ctype.h sys/wait.h sys/resource.h sys/ioctl.h sys/ipc.h sys/prctl.h sys/sysctl.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
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
@@ -50205,20 +49823,17 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  eval "$as_ac_var=yes"
-+if ac_fn_c_try_compile "$LINENO"; then :
-+  ac_cv_c_bigendian=yes
- else
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
+ 
 -	eval "$as_ac_var=no"
--fi
--
+ fi
+ 
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
-+  ac_cv_c_bigendian=no
- fi
+-fi
 -ac_res=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
@@ -50226,56 +49841,61 @@
 -as_val=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
--  cat >>confdefs.h <<_ACEOF
++done
++
++for ac_header in sys/mman.h sys/filio.h sys/priv.h sys/shm.h string.h strings.h stdlib.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_func" | $as_tr_cpp` 1
--_ACEOF
--
-+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+ _ACEOF
+ 
  fi
 -done
--
--
+ 
++done
+ 
 -cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
--_ACEOF
++for ac_header in sys/mount.h sys/vfs.h sys/fs/s5param.h sys/filsys.h termios.h 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
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+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.  */
--
+-/* end confdefs.h.  */
+ 
 -#ifdef HAVE_SYS_PRCTL_H
 -#include <sys/prctl.h>
 -#endif
-+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;
++fi
  
- int
- main ()
- {
+-int
+-main ()
+-{
 -int i; i = prtcl(0);
-+return use_ascii (foo) == use_ebcdic (foo);
-   ;
-   return 0;
- }
+-  ;
+-  return 0;
+-}
++done
++
++for ac_header in sys/termio.h sys/statfs.h sys/dustat.h sys/statvfs.h stdarg.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
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
@@ -50295,32 +49915,43 @@
 -	 test -z "$ac_c_werror_flag" ||
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
--
+ 
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_PRCTL 1
--_ACEOF
--
++fi
++
++done
++
++for ac_header in sys/sysmacros.h
++do :
++  ac_fn_c_check_header_mongrel "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default"
++if test "x$ac_cv_header_sys_sysmacros_h" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_SYS_SYSMACROS_H 1
+ _ACEOF
+ 
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
--
-+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
+ 
++done
++
++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
--
- rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
--
+ 
+-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++done
+ 
 -#
 -#
 -#
@@ -50335,18 +49966,21 @@
 -$as_echo "$as_me: error: cannot run test program while cross compiling
 -See \`config.log' for more details." >&2;}
 -   { (exit 1); exit 1; }; }; }
- else
+-else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
--_ACEOF
++for ac_header in langinfo.h locale.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
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
-+$ac_includes_default
-+int
-+main ()
-+{
+-/* end confdefs.h.  */
  
 -#include <unistd.h>
 -#include <sys/utsname.h>
@@ -50355,14 +49989,7 @@
 -#if defined(__GLIBC__) && defined(__GLIBC_MINOR__)
 -       int libc_major = __GLIBC__;
 -       int libc_minor = __GLIBC_MINOR__;
-+	     /* 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;
++fi
  
 -       if (libc_major < 2)
 -              exit(1);
@@ -50370,10 +49997,15 @@
 -              exit(1);
 -#endif
 -       exit(0);
-+  ;
-+  return 0;
- }
--
+-}
++done
+ 
++for ac_header in xfs/libxfs.h
++do :
++  ac_fn_c_check_header_mongrel "$LINENO" "xfs/libxfs.h" "ac_cv_header_xfs_libxfs_h" "$ac_includes_default"
++if test "x$ac_cv_header_xfs_libxfs_h" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_XFS_LIBXFS_H 1
  _ACEOF
 -rm -f conftest$ac_exeext
 -if { (ac_try="$ac_link"
@@ -50398,50 +50030,52 @@
 -  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
 -  (exit $ac_status); }; }; then
 -  linux_getgrouplist_ok=yes
-+if ac_fn_c_try_run "$LINENO"; then :
-+  ac_cv_c_bigendian=no
- else
+-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
--
+ 
 -( exit $ac_status )
 -linux_getgrouplist_ok=no
-+  ac_cv_c_bigendian=yes
  fi
 -rm -rf conftest.dSYM
 -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-+  conftest.$ac_objext conftest.beam conftest.$ac_ext
++
++done
++
++for ac_header in netgroup.h
++do :
++  ac_fn_c_check_header_mongrel "$LINENO" "netgroup.h" "ac_cv_header_netgroup_h" "$ac_includes_default"
++if test "x$ac_cv_header_netgroup_h" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_NETGROUP_H 1
++_ACEOF
++
  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)
++done
  
 -       if test x"$linux_getgrouplist_ok" = x"yes"; then
--
+ 
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_GETGROUPLIST 1
--_ACEOF
-+$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
++for ac_header in rpcsvc/yp_prot.h
++do :
++  ac_fn_c_check_header_compile "$LINENO" "rpcsvc/yp_prot.h" "ac_cv_header_rpcsvc_yp_prot_h" "
++#if HAVE_RPC_RPC_H
++#include <rpc/rpc.h>
++#endif
++
++"
++if test "x$ac_cv_header_rpcsvc_yp_prot_h" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_RPCSVC_YP_PROT_H 1
+ _ACEOF
  
 -       fi
 -       ;;
 -    *)
-+     ;; #(
-+   *)
-+     as_fn_error "unknown endianness
-+ presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
-+ esac
++fi
  
 -for ac_func in getgrouplist
 -do
@@ -50449,35 +50083,41 @@
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
 -$as_echo_n "checking for $ac_func... " >&6; }
 -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
-+$as_echo_n "checking whether char is unsigned... " >&6; }
-+if test "${ac_cv_c_char_unsigned+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
+-  $as_echo_n "(cached) " >&6
+-else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
+-/* end confdefs.h.  */
 -/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
 -   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
 -#define $ac_func innocuous_$ac_func
--
++done
+ 
 -/* System header to define __stub macros and hopefully few prototypes,
 -    which can conflict with char $ac_func (); 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
--
++## These fail to compile on IRIX so just check for their presence
++for ac_header in sys/mode.h
++do :
++  ac_fn_c_check_header_mongrel "$LINENO" "sys/mode.h" "ac_cv_header_sys_mode_h" "$ac_includes_default"
++if test "x$ac_cv_header_sys_mode_h" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_SYS_MODE_H 1
++_ACEOF
+ 
 -#undef $ac_func
--
++fi
+ 
 -/* 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.  */
@@ -50491,18 +50131,25 @@
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
 -#endif
--
-+$ac_includes_default
- int
- main ()
- {
++done
+ 
+-int
+-main ()
+-{
 -return $ac_func ();
-+static int test_array [1 - 2 * !(((char) -1) < 0)];
-+test_array [0] = 0
+-  ;
+-  return 0;
+-}
 +
-   ;
-   return 0;
- }
++# Look for Darwin headers
++old_CPPFLAGS="$CPPFLAGS"
++CPPFLAGS="-Iinclude $CPPFLAGS"
++for ac_header in CoreFoundation/CFStringEncodingConverter.h
++do :
++  ac_fn_c_check_header_mongrel "$LINENO" "CoreFoundation/CFStringEncodingConverter.h" "ac_cv_header_CoreFoundation_CFStringEncodingConverter_h" "$ac_includes_default"
++if test "x$ac_cv_header_CoreFoundation_CFStringEncodingConverter_h" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_COREFOUNDATION_CFSTRINGENCODINGCONVERTER_H 1
  _ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
@@ -50526,20 +50173,26 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  eval "$as_ac_var=yes"
-+if ac_fn_c_try_compile "$LINENO"; then :
-+  ac_cv_c_char_unsigned=no
++
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
++  for ac_header in CFStringEncodingConverter.h
++do :
++  ac_fn_c_check_header_mongrel "$LINENO" "CFStringEncodingConverter.h" "ac_cv_header_CFStringEncodingConverter_h" "$ac_includes_default"
++if test "x$ac_cv_header_CFStringEncodingConverter_h" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_CFSTRINGENCODINGCONVERTER_H 1
++_ACEOF
+ 
 -	eval "$as_ac_var=no"
-+  ac_cv_c_char_unsigned=yes
  fi
--
+ 
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
-+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++done
++
  fi
 -ac_res=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
@@ -50548,24 +50201,37 @@
 -as_val=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
--  cat >>confdefs.h <<_ACEOF
++
++done
++
++CPPFLAGS="$old_CPPFLAGS"
++
++# In valgrind 1.0.x, it's just valgrind.h.  In 1.9.x+ there's a
++# subdirectory of headers.
++for ac_header in valgrind.h valgrind/valgrind.h valgrind/memcheck.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_func" | $as_tr_cpp` 1
--_ACEOF
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
-+$as_echo "$ac_cv_c_char_unsigned" >&6; }
-+if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
-+  $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
++#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+ _ACEOF
  
  fi
--done
++
+ done
  
 -       ;;
 -esac
+ 
+ #
+-# stat64 family may need <sys/stat.h> on some systems, notably ReliantUNIX
++# HPUX has a bug in that including shadow.h causes a re-definition of MAXINT.
++# This causes configure to fail to detect it. Check for shadow separately on HPUX.
+ #
 -
--#
--# stat64 family may need <sys/stat.h> on some systems, notably ReliantUNIX
--#
- 
 -if test x$ac_cv_func_stat64 = xno ; then
 -  { $as_echo "$as_me:$LINENO: checking for stat64 in <sys/stat.h>" >&5
 -$as_echo_n "checking for stat64 in <sys/stat.h>... " >&6; }
@@ -50574,26 +50240,22 @@
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+{ $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
++case "$host_os" in
++    *hpux*)
++		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
 -
 -#if defined(HAVE_UNISTD_H)
 -#include <unistd.h>
 -#endif
 -#include <sys/stat.h>
-+#include <sys/types.h>
-+#include <signal.h>
- 
+-
++#include <shadow.h>
  int
  main ()
  {
 -struct stat64 st64; exit(stat64(".",&st64));
-+return *(signal (0, 0)) (0) == 1;
++struct spwd testme
    ;
    return 0;
  }
@@ -50621,22 +50283,29 @@
 -       }; then
 -  ac_cv_func_stat64=yes
 +if ac_fn_c_try_compile "$LINENO"; then :
-+  ac_cv_type_signal=int
++  ac_cv_header_shadow_h=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+  ac_cv_type_signal=void
++  ac_cv_header_shadow_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_type_signal" >&5
-+$as_echo "$ac_cv_type_signal" >&6; }
++		if test x"$ac_cv_header_shadow_h" = x"yes"; then
++
++$as_echo "#define HAVE_SHADOW_H 1" >>confdefs.h
  
-+cat >>confdefs.h <<_ACEOF
-+#define RETSIGTYPE $ac_cv_type_signal
++		fi
++	;;
++esac
++for ac_header in shadow.h
++do :
++  ac_fn_c_check_header_mongrel "$LINENO" "shadow.h" "ac_cv_header_shadow_h" "$ac_includes_default"
++if test "x$ac_cv_header_shadow_h" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_SHADOW_H 1
 +_ACEOF
  
--fi
+ fi
  
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
@@ -50644,47 +50313,48 @@
 -  { $as_echo "$as_me:$LINENO: result: $ac_cv_func_stat64" >&5
 -$as_echo "$ac_cv_func_stat64" >&6; }
 -  if test x$ac_cv_func_stat64 = xyes ; then
-+{ $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>
++done
  
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_STAT64 1
++for ac_header in nss.h nss_common.h nsswitch.h ns_api.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
-+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
  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
  
 -if test x$ac_cv_func_lstat64 = xno ; then
 -  { $as_echo "$as_me:$LINENO: checking for lstat64 in <sys/stat.h>" >&5
 -$as_echo_n "checking for lstat64 in <sys/stat.h>... " >&6; }
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
--_ACEOF
++done
++
++for ac_header in syscall.h sys/syscall.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
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
-+$as_echo "#define uid_t int" >>confdefs.h
  
 -#if defined(HAVE_UNISTD_H)
 -#include <unistd.h>
 -#endif
 -#include <sys/stat.h>
++fi
  
 -int
 -main ()
@@ -50716,21 +50386,22 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  ac_cv_func_lstat64=yes
-+$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
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
++done
  
-+cat >>confdefs.h <<_ACEOF
-+#define mode_t int
+ 
++for ac_header in sys/attributes.h attr/xattr.h sys/xattr.h sys/extattr.h sys/uio.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
  
 -rm -rf conftest.dSYM
@@ -50741,13 +50412,16 @@
 -  if test x$ac_cv_func_lstat64 = xyes ; then
 -    cat >>confdefs.h <<\_ACEOF
 -#define HAVE_LSTAT64 Whether lstat64() is available
-+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 :
++done
 +
-+else
-+
-+cat >>confdefs.h <<_ACEOF
-+#define off_t long int
++for ac_header in sys/ea.h sys/proplist.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
@@ -50758,18 +50432,27 @@
 -$as_echo_n "checking for fstat64 in <sys/stat.h>... " >&6; }
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
--_ACEOF
++done
++
++
++for ac_header in sys/cdefs.h glob.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
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
-+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 :
  
 -#if defined(HAVE_UNISTD_H)
 -#include <unistd.h>
 -#endif
 -#include <sys/stat.h>
-+else
++fi
  
 -int
 -main ()
@@ -50778,8 +50461,18 @@
 -  ;
 -  return 0;
 -}
-+cat >>confdefs.h <<_ACEOF
-+#define size_t unsigned int
++done
++
++
++# For experimental utmp support (lastlog on some BSD-like systems)
++for ac_header in utmp.h utmpx.h lastlog.h
++do :
++  as_ac_Header=`$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
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
@@ -50806,18 +50499,37 @@
 +
 +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 :
++done
 +
++
++# 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
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
++  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int"        "$ac_includes_default"; then :
  
-+cat >>confdefs.h <<_ACEOF
-+#define pid_t int
-+_ACEOF
++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; }
  
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
@@ -50825,20 +50537,16 @@
 -  { $as_echo "$as_me:$LINENO: result: $ac_cv_func_fstat64" >&5
 -$as_echo "$ac_cv_func_fstat64" >&6; }
 -  if test x$ac_cv_func_fstat64 = xyes ; then
-+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_FSTAT64 1
-+cat >>confdefs.h <<_ACEOF
-+#define HAVE_STRUCT_STAT_ST_RDEV 1
- _ACEOF
+-_ACEOF
  
 -  fi
-+
-+$as_echo "#define HAVE_ST_RDEV 1" >>confdefs.h
-+
- fi
+-fi
++cat >>confdefs.h <<_ACEOF
++#define SIZEOF_INT $ac_cv_sizeof_int
++_ACEOF
  
 -#################################################
 -# Check whether struct stat has timestamps with sub-second resolution.
@@ -50848,9 +50556,13 @@
 -{ $as_echo "$as_me:$LINENO: checking for struct stat.st_mtim.tv_nsec" >&5
 -$as_echo_n "checking for struct stat.st_mtim.tv_nsec... " >&6; }
 -if test "${ac_cv_member_struct_stat_st_mtim_tv_nsec+set}" = set; then
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for d_off in dirent" >&5
-+$as_echo_n "checking for d_off in dirent... " >&6; }
-+if test "${ac_cv_dirent_d_off+set}" = set; then :
++# 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
 -  cat >conftest.$ac_ext <<_ACEOF
@@ -50858,8 +50570,7 @@
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
+-/* end confdefs.h.  */
 -$ac_includes_default
 -int
 -main ()
@@ -50893,6 +50604,7 @@
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
++  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long"        "$ac_includes_default"; then :
  
 -	cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
@@ -50901,20 +50613,16 @@
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
 -$ac_includes_default
-+#include <unistd.h>
-+#include <sys/types.h>
-+#include <dirent.h>
- int
- main ()
- {
+-int
+-main ()
+-{
 -static struct stat ac_aggr;
 -if (sizeof ac_aggr.st_mtim.tv_nsec)
 -return 0;
-+struct dirent d; d.d_off;
-   ;
-   return 0;
- }
- _ACEOF
+-  ;
+-  return 0;
+-}
+-_ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -50934,49 +50642,55 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_cv_member_struct_stat_st_mtim_tv_nsec=yes
-+if ac_fn_c_try_compile "$LINENO"; then :
-+  ac_cv_dirent_d_off=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	ac_cv_member_struct_stat_st_mtim_tv_nsec=no
-+  ac_cv_dirent_d_off=no
++  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
--
- rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ 
+-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dirent_d_off" >&5
-+$as_echo "$ac_cv_dirent_d_off" >&6; }
-+if test $ac_cv_dirent_d_off = yes; then
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
++$as_echo "$ac_cv_sizeof_long" >&6; }
 +
-+$as_echo "#define HAVE_DIRENT_D_OFF 1" >>confdefs.h
  
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
+-fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_mtim_tv_nsec" >&5
 -$as_echo "$ac_cv_member_struct_stat_st_mtim_tv_nsec" >&6; }
 -if test "x$ac_cv_member_struct_stat_st_mtim_tv_nsec" = x""yes; then
-+
-+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 HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC 1
-+#define ssize_t int
++#define SIZEOF_LONG $ac_cv_sizeof_long
  _ACEOF
  
 -# Linux, Solaris
 -	samba_cv_stat_hires=yes
- fi
+-fi
  
 -{ $as_echo "$as_me:$LINENO: checking for struct stat.st_mtimensec" >&5
 -$as_echo_n "checking for struct stat.st_mtimensec... " >&6; }
 -if test "${ac_cv_member_struct_stat_st_mtimensec+set}" = set; then
--  $as_echo_n "(cached) " >&6
--else
++# 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
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
@@ -51016,8 +50730,7 @@
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+ac_fn_c_check_type "$LINENO" "wchar_t" "ac_cv_type_wchar_t" "$ac_includes_default"
-+if test "x$ac_cv_type_wchar_t" = x""yes; then :
++  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long"        "$ac_includes_default"; then :
  
 -	cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
@@ -51058,15 +50771,24 @@
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
- 
+-
 -	ac_cv_member_struct_stat_st_mtimensec=no
--fi
-+cat >>confdefs.h <<_ACEOF
-+#define wchar_t unsigned short
-+_ACEOF
++  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
  
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
++$as_echo "$ac_cv_sizeof_long_long" >&6; }
++
  
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -fi
@@ -51074,29 +50796,25 @@
 -$as_echo "$ac_cv_member_struct_stat_st_mtimensec" >&6; }
 -if test "x$ac_cv_member_struct_stat_st_mtimensec" = x""yes; then
  
--cat >>confdefs.h <<_ACEOF
+ cat >>confdefs.h <<_ACEOF
 -#define HAVE_STRUCT_STAT_ST_MTIMENSEC 1
--_ACEOF
-+############################################
-+# for cups support we need libcups, and a handful of header files
++#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
+ _ACEOF
  
 -# BSD, if defined _POSIX_SOURCE
 -	samba_cv_stat_hires=yes
-+# Check whether --enable-cups was given.
-+if test "${enable_cups+set}" = set; then :
-+  enableval=$enable_cups;
- fi
+-fi
  
 -{ $as_echo "$as_me:$LINENO: checking for struct stat.st_mtimespec.tv_nsec" >&5
 -$as_echo_n "checking for struct stat.st_mtimespec.tv_nsec... " >&6; }
 -if test "${ac_cv_member_struct_stat_st_mtimespec_tv_nsec+set}" = set; then
-+
-+if test x$enable_cups != xno; then
-+	# Extract the first word of "cups-config", so it can be a program name with args.
-+set dummy cups-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_CUPS_CONFIG+set}" = set; then :
++# 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
 -  cat >conftest.$ac_ext <<_ACEOF
@@ -51121,28 +50839,7 @@
 -case "(($ac_try" in
 -  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
 -  *) ac_try_echo=$ac_try;;
-+  case $CUPS_CONFIG in
-+  [\\/]* | ?:[\\/]*)
-+  ac_cv_path_CUPS_CONFIG="$CUPS_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_CUPS_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
+-esac
 -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 -$as_echo "$ac_try_echo") >&5
 -  (eval "$ac_compile") 2>conftest.er1
@@ -51156,17 +50853,10 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_cv_member_struct_stat_st_mtimespec_tv_nsec=yes
-+fi
-+CUPS_CONFIG=$ac_cv_path_CUPS_CONFIG
-+if test -n "$CUPS_CONFIG"; then
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_CONFIG" >&5
-+$as_echo "$CUPS_CONFIG" >&6; }
- else
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-+$as_echo "no" >&6; }
-+fi
++  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short"        "$ac_includes_default"; then :
  
 -	cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
@@ -51184,25 +50874,7 @@
 -  ;
 -  return 0;
 -}
-+
-+
-+        if test "x$CUPS_CONFIG" != x; then
-+
-+		ac_save_CFLAGS=$CFLAGS
-+		ac_save_LDFLAGS=$LDFLAGS
-+		ac_save_PRINT_LIBS=$PRINT_LIBS
-+		CFLAGS="$CFLAGS `$CUPS_CONFIG --cflags`"
-+		LDFLAGS="$LDFLAGS `$CUPS_CONFIG --ldflags`"
-+		PRINT_LIBS="$PRINT_LIBS `$CUPS_CONFIG --libs`"
-+		for ac_header in cups/cups.h cups/language.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
+-_ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -51222,69 +50894,50 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_cv_member_struct_stat_st_mtimespec_tv_nsec=yes
--else
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
- 
+-
 -	ac_cv_member_struct_stat_st_mtimespec_tv_nsec=no
--fi
-+fi
-+
-+done
-+
-+		if test x"$ac_cv_header_cups_cups_h" = xyes -a \
-+		        x"$ac_cv_header_cups_language_h" = xyes; then
++  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
  
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-+$as_echo "#define HAVE_CUPS 1" >>confdefs.h
+ fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
++$as_echo "$ac_cv_sizeof_short" >&6; }
 +
-+			samba_cv_HAVE_CUPS=yes
-+		else
-+			{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups-config around but cups-devel not installed" >&5
-+$as_echo "$as_me: WARNING: cups-config around but cups-devel not installed" >&2;}
-+			CFLAGS=$ac_save_CFLAGS
-+			LDFLAGS=$ac_save_LDFLAGS
-+			PRINT_LIBS=$ac_save_PRINT_LIBS
-+		fi
-+
-+	elif test x"$enable_cups" = x"yes"; then
-+		as_fn_error "Cups support required but cups-config not located.  Make sure cups-devel related files are installed." "$LINENO" 5
-+        fi
- fi
  
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-+# Check whether --enable-iprint was given.
-+if test "${enable_iprint+set}" = set; then :
-+  enableval=$enable_iprint;
- fi
+-fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_mtimespec_tv_nsec" >&5
 -$as_echo "$ac_cv_member_struct_stat_st_mtimespec_tv_nsec" >&6; }
 -if test "x$ac_cv_member_struct_stat_st_mtimespec_tv_nsec" = x""yes; then
  
--cat >>confdefs.h <<_ACEOF
+ cat >>confdefs.h <<_ACEOF
 -#define HAVE_STRUCT_STAT_ST_MTIMESPEC_TV_NSEC 1
--_ACEOF
++#define SIZEOF_SHORT $ac_cv_sizeof_short
+ _ACEOF
  
 -# BSD, if not defined _POSIX_SOURCE
 -	samba_cv_stat_hires=yes
-+if test x$enable_iprint != xno; then
-+	if test x"$samba_cv_HAVE_CUPS" = xyes; then
-+
-+$as_echo "#define HAVE_IPRINT 1" >>confdefs.h
-+
-+	elif test x"$enable_iprint" = x"yes"; then
-+		as_fn_error "iPrint support required but cups not enabled.  Make sure cups-devel related files are installed and that cups is enabled." "$LINENO" 5
-+        fi
- fi
+-fi
  
 -{ $as_echo "$as_me:$LINENO: checking for struct stat.st_mtime_n" >&5
 -$as_echo_n "checking for struct stat.st_mtime_n... " >&6; }
 -if test "${ac_cv_member_struct_stat_st_mtime_n+set}" = set; then
-+############################################
-+# check if the compiler will optimize out function calls
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the compiler will optimize out function calls" >&5
-+$as_echo_n "checking if the compiler will optimize out function calls... " >&6; }
-+if test "${samba_cv_optimize_out_funcation_calls+set}" = set; then :
++
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
++$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
++if test "${ac_cv_c_const+set}" = set; then :
    $as_echo_n "(cached) " >&6
  else
 -  cat >conftest.$ac_ext <<_ACEOF
@@ -51292,30 +50945,19 @@
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+
-+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
 -$ac_includes_default
-+
-+#include <stdio.h>
- int
- main ()
- {
+-int
+-main ()
+-{
 -static struct stat ac_aggr;
 -if (ac_aggr.st_mtime_n)
 -return 0;
-+
-+		if (0) {
-+		   this_function_does_not_exist();
-+		} else {
-+		  return 1;
-+		}
-+
-+
-   ;
-   return 0;
- }
- _ACEOF
+-  ;
+-  return 0;
+-}
+-_ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -51335,60 +50977,72 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_cv_member_struct_stat_st_mtime_n=yes
-+if ac_fn_c_try_link "$LINENO"; then :
-+  samba_cv_optimize_out_funcation_calls=yes
- else
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+  samba_cv_optimize_out_funcation_calls=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: $samba_cv_optimize_out_funcation_calls" >&5
-+$as_echo "$samba_cv_optimize_out_funcation_calls" >&6; }
-+if test x"$samba_cv_optimize_out_funcation_calls" = x"yes"; then
  
 -	cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+$as_echo "#define HAVE_COMPILER_WILL_OPTIMIZE_OUT_FNS 1" >>confdefs.h
-+
-+fi
-+
-+#############################################
-+# check for fd passing struct via msg_control
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fd passing via msg_control" >&5
-+$as_echo_n "checking for fd passing via msg_control... " >&6; }
-+if test "${samba_cv_msghdr_msg_control+set}" = set; then :
-+  $as_echo_n "(cached) " >&6
-+else
-+
-+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
+-/* end confdefs.h.  */
 -$ac_includes_default
-+
-+#include <sys/types.h>
-+#include <stdlib.h>
-+#include <stddef.h>
-+#include <sys/socket.h>
-+#include <sys/un.h>
  int
  main ()
  {
 -static struct stat ac_aggr;
 -if (sizeof ac_aggr.st_mtime_n)
 -return 0;
++/* FIXME: Include the comments suggested by Paul. */
++#ifndef __cplusplus
++  /* Ultrix mips cc rejects this.  */
++  typedef int charset[2];
++  const charset cs;
++  /* SunOS 4.1.1 cc rejects this.  */
++  char const *const *pcpcc;
++  char **ppc;
++  /* NEC SVR4.0.2 mips cc rejects this.  */
++  struct point {int x, y;};
++  static struct point const zero = {0,0};
++  /* AIX XL C 1.02.0.0 rejects this.
++     It does not let you subtract one const X* pointer from another in
++     an arm of an if-expression whose if-part is not a constant
++     expression */
++  const char *g = "string";
++  pcpcc = &g + (g ? g-g : 0);
++  /* HPUX 7.0 cc rejects these. */
++  ++pcpcc;
++  ppc = (char**) pcpcc;
++  pcpcc = (char const *const *) ppc;
++  { /* SCO 3.2v4 cc rejects this.  */
++    char *t;
++    char const *s = 0 ? (char *) 0 : (char const *) 0;
 +
-+	struct msghdr msg;
-+	union {
-+	      struct cmsghdr cm;
-+	      char control[CMSG_SPACE(sizeof(int))];
-+	} control_un;
-+	msg.msg_control = control_un.control;
-+	msg.msg_controllen = sizeof(control_un.control);
++    *t++ = 0;
++    if (s) return 0;
++  }
++  { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
++    int x[] = {25, 17};
++    const int *foo = &x[0];
++    ++foo;
++  }
++  { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
++    typedef const int *iptr;
++    iptr p = 0;
++    ++p;
++  }
++  { /* AIX XL C 1.02.0.0 rejects this saying
++       "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
++    struct s { int j; const int *ap[3]; };
++    struct s *b; b->j = 5;
++  }
++  { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
++    const int foo = 10;
++    if (!foo) return 0;
++  }
++  return !cs[0] && !zero.x;
++#endif
 +
    ;
    return 0;
@@ -51414,63 +51068,146 @@
 -       } && test -s conftest.$ac_objext; then
 -  ac_cv_member_struct_stat_st_mtime_n=yes
 +if ac_fn_c_try_compile "$LINENO"; then :
-+  samba_cv_msghdr_msg_control=yes
++  ac_cv_c_const=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	ac_cv_member_struct_stat_st_mtime_n=no
--fi
--
--rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-+  samba_cv_msghdr_msg_control=no
++  ac_cv_c_const=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_const" >&5
++$as_echo "$ac_cv_c_const" >&6; }
++if test $ac_cv_c_const = no; then
++
++$as_echo "#define const /**/" >>confdefs.h
+ 
+-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_mtime_n" >&5
 -$as_echo "$ac_cv_member_struct_stat_st_mtime_n" >&6; }
 -if test "x$ac_cv_member_struct_stat_st_mtime_n" = x""yes; then
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $samba_cv_msghdr_msg_control" >&5
-+$as_echo "$samba_cv_msghdr_msg_control" >&6; }
-+if test x"$samba_cv_msghdr_msg_control" = x"yes"; then
  
 -cat >>confdefs.h <<_ACEOF
 -#define HAVE_STRUCT_STAT_ST_MTIME_N 1
--_ACEOF
-+$as_echo "#define HAVE_MSGHDR_MSG_CONTROL 1" >>confdefs.h
++{ $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
  
 -# AIX
 -	samba_cv_stat_hires=yes
  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
  
 -{ $as_echo "$as_me:$LINENO: checking for struct stat.st_umtime" >&5
 -$as_echo_n "checking for struct stat.st_umtime... " >&6; }
 -if test "${ac_cv_member_struct_stat_st_umtime+set}" = set; then
-+#############################################
-+# check for fd passing struct via msg_acctrights
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fd passing via msg_acctrights" >&5
-+$as_echo_n "checking for fd passing via msg_acctrights... " >&6; }
-+if test "${samba_cv_msghdr_msg_acctrights+set}" = set; then :
++ { $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
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
--_ACEOF
++  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
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
++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.  */
 -$ac_includes_default
--int
--main ()
--{
++#include <sys/types.h>
++	     #include <sys/param.h>
++
+ int
+ main ()
+ {
 -static struct stat ac_aggr;
 -if (ac_aggr.st_umtime)
 -return 0;
--  ;
--  return 0;
--}
--_ACEOF
++#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
++		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
++		     && LITTLE_ENDIAN)
++	      bogus endian macros
++	     #endif
++
+   ;
+   return 0;
+ }
+ _ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -51493,33 +51230,30 @@
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
- 
+-
 -	cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++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.  */
 -$ac_includes_default
++#include <sys/types.h>
++		#include <sys/param.h>
 +
-+#include <sys/types.h>
-+#include <stdlib.h>
-+#include <stddef.h>
-+#include <sys/socket.h>
-+#include <sys/un.h>
  int
  main ()
  {
 -static struct stat ac_aggr;
 -if (sizeof ac_aggr.st_umtime)
 -return 0;
++#if BYTE_ORDER != BIG_ENDIAN
++		 not big endian
++		#endif
 +
-+	struct msghdr msg;
-+	int fd;
-+	msg.msg_acctrights = (caddr_t) &fd;
-+	msg.msg_acctrightslen = sizeof(fd);
-+
    ;
    return 0;
  }
@@ -51544,81 +51278,74 @@
 -       } && test -s conftest.$ac_objext; then
 -  ac_cv_member_struct_stat_st_umtime=yes
 +if ac_fn_c_try_compile "$LINENO"; then :
-+  samba_cv_msghdr_msg_acctrights=yes
++  ac_cv_c_bigendian=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	ac_cv_member_struct_stat_st_umtime=no
-+  samba_cv_msghdr_msg_acctrights=no
++  ac_cv_c_bigendian=no
  fi
 -
  rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $samba_cv_msghdr_msg_acctrights" >&5
-+$as_echo "$samba_cv_msghdr_msg_acctrights" >&6; }
-+if test x"$samba_cv_msghdr_msg_acctrights" = x"yes"; then
-+
-+$as_echo "#define HAVE_MSGHDR_MSG_ACCTRIGHTS 1" >>confdefs.h
- 
--rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
+-
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+-fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_umtime" >&5
 -$as_echo "$ac_cv_member_struct_stat_st_umtime" >&6; }
 -if test "x$ac_cv_member_struct_stat_st_umtime" = x""yes; then
- 
+-
 -cat >>confdefs.h <<_ACEOF
 -#define HAVE_STRUCT_STAT_ST_UMTIME 1
-+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
- 
+-_ACEOF
+-
 -# Tru64
 -	samba_cv_stat_hires=yes
- fi
-+done
- 
+-fi
 -
+-
 -if test x"$samba_cv_stat_hires" = x"yes" ; then
 -
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_STAT_HIRES_TIMESTAMPS 1
 -_ACEOF
 -
-+if test x"$ac_cv_func_dirfd" = x"yes"; then
-+	default_shared_modules="$default_shared_modules vfs_syncops vfs_dirsort"
- fi
- 
+-fi
+-
 -# recent FreeBSD, NetBSD have creation timestamps called birthtime:
 -{ $as_echo "$as_me:$LINENO: checking for struct stat.st_birthtimespec.tv_nsec" >&5
 -$as_echo_n "checking for struct stat.st_birthtimespec.tv_nsec... " >&6; }
 -if test "${ac_cv_member_struct_stat_st_birthtimespec_tv_nsec+set}" = set; then
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct sigevent type" >&5
-+$as_echo_n "checking for struct sigevent type... " >&6; }
-+if test "${samba_cv_struct_sigevent+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
+-  $as_echo_n "(cached) " >&6
+-else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
++    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.  */
 -$ac_includes_default
--int
--main ()
--{
++#include <limits.h>
++
+ int
+ main ()
+ {
 -static struct stat ac_aggr;
 -if (ac_aggr.st_birthtimespec.tv_nsec)
 -return 0;
--  ;
--  return 0;
--}
--_ACEOF
++#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
++	      bogus endian macros
++	     #endif
++
+   ;
+   return 0;
+ }
+ _ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -51641,29 +51368,29 @@
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
- 
+-
 -	cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++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.  */
 -$ac_includes_default
++#include <limits.h>
 +
-+#include <sys/types.h>
-+#if STDC_HEADERS
-+#include <stdlib.h>
-+#include <stddef.h>
-+#endif
-+#include <signal.h>
  int
  main ()
  {
 -static struct stat ac_aggr;
 -if (sizeof ac_aggr.st_birthtimespec.tv_nsec)
 -return 0;
-+struct sigevent s;
++#ifndef _BIG_ENDIAN
++		 not big endian
++		#endif
++
    ;
    return 0;
  }
@@ -51688,76 +51415,76 @@
 -       } && test -s conftest.$ac_objext; then
 -  ac_cv_member_struct_stat_st_birthtimespec_tv_nsec=yes
 +if ac_fn_c_try_compile "$LINENO"; then :
-+  samba_cv_struct_sigevent=yes
++  ac_cv_c_bigendian=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	ac_cv_member_struct_stat_st_birthtimespec_tv_nsec=no
-+  samba_cv_struct_sigevent=no
++  ac_cv_c_bigendian=no
  fi
 -
  rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $samba_cv_struct_sigevent" >&5
-+$as_echo "$samba_cv_struct_sigevent" >&6; }
-+if test x"$samba_cv_struct_sigevent" = x"yes"; then
-+
-+$as_echo "#define HAVE_STRUCT_SIGEVENT 1" >>confdefs.h
-+
-+   ac_fn_c_check_member "$LINENO" "struct sigevent" "sigev_value.sival_ptr" "ac_cv_member_struct_sigevent_sigev_value_sival_ptr" "#include <signal.h>
-+"
-+if test "x$ac_cv_member_struct_sigevent_sigev_value_sival_ptr" = x""yes; then :
-+
-+cat >>confdefs.h <<_ACEOF
-+#define HAVE_STRUCT_SIGEVENT_SIGEV_VALUE_SIVAL_PTR 1
-+_ACEOF
-+
- 
--rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
+-
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+-fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" >&5
 -$as_echo "$ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" >&6; }
 -if test "x$ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" = x""yes; then
-+ac_fn_c_check_member "$LINENO" "struct sigevent" "sigev_value.sigval_ptr" "ac_cv_member_struct_sigevent_sigev_value_sigval_ptr" "#include <signal.h>
-+"
-+if test "x$ac_cv_member_struct_sigevent_sigev_value_sigval_ptr" = x""yes; then :
- 
- cat >>confdefs.h <<_ACEOF
+-
+-cat >>confdefs.h <<_ACEOF
 -#define HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC 1
-+#define HAVE_STRUCT_SIGEVENT_SIGEV_VALUE_SIGVAL_PTR 1
- _ACEOF
- 
- 
- fi
- 
+-_ACEOF
+-
+-
+-fi
+-
 -{ $as_echo "$as_me:$LINENO: checking for struct stat.st_birthtime" >&5
 -$as_echo_n "checking for struct stat.st_birthtime... " >&6; }
 -if test "${ac_cv_member_struct_stat_st_birthtime+set}" = set; then
-+fi
-+
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec type" >&5
-+$as_echo_n "checking for struct timespec type... " >&6; }
-+if test "${samba_cv_struct_timespec+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
+-  $as_echo_n "(cached) " >&6
+-else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
++    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.  */
 -$ac_includes_default
--int
--main ()
--{
++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 ()
+ {
 -static struct stat ac_aggr;
 -if (ac_aggr.st_birthtime)
 -return 0;
--  ;
--  return 0;
--}
--_ACEOF
++return use_ascii (foo) == use_ebcdic (foo);
+   ;
+   return 0;
+ }
+ _ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -51777,42 +51504,48 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_cv_member_struct_stat_st_birthtime=yes
--else
++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
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
- 
+-
 -	cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
--$ac_includes_default
-+
-+#include <sys/types.h>
-+#if STDC_HEADERS
-+#include <stdlib.h>
-+#include <stddef.h>
-+#endif
-+#if TIME_WITH_SYS_TIME
-+# include <sys/time.h>
-+# include <time.h>
-+#else
-+# if HAVE_SYS_TIME_H
-+#  include <sys/time.h>
-+# else
-+#  include <time.h>
-+# endif
-+#endif
-+
+ $ac_includes_default
  int
  main ()
  {
 -static struct stat ac_aggr;
 -if (sizeof ac_aggr.st_birthtime)
 -return 0;
-+struct timespec ts;
++
++	     /* 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;
  }
@@ -51836,42 +51569,54 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_cv_member_struct_stat_st_birthtime=yes
-+if ac_fn_c_try_compile "$LINENO"; then :
-+  samba_cv_struct_timespec=yes
++if ac_fn_c_try_run "$LINENO"; then :
++  ac_cv_c_bigendian=no
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	ac_cv_member_struct_stat_st_birthtime=no
-+  samba_cv_struct_timespec=no
++  ac_cv_c_bigendian=yes
  fi
 -
- rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
++  conftest.$ac_objext conftest.beam conftest.$ac_ext
  fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $samba_cv_struct_timespec" >&5
-+$as_echo "$samba_cv_struct_timespec" >&6; }
-+if test x"$samba_cv_struct_timespec" = x"yes"; then
  
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
--fi
++    fi
+ fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtime" >&5
 -$as_echo "$ac_cv_member_struct_stat_st_birthtime" >&6; }
 -if test "x$ac_cv_member_struct_stat_st_birthtime" = x""yes; then
-+$as_echo "#define HAVE_STRUCT_TIMESPEC 1" >>confdefs.h
++{ $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)
  
 -cat >>confdefs.h <<_ACEOF
 -#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
 -_ACEOF
-+fi
++$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:$LINENO: checking for struct stat.st_birthtimensec" >&5
 -$as_echo_n "checking for struct stat.st_birthtimensec... " >&6; }
 -if test "${ac_cv_member_struct_stat_st_birthtimensec+set}" = set; then
-+# and glibc has setresuid under linux but the function does
-+# nothing until kernel 2.1.44! very dumb.
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for real setresuid" >&5
-+$as_echo_n "checking for real setresuid... " >&6; }
-+if test "${samba_cv_have_setresuid+set}" = set; then :
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
++$as_echo_n "checking whether char is unsigned... " >&6; }
++if test "${ac_cv_c_char_unsigned+set}" = set; then :
    $as_echo_n "(cached) " >&6
  else
 -  cat >conftest.$ac_ext <<_ACEOF
@@ -51879,18 +51624,22 @@
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
--$ac_includes_default
--int
--main ()
--{
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ $ac_includes_default
+ int
+ main ()
+ {
 -static struct stat ac_aggr;
 -if (ac_aggr.st_birthtimensec)
 -return 0;
--  ;
--  return 0;
--}
--_ACEOF
++static int test_array [1 - 2 * !(((char) -1) < 0)];
++test_array [0] = 0
++
+   ;
+   return 0;
+ }
+ _ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -51910,32 +51659,49 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_cv_member_struct_stat_st_birthtimensec=yes
--else
++if ac_fn_c_try_compile "$LINENO"; then :
++  ac_cv_c_char_unsigned=no
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
++  ac_cv_c_char_unsigned=yes
++fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
++$as_echo "$ac_cv_c_char_unsigned" >&6; }
++if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
++  $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
  
 -	cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+    if test "$cross_compiling" = yes; then :
-+  samba_cv_have_setresuid=cross
++fi
++
++
++{ $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.  */
 -$ac_includes_default
--int
--main ()
--{
++#include <sys/types.h>
++#include <signal.h>
++
+ int
+ main ()
+ {
 -static struct stat ac_aggr;
 -if (sizeof ac_aggr.st_birthtimensec)
 -return 0;
--  ;
--  return 0;
--}
-+#include <errno.h>
-+main() { setresuid(1,1,1); setresuid(2,2,2); exit(errno==EPERM?0:1);}
++return *(signal (0, 0)) (0) == 1;
+   ;
+   return 0;
+ }
  _ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
@@ -51956,96 +51722,84 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_cv_member_struct_stat_st_birthtimensec=yes
-+if ac_fn_c_try_run "$LINENO"; then :
-+  samba_cv_have_setresuid=yes
++if ac_fn_c_try_compile "$LINENO"; then :
++  ac_cv_type_signal=int
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	ac_cv_member_struct_stat_st_birthtimensec=no
-+  samba_cv_have_setresuid=no
++  ac_cv_type_signal=void
  fi
 -
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-+  conftest.$ac_objext conftest.beam 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
- fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtimensec" >&5
 -$as_echo "$ac_cv_member_struct_stat_st_birthtimensec" >&6; }
 -if test "x$ac_cv_member_struct_stat_st_birthtimensec" = x""yes; then
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $samba_cv_have_setresuid" >&5
-+$as_echo "$samba_cv_have_setresuid" >&6; }
-+if test x"$samba_cv_have_setresuid" = x"yes"; then
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
++$as_echo "$ac_cv_type_signal" >&6; }
  
--cat >>confdefs.h <<_ACEOF
+ cat >>confdefs.h <<_ACEOF
 -#define HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC 1
--_ACEOF
-+$as_echo "#define HAVE_SETRESUID 1" >>confdefs.h
++#define RETSIGTYPE $ac_cv_type_signal
+ _ACEOF
  
-+fi
-+
-+# Do the same check for setresguid...
-+#
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for real setresgid" >&5
-+$as_echo_n "checking for real setresgid... " >&6; }
-+if test "${samba_cv_have_setresgid+set}" = set; then :
+ 
++{ $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
- 
-+    if test "$cross_compiling" = yes; then :
-+  samba_cv_have_setresgid=cross
-+else
 +  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 +/* end confdefs.h.  */
-+#include <unistd.h>
-+#include <errno.h>
-+main() { errno = 0; setresgid(1,1,1); exit(errno != 0 ? (errno==EPERM ? 0 : 1) : 0);}
++#include <sys/types.h>
++
 +_ACEOF
-+if ac_fn_c_try_run "$LINENO"; then :
-+  samba_cv_have_setresgid=yes
++if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
++  $EGREP "uid_t" >/dev/null 2>&1; then :
++  ac_cv_type_uid_t=yes
 +else
-+  samba_cv_have_setresgid=no
-+fi
-+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-+  conftest.$ac_objext conftest.beam conftest.$ac_ext
++  ac_cv_type_uid_t=no
  fi
++rm -f conftest*
  
  fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $samba_cv_have_setresgid" >&5
-+$as_echo "$samba_cv_have_setresgid" >&6; }
-+if test x"$samba_cv_have_setresgid" = x"yes"; then
++{ $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 HAVE_SETRESGID 1" >>confdefs.h
++$as_echo "#define uid_t int" >>confdefs.h
  
-+fi
  
 -{ $as_echo "$as_me:$LINENO: checking whether there is DOS flags support in the stat struct" >&5
 -$as_echo_n "checking whether there is DOS flags support in the stat struct... " >&6; }
 -if test "${samba_cv_stat_dos_flags+set}" = set; then
-+{ $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
+-  $as_echo_n "(cached) " >&6
++$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 >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
--_ACEOF
++cat >>confdefs.h <<_ACEOF
++#define mode_t int
+ _ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+  if test "$cross_compiling" = yes; then :
-+  ac_cv_func_memcmp_working=no
-+else
-+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
+-/* end confdefs.h.  */
 -#include <sys/stat.h>
-+$ac_includes_default
- int
- main ()
- {
+-int
+-main ()
+-{
  
 -		int a = UF_DOS_ARCHIVE;
 -		int h = UF_DOS_HIDDEN;
@@ -52053,33 +51807,18 @@
 -		int s = UF_DOS_SYSTEM;
 -		int i = UF_DOS_NOINDEX;
 -		int f = UF_DOS_FLAGS;
-+  /* 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;
++fi
+ 
+-  ;
+-  return 0;
+-}
++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 :
 +
-+  /* 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;
- }
++else
++
++cat >>confdefs.h <<_ACEOF
++#define off_t long int
  _ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
@@ -52100,54 +51839,63 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  samba_cv_stat_dos_flags=yes
-+if ac_fn_c_try_run "$LINENO"; then :
-+  ac_cv_func_memcmp_working=yes
++
++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
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
+ 
 -	samba_cv_stat_dos_flags=no
-+  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
++cat >>confdefs.h <<_ACEOF
++#define size_t unsigned int
++_ACEOF
++
  fi
--
+ 
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++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
 -{ $as_echo "$as_me:$LINENO: result: $samba_cv_stat_dos_flags" >&5
 -$as_echo "$samba_cv_stat_dos_flags" >&6; }
-+{ $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
  
 -if test x"$samba_cv_stat_dos_flags" = x"yes" ; then
++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_STAT_DOS_FLAGS 1
--_ACEOF
++cat >>confdefs.h <<_ACEOF
++#define HAVE_STRUCT_STAT_ST_RDEV 1
+ _ACEOF
  
--fi
-+###############################################
-+# Readline included by default unless explicitly asked not to
-+test "${with_readline+set}" != "set" && with_readline=yes
++
++$as_echo "#define HAVE_ST_RDEV 1" >>confdefs.h
++
+ fi
  
 -#####################################
 -# needed for SRV lookups
-+# 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; }
  
 -{ $as_echo "$as_me:$LINENO: checking for dn_expand in -lresolv" >&5
 -$as_echo_n "checking for dn_expand in -lresolv... " >&6; }
 -if test "${ac_cv_lib_resolv_dn_expand+set}" = set; then
--  $as_echo_n "(cached) " >&6
--else
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for d_off in dirent" >&5
++$as_echo_n "checking for d_off in dirent... " >&6; }
++if test "${ac_cv_dirent_d_off+set}" = set; then :
+   $as_echo_n "(cached) " >&6
+ else
 -  ac_check_lib_save_LIBS=$LIBS
 -LIBS="-lresolv  $LIBS"
 -cat >conftest.$ac_ext <<_ACEOF
@@ -52155,13 +51903,8 @@
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
-+# 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; }
++  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
@@ -52170,21 +51913,17 @@
 -extern "C"
 -#endif
 -char dn_expand ();
--int
--main ()
--{
++#include <unistd.h>
++#include <sys/types.h>
++#include <dirent.h>
+ int
+ main ()
+ {
 -return dn_expand ();
--  ;
--  return 0;
--}
-+    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
++struct dirent d; d.d_off;
+   ;
+   return 0;
+ }
  _ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
@@ -52208,9 +51947,20 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  ac_cv_lib_resolv_dn_expand=yes
--else
++if ac_fn_c_try_compile "$LINENO"; then :
++  ac_cv_dirent_d_off=yes
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
++  ac_cv_dirent_d_off=no
++fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dirent_d_off" >&5
++$as_echo "$ac_cv_dirent_d_off" >&6; }
++if test $ac_cv_dirent_d_off = yes; then
++
++$as_echo "#define HAVE_DIRENT_D_OFF 1" >>confdefs.h
  
 -	ac_cv_lib_resolv_dn_expand=no
  fi
@@ -52219,46 +51969,212 @@
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
 -LIBS=$ac_check_lib_save_LIBS
--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
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_dn_expand" >&5
 -$as_echo "$ac_cv_lib_resolv_dn_expand" >&6; }
 -if test "x$ac_cv_lib_resolv_dn_expand" = x""yes; then
-+done
+-  cat >>confdefs.h <<_ACEOF
+-#define HAVE_LIBRESOLV 1
 +
-+    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_LIBRESOLV 1
-+#define HAVE_READLINE_HISTORY_H 1
++ac_fn_c_check_type "$LINENO" "wchar_t" "ac_cv_type_wchar_t" "$ac_includes_default"
++if test "x$ac_cv_type_wchar_t" = x""yes; then :
++
++else
++
++cat >>confdefs.h <<_ACEOF
++#define wchar_t unsigned short
  _ACEOF
  
 -  LIBS="-lresolv $LIBS"
--
++fi
++
++
++############################################
++# for cups support we need libcups, and a handful of header files
+ 
++# Check whether --enable-cups was given.
++if test "${enable_cups+set}" = set; then :
++  enableval=$enable_cups;
  fi
  
-+done
-+
  
 -{ $as_echo "$as_me:$LINENO: checking for _dn_expand in -lresolv" >&5
 -$as_echo_n "checking for _dn_expand in -lresolv... " >&6; }
 -if test "${ac_cv_lib_resolv__dn_expand+set}" = set; then
-+    for ac_header in readline.h readline/readline.h
++if test x$enable_cups != xno; then
++	# Extract the first word of "cups-config", so it can be a program name with args.
++set dummy cups-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_CUPS_CONFIG+set}" = set; then :
+   $as_echo_n "(cached) " >&6
+ else
+-  ac_check_lib_save_LIBS=$LIBS
+-LIBS="-lresolv  $LIBS"
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
++  case $CUPS_CONFIG in
++  [\\/]* | ?:[\\/]*)
++  ac_cv_path_CUPS_CONFIG="$CUPS_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_CUPS_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
+ 
+-/* 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 _dn_expand ();
+-int
+-main ()
+-{
+-return _dn_expand ();
+-  ;
+-  return 0;
+-}
+-_ACEOF
+-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:$LINENO: $ac_try_echo\""
+-$as_echo "$ac_try_echo") >&5
+-  (eval "$ac_link") 2>conftest.er1
+-  ac_status=$?
+-  grep -v '^ *+' conftest.er1 >conftest.err
+-  rm -f conftest.er1
+-  cat conftest.err >&5
+-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); } && {
+-	 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_cv_lib_resolv__dn_expand=yes
++fi
++CUPS_CONFIG=$ac_cv_path_CUPS_CONFIG
++if test -n "$CUPS_CONFIG"; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_CONFIG" >&5
++$as_echo "$CUPS_CONFIG" >&6; }
+ else
+-  $as_echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	ac_cv_lib_resolv__dn_expand=no
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
+ fi
+ 
+-rm -rf conftest.dSYM
+-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+-      conftest$ac_exeext conftest.$ac_ext
+-LIBS=$ac_check_lib_save_LIBS
+-fi
+-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_resolv__dn_expand" >&5
+-$as_echo "$ac_cv_lib_resolv__dn_expand" >&6; }
+-if test "x$ac_cv_lib_resolv__dn_expand" = x""yes; then
++
++
++        if test "x$CUPS_CONFIG" != x; then
++
++		ac_save_CFLAGS=$CFLAGS
++		ac_save_LDFLAGS=$LDFLAGS
++		ac_save_PRINT_LIBS=$PRINT_LIBS
++		CFLAGS="$CFLAGS `$CUPS_CONFIG --cflags`"
++		LDFLAGS="$LDFLAGS `$CUPS_CONFIG --ldflags`"
++		PRINT_LIBS="$PRINT_LIBS `$CUPS_CONFIG --libs`"
++		for ac_header in cups/cups.h cups/language.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
+   cat >>confdefs.h <<_ACEOF
+-#define HAVE_LIBRESOLV 1
 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-+_ACEOF
+ _ACEOF
+ 
+-  LIBS="-lresolv $LIBS"
++fi
 +
-+      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 :
++done
+ 
++		if test x"$ac_cv_header_cups_cups_h" = xyes -a \
++		        x"$ac_cv_header_cups_language_h" = xyes; then
++
++$as_echo "#define HAVE_CUPS 1" >>confdefs.h
++
++			samba_cv_HAVE_CUPS=yes
++		else
++			{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups-config around but cups-devel not installed" >&5
++$as_echo "$as_me: WARNING: cups-config around but cups-devel not installed" >&2;}
++			CFLAGS=$ac_save_CFLAGS
++			LDFLAGS=$ac_save_LDFLAGS
++			PRINT_LIBS=$ac_save_PRINT_LIBS
++		fi
++
++	elif test x"$enable_cups" = x"yes"; then
++		as_fn_error "Cups support required but cups-config not located.  Make sure cups-devel related files are installed." "$LINENO" 5
++        fi
++fi
++
++# Check whether --enable-iprint was given.
++if test "${enable_iprint+set}" = set; then :
++  enableval=$enable_iprint;
+ fi
+ 
+ 
+-{ $as_echo "$as_me:$LINENO: checking for __dn_expand in -lresolv" >&5
+-$as_echo_n "checking for __dn_expand in -lresolv... " >&6; }
+-if test "${ac_cv_lib_resolv___dn_expand+set}" = set; then
++if test x$enable_iprint != xno; then
++	if test x"$samba_cv_HAVE_CUPS" = xyes; then
++
++$as_echo "#define HAVE_IPRINT 1" >>confdefs.h
++
++	elif test x"$enable_iprint" = x"yes"; then
++		as_fn_error "iPrint support required but cups not enabled.  Make sure cups-devel related files are installed and that cups is enabled." "$LINENO" 5
++        fi
++fi
++
++############################################
++# check if the compiler will optimize out function calls
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the compiler will optimize out function calls" >&5
++$as_echo_n "checking if the compiler will optimize out function calls... " >&6; }
++if test "${samba_cv_optimize_out_funcation_calls+set}" = set; then :
    $as_echo_n "(cached) " >&6
  else
 -  ac_check_lib_save_LIBS=$LIBS
@@ -52268,23 +52184,30 @@
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+  ac_check_lib_save_LIBS=$LIBS
-+LIBS="-l${termlib}  $LIBS"
-+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++
++    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
  
- /* Override any GCC internal prototype to avoid an error.
-@@ -47033,73 +14542,41 @@
- #ifdef __cplusplus
- extern "C"
- #endif
--char _dn_expand ();
-+char tgetent ();
+-/* 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 __dn_expand ();
++#include <stdio.h>
  int
  main ()
  {
--return _dn_expand ();
-+return tgetent ();
+-return __dn_expand ();
++
++		if (0) {
++		   this_function_does_not_exist();
++		} else {
++		  return 1;
++		}
++
++
    ;
    return 0;
  }
@@ -52310,74 +52233,282 @@
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
--  ac_cv_lib_resolv__dn_expand=yes
+-  ac_cv_lib_resolv___dn_expand=yes
 +if ac_fn_c_try_link "$LINENO"; then :
-+  eval "$as_ac_Lib=yes"
++  samba_cv_optimize_out_funcation_calls=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
--	ac_cv_lib_resolv__dn_expand=no
-+  eval "$as_ac_Lib=no"
+-	ac_cv_lib_resolv___dn_expand=no
++  samba_cv_optimize_out_funcation_calls=no
  fi
 -
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
+-LIBS=$ac_check_lib_save_LIBS
 +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:$LINENO: result: $ac_cv_lib_resolv__dn_expand" >&5
--$as_echo "$ac_cv_lib_resolv__dn_expand" >&6; }
--if test "x$ac_cv_lib_resolv__dn_expand" = x""yes; then
+-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_resolv___dn_expand" >&5
+-$as_echo "$ac_cv_lib_resolv___dn_expand" >&6; }
+-if test "x$ac_cv_lib_resolv___dn_expand" = x""yes; then
 -  cat >>confdefs.h <<_ACEOF
 -#define HAVE_LIBRESOLV 1
 -_ACEOF
--
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $samba_cv_optimize_out_funcation_calls" >&5
++$as_echo "$samba_cv_optimize_out_funcation_calls" >&6; }
++if test x"$samba_cv_optimize_out_funcation_calls" = x"yes"; then
+ 
 -  LIBS="-lresolv $LIBS"
++$as_echo "#define HAVE_COMPILER_WILL_OPTIMIZE_OUT_FNS 1" >>confdefs.h
+ 
+ fi
+ 
++#############################################
++# check for fd passing struct via msg_control
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fd passing via msg_control" >&5
++$as_echo_n "checking for fd passing via msg_control... " >&6; }
++if test "${samba_cv_msghdr_msg_control+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
+ 
+-#
+-# Check for the functions putprpwnam, set_auth_parameters,
+-# getspnam, bigcrypt and getprpwnam in -lsec and -lsecurity
+-# Needed for OSF1 and HPUX.
+-#
++    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 msghdr msg;
++	union {
++	      struct cmsghdr cm;
++	      char control[CMSG_SPACE(sizeof(int))];
++	} control_un;
++	msg.msg_control = control_un.control;
++	msg.msg_controllen = sizeof(control_un.control);
+ 
+-for ac_func in putprpwnam
+-do
+-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
+-$as_echo_n "checking for $ac_func... " >&6; }
+-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+-  $as_echo_n "(cached) " >&6
+-else
+-  cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
++  ;
++  return 0;
++}
+ _ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
+-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+-#define $ac_func innocuous_$ac_func
++if ac_fn_c_try_compile "$LINENO"; then :
++  samba_cv_msghdr_msg_control=yes
++else
++  samba_cv_msghdr_msg_control=no
++fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $samba_cv_msghdr_msg_control" >&5
++$as_echo "$samba_cv_msghdr_msg_control" >&6; }
++if test x"$samba_cv_msghdr_msg_control" = x"yes"; then
+ 
+-/* System header to define __stub macros and hopefully few prototypes,
+-    which can conflict with char $ac_func (); below.
+-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+-    <limits.h> exists even on freestanding compilers.  */
++$as_echo "#define HAVE_MSGHDR_MSG_CONTROL 1" >>confdefs.h
+ 
+-#ifdef __STDC__
+-# include <limits.h>
+-#else
+-# include <assert.h>
+-#endif
++fi
+ 
+-#undef $ac_func
++#############################################
++# check for fd passing struct via msg_acctrights
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fd passing via msg_acctrights" >&5
++$as_echo_n "checking for fd passing via msg_acctrights... " >&6; }
++if test "${samba_cv_msghdr_msg_acctrights+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
+ 
+-/* 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 $ac_func ();
+-/* The GNU C library defines this for functions which it implements
+-    to always fail with ENOSYS.  Some functions are actually named
+-    something starting with __ and the normal name is an alias.  */
+-#if defined __stub_$ac_func || defined __stub___$ac_func
+-choke me
+-#endif
++    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 ()
+ {
+-return $ac_func ();
++
++	struct msghdr msg;
++	int fd;
++	msg.msg_acctrights = (caddr_t) &fd;
++	msg.msg_acctrightslen = sizeof(fd);
++
+   ;
+   return 0;
+ }
+ _ACEOF
+-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:$LINENO: $ac_try_echo\""
+-$as_echo "$ac_try_echo") >&5
+-  (eval "$ac_link") 2>conftest.er1
+-  ac_status=$?
+-  grep -v '^ *+' conftest.er1 >conftest.err
+-  rm -f conftest.er1
+-  cat conftest.err >&5
+-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); } && {
+-	 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
+-  eval "$as_ac_var=yes"
++if ac_fn_c_try_compile "$LINENO"; then :
++  samba_cv_msghdr_msg_acctrights=yes
+ else
+-  $as_echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
 -
-+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
+-	eval "$as_ac_var=no"
++  samba_cv_msghdr_msg_acctrights=no
  fi
+-
+-rm -rf conftest.dSYM
+-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+-      conftest$ac_exeext conftest.$ac_ext
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+-ac_res=`eval 'as_val=${'$as_ac_var'}
+-		 $as_echo "$as_val"'`
+-	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+-$as_echo "$ac_res" >&6; }
+-as_val=`eval 'as_val=${'$as_ac_var'}
+-		 $as_echo "$as_val"'`
+-   if test "x$as_val" = x""yes; then
+-  cat >>confdefs.h <<_ACEOF
+-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+-_ACEOF
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $samba_cv_msghdr_msg_acctrights" >&5
++$as_echo "$samba_cv_msghdr_msg_acctrights" >&6; }
++if test x"$samba_cv_msghdr_msg_acctrights" = x"yes"; then
  
+-        # putprpwnam was found in libc or existing $LIBS
++$as_echo "#define HAVE_MSGHDR_MSG_ACCTRIGHTS 1" >>confdefs.h
+ 
++fi
+ 
+-cat >>confdefs.h <<\_ACEOF
+-#define HAVE_PUTPRPWNAM 1
++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
+ 
++if test x"$ac_cv_func_dirfd" = x"yes"; then
++	default_shared_modules="$default_shared_modules vfs_syncops vfs_dirsort"
++fi
+ 
+-else
 -
--{ $as_echo "$as_me:$LINENO: checking for __dn_expand in -lresolv" >&5
--$as_echo_n "checking for __dn_expand in -lresolv... " >&6; }
--if test "${ac_cv_lib_resolv___dn_expand+set}" = set; then
-+      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 :
+-        # putprpwnam was not found, try adding libsecurity
+-	case " $LIBS " in
+-          *\ -lsecurity\ *)
+-
+-		    # putprpwnam was not found and we already had libsecurity
+-		    # nothing to do here by default
+-		    true
+-
+-	    ;;
+-          *)
+-	    # putprpwnam was not found, try adding libsecurity
+-	    { $as_echo "$as_me:$LINENO: checking for putprpwnam in -lsecurity" >&5
+-$as_echo_n "checking for putprpwnam in -lsecurity... " >&6; }
+-if test "${ac_cv_lib_security_putprpwnam+set}" = set; then
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct sigevent type" >&5
++$as_echo_n "checking for struct sigevent type... " >&6; }
++if test "${samba_cv_struct_sigevent+set}" = set; then :
    $as_echo_n "(cached) " >&6
  else
-   ac_check_lib_save_LIBS=$LIBS
--LIBS="-lresolv  $LIBS"
+-  ac_check_lib_save_LIBS=$LIBS
+-LIBS="-lsecurity  $LIBS"
 -cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+LIBS="-lreadline $TERMLIBS $LIBS"
-+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++
++    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
  
- /* Override any GCC internal prototype to avoid an error.
-@@ -47108,99 +14585,106 @@
- #ifdef __cplusplus
- extern "C"
+-/* 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"
++#include <sys/types.h>
++#if STDC_HEADERS
++#include <stdlib.h>
++#include <stddef.h>
  #endif
--char __dn_expand ();
-+char rl_callback_handler_install ();
+-char putprpwnam ();
++#include <signal.h>
  int
  main ()
  {
--return __dn_expand ();
-+return rl_callback_handler_install ();
+-return putprpwnam ();
++struct sigevent s;
    ;
    return 0;
  }
@@ -52403,29 +52534,374 @@
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
--  ac_cv_lib_resolv___dn_expand=yes
-+if ac_fn_c_try_link "$LINENO"; then :
-+  ac_cv_lib_readline_rl_callback_handler_install=yes
+-  ac_cv_lib_security_putprpwnam=yes
++if ac_fn_c_try_compile "$LINENO"; then :
++  samba_cv_struct_sigevent=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+  ac_cv_lib_readline_rl_callback_handler_install=no
+-
+-	ac_cv_lib_security_putprpwnam=no
++  samba_cv_struct_sigevent=no
+ fi
+-
+-rm -rf conftest.dSYM
+-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+-      conftest$ac_exeext conftest.$ac_ext
+-LIBS=$ac_check_lib_save_LIBS
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_security_putprpwnam" >&5
+-$as_echo "$ac_cv_lib_security_putprpwnam" >&6; }
+-if test "x$ac_cv_lib_security_putprpwnam" = x""yes; then
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $samba_cv_struct_sigevent" >&5
++$as_echo "$samba_cv_struct_sigevent" >&6; }
++if test x"$samba_cv_struct_sigevent" = x"yes"; then
+ 
+-		LIBS="-lsecurity $LIBS"
++$as_echo "#define HAVE_STRUCT_SIGEVENT 1" >>confdefs.h
+ 
++   ac_fn_c_check_member "$LINENO" "struct sigevent" "sigev_value.sival_ptr" "ac_cv_member_struct_sigevent_sigev_value_sival_ptr" "#include <signal.h>
++"
++if test "x$ac_cv_member_struct_sigevent_sigev_value_sival_ptr" = x""yes; then :
+ 
+-cat >>confdefs.h <<\_ACEOF
+-#define HAVE_PUTPRPWNAM 1
++cat >>confdefs.h <<_ACEOF
++#define HAVE_STRUCT_SIGEVENT_SIGEV_VALUE_SIVAL_PTR 1
+ _ACEOF
+ 
+ 
 +fi
-+rm -f core conftest.err conftest.$ac_objext \
-+    conftest$ac_exeext conftest.$ac_ext
-+LIBS=$ac_check_lib_save_LIBS
++ac_fn_c_check_member "$LINENO" "struct sigevent" "sigev_value.sigval_ptr" "ac_cv_member_struct_sigevent_sigev_value_sigval_ptr" "#include <signal.h>
++"
++if test "x$ac_cv_member_struct_sigevent_sigev_value_sigval_ptr" = x""yes; then :
+ 
+-else
+-
+-
+-			# putprpwnam was not found in libsecurity
+-			# nothing to do here by default
+-			true
++cat >>confdefs.h <<_ACEOF
++#define HAVE_STRUCT_SIGEVENT_SIGEV_VALUE_SIGVAL_PTR 1
++_ACEOF
+ 
+ 
+ fi
+ 
+-	  ;;
+-        esac
+-
+ fi
+-done
+-
+-
+ 
+-
+-for ac_func in putprpwnam
+-do
+-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
+-$as_echo_n "checking for $ac_func... " >&6; }
+-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec type" >&5
++$as_echo_n "checking for struct timespec type... " >&6; }
++if test "${samba_cv_struct_timespec+set}" = set; then :
+   $as_echo_n "(cached) " >&6
+ else
+-  cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
+-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+-#define $ac_func innocuous_$ac_func
+-
+-/* System header to define __stub macros and hopefully few prototypes,
+-    which can conflict with char $ac_func (); 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 $ac_func
++    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"
++#include <sys/types.h>
++#if STDC_HEADERS
++#include <stdlib.h>
++#include <stddef.h>
+ #endif
+-char $ac_func ();
+-/* The GNU C library defines this for functions which it implements
+-    to always fail with ENOSYS.  Some functions are actually named
+-    something starting with __ and the normal name is an alias.  */
+-#if defined __stub_$ac_func || defined __stub___$ac_func
+-choke me
++#if TIME_WITH_SYS_TIME
++# include <sys/time.h>
++# include <time.h>
++#else
++# if HAVE_SYS_TIME_H
++#  include <sys/time.h>
++# else
++#  include <time.h>
++# endif
+ #endif
+ 
+ int
+ main ()
+ {
+-return $ac_func ();
++struct timespec ts;
+   ;
+   return 0;
+ }
+ _ACEOF
+-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:$LINENO: $ac_try_echo\""
+-$as_echo "$ac_try_echo") >&5
+-  (eval "$ac_link") 2>conftest.er1
+-  ac_status=$?
+-  grep -v '^ *+' conftest.er1 >conftest.err
+-  rm -f conftest.er1
+-  cat conftest.err >&5
+-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); } && {
+-	 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
+-  eval "$as_ac_var=yes"
++if ac_fn_c_try_compile "$LINENO"; then :
++  samba_cv_struct_timespec=yes
+ else
+-  $as_echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	eval "$as_ac_var=no"
++  samba_cv_struct_timespec=no
+ fi
+-
+-rm -rf conftest.dSYM
+-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+-      conftest$ac_exeext conftest.$ac_ext
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+-ac_res=`eval 'as_val=${'$as_ac_var'}
+-		 $as_echo "$as_val"'`
+-	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+-$as_echo "$ac_res" >&6; }
+-as_val=`eval 'as_val=${'$as_ac_var'}
+-		 $as_echo "$as_val"'`
+-   if test "x$as_val" = x""yes; then
+-  cat >>confdefs.h <<_ACEOF
+-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+-_ACEOF
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $samba_cv_struct_timespec" >&5
++$as_echo "$samba_cv_struct_timespec" >&6; }
++if test x"$samba_cv_struct_timespec" = x"yes"; then
+ 
+-        # putprpwnam was found in libc or existing $LIBS
++$as_echo "#define HAVE_STRUCT_TIMESPEC 1" >>confdefs.h
+ 
 +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"
+ 
+-cat >>confdefs.h <<\_ACEOF
+-#define HAVE_PUTPRPWNAM 1
++# and glibc has setresuid under linux but the function does
++# nothing until kernel 2.1.44! very dumb.
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for real setresuid" >&5
++$as_echo_n "checking for real setresuid... " >&6; }
++if test "${samba_cv_have_setresuid+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
 +
-+$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
++    if test "$cross_compiling" = yes; then :
++  samba_cv_have_setresuid=cross
++else
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++#include <errno.h>
++main() { setresuid(1,1,1); setresuid(2,2,2); exit(errno==EPERM?0:1);}
+ _ACEOF
++if ac_fn_c_try_run "$LINENO"; then :
++  samba_cv_have_setresuid=yes
++else
++  samba_cv_have_setresuid=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_setresuid" >&5
++$as_echo "$samba_cv_have_setresuid" >&6; }
++if test x"$samba_cv_have_setresuid" = x"yes"; then
  
--	ac_cv_lib_resolv___dn_expand=no
-+       break
++$as_echo "#define HAVE_SETRESUID 1" >>confdefs.h
+ 
++fi
+ 
++# Do the same check for setresguid...
++#
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for real setresgid" >&5
++$as_echo_n "checking for real setresgid... " >&6; }
++if test "${samba_cv_have_setresgid+set}" = set; then :
++  $as_echo_n "(cached) " >&6
+ else
+ 
+-        # putprpwnam was not found, try adding libsec
+-	case " $LIBS " in
+-          *\ -lsec\ *)
++    if test "$cross_compiling" = yes; then :
++  samba_cv_have_setresgid=cross
 +else
-+  TERMLIBS=
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++#include <unistd.h>
++#include <errno.h>
++main() { errno = 0; setresgid(1,1,1); exit(errno != 0 ? (errno==EPERM ? 0 : 1) : 0);}
++_ACEOF
++if ac_fn_c_try_run "$LINENO"; then :
++  samba_cv_have_setresgid=yes
++else
++  samba_cv_have_setresgid=no
++fi
++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
++  conftest.$ac_objext conftest.beam conftest.$ac_ext
++fi
+ 
+-		    # putprpwnam was not found and we already had libsec
+-		    # nothing to do here by default
+-		    true
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $samba_cv_have_setresgid" >&5
++$as_echo "$samba_cv_have_setresgid" >&6; }
++if test x"$samba_cv_have_setresgid" = x"yes"; then
+ 
+-	    ;;
+-          *)
+-	    # putprpwnam was not found, try adding libsec
+-	    { $as_echo "$as_me:$LINENO: checking for putprpwnam in -lsec" >&5
+-$as_echo_n "checking for putprpwnam in -lsec... " >&6; }
+-if test "${ac_cv_lib_sec_putprpwnam+set}" = set; then
++$as_echo "#define HAVE_SETRESGID 1" >>confdefs.h
++
++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
+-  ac_check_lib_save_LIBS=$LIBS
+-LIBS="-lsec  $LIBS"
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++  if test "$cross_compiling" = yes; then :
++  ac_cv_func_memcmp_working=no
++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 putprpwnam ();
++$ac_includes_default
+ int
+ main ()
+ {
+-return putprpwnam ();
++
++  /* 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
+-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:$LINENO: $ac_try_echo\""
+-$as_echo "$ac_try_echo") >&5
+-  (eval "$ac_link") 2>conftest.er1
+-  ac_status=$?
+-  grep -v '^ *+' conftest.er1 >conftest.err
+-  rm -f conftest.er1
+-  cat conftest.err >&5
+-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); } && {
+-	 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_cv_lib_sec_putprpwnam=yes
++if ac_fn_c_try_run "$LINENO"; then :
++  ac_cv_func_memcmp_working=yes
+ else
+-  $as_echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	ac_cv_lib_sec_putprpwnam=no
++  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
  
 -rm -rf conftest.dSYM
@@ -52433,52 +52909,56 @@
 -      conftest$ac_exeext conftest.$ac_ext
 -LIBS=$ac_check_lib_save_LIBS
  fi
--{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_resolv___dn_expand" >&5
--$as_echo "$ac_cv_lib_resolv___dn_expand" >&6; }
--if test "x$ac_cv_lib_resolv___dn_expand" = x""yes; then
-+
-+done
-+
-+    ;;
-+  no)
-+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-+$as_echo "no" >&6; }
-+    ;;
-+  *)
+-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_sec_putprpwnam" >&5
+-$as_echo "$ac_cv_lib_sec_putprpwnam" >&6; }
+-if test "x$ac_cv_lib_sec_putprpwnam" = x""yes; then
++{ $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
+ 
+-		LIBS="-lsec $LIBS"
+ 
+ 
+-cat >>confdefs.h <<\_ACEOF
+-#define HAVE_PUTPRPWNAM 1
+-_ACEOF
++###############################################
++# Readline included by default unless explicitly asked not to
++test "${with_readline+set}" != "set" && with_readline=yes
+ 
++# 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; }
-+
-+    # 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"
-+
+ 
+-else
 +    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 HAVE_LIBRESOLV 1
++  cat >>confdefs.h <<_ACEOF
 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
- _ACEOF
++_ACEOF
  
--  LIBS="-lresolv $LIBS"
--
- fi
++fi
  
+-			# putprpwnam was not found in libsec
+-			# nothing to do here by default
+-			true
 +done
  
--#
--# Check for the functions putprpwnam, set_auth_parameters,
--# getspnam, bigcrypt and getprpwnam in -lsec and -lsecurity
--# Needed for OSF1 and HPUX.
--#
 +    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"
@@ -52486,18 +52966,16 @@
 +  cat >>confdefs.h <<_ACEOF
 +#define HAVE_READLINE_HISTORY_H 1
 +_ACEOF
-+
-+fi
  
-+done
+ fi
  
+-	  ;;
+-        esac
+-
+-fi
+ done
  
--for ac_func in putprpwnam
--do
--as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
--{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
--$as_echo_n "checking for $ac_func... " >&6; }
--if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+ 
 +    for ac_header in readline.h readline/readline.h
 +do :
 +  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
@@ -52507,8 +52985,16 @@
 +  cat >>confdefs.h <<_ACEOF
 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
 +_ACEOF
-+
-+      for termlib in ncurses curses termcap terminfo termlib; do
+ 
+-
+-
+-for ac_func in set_auth_parameters
+-do
+-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
+-$as_echo_n "checking for $ac_func... " >&6; }
+-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
++      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; }
@@ -52543,7 +53029,7 @@
  
  /* Override any GCC internal prototype to avoid an error.
     Use char because int might match the return type of a GCC
-@@ -47208,100 +14692,41 @@
+@@ -47778,100 +14569,41 @@
  #ifdef __cplusplus
  extern "C"
  #endif
@@ -52617,22 +53103,22 @@
 -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 -_ACEOF
 -
--        # putprpwnam was found in libc or existing $LIBS
+-        # set_auth_parameters was found in libc or existing $LIBS
 -
 -
 -cat >>confdefs.h <<\_ACEOF
--#define HAVE_PUTPRPWNAM 1
+-#define HAVE_SET_AUTH_PARAMETERS 1
 -_ACEOF
 -
 -
 -
 -else
 -
--        # putprpwnam was not found, try adding libsecurity
+-        # set_auth_parameters was not found, try adding libsecurity
 -	case " $LIBS " in
 -          *\ -lsecurity\ *)
 -
--		    # putprpwnam was not found and we already had libsecurity
+-		    # set_auth_parameters was not found and we already had libsecurity
 -		    # nothing to do here by default
 -		    true
 +eval as_val=\$$as_ac_Lib
@@ -52642,10 +53128,10 @@
  
 -	    ;;
 -          *)
--	    # putprpwnam was not found, try adding libsecurity
--	    { $as_echo "$as_me:$LINENO: checking for putprpwnam in -lsecurity" >&5
--$as_echo_n "checking for putprpwnam in -lsecurity... " >&6; }
--if test "${ac_cv_lib_security_putprpwnam+set}" = set; then
+-	    # set_auth_parameters was not found, try adding libsecurity
+-	    { $as_echo "$as_me:$LINENO: checking for set_auth_parameters in -lsecurity" >&5
+-$as_echo_n "checking for set_auth_parameters in -lsecurity... " >&6; }
+-if test "${ac_cv_lib_security_set_auth_parameters+set}" = set; then
 +      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; }
@@ -52664,16 +53150,16 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -47310,111 +14735,68 @@
+@@ -47880,111 +14612,149 @@
  #ifdef __cplusplus
  extern "C"
  #endif
--char putprpwnam ();
+-char set_auth_parameters ();
 +char rl_callback_handler_install ();
  int
  main ()
  {
--return putprpwnam ();
+-return set_auth_parameters ();
 +return rl_callback_handler_install ();
    ;
    return 0;
@@ -52700,14 +53186,14 @@
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
--  ac_cv_lib_security_putprpwnam=yes
+-  ac_cv_lib_security_set_auth_parameters=yes
 +if ac_fn_c_try_link "$LINENO"; then :
 +  ac_cv_lib_readline_rl_callback_handler_install=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
--	ac_cv_lib_security_putprpwnam=no
+-	ac_cv_lib_security_set_auth_parameters=no
 +  ac_cv_lib_readline_rl_callback_handler_install=no
  fi
 -
@@ -52718,69 +53204,103 @@
 +    conftest$ac_exeext conftest.$ac_ext
  LIBS=$ac_check_lib_save_LIBS
  fi
--{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_security_putprpwnam" >&5
--$as_echo "$ac_cv_lib_security_putprpwnam" >&6; }
--if test "x$ac_cv_lib_security_putprpwnam" = x""yes; then
+-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_security_set_auth_parameters" >&5
+-$as_echo "$ac_cv_lib_security_set_auth_parameters" >&6; }
+-if test "x$ac_cv_lib_security_set_auth_parameters" = x""yes; then
 -
 -		LIBS="-lsecurity $LIBS"
--
--
--cat >>confdefs.h <<\_ACEOF
--#define HAVE_PUTPRPWNAM 1
--_ACEOF
--
 +{ $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"
-+       CPPFLAGS="-I$with_readline/include $CPPFLAGS"
-+       TERMLIBS="-lreadline $TERMLIBS"
++  TERMLIBS="-lreadline $TERMLIBS"
  
 +$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
  
+-cat >>confdefs.h <<\_ACEOF
+-#define HAVE_SET_AUTH_PARAMETERS 1
+-_ACEOF
 +       break
- else
-+  TERMLIBS= CPPFLAGS=$_cppflags
++else
++  TERMLIBS=
 +fi
  
 +fi
  
--			# putprpwnam was not found in libsecurity
++done
+ 
+-else
++    ;;
++  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}
+ 
+-			# set_auth_parameters was not found in libsecurity
 -			# nothing to do here by default
 -			true
--
-+done
++    # Add additional search path
++    LDFLAGS="-L$with_readline/lib $LDFLAGS"
++    CPPFLAGS="-I$with_readline/include $CPPFLAGS"
  
--fi
++    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
+ 
 -	  ;;
 -        esac
-+    LDFLAGS=$_ldflags
-+    ;;
-+  esac
-+else
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-+$as_echo "no" >&6; }
++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
  
++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 ac_func in putprpwnam
+-for ac_func in set_auth_parameters
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
 -$as_echo_n "checking for $ac_func... " >&6; }
 -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-+# 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 :
++      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
 -  cat >conftest.$ac_ext <<_ACEOF
@@ -52789,7 +53309,7 @@
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
 +  ac_check_lib_save_LIBS=$LIBS
-+LIBS="-lreadline $TERMLIBS $LIBS"
++LIBS="-l${termlib}  $LIBS"
 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
 -/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
@@ -52800,18 +53320,58 @@
 -    which can conflict with char $ac_func (); 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
--
++/* 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
+ 
 -#undef $ac_func
++      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
-@@ -47422,100 +14804,54 @@
+@@ -47992,100 +14762,67 @@
  #ifdef __cplusplus
  extern "C"
  #endif
@@ -52823,12 +53383,12 @@
 -choke me
 -#endif
 -
-+char rl_completion_matches ();
++char rl_callback_handler_install ();
  int
  main ()
  {
 -return $ac_func ();
-+return rl_completion_matches ();
++return rl_callback_handler_install ();
    ;
    return 0;
  }
@@ -52856,21 +53416,34 @@
 -       }; then
 -  eval "$as_ac_var=yes"
 +if ac_fn_c_try_link "$LINENO"; then :
-+  ac_cv_lib_readline_rl_completion_matches=yes
++  ac_cv_lib_readline_rl_callback_handler_install=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	eval "$as_ac_var=no"
-+  ac_cv_lib_readline_rl_completion_matches=no
++  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"
++       CPPFLAGS="-I$with_readline/include $CPPFLAGS"
++       TERMLIBS="-lreadline $TERMLIBS"
++
++$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
+ 
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
-+rm -f core conftest.err conftest.$ac_objext \
-+    conftest$ac_exeext conftest.$ac_ext
-+LIBS=$ac_check_lib_save_LIBS
++       break
++else
++  TERMLIBS= CPPFLAGS=$_cppflags
  fi
 -ac_res=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
@@ -52882,50 +53455,47 @@
 -  cat >>confdefs.h <<_ACEOF
 -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 -_ACEOF
--
--        # putprpwnam was found in libc or existing $LIBS
--
-+{ $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 :
  
+-        # set_auth_parameters was found in libc or existing $LIBS
++fi
+ 
++done
+ 
 -cat >>confdefs.h <<\_ACEOF
--#define HAVE_PUTPRPWNAM 1
+-#define HAVE_SET_AUTH_PARAMETERS 1
 -_ACEOF
-+$as_echo "#define HAVE_NEW_LIBREADLINE 1" >>confdefs.h
  
++    LDFLAGS=$_ldflags
++    ;;
++  esac
++else
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
+ 
 +fi
  
+-else
  
-+# 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 <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
- 
--        # putprpwnam was not found, try adding libsec
+-        # set_auth_parameters was not found, try adding libsec
 -	case " $LIBS " in
 -          *\ -lsec\ *)
--
--		    # putprpwnam was not found and we already had libsec
+ 
+-		    # set_auth_parameters was not found and we already had libsec
 -		    # nothing to do here by default
 -		    true
-+cat >>confdefs.h <<_ACEOF
-+#define HAVE_DECL_RL_EVENT_HOOK $ac_have_decl
-+_ACEOF
  
 -	    ;;
 -          *)
--	    # putprpwnam was not found, try adding libsec
--	    { $as_echo "$as_me:$LINENO: checking for putprpwnam in -lsec" >&5
--$as_echo_n "checking for putprpwnam in -lsec... " >&6; }
--if test "${ac_cv_lib_sec_putprpwnam+set}" = set; then
-+{ $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 :
+-	    # set_auth_parameters was not found, try adding libsec
+-	    { $as_echo "$as_me:$LINENO: checking for set_auth_parameters in -lsec" >&5
+-$as_echo_n "checking for set_auth_parameters in -lsec... " >&6; }
+-if test "${ac_cv_lib_sec_set_auth_parameters+set}" = set; then
++# 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
@@ -52940,17 +53510,17 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -47524,112 +14860,43 @@
+@@ -48094,113 +14831,55 @@
  #ifdef __cplusplus
  extern "C"
  #endif
--char putprpwnam ();
-+char history_list ();
+-char set_auth_parameters ();
++char rl_completion_matches ();
  int
  main ()
  {
--return putprpwnam ();
-+return history_list ();
+-return set_auth_parameters ();
++return rl_completion_matches ();
    ;
    return 0;
  }
@@ -52976,15 +53546,15 @@
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
--  ac_cv_lib_sec_putprpwnam=yes
+-  ac_cv_lib_sec_set_auth_parameters=yes
 +if ac_fn_c_try_link "$LINENO"; then :
-+  ac_cv_lib_readline_history_list=yes
++  ac_cv_lib_readline_rl_completion_matches=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
--	ac_cv_lib_sec_putprpwnam=no
-+  ac_cv_lib_readline_history_list=no
+-	ac_cv_lib_sec_set_auth_parameters=no
++  ac_cv_lib_readline_rl_completion_matches=no
  fi
 -
 -rm -rf conftest.dSYM
@@ -52994,15 +53564,15 @@
 +    conftest$ac_exeext conftest.$ac_ext
  LIBS=$ac_check_lib_save_LIBS
  fi
--{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_sec_putprpwnam" >&5
--$as_echo "$ac_cv_lib_sec_putprpwnam" >&6; }
--if test "x$ac_cv_lib_sec_putprpwnam" = x""yes; then
+-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_sec_set_auth_parameters" >&5
+-$as_echo "$ac_cv_lib_sec_set_auth_parameters" >&6; }
+-if test "x$ac_cv_lib_sec_set_auth_parameters" = x""yes; then
 -
 -		LIBS="-lsec $LIBS"
 -
 -
 -cat >>confdefs.h <<\_ACEOF
--#define HAVE_PUTPRPWNAM 1
+-#define HAVE_SET_AUTH_PARAMETERS 1
 -_ACEOF
 -
 -
@@ -53010,38 +53580,47 @@
 -else
 -
 -
--			# putprpwnam was not found in libsec
+-			# set_auth_parameters was not found in libsec
 -			# nothing to do here by default
 -			true
--
--
--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 "$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
+ 
 -	  ;;
 -        esac
-+$as_echo "#define HAVE_HISTORY_LIST 1" >>confdefs.h
  
++# 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 <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
 -done
 -
 -
 -
+-# UnixWare 7.x has its getspnam in -lgen
  
++cat >>confdefs.h <<_ACEOF
++#define HAVE_DECL_RL_EVENT_HOOK $ac_have_decl
++_ACEOF
  
--for ac_func in set_auth_parameters
+-for ac_func in getspnam
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
 -$as_echo_n "checking for $ac_func... " >&6; }
 -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-+###############################################
-+# test for where we get yp_get_default_domain() from
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing yp_get_default_domain" >&5
-+$as_echo_n "checking for library containing yp_get_default_domain... " >&6; }
-+if test "${ac_cv_search_yp_get_default_domain+set}" = set; then :
++{ $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
 -  cat >conftest.$ac_ext <<_ACEOF
@@ -53049,7 +53628,8 @@
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+  ac_func_search_save_LIBS=$LIBS
++  ac_check_lib_save_LIBS=$LIBS
++LIBS="-lreadline $TERMLIBS $LIBS"
 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
 -/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
@@ -53071,7 +53651,7 @@
  
  /* Override any GCC internal prototype to avoid an error.
     Use char because int might match the return type of a GCC
-@@ -47637,314 +14904,299 @@
+@@ -48208,100 +14887,42 @@
  #ifdef __cplusplus
  extern "C"
  #endif
@@ -53083,12 +53663,12 @@
 -choke me
 -#endif
 -
-+char yp_get_default_domain ();
++char history_list ();
  int
  main ()
  {
 -return $ac_func ();
-+return yp_get_default_domain ();
++return history_list ();
    ;
    return 0;
  }
@@ -53115,43 +53695,22 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  eval "$as_ac_var=yes"
--else
++if ac_fn_c_try_link "$LINENO"; then :
++  ac_cv_lib_readline_history_list=yes
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+for ac_lib in '' nsl; 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_yp_get_default_domain=$ac_res
-+fi
-+rm -f core conftest.err conftest.$ac_objext \
-+    conftest$ac_exeext
-+  if test "${ac_cv_search_yp_get_default_domain+set}" = set; then :
-+  break
-+fi
-+done
-+if test "${ac_cv_search_yp_get_default_domain+set}" = set; then :
- 
+-
 -	eval "$as_ac_var=no"
-+else
-+  ac_cv_search_yp_get_default_domain=no
-+fi
-+rm conftest.$ac_ext
-+LIBS=$ac_func_search_save_LIBS
++  ac_cv_lib_readline_history_list=no
  fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_yp_get_default_domain" >&5
-+$as_echo "$ac_cv_search_yp_get_default_domain" >&6; }
-+ac_res=$ac_cv_search_yp_get_default_domain
-+if test "$ac_res" != no; then :
-+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
- 
+-
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
  fi
 -ac_res=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
@@ -53160,120 +53719,73 @@
 -as_val=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+
-+for ac_func in yp_get_default_domain
-+do :
-+  ac_fn_c_check_func "$LINENO" "yp_get_default_domain" "ac_cv_func_yp_get_default_domain"
-+if test "x$ac_cv_func_yp_get_default_domain" = x""yes; then :
-   cat >>confdefs.h <<_ACEOF
+-  cat >>confdefs.h <<_ACEOF
 -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-+#define HAVE_YP_GET_DEFAULT_DOMAIN 1
- _ACEOF
- 
--        # set_auth_parameters was found in libc or existing $LIBS
-+fi
-+done
- 
- 
+-_ACEOF
+-
+-        # getspnam was found in libc or existing $LIBS
+-
+-
 -cat >>confdefs.h <<\_ACEOF
--#define HAVE_SET_AUTH_PARAMETERS 1
-+# Check if we have execl, if not we need to compile smbrun.
-+for ac_func in execl
-+do :
-+  ac_fn_c_check_func "$LINENO" "execl" "ac_cv_func_execl"
-+if test "x$ac_cv_func_execl" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define HAVE_EXECL 1
- _ACEOF
+-#define HAVE_GETSPNAM 1
+-_ACEOF
+-
+-
++{ $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 :
  
-+fi
-+done
- 
-+if test x"$ac_cv_func_execl" = x"no"; then
-+    EXTRA_BIN_PROGS="$EXTRA_BIN_PROGS bin/smbrun\$(EXEEXT)"
-+fi
- 
 -else
-+for ac_func in getcwd fchown chmod fchmod mknod mknod64
-+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
++$as_echo "#define HAVE_HISTORY_LIST 1" >>confdefs.h
  
--        # set_auth_parameters was not found, try adding libsecurity
+-        # getspnam was not found, try adding libgen
 -	case " $LIBS " in
--          *\ -lsecurity\ *)
+-          *\ -lgen\ *)
 +fi
-+done
  
--		    # set_auth_parameters was not found and we already had libsecurity
+-		    # getspnam was not found and we already had libgen
 -		    # nothing to do here by default
 -		    true
-+for ac_func in strtol
-+do :
-+  ac_fn_c_check_func "$LINENO" "strtol" "ac_cv_func_strtol"
-+if test "x$ac_cv_func_strtol" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define HAVE_STRTOL 1
-+_ACEOF
  
 -	    ;;
 -          *)
--	    # set_auth_parameters was not found, try adding libsecurity
--	    { $as_echo "$as_me:$LINENO: checking for set_auth_parameters in -lsecurity" >&5
--$as_echo_n "checking for set_auth_parameters in -lsecurity... " >&6; }
--if test "${ac_cv_lib_security_set_auth_parameters+set}" = set; then
--  $as_echo_n "(cached) " >&6
--else
+-	    # getspnam was not found, try adding libgen
+-	    { $as_echo "$as_me:$LINENO: checking for getspnam in -lgen" >&5
+-$as_echo_n "checking for getspnam in -lgen... " >&6; }
+-if test "${ac_cv_lib_gen_getspnam+set}" = set; then
++###############################################
++# test for where we get yp_get_default_domain() from
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing yp_get_default_domain" >&5
++$as_echo_n "checking for library containing yp_get_default_domain... " >&6; }
++if test "${ac_cv_search_yp_get_default_domain+set}" = set; then :
+   $as_echo_n "(cached) " >&6
+ else
 -  ac_check_lib_save_LIBS=$LIBS
--LIBS="-lsecurity  $LIBS"
+-LIBS="-lgen  $LIBS"
 -cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
-+fi
-+done
-+
-+for ac_func in strchr chflags
-+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
+-_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
++  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 set_auth_parameters ();
--int
--main ()
--{
--return set_auth_parameters ();
--  ;
--  return 0;
--}
-+fi
-+done
-+
-+for ac_func in getrlimit fsync fdatasync setpgid
-+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
+ /* Override any GCC internal prototype to avoid an error.
+@@ -48310,213 +14931,299 @@
+ #ifdef __cplusplus
+ extern "C"
+ #endif
+-char getspnam ();
++char yp_get_default_domain ();
+ int
+ main ()
+ {
+-return getspnam ();
++return yp_get_default_domain ();
+   ;
+   return 0;
+ }
  _ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
@@ -53296,52 +53808,81 @@
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
--  ac_cv_lib_security_set_auth_parameters=yes
--else
+-  ac_cv_lib_gen_getspnam=yes
++for ac_lib in '' nsl; 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_yp_get_default_domain=$ac_res
++fi
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext
++  if test "${ac_cv_search_yp_get_default_domain+set}" = set; then :
++  break
++fi
++done
++if test "${ac_cv_search_yp_get_default_domain+set}" = set; then :
++
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
++  ac_cv_search_yp_get_default_domain=no
++fi
++rm conftest.$ac_ext
++LIBS=$ac_func_search_save_LIBS
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_yp_get_default_domain" >&5
++$as_echo "$ac_cv_search_yp_get_default_domain" >&6; }
++ac_res=$ac_cv_search_yp_get_default_domain
++if test "$ac_res" != no; then :
++  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
  
--	ac_cv_lib_security_set_auth_parameters=no
+-	ac_cv_lib_gen_getspnam=no
  fi
-+done
-+
-+for ac_func in setsid glob strpbrk crypt16 getauthuid
-+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
  
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
 -LIBS=$ac_check_lib_save_LIBS
++for ac_func in yp_get_default_domain
++do :
++  ac_fn_c_check_func "$LINENO" "yp_get_default_domain" "ac_cv_func_yp_get_default_domain"
++if test "x$ac_cv_func_yp_get_default_domain" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_YP_GET_DEFAULT_DOMAIN 1
++_ACEOF
++
  fi
--{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_security_set_auth_parameters" >&5
--$as_echo "$ac_cv_lib_security_set_auth_parameters" >&6; }
--if test "x$ac_cv_lib_security_set_auth_parameters" = x""yes; then
+-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_gen_getspnam" >&5
+-$as_echo "$ac_cv_lib_gen_getspnam" >&6; }
+-if test "x$ac_cv_lib_gen_getspnam" = x""yes; then
 +done
  
--		LIBS="-lsecurity $LIBS"
-+for ac_func in sigprocmask sigblock sigaction sigset innetgr setnetgrent getnetgrent endnetgrent
+-		LIBS="-lgen $LIBS"
+ 
++# Check if we have execl, if not we need to compile smbrun.
++for ac_func in execl
 +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 :
++  ac_fn_c_check_func "$LINENO" "execl" "ac_cv_func_execl"
++if test "x$ac_cv_func_execl" = x""yes; then :
 +  cat >>confdefs.h <<_ACEOF
-+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
++#define HAVE_EXECL 1
 +_ACEOF
- 
++
 +fi
 +done
  
 -cat >>confdefs.h <<\_ACEOF
--#define HAVE_SET_AUTH_PARAMETERS 1
-+for ac_func in initgroups select poll rdchk getgrnam getgrent pathconf
+-#define HAVE_GETSPNAM 1
++if test x"$ac_cv_func_execl" = x"no"; then
++    EXTRA_BIN_PROGS="$EXTRA_BIN_PROGS bin/smbrun\$(EXEEXT)"
++fi
++
++for ac_func in getcwd fchown chmod fchmod mknod mknod64
 +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"
@@ -53354,21 +53895,19 @@
 +fi
 +done
  
-+for ac_func in setpriv setgidx setuidx setgroups sysconf stat64 fstat64
++for ac_func in strtol
 +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 :
++  ac_fn_c_check_func "$LINENO" "strtol" "ac_cv_func_strtol"
++if test "x$ac_cv_func_strtol" = x""yes; then :
 +  cat >>confdefs.h <<_ACEOF
-+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
++#define HAVE_STRTOL 1
 +_ACEOF
  
 -else
 +fi
 +done
  
-+for ac_func in lstat64 fopen64 atexit grantpt lseek64 ftruncate64
++for ac_func in strchr chflags
 +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"
@@ -53378,13 +53917,13 @@
 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 +_ACEOF
  
--			# set_auth_parameters was not found in libsecurity
+-			# getspnam was not found in libgen
 -			# nothing to do here by default
 -			true
 +fi
 +done
  
-+for ac_func in fseek64 fseeko64 ftell64 ftello64 setluid getpwanam
++for ac_func in getrlimit fsync fdatasync setpgid
 +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"
@@ -53399,7 +53938,7 @@
  
 -	  ;;
 -        esac
-+for ac_func in opendir64 readdir64 seekdir64 telldir64 rewinddir64 closedir64
++for ac_func in setsid glob strpbrk crypt16 getauthuid
 +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"
@@ -53412,19 +53951,33 @@
  fi
  done
  
-+for ac_func in getpwent_r
++for ac_func in sigprocmask sigblock sigaction sigset innetgr setnetgrent getnetgrent endnetgrent
 +do :
-+  ac_fn_c_check_func "$LINENO" "getpwent_r" "ac_cv_func_getpwent_r"
-+if test "x$ac_cv_func_getpwent_r" = x""yes; then :
++  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 HAVE_GETPWENT_R 1
++#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 +_ACEOF
  
 +fi
 +done
  
--
--for ac_func in set_auth_parameters
++for ac_func in initgroups select poll rdchk getgrnam getgrent pathconf
++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 getspnam
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
@@ -53434,12 +53987,14 @@
 -else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
-+for ac_func in getdents64
++for ac_func in setpriv setgidx setuidx setgroups sysconf stat64 fstat64
 +do :
-+  ac_fn_c_check_func "$LINENO" "getdents64" "ac_cv_func_getdents64"
-+if test "x$ac_cv_func_getdents64" = x""yes; then :
++  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 HAVE_GETDENTS64 1
++#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
  _ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
@@ -53447,22 +54002,20 @@
 -/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
 -   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
 -#define $ac_func innocuous_$ac_func
--
+ 
 -/* System header to define __stub macros and hopefully few prototypes,
 -    which can conflict with char $ac_func (); below.
 -    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
 -    <limits.h> exists even on freestanding compilers.  */
++fi
++done
  
 -#ifdef __STDC__
 -# include <limits.h>
 -#else
 -# include <assert.h>
 -#endif
-+fi
-+done
- 
--#undef $ac_func
-+for ac_func in setenv strcasecmp fcvt fcvtl
++for ac_func in lstat64 fopen64 atexit grantpt lseek64 ftruncate64
 +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"
@@ -53472,6 +54025,10 @@
 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 +_ACEOF
  
+-#undef $ac_func
++fi
++done
+ 
 -/* 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.  */
@@ -53485,8 +54042,15 @@
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
 -#endif
-+fi
-+done
++for ac_func in fseek64 fseeko64 ftell64 ftello64 setluid 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
  
 -int
 -main ()
@@ -53495,7 +54059,10 @@
 -  ;
 -  return 0;
 -}
-+for ac_func in syslog vsyslog timegm
++fi
++done
++
++for ac_func in opendir64 readdir64 seekdir64 telldir64 rewinddir64 closedir64
 +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"
@@ -53503,6 +54070,17 @@
 +   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 getpwent_r
++do :
++  ac_fn_c_check_func "$LINENO" "getpwent_r" "ac_cv_func_getpwent_r"
++if test "x$ac_cv_func_getpwent_r" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_GETPWENT_R 1
  _ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
@@ -53533,11 +54111,19 @@
 -	eval "$as_ac_var=no"
  fi
 +done
++
++for ac_func in getdents64
++do :
++  ac_fn_c_check_func "$LINENO" "getdents64" "ac_cv_func_getdents64"
++if test "x$ac_cv_func_getdents64" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_GETDENTS64 1
++_ACEOF
  
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
--fi
+ fi
 -ac_res=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
@@ -53545,7 +54131,9 @@
 -as_val=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+for ac_func in setlocale nl_langinfo
++done
++
++for ac_func in setenv strcasecmp fcvt fcvtl
 +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"
@@ -53555,49 +54143,73 @@
  #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
  _ACEOF
  
--        # set_auth_parameters was found in libc or existing $LIBS
--
+-        # getspnam was found in libc or existing $LIBS
 +fi
 +done
++
++for ac_func in syslog vsyslog timegm
++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
+ 
 -cat >>confdefs.h <<\_ACEOF
--#define HAVE_SET_AUTH_PARAMETERS 1
+-#define HAVE_GETSPNAM 1
++for ac_func in setlocale nl_langinfo
++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 nanosleep
 +do :
 +  ac_fn_c_check_func "$LINENO" "nanosleep" "ac_cv_func_nanosleep"
 +if test "x$ac_cv_func_nanosleep" = x""yes; then :
 +  cat >>confdefs.h <<_ACEOF
 +#define HAVE_NANOSLEEP 1
- _ACEOF
++_ACEOF
  
-+else
+ else
  
- 
--else
-+ac_check_lib_ext_save_LIBS=$LIBS
-+LIBS="-lrt $LIBS  $LIBS"
- 
--        # set_auth_parameters was not found, try adding libsec
+-        # getspnam was not found, try adding libsecurity
 -	case " $LIBS " in
--          *\ -lsec\ *)
+-          *\ -lsecurity\ *)
  
--		    # set_auth_parameters was not found and we already had libsec
+-		    # getspnam was not found and we already had libsecurity
 -		    # nothing to do here by default
 -		    true
++ac_check_lib_ext_save_LIBS=$LIBS
++LIBS="-lrt $LIBS  $LIBS"
  
 -	    ;;
 -          *)
--	    # set_auth_parameters was not found, try adding libsec
--	    { $as_echo "$as_me:$LINENO: checking for set_auth_parameters in -lsec" >&5
--$as_echo_n "checking for set_auth_parameters in -lsec... " >&6; }
--if test "${ac_cv_lib_sec_set_auth_parameters+set}" = set; then
+-	    # getspnam was not found, try adding libsecurity
+-	    { $as_echo "$as_me:$LINENO: checking for getspnam in -lsecurity" >&5
+-$as_echo_n "checking for getspnam in -lsecurity... " >&6; }
+-if test "${ac_cv_lib_security_getspnam+set}" = set; then
++
++
 +        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nanosleep in -lrt" >&5
 +$as_echo_n "checking for nanosleep in -lrt... " >&6; }
 +if test "${ac_cv_lib_ext_rt_nanosleep+set}" = set; then :
    $as_echo_n "(cached) " >&6
  else
 -  ac_check_lib_save_LIBS=$LIBS
--LIBS="-lsec  $LIBS"
+-LIBS="-lsecurity  $LIBS"
 -cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
@@ -53607,16 +54219,16 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -47953,113 +15205,144 @@
+@@ -48525,111 +15232,223 @@
  #ifdef __cplusplus
  extern "C"
  #endif
--char set_auth_parameters ();
+-char getspnam ();
 +char nanosleep ();
  int
  main ()
  {
--return set_auth_parameters ();
+-return getspnam ();
 +return nanosleep ();
    ;
    return 0;
@@ -53643,7 +54255,7 @@
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
--  ac_cv_lib_sec_set_auth_parameters=yes
+-  ac_cv_lib_security_getspnam=yes
 +if ac_fn_c_try_link "$LINENO"; then :
 +  ac_cv_lib_ext_rt_nanosleep=yes;
 +		  ac_cv_lib_ext_rt=yes
@@ -53655,9 +54267,8 @@
 +fi
 +rm -f core conftest.err conftest.$ac_objext \
 +    conftest$ac_exeext conftest.$ac_ext
- 
--	ac_cv_lib_sec_set_auth_parameters=no
- fi
++
++fi
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ext_rt_nanosleep" >&5
 +$as_echo "$ac_cv_lib_ext_rt_nanosleep" >&6; }
 +    if test $ac_cv_lib_ext_rt_nanosleep = yes; then :
@@ -53665,17 +54276,10 @@
 +#define HAVE_NANOSLEEP 1
 +_ACEOF
  
--rm -rf conftest.dSYM
--rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
--      conftest$ac_exeext conftest.$ac_ext
--LIBS=$ac_check_lib_save_LIBS
+-	ac_cv_lib_security_getspnam=no
  fi
--{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_sec_set_auth_parameters" >&5
--$as_echo "$ac_cv_lib_sec_set_auth_parameters" >&6; }
--if test "x$ac_cv_lib_sec_set_auth_parameters" = x""yes; then
 +LIBS=$ac_check_lib_ext_save_LIBS
- 
--		LIBS="-lsec $LIBS"
++
 +if test $ac_cv_lib_ext_rt = yes; then :
 +  cat >>confdefs.h <<_ACEOF
 +#define HAVE_LIBRT 1
@@ -53688,14 +54292,20 @@
 +			LIBS="-lrt $LIBS"
 +			;;
 +		esac
++
  
- 
--cat >>confdefs.h <<\_ACEOF
--#define HAVE_SET_AUTH_PARAMETERS 1
+-rm -rf conftest.dSYM
+-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+-      conftest$ac_exeext conftest.$ac_ext
+-LIBS=$ac_check_lib_save_LIBS
+ fi
+-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_security_getspnam" >&5
+-$as_echo "$ac_cv_lib_security_getspnam" >&6; }
+-if test "x$ac_cv_lib_security_getspnam" = x""yes; then
 +fi
-+fi
 +done
-+
+ 
+-		LIBS="-lsecurity $LIBS"
 +for ac_func in mlock munlock mlockall munlockall
 +do :
 +  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
@@ -53704,11 +54314,13 @@
 +   if test "x$as_val" = x""yes; then :
 +  cat >>confdefs.h <<_ACEOF
 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
- _ACEOF
++_ACEOF
  
 +fi
 +done
-+
+ 
+-cat >>confdefs.h <<\_ACEOF
+-#define HAVE_GETSPNAM 1
 +for ac_func in memalign posix_memalign hstrerror
 +do :
 +  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
@@ -53717,12 +54329,11 @@
 +   if test "x$as_val" = x""yes; then :
 +  cat >>confdefs.h <<_ACEOF
 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-+_ACEOF
+ _ACEOF
  
 +fi
 +done
  
--else
 +for ac_header in sys/mman.h
 +do :
 +  ac_fn_c_check_header_mongrel "$LINENO" "sys/mman.h" "ac_cv_header_sys_mman_h" "$ac_includes_default"
@@ -53731,13 +54342,14 @@
 +#define HAVE_SYS_MMAN_H 1
 +_ACEOF
  
+-else
 +fi
  
--			# set_auth_parameters was not found in libsec
++done
+ 
+-			# getspnam was not found in libsecurity
 -			# nothing to do here by default
 -			true
-+done
- 
 +# setbuffer, shmget, shm_open are needed for smbtorture
 +for ac_func in shmget shm_open
 +do :
@@ -53748,12 +54360,10 @@
 +  cat >>confdefs.h <<_ACEOF
 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 +_ACEOF
- 
- fi
++
++fi
 +done
  
--	  ;;
--        esac
 +for ac_func in gettext dgettext
 +do :
 +  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
@@ -53765,6 +54375,19 @@
 +_ACEOF
  
  fi
++done
+ 
+-	  ;;
+-        esac
++for ac_func in strupr
++do :
++  ac_fn_c_check_func "$LINENO" "strupr" "ac_cv_func_strupr"
++if test "x$ac_cv_func_strupr" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_STRUPR 1
++_ACEOF
+ 
+ fi
  done
  
  
@@ -53778,8 +54401,7 @@
 +  cat >>confdefs.h <<_ACEOF
 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
 +_ACEOF
- 
--# UnixWare 7.x has its getspnam in -lgen
++
 +fi
  
 +done
@@ -53812,66 +54434,26 @@
 -    which can conflict with char $ac_func (); 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 $ac_func
- 
- /* Override any GCC internal prototype to avoid an error.
-    Use char because int might match the return type of a GCC
-@@ -48067,100 +15350,66 @@
- #ifdef __cplusplus
- extern "C"
++/* 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 $ac_func ();
--/* The GNU C library defines this for functions which it implements
--    to always fail with ENOSYS.  Some functions are actually named
--    something starting with __ and the normal name is an alias.  */
--#if defined __stub_$ac_func || defined __stub___$ac_func
--choke me
--#endif
--
 +char backtrace_symbols ();
- int
- main ()
- {
--return $ac_func ();
++int
++main ()
++{
 +return backtrace_symbols ();
-   ;
-   return 0;
- }
- _ACEOF
--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:$LINENO: $ac_try_echo\""
--$as_echo "$ac_try_echo") >&5
--  (eval "$ac_link") 2>conftest.er1
--  ac_status=$?
--  grep -v '^ *+' conftest.er1 >conftest.err
--  rm -f conftest.er1
--  cat conftest.err >&5
--  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
--  (exit $ac_status); } && {
--	 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
--  eval "$as_ac_var=yes"
--else
--  $as_echo "$as_me: failed program was:" >&5
--sed 's/^/| /' conftest.$ac_ext >&5
--
--	eval "$as_ac_var=no"
++  ;
++  return 0;
++}
++_ACEOF
 +for ac_lib in '' execinfo; do
 +  if test -z "$ac_lib"; then
 +    ac_res="none required"
@@ -53881,30 +54463,15 @@
 +  fi
 +  if ac_fn_c_try_link "$LINENO"; then :
 +  ac_cv_search_backtrace_symbols=$ac_res
- fi
--
--rm -rf conftest.dSYM
--rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
--      conftest$ac_exeext conftest.$ac_ext
++fi
 +rm -f core conftest.err conftest.$ac_objext \
 +    conftest$ac_exeext
 +  if test "${ac_cv_search_backtrace_symbols+set}" = set; then :
 +  break
- fi
--ac_res=`eval 'as_val=${'$as_ac_var'}
--		 $as_echo "$as_val"'`
--	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
--$as_echo "$ac_res" >&6; }
--as_val=`eval 'as_val=${'$as_ac_var'}
--		 $as_echo "$as_val"'`
--   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
 +if test "${ac_cv_search_backtrace_symbols+set}" = set; then :
- 
--        # getspnam was found in libc or existing $LIBS
++
 +else
 +  ac_cv_search_backtrace_symbols=no
 +fi
@@ -53916,66 +54483,50 @@
 +ac_res=$ac_cv_search_backtrace_symbols
 +if test "$ac_res" != no; then :
 +  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
- 
++
 +fi
- 
--cat >>confdefs.h <<\_ACEOF
--#define HAVE_GETSPNAM 1
++
 +for ac_func in backtrace_symbols
 +do :
 +  ac_fn_c_check_func "$LINENO" "backtrace_symbols" "ac_cv_func_backtrace_symbols"
 +if test "x$ac_cv_func_backtrace_symbols" = x""yes; then :
 +  cat >>confdefs.h <<_ACEOF
 +#define HAVE_BACKTRACE_SYMBOLS 1
- _ACEOF
- 
++_ACEOF
++
 +fi
 +done
  
--
--else
--
--        # getspnam was not found, try adding libgen
--	case " $LIBS " in
--          *\ -lgen\ *)
--
--		    # getspnam was not found and we already had libgen
--		    # nothing to do here by default
--		    true
--
--	    ;;
--          *)
--	    # getspnam was not found, try adding libgen
--	    { $as_echo "$as_me:$LINENO: checking for getspnam in -lgen" >&5
--$as_echo_n "checking for getspnam in -lgen... " >&6; }
--if test "${ac_cv_lib_gen_getspnam+set}" = set; then
+-#undef $ac_func
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for trace_back_stack in -lexc" >&5
 +$as_echo_n "checking for trace_back_stack in -lexc... " >&6; }
 +if test "${ac_cv_lib_exc_trace_back_stack+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
-   ac_check_lib_save_LIBS=$LIBS
--LIBS="-lgen  $LIBS"
--cat >conftest.$ac_ext <<_ACEOF
--/* confdefs.h.  */
--_ACEOF
--cat confdefs.h >>conftest.$ac_ext
--cat >>conftest.$ac_ext <<_ACEOF
++  $as_echo_n "(cached) " >&6
++else
++  ac_check_lib_save_LIBS=$LIBS
 +LIBS="-lexc  $LIBS"
 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
++/* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -48169,326 +15418,231 @@
+    Use char because int might match the return type of a GCC
+@@ -48637,214 +15456,192 @@
  #ifdef __cplusplus
  extern "C"
  #endif
--char getspnam ();
+-char $ac_func ();
+-/* The GNU C library defines this for functions which it implements
+-    to always fail with ENOSYS.  Some functions are actually named
+-    something starting with __ and the normal name is an alias.  */
+-#if defined __stub_$ac_func || defined __stub___$ac_func
+-choke me
+-#endif
+-
 +char trace_back_stack ();
  int
  main ()
  {
--return getspnam ();
+-return $ac_func ();
 +return trace_back_stack ();
    ;
    return 0;
@@ -54002,166 +54553,32 @@
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
--  ac_cv_lib_gen_getspnam=yes
+-  eval "$as_ac_var=yes"
 +if ac_fn_c_try_link "$LINENO"; then :
 +  ac_cv_lib_exc_trace_back_stack=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
--	ac_cv_lib_gen_getspnam=no
+-	eval "$as_ac_var=no"
 +  ac_cv_lib_exc_trace_back_stack=no
- fi
--
--rm -rf conftest.dSYM
--rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
--      conftest$ac_exeext conftest.$ac_ext
++fi
 +rm -f core conftest.err conftest.$ac_objext \
 +    conftest$ac_exeext conftest.$ac_ext
- LIBS=$ac_check_lib_save_LIBS
++LIBS=$ac_check_lib_save_LIBS
  fi
--{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_gen_getspnam" >&5
--$as_echo "$ac_cv_lib_gen_getspnam" >&6; }
--if test "x$ac_cv_lib_gen_getspnam" = x""yes; then
--
--		LIBS="-lgen $LIBS"
--
--
--cat >>confdefs.h <<\_ACEOF
--#define HAVE_GETSPNAM 1
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_exc_trace_back_stack" >&5
 +$as_echo "$ac_cv_lib_exc_trace_back_stack" >&6; }
 +if test "x$ac_cv_lib_exc_trace_back_stack" = x""yes; then :
 +  cat >>confdefs.h <<_ACEOF
 +#define HAVE_LIBEXC 1
- _ACEOF
- 
--
--
--else
--
--
--			# getspnam was not found in libgen
--			# nothing to do here by default
--			true
--
++_ACEOF
++
 +  LIBS="-lexc $LIBS"
  
- fi
- 
--	  ;;
--        esac
-+
-+# check for sysctlbyname for BSD systems
-+for ac_func in sysctlbyname
-+do :
-+  ac_fn_c_check_func "$LINENO" "sysctlbyname" "ac_cv_func_sysctlbyname"
-+if test "x$ac_cv_func_sysctlbyname" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define HAVE_SYSCTLBYNAME 1
-+_ACEOF
- 
- fi
- done
- 
- 
--
--
--
--for ac_func in getspnam
--do
--as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
--{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
--$as_echo_n "checking for $ac_func... " >&6; }
--if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
--  $as_echo_n "(cached) " >&6
--else
--  cat >conftest.$ac_ext <<_ACEOF
--/* confdefs.h.  */
--_ACEOF
--cat confdefs.h >>conftest.$ac_ext
--cat >>conftest.$ac_ext <<_ACEOF
-+printf "%s" "checking for GPFS GPL libs... "
-+save_LIBS="$LIBS"
-+LIBS="$LIBS -lgpfs_gpl"
-+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
--/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
--   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
--#define $ac_func innocuous_$ac_func
--
--/* System header to define __stub macros and hopefully few prototypes,
--    which can conflict with char $ac_func (); 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 $ac_func
--
--/* 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 $ac_func ();
--/* The GNU C library defines this for functions which it implements
--    to always fail with ENOSYS.  Some functions are actually named
--    something starting with __ and the normal name is an alias.  */
--#if defined __stub_$ac_func || defined __stub___$ac_func
--choke me
--#endif
--
-+#include <gpfs_gpl.h>
- int
- main ()
- {
--return $ac_func ();
-+gpfs_set_share(0,GPFS_SHARE_READ,GPFS_DENY_NONE)
-   ;
-   return 0;
- }
- _ACEOF
--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:$LINENO: $ac_try_echo\""
--$as_echo "$ac_try_echo") >&5
--  (eval "$ac_link") 2>conftest.er1
--  ac_status=$?
--  grep -v '^ *+' conftest.er1 >conftest.err
--  rm -f conftest.er1
--  cat conftest.err >&5
--  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
--  (exit $ac_status); } && {
--	 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
--  eval "$as_ac_var=yes"
-+if ac_fn_c_try_link "$LINENO"; then :
-+  samba_cv_HAVE_GPFS=yes
- else
--  $as_echo "$as_me: failed program was:" >&5
--sed 's/^/| /' conftest.$ac_ext >&5
--
--	eval "$as_ac_var=no"
--fi
--
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
-+  samba_cv_HAVE_GPFS=no
  fi
 -ac_res=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
@@ -54170,72 +54587,63 @@
 -as_val=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
--  cat >>confdefs.h <<_ACEOF
++
++
++# check for sysctlbyname for BSD systems
++for ac_func in sysctlbyname
++do :
++  ac_fn_c_check_func "$LINENO" "sysctlbyname" "ac_cv_func_sysctlbyname"
++if test "x$ac_cv_func_sysctlbyname" = x""yes; then :
+   cat >>confdefs.h <<_ACEOF
 -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
--_ACEOF
-+rm -f core conftest.err conftest.$ac_objext \
-+    conftest$ac_exeext conftest.$ac_ext
-+echo $samba_cv_HAVE_GPFS
-+if test x"$samba_cv_HAVE_GPFS" = x"yes"; then
++#define HAVE_SYSCTLBYNAME 1
+ _ACEOF
  
 -        # getspnam was found in libc or existing $LIBS
-+$as_echo "#define HAVE_GPFS 1" >>confdefs.h
- 
-+    default_shared_modules="$default_shared_modules vfs_gpfs"
 +fi
-+LIBS="$save_LIBS"
++done
  
+ 
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_GETSPNAM 1
-+printf "%s" "checking for GPFS libs (with 3.2.1 PTF8 available as GPL)... "
-+save_LIBS="$LIBS"
-+LIBS="$LIBS -lgpfs"
-+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h.  */
-+#include <gpfs.h>
-+int
-+main ()
-+{
-+gpfs_set_share(0,GPFS_SHARE_READ,GPFS_DENY_NONE)
-+  ;
-+  return 0;
-+}
++#############################
++# check if building with gpfs
++for ac_header in gpfs_gpl.h
++do :
++  ac_fn_c_check_header_mongrel "$LINENO" "gpfs_gpl.h" "ac_cv_header_gpfs_gpl_h" "$ac_includes_default"
++if test "x$ac_cv_header_gpfs_gpl_h" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_GPFS_GPL_H 1
  _ACEOF
--
--
--
-+if ac_fn_c_try_link "$LINENO"; then :
-+  samba_cv_HAVE_GPFS=yes
- else
-+  samba_cv_HAVE_GPFS=no
+ 
 +fi
-+rm -f core conftest.err conftest.$ac_objext \
-+    conftest$ac_exeext conftest.$ac_ext
-+echo $samba_cv_HAVE_GPFS
-+if test x"$samba_cv_HAVE_GPFS" = x"yes"; then
  
--        # getspnam was not found, try adding libsecurity
++done
+ 
+-else
++if test x"$ac_cv_header_gpfs_gpl_h" = x"yes"; then
+ 
+-        # getspnam was not found, try adding libsec
 -	case " $LIBS " in
--          *\ -lsecurity\ *)
+-          *\ -lsec\ *)
 +$as_echo "#define HAVE_GPFS 1" >>confdefs.h
  
--		    # getspnam was not found and we already had libsecurity
+-		    # getspnam was not found and we already had libsec
 -		    # nothing to do here by default
 -		    true
 +    default_shared_modules="$default_shared_modules vfs_gpfs"
 +fi
-+LIBS="$save_LIBS"
  
 -	    ;;
 -          *)
--	    # getspnam was not found, try adding libsecurity
--	    { $as_echo "$as_me:$LINENO: checking for getspnam in -lsecurity" >&5
--$as_echo_n "checking for getspnam in -lsecurity... " >&6; }
--if test "${ac_cv_lib_security_getspnam+set}" = set; then
+-	    # getspnam was not found, try adding libsec
+-	    { $as_echo "$as_me:$LINENO: checking for getspnam in -lsec" >&5
+-$as_echo_n "checking for getspnam in -lsec... " >&6; }
+-if test "${ac_cv_lib_sec_getspnam+set}" = set; then
 -  $as_echo_n "(cached) " >&6
 -else
 -  ac_check_lib_save_LIBS=$LIBS
--LIBS="-lsecurity  $LIBS"
+-LIBS="-lsec  $LIBS"
 -cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
@@ -54287,37 +54695,51 @@
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
--  ac_cv_lib_security_getspnam=yes
+-  ac_cv_lib_sec_getspnam=yes
 +if ac_fn_c_try_link "$LINENO"; then :
 +  samba_cv_HAVE_ONEFS=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	ac_cv_lib_sec_getspnam=no
 +  samba_cv_HAVE_ONEFS=no
-+fi
+ fi
 +rm -f core conftest.err conftest.$ac_objext \
 +    conftest$ac_exeext conftest.$ac_ext
 +echo $samba_cv_HAVE_ONEFS
 +if test x"$samba_cv_HAVE_ONEFS" = x"yes"; then
-+
+ 
+-rm -rf conftest.dSYM
+-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+-      conftest$ac_exeext conftest.$ac_ext
+-LIBS=$ac_check_lib_save_LIBS
+-fi
+-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_sec_getspnam" >&5
+-$as_echo "$ac_cv_lib_sec_getspnam" >&6; }
+-if test "x$ac_cv_lib_sec_getspnam" = x""yes; then
 +$as_echo "#define HAVE_ONEFS 1" >>confdefs.h
-+
+ 
+-		LIBS="-lsec $LIBS"
 +    default_shared_modules="$default_shared_modules vfs_onefs vfs_onefs_shadow_copy perfcount_onefs"
 +    default_static_modules="$default_static_modules"
 +    ONEFS_LIBS="-lisi_acl -lisi_ecs -lisi_event -lisi_util"
 +    # Need to also add general libs for oplocks support
 +    save_LIBS="$save_LIBS -lisi_ecs -lisi_event -lisi_util -ldevstat"
 +fi
-+
+ 
 +LIBS="$save_LIBS"
-+
+ 
+-cat >>confdefs.h <<\_ACEOF
+-#define HAVE_GETSPNAM 1
+-_ACEOF
 +# Note that all the libunwind symbols in the API are defined to internal
 +# platform-specific version, so we must include libunwind.h before checking
 +# any of them.
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libunwind" >&5
 +$as_echo_n "checking for libunwind... " >&6; }
 +save_LIBS=$LIBS
-+
+ 
 +UNWIND_ARCH="unknown"
 +if test x"$UNAME_I" != x"unknown"; then
 +	UNWIND_ARCH="$UNAME_I"
@@ -54326,7 +54748,7 @@
 +elif test x"$UNAME_P" != x"unknown"; then
 +	UNWIND_ARCH="$UNAME_P"
 +fi
-+
+ 
 +case "$UNWIND_ARCH" in
 +	unknown)
 +		# This probably won't link without
@@ -54344,24 +54766,17 @@
 +		;;
 +esac
  
--	ac_cv_lib_security_getspnam=no
--fi
+-else
 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 +/* end confdefs.h.  */
  
--rm -rf conftest.dSYM
--rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
--      conftest$ac_exeext conftest.$ac_ext
--LIBS=$ac_check_lib_save_LIBS
--fi
--{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_security_getspnam" >&5
--$as_echo "$ac_cv_lib_security_getspnam" >&6; }
--if test "x$ac_cv_lib_security_getspnam" = x""yes; then
 +#ifdef HAVE_LIBUNWIND_H
 +#include <libunwind.h>
 +#endif
  
--		LIBS="-lsecurity $LIBS"
+-			# getspnam was not found in libsec
+-			# nothing to do here by default
+-			true
 +int
 +main ()
 +{
@@ -54371,25 +54786,22 @@
 +	unw_getcontext(&ctx); unw_init_local(&cur, &ctx);
 +	unw_get_proc_name(&cur, buf, sizeof(buf), &off);
  
--cat >>confdefs.h <<\_ACEOF
--#define HAVE_GETSPNAM 1
+-fi
 +  ;
 +  return 0;
 +}
- _ACEOF
++_ACEOF
 +if ac_fn_c_try_link "$LINENO"; then :
  
+-	  ;;
+-        esac
 +	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 +$as_echo "yes" >&6; }
  
+-fi
+-done
 +$as_echo "#define HAVE_LIBUNWIND 1" >>confdefs.h
  
--else
--
--
--			# getspnam was not found in libsecurity
--			# nothing to do here by default
--			true
  
 +	# If we have libunwind, test whether we also have libunwind-ptrace
 +	# which would let us unwind arbitrary processes.
@@ -54402,18 +54814,11 @@
 +#define HAVE_LIBUNWIND_PTRACE_H 1
 +_ACEOF
  
- fi
++fi
  
--	  ;;
--        esac
--
--fi
- done
++done
  
--
--
--
--for ac_func in getspnam
+-for ac_func in bigcrypt
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
@@ -54452,7 +54857,7 @@
  
  /* Override any GCC internal prototype to avoid an error.
     Use char because int might match the return type of a GCC
-@@ -48496,857 +15650,641 @@
+@@ -48852,856 +15649,641 @@
  #ifdef __cplusplus
  extern "C"
  #endif
@@ -54527,13 +54932,13 @@
 +$as_echo "$ac_cv_lib_unwind_ptrace__UPT_create" >&6; }
 +if test "x$ac_cv_lib_unwind_ptrace__UPT_create" = x""yes; then :
  
--        # getspnam was found in libc or existing $LIBS
+-        # bigcrypt was found in libc or existing $LIBS
 +		LIBUNWIND_PTRACE="-lunwind-ptrace";
  
 +$as_echo "#define HAVE_LIBUNWIND_PTRACE 1" >>confdefs.h
  
 -cat >>confdefs.h <<\_ACEOF
--#define HAVE_GETSPNAM 1
+-#define HAVE_BIGCRYPT 1
 -_ACEOF
 +
 +else
@@ -54545,14 +54950,14 @@
  
  else
  
--        # getspnam was not found, try adding libsec
+-        # bigcrypt was not found, try adding libsecurity
 -	case " $LIBS " in
--          *\ -lsec\ *)
+-          *\ -lsecurity\ *)
 +	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 +$as_echo "no" >&6; }
 +	LIBS=$save_LIBS
  
--		    # getspnam was not found and we already had libsec
+-		    # bigcrypt was not found and we already had libsecurity
 -		    # nothing to do here by default
 -		    true
 +fi
@@ -54561,14 +54966,14 @@
  
 -	    ;;
 -          *)
--	    # getspnam was not found, try adding libsec
--	    { $as_echo "$as_me:$LINENO: checking for getspnam in -lsec" >&5
--$as_echo_n "checking for getspnam in -lsec... " >&6; }
--if test "${ac_cv_lib_sec_getspnam+set}" = set; then
+-	    # bigcrypt was not found, try adding libsecurity
+-	    { $as_echo "$as_me:$LINENO: checking for bigcrypt in -lsecurity" >&5
+-$as_echo_n "checking for bigcrypt in -lsecurity... " >&6; }
+-if test "${ac_cv_lib_security_bigcrypt+set}" = set; then
 -  $as_echo_n "(cached) " >&6
 -else
 -  ac_check_lib_save_LIBS=$LIBS
--LIBS="-lsec  $LIBS"
+-LIBS="-lsecurity  $LIBS"
 -cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 +# To use libunwind-ptrace, we also need to make some ptrace system calls.
@@ -54600,7 +55005,7 @@
 +#if HAVE_SYS_TYPES_H
 +#include <sys/types.h>
  #endif
--char getspnam ();
+-char bigcrypt ();
 +#if HAVE_SYS_PTRACE_H
 +#include <sys/ptrace.h>
 +#endif
@@ -54608,7 +55013,7 @@
  int
  main ()
  {
--return getspnam ();
+-return bigcrypt ();
 +
 +		pid_t me = (pid_t)-1;
 +		ptrace(PTRACE_ATTACH, me, 0, 0);
@@ -54640,7 +55045,7 @@
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
--  ac_cv_lib_sec_getspnam=yes
+-  ac_cv_lib_security_bigcrypt=yes
 +if ac_fn_c_try_link "$LINENO"; then :
 +
 +		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
@@ -54653,7 +55058,7 @@
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
  
--	ac_cv_lib_sec_getspnam=no
+-	ac_cv_lib_security_bigcrypt=no
 -fi
 +		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 +$as_echo "no" >&6; }
@@ -54664,18 +55069,18 @@
 -      conftest$ac_exeext conftest.$ac_ext
 -LIBS=$ac_check_lib_save_LIBS
  fi
--{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_sec_getspnam" >&5
--$as_echo "$ac_cv_lib_sec_getspnam" >&6; }
--if test "x$ac_cv_lib_sec_getspnam" = x""yes; then
+-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_security_bigcrypt" >&5
+-$as_echo "$ac_cv_lib_security_bigcrypt" >&6; }
+-if test "x$ac_cv_lib_security_bigcrypt" = x""yes; then
 +rm -f core conftest.err conftest.$ac_objext \
 +    conftest$ac_exeext conftest.$ac_ext
 +fi
  
--		LIBS="-lsec $LIBS"
+-		LIBS="-lsecurity $LIBS"
  
  
 -cat >>confdefs.h <<\_ACEOF
--#define HAVE_GETSPNAM 1
+-#define HAVE_BIGCRYPT 1
 +for ac_func in _dup _dup2 _opendir _readdir _seekdir _telldir _closedir
 +do :
 +  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
@@ -54713,7 +55118,7 @@
 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 +_ACEOF
  
--			# getspnam was not found in libsec
+-			# bigcrypt was not found in libsecurity
 -			# nothing to do here by default
 -			true
 +fi
@@ -54760,19 +55165,7 @@
 +fi
 +done
  
-+for ac_func in _close __close _fchdir __fchdir _fcntl __fcntl
-+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 bigcrypt
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
@@ -54783,7 +55176,7 @@
 -else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
-+for ac_func in getdents __getdents _lseek __lseek _read __read
++for ac_func in _close __close _fchdir __fchdir _fcntl __fcntl
 +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"
@@ -54813,7 +55206,7 @@
 +done
  
 -#undef $ac_func
-+for ac_func in getdirentries _write __write _fork __fork
++for ac_func in getdents __getdents _lseek __lseek _read __read
 +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"
@@ -54846,7 +55239,7 @@
 -  ;
 -  return 0;
 -}
-+for ac_func in _stat64 __stat64 _fstat64 __fstat64 _lstat64 __lstat64
++for ac_func in getdirentries _write __write _fork __fork
 +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"
@@ -54896,7 +55289,7 @@
 -as_val=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+for ac_func in __sys_llseek llseek _llseek __llseek readdir64 _readdir64 __readdir64
++for ac_func in _stat64 __stat64 _fstat64 __fstat64 _lstat64 __lstat64
 +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"
@@ -54907,12 +55300,24 @@
  _ACEOF
  
 -        # bigcrypt was found in libc or existing $LIBS
--
 +fi
 +done
  
++for ac_func in __sys_llseek llseek _llseek __llseek readdir64 _readdir64 __readdir64
++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
+ 
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_BIGCRYPT 1
++fi
++done
++
 +for ac_func in pread _pread __pread pread64 _pread64 __pread64
 +do :
 +  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
@@ -54940,9 +55345,9 @@
 +fi
 +done
  
--        # bigcrypt was not found, try adding libsecurity
+-        # bigcrypt was not found, try adding libsec
 -	case " $LIBS " in
--          *\ -lsecurity\ *)
+-          *\ -lsec\ *)
 +for ac_func in open64 _open64 __open64 creat64
 +do :
 +  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
@@ -54953,7 +55358,7 @@
 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 +_ACEOF
  
--		    # bigcrypt was not found and we already had libsecurity
+-		    # bigcrypt was not found and we already had libsec
 -		    # nothing to do here by default
 -		    true
 +fi
@@ -54961,14 +55366,14 @@
  
 -	    ;;
 -          *)
--	    # bigcrypt was not found, try adding libsecurity
--	    { $as_echo "$as_me:$LINENO: checking for bigcrypt in -lsecurity" >&5
--$as_echo_n "checking for bigcrypt in -lsecurity... " >&6; }
--if test "${ac_cv_lib_security_bigcrypt+set}" = set; then
+-	    # bigcrypt was not found, try adding libsec
+-	    { $as_echo "$as_me:$LINENO: checking for bigcrypt in -lsec" >&5
+-$as_echo_n "checking for bigcrypt in -lsec... " >&6; }
+-if test "${ac_cv_lib_sec_bigcrypt+set}" = set; then
 -  $as_echo_n "(cached) " >&6
 -else
 -  ac_check_lib_save_LIBS=$LIBS
--LIBS="-lsecurity  $LIBS"
+-LIBS="-lsec  $LIBS"
 -cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 +for ac_func in prctl
@@ -55028,13 +55433,13 @@
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
--  ac_cv_lib_security_bigcrypt=yes
+-  ac_cv_lib_sec_bigcrypt=yes
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 +if ac_fn_c_try_compile "$LINENO"; then :
  
--	ac_cv_lib_security_bigcrypt=no
+-	ac_cv_lib_sec_bigcrypt=no
 -fi
 +$as_echo "#define HAVE_PRCTL 1" >>confdefs.h
  
@@ -55043,11 +55448,11 @@
 -      conftest$ac_exeext conftest.$ac_ext
 -LIBS=$ac_check_lib_save_LIBS
  fi
--{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_security_bigcrypt" >&5
--$as_echo "$ac_cv_lib_security_bigcrypt" >&6; }
--if test "x$ac_cv_lib_security_bigcrypt" = x""yes; then
+-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_sec_bigcrypt" >&5
+-$as_echo "$ac_cv_lib_sec_bigcrypt" >&6; }
+-if test "x$ac_cv_lib_sec_bigcrypt" = x""yes; then
 -
--		LIBS="-lsecurity $LIBS"
+-		LIBS="-lsec $LIBS"
 -
 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  
@@ -55097,7 +55502,7 @@
  
 +       if test x"$linux_getgrouplist_ok" = x"yes"; then
  
--			# bigcrypt was not found in libsecurity
+-			# bigcrypt was not found in libsec
 -			# nothing to do here by default
 -			true
 -
@@ -55129,7 +55534,8 @@
 +#
  
 -
--for ac_func in bigcrypt
+-
+-for ac_func in getprpwnam
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
@@ -55155,7 +55561,7 @@
 -    which can conflict with char $ac_func (); 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
@@ -55163,7 +55569,7 @@
 -#endif
 -
 -#undef $ac_func
--
+ 
 -/* 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.  */
@@ -55225,12 +55631,12 @@
 +  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_stat64" >&5
 +$as_echo "$ac_cv_func_stat64" >&6; }
 +  if test x$ac_cv_func_stat64 = xyes ; then
++
++$as_echo "#define HAVE_STAT64 1" >>confdefs.h
  
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
-+$as_echo "#define HAVE_STAT64 1" >>confdefs.h
-+
 +  fi
  fi
 -ac_res=`eval 'as_val=${'$as_ac_var'}
@@ -55244,7 +55650,7 @@
 -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 -_ACEOF
  
--        # bigcrypt was found in libc or existing $LIBS
+-        # getprpwnam was found in libc or existing $LIBS
 +if test x$ac_cv_func_lstat64 = xno ; then
 +  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lstat64 in <sys/stat.h>" >&5
 +$as_echo_n "checking for lstat64 in <sys/stat.h>... " >&6; }
@@ -55257,7 +55663,7 @@
 +#include <sys/stat.h>
  
 -cat >>confdefs.h <<\_ACEOF
--#define HAVE_BIGCRYPT 1
+-#define HAVE_GETPRPWNAM 1
 +int
 +main ()
 +{
@@ -55282,24 +55688,24 @@
 -
 -else
 -
--        # bigcrypt was not found, try adding libsec
+-        # getprpwnam was not found, try adding libsecurity
 -	case " $LIBS " in
--          *\ -lsec\ *)
+-          *\ -lsecurity\ *)
 -
--		    # bigcrypt was not found and we already had libsec
+-		    # getprpwnam was not found and we already had libsecurity
 -		    # nothing to do here by default
 -		    true
 -
 -	    ;;
 -          *)
--	    # bigcrypt was not found, try adding libsec
--	    { $as_echo "$as_me:$LINENO: checking for bigcrypt in -lsec" >&5
--$as_echo_n "checking for bigcrypt in -lsec... " >&6; }
--if test "${ac_cv_lib_sec_bigcrypt+set}" = set; then
+-	    # getprpwnam was not found, try adding libsecurity
+-	    { $as_echo "$as_me:$LINENO: checking for getprpwnam in -lsecurity" >&5
+-$as_echo_n "checking for getprpwnam in -lsecurity... " >&6; }
+-if test "${ac_cv_lib_security_getprpwnam+set}" = set; then
 -  $as_echo_n "(cached) " >&6
 -else
 -  ac_check_lib_save_LIBS=$LIBS
--LIBS="-lsec  $LIBS"
+-LIBS="-lsecurity  $LIBS"
 -cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
@@ -55319,13 +55725,13 @@
 +#if defined(HAVE_UNISTD_H)
 +#include <unistd.h>
  #endif
--char bigcrypt ();
+-char getprpwnam ();
 +#include <sys/stat.h>
 +
  int
  main ()
  {
--return bigcrypt ();
+-return getprpwnam ();
 +struct stat64 st64; exit(fstat64(0,&st64));
    ;
    return 0;
@@ -55352,12 +55758,12 @@
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
--  ac_cv_lib_sec_bigcrypt=yes
+-  ac_cv_lib_security_getprpwnam=yes
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
--	ac_cv_lib_sec_bigcrypt=no
+-	ac_cv_lib_security_getprpwnam=no
 +if ac_fn_c_try_link "$LINENO"; then :
 +  ac_cv_func_fstat64=yes
  fi
@@ -55375,11 +55781,11 @@
 +
 +  fi
  fi
--{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_sec_bigcrypt" >&5
--$as_echo "$ac_cv_lib_sec_bigcrypt" >&6; }
--if test "x$ac_cv_lib_sec_bigcrypt" = x""yes; then
+-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_security_getprpwnam" >&5
+-$as_echo "$ac_cv_lib_security_getprpwnam" >&6; }
+-if test "x$ac_cv_lib_security_getprpwnam" = x""yes; then
  
--		LIBS="-lsec $LIBS"
+-		LIBS="-lsecurity $LIBS"
 +#################################################
 +# Check whether struct stat has timestamps with sub-second resolution.
 +#
@@ -55389,7 +55795,7 @@
 +if test "x$ac_cv_member_struct_stat_st_mtim_tv_nsec" = x""yes; then :
  
 -cat >>confdefs.h <<\_ACEOF
--#define HAVE_BIGCRYPT 1
+-#define HAVE_GETPRPWNAM 1
 +cat >>confdefs.h <<_ACEOF
 +#define HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC 1
  _ACEOF
@@ -55410,7 +55816,7 @@
 +	samba_cv_stat_hires=yes
 +fi
  
--			# bigcrypt was not found in libsec
+-			# getprpwnam was not found in libsecurity
 -			# nothing to do here by default
 -			true
 +ac_fn_c_check_member "$LINENO" "struct stat" "st_mtimespec.tv_nsec" "ac_cv_member_struct_stat_st_mtimespec_tv_nsec" "$ac_includes_default"
@@ -55428,16 +55834,15 @@
 -        esac
 +ac_fn_c_check_member "$LINENO" "struct stat" "st_mtime_n" "ac_cv_member_struct_stat_st_mtime_n" "$ac_includes_default"
 +if test "x$ac_cv_member_struct_stat_st_mtime_n" = x""yes; then :
- 
--fi
--done
++
 +cat >>confdefs.h <<_ACEOF
 +#define HAVE_STRUCT_STAT_ST_MTIME_N 1
 +_ACEOF
  
 +# AIX
 +	samba_cv_stat_hires=yes
-+fi
+ fi
+-done
  
 +ac_fn_c_check_member "$LINENO" "struct stat" "st_umtime" "ac_cv_member_struct_stat_st_umtime" "$ac_includes_default"
 +if test "x$ac_cv_member_struct_stat_st_umtime" = x""yes; then :
@@ -55578,27 +55983,27 @@
 -else
 +fi
  
--        # getprpwnam was not found, try adding libsecurity
+-        # getprpwnam was not found, try adding libsec
 -	case " $LIBS " in
--          *\ -lsecurity\ *)
+-          *\ -lsec\ *)
  
--		    # getprpwnam was not found and we already had libsecurity
+-		    # getprpwnam was not found and we already had libsec
 -		    # nothing to do here by default
 -		    true
  
 -	    ;;
 -          *)
--	    # getprpwnam was not found, try adding libsecurity
--	    { $as_echo "$as_me:$LINENO: checking for getprpwnam in -lsecurity" >&5
--$as_echo_n "checking for getprpwnam in -lsecurity... " >&6; }
--if test "${ac_cv_lib_security_getprpwnam+set}" = set; then
+-	    # getprpwnam was not found, try adding libsec
+-	    { $as_echo "$as_me:$LINENO: checking for getprpwnam in -lsec" >&5
+-$as_echo_n "checking for getprpwnam in -lsec... " >&6; }
+-if test "${ac_cv_lib_sec_getprpwnam+set}" = set; then
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether there is DOS flags support in the stat struct" >&5
 +$as_echo_n "checking whether there is DOS flags support in the stat struct... " >&6; }
 +if test "${samba_cv_stat_dos_flags+set}" = set; then :
    $as_echo_n "(cached) " >&6
  else
 -  ac_check_lib_save_LIBS=$LIBS
--LIBS="-lsecurity  $LIBS"
+-LIBS="-lsec  $LIBS"
 -cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
@@ -55653,14 +56058,14 @@
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
--  ac_cv_lib_security_getprpwnam=yes
+-  ac_cv_lib_sec_getprpwnam=yes
 +if ac_fn_c_try_compile "$LINENO"; then :
 +  samba_cv_stat_dos_flags=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
--	ac_cv_lib_security_getprpwnam=no
+-	ac_cv_lib_sec_getprpwnam=no
 +  samba_cv_stat_dos_flags=no
  fi
 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
@@ -55670,11 +56075,11 @@
 -      conftest$ac_exeext conftest.$ac_ext
 -LIBS=$ac_check_lib_save_LIBS
  fi
--{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_security_getprpwnam" >&5
--$as_echo "$ac_cv_lib_security_getprpwnam" >&6; }
--if test "x$ac_cv_lib_security_getprpwnam" = x""yes; then
+-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_sec_getprpwnam" >&5
+-$as_echo "$ac_cv_lib_sec_getprpwnam" >&6; }
+-if test "x$ac_cv_lib_sec_getprpwnam" = x""yes; then
 -
--		LIBS="-lsecurity $LIBS"
+-		LIBS="-lsec $LIBS"
 -
 -
 -cat >>confdefs.h <<\_ACEOF
@@ -55686,7 +56091,7 @@
 -else
 -
 -
--			# getprpwnam was not found in libsecurity
+-			# getprpwnam was not found in libsec
 -			# nothing to do here by default
 -			true
 -
@@ -55702,11 +56107,11 @@
  
  fi
 -done
+ 
 -
 -
- 
 -
--for ac_func in getprpwnam
+-for ac_func in strsignal
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
@@ -55747,7 +56152,7 @@
  
  /* Override any GCC internal prototype to avoid an error.
     Use char because int might match the return type of a GCC
-@@ -49354,100 +16292,43 @@
+@@ -49709,85 +16291,43 @@
  #ifdef __cplusplus
  extern "C"
  #endif
@@ -55820,69 +56225,62 @@
 +if test "x$ac_cv_lib_resolv_dn_expand" = x""yes; then :
    cat >>confdefs.h <<_ACEOF
 -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
--_ACEOF
--
--        # getprpwnam was found in libc or existing $LIBS
--
--
--cat >>confdefs.h <<\_ACEOF
--#define HAVE_GETPRPWNAM 1
 +#define HAVE_LIBRESOLV 1
  _ACEOF
  
+-fi
+-done
 +  LIBS="-lresolv $LIBS"
  
 +fi
  
--else
--
--        # getprpwnam was not found, try adding libsec
--	case " $LIBS " in
--          *\ -lsec\ *)
--
--		    # getprpwnam was not found and we already had libsec
--		    # nothing to do here by default
--		    true
--
--	    ;;
--          *)
--	    # getprpwnam was not found, try adding libsec
--	    { $as_echo "$as_me:$LINENO: checking for getprpwnam in -lsec" >&5
--$as_echo_n "checking for getprpwnam in -lsec... " >&6; }
--if test "${ac_cv_lib_sec_getprpwnam+set}" = set; then
+-############################################
+-# Check if we have libattr
+-case "$host_os" in
+-  *osf*)
+-	{ $as_echo "$as_me:$LINENO: checking for library containing getproplist" >&5
+-$as_echo_n "checking for library containing getproplist... " >&6; }
+-if test "${ac_cv_search_getproplist+set}" = set; then
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _dn_expand in -lresolv" >&5
 +$as_echo_n "checking for _dn_expand in -lresolv... " >&6; }
 +if test "${ac_cv_lib_resolv__dn_expand+set}" = set; then :
    $as_echo_n "(cached) " >&6
  else
-   ac_check_lib_save_LIBS=$LIBS
--LIBS="-lsec  $LIBS"
+-  ac_func_search_save_LIBS=$LIBS
 -cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
++  ac_check_lib_save_LIBS=$LIBS
 +LIBS="-lresolv  $LIBS"
 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -49456,111 +16337,44 @@
+@@ -49796,108 +16336,44 @@
  #ifdef __cplusplus
  extern "C"
  #endif
--char getprpwnam ();
+-char getproplist ();
 +char _dn_expand ();
  int
  main ()
  {
--return getprpwnam ();
+-return getproplist ();
 +return _dn_expand ();
    ;
    return 0;
  }
  _ACEOF
--rm -f conftest.$ac_objext conftest$ac_exeext
+-for ac_lib in '' proplist; 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
+-  rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
 -  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -55903,63 +56301,56 @@
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
--  ac_cv_lib_sec_getprpwnam=yes
+-  ac_cv_search_getproplist=$ac_res
+-else
+-  $as_echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-
+-fi
+-
+-rm -rf conftest.dSYM
+-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+-      conftest$ac_exeext
+-  if test "${ac_cv_search_getproplist+set}" = set; then
+-  break
+-fi
+-done
+-if test "${ac_cv_search_getproplist+set}" = set; then
+-  :
 +if ac_fn_c_try_link "$LINENO"; then :
 +  ac_cv_lib_resolv__dn_expand=yes
  else
--  $as_echo "$as_me: failed program was:" >&5
--sed 's/^/| /' conftest.$ac_ext >&5
--
--	ac_cv_lib_sec_getprpwnam=no
+-  ac_cv_search_getproplist=no
+-fi
+-rm conftest.$ac_ext
+-LIBS=$ac_func_search_save_LIBS
 +  ac_cv_lib_resolv__dn_expand=no
  fi
+-{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_getproplist" >&5
+-$as_echo "$ac_cv_search_getproplist" >&6; }
+-ac_res=$ac_cv_search_getproplist
+-if test "$ac_res" != no; then
+-  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
 -
--rm -rf conftest.dSYM
--rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
--      conftest$ac_exeext conftest.$ac_ext
 +rm -f core conftest.err conftest.$ac_objext \
 +    conftest$ac_exeext conftest.$ac_ext
- LIBS=$ac_check_lib_save_LIBS
++LIBS=$ac_check_lib_save_LIBS
  fi
--{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_sec_getprpwnam" >&5
--$as_echo "$ac_cv_lib_sec_getprpwnam" >&6; }
--if test "x$ac_cv_lib_sec_getprpwnam" = x""yes; then
--
--		LIBS="-lsec $LIBS"
--
--
--cat >>confdefs.h <<\_ACEOF
--#define HAVE_GETPRPWNAM 1
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv__dn_expand" >&5
 +$as_echo "$ac_cv_lib_resolv__dn_expand" >&6; }
 +if test "x$ac_cv_lib_resolv__dn_expand" = x""yes; then :
 +  cat >>confdefs.h <<_ACEOF
 +#define HAVE_LIBRESOLV 1
- _ACEOF
++_ACEOF
  
--
--
--else
--
--
--			# getprpwnam was not found in libsec
--			# nothing to do here by default
--			true
--
--
--fi
--
--	  ;;
--        esac
 +  LIBS="-lresolv $LIBS"
  
- fi
--done
--
++fi
  
 -
 -
--for ac_func in strsignal
+-for ac_func in getproplist fgetproplist setproplist fsetproplist
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
@@ -55998,7 +56389,7 @@
  
  /* Override any GCC internal prototype to avoid an error.
     Use char because int might match the return type of a GCC
-@@ -49568,85 +16382,79 @@
+@@ -49905,103 +16381,80 @@
  #ifdef __cplusplus
  extern "C"
  #endif
@@ -56047,18 +56438,28 @@
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
++  ac_cv_lib_resolv___dn_expand=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_resolv___dn_expand" >&5
++$as_echo "$ac_cv_lib_resolv___dn_expand" >&6; }
++if test "x$ac_cv_lib_resolv___dn_expand" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_LIBRESOLV 1
++_ACEOF
++
++  LIBS="-lresolv $LIBS"
+ 
 -	eval "$as_ac_var=no"
-+  ac_cv_lib_resolv___dn_expand=no
  fi
--
+ 
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
-+rm -f core conftest.err conftest.$ac_objext \
-+    conftest$ac_exeext conftest.$ac_ext
-+LIBS=$ac_check_lib_save_LIBS
- fi
+-fi
 -ac_res=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
@@ -56066,27 +56467,7 @@
 -as_val=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv___dn_expand" >&5
-+$as_echo "$ac_cv_lib_resolv___dn_expand" >&6; }
-+if test "x$ac_cv_lib_resolv___dn_expand" = x""yes; then :
-   cat >>confdefs.h <<_ACEOF
--#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-+#define HAVE_LIBRESOLV 1
- _ACEOF
- 
-+  LIBS="-lresolv $LIBS"
 +
- fi
--done
- 
- 
--############################################
--# Check if we have libattr
--case "$host_os" in
--  *osf*)
--	{ $as_echo "$as_me:$LINENO: checking for library containing getproplist" >&5
--$as_echo_n "checking for library containing getproplist... " >&6; }
--if test "${ac_cv_search_getproplist+set}" = set; then
 +#
 +# Check for the functions putprpwnam, set_auth_parameters,
 +# getspnam, bigcrypt and getprpwnam in -lsec and -lsecurity
@@ -56098,137 +56479,21 @@
 +do :
 +  ac_fn_c_check_func "$LINENO" "putprpwnam" "ac_cv_func_putprpwnam"
 +if test "x$ac_cv_func_putprpwnam" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
+   cat >>confdefs.h <<_ACEOF
+-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 +#define HAVE_PUTPRPWNAM 1
-+_ACEOF
-+
-+        # putprpwnam was found in libc or existing $LIBS
-+
-+
-+$as_echo "#define HAVE_PUTPRPWNAM 1" >>confdefs.h
-+
-+
-+
-+else
-+
-+        # putprpwnam was not found, try adding libsecurity
-+	case " $LIBS " in
-+          *\ -lsecurity\ *)
-+
-+		    # putprpwnam was not found and we already had libsecurity
-+		    # nothing to do here by default
-+		    true
-+
-+	    ;;
-+          *)
-+	    # putprpwnam was not found, try adding libsecurity
-+	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for putprpwnam in -lsecurity" >&5
-+$as_echo_n "checking for putprpwnam in -lsecurity... " >&6; }
-+if test "${ac_cv_lib_security_putprpwnam+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
--  ac_func_search_save_LIBS=$LIBS
--cat >conftest.$ac_ext <<_ACEOF
--/* confdefs.h.  */
--_ACEOF
--cat confdefs.h >>conftest.$ac_ext
--cat >>conftest.$ac_ext <<_ACEOF
-+  ac_check_lib_save_LIBS=$LIBS
-+LIBS="-lsecurity  $LIBS"
-+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
+ _ACEOF
  
- /* Override any GCC internal prototype to avoid an error.
-@@ -49655,212 +16463,90 @@
- #ifdef __cplusplus
- extern "C"
- #endif
--char getproplist ();
-+char putprpwnam ();
- int
- main ()
- {
--return getproplist ();
-+return putprpwnam ();
-   ;
-   return 0;
- }
- _ACEOF
--for ac_lib in '' proplist; 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
--  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:$LINENO: $ac_try_echo\""
--$as_echo "$ac_try_echo") >&5
--  (eval "$ac_link") 2>conftest.er1
--  ac_status=$?
--  grep -v '^ *+' conftest.er1 >conftest.err
--  rm -f conftest.er1
--  cat conftest.err >&5
--  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
--  (exit $ac_status); } && {
--	 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_cv_search_getproplist=$ac_res
--else
--  $as_echo "$as_me: failed program was:" >&5
--sed 's/^/| /' conftest.$ac_ext >&5
--
--
 -fi
--
--rm -rf conftest.dSYM
--rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
--      conftest$ac_exeext
--  if test "${ac_cv_search_getproplist+set}" = set; then
--  break
--fi
 -done
--if test "${ac_cv_search_getproplist+set}" = set; then
--  :
-+if ac_fn_c_try_link "$LINENO"; then :
-+  ac_cv_lib_security_putprpwnam=yes
- else
--  ac_cv_search_getproplist=no
-+  ac_cv_lib_security_putprpwnam=no
- fi
--rm conftest.$ac_ext
--LIBS=$ac_func_search_save_LIBS
-+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:$LINENO: result: $ac_cv_search_getproplist" >&5
--$as_echo "$ac_cv_search_getproplist" >&6; }
--ac_res=$ac_cv_search_getproplist
--if test "$ac_res" != no; then
--  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_security_putprpwnam" >&5
-+$as_echo "$ac_cv_lib_security_putprpwnam" >&6; }
-+if test "x$ac_cv_lib_security_putprpwnam" = x""yes; then :
++        # putprpwnam was found in libc or existing $LIBS
  
--fi
-+		LIBS="-lsecurity $LIBS"
  
- 
 +$as_echo "#define HAVE_PUTPRPWNAM 1" >>confdefs.h
  
  
  
--for ac_func in getproplist fgetproplist setproplist fsetproplist
+-for ac_func in delproplist fdelproplist add_proplist_entry get_proplist_entry
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
@@ -56250,24 +56515,39 @@
 -    which can conflict with char $ac_func (); below.
 -    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
 -    <limits.h> exists even on freestanding compilers.  */
++        # putprpwnam was not found, try adding libsecurity
++	case " $LIBS " in
++          *\ -lsecurity\ *)
  
 -#ifdef __STDC__
 -# include <limits.h>
 -#else
 -# include <assert.h>
 -#endif
-+			# putprpwnam was not found in libsecurity
-+			# nothing to do here by default
-+			true
++		    # putprpwnam was not found and we already had libsecurity
++		    # nothing to do here by default
++		    true
  
 -#undef $ac_func
++	    ;;
++          *)
++	    # putprpwnam was not found, try adding libsecurity
++	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for putprpwnam in -lsecurity" >&5
++$as_echo_n "checking for putprpwnam in -lsecurity... " >&6; }
++if test "${ac_cv_lib_security_putprpwnam+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  ac_check_lib_save_LIBS=$LIBS
++LIBS="-lsecurity  $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
+ /* Override any GCC internal prototype to avoid an error.
+    Use char because int might match the return type of a GCC
+@@ -50009,100 +16462,90 @@
+ #ifdef __cplusplus
+ extern "C"
+ #endif
 -char $ac_func ();
 -/* The GNU C library defines this for functions which it implements
 -    to always fail with ENOSYS.  Some functions are actually named
@@ -56275,16 +56555,17 @@
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
 -#endif
-+fi
- 
--int
--main ()
--{
+-
++char putprpwnam ();
+ int
+ main ()
+ {
 -return $ac_func ();
--  ;
--  return 0;
--}
--_ACEOF
++return putprpwnam ();
+   ;
+   return 0;
+ }
+ _ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -56307,20 +56588,46 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  eval "$as_ac_var=yes"
--else
++if ac_fn_c_try_link "$LINENO"; then :
++  ac_cv_lib_security_putprpwnam=yes
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+	  ;;
-+        esac
++  ac_cv_lib_security_putprpwnam=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_security_putprpwnam" >&5
++$as_echo "$ac_cv_lib_security_putprpwnam" >&6; }
++if test "x$ac_cv_lib_security_putprpwnam" = x""yes; then :
++
++		LIBS="-lsecurity $LIBS"
++
++
++$as_echo "#define HAVE_PUTPRPWNAM 1" >>confdefs.h
++
++
++
++else
++
++
++			# putprpwnam was not found in libsecurity
++			# nothing to do here by default
++			true
++
  
 -	eval "$as_ac_var=no"
  fi
-+done
  
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
--fi
++	  ;;
++        esac
++
+ fi
 -ac_res=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
@@ -56328,8 +56635,10 @@
 -as_val=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
++done
 +
 +
++
 +  for ac_func in putprpwnam
 +do :
 +  ac_fn_c_check_func "$LINENO" "putprpwnam" "ac_cv_func_putprpwnam"
@@ -56342,13 +56651,13 @@
 -fi
 -done
 +        # putprpwnam was found in libc or existing $LIBS
- 
- 
++
++
 +$as_echo "#define HAVE_PUTPRPWNAM 1" >>confdefs.h
++
  
  
- 
--for ac_func in delproplist fdelproplist add_proplist_entry get_proplist_entry
+-for ac_func in sizeof_proplist_entry
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
@@ -56399,7 +56708,7 @@
  
  /* Override any GCC internal prototype to avoid an error.
     Use char because int might match the return type of a GCC
-@@ -49868,100 +16554,91 @@
+@@ -50110,82 +16553,90 @@
  #ifdef __cplusplus
  extern "C"
  #endif
@@ -56507,86 +56816,70 @@
 -fi
 -done
 +        # set_auth_parameters was found in libc or existing $LIBS
+ 
+-  ;;
+-  *)
+-	{ $as_echo "$as_me:$LINENO: checking for library containing getxattr" >&5
+-$as_echo_n "checking for library containing getxattr... " >&6; }
+-if test "${ac_cv_search_getxattr+set}" = set; then
 +
-+
 +$as_echo "#define HAVE_SET_AUTH_PARAMETERS 1" >>confdefs.h
 +
- 
- 
--for ac_func in sizeof_proplist_entry
--do
--as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
--{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
--$as_echo_n "checking for $ac_func... " >&6; }
--if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
--  $as_echo_n "(cached) " >&6
- else
--  cat >conftest.$ac_ext <<_ACEOF
--/* confdefs.h.  */
--_ACEOF
--cat confdefs.h >>conftest.$ac_ext
--cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
--/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
--   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
--#define $ac_func innocuous_$ac_func
- 
--/* System header to define __stub macros and hopefully few prototypes,
--    which can conflict with char $ac_func (); below.
--    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
--    <limits.h> exists even on freestanding compilers.  */
++
++
++else
++
 +        # set_auth_parameters was not found, try adding libsecurity
 +	case " $LIBS " in
 +          *\ -lsecurity\ *)
- 
--#ifdef __STDC__
--# include <limits.h>
--#else
--# include <assert.h>
--#endif
++
 +		    # set_auth_parameters was not found and we already had libsecurity
 +		    # nothing to do here by default
 +		    true
- 
--#undef $ac_func
++
 +	    ;;
 +          *)
 +	    # set_auth_parameters was not found, try adding libsecurity
 +	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for set_auth_parameters in -lsecurity" >&5
 +$as_echo_n "checking for set_auth_parameters in -lsecurity... " >&6; }
 +if test "${ac_cv_lib_security_set_auth_parameters+set}" = set; then :
-+  $as_echo_n "(cached) " >&6
-+else
+   $as_echo_n "(cached) " >&6
+ else
+-  ac_func_search_save_LIBS=$LIBS
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
 +  ac_check_lib_save_LIBS=$LIBS
 +LIBS="-lsecurity  $LIBS"
 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h.  */
+ /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-    Use char because int might match the return type of a GCC
-@@ -49969,82 +16646,89 @@
+@@ -50194,109 +16645,90 @@
  #ifdef __cplusplus
  extern "C"
  #endif
--char $ac_func ();
--/* The GNU C library defines this for functions which it implements
--    to always fail with ENOSYS.  Some functions are actually named
--    something starting with __ and the normal name is an alias.  */
--#if defined __stub_$ac_func || defined __stub___$ac_func
--choke me
--#endif
--
+-char getxattr ();
 +char set_auth_parameters ();
  int
  main ()
  {
--return $ac_func ();
+-return getxattr ();
 +return set_auth_parameters ();
    ;
    return 0;
  }
  _ACEOF
--rm -f conftest.$ac_objext conftest$ac_exeext
+-for ac_lib in '' attr; 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
+-  rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
 -  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -56607,7 +56900,7 @@
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
--  eval "$as_ac_var=yes"
+-  ac_cv_search_getxattr=$ac_res
 +if ac_fn_c_try_link "$LINENO"; then :
 +  ac_cv_lib_security_set_auth_parameters=yes
  else
@@ -56627,34 +56920,42 @@
 +
 +
 +$as_echo "#define HAVE_SET_AUTH_PARAMETERS 1" >>confdefs.h
+ 
+ 
+-fi
+ 
+-rm -rf conftest.dSYM
+-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+-      conftest$ac_exeext
+-  if test "${ac_cv_search_getxattr+set}" = set; then
+-  break
+-fi
+-done
+-if test "${ac_cv_search_getxattr+set}" = set; then
+-  :
+ else
+-  ac_cv_search_getxattr=no
+-fi
+-rm conftest.$ac_ext
+-LIBS=$ac_func_search_save_LIBS
 +
 +
-+
-+else
-+
-+
 +			# set_auth_parameters was not found in libsecurity
 +			# nothing to do here by default
 +			true
 +
- 
--	eval "$as_ac_var=no"
++
  fi
- 
--rm -rf conftest.dSYM
--rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
--      conftest$ac_exeext conftest.$ac_ext
+-{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_getxattr" >&5
+-$as_echo "$ac_cv_search_getxattr" >&6; }
+-ac_res=$ac_cv_search_getxattr
+-if test "$ac_res" != no; then
+-  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
++
 +	  ;;
 +        esac
-+
+ 
  fi
--ac_res=`eval 'as_val=${'$as_ac_var'}
--		 $as_echo "$as_val"'`
--	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
--$as_echo "$ac_res" >&6; }
--as_val=`eval 'as_val=${'$as_ac_var'}
--		 $as_echo "$as_val"'`
--   if test "x$as_val" = x""yes; then
 +done
 +
 +
@@ -56663,78 +56964,91 @@
 +do :
 +  ac_fn_c_check_func "$LINENO" "set_auth_parameters" "ac_cv_func_set_auth_parameters"
 +if test "x$ac_cv_func_set_auth_parameters" = x""yes; then :
-   cat >>confdefs.h <<_ACEOF
--#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
++  cat >>confdefs.h <<_ACEOF
 +#define HAVE_SET_AUTH_PARAMETERS 1
- _ACEOF
++_ACEOF
  
--fi
--done
 +        # set_auth_parameters was found in libc or existing $LIBS
  
--  ;;
--  *)
--	{ $as_echo "$as_me:$LINENO: checking for library containing getxattr" >&5
--$as_echo_n "checking for library containing getxattr... " >&6; }
--if test "${ac_cv_search_getxattr+set}" = set; then
-+
+ 
 +$as_echo "#define HAVE_SET_AUTH_PARAMETERS 1" >>confdefs.h
-+
-+
-+
-+else
-+
+ 
+ 
+ 
+-for ac_func in getxattr lgetxattr fgetxattr listxattr llistxattr
+-do
+-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
+-$as_echo_n "checking for $ac_func... " >&6; }
+-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+-  $as_echo_n "(cached) " >&6
+ else
+-  cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
+-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+-#define $ac_func innocuous_$ac_func
+ 
+-/* System header to define __stub macros and hopefully few prototypes,
+-    which can conflict with char $ac_func (); below.
+-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+-    <limits.h> exists even on freestanding compilers.  */
 +        # set_auth_parameters was not found, try adding libsec
 +	case " $LIBS " in
 +          *\ -lsec\ *)
-+
+ 
+-#ifdef __STDC__
+-# include <limits.h>
+-#else
+-# include <assert.h>
+-#endif
 +		    # set_auth_parameters was not found and we already had libsec
 +		    # nothing to do here by default
 +		    true
-+
+ 
+-#undef $ac_func
 +	    ;;
 +          *)
 +	    # set_auth_parameters was not found, try adding libsec
 +	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for set_auth_parameters in -lsec" >&5
 +$as_echo_n "checking for set_auth_parameters in -lsec... " >&6; }
 +if test "${ac_cv_lib_sec_set_auth_parameters+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
--  ac_func_search_save_LIBS=$LIBS
--cat >conftest.$ac_ext <<_ACEOF
--/* confdefs.h.  */
--_ACEOF
--cat confdefs.h >>conftest.$ac_ext
--cat >>conftest.$ac_ext <<_ACEOF
++  $as_echo_n "(cached) " >&6
++else
 +  ac_check_lib_save_LIBS=$LIBS
 +LIBS="-lsec  $LIBS"
 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
++/* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -50053,109 +16737,92 @@
+    Use char because int might match the return type of a GCC
+@@ -50304,105 +16736,92 @@
  #ifdef __cplusplus
  extern "C"
  #endif
--char getxattr ();
+-char $ac_func ();
+-/* The GNU C library defines this for functions which it implements
+-    to always fail with ENOSYS.  Some functions are actually named
+-    something starting with __ and the normal name is an alias.  */
+-#if defined __stub_$ac_func || defined __stub___$ac_func
+-choke me
+-#endif
+-
 +char set_auth_parameters ();
  int
  main ()
  {
--return getxattr ();
+-return $ac_func ();
 +return set_auth_parameters ();
    ;
    return 0;
  }
  _ACEOF
--for ac_lib in '' attr; 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
--  rm -f conftest.$ac_objext conftest$ac_exeext
+-rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
 -  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -56755,18 +57069,20 @@
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
--  ac_cv_search_getxattr=$ac_res
+-  eval "$as_ac_var=yes"
 +if ac_fn_c_try_link "$LINENO"; then :
 +  ac_cv_lib_sec_set_auth_parameters=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	eval "$as_ac_var=no"
 +  ac_cv_lib_sec_set_auth_parameters=no
 +fi
 +rm -f core conftest.err conftest.$ac_objext \
 +    conftest$ac_exeext conftest.$ac_ext
 +LIBS=$ac_check_lib_save_LIBS
-+fi
+ fi
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sec_set_auth_parameters" >&5
 +$as_echo "$ac_cv_lib_sec_set_auth_parameters" >&6; }
 +if test "x$ac_cv_lib_sec_set_auth_parameters" = x""yes; then :
@@ -56775,43 +57091,37 @@
 +
 +
 +$as_echo "#define HAVE_SET_AUTH_PARAMETERS 1" >>confdefs.h
- 
- 
--fi
- 
--rm -rf conftest.dSYM
--rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
--      conftest$ac_exeext
--  if test "${ac_cv_search_getxattr+set}" = set; then
--  break
--fi
--done
--if test "${ac_cv_search_getxattr+set}" = set; then
--  :
- else
--  ac_cv_search_getxattr=no
--fi
--rm conftest.$ac_ext
--LIBS=$ac_func_search_save_LIBS
 +
 +
++
++else
++
++
 +			# set_auth_parameters was not found in libsec
 +			# nothing to do here by default
 +			true
 +
-+
+ 
+-rm -rf conftest.dSYM
+-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+-      conftest$ac_exeext conftest.$ac_ext
  fi
--{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_getxattr" >&5
--$as_echo "$ac_cv_search_getxattr" >&6; }
--ac_res=$ac_cv_search_getxattr
--if test "$ac_res" != no; then
--  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+-ac_res=`eval 'as_val=${'$as_ac_var'}
+-		 $as_echo "$as_val"'`
+-	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+-$as_echo "$ac_res" >&6; }
+-as_val=`eval 'as_val=${'$as_ac_var'}
+-		 $as_echo "$as_val"'`
+-   if test "x$as_val" = x""yes; then
+-  cat >>confdefs.h <<_ACEOF
+-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+-_ACEOF
 +
 +	  ;;
 +        esac
  
  fi
-+done
+ done
  
  
  
@@ -56827,12 +57137,12 @@
 +
 +        # getspnam was found in libc or existing $LIBS
 +
-+
+ 
 +$as_echo "#define HAVE_GETSPNAM 1" >>confdefs.h
  
  
  
--for ac_func in getxattr lgetxattr fgetxattr listxattr llistxattr
+-for ac_func in getea fgetea lgetea listea flistea llistea
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
@@ -56883,7 +57193,7 @@
  
  /* Override any GCC internal prototype to avoid an error.
     Use char because int might match the return type of a GCC
-@@ -50163,65 +16830,47 @@
+@@ -50410,65 +16829,47 @@
  #ifdef __cplusplus
  extern "C"
  #endif
@@ -56935,11 +57245,11 @@
 -
 -	eval "$as_ac_var=no"
 +  ac_cv_lib_gen_getspnam=no
-+fi
+ fi
 +rm -f core conftest.err conftest.$ac_objext \
 +    conftest$ac_exeext conftest.$ac_ext
 +LIBS=$ac_check_lib_save_LIBS
- fi
++fi
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gen_getspnam" >&5
 +$as_echo "$ac_cv_lib_gen_getspnam" >&6; }
 +if test "x$ac_cv_lib_gen_getspnam" = x""yes; then :
@@ -56979,7 +57289,7 @@
  
  fi
  done
-@@ -50229,39 +16878,43 @@
+@@ -50476,39 +16877,43 @@
  
  
  
@@ -56998,7 +57308,7 @@
  
  
  
--for ac_func in getea fgetea lgetea listea flistea llistea
+-for ac_func in removeea fremoveea lremoveea setea fsetea lsetea
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
@@ -57049,7 +57359,7 @@
  
  /* Override any GCC internal prototype to avoid an error.
     Use char because int might match the return type of a GCC
-@@ -50269,105 +16922,90 @@
+@@ -50516,103 +16921,90 @@
  #ifdef __cplusplus
  extern "C"
  #endif
@@ -57098,14 +57408,12 @@
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
--	eval "$as_ac_var=no"
 +  ac_cv_lib_security_getspnam=no
 +fi
 +rm -f core conftest.err conftest.$ac_objext \
 +    conftest$ac_exeext conftest.$ac_ext
 +LIBS=$ac_check_lib_save_LIBS
- fi
++fi
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_security_getspnam" >&5
 +$as_echo "$ac_cv_lib_security_getspnam" >&6; }
 +if test "x$ac_cv_lib_security_getspnam" = x""yes; then :
@@ -57125,9 +57433,15 @@
 +			true
 +
  
+-	eval "$as_ac_var=no"
+ fi
+ 
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
++	  ;;
++        esac
++
  fi
 -ac_res=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
@@ -57136,26 +57450,21 @@
 -as_val=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
--  cat >>confdefs.h <<_ACEOF
--#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
--_ACEOF
++done
 +
-+	  ;;
-+        esac
- 
- fi
- done
- 
- 
- 
++
++
 +  for ac_func in getspnam
 +do :
 +  ac_fn_c_check_func "$LINENO" "getspnam" "ac_cv_func_getspnam"
 +if test "x$ac_cv_func_getspnam" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
+   cat >>confdefs.h <<_ACEOF
+-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 +#define HAVE_GETSPNAM 1
-+_ACEOF
-+
+ _ACEOF
+ 
+-fi
+-done
 +        # getspnam was found in libc or existing $LIBS
 +
  
@@ -57163,58 +57472,59 @@
  
  
  
--for ac_func in removeea fremoveea lremoveea setea fsetea lsetea
++else
++
++        # getspnam was not found, try adding libsec
++	case " $LIBS " in
++          *\ -lsec\ *)
++
++		    # getspnam was not found and we already had libsec
++		    # nothing to do here by default
++		    true
+ 
+-for ac_func in flistxattr removexattr lremovexattr fremovexattr
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
 -$as_echo_n "checking for $ac_func... " >&6; }
 -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
--  $as_echo_n "(cached) " >&6
++	    ;;
++          *)
++	    # getspnam was not found, try adding libsec
++	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getspnam in -lsec" >&5
++$as_echo_n "checking for getspnam in -lsec... " >&6; }
++if test "${ac_cv_lib_sec_getspnam+set}" = set; then :
+   $as_echo_n "(cached) " >&6
  else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
++  ac_check_lib_save_LIBS=$LIBS
++LIBS="-lsec  $LIBS"
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
 -/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
 -   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
 -#define $ac_func innocuous_$ac_func
- 
+-
 -/* System header to define __stub macros and hopefully few prototypes,
 -    which can conflict with char $ac_func (); below.
 -    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
 -    <limits.h> exists even on freestanding compilers.  */
-+        # getspnam was not found, try adding libsec
-+	case " $LIBS " in
-+          *\ -lsec\ *)
- 
+-
 -#ifdef __STDC__
 -# include <limits.h>
 -#else
 -# include <assert.h>
 -#endif
-+		    # getspnam was not found and we already had libsec
-+		    # nothing to do here by default
-+		    true
- 
+-
 -#undef $ac_func
-+	    ;;
-+          *)
-+	    # getspnam was not found, try adding libsec
-+	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getspnam in -lsec" >&5
-+$as_echo_n "checking for getspnam in -lsec... " >&6; }
-+if test "${ac_cv_lib_sec_getspnam+set}" = set; then :
-+  $as_echo_n "(cached) " >&6
-+else
-+  ac_check_lib_save_LIBS=$LIBS
-+LIBS="-lsec  $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
-@@ -50375,103 +17013,91 @@
+@@ -50620,102 +17012,91 @@
  #ifdef __cplusplus
  extern "C"
  #endif
@@ -57322,65 +57632,64 @@
 -fi
 -done
 +        # bigcrypt was found in libc or existing $LIBS
-+
-+
+ 
+ 
 +$as_echo "#define HAVE_BIGCRYPT 1" >>confdefs.h
 +
  
  
-+else
- 
-+        # bigcrypt was not found, try adding libsecurity
-+	case " $LIBS " in
-+          *\ -lsecurity\ *)
- 
-+		    # bigcrypt was not found and we already had libsecurity
-+		    # nothing to do here by default
-+		    true
- 
--for ac_func in flistxattr removexattr lremovexattr fremovexattr
+-for ac_func in setxattr lsetxattr fsetxattr
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
 -$as_echo_n "checking for $ac_func... " >&6; }
 -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-+	    ;;
-+          *)
-+	    # bigcrypt was not found, try adding libsecurity
-+	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bigcrypt in -lsecurity" >&5
-+$as_echo_n "checking for bigcrypt in -lsecurity... " >&6; }
-+if test "${ac_cv_lib_security_bigcrypt+set}" = set; then :
-   $as_echo_n "(cached) " >&6
+-  $as_echo_n "(cached) " >&6
  else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+  ac_check_lib_save_LIBS=$LIBS
-+LIBS="-lsecurity  $LIBS"
-+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
+-/* end confdefs.h.  */
 -/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
 -   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
 -#define $ac_func innocuous_$ac_func
--
+ 
 -/* System header to define __stub macros and hopefully few prototypes,
 -    which can conflict with char $ac_func (); below.
 -    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
 -    <limits.h> exists even on freestanding compilers.  */
--
++        # bigcrypt was not found, try adding libsecurity
++	case " $LIBS " in
++          *\ -lsecurity\ *)
+ 
 -#ifdef __STDC__
 -# include <limits.h>
 -#else
 -# include <assert.h>
 -#endif
--
++		    # bigcrypt was not found and we already had libsecurity
++		    # nothing to do here by default
++		    true
+ 
 -#undef $ac_func
++	    ;;
++          *)
++	    # bigcrypt was not found, try adding libsecurity
++	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bigcrypt in -lsecurity" >&5
++$as_echo_n "checking for bigcrypt in -lsecurity... " >&6; }
++if test "${ac_cv_lib_security_bigcrypt+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  ac_check_lib_save_LIBS=$LIBS
++LIBS="-lsecurity  $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
-@@ -50479,102 +17105,90 @@
+@@ -50723,103 +17104,90 @@
  #ifdef __cplusplus
  extern "C"
  #endif
@@ -57490,10 +57799,10 @@
  
  
 +$as_echo "#define HAVE_BIGCRYPT 1" >>confdefs.h
-+
  
  
--for ac_func in setxattr lsetxattr fsetxattr
+ 
+-for ac_func in attr_get attr_list attr_set attr_remove
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
@@ -57544,7 +57853,7 @@
  
  /* Override any GCC internal prototype to avoid an error.
     Use char because int might match the return type of a GCC
-@@ -50582,103 +17196,91 @@
+@@ -50827,103 +17195,91 @@
  #ifdef __cplusplus
  extern "C"
  #endif
@@ -57658,7 +57967,7 @@
  
  
  
--for ac_func in attr_get attr_list attr_set attr_remove
+-for ac_func in attr_getf attr_listf attr_setf attr_removef
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
@@ -57709,7 +58018,7 @@
  
  /* Override any GCC internal prototype to avoid an error.
     Use char because int might match the return type of a GCC
-@@ -50686,103 +17288,90 @@
+@@ -50931,107 +17287,90 @@
  #ifdef __cplusplus
  extern "C"
  #endif
@@ -57816,13 +58125,19 @@
 -fi
 -done
 +        # getprpwnam was found in libc or existing $LIBS
- 
- 
++
++
 +$as_echo "#define HAVE_GETPRPWNAM 1" >>confdefs.h
  
+-  ;;
+-esac
  
+-########################################################
+-# Check if attropen() is present if this is Solaris
+-case "$host_os" in
+-  *solaris*)
  
--for ac_func in attr_getf attr_listf attr_setf attr_removef
+-for ac_func in attropen
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
@@ -57873,7 +58188,7 @@
  
  /* Override any GCC internal prototype to avoid an error.
     Use char because int might match the return type of a GCC
-@@ -50790,107 +17379,77 @@
+@@ -51039,190 +17378,77 @@
  #ifdef __cplusplus
  extern "C"
  #endif
@@ -57922,80 +58237,153 @@
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	eval "$as_ac_var=no"
+-fi
+-
+-rm -rf conftest.dSYM
+-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+-      conftest$ac_exeext conftest.$ac_ext
 +  ac_cv_lib_sec_getprpwnam=no
-+fi
+ fi
+-ac_res=`eval 'as_val=${'$as_ac_var'}
+-		 $as_echo "$as_val"'`
+-	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+-$as_echo "$ac_res" >&6; }
+-as_val=`eval 'as_val=${'$as_ac_var'}
+-		 $as_echo "$as_val"'`
+-   if test "x$as_val" = x""yes; then
+-  cat >>confdefs.h <<_ACEOF
+-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+-_ACEOF
+-
 +rm -f core conftest.err conftest.$ac_objext \
 +    conftest$ac_exeext conftest.$ac_ext
 +LIBS=$ac_check_lib_save_LIBS
-+fi
+ fi
+-done
+-
+-  ;;
+-esac
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sec_getprpwnam" >&5
 +$as_echo "$ac_cv_lib_sec_getprpwnam" >&6; }
 +if test "x$ac_cv_lib_sec_getprpwnam" = x""yes; then :
-+
+ 
+-########################################################
+-# Do xattr functions take additional options like on Darwin?
+-if test x"$ac_cv_func_getxattr" = x"yes" ; then
+-	{ $as_echo "$as_me:$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
 +		LIBS="-lsec $LIBS"
-+
-+
+ 
+-		old_LIBS=$LIBS
+-		LIBS="$LIBS $ACL_LIBS"
+-		cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* 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
 +$as_echo "#define HAVE_GETPRPWNAM 1" >>confdefs.h
-+
-+
-+
-+else
-+
-+
+ 
+-int
+-main ()
+-{
+ 
+-			getxattr(0, 0, 0, 0, 0, 0);
+ 
+-  ;
+-  return 0;
+-}
+-_ACEOF
+-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:$LINENO: $ac_try_echo\""
+-$as_echo "$ac_try_echo") >&5
+-  (eval "$ac_compile") 2>conftest.er1
+-  ac_status=$?
+-  grep -v '^ *+' conftest.er1 >conftest.err
+-  rm -f conftest.er1
+-  cat conftest.err >&5
+-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); } && {
+-	 test -z "$ac_c_werror_flag" ||
+-	 test ! -s conftest.err
+-       } && test -s conftest.$ac_objext; then
+-  smb_attr_cv_xattr_add_opt=yes
+ else
+-  $as_echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+ 
+-	smb_attr_cv_xattr_add_opt=no;LIBS=$old_LIBS
+-fi
+ 
+-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 +			# getprpwnam was not found in libsec
 +			# nothing to do here by default
 +			true
 +
  
--	eval "$as_ac_var=no"
  fi
+-{ $as_echo "$as_me:$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
  
--rm -rf conftest.dSYM
--rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
--      conftest$ac_exeext conftest.$ac_ext
+-cat >>confdefs.h <<\_ACEOF
+-#define XATTR_ADD_OPT 1
+-_ACEOF
 +	  ;;
 +        esac
-+
+ 
+-	fi
  fi
--ac_res=`eval 'as_val=${'$as_ac_var'}
--		 $as_echo "$as_val"'`
--	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
--$as_echo "$ac_res" >&6; }
--as_val=`eval 'as_val=${'$as_ac_var'}
--		 $as_echo "$as_val"'`
--   if test "x$as_val" = x""yes; then
 +done
-+
-+
-+
+ 
+-# Check if we have extattr
+-case "$host_os" in
+-  *freebsd4* | *dragonfly* )
+ 
+-cat >>confdefs.h <<\_ACEOF
+-#define BROKEN_EXTATTR 1
+-_ACEOF
+ 
+-    ;;
+-  *)
 +for ac_func in strsignal
 +do :
 +  ac_fn_c_check_func "$LINENO" "strsignal" "ac_cv_func_strsignal"
 +if test "x$ac_cv_func_strsignal" = x""yes; then :
-   cat >>confdefs.h <<_ACEOF
--#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
++  cat >>confdefs.h <<_ACEOF
 +#define HAVE_STRSIGNAL 1
- _ACEOF
++_ACEOF
  
- fi
- done
++fi
++done
  
--  ;;
--esac
  
--########################################################
--# Check if attropen() is present if this is Solaris
-+############################################
-+# Check if we have libattr
- case "$host_os" in
--  *solaris*)
--
--for ac_func in attropen
+-for ac_func in extattr_delete_fd extattr_delete_file extattr_delete_link
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
 -$as_echo_n "checking for $ac_func... " >&6; }
 -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
++############################################
++# Check if we have libattr
++case "$host_os" in
 +  *osf*)
 +	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getproplist" >&5
 +$as_echo_n "checking for library containing getproplist... " >&6; }
@@ -58029,7 +58417,7 @@
  
  /* Override any GCC internal prototype to avoid an error.
     Use char because int might match the return type of a GCC
-@@ -50898,62 +17457,53 @@
+@@ -51230,62 +17456,66 @@
  #ifdef __cplusplus
  extern "C"
  #endif
@@ -58073,9 +58461,6 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  eval "$as_ac_var=yes"
--else
--  $as_echo "$as_me: failed program was:" >&5
--sed 's/^/| /' conftest.$ac_ext >&5
 +for ac_lib in '' proplist; do
 +  if test -z "$ac_lib"; then
 +    ac_res="none required"
@@ -58093,24 +58478,41 @@
 +fi
 +done
 +if test "${ac_cv_search_getproplist+set}" = set; then :
- 
--	eval "$as_ac_var=no"
-+else
++
+ else
+-  $as_echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
 +  ac_cv_search_getproplist=no
 +fi
 +rm conftest.$ac_ext
 +LIBS=$ac_func_search_save_LIBS
- fi
++fi
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getproplist" >&5
 +$as_echo "$ac_cv_search_getproplist" >&6; }
 +ac_res=$ac_cv_search_getproplist
 +if test "$ac_res" != no; then :
 +  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
++
++fi
++
++	for ac_func in getproplist fgetproplist setproplist fsetproplist
++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
  
+-	eval "$as_ac_var=no"
+ fi
++done
+ 
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
- fi
+-fi
 -ac_res=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
@@ -58118,8 +58520,7 @@
 -as_val=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+
-+	for ac_func in getproplist fgetproplist setproplist fsetproplist
++	for ac_func in delproplist fdelproplist add_proplist_entry get_proplist_entry
 +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"
@@ -58128,124 +58529,30 @@
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
  _ACEOF
-@@ -50961,127 +17511,40 @@
+@@ -51293,39 +17523,27 @@
  fi
  done
  
--  ;;
--esac
--
--########################################################
--# Do xattr functions take additional options like on Darwin?
--if test x"$ac_cv_func_getxattr" = x"yes" ; then
--	{ $as_echo "$as_me:$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 $ACL_LIBS"
--		cat >conftest.$ac_ext <<_ACEOF
--/* confdefs.h.  */
--_ACEOF
--cat confdefs.h >>conftest.$ac_ext
--cat >>conftest.$ac_ext <<_ACEOF
--/* 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
--
--int
--main ()
--{
--
--			getxattr(0, 0, 0, 0, 0, 0);
--
--  ;
--  return 0;
--}
-+	for ac_func in delproplist fdelproplist add_proplist_entry get_proplist_entry
-+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
--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:$LINENO: $ac_try_echo\""
--$as_echo "$ac_try_echo") >&5
--  (eval "$ac_compile") 2>conftest.er1
--  ac_status=$?
--  grep -v '^ *+' conftest.er1 >conftest.err
--  rm -f conftest.er1
--  cat conftest.err >&5
--  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
--  (exit $ac_status); } && {
--	 test -z "$ac_c_werror_flag" ||
--	 test ! -s conftest.err
--       } && test -s conftest.$ac_objext; then
--  smb_attr_cv_xattr_add_opt=yes
--else
--  $as_echo "$as_me: failed program was:" >&5
--sed 's/^/| /' conftest.$ac_ext >&5
--
--	smb_attr_cv_xattr_add_opt=no;LIBS=$old_LIBS
--fi
--
--rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- 
- fi
--{ $as_echo "$as_me:$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
-+done
- 
--cat >>confdefs.h <<\_ACEOF
--#define XATTR_ADD_OPT 1
 +	for ac_func in sizeof_proplist_entry
 +do :
 +  ac_fn_c_check_func "$LINENO" "sizeof_proplist_entry" "ac_cv_func_sizeof_proplist_entry"
 +if test "x$ac_cv_func_sizeof_proplist_entry" = x""yes; then :
 +  cat >>confdefs.h <<_ACEOF
 +#define HAVE_SIZEOF_PROPLIST_ENTRY 1
- _ACEOF
++_ACEOF
  
--	fi
- fi
++fi
 +done
  
--# Check if we have extattr
--case "$host_os" in
--  *freebsd4* | *dragonfly* )
 -
--cat >>confdefs.h <<\_ACEOF
--#define BROKEN_EXTATTR 1
--_ACEOF
--
--    ;;
-+  ;;
-   *)
--
--
--
--for ac_func in extattr_delete_fd extattr_delete_file extattr_delete_link
+-for ac_func in extattr_get_fd extattr_get_file extattr_get_link
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
 -$as_echo_n "checking for $ac_func... " >&6; }
 -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
++  ;;
++  *)
 +	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getxattr" >&5
 +$as_echo_n "checking for library containing getxattr... " >&6; }
 +if test "${ac_cv_search_getxattr+set}" = set; then :
@@ -58278,7 +58585,7 @@
  
  /* Override any GCC internal prototype to avoid an error.
     Use char because int might match the return type of a GCC
-@@ -51089,62 +17552,66 @@
+@@ -51333,62 +17551,53 @@
  #ifdef __cplusplus
  extern "C"
  #endif
@@ -58322,6 +58629,9 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  eval "$as_ac_var=yes"
+-else
+-  $as_echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
 +for ac_lib in '' attr; do
 +  if test -z "$ac_lib"; then
 +    ac_res="none required"
@@ -58339,41 +58649,24 @@
 +fi
 +done
 +if test "${ac_cv_search_getxattr+set}" = set; then :
-+
- else
--  $as_echo "$as_me: failed program was:" >&5
--sed 's/^/| /' conftest.$ac_ext >&5
+ 
+-	eval "$as_ac_var=no"
++else
 +  ac_cv_search_getxattr=no
 +fi
 +rm conftest.$ac_ext
 +LIBS=$ac_func_search_save_LIBS
-+fi
+ fi
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getxattr" >&5
 +$as_echo "$ac_cv_search_getxattr" >&6; }
 +ac_res=$ac_cv_search_getxattr
 +if test "$ac_res" != no; then :
 +  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
-+
-+fi
-+
-+	for ac_func in getxattr lgetxattr fgetxattr listxattr llistxattr
-+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
  
--	eval "$as_ac_var=no"
- fi
-+done
- 
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
--fi
+ fi
 -ac_res=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
@@ -58381,7 +58674,8 @@
 -as_val=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+	for ac_func in getea fgetea lgetea listea flistea llistea
++
++	for ac_func in getxattr lgetxattr fgetxattr listxattr llistxattr
 +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"
@@ -58390,11 +58684,11 @@
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
  _ACEOF
-@@ -51152,102 +17619,64 @@
+@@ -51396,102 +17605,64 @@
  fi
  done
  
-+	for ac_func in removeea fremoveea lremoveea setea fsetea lsetea
++	for ac_func in getea fgetea lgetea listea flistea llistea
 +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"
@@ -58408,7 +58702,7 @@
 +done
  
 -
--for ac_func in extattr_get_fd extattr_get_file extattr_get_link
+-for ac_func in extattr_list_fd extattr_list_file extattr_list_link
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
@@ -58418,7 +58712,7 @@
 -else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
-+	for ac_func in flistxattr removexattr lremovexattr fremovexattr
++	for ac_func in removeea fremoveea lremoveea setea fsetea lsetea
 +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"
@@ -58448,7 +58742,7 @@
 +done
  
 -#undef $ac_func
-+	for ac_func in setxattr lsetxattr fsetxattr
++	for ac_func in flistxattr removexattr lremovexattr fremovexattr
 +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"
@@ -58481,7 +58775,7 @@
 -  ;
 -  return 0;
 -}
-+	for ac_func in attr_get attr_list attr_set attr_remove
++	for ac_func in setxattr lsetxattr fsetxattr
 +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"
@@ -58531,7 +58825,7 @@
 -as_val=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+	for ac_func in attr_getf attr_listf attr_setf attr_removef
++	for ac_func in attr_get attr_list attr_set attr_remove
 +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"
@@ -58540,71 +58834,78 @@
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
  _ACEOF
-@@ -51255,102 +17684,89 @@
+@@ -51499,102 +17670,141 @@
  fi
  done
  
-+  ;;
-+esac
- 
-+########################################################
-+# Check if attropen() is present if this is Solaris
-+case "$host_os" in
-+  *solaris*)
-+	for ac_func in attropen
++	for ac_func in attr_getf attr_listf attr_setf attr_removef
 +do :
-+  ac_fn_c_check_func "$LINENO" "attropen" "ac_cv_func_attropen"
-+if test "x$ac_cv_func_attropen" = x""yes; then :
++  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 HAVE_ATTROPEN 1
++#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 +_ACEOF
  
 +fi
 +done
  
--for ac_func in extattr_list_fd extattr_list_file extattr_list_link
++  ;;
++esac
+ 
+-for ac_func in extattr_set_fd extattr_set_file extattr_set_link
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
 -$as_echo_n "checking for $ac_func... " >&6; }
 -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-+  ;;
-+esac
-+
-+########################################################
-+# Do xattr functions take additional options like on Darwin?
-+if test x"$ac_cv_func_getxattr" = 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
+-  $as_echo_n "(cached) " >&6
+-else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
--_ACEOF
++########################################################
++# Check if attropen() is present if this is Solaris
++case "$host_os" in
++  *solaris*)
++	for ac_func in attropen
++do :
++  ac_fn_c_check_func "$LINENO" "attropen" "ac_cv_func_attropen"
++if test "x$ac_cv_func_attropen" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_ATTROPEN 1
+ _ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
 -/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
 -   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
 -#define $ac_func innocuous_$ac_func
--
+ 
 -/* System header to define __stub macros and hopefully few prototypes,
 -    which can conflict with char $ac_func (); below.
 -    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
 -    <limits.h> exists even on freestanding compilers.  */
--
++fi
++done
+ 
 -#ifdef __STDC__
 -# include <limits.h>
 -#else
 -# include <assert.h>
 -#endif
++  ;;
++esac
  
 -#undef $ac_func
-+		old_LIBS=$LIBS
-+		LIBS="$LIBS $ACL_LIBS"
-+		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h.  */
++########################################################
++# Do xattr functions take additional options like on Darwin?
++if test x"$ac_cv_func_getxattr" = 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
  
 -/* Override any GCC internal prototype to avoid an error.
 -   Use char because int might match the return type of a GCC
@@ -58619,6 +58920,11 @@
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
 -#endif
++		old_LIBS=$LIBS
++		LIBS="$LIBS $ACL_LIBS"
++		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++
 +			#include <sys/types.h>
 +			#if HAVE_ATTR_XATTR_H
 +			#include <attr/xattr.h>
@@ -58703,26 +59009,13 @@
 +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
-@@ -51358,102 +17774,38 @@
- fi
- done
- 
--
--
--
--for ac_func in extattr_set_fd extattr_set_file extattr_set_link
--do
--as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
--{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
--$as_echo_n "checking for $ac_func... " >&6; }
--if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
--  $as_echo_n "(cached) " >&6
--else
--  cat >conftest.$ac_ext <<_ACEOF
--/* confdefs.h.  */
++  cat >>confdefs.h <<_ACEOF
++#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
++_ACEOF
++
++fi
++done
++
 +    for ac_func in extattr_get_fd extattr_get_file extattr_get_link
 +do :
 +  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
@@ -58731,50 +59024,11 @@
 +   if test "x$as_val" = x""yes; then :
 +  cat >>confdefs.h <<_ACEOF
 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
- _ACEOF
--cat confdefs.h >>conftest.$ac_ext
--cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
--/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
--   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
--#define $ac_func innocuous_$ac_func
--
--/* System header to define __stub macros and hopefully few prototypes,
--    which can conflict with char $ac_func (); 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 $ac_func
- 
--/* 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 $ac_func ();
--/* The GNU C library defines this for functions which it implements
--    to always fail with ENOSYS.  Some functions are actually named
--    something starting with __ and the normal name is an alias.  */
--#if defined __stub_$ac_func || defined __stub___$ac_func
--choke me
--#endif
++_ACEOF
++
 +fi
 +done
- 
--int
--main ()
--{
--return $ac_func ();
--  ;
--  return 0;
--}
++
 +    for ac_func in extattr_list_fd extattr_list_file extattr_list_link
 +do :
 +  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
@@ -58783,48 +59037,11 @@
 +   if test "x$as_val" = x""yes; then :
 +  cat >>confdefs.h <<_ACEOF
 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
- _ACEOF
--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:$LINENO: $ac_try_echo\""
--$as_echo "$ac_try_echo") >&5
--  (eval "$ac_link") 2>conftest.er1
--  ac_status=$?
--  grep -v '^ *+' conftest.er1 >conftest.err
--  rm -f conftest.er1
--  cat conftest.err >&5
--  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
--  (exit $ac_status); } && {
--	 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
--  eval "$as_ac_var=yes"
--else
--  $as_echo "$as_me: failed program was:" >&5
--sed 's/^/| /' conftest.$ac_ext >&5
- 
--	eval "$as_ac_var=no"
- fi
++_ACEOF
++
++fi
 +done
- 
--rm -rf conftest.dSYM
--rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
--      conftest$ac_exeext conftest.$ac_ext
--fi
--ac_res=`eval 'as_val=${'$as_ac_var'}
--		 $as_echo "$as_val"'`
--	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
--$as_echo "$ac_res" >&6; }
--as_val=`eval 'as_val=${'$as_ac_var'}
--		 $as_echo "$as_val"'`
--   if test "x$as_val" = x""yes; then
++
 +    for ac_func in extattr_set_fd extattr_set_file extattr_set_link
 +do :
 +  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
@@ -58834,7 +59051,7 @@
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
  _ACEOF
-@@ -51465,7 +17817,7 @@
+@@ -51606,7 +17816,7 @@
  esac
  
  # Check whether --enable-static was given.
@@ -58843,7 +59060,7 @@
    enableval=$enable_static; p=${PACKAGE-default}
  case $enableval in
  yes) enable_static=yes ;;
-@@ -51487,7 +17839,7 @@
+@@ -51628,7 +17838,7 @@
  fi
  
  # Check whether --enable-shared was given.
@@ -58852,7 +59069,7 @@
    enableval=$enable_shared; p=${PACKAGE-default}
  case $enableval in
  yes) enable_shared=yes ;;
-@@ -51514,16 +17866,16 @@
+@@ -51655,16 +17865,16 @@
  PIE_CFLAGS=""
  PIE_LDFLAGS=""
  # Check whether --enable-pie was given.
@@ -58872,7 +59089,7 @@
    $as_echo_n "(cached) " >&6
  else
  
-@@ -51532,11 +17884,11 @@
+@@ -51673,11 +17883,11 @@
  main () { return 0;}
  EOF
  		if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS -pie -fPIE -o conftest conftest.c 1>&5'
@@ -58887,7 +59104,7 @@
  		then
  			samba_cv_fpie=yes
  		else
-@@ -51545,7 +17897,7 @@
+@@ -51686,7 +17896,7 @@
  		rm -f conftest*
  
  fi
@@ -58896,7 +59113,7 @@
  $as_echo "$samba_cv_fpie" >&6; }
  	if test x"${samba_cv_fpie}" = x"yes"
  	then
-@@ -51557,16 +17909,16 @@
+@@ -51698,16 +17908,16 @@
  # Set defaults
  RELRO_LDFLAGS=""
  # Check whether --enable-relro was given.
@@ -58916,7 +59133,7 @@
    $as_echo_n "(cached) " >&6
  else
  
-@@ -51575,11 +17927,11 @@
+@@ -51716,11 +17926,11 @@
  main () { return 0;}
  EOF
  		if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS -Wl,-z,relro -o conftest conftest.c 1>&5'
@@ -58931,7 +59148,7 @@
  		then
  			samba_cv_relro=yes
  		else
-@@ -51588,7 +17940,7 @@
+@@ -51729,7 +17939,7 @@
  		rm -f conftest*
  
  fi
@@ -58940,7 +59157,7 @@
  $as_echo "$samba_cv_relro" >&6; }
  	if test x"${samba_cv_relro}" = x"yes"
  	then
-@@ -51617,7 +17969,7 @@
+@@ -51758,7 +17968,7 @@
  # You need to specify how to create a shared library and
    # how to compile C code to produce PIC object files
  
@@ -58949,18 +59166,24 @@
  $as_echo_n "checking ability to build shared libraries... " >&6; }
  
    # and these are for particular systems
-@@ -51625,9 +17977,7 @@
- 		*linux* | gnu* | k*bsd*-gnu | kopensolaris*-gnu)
- 			case "$host_os" in *linux*)
- 
+@@ -51766,14 +17976,10 @@
+ 		*linux* | gnu* | k*bsd*-gnu | kopensolaris*-gnu | *qnx*)
+ 			case "$host_os" in
+ 				*linux*)
 -cat >>confdefs.h <<\_ACEOF
 -#define LINUX 1
 -_ACEOF
 +$as_echo "#define LINUX 1" >>confdefs.h
   ;;
+ 				*qnx*)
+-cat >>confdefs.h <<\_ACEOF
+-#define QNX 1
+-_ACEOF
++$as_echo "#define QNX 1" >>confdefs.h
+  ;;
  			esac
  			BLDSHARED="true"
-@@ -51639,15 +17989,11 @@
+@@ -51785,15 +17991,11 @@
  			DYNEXP="-Wl,--export-dynamic"
  			PICFLAG="-fPIC"
  			SONAMEFLAG="-Wl,-soname="
@@ -58978,7 +59201,7 @@
  
  			BLDSHARED="true"
  			LDSHFLAGS="-G"
-@@ -51665,33 +18011,23 @@
+@@ -51811,33 +18013,23 @@
  				LDSHFLAGS="-G \${CFLAGS}"
  			fi
  
@@ -59017,7 +59240,7 @@
  
  			;;
  		*netbsd* | *freebsd* | *dragonfly* )
-@@ -51701,14 +18037,10 @@
+@@ -51847,14 +18039,10 @@
  			SONAMEFLAG="-Wl,-soname,"
  			PICFLAG="-fPIC -DPIC"
  
@@ -59034,7 +59257,7 @@
  
  			;;
  		*openbsd*)  BLDSHARED="true"
-@@ -51717,26 +18049,18 @@
+@@ -51863,26 +18051,18 @@
  			SONAMEFLAG="-Wl,-soname,"
  			PICFLAG="-fPIC"
  
@@ -59065,7 +59288,7 @@
  
  			;;
  			esac
-@@ -51750,15 +18074,11 @@
+@@ -51896,15 +18076,11 @@
  				PICFLAG="-KPIC"
  			fi
  
@@ -59083,7 +59306,7 @@
  
  			BLDSHARED="true"
  			# use expfull to export underscored symbols
-@@ -51774,25 +18094,17 @@
+@@ -51920,25 +18096,17 @@
  			fi
  
  
@@ -59113,7 +59336,7 @@
  
  			# Use special PIC flags for the native HP-UX compiler.
  				BLDSHARED="true"
-@@ -51814,84 +18126,58 @@
+@@ -51960,74 +18128,52 @@
  				DYNEXP="-Wl,-E,+b/usr/local/lib:/usr/lib"
  			fi
  
@@ -59129,18 +59352,6 @@
 +$as_echo "#define POSIX_ACL_NEEDS_MASK 1" >>confdefs.h
  
  			;;
- 		*qnx*)
--cat >>confdefs.h <<\_ACEOF
--#define QNX 1
--_ACEOF
-+$as_echo "#define QNX 1" >>confdefs.h
- 
--			cat >>confdefs.h <<\_ACEOF
--#define STAT_ST_BLOCKSIZE 512
--_ACEOF
-+			$as_echo "#define STAT_ST_BLOCKSIZE 512" >>confdefs.h
- 
- 			;;
  		*osf*)
 -cat >>confdefs.h <<\_ACEOF
 -#define OSF1 1
@@ -59213,7 +59424,7 @@
    $as_echo_n "(cached) " >&6
  else
    if test -n "$ROFF"; then
-@@ -51902,91 +18188,71 @@
+@@ -52038,91 +18184,71 @@
  do
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
@@ -59320,7 +59531,7 @@
  
  			BLDSHARED="true"
  			LDSHFLAGS="-dynamiclib -flat_namespace -undefined suppress"
-@@ -52000,16 +18266,12 @@
+@@ -52136,16 +18262,12 @@
                          # actually support the PIE stuff.
                          PIE_LDFLAGS=
                          PIE_CFLAGS=
@@ -59339,7 +59550,7 @@
  
  			;;
    esac
-@@ -52026,53 +18288,53 @@
+@@ -52162,53 +18284,53 @@
  	LDFLAGS="$LDFLAGS -L./bin"
  fi
  
@@ -59412,7 +59623,7 @@
    $as_echo_n "(cached) " >&6
  else
  
-@@ -52088,7 +18350,7 @@
+@@ -52224,7 +18346,7 @@
  
  
  fi
@@ -59421,7 +59632,7 @@
  $as_echo "$ac_cv_shlib_works" >&6; }
  if test $ac_cv_shlib_works = no; then
     BLDSHARED=false
-@@ -52104,9 +18366,9 @@
+@@ -52240,9 +18362,9 @@
  	SHLIBEXT="shared_libraries_disabled"
  fi
  
@@ -59433,7 +59644,7 @@
  $as_echo "$PICFLAG" >&6; }
  
  
-@@ -52148,165 +18410,39 @@
+@@ -52284,165 +18406,39 @@
  
  ################
  
@@ -59611,7 +59822,7 @@
  else
  
  cat >>confdefs.h <<_ACEOF
-@@ -52316,102 +18452,9 @@
+@@ -52452,102 +18448,9 @@
  fi
  
  else
@@ -59702,11 +59913,11 @@
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
--
--fi
 +    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 :
  
+-fi
+-
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_intptr_t" >&5
@@ -59716,7 +59927,7 @@
  else
  
  cat >>confdefs.h <<_ACEOF
-@@ -52426,17 +18469,13 @@
+@@ -52562,17 +18465,13 @@
  # Check if the compiler supports the LL prefix on long long integers.
  # AIX needs this.
  
@@ -59737,7 +59948,7 @@
  /* end confdefs.h.  */
  #include <stdio.h>
  int
-@@ -52447,190 +18486,97 @@
+@@ -52583,190 +18482,97 @@
    return 0;
  }
  _ACEOF
@@ -59956,7 +60167,7 @@
  /* end confdefs.h.  */
  
  #if defined(HAVE_UNISTD_H)
-@@ -52640,67 +18586,34 @@
+@@ -52776,67 +18582,34 @@
  #include <sys/stat.h>
  main() { struct stat64 st; off64_t s; if (sizeof(off_t) == sizeof(off64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
  _ACEOF
@@ -60034,7 +60245,7 @@
  /* end confdefs.h.  */
  
  #if defined(HAVE_UNISTD_H)
-@@ -52710,67 +18623,34 @@
+@@ -52846,67 +18619,34 @@
  #include <sys/stat.h>
  main() { exit((sizeof(ino_t) == 8) ? 0 : 1); }
  _ACEOF
@@ -60112,10 +60323,12 @@
  /* end confdefs.h.  */
  
  #if defined(HAVE_UNISTD_H)
-@@ -52780,67 +18660,34 @@
+@@ -52914,69 +18654,36 @@
+ #endif
+ #include <stdio.h>
  #include <sys/stat.h>
- main() { struct stat64 st; ino64_t s; if (sizeof(ino_t) == sizeof(ino64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
- _ACEOF
+-main() { struct stat64 st; ino64_t s; if (sizeof(ino_t) == sizeof(ino64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
+-_ACEOF
 -rm -f conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -60138,6 +60351,8 @@
 -  ac_status=$?
 -  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
 -  (exit $ac_status); }; }; then
++main() { struct stat64 st; ino64_t s; if (sizeof(ino_t) == sizeof(ino64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
++_ACEOF
 +if ac_fn_c_try_run "$LINENO"; then :
    samba_cv_HAVE_INO64_T=yes
  else
@@ -60190,7 +60405,7 @@
  /* end confdefs.h.  */
  
  #if defined(HAVE_UNISTD_H)
-@@ -52850,134 +18697,68 @@
+@@ -52986,67 +18693,34 @@
  #include <sys/stat.h>
  main() { exit((sizeof(dev_t) == 8) ? 0 : 1); }
  _ACEOF
@@ -60268,12 +60483,10 @@
  /* end confdefs.h.  */
  
  #if defined(HAVE_UNISTD_H)
- #include <unistd.h>
--#endif
--#include <stdio.h>
--#include <sys/stat.h>
--main() { struct stat64 st; dev64_t s; if (sizeof(dev_t) == sizeof(dev64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
--_ACEOF
+@@ -53056,64 +18730,31 @@
+ #include <sys/stat.h>
+ main() { struct stat64 st; dev64_t s; if (sizeof(dev_t) == sizeof(dev64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
+ _ACEOF
 -rm -f conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -60296,11 +60509,6 @@
 -  ac_status=$?
 -  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
 -  (exit $ac_status); }; }; then
-+#endif
-+#include <stdio.h>
-+#include <sys/stat.h>
-+main() { struct stat64 st; dev64_t s; if (sizeof(dev_t) == sizeof(dev64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
-+_ACEOF
 +if ac_fn_c_try_run "$LINENO"; then :
    samba_cv_HAVE_DEV64_T=yes
  else
@@ -60349,7 +60557,7 @@
  /* end confdefs.h.  */
  
  #if defined(HAVE_UNISTD_H)
-@@ -52993,55 +18774,28 @@
+@@ -53129,55 +18770,28 @@
    return 0;
  }
  _ACEOF
@@ -60412,7 +60620,7 @@
  /* end confdefs.h.  */
  
  #if defined(HAVE_UNISTD_H)
-@@ -53057,58 +18811,31 @@
+@@ -53193,58 +18807,31 @@
    return 0;
  }
  _ACEOF
@@ -60479,7 +60687,7 @@
  /* end confdefs.h.  */
  
  #if defined(HAVE_UNISTD_H)
-@@ -53117,67 +18844,34 @@
+@@ -53253,67 +18840,34 @@
  #include <sys/types.h>
  main() { dev_t dev; int i = major(dev); return 0; }
  _ACEOF
@@ -60557,7 +60765,7 @@
  /* end confdefs.h.  */
  
  #if defined(HAVE_UNISTD_H)
-@@ -53186,67 +18880,34 @@
+@@ -53322,67 +18876,34 @@
  #include <sys/types.h>
  main() { dev_t dev; int i = minor(dev); return 0; }
  _ACEOF
@@ -60635,7 +60843,7 @@
  /* end confdefs.h.  */
  
  #if defined(HAVE_UNISTD_H)
-@@ -53255,129 +18916,63 @@
+@@ -53391,129 +18912,63 @@
  #include <sys/types.h>
  main() { dev_t dev = makedev(1,2); return 0; }
  _ACEOF
@@ -60784,7 +60992,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <dirent.h>
-@@ -53390,55 +18985,28 @@
+@@ -53526,55 +18981,28 @@
    return 0;
  }
  _ACEOF
@@ -60847,7 +61055,7 @@
  /* end confdefs.h.  */
  #include <stdio.h>
  int
-@@ -53449,55 +19017,28 @@
+@@ -53585,55 +19013,28 @@
    return 0;
  }
  _ACEOF
@@ -60910,7 +61118,7 @@
  /* end confdefs.h.  */
  
  #include <sys/time.h>
-@@ -53510,46 +19051,19 @@
+@@ -53646,46 +19047,19 @@
    return 0;
  }
  _ACEOF
@@ -60963,7 +61171,7 @@
  
  fi
  
-@@ -53561,120 +19075,24 @@
+@@ -53697,120 +19071,24 @@
      # which rely on signals.
  
  
@@ -61092,7 +61300,7 @@
  /* end confdefs.h.  */
  
  #if TIME_WITH_SYS_TIME
-@@ -53698,58 +19116,27 @@
+@@ -53834,58 +19112,27 @@
    return 0;
  }
  _ACEOF
@@ -61159,7 +61367,7 @@
  /* end confdefs.h.  */
  
  #if TIME_WITH_SYS_TIME
-@@ -53773,58 +19160,27 @@
+@@ -53909,58 +19156,27 @@
    return 0;
  }
  _ACEOF
@@ -61226,7 +61434,7 @@
  /* end confdefs.h.  */
  
  #if TIME_WITH_SYS_TIME
-@@ -53848,49 +19204,22 @@
+@@ -53984,49 +19200,22 @@
    return 0;
  }
  _ACEOF
@@ -61282,7 +61490,7 @@
  
  
  
-@@ -53908,18 +19237,14 @@
+@@ -54044,18 +19233,14 @@
  	    ;;
            *)
  	    # clock_gettime was not found, try adding librt
@@ -61304,7 +61512,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -53937,60 +19262,29 @@
+@@ -54073,60 +19258,29 @@
    return 0;
  }
  _ACEOF
@@ -61374,7 +61582,7 @@
  /* end confdefs.h.  */
  
  #if TIME_WITH_SYS_TIME
-@@ -54014,58 +19308,27 @@
+@@ -54150,58 +19304,27 @@
    return 0;
  }
  _ACEOF
@@ -61441,7 +61649,7 @@
  /* end confdefs.h.  */
  
  #if TIME_WITH_SYS_TIME
-@@ -54089,58 +19352,27 @@
+@@ -54225,58 +19348,27 @@
    return 0;
  }
  _ACEOF
@@ -61508,7 +61716,7 @@
  /* end confdefs.h.  */
  
  #if TIME_WITH_SYS_TIME
-@@ -54164,49 +19396,22 @@
+@@ -54300,49 +19392,22 @@
    return 0;
  }
  _ACEOF
@@ -61564,7 +61772,7 @@
  
  
  
-@@ -54231,20 +19436,16 @@
+@@ -54367,20 +19432,16 @@
  
  fi
  
@@ -61589,7 +61797,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <dirent.h>
-@@ -54252,64 +19453,31 @@
+@@ -54388,64 +19449,31 @@
  if (di && di->d_name[-2] == '.' && di->d_name[-1] == 0 &&
  di->d_name[0] == 0) exit(0); exit(1);}
  _ACEOF
@@ -61663,7 +61871,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <utime.h>
-@@ -54321,41 +19489,18 @@
+@@ -54457,41 +19485,18 @@
    return 0;
  }
  _ACEOF
@@ -61709,7 +61917,7 @@
  
  fi
  
-@@ -54363,104 +19508,12 @@
+@@ -54499,104 +19504,12 @@
  # Check utmp details, but only if our OS offers utmp.h
  if test x"$ac_cv_header_utmp_h" = x"yes"; then
  
@@ -61819,7 +62027,7 @@
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
  _ACEOF
-@@ -54469,17 +19522,13 @@
+@@ -54605,17 +19518,13 @@
  done
  
  
@@ -61840,7 +62048,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <utmp.h>
-@@ -54491,55 +19540,28 @@
+@@ -54627,55 +19536,28 @@
    return 0;
  }
  _ACEOF
@@ -61903,7 +62111,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <utmp.h>
-@@ -54551,55 +19573,28 @@
+@@ -54687,55 +19569,28 @@
    return 0;
  }
  _ACEOF
@@ -61966,7 +62174,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <utmp.h>
-@@ -54611,55 +19606,28 @@
+@@ -54747,55 +19602,28 @@
    return 0;
  }
  _ACEOF
@@ -62029,7 +62237,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <utmp.h>
-@@ -54671,55 +19639,28 @@
+@@ -54807,55 +19635,28 @@
    return 0;
  }
  _ACEOF
@@ -62092,10 +62300,14 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <utmp.h>
-@@ -54731,55 +19672,28 @@
-   return 0;
- }
- _ACEOF
+@@ -54863,59 +19664,32 @@
+ main ()
+ {
+ struct utmp ut;  time_t t; ut.ut_time = t;
+-  ;
+-  return 0;
+-}
+-_ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -62114,6 +62326,10 @@
 -	 test -z "$ac_c_werror_flag" ||
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
++  ;
++  return 0;
++}
++_ACEOF
 +if ac_fn_c_try_compile "$LINENO"; then :
    samba_cv_HAVE_UT_UT_TIME=yes
  else
@@ -62155,7 +62371,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <utmp.h>
-@@ -54791,55 +19705,28 @@
+@@ -54927,55 +19701,28 @@
    return 0;
  }
  _ACEOF
@@ -62218,7 +62434,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <utmp.h>
-@@ -54851,55 +19738,28 @@
+@@ -54987,55 +19734,28 @@
    return 0;
  }
  _ACEOF
@@ -62281,7 +62497,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <utmp.h>
-@@ -54911,55 +19771,28 @@
+@@ -55047,55 +19767,28 @@
    return 0;
  }
  _ACEOF
@@ -62344,7 +62560,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <utmp.h>
-@@ -54971,55 +19804,28 @@
+@@ -55107,55 +19800,28 @@
    return 0;
  }
  _ACEOF
@@ -62407,7 +62623,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <utmp.h>
-@@ -55031,55 +19837,28 @@
+@@ -55167,55 +19833,28 @@
    return 0;
  }
  _ACEOF
@@ -62470,7 +62686,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <utmp.h>
-@@ -55091,56 +19870,29 @@
+@@ -55227,56 +19866,29 @@
    return 0;
  }
  _ACEOF
@@ -62534,7 +62750,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <utmp.h>
-@@ -55152,56 +19904,29 @@
+@@ -55288,56 +19900,29 @@
    return 0;
  }
  _ACEOF
@@ -62598,7 +62814,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <utmpx.h>
-@@ -55213,41 +19938,18 @@
+@@ -55349,41 +19934,18 @@
    return 0;
  }
  _ACEOF
@@ -62644,7 +62860,7 @@
  
  fi
  
-@@ -55258,12 +19960,10 @@
+@@ -55394,12 +19956,10 @@
  ICONV_LOOK_DIRS="/usr /usr/local /sw /opt"
  
  # Check whether --with-libiconv was given.
@@ -62659,7 +62875,7 @@
    else
       if test "$withval" != "yes" ; then
  	ICONV_PATH_SPEC=yes
-@@ -55309,7 +20009,7 @@
+@@ -55445,7 +20005,7 @@
  		export LDFLAGS LIBS CPPFLAGS
  		# Try to find iconv(3)
  
@@ -62668,20 +62884,20 @@
  $as_echo_n "checking for iconv in $i/$l... " >&6; }
      jm_cv_func_iconv="no"
      jm_cv_lib_iconv=""
-@@ -55317,11 +20017,7 @@
+@@ -55453,11 +20013,7 @@
      jm_save_LIBS="$LIBS"
  
-         if test "$jm_cv_func_iconv" != yes; then
--      cat >conftest.$ac_ext <<_ACEOF
+     if test "$jm_cv_func_iconv" != yes; then
+-    cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
  #include <stdlib.h>
  #include <giconv.h>
-@@ -55335,48 +20031,17 @@
+@@ -55471,48 +20027,17 @@
    return 0;
  }
  _ACEOF
@@ -62708,9 +62924,9 @@
 -       }; then
 +if ac_fn_c_try_link "$LINENO"; then :
    jm_cv_func_iconv=yes
-          jm_cv_include="giconv.h"
-          jm_cv_giconv="yes"
-          jm_cv_lib_iconv=""
+        jm_cv_include="giconv.h"
+        jm_cv_giconv="yes"
+        jm_cv_lib_iconv=""
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
@@ -62724,17 +62940,17 @@
 +rm -f core conftest.err conftest.$ac_objext \
 +    conftest$ac_exeext conftest.$ac_ext
  
-             if test "$jm_cv_func_iconv" != yes; then
--        cat >conftest.$ac_ext <<_ACEOF
+         if test "$jm_cv_func_iconv" != yes; then
+-      cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
  #include <stdlib.h>
  #include <iconv.h>
-@@ -55390,49 +20055,18 @@
+@@ -55526,49 +20051,18 @@
    return 0;
  }
  _ACEOF
@@ -62761,8 +62977,8 @@
 -       }; then
 +if ac_fn_c_try_link "$LINENO"; then :
    jm_cv_include="iconv.h"
-            jm_cv_func_iconv=yes
-            jm_cv_lib_iconv=""
+          jm_cv_func_iconv=yes
+          jm_cv_lib_iconv=""
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
@@ -62776,19 +62992,19 @@
 +rm -f core conftest.err conftest.$ac_objext \
 +    conftest$ac_exeext conftest.$ac_ext
  
-           if test "$jm_cv_lib_iconv" != yes; then
-             jm_save_LIBS="$LIBS"
-             LIBS="$LIBS -lgiconv"
--            cat >conftest.$ac_ext <<_ACEOF
+             if test "$jm_cv_func_iconv" != yes; then
+         jm_save_LIBS="$LIBS"
+         LIBS="$LIBS -lgiconv"
+-        cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
  #include <stdlib.h>
  #include <giconv.h>
-@@ -55446,53 +20080,22 @@
+@@ -55582,53 +20076,22 @@
    return 0;
  }
  _ACEOF
@@ -62815,10 +63031,10 @@
 -       }; then
 +if ac_fn_c_try_link "$LINENO"; then :
    jm_cv_lib_iconv=yes
-               jm_cv_func_iconv=yes
-               jm_cv_include="giconv.h"
-               jm_cv_giconv=yes
-               jm_cv_lib_iconv="giconv"
+           jm_cv_func_iconv=yes
+           jm_cv_include="giconv.h"
+           jm_cv_giconv=yes
+           jm_cv_lib_iconv="giconv"
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
@@ -62832,9 +63048,9 @@
 +rm -f core conftest.err conftest.$ac_objext \
 +    conftest$ac_exeext conftest.$ac_ext
  
-            LIBS="$jm_save_LIBS"
+         LIBS="$jm_save_LIBS"
  
-         if test "$jm_cv_func_iconv" != yes; then
+                 if test "$jm_cv_func_iconv" != yes; then
            jm_save_LIBS="$LIBS"
            LIBS="$LIBS -liconv"
 -          cat >conftest.$ac_ext <<_ACEOF
@@ -62846,7 +63062,7 @@
  /* end confdefs.h.  */
  #include <stdlib.h>
  #include <iconv.h>
-@@ -55506,50 +20109,19 @@
+@@ -55642,50 +20105,19 @@
    return 0;
  }
  _ACEOF
@@ -62889,7 +63105,7 @@
 +    conftest$ac_exeext conftest.$ac_ext
            LIBS="$jm_save_LIBS"
  
-           if test "$jm_cv_lib_iconv" != yes; then
+                     if test "$jm_cv_func_iconv" != yes; then
              jm_save_LIBS="$LIBS"
              LIBS="$LIBS -lbiconv"
 -            cat >conftest.$ac_ext <<_ACEOF
@@ -62901,7 +63117,7 @@
  /* end confdefs.h.  */
  #include <stdlib.h>
  #include <biconv.h>
-@@ -55563,42 +20135,15 @@
+@@ -55699,42 +20131,15 @@
    return 0;
  }
  _ACEOF
@@ -62946,8 +63162,8 @@
 +    conftest$ac_exeext conftest.$ac_ext
  
              LIBS="$jm_save_LIBS"
- 	  fi
-@@ -55609,36 +20154,30 @@
+           fi
+@@ -55745,36 +20150,30 @@
    if test "$jm_cv_func_iconv" = yes; then
      if test "$jm_cv_giconv" = yes; then
  
@@ -62991,7 +63207,7 @@
  $as_echo "no" >&6; }
    fi
  
-@@ -55676,16 +20215,12 @@
+@@ -55812,16 +20211,12 @@
  	# check for default dos charset name
  	for j in CP850 IBM850 ; do
  
@@ -63011,7 +63227,7 @@
  /* end confdefs.h.  */
  
  #include <$jm_cv_include>
-@@ -55698,43 +20233,16 @@
+@@ -55834,43 +20229,16 @@
  }
  
  _ACEOF
@@ -63060,7 +63276,7 @@
  $as_echo "$ICONV_CHARSET" >&6; }
  
  	    default_dos_charset="$ICONV_CHARSET"
-@@ -55746,16 +20254,12 @@
+@@ -55882,16 +20250,12 @@
  	# check for default display charset name
  	for j in ASCII 646 ; do
  
@@ -63080,7 +63296,7 @@
  /* end confdefs.h.  */
  
  #include <$jm_cv_include>
-@@ -55768,43 +20272,16 @@
+@@ -55904,43 +20268,16 @@
  }
  
  _ACEOF
@@ -63129,7 +63345,7 @@
  $as_echo "$ICONV_CHARSET" >&6; }
  
  	    default_display_charset="$ICONV_CHARSET"
-@@ -55816,16 +20293,12 @@
+@@ -55952,16 +20289,12 @@
  	# check for default unix charset name
  	for j in UTF-8 UTF8 ; do
  
@@ -63149,7 +63365,7 @@
  /* end confdefs.h.  */
  
  #include <$jm_cv_include>
-@@ -55838,43 +20311,16 @@
+@@ -55974,43 +20307,16 @@
  }
  
  _ACEOF
@@ -63198,7 +63414,7 @@
  $as_echo "$ICONV_CHARSET" >&6; }
  
  	    default_unix_charset="$ICONV_CHARSET"
-@@ -55913,9 +20359,9 @@
+@@ -56049,9 +20355,9 @@
  	    default_display_charset="ASCII"
  	    default_unix_charset="UTF-8"
  	    samba_cv_HAVE_NATIVE_ICONV=yes
@@ -63210,7 +63426,7 @@
  $as_echo "$as_me: WARNING: $default_dos_charset, $default_display_charset and $default_unix_charset to UCS-16LE" >&2;}
  	fi
  
-@@ -55939,9 +20385,7 @@
+@@ -56075,9 +20381,7 @@
  	    default_unix_charset="\"$default_unix_charset\""
  
  
@@ -63221,7 +63437,7 @@
  
  
  cat >>confdefs.h <<_ACEOF
-@@ -55975,7 +20419,7 @@
+@@ -56111,7 +20415,7 @@
  
  
  if test x"$ICONV_FOUND" = x"no" -o x"$samba_cv_HAVE_NATIVE_ICONV" != x"yes" ; then
@@ -63230,7 +63446,7 @@
      Install libiconv from http://freshmeat.net/projects/libiconv/ for better charset compatibility!" >&5
  $as_echo "$as_me: WARNING: Sufficient support for iconv function was not found.
      Install libiconv from http://freshmeat.net/projects/libiconv/ for better charset compatibility!" >&2;}
-@@ -55997,20 +20441,16 @@
+@@ -56133,20 +20437,16 @@
  fi
  
  
@@ -63255,7 +63471,7 @@
  /* end confdefs.h.  */
  
  #include <sys/types.h>
-@@ -56024,67 +20464,34 @@
+@@ -56160,67 +20460,34 @@
  }
  
  _ACEOF
@@ -63333,7 +63549,7 @@
  /* end confdefs.h.  */
  
  #include <sys/types.h>
-@@ -56098,204 +20505,36 @@
+@@ -56234,204 +20501,36 @@
  }
  
  _ACEOF
@@ -63551,7 +63767,7 @@
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
-@@ -56304,119 +20543,25 @@
+@@ -56440,119 +20539,25 @@
  
  done
  
@@ -63678,7 +63894,7 @@
  /* end confdefs.h.  */
  #include <asm/unistd.h>
  int
-@@ -56427,54 +20572,29 @@
+@@ -56563,54 +20568,29 @@
    return 0;
  }
  _ACEOF
@@ -63739,7 +63955,7 @@
  
  fi
  
-@@ -56483,157 +20603,18 @@
+@@ -56619,157 +20599,18 @@
  #	http://oss.sgi.com/projects/fam/
  #	http://savannah.nongnu.org/projects/fam/
  # Check whether --enable-fam was given.
@@ -63903,7 +64119,7 @@
  _ACEOF
   samba_cv_HAVE_FAM_H=yes
  else
-@@ -56645,18 +20626,14 @@
+@@ -56781,18 +20622,14 @@
      if test x"$samba_cv_HAVE_FAM_H" = x"yes"; then
          # On IRIX, libfam requires libC, but other FAM implementations
  	# might not need it.
@@ -63925,10 +64141,11 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -56674,43 +20651,18 @@
+@@ -56809,44 +20646,19 @@
+   ;
    return 0;
  }
- _ACEOF
+-_ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -63950,6 +64167,7 @@
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
++_ACEOF
 +if ac_fn_c_try_link "$LINENO"; then :
    ac_cv_lib_fam_FAMOpen2=yes
  else
@@ -63975,7 +64193,7 @@
    samba_cv_HAVE_LIBFAM=yes; SMB_FAM_LIBS="-lfam"
  else
    samba_cv_HAVE_LIBFAM=no
-@@ -56721,23 +20673,17 @@
+@@ -56857,23 +20669,17 @@
              samba_fam_xtra=-lC
  
  
@@ -64002,7 +64220,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -56755,72 +20701,41 @@
+@@ -56891,72 +20697,41 @@
    return 0;
  }
  _ACEOF
@@ -64083,7 +64301,7 @@
  /* end confdefs.h.  */
  #include <fam.h>
  int
-@@ -56831,43 +20746,16 @@
+@@ -56967,43 +20742,16 @@
    return 0;
  }
  _ACEOF
@@ -64130,7 +64348,7 @@
      fi
  fi
  
-@@ -56880,18 +20768,14 @@
+@@ -57016,18 +20764,14 @@
      samba_dmapi_libs=""
  
      if test x"$samba_dmapi_libs" = x"" ; then
@@ -64152,7 +64370,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -56909,61 +20793,32 @@
+@@ -57045,61 +20789,32 @@
    return 0;
  }
  _ACEOF
@@ -64223,7 +64441,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -56981,61 +20836,32 @@
+@@ -57117,61 +20832,32 @@
    return 0;
  }
  _ACEOF
@@ -64294,7 +64512,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -57053,61 +20879,32 @@
+@@ -57189,61 +20875,32 @@
    return 0;
  }
  _ACEOF
@@ -64365,7 +64583,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -57125,43 +20922,18 @@
+@@ -57261,43 +20918,18 @@
    return 0;
  }
  _ACEOF
@@ -64415,7 +64633,7 @@
    samba_dmapi_libs="-ldmapi"
  fi
  
-@@ -57170,153 +20942,12 @@
+@@ -57306,153 +20938,12 @@
  
      # Only bother to test ehaders if we have a candidate DMAPI library
      if test x"$samba_dmapi_libs" != x"" ; then
@@ -64575,7 +64793,7 @@
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
-@@ -57330,11 +20961,7 @@
+@@ -57466,11 +20957,7 @@
      if test x"$samba_dmapi_libs" != x"" ; then
  	samba_dmapi_save_LIBS="$LIBS"
  	LIBS="$LIBS $samba_dmapi_libs"
@@ -64588,7 +64806,7 @@
  /* end confdefs.h.  */
  
  #include <time.h>      /* needed by Tru64 */
-@@ -57369,50 +20996,25 @@
+@@ -57505,50 +20992,25 @@
    return 0;
  }
  _ACEOF
@@ -64643,7 +64861,7 @@
  $as_echo "$as_me: DMAPI support not present" >&6;}
  
  	# DMAPI detection failure actions end
-@@ -57420,11 +21022,9 @@
+@@ -57556,11 +21018,9 @@
  	# DMAPI detection success actions start
  
  
@@ -64657,7 +64875,7 @@
  $as_echo "$as_me: Found DMAPI support in $samba_dmapi_libs" >&6;}
  
  	# DMAPI detection success actions end
-@@ -57438,20 +21038,16 @@
+@@ -57574,20 +21034,16 @@
      default_shared_modules="$default_shared_modules vfs_tsmsm"
  fi
  
@@ -64682,7 +64900,7 @@
  /* end confdefs.h.  */
  
  #include <sys/types.h>
-@@ -57467,65 +21063,32 @@
+@@ -57603,65 +21059,32 @@
  }
  
  _ACEOF
@@ -64757,7 +64975,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <fcntl.h>
-@@ -57537,185 +21100,29 @@
+@@ -57673,185 +21096,29 @@
    return 0;
  }
  _ACEOF
@@ -64950,7 +65168,7 @@
  
  fi
  
-@@ -57725,110 +21132,18 @@
+@@ -57861,110 +21128,18 @@
  
      ac_save_LIBS=$LIBS
  
@@ -65067,7 +65285,7 @@
  
  
  
-@@ -57845,18 +21160,14 @@
+@@ -57981,18 +21156,14 @@
  	    ;;
            *)
  	    # cap_get_proc was not found, try adding libcap
@@ -65089,7 +65307,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -57874,50 +21185,23 @@
+@@ -58010,50 +21181,23 @@
    return 0;
  }
  _ACEOF
@@ -65147,7 +65365,7 @@
  
  
  
-@@ -57939,20 +21223,16 @@
+@@ -58075,20 +21219,16 @@
  
  
  
@@ -65172,7 +65390,7 @@
  /* end confdefs.h.  */
  
  #include <sys/types.h>
-@@ -57968,52 +21248,23 @@
+@@ -58104,52 +21244,23 @@
   exit(0);
  }
  _ACEOF
@@ -65231,7 +65449,7 @@
  
  else
      LIBS=$ac_save_LIBS
-@@ -58026,17 +21277,13 @@
+@@ -58162,17 +21273,13 @@
  # This is *really* broken but some systems (DEC OSF1) do this.... JRA.
  #
  
@@ -65252,7 +65470,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #if defined(HAVE_RPC_RPC_H)
-@@ -58050,55 +21297,28 @@
+@@ -58186,55 +21293,28 @@
    return 0;
  }
  _ACEOF
@@ -65315,7 +65533,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #if defined(HAVE_RPC_RPC_H)
-@@ -58112,55 +21332,28 @@
+@@ -58248,55 +21328,28 @@
    return 0;
  }
  _ACEOF
@@ -65378,7 +65596,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #if defined(HAVE_RPC_RPC_H)
-@@ -58174,55 +21367,28 @@
+@@ -58310,55 +21363,28 @@
    return 0;
  }
  _ACEOF
@@ -65441,7 +65659,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #if defined(HAVE_RPC_RPC_H)
-@@ -58236,56 +21402,29 @@
+@@ -58372,56 +21398,29 @@
    return 0;
  }
  _ACEOF
@@ -65505,7 +65723,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #ifdef HAVE_SYS_SECURITY_H
-@@ -58303,238 +21442,112 @@
+@@ -58439,238 +21438,112 @@
    return 0;
  }
  _ACEOF
@@ -65780,7 +65998,7 @@
  /* end confdefs.h.  */
  #include <unistd.h>
  int
-@@ -58545,63 +21558,32 @@
+@@ -58681,63 +21554,32 @@
    return 0;
  }
  _ACEOF
@@ -65807,11 +66025,12 @@
 -       }; then
 +if ac_fn_c_try_link "$LINENO"; then :
     samba_cv_SYSCONF_SC_NGROUPS_MAX=yes
- else
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	 samba_cv_SYSCONF_SC_NGROUPS_MAX=no
++else
 +   samba_cv_SYSCONF_SC_NGROUPS_MAX=no
  fi
 -
@@ -65853,7 +66072,7 @@
  /* end confdefs.h.  */
  #include <unistd.h>
  int
-@@ -58612,281 +21594,102 @@
+@@ -58748,63 +21590,32 @@
    return 0;
  }
  _ACEOF
@@ -65904,31 +66123,32 @@
 -cat >>confdefs.h <<\_ACEOF
 -#define SYSCONF_SC_NPROC_ONLN 1
 -_ACEOF
--
--    fi
--
--
++$as_echo "#define SYSCONF_SC_NPROC_ONLN 1" >>confdefs.h
+ 
+     fi
+ 
+ 
 -    { $as_echo "$as_me:$LINENO: checking for sysconf(_SC_NPROCESSORS_ONLN)" >&5
--$as_echo_n "checking for sysconf(_SC_NPROCESSORS_ONLN)... " >&6; }
++    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysconf(_SC_NPROCESSORS_ONLN)" >&5
+ $as_echo_n "checking for sysconf(_SC_NPROCESSORS_ONLN)... " >&6; }
 -if test "${samba_cv_SYSCONF_SC_NPROCESSORS_ONLN+set}" = set; then
--  $as_echo_n "(cached) " >&6
--else
--
++if test "${samba_cv_SYSCONF_SC_NPROCESSORS_ONLN+set}" = set; then :
+   $as_echo_n "(cached) " >&6
+ else
+ 
 -	    cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
--#include <unistd.h>
--int
--main ()
--{
-- return sysconf(_SC_NPROCESSORS_ONLN) == -1 ? 1 : 0;
--  ;
--  return 0;
--}
--_ACEOF
++	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ #include <unistd.h>
+ int
+@@ -58815,63 +21626,32 @@
+   return 0;
+ }
+ _ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -65950,38 +66170,42 @@
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
--   samba_cv_SYSCONF_SC_NPROCESSORS_ONLN=yes
--else
++if ac_fn_c_try_link "$LINENO"; then :
+    samba_cv_SYSCONF_SC_NPROCESSORS_ONLN=yes
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	 samba_cv_SYSCONF_SC_NPROCESSORS_ONLN=no
--fi
++   samba_cv_SYSCONF_SC_NPROCESSORS_ONLN=no
+ fi
 -
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
--
--fi
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
+ 
+ fi
 -{ $as_echo "$as_me:$LINENO: result: $samba_cv_SYSCONF_SC_NPROCESSORS_ONLN" >&5
--$as_echo "$samba_cv_SYSCONF_SC_NPROCESSORS_ONLN" >&6; }
--
--    if test x"$samba_cv_SYSCONF_SC_NPROCESSORS_ONLN" = x"yes" ; then
--
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $samba_cv_SYSCONF_SC_NPROCESSORS_ONLN" >&5
+ $as_echo "$samba_cv_SYSCONF_SC_NPROCESSORS_ONLN" >&6; }
+ 
+     if test x"$samba_cv_SYSCONF_SC_NPROCESSORS_ONLN" = x"yes" ; then
+ 
 -cat >>confdefs.h <<\_ACEOF
 -#define SYSCONF_SC_NPROCESSORS_ONLN 1
 -_ACEOF
-+$as_echo "#define SYSCONF_SC_NPROC_ONLN 1" >>confdefs.h
++$as_echo "#define SYSCONF_SC_NPROCESSORS_ONLN 1" >>confdefs.h
  
      fi
  
  
 -    { $as_echo "$as_me:$LINENO: checking for sysconf(_SC_PAGESIZE)" >&5
--$as_echo_n "checking for sysconf(_SC_PAGESIZE)... " >&6; }
++    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysconf(_SC_PAGESIZE)" >&5
+ $as_echo_n "checking for sysconf(_SC_PAGESIZE)... " >&6; }
 -if test "${samba_cv_SYSCONF_SC_PAGESIZE+set}" = set; then
-+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysconf(_SC_NPROCESSORS_ONLN)" >&5
-+$as_echo_n "checking for sysconf(_SC_NPROCESSORS_ONLN)... " >&6; }
-+if test "${samba_cv_SYSCONF_SC_NPROCESSORS_ONLN+set}" = set; then :
++if test "${samba_cv_SYSCONF_SC_PAGESIZE+set}" = set; then :
    $as_echo_n "(cached) " >&6
  else
  
@@ -65994,11 +66218,7 @@
  /* end confdefs.h.  */
  #include <unistd.h>
  int
- main ()
- {
-- return sysconf(_SC_PAGESIZE) == -1 ? 1 : 0;
-+ return sysconf(_SC_NPROCESSORS_ONLN) == -1 ? 1 : 0;
-   ;
+@@ -58882,147 +21662,30 @@
    return 0;
  }
  _ACEOF
@@ -66023,15 +66243,14 @@
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
--   samba_cv_SYSCONF_SC_PAGESIZE=yes
 +if ac_fn_c_try_link "$LINENO"; then :
-+   samba_cv_SYSCONF_SC_NPROCESSORS_ONLN=yes
+    samba_cv_SYSCONF_SC_PAGESIZE=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	 samba_cv_SYSCONF_SC_PAGESIZE=no
-+   samba_cv_SYSCONF_SC_NPROCESSORS_ONLN=no
++   samba_cv_SYSCONF_SC_PAGESIZE=no
  fi
 -
 -rm -rf conftest.dSYM
@@ -66042,32 +66261,27 @@
  
  fi
 -{ $as_echo "$as_me:$LINENO: result: $samba_cv_SYSCONF_SC_PAGESIZE" >&5
--$as_echo "$samba_cv_SYSCONF_SC_PAGESIZE" >&6; }
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $samba_cv_SYSCONF_SC_NPROCESSORS_ONLN" >&5
-+$as_echo "$samba_cv_SYSCONF_SC_NPROCESSORS_ONLN" >&6; }
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $samba_cv_SYSCONF_SC_PAGESIZE" >&5
+ $as_echo "$samba_cv_SYSCONF_SC_PAGESIZE" >&6; }
  
--    if test x"$samba_cv_SYSCONF_SC_PAGESIZE" = x"yes" ; then
-+    if test x"$samba_cv_SYSCONF_SC_NPROCESSORS_ONLN" = x"yes" ; then
+     if test x"$samba_cv_SYSCONF_SC_PAGESIZE" = x"yes" ; then
  
 -cat >>confdefs.h <<\_ACEOF
 -#define SYSCONF_SC_PAGESIZE 1
 -_ACEOF
-+$as_echo "#define SYSCONF_SC_NPROCESSORS_ONLN 1" >>confdefs.h
++$as_echo "#define SYSCONF_SC_PAGESIZE 1" >>confdefs.h
  
      fi
  
- 
--for ac_func in getpagesize
+-
+ for ac_func in getpagesize
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
 -$as_echo_n "checking for $ac_func... " >&6; }
 -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysconf(_SC_PAGESIZE)" >&5
-+$as_echo_n "checking for sysconf(_SC_PAGESIZE)... " >&6; }
-+if test "${samba_cv_SYSCONF_SC_PAGESIZE+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
+-  $as_echo_n "(cached) " >&6
+-else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
@@ -66104,19 +66318,15 @@
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
 -#endif
- 
-+	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h.  */
-+#include <unistd.h>
- int
- main ()
- {
+-
+-int
+-main ()
+-{
 -return $ac_func ();
-+ return sysconf(_SC_PAGESIZE) == -1 ? 1 : 0;
-   ;
-   return 0;
- }
- _ACEOF
+-  ;
+-  return 0;
+-}
+-_ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -66139,22 +66349,17 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  eval "$as_ac_var=yes"
-+if ac_fn_c_try_link "$LINENO"; then :
-+   samba_cv_SYSCONF_SC_PAGESIZE=yes
- else
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	eval "$as_ac_var=no"
-+   samba_cv_SYSCONF_SC_PAGESIZE=no
- fi
-+rm -f core conftest.err conftest.$ac_objext \
-+    conftest$ac_exeext conftest.$ac_ext
- 
+-fi
+-
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
- fi
+-fi
 -ac_res=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
@@ -66162,16 +66367,6 @@
 -as_val=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $samba_cv_SYSCONF_SC_PAGESIZE" >&5
-+$as_echo "$samba_cv_SYSCONF_SC_PAGESIZE" >&6; }
-+
-+    if test x"$samba_cv_SYSCONF_SC_PAGESIZE" = x"yes" ; then
-+
-+$as_echo "#define SYSCONF_SC_PAGESIZE 1" >>confdefs.h
-+
-+    fi
-+
-+for ac_func in getpagesize
 +do :
 +  ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
 +if test "x$ac_cv_func_getpagesize" = x""yes; then :
@@ -66181,7 +66376,7 @@
  _ACEOF
  
  fi
-@@ -58898,20 +21701,16 @@
+@@ -59034,20 +21697,16 @@
  seteuid=no;
  
  if test $seteuid = no; then
@@ -66206,7 +66401,7 @@
  /* end confdefs.h.  */
  
  #define AUTOCONF_TEST 1
-@@ -58919,50 +21718,21 @@
+@@ -59055,50 +21714,21 @@
  #include "confdefs.h"
  #include "${srcdir-.}/lib/util_sec.c"
  _ACEOF
@@ -66263,7 +66458,7 @@
  
  fi
  fi
-@@ -58970,20 +21740,16 @@
+@@ -59106,20 +21736,16 @@
  # we check for setresuid second as it conflicts with AIO on Linux.
  # see http://samba.org/~tridge/junkcode/aio_uid.c
  if test $seteuid = no; then
@@ -66288,7 +66483,7 @@
  /* end confdefs.h.  */
  
  #define AUTOCONF_TEST 1
-@@ -58991,69 +21757,36 @@
+@@ -59127,69 +21753,36 @@
  #include "confdefs.h"
  #include "${srcdir-.}/lib/util_sec.c"
  _ACEOF
@@ -66368,7 +66563,7 @@
  /* end confdefs.h.  */
  
  #define AUTOCONF_TEST 1
-@@ -59061,69 +21794,36 @@
+@@ -59197,69 +21790,36 @@
  #include "confdefs.h"
  #include "${srcdir-.}/lib/util_sec.c"
  _ACEOF
@@ -66448,7 +66643,7 @@
  /* end confdefs.h.  */
  
  #define AUTOCONF_TEST 1
-@@ -59131,64 +21831,31 @@
+@@ -59267,64 +21827,31 @@
  #include "confdefs.h"
  #include "${srcdir-.}/lib/util_sec.c"
  _ACEOF
@@ -66522,7 +66717,7 @@
  /* end confdefs.h.  */
  
  #include <sys/syscall.h>
-@@ -59202,195 +21869,98 @@
+@@ -59338,195 +21865,98 @@
    return 0;
  }
  _ACEOF
@@ -66748,7 +66943,7 @@
  /* end confdefs.h.  */
  
  #if defined(HAVE_UNISTD_H)
-@@ -59414,66 +21984,33 @@
+@@ -59550,66 +21980,33 @@
  #endif
  }
  _ACEOF
@@ -66824,7 +67019,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <sys/stat.h>
-@@ -59486,55 +22023,28 @@
+@@ -59622,55 +22019,28 @@
    return 0;
  }
  _ACEOF
@@ -66887,7 +67082,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <sys/stat.h>
-@@ -59547,55 +22057,28 @@
+@@ -59683,55 +22053,28 @@
    return 0;
  }
  _ACEOF
@@ -66950,7 +67145,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <sys/stat.h>
-@@ -59608,57 +22091,30 @@
+@@ -59744,57 +22087,30 @@
    return 0;
  }
  _ACEOF
@@ -67015,7 +67210,7 @@
  /* end confdefs.h.  */
  
  #include <sys/types.h>
-@@ -59674,58 +22130,31 @@
+@@ -59810,58 +22126,31 @@
    return 0;
  }
  _ACEOF
@@ -67082,7 +67277,7 @@
  /* end confdefs.h.  */
  
  #include <stdio.h>
-@@ -59744,74 +22173,45 @@
+@@ -59880,74 +22169,45 @@
  }
  
  _ACEOF
@@ -67168,7 +67363,7 @@
  $as_echo "no" >&6; }
  
  fi
-@@ -59820,24 +22220,24 @@
+@@ -59956,24 +22216,24 @@
  ####################################################
  # check for Linux-specific AFS fake-kaserver support
  samba_cv_WITH_FAKE_KASERVER=no
@@ -67198,7 +67393,7 @@
  $as_echo "no" >&6; }
  
  fi
-@@ -59849,18 +22249,14 @@
+@@ -59985,18 +22245,14 @@
     test x"$samba_cv_WITH_FAKE_KASERVER" != x"no"; then
  
      # see if this box has the OpenSSL DES libraries
@@ -67220,7 +67415,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -59878,208 +22274,43 @@
+@@ -60014,208 +22270,43 @@
    return 0;
  }
  _ACEOF
@@ -67445,7 +67640,7 @@
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
-@@ -60091,12 +22322,10 @@
+@@ -60227,12 +22318,10 @@
      if test x"$ac_cv_header_afs_h" = x"no" && test x"$ac_cv_header_afs_afs_h" = x"no"; then
      	if test x"$samba_cv_WITH_FAKE_KASERVER" = x"auto" ||
  	   test x"$samba_cv_WITH_AFS" = x"auto"; then
@@ -67460,7 +67655,7 @@
  	fi
      else
      	have_afs_headers=yes
-@@ -60106,9 +22335,7 @@
+@@ -60242,9 +22331,7 @@
  FAKE_KASERVER_OBJ=""
  if test x"$samba_cv_WITH_FAKE_KASERVER" != x"no" && test x"$have_afs_headers" = x"yes"; then
  
@@ -67471,7 +67666,7 @@
  
      FAKE_KASERVER_OBJ="utils/net_afs.o"
  fi
-@@ -60117,24 +22344,24 @@
+@@ -60253,24 +22340,24 @@
  #################################################
  # check whether to compile AFS/NT ACL mapping module
  samba_cv_WITH_VFS_AFSACL=no
@@ -67501,77 +67696,72 @@
  $as_echo "no" >&6; }
  
  fi
-@@ -60146,36 +22373,32 @@
+@@ -60280,220 +22367,78 @@
+    default_shared_modules="$default_shared_modules vfs_afsacl"
+ fi
  
- if test x"$samba_cv_WITH_AFS" != x"no" && test x"$have_afs_headers" = x"yes"; then
- 
+-if test x"$samba_cv_WITH_AFS" != x"no" && test x"$have_afs_headers" = x"yes"; then
+-
 -cat >>confdefs.h <<\_ACEOF
 -#define WITH_AFS 1
 -_ACEOF
-+$as_echo "#define WITH_AFS 1" >>confdefs.h
- 
- fi
- 
- #################################################
- # check for the DFS clear-text auth system
+-
+-fi
+-
+-#################################################
+-# check for the DFS clear-text auth system
 -{ $as_echo "$as_me:$LINENO: checking whether to use DFS clear-text auth" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use DFS clear-text auth" >&5
- $as_echo_n "checking whether to use DFS clear-text auth... " >&6; }
- 
- # Check whether --with-dfs was given.
+-$as_echo_n "checking whether to use DFS clear-text auth... " >&6; }
+-
+-# Check whether --with-dfs was given.
 -if test "${with_dfs+set}" = set; then
-+if test "${with_dfs+set}" = set; then :
-   withval=$with_dfs;  case "$withval" in
-   yes)
+-  withval=$with_dfs;  case "$withval" in
+-  yes)
 -    { $as_echo "$as_me:$LINENO: result: yes" >&5
-+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
- $as_echo "yes" >&6; }
- 
+-$as_echo "yes" >&6; }
+-
 -cat >>confdefs.h <<\_ACEOF
 -#define WITH_DFS 1
 -_ACEOF
-+$as_echo "#define WITH_DFS 1" >>confdefs.h
- 
-     ;;
-   *)
+-
+-    ;;
+-  *)
 -    { $as_echo "$as_me:$LINENO: result: no" >&5
-+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
- $as_echo "no" >&6; }
-     ;;
-   esac
- else
+-$as_echo "no" >&6; }
+-    ;;
+-  esac
+-else
 -  { $as_echo "$as_me:$LINENO: result: no" >&5
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
- $as_echo "no" >&6; }
- 
- fi
-@@ -60185,12 +22408,12 @@
- # Compile with LDAP support?
- 
- with_ldap_support=auto
+-$as_echo "no" >&6; }
+-
+-fi
+-
+-
+-########################################################
+-# Compile with LDAP support?
+-
+-with_ldap_support=auto
 -{ $as_echo "$as_me:$LINENO: checking for LDAP support" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDAP support" >&5
- $as_echo_n "checking for LDAP support... " >&6; }
- 
- 
- # Check whether --with-ldap was given.
+-$as_echo_n "checking for LDAP support... " >&6; }
+-
+-
+-# Check whether --with-ldap was given.
 -if test "${with_ldap+set}" = set; then
-+if test "${with_ldap+set}" = set; then :
-   withval=$with_ldap;  case "$withval" in
-     yes|no)
- 	with_ldap_support=$withval
-@@ -60199,303 +22422,70 @@
- fi
- 
- 
+-  withval=$with_ldap;  case "$withval" in
+-    yes|no)
+-	with_ldap_support=$withval
+-	;;
+-  esac
+-fi
+-
+-
 -{ $as_echo "$as_me:$LINENO: result: $with_ldap_support" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_ldap_support" >&5
- $as_echo "$with_ldap_support" >&6; }
- 
- SMBLDAP=""
- 
- SMBLDAPUTIL=""
- 
+-$as_echo "$with_ldap_support" >&6; }
+-
+-SMBLDAP=""
+-
+-SMBLDAPUTIL=""
+-
 -LDBLDAP=""
 -
 -
@@ -67672,12 +67862,29 @@
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -  ac_header_preproc=no
--fi
--
++if test x"$samba_cv_WITH_AFS" != x"no" && test x"$have_afs_headers" = x"yes"; then
++
++$as_echo "#define WITH_AFS 1" >>confdefs.h
++
+ fi
+ 
 -rm -f conftest.err conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
 -$as_echo "$ac_header_preproc" >&6; }
--
++#################################################
++# check for the DFS clear-text auth system
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use DFS clear-text auth" >&5
++$as_echo_n "checking whether to use DFS clear-text auth... " >&6; }
++
++# Check whether --with-dfs was given.
++if test "${with_dfs+set}" = set; then :
++  withval=$with_dfs;  case "$withval" in
++  yes)
++    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }
++
++$as_echo "#define WITH_DFS 1" >>confdefs.h
+ 
 -# So?  What about this header?
 -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
 -  yes:no: )
@@ -67686,7 +67893,7 @@
 -    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
 -    ac_header_preproc=yes
--    ;;
+     ;;
 -  no:yes:* )
 -    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
 -$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
@@ -67706,58 +67913,100 @@
 -## ---------------------------------------- ##
 -_ASBOX
 -     ) | sed "s/^/$as_me: WARNING:     /" >&2
--    ;;
++  *)
++    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
+     ;;
 -esac
 -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
 -$as_echo_n "checking for $ac_header... " >&6; }
 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
 -  $as_echo_n "(cached) " >&6
--else
++  esac
+ else
 -  eval "$as_ac_Header=\$ac_header_preproc"
--fi
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++
+ fi
 -ac_res=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
 -$as_echo "$ac_res" >&6; }
--
--fi
+ 
++
++########################################################
++# Compile with LDAP support?
++
++with_ldap_support=auto
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDAP support" >&5
++$as_echo_n "checking for LDAP support... " >&6; }
++
++
++# Check whether --with-ldap was given.
++if test "${with_ldap+set}" = set; then :
++  withval=$with_ldap;  case "$withval" in
++    yes|no)
++	with_ldap_support=$withval
++	;;
++  esac
+ fi
 -as_val=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -   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
--
--
--  if test x"$ac_cv_header_ldap_h" != x"yes"; then
--	if test x"$with_ldap_support" = x"yes"; then
++
++
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_ldap_support" >&5
++$as_echo "$with_ldap_support" >&6; }
++
++SMBLDAP=""
++
++SMBLDAPUTIL=""
++
++LDBLDAP=""
++
++
++if test x"$with_ldap_support" != x"no"; then
++
++  ##################################################################
++  # first test for ldap.h and lber.h
++  # (ldap.h is required for this test)
++  for ac_header in ldap.h lber.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
+@@ -60505,11 +22450,9 @@
+ 
+   if test x"$ac_cv_header_ldap_h" != x"yes"; then
+ 	if test x"$with_ldap_support" = x"yes"; then
 -	 { { $as_echo "$as_me:$LINENO: error: ldap.h is needed for LDAP support" >&5
 -$as_echo "$as_me: error: ldap.h is needed for LDAP support" >&2;}
 -   { (exit 1); exit 1; }; }
--	else
++	 as_fn_error "ldap.h is needed for LDAP support" "$LINENO" 5
+ 	else
 -	 { $as_echo "$as_me:$LINENO: WARNING: ldap.h is needed for LDAP support" >&5
--$as_echo "$as_me: WARNING: ldap.h is needed for LDAP support" >&2;}
--	fi
--
--	with_ldap_support=no
--  fi
--
--  ##################################################################
--  # HP/UX does not have ber_tag_t in lber.h - it must be configured as
--  # unsigned int in include/includes.h
--  case $host_os in
--	*hpux*)
++	 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ldap.h is needed for LDAP support" >&5
+ $as_echo "$as_me: WARNING: ldap.h is needed for LDAP support" >&2;}
+ 	fi
+ 
+@@ -60521,117 +22464,24 @@
+   # unsigned int in include/includes.h
+   case $host_os in
+ 	*hpux*)
 -	 { $as_echo "$as_me:$LINENO: WARNING: ber_tag_t is needed for LDAP support" >&5
--$as_echo "$as_me: WARNING: ber_tag_t is needed for LDAP support" >&2;}
++	 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ber_tag_t is needed for LDAP support" >&5
+ $as_echo "$as_me: WARNING: ber_tag_t is needed for LDAP support" >&2;}
 -	 { $as_echo "$as_me:$LINENO: WARNING: ber_tag_t must be configured in includes.h for hpux" >&5
--$as_echo "$as_me: WARNING: ber_tag_t must be configured in includes.h for hpux" >&2;}
--	with_ldap_support=yes
--  	;;
--	*)
++	 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ber_tag_t must be configured in includes.h for hpux" >&5
+ $as_echo "$as_me: WARNING: ber_tag_t must be configured in includes.h for hpux" >&2;}
+ 	with_ldap_support=yes
+   	;;
+ 	*)
 -  	{ $as_echo "$as_me:$LINENO: checking for ber_tag_t" >&5
 -$as_echo_n "checking for ber_tag_t... " >&6; }
 -if test "${ac_cv_type_ber_tag_t+set}" = set; then
@@ -67815,23 +68064,7 @@
 -  ;
 -  return 0;
 -}
-+LDBLDAP=""
-+
-+
-+if test x"$with_ldap_support" != x"no"; then
-+
-+  ##################################################################
-+  # first test for ldap.h and lber.h
-+  # (ldap.h is required for this test)
-+  for ac_header in ldap.h lber.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
+-_ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -67854,41 +68087,17 @@
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
- 
+-
 -	ac_cv_type_ber_tag_t=yes
- fi
- 
+-fi
+-
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+done
- 
- 
+-
+-
 -fi
-+  if test x"$ac_cv_header_ldap_h" != x"yes"; then
-+	if test x"$with_ldap_support" = x"yes"; then
-+	 as_fn_error "ldap.h is needed for LDAP support" "$LINENO" 5
-+	else
-+	 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ldap.h is needed for LDAP support" >&5
-+$as_echo "$as_me: WARNING: ldap.h is needed for LDAP support" >&2;}
-+	fi
-+
-+	with_ldap_support=no
-+  fi
-+
-+  ##################################################################
-+  # HP/UX does not have ber_tag_t in lber.h - it must be configured as
-+  # unsigned int in include/includes.h
-+  case $host_os in
-+	*hpux*)
-+	 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ber_tag_t is needed for LDAP support" >&5
-+$as_echo "$as_me: WARNING: ber_tag_t is needed for LDAP support" >&2;}
-+	 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ber_tag_t must be configured in includes.h for hpux" >&5
-+$as_echo "$as_me: WARNING: ber_tag_t must be configured in includes.h for hpux" >&2;}
-+	with_ldap_support=yes
-+  	;;
-+	*)
 +  	ac_fn_c_check_type "$LINENO" "ber_tag_t" "ac_cv_type_ber_tag_t" "#include <lber.h>
 +"
 +if test "x$ac_cv_type_ber_tag_t" = x""yes; then :
@@ -67910,7 +68119,7 @@
  $as_echo "$as_me: WARNING: ber_tag_t is needed for LDAP support" >&2;}
  		fi
  		with_ldap_support=no
-@@ -60512,23 +22502,17 @@
+@@ -60648,23 +22498,17 @@
    # this test must be before the libldap test
  
  
@@ -67937,7 +68146,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -60546,54 +22530,28 @@
+@@ -60682,54 +22526,28 @@
    return 0;
  }
  _ACEOF
@@ -67999,7 +68208,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_LIBLBER 1
  _ACEOF
-@@ -60609,25 +22567,19 @@
+@@ -60745,25 +22563,19 @@
  
  fi
  
@@ -68028,7 +68237,7 @@
  /* end confdefs.h.  */
  /* Define ber_sockbuf_add_io to an innocuous variant, in case <limits.h> declares ber_sockbuf_add_io.
     For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-@@ -60668,61 +22620,31 @@
+@@ -60804,61 +22616,31 @@
    return 0;
  }
  _ACEOF
@@ -68099,7 +68308,7 @@
  /* end confdefs.h.  */
  #include <ldap.h>
  int
-@@ -60733,59 +22655,32 @@
+@@ -60869,59 +22651,32 @@
    return 0;
  }
  _ACEOF
@@ -68166,7 +68375,7 @@
  /* end confdefs.h.  */
  #include <lber.h>
  int
-@@ -60796,42 +22691,19 @@
+@@ -60932,42 +22687,19 @@
    return 0;
  }
  _ACEOF
@@ -68213,7 +68422,7 @@
  
    fi
  
-@@ -60839,23 +22711,17 @@
+@@ -60975,23 +22707,17 @@
    # now see if we can find the ldap libs in standard paths
  
  
@@ -68240,7 +68449,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -60873,54 +22739,28 @@
+@@ -61009,54 +22735,28 @@
    return 0;
  }
  _ACEOF
@@ -68302,7 +68511,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_LIBLDAP 1
  _ACEOF
-@@ -60936,25 +22776,19 @@
+@@ -61072,25 +22772,19 @@
  
  fi
  
@@ -68331,7 +68540,7 @@
  /* end confdefs.h.  */
  /* Define ldap_set_rebind_proc to an innocuous variant, in case <limits.h> declares ldap_set_rebind_proc.
     For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-@@ -60995,62 +22829,32 @@
+@@ -61131,62 +22825,32 @@
    return 0;
  }
  _ACEOF
@@ -68403,7 +68612,7 @@
  /* end confdefs.h.  */
  
  	#include <lber.h>
-@@ -61063,37 +22867,16 @@
+@@ -61199,37 +22863,16 @@
    return 0;
  }
  _ACEOF
@@ -68444,7 +68653,7 @@
  $as_echo "$smb_ldap_cv_ldap_set_rebind_proc" >&6; }
  
  
-@@ -61104,19 +22887,14 @@
+@@ -61240,19 +22883,14 @@
  
  
  
@@ -68467,7 +68676,7 @@
  /* end confdefs.h.  */
  /* Define ldap_initialize to an innocuous variant, in case <limits.h> declares ldap_initialize.
     For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-@@ -61157,55 +22935,27 @@
+@@ -61293,55 +22931,27 @@
    return 0;
  }
  _ACEOF
@@ -68530,7 +68739,7 @@
  
      CPPFLAGS="$CPPFLAGS -DLDAP_DEPRECATED"
      default_static_modules="$default_static_modules pdb_ldap idmap_ldap";
-@@ -61213,17 +22963,15 @@
+@@ -61349,17 +22959,15 @@
      SMBLDAP="lib/smbldap.o"
      SMBLDAPUTIL="lib/smbldap_util.o"
      with_ldap_support=yes
@@ -68552,7 +68761,7 @@
  $as_echo "$as_me: WARNING: libldap is needed for LDAP support" >&2;}
      fi
  
-@@ -61238,12 +22986,12 @@
+@@ -61374,12 +22982,12 @@
  # active directory support
  
  with_ads_support=auto
@@ -68567,7 +68776,7 @@
    withval=$with_ads;  case "$withval" in
      yes|no)
  	with_ads_support="$withval"
-@@ -61252,7 +23000,7 @@
+@@ -61388,7 +22996,7 @@
  fi
  
  
@@ -68576,7 +68785,7 @@
  $as_echo "$with_ads_support" >&6; }
  
  FOUND_KRB5=no
-@@ -61261,11 +23009,9 @@
+@@ -61397,11 +23005,9 @@
  if test x"$with_ldap_support" != x"yes"; then
  
      if test x"$with_ads_support" = x"yes"; then
@@ -68590,7 +68799,7 @@
  $as_echo "$as_me: WARNING: Disabling Active Directory support (requires LDAP support)" >&2;}
  	with_ads_support=no
      fi
-@@ -61280,19 +23026,14 @@
+@@ -61416,19 +23022,14 @@
  	*hpux*)
  
  
@@ -68613,7 +68822,7 @@
  /* end confdefs.h.  */
  /* Define ldap_init to an innocuous variant, in case <limits.h> declares ldap_init.
     For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-@@ -61333,57 +23074,29 @@
+@@ -61469,57 +23070,29 @@
    return 0;
  }
  _ACEOF
@@ -68679,7 +68888,7 @@
  $as_echo "$as_me: WARNING: Disabling Active Directory support (requires ldap_init on HPUX)" >&2;}
  	    with_ads_support=no
  	fi
-@@ -61392,19 +23105,14 @@
+@@ -61528,19 +23101,14 @@
  	*)
  
  
@@ -68702,7 +68911,7 @@
  /* end confdefs.h.  */
  /* Define ldap_initialize to an innocuous variant, in case <limits.h> declares ldap_initialize.
     For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-@@ -61445,57 +23153,29 @@
+@@ -61581,57 +23149,29 @@
    return 0;
  }
  _ACEOF
@@ -68768,7 +68977,7 @@
  $as_echo "$as_me: WARNING: Disabling Active Directory support (requires ldap_initialize)" >&2;}
  	    with_ads_support=no
  	fi
-@@ -61506,19 +23186,14 @@
+@@ -61642,19 +23182,14 @@
  
  
  
@@ -68791,7 +69000,7 @@
  /* end confdefs.h.  */
  /* Define ldap_add_result_entry to an innocuous variant, in case <limits.h> declares ldap_add_result_entry.
     For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-@@ -61559,57 +23234,29 @@
+@@ -61695,57 +23230,29 @@
    return 0;
  }
  _ACEOF
@@ -68857,7 +69066,7 @@
  $as_echo "$as_me: WARNING: Disabling Active Directory support (requires ldap_add_result_entry)" >&2;}
  	    with_ads_support=no
  	fi
-@@ -61625,23 +23272,23 @@
+@@ -61761,23 +23268,23 @@
    if test x$FOUND_KRB5 = x"no"; then
      #################################################
      # check for location of Kerberos 5 install
@@ -68886,7 +69095,7 @@
  $as_echo "$withval" >&6; }
          KRB5_CFLAGS="-I$withval/include"
          KRB5_CPPFLAGS="-I$withval/include"
-@@ -61653,7 +23300,7 @@
+@@ -61789,7 +23296,7 @@
          ;;
        esac
  else
@@ -68895,7 +69104,7 @@
  $as_echo "no krb5-path given" >&6; }
  
  fi
-@@ -61664,9 +23311,9 @@
+@@ -61800,9 +23307,9 @@
    # check for krb5-config from recent MIT and Heimdal kerberos 5
    # Extract the first word of "krb5-config", so it can be a program name with args.
  set dummy krb5-config; ac_word=$2
@@ -68907,7 +69116,7 @@
    $as_echo_n "(cached) " >&6
  else
    case $KRB5CONFIG in
-@@ -61679,14 +23326,14 @@
+@@ -61815,14 +23322,14 @@
  do
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
@@ -68925,7 +69134,7 @@
  IFS=$as_save_IFS
  
    ;;
-@@ -61694,15 +23341,15 @@
+@@ -61830,15 +23337,15 @@
  fi
  KRB5CONFIG=$ac_cv_path_KRB5CONFIG
  if test -n "$KRB5CONFIG"; then
@@ -68944,7 +69153,7 @@
  $as_echo_n "checking for working krb5-config... " >&6; }
    if test -x "$KRB5CONFIG" && $KRB5CONFIG --libs gssapi > /dev/null ; then
      ac_save_CFLAGS=$CFLAGS
-@@ -61716,17 +23363,17 @@
+@@ -61852,17 +23359,17 @@
      CFLAGS=$ac_save_CFLAGS;export CFLAGS
      LDFLAGS=$ac_save_LDFLAGS;export LDFLAGS
      FOUND_KRB5=yes
@@ -68965,7 +69174,7 @@
  $as_echo_n "checking for /usr/include/heimdal... " >&6; }
      if test -d /usr/include/heimdal; then
        if test -f /usr/lib/heimdal/lib/libkrb5.a; then
-@@ -61734,17 +23381,17 @@
+@@ -61870,17 +23377,17 @@
            KRB5_CPPFLAGS="-I/usr/include/heimdal"
            KRB5_LDFLAGS="-L/usr/lib/heimdal/lib"
  	  FOUND_KRB5=yes
@@ -68986,7 +69195,7 @@
  $as_echo "no" >&6; }
      fi
    fi
-@@ -61752,17 +23399,17 @@
+@@ -61888,17 +23395,17 @@
    if test x$FOUND_KRB5 = x"no"; then
      #################################################
      # see if this box has the RedHat location for kerberos
@@ -69007,7 +69216,7 @@
  $as_echo "no" >&6; }
      fi
    fi
-@@ -61770,16 +23417,16 @@
+@@ -61906,16 +23413,16 @@
    if test x$FOUND_KRB5 = x"no"; then
      #################################################
      # see if this box has the OpenBSD location for heimdal krb5
@@ -69027,7 +69236,7 @@
  $as_echo "no" >&6; }
      fi
    fi
-@@ -61866,151 +23513,12 @@
+@@ -62002,151 +23509,12 @@
    # now check for krb5.h. Some systems have the libraries without the headers!
    # note that this check is done here to allow for different kerberos
    # include paths
@@ -69184,7 +69393,7 @@
  _ACEOF
  
  fi
-@@ -62024,11 +23532,9 @@
+@@ -62160,11 +23528,9 @@
      # i.e with_ads_support = auto, otherwise die with an error.
  
      if test x"$with_ads_support" = x"yes"; then
@@ -69198,7 +69407,7 @@
  $as_echo "$as_me: WARNING: Active Directory cannot be supported without krb5.h" >&2;}
      fi
  
-@@ -62040,151 +23546,12 @@
+@@ -62176,65 +23542,16 @@
      CPPFLAGS=$ac_save_CPPFLAGS
      LDFLAGS=$ac_save_LDFLAGS
    fi
@@ -69206,27 +69415,25 @@
 -for ac_header in krb5/locate_plugin.h
 -do
 -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
--if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
--  { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+-{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
 -$as_echo_n "checking for $ac_header... " >&6; }
 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
 -  $as_echo_n "(cached) " >&6
--fi
--ac_res=`eval 'as_val=${'$as_ac_Header'}
--		 $as_echo "$as_val"'`
--	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
--$as_echo "$ac_res" >&6; }
 -else
--  # Is the header compilable?
--{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
--$as_echo_n "checking $ac_header usability... " >&6; }
--cat >conftest.$ac_ext <<_ACEOF
+-  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
--$ac_includes_default
+-#ifdef HAVE_KRB5_H
++  for ac_header in krb5/locate_plugin.h
++do :
++  ac_fn_c_check_header_compile "$LINENO" "krb5/locate_plugin.h" "ac_cv_header_krb5_locate_plugin_h" "#ifdef HAVE_KRB5_H
+  #include <krb5.h>
+  #endif
+ 
+-
 -#include <$ac_header>
 -_ACEOF
 -rm -f conftest.$ac_objext
@@ -69247,115 +69454,100 @@
 -	 test -z "$ac_c_werror_flag" ||
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
--  ac_header_compiler=yes
+-  eval "$as_ac_Header=yes"
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
--	ac_header_compiler=no
+-	eval "$as_ac_Header=no"
 -fi
 -
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
--{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
--$as_echo "$ac_header_compiler" >&6; }
--
--# Is the header present?
--{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
--$as_echo_n "checking $ac_header presence... " >&6; }
--cat >conftest.$ac_ext <<_ACEOF
+-fi
+-ac_res=`eval 'as_val=${'$as_ac_Header'}
+-		 $as_echo "$as_val"'`
+-	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+-$as_echo "$ac_res" >&6; }
+-as_val=`eval 'as_val=${'$as_ac_Header'}
+-		 $as_echo "$as_val"'`
+-   if test "x$as_val" = x""yes; then
++"
++if test "x$ac_cv_header_krb5_locate_plugin_h" = x""yes; then :
+   cat >>confdefs.h <<_ACEOF
+-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
++#define HAVE_KRB5_LOCATE_PLUGIN_H 1
+ _ACEOF
+ 
+ fi
+@@ -62249,17 +23566,13 @@
+ 
+   # check for new heimdal KRB5_DEPRECATED handling
+ 
+-  { $as_echo "$as_me:$LINENO: checking for KRB5_DEPRECATED define taking an identifier" >&5
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for KRB5_DEPRECATED define taking an identifier" >&5
+ $as_echo_n "checking for KRB5_DEPRECATED define taking an identifier... " >&6; }
+-if test "${samba_cv_HAVE_KRB5_DEPRECATED_WITH_IDENTIFIER+set}" = set; then
++if test "${samba_cv_HAVE_KRB5_DEPRECATED_WITH_IDENTIFIER+set}" = set; then :
+   $as_echo_n "(cached) " >&6
+ else
+ 
+-    cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
--#include <$ac_header>
--_ACEOF
--if { (ac_try="$ac_cpp conftest.$ac_ext"
++    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ #define KRB5_DEPRECATED 1
+       #include <krb5.h>
+@@ -62271,42 +23584,19 @@
+   return 0;
+ }
+ _ACEOF
+-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:$LINENO: $ac_try_echo\""
 -$as_echo "$ac_try_echo") >&5
--  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+-  (eval "$ac_compile") 2>conftest.er1
 -  ac_status=$?
 -  grep -v '^ *+' conftest.er1 >conftest.err
 -  rm -f conftest.er1
 -  cat conftest.err >&5
 -  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
--  (exit $ac_status); } >/dev/null && {
--	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+-  (exit $ac_status); } && {
+-	 test -z "$ac_c_werror_flag" ||
 -	 test ! -s conftest.err
--       }; then
--  ac_header_preproc=yes
--else
+-       } && test -s conftest.$ac_objext; then
++if ac_fn_c_try_compile "$LINENO"; then :
+   samba_cv_HAVE_KRB5_DEPRECATED_WITH_IDENTIFIER=yes
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
--  ac_header_preproc=no
--fi
+-	samba_cv_HAVE_KRB5_DEPRECATED_WITH_IDENTIFIER=no
++  samba_cv_HAVE_KRB5_DEPRECATED_WITH_IDENTIFIER=no
+ fi
 -
--rm -f conftest.err conftest.$ac_ext
--{ $as_echo "$as_me:$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:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
--$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
--    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
--$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
--    ac_header_preproc=yes
--    ;;
--  no:yes:* )
--    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
--$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
--    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
--$as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
--    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
--$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
--    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
--$as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
--    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
--$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
--    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
--$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
--    ( cat <<\_ASBOX
--## ---------------------------------------- ##
--## Report this to samba-technical at samba.org ##
--## ---------------------------------------- ##
--_ASBOX
--     ) | sed "s/^/$as_me: WARNING:     /" >&2
--    ;;
--esac
--{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
--$as_echo_n "checking for $ac_header... " >&6; }
--if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
--  $as_echo_n "(cached) " >&6
--else
--  eval "$as_ac_Header=\$ac_header_preproc"
--fi
--ac_res=`eval 'as_val=${'$as_ac_Header'}
--		 $as_echo "$as_val"'`
--	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
--$as_echo "$ac_res" >&6; }
--
--fi
--as_val=`eval 'as_val=${'$as_ac_Header'}
--		 $as_echo "$as_val"'`
--   if test "x$as_val" = x""yes; then
-+  for ac_header in krb5/locate_plugin.h
-+do :
-+  ac_fn_c_check_header_mongrel "$LINENO" "krb5/locate_plugin.h" "ac_cv_header_krb5_locate_plugin_h" "$ac_includes_default"
-+if test "x$ac_cv_header_krb5_locate_plugin_h" = x""yes; then :
-   cat >>confdefs.h <<_ACEOF
--#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-+#define HAVE_KRB5_LOCATE_PLUGIN_H 1
- _ACEOF
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+-{ $as_echo "$as_me:$LINENO: result: $samba_cv_HAVE_KRB5_DEPRECATED_WITH_IDENTIFIER" >&5
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $samba_cv_HAVE_KRB5_DEPRECATED_WITH_IDENTIFIER" >&5
+ $as_echo "$samba_cv_HAVE_KRB5_DEPRECATED_WITH_IDENTIFIER" >&6; }
  
+   if test x"$samba_cv_HAVE_KRB5_DEPRECATED_WITH_IDENTIFIER" = x"yes"; then
+ 
+-cat >>confdefs.h <<\_ACEOF
+-#define HAVE_KRB5_DEPRECATED_WITH_IDENTIFIER 1
+-_ACEOF
++$as_echo "#define HAVE_KRB5_DEPRECATED_WITH_IDENTIFIER 1" >>confdefs.h
+ 
+   fi
  fi
-@@ -62206,152 +23573,12 @@
+@@ -62320,152 +23610,12 @@
  
    # now check for gssapi headers.  This is also done here to allow for
    # different kerberos include paths
@@ -69514,7 +69706,7 @@
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
-@@ -62365,23 +23592,17 @@
+@@ -62479,23 +23629,17 @@
    # we might need the k5crypto and com_err libraries on some systems
  
  
@@ -69541,7 +69733,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -62399,54 +23620,28 @@
+@@ -62513,54 +23657,28 @@
    return 0;
  }
  _ACEOF
@@ -69603,7 +69795,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_LIBCOM_ERR 1
  _ACEOF
-@@ -62463,24 +23658,17 @@
+@@ -62577,24 +23695,17 @@
  fi
  
  
@@ -69631,7 +69823,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -62498,54 +23686,28 @@
+@@ -62612,54 +23723,28 @@
    return 0;
  }
  _ACEOF
@@ -69693,7 +69885,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_LIBK5CRYPTO 1
  _ACEOF
-@@ -62561,27 +23723,20 @@
+@@ -62675,27 +23760,20 @@
  
  fi
  
@@ -69724,7 +69916,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -62599,54 +23754,28 @@
+@@ -62713,54 +23791,28 @@
    return 0;
  }
  _ACEOF
@@ -69786,7 +69978,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_LIBCRYPTO 1
  _ACEOF
-@@ -62663,24 +23792,17 @@
+@@ -62777,24 +23829,17 @@
  fi
  
  
@@ -69814,16 +70006,10 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -62692,60 +23814,34 @@
- char copy_Authenticator ();
- int
- main ()
--{
--return copy_Authenticator ();
--  ;
--  return 0;
--}
--_ACEOF
+@@ -62812,54 +23857,28 @@
+   return 0;
+ }
+ _ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -69845,12 +70031,6 @@
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
-+{
-+return copy_Authenticator ();
-+  ;
-+  return 0;
-+}
-+_ACEOF
 +if ac_fn_c_try_link "$LINENO"; then :
    ac_cv_lib_ext_asn1_copy_Authenticator=yes;
  		  ac_cv_lib_ext_asn1=yes
@@ -69888,7 +70068,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_LIBASN1 1
  _ACEOF
-@@ -62762,24 +23858,17 @@
+@@ -62876,24 +23895,17 @@
  fi
  
  
@@ -69916,7 +70096,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -62797,54 +23886,28 @@
+@@ -62911,54 +23923,28 @@
    return 0;
  }
  _ACEOF
@@ -69978,7 +70158,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_LIBROKEN 1
  _ACEOF
-@@ -62860,27 +23923,20 @@
+@@ -62974,27 +23960,20 @@
  
  fi
  
@@ -70009,7 +70189,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -62898,54 +23954,28 @@
+@@ -63012,54 +23991,28 @@
    return 0;
  }
  _ACEOF
@@ -70071,7 +70251,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_LIBGSSAPI 1
  _ACEOF
-@@ -62961,29 +23991,22 @@
+@@ -63075,29 +24028,22 @@
  
  fi
  
@@ -70104,7 +70284,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -63001,54 +24024,28 @@
+@@ -63115,54 +24061,28 @@
    return 0;
  }
  _ACEOF
@@ -70166,7 +70346,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_LIBKRB5 1
  _ACEOF
-@@ -63065,24 +24062,17 @@
+@@ -63179,24 +24099,17 @@
  fi
  
  
@@ -70194,7 +70374,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -63100,54 +24090,28 @@
+@@ -63214,54 +24127,28 @@
    return 0;
  }
  _ACEOF
@@ -70256,7 +70436,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_LIBKRB5 1
  _ACEOF
-@@ -63163,29 +24127,22 @@
+@@ -63277,29 +24164,22 @@
  
  fi
  
@@ -70289,7 +70469,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -63203,54 +24160,28 @@
+@@ -63317,54 +24197,28 @@
    return 0;
  }
  _ACEOF
@@ -70351,7 +70531,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_LIBGSSAPI_KRB5 1
  _ACEOF
-@@ -63265,24 +24196,18 @@
+@@ -63379,24 +24233,18 @@
  		have_gssapi=yes
  
  fi
@@ -70379,7 +70559,7 @@
  /* end confdefs.h.  */
  /* Define krb5_set_real_time to an innocuous variant, in case <limits.h> declares krb5_set_real_time.
     For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-@@ -63323,43 +24248,18 @@
+@@ -63437,43 +24285,18 @@
    return 0;
  }
  _ACEOF
@@ -70429,7 +70609,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_SET_REAL_TIME 1
  _ACEOF
-@@ -63367,20 +24267,14 @@
+@@ -63481,20 +24304,14 @@
  fi
  
  
@@ -70453,7 +70633,7 @@
  /* end confdefs.h.  */
  /* Define krb5_set_default_in_tkt_etypes to an innocuous variant, in case <limits.h> declares krb5_set_default_in_tkt_etypes.
     For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-@@ -63421,43 +24315,18 @@
+@@ -63535,43 +24352,18 @@
    return 0;
  }
  _ACEOF
@@ -70503,7 +70683,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_SET_DEFAULT_IN_TKT_ETYPES 1
  _ACEOF
-@@ -63465,20 +24334,14 @@
+@@ -63579,20 +24371,14 @@
  fi
  
  
@@ -70527,7 +70707,7 @@
  /* end confdefs.h.  */
  /* Define krb5_set_default_tgs_enctypes to an innocuous variant, in case <limits.h> declares krb5_set_default_tgs_enctypes.
     For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-@@ -63519,43 +24382,18 @@
+@@ -63633,43 +24419,18 @@
    return 0;
  }
  _ACEOF
@@ -70577,7 +70757,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_SET_DEFAULT_TGS_ENCTYPES 1
  _ACEOF
-@@ -63563,20 +24401,14 @@
+@@ -63677,20 +24438,14 @@
  fi
  
  
@@ -70601,7 +70781,7 @@
  /* end confdefs.h.  */
  /* Define krb5_set_default_tgs_ktypes to an innocuous variant, in case <limits.h> declares krb5_set_default_tgs_ktypes.
     For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-@@ -63617,43 +24449,18 @@
+@@ -63731,43 +24486,18 @@
    return 0;
  }
  _ACEOF
@@ -70651,7 +70831,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_SET_DEFAULT_TGS_KTYPES 1
  _ACEOF
-@@ -63661,20 +24468,14 @@
+@@ -63775,20 +24505,14 @@
  fi
  
  
@@ -70675,7 +70855,7 @@
  /* end confdefs.h.  */
  /* Define krb5_principal2salt to an innocuous variant, in case <limits.h> declares krb5_principal2salt.
     For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-@@ -63715,43 +24516,18 @@
+@@ -63829,43 +24553,18 @@
    return 0;
  }
  _ACEOF
@@ -70725,7 +70905,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_PRINCIPAL2SALT 1
  _ACEOF
-@@ -63759,20 +24535,14 @@
+@@ -63873,20 +24572,14 @@
  fi
  
  
@@ -70749,7 +70929,7 @@
  /* end confdefs.h.  */
  /* Define krb5_use_enctype to an innocuous variant, in case <limits.h> declares krb5_use_enctype.
     For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-@@ -63813,43 +24583,18 @@
+@@ -63927,43 +24620,18 @@
    return 0;
  }
  _ACEOF
@@ -70799,7 +70979,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_USE_ENCTYPE 1
  _ACEOF
-@@ -63857,20 +24602,14 @@
+@@ -63971,20 +24639,14 @@
  fi
  
  
@@ -70823,7 +71003,7 @@
  /* end confdefs.h.  */
  /* Define krb5_string_to_key to an innocuous variant, in case <limits.h> declares krb5_string_to_key.
     For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-@@ -63911,43 +24650,18 @@
+@@ -64025,43 +24687,18 @@
    return 0;
  }
  _ACEOF
@@ -70873,7 +71053,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_STRING_TO_KEY 1
  _ACEOF
-@@ -63955,20 +24669,14 @@
+@@ -64069,20 +24706,14 @@
  fi
  
  
@@ -70897,7 +71077,7 @@
  /* end confdefs.h.  */
  /* Define krb5_get_pw_salt to an innocuous variant, in case <limits.h> declares krb5_get_pw_salt.
     For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-@@ -64009,43 +24717,18 @@
+@@ -64123,43 +24754,18 @@
    return 0;
  }
  _ACEOF
@@ -70947,7 +71127,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_GET_PW_SALT 1
  _ACEOF
-@@ -64053,20 +24736,14 @@
+@@ -64167,20 +24773,14 @@
  fi
  
  
@@ -70971,7 +71151,7 @@
  /* end confdefs.h.  */
  /* Define krb5_string_to_key_salt to an innocuous variant, in case <limits.h> declares krb5_string_to_key_salt.
     For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-@@ -64107,43 +24784,18 @@
+@@ -64221,43 +24821,18 @@
    return 0;
  }
  _ACEOF
@@ -71021,7 +71201,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_STRING_TO_KEY_SALT 1
  _ACEOF
-@@ -64151,20 +24803,14 @@
+@@ -64265,20 +24840,14 @@
  fi
  
  
@@ -71045,7 +71225,7 @@
  /* end confdefs.h.  */
  /* Define krb5_auth_con_setkey to an innocuous variant, in case <limits.h> declares krb5_auth_con_setkey.
     For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-@@ -64205,43 +24851,18 @@
+@@ -64319,43 +24888,18 @@
    return 0;
  }
  _ACEOF
@@ -71095,7 +71275,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_AUTH_CON_SETKEY 1
  _ACEOF
-@@ -64249,20 +24870,14 @@
+@@ -64363,20 +24907,14 @@
  fi
  
  
@@ -71119,7 +71299,7 @@
  /* end confdefs.h.  */
  /* Define krb5_auth_con_setuseruserkey to an innocuous variant, in case <limits.h> declares krb5_auth_con_setuseruserkey.
     For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-@@ -64303,43 +24918,18 @@
+@@ -64417,43 +24955,18 @@
    return 0;
  }
  _ACEOF
@@ -71169,7 +71349,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_AUTH_CON_SETUSERUSERKEY 1
  _ACEOF
-@@ -64347,20 +24937,14 @@
+@@ -64461,20 +24974,14 @@
  fi
  
  
@@ -71193,7 +71373,7 @@
  /* end confdefs.h.  */
  /* Define krb5_locate_kdc to an innocuous variant, in case <limits.h> declares krb5_locate_kdc.
     For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-@@ -64401,43 +24985,18 @@
+@@ -64515,43 +25022,18 @@
    return 0;
  }
  _ACEOF
@@ -71243,7 +71423,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_LOCATE_KDC 1
  _ACEOF
-@@ -64445,20 +25004,14 @@
+@@ -64559,20 +25041,14 @@
  fi
  
  
@@ -71267,7 +71447,7 @@
  /* end confdefs.h.  */
  /* Define krb5_get_permitted_enctypes to an innocuous variant, in case <limits.h> declares krb5_get_permitted_enctypes.
     For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-@@ -64499,43 +25052,18 @@
+@@ -64613,43 +25089,18 @@
    return 0;
  }
  _ACEOF
@@ -71317,7 +71497,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_GET_PERMITTED_ENCTYPES 1
  _ACEOF
-@@ -64543,20 +25071,14 @@
+@@ -64657,20 +25108,14 @@
  fi
  
  
@@ -71341,7 +71521,7 @@
  /* end confdefs.h.  */
  /* Define krb5_get_default_in_tkt_etypes to an innocuous variant, in case <limits.h> declares krb5_get_default_in_tkt_etypes.
     For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-@@ -64597,43 +25119,18 @@
+@@ -64711,43 +25156,18 @@
    return 0;
  }
  _ACEOF
@@ -71391,7 +71571,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_GET_DEFAULT_IN_TKT_ETYPES 1
  _ACEOF
-@@ -64641,20 +25138,14 @@
+@@ -64755,20 +25175,14 @@
  fi
  
  
@@ -71415,7 +71595,7 @@
  /* end confdefs.h.  */
  /* Define krb5_free_data_contents to an innocuous variant, in case <limits.h> declares krb5_free_data_contents.
     For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-@@ -64695,43 +25186,18 @@
+@@ -64809,43 +25223,18 @@
    return 0;
  }
  _ACEOF
@@ -71465,7 +71645,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_FREE_DATA_CONTENTS 1
  _ACEOF
-@@ -64739,20 +25205,14 @@
+@@ -64853,20 +25242,14 @@
  fi
  
  
@@ -71489,7 +71669,7 @@
  /* end confdefs.h.  */
  /* Define krb5_principal_get_comp_string to an innocuous variant, in case <limits.h> declares krb5_principal_get_comp_string.
     For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-@@ -64793,43 +25253,18 @@
+@@ -64907,43 +25290,18 @@
    return 0;
  }
  _ACEOF
@@ -71539,7 +71719,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_PRINCIPAL_GET_COMP_STRING 1
  _ACEOF
-@@ -64837,20 +25272,14 @@
+@@ -64951,20 +25309,14 @@
  fi
  
  
@@ -71563,7 +71743,7 @@
  /* end confdefs.h.  */
  /* Define krb5_free_unparsed_name to an innocuous variant, in case <limits.h> declares krb5_free_unparsed_name.
     For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-@@ -64891,43 +25320,18 @@
+@@ -65005,43 +25357,18 @@
    return 0;
  }
  _ACEOF
@@ -71613,7 +71793,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_FREE_UNPARSED_NAME 1
  _ACEOF
-@@ -64935,20 +25339,14 @@
+@@ -65049,20 +25376,14 @@
  fi
  
  
@@ -71637,7 +71817,7 @@
  /* end confdefs.h.  */
  /* Define krb5_free_keytab_entry_contents to an innocuous variant, in case <limits.h> declares krb5_free_keytab_entry_contents.
     For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-@@ -64989,43 +25387,18 @@
+@@ -65103,43 +25424,18 @@
    return 0;
  }
  _ACEOF
@@ -71687,7 +71867,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_FREE_KEYTAB_ENTRY_CONTENTS 1
  _ACEOF
-@@ -65033,20 +25406,14 @@
+@@ -65147,20 +25443,14 @@
  fi
  
  
@@ -71711,7 +71891,7 @@
  /* end confdefs.h.  */
  /* Define krb5_kt_free_entry to an innocuous variant, in case <limits.h> declares krb5_kt_free_entry.
     For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-@@ -65087,43 +25454,18 @@
+@@ -65201,43 +25491,18 @@
    return 0;
  }
  _ACEOF
@@ -71761,7 +71941,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_KT_FREE_ENTRY 1
  _ACEOF
-@@ -65131,20 +25473,14 @@
+@@ -65245,20 +25510,14 @@
  fi
  
  
@@ -71785,7 +71965,7 @@
  /* end confdefs.h.  */
  /* Define krb5_krbhst_init to an innocuous variant, in case <limits.h> declares krb5_krbhst_init.
     For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-@@ -65185,43 +25521,18 @@
+@@ -65299,43 +25558,18 @@
    return 0;
  }
  _ACEOF
@@ -71835,7 +72015,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_KRBHST_INIT 1
  _ACEOF
-@@ -65229,20 +25540,14 @@
+@@ -65343,20 +25577,14 @@
  fi
  
  
@@ -71859,7 +72039,7 @@
  /* end confdefs.h.  */
  /* Define krb5_krbhst_get_addrinfo to an innocuous variant, in case <limits.h> declares krb5_krbhst_get_addrinfo.
     For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-@@ -65283,43 +25588,18 @@
+@@ -65397,43 +25625,18 @@
    return 0;
  }
  _ACEOF
@@ -71909,7 +72089,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_KRBHST_GET_ADDRINFO 1
  _ACEOF
-@@ -65327,20 +25607,14 @@
+@@ -65441,20 +25644,14 @@
  fi
  
  
@@ -71933,10 +72113,19 @@
  /* end confdefs.h.  */
  /* Define krb5_c_enctype_compare to an innocuous variant, in case <limits.h> declares krb5_c_enctype_compare.
     For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-@@ -65381,43 +25655,18 @@
-   return 0;
- }
- _ACEOF
+@@ -65486,52 +25683,27 @@
+ #if defined __stub_krb5_c_enctype_compare || defined __stub___krb5_c_enctype_compare
+ choke me
+ #endif
+-
+-int
+-main ()
+-{
+-return krb5_c_enctype_compare ();
+-  ;
+-  return 0;
+-}
+-_ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -71958,6 +72147,15 @@
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
++
++int
++main ()
++{
++return krb5_c_enctype_compare ();
++  ;
++  return 0;
++}
++_ACEOF
 +if ac_fn_c_try_link "$LINENO"; then :
    ac_cv_func_ext_krb5_c_enctype_compare=yes
  else
@@ -71983,7 +72181,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_C_ENCTYPE_COMPARE 1
  _ACEOF
-@@ -65425,20 +25674,14 @@
+@@ -65539,20 +25711,14 @@
  fi
  
  
@@ -72007,7 +72205,7 @@
  /* end confdefs.h.  */
  /* Define krb5_enctypes_compatible_keys to an innocuous variant, in case <limits.h> declares krb5_enctypes_compatible_keys.
     For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-@@ -65479,43 +25722,18 @@
+@@ -65593,43 +25759,18 @@
    return 0;
  }
  _ACEOF
@@ -72057,7 +72255,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_ENCTYPES_COMPATIBLE_KEYS 1
  _ACEOF
-@@ -65523,20 +25741,14 @@
+@@ -65637,20 +25778,14 @@
  fi
  
  
@@ -72081,12 +72279,10 @@
  /* end confdefs.h.  */
  /* Define krb5_crypto_init to an innocuous variant, in case <limits.h> declares krb5_crypto_init.
     For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-@@ -65575,45 +25787,20 @@
- return krb5_crypto_init ();
-   ;
+@@ -65691,43 +25826,18 @@
    return 0;
--}
--_ACEOF
+ }
+ _ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -72108,8 +72304,6 @@
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
-+}
-+_ACEOF
 +if ac_fn_c_try_link "$LINENO"; then :
    ac_cv_func_ext_krb5_crypto_init=yes
  else
@@ -72135,7 +72329,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_CRYPTO_INIT 1
  _ACEOF
-@@ -65621,20 +25808,14 @@
+@@ -65735,20 +25845,14 @@
  fi
  
  
@@ -72159,7 +72353,7 @@
  /* end confdefs.h.  */
  /* Define krb5_crypto_destroy to an innocuous variant, in case <limits.h> declares krb5_crypto_destroy.
     For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-@@ -65675,43 +25856,18 @@
+@@ -65789,43 +25893,18 @@
    return 0;
  }
  _ACEOF
@@ -72209,7 +72403,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_CRYPTO_DESTROY 1
  _ACEOF
-@@ -65719,20 +25875,14 @@
+@@ -65833,20 +25912,14 @@
  fi
  
  
@@ -72233,7 +72427,7 @@
  /* end confdefs.h.  */
  /* Define krb5_decode_ap_req to an innocuous variant, in case <limits.h> declares krb5_decode_ap_req.
     For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-@@ -65773,43 +25923,18 @@
+@@ -65887,43 +25960,18 @@
    return 0;
  }
  _ACEOF
@@ -72283,7 +72477,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_DECODE_AP_REQ 1
  _ACEOF
-@@ -65817,20 +25942,14 @@
+@@ -65931,20 +25979,14 @@
  fi
  
  
@@ -72307,7 +72501,7 @@
  /* end confdefs.h.  */
  /* Define free_AP_REQ to an innocuous variant, in case <limits.h> declares free_AP_REQ.
     For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-@@ -65871,43 +25990,18 @@
+@@ -65985,43 +26027,18 @@
    return 0;
  }
  _ACEOF
@@ -72357,7 +72551,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_FREE_AP_REQ 1
  _ACEOF
-@@ -65915,20 +26009,14 @@
+@@ -66029,20 +26046,14 @@
  fi
  
  
@@ -72381,7 +72575,7 @@
  /* end confdefs.h.  */
  /* Define krb5_verify_checksum to an innocuous variant, in case <limits.h> declares krb5_verify_checksum.
     For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-@@ -65969,43 +26057,18 @@
+@@ -66083,43 +26094,18 @@
    return 0;
  }
  _ACEOF
@@ -72431,7 +72625,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_VERIFY_CHECKSUM 1
  _ACEOF
-@@ -66013,20 +26076,14 @@
+@@ -66127,20 +26113,14 @@
  fi
  
  
@@ -72455,7 +72649,7 @@
  /* end confdefs.h.  */
  /* Define krb5_c_verify_checksum to an innocuous variant, in case <limits.h> declares krb5_c_verify_checksum.
     For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-@@ -66067,43 +26124,18 @@
+@@ -66181,43 +26161,18 @@
    return 0;
  }
  _ACEOF
@@ -72505,7 +72699,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_C_VERIFY_CHECKSUM 1
  _ACEOF
-@@ -66111,20 +26143,14 @@
+@@ -66225,20 +26180,14 @@
  fi
  
  
@@ -72529,7 +72723,7 @@
  /* end confdefs.h.  */
  /* Define krb5_principal_compare_any_realm to an innocuous variant, in case <limits.h> declares krb5_principal_compare_any_realm.
     For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-@@ -66165,43 +26191,18 @@
+@@ -66279,43 +26228,18 @@
    return 0;
  }
  _ACEOF
@@ -72579,7 +72773,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_PRINCIPAL_COMPARE_ANY_REALM 1
  _ACEOF
-@@ -66209,20 +26210,14 @@
+@@ -66323,20 +26247,14 @@
  fi
  
  
@@ -72603,7 +72797,7 @@
  /* end confdefs.h.  */
  /* Define krb5_parse_name_norealm to an innocuous variant, in case <limits.h> declares krb5_parse_name_norealm.
     For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-@@ -66263,43 +26258,18 @@
+@@ -66377,43 +26295,18 @@
    return 0;
  }
  _ACEOF
@@ -72653,7 +72847,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_PARSE_NAME_NOREALM 1
  _ACEOF
-@@ -66307,20 +26277,14 @@
+@@ -66421,20 +26314,14 @@
  fi
  
  
@@ -72677,7 +72871,7 @@
  /* end confdefs.h.  */
  /* Define krb5_princ_size to an innocuous variant, in case <limits.h> declares krb5_princ_size.
     For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-@@ -66361,43 +26325,18 @@
+@@ -66475,43 +26362,18 @@
    return 0;
  }
  _ACEOF
@@ -72727,7 +72921,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_PRINC_SIZE 1
  _ACEOF
-@@ -66405,20 +26344,14 @@
+@@ -66519,20 +26381,14 @@
  fi
  
  
@@ -72751,7 +72945,7 @@
  /* end confdefs.h.  */
  /* Define krb5_get_init_creds_opt_set_pac_request to an innocuous variant, in case <limits.h> declares krb5_get_init_creds_opt_set_pac_request.
     For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-@@ -66459,43 +26392,18 @@
+@@ -66573,43 +26429,18 @@
    return 0;
  }
  _ACEOF
@@ -72801,7 +72995,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_GET_INIT_CREDS_OPT_SET_PAC_REQUEST 1
  _ACEOF
-@@ -66503,20 +26411,14 @@
+@@ -66617,20 +26448,14 @@
  fi
  
  
@@ -72825,7 +73019,7 @@
  /* end confdefs.h.  */
  /* Define krb5_get_renewed_creds to an innocuous variant, in case <limits.h> declares krb5_get_renewed_creds.
     For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-@@ -66557,43 +26459,18 @@
+@@ -66671,43 +26496,18 @@
    return 0;
  }
  _ACEOF
@@ -72875,7 +73069,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_GET_RENEWED_CREDS 1
  _ACEOF
-@@ -66601,20 +26478,14 @@
+@@ -66715,20 +26515,14 @@
  fi
  
  
@@ -72899,7 +73093,7 @@
  /* end confdefs.h.  */
  /* Define krb5_get_kdc_cred to an innocuous variant, in case <limits.h> declares krb5_get_kdc_cred.
     For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-@@ -66655,43 +26526,18 @@
+@@ -66769,43 +26563,18 @@
    return 0;
  }
  _ACEOF
@@ -72949,7 +73143,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_GET_KDC_CRED 1
  _ACEOF
-@@ -66699,20 +26545,14 @@
+@@ -66813,20 +26582,14 @@
  fi
  
  
@@ -72973,7 +73167,7 @@
  /* end confdefs.h.  */
  /* Define krb5_free_error_contents to an innocuous variant, in case <limits.h> declares krb5_free_error_contents.
     For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-@@ -66753,43 +26593,18 @@
+@@ -66867,43 +26630,18 @@
    return 0;
  }
  _ACEOF
@@ -73023,7 +73217,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_FREE_ERROR_CONTENTS 1
  _ACEOF
-@@ -66797,20 +26612,14 @@
+@@ -66911,20 +26649,14 @@
  fi
  
  
@@ -73047,7 +73241,7 @@
  /* end confdefs.h.  */
  /* Define initialize_krb5_error_table to an innocuous variant, in case <limits.h> declares initialize_krb5_error_table.
     For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-@@ -66851,43 +26660,18 @@
+@@ -66965,43 +26697,18 @@
    return 0;
  }
  _ACEOF
@@ -73097,7 +73291,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_INITIALIZE_KRB5_ERROR_TABLE 1
  _ACEOF
-@@ -66895,20 +26679,14 @@
+@@ -67009,20 +26716,14 @@
  fi
  
  
@@ -73121,7 +73315,7 @@
  /* end confdefs.h.  */
  /* Define krb5_get_init_creds_opt_alloc to an innocuous variant, in case <limits.h> declares krb5_get_init_creds_opt_alloc.
     For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-@@ -66949,43 +26727,18 @@
+@@ -67063,43 +26764,18 @@
    return 0;
  }
  _ACEOF
@@ -73171,7 +73365,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_GET_INIT_CREDS_OPT_ALLOC 1
  _ACEOF
-@@ -66993,20 +26746,14 @@
+@@ -67107,20 +26783,14 @@
  fi
  
  
@@ -73195,7 +73389,7 @@
  /* end confdefs.h.  */
  /* Define krb5_get_init_creds_opt_free to an innocuous variant, in case <limits.h> declares krb5_get_init_creds_opt_free.
     For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-@@ -67047,43 +26794,18 @@
+@@ -67161,43 +26831,18 @@
    return 0;
  }
  _ACEOF
@@ -73245,7 +73439,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_GET_INIT_CREDS_OPT_FREE 1
  _ACEOF
-@@ -67091,20 +26813,14 @@
+@@ -67205,20 +26850,14 @@
  fi
  
  
@@ -73269,7 +73463,7 @@
  /* end confdefs.h.  */
  /* Define krb5_get_init_creds_opt_get_error to an innocuous variant, in case <limits.h> declares krb5_get_init_creds_opt_get_error.
     For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-@@ -67145,43 +26861,18 @@
+@@ -67259,43 +26898,18 @@
    return 0;
  }
  _ACEOF
@@ -73319,7 +73513,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_GET_INIT_CREDS_OPT_GET_ERROR 1
  _ACEOF
-@@ -67189,20 +26880,14 @@
+@@ -67303,20 +26917,14 @@
  fi
  
  
@@ -73343,7 +73537,7 @@
  /* end confdefs.h.  */
  /* Define krb5_enctype_to_string to an innocuous variant, in case <limits.h> declares krb5_enctype_to_string.
     For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-@@ -67243,43 +26928,18 @@
+@@ -67357,43 +26965,18 @@
    return 0;
  }
  _ACEOF
@@ -73393,7 +73587,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_ENCTYPE_TO_STRING 1
  _ACEOF
-@@ -67287,20 +26947,14 @@
+@@ -67401,20 +26984,14 @@
  fi
  
  
@@ -73417,7 +73611,7 @@
  /* end confdefs.h.  */
  /* Define krb5_fwd_tgt_creds to an innocuous variant, in case <limits.h> declares krb5_fwd_tgt_creds.
     For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-@@ -67341,43 +26995,18 @@
+@@ -67455,43 +27032,18 @@
    return 0;
  }
  _ACEOF
@@ -73467,7 +73661,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_FWD_TGT_CREDS 1
  _ACEOF
-@@ -67385,20 +27014,14 @@
+@@ -67499,20 +27051,14 @@
  fi
  
  
@@ -73491,7 +73685,7 @@
  /* end confdefs.h.  */
  /* Define krb5_auth_con_set_req_cksumtype to an innocuous variant, in case <limits.h> declares krb5_auth_con_set_req_cksumtype.
     For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-@@ -67439,63 +27062,33 @@
+@@ -67553,136 +27099,48 @@
    return 0;
  }
  _ACEOF
@@ -73545,6 +73739,85 @@
  fi
  
 -
+   # MIT krb5 1.7beta3 (in Ubuntu Karmic) does not have this declaration
+   # but does have the symbol
+-  { $as_echo "$as_me:$LINENO: checking whether krb5_auth_con_set_req_cksumtype is declared" >&5
+-$as_echo_n "checking whether krb5_auth_con_set_req_cksumtype is declared... " >&6; }
+-if test "${ac_cv_have_decl_krb5_auth_con_set_req_cksumtype+set}" = set; then
+-  $as_echo_n "(cached) " >&6
+-else
+-  cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
+-#include <krb5.h>
+-
+-int
+-main ()
+-{
+-#ifndef krb5_auth_con_set_req_cksumtype
+-  (void) krb5_auth_con_set_req_cksumtype;
+-#endif
+-
+-  ;
+-  return 0;
+-}
+-_ACEOF
+-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:$LINENO: $ac_try_echo\""
+-$as_echo "$ac_try_echo") >&5
+-  (eval "$ac_compile") 2>conftest.er1
+-  ac_status=$?
+-  grep -v '^ *+' conftest.er1 >conftest.err
+-  rm -f conftest.er1
+-  cat conftest.err >&5
+-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); } && {
+-	 test -z "$ac_c_werror_flag" ||
+-	 test ! -s conftest.err
+-       } && test -s conftest.$ac_objext; then
+-  ac_cv_have_decl_krb5_auth_con_set_req_cksumtype=yes
++  ac_fn_c_check_decl "$LINENO" "krb5_auth_con_set_req_cksumtype" "ac_cv_have_decl_krb5_auth_con_set_req_cksumtype" "#include <krb5.h>
++"
++if test "x$ac_cv_have_decl_krb5_auth_con_set_req_cksumtype" = x""yes; then :
++  ac_have_decl=1
+ else
+-  $as_echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	ac_cv_have_decl_krb5_auth_con_set_req_cksumtype=no
+-fi
+-
+-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++  ac_have_decl=0
+ fi
+-{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_krb5_auth_con_set_req_cksumtype" >&5
+-$as_echo "$ac_cv_have_decl_krb5_auth_con_set_req_cksumtype" >&6; }
+-if test "x$ac_cv_have_decl_krb5_auth_con_set_req_cksumtype" = x""yes; then
+ 
+ cat >>confdefs.h <<_ACEOF
+-#define HAVE_DECL_KRB5_AUTH_CON_SET_REQ_CKSUMTYPE 1
++#define HAVE_DECL_KRB5_AUTH_CON_SET_REQ_CKSUMTYPE $ac_have_decl
+ _ACEOF
+ 
+ 
+-else
+-  cat >>confdefs.h <<_ACEOF
+-#define HAVE_DECL_KRB5_AUTH_CON_SET_REQ_CKSUMTYPE 0
+-_ACEOF
+-
+-
+-fi
+-
+-
+-
    LIBS="$KRB5_LIBS $LIBS"
  
 -  { $as_echo "$as_me:$LINENO: checking whether krb5_ticket contains kvno and enctype" >&5
@@ -73564,7 +73837,7 @@
  /* end confdefs.h.  */
  
  		#include <krb5.h>
-@@ -67515,57 +27108,30 @@
+@@ -67702,57 +27160,30 @@
    return 0;
  }
  _ACEOF
@@ -73629,7 +73902,7 @@
  /* end confdefs.h.  */
  
  		    #include <krb5.h>
-@@ -67581,58 +27147,31 @@
+@@ -67768,58 +27199,31 @@
    return 0;
  }
  _ACEOF
@@ -73695,7 +73968,7 @@
  /* end confdefs.h.  */
  
  	#include <krb5.h>
-@@ -67644,36 +27183,15 @@
+@@ -67831,36 +27235,15 @@
    return 0;
  }
  _ACEOF
@@ -73735,7 +74008,7 @@
  $as_echo "$smb_krb5_cv_verify_checksum" >&6; }
  
  cat >>confdefs.h <<_ACEOF
-@@ -67681,17 +27199,13 @@
+@@ -67868,17 +27251,13 @@
  _ACEOF
  
  
@@ -73756,7 +74029,7 @@
  /* end confdefs.h.  */
  #include <krb5.h>
  int
-@@ -67702,56 +27216,29 @@
+@@ -67889,56 +27268,29 @@
    return 0;
  }
  _ACEOF
@@ -73820,7 +74093,7 @@
  /* end confdefs.h.  */
  #include <krb5.h>
  int
-@@ -67762,56 +27249,29 @@
+@@ -67949,56 +27301,29 @@
    return 0;
  }
  _ACEOF
@@ -73884,7 +74157,7 @@
  /* end confdefs.h.  */
  #include <krb5.h>
  int
-@@ -67822,56 +27282,29 @@
+@@ -68009,56 +27334,29 @@
    return 0;
  }
  _ACEOF
@@ -73948,7 +74221,7 @@
  /* end confdefs.h.  */
  #include <krb5.h>
  int
-@@ -67882,56 +27315,29 @@
+@@ -68069,56 +27367,29 @@
    return 0;
  }
  _ACEOF
@@ -74012,7 +74285,7 @@
  /* end confdefs.h.  */
  #include <krb5.h>
  int
-@@ -67942,56 +27348,29 @@
+@@ -68129,56 +27400,29 @@
    return 0;
  }
  _ACEOF
@@ -74076,7 +74349,7 @@
  /* end confdefs.h.  */
  #include <krb5.h>
  int
-@@ -68002,56 +27381,29 @@
+@@ -68189,56 +27433,29 @@
    return 0;
  }
  _ACEOF
@@ -74140,7 +74413,7 @@
  /* end confdefs.h.  */
  #include <krb5.h>
  int
-@@ -68062,56 +27414,29 @@
+@@ -68249,56 +27466,29 @@
    return 0;
  }
  _ACEOF
@@ -74204,7 +74477,7 @@
  /* end confdefs.h.  */
  #include <krb5.h>
  int
-@@ -68122,55 +27447,28 @@
+@@ -68309,55 +27499,28 @@
    return 0;
  }
  _ACEOF
@@ -74267,7 +74540,7 @@
  /* end confdefs.h.  */
  #include <krb5.h>
  int
-@@ -68181,56 +27479,29 @@
+@@ -68368,56 +27531,29 @@
    return 0;
  }
  _ACEOF
@@ -74331,7 +74604,7 @@
  /* end confdefs.h.  */
  #include <krb5.h>
  int
-@@ -68241,56 +27512,29 @@
+@@ -68428,56 +27564,29 @@
    return 0;
  }
  _ACEOF
@@ -74395,7 +74668,7 @@
  /* end confdefs.h.  */
  #include <krb5.h>
  int
-@@ -68301,56 +27545,29 @@
+@@ -68488,56 +27597,29 @@
    return 0;
  }
  _ACEOF
@@ -74459,7 +74732,7 @@
  /* end confdefs.h.  */
  #include <krb5.h>
  int
-@@ -68361,56 +27578,29 @@
+@@ -68548,56 +27630,29 @@
    return 0;
  }
  _ACEOF
@@ -74523,7 +74796,7 @@
  /* end confdefs.h.  */
  #include <krb5.h>
  int
-@@ -68421,47 +27611,22 @@
+@@ -68608,47 +27663,22 @@
    return 0;
  }
  _ACEOF
@@ -74577,7 +74850,7 @@
  /* end confdefs.h.  */
  #include <krb5.h>
  int
-@@ -68472,58 +27637,31 @@
+@@ -68659,58 +27689,31 @@
    return 0;
  }
  _ACEOF
@@ -74643,7 +74916,7 @@
  /* end confdefs.h.  */
  #include <krb5.h>
  int
-@@ -68534,56 +27672,29 @@
+@@ -68721,56 +27724,29 @@
    return 0;
  }
  _ACEOF
@@ -74707,7 +74980,7 @@
  /* end confdefs.h.  */
  #include <krb5.h>
  int
-@@ -68594,56 +27705,29 @@
+@@ -68781,56 +27757,29 @@
    return 0;
  }
  _ACEOF
@@ -74771,7 +75044,7 @@
  /* end confdefs.h.  */
  #include <krb5.h>
  int
-@@ -68654,56 +27738,29 @@
+@@ -68841,56 +27790,29 @@
    return 0;
  }
  _ACEOF
@@ -74835,7 +75108,7 @@
  /* end confdefs.h.  */
  #include <krb5.h>
  int
-@@ -68714,56 +27771,29 @@
+@@ -68901,56 +27823,29 @@
    return 0;
  }
  _ACEOF
@@ -74899,7 +75172,7 @@
  /* end confdefs.h.  */
  #include <krb5.h>
  int
-@@ -68774,61 +27804,30 @@
+@@ -68961,61 +27856,30 @@
    return 0;
  }
  _ACEOF
@@ -74970,7 +75243,7 @@
  /* end confdefs.h.  */
  #include <krb5.h>
  int
-@@ -68839,56 +27838,29 @@
+@@ -69026,56 +27890,29 @@
    return 0;
  }
  _ACEOF
@@ -75034,7 +75307,7 @@
  /* end confdefs.h.  */
  #include <krb5.h>
  int
-@@ -68899,56 +27871,29 @@
+@@ -69086,56 +27923,29 @@
    return 0;
  }
  _ACEOF
@@ -75098,7 +75371,7 @@
  /* end confdefs.h.  */
  #include <krb5.h>
  int
-@@ -68959,65 +27904,35 @@
+@@ -69146,65 +27956,35 @@
    return 0;
  }
  _ACEOF
@@ -75175,7 +75448,7 @@
  /* end confdefs.h.  */
  
  #include<krb5.h>
-@@ -69030,65 +27945,32 @@
+@@ -69217,65 +27997,32 @@
      return krb5_kt_resolve(context, "WRFILE:api", &keytab);
    }
  _ACEOF
@@ -75250,7 +75523,7 @@
  /* end confdefs.h.  */
  #include <krb5.h>
  int
-@@ -69102,56 +27984,29 @@
+@@ -69289,56 +28036,29 @@
    return 0;
  }
  _ACEOF
@@ -75314,7 +75587,7 @@
  /* end confdefs.h.  */
  #include <krb5.h>
  int
-@@ -69162,56 +28017,29 @@
+@@ -69349,56 +28069,29 @@
    return 0;
  }
  _ACEOF
@@ -75378,7 +75651,7 @@
  /* end confdefs.h.  */
  #include <krb5.h>
  int
-@@ -69223,49 +28051,26 @@
+@@ -69410,49 +28103,26 @@
    return 0;
  }
  _ACEOF
@@ -75434,7 +75707,7 @@
    $as_echo_n "(cached) " >&6
  else
  
-@@ -69279,20 +28084,13 @@
+@@ -69466,20 +28136,13 @@
  	old_LDFLAGS="$LDFLAGS";
  	LDFLAGS="$LDFLAGS";
  	export LDFLAGS;
@@ -75460,7 +75733,7 @@
  /* end confdefs.h.  */
  
  		#include <stdlib.h>
-@@ -69306,42 +28104,15 @@
+@@ -69493,42 +28156,15 @@
  		}
  
  _ACEOF
@@ -75507,7 +75780,7 @@
  	CFLAGS="$old_CFLAGS";
  	old_CFLAGS="";
  	export CFLAGS;
-@@ -69353,20 +28124,18 @@
+@@ -69540,20 +28176,18 @@
  	export LDFLAGS;
  
  fi
@@ -75532,7 +75805,7 @@
    $as_echo_n "(cached) " >&6
  else
  
-@@ -69380,20 +28149,13 @@
+@@ -69567,20 +28201,13 @@
  	old_LDFLAGS="$LDFLAGS";
  	LDFLAGS="$LDFLAGS";
  	export LDFLAGS;
@@ -75558,7 +75831,7 @@
  /* end confdefs.h.  */
  
  		#include <krb5.h>
-@@ -69404,42 +28166,15 @@
+@@ -69591,42 +28218,15 @@
  		}
  
  _ACEOF
@@ -75605,7 +75878,7 @@
  	CFLAGS="$old_CFLAGS";
  	old_CFLAGS="";
  	export CFLAGS;
-@@ -69451,29 +28186,23 @@
+@@ -69638,29 +28238,23 @@
  	export LDFLAGS;
  
  fi
@@ -75640,7 +75913,7 @@
  /* end confdefs.h.  */
  #include <krb5.h>
  int
-@@ -69484,61 +28213,30 @@
+@@ -69671,61 +28265,30 @@
    return 0;
  }
  _ACEOF
@@ -75711,7 +75984,7 @@
  /* end confdefs.h.  */
  #include <krb5.h>
  int
-@@ -69549,47 +28247,20 @@
+@@ -69736,47 +28299,20 @@
    return 0;
  }
  _ACEOF
@@ -75765,7 +76038,7 @@
  
    fi
  
-@@ -69601,7 +28272,7 @@
+@@ -69788,7 +28324,7 @@
    #
    #
    if test x"$ac_cv_lib_ext_krb5_krb5_mk_req_extended" != x"yes"; then
@@ -75774,7 +76047,7 @@
  $as_echo "$as_me: WARNING: krb5_mk_req_extended not found in -lkrb5" >&2;}
      use_ads=no
    fi
-@@ -69609,7 +28280,7 @@
+@@ -69796,7 +28332,7 @@
    if test x"$ac_cv_func_ext_krb5_principal2salt" != x"yes" -a \
            x"$ac_cv_func_ext_krb5_get_pw_salt" != x"yes"
    then
@@ -75783,7 +76056,7 @@
  $as_echo "$as_me: WARNING: no CREATE_KEY_FUNCTIONS detected" >&2;}
      use_ads=no
    fi
-@@ -69617,7 +28288,7 @@
+@@ -69804,7 +28340,7 @@
    if test x"$ac_cv_func_ext_krb5_get_permitted_enctypes" != x"yes" -a \
            x"$ac_cv_func_ext_krb5_get_default_in_tkt_etypes" != x"yes"
    then
@@ -75792,7 +76065,7 @@
  $as_echo "$as_me: WARNING: no GET_ENCTYPES_FUNCTIONS detected" >&2;}
      use_ads=no
    fi
-@@ -69625,7 +28296,7 @@
+@@ -69812,7 +28348,7 @@
    if test x"$ac_cv_func_ext_krb5_kt_free_entry" != x"yes" -a \
            x"$ac_cv_func_ext_krb5_free_keytab_entry_contents" != x"yes"
    then
@@ -75801,7 +76074,7 @@
  $as_echo "$as_me: WARNING: no KT_FREE_FUNCTION detected" >&2;}
      use_ads=no
    fi
-@@ -69633,7 +28304,7 @@
+@@ -69820,7 +28356,7 @@
    if test x"$ac_cv_func_ext_krb5_c_verify_checksum" != x"yes" -a \
            x"$ac_cv_func_ext_krb5_verify_checksum" != x"yes"
    then
@@ -75810,7 +76083,7 @@
  $as_echo "$as_me: WARNING: no KRB5_VERIFY_CHECKSUM_FUNCTION detected" >&2;}
      use_ads=no
    fi
-@@ -69645,14 +28316,14 @@
+@@ -69832,14 +28368,14 @@
  
        if test x"$ac_cv_func_ext_free_AP_REQ" != x"yes"
        then
@@ -75827,7 +76100,7 @@
  $as_echo "$as_me: WARNING: no KRB5_AP_REQ_DECODING_FUNCTION detected" >&2;}
  	use_ads=no
        fi
-@@ -69661,29 +28332,21 @@
+@@ -69848,29 +28384,21 @@
  
    if test x"$use_ads" = x"yes"; then
  
@@ -75862,7 +76135,7 @@
  $as_echo "$as_me: WARNING: krb5 libs don't have all features required for Active Directory support" >&2;}
      fi
  
-@@ -69709,9 +28372,9 @@
+@@ -69896,9 +28424,9 @@
      KRB5_LIBS=""
      with_ads_support=no
    fi
@@ -75874,7 +76147,7 @@
  $as_echo "$use_ads" >&6; }
  
  LIBS="$ac_save_LIBS"
-@@ -69723,23 +28386,17 @@
+@@ -69910,23 +28438,17 @@
  
  
  
@@ -75901,7 +76174,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -69757,54 +28414,28 @@
+@@ -69944,54 +28466,28 @@
    return 0;
  }
  _ACEOF
@@ -75963,7 +76236,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_LIBNSCD 1
  _ACEOF
-@@ -69819,7 +28450,6 @@
+@@ -70006,7 +28502,6 @@
  
  
  fi
@@ -75971,7 +76244,7 @@
  PASSDB_LIBS="$PASSDB_LIBS $NSCD_LIBS"
  
  
-@@ -69827,12 +28457,12 @@
+@@ -70014,12 +28509,12 @@
  # Compile with DNS Updates support?
  
  with_dnsupdate_support=no
@@ -75986,7 +76259,7 @@
    withval=$with_dnsupdate;  case "$withval" in
      yes|no)
  	with_dnsupdate_support=$withval
-@@ -69841,7 +28471,7 @@
+@@ -70028,7 +28523,7 @@
  fi
  
  
@@ -75995,7 +76268,7 @@
  $as_echo "$with_dnsupdate_support" >&6; }
  
  if test x"$with_dnsupdate_support" != x"no"; then
-@@ -69855,151 +28485,12 @@
+@@ -70042,151 +28537,12 @@
    ##################################################################
    # then test for uuid.h (necessary to generate unique DNS keynames
    # (uuid.h is required for this test)
@@ -76152,7 +76425,7 @@
  _ACEOF
  
  fi
-@@ -70009,11 +28500,9 @@
+@@ -70196,11 +28552,9 @@
  
    if test x"$ac_cv_header_uuid_uuid_h" != x"yes"; then
  	if test x"$with_dnsupdate_support" = x"yes"; then
@@ -76166,7 +76439,7 @@
  $as_echo "$as_me: WARNING: uuid.h is needed to enable DNS Updates support" >&2;}
  	fi
  	with_dnsupdate_support=no
-@@ -70029,102 +28518,12 @@
+@@ -70216,102 +28570,12 @@
  
    UUID_LIBS=""
  
@@ -76274,7 +76547,7 @@
  _ACEOF
  
          # uuid_generate was found in libc or existing $LIBS
-@@ -70141,9 +28540,7 @@
+@@ -70328,9 +28592,7 @@
  
  	    with_dnsupdate_support=yes
  
@@ -76285,7 +76558,7 @@
  
  
  
-@@ -70156,11 +28553,9 @@
+@@ -70343,11 +28605,9 @@
  
  
  	    if test x"$with_dnsupdate_support" = x"yes"; then
@@ -76299,7 +76572,7 @@
  $as_echo "$as_me: WARNING: libuuid is needed to enable DNS Updates support" >&2;}
  	    fi
  	    with_dnsupdate_support=no
-@@ -70169,18 +28564,14 @@
+@@ -70356,18 +28616,14 @@
  	    ;;
            *)
  	    # uuid_generate was not found, try adding libuuid
@@ -76321,7 +76594,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -70198,43 +28589,18 @@
+@@ -70385,43 +28641,18 @@
    return 0;
  }
  _ACEOF
@@ -76371,7 +76644,7 @@
  
  		LIBS="-luuid $LIBS"
  
-@@ -70250,9 +28616,7 @@
+@@ -70437,9 +28668,7 @@
  
  	    with_dnsupdate_support=yes
  
@@ -76382,7 +76655,7 @@
  
  
  
-@@ -70262,11 +28626,9 @@
+@@ -70449,11 +28678,9 @@
  
  
  	    if test x"$with_dnsupdate_support" = x"yes"; then
@@ -76396,7 +76669,7 @@
  $as_echo "$as_me: WARNING: libuuid is needed to enable DNS Updates support" >&2;}
  	    fi
  	    with_dnsupdate_support=no
-@@ -70286,28 +28648,26 @@
+@@ -70473,28 +28700,26 @@
  
  #################################################
  # check for automount support
@@ -76431,7 +76704,7 @@
  $as_echo "no" >&6; }
  
  fi
-@@ -70318,34 +28678,30 @@
+@@ -70505,34 +28730,30 @@
  CIFSMOUNT_PROGS=""
  INSTALL_CIFSMOUNT=""
  UNINSTALL_CIFSMOUNT=""
@@ -76472,7 +76745,7 @@
  		;;
  	esac
      ;;
-@@ -70353,173 +28709,32 @@
+@@ -70540,19 +28761,17 @@
  else
     case "$host_os" in
    *linux*)
@@ -76486,22 +76759,21 @@
 +$as_echo "#define WITH_CIFSMOUNT 1" >>confdefs.h
  
  	CIFSMOUNT_PROGS="bin/mount.cifs bin/umount.cifs"
--	INSTALL_CIFSMOUNT="installcifsmount"
--	UNINSTALL_CIFSMOUNT="uninstallcifsmount"
--	;;
--  *)
+ 	INSTALL_CIFSMOUNT="installcifsmount"
+ 	UNINSTALL_CIFSMOUNT="uninstallcifsmount"
+ 	;;
+   *)
 -	{ $as_echo "$as_me:$LINENO: result: no" >&5
--$as_echo "no" >&6; }
--	;;
--  esac
++	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+ $as_echo "no" >&6; }
+ 	;;
+   esac
+@@ -70562,151 +28781,12 @@
+ 
+ #################################################
+ # check for cifs.upcall support
 -
--fi
--
--
--#################################################
--# check for cifs.upcall support
--
--for ac_header in keyutils.h
+ for ac_header in keyutils.h
 -do
 -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
@@ -76638,24 +76910,11 @@
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
 -$as_echo "$ac_res" >&6; }
-+	INSTALL_CIFSMOUNT="installcifsmount"
-+	UNINSTALL_CIFSMOUNT="uninstallcifsmount"
-+	;;
-+  *)
-+	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-+$as_echo "no" >&6; }
-+	;;
-+  esac
- 
- fi
+-
+-fi
 -as_val=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+
-+
-+#################################################
-+# check for cifs.upcall support
-+for ac_header in keyutils.h
 +do :
 +  ac_fn_c_check_header_mongrel "$LINENO" "keyutils.h" "ac_cv_header_keyutils_h" "$ac_includes_default"
 +if test "x$ac_cv_header_keyutils_h" = x""yes; then :
@@ -76665,7 +76924,7 @@
  _ACEOF
   HAVE_KEYUTILS_H=1
  else
-@@ -70531,34 +28746,28 @@
+@@ -70718,34 +28798,28 @@
  CIFSUPCALL_PROGS=""
  INSTALL_CIFSUPCALL=""
  UNINSTALL_CIFSUPCALL=""
@@ -76707,7 +76966,7 @@
  
  			CIFSUPCALL_PROGS="bin/cifs.upcall"
  			INSTALL_CIFSUPCALL="installcifsupcall"
-@@ -70566,9 +28775,7 @@
+@@ -70753,9 +28827,7 @@
  		fi
  		;;
  	*)
@@ -76718,7 +76977,7 @@
  		;;
  	esac
      ;;
-@@ -70577,18 +28784,16 @@
+@@ -70764,18 +28836,16 @@
     case "$host_os" in
    *linux*)
  	if test x"$use_ads" != x"yes"; then
@@ -76741,7 +77000,7 @@
  
  		CIFSUPCALL_PROGS="bin/cifs.upcall"
  		INSTALL_CIFSUPCALL="installcifsupcall"
-@@ -70596,7 +28801,7 @@
+@@ -70783,7 +28853,7 @@
  	fi
  	;;
    *)
@@ -76750,7 +77009,7 @@
  $as_echo "no" >&6; }
  	;;
    esac
-@@ -70613,11 +28818,11 @@
+@@ -70800,11 +28870,11 @@
  
  with_pam_for_crypt=no
  try_pam=no
@@ -76764,7 +77023,7 @@
    withval=$with_pam;  case "$withval" in
    yes|no)
      try_pam=$withval
-@@ -70626,7 +28831,7 @@
+@@ -70813,7 +28883,7 @@
  
  fi
  
@@ -76773,7 +77032,7 @@
  $as_echo "$try_pam" >&6; }
  
  use_pam=no
-@@ -70637,150 +28842,12 @@
+@@ -70824,150 +28894,12 @@
  
  	# Most systems have PAM headers in /usr/include/security, but Darwin
  	# has them in /usr/include/pam.
@@ -76930,7 +77189,7 @@
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
-@@ -70792,9 +28859,7 @@
+@@ -70979,9 +28911,7 @@
  	if test x"$ac_cv_header_security_pam_appl_h" != x"yes" -a \
  		x"$ac_cv_header_pam_pam_appl_h" != x"yes"; then
  		if test x"${try_pam}" = x"yes";then
@@ -76941,7 +77200,7 @@
  		fi
  		use_pam=no
  		create_pam_modules=no
-@@ -70802,23 +28867,17 @@
+@@ -70989,23 +28919,17 @@
  
  
  
@@ -76968,7 +77227,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -70836,54 +28895,28 @@
+@@ -71023,54 +28947,28 @@
    return 0;
  }
  _ACEOF
@@ -77030,7 +77289,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_LIBPAM 1
  _ACEOF
-@@ -70898,34 +28931,18 @@
+@@ -71085,34 +28983,18 @@
  
  
  fi
@@ -77070,7 +77329,7 @@
  		#if HAVE_SECURITY_PAM_APPL_H
  		#include <security/pam_appl.h>
  		#endif
-@@ -70933,44 +28950,9 @@
+@@ -71120,44 +29002,9 @@
  		#include <pam/pam_appl.h>
  		#endif
  
@@ -77118,7 +77377,7 @@
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
-@@ -70982,179 +28964,33 @@
+@@ -71169,179 +29016,33 @@
  	if test x"$ac_cv_header_security_pam_modules_h" = x"no" -a \
  		x"$ac_cv_header_pam_pam_modules_h" = x"no" ; then
  		if test x"${try_pam}" = x"yes";then
@@ -77308,7 +77567,7 @@
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
-@@ -71163,150 +28999,12 @@
+@@ -71350,150 +29051,12 @@
  
  done
  
@@ -77465,7 +77724,7 @@
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
-@@ -71317,19 +29015,14 @@
+@@ -71504,19 +29067,14 @@
  
  
  
@@ -77488,7 +77747,7 @@
  /* end confdefs.h.  */
  /* Define pam_vsyslog to an innocuous variant, in case <limits.h> declares pam_vsyslog.
     For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-@@ -71370,62 +29063,36 @@
+@@ -71557,62 +29115,36 @@
    return 0;
  }
  _ACEOF
@@ -77562,7 +77821,7 @@
  $as_echo "$create_pam_modules" >&6; }
  fi # try_pam != no
  
-@@ -71434,26 +29101,22 @@
+@@ -71621,26 +29153,22 @@
  PAM_MODULES=""
  INSTALL_PAM_MODULES=""
  UNINSTALL_PAM_MODULES=""
@@ -77594,7 +77853,7 @@
         else
            PAM_MODULES="pam_smbpass"
            INSTALL_PAM_MODULES="installpammodules"
-@@ -71461,12 +29124,12 @@
+@@ -71648,12 +29176,12 @@
         fi
      ;;
    *)
@@ -77609,7 +77868,7 @@
  $as_echo "no" >&6; }
  
  fi
-@@ -71480,98 +29143,63 @@
+@@ -71667,98 +29195,63 @@
  ## $with_pam_for_crypt variable as above   --jerry
  ##
  if test $with_pam_for_crypt = no; then
@@ -77724,7 +77983,7 @@
  $as_echo "no" >&6; }
  
  fi
-@@ -71579,28 +29207,26 @@
+@@ -71766,28 +29259,26 @@
  
  #################################################
  # check for syslog logging
@@ -77759,7 +78018,7 @@
  $as_echo "no" >&6; }
  
  fi
-@@ -71608,16 +29234,14 @@
+@@ -71795,16 +29286,14 @@
  
  #################################################
  # check for custom syslog facility
@@ -77779,7 +78038,7 @@
    else
       if test "$withval" != "yes" ; then
          syslog_facility="$withval"
-@@ -71642,14 +29266,14 @@
+@@ -71829,14 +29318,14 @@
  samba_cv_TRY_SYS_QUOTAS=auto
  samba_cv_SYSQUOTA_FOUND=no
  
@@ -77797,7 +78056,7 @@
  $as_echo "yes" >&6; }
      samba_cv_WITH_QUOTAS=yes
      samba_cv_TRY_QUOTAS=yes
-@@ -71658,7 +29282,7 @@
+@@ -71845,7 +29334,7 @@
      samba_cv_TRY_SYS_QUOTAS=auto
      ;;
    auto)
@@ -77806,7 +78065,7 @@
  $as_echo "auto" >&6; }
      samba_cv_WITH_QUOTAS=auto
      samba_cv_TRY_QUOTAS=auto
-@@ -71667,719 +29291,165 @@
+@@ -71854,74 +29343,74 @@
      samba_cv_TRY_SYS_QUOTAS=auto
      ;;
    no)
@@ -77819,107 +78078,116 @@
      ;;
    *)
 -    { $as_echo "$as_me:$LINENO: result: ${samba_cv_TRY_QUOTAS}" >&5
--$as_echo "${samba_cv_TRY_QUOTAS}" >&6; }
--    ;;
--  esac
--else
--  { $as_echo "$as_me:$LINENO: result: ${samba_cv_TRY_QUOTAS}" >&5
 +    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${samba_cv_TRY_QUOTAS}" >&5
  $as_echo "${samba_cv_TRY_QUOTAS}" >&6; }
--
--fi
--
--
+     ;;
+   esac
+ else
+-  { $as_echo "$as_me:$LINENO: result: ${samba_cv_TRY_QUOTAS}" >&5
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${samba_cv_TRY_QUOTAS}" >&5
+ $as_echo "${samba_cv_TRY_QUOTAS}" >&6; }
+ 
+ fi
+ 
+ 
 -{ $as_echo "$as_me:$LINENO: checking whether to try the new lib/sysquotas.c interface" >&5
--$as_echo_n "checking whether to try the new lib/sysquotas.c interface... " >&6; }
--
--# Check whether --with-sys-quotas was given.
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to try the new lib/sysquotas.c interface" >&5
+ $as_echo_n "checking whether to try the new lib/sysquotas.c interface... " >&6; }
+ 
+ # Check whether --with-sys-quotas was given.
 -if test "${with_sys_quotas+set}" = set; then
--  withval=$with_sys_quotas;  case "$withval" in
--  yes)
++if test "${with_sys_quotas+set}" = set; then :
+   withval=$with_sys_quotas;  case "$withval" in
+   yes)
 -    { $as_echo "$as_me:$LINENO: result: yes" >&5
--$as_echo "yes" >&6; }
--    samba_cv_WITH_SYS_QUOTAS=yes
--    samba_cv_TRY_SYS_QUOTAS=yes
--    samba_cv_RUN_QUOTA_TESTS=yes
--    ;;
--  auto)
++    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+ $as_echo "yes" >&6; }
+     samba_cv_WITH_SYS_QUOTAS=yes
+     samba_cv_TRY_SYS_QUOTAS=yes
+     samba_cv_RUN_QUOTA_TESTS=yes
+     ;;
+   auto)
 -    { $as_echo "$as_me:$LINENO: result: auto" >&5
--$as_echo "auto" >&6; }
--    samba_cv_WITH_SYS_QUOTAS=auto
--    samba_cv_TRY_SYS_QUOTAS=auto
--    samba_cv_RUN_QUOTA_TESTS=auto
--    ;;
--  no)
++    { $as_echo "$as_me:${as_lineno-$LINENO}: result: auto" >&5
+ $as_echo "auto" >&6; }
+     samba_cv_WITH_SYS_QUOTAS=auto
+     samba_cv_TRY_SYS_QUOTAS=auto
+     samba_cv_RUN_QUOTA_TESTS=auto
+     ;;
+   no)
 -    { $as_echo "$as_me:$LINENO: result: no" >&5
--$as_echo "no" >&6; }
--    samba_cv_WITH_SYS_QUOTAS=no
--    samba_cv_TRY_SYS_QUOTAS=no
--    ;;
--  *)
++    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+ $as_echo "no" >&6; }
+     samba_cv_WITH_SYS_QUOTAS=no
+     samba_cv_TRY_SYS_QUOTAS=no
+     ;;
+   *)
 -    { $as_echo "$as_me:$LINENO: result: ${samba_cv_TRY_SYS_QUOTAS}" >&5
--$as_echo "${samba_cv_TRY_SYS_QUOTAS}" >&6; }
++    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${samba_cv_TRY_SYS_QUOTAS}" >&5
+ $as_echo "${samba_cv_TRY_SYS_QUOTAS}" >&6; }
      ;;
    esac
--else
+ else
 -  { $as_echo "$as_me:$LINENO: result: ${samba_cv_TRY_SYS_QUOTAS}" >&5
--$as_echo "${samba_cv_TRY_SYS_QUOTAS}" >&6; }
--
--fi
--
--
--if test x"$samba_cv_TRY_SYS_QUOTAS" = x"auto"; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${samba_cv_TRY_SYS_QUOTAS}" >&5
+ $as_echo "${samba_cv_TRY_SYS_QUOTAS}" >&6; }
+ 
+ fi
+ 
+ 
+ if test x"$samba_cv_TRY_SYS_QUOTAS" = x"auto"; then
 -{ $as_echo "$as_me:$LINENO: checking whether to try the lib/sysquotas.c interface on ${host_os}" >&5
--$as_echo_n "checking whether to try the lib/sysquotas.c interface on ${host_os}... " >&6; }
--  case "$host_os" in
--	*linux*)
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to try the lib/sysquotas.c interface on ${host_os}" >&5
+ $as_echo_n "checking whether to try the lib/sysquotas.c interface on ${host_os}... " >&6; }
+   case "$host_os" in
+ 	*linux*)
 -	    { $as_echo "$as_me:$LINENO: result: yes" >&5
--$as_echo "yes" >&6; }
--            samba_cv_TRY_SYS_QUOTAS=yes
--            samba_cv_RUN_QUOTA_TESTS=yes
--	    ;;
--	*)
++	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+ $as_echo "yes" >&6; }
+             samba_cv_TRY_SYS_QUOTAS=yes
+             samba_cv_RUN_QUOTA_TESTS=yes
+ 	    ;;
+ 	*)
 -	    { $as_echo "$as_me:$LINENO: result: no" >&5
--$as_echo "no" >&6; }
--            samba_cv_TRY_SYS_QUOTAS=no
--	    ;;
--  esac
--fi
--
--#############################################
--# only check for quota stuff if --with-quotas
--if test x"$samba_cv_RUN_QUOTA_TESTS" != x"no"; then
--
--case "$host_os" in
--	# on linux we didn't need to test we have builtin support
--	*linux*)
--	    samba_cv_SYSQUOTA_FOUND=yes
--
++	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+ $as_echo "no" >&6; }
+             samba_cv_TRY_SYS_QUOTAS=no
+ 	    ;;
+@@ -71937,483 +29426,68 @@
+ 	*linux*)
+ 	    samba_cv_SYSQUOTA_FOUND=yes
+ 
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_QUOTACTL_LINUX 1
 -_ACEOF
--
--	    samba_cv_sysquotas_file="lib/sysquotas_linux.c"
++$as_echo "#define HAVE_QUOTACTL_LINUX 1" >>confdefs.h
+ 
+ 	    samba_cv_sysquotas_file="lib/sysquotas_linux.c"
 -	    { $as_echo "$as_me:$LINENO: checking whether to use the lib/sysquotas_linux.c builtin support" >&5
--$as_echo_n "checking whether to use the lib/sysquotas_linux.c builtin support... " >&6; }
++	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use the lib/sysquotas_linux.c builtin support" >&5
+ $as_echo_n "checking whether to use the lib/sysquotas_linux.c builtin support... " >&6; }
 -	    { $as_echo "$as_me:$LINENO: result: yes" >&5
--$as_echo "yes" >&6; }
--
--
++	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+ $as_echo "yes" >&6; }
+ 
+ 
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_LINUX_XFS_QUOTAS 1
 -_ACEOF
--
--	    samba_cv_found_xfs_header=yes
++$as_echo "#define HAVE_LINUX_XFS_QUOTAS 1" >>confdefs.h
+ 
+ 	    samba_cv_found_xfs_header=yes
 -	    { $as_echo "$as_me:$LINENO: checking whether to use the lib/sysquotas_xfs.c builtin support" >&5
--$as_echo_n "checking whether to use the lib/sysquotas_xfs.c builtin support... " >&6; }
++	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use the lib/sysquotas_xfs.c builtin support" >&5
+ $as_echo_n "checking whether to use the lib/sysquotas_xfs.c builtin support... " >&6; }
 -	    { $as_echo "$as_me:$LINENO: result: yes" >&5
--$as_echo "yes" >&6; }
--	    ;;
--	*solaris*)
--	    # need to set this define when using static linking (BUG 1473)
--	    CPPFLAGS="$CPPFLAGS -DSUNOS5"
--	    ;;
++	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+ $as_echo "yes" >&6; }
+ 	    ;;
+ 	*solaris*)
+ 	    # need to set this define when using static linking (BUG 1473)
+ 	    CPPFLAGS="$CPPFLAGS -DSUNOS5"
+ 	    ;;
 -	*)
 -	    ;;
 -esac
@@ -78163,17 +78431,14 @@
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+else
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${samba_cv_TRY_QUOTAS}" >&5
-+$as_echo "${samba_cv_TRY_QUOTAS}" >&6; }
- 
+-
 -  ac_header_preproc=no
- fi
- 
+-fi
+-
 -rm -f conftest.err conftest.$ac_ext
 -{ $as_echo "$as_me:$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: )
@@ -78182,19 +78447,7 @@
 -    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
 -    ac_header_preproc=yes
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to try the new lib/sysquotas.c interface" >&5
-+$as_echo_n "checking whether to try the new lib/sysquotas.c interface... " >&6; }
-+
-+# Check whether --with-sys-quotas was given.
-+if test "${with_sys_quotas+set}" = set; then :
-+  withval=$with_sys_quotas;  case "$withval" in
-+  yes)
-+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-+$as_echo "yes" >&6; }
-+    samba_cv_WITH_SYS_QUOTAS=yes
-+    samba_cv_TRY_SYS_QUOTAS=yes
-+    samba_cv_RUN_QUOTA_TESTS=yes
-     ;;
+-    ;;
 -  no:yes:* )
 -    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
 -$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
@@ -78214,78 +78467,43 @@
 -## ---------------------------------------- ##
 -_ASBOX
 -     ) | sed "s/^/$as_me: WARNING:     /" >&2
-+  auto)
-+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: auto" >&5
-+$as_echo "auto" >&6; }
-+    samba_cv_WITH_SYS_QUOTAS=auto
-+    samba_cv_TRY_SYS_QUOTAS=auto
-+    samba_cv_RUN_QUOTA_TESTS=auto
-     ;;
--esac
+-    ;;
++	*)
++	    ;;
+ esac
 -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
 -$as_echo_n "checking for $ac_header... " >&6; }
 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
 -  $as_echo_n "(cached) " >&6
-+  no)
-+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-+$as_echo "no" >&6; }
-+    samba_cv_WITH_SYS_QUOTAS=no
-+    samba_cv_TRY_SYS_QUOTAS=no
-+    ;;
-+  *)
-+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${samba_cv_TRY_SYS_QUOTAS}" >&5
-+$as_echo "${samba_cv_TRY_SYS_QUOTAS}" >&6; }
-+    ;;
-+  esac
- else
+-else
 -  eval "$as_ac_Header=\$ac_header_preproc"
 -fi
 -ac_res=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
 -$as_echo "$ac_res" >&6; }
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${samba_cv_TRY_SYS_QUOTAS}" >&5
-+$as_echo "${samba_cv_TRY_SYS_QUOTAS}" >&6; }
  
- fi
+-fi
 -as_val=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
 -  cat >>confdefs.h <<_ACEOF
 -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
 -_ACEOF
++# some broken header files need this
++ac_fn_c_check_header_mongrel "$LINENO" "asm/types.h" "ac_cv_header_asm_types_h" "$ac_includes_default"
++if test "x$ac_cv_header_asm_types_h" = x""yes; then :
  
-+
-+if test x"$samba_cv_TRY_SYS_QUOTAS" = x"auto"; then
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to try the lib/sysquotas.c interface on ${host_os}" >&5
-+$as_echo_n "checking whether to try the lib/sysquotas.c interface on ${host_os}... " >&6; }
-+  case "$host_os" in
-+	*linux*)
-+	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-+$as_echo "yes" >&6; }
-+            samba_cv_TRY_SYS_QUOTAS=yes
-+            samba_cv_RUN_QUOTA_TESTS=yes
-+	    ;;
-+	*)
-+	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-+$as_echo "no" >&6; }
-+            samba_cv_TRY_SYS_QUOTAS=no
-+	    ;;
-+  esac
- fi
+-fi
  
 -done
-+#############################################
-+# only check for quota stuff if --with-quotas
-+if test x"$samba_cv_RUN_QUOTA_TESTS" != x"no"; then
++$as_echo "#define HAVE_ASM_TYPES_H 1" >>confdefs.h
  
-+case "$host_os" in
-+	# on linux we didn't need to test we have builtin support
-+	*linux*)
-+	    samba_cv_SYSQUOTA_FOUND=yes
++	    cat >> confdefs.h <<\EOF
++#include <asm/types.h>
++EOF
  
 -# For quotas on Linux XFS filesystems
-+$as_echo "#define HAVE_QUOTACTL_LINUX 1" >>confdefs.h
  
 -for ac_header in linux/dqblk_xfs.h
 -do
@@ -78295,7 +78513,7 @@
 -$as_echo_n "checking for $ac_header... " >&6; }
 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
 -  $as_echo_n "(cached) " >&6
--fi
+ fi
 -ac_res=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
@@ -78335,11 +78553,6 @@
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+	    samba_cv_sysquotas_file="lib/sysquotas_linux.c"
-+	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use the lib/sysquotas_linux.c builtin support" >&5
-+$as_echo_n "checking whether to use the lib/sysquotas_linux.c builtin support... " >&6; }
-+	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-+$as_echo "yes" >&6; }
  
 -	ac_header_compiler=no
 -fi
@@ -78347,7 +78560,6 @@
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 -$as_echo "$ac_header_compiler" >&6; }
-+$as_echo "#define HAVE_LINUX_XFS_QUOTAS 1" >>confdefs.h
  
 -# Is the header present?
 -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
@@ -78359,24 +78571,19 @@
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
 -#include <$ac_header>
--_ACEOF
++# For quotas on Veritas VxFS filesystems
++for ac_header in sys/fs/vx_quota.h
++do :
++  ac_fn_c_check_header_mongrel "$LINENO" "sys/fs/vx_quota.h" "ac_cv_header_sys_fs_vx_quota_h" "$ac_includes_default"
++if test "x$ac_cv_header_sys_fs_vx_quota_h" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_SYS_FS_VX_QUOTA_H 1
+ _ACEOF
 -if { (ac_try="$ac_cpp conftest.$ac_ext"
 -case "(($ac_try" in
 -  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
 -  *) ac_try_echo=$ac_try;;
-+	    samba_cv_found_xfs_header=yes
-+	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use the lib/sysquotas_xfs.c builtin support" >&5
-+$as_echo_n "checking whether to use the lib/sysquotas_xfs.c builtin support... " >&6; }
-+	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-+$as_echo "yes" >&6; }
-+	    ;;
-+	*solaris*)
-+	    # need to set this define when using static linking (BUG 1473)
-+	    CPPFLAGS="$CPPFLAGS -DSUNOS5"
-+	    ;;
-+	*)
-+	    ;;
- esac
+-esac
 -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 -$as_echo "$ac_try_echo") >&5
 -  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
@@ -78395,14 +78602,12 @@
 -sed 's/^/| /' conftest.$ac_ext >&5
  
 -  ac_header_preproc=no
--fi
-+# some broken header files need this
-+ac_fn_c_check_header_mongrel "$LINENO" "asm/types.h" "ac_cv_header_asm_types_h" "$ac_includes_default"
-+if test "x$ac_cv_header_asm_types_h" = x""yes; then :
+ fi
  
 -rm -f conftest.err conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
 -$as_echo "$ac_header_preproc" >&6; }
++done
  
 -# So?  What about this header?
 -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
@@ -78445,28 +78650,28 @@
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
 -$as_echo "$ac_res" >&6; }
-+$as_echo "#define HAVE_ASM_TYPES_H 1" >>confdefs.h
  
 -fi
 -as_val=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
--  cat >>confdefs.h <<_ACEOF
++# For quotas on Linux XFS filesystems
++for ac_header in linux/dqblk_xfs.h
++do :
++  ac_fn_c_check_header_mongrel "$LINENO" "linux/dqblk_xfs.h" "ac_cv_header_linux_dqblk_xfs_h" "$ac_includes_default"
++if test "x$ac_cv_header_linux_dqblk_xfs_h" = x""yes; then :
+   cat >>confdefs.h <<_ACEOF
 -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
--_ACEOF
-+	    cat >> confdefs.h <<\EOF
-+#include <asm/types.h>
-+EOF
++#define HAVE_LINUX_DQBLK_XFS_H 1
+ _ACEOF
  
--fi
+ fi
+@@ -72422,151 +29496,12 @@
  
--done
-+fi
  
- 
--# For sys/quota.h and linux/quota.h
- 
--for ac_header in sys/quota.h
+ # For sys/quota.h and linux/quota.h
+-
+ for ac_header in sys/quota.h
 -do
 -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
@@ -78491,14 +78696,7 @@
 -/* end confdefs.h.  */
 -$ac_includes_default
 -#include <$ac_header>
-+# For quotas on Veritas VxFS filesystems
-+for ac_header in sys/fs/vx_quota.h
-+do :
-+  ac_fn_c_check_header_mongrel "$LINENO" "sys/fs/vx_quota.h" "ac_cv_header_sys_fs_vx_quota_h" "$ac_includes_default"
-+if test "x$ac_cv_header_sys_fs_vx_quota_h" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define HAVE_SYS_FS_VX_QUOTA_H 1
- _ACEOF
+-_ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -78521,15 +78719,14 @@
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
- 
+-
 -	ac_header_compiler=no
- fi
- 
+-fi
+-
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 -$as_echo "$ac_header_compiler" >&6; }
-+done
- 
+-
 -# Is the header present?
 -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
 -$as_echo_n "checking $ac_header presence... " >&6; }
@@ -78540,15 +78737,7 @@
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
 -#include <$ac_header>
-+
-+# For quotas on Linux XFS filesystems
-+for ac_header in linux/dqblk_xfs.h
-+do :
-+  ac_fn_c_check_header_mongrel "$LINENO" "linux/dqblk_xfs.h" "ac_cv_header_linux_dqblk_xfs_h" "$ac_includes_default"
-+if test "x$ac_cv_header_linux_dqblk_xfs_h" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define HAVE_LINUX_DQBLK_XFS_H 1
- _ACEOF
+-_ACEOF
 -if { (ac_try="$ac_cpp conftest.$ac_ext"
 -case "(($ac_try" in
 -  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -78570,15 +78759,14 @@
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
- 
+-
 -  ac_header_preproc=no
- fi
- 
+-fi
+-
 -rm -f conftest.err conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
 -$as_echo "$ac_header_preproc" >&6; }
-+done
- 
+-
 -# So?  What about this header?
 -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
 -  yes:no: )
@@ -78620,13 +78808,11 @@
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
 -$as_echo "$ac_res" >&6; }
- 
+-
 -fi
 -as_val=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+# For sys/quota.h and linux/quota.h
-+for ac_header in sys/quota.h
 +do :
 +  ac_fn_c_check_header_mongrel "$LINENO" "sys/quota.h" "ac_cv_header_sys_quota_h" "$ac_includes_default"
 +if test "x$ac_cv_header_sys_quota_h" = x""yes; then :
@@ -78636,7 +78822,7 @@
  _ACEOF
  
  fi
-@@ -72389,17 +29459,13 @@
+@@ -72576,17 +29511,13 @@
  
  if test x"$samba_cv_found_xfs_header" != x"yes"; then
  # if we have xfs quota support <sys/quota.h> (IRIX) we should use it
@@ -78657,7 +78843,7 @@
  /* end confdefs.h.  */
  
  #include "confdefs.h"
-@@ -72419,35 +29485,14 @@
+@@ -72606,35 +29537,14 @@
    return 0;
  }
  _ACEOF
@@ -78696,7 +78882,7 @@
  $as_echo "$samba_cv_HAVE_SYS_QUOTA_XFS" >&6; }
  if test "$samba_cv_HAVE_SYS_QUOTA_XFS"x = "yes"x; then
  	samba_cv_found_xfs_header=yes
-@@ -72455,17 +29500,13 @@
+@@ -72642,17 +29552,13 @@
  fi
  
  # if we have struct dqblk .dqb_fsoftlimit instead of .dqb_isoftlimit on IRIX
@@ -78717,7 +78903,7 @@
  /* end confdefs.h.  */
  
  #include "confdefs.h"
-@@ -72483,41 +29524,18 @@
+@@ -72670,41 +29576,18 @@
    return 0;
  }
  _ACEOF
@@ -78763,7 +78949,7 @@
  
  fi
  
-@@ -72525,9 +29543,9 @@
+@@ -72712,9 +29595,9 @@
  # look for a working quota system
  
  if test x"$samba_cv_SYSQUOTA_FOUND" != x"yes"; then
@@ -78775,7 +78961,7 @@
    $as_echo_n "(cached) " >&6
  else
  
-@@ -72541,14 +29559,10 @@
+@@ -72728,14 +29611,10 @@
  	old_LDFLAGS="$LDFLAGS";
  	LDFLAGS="$LDFLAGS";
  	export LDFLAGS;
@@ -78792,7 +78978,7 @@
  /* end confdefs.h.  */
  
  #define HAVE_QUOTACTL_4A 1
-@@ -72556,42 +29570,15 @@
+@@ -72743,42 +29622,15 @@
  #include "confdefs.h"
  #include "${srcdir-.}/../tests/sysquotas.c"
  _ACEOF
@@ -78839,7 +79025,7 @@
  	CFLAGS="$old_CFLAGS";
  	old_CFLAGS="";
  	export CFLAGS;
-@@ -72603,23 +29590,21 @@
+@@ -72790,23 +29642,21 @@
  	export LDFLAGS;
  
  fi
@@ -78867,7 +79053,7 @@
    $as_echo_n "(cached) " >&6
  else
  
-@@ -72633,14 +29618,10 @@
+@@ -72820,14 +29670,10 @@
  	old_LDFLAGS="$LDFLAGS";
  	LDFLAGS="$LDFLAGS";
  	export LDFLAGS;
@@ -78884,7 +79070,7 @@
  /* end confdefs.h.  */
  
  #define HAVE_QUOTACTL_4B 1
-@@ -72648,42 +29629,15 @@
+@@ -72835,42 +29681,15 @@
  #include "confdefs.h"
  #include "${srcdir-.}/../tests/sysquotas.c"
  _ACEOF
@@ -78931,7 +79117,7 @@
  	CFLAGS="$old_CFLAGS";
  	old_CFLAGS="";
  	export CFLAGS;
-@@ -72695,24 +29649,22 @@
+@@ -72882,24 +29701,22 @@
  	export LDFLAGS;
  
  fi
@@ -78960,7 +79146,7 @@
    $as_echo_n "(cached) " >&6
  else
  
-@@ -72726,14 +29678,10 @@
+@@ -72913,14 +29730,10 @@
  	old_LDFLAGS="$LDFLAGS";
  	LDFLAGS="$LDFLAGS";
  	export LDFLAGS;
@@ -78977,7 +79163,7 @@
  /* end confdefs.h.  */
  
  #define HAVE_QUOTACTL_3 1
-@@ -72741,42 +29689,15 @@
+@@ -72928,42 +29741,15 @@
  #include "confdefs.h"
  #include "${srcdir-.}/../tests/sysquotas.c"
  _ACEOF
@@ -79024,7 +79210,7 @@
  	CFLAGS="$old_CFLAGS";
  	old_CFLAGS="";
  	export CFLAGS;
-@@ -72788,15 +29709,13 @@
+@@ -72975,15 +29761,13 @@
  	export LDFLAGS;
  
  fi
@@ -79042,12 +79228,12 @@
  
      samba_cv_sysquotas_file="lib/sysquotas_3.c"
  fi
-@@ -72804,410 +29723,12 @@
+@@ -72991,151 +29775,12 @@
  
  #################################################
  # check for mntent.h and struct mntent
 -
--for ac_header in mntent.h
+ for ac_header in mntent.h
 -do
 -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
@@ -79189,20 +79375,23 @@
 -as_val=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
--  cat >>confdefs.h <<_ACEOF
++do :
++  ac_fn_c_check_header_mongrel "$LINENO" "mntent.h" "ac_cv_header_mntent_h" "$ac_includes_default"
++if test "x$ac_cv_header_mntent_h" = x""yes; then :
+   cat >>confdefs.h <<_ACEOF
 -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
--_ACEOF
++#define HAVE_MNTENT_H 1
+ _ACEOF
+ 
+ fi
+@@ -73144,102 +29789,12 @@
+ 
+ #################################################
+ # check for setmntent,getmntent,endmntent
 -
--fi
 -
--done
 -
--#################################################
--# check for setmntent,getmntent,endmntent
--
--
--
--for ac_func in setmntent getmntent endmntent
+ for ac_func in setmntent getmntent endmntent
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
@@ -79295,18 +79484,20 @@
 -as_val=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
--  cat >>confdefs.h <<_ACEOF
--#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
--_ACEOF
++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
+@@ -73250,151 +29805,12 @@
+ 
+ #################################################
+ # check for devnm.h and struct mntent
 -
--fi
--done
--
--
--#################################################
--# check for devnm.h and struct mntent
--
--for ac_header in devnm.h
+ for ac_header in devnm.h
 -do
 -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
@@ -79448,23 +79639,21 @@
 -as_val=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+for ac_header in mntent.h
 +do :
-+  ac_fn_c_check_header_mongrel "$LINENO" "mntent.h" "ac_cv_header_mntent_h" "$ac_includes_default"
-+if test "x$ac_cv_header_mntent_h" = x""yes; then :
++  ac_fn_c_check_header_mongrel "$LINENO" "devnm.h" "ac_cv_header_devnm_h" "$ac_includes_default"
++if test "x$ac_cv_header_devnm_h" = x""yes; then :
    cat >>confdefs.h <<_ACEOF
 -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-+#define HAVE_MNTENT_H 1
++#define HAVE_DEVNM_H 1
  _ACEOF
  
  fi
-@@ -73215,103 +29736,43 @@
- done
+@@ -73403,102 +29819,12 @@
  
  #################################################
--# check for devnm
+ # check for devnm
 -
--for ac_func in devnm
+ for ac_func in devnm
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
@@ -79474,16 +79663,7 @@
 -else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
-+# check for setmntent,getmntent,endmntent
-+for ac_func in setmntent getmntent endmntent
-+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
+-_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
@@ -79501,11 +79681,9 @@
 -#else
 -# include <assert.h>
 -#endif
- 
+-
 -#undef $ac_func
-+fi
-+done
- 
+-
 -/* 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.  */
@@ -79519,7 +79697,7 @@
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
 -#endif
- 
+-
 -int
 -main ()
 -{
@@ -79527,15 +79705,7 @@
 -  ;
 -  return 0;
 -}
-+#################################################
-+# check for devnm.h and struct mntent
-+for ac_header in devnm.h
-+do :
-+  ac_fn_c_check_header_mongrel "$LINENO" "devnm.h" "ac_cv_header_devnm_h" "$ac_includes_default"
-+if test "x$ac_cv_header_devnm_h" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define HAVE_DEVNM_H 1
- _ACEOF
+-_ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -79561,10 +79731,10 @@
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
- 
+-
 -	eval "$as_ac_var=no"
- fi
- 
+-fi
+-
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
@@ -79576,11 +79746,6 @@
 -as_val=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+done
-+
-+#################################################
-+# check for devnm
-+for ac_func in devnm
 +do :
 +  ac_fn_c_check_func "$LINENO" "devnm" "ac_cv_func_devnm"
 +if test "x$ac_cv_func_devnm" = x""yes; then :
@@ -79590,7 +79755,7 @@
  _ACEOF
  
  fi
-@@ -73334,19 +29795,15 @@
+@@ -73521,19 +29847,15 @@
  fi
  
  if test x"$samba_cv_SYSQUOTA_FOUND" != x"no"; then
@@ -79613,7 +79778,7 @@
  /* end confdefs.h.  */
  
  #include "confdefs.h"
-@@ -73364,76 +29821,47 @@
+@@ -73551,76 +29873,47 @@
    return 0;
  }
  _ACEOF
@@ -79701,7 +79866,7 @@
  /* end confdefs.h.  */
  
  #include "confdefs.h"
-@@ -73451,62 +29879,35 @@
+@@ -73638,62 +29931,35 @@
    return 0;
  }
  _ACEOF
@@ -79746,8 +79911,9 @@
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_XFS_QUOTAS 1
 -_ACEOF
+-
 +$as_echo "#define HAVE_XFS_QUOTAS 1" >>confdefs.h
- 
++
      fi
  fi
  fi
@@ -79771,7 +79937,7 @@
  /* end confdefs.h.  */
  
  #include "confdefs.h"
-@@ -73522,56 +29923,33 @@
+@@ -73709,56 +29975,33 @@
    return 0;
  }
  _ACEOF
@@ -79836,7 +80002,7 @@
  $as_echo "no" >&6; }
      fi
  fi
-@@ -73583,12 +29961,12 @@
+@@ -73770,12 +30013,12 @@
  #################################################
  # check for experimental utmp accounting
  
@@ -79851,7 +80017,7 @@
    withval=$with_utmp;  case "$withval" in
    no)
  		WITH_UTMP=no
-@@ -73611,15 +29989,13 @@
+@@ -73798,15 +30041,13 @@
  # Display test results
  
  if test x"$WITH_UTMP" = x"yes"; then
@@ -79870,7 +80036,7 @@
  $as_echo "no$utmp_no_reason" >&6; }
  fi
  
-@@ -73645,10 +30021,10 @@
+@@ -73832,10 +30073,10 @@
  USESHARED=false
  
  
@@ -79883,7 +80049,7 @@
    enableval=$enable_shared_libs; enable_shared_libs=$enableval
  else
    enable_shared_libs=yes
-@@ -73659,11 +30035,11 @@
+@@ -73846,11 +30087,11 @@
  	USESHARED=$BLDSHARED
  fi
  
@@ -79897,7 +80063,7 @@
  $as_echo "$as_me: WARNING: --enable-shared-libs: no support for shared libraries" >&2;}
  fi
  
-@@ -73691,14 +30067,13 @@
+@@ -73878,14 +30119,13 @@
  
  
  # Check whether --with-static-libs was given.
@@ -79914,7 +80080,7 @@
  fi
  
  
-@@ -73747,16 +30122,16 @@
+@@ -73934,16 +30174,16 @@
  
  
  
@@ -79934,7 +80100,7 @@
  $as_echo "no" >&6; }
  		build_lib=no
  		;;
-@@ -73782,7 +30157,7 @@
+@@ -73969,7 +30209,7 @@
  	if eval $BLDSHARED = true; then
  		LIBTALLOC_SHARED=$LIBTALLOC_SHARED_TARGET
  		LIBTALLOC_TARGET=$LIBTALLOC_SHARED_TARGET
@@ -79943,7 +80109,7 @@
  $as_echo "yes" >&6; }
  		if test x"$USESHARED" != x"true" -o x"$LINK_LIBTALLOC" = "xSTATIC" ; then
  			enable_static=yes
-@@ -73795,12 +30170,12 @@
+@@ -73982,12 +30222,12 @@
  		enable_static=yes
  		LIBTALLOC_TARGET=$LIBTALLOC_STATIC_TARGET
  		LIBTALLOC_LIBS=$LIBTALLOC_STATIC_TARGET
@@ -79958,7 +80124,7 @@
  $as_echo "shared library not selected" >&6; }
  fi
  if test $enable_static = yes; then
-@@ -73851,16 +30226,16 @@
+@@ -74038,16 +30278,16 @@
  
  
  
@@ -79978,7 +80144,7 @@
  $as_echo "no" >&6; }
  		build_lib=no
  		;;
-@@ -73886,7 +30261,7 @@
+@@ -74073,7 +30313,7 @@
  	if eval $BLDSHARED = true; then
  		LIBTDB_SHARED=$LIBTDB_SHARED_TARGET
  		LIBTDB_TARGET=$LIBTDB_SHARED_TARGET
@@ -79987,7 +80153,7 @@
  $as_echo "yes" >&6; }
  		if test x"$USESHARED" != x"true" -o x"$LINK_LIBTDB" = "xSTATIC" ; then
  			enable_static=yes
-@@ -73899,12 +30274,12 @@
+@@ -74086,12 +30326,12 @@
  		enable_static=yes
  		LIBTDB_TARGET=$LIBTDB_STATIC_TARGET
  		LIBTDB_LIBS=$LIBTDB_STATIC_TARGET
@@ -80002,7 +80168,7 @@
  $as_echo "shared library not selected" >&6; }
  fi
  if test $enable_static = yes; then
-@@ -73942,16 +30317,16 @@
+@@ -74129,16 +30369,16 @@
  
  
  
@@ -80022,7 +80188,7 @@
  $as_echo "no" >&6; }
  		build_lib=no
  		;;
-@@ -73977,7 +30352,7 @@
+@@ -74164,7 +30404,7 @@
  	if eval $BLDSHARED = true; then
  		LIBNETAPI_SHARED=$LIBNETAPI_SHARED_TARGET
  		LIBNETAPI_TARGET=$LIBNETAPI_SHARED_TARGET
@@ -80031,7 +80197,7 @@
  $as_echo "yes" >&6; }
  		if test x"$USESHARED" != x"true" -o x"$LINK_LIBNETAPI" = "xSTATIC" ; then
  			enable_static=yes
-@@ -73990,12 +30365,12 @@
+@@ -74177,12 +30417,12 @@
  		enable_static=yes
  		LIBNETAPI_TARGET=$LIBNETAPI_STATIC_TARGET
  		LIBNETAPI_LIBS=$LIBNETAPI_STATIC_TARGET
@@ -80046,7 +80212,7 @@
  $as_echo "shared library not selected" >&6; }
  fi
  if test $enable_static = yes; then
-@@ -74033,16 +30408,16 @@
+@@ -74220,16 +30460,16 @@
  
  
  
@@ -80066,7 +80232,7 @@
  $as_echo "no" >&6; }
  		build_lib=no
  		;;
-@@ -74068,7 +30443,7 @@
+@@ -74255,7 +30495,7 @@
  	if eval $BLDSHARED = true; then
  		LIBSMBCLIENT_SHARED=$LIBSMBCLIENT_SHARED_TARGET
  		LIBSMBCLIENT_TARGET=$LIBSMBCLIENT_SHARED_TARGET
@@ -80075,7 +80241,7 @@
  $as_echo "yes" >&6; }
  		if test x"$USESHARED" != x"true" -o x"$LINK_LIBSMBCLIENT" = "xSTATIC" ; then
  			enable_static=yes
-@@ -74081,12 +30456,12 @@
+@@ -74268,12 +30508,12 @@
  		enable_static=yes
  		LIBSMBCLIENT_TARGET=$LIBSMBCLIENT_STATIC_TARGET
  		LIBSMBCLIENT_LIBS=$LIBSMBCLIENT_STATIC_TARGET
@@ -80090,7 +80256,7 @@
  $as_echo "shared library not selected" >&6; }
  fi
  if test $enable_static = yes; then
-@@ -74124,16 +30499,16 @@
+@@ -74311,16 +30551,16 @@
  
  
  
@@ -80110,7 +80276,7 @@
  $as_echo "no" >&6; }
  		build_lib=no
  		;;
-@@ -74159,7 +30534,7 @@
+@@ -74346,7 +30586,7 @@
  	if eval $BLDSHARED = true; then
  		LIBSMBSHAREMODES_SHARED=$LIBSMBSHAREMODES_SHARED_TARGET
  		LIBSMBSHAREMODES_TARGET=$LIBSMBSHAREMODES_SHARED_TARGET
@@ -80119,7 +80285,7 @@
  $as_echo "yes" >&6; }
  		if test x"$USESHARED" != x"true" -o x"$LINK_LIBSMBSHAREMODES" = "xSTATIC" ; then
  			enable_static=yes
-@@ -74172,12 +30547,12 @@
+@@ -74359,12 +30599,12 @@
  		enable_static=yes
  		LIBSMBSHAREMODES_TARGET=$LIBSMBSHAREMODES_STATIC_TARGET
  		LIBSMBSHAREMODES_LIBS=$LIBSMBSHAREMODES_STATIC_TARGET
@@ -80134,7 +80300,7 @@
  $as_echo "shared library not selected" >&6; }
  fi
  if test $enable_static = yes; then
-@@ -74215,19 +30590,19 @@
+@@ -74402,19 +30642,19 @@
  
  
  
@@ -80157,7 +80323,7 @@
  $as_echo "yes" >&6; }
  		build_lib=no
  		;;
-@@ -74236,7 +30611,7 @@
+@@ -74423,7 +30663,7 @@
  else
  
  # if unspecified, default is not to build
@@ -80166,7 +80332,7 @@
  $as_echo "yes" >&6; }
  build_lib=no
  
-@@ -74252,7 +30627,7 @@
+@@ -74439,7 +30679,7 @@
  	if eval $BLDSHARED = true; then
  		LIBADDNS_SHARED=$LIBADDNS_SHARED_TARGET
  		LIBADDNS_TARGET=$LIBADDNS_SHARED_TARGET
@@ -80175,7 +80341,7 @@
  $as_echo "yes" >&6; }
  		if test x"$USESHARED" != x"true" -o x"$LINK_LIBADDNS" = "xSTATIC" ; then
  			enable_static=yes
-@@ -74265,12 +30640,12 @@
+@@ -74452,12 +30692,12 @@
  		enable_static=yes
  		LIBADDNS_TARGET=$LIBADDNS_STATIC_TARGET
  		LIBADDNS_LIBS=$LIBADDNS_STATIC_TARGET
@@ -80190,7 +80356,7 @@
  $as_echo "shared library not selected" >&6; }
  fi
  if test $enable_static = yes; then
-@@ -74286,26 +30661,22 @@
+@@ -74473,26 +30713,22 @@
  
  #################################################
  # these tests are taken from the GNU fileutils package
@@ -80222,7 +80388,7 @@
  /* end confdefs.h.  */
  
  #if defined(HAVE_UNISTD_H)
-@@ -74319,51 +30690,22 @@
+@@ -74506,51 +30742,22 @@
      exit (statvfs64 (".", &fsd));
    }
  _ACEOF
@@ -80280,7 +80446,7 @@
  
    fi
  fi
-@@ -74376,16 +30718,12 @@
+@@ -74563,16 +30770,12 @@
  # is what it gets when this test fails.
  if test $space = no; then
    # SVR4
@@ -80300,7 +80466,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <sys/statvfs.h>
-@@ -74397,47 +30735,20 @@
+@@ -74584,47 +30787,20 @@
    return 0;
  }
  _ACEOF
@@ -80354,7 +80520,7 @@
  
    fi
  fi
-@@ -74445,17 +30756,13 @@
+@@ -74632,17 +30808,13 @@
  # smbd/statvfs.c assumes that statvfs.f_fsid is an integer.
  # This is not the case on ancient Linux systems.
  
@@ -80375,7 +80541,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <sys/statvfs.h>
-@@ -74467,57 +30774,30 @@
+@@ -74654,57 +30826,30 @@
    return 0;
  }
  _ACEOF
@@ -80440,7 +80606,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <sys/statvfs.h>
-@@ -74529,56 +30809,29 @@
+@@ -74716,56 +30861,29 @@
    return 0;
  }
  _ACEOF
@@ -80504,7 +80670,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <sys/statvfs.h>
-@@ -74590,55 +30843,28 @@
+@@ -74777,55 +30895,28 @@
    return 0;
  }
  _ACEOF
@@ -80567,7 +80733,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <sys/statvfs.h>
-@@ -74650,59 +30876,32 @@
+@@ -74837,59 +30928,32 @@
    return 0;
  }
  _ACEOF
@@ -80635,7 +80801,7 @@
  /* end confdefs.h.  */
  
  #include <sys/param.h>
-@@ -74715,71 +30914,38 @@
+@@ -74902,71 +30966,38 @@
      exit (statfs (".", &fsd, sizeof (struct statfs)));
    }
  _ACEOF
@@ -80717,7 +80883,7 @@
  /* end confdefs.h.  */
  
  #ifdef HAVE_SYS_PARAM_H
-@@ -74798,71 +30964,38 @@
+@@ -74985,71 +31016,38 @@
    exit (statfs (".", &fsd));
    }
  _ACEOF
@@ -80799,7 +80965,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <sys/statfs.h>
-@@ -74872,71 +31005,38 @@
+@@ -75059,71 +31057,38 @@
    exit (statfs (".", &fsd, sizeof fsd, 0));
    }
  _ACEOF
@@ -80881,7 +81047,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #ifdef HAVE_SYS_PARAM_H
-@@ -74952,71 +31052,38 @@
+@@ -75139,71 +31104,38 @@
    exit (statfs (".", &fsd));
    }
  _ACEOF
@@ -80963,7 +81129,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #ifdef HAVE_SYS_PARAM_H
-@@ -75036,52 +31103,23 @@
+@@ -75223,52 +31155,23 @@
    exit (statfs (".", &fsd) != 1);
    }
  _ACEOF
@@ -81022,7 +81188,7 @@
  
    fi
  fi
-@@ -75094,13 +31132,9 @@
+@@ -75281,13 +31184,9 @@
  # If we don't have all of these then disable large
  # file support.
  #
@@ -81038,7 +81204,7 @@
  /* end confdefs.h.  */
  
  #if defined(HAVE_LONGLONG) && (defined(HAVE_OFF64_T) || (defined(SIZEOF_OFF_T) && (SIZEOF_OFF_T == 8)))
-@@ -75117,41 +31151,18 @@
+@@ -75304,41 +31203,18 @@
    return 0;
  }
  _ACEOF
@@ -81084,7 +81250,7 @@
  $as_echo "$samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT" >&6; }
  
  #################################################
-@@ -75161,10 +31172,10 @@
+@@ -75348,10 +31224,10 @@
  
  
  # Check whether --with-ctdb was given.
@@ -81097,7 +81263,7 @@
  $as_echo "$as_me: WARNING: --with-ctdb called without argument" >&2;}
      ;;
    *)
-@@ -75178,340 +31189,40 @@
+@@ -75365,471 +31241,40 @@
  CPPFLAGS="$CPPFLAGS $CTDB_CPPFLAGS"
  ctdb_broken="missing or broken headers"
  
@@ -81177,11 +81343,11 @@
 +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
+-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+-_ACEOF
 -
+-fi
+-
 -done
 -
 -
@@ -81445,36 +81611,28 @@
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+
-+done
-+
-+
-+
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CTDB_CONTROL_TRANS2_COMMIT_RETRY declaration" >&5
-+$as_echo_n "checking for CTDB_CONTROL_TRANS2_COMMIT_RETRY declaration... " >&6; }
-+if test "${ac_cv_have_CTDB_CONTROL_TRANS2_COMMIT_RETRY_decl+set}" = set; then :
-+  $as_echo_n "(cached) " >&6
-+else
-+
-+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
- 
- #include "confdefs.h"
-@@ -75524,202 +31235,109 @@
- #include <ctdb.h>
- #include <ctdb_private.h>
- 
+-/* end confdefs.h.  */
 -
- int
- main ()
- {
+-#include "confdefs.h"
+-#define NO_CONFIG_H
+-#include "replace.h"
+-#include "system/wait.h"
+-#include "system/network.h"
+-#include <talloc.h>
+-#include <tdb.h>
+-#include <ctdb.h>
+-#include <ctdb_private.h>
+-
+-
+-int
+-main ()
+-{
 -if (sizeof ((struct ctdb_control_tcp)))
 -	  return 0;
-+int i = (int)CTDB_CONTROL_TRANS2_COMMIT_RETRY
-   ;
-   return 0;
- }
- _ACEOF
+-  ;
+-  return 0;
+-}
+-_ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -81502,43 +81660,32 @@
 -fi
 -
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-+if ac_fn_c_try_compile "$LINENO"; then :
-+  ac_cv_have_CTDB_CONTROL_TRANS2_COMMIT_RETRY_decl=yes
- else
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -
-+  ac_cv_have_CTDB_CONTROL_TRANS2_COMMIT_RETRY_decl=no
- fi
+-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
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_struct_ctdb_control_tcp" >&5
 -$as_echo "$ac_cv_type_struct_ctdb_control_tcp" >&6; }
 -if test "x$ac_cv_type_struct_ctdb_control_tcp" = x""yes; then
 -
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_CTDB_CONTROL_TRANS2_COMMIT_RETRY_decl" >&5
-+$as_echo "$ac_cv_have_CTDB_CONTROL_TRANS2_COMMIT_RETRY_decl" >&6; }
-+ if test x"$ac_cv_have_CTDB_CONTROL_TRANS2_COMMIT_RETRY_decl" = x"yes"; then
- 
+-
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_STRUCT_CTDB_CONTROL_TCP 1
 -_ACEOF
-+$as_echo "#define HAVE_CTDB_CONTROL_TRANS2_COMMIT_RETRY_DECL 1" >>confdefs.h
- 
-+ fi
- 
-+if test x"$ac_cv_have_CTDB_CONTROL_TRANS2_COMMIT_RETRY_decl" = x"yes"; then
-+	ctdb_broken=no
- else
 -
+-
+-else
+-
 -	ctdb_broken="missing struct ctdb_control_tcp"
 -
-+	ctdb_broken="missing transaction support"
- fi
- 
+-fi
 -
+-
 -{ $as_echo "$as_me:$LINENO: checking for struct ctdb_control_tcp_addr" >&5
 -$as_echo_n "checking for struct ctdb_control_tcp_addr... " >&6; }
 -if test "${ac_cv_type_struct_ctdb_control_tcp_addr+set}" = set; then
@@ -81553,24 +81700,16 @@
 -/* end confdefs.h.  */
 -
 -#include "confdefs.h"
-+# in ctdb 1.0.57 ctdb_control_tcp was temparary renamed to ctdb_tcp_client
-+ac_fn_c_check_type "$LINENO" "struct ctdb_tcp_client" "ac_cv_type_struct_ctdb_tcp_client" "
-+#include \"confdefs.h\"
- #define NO_CONFIG_H
+-#define NO_CONFIG_H
 -#include "replace.h"
 -#include "system/wait.h"
 -#include "system/network.h"
-+#include \"replace.h\"
-+#include \"system/wait.h\"
-+#include \"system/network.h\"
- #include <talloc.h>
- #include <tdb.h>
- #include <ctdb.h>
- #include <ctdb_private.h>
- 
-+"
-+if test "x$ac_cv_type_struct_ctdb_tcp_client" = x""yes; then :
- 
+-#include <talloc.h>
+-#include <tdb.h>
+-#include <ctdb.h>
+-#include <ctdb_private.h>
+-
+-
 -int
 -main ()
 -{
@@ -81600,44 +81739,42 @@
 -       } && test -s conftest.$ac_objext; then
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
--_ACEOF
++#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+ _ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
- 
--#include "confdefs.h"
-+$as_echo "#define ctdb_control_tcp ctdb_tcp_client" >>confdefs.h
 +
-+
 +fi
 +
++done
 +
-+ac_fn_c_check_type "$LINENO" "struct ctdb_control_tcp" "ac_cv_type_struct_ctdb_control_tcp" "
-+#include \"confdefs.h\"
- #define NO_CONFIG_H
--#include "replace.h"
--#include "system/wait.h"
--#include "system/network.h"
-+#include \"replace.h\"
-+#include \"system/wait.h\"
-+#include \"system/network.h\"
- #include <talloc.h>
- #include <tdb.h>
++
++
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CTDB_CONTROL_TRANS2_COMMIT_RETRY declaration" >&5
++$as_echo_n "checking for CTDB_CONTROL_TRANS2_COMMIT_RETRY declaration... " >&6; }
++if test "${ac_cv_have_CTDB_CONTROL_TRANS2_COMMIT_RETRY_decl+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++
++    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ 
+ #include "confdefs.h"
+@@ -75842,71 +31287,109 @@
  #include <ctdb.h>
  #include <ctdb_private.h>
  
-+"
-+if test "x$ac_cv_type_struct_ctdb_control_tcp" = x""yes; then :
- 
--int
--main ()
--{
+-
+ int
+ main ()
+ {
 -if (sizeof ((struct ctdb_control_tcp_addr)))
 -	  return 0;
--  ;
--  return 0;
--}
--_ACEOF
++int i = (int)CTDB_CONTROL_TRANS2_COMMIT_RETRY
+   ;
+   return 0;
+ }
+ _ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -81657,31 +81794,58 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  :
--else
++if ac_fn_c_try_compile "$LINENO"; then :
++  ac_cv_have_CTDB_CONTROL_TRANS2_COMMIT_RETRY_decl=yes
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
- 
+-
 -	ac_cv_type_struct_ctdb_control_tcp_addr=yes
--fi
-+$as_echo "#define HAVE_STRUCT_CTDB_CONTROL_TCP 1" >>confdefs.h
++  ac_cv_have_CTDB_CONTROL_TRANS2_COMMIT_RETRY_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_CTDB_CONTROL_TRANS2_COMMIT_RETRY_decl" >&5
++$as_echo "$ac_cv_have_CTDB_CONTROL_TRANS2_COMMIT_RETRY_decl" >&6; }
++ if test x"$ac_cv_have_CTDB_CONTROL_TRANS2_COMMIT_RETRY_decl" = x"yes"; then
 +
- 
--rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++$as_echo "#define HAVE_CTDB_CONTROL_TRANS2_COMMIT_RETRY_DECL 1" >>confdefs.h
++
++ fi
++
++if test x"$ac_cv_have_CTDB_CONTROL_TRANS2_COMMIT_RETRY_decl" = x"yes"; then
++	ctdb_broken=no
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
++	ctdb_broken="missing transaction support"
++fi
++
++# in ctdb 1.0.57 ctdb_control_tcp was temparary renamed to ctdb_tcp_client
++ac_fn_c_check_type "$LINENO" "struct ctdb_tcp_client" "ac_cv_type_struct_ctdb_tcp_client" "
++#include \"confdefs.h\"
++#define NO_CONFIG_H
++#include \"replace.h\"
++#include \"system/wait.h\"
++#include \"system/network.h\"
++#include <talloc.h>
++#include <tdb.h>
++#include <ctdb.h>
++#include <ctdb_private.h>
++
++"
++if test "x$ac_cv_type_struct_ctdb_tcp_client" = x""yes; then :
++
++
++$as_echo "#define ctdb_control_tcp ctdb_tcp_client" >>confdefs.h
  
-+	ctdb_broken="missing struct ctdb_control_tcp"
  
  fi
  
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
--fi
--{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_struct_ctdb_control_tcp_addr" >&5
--$as_echo "$ac_cv_type_struct_ctdb_control_tcp_addr" >&6; }
--if test "x$ac_cv_type_struct_ctdb_control_tcp_addr" = x""yes; then
 +
-+ac_fn_c_check_type "$LINENO" "struct ctdb_control_tcp_addr" "ac_cv_type_struct_ctdb_control_tcp_addr" "
++ac_fn_c_check_type "$LINENO" "struct ctdb_control_tcp" "ac_cv_type_struct_ctdb_control_tcp" "
 +#include \"confdefs.h\"
 +#define NO_CONFIG_H
 +#include \"replace.h\"
@@ -81693,12 +81857,40 @@
 +#include <ctdb_private.h>
 +
 +"
-+if test "x$ac_cv_type_struct_ctdb_control_tcp_addr" = x""yes; then :
++if test "x$ac_cv_type_struct_ctdb_control_tcp" = x""yes; then :
++
++
++$as_echo "#define HAVE_STRUCT_CTDB_CONTROL_TCP 1" >>confdefs.h
++
++
++else
++
++	ctdb_broken="missing struct ctdb_control_tcp"
++
+ fi
+-{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_struct_ctdb_control_tcp_addr" >&5
+-$as_echo "$ac_cv_type_struct_ctdb_control_tcp_addr" >&6; }
+-if test "x$ac_cv_type_struct_ctdb_control_tcp_addr" = x""yes; then
  
  
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_STRUCT_CTDB_CONTROL_TCP_ADDR 1
 -_ACEOF
++ac_fn_c_check_type "$LINENO" "struct ctdb_control_tcp_addr" "ac_cv_type_struct_ctdb_control_tcp_addr" "
++#include \"confdefs.h\"
++#define NO_CONFIG_H
++#include \"replace.h\"
++#include \"system/wait.h\"
++#include \"system/network.h\"
++#include <talloc.h>
++#include <tdb.h>
++#include <ctdb.h>
++#include <ctdb_private.h>
++
++"
++if test "x$ac_cv_type_struct_ctdb_control_tcp_addr" = x""yes; then :
++
++
 +$as_echo "#define HAVE_STRUCT_CTDB_CONTROL_TCP_ADDR 1" >>confdefs.h
  
  
@@ -81716,7 +81908,7 @@
    withval=$with_cluster_support;
  fi
  
-@@ -75730,44 +31348,38 @@
+@@ -75917,44 +31400,38 @@
  
  if test x"$ac_cv_header_ctdb_private_h" != x"yes"; then
  	if test "x$with_cluster_support" = "xyes"; then
@@ -81768,7 +81960,7 @@
    withval=$with_acl_support;  case "$withval" in
  	yes|no)
  		with_acl_support="$withval"
-@@ -75780,105 +31392,85 @@
+@@ -75967,105 +31444,85 @@
  	with_acl_support="auto"
  fi
  
@@ -81895,7 +82087,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -75896,60 +31488,31 @@
+@@ -76083,60 +31540,31 @@
    return 0;
  }
  _ACEOF
@@ -81965,7 +82157,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -75967,61 +31530,32 @@
+@@ -76154,61 +31582,32 @@
    return 0;
  }
  _ACEOF
@@ -82036,7 +82228,7 @@
  /* end confdefs.h.  */
  
  				#include <sys/types.h>
-@@ -76040,64 +31574,33 @@
+@@ -76227,64 +31626,33 @@
    return 0;
  }
  _ACEOF
@@ -82111,7 +82303,7 @@
  /* end confdefs.h.  */
  
  					#include <sys/types.h>
-@@ -76115,58 +31618,29 @@
+@@ -76302,58 +31670,29 @@
    return 0;
  }
  _ACEOF
@@ -82178,7 +82370,7 @@
  
  		fi
  		;;
-@@ -76178,31 +31652,27 @@
+@@ -76365,31 +31704,27 @@
  #################################################
  # check for AIO support
  
@@ -82216,7 +82408,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -76220,58 +31690,29 @@
+@@ -76407,58 +31742,29 @@
    return 0;
  }
  _ACEOF
@@ -82284,7 +82476,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -76289,59 +31730,30 @@
+@@ -76476,59 +31782,30 @@
    return 0;
  }
  _ACEOF
@@ -82353,7 +82545,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <aio.h>
-@@ -76353,55 +31765,26 @@
+@@ -76540,55 +31817,26 @@
    return 0;
  }
  _ACEOF
@@ -82417,7 +82609,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <aio.h>
-@@ -76413,716 +31796,317 @@
+@@ -76600,716 +31848,317 @@
    return 0;
  }
  _ACEOF
@@ -83272,7 +83464,7 @@
  $as_echo "no" >&6; }
  
  fi
-@@ -77139,30 +32123,26 @@
+@@ -77326,30 +32175,26 @@
  # check for sendfile support
  
  with_sendfile_support=yes
@@ -83309,7 +83501,7 @@
  /* end confdefs.h.  */
  #include <sys/sendfile.h>
  int
-@@ -77178,116 +32158,58 @@
+@@ -77365,53 +32210,24 @@
    return 0;
  }
  _ACEOF
@@ -83371,18 +83563,10 @@
  /* end confdefs.h.  */
  #include <sys/sendfile.h>
  int
- main ()
- {
- \
--int tofd, fromfd;
--off_t offset;
--size_t total;
--ssize_t nwritten = sendfile(tofd, fromfd, &offset, total);
--
--  ;
--  return 0;
--}
--_ACEOF
+@@ -77427,54 +32243,25 @@
+   return 0;
+ }
+ _ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -83404,15 +83588,6 @@
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
-+int tofd, fromfd;
-+off_t offset;
-+size_t total;
-+ssize_t nwritten = sendfile(tofd, fromfd, &offset, total);
-+
-+  ;
-+  return 0;
-+}
-+_ACEOF
 +if ac_fn_c_try_link "$LINENO"; then :
    samba_cv_HAVE_SENDFILE=yes
  else
@@ -83451,7 +83626,7 @@
  /* end confdefs.h.  */
  \
  #if defined(_FILE_OFFSET_BITS) && (_FILE_OFFSET_BITS == 64)
-@@ -77307,103 +32229,58 @@
+@@ -77494,103 +32281,58 @@
    return 0;
  }
  _ACEOF
@@ -83572,10 +83747,19 @@
  /* end confdefs.h.  */
  \
  #include <sys/types.h>
-@@ -77430,76 +32307,41 @@
-   return 0;
- }
- _ACEOF
+@@ -77608,85 +32350,50 @@
+ 	hdr.headers = &hdtrl;
+ 	hdr.hdr_cnt = 1;
+ 	hdr.trailers = NULL;
+-	hdr.trl_cnt = 0;
+-	hdtrl.iov_base = NULL;
+-	hdtrl.iov_len = 0;
+-	ret = sendfile(fromfd, tofd, offset, total, &hdr, &nwritten, 0);
+-
+-  ;
+-  return 0;
+-}
+-_ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -83597,6 +83781,15 @@
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
++	hdr.trl_cnt = 0;
++	hdtrl.iov_base = NULL;
++	hdtrl.iov_len = 0;
++	ret = sendfile(fromfd, tofd, offset, total, &hdr, &nwritten, 0);
++
++  ;
++  return 0;
++}
++_ACEOF
 +if ac_fn_c_try_link "$LINENO"; then :
    samba_cv_HAVE_SENDFILE=yes
  else
@@ -83661,7 +83854,7 @@
  /* end confdefs.h.  */
  \
  #include <sys/socket.h>
-@@ -77523,73 +32365,38 @@
+@@ -77710,73 +32417,38 @@
    return 0;
  }
  _ACEOF
@@ -83747,7 +83940,7 @@
  /* end confdefs.h.  */
  \
  #include <sys/socket.h>
-@@ -77613,77 +32420,41 @@
+@@ -77800,77 +32472,41 @@
    return 0;
  }
  _ACEOF
@@ -83837,7 +84030,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -77701,43 +32472,18 @@
+@@ -77888,43 +32524,18 @@
    return 0;
  }
  _ACEOF
@@ -83887,7 +84080,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_LIBSENDFILE 1
  _ACEOF
-@@ -77746,17 +32492,13 @@
+@@ -77933,17 +32544,13 @@
  
  fi
  
@@ -83908,7 +84101,7 @@
  /* end confdefs.h.  */
  \
  #include <sys/sendfile.h>
-@@ -77787,74 +32529,39 @@
+@@ -77974,74 +32581,39 @@
    return 0;
  }
  _ACEOF
@@ -83995,7 +84188,7 @@
  /* end confdefs.h.  */
  \
  #include <sys/sendfile.h>
-@@ -77885,75 +32592,40 @@
+@@ -78072,75 +32644,40 @@
    return 0;
  }
  _ACEOF
@@ -84083,7 +84276,7 @@
  /* end confdefs.h.  */
  \
  #include <sys/socket.h>
-@@ -77981,59 +32653,28 @@
+@@ -78168,59 +32705,28 @@
    return 0;
  }
  _ACEOF
@@ -84152,7 +84345,7 @@
  $as_echo "no" >&6; };
  	fi
  	;;
-@@ -78042,12 +32683,12 @@
+@@ -78229,12 +32735,12 @@
          esac
          ;;
    *)
@@ -84167,7 +84360,7 @@
  $as_echo "yes" >&6; }
  
  fi
-@@ -78056,17 +32697,13 @@
+@@ -78243,17 +32749,13 @@
  ############################################
  # See if we have the Linux readahead syscall.
  
@@ -84188,7 +84381,7 @@
  /* end confdefs.h.  */
  
  #if defined(HAVE_UNISTD_H)
-@@ -78081,62 +32718,31 @@
+@@ -78268,62 +32770,31 @@
    return 0;
  }
  _ACEOF
@@ -84260,7 +84453,7 @@
  /* end confdefs.h.  */
  #include <fcntl.h>
  int
-@@ -78147,41 +32753,18 @@
+@@ -78334,41 +32805,18 @@
    return 0;
  }
  _ACEOF
@@ -84306,7 +84499,7 @@
  
   fi
  
-@@ -78189,17 +32772,13 @@
+@@ -78376,17 +32824,13 @@
  ############################################
  # See if we have the posix_fadvise syscall.
  
@@ -84327,7 +84520,7 @@
  /* end confdefs.h.  */
  
  #if defined(HAVE_UNISTD_H)
-@@ -78214,47 +32793,20 @@
+@@ -78401,47 +32845,20 @@
    return 0;
  }
  _ACEOF
@@ -84381,7 +84574,7 @@
  
  fi
  
-@@ -78263,17 +32815,13 @@
+@@ -78450,17 +32867,13 @@
  
  case "$host_os" in
  *linux*)
@@ -84402,7 +84595,7 @@
  /* end confdefs.h.  */
  
  #if defined(HAVE_UNISTD_H)
-@@ -78288,40 +32836,15 @@
+@@ -78475,40 +32888,15 @@
    return 0;
  }
  _ACEOF
@@ -84448,7 +84641,7 @@
  $as_echo "$samba_cv_HAVE_LINUX_SPLICE" >&6; }
  ;;
  *)
-@@ -78331,24 +32854,18 @@
+@@ -78518,24 +32906,18 @@
  
  if test x"$samba_cv_HAVE_LINUX_SPLICE" = x"yes"; then
  
@@ -84477,7 +84670,7 @@
  /* end confdefs.h.  */
  #include <fcntl.h>
  int
-@@ -78359,41 +32876,18 @@
+@@ -78546,41 +32928,18 @@
    return 0;
  }
  _ACEOF
@@ -84523,7 +84716,7 @@
  
   fi
  
-@@ -78401,68 +32895,35 @@
+@@ -78588,68 +32947,35 @@
  ############################################
  # See if we have the a broken readlink syscall.
  
@@ -84602,7 +84795,7 @@
  
  fi
  
-@@ -78470,7 +32931,7 @@
+@@ -78657,7 +32983,7 @@
  # Check whether winbind is supported on this platform.  If so we need to
  # build and install client programs, sbin programs and shared libraries
  
@@ -84611,7 +84804,7 @@
  $as_echo_n "checking whether to build winbind... " >&6; }
  
  # Initially, the value of $host_os decides whether winbind is supported
-@@ -78482,7 +32943,7 @@
+@@ -78669,7 +32995,7 @@
  # We define this here so --with-winbind can override it.
  
  # Check whether --with-wbclient was given.
@@ -84620,7 +84813,7 @@
    withval=$with_wbclient;
    case "$withval" in
          no)
-@@ -78583,7 +33044,7 @@
+@@ -78770,7 +33096,7 @@
  
  
  # Check whether --with-winbind was given.
@@ -84629,7 +84822,7 @@
    withval=$with_winbind;
    case "$withval" in
  	yes)
-@@ -78614,18 +33075,14 @@
+@@ -78801,18 +33127,14 @@
  	WINBIND_WINS_NSS=""
  fi
  if test x"$HAVE_WBCLIENT" = x"yes"; then
@@ -84651,7 +84844,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -78643,57 +33100,28 @@
+@@ -78830,57 +33152,28 @@
    return 0;
  }
  _ACEOF
@@ -84718,7 +84911,7 @@
  
  	EXTRA_BIN_PROGS="$EXTRA_BIN_PROGS bin/wbinfo\$(EXEEXT)"
  else
-@@ -78724,12 +33152,10 @@
+@@ -78911,12 +33204,10 @@
  fi
  
  if test x"$HAVE_WINBIND" = x"yes"; then
@@ -84733,7 +84926,7 @@
  
  
  	EXTRA_BIN_PROGS="$EXTRA_BIN_PROGS bin/wbinfo\$(EXEEXT)"
-@@ -78740,22 +33166,18 @@
+@@ -78927,22 +33218,18 @@
  		UNINSTALL_PAM_MODULES="uninstallpammodules"
  	fi
  else
@@ -84760,7 +84953,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -78773,48 +33195,21 @@
+@@ -78960,48 +33247,21 @@
    return 0;
  }
  _ACEOF
@@ -84816,7 +85009,7 @@
  
  fi
  
-@@ -78831,533 +33226,52 @@
+@@ -79018,533 +33278,52 @@
  
  
  # Solaris 10 does have new member in nss_XbyY_key
@@ -85229,37 +85422,29 @@
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+ac_fn_c_check_member "$LINENO" "union nss_XbyY_key" "ipnode.af_family" "ac_cv_member_union_nss_XbyY_key_ipnode_af_family" "#include <nss_dbdefs.h>
-+"
-+if test "x$ac_cv_member_union_nss_XbyY_key_ipnode_af_family" = x""yes; then :
- 
+-
 -	ac_cv_member_struct_secmethod_table_method_attrlist=no
 -fi
-+$as_echo "#define HAVE_NSS_XBYY_KEY_IPNODE 1" >>confdefs.h
- 
+-
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- 
+-fi
+-
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_secmethod_table_method_attrlist" >&5
 -$as_echo "$ac_cv_member_struct_secmethod_table_method_attrlist" >&6; }
 -if test "x$ac_cv_member_struct_secmethod_table_method_attrlist" = x""yes; then
- 
+-
 -cat >>confdefs.h <<_ACEOF
 -#define HAVE_STRUCT_SECMETHOD_TABLE_METHOD_ATTRLIST 1
 -_ACEOF
-+# Solaris has some extra fields in struct passwd that need to be
-+# initialised otherwise nscd crashes.
-+
-+ac_fn_c_check_member "$LINENO" "struct passwd" "pw_comment" "ac_cv_member_struct_passwd_pw_comment" "#include <pwd.h>
+-
+-
+-fi
++ac_fn_c_check_member "$LINENO" "union nss_XbyY_key" "ipnode.af_family" "ac_cv_member_union_nss_XbyY_key_ipnode_af_family" "#include <nss_dbdefs.h>
 +"
-+if test "x$ac_cv_member_struct_passwd_pw_comment" = x""yes; then :
++if test "x$ac_cv_member_union_nss_XbyY_key_ipnode_af_family" = x""yes; then :
  
-+$as_echo "#define HAVE_PASSWD_PW_COMMENT 1" >>confdefs.h
- 
- fi
- 
 -{ $as_echo "$as_me:$LINENO: checking for struct secmethod_table.method_version" >&5
 -$as_echo_n "checking for struct secmethod_table.method_version... " >&6; }
 -if test "${ac_cv_member_struct_secmethod_table_method_version+set}" = set; then
@@ -85272,6 +85457,7 @@
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
 -#include <usersec.h>
++$as_echo "#define HAVE_NSS_XBYY_KEY_IPNODE 1" >>confdefs.h
  
 -int
 -main ()
@@ -85305,9 +85491,7 @@
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+ac_fn_c_check_member "$LINENO" "struct passwd" "pw_age" "ac_cv_member_struct_passwd_pw_age" "#include <pwd.h>
-+"
-+if test "x$ac_cv_member_struct_passwd_pw_age" = x""yes; then :
++fi
  
 -	cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
@@ -85316,7 +85500,6 @@
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
 -#include <usersec.h>
-+$as_echo "#define HAVE_PASSWD_PW_AGE 1" >>confdefs.h
  
 -int
 -main ()
@@ -85327,18 +85510,7 @@
 -  ;
 -  return 0;
 -}
-+fi
-+
-+
-+# AIX 4.3.x and 5.1 do not have as many members in
-+# struct secmethod_table as AIX 5.2
-+ac_fn_c_check_member "$LINENO" "struct secmethod_table" "method_attrlist" "ac_cv_member_struct_secmethod_table_method_attrlist" "#include <usersec.h>
-+"
-+if test "x$ac_cv_member_struct_secmethod_table_method_attrlist" = x""yes; then :
-+
-+cat >>confdefs.h <<_ACEOF
-+#define HAVE_STRUCT_SECMETHOD_TABLE_METHOD_ATTRLIST 1
- _ACEOF
+-_ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -85361,25 +85533,53 @@
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
++# Solaris has some extra fields in struct passwd that need to be
++# initialised otherwise nscd crashes.
++
++ac_fn_c_check_member "$LINENO" "struct passwd" "pw_comment" "ac_cv_member_struct_passwd_pw_comment" "#include <pwd.h>
++"
++if test "x$ac_cv_member_struct_passwd_pw_comment" = x""yes; then :
++
++$as_echo "#define HAVE_PASSWD_PW_COMMENT 1" >>confdefs.h
  
 -	ac_cv_member_struct_secmethod_table_method_version=no
--fi
+ fi
  
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++
++ac_fn_c_check_member "$LINENO" "struct passwd" "pw_age" "ac_cv_member_struct_passwd_pw_age" "#include <pwd.h>
++"
++if test "x$ac_cv_member_struct_passwd_pw_age" = x""yes; then :
++
++$as_echo "#define HAVE_PASSWD_PW_AGE 1" >>confdefs.h
++
  fi
  
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
--fi
++
++# AIX 4.3.x and 5.1 do not have as many members in
++# struct secmethod_table as AIX 5.2
++ac_fn_c_check_member "$LINENO" "struct secmethod_table" "method_attrlist" "ac_cv_member_struct_secmethod_table_method_attrlist" "#include <usersec.h>
++"
++if test "x$ac_cv_member_struct_secmethod_table_method_attrlist" = x""yes; then :
++
++cat >>confdefs.h <<_ACEOF
++#define HAVE_STRUCT_SECMETHOD_TABLE_METHOD_ATTRLIST 1
++_ACEOF
++
++
+ fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_secmethod_table_method_version" >&5
 -$as_echo "$ac_cv_member_struct_secmethod_table_method_version" >&6; }
 -if test "x$ac_cv_member_struct_secmethod_table_method_version" = x""yes; then
++
 +ac_fn_c_check_member "$LINENO" "struct secmethod_table" "method_version" "ac_cv_member_struct_secmethod_table_method_version" "#include <usersec.h>
 +"
 +if test "x$ac_cv_member_struct_secmethod_table_method_version" = x""yes; then :
  
  cat >>confdefs.h <<_ACEOF
  #define HAVE_STRUCT_SECMETHOD_TABLE_METHOD_VERSION 1
-@@ -79367,17 +33281,13 @@
+@@ -79554,17 +33333,13 @@
  fi
  
  
@@ -85400,7 +85600,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <sys/socket.h>
-@@ -79392,41 +33302,18 @@
+@@ -79579,41 +33354,18 @@
    return 0;
  }
  _ACEOF
@@ -85446,7 +85646,7 @@
  
  fi
  
-@@ -79436,7 +33323,7 @@
+@@ -79623,7 +33375,7 @@
  
  
  # Check whether --with-included-popt was given.
@@ -85455,7 +85655,7 @@
    withval=$with_included_popt;
    case "$withval" in
  	yes)
-@@ -79449,18 +33336,14 @@
+@@ -79636,18 +33388,14 @@
  fi
  
  if test x"$INCLUDED_POPT" != x"yes"; then
@@ -85477,7 +85677,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -79478,43 +33361,18 @@
+@@ -79665,43 +33413,18 @@
    return 0;
  }
  _ACEOF
@@ -85527,7 +85727,7 @@
    INCLUDED_POPT=no
  else
    INCLUDED_POPT=yes
-@@ -79522,16 +33380,16 @@
+@@ -79709,16 +33432,16 @@
  
  fi
  
@@ -85547,7 +85747,7 @@
  $as_echo "no" >&6; }
  	BUILD_POPT=""
      POPTLIBS="-lpopt"
-@@ -79544,7 +33402,7 @@
+@@ -79731,7 +33454,7 @@
  # Check if user wants DNS service discovery support
  
  # Check whether --enable-dnssd was given.
@@ -85556,7 +85756,7 @@
    enableval=$enable_dnssd;
  fi
  
-@@ -79553,151 +33411,12 @@
+@@ -79740,151 +33463,12 @@
  if test x"$enable_dnssd" = x"yes"; then
      have_dnssd_support=yes
  
@@ -85713,7 +85913,7 @@
  _ACEOF
  
  fi
-@@ -79710,102 +33429,12 @@
+@@ -79897,102 +33481,12 @@
  
      # On Darwin the DNSSD API is in libc, but on other platforms it's
      # probably in -ldns_sd
@@ -85821,7 +86021,7 @@
  _ACEOF
  
  fi
-@@ -79813,23 +33442,17 @@
+@@ -80000,23 +33494,17 @@
  
  
  
@@ -85848,7 +86048,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -79847,54 +33470,28 @@
+@@ -80034,54 +33522,28 @@
    return 0;
  }
  _ACEOF
@@ -85910,7 +86110,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_LIBDNS_SD 1
  _ACEOF
-@@ -79909,7 +33506,6 @@
+@@ -80096,7 +33558,6 @@
  
  
  fi
@@ -85918,7 +86118,7 @@
      if test x"$ac_cv_func_DNSServiceRegister" != x"yes" -a \
              x"$ac_cv_lib_ext_dns_sd_DNSServiceRegister" != x"yes"; then
  	have_dnssd_support=no
-@@ -79917,15 +33513,11 @@
+@@ -80104,15 +33565,11 @@
  
      if test x"$have_dnssd_support" = x"yes"; then
  
@@ -85936,7 +86136,7 @@
  	fi
      fi
  
-@@ -79935,7 +33527,7 @@
+@@ -80122,7 +33579,7 @@
  # Check if user wants avahi support
  
  # Check whether --enable-avahi was given.
@@ -85945,7 +86145,7 @@
    enableval=$enable_avahi;
  fi
  
-@@ -79943,151 +33535,12 @@
+@@ -80130,151 +33587,12 @@
  if test x"$enable_avahi" != x"no"; then
      have_avahi_support=yes
  
@@ -86102,7 +86302,7 @@
  _ACEOF
  
  fi
-@@ -80098,151 +33551,12 @@
+@@ -80285,151 +33603,12 @@
  	have_avahi_support=no
      fi
  
@@ -86259,7 +86459,7 @@
  _ACEOF
  
  fi
-@@ -80254,18 +33568,14 @@
+@@ -80441,18 +33620,14 @@
      fi
  
      save_LIBS="$LIBS"
@@ -86281,7 +86481,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -80283,58 +33593,29 @@
+@@ -80470,58 +33645,29 @@
    return 0;
  }
  _ACEOF
@@ -86349,7 +86549,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -80352,43 +33633,18 @@
+@@ -80539,43 +33685,18 @@
    return 0;
  }
  _ACEOF
@@ -86399,7 +86599,7 @@
    have_avahi_strerror=yes
  fi
  
-@@ -80403,17 +33659,13 @@
+@@ -80590,17 +33711,13 @@
          AVAHI_LIBS="-lavahi-client -lavahi-common"
  
  
@@ -86419,7 +86619,7 @@
  	fi
      fi
  fi
-@@ -80423,7 +33675,7 @@
+@@ -80610,7 +33727,7 @@
  
  
  # Check whether --with-included-iniparser was given.
@@ -86428,7 +86628,7 @@
    withval=$with_included_iniparser;
    case "$withval" in
  	yes)
-@@ -80436,18 +33688,14 @@
+@@ -80623,18 +33740,14 @@
  fi
  
  if test x"$INCLUDED_INIPARSER" != x"yes"; then
@@ -86450,7 +86650,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -80465,43 +33713,18 @@
+@@ -80652,43 +33765,18 @@
    return 0;
  }
  _ACEOF
@@ -86500,7 +86700,7 @@
    INCLUDED_INIPARSER=no
  else
    INCLUDED_INIPARSER=yes
-@@ -80509,260 +33732,40 @@
+@@ -80696,260 +33784,40 @@
  
  fi
  
@@ -86513,10 +86713,11 @@
  $as_echo "yes" >&6; }
      BUILD_INIPARSER='$(INIPARSER_OBJ)'
  	INIPARSERLIBS=""
--    FLAGS1="$FLAGS1 -I\$(srcdir)/iniparser/src"
--else
+     FLAGS1="$FLAGS1 -I\$(srcdir)/iniparser/src"
+ else
 -    { $as_echo "$as_me:$LINENO: result: no" >&5
--$as_echo "no" >&6; }
++    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+ $as_echo "no" >&6; }
 -	BUILD_INIPARSER=""
 -    INIPARSERLIBS="-liniparser"
 -fi
@@ -86661,22 +86862,17 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_header_compiler=yes
-+    FLAGS1="$FLAGS1 -I\$(srcdir)/iniparser/src"
- else
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	ac_header_compiler=no
-+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-+$as_echo "no" >&6; }
-+	BUILD_INIPARSER=""
-+    INIPARSERLIBS="-liniparser"
- fi
- 
+-fi
+-
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 -$as_echo "$ac_header_compiler" >&6; }
- 
+-
 -# Is the header present?
 -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
 -$as_echo_n "checking $ac_header presence... " >&6; }
@@ -86709,9 +86905,11 @@
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
- 
+-
 -  ac_header_preproc=no
--fi
++	BUILD_INIPARSER=""
++    INIPARSERLIBS="-liniparser"
+ fi
  
 -rm -f conftest.err conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
@@ -86759,6 +86957,9 @@
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
 -$as_echo "$ac_res" >&6; }
 +
++
++
++
 +# Checks for the vfs_fileid module
 +# Start
 +ac_fn_c_check_func "$LINENO" "getmntent" "ac_cv_func_getmntent"
@@ -86780,7 +86981,7 @@
  _ACEOF
  
  fi
-@@ -80770,20 +33773,16 @@
+@@ -80957,20 +33825,16 @@
  done
  
  
@@ -86805,7 +87006,7 @@
  /* end confdefs.h.  */
  
  		#include <sys/types.h>
-@@ -80795,46 +33794,19 @@
+@@ -80982,46 +33846,19 @@
  			return statfs (".", &fsd);
  		}
  _ACEOF
@@ -86857,7 +87058,7 @@
  $as_echo "$vfsfileid_cv_statfs" >&6; }
  
  if test x"$ac_cv_func_getmntent" = x"yes" -a \
-@@ -80869,7 +33841,7 @@
+@@ -81056,7 +33893,7 @@
  
  
  # Check whether --with-static-modules was given.
@@ -86866,7 +87067,7 @@
    withval=$with_static_modules;  if test $withval; then
  	for i in `echo $withval | sed -e 's/,/ /g'`
  	do
-@@ -80881,7 +33853,7 @@
+@@ -81068,7 +33905,7 @@
  
  
  # Check whether --with-shared-modules was given.
@@ -86875,7 +87076,7 @@
    withval=$with_shared_modules;  if test $withval; then
  	for i in `echo $withval | sed -e 's/,/ /g'`
  	do
-@@ -80892,7 +33864,7 @@
+@@ -81079,7 +33916,7 @@
  
  
  
@@ -86884,7 +87085,7 @@
  $as_echo_n "checking how to build pdb_ldap... " >&6; }
  	if test "$MODULE_pdb_ldap"; then
  		DEST=$MODULE_pdb_ldap
-@@ -80904,12 +33876,10 @@
+@@ -81091,12 +33928,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -86899,7 +87100,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules pdb_ldap"
-@@ -80920,16 +33890,16 @@
+@@ -81107,16 +33942,16 @@
  		PDB_STATIC="$PDB_STATIC passdb/pdb_ldap.o passdb/pdb_nds.o"
  
  		 PASSDB_LIBS="$PASSDB_LIBS $LDAP_LIBS"
@@ -86919,7 +87120,7 @@
  $as_echo_n "checking how to build pdb_smbpasswd... " >&6; }
  	if test "$MODULE_pdb_smbpasswd"; then
  		DEST=$MODULE_pdb_smbpasswd
-@@ -80941,12 +33911,10 @@
+@@ -81128,12 +33963,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -86934,7 +87135,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules pdb_smbpasswd"
-@@ -80957,16 +33925,16 @@
+@@ -81144,16 +33977,16 @@
  		PDB_STATIC="$PDB_STATIC passdb/pdb_smbpasswd.o"
  
  
@@ -86954,7 +87155,7 @@
  $as_echo_n "checking how to build pdb_tdbsam... " >&6; }
  	if test "$MODULE_pdb_tdbsam"; then
  		DEST=$MODULE_pdb_tdbsam
-@@ -80978,12 +33946,10 @@
+@@ -81165,12 +33998,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -86969,7 +87170,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules pdb_tdbsam"
-@@ -80994,16 +33960,16 @@
+@@ -81181,16 +34012,16 @@
  		PDB_STATIC="$PDB_STATIC passdb/pdb_tdb.o"
  
  
@@ -86989,7 +87190,7 @@
  $as_echo_n "checking how to build pdb_wbc_sam... " >&6; }
  	if test "$MODULE_pdb_wbc_sam"; then
  		DEST=$MODULE_pdb_wbc_sam
-@@ -81015,12 +33981,10 @@
+@@ -81202,12 +34033,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -87004,7 +87205,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules pdb_wbc_sam"
-@@ -81031,11 +33995,11 @@
+@@ -81218,11 +34047,11 @@
  		PDB_STATIC="$PDB_STATIC passdb/pdb_wbc_sam.o"
  
  
@@ -87018,7 +87219,7 @@
  $as_echo "not" >&6; }
  	fi
  
-@@ -81057,7 +34021,7 @@
+@@ -81244,7 +34073,7 @@
  
  
  
@@ -87027,7 +87228,7 @@
  $as_echo_n "checking how to build rpc_lsarpc... " >&6; }
  	if test "$MODULE_rpc_lsarpc"; then
  		DEST=$MODULE_rpc_lsarpc
-@@ -81069,12 +34033,10 @@
+@@ -81256,12 +34085,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -87042,7 +87243,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules rpc_lsarpc"
-@@ -81085,16 +34047,16 @@
+@@ -81272,16 +34099,16 @@
  		RPC_STATIC="$RPC_STATIC \$(RPC_LSA_OBJ)"
  
  
@@ -87062,7 +87263,7 @@
  $as_echo_n "checking how to build rpc_winreg... " >&6; }
  	if test "$MODULE_rpc_winreg"; then
  		DEST=$MODULE_rpc_winreg
-@@ -81106,12 +34068,10 @@
+@@ -81293,12 +34120,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -87077,7 +87278,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules rpc_winreg"
-@@ -81122,16 +34082,16 @@
+@@ -81309,16 +34134,16 @@
  		RPC_STATIC="$RPC_STATIC \$(RPC_REG_OBJ)"
  
  
@@ -87097,7 +87298,7 @@
  $as_echo_n "checking how to build rpc_initshutdown... " >&6; }
  	if test "$MODULE_rpc_initshutdown"; then
  		DEST=$MODULE_rpc_initshutdown
-@@ -81143,12 +34103,10 @@
+@@ -81330,12 +34155,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -87112,7 +87313,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules rpc_initshutdown"
-@@ -81159,16 +34117,16 @@
+@@ -81346,16 +34169,16 @@
  		RPC_STATIC="$RPC_STATIC \$(RPC_INITSHUTDOWN_OBJ)"
  
  
@@ -87132,7 +87333,7 @@
  $as_echo_n "checking how to build rpc_dssetup... " >&6; }
  	if test "$MODULE_rpc_dssetup"; then
  		DEST=$MODULE_rpc_dssetup
-@@ -81180,12 +34138,10 @@
+@@ -81367,12 +34190,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -87147,7 +87348,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules rpc_dssetup"
-@@ -81196,16 +34152,16 @@
+@@ -81383,16 +34204,16 @@
  		RPC_STATIC="$RPC_STATIC \$(RPC_DSSETUP_OBJ)"
  
  
@@ -87167,7 +87368,7 @@
  $as_echo_n "checking how to build rpc_wkssvc... " >&6; }
  	if test "$MODULE_rpc_wkssvc"; then
  		DEST=$MODULE_rpc_wkssvc
-@@ -81217,12 +34173,10 @@
+@@ -81404,12 +34225,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -87182,7 +87383,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules rpc_wkssvc"
-@@ -81233,16 +34187,16 @@
+@@ -81420,16 +34239,16 @@
  		RPC_STATIC="$RPC_STATIC \$(RPC_WKS_OBJ)"
  
  
@@ -87202,7 +87403,7 @@
  $as_echo_n "checking how to build rpc_svcctl... " >&6; }
  	if test "$MODULE_rpc_svcctl"; then
  		DEST=$MODULE_rpc_svcctl
-@@ -81254,12 +34208,10 @@
+@@ -81441,12 +34260,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -87217,7 +87418,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules rpc_svcctl"
-@@ -81270,16 +34222,16 @@
+@@ -81457,16 +34274,16 @@
  		RPC_STATIC="$RPC_STATIC \$(RPC_SVCCTL_OBJ)"
  
  
@@ -87237,7 +87438,7 @@
  $as_echo_n "checking how to build rpc_ntsvcs... " >&6; }
  	if test "$MODULE_rpc_ntsvcs"; then
  		DEST=$MODULE_rpc_ntsvcs
-@@ -81291,12 +34243,10 @@
+@@ -81478,12 +34295,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -87252,7 +87453,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules rpc_ntsvcs"
-@@ -81307,16 +34257,16 @@
+@@ -81494,16 +34309,16 @@
  		RPC_STATIC="$RPC_STATIC \$(RPC_NTSVCS_OBJ)"
  
  
@@ -87272,7 +87473,7 @@
  $as_echo_n "checking how to build rpc_netlogon... " >&6; }
  	if test "$MODULE_rpc_netlogon"; then
  		DEST=$MODULE_rpc_netlogon
-@@ -81328,12 +34278,10 @@
+@@ -81515,12 +34330,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -87287,7 +87488,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules rpc_netlogon"
-@@ -81344,16 +34292,16 @@
+@@ -81531,16 +34344,16 @@
  		RPC_STATIC="$RPC_STATIC \$(RPC_NETLOG_OBJ)"
  
  
@@ -87307,7 +87508,7 @@
  $as_echo_n "checking how to build rpc_netdfs... " >&6; }
  	if test "$MODULE_rpc_netdfs"; then
  		DEST=$MODULE_rpc_netdfs
-@@ -81365,12 +34313,10 @@
+@@ -81552,12 +34365,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -87322,7 +87523,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules rpc_netdfs"
-@@ -81381,16 +34327,16 @@
+@@ -81568,16 +34379,16 @@
  		RPC_STATIC="$RPC_STATIC \$(RPC_DFS_OBJ)"
  
  
@@ -87342,7 +87543,7 @@
  $as_echo_n "checking how to build rpc_srvsvc... " >&6; }
  	if test "$MODULE_rpc_srvsvc"; then
  		DEST=$MODULE_rpc_srvsvc
-@@ -81402,12 +34348,10 @@
+@@ -81589,12 +34400,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -87357,7 +87558,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules rpc_srvsvc"
-@@ -81418,16 +34362,16 @@
+@@ -81605,16 +34414,16 @@
  		RPC_STATIC="$RPC_STATIC \$(RPC_SVC_OBJ)"
  
  
@@ -87377,7 +87578,7 @@
  $as_echo_n "checking how to build rpc_spoolss... " >&6; }
  	if test "$MODULE_rpc_spoolss"; then
  		DEST=$MODULE_rpc_spoolss
-@@ -81439,12 +34383,10 @@
+@@ -81626,12 +34435,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -87392,7 +87593,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules rpc_spoolss"
-@@ -81455,16 +34397,16 @@
+@@ -81642,16 +34449,16 @@
  		RPC_STATIC="$RPC_STATIC \$(RPC_SPOOLSS_OBJ)"
  
  
@@ -87412,7 +87613,7 @@
  $as_echo_n "checking how to build rpc_eventlog... " >&6; }
  	if test "$MODULE_rpc_eventlog"; then
  		DEST=$MODULE_rpc_eventlog
-@@ -81476,12 +34418,10 @@
+@@ -81663,12 +34470,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -87427,7 +87628,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules rpc_eventlog"
-@@ -81492,16 +34432,16 @@
+@@ -81679,16 +34484,16 @@
  		RPC_STATIC="$RPC_STATIC \$(RPC_EVENTLOG_OBJ)"
  
  
@@ -87447,7 +87648,7 @@
  $as_echo_n "checking how to build rpc_samr... " >&6; }
  	if test "$MODULE_rpc_samr"; then
  		DEST=$MODULE_rpc_samr
-@@ -81513,12 +34453,10 @@
+@@ -81700,12 +34505,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -87462,7 +87663,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules rpc_samr"
-@@ -81529,16 +34467,16 @@
+@@ -81716,16 +34519,16 @@
  		RPC_STATIC="$RPC_STATIC \$(RPC_SAMR_OBJ)"
  
  
@@ -87482,7 +87683,7 @@
  $as_echo_n "checking how to build rpc_rpcecho... " >&6; }
  	if test "$MODULE_rpc_rpcecho"; then
  		DEST=$MODULE_rpc_rpcecho
-@@ -81550,12 +34488,10 @@
+@@ -81737,12 +34540,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -87497,7 +87698,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules rpc_rpcecho"
-@@ -81566,11 +34502,11 @@
+@@ -81753,11 +34554,11 @@
  		RPC_STATIC="$RPC_STATIC \$(RPC_ECHO_OBJ)"
  
  
@@ -87511,7 +87712,7 @@
  $as_echo "not" >&6; }
  	fi
  
-@@ -81591,7 +34527,7 @@
+@@ -81778,7 +34579,7 @@
  
  
  
@@ -87520,7 +87721,7 @@
  $as_echo_n "checking how to build idmap_ldap... " >&6; }
  	if test "$MODULE_idmap_ldap"; then
  		DEST=$MODULE_idmap_ldap
-@@ -81603,12 +34539,10 @@
+@@ -81790,12 +34591,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -87535,7 +87736,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules idmap_ldap"
-@@ -81619,16 +34553,16 @@
+@@ -81806,16 +34605,16 @@
  		IDMAP_STATIC="$IDMAP_STATIC winbindd/idmap_ldap.o"
  
  
@@ -87555,7 +87756,7 @@
  $as_echo_n "checking how to build idmap_tdb... " >&6; }
  	if test "$MODULE_idmap_tdb"; then
  		DEST=$MODULE_idmap_tdb
-@@ -81640,12 +34574,10 @@
+@@ -81827,12 +34626,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -87570,7 +87771,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules idmap_tdb"
-@@ -81656,16 +34588,16 @@
+@@ -81843,16 +34640,16 @@
  		IDMAP_STATIC="$IDMAP_STATIC winbindd/idmap_tdb.o"
  
  
@@ -87590,7 +87791,7 @@
  $as_echo_n "checking how to build idmap_tdb2... " >&6; }
  	if test "$MODULE_idmap_tdb2"; then
  		DEST=$MODULE_idmap_tdb2
-@@ -81677,12 +34609,10 @@
+@@ -81864,12 +34661,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -87605,7 +87806,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules idmap_tdb2"
-@@ -81693,16 +34623,16 @@
+@@ -81880,16 +34675,16 @@
  		IDMAP_STATIC="$IDMAP_STATIC winbindd/idmap_tdb2.o"
  
  
@@ -87625,7 +87826,7 @@
  $as_echo_n "checking how to build idmap_passdb... " >&6; }
  	if test "$MODULE_idmap_passdb"; then
  		DEST=$MODULE_idmap_passdb
-@@ -81714,12 +34644,10 @@
+@@ -81901,12 +34696,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -87640,7 +87841,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules idmap_passdb"
-@@ -81730,16 +34658,16 @@
+@@ -81917,16 +34710,16 @@
  		IDMAP_STATIC="$IDMAP_STATIC winbindd/idmap_passdb.o"
  
  
@@ -87660,7 +87861,7 @@
  $as_echo_n "checking how to build idmap_nss... " >&6; }
  	if test "$MODULE_idmap_nss"; then
  		DEST=$MODULE_idmap_nss
-@@ -81751,12 +34679,10 @@
+@@ -81938,12 +34731,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -87675,7 +87876,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules idmap_nss"
-@@ -81767,16 +34693,16 @@
+@@ -81954,16 +34745,16 @@
  		IDMAP_STATIC="$IDMAP_STATIC winbindd/idmap_nss.o"
  
  
@@ -87695,7 +87896,7 @@
  $as_echo_n "checking how to build idmap_rid... " >&6; }
  	if test "$MODULE_idmap_rid"; then
  		DEST=$MODULE_idmap_rid
-@@ -81788,12 +34714,10 @@
+@@ -81975,12 +34766,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -87710,7 +87911,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules idmap_rid"
-@@ -81804,16 +34728,16 @@
+@@ -81991,16 +34780,16 @@
  		IDMAP_STATIC="$IDMAP_STATIC winbindd/idmap_rid.o"
  
  
@@ -87730,7 +87931,7 @@
  $as_echo_n "checking how to build idmap_ad... " >&6; }
  	if test "$MODULE_idmap_ad"; then
  		DEST=$MODULE_idmap_ad
-@@ -81825,12 +34749,10 @@
+@@ -82012,12 +34801,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -87745,7 +87946,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules idmap_ad"
-@@ -81841,16 +34763,16 @@
+@@ -82028,16 +34815,16 @@
  		IDMAP_STATIC="$IDMAP_STATIC winbindd/idmap_ad.o"
  
  
@@ -87765,7 +87966,7 @@
  $as_echo_n "checking how to build idmap_hash... " >&6; }
  	if test "$MODULE_idmap_hash"; then
  		DEST=$MODULE_idmap_hash
-@@ -81862,12 +34784,10 @@
+@@ -82049,12 +34836,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -87780,7 +87981,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules idmap_hash"
-@@ -81878,16 +34798,16 @@
+@@ -82065,16 +34850,16 @@
  		IDMAP_STATIC="$IDMAP_STATIC \$(IDMAP_HASH_OBJ)"
  
  
@@ -87800,7 +88001,7 @@
  $as_echo_n "checking how to build idmap_adex... " >&6; }
  	if test "$MODULE_idmap_adex"; then
  		DEST=$MODULE_idmap_adex
-@@ -81899,12 +34819,10 @@
+@@ -82086,12 +34871,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -87815,7 +88016,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules idmap_adex"
-@@ -81915,11 +34833,11 @@
+@@ -82102,11 +34885,11 @@
  		IDMAP_STATIC="$IDMAP_STATIC \$(IDMAP_ADEX_OBJ)"
  
  
@@ -87829,7 +88030,7 @@
  $as_echo "not" >&6; }
  	fi
  
-@@ -81940,7 +34858,7 @@
+@@ -82127,7 +34910,7 @@
  
  
  
@@ -87838,7 +88039,7 @@
  $as_echo_n "checking how to build nss_info_template... " >&6; }
  	if test "$MODULE_nss_info_template"; then
  		DEST=$MODULE_nss_info_template
-@@ -81952,12 +34870,10 @@
+@@ -82139,12 +34922,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -87853,7 +88054,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules nss_info_template"
-@@ -81968,11 +34884,11 @@
+@@ -82155,11 +34936,11 @@
  		NSS_INFO_STATIC="$NSS_INFO_STATIC winbindd/nss_info_template.o"
  
  
@@ -87867,7 +88068,7 @@
  $as_echo "not" >&6; }
  	fi
  
-@@ -81993,7 +34909,7 @@
+@@ -82180,7 +34961,7 @@
  
  
  
@@ -87876,7 +88077,7 @@
  $as_echo_n "checking how to build charset_weird... " >&6; }
  	if test "$MODULE_charset_weird"; then
  		DEST=$MODULE_charset_weird
-@@ -82005,12 +34921,10 @@
+@@ -82192,12 +34973,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -87891,7 +88092,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules charset_weird"
-@@ -82021,16 +34935,16 @@
+@@ -82208,16 +34987,16 @@
  		CHARSET_STATIC="$CHARSET_STATIC modules/weird.o"
  
  
@@ -87911,7 +88112,7 @@
  $as_echo_n "checking how to build charset_CP850... " >&6; }
  	if test "$MODULE_charset_CP850"; then
  		DEST=$MODULE_charset_CP850
-@@ -82042,12 +34956,10 @@
+@@ -82229,12 +35008,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -87926,7 +88127,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules charset_CP850"
-@@ -82058,16 +34970,16 @@
+@@ -82245,16 +35022,16 @@
  		CHARSET_STATIC="$CHARSET_STATIC modules/CP850.o"
  
  
@@ -87946,7 +88147,7 @@
  $as_echo_n "checking how to build charset_CP437... " >&6; }
  	if test "$MODULE_charset_CP437"; then
  		DEST=$MODULE_charset_CP437
-@@ -82079,12 +34991,10 @@
+@@ -82266,12 +35043,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -87961,7 +88162,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules charset_CP437"
-@@ -82095,16 +35005,16 @@
+@@ -82282,16 +35057,16 @@
  		CHARSET_STATIC="$CHARSET_STATIC modules/CP437.o"
  
  
@@ -87981,7 +88182,7 @@
  $as_echo_n "checking how to build charset_macosxfs... " >&6; }
  	if test "$MODULE_charset_macosxfs"; then
  		DEST=$MODULE_charset_macosxfs
-@@ -82116,12 +35026,10 @@
+@@ -82303,12 +35078,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -87996,7 +88197,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules charset_macosxfs"
-@@ -82132,11 +35040,11 @@
+@@ -82319,11 +35092,11 @@
  		CHARSET_STATIC="$CHARSET_STATIC modules/charset_macosxfs.o"
  
  
@@ -88010,7 +88211,7 @@
  $as_echo "not" >&6; }
  	fi
  
-@@ -82157,7 +35065,7 @@
+@@ -82344,7 +35117,7 @@
  
  
  
@@ -88019,7 +88220,7 @@
  $as_echo_n "checking how to build auth_sam... " >&6; }
  	if test "$MODULE_auth_sam"; then
  		DEST=$MODULE_auth_sam
-@@ -82169,12 +35077,10 @@
+@@ -82356,12 +35129,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -88034,7 +88235,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules auth_sam"
-@@ -82185,16 +35091,16 @@
+@@ -82372,16 +35143,16 @@
  		AUTH_STATIC="$AUTH_STATIC \$(AUTH_SAM_OBJ)"
  
  
@@ -88054,7 +88255,7 @@
  $as_echo_n "checking how to build auth_unix... " >&6; }
  	if test "$MODULE_auth_unix"; then
  		DEST=$MODULE_auth_unix
-@@ -82206,12 +35112,10 @@
+@@ -82393,12 +35164,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -88069,7 +88270,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules auth_unix"
-@@ -82222,16 +35126,16 @@
+@@ -82409,16 +35178,16 @@
  		AUTH_STATIC="$AUTH_STATIC \$(AUTH_UNIX_OBJ)"
  
  
@@ -88089,7 +88290,7 @@
  $as_echo_n "checking how to build auth_winbind... " >&6; }
  	if test "$MODULE_auth_winbind"; then
  		DEST=$MODULE_auth_winbind
-@@ -82243,12 +35147,10 @@
+@@ -82430,12 +35199,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -88104,7 +88305,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules auth_winbind"
-@@ -82259,16 +35161,16 @@
+@@ -82446,16 +35213,16 @@
  		AUTH_STATIC="$AUTH_STATIC \$(AUTH_WINBIND_OBJ)"
  
  
@@ -88124,7 +88325,7 @@
  $as_echo_n "checking how to build auth_wbc... " >&6; }
  	if test "$MODULE_auth_wbc"; then
  		DEST=$MODULE_auth_wbc
-@@ -82280,12 +35182,10 @@
+@@ -82467,12 +35234,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -88139,7 +88340,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules auth_wbc"
-@@ -82296,16 +35196,16 @@
+@@ -82483,16 +35248,16 @@
  		AUTH_STATIC="$AUTH_STATIC \$(AUTH_WBC_OBJ)"
  
  
@@ -88159,7 +88360,7 @@
  $as_echo_n "checking how to build auth_server... " >&6; }
  	if test "$MODULE_auth_server"; then
  		DEST=$MODULE_auth_server
-@@ -82317,12 +35217,10 @@
+@@ -82504,12 +35269,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -88174,7 +88375,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules auth_server"
-@@ -82333,16 +35231,16 @@
+@@ -82520,16 +35283,16 @@
  		AUTH_STATIC="$AUTH_STATIC \$(AUTH_SERVER_OBJ)"
  
  
@@ -88194,7 +88395,7 @@
  $as_echo_n "checking how to build auth_domain... " >&6; }
  	if test "$MODULE_auth_domain"; then
  		DEST=$MODULE_auth_domain
-@@ -82354,12 +35252,10 @@
+@@ -82541,12 +35304,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -88209,7 +88410,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules auth_domain"
-@@ -82370,16 +35266,16 @@
+@@ -82557,16 +35318,16 @@
  		AUTH_STATIC="$AUTH_STATIC \$(AUTH_DOMAIN_OBJ)"
  
  
@@ -88229,7 +88430,7 @@
  $as_echo_n "checking how to build auth_builtin... " >&6; }
  	if test "$MODULE_auth_builtin"; then
  		DEST=$MODULE_auth_builtin
-@@ -82391,12 +35287,10 @@
+@@ -82578,12 +35339,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -88244,7 +88445,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules auth_builtin"
-@@ -82407,16 +35301,16 @@
+@@ -82594,16 +35353,16 @@
  		AUTH_STATIC="$AUTH_STATIC \$(AUTH_BUILTIN_OBJ)"
  
  
@@ -88264,7 +88465,7 @@
  $as_echo_n "checking how to build auth_script... " >&6; }
  	if test "$MODULE_auth_script"; then
  		DEST=$MODULE_auth_script
-@@ -82428,12 +35322,10 @@
+@@ -82615,12 +35374,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -88279,7 +88480,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules auth_script"
-@@ -82444,16 +35336,16 @@
+@@ -82631,16 +35388,16 @@
  		AUTH_STATIC="$AUTH_STATIC \$(AUTH_SCRIPT_OBJ)"
  
  
@@ -88299,7 +88500,7 @@
  $as_echo_n "checking how to build auth_netlogond... " >&6; }
  	if test "$MODULE_auth_netlogond"; then
  		DEST=$MODULE_auth_netlogond
-@@ -82465,12 +35357,10 @@
+@@ -82652,12 +35409,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -88314,7 +88515,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules auth_netlogond"
-@@ -82481,11 +35371,11 @@
+@@ -82668,11 +35423,11 @@
  		AUTH_STATIC="$AUTH_STATIC \$(AUTH_NETLOGOND_OBJ)"
  
  
@@ -88328,7 +88529,7 @@
  $as_echo "not" >&6; }
  	fi
  
-@@ -82506,7 +35396,7 @@
+@@ -82693,7 +35448,7 @@
  
  
  
@@ -88337,7 +88538,7 @@
  $as_echo_n "checking how to build vfs_default... " >&6; }
  	if test "$MODULE_vfs_default"; then
  		DEST=$MODULE_vfs_default
-@@ -82518,12 +35408,10 @@
+@@ -82705,12 +35460,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -88352,7 +88553,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_default"
-@@ -82534,16 +35422,16 @@
+@@ -82721,16 +35474,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_DEFAULT_OBJ)"
  
  
@@ -88372,7 +88573,7 @@
  $as_echo_n "checking how to build vfs_recycle... " >&6; }
  	if test "$MODULE_vfs_recycle"; then
  		DEST=$MODULE_vfs_recycle
-@@ -82555,12 +35443,10 @@
+@@ -82742,12 +35495,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -88387,7 +88588,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_recycle"
-@@ -82571,16 +35457,16 @@
+@@ -82758,16 +35509,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_RECYCLE_OBJ)"
  
  
@@ -88407,7 +88608,7 @@
  $as_echo_n "checking how to build vfs_audit... " >&6; }
  	if test "$MODULE_vfs_audit"; then
  		DEST=$MODULE_vfs_audit
-@@ -82592,12 +35478,10 @@
+@@ -82779,12 +35530,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -88422,7 +88623,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_audit"
-@@ -82608,16 +35492,16 @@
+@@ -82795,16 +35544,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_AUDIT_OBJ)"
  
  
@@ -88442,7 +88643,7 @@
  $as_echo_n "checking how to build vfs_extd_audit... " >&6; }
  	if test "$MODULE_vfs_extd_audit"; then
  		DEST=$MODULE_vfs_extd_audit
-@@ -82629,12 +35513,10 @@
+@@ -82816,12 +35565,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -88457,7 +88658,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_extd_audit"
-@@ -82645,16 +35527,16 @@
+@@ -82832,16 +35579,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_EXTD_AUDIT_OBJ)"
  
  
@@ -88477,7 +88678,7 @@
  $as_echo_n "checking how to build vfs_full_audit... " >&6; }
  	if test "$MODULE_vfs_full_audit"; then
  		DEST=$MODULE_vfs_full_audit
-@@ -82666,12 +35548,10 @@
+@@ -82853,12 +35600,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -88492,7 +88693,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_full_audit"
-@@ -82682,16 +35562,16 @@
+@@ -82869,16 +35614,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_FULL_AUDIT_OBJ)"
  
  
@@ -88512,7 +88713,7 @@
  $as_echo_n "checking how to build vfs_netatalk... " >&6; }
  	if test "$MODULE_vfs_netatalk"; then
  		DEST=$MODULE_vfs_netatalk
-@@ -82703,12 +35583,10 @@
+@@ -82890,12 +35635,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -88527,7 +88728,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_netatalk"
-@@ -82719,16 +35597,16 @@
+@@ -82906,16 +35649,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_NETATALK_OBJ)"
  
  
@@ -88547,7 +88748,7 @@
  $as_echo_n "checking how to build vfs_fake_perms... " >&6; }
  	if test "$MODULE_vfs_fake_perms"; then
  		DEST=$MODULE_vfs_fake_perms
-@@ -82740,12 +35618,10 @@
+@@ -82927,12 +35670,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -88562,7 +88763,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_fake_perms"
-@@ -82756,16 +35632,16 @@
+@@ -82943,16 +35684,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_FAKE_PERMS_OBJ)"
  
  
@@ -88582,7 +88783,7 @@
  $as_echo_n "checking how to build vfs_default_quota... " >&6; }
  	if test "$MODULE_vfs_default_quota"; then
  		DEST=$MODULE_vfs_default_quota
-@@ -82777,12 +35653,10 @@
+@@ -82964,12 +35705,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -88597,7 +88798,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_default_quota"
-@@ -82793,16 +35667,16 @@
+@@ -82980,16 +35719,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_DEFAULT_QUOTA_OBJ)"
  
  
@@ -88617,7 +88818,7 @@
  $as_echo_n "checking how to build vfs_readonly... " >&6; }
  	if test "$MODULE_vfs_readonly"; then
  		DEST=$MODULE_vfs_readonly
-@@ -82814,12 +35688,10 @@
+@@ -83001,12 +35740,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -88632,7 +88833,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_readonly"
-@@ -82830,16 +35702,16 @@
+@@ -83017,16 +35754,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_READONLY_OBJ)"
  
  
@@ -88652,7 +88853,7 @@
  $as_echo_n "checking how to build vfs_cap... " >&6; }
  	if test "$MODULE_vfs_cap"; then
  		DEST=$MODULE_vfs_cap
-@@ -82851,12 +35723,10 @@
+@@ -83038,12 +35775,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -88667,7 +88868,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_cap"
-@@ -82867,16 +35737,16 @@
+@@ -83054,16 +35789,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_CAP_OBJ)"
  
  
@@ -88687,7 +88888,7 @@
  $as_echo_n "checking how to build vfs_expand_msdfs... " >&6; }
  	if test "$MODULE_vfs_expand_msdfs"; then
  		DEST=$MODULE_vfs_expand_msdfs
-@@ -82888,12 +35758,10 @@
+@@ -83075,12 +35810,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -88702,7 +88903,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_expand_msdfs"
-@@ -82904,16 +35772,16 @@
+@@ -83091,16 +35824,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_EXPAND_MSDFS_OBJ)"
  
  
@@ -88722,7 +88923,7 @@
  $as_echo_n "checking how to build vfs_shadow_copy... " >&6; }
  	if test "$MODULE_vfs_shadow_copy"; then
  		DEST=$MODULE_vfs_shadow_copy
-@@ -82925,12 +35793,10 @@
+@@ -83112,12 +35845,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -88737,7 +88938,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_shadow_copy"
-@@ -82941,16 +35807,16 @@
+@@ -83128,16 +35859,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_SHADOW_COPY_OBJ)"
  
  
@@ -88757,7 +88958,7 @@
  $as_echo_n "checking how to build vfs_shadow_copy2... " >&6; }
  	if test "$MODULE_vfs_shadow_copy2"; then
  		DEST=$MODULE_vfs_shadow_copy2
-@@ -82962,12 +35828,10 @@
+@@ -83149,12 +35880,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -88772,7 +88973,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_shadow_copy2"
-@@ -82978,16 +35842,16 @@
+@@ -83165,16 +35894,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_SHADOW_COPY2_OBJ)"
  
  
@@ -88792,7 +88993,7 @@
  $as_echo_n "checking how to build vfs_afsacl... " >&6; }
  	if test "$MODULE_vfs_afsacl"; then
  		DEST=$MODULE_vfs_afsacl
-@@ -82999,12 +35863,10 @@
+@@ -83186,12 +35915,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -88807,7 +89008,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_afsacl"
-@@ -83015,16 +35877,16 @@
+@@ -83202,16 +35929,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_AFSACL_OBJ)"
  
  
@@ -88827,7 +89028,7 @@
  $as_echo_n "checking how to build vfs_xattr_tdb... " >&6; }
  	if test "$MODULE_vfs_xattr_tdb"; then
  		DEST=$MODULE_vfs_xattr_tdb
-@@ -83036,12 +35898,10 @@
+@@ -83223,12 +35950,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -88842,7 +89043,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_xattr_tdb"
-@@ -83052,16 +35912,16 @@
+@@ -83239,16 +35964,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_XATTR_TDB_OBJ)"
  
  
@@ -88862,7 +89063,7 @@
  $as_echo_n "checking how to build vfs_posixacl... " >&6; }
  	if test "$MODULE_vfs_posixacl"; then
  		DEST=$MODULE_vfs_posixacl
-@@ -83073,12 +35933,10 @@
+@@ -83260,12 +35985,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -88877,7 +89078,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_posixacl"
-@@ -83089,16 +35947,16 @@
+@@ -83276,16 +35999,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_POSIXACL_OBJ)"
  
  
@@ -88897,7 +89098,7 @@
  $as_echo_n "checking how to build vfs_aixacl... " >&6; }
  	if test "$MODULE_vfs_aixacl"; then
  		DEST=$MODULE_vfs_aixacl
-@@ -83110,12 +35968,10 @@
+@@ -83297,12 +36020,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -88912,7 +89113,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_aixacl"
-@@ -83126,16 +35982,16 @@
+@@ -83313,16 +36034,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_AIXACL_OBJ)"
  
  
@@ -88932,7 +89133,7 @@
  $as_echo_n "checking how to build vfs_aixacl2... " >&6; }
  	if test "$MODULE_vfs_aixacl2"; then
  		DEST=$MODULE_vfs_aixacl2
-@@ -83147,12 +36003,10 @@
+@@ -83334,12 +36055,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -88947,7 +89148,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_aixacl2"
-@@ -83163,16 +36017,16 @@
+@@ -83350,16 +36069,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_AIXACL2_OBJ)"
  
  
@@ -88967,7 +89168,7 @@
  $as_echo_n "checking how to build vfs_solarisacl... " >&6; }
  	if test "$MODULE_vfs_solarisacl"; then
  		DEST=$MODULE_vfs_solarisacl
-@@ -83184,12 +36038,10 @@
+@@ -83371,12 +36090,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -88982,7 +89183,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_solarisacl"
-@@ -83200,16 +36052,16 @@
+@@ -83387,16 +36104,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_SOLARISACL_OBJ)"
  
  
@@ -89002,7 +89203,7 @@
  $as_echo_n "checking how to build vfs_irixacl... " >&6; }
  	if test "$MODULE_vfs_irixacl"; then
  		DEST=$MODULE_vfs_irixacl
-@@ -83221,12 +36073,10 @@
+@@ -83408,12 +36125,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -89017,7 +89218,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_irixacl"
-@@ -83237,16 +36087,16 @@
+@@ -83424,16 +36139,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_IRIXACL_OBJ)"
  
  
@@ -89037,7 +89238,7 @@
  $as_echo_n "checking how to build vfs_hpuxacl... " >&6; }
  	if test "$MODULE_vfs_hpuxacl"; then
  		DEST=$MODULE_vfs_hpuxacl
-@@ -83258,12 +36108,10 @@
+@@ -83445,12 +36160,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -89052,7 +89253,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_hpuxacl"
-@@ -83274,16 +36122,16 @@
+@@ -83461,16 +36174,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_HPUXACL_OBJ)"
  
  
@@ -89072,7 +89273,7 @@
  $as_echo_n "checking how to build vfs_tru64acl... " >&6; }
  	if test "$MODULE_vfs_tru64acl"; then
  		DEST=$MODULE_vfs_tru64acl
-@@ -83295,12 +36143,10 @@
+@@ -83482,12 +36195,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -89087,7 +89288,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_tru64acl"
-@@ -83311,16 +36157,16 @@
+@@ -83498,16 +36209,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_TRU64ACL_OBJ)"
  
  
@@ -89107,7 +89308,7 @@
  $as_echo_n "checking how to build vfs_catia... " >&6; }
  	if test "$MODULE_vfs_catia"; then
  		DEST=$MODULE_vfs_catia
-@@ -83332,12 +36178,10 @@
+@@ -83519,12 +36230,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -89122,7 +89323,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_catia"
-@@ -83348,16 +36192,16 @@
+@@ -83535,16 +36244,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_CATIA_OBJ)"
  
  
@@ -89142,7 +89343,7 @@
  $as_echo_n "checking how to build vfs_streams_xattr... " >&6; }
  	if test "$MODULE_vfs_streams_xattr"; then
  		DEST=$MODULE_vfs_streams_xattr
-@@ -83369,12 +36213,10 @@
+@@ -83556,12 +36265,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -89157,7 +89358,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_streams_xattr"
-@@ -83385,16 +36227,16 @@
+@@ -83572,16 +36279,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_STREAMS_XATTR_OBJ)"
  
  
@@ -89177,7 +89378,7 @@
  $as_echo_n "checking how to build vfs_streams_depot... " >&6; }
  	if test "$MODULE_vfs_streams_depot"; then
  		DEST=$MODULE_vfs_streams_depot
-@@ -83406,12 +36248,10 @@
+@@ -83593,12 +36300,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -89192,7 +89393,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_streams_depot"
-@@ -83422,16 +36262,16 @@
+@@ -83609,16 +36314,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_STREAMS_DEPOT_OBJ)"
  
  
@@ -89212,7 +89413,7 @@
  $as_echo_n "checking how to build vfs_cacheprime... " >&6; }
  	if test "$MODULE_vfs_cacheprime"; then
  		DEST=$MODULE_vfs_cacheprime
-@@ -83443,12 +36283,10 @@
+@@ -83630,12 +36335,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -89227,7 +89428,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_cacheprime"
-@@ -83459,16 +36297,16 @@
+@@ -83646,16 +36349,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_CACHEPRIME_OBJ)"
  
  
@@ -89247,7 +89448,7 @@
  $as_echo_n "checking how to build vfs_prealloc... " >&6; }
  	if test "$MODULE_vfs_prealloc"; then
  		DEST=$MODULE_vfs_prealloc
-@@ -83480,12 +36318,10 @@
+@@ -83667,12 +36370,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -89262,7 +89463,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_prealloc"
-@@ -83496,16 +36332,16 @@
+@@ -83683,16 +36384,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_PREALLOC_OBJ)"
  
  
@@ -89282,7 +89483,7 @@
  $as_echo_n "checking how to build vfs_commit... " >&6; }
  	if test "$MODULE_vfs_commit"; then
  		DEST=$MODULE_vfs_commit
-@@ -83517,12 +36353,10 @@
+@@ -83704,12 +36405,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -89297,7 +89498,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_commit"
-@@ -83533,16 +36367,16 @@
+@@ -83720,16 +36419,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_COMMIT_OBJ)"
  
  
@@ -89317,7 +89518,7 @@
  $as_echo_n "checking how to build vfs_gpfs... " >&6; }
  	if test "$MODULE_vfs_gpfs"; then
  		DEST=$MODULE_vfs_gpfs
-@@ -83554,12 +36388,10 @@
+@@ -83741,12 +36440,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -89332,7 +89533,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_gpfs"
-@@ -83570,16 +36402,16 @@
+@@ -83757,16 +36454,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_GPFS_OBJ)"
  
  
@@ -89352,7 +89553,7 @@
  $as_echo_n "checking how to build vfs_readahead... " >&6; }
  	if test "$MODULE_vfs_readahead"; then
  		DEST=$MODULE_vfs_readahead
-@@ -83591,12 +36423,10 @@
+@@ -83778,12 +36475,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -89367,7 +89568,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_readahead"
-@@ -83607,16 +36437,16 @@
+@@ -83794,16 +36489,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_READAHEAD_OBJ)"
  
  
@@ -89387,7 +89588,7 @@
  $as_echo_n "checking how to build vfs_tsmsm... " >&6; }
  	if test "$MODULE_vfs_tsmsm"; then
  		DEST=$MODULE_vfs_tsmsm
-@@ -83628,12 +36458,10 @@
+@@ -83815,12 +36510,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -89402,7 +89603,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_tsmsm"
-@@ -83644,16 +36472,16 @@
+@@ -83831,16 +36524,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_TSMSM_OBJ)"
  
  
@@ -89422,7 +89623,7 @@
  $as_echo_n "checking how to build vfs_fileid... " >&6; }
  	if test "$MODULE_vfs_fileid"; then
  		DEST=$MODULE_vfs_fileid
-@@ -83665,12 +36493,10 @@
+@@ -83852,12 +36545,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -89437,7 +89638,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_fileid"
-@@ -83681,16 +36507,16 @@
+@@ -83868,16 +36559,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_FILEID_OBJ)"
  
  
@@ -89457,7 +89658,7 @@
  $as_echo_n "checking how to build vfs_aio_fork... " >&6; }
  	if test "$MODULE_vfs_aio_fork"; then
  		DEST=$MODULE_vfs_aio_fork
-@@ -83702,12 +36528,10 @@
+@@ -83889,12 +36580,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -89472,7 +89673,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_aio_fork"
-@@ -83718,16 +36542,16 @@
+@@ -83905,16 +36594,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_AIO_FORK_OBJ)"
  
  
@@ -89492,7 +89693,7 @@
  $as_echo_n "checking how to build vfs_preopen... " >&6; }
  	if test "$MODULE_vfs_preopen"; then
  		DEST=$MODULE_vfs_preopen
-@@ -83739,12 +36563,10 @@
+@@ -83926,12 +36615,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -89507,7 +89708,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_preopen"
-@@ -83755,16 +36577,16 @@
+@@ -83942,16 +36629,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_PREOPEN_OBJ)"
  
  
@@ -89527,7 +89728,7 @@
  $as_echo_n "checking how to build vfs_syncops... " >&6; }
  	if test "$MODULE_vfs_syncops"; then
  		DEST=$MODULE_vfs_syncops
-@@ -83776,12 +36598,10 @@
+@@ -83963,12 +36650,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -89542,7 +89743,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_syncops"
-@@ -83792,16 +36612,16 @@
+@@ -83979,16 +36664,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_SYNCOPS_OBJ)"
  
  
@@ -89562,7 +89763,7 @@
  $as_echo_n "checking how to build vfs_zfsacl... " >&6; }
  	if test "$MODULE_vfs_zfsacl"; then
  		DEST=$MODULE_vfs_zfsacl
-@@ -83813,12 +36633,10 @@
+@@ -84000,12 +36685,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -89577,7 +89778,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_zfsacl"
-@@ -83829,16 +36647,16 @@
+@@ -84016,16 +36699,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_ZFSACL_OBJ)"
  
  
@@ -89597,7 +89798,7 @@
  $as_echo_n "checking how to build vfs_notify_fam... " >&6; }
  	if test "$MODULE_vfs_notify_fam"; then
  		DEST=$MODULE_vfs_notify_fam
-@@ -83850,12 +36668,10 @@
+@@ -84037,12 +36720,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -89612,7 +89813,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_notify_fam"
-@@ -83866,16 +36682,16 @@
+@@ -84053,16 +36734,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_NOTIFY_FAM_OBJ)"
  
  
@@ -89632,7 +89833,7 @@
  $as_echo_n "checking how to build vfs_acl_xattr... " >&6; }
  	if test "$MODULE_vfs_acl_xattr"; then
  		DEST=$MODULE_vfs_acl_xattr
-@@ -83887,12 +36703,10 @@
+@@ -84074,12 +36755,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -89647,7 +89848,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_acl_xattr"
-@@ -83903,16 +36717,16 @@
+@@ -84090,16 +36769,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_ACL_XATTR_OBJ)"
  
  
@@ -89667,7 +89868,7 @@
  $as_echo_n "checking how to build vfs_acl_tdb... " >&6; }
  	if test "$MODULE_vfs_acl_tdb"; then
  		DEST=$MODULE_vfs_acl_tdb
-@@ -83924,12 +36738,10 @@
+@@ -84111,12 +36790,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -89682,7 +89883,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_acl_tdb"
-@@ -83940,16 +36752,16 @@
+@@ -84127,16 +36804,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_ACL_TDB_OBJ)"
  
  
@@ -89702,7 +89903,7 @@
  $as_echo_n "checking how to build vfs_smb_traffic_analyzer... " >&6; }
  	if test "$MODULE_vfs_smb_traffic_analyzer"; then
  		DEST=$MODULE_vfs_smb_traffic_analyzer
-@@ -83961,12 +36773,10 @@
+@@ -84148,12 +36825,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -89717,7 +89918,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_smb_traffic_analyzer"
-@@ -83977,16 +36787,16 @@
+@@ -84164,16 +36839,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_SMB_TRAFFIC_ANALYZER_OBJ)"
  
  
@@ -89737,7 +89938,7 @@
  $as_echo_n "checking how to build vfs_onefs... " >&6; }
  	if test "$MODULE_vfs_onefs"; then
  		DEST=$MODULE_vfs_onefs
-@@ -83998,12 +36808,10 @@
+@@ -84185,12 +36860,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -89752,7 +89953,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_onefs"
-@@ -84014,16 +36822,16 @@
+@@ -84201,16 +36874,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_ONEFS)"
  
  
@@ -89772,7 +89973,7 @@
  $as_echo_n "checking how to build vfs_onefs_shadow_copy... " >&6; }
  	if test "$MODULE_vfs_onefs_shadow_copy"; then
  		DEST=$MODULE_vfs_onefs_shadow_copy
-@@ -84035,12 +36843,10 @@
+@@ -84222,12 +36895,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -89787,7 +89988,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_onefs_shadow_copy"
-@@ -84051,16 +36857,16 @@
+@@ -84238,16 +36909,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_ONEFS_SHADOW_COPY)"
  
  
@@ -89807,7 +90008,7 @@
  $as_echo_n "checking how to build vfs_dirsort... " >&6; }
  	if test "$MODULE_vfs_dirsort"; then
  		DEST=$MODULE_vfs_dirsort
-@@ -84072,12 +36878,10 @@
+@@ -84259,12 +36930,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -89822,7 +90023,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_dirsort"
-@@ -84088,11 +36892,11 @@
+@@ -84275,11 +36944,11 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_DIRSORT_OBJ)"
  
  
@@ -89836,7 +90037,7 @@
  $as_echo "not" >&6; }
  	fi
  
-@@ -84114,7 +36918,7 @@
+@@ -84301,7 +36970,7 @@
  
  
  
@@ -89845,7 +90046,7 @@
  $as_echo_n "checking how to build perfcount_onefs... " >&6; }
  	if test "$MODULE_perfcount_onefs"; then
  		DEST=$MODULE_perfcount_onefs
-@@ -84126,12 +36930,10 @@
+@@ -84313,12 +36982,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -89860,7 +90061,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules perfcount_onefs"
-@@ -84142,16 +36944,16 @@
+@@ -84329,16 +36996,16 @@
  		PERFCOUNT_STATIC="$PERFCOUNT_STATIC \$(PERFCOUNT_ONEFS)"
  
  
@@ -89880,7 +90081,7 @@
  $as_echo_n "checking how to build perfcount_test... " >&6; }
  	if test "$MODULE_perfcount_test"; then
  		DEST=$MODULE_perfcount_test
-@@ -84163,12 +36965,10 @@
+@@ -84350,12 +37017,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -89895,7 +90096,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules perfcount_test"
-@@ -84179,11 +36979,11 @@
+@@ -84366,11 +37031,11 @@
  		PERFCOUNT_STATIC="$PERFCOUNT_STATIC \$(PERFCOUNT_TEST)"
  
  
@@ -89909,7 +90110,7 @@
  $as_echo "not" >&6; }
  	fi
  
-@@ -84204,7 +37004,7 @@
+@@ -84391,7 +37056,7 @@
  
  
  
@@ -89918,7 +90119,7 @@
  $as_echo_n "checking how to build gpext_registry... " >&6; }
  	if test "$MODULE_gpext_registry"; then
  		DEST=$MODULE_gpext_registry
-@@ -84216,12 +37016,10 @@
+@@ -84403,12 +37068,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -89933,7 +90134,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules gpext_registry"
-@@ -84232,16 +37030,16 @@
+@@ -84419,16 +37082,16 @@
  		GPEXT_STATIC="$GPEXT_STATIC libgpo/gpext/registry.o"
  
  
@@ -89953,7 +90154,7 @@
  $as_echo_n "checking how to build gpext_scripts... " >&6; }
  	if test "$MODULE_gpext_scripts"; then
  		DEST=$MODULE_gpext_scripts
-@@ -84253,12 +37051,10 @@
+@@ -84440,12 +37103,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -89968,7 +90169,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules gpext_scripts"
-@@ -84269,16 +37065,16 @@
+@@ -84456,16 +37117,16 @@
  		GPEXT_STATIC="$GPEXT_STATIC libgpo/gpext/scripts.o"
  
  
@@ -89988,7 +90189,7 @@
  $as_echo_n "checking how to build gpext_security... " >&6; }
  	if test "$MODULE_gpext_security"; then
  		DEST=$MODULE_gpext_security
-@@ -84290,12 +37086,10 @@
+@@ -84477,12 +37138,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -90003,7 +90204,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules gpext_security"
-@@ -84306,11 +37100,11 @@
+@@ -84493,11 +37152,11 @@
  		GPEXT_STATIC="$GPEXT_STATIC libgpo/gpext/security.o"
  
  
@@ -90017,7 +90218,7 @@
  $as_echo "not" >&6; }
  	fi
  
-@@ -84346,18 +37140,16 @@
+@@ -84533,18 +37192,16 @@
  #################################################
  # If run from the build farm, enable NASTY hacks
  #################################################
@@ -90040,7 +90241,7 @@
  $as_echo "no" >&6; }
  fi
  
-@@ -84374,11 +37166,11 @@
+@@ -84561,11 +37218,11 @@
      rt_signal_lease_works=yes
      rt_signal_aio_works=yes
  
@@ -90055,7 +90256,7 @@
  $as_echo "cross" >&6; }
  
  	    # cross compiling, I hope you know what you are doing
-@@ -84386,11 +37178,7 @@
+@@ -84573,11 +37230,7 @@
  
  
  else
@@ -90068,7 +90269,7 @@
  /* end confdefs.h.  */
  
  #include <sys/types.h>
-@@ -84446,41 +37234,16 @@
+@@ -84633,41 +37286,16 @@
  }
  
  _ACEOF
@@ -90114,7 +90315,7 @@
  /* end confdefs.h.  */
  
  int
-@@ -84491,61 +37254,31 @@
+@@ -84678,61 +37306,31 @@
    return 0;
  }
  _ACEOF
@@ -90175,15 +90376,15 @@
 -  $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
+ 
+-( exit $ac_status )
 -
--( exit $ac_status )
- 
 -	    { $as_echo "$as_me:$LINENO: result: no" >&5
 +	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  $as_echo "no" >&6; }
  	    case "$ac_status" in
  		1|11|101|111)  rt_signal_lease_ok=no ;;
-@@ -84559,13 +37292,9 @@
+@@ -84746,13 +37344,9 @@
  
  	    # no RT_SIGNAL bug, we are golden
  
@@ -90199,7 +90400,7 @@
  /* end confdefs.h.  */
  
  int
-@@ -84576,65 +37305,39 @@
+@@ -84763,65 +37357,39 @@
    return 0;
  }
  _ACEOF
@@ -90238,8 +90439,8 @@
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
+ 
 -
- 
 -	    { $as_echo "$as_me:$LINENO: result: no" >&5
 +	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  $as_echo "no" >&6; }
@@ -90274,7 +90475,7 @@
    enableval=$enable_merged_build;  enable_merged_build=$enableval
  else
     enable_merged_build=auto
-@@ -84643,9 +37346,7 @@
+@@ -84830,9 +37398,7 @@
  
  if test x"$enable_merged_build" = x"yes" -a \
  	x"$merged_build_possible" = x"no" ; then
@@ -90285,7 +90486,7 @@
  fi
  
  
-@@ -84665,9 +37366,9 @@
+@@ -84852,9 +37418,9 @@
  
  	# Extract the first word of "python[$PYTHON_VERSION]", so it can be a program name with args.
  set dummy python$PYTHON_VERSION; ac_word=$2
@@ -90297,7 +90498,7 @@
    $as_echo_n "(cached) " >&6
  else
    case $PYTHON in
-@@ -84680,14 +37381,14 @@
+@@ -84867,14 +37433,14 @@
  do
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
@@ -90315,7 +90516,7 @@
  IFS=$as_save_IFS
  
    ;;
-@@ -84695,17 +37396,17 @@
+@@ -84882,17 +37448,17 @@
  fi
  PYTHON=$ac_cv_path_PYTHON
  if test -n "$PYTHON"; then
@@ -90336,7 +90537,7 @@
  $as_echo "$as_me: WARNING: No python found" >&2;}
  	fi
  
-@@ -84716,9 +37417,9 @@
+@@ -84903,9 +37469,9 @@
  do
    # Extract the first word of "$ac_prog", so it can be a program name with args.
  set dummy $ac_prog; ac_word=$2
@@ -90348,7 +90549,7 @@
    $as_echo_n "(cached) " >&6
  else
    case $PYTHON_CONFIG in
-@@ -84731,14 +37432,14 @@
+@@ -84918,14 +37484,14 @@
  do
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
@@ -90366,7 +90567,7 @@
  IFS=$as_save_IFS
  
    ;;
-@@ -84746,10 +37447,10 @@
+@@ -84933,10 +37499,10 @@
  fi
  PYTHON_CONFIG=$ac_cv_path_PYTHON_CONFIG
  if test -n "$PYTHON_CONFIG"; then
@@ -90379,7 +90580,7 @@
  $as_echo "no" >&6; }
  fi
  
-@@ -84760,9 +37461,9 @@
+@@ -84947,9 +37513,9 @@
  	else
  		# Extract the first word of "python[$PYTHON_VERSION]-config", so it can be a program name with args.
  set dummy python$PYTHON_VERSION-config; ac_word=$2
@@ -90391,7 +90592,7 @@
    $as_echo_n "(cached) " >&6
  else
    case $PYTHON_CONFIG in
-@@ -84775,14 +37476,14 @@
+@@ -84962,14 +37528,14 @@
  do
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
@@ -90409,7 +90610,7 @@
  IFS=$as_save_IFS
  
    ;;
-@@ -84790,10 +37491,10 @@
+@@ -84977,10 +37543,10 @@
  fi
  PYTHON_CONFIG=$ac_cv_path_PYTHON_CONFIG
  if test -n "$PYTHON_CONFIG"; then
@@ -90422,7 +90623,7 @@
  $as_echo "no" >&6; }
  fi
  
-@@ -84801,7 +37502,7 @@
+@@ -84988,7 +37554,7 @@
  	fi
  
  	if test -z "$PYTHON_CONFIG"; then
@@ -90431,7 +90632,7 @@
  $as_echo "$as_me: WARNING: No python-config found" >&2;}
  	else
  
-@@ -84811,11 +37512,7 @@
+@@ -84998,11 +37564,7 @@
  		LIBS="$LIBS `$PYTHON_CONFIG --ldflags`"
  		CFLAGS="$CFLAGS `$PYTHON_CONFIG --includes`"
  
@@ -90444,7 +90645,7 @@
  /* end confdefs.h.  */
  
  				/* we have our own configure tests */
-@@ -84831,42 +37528,15 @@
+@@ -85018,42 +37580,15 @@
    return 0;
  }
  _ACEOF
@@ -90490,7 +90691,7 @@
  		LIBS="$ac_save_LIBS"
  		CFLAGS="$ac_save_CFLAGS"
  	fi
-@@ -84878,11 +37548,7 @@
+@@ -85065,11 +37600,7 @@
  		LIBS="$LIBS `$PYTHON_CONFIG --ldflags`"
  		CFLAGS="$CFLAGS `$PYTHON_CONFIG --cflags`"
  
@@ -90503,7 +90704,7 @@
  /* end confdefs.h.  */
  
  				/* we have our own configure tests */
-@@ -84898,42 +37564,15 @@
+@@ -85085,42 +37616,15 @@
    return 0;
  }
  _ACEOF
@@ -90549,7 +90750,7 @@
  		LIBS="$ac_save_LIBS"
  		CFLAGS="$ac_save_CFLAGS"
  	fi
-@@ -84948,11 +37587,7 @@
+@@ -85135,11 +37639,7 @@
  		LIBS="$LIBS `echo -n -L${base}/lib " "; $PYTHON_CONFIG --ldflags`"
  		CFLAGS="$CFLAGS `$PYTHON_CONFIG --includes`"
  
@@ -90562,7 +90763,7 @@
  /* end confdefs.h.  */
  
  				/* we have our own configure tests */
-@@ -84968,42 +37603,15 @@
+@@ -85155,42 +37655,15 @@
    return 0;
  }
  _ACEOF
@@ -90608,7 +90809,7 @@
  		LIBS="$ac_save_LIBS"
  		CFLAGS="$ac_save_CFLAGS"
  	fi
-@@ -85015,11 +37623,7 @@
+@@ -85202,11 +37675,7 @@
  		LIBS="$LIBS `echo -n -L${base}/lib " "; $PYTHON_CONFIG --ldflags`"
  		CFLAGS="$CFLAGS `$PYTHON_CONFIG --cflags`"
  
@@ -90621,7 +90822,7 @@
  /* end confdefs.h.  */
  
  				/* we have our own configure tests */
-@@ -85035,42 +37639,15 @@
+@@ -85222,42 +37691,15 @@
    return 0;
  }
  _ACEOF
@@ -90667,7 +90868,7 @@
  		LIBS="$ac_save_LIBS"
  		CFLAGS="$ac_save_CFLAGS"
  	fi
-@@ -85100,11 +37677,7 @@
+@@ -85287,11 +37729,7 @@
  		LIBS="$LIBS $DISTUTILS_LDFLAGS"
  		CFLAGS="$CFLAGS $DISTUTILS_CFLAGS"
  
@@ -90680,7 +90881,7 @@
  /* end confdefs.h.  */
  
  				/* we have our own configure tests */
-@@ -85120,64 +37693,37 @@
+@@ -85307,64 +37745,37 @@
    return 0;
  }
  _ACEOF
@@ -90753,7 +90954,7 @@
  $as_echo "$merged_build_possible" >&6; }
  
  	# Enable merged build automatically if possible, when in developer mode
-@@ -85230,9 +37776,9 @@
+@@ -85417,9 +37828,9 @@
  
  	# Extract the first word of "python[$PYTHON_VERSION]", so it can be a program name with args.
  set dummy python$PYTHON_VERSION; ac_word=$2
@@ -90765,7 +90966,7 @@
    $as_echo_n "(cached) " >&6
  else
    case $PYTHON in
-@@ -85245,14 +37791,14 @@
+@@ -85432,14 +37843,14 @@
  do
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
@@ -90783,7 +90984,7 @@
  IFS=$as_save_IFS
  
    ;;
-@@ -85260,17 +37806,17 @@
+@@ -85447,17 +37858,17 @@
  fi
  PYTHON=$ac_cv_path_PYTHON
  if test -n "$PYTHON"; then
@@ -90804,7 +91005,7 @@
  $as_echo "$as_me: WARNING: No python found" >&2;}
  	fi
  
-@@ -85281,9 +37827,9 @@
+@@ -85468,9 +37879,9 @@
  do
    # Extract the first word of "$ac_prog", so it can be a program name with args.
  set dummy $ac_prog; ac_word=$2
@@ -90816,7 +91017,7 @@
    $as_echo_n "(cached) " >&6
  else
    case $PYTHON_CONFIG in
-@@ -85296,14 +37842,14 @@
+@@ -85483,14 +37894,14 @@
  do
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
@@ -90834,7 +91035,7 @@
  IFS=$as_save_IFS
  
    ;;
-@@ -85311,10 +37857,10 @@
+@@ -85498,10 +37909,10 @@
  fi
  PYTHON_CONFIG=$ac_cv_path_PYTHON_CONFIG
  if test -n "$PYTHON_CONFIG"; then
@@ -90847,7 +91048,7 @@
  $as_echo "no" >&6; }
  fi
  
-@@ -85325,9 +37871,9 @@
+@@ -85512,9 +37923,9 @@
  	else
  		# Extract the first word of "python[$PYTHON_VERSION]-config", so it can be a program name with args.
  set dummy python$PYTHON_VERSION-config; ac_word=$2
@@ -90859,7 +91060,7 @@
    $as_echo_n "(cached) " >&6
  else
    case $PYTHON_CONFIG in
-@@ -85340,14 +37886,14 @@
+@@ -85527,14 +37938,14 @@
  do
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
@@ -90877,7 +91078,7 @@
  IFS=$as_save_IFS
  
    ;;
-@@ -85355,10 +37901,10 @@
+@@ -85542,10 +37953,10 @@
  fi
  PYTHON_CONFIG=$ac_cv_path_PYTHON_CONFIG
  if test -n "$PYTHON_CONFIG"; then
@@ -90890,7 +91091,7 @@
  $as_echo "no" >&6; }
  fi
  
-@@ -85366,7 +37912,7 @@
+@@ -85553,7 +37964,7 @@
  	fi
  
  	if test -z "$PYTHON_CONFIG"; then
@@ -90899,7 +91100,7 @@
  $as_echo "$as_me: WARNING: No python-config found" >&2;}
  	else
  
-@@ -85376,11 +37922,7 @@
+@@ -85563,11 +37974,7 @@
  		LIBS="$LIBS `$PYTHON_CONFIG --ldflags`"
  		CFLAGS="$CFLAGS `$PYTHON_CONFIG --includes`"
  
@@ -90912,7 +91113,7 @@
  /* end confdefs.h.  */
  
  				/* we have our own configure tests */
-@@ -85396,42 +37938,15 @@
+@@ -85583,42 +37990,15 @@
    return 0;
  }
  _ACEOF
@@ -90958,7 +91159,7 @@
  		LIBS="$ac_save_LIBS"
  		CFLAGS="$ac_save_CFLAGS"
  	fi
-@@ -85443,11 +37958,7 @@
+@@ -85630,11 +38010,7 @@
  		LIBS="$LIBS `$PYTHON_CONFIG --ldflags`"
  		CFLAGS="$CFLAGS `$PYTHON_CONFIG --cflags`"
  
@@ -90971,7 +91172,7 @@
  /* end confdefs.h.  */
  
  				/* we have our own configure tests */
-@@ -85463,42 +37974,15 @@
+@@ -85650,42 +38026,15 @@
    return 0;
  }
  _ACEOF
@@ -91017,7 +91218,7 @@
  		LIBS="$ac_save_LIBS"
  		CFLAGS="$ac_save_CFLAGS"
  	fi
-@@ -85513,11 +37997,7 @@
+@@ -85700,11 +38049,7 @@
  		LIBS="$LIBS `echo -n -L${base}/lib " "; $PYTHON_CONFIG --ldflags`"
  		CFLAGS="$CFLAGS `$PYTHON_CONFIG --includes`"
  
@@ -91030,7 +91231,7 @@
  /* end confdefs.h.  */
  
  				/* we have our own configure tests */
-@@ -85533,42 +38013,15 @@
+@@ -85720,42 +38065,15 @@
    return 0;
  }
  _ACEOF
@@ -91076,7 +91277,7 @@
  		LIBS="$ac_save_LIBS"
  		CFLAGS="$ac_save_CFLAGS"
  	fi
-@@ -85580,11 +38033,7 @@
+@@ -85767,11 +38085,7 @@
  		LIBS="$LIBS `echo -n -L${base}/lib " "; $PYTHON_CONFIG --ldflags`"
  		CFLAGS="$CFLAGS `$PYTHON_CONFIG --cflags`"
  
@@ -91089,7 +91290,7 @@
  /* end confdefs.h.  */
  
  				/* we have our own configure tests */
-@@ -85600,42 +38049,15 @@
+@@ -85787,42 +38101,15 @@
    return 0;
  }
  _ACEOF
@@ -91135,7 +91336,7 @@
  		LIBS="$ac_save_LIBS"
  		CFLAGS="$ac_save_CFLAGS"
  	fi
-@@ -85665,11 +38087,7 @@
+@@ -85852,11 +38139,7 @@
  		LIBS="$LIBS $DISTUTILS_LDFLAGS"
  		CFLAGS="$CFLAGS $DISTUTILS_CFLAGS"
  
@@ -91148,7 +91349,7 @@
  /* end confdefs.h.  */
  
  				/* we have our own configure tests */
-@@ -85685,52 +38103,25 @@
+@@ -85872,52 +38155,25 @@
    return 0;
  }
  _ACEOF
@@ -91206,7 +91407,7 @@
  $as_echo "yes" >&6; }
  
  
-@@ -85758,20 +38149,18 @@
+@@ -85945,20 +38201,18 @@
  
  
  	else
@@ -91231,7 +91432,7 @@
  $as_echo "$pythondir" >&6; }
  
  
-@@ -85794,545 +38183,125 @@
+@@ -85981,545 +38235,125 @@
  
  
  
@@ -91857,7 +92058,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -86350,63 +38319,32 @@
+@@ -86537,63 +38371,32 @@
    return 0;
  }
  _ACEOF
@@ -91932,7 +92133,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -86424,43 +38362,18 @@
+@@ -86611,43 +38414,18 @@
    return 0;
  }
  _ACEOF
@@ -91982,7 +92183,7 @@
    TERMLIBS="-lreadline $TERMLIBS"
         EXTERNAL_READLINE=yes
         break
-@@ -86474,11 +38387,11 @@
+@@ -86661,11 +38439,11 @@
  
      ;;
    no)
@@ -91996,7 +92197,7 @@
  $as_echo "yes" >&6; }
  
      # Needed for AC_CHECK_HEADERS and AC_CHECK_LIB to look at
-@@ -86490,151 +38403,12 @@
+@@ -86677,151 +38455,12 @@
      LDFLAGS="-L$with_readline/lib $LDFLAGS"
      CPPFLAGS="-I$with_readline/include $CPPFLAGS"
  
@@ -92154,7 +92355,7 @@
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
-@@ -86643,151 +38417,12 @@
+@@ -86830,151 +38469,12 @@
  
  done
  
@@ -92311,7 +92512,7 @@
  _ACEOF
  
  fi
-@@ -86795,168 +38430,26 @@
+@@ -86982,168 +38482,26 @@
  done
  
  
@@ -92489,7 +92690,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -86974,63 +38467,32 @@
+@@ -87161,63 +38519,32 @@
    return 0;
  }
  _ACEOF
@@ -92564,7 +92765,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -87048,43 +38510,18 @@
+@@ -87235,43 +38562,18 @@
    return 0;
  }
  _ACEOF
@@ -92614,7 +92815,7 @@
    TERMLDFLAGS="-L$with_readline/lib"
         TERMCPPFLAGS="-I$with_readline/include"
         LDFLAGS="-L$with_readline/lib $LDFLAGS"
-@@ -87104,7 +38541,7 @@
+@@ -87291,7 +38593,7 @@
      ;;
    esac
  else
@@ -92623,7 +92824,7 @@
  $as_echo "no" >&6; }
  
  fi
-@@ -87113,163 +38550,70 @@
+@@ -87300,18 +38602,14 @@
  # 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.
@@ -92631,32 +92832,24 @@
 +{ $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"
++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 >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
--/* 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
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ 
+ /* Override any GCC internal prototype to avoid an error.
+@@ -87329,134 +38627,45 @@
+   return 0;
+ }
+ _ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -92678,67 +92871,62 @@
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
--  ac_cv_lib_readline_rl_completion_matches=yes
--else
++if ac_fn_c_try_link "$LINENO"; then :
+   ac_cv_lib_readline_rl_completion_matches=yes
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	ac_cv_lib_readline_rl_completion_matches=no
--fi
++  ac_cv_lib_readline_rl_completion_matches=no
+ fi
 -
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
--LIBS=$ac_check_lib_save_LIBS
--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:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
--$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
++{ $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
--
++if test "x$ac_cv_lib_readline_rl_completion_matches" = x""yes; then :
+ 
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_NEW_LIBREADLINE 1
 -_ACEOF
--
--fi
--
--
--# not all readline libs have rl_event_hook or history_list
++$as_echo "#define HAVE_NEW_LIBREADLINE 1" >>confdefs.h
+ 
+ fi
+ 
+ 
+ # not all readline libs have rl_event_hook or history_list
 -{ $as_echo "$as_me:$LINENO: checking whether rl_event_hook is declared" >&5
 -$as_echo_n "checking whether rl_event_hook is declared... " >&6; }
 -if test "${ac_cv_have_decl_rl_event_hook+set}" = set; then
-+if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
+-  $as_echo_n "(cached) " >&6
+-else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+  ac_check_lib_save_LIBS=$LIBS
-+LIBS="-lreadline $TERMLIBS $LIBS"
-+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
+-/* end confdefs.h.  */
 -#include <readline/readline.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 ()
- {
+-
+-int
+-main ()
+-{
 -#ifndef rl_event_hook
 -  (void) rl_event_hook;
 -#endif
 -
-+return rl_completion_matches ();
-   ;
-   return 0;
- }
- _ACEOF
+-  ;
+-  return 0;
+-}
+-_ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -92758,54 +92946,39 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_cv_have_decl_rl_event_hook=yes
-+if ac_fn_c_try_link "$LINENO"; then :
-+  ac_cv_lib_readline_rl_completion_matches=yes
++ac_fn_c_check_decl "$LINENO" "rl_event_hook" "ac_cv_have_decl_rl_event_hook" "#include <readline/readline.h>
++"
++if test "x$ac_cv_have_decl_rl_event_hook" = x""yes; then :
++  ac_have_decl=1
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	ac_cv_have_decl_rl_event_hook=no
-+  ac_cv_lib_readline_rl_completion_matches=no
++  ac_have_decl=0
  fi
--
+ 
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-+rm -f core conftest.err conftest.$ac_objext \
-+    conftest$ac_exeext conftest.$ac_ext
-+LIBS=$ac_check_lib_save_LIBS
- fi
+-fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_rl_event_hook" >&5
 -$as_echo "$ac_cv_have_decl_rl_event_hook" >&6; }
 -if test "x$ac_cv_have_decl_rl_event_hook" = x""yes; then
 -
--cat >>confdefs.h <<_ACEOF
+ cat >>confdefs.h <<_ACEOF
 -#define HAVE_DECL_RL_EVENT_HOOK 1
 -_ACEOF
-+{ $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
- 
+-
+-
 -else
 -  cat >>confdefs.h <<_ACEOF
 -#define HAVE_DECL_RL_EVENT_HOOK 0
--_ACEOF
-+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 <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
+ _ACEOF
  
+-
+-fi
+-
+-
 -{ $as_echo "$as_me:$LINENO: checking for history_list in -lreadline" >&5
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for history_list in -lreadline" >&5
  $as_echo_n "checking for history_list in -lreadline... " >&6; }
@@ -92824,10 +92997,15 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -87287,60 +38631,31 @@
-   return 0;
- }
- _ACEOF
+@@ -87469,65 +38678,36 @@
+ int
+ main ()
+ {
+-return history_list ();
+-  ;
+-  return 0;
+-}
+-_ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -92849,6 +93027,11 @@
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
++return history_list ();
++  ;
++  return 0;
++}
++_ACEOF
 +if ac_fn_c_try_link "$LINENO"; then :
    ac_cv_lib_readline_history_list=yes
  else
@@ -92895,7 +93078,7 @@
  
  
  MAKE_SETTINGS="$MAKE_SETTINGS
-@@ -87395,7 +38710,7 @@
+@@ -87582,7 +38762,7 @@
  ###################################
  "
  
@@ -92904,7 +93087,7 @@
  $as_echo "no" >&6; }
  fi
  
-@@ -87404,102 +38719,9 @@
+@@ -87591,102 +38771,9 @@
  
  
  
@@ -93009,7 +93192,7 @@
  else
  
  cat >>confdefs.h <<_ACEOF
-@@ -87508,102 +38730,9 @@
+@@ -87695,102 +38782,9 @@
  
  fi
  
@@ -93099,10 +93282,10 @@
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
+-
 +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 :
  
--
 -fi
 -
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
@@ -93114,7 +93297,7 @@
  else
  
  cat >>confdefs.h <<_ACEOF
-@@ -87613,151 +38742,12 @@
+@@ -87800,151 +38794,12 @@
  fi
  
  
@@ -93270,7 +93453,7 @@
  _ACEOF
  
  else
-@@ -87767,30 +38757,6 @@
+@@ -87954,30 +38809,6 @@
  done
  
  
@@ -93301,7 +93484,7 @@
  for ac_header in 				\
  	crypt.h					\
  	curses.h				\
-@@ -87817,147 +38783,11 @@
+@@ -88004,147 +38835,11 @@
  	netinet6/in6.h				\
  	libintl.h
  
@@ -93454,7 +93637,7 @@
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
-@@ -87967,42 +38797,6 @@
+@@ -88154,42 +38849,6 @@
  done
  
  
@@ -93497,7 +93680,7 @@
  for ac_func in 				\
  	atexit					\
  	cgetent					\
-@@ -88041,98 +38835,11 @@
+@@ -88228,98 +38887,11 @@
  	freehostent				\
  	writev
  
@@ -93601,7 +93784,7 @@
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
  _ACEOF
-@@ -88143,17 +38850,13 @@
+@@ -88330,17 +38902,13 @@
  
  
  
@@ -93622,7 +93805,7 @@
  /* end confdefs.h.  */
  #ifdef HAVE_SYS_BSWAP_H
  #include <sys/bswap.h>
-@@ -88166,140 +38869,25 @@
+@@ -88353,140 +38921,25 @@
    return 0;
  }
  _ACEOF
@@ -93772,7 +93955,7 @@
  _ACEOF
  
  fi
-@@ -88315,177 +38903,58 @@
+@@ -88502,11 +38955,11 @@
  #define $ac_tr_func 1
  _ACEOF
  
@@ -93782,47 +93965,41 @@
  	;;
  	no)
 -	{ $as_echo "$as_me:$LINENO: result: no" >&5
--$as_echo "no" >&6; }
--	;;
--esac
--
--
--
--
--
--
++	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+ $as_echo "no" >&6; }
+ 	;;
+ esac
+@@ -88516,17 +38969,13 @@
+ 
+ 
+ 
 -{ $as_echo "$as_me:$LINENO: checking for bswap32" >&5
--$as_echo_n "checking for bswap32... " >&6; }
++{ $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
--
++if test "${ac_cv_love_func_bswap32+set}" = set; then :
+   $as_echo_n "(cached) " >&6
+ else
+ 
 -cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
--#ifdef HAVE_SYS_BSWAP_H
--#include <sys/bswap.h>
--#endif
--int
--main ()
--{
--bswap32(0)
--  ;
--  return 0;
--}
--_ACEOF
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ #ifdef HAVE_SYS_BSWAP_H
+ #include <sys/bswap.h>
+@@ -88539,140 +38988,25 @@
+   return 0;
+ }
+ _ACEOF
 -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;;
-+	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-+$as_echo "no" >&6; }
-+	;;
- esac
+-esac
 -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 -$as_echo "$ac_try_echo") >&5
 -  (eval "$ac_link") 2>conftest.er1
@@ -93838,35 +94015,33 @@
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
--  eval "ac_cv_love_func_bswap32=yes"
--else
++if ac_fn_c_try_link "$LINENO"; then :
+   eval "ac_cv_love_func_bswap32=yes"
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
- 
+-
 -	eval "ac_cv_love_func_bswap32=no"
 -fi
- 
+-
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
 -fi
- 
- 
+-
+-
 -eval "ac_res=\$ac_cv_love_func_bswap32"
- 
+-
 -if false; then
- 
+-
 -for ac_func in bswap32
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
 -$as_echo_n "checking for $ac_func... " >&6; }
 -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-+{ $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
+-  $as_echo_n "(cached) " >&6
+-else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
@@ -93889,7 +94064,7 @@
 -#endif
 -
 -#undef $ac_func
- 
+-
 -/* 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.  */
@@ -93902,21 +94077,16 @@
 -    something starting with __ and the normal name is an alias.  */
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
-+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h.  */
-+#ifdef HAVE_SYS_BSWAP_H
-+#include <sys/bswap.h>
- #endif
+-#endif
 -
- int
- main ()
- {
+-int
+-main ()
+-{
 -return $ac_func ();
-+bswap32(0)
-   ;
-   return 0;
- }
- _ACEOF
+-  ;
+-  return 0;
+-}
+-_ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -93939,9 +94109,7 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  eval "$as_ac_var=yes"
-+if ac_fn_c_try_link "$LINENO"; then :
-+  eval "ac_cv_love_func_bswap32=yes"
- else
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
@@ -93977,7 +94145,7 @@
  _ACEOF
  
  fi
-@@ -88501,11 +38970,11 @@
+@@ -88688,11 +39022,11 @@
  #define $ac_tr_func 1
  _ACEOF
  
@@ -93991,7 +94159,7 @@
  $as_echo "no" >&6; }
  	;;
  esac
-@@ -88516,25 +38985,21 @@
+@@ -88703,25 +39037,21 @@
  
  
  
@@ -94021,7 +94189,7 @@
    ac_cv_struct_winsize=yes; break
  fi
  rm -f conftest*
-@@ -88544,63 +39009,45 @@
+@@ -88731,63 +39061,45 @@
  
  if test "$ac_cv_struct_winsize" = "yes"; then
  
@@ -94096,7 +94264,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <signal.h>
-@@ -88613,35 +39060,14 @@
+@@ -88800,35 +39112,14 @@
    return 0;
  }
  _ACEOF
@@ -94135,7 +94303,7 @@
  $as_echo "$ac_cv_type_signal" >&6; }
  
  cat >>confdefs.h <<_ACEOF
-@@ -88651,9 +39077,7 @@
+@@ -88838,9 +39129,7 @@
  
  if test "$ac_cv_type_signal" = "void" ; then
  
@@ -94146,7 +94314,7 @@
  
  fi
  
-@@ -88684,18 +39108,14 @@
+@@ -88871,18 +39160,14 @@
  
  
  
@@ -94168,7 +94336,7 @@
  /* end confdefs.h.  */
  #ifdef HAVE_SYS_TYPES_H
  #include <sys/types.h>
-@@ -88712,44 +39132,15 @@
+@@ -88899,44 +39184,15 @@
    return 0;
  }
  _ACEOF
@@ -94218,7 +94386,7 @@
  /* end confdefs.h.  */
  extern int h_errno;
  int foo(void) { return h_errno; }
-@@ -88761,44 +39152,19 @@
+@@ -88948,44 +39204,19 @@
    return 0;
  }
  _ACEOF
@@ -94268,7 +94436,7 @@
  $as_echo "$ac_foo" >&6; }
  if test "$ac_foo" = yes; then
  
-@@ -88806,81 +39172,23 @@
+@@ -88993,85 +39224,26 @@
  #define HAVE_H_ERRNO 1
  _ACEOF
  
@@ -94329,15 +94497,15 @@
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	ac_cv_have_decl_h_errno=no
+-fi
+-
+-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 +  ac_have_decl=0
  fi
- 
--rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
--fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_h_errno" >&5
 -$as_echo "$ac_cv_have_decl_h_errno" >&6; }
 -if test "x$ac_cv_have_decl_h_errno" = x""yes; then
--
+ 
  cat >>confdefs.h <<_ACEOF
 -#define HAVE_DECL_H_ERRNO 1
 -_ACEOF
@@ -94350,22 +94518,20 @@
  _ACEOF
  
 -
+ fi
+ 
+ 
 -fi
 -
 -
- fi
+-
  
  
-@@ -88899,23 +39207,17 @@
  
+@@ -89092,17 +39264,12 @@
  
  
--
- ac_check_lib_ext_save_LIBS=$LIBS
- LIBS="-lutil $OPENPTY_LIBS  $LIBS"
  
- 
- 
 -
 -        { $as_echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
 +        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
@@ -94383,7 +94549,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -88933,54 +39235,28 @@
+@@ -89120,54 +39287,28 @@
    return 0;
  }
  _ACEOF
@@ -94445,7 +94611,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_LIBUTIL 1
  _ACEOF
-@@ -88997,7 +39273,6 @@
+@@ -89184,7 +39325,6 @@
  fi
  
  
@@ -94453,7 +94619,7 @@
  	MAKE_SETTINGS="$MAKE_SETTINGS
  OPENPTY_ENABLE = YES
  "
-@@ -89017,23 +39292,17 @@
+@@ -89204,23 +39344,17 @@
  
  
  
@@ -94480,7 +94646,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -89051,54 +39320,28 @@
+@@ -89238,54 +39372,28 @@
    return 0;
  }
  _ACEOF
@@ -94542,7 +94708,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_LIBINTL 1
  _ACEOF
-@@ -89115,7 +39358,6 @@
+@@ -89302,7 +39410,6 @@
  fi
  
  
@@ -94550,7 +94716,7 @@
  	MAKE_SETTINGS="$MAKE_SETTINGS
  INTL_ENABLE = YES
  "
-@@ -89139,151 +39381,12 @@
+@@ -89326,151 +39433,12 @@
  
  
  
@@ -94706,7 +94872,7 @@
  _ACEOF
  
  fi
-@@ -89291,22 +39394,9 @@
+@@ -89478,22 +39446,9 @@
  done
  
  
@@ -94731,7 +94897,7 @@
  #ifdef HAVE_SYS_TYPES_H
  #include <sys/types.h>
  #endif
-@@ -89317,46 +39407,10 @@
+@@ -89504,46 +39459,10 @@
  #include <arpa/nameser.h>
  #endif
  
@@ -94781,7 +94947,7 @@
  _ACEOF
  
  fi
-@@ -89368,9 +39422,9 @@
+@@ -89555,9 +39474,9 @@
  
  
  
@@ -94793,7 +94959,7 @@
    $as_echo_n "(cached) " >&6
  else
  
-@@ -89385,11 +39439,7 @@
+@@ -89572,11 +39491,7 @@
  		*) ac_lib="-l$ac_lib" ;;
  		esac
  		LIBS=" $ac_lib  $ac_save_LIBS"
@@ -94806,7 +94972,7 @@
  /* end confdefs.h.  */
  
  #include <stdio.h>
-@@ -89414,38 +39464,11 @@
+@@ -89601,38 +39516,11 @@
    return 0;
  }
  _ACEOF
@@ -94848,7 +95014,7 @@
  	done
  	eval "ac_cv_funclib_res_search=\${ac_cv_funclib_res_search-no}"
  	LIBS="$ac_save_LIBS"
-@@ -89457,102 +39480,12 @@
+@@ -89644,102 +39532,12 @@
  eval "ac_res=\$ac_cv_funclib_res_search"
  
  if false; then
@@ -94956,7 +95122,7 @@
  _ACEOF
  
  fi
-@@ -89572,13 +39505,13 @@
+@@ -89759,13 +39557,13 @@
  #define $ac_tr_func 1
  _ACEOF
  
@@ -94972,7 +95138,7 @@
  $as_echo "no" >&6; }
  	;;
  	*)
-@@ -89592,7 +39525,7 @@
+@@ -89779,7 +39577,7 @@
  #define $ac_tr_lib 1
  _ACEOF
  
@@ -94981,7 +95147,7 @@
  $as_echo "yes, in $ac_res" >&6; }
  	;;
  esac
-@@ -89607,9 +39540,9 @@
+@@ -89794,9 +39592,9 @@
  
  
  
@@ -94993,7 +95159,7 @@
    $as_echo_n "(cached) " >&6
  else
  
-@@ -89624,11 +39557,7 @@
+@@ -89811,11 +39609,7 @@
  		*) ac_lib="-l$ac_lib" ;;
  		esac
  		LIBS=" $ac_lib  $ac_save_LIBS"
@@ -95006,7 +95172,7 @@
  /* end confdefs.h.  */
  
  #include <stdio.h>
-@@ -89653,38 +39582,11 @@
+@@ -89840,38 +39634,11 @@
    return 0;
  }
  _ACEOF
@@ -95048,7 +95214,7 @@
  	done
  	eval "ac_cv_funclib_res_nsearch=\${ac_cv_funclib_res_nsearch-no}"
  	LIBS="$ac_save_LIBS"
-@@ -89696,102 +39598,12 @@
+@@ -89883,102 +39650,12 @@
  eval "ac_res=\$ac_cv_funclib_res_nsearch"
  
  if false; then
@@ -95156,7 +95322,7 @@
  _ACEOF
  
  fi
-@@ -89811,13 +39623,13 @@
+@@ -89998,13 +39675,13 @@
  #define $ac_tr_func 1
  _ACEOF
  
@@ -95172,7 +95338,7 @@
  $as_echo "no" >&6; }
  	;;
  	*)
-@@ -89831,7 +39643,7 @@
+@@ -90018,7 +39695,7 @@
  #define $ac_tr_lib 1
  _ACEOF
  
@@ -95181,7 +95347,7 @@
  $as_echo "yes, in $ac_res" >&6; }
  	;;
  esac
-@@ -89846,9 +39658,9 @@
+@@ -90033,9 +39710,9 @@
  
  
  
@@ -95193,7 +95359,7 @@
    $as_echo_n "(cached) " >&6
  else
  
-@@ -89863,11 +39675,7 @@
+@@ -90050,11 +39727,7 @@
  		*) ac_lib="-l$ac_lib" ;;
  		esac
  		LIBS=" $ac_lib  $ac_save_LIBS"
@@ -95206,7 +95372,7 @@
  /* end confdefs.h.  */
  
  #include <stdio.h>
-@@ -89892,38 +39700,11 @@
+@@ -90079,38 +39752,11 @@
    return 0;
  }
  _ACEOF
@@ -95248,11 +95414,10 @@
  	done
  	eval "ac_cv_funclib_res_ndestroy=\${ac_cv_funclib_res_ndestroy-no}"
  	LIBS="$ac_save_LIBS"
-@@ -89934,103 +39715,13 @@
- 
+@@ -90122,102 +39768,12 @@
  eval "ac_res=\$ac_cv_funclib_res_ndestroy"
  
--if false; then
+ if false; then
 -
 -for ac_func in res_ndestroy
 -do
@@ -95347,7 +95512,6 @@
 -as_val=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+if false; then
 +	for ac_func in res_ndestroy
 +do :
 +  ac_fn_c_check_func "$LINENO" "res_ndestroy" "ac_cv_func_res_ndestroy"
@@ -95358,7 +95522,7 @@
  _ACEOF
  
  fi
-@@ -90050,13 +39741,13 @@
+@@ -90237,13 +39793,13 @@
  #define $ac_tr_func 1
  _ACEOF
  
@@ -95374,7 +95538,7 @@
  $as_echo "no" >&6; }
  	;;
  	*)
-@@ -90070,7 +39761,7 @@
+@@ -90257,7 +39813,7 @@
  #define $ac_tr_lib 1
  _ACEOF
  
@@ -95383,7 +95547,7 @@
  $as_echo "yes, in $ac_res" >&6; }
  	;;
  esac
-@@ -90085,9 +39776,9 @@
+@@ -90272,9 +39828,9 @@
  
  
  
@@ -95395,23 +95559,41 @@
    $as_echo_n "(cached) " >&6
  else
  
-@@ -90102,11 +39793,7 @@
+@@ -90287,176 +39843,55 @@
+ 		no) continue ;;
+ 		-l*) ;;
  		*) ac_lib="-l$ac_lib" ;;
- 		esac
- 		LIBS=" $ac_lib  $ac_save_LIBS"
+-		esac
+-		LIBS=" $ac_lib  $ac_save_LIBS"
 -		cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
- 
- #include <stdio.h>
-@@ -90131,38 +39818,11 @@
-   return 0;
- }
- _ACEOF
+-/* 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
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -95433,28 +95615,29 @@
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
-+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
+-  eval "if test -n \"$ac_lib\";then ac_cv_funclib_dn_expand=$ac_lib; else ac_cv_funclib_dn_expand=yes; fi";break
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -
- fi
+-fi
 -
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
-+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"
-@@ -90174,102 +39834,12 @@
- eval "ac_res=\$ac_cv_funclib_dn_expand"
- 
- if false; then
+-	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
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
@@ -95468,7 +95651,10 @@
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
++		esac
++		LIBS=" $ac_lib  $ac_save_LIBS"
++		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
 -/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
 -   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
 -#define $ac_func innocuous_$ac_func
@@ -95477,12 +95663,15 @@
 -    which can conflict with char $ac_func (); 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
++#include <stdio.h>
++#ifdef HAVE_SYS_TYPES_H
++#include <sys/types.h>
+ #endif
 -
 -#undef $ac_func
 -
@@ -95491,23 +95680,31 @@
 -   builtin and then its argument prototype would still apply.  */
 -#ifdef __cplusplus
 -extern "C"
--#endif
++#ifdef HAVE_NETINET_IN_H
++#include <netinet/in.h>
+ #endif
 -char $ac_func ();
 -/* The GNU C library defines this for functions which it implements
 -    to always fail with ENOSYS.  Some functions are actually named
 -    something starting with __ and the normal name is an alias.  */
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
--#endif
--
--int
--main ()
--{
++#ifdef HAVE_ARPA_NAMESER_H
++#include <arpa/nameser.h>
++#endif
++#ifdef HAVE_RESOLV_H
++#include <resolv.h>
+ #endif
+ 
+ int
+ main ()
+ {
 -return $ac_func ();
--  ;
--  return 0;
--}
--_ACEOF
++dn_expand(0,0,0,0,0)
+   ;
+   return 0;
+ }
+ _ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -95535,12 +95732,20 @@
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	eval "$as_ac_var=no"
--fi
--
++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
+ 
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
--fi
+ fi
 -ac_res=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
@@ -95548,6 +95753,11 @@
 -as_val=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
++
++
++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"
@@ -95558,7 +95768,7 @@
  _ACEOF
  
  fi
-@@ -90289,13 +39859,13 @@
+@@ -90476,13 +39911,13 @@
  #define $ac_tr_func 1
  _ACEOF
  
@@ -95574,7 +95784,7 @@
  $as_echo "no" >&6; }
  	;;
  	*)
-@@ -90309,7 +39879,7 @@
+@@ -90496,7 +39931,7 @@
  #define $ac_tr_lib 1
  _ACEOF
  
@@ -95583,7 +95793,7 @@
  $as_echo "yes, in $ac_res" >&6; }
  	;;
  esac
-@@ -90321,18 +39891,14 @@
+@@ -90508,18 +39943,14 @@
  
  
  
@@ -95605,7 +95815,7 @@
  /* end confdefs.h.  */
  #include <stdio.h>
  #ifdef HAVE_SYS_TYPES_H
-@@ -90356,44 +39922,15 @@
+@@ -90543,44 +39974,15 @@
    return 0;
  }
  _ACEOF
@@ -95655,7 +95865,7 @@
  /* end confdefs.h.  */
  extern int _res;
  int foo(void) { return _res; }
-@@ -90405,44 +39942,19 @@
+@@ -90592,44 +39994,19 @@
    return 0;
  }
  _ACEOF
@@ -95705,7 +95915,7 @@
  $as_echo "$ac_foo" >&6; }
  if test "$ac_foo" = yes; then
  
-@@ -90450,18 +39962,7 @@
+@@ -90637,18 +40014,7 @@
  #define HAVE__RES 1
  _ACEOF
  
@@ -95725,7 +95935,7 @@
  #ifdef HAVE_SYS_TYPES_H
  #include <sys/types.h>
  #endif
-@@ -90474,64 +39975,17 @@
+@@ -90661,64 +40027,17 @@
  #ifdef HAVE_RESOLV_H
  #include <resolv.h>
  #endif
@@ -95768,15 +95978,15 @@
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	ac_cv_have_decl__res=no
+-fi
+-
+-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 +  ac_have_decl=0
  fi
- 
--rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
--fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl__res" >&5
 -$as_echo "$ac_cv_have_decl__res" >&6; }
 -if test "x$ac_cv_have_decl__res" = x""yes; then
--
+ 
  cat >>confdefs.h <<_ACEOF
 -#define HAVE_DECL__RES 1
 -_ACEOF
@@ -95795,7 +96005,7 @@
  fi
  
  
-@@ -90597,9 +40051,9 @@
+@@ -90784,9 +40103,9 @@
  do
    # Extract the first word of "$ac_prog", so it can be a program name with args.
  set dummy $ac_prog; ac_word=$2
@@ -95807,7 +96017,7 @@
    $as_echo_n "(cached) " >&6
  else
    if test -n "$LEX"; then
-@@ -90610,24 +40064,24 @@
+@@ -90797,24 +40116,24 @@
  do
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
@@ -95837,7 +96047,7 @@
  $as_echo "no" >&6; }
  fi
  
-@@ -90656,20 +40110,20 @@
+@@ -90843,20 +40162,20 @@
    return ! yylex () + ! yywrap ();
  }
  _ACEOF
@@ -95865,7 +96075,7 @@
    $as_echo_n "(cached) " >&6
  else
  
-@@ -90678,19 +40132,17 @@
+@@ -90865,19 +40184,17 @@
  elif test -f lexyy.c; then
    ac_cv_prog_lex_root=lexyy
  else
@@ -95889,7 +96099,7 @@
    $as_echo_n "(cached) " >&6
  else
  
-@@ -90698,55 +40150,29 @@
+@@ -90885,55 +40202,29 @@
      ac_cv_lib_lex='none needed'
      for ac_lib in '' -lfl -ll; do
        LIBS="$ac_lib $ac_save_LIBS"
@@ -95953,7 +96163,7 @@
    $as_echo_n "(cached) " >&6
  else
    # POSIX says lex can declare yytext either as a pointer or an array; the
-@@ -90755,52 +40181,24 @@
+@@ -90942,52 +40233,24 @@
  ac_cv_prog_lex_yytext_pointer=no
  ac_save_LIBS=$LIBS
  LIBS="$LEXLIB $ac_save_LIBS"
@@ -96013,7 +96223,7 @@
  
  fi
  rm -f conftest.l $LEX_OUTPUT_ROOT.c
-@@ -90810,9 +40208,9 @@
+@@ -90997,9 +40260,9 @@
  if test x"$LEX_BASENAME" = x"flex"; then
  	# "flex 2.5.33"
  	FLEX_VERSION=`$LEX --version | cut -d ' ' -f2`
@@ -96025,7 +96235,7 @@
  $as_echo "$FLEX_VERSION" >&6; }
  	FLEX_MAJOR=`echo $FLEX_VERSION | cut -d '.' -f1`
  	FLEX_MINOR=`echo $FLEX_VERSION | cut -d '.' -f2`
-@@ -90825,9 +40223,9 @@
+@@ -91012,9 +40275,9 @@
  do
    # Extract the first word of "$ac_prog", so it can be a program name with args.
  set dummy $ac_prog; ac_word=$2
@@ -96037,7 +96247,7 @@
    $as_echo_n "(cached) " >&6
  else
    if test -n "$YACC"; then
-@@ -90838,24 +40236,24 @@
+@@ -91025,24 +40288,24 @@
  do
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
@@ -96067,7 +96277,7 @@
  $as_echo "no" >&6; }
  fi
  
-@@ -90868,9 +40266,9 @@
+@@ -91055,9 +40318,9 @@
  if test x"$YACC_BASENAME" = x"bison -y"; then
  	# bison (GNU Bison) 2.3
  	BISON_VERSION=`$YACC --version | head -1 | cut -d ' ' -f4`
@@ -96079,7 +96289,7 @@
  $as_echo "$BISON_VERSION" >&6; }
  	BISON_MAJOR=`echo $BISON_VERSION | cut -d '.' -f1`
  	BISON_MINOR=`echo $BISON_VERSION | cut -d '.' -f2`
-@@ -90878,7 +40276,7 @@
+@@ -91065,7 +40328,7 @@
  	YACC_VERSION="bison-$BISON_MAJOR.$BISON_MINOR"
  fi
  
@@ -96088,7 +96298,7 @@
  $as_echo_n "checking working LEX YACC combination... " >&6; }
  LEX_YACC="no"
  if test x"$LEX_VERSION" != x"" -a x"$YACC_VERSION" != x""; then
-@@ -90894,7 +40292,7 @@
+@@ -91081,7 +40344,7 @@
  	LEX=false
  	YACC=false
  fi
@@ -96097,7 +96307,7 @@
  $as_echo "$LEX_YACC" >&6; }
  
  # Portions of heimdal kerberos are unpacked into source/heimdal
-@@ -90902,21 +40300,15 @@
+@@ -91089,21 +40352,15 @@
  
  # if we ever get to using a host kerberos, we might add conditionals here
  
@@ -96122,7 +96332,7 @@
  
  HAVE_GSSAPI=YES
  
-@@ -91008,9 +40400,7 @@
+@@ -91195,9 +40452,7 @@
  VPATH="$VPATH:\$(HEIMDAL_VPATH)"
  
  
@@ -96133,7 +96343,7 @@
  
  
  
-@@ -91019,170 +40409,27 @@
+@@ -91206,170 +40461,27 @@
  "
  
  
@@ -96311,7 +96521,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -91200,46 +40447,15 @@
+@@ -91387,46 +40499,15 @@
    return 0;
  }
  _ACEOF
@@ -96362,7 +96572,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -91257,65 +40473,32 @@
+@@ -91444,65 +40525,32 @@
    return 0;
  }
  _ACEOF
@@ -96436,7 +96646,7 @@
  /* end confdefs.h.  */
  /* Define backtrace to an innocuous variant, in case <limits.h> declares backtrace.
     For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-@@ -91356,43 +40539,18 @@
+@@ -91543,43 +40591,18 @@
    return 0;
  }
  _ACEOF
@@ -96486,7 +96696,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_BACKTRACE 1
  _ACEOF
-@@ -91400,7 +40558,6 @@
+@@ -91587,7 +40610,6 @@
  fi
  
  
@@ -96494,15 +96704,14 @@
  if test x"$ac_cv_header_execinfo_h" = x"yes" -a x"$ac_cv_func_ext_backtrace" = x"yes";then
  
  	MAKE_SETTINGS="$MAKE_SETTINGS
-@@ -91431,362 +40588,43 @@
- "
+@@ -91619,102 +40641,12 @@
  
  
+ 
 -
 -
 -
--
--for ac_func in sigprocmask sigblock sigaction
+ for ac_func in sigprocmask sigblock sigaction
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
@@ -96595,16 +96804,20 @@
 -as_val=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
--  cat >>confdefs.h <<_ACEOF
--#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
--_ACEOF
++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
+@@ -91723,102 +40655,12 @@
+ done
+ 
+ 
 -
--fi
--done
--
--
--
--for ac_func in setsid
+ for ac_func in setsid
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
@@ -96697,16 +96910,19 @@
 -as_val=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
--  cat >>confdefs.h <<_ACEOF
++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 `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
--_ACEOF
--
--fi
--done
--
--
--#################################################
--# these tests are taken from the GNU fileutils package
++#define HAVE_SETSID 1
+ _ACEOF
+ 
+ fi
+@@ -91827,221 +40669,33 @@
+ 
+ #################################################
+ # these tests are taken from the GNU fileutils package
 -{ $as_echo "$as_me:$LINENO: checking how to get filesystem space usage..." >&5
 -$as_echo "$as_me: checking how to get filesystem space usage..." >&6;}
 -
@@ -96844,59 +97060,27 @@
 -  $as_echo_n "(cached) " >&6
 -else
 -  eval "$as_ac_Header=\$ac_header_preproc"
-+
-+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
+-fi
 -ac_res=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
 -$as_echo "$ac_res" >&6; }
-+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
+-
+-fi
 -as_val=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+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
-@@ -91796,65 +40634,16 @@
- done
- 
- 
+-  cat >>confdefs.h <<_ACEOF
+-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+-_ACEOF
 -
- for ac_header in sys/mount.h
+-fi
+-
+-done
+-
+-
+-
+-for ac_header in sys/mount.h
 -do
 -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
@@ -96911,11 +97095,9 @@
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
 -$ac_includes_default
-+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
+-#ifdef HAVE_SYS_PARAM_H
+-#include <sys/param.h>
+-#endif
 -
 -#include <$ac_header>
 -_ACEOF
@@ -96941,10 +97123,21 @@
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
++{ $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
+ 
 -	eval "$as_ac_Header=no"
--fi
--
+ fi
+ 
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -fi
 -ac_res=`eval 'as_val=${'$as_ac_Header'}
@@ -96954,6 +97147,15 @@
 -as_val=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
++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
@@ -96962,7 +97164,7 @@
  _ACEOF
  
  fi
-@@ -91867,19 +40656,15 @@
+@@ -92054,19 +40708,15 @@
  # Test for statvfs64.
  if test $space = no; then
    # SVR4
@@ -96986,7 +97188,7 @@
  /* end confdefs.h.  */
  
  #if defined(HAVE_UNISTD_H)
-@@ -91893,51 +40678,22 @@
+@@ -92080,51 +40730,22 @@
      exit (statvfs64 (".", &fsd));
    }
  _ACEOF
@@ -97044,7 +97246,7 @@
  
    fi
  fi
-@@ -91950,16 +40706,12 @@
+@@ -92137,16 +40758,12 @@
  # is what it gets when this test fails.
  if test $space = no; then
    # SVR4
@@ -97064,7 +97266,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <sys/statvfs.h>
-@@ -91971,64 +40723,33 @@
+@@ -92158,64 +40775,33 @@
    return 0;
  }
  _ACEOF
@@ -97138,7 +97340,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <sys/statvfs.h>
-@@ -92040,59 +40761,32 @@
+@@ -92227,59 +40813,32 @@
    return 0;
  }
  _ACEOF
@@ -97206,7 +97408,7 @@
  /* end confdefs.h.  */
  
  #include <sys/param.h>
-@@ -92105,71 +40799,38 @@
+@@ -92292,71 +40851,38 @@
      exit (statfs (".", &fsd, sizeof (struct statfs)));
    }
  _ACEOF
@@ -97288,7 +97490,7 @@
  /* end confdefs.h.  */
  
  #ifdef HAVE_SYS_PARAM_H
-@@ -92188,71 +40849,38 @@
+@@ -92375,71 +40901,38 @@
    exit (statfs (".", &fsd));
    }
  _ACEOF
@@ -97370,7 +97572,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <sys/statfs.h>
-@@ -92262,71 +40890,38 @@
+@@ -92449,71 +40942,38 @@
    exit (statfs (".", &fsd, sizeof fsd, 0));
    }
  _ACEOF
@@ -97452,7 +97654,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #ifdef HAVE_SYS_PARAM_H
-@@ -92342,71 +40937,38 @@
+@@ -92529,71 +40989,38 @@
    exit (statfs (".", &fsd));
    }
  _ACEOF
@@ -97534,7 +97736,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #ifdef HAVE_SYS_PARAM_H
-@@ -92426,201 +40988,33 @@
+@@ -92613,201 +41040,33 @@
    exit (statfs (".", &fsd) != 1);
    }
  _ACEOF
@@ -97747,7 +97949,7 @@
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
-@@ -92629,19 +41023,15 @@
+@@ -92816,19 +41075,15 @@
  
  done
  
@@ -97770,7 +97972,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -92659,46 +41049,15 @@
+@@ -92846,46 +41101,15 @@
    return 0;
  }
  _ACEOF
@@ -97821,7 +98023,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -92716,65 +41075,32 @@
+@@ -92903,65 +41127,32 @@
    return 0;
  }
  _ACEOF
@@ -97895,7 +98097,7 @@
  /* end confdefs.h.  */
  /* Define flistxattr to an innocuous variant, in case <limits.h> declares flistxattr.
     For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-@@ -92815,50 +41141,24 @@
+@@ -93002,50 +41193,24 @@
    return 0;
  }
  _ACEOF
@@ -97952,7 +98154,7 @@
  MAKE_SETTINGS="$MAKE_SETTINGS
  XATTR_LIBS = ${XATTR_LIBS}
  XATTR_CFLAGS = ${XATTR_CFLAGS}
-@@ -92868,18 +41168,14 @@
+@@ -93055,18 +41220,14 @@
  
  
  if test x"$ac_cv_func_ext_flistxattr" = x"yes"; then
@@ -97974,7 +98176,7 @@
  /* end confdefs.h.  */
  
  	 	#include <sys/types.h>
-@@ -92902,48 +41198,23 @@
+@@ -93089,48 +41250,23 @@
    return 0;
  }
  _ACEOF
@@ -98028,7 +98230,7 @@
  
  
  	MAKE_SETTINGS="$MAKE_SETTINGS
-@@ -92955,20 +41226,16 @@
+@@ -93142,20 +41278,16 @@
  fi
  
  
@@ -98053,7 +98255,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <sys/capability.h>
-@@ -92983,117 +41250,55 @@
+@@ -93170,117 +41302,55 @@
  }
  
  _ACEOF
@@ -98187,7 +98389,7 @@
  
  fi
  
-@@ -93101,7 +41306,7 @@
+@@ -93288,7 +41358,7 @@
  INCLUDED_POPT=auto
  
  # Check whether --with-included-popt was given.
@@ -98196,7 +98398,7 @@
    withval=$with_included_popt;  INCLUDED_POPT=$withval
  fi
  
-@@ -93110,169 +41315,26 @@
+@@ -93297,169 +41367,26 @@
  
  
  if test x"$INCLUDED_POPT" != x"yes"; then
@@ -98374,7 +98576,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -93290,43 +41352,18 @@
+@@ -93477,43 +41404,18 @@
    return 0;
  }
  _ACEOF
@@ -98424,7 +98626,7 @@
     POPT_LIBS="-lpopt"
  fi
  
-@@ -93338,9 +41375,9 @@
+@@ -93525,9 +41427,9 @@
  	fi
  fi
  
@@ -98436,19 +98638,19 @@
  $as_echo "$INCLUDED_POPT" >&6; }
  if test x"$INCLUDED_POPT" != x"no"; then
  			poptdir=""
-@@ -93353,157 +41390,17 @@
- 			break
+@@ -93541,156 +41443,16 @@
  		fi
  	done
--        if test x"$poptdir" = "x"; then
+         if test x"$poptdir" = "x"; then
 -		{ { $as_echo "$as_me:$LINENO: error: cannot find popt source in $poptpaths" >&5
 -$as_echo "$as_me: error: cannot find popt source in $poptpaths" >&2;}
 -   { (exit 1); exit 1; }; }
--	fi
--	POPT_OBJ="popt.o findme.o poptconfig.o popthelp.o poptparse.o"
++		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`
@@ -98586,11 +98788,7 @@
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
 -$as_echo "$ac_res" >&6; }
-+        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"
- 
+-
 -fi
 -as_val=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
@@ -98604,7 +98802,7 @@
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
-@@ -93542,12 +41439,10 @@
+@@ -93729,12 +41491,10 @@
  LOOK_DIRS="/usr /usr/local /sw"
  
  # Check whether --with-libiconv was given.
@@ -98619,7 +98817,7 @@
    else
       if test "$withval" != "yes" ; then
  
-@@ -93559,26 +41454,20 @@
+@@ -93746,65 +41506,36 @@
  	LIBS=-liconv
  
  
@@ -98653,11 +98851,16 @@
 +  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
  #include <stdlib.h>
- #include <giconv.h>
-@@ -93591,33 +41480,10 @@
- }
- 
- _ACEOF
+-#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
 -rm -f conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -98681,17 +98884,27 @@
 -  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
 -  (exit $ac_status); }; }; then
 -  { $as_echo "$as_me:$LINENO: result: yes" >&5
+-$as_echo "yes" >&6; };
+-cat >>confdefs.h <<\_ACEOF
+-#define HAVE_GICONV_H 1
++#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; };
--cat >>confdefs.h <<\_ACEOF
--#define HAVE_GICONV_H 1
--_ACEOF
++$as_echo "yes" >&6; };
 +$as_echo "#define HAVE_GICONV_H 1" >>confdefs.h
  
  		ICONV_FOUND=yes;
  		ICONV_CPPFLAGS="$CPPFLAGS"
-@@ -93625,29 +41491,17 @@
+@@ -93812,29 +41543,17 @@
  		ICONV_LDFLAGS="$LDFLAGS"
  
  else
@@ -98726,7 +98939,7 @@
  /* end confdefs.h.  */
  #include <stdlib.h>
  #include <iconv.h>
-@@ -93660,33 +41514,10 @@
+@@ -93847,33 +41566,10 @@
  }
  
  _ACEOF
@@ -98763,7 +98976,7 @@
  
  		ICONV_FOUND=yes;
  		ICONV_CPPFLAGS="$CPPFLAGS"
-@@ -93694,28 +41525,17 @@
+@@ -93881,28 +41577,17 @@
  		ICONV_LDFLAGS="$LDFLAGS"
  
  else
@@ -98798,7 +99011,7 @@
  /* end confdefs.h.  */
  #include <stdlib.h>
  #include <giconv.h>
-@@ -93728,33 +41548,10 @@
+@@ -93915,33 +41600,10 @@
  }
  
  _ACEOF
@@ -98835,7 +99048,7 @@
  
  		ICONV_FOUND=yes;
  		ICONV_CPPFLAGS="$CPPFLAGS"
-@@ -93762,31 +41559,22 @@
+@@ -93949,31 +41611,22 @@
  		ICONV_LDFLAGS="$LDFLAGS"
  
  else
@@ -98873,7 +99086,7 @@
  	CPPFLAGS="$save_CPPFLAGS"
  	LDFLAGS="$save_LDFLAGS"
  	LIBS="$save_LIBS"
-@@ -93799,17 +41587,13 @@
+@@ -93986,17 +41639,13 @@
  
  if test x$ICONV_FOUND = xno; then
  
@@ -98895,7 +99108,7 @@
  /* end confdefs.h.  */
  #include <stdlib.h>
  #include <iconv.h>
-@@ -93822,49 +41606,20 @@
+@@ -94009,49 +41658,20 @@
  }
  
  _ACEOF
@@ -98951,7 +99164,7 @@
  fi
  
  for i in $LOOK_DIRS ; do
-@@ -93881,24 +41636,20 @@
+@@ -94068,24 +41688,20 @@
  	LIBS=-liconv
  
  
@@ -98983,7 +99196,7 @@
  /* end confdefs.h.  */
  #include <stdlib.h>
  #include <giconv.h>
-@@ -93911,33 +41662,10 @@
+@@ -94098,33 +41714,10 @@
  }
  
  _ACEOF
@@ -99020,7 +99233,7 @@
  
  		ICONV_FOUND=yes
  		ICONV_CPPFLAGS="$CPPFLAGS"
-@@ -93945,27 +41673,17 @@
+@@ -94132,27 +41725,17 @@
  		ICONV_LDFLAGS="$LDFLAGS"
  
  else
@@ -99052,7 +99265,7 @@
  /* end confdefs.h.  */
  #include <stdlib.h>
  #include <iconv.h>
-@@ -93978,33 +41696,10 @@
+@@ -94165,33 +41748,10 @@
  }
  
  _ACEOF
@@ -99089,7 +99302,7 @@
  
  		ICONV_FOUND=yes
  		ICONV_CPPFLAGS="$CPPFLAGS"
-@@ -94012,26 +41707,17 @@
+@@ -94199,26 +41759,17 @@
  		ICONV_LDFLAGS="$LDFLAGS"
  
  else
@@ -99121,7 +99334,7 @@
  /* end confdefs.h.  */
  #include <stdlib.h>
  #include <giconv.h>
-@@ -94044,33 +41730,10 @@
+@@ -94231,33 +41782,10 @@
  }
  
  _ACEOF
@@ -99158,7 +99371,7 @@
  
  		ICONV_FOUND=yes
  		ICONV_CPPFLAGS="$CPPFLAGS"
-@@ -94078,29 +41741,22 @@
+@@ -94265,29 +41793,22 @@
  		ICONV_LDFLAGS="$LDFLAGS"
  
  else
@@ -99193,7 +99406,7 @@
  	CPPFLAGS="$save_CPPFLAGS"
  	LDFLAGS="$save_LDFLAGS"
  	LIBS="$save_LIBS"
-@@ -94108,7 +41764,7 @@
+@@ -94295,7 +41816,7 @@
  done
  
  if test x"$ICONV_FOUND" = x"no"; then
@@ -99202,7 +99415,7 @@
      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;}
-@@ -94121,9 +41777,7 @@
+@@ -94308,9 +41829,7 @@
  
  else
  
@@ -99213,7 +99426,7 @@
  
  
  	MAKE_SETTINGS="$MAKE_SETTINGS
-@@ -94144,203 +41798,23 @@
+@@ -94331,203 +41850,23 @@
  
  
  
@@ -99425,7 +99638,7 @@
  _ACEOF
  
  fi
-@@ -94419,151 +41893,12 @@
+@@ -94606,151 +41945,12 @@
  
  
  
@@ -99581,7 +99794,7 @@
  _ACEOF
  
  fi
-@@ -94573,23 +41908,17 @@
+@@ -94760,23 +41960,17 @@
  
  
  
@@ -99608,7 +99821,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -94607,54 +41936,28 @@
+@@ -94794,54 +41988,28 @@
    return 0;
  }
  _ACEOF
@@ -99670,7 +99883,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_LIBZ 1
  _ACEOF
-@@ -94670,18 +41973,13 @@
+@@ -94857,18 +42025,13 @@
  
  fi
  
@@ -99692,7 +99905,7 @@
  /* end confdefs.h.  */
  
  		#include <zlib.h>
-@@ -94699,40 +41997,19 @@
+@@ -94886,40 +42049,19 @@
    return 0;
  }
  _ACEOF
@@ -99735,7 +99948,7 @@
  $as_echo "$samba_cv_zlib_1_2_3" >&6; }
  
  if test x"$ac_cv_header_zlib_h" = x"yes" -a \
-@@ -94791,9 +42068,9 @@
+@@ -94978,9 +42120,9 @@
  	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
@@ -99747,7 +99960,7 @@
    $as_echo_n "(cached) " >&6
  else
    case $PKG_CONFIG in
-@@ -94806,14 +42083,14 @@
+@@ -94993,14 +42135,14 @@
  do
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
@@ -99765,7 +99978,7 @@
  IFS=$as_save_IFS
  
    test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
-@@ -94822,10 +42099,10 @@
+@@ -95009,10 +42151,10 @@
  fi
  PKG_CONFIG=$ac_cv_path_PKG_CONFIG
  if test -n "$PKG_CONFIG"; then
@@ -99778,7 +99991,7 @@
  $as_echo "no" >&6; }
  fi
  
-@@ -94841,52 +42118,27 @@
+@@ -95028,52 +42170,27 @@
  	else
  		SAMBA_PKG_CONFIG_MIN_VERSION="0.9.0"
  		if $PKG_CONFIG --atleast-pkgconfig-version $SAMBA_PKG_CONFIG_MIN_VERSION; then
@@ -99838,7 +100051,7 @@
  
  	MAKE_SETTINGS="$MAKE_SETTINGS
  LIBTALLOC_ENABLE = YES
-@@ -94894,22 +42146,16 @@
+@@ -95081,22 +42198,16 @@
  SMB_INFO_ENABLES="$SMB_INFO_ENABLES
  \$enabled{LIBTALLOC} = \"YES\";"
  
@@ -99865,7 +100078,7 @@
  				CFLAGS="$OLD_CFLAGS"
  
  
-@@ -94924,7 +42170,7 @@
+@@ -95111,7 +42222,7 @@
  				ac_cv_LIBTALLOC_found=yes
  
  			else
@@ -99874,7 +100087,7 @@
  $as_echo "no" >&6; }
  				$PKG_CONFIG --errors-to-stdout --print-errors 'talloc >= $TALLOC_MIN_VERSION'
  				ac_cv_LIBTALLOC_found=no
-@@ -94954,9 +42200,9 @@
+@@ -95141,9 +42252,9 @@
  	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
@@ -99886,7 +100099,7 @@
    $as_echo_n "(cached) " >&6
  else
    case $PKG_CONFIG in
-@@ -94969,14 +42215,14 @@
+@@ -95156,14 +42267,14 @@
  do
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
@@ -99904,7 +100117,7 @@
  IFS=$as_save_IFS
  
    test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
-@@ -94985,10 +42231,10 @@
+@@ -95172,10 +42283,10 @@
  fi
  PKG_CONFIG=$ac_cv_path_PKG_CONFIG
  if test -n "$PKG_CONFIG"; then
@@ -99917,7 +100130,7 @@
  $as_echo "no" >&6; }
  fi
  
-@@ -95004,52 +42250,27 @@
+@@ -95191,52 +42302,27 @@
  	else
  		SAMBA_PKG_CONFIG_MIN_VERSION="0.9.0"
  		if $PKG_CONFIG --atleast-pkgconfig-version $SAMBA_PKG_CONFIG_MIN_VERSION; then
@@ -99977,7 +100190,7 @@
  
  	MAKE_SETTINGS="$MAKE_SETTINGS
  LIBTDB_ENABLE = YES
-@@ -95057,22 +42278,16 @@
+@@ -95244,22 +42330,16 @@
  SMB_INFO_ENABLES="$SMB_INFO_ENABLES
  \$enabled{LIBTDB} = \"YES\";"
  
@@ -100004,7 +100217,7 @@
  				CFLAGS="$OLD_CFLAGS"
  
  
-@@ -95087,7 +42302,7 @@
+@@ -95274,7 +42354,7 @@
  				ac_cv_LIBTDB_found=yes
  
  			else
@@ -100013,7 +100226,7 @@
  $as_echo "no" >&6; }
  				$PKG_CONFIG --errors-to-stdout --print-errors 'tdb >= $TDB_MIN_VERSION'
  				ac_cv_LIBTDB_found=no
-@@ -95112,9 +42327,7 @@
+@@ -95299,9 +42379,7 @@
  	fi
  done
  if test x"$tdbdir" = "x"; then
@@ -100024,7 +100237,7 @@
  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"
-@@ -95127,104 +42340,12 @@
+@@ -95314,104 +42392,12 @@
  TDB_CFLAGS="-I$tdbdir/include"
  
  
@@ -100134,14 +100347,14 @@
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
  _ACEOF
-@@ -95232,151 +42353,12 @@
+@@ -95419,151 +42405,12 @@
  fi
  done
  
 -
 -
 -
--for ac_header in getopt.h sys/select.h sys/time.h
+ 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`
 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
@@ -100283,7 +100496,6 @@
 -as_val=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+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"
@@ -100292,7 +100504,7 @@
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
-@@ -95387,17 +42369,13 @@
+@@ -95574,17 +42421,13 @@
  
  
  
@@ -100313,7 +100525,7 @@
  /* end confdefs.h.  */
  #include <unistd.h>
  int
-@@ -95408,56 +42386,29 @@
+@@ -95595,56 +42438,29 @@
    return 0;
  }
  _ACEOF
@@ -100377,7 +100589,7 @@
  /* end confdefs.h.  */
  #include <unistd.h>
  int
-@@ -95468,41 +42419,18 @@
+@@ -95655,41 +42471,18 @@
    return 0;
  }
  _ACEOF
@@ -100423,7 +100635,7 @@
  
   fi
  
-@@ -95528,9 +42456,9 @@
+@@ -95715,9 +42508,9 @@
  	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
@@ -100435,7 +100647,7 @@
    $as_echo_n "(cached) " >&6
  else
    case $PKG_CONFIG in
-@@ -95543,14 +42471,14 @@
+@@ -95730,14 +42523,14 @@
  do
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
@@ -100453,7 +100665,7 @@
  IFS=$as_save_IFS
  
    test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
-@@ -95559,10 +42487,10 @@
+@@ -95746,10 +42539,10 @@
  fi
  PKG_CONFIG=$ac_cv_path_PKG_CONFIG
  if test -n "$PKG_CONFIG"; then
@@ -100466,7 +100678,7 @@
  $as_echo "no" >&6; }
  fi
  
-@@ -95578,52 +42506,27 @@
+@@ -95765,52 +42558,27 @@
  	else
  		SAMBA_PKG_CONFIG_MIN_VERSION="0.9.0"
  		if $PKG_CONFIG --atleast-pkgconfig-version $SAMBA_PKG_CONFIG_MIN_VERSION; then
@@ -100526,7 +100738,7 @@
  
  	MAKE_SETTINGS="$MAKE_SETTINGS
  LIBTEVENT_ENABLE = YES
-@@ -95631,22 +42534,16 @@
+@@ -95818,22 +42586,16 @@
  SMB_INFO_ENABLES="$SMB_INFO_ENABLES
  \$enabled{LIBTEVENT} = \"YES\";"
  
@@ -100553,7 +100765,7 @@
  				CFLAGS="$OLD_CFLAGS"
  
  
-@@ -95661,7 +42558,7 @@
+@@ -95848,7 +42610,7 @@
  				ac_cv_LIBTEVENT_found=yes
  
  			else
@@ -100562,7 +100774,7 @@
  $as_echo "no" >&6; }
  				$PKG_CONFIG --errors-to-stdout --print-errors 'tevent = $TEVENT_REQUIRED_VERSION'
  				ac_cv_LIBTEVENT_found=no
-@@ -95690,9 +42587,7 @@
+@@ -95877,9 +42639,7 @@
  		fi
  	done
  	if test x"$teventdir" = "x"; then
@@ -100573,7 +100785,7 @@
  	fi
  fi
  
-@@ -95710,253 +42605,24 @@
+@@ -95897,253 +42657,24 @@
  TEVENT_OBJ="$TEVENT_OBJ tevent_req.o tevent_wakeup.o tevent_queue.o"
  TEVENT_OBJ="$TEVENT_OBJ tevent_standard.o tevent_select.o"
  
@@ -100835,7 +101047,7 @@
  _ACEOF
  
  fi
-@@ -95965,9 +42631,7 @@
+@@ -96152,9 +42683,7 @@
  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"
  
@@ -100846,7 +101058,7 @@
  
  fi
  
-@@ -96029,9 +42693,9 @@
+@@ -96216,9 +42745,9 @@
  	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
@@ -100858,7 +101070,7 @@
    $as_echo_n "(cached) " >&6
  else
    case $PKG_CONFIG in
-@@ -96044,14 +42708,14 @@
+@@ -96231,14 +42760,14 @@
  do
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
@@ -100876,7 +101088,7 @@
  IFS=$as_save_IFS
  
    test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
-@@ -96060,10 +42724,10 @@
+@@ -96247,10 +42776,10 @@
  fi
  PKG_CONFIG=$ac_cv_path_PKG_CONFIG
  if test -n "$PKG_CONFIG"; then
@@ -100889,7 +101101,7 @@
  $as_echo "no" >&6; }
  fi
  
-@@ -96079,52 +42743,27 @@
+@@ -96266,52 +42795,27 @@
  	else
  		SAMBA_PKG_CONFIG_MIN_VERSION="0.9.0"
  		if $PKG_CONFIG --atleast-pkgconfig-version $SAMBA_PKG_CONFIG_MIN_VERSION; then
@@ -100949,7 +101161,7 @@
  
  	MAKE_SETTINGS="$MAKE_SETTINGS
  LIBLDB_ENABLE = YES
-@@ -96132,22 +42771,16 @@
+@@ -96319,22 +42823,16 @@
  SMB_INFO_ENABLES="$SMB_INFO_ENABLES
  \$enabled{LIBLDB} = \"YES\";"
  
@@ -100976,7 +101188,7 @@
  				CFLAGS="$OLD_CFLAGS"
  
  
-@@ -96162,7 +42795,7 @@
+@@ -96349,7 +42847,7 @@
  				ac_cv_LIBLDB_found=yes
  
  			else
@@ -100985,7 +101197,7 @@
  $as_echo "no" >&6; }
  				$PKG_CONFIG --errors-to-stdout --print-errors 'ldb = $LDB_REQUIRED_VERSION'
  				ac_cv_LIBLDB_found=no
-@@ -96208,12 +42841,12 @@
+@@ -96395,12 +42893,12 @@
  
  SQLITE3_LIBS=""
  with_sqlite3_support=no
@@ -101000,7 +101212,7 @@
    withval=$with_sqlite3;  case "$withval" in
      yes|no|auto)
  	with_sqlite3_support=$withval
-@@ -96222,157 +42855,18 @@
+@@ -96409,157 +42907,18 @@
  fi
  
  
@@ -101164,7 +101376,7 @@
  _ACEOF
  
  fi
-@@ -96382,11 +42876,9 @@
+@@ -96569,11 +42928,9 @@
  
    if test x"$ac_cv_header_sqlite3_h" != x"yes"; then
  	if test x"$with_sqlite3_support" = x"yes"; then
@@ -101178,7 +101390,7 @@
  $as_echo "$as_me: WARNING: sqlite3.h is needed for SQLITE3 support" >&2;}
  	fi
  
-@@ -96401,23 +42893,17 @@
+@@ -96588,23 +42945,17 @@
    # now see if we can find the sqlite3 libs in standard paths
  
  
@@ -101205,7 +101417,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -96435,54 +42921,28 @@
+@@ -96622,54 +42973,28 @@
    return 0;
  }
  _ACEOF
@@ -101267,7 +101479,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_LIBSQLITE3 1
  _ACEOF
-@@ -96498,21 +42958,16 @@
+@@ -96685,21 +43010,16 @@
  
  fi
  
@@ -101293,7 +101505,7 @@
  $as_echo "yes" >&6; }
      with_sqlite3_support=yes
  
-@@ -96524,11 +42979,9 @@
+@@ -96711,11 +43031,9 @@
  
    else
      if test x"$with_sqlite3_support" = x"yes"; then
@@ -101307,7 +101519,7 @@
  $as_echo "$as_me: WARNING: libsqlite3 is needed for SQLITE3 support" >&2;}
      fi
  
-@@ -96589,7 +43042,7 @@
+@@ -96776,7 +43094,7 @@
  
  use_gnutls=auto
  # Check whether --enable-gnutls was given.
@@ -101316,7 +101528,7 @@
    enableval=$enable_gnutls; if test x$enable_gnutls = xno; then
          use_gnutls=no
      fi
-@@ -96603,9 +43056,9 @@
+@@ -96790,9 +43108,9 @@
  	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
@@ -101328,7 +101540,7 @@
    $as_echo_n "(cached) " >&6
  else
    case $PKG_CONFIG in
-@@ -96618,14 +43071,14 @@
+@@ -96805,14 +43123,14 @@
  do
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
@@ -101346,7 +101558,7 @@
  IFS=$as_save_IFS
  
    test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
-@@ -96634,10 +43087,10 @@
+@@ -96821,10 +43139,10 @@
  fi
  PKG_CONFIG=$ac_cv_path_PKG_CONFIG
  if test -n "$PKG_CONFIG"; then
@@ -101359,7 +101571,7 @@
  $as_echo "no" >&6; }
  fi
  
-@@ -96653,52 +43106,27 @@
+@@ -96840,52 +43158,27 @@
  	else
  		SAMBA_PKG_CONFIG_MIN_VERSION="0.9.0"
  		if $PKG_CONFIG --atleast-pkgconfig-version $SAMBA_PKG_CONFIG_MIN_VERSION; then
@@ -101419,7 +101631,7 @@
  
  	MAKE_SETTINGS="$MAKE_SETTINGS
  GNUTLS_ENABLE = YES
-@@ -96706,22 +43134,16 @@
+@@ -96893,22 +43186,16 @@
  SMB_INFO_ENABLES="$SMB_INFO_ENABLES
  \$enabled{GNUTLS} = \"YES\";"
  
@@ -101446,7 +101658,7 @@
  				CFLAGS="$OLD_CFLAGS"
  
  
-@@ -96736,7 +43158,7 @@
+@@ -96923,7 +43210,7 @@
  				ac_cv_GNUTLS_found=yes
  
  			else
@@ -101455,7 +101667,7 @@
  $as_echo "no" >&6; }
  				$PKG_CONFIG --errors-to-stdout --print-errors 'gnutls < 2.6.0'
  				ac_cv_GNUTLS_found=no
-@@ -96753,770 +43175,161 @@
+@@ -96940,770 +43227,161 @@
  		use_gnutls=no
  	fi
  
@@ -101807,12 +102019,11 @@
 -#ifndef gnutls_x509_crt_set_subject_key_id
 -  (void) gnutls_x509_crt_set_subject_key_id;
 -#endif
--
++fi
+ 
 -  ;
 -  return 0;
 -}
-+fi
-+
 +if test x$use_gnutls = xauto; then
 +	for ac_header in gnutls/gnutls.h
 +do :
@@ -102321,7 +102532,7 @@
  _ACEOF
  
  fi
-@@ -97525,23 +43338,17 @@
+@@ -97712,23 +43390,17 @@
  
  
  
@@ -102348,7 +102559,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -97559,54 +43366,28 @@
+@@ -97746,54 +43418,28 @@
    return 0;
  }
  _ACEOF
@@ -102410,7 +102621,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_LIBGCRYPT 1
  _ACEOF
-@@ -97622,7 +43403,6 @@
+@@ -97809,7 +43455,6 @@
  
  fi
  
@@ -102418,7 +102629,7 @@
  MAKE_SETTINGS="$MAKE_SETTINGS
  GCRYPT_LIBS = $GCRYPT_LIBS
  GCRYPT_CFLAGS =
-@@ -97660,19 +43440,17 @@
+@@ -97847,19 +43492,17 @@
  
  #################################################
  # check for pthread support
@@ -102442,7 +102653,7 @@
  		fi
  
  	MAKE_SETTINGS="$MAKE_SETTINGS
-@@ -97690,12 +43468,12 @@
+@@ -97877,12 +43520,12 @@
  
  	;;
  	*)
@@ -102457,7 +102668,7 @@
  $as_echo "no" >&6; }
  
  fi
-@@ -97711,274 +43489,45 @@
+@@ -97898,274 +43541,45 @@
  
  
  
@@ -102745,7 +102956,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -97996,54 +43545,28 @@
+@@ -98183,54 +43597,28 @@
    return 0;
  }
  _ACEOF
@@ -102807,7 +103018,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_LIBSETPROCTITLE 1
  _ACEOF
-@@ -98059,15 +43582,14 @@
+@@ -98246,15 +43634,14 @@
  
  fi
  
@@ -102825,7 +103036,7 @@
  $as_echo "yes" >&6; }
  
  	MAKE_SETTINGS="$MAKE_SETTINGS
-@@ -98077,22 +43599,20 @@
+@@ -98264,22 +43651,20 @@
  \$enabled{SETPROCTITLE} = \"YES\";"
  
  
@@ -102852,7 +103063,7 @@
  $as_echo "no" >&6; }
  
  fi
-@@ -98110,17 +43630,13 @@
+@@ -98297,17 +43682,13 @@
  
  
  
@@ -102873,7 +103084,7 @@
  /* end confdefs.h.  */
  
  #include <sys/types.h>
-@@ -98139,209 +43655,43 @@
+@@ -98326,209 +43707,43 @@
    return 0;
  }
  _ACEOF
@@ -103094,7 +103305,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -98359,46 +43709,15 @@
+@@ -98546,46 +43761,15 @@
    return 0;
  }
  _ACEOF
@@ -103145,15 +103356,10 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -98411,70 +43730,37 @@
- int
- main ()
- {
--return blkid_get_cache ();
--  ;
--  return 0;
--}
--_ACEOF
+@@ -98603,65 +43787,32 @@
+   return 0;
+ }
+ _ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -103175,19 +103381,15 @@
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
-+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
+-break
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -
++break
  fi
 -
 -rm -rf conftest.dSYM
@@ -103229,7 +103431,7 @@
  /* 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.  */
-@@ -98515,50 +43801,24 @@
+@@ -98702,50 +43853,24 @@
    return 0;
  }
  _ACEOF
@@ -103286,7 +103488,7 @@
  MAKE_SETTINGS="$MAKE_SETTINGS
  BLKID_LIBS = ${BLKID_LIBS}
  BLKID_CFLAGS = ${BLKID_CFLAGS}
-@@ -98569,9 +43829,7 @@
+@@ -98756,9 +43881,7 @@
  
  if test x"$ac_cv_func_ext_blkid_get_cache" = x"yes"; then
  
@@ -103297,7 +103499,7 @@
  
  
  	MAKE_SETTINGS="$MAKE_SETTINGS
-@@ -98599,102 +43857,12 @@
+@@ -98786,102 +43909,12 @@
  
  fi
  
@@ -103404,7 +103606,7 @@
  _ACEOF
  
  fi
-@@ -98704,151 +43872,12 @@
+@@ -98891,151 +43924,12 @@
  ###############################
  # start SMB_EXT_LIB_PAM
  # check for security/pam_appl.h and -lpam
@@ -103560,7 +103762,7 @@
  _ACEOF
  
  fi
-@@ -98857,23 +43886,17 @@
+@@ -99044,23 +43938,17 @@
  
  
  
@@ -103587,7 +103789,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -98891,54 +43914,28 @@
+@@ -99078,54 +43966,28 @@
    return 0;
  }
  _ACEOF
@@ -103649,7 +103851,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_LIBPAM 1
  _ACEOF
-@@ -98953,7 +43950,6 @@
+@@ -99140,7 +44002,6 @@
  
  
  fi
@@ -103657,7 +103859,7 @@
  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
-@@ -98979,23 +43975,17 @@
+@@ -99166,23 +44027,17 @@
  # test for where we get crypt() from
  
  
@@ -103684,7 +103886,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -99013,54 +44003,28 @@
+@@ -99200,54 +44055,28 @@
    return 0;
  }
  _ACEOF
@@ -103746,7 +103948,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_LIBCRYPT 1
  _ACEOF
-@@ -99076,7 +44040,6 @@
+@@ -99263,7 +44092,6 @@
  
  fi
  
@@ -103754,7 +103956,7 @@
  	MAKE_SETTINGS="$MAKE_SETTINGS
  CRYPT_ENABLE = YES
  "
-@@ -99093,102 +44056,12 @@
+@@ -99280,102 +44108,12 @@
  
  
  
@@ -103862,7 +104064,7 @@
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
  _ACEOF
-@@ -99197,151 +44070,12 @@
+@@ -99384,151 +44122,12 @@
  done
  
  
@@ -104018,17 +104220,17 @@
  _ACEOF
  
  fi
-@@ -99350,330 +44084,18 @@
+@@ -99537,330 +44136,18 @@
  
  
  
 -
  ac_check_lib_ext_save_LIBS=$LIBS
- LIBS="-lsasl2 $SASL_LIBS  $LIBS"
- 
- 
- 
+-LIBS="-lsasl2 $SASL_LIBS  $LIBS"
 -
+-
+-
+-
 -        { $as_echo "$as_me:$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
@@ -104322,38 +104524,42 @@
 -{ $as_echo "$as_me:$LINENO: checking for inotify_init" >&5
 -$as_echo_n "checking for inotify_init... " >&6; }
 -if test "${ac_cv_func_inotify_init+set}" = set; then
-+        { $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
+-  $as_echo_n "(cached) " >&6
+-else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
+-/* end confdefs.h.  */
 -/* Define inotify_init to an innocuous variant, in case <limits.h> declares inotify_init.
 -   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
 -#define inotify_init innocuous_inotify_init
--
++LIBS="-lsasl2 $SASL_LIBS  $LIBS"
+ 
 -/* System header to define __stub macros and hopefully few prototypes,
 -    which can conflict with char inotify_init (); 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 inotify_init
++        { $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
-@@ -99681,70 +44103,125 @@
+@@ -99868,70 +44155,125 @@
  #ifdef __cplusplus
  extern "C"
  #endif
@@ -104525,7 +104731,7 @@
  /* end confdefs.h.  */
  #include <asm/unistd.h>
  int
-@@ -99755,41 +44232,18 @@
+@@ -99942,41 +44284,18 @@
    return 0;
  }
  _ACEOF
@@ -104571,7 +104777,7 @@
  
   fi
  
-@@ -99833,17 +44287,13 @@
+@@ -100020,17 +44339,13 @@
  fi
  
  
@@ -104592,7 +104798,7 @@
  /* end confdefs.h.  */
  #include <fcntl.h>
  int
-@@ -99854,56 +44304,29 @@
+@@ -100041,56 +44356,29 @@
    return 0;
  }
  _ACEOF
@@ -104656,7 +104862,7 @@
  /* end confdefs.h.  */
  #include <signal.h>
  int
-@@ -99914,41 +44337,18 @@
+@@ -100101,41 +44389,18 @@
    return 0;
  }
  _ACEOF
@@ -104702,7 +104908,7 @@
  
   fi
  
-@@ -99972,151 +44372,12 @@
+@@ -100159,151 +44424,12 @@
  
  fi
  
@@ -104859,7 +105065,7 @@
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
-@@ -100430,151 +44691,12 @@
+@@ -100617,151 +44743,12 @@
  
  
  
@@ -105015,7 +105221,7 @@
  _ACEOF
  
  fi
-@@ -100584,23 +44706,17 @@
+@@ -100771,23 +44758,17 @@
  
  
  
@@ -105042,7 +105248,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -100618,54 +44734,28 @@
+@@ -100805,54 +44786,28 @@
    return 0;
  }
  _ACEOF
@@ -105104,7 +105310,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_LIBZ 1
  _ACEOF
-@@ -100681,18 +44771,13 @@
+@@ -100868,18 +44823,13 @@
  
  fi
  
@@ -105126,7 +105332,7 @@
  /* end confdefs.h.  */
  
  		#include <zlib.h>
-@@ -100710,40 +44795,19 @@
+@@ -100897,40 +44847,19 @@
    return 0;
  }
  _ACEOF
@@ -105169,7 +105375,7 @@
  $as_echo "$samba_cv_zlib_1_2_3" >&6; }
  
  if test x"$ac_cv_header_zlib_h" = x"yes" -a \
-@@ -100857,87 +44921,54 @@
+@@ -101044,87 +44973,54 @@
  #################################################
  # Display summary of libraries detected
  
@@ -105273,7 +105479,7 @@
  if test x"$krb5_developer" = x"yes" -o x"$developer" = x"yes" -o x"$picky_developer" = x"yes"; then
      CFLAGS="${CFLAGS} \$(DEVELOPER_CFLAGS)"
  fi
-@@ -100996,13 +45027,13 @@
+@@ -101183,13 +45079,13 @@
      case $ac_val in #(
      *${as_nl}*)
        case $ac_var in #(
@@ -105289,7 +105495,7 @@
        esac ;;
      esac
    done
-@@ -101010,8 +45041,8 @@
+@@ -101197,8 +45093,8 @@
    (set) 2>&1 |
      case $as_nl`(ac_space=' '; set) 2>&1` in #(
      *${as_nl}ac_space=\ *)
@@ -105300,7 +105506,7 @@
        sed -n \
  	"s/'/'\\\\''/g;
  	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
-@@ -101034,11 +45065,11 @@
+@@ -101221,11 +45117,11 @@
  if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
    if test -w "$cache_file"; then
      test "x$cache_file" != "x/dev/null" &&
@@ -105314,7 +105520,7 @@
  $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
    fi
  fi
-@@ -101058,8 +45089,8 @@
+@@ -101245,8 +45141,8 @@
    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.
@@ -105325,7 +105531,7 @@
  done
  LIBOBJS=$ac_libobjs
  
-@@ -101083,9 +45114,10 @@
+@@ -101270,9 +45166,10 @@
  ac_write_fail=0
  ac_clean_files_save=$ac_clean_files
  ac_clean_files="$ac_clean_files $CONFIG_STATUS"
@@ -105338,7 +105544,7 @@
  #! $SHELL
  # Generated by $as_me.
  # Run this file to recreate the current configuration.
-@@ -101095,17 +45127,18 @@
+@@ -101282,17 +45179,18 @@
  debug=false
  ac_cs_recheck=false
  ac_cs_silent=false
@@ -105364,7 +105570,7 @@
    emulate sh
    NULLCMD=:
    # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
-@@ -101113,23 +45146,15 @@
+@@ -101300,23 +45198,15 @@
    alias -g '${1+"$@"}'='"$@"'
    setopt NO_GLOB_SUBST
  else
@@ -105393,7 +105599,7 @@
  as_nl='
  '
  export as_nl
-@@ -101137,7 +45162,13 @@
+@@ -101324,7 +45214,13 @@
  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
@@ -105408,7 +105614,7 @@
    as_echo='printf %s\n'
    as_echo_n='printf %s'
  else
-@@ -101148,7 +45179,7 @@
+@@ -101335,7 +45231,7 @@
      as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
      as_echo_n_body='eval
        arg=$1;
@@ -105417,7 +105623,7 @@
        *"$as_nl"*)
  	expr "X$arg" : "X\\(.*\\)$as_nl";
  	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
-@@ -101171,13 +45202,6 @@
+@@ -101358,13 +45254,6 @@
    }
  fi
  
@@ -105431,7 +105637,7 @@
  
  # IFS
  # We need space, tab and new line, in precisely that order.  Quoting is
-@@ -101187,15 +45211,15 @@
+@@ -101374,15 +45263,15 @@
  IFS=" ""	$as_nl"
  
  # Find who we are.  Look in the path if we contain no directory separator.
@@ -105450,7 +105656,7 @@
  IFS=$as_save_IFS
  
       ;;
-@@ -101207,12 +45231,16 @@
+@@ -101394,12 +45283,16 @@
  fi
  if test ! -f "$as_myself"; then
    $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
@@ -105471,7 +105677,7 @@
  done
  PS1='$ '
  PS2='> '
-@@ -101224,7 +45252,89 @@
+@@ -101411,7 +45304,89 @@
  LANGUAGE=C
  export LANGUAGE
  
@@ -105562,7 +105768,7 @@
  if expr a : '\(a\)' >/dev/null 2>&1 &&
     test "X`expr 00001 : '.*\(...\)'`" = X001; then
    as_expr=expr
-@@ -101238,8 +45348,12 @@
+@@ -101425,8 +45400,12 @@
    as_basename=false
  fi
  
@@ -105576,7 +105782,7 @@
  as_me=`$as_basename -- "$0" ||
  $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
  	 X"$0" : 'X\(//\)$' \| \
-@@ -101259,76 +45373,25 @@
+@@ -101446,76 +45425,25 @@
  	  }
  	  s/.*/./; q'`
  
@@ -105664,7 +105870,7 @@
  
  rm -f conf$$ conf$$.exe conf$$.file
  if test -d conf$$.dir; then
-@@ -101357,8 +45420,56 @@
+@@ -101544,8 +45472,56 @@
  rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
  rmdir conf$$.dir 2>/dev/null
  
@@ -105722,7 +105928,7 @@
  else
    test -d ./-p && rmdir ./-p
    as_mkdir_p=false
-@@ -101377,10 +45488,10 @@
+@@ -101564,10 +45540,10 @@
        if test -d "$1"; then
  	test -d "$1/.";
        else
@@ -105735,7 +105941,7 @@
  	???[sx]*):;;*)false;;esac;fi
      '\'' sh
    '
-@@ -101395,13 +45506,19 @@
+@@ -101582,13 +45558,19 @@
  
  
  exec 6>&1
@@ -105753,11 +105959,11 @@
  ac_log="
  This file was extended by Samba $as_me 3, which was
 -generated by GNU Autoconf 2.63.  Invocation command line was
-+generated by GNU Autoconf 2.64.  Invocation command line was
++generated by GNU Autoconf 2.65.  Invocation command line was
  
    CONFIG_FILES    = $CONFIG_FILES
    CONFIG_HEADERS  = $CONFIG_HEADERS
-@@ -101433,10 +45550,11 @@
+@@ -101620,13 +45602,15 @@
  
  cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
  ac_cs_usage="\
@@ -105772,7 +105978,11 @@
  
    -h, --help       print this help, then exit
    -V, --version    print version number and configuration settings, then exit
-@@ -101458,16 +45576,16 @@
++      --config     print configuration, then exit
+   -q, --quiet, --silent
+                    do not print progress messages
+   -d, --debug      don't remove temporary files
+@@ -101645,16 +45629,17 @@
  Configuration commands:
  $config_commands
  
@@ -105781,18 +105991,29 @@
  
  _ACEOF
  cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
++ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
  ac_cs_version="\\
  Samba config.status 3
 -configured by $0, generated by GNU Autoconf 2.63,
-+configured by $0, generated by GNU Autoconf 2.64,
-   with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
+-  with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
++configured by $0, generated by GNU Autoconf 2.65,
++  with options \\"\$ac_cs_config\\"
  
 -Copyright (C) 2008 Free Software Foundation, Inc.
 +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."
  
-@@ -101509,20 +45627,19 @@
+@@ -101689,6 +45674,8 @@
+     ac_cs_recheck=: ;;
+   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
+     $as_echo "$ac_cs_version"; exit ;;
++  --config | --confi | --conf | --con | --co | --c )
++    $as_echo "$ac_cs_config"; exit ;;
+   --debug | --debu | --deb | --de | --d | -d )
+     debug=: ;;
+   --file | --fil | --fi | --f )
+@@ -101696,20 +45683,19 @@
      case $ac_optarg in
      *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
      esac
@@ -105817,7 +106038,7 @@
    --help | --hel | -h )
      $as_echo "$ac_cs_usage"; exit ;;
    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
-@@ -101530,11 +45647,10 @@
+@@ -101717,11 +45703,10 @@
      ac_cs_silent=: ;;
  
    # This is an error.
@@ -105832,7 +106053,7 @@
       ac_need_defaults=false ;;
  
    esac
-@@ -101627,9 +45743,7 @@
+@@ -101814,9 +45799,7 @@
      "pkgconfig/smbsharemodes.pc") CONFIG_FILES="$CONFIG_FILES pkgconfig/smbsharemodes.pc" ;;
      "../examples/libsmbclient/Makefile.internal") CONFIG_FILES="$CONFIG_FILES ../examples/libsmbclient/Makefile.internal" ;;
  
@@ -105843,7 +106064,7 @@
    esac
  done
  
-@@ -101656,7 +45770,7 @@
+@@ -101843,7 +45826,7 @@
    trap 'exit_status=$?
    { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
  ' 0
@@ -105852,7 +106073,7 @@
  }
  # Create a (secure) tmp directory for tmp files.
  
-@@ -101667,11 +45781,7 @@
+@@ -101854,11 +45837,7 @@
  {
    tmp=./conf$$-$RANDOM
    (umask 077 && mkdir "$tmp")
@@ -105865,7 +106086,7 @@
  
  # Set up the scripts for CONFIG_FILES section.
  # No need to generate them if there are no CONFIG_FILES.
-@@ -101679,10 +45789,16 @@
+@@ -101866,10 +45845,16 @@
  if test -n "$CONFIG_FILES"; then
  
  
@@ -105885,7 +106106,7 @@
  else
    ac_cs_awk_cr=$ac_cr
  fi
-@@ -101696,24 +45812,18 @@
+@@ -101883,24 +45868,18 @@
    echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
    echo "_ACEOF"
  } >conf$$subs.sh ||
@@ -105913,7 +106134,25 @@
    else
      ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
    fi
-@@ -101802,9 +45912,7 @@
+@@ -101922,7 +45901,7 @@
+ t delim
+ :nl
+ h
+-s/\(.\{148\}\).*/\1/
++s/\(.\{148\}\)..*/\1/
+ t more1
+ s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
+ p
+@@ -101936,7 +45915,7 @@
+ t nl
+ :delim
+ h
+-s/\(.\{148\}\).*/\1/
++s/\(.\{148\}\)..*/\1/
+ t more2
+ s/["\\]/\\&/g; s/^/"/; s/$/"/
+ p
+@@ -101989,9 +45968,7 @@
  else
    cat
  fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
@@ -105924,7 +106163,7 @@
  _ACEOF
  
  # VPATH may cause trouble with some makes, so we remove $(srcdir),
-@@ -101845,9 +45953,7 @@
+@@ -102032,9 +46009,7 @@
    if test -z "$ac_t"; then
      break
    elif $ac_last_try; then
@@ -105935,7 +106174,7 @@
    else
      ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
    fi
-@@ -101932,9 +46038,7 @@
+@@ -102119,9 +46094,7 @@
  _ACAWK
  _ACEOF
  cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
@@ -105946,7 +106185,7 @@
  fi # test -n "$CONFIG_HEADERS"
  
  
-@@ -101947,9 +46051,7 @@
+@@ -102134,9 +46107,7 @@
    esac
    case $ac_mode$ac_tag in
    :[FHL]*:*);;
@@ -105957,7 +106196,7 @@
    :[FH]-) ac_tag=-:-;;
    :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
    esac
-@@ -101977,12 +46079,10 @@
+@@ -102164,12 +46135,10 @@
  	   [\\/$]*) false;;
  	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
  	   esac ||
@@ -105972,7 +106211,7 @@
      done
  
      # Let's still pretend it is `configure' which instantiates (i.e., don't
-@@ -101993,7 +46093,7 @@
+@@ -102180,7 +46149,7 @@
  	`' by configure.'
      if test x"$ac_file" != x-; then
        configure_input="$ac_file.  $configure_input"
@@ -105981,7 +106220,7 @@
  $as_echo "$as_me: creating $ac_file" >&6;}
      fi
      # Neutralize special characters interpreted by sed in replacement strings.
-@@ -102006,9 +46106,7 @@
+@@ -102193,9 +46162,7 @@
  
      case $ac_tag in
      *:-:* | *:-) cat >"$tmp/stdin" \
@@ -105992,7 +106231,7 @@
      esac
      ;;
    esac
-@@ -102036,47 +46134,7 @@
+@@ -102223,47 +46190,7 @@
  	    q
  	  }
  	  s/.*/./; q'`
@@ -106041,7 +106280,7 @@
    ac_builddir=.
  
  case "$ac_dir" in
-@@ -102128,7 +46186,6 @@
+@@ -102315,7 +46242,6 @@
  # 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=
@@ -106049,7 +106288,7 @@
  ac_sed_dataroot='
  /datarootdir/ {
    p
-@@ -102138,12 +46195,11 @@
+@@ -102325,12 +46251,11 @@
  /@docdir@/p
  /@infodir@/p
  /@localedir@/p
@@ -106064,7 +106303,7 @@
  $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
  _ACEOF
  cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-@@ -102153,7 +46209,7 @@
+@@ -102340,7 +46265,7 @@
    s&@infodir@&$infodir&g
    s&@localedir@&$localedir&g
    s&@mandir@&$mandir&g
@@ -106073,7 +106312,7 @@
  esac
  _ACEOF
  
-@@ -102181,14 +46237,12 @@
+@@ -102368,14 +46293,12 @@
  $ac_datarootdir_hack
  "
  eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
@@ -106090,7 +106329,7 @@
  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;}
-@@ -102198,9 +46252,7 @@
+@@ -102385,9 +46308,7 @@
    -) cat "$tmp/out" && rm -f "$tmp/out";;
    *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
    esac \
@@ -106101,7 +106340,7 @@
   ;;
    :H)
    #
-@@ -102211,29 +46263,23 @@
+@@ -102398,29 +46319,23 @@
        $as_echo "/* $configure_input  */" \
        && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
      } >"$tmp/config.h" \
@@ -106136,7 +106375,7 @@
  $as_echo "$as_me: executing $ac_file commands" >&6;}
   ;;
    esac
-@@ -102259,15 +46305,12 @@
+@@ -102446,15 +46361,12 @@
  done # for ac_tag
  
  
@@ -106154,7 +106393,7 @@
  
  
  # configure is writing to config.log, and then calls config.status.
-@@ -102288,10 +46331,10 @@
+@@ -102475,10 +46387,10 @@
    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.
@@ -106167,7 +106406,7 @@
  $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
  fi
  
-@@ -102302,8 +46345,8 @@
+@@ -102489,8 +46401,8 @@
  # Print very concise instructions on building/use
  if test "x$enable_dmalloc" = xyes
  then




More information about the Pkg-samba-maint mailing list