[Pkg-samba-maint] r3632 - in branches/samba/backports.org/lenny: . debian debian/patches lib/util/charset libcli/auth librpc/gen_ndr librpc/ndr nsswitch packaging/RHEL packaging/RHEL-CTDB pidl/lib/Parse/Pidl/Samba3 source3 source3/include source3/lib source3/lib/netapi source3/libads source3/libsmb source3/modules source3/printing source3/registry source3/rpc_client source3/rpc_server source3/rpcclient source3/smbd source3/utils source3/winbindd

bubulle at alioth.debian.org bubulle at alioth.debian.org
Tue Oct 26 20:27:45 UTC 2010


tags 597203 pending
thanks

Author: bubulle
Date: 2010-10-26 20:27:36 +0000 (Tue, 26 Oct 2010)
New Revision: 3632

Modified:
   branches/samba/backports.org/lenny/WHATSNEW.txt
   branches/samba/backports.org/lenny/debian/changelog
   branches/samba/backports.org/lenny/debian/patches/autoconf.patch
   branches/samba/backports.org/lenny/lib/util/charset/charset.h
   branches/samba/backports.org/lenny/libcli/auth/credentials.c
   branches/samba/backports.org/lenny/libcli/auth/proto.h
   branches/samba/backports.org/lenny/librpc/gen_ndr/cli_epmapper.c
   branches/samba/backports.org/lenny/librpc/gen_ndr/cli_ntsvcs.c
   branches/samba/backports.org/lenny/librpc/gen_ndr/cli_winreg.c
   branches/samba/backports.org/lenny/librpc/ndr/libndr.h
   branches/samba/backports.org/lenny/librpc/ndr/uuid.c
   branches/samba/backports.org/lenny/nsswitch/wb_common.c
   branches/samba/backports.org/lenny/packaging/RHEL-CTDB/samba.spec
   branches/samba/backports.org/lenny/packaging/RHEL/makerpms.sh
   branches/samba/backports.org/lenny/packaging/RHEL/samba.spec
   branches/samba/backports.org/lenny/pidl/lib/Parse/Pidl/Samba3/ClientNDR.pm
   branches/samba/backports.org/lenny/source3/Makefile.in
   branches/samba/backports.org/lenny/source3/VERSION
   branches/samba/backports.org/lenny/source3/configure
   branches/samba/backports.org/lenny/source3/configure.in
   branches/samba/backports.org/lenny/source3/include/config.h.in
   branches/samba/backports.org/lenny/source3/include/proto.h
   branches/samba/backports.org/lenny/source3/include/version.h
   branches/samba/backports.org/lenny/source3/lib/netapi/cm.c
   branches/samba/backports.org/lenny/source3/lib/netapi/netapi_private.h
   branches/samba/backports.org/lenny/source3/lib/system.c
   branches/samba/backports.org/lenny/source3/lib/tdb_validate.c
   branches/samba/backports.org/lenny/source3/libads/sasl.c
   branches/samba/backports.org/lenny/source3/libsmb/cliconnect.c
   branches/samba/backports.org/lenny/source3/libsmb/clikrb5.c
   branches/samba/backports.org/lenny/source3/libsmb/climessage.c
   branches/samba/backports.org/lenny/source3/libsmb/clispnego.c
   branches/samba/backports.org/lenny/source3/libsmb/nmblib.c
   branches/samba/backports.org/lenny/source3/modules/vfs_acl_common.c
   branches/samba/backports.org/lenny/source3/printing/load.c
   branches/samba/backports.org/lenny/source3/printing/nt_printing.c
   branches/samba/backports.org/lenny/source3/registry/reg_api.c
   branches/samba/backports.org/lenny/source3/rpc_client/cli_pipe.c
   branches/samba/backports.org/lenny/source3/rpc_client/init_spoolss.c
   branches/samba/backports.org/lenny/source3/rpc_server/srv_pipe.c
   branches/samba/backports.org/lenny/source3/rpc_server/srv_spoolss_nt.c
   branches/samba/backports.org/lenny/source3/rpc_server/srv_winreg_nt.c
   branches/samba/backports.org/lenny/source3/rpcclient/cmd_spoolss.c
   branches/samba/backports.org/lenny/source3/rpcclient/rpcclient.c
   branches/samba/backports.org/lenny/source3/smbd/fileio.c
   branches/samba/backports.org/lenny/source3/smbd/notify.c
   branches/samba/backports.org/lenny/source3/smbd/open.c
   branches/samba/backports.org/lenny/source3/smbd/oplock.c
   branches/samba/backports.org/lenny/source3/smbd/process.c
   branches/samba/backports.org/lenny/source3/smbd/reply.c
   branches/samba/backports.org/lenny/source3/smbd/sesssetup.c
   branches/samba/backports.org/lenny/source3/smbd/trans2.c
   branches/samba/backports.org/lenny/source3/utils/net_ads.c
   branches/samba/backports.org/lenny/source3/utils/net_rpc_printer.c
   branches/samba/backports.org/lenny/source3/utils/net_rpc_registry.c
   branches/samba/backports.org/lenny/source3/utils/profiles.c
   branches/samba/backports.org/lenny/source3/utils/smbfilter.c
   branches/samba/backports.org/lenny/source3/winbindd/winbindd_cm.c
   branches/samba/backports.org/lenny/source3/winbindd/winbindd_dual_srv.c
   branches/samba/backports.org/lenny/source3/winbindd/winbindd_pam.c
Log:
Merge 3.5.6

Modified: branches/samba/backports.org/lenny/WHATSNEW.txt
===================================================================
--- branches/samba/backports.org/lenny/WHATSNEW.txt	2010-10-23 19:21:11 UTC (rev 3631)
+++ branches/samba/backports.org/lenny/WHATSNEW.txt	2010-10-26 20:27:36 UTC (rev 3632)
@@ -1,4 +1,103 @@
                    =============================
+                   Release Notes for Samba 3.5.6
+			  October 8, 2010
+                   =============================
+
+
+This is the latest stable release of Samba 3.5.
+
+Major enhancements in Samba 3.5.6 include:
+
+  o Fix smbd panic on invalid NetBIOS session request (bug #7698).
+  o Fix smbd crash caused by "%D" in "printer admin" (bug #7541).
+  o Fix crash bug with invalid SPNEGO token (bug #7694).
+  o Fix Winbind internal error (bug #7636).
+
+
+Changes since 3.5.5
+-------------------
+
+
+o   Jeremy Allison <jra at samba.org>
+    * BUG 7577: Fix SPNEGO auth when contacting Win7 system using Microsoft Live
+      Sign-in Assistant.
+    * BUG 7578: Fix 'net idmap restore' setting HWM to avoid duplicates.
+    * BUG 7581: Fix "admin users" when using vfs_acl_xattr.
+    * BUG 7583: Fix smbclient to connect to Alfresco JLAN CIFS server using
+      Kerberos.
+    * BUG 7589: Fix using cached credentials in ntlm_auth.
+    * BUG 7590: Fix Winbind offline login.
+    * BUG 7617: Fix smbd coredump due to uninitialized variables in the
+      performance counter code.
+    * BUG 7636: Fix Winbind internal error.
+    * BUG 7651: Fix mknod and mkfifo failing with "No such file or
+      directory".
+    * BUG 7693: Fix smbd changing mode of files on rename.
+    * BUG 7694: Fix crash bug with invalid SPNEGO token.
+    * BUG 7698: Fix smbd panic on invalid NetBIOS session request.
+
+
+o   Günther Deschner <gd at samba.org>
+    * BUG 7541: Fix smbd crash caused by "%D" in "printer admin".
+    * BUG 7568: Make sure cm_connect_lsa_tcp does not reset the secure channel.
+    * BUG 7658: Fix "dereferencing type-punned pointer will break
+      strict-aliasing rules" warnings).
+    * BUG 7665: Fix memory leak in netapi connection manager.
+
+
+o   Björn Jacke <bj at sernet.de>
+    * BUG 7244: Fall back to cups-config for underlinked libs.
+    * BUG 7474: Fix build on platforms without st_blocks and st_blksize stat
+      struct members.
+
+
+o   Volker Lendecke <vl at samba.org>
+    * BUG 7336: Enable idmap_passdb module build as shared.
+    * BUG 7531: Fix the charset_pull routine.
+    * BUG 7635: Fix 'smbclient -M'.
+    * BUG 7656: Fix scalability problem with hundreds of printers.
+    * BUG 7684: Fix fd leak in libwbclient.so.
+    * BUG 7688: Fix crash bug in rpcclient.
+    * BUG 7470: Standardize S_IREAD and S_IWRITE.
+    * BUG 7715: Fix file corruption when setting Samba "write wache wize".
+
+
+o   Jim McDonough <jmcd at samba.org>
+    * BUG 7280: Fix auto printers with registry config.
+
+
+o   Andreas Schneider <asn at samba.org>
+    * BUG 7538: Fix GUID_from_data_blob() with length of 32.
+
+
+o   Chere Zhou <chere.zhou at isilon.com>
+    * BUG 7662: Align change notify replies on 4-byte boundary.
+
+
+######################################################################
+Reporting bugs & Development Discussion
+#######################################
+
+Please discuss this release on the samba-technical mailing list or by
+joining the #samba-technical IRC channel on irc.freenode.net.
+
+If you do report problems then please try to send high quality
+feedback. If you don't provide vital information to help us track down
+the problem then you will probably be ignored.  All bug reports should
+be filed under the Samba 3.5 product in the project's Bugzilla
+database (https://bugzilla.samba.org/).
+
+
+======================================================================
+== Our Code, Our Bugs, Our Responsibility.
+== The Samba Team
+======================================================================
+
+
+Release notes for older releases follow:
+----------------------------------------
+
+                   =============================
                    Release Notes for Samba 3.5.5
 			 September 14, 2010
                    =============================
@@ -50,9 +149,9 @@
 ======================================================================
 
 
-Release notes for older releases follow:
-----------------------------------------
+----------------------------------------------------------------------
 
+
                    =============================
                    Release Notes for Samba 3.5.4
 			   June 23, 2010

Modified: branches/samba/backports.org/lenny/debian/changelog
===================================================================
--- branches/samba/backports.org/lenny/debian/changelog	2010-10-23 19:21:11 UTC (rev 3631)
+++ branches/samba/backports.org/lenny/debian/changelog	2010-10-26 20:27:36 UTC (rev 3632)
@@ -1,3 +1,10 @@
+samba (2:3.5.6~dfsg-1) unstable; urgency=low
+
+  * New upstream release. Fixes the following Debian bug:
+    - rpcclient readline segfault. Closes: #597203
+
+ -- Christian Perrier <bubulle at debian.org>  Sun, 10 Oct 2010 09:59:37 +0200
+
 samba (2:3.5.5~dfsg-1~bpo50+2) UNRELEASED; urgency=low
 
   * Correct winbind dependency on libpam-runtime (>= 1.0.1-6) that

Modified: branches/samba/backports.org/lenny/debian/patches/autoconf.patch
===================================================================
--- branches/samba/backports.org/lenny/debian/patches/autoconf.patch	2010-10-23 19:21:11 UTC (rev 3631)
+++ branches/samba/backports.org/lenny/debian/patches/autoconf.patch	2010-10-26 20:27:36 UTC (rev 3632)
@@ -25,23 +25,23 @@
  quilt refresh
  find . -name '*.rej' | xargs rm
 
-Index: experimental/source3/configure
+Index: samba/source3/configure
 ===================================================================
---- experimental.orig/source3/configure
-+++ experimental/source3/configure
+--- 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.65 for Samba 3.
++# Generated by GNU Autoconf 2.67 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, 2010 Free Software
++# Foundation, Inc.
 +#
 +#
  # This configure script is free software; the Free Software Foundation
@@ -576,7 +576,7 @@
 +      test -d "$as_dir" && break
 +    done
 +    test -z "$as_dirs" || eval "mkdir $as_dirs"
-+  } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
++  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
  
  
 -(eval "as_func_return () {
@@ -643,19 +643,19 @@
  
 -if as_func_ret_success; then
 -  :
-+# as_fn_error ERROR [LINENO LOG_FD]
-+# ---------------------------------
++# as_fn_error STATUS ERROR [LINENO LOG_FD]
++# ----------------------------------------
 +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
 +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
-+# script with status $?, using 1 if that was 0.
++# script with STATUS, using 1 if that was 0.
 +as_fn_error ()
 +{
-+  as_status=$?; test $as_status -eq 0 && as_status=1
-+  if test "$3"; then
-+    as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-+    $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
++  as_status=$1; test $as_status -eq 0 && as_status=1
++  if test "$4"; then
++    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
++    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
 +  fi
-+  $as_echo "$as_me: error: $1" >&2
++  $as_echo "$as_me: error: $2" >&2
 +  as_fn_exit $as_status
 +} # as_fn_error
 +
@@ -811,7 +811,7 @@
  	???[sx]*):;;*)false;;esac;fi
      '\'' sh
    '
-@@ -572,8 +529,8 @@
+@@ -572,11 +529,11 @@
  as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
  
  
@@ -821,7 +821,11 @@
 +exec 6>&1
  
  # Name of the host.
- # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
+-# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
++# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
+ # so uname gets run too.
+ ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+ 
 @@ -591,7 +548,6 @@
  subdirs=
  MFLAGS=
@@ -846,55 +850,67 @@
  PACKAGE_BUGREPORT
  PACKAGE_STRING
  PACKAGE_VERSION
-@@ -1183,8 +1141,7 @@
+@@ -1137,8 +1095,9 @@
+   fi
+ 
+   case $ac_option in
+-  *=*)	ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
+-  *)	ac_optarg=yes ;;
++  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
++  *=)   ac_optarg= ;;
++  *)    ac_optarg=yes ;;
+   esac
+ 
+   # Accept the important Cygnus configure options, so we can diagnose typos.
+@@ -1183,8 +1142,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 &&
 -      { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2
 -   { (exit 1); exit 1; }; }
-+      as_fn_error "invalid feature name: $ac_useropt"
++      as_fn_error $? "invalid feature name: $ac_useropt"
      ac_useropt_orig=$ac_useropt
      ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
      case $ac_user_opts in
-@@ -1210,8 +1167,7 @@
+@@ -1210,8 +1168,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 &&
 -      { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2
 -   { (exit 1); exit 1; }; }
-+      as_fn_error "invalid feature name: $ac_useropt"
++      as_fn_error $? "invalid feature name: $ac_useropt"
      ac_useropt_orig=$ac_useropt
      ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
      case $ac_user_opts in
-@@ -1415,8 +1371,7 @@
+@@ -1415,8 +1372,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 &&
 -      { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2
 -   { (exit 1); exit 1; }; }
-+      as_fn_error "invalid package name: $ac_useropt"
++      as_fn_error $? "invalid package name: $ac_useropt"
      ac_useropt_orig=$ac_useropt
      ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
      case $ac_user_opts in
-@@ -1432,8 +1387,7 @@
+@@ -1432,8 +1388,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 &&
 -      { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2
 -   { (exit 1); exit 1; }; }
-+      as_fn_error "invalid package name: $ac_useropt"
++      as_fn_error $? "invalid package name: $ac_useropt"
      ac_useropt_orig=$ac_useropt
      ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
      case $ac_user_opts in
-@@ -1463,17 +1417,17 @@
+@@ -1463,17 +1418,17 @@
    | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
      x_libraries=$ac_optarg ;;
  
 -  -*) { $as_echo "$as_me: error: unrecognized option: $ac_option
 -Try \`$0 --help' for more information." >&2
 -   { (exit 1); exit 1; }; }
-+  -*) as_fn_error "unrecognized option: \`$ac_option'
-+Try \`$0 --help' for more information."
++  -*) as_fn_error $? "unrecognized option: \`$ac_option'
++Try \`$0 --help' for more information"
      ;;
  
    *=*)
@@ -905,18 +921,18 @@
 -   { (exit 1); exit 1; }; }
 +    case $ac_envvar in #(
 +      '' | [0-9]* | *[!_$as_cr_alnum]* )
-+      as_fn_error "invalid variable name: \`$ac_envvar'" ;;
++      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
 +    esac
      eval $ac_envvar=\$ac_optarg
      export $ac_envvar ;;
  
-@@ -1490,15 +1444,13 @@
+@@ -1490,15 +1445,13 @@
  
  if test -n "$ac_prev"; then
    ac_option=--`echo $ac_prev | sed 's/_/-/g'`
 -  { $as_echo "$as_me: error: missing argument to $ac_option" >&2
 -   { (exit 1); exit 1; }; }
-+  as_fn_error "missing argument to $ac_option"
++  as_fn_error $? "missing argument to $ac_option"
  fi
  
  if test -n "$ac_unrecognized_opts"; then
@@ -924,51 +940,71 @@
      no) ;;
 -    fatal) { $as_echo "$as_me: error: unrecognized options: $ac_unrecognized_opts" >&2
 -   { (exit 1); exit 1; }; } ;;
-+    fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
++    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
      *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
    esac
  fi
-@@ -1521,8 +1473,7 @@
+@@ -1521,8 +1474,7 @@
      [\\/$]* | ?:[\\/]* )  continue;;
      NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
    esac
 -  { $as_echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
 -   { (exit 1); exit 1; }; }
-+  as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
++  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
  done
  
  # There might be people who depend on the old broken behavior: `$host'
-@@ -1552,11 +1503,9 @@
+@@ -1536,8 +1488,8 @@
+ if test "x$host_alias" != x; then
+   if test "x$build_alias" = x; then
+     cross_compiling=maybe
+-    $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
+-    If a cross compiler is detected then cross compile mode will be used." >&2
++    $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
++    If a cross compiler is detected then cross compile mode will be used" >&2
+   elif test "x$build_alias" != "x$host_alias"; then
+     cross_compiling=yes
+   fi
+@@ -1552,11 +1504,9 @@
  ac_pwd=`pwd` && test -n "$ac_pwd" &&
  ac_ls_di=`ls -di .` &&
  ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
 -  { $as_echo "$as_me: error: working directory cannot be determined" >&2
 -   { (exit 1); exit 1; }; }
-+  as_fn_error "working directory cannot be determined"
++  as_fn_error $? "working directory cannot be determined"
  test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
 -  { $as_echo "$as_me: error: pwd does not report name of working directory" >&2
 -   { (exit 1); exit 1; }; }
-+  as_fn_error "pwd does not report name of working directory"
++  as_fn_error $? "pwd does not report name of working directory"
  
  
  # Find the source files, if location was not specified.
-@@ -1595,13 +1544,11 @@
+@@ -1595,13 +1545,11 @@
  fi
  if test ! -r "$srcdir/$ac_unique_file"; then
    test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
 -  { $as_echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
 -   { (exit 1); exit 1; }; }
-+  as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
++  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
  fi
  ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
  ac_abs_confdir=`(
 -	cd "$srcdir" && test -r "./$ac_unique_file" || { $as_echo "$as_me: error: $ac_msg" >&2
 -   { (exit 1); exit 1; }; }
-+	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
++	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
  	pwd)`
  # When building in place, set srcdir=.
  if test "$ac_abs_confdir" = "$ac_pwd"; then
-@@ -1848,7 +1795,7 @@
+@@ -1641,7 +1589,7 @@
+       --help=short        display options specific to this package
+       --help=recursive    display the short help of all the included packages
+   -V, --version           display version information and exit
+-  -q, --quiet, --silent   do not print \`checking...' messages
++  -q, --quiet, --silent   do not print \`checking ...' messages
+       --cache-file=FILE   cache test results in FILE [disabled]
+   -C, --config-cache      alias for \`--cache-file=config.cache'
+   -n, --no-create         do not create output files
+@@ -1848,7 +1796,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>
@@ -977,16 +1013,16 @@
                you have headers in a nonstandard directory <include dir>
    CPP         C preprocessor
    PKG_CONFIG  path to pkg-config utility
-@@ -1935,178 +1882,863 @@
+@@ -1935,191 +1883,875 @@
  if $ac_init_version; then
    cat <<\_ACEOF
  Samba configure 3
 -generated by GNU Autoconf 2.63
-+generated by GNU Autoconf 2.65
++generated by GNU Autoconf 2.67
  
 -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
 -2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
-+Copyright (C) 2009 Free Software Foundation, Inc.
++Copyright (C) 2010 Free Software Foundation, Inc.
  This configure script is free software; the Free Software Foundation
  gives unlimited permission to copy, distribute and modify it.
  _ACEOF
@@ -1068,7 +1104,7 @@
 +    mv -f conftest.er1 conftest.err
 +  fi
 +  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-+  test $ac_status = 0; } >/dev/null && {
++  test $ac_status = 0; } > conftest.i && {
 +	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
 +	 test ! -s conftest.err
 +       }; then :
@@ -1106,10 +1142,10 @@
 +ac_fn_c_check_header_mongrel ()
 +{
 +  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-+  if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
++  if eval "test \"\${$3+set}\"" = set; then :
 +  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
 +$as_echo_n "checking for $2... " >&6; }
-+if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
++if eval "test \"\${$3+set}\"" = set; then :
 +  $as_echo_n "(cached) " >&6
 +fi
 +eval ac_res=\$$3
@@ -1146,7 +1182,7 @@
 +else
 +  ac_header_preproc=no
 +fi
-+rm -f conftest.err conftest.$ac_ext
++rm -f conftest.err conftest.i conftest.$ac_ext
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
 +$as_echo "$ac_header_preproc" >&6; }
  
@@ -1177,17 +1213,15 @@
 +$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
 +    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
-+( cat <<\_ASBOX
-+## ---------------------------------------- ##
++( $as_echo "## ---------------------------------------- ##
 +## Report this to samba-technical at samba.org ##
-+## ---------------------------------------- ##
-+_ASBOX
++## ---------------------------------------- ##"
 +     ) | sed "s/^/$as_me: WARNING:     /" >&2
 +    ;;
 +esac
 +  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
 +$as_echo_n "checking for $2... " >&6; }
-+if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
++if eval "test \"\${$3+set}\"" = set; then :
 +  $as_echo_n "(cached) " >&6
 +else
 +  eval "$3=\$ac_header_compiler"
@@ -1256,7 +1290,7 @@
 +  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
 +  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
 +$as_echo_n "checking for $2... " >&6; }
-+if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
++if eval "test \"\${$3+set}\"" = set; then :
 +  $as_echo_n "(cached) " >&6
 +else
 +  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -1325,6 +1359,16 @@
 -done
 -$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
 -$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
+-
+-# When interrupted or exit'd, cleanup temporary files, and complete
+-# config.log.  We remove comments because anyway the quotes in there
+-# would cause problems or look ugly.
+-# WARNING: Use '\'' to represent an apostrophe within the trap.
+-# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
+-trap 'exit_status=$?
+-  # Save into config.log some information that might help in debugging.
+-  {
+-    echo
 +# ac_fn_c_try_link LINENO
 +# -----------------------
 +# Try to link conftest.$ac_ext, and return whether this succeeded.
@@ -1359,25 +1403,6 @@
 +  $as_echo "$as_me: failed program was:" >&5
 +sed 's/^/| /' conftest.$ac_ext >&5
  
--# When interrupted or exit'd, cleanup temporary files, and complete
--# config.log.  We remove comments because anyway the quotes in there
--# would cause problems or look ugly.
--# WARNING: Use '\'' to represent an apostrophe within the trap.
--# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
--trap 'exit_status=$?
--  # Save into config.log some information that might help in debugging.
--  {
--    echo
-+	ac_retval=1
-+fi
-+  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
-+  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
-+  # interfere with the next link command; also delete a directory that is
-+  # left behind by Apple's compiler.  We do this before executing the actions.
-+  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
-+  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
-+  as_fn_set_status $ac_retval
- 
 -    cat <<\_ASBOX
 -## ---------------- ##
 -## Cache variables. ##
@@ -1415,7 +1440,15 @@
 -    sort
 -)
 -    echo
-+} # ac_fn_c_try_link
++	ac_retval=1
++fi
++  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
++  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
++  # interfere with the next link command; also delete a directory that is
++  # left behind by Apple's compiler.  We do this before executing the actions.
++  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
++  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
++  as_fn_set_status $ac_retval
  
 -    cat <<\_ASBOX
 -## ----------------- ##
@@ -1427,6 +1460,20 @@
 -    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
++} # ac_fn_c_try_link
+ 
+-    if test -n "$ac_subst_files"; then
+-      cat <<\_ASBOX
+-## ------------------- ##
+-## File substitutions. ##
+-## ------------------- ##
+-_ASBOX
+-      echo
 +# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
 +# -------------------------------------------
 +# Tests whether TYPE exists after having included INCLUDES, setting cache
@@ -1436,7 +1483,7 @@
 +  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
 +  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
 +$as_echo_n "checking for $2... " >&6; }
-+if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
++if eval "test \"\${$3+set}\"" = set; then :
 +  $as_echo_n "(cached) " >&6
 +else
 +  eval "$3=no"
@@ -1667,7 +1714,7 @@
 +  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
 +  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
 +$as_echo_n "checking for $2... " >&6; }
-+if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
++if eval "test \"\${$3+set}\"" = set; then :
 +  $as_echo_n "(cached) " >&6
 +else
 +  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -1735,7 +1782,7 @@
 +  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
 +  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
 +$as_echo_n "checking for $2.$3... " >&6; }
-+if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then :
++if eval "test \"\${$4+set}\"" = set; then :
 +  $as_echo_n "(cached) " >&6
 +else
 +  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -1783,15 +1830,18 @@
 +
 +} # ac_fn_c_check_member
 +
-+# ac_fn_c_check_decl LINENO SYMBOL VAR
-+# ------------------------------------
-+# Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
++# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
++# ---------------------------------------------
++# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
++# accordingly.
 +ac_fn_c_check_decl ()
 +{
 +  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $2 is declared" >&5
-+$as_echo_n "checking whether $2 is declared... " >&6; }
-+if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
++  as_decl_name=`echo $2|sed 's/ *(.*//'`
++  as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
++$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
++if eval "test \"\${$3+set}\"" = set; then :
 +  $as_echo_n "(cached) " >&6
 +else
 +  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -1800,9 +1850,13 @@
 +int
 +main ()
 +{
-+#ifndef $2
-+  (void) $2;
++#ifndef $as_decl_name
++#ifdef __cplusplus
++  (void) $as_decl_use;
++#else
++  (void) $as_decl_name;
 +#endif
++#endif
 +
 +  ;
 +  return 0;
@@ -1826,7 +1880,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.65.  Invocation command line was
++generated by GNU Autoconf 2.67.  Invocation command line was
 +
 +  $ $0 $@
 +
@@ -1936,11 +1990,9 @@
 +  {
 +    echo
 +
-+    cat <<\_ASBOX
-+## ---------------- ##
++    $as_echo "## ---------------- ##
 +## Cache variables. ##
-+## ---------------- ##
-+_ASBOX
++## ---------------- ##"
 +    echo
 +    # The following way of writing the cache mishandles newlines in values,
 +(
@@ -1974,20 +2026,43 @@
 +)
 +    echo
 +
-+    cat <<\_ASBOX
-+## ----------------- ##
++    $as_echo "## ----------------- ##
 +## Output variables. ##
-+## ----------------- ##
-+_ASBOX
++## ----------------- ##"
 +    echo
 +    for ac_var in $ac_subst_vars
 +    do
 +      eval ac_val=\$$ac_var
 +      case $ac_val in
-       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
-       esac
-       $as_echo "$ac_var='\''$ac_val'\''"
-@@ -2150,39 +2782,41 @@
++      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
++      esac
++      $as_echo "$ac_var='\''$ac_val'\''"
++    done | sort
++    echo
++
++    if test -n "$ac_subst_files"; then
++      $as_echo "## ------------------- ##
++## File substitutions. ##
++## ------------------- ##"
++      echo
+       for ac_var in $ac_subst_files
+       do
+ 	eval ac_val=\$$ac_var
+@@ -2132,11 +2764,9 @@
+     fi
+ 
+     if test -s confdefs.h; then
+-      cat <<\_ASBOX
+-## ----------- ##
++      $as_echo "## ----------- ##
+ ## confdefs.h. ##
+-## ----------- ##
+-_ASBOX
++## ----------- ##"
+       echo
+       cat confdefs.h
+       echo
+@@ -2150,46 +2780,53 @@
      exit $exit_status
  ' 0
  for ac_signal in 1 2 13 15; do
@@ -2034,7 +2109,20 @@
  
  # Let the site file select an alternate cache file if it wants to.
  # Prefer an explicitly selected file to automatically selected ones.
-@@ -2200,8 +2834,8 @@
+ ac_site_file1=NONE
+ ac_site_file2=NONE
+ if test -n "$CONFIG_SITE"; then
+-  ac_site_file1=$CONFIG_SITE
++  # We do not want a PATH search for config.site.
++  case $CONFIG_SITE in #((
++    -*)  ac_site_file1=./$CONFIG_SITE;;
++    */*) ac_site_file1=$CONFIG_SITE;;
++    *)   ac_site_file1=./$CONFIG_SITE;;
++  esac
+ elif test "x$prefix" != xNONE; then
+   ac_site_file1=$prefix/share/config.site
+   ac_site_file2=$prefix/etc/config.site
+@@ -2200,19 +2837,23 @@
  for ac_site_file in "$ac_site_file1" "$ac_site_file2"
  do
    test "x$ac_site_file" = xNONE && continue
@@ -2044,8 +2132,13 @@
 +    { $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"
-@@ -2209,10 +2843,10 @@
+-    . "$ac_site_file"
++    . "$ac_site_file" \
++      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
++$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
++as_fn_error $? "failed to load site script $ac_site_file
++See \`config.log' for more details" "$LINENO" 5 ; }
+   fi
  done
  
  if test -r "$cache_file"; then
@@ -2060,7 +2153,7 @@
  $as_echo "$as_me: loading cache $cache_file" >&6;}
      case $cache_file in
        [\\/]* | ?:[\\/]* ) . "$cache_file";;
-@@ -2220,7 +2854,7 @@
+@@ -2220,7 +2861,7 @@
      esac
    fi
  else
@@ -2069,7 +2162,7 @@
  $as_echo "$as_me: creating cache $cache_file" >&6;}
    >$cache_file
  fi
-@@ -2235,11 +2869,11 @@
+@@ -2235,11 +2876,11 @@
    eval ac_new_val=\$ac_env_${ac_var}_value
    case $ac_old_set,$ac_new_set in
      set,)
@@ -2083,7 +2176,7 @@
  $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
        ac_cache_corrupted=: ;;
      ,);;
-@@ -2249,17 +2883,17 @@
+@@ -2249,17 +2890,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
@@ -2105,7 +2198,7 @@
  $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
        fi;;
    esac
-@@ -2271,43 +2905,20 @@
+@@ -2271,43 +2912,20 @@
      esac
      case " $ac_configure_args " in
        *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
@@ -2124,7 +2217,7 @@
 -  { { $as_echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
 -$as_echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
 -   { (exit 1); exit 1; }; }
-+  as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
++  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
  fi
 -
 -
@@ -2156,7 +2249,7 @@
  
  ac_ext=c
  ac_cpp='$CPP $CPPFLAGS'
-@@ -2321,14 +2932,12 @@
+@@ -2321,14 +2939,12 @@
  ac_config_headers="$ac_config_headers include/config.h"
  
  
@@ -2173,40 +2266,18 @@
  $as_echo "$as_me: WARNING: \$PATH contains /usr/ucb - build errors may follow" >&2;}
  	;;
  esac
-@@ -2360,24 +2969,16 @@
- 
- ac_aux_dir=
- for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
--  if test -f "$ac_dir/install-sh"; then
--    ac_aux_dir=$ac_dir
--    ac_install_sh="$ac_aux_dir/install-sh -c"
--    break
--  elif test -f "$ac_dir/install.sh"; then
--    ac_aux_dir=$ac_dir
--    ac_install_sh="$ac_aux_dir/install.sh -c"
--    break
--  elif test -f "$ac_dir/shtool"; then
--    ac_aux_dir=$ac_dir
--    ac_install_sh="$ac_aux_dir/shtool install -c"
--    break
--  fi
-+  for ac_t in install-sh install.sh shtool; do
-+    if test -f "$ac_dir/$ac_t"; then
-+      ac_aux_dir=$ac_dir
-+      ac_install_sh="$ac_aux_dir/$ac_t -c"
-+      break 2
-+    fi
-+  done
+@@ -2375,9 +2991,7 @@
+   fi
  done
  if test -z "$ac_aux_dir"; then
 -  { { $as_echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
 -$as_echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
 -   { (exit 1); exit 1; }; }
-+  as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
++  as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
  fi
  
  # These three variables are undocumented and unsupported,
-@@ -2389,57 +2990,29 @@
+@@ -2389,57 +3003,29 @@
  ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
  
  
@@ -2235,7 +2306,7 @@
 -  { { $as_echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
 -$as_echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;}
 -   { (exit 1); exit 1; }; }
-+  as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
++  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
  
 -{ $as_echo "$as_me:$LINENO: checking build system type" >&5
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
@@ -2251,12 +2322,12 @@
 -  { { $as_echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
 -$as_echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
 -   { (exit 1); exit 1; }; }
-+  as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
++  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
  ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
 -  { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
 -$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;}
 -   { (exit 1); exit 1; }; }
-+  as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
++  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
  
  fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_build" >&5
@@ -2267,11 +2338,11 @@
 -*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
 -$as_echo "$as_me: error: invalid value of canonical build" >&2;}
 -   { (exit 1); exit 1; }; };;
-+*) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
++*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5 ;;
  esac
  build=$ac_cv_build
  ac_save_IFS=$IFS; IFS='-'
-@@ -2455,28 +3028,24 @@
+@@ -2455,28 +3041,24 @@
  case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
  
  
@@ -2289,7 +2360,7 @@
 -    { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
 -$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
 -   { (exit 1); exit 1; }; }
-+    as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
++    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
  fi
  
  fi
@@ -2301,11 +2372,11 @@
 -*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
 -$as_echo "$as_me: error: invalid value of canonical host" >&2;}
 -   { (exit 1); exit 1; }; };;
-+*) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
++*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5 ;;
  esac
  host=$ac_cv_host
  ac_save_IFS=$IFS; IFS='-'
-@@ -2492,28 +3061,24 @@
+@@ -2492,28 +3074,24 @@
  case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
  
  
@@ -2323,7 +2394,7 @@
 -    { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&5
 -$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&2;}
 -   { (exit 1); exit 1; }; }
-+    as_fn_error "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
++    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
  fi
  
  fi
@@ -2335,11 +2406,11 @@
 -*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical target" >&5
 -$as_echo "$as_me: error: invalid value of canonical target" >&2;}
 -   { (exit 1); exit 1; }; };;
-+*) as_fn_error "invalid value of canonical target" "$LINENO" 5;;
++*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5 ;;
  esac
  target=$ac_cv_target
  ac_save_IFS=$IFS; IFS='-'
-@@ -2536,6 +3101,27 @@
+@@ -2536,6 +3114,27 @@
      NONENONEs,x,x, &&
    program_prefix=${target_alias}-
  
@@ -2355,7 +2426,7 @@
 +	fi
 +done
 +if test x"$libreplacedir" = "x"; then
-+	as_fn_error "cannot find libreplace in $libreplacepaths" "$LINENO" 5
++	as_fn_error $? "cannot find libreplace in $libreplacepaths" "$LINENO" 5
 +fi
 +LIBREPLACEOBJ="$libreplacedir/replace.o"
 +
@@ -2367,7 +2438,7 @@
  echo "LIBREPLACE_LOCATION_CHECKS: END"
  
  
-@@ -2564,7 +3150,7 @@
+@@ -2564,7 +3163,7 @@
  
  
  # Check whether --with-fhs was given.
@@ -2376,7 +2447,7 @@
    withval=$with_fhs;  case "$withval" in
    yes)
      lockdir="\${VARDIR}/lib/samba"
-@@ -2581,9 +3167,7 @@
+@@ -2581,9 +3180,7 @@
      cachedir="\${VARDIR}/lib/samba"
      ncalrpcdir="\${VARDIR}/ncalrpc"
  
@@ -2387,7 +2458,7 @@
  
      ;;
    esac
-@@ -2594,13 +3178,13 @@
+@@ -2594,13 +3191,13 @@
  # set private directory location
  
  # Check whether --with-privatedir was given.
@@ -2403,7 +2474,7 @@
  $as_echo "$as_me: WARNING: --with-privatedir called without argument - will use default" >&2;}
    ;;
    * )
-@@ -2614,13 +3198,13 @@
+@@ -2614,13 +3211,13 @@
  # set root sbin directory location
  
  # Check whether --with-rootsbindir was given.
@@ -2419,7 +2490,7 @@
  $as_echo "$as_me: WARNING: --with-rootsbindir called without argument - will use default" >&2;}
    ;;
    * )
-@@ -2634,13 +3218,13 @@
+@@ -2634,13 +3231,13 @@
  # set lock directory location
  
  # Check whether --with-lockdir was given.
@@ -2435,7 +2506,7 @@
  $as_echo "$as_me: WARNING: --with-lockdir called without argument - will use default" >&2;}
    ;;
    * )
-@@ -2654,13 +3238,13 @@
+@@ -2654,13 +3251,13 @@
  # set state directory location
  
  # Check whether --with-statedir was given.
@@ -2451,7 +2522,7 @@
  $as_echo "$as_me: WARNING: --with-statedir called without argument - will use default" >&2;}
    ;;
    * )
-@@ -2674,13 +3258,13 @@
+@@ -2674,13 +3271,13 @@
  # set cache directory location
  
  # Check whether --with-cachedir was given.
@@ -2467,7 +2538,7 @@
  $as_echo "$as_me: WARNING: --with-cachedir called without argument - will use default" >&2;}
    ;;
    * )
-@@ -2694,13 +3278,13 @@
+@@ -2694,13 +3291,13 @@
  # set pid directory location
  
  # Check whether --with-piddir was given.
@@ -2483,7 +2554,7 @@
  $as_echo "$as_me: WARNING: --with-piddir called without argument - will use default" >&2;}
    ;;
    * )
-@@ -2714,13 +3298,13 @@
+@@ -2714,13 +3311,13 @@
  # set ncalrpc directory location
  
  # Check whether --with-ncalrpcdir was given.
@@ -2499,7 +2570,7 @@
  $as_echo "$as_me: WARNING: --with-ncalrpcdir called without argument - will use default" >&2;}
    ;;
    * )
-@@ -2734,13 +3318,13 @@
+@@ -2734,13 +3331,13 @@
  # set SWAT directory location
  
  # Check whether --with-swatdir was given.
@@ -2515,7 +2586,7 @@
  $as_echo "$as_me: WARNING: --with-swatdir called without argument - will use default" >&2;}
    ;;
    * )
-@@ -2754,13 +3338,13 @@
+@@ -2754,13 +3351,13 @@
  # set configuration directory location
  
  # Check whether --with-configdir was given.
@@ -2531,7 +2602,7 @@
  $as_echo "$as_me: WARNING: --with-configdir called without argument - will use default" >&2;}
    ;;
    * )
-@@ -2774,13 +3358,13 @@
+@@ -2774,13 +3371,13 @@
  # set log directory location
  
  # Check whether --with-logfilebase was given.
@@ -2547,7 +2618,7 @@
  $as_echo "$as_me: WARNING: --with-logfilebase called without argument - will use default" >&2;}
    ;;
    * )
-@@ -2795,13 +3379,13 @@
+@@ -2795,13 +3392,13 @@
  # set shared modules (internal lib) directory location
  
  # Check whether --with-modulesdir was given.
@@ -2563,7 +2634,7 @@
  $as_echo "$as_me: WARNING: --with-modulesdir without argument - will use default" >&2;}
    ;;
    * )
-@@ -2815,13 +3399,13 @@
+@@ -2815,13 +3412,13 @@
  # set PAM modules directory location
  
  # Check whether --with-pammodulesdir was given.
@@ -2579,7 +2650,7 @@
  $as_echo "$as_me: WARNING: --with-pammodulesdir called without argument - will use default" >&2;}
    ;;
    * )
-@@ -2835,13 +3419,13 @@
+@@ -2835,13 +3432,13 @@
  # set man directory location
  
  # Check whether --with-mandir was given.
@@ -2595,7 +2666,7 @@
  $as_echo "$as_me: WARNING: --with-mandir without argument - will use default" >&2;}
    ;;
    * )
-@@ -2855,13 +3439,13 @@
+@@ -2855,13 +3452,13 @@
  # set locale directory location
  
  # Check whether --with-localedir was given.
@@ -2611,7 +2682,7 @@
  $as_echo "$as_me: WARNING: --with-localedir called without argument - will use default" >&2;}
    ;;
    *)
-@@ -2875,13 +3459,13 @@
+@@ -2875,13 +3472,13 @@
  # set codepage directory location
  
  # Check whether --with-codepagedir was given.
@@ -2627,7 +2698,7 @@
  $as_echo "$as_me: WARNING: --with-codepagedir called without argument - will use default" >&2;}
    ;;
    * )
-@@ -2915,10 +3499,10 @@
+@@ -2915,10 +3512,10 @@
  
  
  # Check whether --with-selftest-prefix was given.
@@ -2640,7 +2711,7 @@
  $as_echo "$as_me: WARNING: --with-selftest-prefix called without argument - will use default" >&2;}
    ;;
    * )
-@@ -2935,10 +3519,10 @@
+@@ -2935,10 +3532,10 @@
  
  
  # Check whether --with-selftest-shrdir was given.
@@ -2653,7 +2724,7 @@
  $as_echo "$as_me: WARNING: --with-selftest-shrdir called without argument - will use default" >&2;}
    ;;
    * )
-@@ -2957,19 +3541,15 @@
+@@ -2957,19 +3554,15 @@
  
  
  # Check whether --with-smbtorture4_path was given.
@@ -2664,7 +2735,7 @@
 -    { { $as_echo "$as_me:$LINENO: error: --with-smbtorture4-path should take a path" >&5
 -$as_echo "$as_me: error: --with-smbtorture4-path should take a path" >&2;}
 -   { (exit 1); exit 1; }; }
-+    as_fn_error "--with-smbtorture4-path should take a path" "$LINENO" 5
++    as_fn_error $? "--with-smbtorture4-path should take a path" "$LINENO" 5
    ;;
    * )
      smbtorture4_path="$withval"
@@ -2672,11 +2743,11 @@
 -    	{ { $as_echo "$as_me:$LINENO: error: '$smbtorture_path' does not  exist!" >&5
 -$as_echo "$as_me: error: '$smbtorture_path' does not  exist!" >&2;}
 -   { (exit 1); exit 1; }; }
-+    	as_fn_error "'$smbtorture_path' does not  exist!" "$LINENO" 5
++    	as_fn_error $? "'$smbtorture_path' does not  exist!" "$LINENO" 5
      fi
      smbtorture4_option="-t $withval"
    ;;
-@@ -2984,19 +3564,15 @@
+@@ -2984,19 +3577,15 @@
  
  
  # Check whether --with-selftest_custom_conf was given.
@@ -2687,7 +2758,7 @@
 -    { { $as_echo "$as_me:$LINENO: error: --with-selftest-custom-conf should take a path" >&5
 -$as_echo "$as_me: error: --with-selftest-custom-conf should take a path" >&2;}
 -   { (exit 1); exit 1; }; }
-+    as_fn_error "--with-selftest-custom-conf should take a path" "$LINENO" 5
++    as_fn_error $? "--with-selftest-custom-conf should take a path" "$LINENO" 5
    ;;
    * )
      selftest_custom_conf="$withval"
@@ -2695,11 +2766,11 @@
 -	{ { $as_echo "$as_me:$LINENO: error: '$selftest_custom_conf' does not  exist!" >&5
 -$as_echo "$as_me: error: '$selftest_custom_conf' does not  exist!" >&2;}
 -   { (exit 1); exit 1; }; }
-+	as_fn_error "'$selftest_custom_conf' does not  exist!" "$LINENO" 5
++	as_fn_error $? "'$selftest_custom_conf' does not  exist!" "$LINENO" 5
      fi
      selftest_custom_conf="-c $withval"
    ;;
-@@ -3009,7 +3585,7 @@
+@@ -3009,7 +3598,7 @@
  ## so that we don't mix -O and -g
  debug=no
  # Check whether --enable-debug was given.
@@ -2708,7 +2779,7 @@
    enableval=$enable_debug; if eval "test x$enable_debug = xyes"; then
  	debug=yes
      fi
-@@ -3019,7 +3595,7 @@
+@@ -3019,7 +3608,7 @@
  
  developer=no
  # Check whether --enable-developer was given.
@@ -2717,7 +2788,7 @@
    enableval=$enable_developer; if eval "test x$enable_developer = xyes"; then
          debug=yes
          developer=yes
-@@ -3029,7 +3605,7 @@
+@@ -3029,7 +3618,7 @@
  
  krb5developer=no
  # Check whether --enable-krb5developer was given.
@@ -2726,7 +2797,7 @@
    enableval=$enable_krb5developer; if eval "test x$enable_krb5developer = xyes"; then
          debug=yes
          developer=yes
-@@ -3040,7 +3616,7 @@
+@@ -3040,7 +3629,7 @@
  
  picky_developer=no
  # Check whether --enable-picky-developer was given.
@@ -2735,7 +2806,7 @@
    enableval=$enable_picky_developer; if eval "test x$enable_picky_developer = xyes"; then
          debug=yes
          developer=yes
-@@ -3051,7 +3627,7 @@
+@@ -3051,7 +3640,7 @@
  
  
  # Check whether --with-cfenc was given.
@@ -2744,7 +2815,7 @@
    withval=$with_cfenc;
  # May be in source $withval/CoreFoundation/StringEncodings.subproj.
  # Should have been in framework $withval/CoreFoundation.framework/Headers.
-@@ -3148,9 +3724,9 @@
+@@ -3148,9 +3737,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
@@ -2756,7 +2827,7 @@
    $as_echo_n "(cached) " >&6
  else
    if test -n "$CC"; then
-@@ -3161,24 +3737,24 @@
+@@ -3161,24 +3750,24 @@
  do
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
@@ -2786,7 +2857,7 @@
  $as_echo "no" >&6; }
  fi
  
-@@ -3188,9 +3764,9 @@
+@@ -3188,9 +3777,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
@@ -2798,7 +2869,7 @@
    $as_echo_n "(cached) " >&6
  else
    if test -n "$ac_ct_CC"; then
-@@ -3201,24 +3777,24 @@
+@@ -3201,24 +3790,24 @@
  do
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
@@ -2828,7 +2899,7 @@
  $as_echo "no" >&6; }
  fi
  
-@@ -3227,7 +3803,7 @@
+@@ -3227,7 +3816,7 @@
    else
      case $cross_compiling:$ac_tool_warned in
  yes:)
@@ -2837,7 +2908,7 @@
  $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
  ac_tool_warned=yes ;;
  esac
-@@ -3241,9 +3817,9 @@
+@@ -3241,9 +3830,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
@@ -2849,7 +2920,7 @@
    $as_echo_n "(cached) " >&6
  else
    if test -n "$CC"; then
-@@ -3254,24 +3830,24 @@
+@@ -3254,24 +3843,24 @@
  do
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
@@ -2879,7 +2950,7 @@
  $as_echo "no" >&6; }
  fi
  
-@@ -3281,9 +3857,9 @@
+@@ -3281,9 +3870,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
@@ -2891,7 +2962,7 @@
    $as_echo_n "(cached) " >&6
  else
    if test -n "$CC"; then
-@@ -3295,18 +3871,18 @@
+@@ -3295,18 +3884,18 @@
  do
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
@@ -2913,7 +2984,7 @@
  IFS=$as_save_IFS
  
  if test $ac_prog_rejected = yes; then
-@@ -3325,10 +3901,10 @@
+@@ -3325,10 +3914,10 @@
  fi
  CC=$ac_cv_prog_CC
  if test -n "$CC"; then
@@ -2926,7 +2997,7 @@
  $as_echo "no" >&6; }
  fi
  
-@@ -3340,9 +3916,9 @@
+@@ -3340,9 +3929,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
@@ -2938,7 +3009,7 @@
    $as_echo_n "(cached) " >&6
  else
    if test -n "$CC"; then
-@@ -3353,24 +3929,24 @@
+@@ -3353,24 +3942,24 @@
  do
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
@@ -2968,7 +3039,7 @@
  $as_echo "no" >&6; }
  fi
  
-@@ -3384,9 +3960,9 @@
+@@ -3384,9 +3973,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
@@ -2980,7 +3051,7 @@
    $as_echo_n "(cached) " >&6
  else
    if test -n "$ac_ct_CC"; then
-@@ -3397,24 +3973,24 @@
+@@ -3397,24 +3986,24 @@
  do
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
@@ -3010,7 +3081,7 @@
  $as_echo "no" >&6; }
  fi
  
-@@ -3427,7 +4003,7 @@
+@@ -3427,7 +4016,7 @@
    else
      case $cross_compiling:$ac_tool_warned in
  yes:)
@@ -3019,7 +3090,7 @@
  $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
  ac_tool_warned=yes ;;
  esac
-@@ -3438,57 +4014,37 @@
+@@ -3438,57 +4027,37 @@
  fi
  
  
@@ -3031,8 +3102,8 @@
 -$as_echo "$as_me: error: no acceptable C compiler found in \$PATH
 -See \`config.log' for more details." >&2;}
 -   { (exit 1); exit 1; }; }; }
-+as_fn_error "no acceptable C compiler found in \$PATH
-+See \`config.log' for more details." "$LINENO" 5; }
++as_fn_error $? "no acceptable C compiler found in \$PATH
++See \`config.log' for more details" "$LINENO" 5 ; }
  
  # Provide some information about the compiler.
 -$as_echo "$as_me:$LINENO: checking for C compiler version" >&5
@@ -3040,19 +3111,14 @@
  set X $ac_compile
  ac_compiler=$2
 -{ (ac_try="$ac_compiler --version >&5"
-+for ac_option in --version -v -V -qversion; do
-+  { { ac_try="$ac_compiler $ac_option >&5"
- case "(($ac_try" in
-   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-   *) ac_try_echo=$ac_try;;
- esac
+-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
-+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=$?
+-  ac_status=$?
 -  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
 -  (exit $ac_status); }
 -{ (ac_try="$ac_compiler -v >&5"
@@ -3067,14 +3133,19 @@
 -  $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
++for ac_option in --version -v -V -qversion; do
++  { { ac_try="$ac_compiler $ac_option >&5"
+ case "(($ac_try" in
+   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+   *) ac_try_echo=$ac_try;;
+ esac
 -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 -$as_echo "$ac_try_echo") >&5
 -  (eval "$ac_compiler -V >&5") 2>&5
--  ac_status=$?
++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); }
 +  if test -s conftest.err; then
@@ -3097,7 +3168,7 @@
  /* end confdefs.h.  */
  
  int
-@@ -3504,8 +4060,8 @@
+@@ -3504,8 +4073,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.
@@ -3108,7 +3179,7 @@
  ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
  
  # The possible output files:
-@@ -3521,17 +4077,17 @@
+@@ -3521,17 +4090,17 @@
  done
  rm -f $ac_rmfiles
  
@@ -3131,7 +3202,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,
-@@ -3548,7 +4104,7 @@
+@@ -3548,7 +4117,7 @@
  	# certainly right.
  	break;;
      *.* )
@@ -3140,7 +3211,7 @@
  	then :; else
  	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
  	fi
-@@ -3567,84 +4123,42 @@
+@@ -3567,84 +4136,41 @@
  else
    ac_file=''
  fi
@@ -3163,9 +3234,8 @@
 -$as_echo "$as_me: error: C compiler cannot create executables
 -See \`config.log' for more details." >&2;}
 -   { (exit 77); exit 77; }; }; }
-+{ as_fn_set_status 77
-+as_fn_error "C compiler cannot create executables
-+See \`config.log' for more details." "$LINENO" 5; }; }
++as_fn_error 77 "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; }
@@ -3246,7 +3316,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
-@@ -3659,32 +4173,83 @@
+@@ -3659,32 +4185,83 @@
    esac
  done
  else
@@ -3258,8 +3328,8 @@
 -$as_echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
 -See \`config.log' for more details." >&2;}
 -   { (exit 1); exit 1; }; }; }
-+as_fn_error "cannot compute suffix of executables: cannot compile and link
-+See \`config.log' for more details." "$LINENO" 5; }
++as_fn_error $? "cannot compute suffix of executables: cannot compile and link
++See \`config.log' for more details" "$LINENO" 5 ; }
  fi
 -
 -rm -f conftest$ac_cv_exeext
@@ -3320,9 +3390,9 @@
 +    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.
++as_fn_error $? "cannot run C compiled programs.
 +If you meant to cross compile, use \`--host'.
-+See \`config.log' for more details." "$LINENO" 5; }
++See \`config.log' for more details" "$LINENO" 5 ; }
 +    fi
 +  fi
 +fi
@@ -3346,7 +3416,7 @@
  /* end confdefs.h.  */
  
  int
-@@ -3696,17 +4261,17 @@
+@@ -3696,17 +4273,17 @@
  }
  _ACEOF
  rm -f conftest.o conftest.obj
@@ -3369,7 +3439,7 @@
    for ac_file in conftest.o conftest.obj conftest.*; do
    test -f "$ac_file" || continue;
    case $ac_file in
-@@ -3719,31 +4284,23 @@
+@@ -3719,31 +4296,23 @@
    $as_echo "$as_me: failed program was:" >&5
  sed 's/^/| /' conftest.$ac_ext >&5
  
@@ -3381,8 +3451,8 @@
 -$as_echo "$as_me: error: cannot compute suffix of object files: cannot compile
 -See \`config.log' for more details." >&2;}
 -   { (exit 1); exit 1; }; }; }
-+as_fn_error "cannot compute suffix of object files: cannot compile
-+See \`config.log' for more details." "$LINENO" 5; }
++as_fn_error $? "cannot compute suffix of object files: cannot compile
++See \`config.log' for more details" "$LINENO" 5 ; }
  fi
 -
  rm -f conftest.$ac_cv_objext conftest.$ac_ext
@@ -3408,7 +3478,7 @@
  /* end confdefs.h.  */
  
  int
-@@ -3757,37 +4314,16 @@
+@@ -3757,37 +4326,16 @@
    return 0;
  }
  _ACEOF
@@ -3449,7 +3519,7 @@
  $as_echo "$ac_cv_c_compiler_gnu" >&6; }
  if test $ac_compiler_gnu = yes; then
    GCC=yes
-@@ -3796,20 +4332,16 @@
+@@ -3796,20 +4344,16 @@
  fi
  ac_test_CFLAGS=${CFLAGS+set}
  ac_save_CFLAGS=$CFLAGS
@@ -3473,7 +3543,7 @@
  /* end confdefs.h.  */
  
  int
-@@ -3820,35 +4352,11 @@
+@@ -3820,35 +4364,11 @@
    return 0;
  }
  _ACEOF
@@ -3512,7 +3582,7 @@
  /* end confdefs.h.  */
  
  int
-@@ -3859,36 +4367,12 @@
+@@ -3859,36 +4379,12 @@
    return 0;
  }
  _ACEOF
@@ -3553,7 +3623,7 @@
  /* end confdefs.h.  */
  
  int
-@@ -3899,42 +4383,17 @@
+@@ -3899,42 +4395,17 @@
    return 0;
  }
  _ACEOF
@@ -3598,7 +3668,7 @@
  $as_echo "$ac_cv_prog_cc_g" >&6; }
  if test "$ac_test_CFLAGS" = set; then
    CFLAGS=$ac_save_CFLAGS
-@@ -3951,18 +4410,14 @@
+@@ -3951,18 +4422,14 @@
      CFLAGS=
    fi
  fi
@@ -3620,7 +3690,7 @@
  /* end confdefs.h.  */
  #include <stdarg.h>
  #include <stdio.h>
-@@ -4019,32 +4474,9 @@
+@@ -4019,32 +4486,9 @@
  	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
  do
    CC="$ac_save_CC $ac_arg"
@@ -3654,7 +3724,7 @@
  rm -f core conftest.err conftest.$ac_objext
    test "x$ac_cv_prog_cc_c89" != "xno" && break
  done
-@@ -4055,17 +4487,19 @@
+@@ -4055,17 +4499,19 @@
  # AC_CACHE_VAL
  case "x$ac_cv_prog_cc_c89" in
    x)
@@ -3677,7 +3747,7 @@
  
  ac_ext=c
  ac_cpp='$CPP $CPPFLAGS'
-@@ -4076,18 +4510,14 @@
+@@ -4076,18 +4522,14 @@
  CFLAGS=$savedCFLAGS
  
  if test x"$GCC" != x"yes" ; then
@@ -3699,7 +3769,7 @@
  /* end confdefs.h.  */
  #include <stdarg.h>
  #include <stdbool.h>
-@@ -4229,32 +4659,9 @@
+@@ -4229,32 +4671,9 @@
  for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -xc99=all -qlanglvl=extc99
  do
    CC="$ac_save_CC $ac_arg"
@@ -3733,7 +3803,7 @@
  rm -f core conftest.err conftest.$ac_objext
    test "x$ac_cv_prog_cc_c99" != "xno" && break
  done
-@@ -4265,26 +4672,28 @@
+@@ -4265,26 +4684,28 @@
  # AC_CACHE_VAL
  case "x$ac_cv_prog_cc_c99" in
    x)
@@ -3767,7 +3837,7 @@
  $as_echo "${GCC_VERSION}" >&6; }
  fi
  
-@@ -4293,14 +4702,14 @@
+@@ -4293,14 +4714,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
@@ -3784,7 +3854,7 @@
    $as_echo_n "(cached) " >&6
  else
        # Double quotes because CPP needs to be expanded
-@@ -4315,11 +4724,7 @@
+@@ -4315,11 +4736,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.
@@ -3797,7 +3867,7 @@
  /* end confdefs.h.  */
  #ifdef __STDC__
  # include <limits.h>
-@@ -4328,78 +4733,34 @@
+@@ -4328,78 +4745,34 @@
  #endif
  		     Syntax error
  _ACEOF
@@ -3829,7 +3899,8 @@
  continue
  fi
 -
- rm -f conftest.err conftest.$ac_ext
+-rm -f conftest.err conftest.$ac_ext
++rm -f conftest.err conftest.i conftest.$ac_ext
  
    # OK, works on sane cases.  Now check whether nonexistent headers
    # can be detected and how.
@@ -3871,17 +3942,19 @@
  break
  fi
 -
- rm -f conftest.err conftest.$ac_ext
+-rm -f conftest.err conftest.$ac_ext
++rm -f conftest.err conftest.i conftest.$ac_ext
  
  done
  # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
- rm -f conftest.err conftest.$ac_ext
+-rm -f conftest.err conftest.$ac_ext
 -if $ac_preproc_ok; then
++rm -f conftest.i conftest.err conftest.$ac_ext
 +if $ac_preproc_ok; then :
    break
  fi
  
-@@ -4411,7 +4772,7 @@
+@@ -4411,7 +4784,7 @@
  else
    ac_cv_prog_CPP=$CPP
  fi
@@ -3890,7 +3963,7 @@
  $as_echo "$CPP" >&6; }
  ac_preproc_ok=false
  for ac_c_preproc_warn_flag in '' yes
-@@ -4422,11 +4783,7 @@
+@@ -4422,11 +4795,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.
@@ -3903,7 +3976,7 @@
  /* end confdefs.h.  */
  #ifdef __STDC__
  # include <limits.h>
-@@ -4435,87 +4792,40 @@
+@@ -4435,87 +4804,40 @@
  #endif
  		     Syntax error
  _ACEOF
@@ -3935,7 +4008,8 @@
  continue
  fi
 -
- rm -f conftest.err conftest.$ac_ext
+-rm -f conftest.err conftest.$ac_ext
++rm -f conftest.err conftest.i conftest.$ac_ext
  
    # OK, works on sane cases.  Now check whether nonexistent headers
    # can be detected and how.
@@ -3977,13 +4051,15 @@
  break
  fi
 -
- rm -f conftest.err conftest.$ac_ext
+-rm -f conftest.err conftest.$ac_ext
++rm -f conftest.err conftest.i conftest.$ac_ext
  
  done
  # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
- rm -f conftest.err conftest.$ac_ext
+-rm -f conftest.err conftest.$ac_ext
 -if $ac_preproc_ok; then
 -  :
++rm -f conftest.i conftest.err conftest.$ac_ext
 +if $ac_preproc_ok; then :
 +
  else
@@ -3995,12 +4071,12 @@
 -$as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
 -See \`config.log' for more details." >&2;}
 -   { (exit 1); exit 1; }; }; }
-+as_fn_error "C preprocessor \"$CPP\" fails sanity check
-+See \`config.log' for more details." "$LINENO" 5; }
++as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
++See \`config.log' for more details" "$LINENO" 5 ; }
  fi
  
  ac_ext=c
-@@ -4525,9 +4835,9 @@
+@@ -4525,9 +4847,9 @@
  ac_compiler_gnu=$ac_cv_c_compiler_gnu
  
  
@@ -4012,7 +4088,7 @@
    $as_echo_n "(cached) " >&6
  else
    if test -z "$GREP"; then
-@@ -4538,7 +4848,7 @@
+@@ -4538,7 +4860,7 @@
  do
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
@@ -4021,7 +4097,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
-@@ -4558,7 +4868,7 @@
+@@ -4558,7 +4880,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
@@ -4030,7 +4106,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"
-@@ -4573,26 +4883,24 @@
+@@ -4573,26 +4895,24 @@
        $ac_path_GREP_found && break 3
      done
    done
@@ -4041,7 +4117,7 @@
 -    { { $as_echo "$as_me:$LINENO: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
 -$as_echo "$as_me: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
 -   { (exit 1); exit 1; }; }
-+    as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
++    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
    fi
  else
    ac_cv_path_GREP=$GREP
@@ -4062,7 +4138,7 @@
    $as_echo_n "(cached) " >&6
  else
    if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
-@@ -4606,7 +4914,7 @@
+@@ -4606,7 +4926,7 @@
  do
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
@@ -4071,7 +4147,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
-@@ -4626,7 +4934,7 @@
+@@ -4626,7 +4946,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
@@ -4080,7 +4156,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"
-@@ -4641,12 +4949,10 @@
+@@ -4641,12 +4961,10 @@
        $ac_path_EGREP_found && break 3
      done
    done
@@ -4091,11 +4167,11 @@
 -    { { $as_echo "$as_me:$LINENO: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
 -$as_echo "$as_me: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
 -   { (exit 1); exit 1; }; }
-+    as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
++    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
    fi
  else
    ac_cv_path_EGREP=$EGREP
-@@ -4654,21 +4960,17 @@
+@@ -4654,21 +4972,17 @@
  
     fi
  fi
@@ -4121,7 +4197,7 @@
  /* end confdefs.h.  */
  #include <stdlib.h>
  #include <stdarg.h>
-@@ -4683,48 +4985,23 @@
+@@ -4683,48 +4997,23 @@
    return 0;
  }
  _ACEOF
@@ -4175,7 +4251,7 @@
  else
    ac_cv_header_stdc=no
  fi
-@@ -4734,18 +5011,14 @@
+@@ -4734,18 +5023,14 @@
  
  if test $ac_cv_header_stdc = yes; then
    # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
@@ -4197,7 +4273,7 @@
  else
    ac_cv_header_stdc=no
  fi
-@@ -4755,14 +5028,10 @@
+@@ -4755,14 +5040,10 @@
  
  if test $ac_cv_header_stdc = yes; then
    # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
@@ -4214,7 +4290,7 @@
  /* end confdefs.h.  */
  #include <ctype.h>
  #include <stdlib.h>
-@@ -4789,118 +5058,34 @@
+@@ -4789,118 +5070,33 @@
    return 0;
  }
  _ACEOF
@@ -4341,12 +4417,11 @@
 +  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
 +"
-+eval as_val=\$$as_ac_Header
-+   if test "x$as_val" = x""yes; then :
++if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
-@@ -4911,139 +5096,8 @@
+@@ -4911,139 +5107,8 @@
  
  
  
@@ -4488,7 +4563,7 @@
    MINIX=yes
  else
    MINIX=
-@@ -5052,34 +5106,23 @@
+@@ -5052,34 +5117,23 @@
  
    if test "$MINIX" = yes; then
  
@@ -4529,7 +4604,7 @@
  /* end confdefs.h.  */
  
  #	  define __EXTENSIONS__ 1
-@@ -5092,71 +5135,35 @@
+@@ -5092,71 +5146,35 @@
    return 0;
  }
  _ACEOF
@@ -4570,12 +4645,12 @@
 -    cat >>confdefs.h <<\_ACEOF
 -#define __EXTENSIONS__ 1
 -_ACEOF
--
++    $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
+ 
 -  cat >>confdefs.h <<\_ACEOF
 -#define _ALL_SOURCE 1
 -_ACEOF
-+    $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
- 
+-
 -  cat >>confdefs.h <<\_ACEOF
 -#define _GNU_SOURCE 1
 -_ACEOF
@@ -4612,7 +4687,7 @@
  /* end confdefs.h.  */
  #ifndef __APPLE_CC__
  	       not a universal capable compiler
-@@ -5164,46 +5171,34 @@
+@@ -5164,46 +5182,34 @@
  	     typedef int dummy;
  
  _ACEOF
@@ -4681,7 +4756,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  	     #include <sys/param.h>
-@@ -5221,30 +5216,9 @@
+@@ -5221,30 +5227,9 @@
    return 0;
  }
  _ACEOF
@@ -4714,7 +4789,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  		#include <sys/param.h>
-@@ -5260,49 +5234,18 @@
+@@ -5260,49 +5245,18 @@
    return 0;
  }
  _ACEOF
@@ -4767,7 +4842,7 @@
  /* end confdefs.h.  */
  #include <limits.h>
  
-@@ -5317,30 +5260,9 @@
+@@ -5317,30 +5271,9 @@
    return 0;
  }
  _ACEOF
@@ -4800,7 +4875,7 @@
  /* end confdefs.h.  */
  #include <limits.h>
  
-@@ -5355,51 +5277,20 @@
+@@ -5355,51 +5288,20 @@
    return 0;
  }
  _ACEOF
@@ -4856,7 +4931,7 @@
  /* end confdefs.h.  */
  short int ascii_mm[] =
  		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
-@@ -5425,24 +5316,7 @@
+@@ -5425,24 +5327,7 @@
    return 0;
  }
  _ACEOF
@@ -4882,7 +4957,7 @@
    if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
  	      ac_cv_c_bigendian=yes
  	    fi
-@@ -5454,20 +5328,10 @@
+@@ -5454,20 +5339,10 @@
  		ac_cv_c_bigendian=unknown
  	      fi
  	    fi
@@ -4904,7 +4979,7 @@
  /* end confdefs.h.  */
  $ac_includes_default
  int
-@@ -5487,81 +5351,43 @@
+@@ -5487,81 +5362,43 @@
    return 0;
  }
  _ACEOF
@@ -4976,8 +5051,8 @@
 -$as_echo "$as_me: error: unknown endianness
 - presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
 -   { (exit 1); exit 1; }; } ;;
-+     as_fn_error "unknown endianness
-+ presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
++     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 inline" >&5
@@ -4998,7 +5073,7 @@
  /* end confdefs.h.  */
  #ifndef __cplusplus
  typedef int foo_t;
-@@ -5570,41 +5396,17 @@
+@@ -5570,41 +5407,17 @@
  #endif
  
  _ACEOF
@@ -5042,7 +5117,7 @@
  case $ac_cv_c_inline in
    inline | yes) ;;
    *)
-@@ -5624,14 +5426,10 @@
+@@ -5624,14 +5437,10 @@
  saved_CFLAGS="$CFLAGS";
  c99_init=no
  if test x"$c99_init" = x"no"; then
@@ -5059,7 +5134,7 @@
  /* end confdefs.h.  */
  #include <stdio.h>
  int
-@@ -5644,45 +5442,20 @@
+@@ -5644,45 +5453,20 @@
    return 0;
  }
  _ACEOF
@@ -5110,7 +5185,7 @@
  /* end confdefs.h.  */
  #include <stdio.h>
  int
-@@ -5695,45 +5468,20 @@
+@@ -5695,45 +5479,20 @@
    return 0;
  }
  _ACEOF
@@ -5161,7 +5236,7 @@
  /* end confdefs.h.  */
  #include <stdio.h>
  int
-@@ -5746,45 +5494,20 @@
+@@ -5746,45 +5505,20 @@
    return 0;
  }
  _ACEOF
@@ -5212,7 +5287,7 @@
  /* end confdefs.h.  */
  #include <stdio.h>
  int
-@@ -5797,45 +5520,20 @@
+@@ -5797,45 +5531,20 @@
    return 0;
  }
  _ACEOF
@@ -5263,7 +5338,7 @@
  /* end confdefs.h.  */
  #include <stdio.h>
  int
-@@ -5848,34 +5546,13 @@
+@@ -5848,34 +5557,13 @@
    return 0;
  }
  _ACEOF
@@ -5301,7 +5376,7 @@
  rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  fi
  
-@@ -5894,7 +5571,7 @@
+@@ -5894,7 +5582,7 @@
  else
      CFLAGS="$saved_CFLAGS"
      saved_CFLAGS=""
@@ -5310,7 +5385,7 @@
  $as_echo "$as_me: WARNING: c99 structure initializer are not supported" >&2;}
  fi
  
-@@ -5913,10 +5590,10 @@
+@@ -5913,10 +5601,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.
@@ -5323,7 +5398,7 @@
    $as_echo_n "(cached) " >&6
  else
    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-@@ -5924,11 +5601,11 @@
+@@ -5924,11 +5612,11 @@
  do
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
@@ -5339,7 +5414,7 @@
    /usr/ucb/* ) ;;
    *)
      # OSF1 and SCO ODT 3.0 have their own names for install.
-@@ -5965,7 +5642,7 @@
+@@ -5965,7 +5653,7 @@
      ;;
  esac
  
@@ -5348,7 +5423,7 @@
  IFS=$as_save_IFS
  
  rm -rf conftest.one conftest.two conftest.dir
-@@ -5981,7 +5658,7 @@
+@@ -5981,7 +5669,7 @@
      INSTALL=$ac_install_sh
    fi
  fi
@@ -5357,7 +5432,7 @@
  $as_echo "$INSTALL" >&6; }
  
  # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-@@ -5993,17 +5670,13 @@
+@@ -5993,17 +5681,13 @@
  test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
  
  
@@ -5378,7 +5453,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -6028,54 +5701,27 @@
+@@ -6028,54 +5712,27 @@
      ac_res=-l$ac_lib
      LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
    fi
@@ -5441,7 +5516,7 @@
    test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
  
  fi
-@@ -6083,7 +5729,6 @@
+@@ -6083,7 +5740,6 @@
  
  
  
@@ -5449,7 +5524,7 @@
   cat >>confdefs.h <<\EOF
  #ifndef _XOPEN_SOURCE_EXTENDED
  #define _XOPEN_SOURCE_EXTENDED 1
-@@ -6092,15 +5737,15 @@
+@@ -6092,15 +5748,15 @@
  
  
  # Check whether --enable-largefile was given.
@@ -5468,7 +5543,7 @@
    $as_echo_n "(cached) " >&6
  else
    ac_cv_sys_largefile_CC=no
-@@ -6109,11 +5754,7 @@
+@@ -6109,11 +5765,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.
@@ -5481,7 +5556,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
   /* Check that off_t can represent 2**63 - 1 correctly.
-@@ -6132,60 +5773,14 @@
+@@ -6132,60 +5784,14 @@
    return 0;
  }
  _ACEOF
@@ -5544,7 +5619,7 @@
  rm -f core conftest.err conftest.$ac_objext
  	 break
         done
-@@ -6193,23 +5788,19 @@
+@@ -6193,23 +5799,19 @@
         rm -f conftest.$ac_ext
      fi
  fi
@@ -5572,7 +5647,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
   /* Check that off_t can represent 2**63 - 1 correctly.
-@@ -6228,38 +5819,11 @@
+@@ -6228,38 +5830,11 @@
    return 0;
  }
  _ACEOF
@@ -5613,7 +5688,7 @@
  /* end confdefs.h.  */
  #define _FILE_OFFSET_BITS 64
  #include <sys/types.h>
-@@ -6279,38 +5843,15 @@
+@@ -6279,38 +5854,15 @@
    return 0;
  }
  _ACEOF
@@ -5654,7 +5729,7 @@
  $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
  case $ac_cv_sys_file_offset_bits in #(
    no | unknown) ;;
-@@ -6322,17 +5863,13 @@
+@@ -6322,17 +5874,13 @@
  esac
  rm -rf conftest*
    if test $ac_cv_sys_file_offset_bits = unknown; then
@@ -5675,7 +5750,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
   /* Check that off_t can represent 2**63 - 1 correctly.
-@@ -6351,38 +5888,11 @@
+@@ -6351,38 +5899,11 @@
    return 0;
  }
  _ACEOF
@@ -5716,7 +5791,7 @@
  /* end confdefs.h.  */
  #define _LARGE_FILES 1
  #include <sys/types.h>
-@@ -6402,38 +5912,15 @@
+@@ -6402,38 +5923,15 @@
    return 0;
  }
  _ACEOF
@@ -5757,7 +5832,7 @@
  $as_echo "$ac_cv_sys_large_files" >&6; }
  case $ac_cv_sys_large_files in #(
    no | unknown) ;;
-@@ -6457,31 +5944,25 @@
+@@ -6457,31 +5955,25 @@
  	*hpux*)
  		# mmap on HPUX is completely broken...
  
@@ -5794,7 +5869,7 @@
  
  		if test "${GCC}" != "yes"; then
  			## for funky AIX compiler using strncpy()
-@@ -6493,7 +5974,6 @@
+@@ -6493,7 +5985,6 @@
  
  
  
@@ -5802,7 +5877,7 @@
   cat >>confdefs.h <<\EOF
  #ifndef _XOPEN_SOURCE
  #define _XOPEN_SOURCE 600
-@@ -6503,7 +5983,6 @@
+@@ -6503,7 +5994,6 @@
  
  
  
@@ -5810,7 +5885,7 @@
   cat >>confdefs.h <<\EOF
  #ifndef _OSF_SOURCE
  #define _OSF_SOURCE 1
-@@ -6520,9 +5999,7 @@
+@@ -6520,9 +6010,7 @@
  			*)
  				CFLAGS="$CFLAGS -D_POSIX_C_SOURCE=200112L"
  
@@ -5821,7 +5896,7 @@
  
  				;;
  		esac
-@@ -6531,9 +6008,7 @@
+@@ -6531,9 +6019,7 @@
  			*)
  				CFLAGS="$CFLAGS -D_SYSV"
  
@@ -5832,7 +5907,7 @@
  
  				;;
  		esac
-@@ -6542,978 +6017,385 @@
+@@ -6542,978 +6028,412 @@
  
  
  
@@ -6001,9 +6076,8 @@
 +  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; }; }
++as_fn_error 77 "cannot compute sizeof (int)
++See \`config.log' for more details" "$LINENO" 5 ; }
 +   else
 +     ac_cv_sizeof_int=0
 +   fi
@@ -6118,9 +6192,8 @@
 +  if test "$ac_cv_type_char" = yes; then
 +     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-+{ as_fn_set_status 77
-+as_fn_error "cannot compute sizeof (char)
-+See \`config.log' for more details." "$LINENO" 5; }; }
++as_fn_error 77 "cannot compute sizeof (char)
++See \`config.log' for more details" "$LINENO" 5 ; }
 +   else
 +     ac_cv_sizeof_char=0
 +   fi
@@ -6130,18 +6203,18 @@
  fi
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_char" >&5
 +$as_echo "$ac_cv_sizeof_char" >&6; }
++
++
++
++cat >>confdefs.h <<_ACEOF
++#define SIZEOF_CHAR $ac_cv_sizeof_char
++_ACEOF
  
 -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 >>confdefs.h <<_ACEOF
-+#define SIZEOF_CHAR $ac_cv_sizeof_char
-+_ACEOF
-+
-+
 +# The cast to long int works around a bug in the HP C Compiler
 +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
 +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
@@ -6152,14 +6225,13 @@
 +  $as_echo_n "(cached) " >&6
 +else
 +  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short"        "$ac_includes_default"; then :
-+
+ 
 +else
 +  if test "$ac_cv_type_short" = yes; then
 +     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-+{ as_fn_set_status 77
-+as_fn_error "cannot compute sizeof (short)
-+See \`config.log' for more details." "$LINENO" 5; }; }
++as_fn_error 77 "cannot compute sizeof (short)
++See \`config.log' for more details" "$LINENO" 5 ; }
 +   else
 +     ac_cv_sizeof_short=0
 +   fi
@@ -6196,9 +6268,8 @@
 +  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; }; }
++as_fn_error 77 "cannot compute sizeof (long)
++See \`config.log' for more details" "$LINENO" 5 ; }
 +   else
 +     ac_cv_sizeof_long=0
 +   fi
@@ -6279,11 +6350,29 @@
 -{
 -static int test_array [1 - 2 * !(((long int) (sizeof (int))) <= $ac_mid)];
 -test_array [0] = 0
--
++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_error 77 "cannot compute sizeof (long long)
++See \`config.log' for more details" "$LINENO" 5 ; }
++   else
++     ac_cv_sizeof_long_long=0
++   fi
++fi
+ 
 -  ;
 -  return 0;
 -}
--_ACEOF
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
++$as_echo "$ac_cv_sizeof_long_long" >&6; }
++
++
++
++cat >>confdefs.h <<_ACEOF
++#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
+ _ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -6303,19 +6392,15 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_hi=$ac_mid; break
++
++
++
++ac_fn_c_check_type "$LINENO" "uint_t" "ac_cv_type_uint_t" "$ac_includes_default"
++if test "x$ac_cv_type_uint_t" = x""yes; then :
++
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+  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
  
 -	ac_lo=`expr $ac_mid + 1`
 -			if test $ac_lo -le $ac_mid; then
@@ -6323,19 +6408,26 @@
 -			  break
 -			fi
 -			ac_mid=`expr 2 '*' $ac_mid + 1`
++cat >>confdefs.h <<_ACEOF
++#define uint_t unsigned int
++_ACEOF
++
  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
 -  done
--else
++ac_fn_c_check_type "$LINENO" "int8_t" "ac_cv_type_int8_t" "$ac_includes_default"
++if test "x$ac_cv_type_int8_t" = x""yes; then :
++
+ else
 -  $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 <<_ACEOF
++#define int8_t char
+ _ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
@@ -6372,9 +6464,7 @@
 -  while :; do
 -    cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
-+cat >>confdefs.h <<_ACEOF
-+#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
- _ACEOF
+-_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
@@ -6384,6 +6474,10 @@
 -{
 -static int test_array [1 - 2 * !(((long int) (sizeof (int))) >= $ac_mid)];
 -test_array [0] = 0
++fi
++
++ac_fn_c_check_type "$LINENO" "uint8_t" "ac_cv_type_uint8_t" "$ac_includes_default"
++if test "x$ac_cv_type_uint8_t" = x""yes; then :
  
 -  ;
 -  return 0;
@@ -6408,11 +6502,6 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_lo=$ac_mid; break
-+
-+
-+ac_fn_c_check_type "$LINENO" "uint_t" "ac_cv_type_uint_t" "$ac_includes_default"
-+if test "x$ac_cv_type_uint_t" = x""yes; then :
-+
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
@@ -6424,15 +6513,15 @@
 -			fi
 -			ac_mid=`expr 2 '*' $ac_mid`
 +cat >>confdefs.h <<_ACEOF
-+#define uint_t unsigned int
++#define uint8_t unsigned char
 +_ACEOF
 +
  fi
  
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -  done
-+ac_fn_c_check_type "$LINENO" "int8_t" "ac_cv_type_int8_t" "$ac_includes_default"
-+if test "x$ac_cv_type_int8_t" = x""yes; then :
++ac_fn_c_check_type "$LINENO" "int16_t" "ac_cv_type_int16_t" "$ac_includes_default"
++if test "x$ac_cv_type_int16_t" = x""yes; then :
 +
  else
 -  $as_echo "$as_me: failed program was:" >&5
@@ -6441,7 +6530,7 @@
 -	ac_lo= ac_hi=
 -fi
 +cat >>confdefs.h <<_ACEOF
-+#define int8_t char
++#define int16_t short
 +_ACEOF
  
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
@@ -6463,8 +6552,8 @@
 -{
 -static int test_array [1 - 2 * !(((long int) (sizeof (int))) <= $ac_mid)];
 -test_array [0] = 0
-+ac_fn_c_check_type "$LINENO" "uint8_t" "ac_cv_type_uint8_t" "$ac_includes_default"
-+if test "x$ac_cv_type_uint8_t" = x""yes; then :
++ac_fn_c_check_type "$LINENO" "uint16_t" "ac_cv_type_uint16_t" "$ac_includes_default"
++if test "x$ac_cv_type_uint16_t" = x""yes; then :
  
 -  ;
 -  return 0;
@@ -6495,7 +6584,7 @@
  
 -	ac_lo=`expr '(' $ac_mid ')' + 1`
 +cat >>confdefs.h <<_ACEOF
-+#define uint8_t unsigned char
++#define uint16_t unsigned short
 +_ACEOF
 +
  fi
@@ -6516,15 +6605,17 @@
 -     ac_cv_sizeof_int=0
 -   fi ;;
 -esac
-+ac_fn_c_check_type "$LINENO" "int16_t" "ac_cv_type_int16_t" "$ac_includes_default"
-+if test "x$ac_cv_type_int16_t" = x""yes; then :
 +
++if test $ac_cv_sizeof_int -eq 4 ; then
++ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
++if test "x$ac_cv_type_int32_t" = x""yes; then :
++
  else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 +
 +cat >>confdefs.h <<_ACEOF
-+#define int16_t short
++#define int32_t int
  _ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
@@ -6560,8 +6651,8 @@
 -  return ferror (f) || fclose (f) != 0;
 +fi
 +
-+ac_fn_c_check_type "$LINENO" "uint16_t" "ac_cv_type_uint16_t" "$ac_includes_default"
-+if test "x$ac_cv_type_uint16_t" = x""yes; then :
++ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
++if test "x$ac_cv_type_uint32_t" = x""yes; then :
  
 -  ;
 -  return 0;
@@ -6613,23 +6704,22 @@
 -fi
 -rm -f conftest.val
 +cat >>confdefs.h <<_ACEOF
-+#define uint16_t unsigned short
++#define uint32_t unsigned int
 +_ACEOF
 +
  fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
 -$as_echo "$ac_cv_sizeof_int" >&6; }
  
- 
-+if test $ac_cv_sizeof_int -eq 4 ; then
++elif test $ac_cv_size_long -eq 4 ; then
 +ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
 +if test "x$ac_cv_type_int32_t" = x""yes; then :
-+
+ 
 +else
  
  cat >>confdefs.h <<_ACEOF
 -#define SIZEOF_INT $ac_cv_sizeof_int
-+#define int32_t int
++#define int32_t long
  _ACEOF
  
 +fi
@@ -6688,7 +6778,7 @@
 -    cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 +cat >>confdefs.h <<_ACEOF
-+#define uint32_t unsigned int
++#define uint32_t unsigned long
  _ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
@@ -6723,15 +6813,10 @@
 -	 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
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
++fi
  
 -	ac_lo=`expr $ac_mid + 1`
 -			if test $ac_lo -le $ac_mid; then
@@ -6739,16 +6824,14 @@
 -			  break
 -			fi
 -			ac_mid=`expr 2 '*' $ac_mid + 1`
-+cat >>confdefs.h <<_ACEOF
-+#define int32_t long
-+_ACEOF
-+
++else
++as_fn_error $? "LIBREPLACE no 32-bit type found" "$LINENO" 5
  fi
  
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -  done
-+ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
-+if test "x$ac_cv_type_uint32_t" = x""yes; then :
++ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
++if test "x$ac_cv_type_int64_t" = x""yes; then :
 +
  else
 -  $as_echo "$as_me: failed program was:" >&5
@@ -6757,7 +6840,7 @@
 -	cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 +cat >>confdefs.h <<_ACEOF
-+#define uint32_t unsigned long
++#define int64_t long long
  _ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
@@ -6806,6 +6889,9 @@
 -static int test_array [1 - 2 * !(((long int) (sizeof (char))) >= $ac_mid)];
 -test_array [0] = 0
 +fi
++
++ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
++if test "x$ac_cv_type_uint64_t" = x""yes; then :
  
 -  ;
 -  return 0;
@@ -6833,21 +6919,25 @@
  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`
-+as_fn_error "LIBREPLACE no 32-bit type found" "$LINENO" 5
++cat >>confdefs.h <<_ACEOF
++#define uint64_t unsigned long long
++_ACEOF
++
  fi
  
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -  done
-+ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
-+if test "x$ac_cv_type_int64_t" = x""yes; then :
 +
++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
@@ -6855,7 +6945,7 @@
 -	ac_lo= ac_hi=
 -fi
 +cat >>confdefs.h <<_ACEOF
-+#define int64_t long long
++#define size_t unsigned int
 +_ACEOF
  
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
@@ -6877,8 +6967,8 @@
 -{
 -static int test_array [1 - 2 * !(((long int) (sizeof (char))) <= $ac_mid)];
 -test_array [0] = 0
-+ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
-+if test "x$ac_cv_type_uint64_t" = x""yes; then :
++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 :
  
 -  ;
 -  return 0;
@@ -6909,7 +6999,7 @@
  
 -	ac_lo=`expr '(' $ac_mid ')' + 1`
 +cat >>confdefs.h <<_ACEOF
-+#define uint64_t unsigned long long
++#define ssize_t int
 +_ACEOF
 +
  fi
@@ -6920,27 +7010,37 @@
 -?*) ac_cv_sizeof_char=$ac_lo;;
 -'') if test "$ac_cv_type_char" = yes; then
 -     { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
--$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
++
++# The cast to long int works around a bug in the HP C Compiler
++# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
++# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
++# This bug is HP SR number 8606223364.
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
++$as_echo_n "checking size of off_t... " >&6; }
++if test "${ac_cv_sizeof_off_t+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t"        "$ac_includes_default"; then :
++
++else
++  if test "$ac_cv_type_off_t" = yes; then
++     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+ $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
 -{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (char)
 -See \`config.log' for more details." >&5
 -$as_echo "$as_me: error: cannot compute sizeof (char)
 -See \`config.log' for more details." >&2;}
 -   { (exit 77); exit 77; }; }; }
--   else
++as_fn_error 77 "cannot compute sizeof (off_t)
++See \`config.log' for more details" "$LINENO" 5 ; }
+    else
 -     ac_cv_sizeof_char=0
 -   fi ;;
 -esac
-+
-+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
+-else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
-+
-+cat >>confdefs.h <<_ACEOF
-+#define size_t unsigned int
- _ACEOF
+-_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
@@ -6952,6 +7052,9 @@
 -int
 -main ()
 -{
++     ac_cv_sizeof_off_t=0
++   fi
++fi
  
 -  FILE *f = fopen ("conftest.val", "w");
 -  if (! f)
@@ -6974,17 +7077,16 @@
 -     on some platforms.  */
 -  return ferror (f) || fclose (f) != 0;
 +fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
++$as_echo "$ac_cv_sizeof_off_t" >&6; }
  
 -  ;
 -  return 0;
 -}
-+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
++#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
  _ACEOF
 -rm -f conftest$ac_exeext
 -if { (ac_try="$ac_link"
@@ -7010,28 +7112,26 @@
 -  (exit $ac_status); }; }; then
 -  ac_cv_sizeof_char=`cat conftest.val`
 +
-+fi
 +
-+
 +# The cast to long int works around a bug in the HP C Compiler
 +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
 +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
 +# This bug is HP SR number 8606223364.
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
-+$as_echo_n "checking size of off_t... " >&6; }
-+if test "${ac_cv_sizeof_off_t+set}" = set; then :
++{ $as_echo "$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 (off_t))" "ac_cv_sizeof_off_t"        "$ac_includes_default"; then :
++  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_char" = yes; then
 -     { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
 +else
-+  if test "$ac_cv_type_off_t" = yes; then
++  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 (char)
@@ -7039,12 +7139,11 @@
 -$as_echo "$as_me: error: cannot compute sizeof (char)
 -See \`config.log' for more details." >&2;}
 -   { (exit 77); exit 77; }; }; }
-+{ as_fn_set_status 77
-+as_fn_error "cannot compute sizeof (off_t)
-+See \`config.log' for more details." "$LINENO" 5; }; }
++as_fn_error 77 "cannot compute sizeof (size_t)
++See \`config.log' for more details" "$LINENO" 5 ; }
     else
 -     ac_cv_sizeof_char=0
-+     ac_cv_sizeof_off_t=0
++     ac_cv_sizeof_size_t=0
     fi
  fi
 -rm -rf conftest.dSYM
@@ -7055,34 +7154,55 @@
  fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_char" >&5
 -$as_echo "$ac_cv_sizeof_char" >&6; }
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
-+$as_echo "$ac_cv_sizeof_off_t" >&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
 -#define SIZEOF_CHAR $ac_cv_sizeof_char
-+#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
++#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
  _ACEOF
  
  
-@@ -7521,32140 +6403,3100 @@
+@@ -7521,30725 +6441,2022 @@
  # 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 short" >&5
 -$as_echo_n "checking size of short... " >&6; }
 -if test "${ac_cv_sizeof_short+set}" = set; then
-+{ $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 "$as_me:${as_lineno-$LINENO}: checking size of ssize_t" >&5
++$as_echo_n "checking size of ssize_t... " >&6; }
++if test "${ac_cv_sizeof_ssize_t+set}" = set; then :
    $as_echo_n "(cached) " >&6
  else
 -  if test "$cross_compiling" = yes; then
 -  # Depending upon the size, compute the lo and hi bounds.
 -cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
--_ACEOF
++  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (ssize_t))" "ac_cv_sizeof_ssize_t"        "$ac_includes_default"; then :
++
++else
++  if test "$ac_cv_type_ssize_t" = yes; then
++     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
++$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
++as_fn_error 77 "cannot compute sizeof (ssize_t)
++See \`config.log' for more details" "$LINENO" 5 ; }
++   else
++     ac_cv_sizeof_ssize_t=0
++   fi
++fi
++
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_ssize_t" >&5
++$as_echo "$ac_cv_sizeof_ssize_t" >&6; }
++
++
++
++cat >>confdefs.h <<_ACEOF
++#define SIZEOF_SSIZE_T $ac_cv_sizeof_ssize_t
+ _ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
@@ -7092,12 +7212,18 @@
 -{
 -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;
 -}
--_ACEOF
++
++
++ac_fn_c_check_type "$LINENO" "intptr_t" "ac_cv_type_intptr_t" "$ac_includes_default"
++if test "x$ac_cv_type_intptr_t" = x""yes; then :
++
++cat >>confdefs.h <<_ACEOF
++#define HAVE_INTPTR_T 1
+ _ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -7120,7 +7246,15 @@
 -  while :; do
 -    cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
--_ACEOF
++
++
++fi
++ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default"
++if test "x$ac_cv_type_uintptr_t" = x""yes; then :
++
++cat >>confdefs.h <<_ACEOF
++#define HAVE_UINTPTR_T 1
+ _ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
@@ -7130,29 +7264,17 @@
 -{
 -static int test_array [1 - 2 * !(((long int) (sizeof (short))) <= $ac_mid)];
 -test_array [0] = 0
-+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;
 -}
++
 +fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
-+$as_echo "$ac_cv_sizeof_size_t" >&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 :
 +
-+
-+
 +cat >>confdefs.h <<_ACEOF
-+#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
++#define HAVE_PTRDIFF_T 1
  _ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
@@ -7173,20 +7295,9 @@
 -	 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
+-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
@@ -7194,33 +7305,37 @@
 -			  break
 -			fi
 -			ac_mid=`expr 2 '*' $ac_mid + 1`
-+else
-+  if test "$ac_cv_type_ssize_t" = yes; then
-+     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-+{ as_fn_set_status 77
-+as_fn_error "cannot compute sizeof (ssize_t)
-+See \`config.log' for more details." "$LINENO" 5; }; }
-+   else
-+     ac_cv_sizeof_ssize_t=0
-+   fi
++
  fi
  
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -  done
--else
++
++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 "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+fi
-+{ $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.  */
 -_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 ()
@@ -7231,10 +7346,7 @@
 -  ;
 -  return 0;
 -}
-+
-+cat >>confdefs.h <<_ACEOF
-+#define SIZEOF_SSIZE_T $ac_cv_sizeof_ssize_t
- _ACEOF
+-_ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -7257,35 +7369,33 @@
 -  while :; do
 -    cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
-+
-+
-+
-+ac_fn_c_check_type "$LINENO" "intptr_t" "ac_cv_type_intptr_t" "$ac_includes_default"
-+if test "x$ac_cv_type_intptr_t" = x""yes; then :
-+
-+cat >>confdefs.h <<_ACEOF
-+#define HAVE_INTPTR_T 1
- _ACEOF
+-_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* 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;
--}
-+
-+fi
-+ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default"
-+if test "x$ac_cv_type_uintptr_t" = x""yes; then :
-+
-+cat >>confdefs.h <<_ACEOF
-+#define HAVE_UINTPTR_T 1
+   ;
+   return 0;
+ }
  _ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
@@ -7306,9 +7416,14 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_lo=$ac_mid; break
--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
  
 -	ac_hi=`expr '(' $ac_mid ')' - 1`
 -			if test $ac_mid -le $ac_hi; then
@@ -7316,31 +7431,42 @@
 -			  break
 -			fi
 -			ac_mid=`expr 2 '*' $ac_mid`
-+
  fi
-+ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
-+if test "x$ac_cv_type_ptrdiff_t" = x""yes; then :
-+
-+cat >>confdefs.h <<_ACEOF
-+#define HAVE_PTRDIFF_T 1
-+_ACEOF
++{ $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
  
 -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
  
 -	ac_lo= ac_hi=
  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
++echo "LIBREPLACE_CC_CHECKS: END"
++
++
++
++
++
++
++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
@@ -7352,41 +7478,36 @@
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+############################################
-+# check if the compiler can do immediate structures
+-/* end confdefs.h.  */
+-$ac_includes_default
+-int
+-main ()
+-{
+-static int test_array [1 - 2 * !(((long int) (sizeof (short))) <= $ac_mid)];
+-test_array [0] = 0
++TEVENT_OBJ=""
++TEVENT_CFLAGS=""
++TEVENT_LIBS=""
+ 
+-  ;
+-  return 0;
+-}
 +
-+{ $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
 +
-+		#include <stdio.h>
++TEVENT_CFLAGS="-I$teventdir"
 +
- int
- main ()
- {
--static int test_array [1 - 2 * !(((long int) (sizeof (short))) <= $ac_mid)];
--test_array [0] = 0
++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"
 +
-+		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;
- }
++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"
@@ -7407,23 +7528,15 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_hi=$ac_mid
-+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`
  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
  
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
--done
+ done
 -case $ac_lo in
 -?*) ac_cv_sizeof_short=$ac_lo;;
 -'') if test "$ac_cv_type_short" = yes; then
@@ -7441,7 +7554,14 @@
 -else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
--_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
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
@@ -7453,7 +7573,6 @@
 -int
 -main ()
 -{
-+$as_echo "#define HAVE_IMMEDIATE_STRUCTURES 1" >>confdefs.h
  
 -  FILE *f = fopen ("conftest.val", "w");
 -  if (! f)
@@ -7476,6 +7595,7 @@
 -     on some platforms.  */
 -  return ferror (f) || fclose (f) != 0;
 +fi
++done
  
 -  ;
 -  return 0;
@@ -7508,6 +7628,10 @@
 -  $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 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
  
 -( exit $ac_status )
 -if test "$ac_cv_type_short" = yes; then
@@ -7521,37 +7645,41 @@
 -   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
++
++if test x"$VERSIONSCRIPT" != "x"; then
++    EXPORTSFILE=tevent.exports
++
+ fi
 -rm -f conftest.val
-+echo "LIBREPLACE_CC_CHECKS: END"
 +
 +
 +
++LIBTEVENT_OBJ0=""
++for obj in ${TEVENT_OBJ}; do
++	LIBTEVENT_OBJ0="${LIBTEVENT_OBJ0} ${teventdir}/${obj}"
++done
 +
++LIBS="${LIBS} ${TEVENT_LIBS}"
 +
++SAMBA_CPPFLAGS="-Iinclude -I${srcdir-.}/include  -I. -I${srcdir-.}"
++SAMBA_CPPFLAGS="${SAMBA_CPPFLAGS} -I${srcdir-.}/../lib/replace"
++SAMBA_CPPFLAGS="${SAMBA_CPPFLAGS} ${TEVENT_CFLAGS}"
++SAMBA_CPPFLAGS="${SAMBA_CPPFLAGS} -I${srcdir-.}/libaddns"
++SAMBA_CPPFLAGS="${SAMBA_CPPFLAGS} -I${srcdir-.}/librpc"
++SAMBA_CPPFLAGS="${SAMBA_CPPFLAGS} -I${srcdir-.}/.."
 +
-+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
++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
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
 -$as_echo "$ac_cv_sizeof_short" >&6; }
  
-+TEVENT_OBJ=""
-+TEVENT_CFLAGS=""
-+TEVENT_LIBS=""
  
  
 -cat >>confdefs.h <<_ACEOF
@@ -7582,7 +7710,6 @@
 -{
 -static int test_array [1 - 2 * !(((long int) (sizeof (long))) >= 0)];
 -test_array [0] = 0
-+TEVENT_CFLAGS="-I$teventdir"
  
 -  ;
 -  return 0;
@@ -7620,21 +7747,11 @@
 -{
 -static int test_array [1 - 2 * !(((long int) (sizeof (long))) <= $ac_mid)];
 -test_array [0] = 0
-+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"
  
 -  ;
 -  return 0;
 -}
-+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
@@ -7664,24 +7781,17 @@
 -			  break
 -			fi
 -			ac_mid=`expr 2 '*' $ac_mid + 1`
- fi
+-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
-+done
  
 -	cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
-+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
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
@@ -7728,8 +7838,6 @@
 -{
 -static int test_array [1 - 2 * !(((long int) (sizeof (long))) >= $ac_mid)];
 -test_array [0] = 0
-+fi
-+done
  
 -  ;
 -  return 0;
@@ -7757,10 +7865,6 @@
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+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
  
 -	ac_hi=`expr '(' $ac_mid ')' - 1`
 -			if test $ac_mid -le $ac_hi; then
@@ -7768,18 +7872,16 @@
 -			  break
 -			fi
 -			ac_mid=`expr 2 '*' $ac_mid`
- fi
+-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
-+if test x"$VERSIONSCRIPT" != "x"; then
-+    EXPORTSFILE=tevent.exports
  
 -	ac_lo= ac_hi=
- fi
+-fi
  
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -fi
@@ -7827,27 +7929,9 @@
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+LIBTEVENT_OBJ0=""
-+for obj in ${TEVENT_OBJ}; do
-+	LIBTEVENT_OBJ0="${LIBTEVENT_OBJ0} ${teventdir}/${obj}"
-+done
-+
-+LIBS="${LIBS} ${TEVENT_LIBS}"
  
 -	ac_lo=`expr '(' $ac_mid ')' + 1`
-+SAMBA_CPPFLAGS="-Iinclude -I${srcdir-.}/include  -I. -I${srcdir-.}"
-+SAMBA_CPPFLAGS="${SAMBA_CPPFLAGS} -I${srcdir-.}/../lib/replace"
-+SAMBA_CPPFLAGS="${SAMBA_CPPFLAGS} ${TEVENT_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
+-fi
  
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -done
@@ -8400,18 +8484,18 @@
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
- 
+-
 -	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
- 
- 
+-
+-
 -fi
- 
+-
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_uint_t" >&5
@@ -8419,13 +8503,13 @@
 -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
@@ -8504,18 +8588,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
@@ -8523,13 +8607,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
@@ -8608,18 +8692,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
@@ -8627,13 +8711,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
@@ -8712,53 +8796,32 @@
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
- 
+-
 -	ac_cv_type_int16_t=yes
-+
-+# 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
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+# Check whether --enable-socket-wrapper was given.
-+if test "${enable_socket_wrapper+set}" = set; then :
-+  enableval=$enable_socket_wrapper;
-+fi
- 
- 
+-
+-
 -fi
-+DEFAULT_TEST_OPTIONS=
-+HAVE_SOCKET_WRAPPER=no
- 
+-
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-+if eval "test x$developer = xyes"; then
-+	enable_socket_wrapper=yes
- fi
+-fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_int16_t" >&5
 -$as_echo "$ac_cv_type_int16_t" >&6; }
 -if test "x$ac_cv_type_int16_t" = x""yes; then
 -  :
 -else
- 
+-
 -cat >>confdefs.h <<_ACEOF
 -#define int16_t short
 -_ACEOF
-+if eval "test x$enable_socket_wrapper = xyes"; then
- 
+-
 -fi
-+$as_echo "#define SOCKET_WRAPPER 1" >>confdefs.h
- 
+-
 -{ $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
@@ -8837,46 +8900,33 @@
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+	DEFAULT_TEST_OPTIONS=--socket-wrapper
-+	HAVE_SOCKET_WRAPPER=yes
- 
+-
 -	ac_cv_type_uint16_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
- 
- 
+-
+-
 -fi
- 
+-
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-+
-+# 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:$LINENO: result: $ac_cv_type_uint16_t" >&5
 -$as_echo "$ac_cv_type_uint16_t" >&6; }
 -if test "x$ac_cv_type_uint16_t" = x""yes; then
 -  :
 -else
- 
+-
 -cat >>confdefs.h <<_ACEOF
 -#define uint16_t unsigned short
 -_ACEOF
- 
-+HAVE_NSS_WRAPPER=no
-+
-+if eval "test x$developer = xyes"; then
-+	enable_nss_wrapper=yes
- fi
- 
-+if eval "test x$enable_nss_wrapper = xyes"; then
- 
+-
+-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; }
@@ -8956,23 +9006,18 @@
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+$as_echo "#define NSS_WRAPPER 1" >>confdefs.h
- 
+-
 -	ac_cv_type_int32_t=yes
-+	HAVE_NSS_WRAPPER=yes
-+
-+	# this is only used for samba3
-+	NSS_WRAPPER_OBJS="../lib/nss_wrapper/nss_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
- 
- 
+-
+-
 -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
@@ -8980,13 +9025,13 @@
 -if test "x$ac_cv_type_int32_t" = x""yes; then
 -  :
 -else
- 
+-
 -cat >>confdefs.h <<_ACEOF
 -#define int32_t int
 -_ACEOF
- 
+-
 -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
@@ -9065,30 +9110,18 @@
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+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
- 
+-
 -	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
@@ -9096,28 +9129,19 @@
 -if test "x$ac_cv_type_uint32_t" = x""yes; then
 -  :
 -else
- 
+-
 -cat >>confdefs.h <<_ACEOF
 -#define uint32_t unsigned int
 -_ACEOF
- 
+-
 -fi
- 
+-
 -elif test $ac_cv_size_long -eq 4 ; then
 -{ $as_echo "$as_me:$LINENO: checking for int32_t" >&5
 -$as_echo_n "checking for int32_t... " >&6; }
 -if test "${ac_cv_type_int32_t+set}" = set; then
-+# 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
+-  $as_echo_n "(cached) " >&6
+-else
 -  ac_cv_type_int32_t=no
 -cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
@@ -9158,22 +9182,7 @@
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+
-+
-+	old_CFLAGS="$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
-+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
+-/* end confdefs.h.  */
 -$ac_includes_default
 -int
 -main ()
@@ -9183,12 +9192,7 @@
 -  ;
 -  return 0;
 -}
-+
-+	    int main(void)
-+	    {
-+	    	return 0;
-+	    }
- _ACEOF
+-_ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -9208,38 +9212,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_int32_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_int32_t" >&5
@@ -9247,46 +9234,25 @@
 -if test "x$ac_cv_type_int32_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 int32_t 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 uint32_t" >&5
 -$as_echo_n "checking for uint32_t... " >&6; }
 -if test "${ac_cv_type_uint32_t+set}" = set; then
 -  $as_echo_n "(cached) " >&6
-+	old_CFLAGS="$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_uint32_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 ()
@@ -9296,12 +9262,7 @@
 -  ;
 -  return 0;
 -}
-+
-+	    int main(void)
-+	    {
-+	    	return 0;
-+	    }
- _ACEOF
+-_ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -9355,73 +9316,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
 -
 -	ac_cv_type_uint32_t=yes
-+  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
- 
+-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
- 
+-
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- 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
-+{ $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
- 
+-
 -cat >>confdefs.h <<_ACEOF
 -#define uint32_t unsigned long
 -_ACEOF
-+	# 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
- 
+-
+-fi
+-
 -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
-+#################################################
-+# 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; }
- 
+-
 -{ $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
@@ -9500,35 +9429,18 @@
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+# 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; }
- 
+-
 -	ac_cv_type_int64_t=yes
 -fi
-+$as_echo "#define WITH_PROFILE 1" >>confdefs.h
- 
+-
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-+    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
+-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
 -fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_int64_t" >&5
@@ -9536,26 +9448,18 @@
 -if test "x$ac_cv_type_int64_t" = x""yes; then
 -  :
 -else
- 
+-
 -cat >>confdefs.h <<_ACEOF
 -#define int64_t long long
 -_ACEOF
-+merged_build_possible=yes
- 
+-
 -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
-+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_uint64_t=no
 -cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
@@ -9626,49 +9530,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_uint64_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_uint64_t" >&5
@@ -9676,27 +9552,19 @@
 -if test "x$ac_cv_type_uint64_t" = x""yes; then
 -  :
 -else
- 
+-
 -cat >>confdefs.h <<_ACEOF
 -#define uint64_t unsigned long long
 -_ACEOF
- 
+-
 -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
-+
-+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_size_t=no
 -cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
@@ -9770,45 +9638,18 @@
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+  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
- 
+-
 -	ac_cv_type_size_t=yes
-+  ;;
-+esac
- fi
+-fi
 -
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-+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
 -
 -
-+  { $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
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
@@ -9816,23 +9657,18 @@
 -if test "x$ac_cv_type_size_t" = x""yes; then
 -  :
 -else
- 
+-
 -cat >>confdefs.h <<_ACEOF
 -#define size_t unsigned int
 -_ACEOF
-+  test -n "$MAKE" && break
-+done
- 
+-
 -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 "$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
+-  $as_echo_n "(cached) " >&6
+-else
 -  ac_cv_type_ssize_t=no
 -cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
@@ -9909,39 +9745,30 @@
 -
 -	ac_cv_type_ssize_t=yes
 -fi
- 
+-
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-+if ! $ac_cv_path_MAKE --version | head -1 | grep GNU 2>/dev/null >/dev/null
-+then
-+	samba_cv_gnu_make=no
- else
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -
-+	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
+-else
 -
 -cat >>confdefs.h <<_ACEOF
 -#define ssize_t int
 -_ACEOF
 -
-+	merged_build_possible=no
- fi
- 
- 
+-fi
+-
+-
 -# The cast to long int works around a bug in the HP C Compiler
 -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
 -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
@@ -10029,8 +9856,7 @@
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+# Check for perl
- 
+-
 -	ac_lo=`expr $ac_mid + 1`
 -			if test $ac_lo -le $ac_mid; then
 -			  ac_lo= ac_hi=
@@ -10038,13 +9864,13 @@
 -			fi
 -			ac_mid=`expr 2 '*' $ac_mid + 1`
 -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
@@ -10057,7 +9883,7 @@
 -{
 -static int test_array [1 - 2 * !(((long int) (sizeof (off_t))) < 0)];
 -test_array [0] = 0
- 
+-
 -  ;
 -  return 0;
 -}
@@ -10094,7 +9920,7 @@
 -{
 -static int test_array [1 - 2 * !(((long int) (sizeof (off_t))) >= $ac_mid)];
 -test_array [0] = 0
- 
+-
 -  ;
 -  return 0;
 -}
@@ -10118,69 +9944,30 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_lo=$ac_mid; break
-+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
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+  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
- 
+-
 -	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`
-+  test -z "$ac_cv_path_PERL" && ac_cv_path_PERL=""""
-+  ;;
-+esac
- 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=
-+  { $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
- 
+-
 -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
@@ -34937,7 +34724,7 @@
 -
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -fi
--
+ 
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -# Binary search between lo and hi bounds.
 -while test "x$ac_lo" != "x$ac_hi"; do
@@ -34954,7 +34741,7 @@
 -{
 -static int test_array [1 - 2 * !(((long int) (sizeof (long long))) <= $ac_mid)];
 -test_array [0] = 0
--
+ 
 -  ;
 -  return 0;
 -}
@@ -34981,10 +34768,10 @@
 -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
 -done
 -case $ac_lo in
@@ -35016,7 +34803,7 @@
 -int
 -main ()
 -{
--
+ 
 -  FILE *f = fopen ("conftest.val", "w");
 -  if (! f)
 -    return 1;
@@ -35037,7 +34824,7 @@
 -  /* Do not output a trailing newline, as this causes \r\n confusion
 -     on some platforms.  */
 -  return ferror (f) || fclose (f) != 0;
--
+ 
 -  ;
 -  return 0;
 -}
@@ -35069,7 +34856,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
@@ -35085,19 +34872,37 @@
 -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
++# 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
 -rm -f conftest.val
--fi
++if test "x$CFLAGS" = x; then
++  CFLAGS="-O"
+ fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
 -$as_echo "$ac_cv_sizeof_long_long" >&6; }
--
--
--
+ 
++# Check whether --enable-socket-wrapper was given.
++if test "${enable_socket_wrapper+set}" = set; then :
++  enableval=$enable_socket_wrapper;
++fi
+ 
+ 
 -cat >>confdefs.h <<_ACEOF
 -#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
 -_ACEOF
--
--
++DEFAULT_TEST_OPTIONS=
++HAVE_SOCKET_WRAPPER=no
+ 
++if eval "test x$developer = xyes"; then
++	enable_socket_wrapper=yes
++fi
+ 
 -# The cast to long int works around a bug in the HP C Compiler
 -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
 -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
@@ -35121,7 +34926,8 @@
 -{
 -static int test_array [1 - 2 * !(((long int) (sizeof (short))) >= 0)];
 -test_array [0] = 0
--
++if eval "test x$enable_socket_wrapper = xyes"; then
+ 
 -  ;
 -  return 0;
 -}
@@ -35158,7 +34964,8 @@
 -{
 -static int test_array [1 - 2 * !(((long int) (sizeof (short))) <= $ac_mid)];
 -test_array [0] = 0
--
++$as_echo "#define SOCKET_WRAPPER 1" >>confdefs.h
+ 
 -  ;
 -  return 0;
 -}
@@ -35185,21 +34992,25 @@
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
++	DEFAULT_TEST_OPTIONS=--socket-wrapper
++	HAVE_SOCKET_WRAPPER=yes
+ 
 -	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
--
++	# 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
 -  done
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
+ 
 -	cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
@@ -35212,7 +35023,7 @@
 -{
 -static int test_array [1 - 2 * !(((long int) (sizeof (short))) < 0)];
 -test_array [0] = 0
--
+ 
 -  ;
 -  return 0;
 -}
@@ -35249,7 +35060,7 @@
 -{
 -static int test_array [1 - 2 * !(((long int) (sizeof (short))) >= $ac_mid)];
 -test_array [0] = 0
--
+ 
 -  ;
 -  return 0;
 -}
@@ -35276,27 +35087,33 @@
 -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
--
++# Check whether --enable-nss-wrapper was given.
++if test "${enable_nss_wrapper+set}" = set; then :
++  enableval=$enable_nss_wrapper;
+ 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
--
+ 
 -	ac_lo= ac_hi=
 -fi
--
++HAVE_NSS_WRAPPER=no
+ 
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
--fi
--
++if eval "test x$developer = xyes"; then
++	enable_nss_wrapper=yes
+ 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
@@ -35313,7 +35130,8 @@
 -{
 -static int test_array [1 - 2 * !(((long int) (sizeof (short))) <= $ac_mid)];
 -test_array [0] = 0
--
++if eval "test x$enable_nss_wrapper = xyes"; then
+ 
 -  ;
 -  return 0;
 -}
@@ -35340,10 +35158,15 @@
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
++$as_echo "#define NSS_WRAPPER 1" >>confdefs.h
+ 
 -	ac_lo=`expr '(' $ac_mid ')' + 1`
--fi
--
++	HAVE_NSS_WRAPPER=yes
++
++	# 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
 -done
 -case $ac_lo in
@@ -35375,7 +35198,7 @@
 -int
 -main ()
 -{
--
+ 
 -  FILE *f = fopen ("conftest.val", "w");
 -  if (! f)
 -    return 1;
@@ -35396,7 +35219,7 @@
 -  /* Do not output a trailing newline, as this causes \r\n confusion
 -     on some platforms.  */
 -  return ferror (f) || fclose (f) != 0;
--
+ 
 -  ;
 -  return 0;
 -}
@@ -35428,7 +35251,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
@@ -35449,15 +35272,27 @@
 -fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
 -$as_echo "$ac_cv_sizeof_short" >&6; }
--
--
--
+ 
+ 
+ 
 -cat >>confdefs.h <<_ACEOF
 -#define SIZEOF_SHORT $ac_cv_sizeof_short
 -_ACEOF
--
--
--
++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
+ 
 -{ $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
@@ -35469,7 +35304,7 @@
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
--
+ 
 -int
 -main ()
 -{
@@ -35497,7 +35332,7 @@
 -  { /* SCO 3.2v4 cc rejects this.  */
 -    char *t;
 -    char const *s = 0 ? (char *) 0 : (char const *) 0;
--
+ 
 -    *t++ = 0;
 -    if (s) return 0;
 -  }
@@ -35522,34 +35357,6 @@
 -  }
 -  return !cs[0] && !zero.x;
 -#endif
-+		;;
-+	*)
-+		# Extract the first word of "perl", so it can be a program name with args.
-+set dummy perl; ac_word=$2
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-+$as_echo_n "checking for $ac_word... " >&6; }
-+if test "${ac_cv_path_PERL+set}" = set; then :
-+  $as_echo_n "(cached) " >&6
-+else
-+  case $PERL in
-+  [\\/]* | ?:[\\/]*)
-+  ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
-+  ;;
-+  *)
-+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-+for as_dir in $PATH
-+do
-+  IFS=$as_save_IFS
-+  test -z "$as_dir" && as_dir=.
-+    for ac_exec_ext in '' $ac_executable_extensions; do
-+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-+    ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
-+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-+    break 2
-+  fi
-+done
-+  done
-+IFS=$as_save_IFS
  
 -  ;
 -  return 0;
@@ -35560,8 +35367,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_compile") 2>conftest.er1
@@ -35575,19 +35381,12 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_cv_c_const=yes
-+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
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
+ 
 -	ac_cv_c_const=no
-+  { $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
@@ -35598,32 +35397,35 @@
 -cat >>confdefs.h <<\_ACEOF
 -#define const /**/
 -_ACEOF
-+		;;
-+esac
- 
-+if test x"$PERL" = x""; then
-+	{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No version of perl was found!" >&5
-+$as_echo "$as_me: WARNING: No version of perl was found!" >&2;}
-+	merged_build_possible=no
++# 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
-+	if test x"$debug" = x"yes";then
-+		PERL="$PERL -W"
-+	fi
-+	export PERL
-+	true
- 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
-+
-+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
+-  $as_echo_n "(cached) " >&6
++	old_CFLAGS="$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
 -  ac_cv_c_inline=no
 -for ac_kw in inline __inline__ __inline; do
@@ -35632,31 +35434,19 @@
 -_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.  */
 -#ifndef __cplusplus
 -typedef int foo_t;
 -static $ac_kw foo_t static_foo () {return 0; }
 -$ac_kw foo_t foo () {return 0; }
 -#endif
-+  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
  
--_ACEOF
++	    int main(void)
++	    {
++	    	return 0;
++	    }
+ _ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -35676,65 +35466,43 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_cv_c_inline=$ac_kw
-+fi
-+fi
-+AR=$ac_cv_prog_AR
-+if test -n "$AR"; then
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
-+$as_echo "$AR" >&6; }
++if ac_fn_c_try_run "$LINENO"; then :
++  samba_cv_HAVE_Wdeclaration_after_statement=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; }
+-
+-
++  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
 -  test "$ac_cv_c_inline" != no && break
-+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
-+  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
+-done
++	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:$LINENO: result: $ac_cv_c_inline" >&5
 -$as_echo "$ac_cv_c_inline" >&6; }
--
-+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:${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
+ 
 -case $ac_cv_c_inline in
 -  inline | yes) ;;
 -  *)
@@ -35748,29 +35516,30 @@
 -#endif
 -_ACEOF
 -    ;;
-+  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
+-esac
++	#-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
-+  AR="$ac_cv_prog_AR"
-+fi
  
  
 - { $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
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker used by compiler is GNU ld" >&5
-+$as_echo_n "checking if the linker used by compiler is GNU ld... " >&6; }
-+if test "${ac_cv_prog_gnu_ld+set}" = set; then :
-   $as_echo_n "(cached) " >&6
+-  $as_echo_n "(cached) " >&6
++	old_CFLAGS="$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
 -  ac_cv_c_bigendian=unknown
 -    # See if we're dealing with a universal compiler.
@@ -35779,13 +35548,18 @@
 -_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.  */
 -#ifndef __APPLE_CC__
 -	       not a universal capable compiler
 -	     #endif
 -	     typedef int dummy;
--
--_ACEOF
+ 
++	    int main(void)
++	    {
++	    	return 0;
++	    }
+ _ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -35811,56 +35585,17 @@
 -	case "${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}" in  #(
 -	  *-arch*ppc*|*-arch*i386*|*-arch*x86_64*) ac_cv_c_bigendian=universal;;
 -	esac
-+  # I'd rather use --version here, but apparently some GNU ld's only accept -v.
-+if $CC -Wl,-v /dev/null 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
-+  ac_cv_prog_gnu_ld=yes
++if ac_fn_c_try_run "$LINENO"; then :
++  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_prog_gnu_ld=no
+-
+-
++  samba_cv_HAVE_Werror_implicit_function_declaration=no
 +fi
-+fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gnu_ld" >&5
-+$as_echo "$ac_cv_prog_gnu_ld" >&6; }
- 
- 
-+if test "$ac_cv_prog_gnu_ld" = "yes"; then
-+	ac_cv_gnu_ld_version=`$CC -Wl,-v /dev/null 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
++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
@@ -35871,57 +35606,42 @@
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+
-+
-+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
-+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
+-/* end confdefs.h.  */
 -#include <sys/types.h>
 -	     #include <sys/param.h>
- 
- int
- main ()
- {
+-
+-int
+-main ()
+-{
 -#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
 -		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
 -		     && LITTLE_ENDIAN)
 -	      bogus endian macros
 -	     #endif
++	CFLAGS="$old_CFLAGS";
++	old_CFLAGS="";
++	export CFLAGS;
++	CPPFLAGS="$old_CPPFLAGS";
++	old_CPPFLAGS="";
++	export CPPFLAGS;
++	LDFLAGS="$old_LDFLAGS";
++	old_LDFLAGS="";
++	export LDFLAGS;
  
-   ;
-   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
@@ -35939,14 +35659,20 @@
 -/* end confdefs.h.  */
 -#include <sys/types.h>
 -		#include <sys/param.h>
--
+ 
 -int
 -main ()
 -{
 -#if BYTE_ORDER != BIG_ENDIAN
 -		 not big endian
 -		#endif
--
++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
+ 
 -  ;
 -  return 0;
 -}
@@ -35954,19 +35680,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
@@ -35979,18 +35699,37 @@
 -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
+ 
 -	ac_cv_c_bigendian=no
--fi
--
++       if test x"$picky_developer" = x"yes"; then
++	    DEVELOPER_CFLAGS="$DEVELOPER_CFLAGS -Werror"
++       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 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; }
+ 
 -fi
--
++$as_echo "#define WITH_PROFILE 1" >>confdefs.h
+ 
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -    fi
 -    if test $ac_cv_c_bigendian = unknown; then
@@ -36002,14 +35741,26 @@
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
 -#include <limits.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; }
+ 
 -int
 -main ()
 -{
 -#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
 -	      bogus endian macros
 -	     #endif
--
++fi
+ 
 -  ;
 -  return 0;
 -}
@@ -36017,24 +35768,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
@@ -36051,14 +35791,15 @@
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
 -#include <limits.h>
--
+ 
 -int
 -main ()
 -{
 -#ifndef _BIG_ENDIAN
 -		 not big endian
 -		#endif
--
++merged_build_possible=yes
+ 
 -  ;
 -  return 0;
 -}
@@ -36066,31 +35807,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
-+      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:${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; } &&
-+	 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
@@ -36100,40 +35823,56 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_cv_c_bigendian=yes
-+  $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
++
++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 "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
++  if test -n "$AWK"; then
++  ac_cv_prog_AWK="$AWK" # 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_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_c_bigendian=no
-+  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
 +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; }
++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: no" >&5
 +$as_echo "no" >&6; }
++fi
  
-+$as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h
  
- fi
+-fi
++  test -n "$AWK" && break
++done
  
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -    fi
@@ -36146,34 +35885,7 @@
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+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}: 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
-+
-+
-+	old_CFLAGS="$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
-+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
+-/* end confdefs.h.  */
 -short int ascii_mm[] =
 -		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
 -		short int ascii_ii[] =
@@ -36189,6 +35901,7 @@
 -		  return ebcdic_mm[i] + ebcdic_ii[i];
 -		}
 -		extern int foo;
++# Check for GNU make
  
 -int
 -main ()
@@ -36197,11 +35910,7 @@
 -  ;
 -  return 0;
 -}
-+  int main(void)
-+  {
-+  	return 0;
-+  }
- _ACEOF
+-_ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -36231,40 +35940,15 @@
 -		ac_cv_c_bigendian=unknown
 -	      fi
 -	    fi
-+if ac_fn_c_try_run "$LINENO"; then :
-+  samba_cv_HAVE_Werror=yes
- else
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+  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
  
-+	CFLAGS="$old_CFLAGS";
-+	old_CFLAGS="";
-+	export CFLAGS;
-+	CPPFLAGS="$old_CPPFLAGS";
-+	old_CPPFLAGS="";
-+	export CPPFLAGS;
-+	LDFLAGS="$old_LDFLAGS";
-+	old_LDFLAGS="";
-+	export LDFLAGS;
  
- fi
--
+-fi
+ 
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-+{ $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
+-else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
@@ -36312,53 +35996,56 @@
 -  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
 -  (exit $ac_status); }; }; then
 -  ac_cv_c_bigendian=no
-+	old_CFLAGS="$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
++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 "$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.  */
++  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
  
 -( exit $ac_status )
 -ac_cv_c_bigendian=yes
-+  int main(void)
-+  {
-+  	return 0;
-+  }
-+_ACEOF
-+if ac_fn_c_try_run "$LINENO"; then :
-+  samba_cv_HAVE_w2=yes
-+else
-+  samba_cv_HAVE_w2=no
- 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
-+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-+  conftest.$ac_objext conftest.beam conftest.$ac_ext
++  ;;
++esac
  fi
- 
-+	CFLAGS="$old_CFLAGS";
-+	old_CFLAGS="";
-+	export CFLAGS;
-+	CPPFLAGS="$old_CPPFLAGS";
-+	old_CPPFLAGS="";
-+	export CPPFLAGS;
-+	LDFLAGS="$old_LDFLAGS";
-+	old_LDFLAGS="";
-+	export LDFLAGS;
- 
+-
+-
 -    fi
++MAKE=$ac_cv_path_MAKE
++if test -n "$MAKE"; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
++$as_echo "$MAKE" >&6; }
++else
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
  fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
 -$as_echo "$ac_cv_c_bigendian" >&6; }
@@ -36371,11 +36058,11 @@
 -   no)
 -      ;; #(
 -   universal)
--
+ 
 -cat >>confdefs.h <<\_ACEOF
 -#define AC_APPLE_UNIVERSAL_BUILD 1
 -_ACEOF
--
+ 
 -     ;; #(
 -   *)
 -     { { $as_echo "$as_me:$LINENO: error: unknown endianness
@@ -36384,41 +36071,24 @@
 - presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
 -   { (exit 1); exit 1; }; } ;;
 - esac
-+{ $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
++  test -n "$MAKE" && break
++done
  
  
 -{ $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_n "(cached) " >&6
-+	old_CFLAGS="$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
++{ $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
 -  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 ()
@@ -36429,11 +36099,7 @@
 -  ;
 -  return 0;
 -}
-+   int main(void)
-+   {
-+	return 0;
-+   }
- _ACEOF
+-_ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -36453,19 +36119,18 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_cv_c_char_unsigned=no
-+if ac_fn_c_try_run "$LINENO"; then :
-+  samba_cv_HAVE_errwarn=yes
++if ! $ac_cv_path_MAKE --version | head -1 | grep GNU 2>/dev/null >/dev/null
++then
++	samba_cv_gnu_make=no
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	ac_cv_c_char_unsigned=yes
-+  samba_cv_HAVE_errwarn=no
++	samba_cv_gnu_make=yes
  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
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
 -$as_echo "$ac_cv_c_char_unsigned" >&6; }
@@ -36473,55 +36138,64 @@
 -  cat >>confdefs.h <<\_ACEOF
 -#define __CHAR_UNSIGNED__ 1
 -_ACEOF
-+
-+	CFLAGS="$old_CFLAGS";
-+	old_CFLAGS="";
-+	export CFLAGS;
-+	CPPFLAGS="$old_CPPFLAGS";
-+	old_CPPFLAGS="";
-+	export CPPFLAGS;
-+	LDFLAGS="$old_LDFLAGS";
-+	old_LDFLAGS="";
-+	export LDFLAGS;
- 
+-
++{ $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
-+{ $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"
-+else
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that the C compiler understands -qhalt" >&5
-+$as_echo_n "checking that the C compiler understands -qhalt... " >&6; }
-+if test "${samba_cv_HAVE_qhalt+set}" = set; then :
-+  $as_echo_n "(cached) " >&6
-+else
  
  
 -{ $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="$CFLAGS -qhalt=w";
-+	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_qhalt=cross
++# Check for perl
++
++
++
++
++
++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
 -  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>
++  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
  
 -int
 -main ()
@@ -36530,17 +36204,15 @@
 -  ;
 -  return 0;
 -}
-+   int main(void)
-+   {
-+	return 0;
-+   }
- _ACEOF
+-_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
++  test -z "$ac_cv_path_PERL" && ac_cv_path_PERL=""""
++  ;;
+ esac
 -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 -$as_echo "$ac_try_echo") >&5
 -  (eval "$ac_compile") 2>conftest.er1
@@ -36554,57 +36226,40 @@
 -	 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_qhalt=yes
- else
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	ac_cv_type_signal=void
-+  samba_cv_HAVE_qhalt=no
  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
++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
 -{ $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
-+	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_qhalt" >&5
-+$as_echo "$samba_cv_HAVE_qhalt" >&6; }
-+if test x"$samba_cv_HAVE_qhalt" = x"yes"; then
-+   Werror_FLAGS="-qhalt=w"
-+fi
-+fi
-+fi
-+fi
  
 -{ $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
-+############################################
-+# 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 :
++		;;
++	*)
++		# 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
 -  cat >conftest.$ac_ext <<_ACEOF
@@ -36614,74 +36269,122 @@
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
 -#include <sys/types.h>
++  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
  
 -_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 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; }
++  ;;
++esac
++fi
++PERL=$ac_cv_path_PERL
++if test -n "$PERL"; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
++$as_echo "$PERL" >&6; }
  else
 -  ac_cv_type_uid_t=no
--fi
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
+ fi
 -rm -f conftest*
-+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h.  */
  
 -fi
 -{ $as_echo "$as_me:$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
-+	#include <stdio.h>
-+	enum negative_values { NEGATIVE_VALUE = 0xFFFFFFFF };
-+	int main(void) {
-+		enum negative_values v1 = NEGATIVE_VALUE;
-+		unsigned v2 = NEGATIVE_VALUE;
  
 -cat >>confdefs.h <<\_ACEOF
 -#define uid_t int
 -_ACEOF
-+		if (v1 != 0xFFFFFFFF) {
-+			printf("%u != 0xFFFFFFFF\n", v1);
-+			return 1;
-+		}
-+		if (v2 != 0xFFFFFFFF) {
-+			printf("%u != 0xFFFFFFFF\n", v2);
-+			return 1;
-+		}
++		;;
++esac
++
++if test x"$PERL" = x""; then
++	{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No version of perl was found!" >&5
++$as_echo "$as_me: WARNING: No version of perl was found!" >&2;}
++	merged_build_possible=no
++else
++	if test x"$debug" = x"yes";then
++		PERL="$PERL -W"
++	fi
++	export PERL
++	true
++fi
  
-+		return 0;
-+	}
  
 -cat >>confdefs.h <<\_ACEOF
 -#define gid_t int
- _ACEOF
-+if ac_fn_c_try_run "$LINENO"; then :
-+  samba_cv_CC_NEGATIVE_ENUM_VALUES=yes
+-_ACEOF
++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
-+  samba_cv__CC_NEGATIVE_ENUM_VALUES=no
-+fi
-+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-+  conftest.$ac_objext conftest.beam conftest.$ac_ext
-+fi
++  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
-+{ $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
++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
  
 -{ $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
++
++fi
++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
 -  ac_cv_type_mode_t=no
 -cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
@@ -36722,36 +36425,60 @@
 -_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 ((mode_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
++  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
++
++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
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++fi
++
++  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
 -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 -$as_echo "$ac_try_echo") >&5
 -  (eval "$ac_compile") 2>conftest.er1
@@ -36765,66 +36492,118 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  :
--else
++    AR=$ac_ct_AR
++  fi
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	ac_cv_type_mode_t=yes
--fi
--
++  AR="$ac_cv_prog_AR"
+ 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
++
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker used by compiler is GNU ld" >&5
++$as_echo_n "checking if the linker used by compiler is GNU ld... " >&6; }
++if test "${ac_cv_prog_gnu_ld+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; }
++  # I'd rather use --version here, but apparently some GNU ld's only accept -v.
++if $CC -Wl,-v /dev/null 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
++  ac_cv_prog_gnu_ld=yes
++else
++  ac_cv_prog_gnu_ld=no
++fi
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gnu_ld" >&5
++$as_echo "$ac_cv_prog_gnu_ld" >&6; }
+ 
+ 
++if test "$ac_cv_prog_gnu_ld" = "yes"; then
++	ac_cv_gnu_ld_version=`$CC -Wl,-v /dev/null 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
--
- 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_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
+ 
++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
 -
--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
--  $as_echo_n "(cached) " >&6
--else
++set dummy $CC; ac_cc=`$as_echo "$2" |
++		      sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
++if eval "test \"\${ac_cv_prog_cc_${ac_cc}_c_o+set}\"" = set; then :
+   $as_echo_n "(cached) " >&6
+ else
 -  ac_cv_type_off_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
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
 -$ac_includes_default
-+#include <stdio.h>
++
  int
  main ()
  {
 -if (sizeof (off_t))
 -       return 0;
-+ struct foo {int x;char y;};
-+       struct foo bar = { .y = 'X', .x = 1 };
 +
    ;
    return 0;
@@ -36833,13 +36612,22 @@
 -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
@@ -36853,45 +36641,33 @@
 -_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 ((off_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
++  $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
@@ -36909,20 +36685,15 @@
 -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
+-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_off_t" >&5
 -$as_echo "$ac_cv_type_off_t" >&6; }
 -if test "x$ac_cv_type_off_t" = x""yes; then
@@ -36946,36 +36717,38 @@
 -_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 ()
+-{
 -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
--  *\"* | *\`* | *\\*) 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
@@ -36989,45 +36762,35 @@
 -_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 -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 ()
+-{
 -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
--  *\"* | *\`* | *\\*) 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
@@ -37037,47 +36800,50 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  :
-+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
++  $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
-+  { $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
- 
+-
 -	ac_cv_type_size_t=yes
-+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
++  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
-+if test x"$c99_init" = x"yes"; then
-+    saved_CFLAGS=""
-+
++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
-+    CFLAGS="$saved_CFLAGS"
-+    saved_CFLAGS=""
-+    as_fn_error "c99 structure initializer are not supported" "$LINENO" 5
-+fi
++  { $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
  
--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; }
+ fi
  
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -fi
@@ -37085,34 +36851,26 @@
 -$as_echo "$ac_cv_type_size_t" >&6; }
 -if test "x$ac_cv_type_size_t" = x""yes; then
 -  :
--else
-+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; }
- 
++if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then
++      BROKEN_CC=
+ else
+-
 -cat >>confdefs.h <<_ACEOF
 -#define size_t unsigned int
 -_ACEOF
-+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; }
+-
++      BROKEN_CC=#
+ fi
  
--fi
-+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; }
- 
 -{ $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
++
++{ $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
 -  ac_cv_type_pid_t=no
 -cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
@@ -37153,7 +36911,22 @@
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
++
++
++	old_CFLAGS="$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
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
 -$ac_includes_default
 -int
 -main ()
@@ -37163,27 +36936,18 @@
 -  ;
 -  return 0;
 -}
--_ACEOF
++
++  int main(void)
++  {
++  	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;;
-+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
+-esac
 -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 -$as_echo "$ac_try_echo") >&5
 -  (eval "$ac_compile") 2>conftest.er1
@@ -37197,130 +36961,105 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  :
--else
++if ac_fn_c_try_run "$LINENO"; then :
++  samba_cv_HAVE_Werror=yes
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
- 
+-
 -	ac_cv_type_pid_t=yes
--fi
-+DYNEXP=
-+
-+LDSHFLAGS_Z_DEFS=
-+
-+LDSHFLAGS_Z_NODEFS=
-+
-+
-+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 vfs_catia vfs_scannedonly"
-+
-+if test "x$developer" = xyes; then
-+   default_static_modules="$default_static_modules rpc_rpcecho pdb_ads"
-+   default_shared_modules="$default_shared_modules charset_weird perfcount_test"
++  samba_cv_HAVE_Werror=no
 +fi
-+
-+#
-+# 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
++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
 -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*)
+-
++	CFLAGS="$old_CFLAGS";
++	old_CFLAGS="";
++	export CFLAGS;
++	CPPFLAGS="$old_CPPFLAGS";
++	old_CPPFLAGS="";
++	export CPPFLAGS;
++	LDFLAGS="$old_LDFLAGS";
++	old_LDFLAGS="";
++	export LDFLAGS;
  
-+$as_echo "#define SYSV 1" >>confdefs.h
+ 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
  
--fi
-+		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"
- 
 -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
-+$as_echo "#define _LARGEFILE64_SOURCE 1" >>confdefs.h
++
++	old_CFLAGS="$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.  */
  
 -cat >>confdefs.h <<_ACEOF
 -#define pid_t int
--_ACEOF
-+						;;
-+					*)
-+						CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_REENTRANT -D_FILE_OFFSET_BITS=64"
-+						LDFLAGS="$LDFLAGS -lthread"
++  int main(void)
++  {
++  	return 0;
++  }
+ _ACEOF
+-
++if ac_fn_c_try_run "$LINENO"; then :
++  samba_cv_HAVE_w2=yes
++else
++  samba_cv_HAVE_w2=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 "#define _LARGEFILE64_SOURCE 1" >>confdefs.h
- 
 -{ $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
++	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
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
@@ -37357,7 +37096,11 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_cv_member_struct_stat_st_rdev=yes
--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 "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
  
@@ -37366,7 +37109,21 @@
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
++
++	old_CFLAGS="$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.  */
 -$ac_includes_default
 -int
 -main ()
@@ -37377,7 +37134,12 @@
 -  ;
 -  return 0;
 -}
--_ACEOF
++
++   int main(void)
++   {
++	return 0;
++   }
+ _ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -37397,104 +37159,131 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_cv_member_struct_stat_st_rdev=yes
--else
++if ac_fn_c_try_run "$LINENO"; then :
++  samba_cv_HAVE_errwarn=yes
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
- 
+-
 -	ac_cv_member_struct_stat_st_rdev=no
--fi
-+						;;
-+				esac
-+			else
-+				CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_REENTRANT -D_FILE_OFFSET_BITS=64"
-+				LDFLAGS="$LDFLAGS -lthread"
- 
++  samba_cv_HAVE_errwarn=no
+ fi
+-
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
--fi
-+$as_echo "#define _LARGEFILE64_SOURCE 1" >>confdefs.h
++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
++	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:$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
++{ $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"
++else
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that the C compiler understands -qhalt" >&5
++$as_echo_n "checking that the C compiler understands -qhalt... " >&6; }
++if test "${samba_cv_HAVE_qhalt+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
  
 -cat >>confdefs.h <<_ACEOF
 -#define HAVE_STRUCT_STAT_ST_RDEV 1
 -_ACEOF
-+$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
  
-+			fi
-+			;;
-+		esac
-+		;;
-+#
-+# IRIX uses SYSV printing.  Make sure to set that here
-+#
-+	*irix*)
++	old_CFLAGS="$CFLAGS";
++	CFLAGS="$CFLAGS -qhalt=w";
++	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_qhalt=cross
++else
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
  
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_ST_RDEV 1
--_ACEOF
-+$as_echo "#define SYSV 1" >>confdefs.h
++   int main(void)
++   {
++	return 0;
++   }
+ _ACEOF
++if ac_fn_c_try_run "$LINENO"; then :
++  samba_cv_HAVE_qhalt=yes
++else
++  samba_cv_HAVE_qhalt=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;
  
--fi
-+		;;
-+	*freebsd*|*dragonfly*)
+ fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $samba_cv_HAVE_qhalt" >&5
++$as_echo "$samba_cv_HAVE_qhalt" >&6; }
++if test x"$samba_cv_HAVE_qhalt" = x"yes"; then
++   Werror_FLAGS="-qhalt=w"
++fi
++fi
++fi
++fi
  
-+$as_echo "#define FREEBSD 1" >>confdefs.h
++############################################
++# 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:$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
-+		;;
-+#
-+# 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
-+
-+		;;
-+    esac
-+    case "$CPPFLAGS" in
-+	  *-D_SYSV*|*-D_SVID_SOURCE*)
-+		;;
-+	  *)
-+		CPPFLAGS="$CPPFLAGS -D_SYSV"
-+
-+$as_echo "#define _SYSV 1" >>confdefs.h
-+
-+    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}: 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.  */
  
- #include <unistd.h>
+-#include <unistd.h>
 -#include <sys/types.h>
 -#include <dirent.h>
 -int
@@ -37503,13 +37292,25 @@
 -struct dirent d; d.d_off;
 -  ;
 -  return 0;
-+main () {
-+#if _LFS64_LARGEFILE == 1
-+exit(0);
-+#else
-+exit(1);
-+#endif
- }
+-}
++	#include <stdio.h>
++	enum negative_values { NEGATIVE_VALUE = 0xFFFFFFFF };
++	int main(void) {
++		enum negative_values v1 = NEGATIVE_VALUE;
++		unsigned v2 = NEGATIVE_VALUE;
++
++		if (v1 != 0xFFFFFFFF) {
++			printf("%u != 0xFFFFFFFF\n", v1);
++			return 1;
++		}
++		if (v2 != 0xFFFFFFFF) {
++			printf("%u != 0xFFFFFFFF\n", v2);
++			return 1;
++		}
++
++		return 0;
++	}
++
  _ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
@@ -37531,32 +37332,36 @@
 -       } && test -s conftest.$ac_objext; then
 -  ac_cv_dirent_d_off=yes
 +if ac_fn_c_try_run "$LINENO"; then :
-+  SINIX_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
 -
 -	ac_cv_dirent_d_off=no
-+  SINIX_LFS_SUPPORT=no
- fi
--
--rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++  samba_cv__CC_NEGATIVE_ENUM_VALUES=no
++fi
 +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
 +  conftest.$ac_objext conftest.beam conftest.$ac_ext
  fi
+ 
+-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ 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
++{ $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
  
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_DIRENT_D_OFF 1
 -_ACEOF
-+        CPPFLAGS="$old_CPPFLAGS"
-+        if test x$SINIX_LFS_SUPPORT = xyes ; then
-+          CPPFLAGS="-D_LARGEFILE64_SOURCE $CPPFLAGS"
  
 -fi
-+$as_echo "#define _LARGEFILE64_SOURCE 1" >>confdefs.h
  
 -{ $as_echo "$as_me:$LINENO: checking for ssize_t" >&5
 -$as_echo_n "checking for ssize_t... " >&6; }
@@ -37566,20 +37371,56 @@
 -  ac_cv_type_ssize_t=no
 -cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
--_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.  */
++#include <stdio.h>
++int
++main ()
++{
++ struct foo {int x;char y;};
++       struct foo bar = { .y = 'X', .x = 1 };
++
++  ;
++  return 0;
++}
+ _ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
++if ac_fn_c_try_compile "$LINENO"; then :
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }; c99_init=yes
++else
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++fi
++if test x"$c99_init" = x"no"; then
++    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C99 designated initializers with -AC99" >&5
++$as_echo_n "checking for C99 designated initializers with -AC99... " >&6; }
++    CFLAGS="$saved_CFLAGS -AC99";
++    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
 -$ac_includes_default
--int
--main ()
--{
++#include <stdio.h>
+ int
+ main ()
+ {
 -if (sizeof (ssize_t))
 -       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
@@ -37603,17 +37444,35 @@
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
++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.  */
 -$ac_includes_default
--int
--main ()
--{
++#include <stdio.h>
+ int
+ main ()
+ {
 -if (sizeof ((ssize_t)))
 -	  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
@@ -37636,79 +37495,68 @@
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+          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
-+    ;;
- 
+-
 -	ac_cv_type_ssize_t=yes
 -fi
-+# 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
--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 "#define _LARGEFILE64_SOURCE 1" >>confdefs.h
- 
- 
--fi
-+$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
- 
--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: $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
 -  :
 -else
- 
+-
 -cat >>confdefs.h <<_ACEOF
 -#define ssize_t int
 -_ACEOF
-+$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
- 
+-
 -fi
-+	;;
- 
+-
 -{ $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
 -  $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
- else
+-else
 -  ac_cv_type_wchar_t=no
 -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 -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.  */
 -$ac_includes_default
--int
--main ()
--{
++#include <stdio.h>
+ int
+ main ()
+ {
 -if (sizeof (wchar_t))
 -       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
@@ -37732,18 +37580,35 @@
 -_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 :
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }; c99_init=yes
++else
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++fi
++if test x"$c99_init" = x"no"; then
++    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C99 designated initializers with -c99" >&5
++$as_echo_n "checking for C99 designated initializers with -c99... " >&6; }
++    CFLAGS="$saved_CFLAGS -c99"
++    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
 -$ac_includes_default
--int
--main ()
--{
++#include <stdio.h>
+ int
+ main ()
+ {
 -if (sizeof ((wchar_t)))
 -	  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
@@ -37766,84 +37631,55 @@
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
- 
+-
 -	ac_cv_type_wchar_t=yes
 -fi
-+#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;
- 
+-
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
--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
-+       /* Ensure this is glibc 2.2 or higher */
-+#if defined(__GLIBC__) && defined(__GLIBC_MINOR__)
-+       int libc_major = __GLIBC__;
-+       int libc_minor = __GLIBC_MINOR__;
-+
-+       if (libc_major < 2)
-+              exit(1);
-+       if (libc_minor < 2)
-+              exit(1);
-+#endif
- 
-+       /* Ensure this is kernel 2.4 or higher */
- 
--fi
-+       uname(&uts);
-+       release = strdup(uts.release);
-+       major = atoi(strsep(&release, "."));
-+       minor = atoi(strsep(&release, "."));
- 
--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: $ac_cv_type_wchar_t" >&5
 -$as_echo "$ac_cv_type_wchar_t" >&6; }
 -if test "x$ac_cv_type_wchar_t" = x""yes; then
 -  :
 -else
-+       if (major > 2 || (major == 2 && minor > 3))
-+               exit(0);
-+       exit(1);
-+#else
-+       exit(1);
-+#endif
-+}
- 
+-
 -cat >>confdefs.h <<_ACEOF
 -#define wchar_t unsigned short
- _ACEOF
+-_ACEOF
 -
-+if ac_fn_c_try_run "$LINENO"; then :
-+  LINUX_LFS_SUPPORT=yes
-+else
-+  LINUX_LFS_SUPPORT=no
-+fi
-+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-+  conftest.$ac_objext conftest.beam conftest.$ac_ext
- fi
- 
-+	CPPFLAGS="$old_CPPFLAGS"
-+	if test x$LINUX_LFS_SUPPORT = xyes ; then
-+		CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS"
- 
+-fi
+-
+-
 -############################################
 -# for cups support we need libcups, and a handful of header files
-+$as_echo "#define _LARGEFILE64_SOURCE 1" >>confdefs.h
  
 -# Check whether --enable-cups was given.
 -if test "${enable_cups+set}" = set; then
 -  enableval=$enable_cups;
--fi
++if test "`uname`" = "HP-UX"; then
++  if test "$ac_cv_c_compiler_gnu" = no; then
++	# special override for broken HP-UX compiler - I can't find a way to test
++	# this properly (its a compiler bug)
++	CFLAGS="$CFLAGS -AC99";
++	c99_init=yes;
++  fi
+ fi
  
-+$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
++if test x"$c99_init" = x"yes"; then
++    saved_CFLAGS=""
  
 -if test x$enable_cups != xno; then
 -	# Extract the first word of "cups-config", so it can be a program name with args.
@@ -37872,7 +37708,7 @@
 -done
 -done
 -IFS=$as_save_IFS
- 
+-
 -  ;;
 -esac
 -fi
@@ -37880,36 +37716,32 @@
 -if test -n "$CUPS_CONFIG"; then
 -  { $as_echo "$as_me:$LINENO: result: $CUPS_CONFIG" >&5
 -$as_echo "$CUPS_CONFIG" >&6; }
--else
+ else
 -  { $as_echo "$as_me:$LINENO: result: no" >&5
 -$as_echo "no" >&6; }
--fi
-+$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
++    CFLAGS="$saved_CFLAGS"
++    saved_CFLAGS=""
++    as_fn_error $? "c99 structure initializer are not supported" "$LINENO" 5
+ fi
  
-+	fi
-+	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINUX_LFS_SUPPORT" >&5
-+$as_echo "$LINUX_LFS_SUPPORT" >&6; }
-+	;;
  
-+#
-+# MacOS X is the *only* system that uses compose character in utf8. This
-+# is so horribly broken....
-+#
-+    *darwin*)
++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$CUPS_CONFIG" != x; then
-+$as_echo "#define BROKEN_UNICODE_COMPOSE_CHARACTERS 1" >>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 -lcups"
+-
++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; }
  
-+# Add a system specific charset module.
-+	default_shared_modules="$default_shared_modules charset_macosxfs"
- 
 -for ac_header in cups/cups.h cups/language.h
 -do
 -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
@@ -37923,15 +37755,7 @@
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
 -$as_echo "$ac_res" >&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
 -  # Is the header compilable?
 -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
 -$as_echo_n "checking $ac_header usability... " >&6; }
@@ -37940,20 +37764,10 @@
 -_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 <unistd.h>
-+main () {
-+#if _LFS64_LARGEFILE == 1
-+exit(0);
-+#else
-+exit(1);
-+#endif
-+}
- _ACEOF
+-_ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -37973,25 +37787,31 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_header_compiler=yes
-+if ac_fn_c_try_run "$LINENO"; then :
-+  GLIBC_LFS_SUPPORT=yes
- else
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
++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; }
+ 
 -	ac_header_compiler=no
-+  GLIBC_LFS_SUPPORT=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
++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; }
  
 -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; }
-+        CPPFLAGS="$old_CPPFLAGS"
-+        if test x$GLIBC_LFS_SUPPORT = xyes ; then
-+          CPPFLAGS="-D_LARGEFILE64_SOURCE -D_GNU_SOURCE $CPPFLAGS"
++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; }
  
 -# Is the header present?
 -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
@@ -38008,7 +37828,15 @@
 -case "(($ac_try" in
 -  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
 -  *) ac_try_echo=$ac_try;;
--esac
++  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
 -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
@@ -38025,15 +37853,14 @@
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+$as_echo "#define _LARGEFILE64_SOURCE 1" >>confdefs.h
- 
+-
 -  ac_header_preproc=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; }
-+$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
++DYNEXP=
  
 -# So?  What about this header?
 -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
@@ -38063,10 +37890,7 @@
 -## ---------------------------------------- ##
 -_ASBOX
 -     ) | sed "s/^/$as_me: WARNING:     /" >&2
-+        fi
-+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GLIBC_LFS_SUPPORT" >&5
-+$as_echo "$GLIBC_LFS_SUPPORT" >&6; }
-     ;;
+-    ;;
 -esac
 -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
 -$as_echo_n "checking for $ac_header... " >&6; }
@@ -38079,7 +37903,8 @@
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
 -$as_echo "$ac_res" >&6; }
--
++LDSHFLAGS_Z_DEFS=
+ 
 -fi
 -as_val=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
@@ -38087,56 +37912,259 @@
 -  cat >>confdefs.h <<_ACEOF
 -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
 -_ACEOF
-+    *qnx*)
-+        CPPFLAGS="-D_LARGEFILE64_SOURCE $CPPFLAGS"
++LDSHFLAGS_Z_NODEFS=
  
 -fi
-+$as_echo "#define _LARGEFILE64_SOURCE 1" >>confdefs.h
  
 -done
-+        ;;
++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 vfs_catia vfs_scannedonly"
+ 
 -		if test x"$ac_cv_header_cups_cups_h" = xyes -a \
 -		        x"$ac_cv_header_cups_language_h" = xyes; then
-+esac
+-			# try linking with -lcups alone first. That should work unless libcups is
+-			# underlinked. With cups-config --libs we pull in unwanted and unneeded
+-			# dendencies including thread libraries - use cups-config only if really
+-			# required.
++if test "x$developer" = xyes; then
++   default_static_modules="$default_static_modules rpc_rpcecho pdb_ads"
++   default_shared_modules="$default_shared_modules charset_weird perfcount_test"
++fi
  
++#
++# 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
+ 
+-ac_check_lib_ext_save_LIBS=$LIBS
+-LIBS="-lcups $ac_save_PRINT_LIBS   $LIBS"
++		;;
++      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
+ 
+-        { $as_echo "$as_me:$LINENO: checking for httpConnect in -lcups" >&5
+-$as_echo_n "checking for httpConnect in -lcups... " >&6; }
+-if test "${ac_cv_lib_ext_cups_httpConnect+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.  */
++      ;;
++#
++# 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*)
+ 
+-/* 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 httpConnect ();
+-int
+-main ()
+-{
+-return httpConnect ();
+-  ;
+-  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_ext_cups_httpConnect=yes;
+-		  ac_cv_lib_ext_cups=yes
+-else
+-  $as_echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
++$as_echo "#define SYSV 1" >>confdefs.h
+ 
+-	ac_cv_lib_ext_cups_httpConnect=no;
+-		  ac_cv_lib_ext_cups=no
+-fi
++		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"
+ 
+-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 _LARGEFILE64_SOURCE 1" >>confdefs.h
+ 
+-fi
+-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ext_cups_httpConnect" >&5
+-$as_echo "$ac_cv_lib_ext_cups_httpConnect" >&6; }
+-    if test $ac_cv_lib_ext_cups_httpConnect = yes; then
+-  cat >>confdefs.h <<_ACEOF
+-#define HAVE_HTTPCONNECT 1
+-_ACEOF
++						;;
++					*)
++						CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_REENTRANT -D_FILE_OFFSET_BITS=64"
++						LDFLAGS="$LDFLAGS -lthread"
+ 
+-fi
++$as_echo "#define _LARGEFILE64_SOURCE 1" >>confdefs.h
+ 
+-LIBS=$ac_check_lib_ext_save_LIBS
+ 
+-if test $ac_cv_lib_ext_cups = yes; then
+-  PRINT_LIBS"$ac_save_PRINT_LIBS -lcups"
++$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"
+ 
+-else
+-  { $as_echo "$as_me:$LINENO: WARNING: your cups library doesn't link with -lcups alone, it might be underlinked." >&5
+-$as_echo "$as_me: WARNING: your cups library doesn't link with -lcups alone, it might be underlinked." >&2;} ;
+-				 PRINT_LIBS="$ac_save_PRINT_LIBS `$CUPS_CONFIG --libs`"
+-fi
++$as_echo "#define _LARGEFILE64_SOURCE 1" >>confdefs.h
+ 
+ 
++$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
+ 
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_CUPS 1
 -_ACEOF
-+SAVE_CPPFLAGS="${CPPFLAGS}"
-+CPPFLAGS="${CPPFLAGS} ${SAMBA_CONFIGURE_CPPFLAGS}"
++			fi
++			;;
++		esac
++		;;
++#
++# IRIX uses SYSV printing.  Make sure to set that here
++#
++	*irix*)
  
 -			samba_cv_HAVE_CUPS=yes
++$as_echo "#define SYSV 1" >>confdefs.h
  
-+echo "LIBREPLACE_BROKEN_CHECKS: START"
++		;;
++	*freebsd*|*dragonfly*)
  
-+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"
++$as_echo "#define FREEBSD 1" >>confdefs.h
  
 -ac_check_lib_ext_save_LIBS=$LIBS
 -LIBS="-lcups $PRINT_LIBS  $LIBS"
-+		break;
-+	fi
-+done
-+if test x"$libreplacedir" = "x"; then
-+	as_fn_error "cannot find libreplace in $libreplacepaths" "$LINENO" 5
-+fi
++		;;
++#
++# 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"
  
-+LIBREPLACEOBJ="$libreplacedir/replace.o"
++$as_echo "#define _POSIX_C_SOURCE 200112L" >>confdefs.h
  
++		;;
++    esac
++    case "$CPPFLAGS" in
++	  *-D_SYSV*|*-D_SVID_SOURCE*)
++		;;
++	  *)
++		CPPFLAGS="$CPPFLAGS -D_SYSV"
  
-+LIBREPLACEOBJ="${LIBREPLACEOBJ} $libreplacedir/snprintf.o"
++$as_echo "#define _SYSV 1" >>confdefs.h
  
 -        { $as_echo "$as_me:$LINENO: checking for httpConnectEncrypt in -lcups" >&5
 -$as_echo_n "checking for httpConnectEncrypt in -lcups... " >&6; }
 -if test "${ac_cv_lib_ext_cups_httpConnectEncrypt+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
+-  $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.  */
@@ -38145,23 +38173,26 @@
 -cat >>conftest.$ac_ext <<_ACEOF
 +  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
-+#include <sys/types.h>
-+#include <signal.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 <unistd.h>
++main () {
++#if _LFS64_LARGEFILE == 1
++exit(0);
++#else
++exit(1);
+ #endif
 -char httpConnectEncrypt ();
- int
- main ()
- {
+-int
+-main ()
+-{
 -return httpConnectEncrypt ();
-+return *(signal (0, 0)) (0) == 1;
-   ;
-   return 0;
+-  ;
+-  return 0;
  }
  _ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
@@ -38187,59 +38218,40 @@
 -       }; then
 -  ac_cv_lib_ext_cups_httpConnectEncrypt=yes;
 -		  ac_cv_lib_ext_cups=yes
-+if ac_fn_c_try_compile "$LINENO"; then :
-+  ac_cv_type_signal=int
++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_lib_ext_cups_httpConnectEncrypt=no;
 -		  ac_cv_lib_ext_cups=no
-+  ac_cv_type_signal=void
++  SINIX_LFS_SUPPORT=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
+-fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ext_cups_httpConnectEncrypt" >&5
 -$as_echo "$ac_cv_lib_ext_cups_httpConnectEncrypt" >&6; }
 -    if test $ac_cv_lib_ext_cups_httpConnectEncrypt = yes; then
 -  cat >>confdefs.h <<_ACEOF
 -#define HAVE_HTTPCONNECTENCRYPT 1
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
-+$as_echo "$ac_cv_type_signal" >&6; }
-+
-+cat >>confdefs.h <<_ACEOF
-+#define RETSIGTYPE $ac_cv_type_signal
- _ACEOF
+-_ACEOF
+-
++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
++  conftest.$ac_objext conftest.beam conftest.$ac_ext
+ fi
  
--fi
- 
 -LIBS=$ac_check_lib_ext_save_LIBS
-+{ $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>
- 
+-
 -if test $ac_cv_lib_ext_cups = yes; then
 -  cat >>confdefs.h <<_ACEOF
 -#define HAVE_LIBCUPS 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*
- 
+-_ACEOF
+-
 -		case "$PRINT_LIBS" in
 -		    *-lcups*)
 -			;;
@@ -38247,14 +38259,21 @@
 -			PRINT_LIBS="-lcups $PRINT_LIBS"
 -			;;
 -		esac
-+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"
  
-+$as_echo "#define uid_t int" >>confdefs.h
++$as_echo "#define _LARGEFILE64_SOURCE 1" >>confdefs.h
  
 -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
++    ;;
  
 -		else
 -			{ $as_echo "$as_me:$LINENO: WARNING: cups-config around but cups-devel not installed" >&5
@@ -38263,48 +38282,41 @@
 -			LDFLAGS=$ac_save_LDFLAGS
 -			PRINT_LIBS=$ac_save_PRINT_LIBS
 -		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"
  
 -	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
+-fi
++$as_echo "#define _LARGEFILE64_SOURCE 1" >>confdefs.h
  
 -# Check whether --enable-iprint was given.
 -if test "${enable_iprint+set}" = set; then
 -  enableval=$enable_iprint;
-+ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
-+if test "x$ac_cv_type_mode_t" = x""yes; then :
-+
-+else
-+
-+cat >>confdefs.h <<_ACEOF
-+#define mode_t int
-+_ACEOF
-+
- fi
+-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 :
++$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
  
 -if test x$enable_iprint != xno; then
 -	if test x"$samba_cv_HAVE_CUPS" = xyes; then
-+else
  
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_IPRINT 1
-+cat >>confdefs.h <<_ACEOF
-+#define off_t long int
- _ACEOF
+-_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
++	;;
  
 -############################################
 -# check if the compiler will optimize out function calls
@@ -38312,41 +38324,72 @@
 -$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
-+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 :
-+
++# 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 >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
-+cat >>confdefs.h <<_ACEOF
-+#define size_t unsigned int
- _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.  */
  
 -#include <stdio.h>
 -int
 -main ()
 -{
-+fi
++#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;
  
 -		if (0) {
 -		   this_function_does_not_exist();
 -		} else {
 -		  return 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 :
++       /* Ensure this is glibc 2.2 or higher */
++#if defined(__GLIBC__) && defined(__GLIBC_MINOR__)
++       int libc_major = __GLIBC__;
++       int libc_minor = __GLIBC_MINOR__;
  
-+else
++       if (libc_major < 2)
++              exit(1);
++       if (libc_minor < 2)
++              exit(1);
++#endif
  
 -  ;
 -  return 0;
--}
-+cat >>confdefs.h <<_ACEOF
-+#define pid_t int
++       /* Ensure this is kernel 2.4 or higher */
++
++       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"
@@ -38370,33 +38413,35 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  samba_cv_optimize_out_funcation_calls=yes
--else
++if ac_fn_c_try_run "$LINENO"; then :
++  LINUX_LFS_SUPPORT=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
  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 *.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: $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
-+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_COMPILER_WILL_OPTIMIZE_OUT_FNS 1
-+cat >>confdefs.h <<_ACEOF
-+#define HAVE_STRUCT_STAT_ST_RDEV 1
- _ACEOF
+-_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"
  
-+
-+$as_echo "#define HAVE_ST_RDEV 1" >>confdefs.h
-+
- fi
+-fi
++$as_echo "#define _LARGEFILE64_SOURCE 1" >>confdefs.h
  
 -#############################################
 -# check for fd passing struct via msg_control
@@ -38404,20 +38449,15 @@
 -$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
-+
-+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
+-else
  
 -    cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
-+cat >>confdefs.h <<_ACEOF
-+#define ino_t unsigned
- _ACEOF
+-_ACEOF
 -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>
@@ -38427,7 +38467,6 @@
 -int
 -main ()
 -{
-+fi
  
 -	struct msghdr msg;
 -	union {
@@ -38436,8 +38475,7 @@
 -	} control_un;
 -	msg.msg_control = control_un.control;
 -	msg.msg_controllen = sizeof(control_un.control);
-+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 :
++$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
  
 -  ;
 -  return 0;
@@ -38462,45 +38500,51 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  samba_cv_msghdr_msg_control=yes
- else
+-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
-+cat >>confdefs.h <<_ACEOF
-+#define loff_t off_t
-+_ACEOF
++#
++# 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
+-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
-+ac_fn_c_check_type "$LINENO" "offset_t" "ac_cv_type_offset_t" "$ac_includes_default"
-+if test "x$ac_cv_type_offset_t" = x""yes; then :
-+
-+else
-+
-+cat >>confdefs.h <<_ACEOF
-+#define offset_t loff_t
- _ACEOF
+-_ACEOF
  
- fi
+-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 "$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
++	;;
++    *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
@@ -38508,52 +38552,32 @@
 -_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.  */
--
+ 
 -#include <sys/types.h>
 -#include <stdlib.h>
 -#include <stddef.h>
 -#include <sys/socket.h>
 -#include <sys/un.h>
-+$ac_includes_default
- int
- main ()
- {
- 
+-int
+-main ()
+-{
+-
 -	struct msghdr msg;
 -	int fd;
 -	msg.msg_acctrights = (caddr_t) &fd;
 -	msg.msg_acctrightslen = sizeof(fd);
-+  /* 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;
+-
+-  ;
+-  return 0;
++#include <unistd.h>
++main () {
++#if _LFS64_LARGEFILE == 1
++exit(0);
++#else
++exit(1);
++#endif
  }
  _ACEOF
 -rm -f conftest.$ac_objext
@@ -38576,61 +38600,33 @@
 -       } && test -s conftest.$ac_objext; then
 -  samba_cv_msghdr_msg_acctrights=yes
 +if ac_fn_c_try_run "$LINENO"; then :
-+  ac_cv_func_memcmp_working=yes
++  GLIBC_LFS_SUPPORT=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+  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
- 
+-
 -	samba_cv_msghdr_msg_acctrights=no
++  GLIBC_LFS_SUPPORT=no
  fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_memcmp_working" >&5
-+$as_echo "$ac_cv_func_memcmp_working" >&6; }
-+test $ac_cv_func_memcmp_working = no && case " $LIBOBJS " in
-+  *" memcmp.$ac_objext "* ) ;;
-+  *) LIBOBJS="$LIBOBJS memcmp.$ac_objext"
-+ ;;
-+esac
-+
-+
-+
-+for ac_func in pipe strftime srandom random srand rand usleep setbuffer lstat getpgrp utime utimes
-+do :
-+  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-+eval as_val=\$$as_ac_var
-+   if test "x$as_val" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-+_ACEOF
- 
+-
 -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:$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
-+done
-+
- 
+-
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_MSGHDR_MSG_ACCTRIGHTS 1
-+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
+-_ACEOF
  
- fi
+-fi
++        CPPFLAGS="$old_CPPFLAGS"
++        if test x$GLIBC_LFS_SUPPORT = xyes ; then
++          CPPFLAGS="-D_LARGEFILE64_SOURCE -D_GNU_SOURCE $CPPFLAGS"
  
-+done
++$as_echo "#define _LARGEFILE64_SOURCE 1" >>confdefs.h
  
 -for ac_func in dirfd
 -do
@@ -38642,15 +38638,7 @@
 -else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
-+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
+-_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
@@ -38662,16 +38650,22 @@
 -    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
++$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
  
 -#ifdef __STDC__
 -# include <limits.h>
 -#else
 -# include <assert.h>
 -#endif
-+done
++        fi
++      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GLIBC_LFS_SUPPORT" >&5
++$as_echo "$GLIBC_LFS_SUPPORT" >&6; }
++    ;;
++    *qnx*)
++        CPPFLAGS="-D_LARGEFILE64_SOURCE $CPPFLAGS"
  
 -#undef $ac_func
++$as_echo "#define _LARGEFILE64_SOURCE 1" >>confdefs.h
  
 -/* Override any GCC internal prototype to avoid an error.
 -   Use char because int might match the return type of a GCC
@@ -38686,9 +38680,7 @@
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
 -#endif
-+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"
++        ;;
  
 -int
 -main ()
@@ -38703,7 +38695,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_link") 2>conftest.er1
@@ -38720,18 +38712,19 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  eval "$as_ac_var=yes"
- else
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+   ac_config_commands="$ac_config_commands mk-stdint.h"
  
 -	eval "$as_ac_var=no"
 -fi
++SAVE_CPPFLAGS="${CPPFLAGS}"
++CPPFLAGS="${CPPFLAGS} ${SAMBA_CONFIGURE_CPPFLAGS}"
  
 -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
@@ -38745,52 +38738,61 @@
  
 -fi
 -done
++echo "LIBREPLACE_BROKEN_CHECKS: START"
  
 -if test x"$ac_cv_func_dirfd" = x"yes"; then
 -	default_shared_modules="$default_shared_modules vfs_syncops vfs_dirsort"
--fi
++libreplacedir=""
++libreplacepaths="$srcdir $srcdir/lib/replace $srcdir/libreplace $srcdir/../libreplace $srcdir/../replace $srcdir/../lib/replace $srcdir/../../../lib/replace"
++for d in $libreplacepaths; do
++	if test -f "$d/replace.c"; then
++		libreplacedir="$d"
++
++		break;
++	fi
++done
++if test x"$libreplacedir" = "x"; then
++	as_fn_error $? "cannot find libreplace in $libreplacepaths" "$LINENO" 5
+ fi
  
 -{ $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
--  $as_echo_n "(cached) " >&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"
++LIBREPLACEOBJ="$libreplacedir/replace.o"
 +
++
++LIBREPLACEOBJ="${LIBREPLACEOBJ} $libreplacedir/snprintf.o"
++
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
++$as_echo_n "checking return type of signal handlers... " >&6; }
++if test "${ac_cv_type_signal+set}" = set; then :
+   $as_echo_n "(cached) " >&6
  else
-+   ac_config_commands="$ac_config_commands mk-stdbool.h"
- 
+-
 -    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>
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+-
+ #include <sys/types.h>
 -#if STDC_HEADERS
 -#include <stdlib.h>
 -#include <stddef.h>
-+fi
+-#endif
+ #include <signal.h>
 +
-+
-+
-+
-+ac_fn_c_check_type "$LINENO" "bool" "ac_cv_type_bool" "
-+$ac_includes_default
-+#ifdef HAVE_STDBOOL_H
-+#include <stdbool.h>
- #endif
--#include <signal.h>
--int
--main ()
--{
+ int
+ main ()
+ {
 -struct sigevent s;
--  ;
--  return 0;
--}
--_ACEOF
++return *(signal (0, 0)) (0) == 1;
+   ;
+   return 0;
+ }
+ _ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -38810,48 +38812,35 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  samba_cv_struct_sigevent=yes
--else
++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
- 
+-
 -	samba_cv_struct_sigevent=no
-+"
-+if test "x$ac_cv_type_bool" = x""yes; then :
-+
-+$as_echo "#define HAVE_BOOL 1" >>confdefs.h
-+
++  ac_cv_type_signal=void
  fi
- 
--rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-+
-+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
-+
+-
+ 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
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
++$as_echo "$ac_cv_type_signal" >&6; }
  
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_STRUCT_SIGEVENT 1
--_ACEOF
++cat >>confdefs.h <<_ACEOF
++#define RETSIGTYPE $ac_cv_type_signal
+ _ACEOF
  
 -   { $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 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
+-  $as_echo_n "(cached) " >&6
+-else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
@@ -38889,8 +38878,10 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_cv_member_struct_sigevent_sigev_value_sival_ptr=yes
-+if test "$cross_compiling" = yes; then :
-+  libreplace_cv_HAVE_MMAP=cross
++{ $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
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
@@ -38903,7 +38894,8 @@
 +  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
 -#include <signal.h>
--
++#include <sys/types.h>
+ 
 -int
 -main ()
 -{
@@ -38913,7 +38905,6 @@
 -  ;
 -  return 0;
 -}
-+#include "$libreplacedir/test/shared_mmap.c"
  _ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
@@ -38934,46 +38925,36 @@
 -	 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_run "$LINENO"; then :
-+  libreplace_cv_HAVE_MMAP=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
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	ac_cv_member_struct_sigevent_sigev_value_sival_ptr=no
-+  libreplace_cv_HAVE_MMAP=no
-+fi
-+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-+  conftest.$ac_objext conftest.beam conftest.$ac_ext
++  ac_cv_type_uid_t=no
  fi
++rm -f conftest*
  
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  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
++{ $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
  
 -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_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 "#define uid_t int" >>confdefs.h
  
 -cat >>confdefs.h <<_ACEOF
 -#define HAVE_STRUCT_SIGEVENT_SIGEV_VALUE_SIVAL_PTR 1
 -_ACEOF
  
-+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
++$as_echo "#define gid_t int" >>confdefs.h
  
  fi
 -{ $as_echo "$as_me:$LINENO: checking for struct sigevent.sigev_value.sigval_ptr" >&5
@@ -38983,18 +38964,7 @@
 -else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
-+
-+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
+-_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
@@ -39009,19 +38979,7 @@
 -  ;
 -  return 0;
 -}
-+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
+-_ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -39044,26 +39002,17 @@
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
++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 :
  
 -	cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
-+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
+-_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
 -#include <signal.h>
++else
  
 -int
 -main ()
@@ -39074,28 +39023,8 @@
 -  ;
 -  return 0;
 -}
-+fi
-+
-+done
-+
-+for ac_header in stropts.h
-+do :
-+  ac_fn_c_check_header_mongrel "$LINENO" "stropts.h" "ac_cv_header_stropts_h" "$ac_includes_default"
-+if test "x$ac_cv_header_stropts_h" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define HAVE_STROPTS_H 1
-+_ACEOF
-+
-+fi
-+
-+done
-+
-+for ac_header in unix.h
-+do :
-+  ac_fn_c_check_header_mongrel "$LINENO" "unix.h" "ac_cv_header_unix_h" "$ac_includes_default"
-+if test "x$ac_cv_header_unix_h" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define HAVE_UNIX_H 1
++cat >>confdefs.h <<_ACEOF
++#define mode_t int
  _ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
@@ -39124,88 +39053,33 @@
  fi
  
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-+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
++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 :
  
 -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
-+done
++else
  
--cat >>confdefs.h <<_ACEOF
+ cat >>confdefs.h <<_ACEOF
 -#define HAVE_STRUCT_SIGEVENT_SIGEV_VALUE_SIGVAL_PTR 1
-+for ac_func in waitpid wait4 strlcpy strlcat initgroups memmove strdup
-+do :
-+  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-+eval as_val=\$$as_ac_var
-+   if test "x$as_val" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
++#define off_t long int
  _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
+-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 :
  
 -{ $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 "$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
+-  $as_echo_n "(cached) " >&6
  else
  
 -    cat >conftest.$ac_ext <<_ACEOF
@@ -39213,8 +39087,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.  */
 -
 -#include <sys/types.h>
 -#if STDC_HEADERS
@@ -39232,15 +39105,15 @@
 -# endif
 -#endif
 -
-+#include <unistd.h>
- int
- main ()
- {
+-int
+-main ()
+-{
 -struct timespec ts;
-+int i = (int)setresuid
-   ;
-   return 0;
- }
+-  ;
+-  return 0;
+-}
++cat >>confdefs.h <<_ACEOF
++#define size_t unsigned int
  _ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
@@ -39261,43 +39134,33 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  samba_cv_struct_timespec=yes
-+if ac_fn_c_try_compile "$LINENO"; then :
-+  ac_cv_have_setresuid_decl=yes
- else
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	samba_cv_struct_timespec=no
-+  ac_cv_have_setresuid_decl=no
+-fi
+ 
+-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  fi
--
- rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
 -{ $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
-+{ $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
  
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_STRUCT_TIMESPEC 1
 -_ACEOF
-+$as_echo "#define HAVE_SETRESUID_DECL 1" >>confdefs.h
- 
+-
 -fi
-+ 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 :
  
 -# and glibc has setresuid under linux but the function does
 -# nothing until kernel 2.1.44! very dumb.
 -{ $as_echo "$as_me:$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 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
+-  $as_echo_n "(cached) " >&6
  else
  
 -    if test "$cross_compiling" = yes; then
@@ -39308,19 +39171,10 @@
 -_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 <errno.h>
 -main() { setresuid(1,1,1); setresuid(2,2,2); exit(errno==EPERM?0:1);}
-+#include <unistd.h>
-+int
-+main ()
-+{
-+int i = (int)setresgid
-+  ;
-+  return 0;
-+}
- _ACEOF
+-_ACEOF
 -rm -f conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -39344,70 +39198,75 @@
 -  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
 -  (exit $ac_status); }; }; then
 -  samba_cv_have_setresuid=yes
-+if ac_fn_c_try_compile "$LINENO"; then :
-+  ac_cv_have_setresgid_decl=yes
- 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
--
++cat >>confdefs.h <<_ACEOF
++#define pid_t int
++_ACEOF
+ 
 -( exit $ac_status )
 -samba_cv_have_setresuid=no
-+  ac_cv_have_setresgid_decl=no
- 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
-+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
++ac_fn_c_check_member "$LINENO" "struct stat" "st_rdev" "ac_cv_member_struct_stat_st_rdev" "$ac_includes_default"
++if test "x$ac_cv_member_struct_stat_st_rdev" = x""yes; then :
++
++cat >>confdefs.h <<_ACEOF
++#define HAVE_STRUCT_STAT_ST_RDEV 1
++_ACEOF
++
++
++$as_echo "#define HAVE_ST_RDEV 1" >>confdefs.h
  
--fi
+ 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
--
+ 
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_SETRESUID 1
--_ACEOF
-+ fi
++
++ac_fn_c_check_type "$LINENO" "ino_t" "ac_cv_type_ino_t" "$ac_includes_default"
++if test "x$ac_cv_type_ino_t" = x""yes; then :
++
++else
++
++cat >>confdefs.h <<_ACEOF
++#define ino_t unsigned
+ _ACEOF
  
--fi
+ fi
  
 -# Do the same check for setresguid...
 -#
 -{ $as_echo "$as_me:$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 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
+-  $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
 -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 <unistd.h>
- #include <errno.h>
+-#include <errno.h>
 -main() { errno = 0; setresgid(1,1,1); exit(errno != 0 ? (errno==EPERM ? 0 : 1) : 0);}
-+int
-+main ()
-+{
-+int i = (int)errno
-+  ;
-+  return 0;
-+}
++
++cat >>confdefs.h <<_ACEOF
++#define loff_t off_t
  _ACEOF
 -rm -f conftest$ac_exeext
 -if { (ac_try="$ac_link"
@@ -39432,52 +39291,46 @@
 -  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
 -  (exit $ac_status); }; }; then
 -  samba_cv_have_setresgid=yes
-+if ac_fn_c_try_compile "$LINENO"; then :
-+  ac_cv_have_errno_decl=yes
- 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 )
 -samba_cv_have_setresgid=no
-+  ac_cv_have_errno_decl=no
- 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
-+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
++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 :
  
 -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
+ 
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_SETRESGID 1
--_ACEOF
-+ fi
++cat >>confdefs.h <<_ACEOF
++#define offset_t loff_t
+ _ACEOF
  
--fi
+ fi
  
 -{ $as_echo "$as_me:$LINENO: checking for working memcmp" >&5
--$as_echo_n "checking for working memcmp... " >&6; }
++
++{ $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 "$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 :
++if test "${ac_cv_func_memcmp_working+set}" = set; then :
    $as_echo_n "(cached) " >&6
  else
 -  if test "$cross_compiling" = yes; then
--  ac_cv_func_memcmp_working=no
-+
-+if test "$cross_compiling" = yes; then :
-+  libreplace_cv_HAVE_SECURE_MKSTEMP=cross
++  if test "$cross_compiling" = yes; then :
+   ac_cv_func_memcmp_working=no
  else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
@@ -39486,50 +39339,10 @@
 -cat >>conftest.$ac_ext <<_ACEOF
 +  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
--$ac_includes_default
--int
--main ()
--{
--
--  /* Some versions of memcmp are not 8-bit clean.  */
--  char c0 = '\100', c1 = '\200', c2 = '\201';
--  if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0)
--    return 1;
--
--  /* The Next x86 OpenStep bug shows up only when comparing 16 bytes
--     or more and with at least one buffer not starting on a 4-byte boundary.
--     William Lewis provided this test program.   */
--  {
--    char foo[21];
--    char bar[21];
--    int i;
--    for (i = 0; i < 4; i++)
--      {
--	char *a = foo + i;
--	char *b = bar + i;
--	strcpy (a, "--------01111111");
--	strcpy (b, "--------10000000");
--	if (memcmp (a, b, 16) >= 0)
--	  return 1;
--      }
--    return 0;
--  }
--
--  ;
--  return 0;
-+#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);
+ $ac_includes_default
+ int
+@@ -38274,44 +8491,17 @@
+   return 0;
  }
  _ACEOF
 -rm -f conftest$ac_exeext
@@ -39554,9 +39367,8 @@
 -  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 :
-+  libreplace_cv_HAVE_SECURE_MKSTEMP=yes
+   ac_cv_func_memcmp_working=yes
  else
 -  $as_echo "$as_me: program exited with status $ac_status" >&5
 -$as_echo "$as_me: failed program was:" >&5
@@ -39564,7 +39376,7 @@
 -
 -( exit $ac_status )
 -ac_cv_func_memcmp_working=no
-+  libreplace_cv_HAVE_SECURE_MKSTEMP=no
++  ac_cv_func_memcmp_working=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
@@ -39575,26 +39387,31 @@
 -
  fi
 -{ $as_echo "$as_me:$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
--
--
--
++{ $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 "* ) ;;
+@@ -38321,166 +8511,149 @@
+ 
+ 
+ 
 -###############################################
 -# Readline included by default unless explicitly asked not to
 -test "${with_readline+set}" != "set" && with_readline=yes
-+{ $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
++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"
++if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
++  cat >>confdefs.h <<_ACEOF
++#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
++_ACEOF
  
 -# 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; }
-+$as_echo "#define HAVE_SECURE_MKSTEMP 1" >>confdefs.h
++fi
++done
  
 -# Check whether --with-readline was given.
 -if test "${with_readline+set}" = set; then
@@ -39602,14 +39419,12 @@
 -  yes)
 -    { $as_echo "$as_me:$LINENO: result: yes" >&5
 -$as_echo "yes" >&6; }
-+fi
  
-+for ac_header in stdio.h strings.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 :
++if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
 +  cat >>confdefs.h <<_ACEOF
 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
 +_ACEOF
@@ -39617,6 +39432,15 @@
 +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"
++if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
++  cat >>confdefs.h <<_ACEOF
++#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
++_ACEOF
  
 -for ac_header in readline.h history.h readline/readline.h
 -do
@@ -39626,14 +39450,19 @@
 -$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; }
-+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
++
++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
 -  # Is the header compilable?
 -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
@@ -39646,12 +39475,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
@@ -39671,21 +39495,30 @@
 -	 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
++   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
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
++   ac_config_commands="$ac_config_commands mk-stdbool.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; }
--
+ 
 -# Is the header present?
 -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
 -$as_echo_n "checking $ac_header presence... " >&6; }
@@ -39694,10 +39527,49 @@
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
++
++
++ac_fn_c_check_type "$LINENO" "bool" "ac_cv_type_bool" "
++$ac_includes_default
++#ifdef HAVE_STDBOOL_H
++#include <stdbool.h>
++#endif
++
++"
++if test "x$ac_cv_type_bool" = x""yes; then :
++
++$as_echo "#define HAVE_BOOL 1" >>confdefs.h
++
++fi
++
++
++ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "
++$ac_includes_default
++#ifdef HAVE_STDBOOL_H
++#include <stdbool.h>
++#endif
++
++"
++if test "x$ac_cv_type__Bool" = x""yes; then :
++
++$as_echo "#define HAVE__Bool 1" >>confdefs.h
++
++fi
++
++
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
++$as_echo_n "checking for working mmap... " >&6; }
++if test "${libreplace_cv_HAVE_MMAP+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++
++if test "$cross_compiling" = yes; then :
++  libreplace_cv_HAVE_MMAP=cross
++else
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
 -#include <$ac_header>
-+cat >>confdefs.h <<_ACEOF
-+#define HAVE_DECL_VSNPRINTF $ac_have_decl
++#include "$libreplacedir/test/shared_mmap.c"
  _ACEOF
 -if { (ac_try="$ac_cpp conftest.$ac_ext"
 -case "(($ac_try" in
@@ -39717,21 +39589,28 @@
 -	 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
++if ac_fn_c_try_run "$LINENO"; then :
++  libreplace_cv_HAVE_MMAP=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
++  libreplace_cv_HAVE_MMAP=no
++fi
++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
++  conftest.$ac_objext conftest.beam conftest.$ac_ext
++fi
+ 
 -  ac_header_preproc=no
-+  ac_have_decl=0
  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
  
 -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_MMAP 1" >>confdefs.h
+ 
 -# So?  What about this header?
 -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
 -  yes:no: )
@@ -39766,44 +39645,51 @@
 -$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
-+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
+-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; }
++
++
++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"
++if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
++  cat >>confdefs.h <<_ACEOF
++#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
++_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 HAVE_DECL_VASPRINTF $ac_have_decl
-+_ACEOF
 +
-+for ac_func in snprintf vsnprintf asprintf vasprintf
++done
++
++for ac_header in sys/time.h time.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
-+   if test "x$as_val" = 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"
++if eval test \"x\$"$as_ac_Header"\" = 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 `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
+@@ -38489,626 +8662,531 @@
  
- 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"
++if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
++  cat >>confdefs.h <<_ACEOF
++#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
++_ACEOF
  
 -for ac_header in readline/history.h
 -do
@@ -39812,28 +39698,46 @@
 -  { $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; }
- else
+-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
++
++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"
++if eval test \"x\$"$as_ac_Header"\" = 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_includes_default
 -#include <$ac_header>
--_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
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -39853,47 +39757,48 @@
 -	 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);
++done
  
 -# 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
++for ac_header in unix.h
++do :
++  ac_fn_c_check_header_mongrel "$LINENO" "unix.h" "ac_cv_header_unix_h" "$ac_includes_default"
++if test "x$ac_cv_header_unix_h" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_UNIX_H 1
+ _ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
 -#include <$ac_header>
--_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"
++if eval test \"x\$"$as_ac_var"\" = 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
 -  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -39915,22 +39820,22 @@
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+       va_start(ap, format);
-+       len = vsnprintf(0, 0, format, ap);
-+       va_end(ap);
-+       if (len != 5) exit(2);
  
 -  ac_header_preproc=no
--fi
-+       if (snprintf(buf, 3, "hello") != 5 || strcmp(buf, "he") != 0) exit(3);
+ 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; }
-+       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);
++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"
++if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
++  cat >>confdefs.h <<_ACEOF
++#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
++_ACEOF
  
 -# So?  What about this header?
 -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
@@ -39966,42 +39871,87 @@
 -$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
-+       exit(0);
-+}
-+main() { foo("hello"); }
-+
-+_ACEOF
-+if ac_fn_c_try_run "$LINENO"; then :
-+  libreplace_cv_HAVE_C99_VSNPRINTF=yes
- else
+-else
 -  eval "$as_ac_Header=\$ac_header_preproc"
-+  libreplace_cv_HAVE_C99_VSNPRINTF=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
++done
++
++for ac_func in waitpid wait4 strlcpy strlcat initgroups memmove strdup
++do :
++  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
++ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
++if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
++  cat >>confdefs.h <<_ACEOF
++#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
++_ACEOF
+ 
  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
++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"
++if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+   cat >>confdefs.h <<_ACEOF
 -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
--_ACEOF
++#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+ _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
++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"
++if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
++  cat >>confdefs.h <<_ACEOF
++#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
++_ACEOF
  
--done
--
-+$as_echo "#define HAVE_C99_VSNPRINTF 1" >>confdefs.h
++fi
+ done
  
+ 
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for setresuid declaration" >&5
++$as_echo_n "checking for setresuid declaration... " >&6; }
++if test "${ac_cv_have_setresuid_decl+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++
++    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++#include <unistd.h>
++int
++main ()
++{
++int i = (int)setresuid
++  ;
++  return 0;
++}
++_ACEOF
++if ac_fn_c_try_compile "$LINENO"; then :
++  ac_cv_have_setresuid_decl=yes
++else
++  ac_cv_have_setresuid_decl=no
 +fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_setresuid_decl" >&5
++$as_echo "$ac_cv_have_setresuid_decl" >&6; }
++ if test x"$ac_cv_have_setresuid_decl" = x"yes"; then
++
++$as_echo "#define HAVE_SETRESUID_DECL 1" >>confdefs.h
++
++ fi
  
  
 -for ac_header in readline.h readline/readline.h
@@ -40011,39 +39961,111 @@
 -  { $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 va_copy" >&5
-+$as_echo_n "checking for va_copy... " >&6; }
-+if test "${libreplace_cv_HAVE_VA_COPY+set}" = set; then :
++ { $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
--fi
++else
++
++    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++#include <unistd.h>
++int
++main ()
++{
++int i = (int)setresgid
++  ;
++  return 0;
++}
++_ACEOF
++if ac_fn_c_try_compile "$LINENO"; then :
++  ac_cv_have_setresgid_decl=yes
++else
++  ac_cv_have_setresgid_decl=no
+ fi
 -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
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_setresgid_decl" >&5
++$as_echo "$ac_cv_have_setresgid_decl" >&6; }
++ if test x"$ac_cv_have_setresgid_decl" = x"yes"; then
++
++$as_echo "#define HAVE_SETRESGID_DECL 1" >>confdefs.h
++
++ fi
++
++
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for errno declaration" >&5
++$as_echo_n "checking for errno declaration... " >&6; }
++if test "${ac_cv_have_errno_decl+set}" = set; then :
++  $as_echo_n "(cached) " >&6
  else
 -  # 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
 +
-+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
--$ac_includes_default
--#include <$ac_header>
-+#include <stdarg.h>
-+va_list ap1,ap2;
++    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++#include <errno.h>
 +int
 +main ()
 +{
-+va_copy(ap1,ap2);
++int i = (int)errno
 +  ;
 +  return 0;
 +}
  _ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++if ac_fn_c_try_compile "$LINENO"; then :
++  ac_cv_have_errno_decl=yes
++else
++  ac_cv_have_errno_decl=no
++fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_errno_decl" >&5
++$as_echo "$ac_cv_have_errno_decl" >&6; }
++ if test x"$ac_cv_have_errno_decl" = x"yes"; then
++
++$as_echo "#define HAVE_ERRNO_DECL 1" >>confdefs.h
++
++ fi
++
++
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for secure mkstemp" >&5
++$as_echo_n "checking for secure mkstemp... " >&6; }
++if test "${libreplace_cv_HAVE_SECURE_MKSTEMP+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++
++if test "$cross_compiling" = yes; then :
++  libreplace_cv_HAVE_SECURE_MKSTEMP=cross
++else
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+-$ac_includes_default
+-#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);
++}
+ _ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -40063,55 +40085,61 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_header_compiler=yes
-+if ac_fn_c_try_link "$LINENO"; then :
-+  libreplace_cv_HAVE_VA_COPY=yes
++if ac_fn_c_try_run "$LINENO"; then :
++  libreplace_cv_HAVE_SECURE_MKSTEMP=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+  libreplace_cv_HAVE_VA_COPY=no
++  libreplace_cv_HAVE_SECURE_MKSTEMP=no
 +fi
-+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
-+{ $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
  
 -	ac_header_compiler=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
  
 -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"$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 "#define HAVE_SECURE_MKSTEMP 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
++fi
++
++for ac_header in stdio.h strings.h
++do :
++  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
++ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
++if eval test \"x\$"$as_ac_Header"\" = 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.  */
 -#include <$ac_header>
-+#include <stdarg.h>
-+va_list ap1,ap2;
-+int
-+main ()
-+{
-+__va_copy(ap1,ap2);
-+  ;
-+  return 0;
-+}
++
++fi
++
++done
++
++ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
++if test "x$ac_cv_have_decl_snprintf" = x""yes; then :
++  ac_have_decl=1
++else
++  ac_have_decl=0
++fi
++
++cat >>confdefs.h <<_ACEOF
++#define HAVE_DECL_SNPRINTF $ac_have_decl
  _ACEOF
 -if { (ac_try="$ac_cpp conftest.$ac_ext"
 -case "(($ac_try" in
@@ -40131,20 +40159,117 @@
 -	 test ! -s conftest.err
 -       }; then
 -  ac_header_preproc=yes
-+if ac_fn_c_try_link "$LINENO"; then :
-+  libreplace_cv_HAVE___VA_COPY=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
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
++  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"
++if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
++  cat >>confdefs.h <<_ACEOF
++#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
++_ACEOF
++
++fi
++done
++
++
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C99 vsnprintf" >&5
++$as_echo_n "checking for C99 vsnprintf... " >&6; }
++if test "${libreplace_cv_HAVE_C99_VSNPRINTF+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++
++if test "$cross_compiling" = yes; then :
++  libreplace_cv_HAVE_C99_VSNPRINTF=cross
++else
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++
++#include <sys/types.h>
++#include <stdio.h>
++#include <stdarg.h>
++#include <stdlib.h>
++void foo(const char *format, ...) {
++       va_list ap;
++       int len;
++       char buf[20];
++       long long l = 1234567890;
++       l *= 100;
++
++       va_start(ap, format);
++       len = vsnprintf(buf, 0, format, ap);
++       va_end(ap);
++       if (len != 5) exit(1);
++
++       va_start(ap, format);
++       len = vsnprintf(0, 0, format, ap);
++       va_end(ap);
++       if (len != 5) exit(2);
++
++       if (snprintf(buf, 3, "hello") != 5 || strcmp(buf, "he") != 0) exit(3);
++
++       if (snprintf(buf, 20, "%lld", l) != 12 || strcmp(buf, "123456789000") != 0) exit(4);
++       if (snprintf(buf, 20, "%zu", 123456789) != 9 || strcmp(buf, "123456789") != 0) exit(5);
++       if (snprintf(buf, 20, "%2\$d %1\$d", 3, 4) != 3 || strcmp(buf, "4 3") != 0) exit(6);
++       if (snprintf(buf, 20, "%s", 0) < 3) exit(7);
++
++       exit(0);
++}
++main() { foo("hello"); }
++
++_ACEOF
++if ac_fn_c_try_run "$LINENO"; then :
++  libreplace_cv_HAVE_C99_VSNPRINTF=yes
++else
++  libreplace_cv_HAVE_C99_VSNPRINTF=no
++fi
++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
++  conftest.$ac_objext conftest.beam conftest.$ac_ext
++fi
+ 
 -  ac_header_preproc=no
-+  libreplace_cv_HAVE___VA_COPY=no
  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
+ 
 -# So?  What about this header?
 -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
 -  yes:no: )
@@ -40181,36 +40306,28 @@
 -  $as_echo_n "(cached) " >&6
 -else
 -  eval "$as_ac_Header=\$ac_header_preproc"
-+rm -f core conftest.err conftest.$ac_objext \
-+    conftest$ac_exeext 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; }
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libreplace_cv_HAVE___VA_COPY" >&5
-+$as_echo "$libreplace_cv_HAVE___VA_COPY" >&6; }
-+if test x"$libreplace_cv_HAVE___VA_COPY" = x"yes"; then
-+
-+$as_echo "#define HAVE___VA_COPY 1" >>confdefs.h
  
- fi
+-fi
 -as_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
  
 -      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 __FUNCTION__ macro" >&5
-+$as_echo_n "checking for __FUNCTION__ macro... " >&6; }
-+if test "${libreplace_cv_HAVE_FUNCTION_MACRO+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 :
    $as_echo_n "(cached) " >&6
  else
 -  ac_check_lib_save_LIBS=$LIBS
@@ -40231,12 +40348,13 @@
 -char tgetent ();
 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 +/* end confdefs.h.  */
-+#include <stdio.h>
++#include <stdarg.h>
++va_list ap1,ap2;
  int
  main ()
  {
 -return tgetent ();
-+printf("%s\n", __FUNCTION__);
++va_copy(ap1,ap2);
    ;
    return 0;
  }
@@ -40263,20 +40381,22 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  eval "$as_ac_Lib=yes"
-+if ac_fn_c_try_compile "$LINENO"; then :
-+  libreplace_cv_HAVE_FUNCTION_MACRO=yes
++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
 -
 -	eval "$as_ac_Lib=no"
--fi
++  libreplace_cv_HAVE_VA_COPY=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
-+  libreplace_cv_HAVE_FUNCTION_MACRO=no
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
  fi
 -ac_res=`eval 'as_val=${'$as_ac_Lib'}
 -		 $as_echo "$as_val"'`
@@ -40286,22 +40406,22 @@
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
 -  TERMLIBS="-l${termlib}"; break
-+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++{ $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: $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
  
 -      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
-+$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 :
++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
 -  ac_check_lib_save_LIBS=$LIBS
@@ -40320,14 +40440,15 @@
 -extern "C"
 -#endif
 -char rl_callback_handler_install ();
-+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 +/* end confdefs.h.  */
-+#include <stdio.h>
++#include <stdarg.h>
++va_list ap1,ap2;
  int
  main ()
  {
 -return rl_callback_handler_install ();
-+printf("%s\n", __func__);
++__va_copy(ap1,ap2);
    ;
    return 0;
  }
@@ -40354,55 +40475,45 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  ac_cv_lib_readline_rl_callback_handler_install=yes
-+if ac_fn_c_try_compile "$LINENO"; then :
-+  libreplace_cv_HAVE_func_MACRO=yes
++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
 -
 -	ac_cv_lib_readline_rl_callback_handler_install=no
-+  libreplace_cv_HAVE_func_MACRO=no
++  libreplace_cv_HAVE___VA_COPY=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
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
  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_func_MACRO" >&5
-+$as_echo "$libreplace_cv_HAVE_func_MACRO" >&6; }
-+    if test x"$libreplace_cv_HAVE_func_MACRO" = 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_LIBREADLINE 1
 -_ACEOF
-+$as_echo "#define HAVE_func_MACRO 1" >>confdefs.h
++$as_echo "#define HAVE___VA_COPY 1" >>confdefs.h
  
 -       break
 -else
 -  TERMLIBS=
-+    fi
  fi
- 
-+for ac_header in sys/param.h limits.h
-+do :
-+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-+eval as_val=\$$as_ac_Header
-+   if test "x$as_val" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-+_ACEOF
-+
+-
  fi
  
- done
- 
+-done
+-
 -    ;;
 -  no)
 -    { $as_echo "$as_me:$LINENO: result: no" >&5
@@ -40411,23 +40522,19 @@
 -  *)
 -    { $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_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 :
- 
+-
 -    # Add additional search path
 -    LDFLAGS="-L$with_readline/lib $LDFLAGS"
 -    CPPFLAGS="-I$with_readline/include $CPPFLAGS"
-+$as_echo "#define HAVE_COMPARISON_FN_T 1" >>confdefs.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`
@@ -40435,9 +40542,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
-+ { $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 "$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
 -fi
 -ac_res=`eval 'as_val=${'$as_ac_Header'}
@@ -40454,15 +40561,15 @@
 -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 <$ac_header>
-+#include <stdlib.h>
++#include <stdio.h>
 +int
 +main ()
 +{
-+int i = (int)setenv
++printf("%s\n", __FUNCTION__);
 +  ;
 +  return 0;
 +}
@@ -40487,19 +40594,23 @@
 -       } && test -s conftest.$ac_objext; then
 -  ac_header_compiler=yes
 +if ac_fn_c_try_compile "$LINENO"; then :
-+  ac_cv_have_setenv_decl=yes
++  libreplace_cv_HAVE_FUNCTION_MACRO=yes
  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
++  libreplace_cv_HAVE_FUNCTION_MACRO=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; }
--
++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
 -$as_echo_n "checking $ac_header presence... " >&6; }
@@ -40508,9 +40619,27 @@
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
++$as_echo "#define HAVE_FUNCTION_MACRO 1" >>confdefs.h
++
++else
++        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __func__ macro" >&5
++$as_echo_n "checking for __func__ macro... " >&6; }
++if test "${libreplace_cv_HAVE_func_MACRO+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++
++    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
 -#include <$ac_header>
--_ACEOF
++#include <stdio.h>
++int
++main ()
++{
++printf("%s\n", __func__);
++  ;
++  return 0;
++}
+ _ACEOF
 -if { (ac_try="$ac_cpp conftest.$ac_ext"
 -case "(($ac_try" in
 -  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -40529,20 +40658,25 @@
 -	 test ! -s conftest.err
 -       }; then
 -  ac_header_preproc=yes
--else
++if ac_fn_c_try_compile "$LINENO"; then :
++  libreplace_cv_HAVE_func_MACRO=yes
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -  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: $ac_cv_have_setenv_decl" >&5
-+$as_echo "$ac_cv_have_setenv_decl" >&6; }
-+ if test x"$ac_cv_have_setenv_decl" = x"yes"; then
++{ $as_echo "$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_SETENV_DECL 1" >>confdefs.h
++$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
@@ -40580,30 +40714,26 @@
 -  $as_echo_n "(cached) " >&6
 -else
 -  eval "$as_ac_Header=\$ac_header_preproc"
--fi
++    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; }
-+ fi
  
 -fi
 -as_val=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+for ac_func in setenv unsetenv
++for ac_header in sys/param.h limits.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
-+   if test "x$as_val" = 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"
++if eval test \"x\$"$as_ac_Header"\" = 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 `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
- 
- fi
--
+@@ -39118,713 +9196,292 @@
  done
  
  
@@ -40614,16 +40744,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 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
+-  $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; }
@@ -40632,20 +40759,10 @@
 -_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 <unistd.h>
-+int
-+main ()
-+{
-+int i = (int)environ
-+  ;
-+  return 0;
-+}
- _ACEOF
+-_ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -40665,20 +40782,21 @@
 -	 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_environ_decl=yes
- else
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
++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
+ 
 -	ac_header_compiler=no
-+  ac_cv_have_environ_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; }
--
+ 
 -# Is the header present?
 -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
 -$as_echo_n "checking $ac_header presence... " >&6; }
@@ -40687,9 +40805,25 @@
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
++
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for setenv declaration" >&5
++$as_echo_n "checking for setenv declaration... " >&6; }
++if test "${ac_cv_have_setenv_decl+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++
++    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
 -#include <$ac_header>
--_ACEOF
++#include <stdlib.h>
++int
++main ()
++{
++int i = (int)setenv
++  ;
++  return 0;
++}
+ _ACEOF
 -if { (ac_try="$ac_cpp conftest.$ac_ext"
 -case "(($ac_try" in
 -  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -40708,20 +40842,25 @@
 -	 test ! -s conftest.err
 -       }; then
 -  ac_header_preproc=yes
--else
++if ac_fn_c_try_compile "$LINENO"; then :
++  ac_cv_have_setenv_decl=yes
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -  ac_header_preproc=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: $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 "$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
  
 -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_ENVIRON_DECL 1" >>confdefs.h
++$as_echo "#define HAVE_SETENV_DECL 1" >>confdefs.h
  
 -# So?  What about this header?
 -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
@@ -40770,23 +40909,23 @@
 -as_val=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+
-+for ac_func in strnlen
++for ac_func in setenv unsetenv
 +do :
-+  ac_fn_c_check_func "$LINENO" "strnlen" "ac_cv_func_strnlen"
-+if test "x$ac_cv_func_strnlen" = 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"
++if eval test \"x\$"$as_ac_var"\" = 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_func" | $as_tr_cpp` 1
  _ACEOF
  
  fi
 -
  done
  
+ 
 -
 -
--
 -for ac_header in readline.h readline/readline.h
 -do
 -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
@@ -40794,13 +40933,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
++ { $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
 -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; }
@@ -40809,17 +40951,19 @@
 -_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
 -#include <$ac_header>
-+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
++#include <unistd.h>
++int
++main ()
++{
++int i = (int)environ
++  ;
++  return 0;
++}
  _ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
@@ -40840,17 +40984,23 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_header_compiler=yes
--else
++if ac_fn_c_try_compile "$LINENO"; then :
++  ac_cv_have_environ_decl=yes
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
- 
+-
 -	ac_header_compiler=no
++  ac_cv_have_environ_decl=no
  fi
-+done
- 
--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_environ_decl" >&5
++$as_echo "$ac_cv_have_environ_decl" >&6; }
++ if test x"$ac_cv_have_environ_decl" = x"yes"; then
  
 -# Is the header present?
 -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
@@ -40860,9 +41010,7 @@
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+# this test disabled as we don't actually need __VA_ARGS__ yet
-+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
+-/* end confdefs.h.  */
 -#include <$ac_header>
 -_ACEOF
 -if { (ac_try="$ac_cpp conftest.$ac_ext"
@@ -40886,17 +41034,15 @@
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
++$as_echo "#define HAVE_ENVIRON_DECL 1" >>confdefs.h
  
 -  ac_header_preproc=no
 -fi
-+#define eprintf(...) fprintf(stderr, __VA_ARGS__)
-+eprintf("bla", "bar");
++ fi
  
 -rm -f conftest.err conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
 -$as_echo "$ac_header_preproc" >&6; }
-+_ACEOF
-+if ac_fn_c_try_cpp "$LINENO"; then :
  
 -# So?  What about this header?
 -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
@@ -40939,28 +41085,37 @@
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
 -$as_echo "$ac_res" >&6; }
-+$as_echo "#define HAVE__VA_ARGS__MACRO 1" >>confdefs.h
++for ac_func in strnlen
++do :
++  ac_fn_c_check_func "$LINENO" "strnlen" "ac_cv_func_strnlen"
++if test "x$ac_cv_func_strnlen" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_STRNLEN 1
++_ACEOF
  
  fi
 -as_val=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
--  cat >>confdefs.h <<_ACEOF
++done
++
++for ac_func in strtoull __strtoull strtouq strtoll __strtoll strtoq
++do :
++  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
++ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
++if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+   cat >>confdefs.h <<_ACEOF
 -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
--_ACEOF
-+rm -f conftest.err conftest.$ac_ext
++#define `$as_echo "HAVE_$ac_func" | $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
-+
-+{ $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
+-  $as_echo_n "(cached) " >&6
+-else
 -  ac_check_lib_save_LIBS=$LIBS
 -LIBS="-l${termlib}  $LIBS"
 -cat >conftest.$ac_ext <<_ACEOF
@@ -40968,8 +41123,12 @@
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
++fi
++done
 +
-+    cat confdefs.h - <<_ACEOF >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.  */
  
 -/* Override any GCC internal prototype to avoid an error.
@@ -40977,21 +41136,18 @@
 -   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
+-#endif
 -char tgetent ();
-+#include <signal.h>
- int
- main ()
- {
+-int
+-main ()
+-{
 -return tgetent ();
-+sig_atomic_t i = 0
-   ;
-   return 0;
- }
+-  ;
+-  return 0;
+-}
++#define eprintf(...) fprintf(stderr, __VA_ARGS__)
++eprintf("bla", "bar");
++
  _ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
@@ -41015,22 +41171,20 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  eval "$as_ac_Lib=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
--
++if ac_fn_c_try_cpp "$LINENO"; then :
+ 
 -	eval "$as_ac_Lib=no"
-+  libreplace_cv_sig_atomic_t=no
- fi
--
+-fi
++$as_echo "#define HAVE__VA_ARGS__MACRO 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
 -LIBS=$ac_check_lib_save_LIBS
-+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
+-fi
 -ac_res=`eval 'as_val=${'$as_ac_Lib'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
@@ -41039,22 +41193,17 @@
 -		 $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_sig_atomic_t" >&5
-+$as_echo "$libreplace_cv_sig_atomic_t" >&6; }
-+if test x"$libreplace_cv_sig_atomic_t" = x"yes"; then
-+
-+$as_echo "#define HAVE_SIG_ATOMIC_T_TYPE 1" >>confdefs.h
-+
  fi
++rm -f conftest.err conftest.i conftest.$ac_ext
  
 -      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
 +
-+{ $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 "$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
 -  ac_check_lib_save_LIBS=$LIBS
@@ -41065,7 +41214,7 @@
 -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.  */
  
 -/* Override any GCC internal prototype to avoid an error.
@@ -41073,16 +41222,18 @@
 -   builtin and then its argument prototype would still apply.  */
 -#ifdef __cplusplus
 -extern "C"
-+#include <unistd.h>
-+#ifdef HAVE_FCNTL_H
-+#include <fcntl.h>
++#include <sys/types.h>
++#if STDC_HEADERS
++#include <stdlib.h>
++#include <stddef.h>
  #endif
 -char rl_callback_handler_install ();
++#include <signal.h>
  int
  main ()
  {
 -return rl_callback_handler_install ();
-+int fd = open("/dev/null", O_DIRECT);
++sig_atomic_t i = 0
    ;
    return 0;
  }
@@ -41135,17 +41286,17 @@
 -
 -       break
 +if ac_fn_c_try_compile "$LINENO"; then :
-+  libreplace_cv_HAVE_OPEN_O_DIRECT=yes
++  libreplace_cv_sig_atomic_t=yes
  else
 -  TERMLIBS= CPPFLAGS=$_cppflags
-+  libreplace_cv_HAVE_OPEN_O_DIRECT=no
++  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_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 "$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
  
 -done
 -
@@ -41156,7 +41307,7 @@
 -else
 -  { $as_echo "$as_me:$LINENO: result: no" >&5
 -$as_echo "no" >&6; }
-+$as_echo "#define HAVE_OPEN_O_DIRECT 1" >>confdefs.h
++$as_echo "#define HAVE_SIG_ATOMIC_T_TYPE 1" >>confdefs.h
  
  fi
  
@@ -41169,9 +41320,9 @@
 -{ $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
-+{ $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 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
 -  ac_check_lib_save_LIBS=$LIBS
@@ -41181,27 +41332,29 @@
 -_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.  */
  
 -/* 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 <unistd.h>
++#ifdef HAVE_FCNTL_H
++#include <fcntl.h>
+ #endif
 -char rl_completion_matches ();
-+	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h.  */
-+#include <sys/types.h>
  int
  main ()
  {
 -return rl_completion_matches ();
-+volatile int i = 0
++int fd = open("/dev/null", O_DIRECT);
    ;
    return 0;
  }
- _ACEOF
+-_ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -41224,14 +41377,15 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  ac_cv_lib_readline_rl_completion_matches=yes
++_ACEOF
 +if ac_fn_c_try_compile "$LINENO"; then :
-+  libreplace_cv_volatile=yes
++  libreplace_cv_HAVE_OPEN_O_DIRECT=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	ac_cv_lib_readline_rl_completion_matches=no
-+  libreplace_cv_volatile=no
++  libreplace_cv_HAVE_OPEN_O_DIRECT=no
  fi
 -
 -rm -rf conftest.dSYM
@@ -41243,29 +41397,25 @@
 -{ $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_volatile" >&5
-+$as_echo "$libreplace_cv_volatile" >&6; }
-+if test x"$libreplace_cv_volatile" = x"yes"; then
++{ $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
  
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_NEW_LIBREADLINE 1
 -_ACEOF
-+$as_echo "#define HAVE_VOLATILE 1" >>confdefs.h
++$as_echo "#define HAVE_OPEN_O_DIRECT 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
-+# 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 "$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
@@ -41273,12 +41423,12 @@
 -_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 <readline/readline.h>
+ 
++	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
 +#include <sys/types.h>
-+#include <$ac_hdr>
- 
  int
  main ()
  {
@@ -41286,8 +41436,7 @@
 -  (void) rl_event_hook;
 -#endif
 -
-+if ((DIR *) 0)
-+return 0;
++volatile int i = 0
    ;
    return 0;
  }
@@ -41312,17 +41461,17 @@
 -       } && test -s conftest.$ac_objext; then
 -  ac_cv_have_decl_rl_event_hook=yes
 +if ac_fn_c_try_compile "$LINENO"; then :
-+  eval "$as_ac_Header=yes"
++  libreplace_cv_volatile=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	ac_cv_have_decl_rl_event_hook=no
-+  eval "$as_ac_Header=no"
++  libreplace_cv_volatile=no
  fi
 -
  rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
--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
@@ -41333,31 +41482,28 @@
 -
 -
 -else
-+fi
-+eval ac_res=\$$as_ac_Header
-+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-+$as_echo "$ac_res" >&6; }
-+eval as_val=\$$as_ac_Header
-+   if test "x$as_val" = x""yes; then :
-   cat >>confdefs.h <<_ACEOF
+-  cat >>confdefs.h <<_ACEOF
 -#define HAVE_DECL_RL_EVENT_HOOK 0
-+#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
- _ACEOF
+-_ACEOF
++{ $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
  
--
-+ac_header_dirent=$ac_hdr; break
++$as_echo "#define HAVE_VOLATILE 1" >>confdefs.h
+ 
  fi
  
 -
 -{ $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
-+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 :
++# 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 eval "test \"\${$as_ac_Header+set}\"" = set; then :
    $as_echo_n "(cached) " >&6
  else
 -  ac_check_lib_save_LIBS=$LIBS
@@ -41367,22 +41513,24 @@
 -_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
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
++#include <sys/types.h>
++#include <$ac_hdr>
  
- /* Override any GCC internal prototype to avoid an error.
-@@ -39663,73 +9505,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 history_list ();
-+char opendir ();
  int
  main ()
  {
 -return history_list ();
-+return opendir ();
++if ((DIR *) 0)
++return 0;
    ;
    return 0;
  }
@@ -41409,30 +41557,21 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  ac_cv_lib_readline_history_list=yes
--else
++if ac_fn_c_try_compile "$LINENO"; then :
++  eval "$as_ac_Header=yes"
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	ac_cv_lib_readline_history_list=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
++  eval "$as_ac_Header=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
-+  if test "${ac_cv_search_opendir+set}" = set; then :
-+  break
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_readline_history_list" >&5
 -$as_echo "$ac_cv_lib_readline_history_list" >&6; }
@@ -41440,30 +41579,26 @@
 -
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_HISTORY_LIST 1
--_ACEOF
-+done
-+if test "${ac_cv_search_opendir+set}" = set; then :
++eval ac_res=\$$as_ac_Header
++	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
++$as_echo "$ac_res" >&6; }
++if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
++  cat >>confdefs.h <<_ACEOF
++#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
+ _ACEOF
  
-+else
-+  ac_cv_search_opendir=no
-+fi
-+rm conftest.$ac_ext
-+LIBS=$ac_func_search_save_LIBS
++ac_header_dirent=$ac_hdr; break
  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
- 
+-
 -###############################################
 -# 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
-+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 :
@@ -41479,7 +41614,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -39738,168 +9562,148 @@
+@@ -39833,105 +9490,56 @@
  #ifdef __cplusplus
  extern "C"
  #endif
@@ -41495,7 +41630,7 @@
  }
  _ACEOF
 -for ac_lib in '' nsl; do
-+for ac_lib in '' x; do
++for ac_lib in '' dir; do
    if test -z "$ac_lib"; then
      ac_res="none required"
    else
@@ -41566,9 +41701,155 @@
  
  fi
  
+-
+-for ac_func in yp_get_default_domain
+-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
++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
+-/* confdefs.h.  */
+-_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.  */
+-/* 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
+@@ -39939,275 +9547,144 @@
+ #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 opendir ();
+ int
+ main ()
+ {
+-return $ac_func ();
++return opendir ();
+   ;
+   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"
++for ac_lib in '' x; do
++  if test -z "$ac_lib"; then
++    ac_res="none required"
++  else
++    ac_res=-l$ac_lib
++    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
++  fi
++  if ac_fn_c_try_link "$LINENO"; then :
++  ac_cv_search_opendir=$ac_res
 +fi
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext
++  if test "${ac_cv_search_opendir+set}" = set; then :
++  break
++fi
++done
++if test "${ac_cv_search_opendir+set}" = set; then :
++
+ else
+-  $as_echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
++  ac_cv_search_opendir=no
++fi
++rm conftest.$ac_ext
++LIBS=$ac_func_search_save_LIBS
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
++$as_echo "$ac_cv_search_opendir" >&6; }
++ac_res=$ac_cv_search_opendir
++if test "$ac_res" != no; then :
++  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
  
--for ac_func in yp_get_default_domain
+-	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
+ 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_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"
++if eval test \"x\$"$as_ac_Header"\" = 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
+-done
+-
+ 
+-# Check if we have execl, if not we need to compile smbrun.
++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
@@ -41578,12 +41859,11 @@
 -else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
-+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
++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 :
++if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
 +  cat >>confdefs.h <<_ACEOF
 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
@@ -41593,30 +41873,19 @@
 -/* 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 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
  
 -/* Override any GCC internal prototype to avoid an error.
 -   Use char because int might match the return type of a GCC
@@ -41632,46 +41901,139 @@
 -choke me
 -#endif
 +fi
-+
+ 
+-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"
+-else
+-  $as_echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
 +done
-+
-+
+ 
+-	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
+-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
 +# 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
+   cat >>confdefs.h <<_ACEOF
+-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 +#define HAVE_SYS_SELECT_H 1
-+_ACEOF
-+
-+fi
-+
+ _ACEOF
+ 
+ fi
+-done
+-
+-if test x"$ac_cv_func_execl" = x"no"; then
+-    EXTRA_BIN_PROGS="$EXTRA_BIN_PROGS bin/smbrun\$(EXEEXT)"
+-fi
+-
+ 
 +done
-+
-+
+ 
+ 
 +# time
 +for ac_header in sys/time.h utime.h
 +do :
 +  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-+eval as_val=\$$as_ac_Header
-+   if test "x$as_val" = x""yes; then :
++if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
 +  cat >>confdefs.h <<_ACEOF
 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
 +_ACEOF
-+
+ 
 +fi
-+
+ 
 +done
-+
+ 
+-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 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
+   $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
+-
+-/* 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 <sys/types.h>
 +#include <sys/time.h>
 +#include <time.h>
@@ -41741,18 +42103,15 @@
 +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 :
++if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
  _ACEOF
-@@ -39908,211 +9712,170 @@
+@@ -40216,625 +9693,310 @@
  done
  
  
--# Check if we have execl, if not we need to compile smbrun.
--
--for ac_func in execl
+-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
@@ -41849,9 +42208,9 @@
 -
 -	eval "$as_ac_var=no"
 +  ac_cv_header_sys_wait_h=no
++fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  fi
-+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-+fi
 +{ $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
@@ -41884,23 +42243,60 @@
  fi
 -done
  
--if test x"$ac_cv_func_execl" = x"no"; then
--    EXTRA_BIN_PROGS="$EXTRA_BIN_PROGS bin/smbrun\$(EXEEXT)"
--fi
 +done
  
  
+-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
 +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
+-/* 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"
+-#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
 +	#ifdef HAVE_SYS_VFS_H
 +	#include <sys/vfs.h>
 +	#endif
@@ -41908,57 +42304,112 @@
 +	#include <sys/capability.h>
 +	#endif
  
-+int
-+main ()
-+{
- 
+ int
+ main ()
+ {
+-return $ac_func ();
++
 +	int i;
++
+   ;
+   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 :
++  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
  
--for ac_func in getcwd fchown chmod fchmod mknod mknod64
+-	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
+-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_ext
+ fi
+-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
+ 
++fi
+ 
+-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
++{ $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.  */
-+  ;
-+  return 0;
-+}
- _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
-+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
  
 -/* 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
-+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
++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
@@ -41973,15 +42424,6 @@
 -#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_n "(cached) " >&6
-+else
-+
-+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h.  */
-+
 +	#ifdef HAVE_SYS_CAPABILITY_H
 +	#include <sys/capability.h>
 +	#endif
@@ -42033,24 +42475,10 @@
 +{ $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
  
 -	eval "$as_ac_var=no"
- fi
-+;;
-+esac
-+
-+# passwd
-+for ac_header in grp.h sys/id.h compat.h shadow.h sys/priv.h pwd.h sys/security.h
-+do :
-+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-+eval as_val=\$$as_ac_Header
-+   if test "x$as_val" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-+_ACEOF
+-fi
++$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 \
@@ -42063,23 +42491,40 @@
 -as_val=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
++;;
++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"
++if eval test \"x\$"$as_ac_Header"\" = 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
+-done
+-
+ 
 +done
-+
+ 
 +for ac_func in getpwnam_r getpwuid_r getpwent_r
 +do :
 +  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-+eval as_val=\$$as_ac_var
-+   if test "x$as_val" = x""yes; then :
-   cat >>confdefs.h <<_ACEOF
- #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
- _ACEOF
-@@ -40121,201 +9884,139 @@
- done
++if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
++  cat >>confdefs.h <<_ACEOF
++#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
++_ACEOF
  
++fi
++done
  
--for ac_func in strtol
+ 
+-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
@@ -42169,13 +42614,12 @@
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	eval "$as_ac_var=no"
-+  ac_cv_have_getpwent_r_decl=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
-+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++  ac_cv_have_getpwent_r_decl=no
  fi
 -ac_res=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
@@ -42186,70 +42630,168 @@
 -   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
+ fi
+-done
+-
+-
+-
+-
+-
+-
 +{ $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
-+
+ 
+-for ac_func in sigprocmask sigblock sigaction sigset innetgr setnetgrent getnetgrent endnetgrent
+-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, 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
++if { as_var=`$as_echo "ac_cv_c_prototype_struct passwd *getpwent_r(struct passwd *src, char *buf, int buflen)" | $as_tr_sh`; 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
 +  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, int buflen)
 +		{
-+
+ 
+-/* 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
 +	#ifndef HAVE_GETPWENT_R_DECL
 +	#error missing getpwent_r prototype
 +	#endif
 +	return NULL;
 +
 +		}
-+
+ 
+-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_struct_passwd_pgetpwent_r_struct_passwd_psrc__char_pbuf__int_buflen_=yes
++		`$as_echo "ac_cv_c_prototype_struct passwd *getpwent_r(struct passwd *src, char *buf, int buflen)" | $as_tr_sh`=yes
 +
-+else
-+
-+		ac_cv_c_prototype_struct_passwd_pgetpwent_r_struct_passwd_psrc__char_pbuf__int_buflen_=no
+ else
+-  $as_echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
  
+-	eval "$as_ac_var=no"
+-fi
++		`$as_echo "ac_cv_c_prototype_struct passwd *getpwent_r(struct passwd *src, char *buf, int buflen)" | $as_tr_sh`=no
+ 
+-rm -rf conftest.dSYM
+-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+-      conftest$ac_exeext conftest.$ac_ext
  fi
--done
+-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_ext
-+
-+fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_prototype_struct_passwd_pgetpwent_r_struct_passwd_psrc__char_pbuf__int_buflen_" >&5
-+$as_echo "$ac_cv_c_prototype_struct_passwd_pgetpwent_r_struct_passwd_psrc__char_pbuf__int_buflen_" >&6; }
-+if test $ac_cv_c_prototype_struct_passwd_pgetpwent_r_struct_passwd_psrc__char_pbuf__int_buflen_ = yes; then :
  
+ fi
+-done
+-
+-
+-
++eval ac_res=\$`$as_echo "ac_cv_c_prototype_struct passwd *getpwent_r(struct passwd *src, char *buf, int buflen)" | $as_tr_sh`
++	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
++$as_echo "$ac_res" >&6; }
++if test $`$as_echo "ac_cv_c_prototype_struct passwd *getpwent_r(struct passwd *src, char *buf, int buflen)" | $as_tr_sh` = yes; then :
  
+ 
 +$as_echo "#define SOLARIS_GETPWENT_R 1" >>confdefs.h
  
--for ac_func in strchr chflags
+ 
++fi
+ 
+-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
-+
-+fi
-+
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototype struct passwd *getpwent_r(struct passwd *src, char *buf, size_t buflen)" >&5
 +$as_echo_n "checking for prototype struct passwd *getpwent_r(struct passwd *src, char *buf, size_t buflen)... " >&6; }
-+if test "${ac_cv_c_prototype_struct_passwd_pgetpwent_r_struct_passwd_psrc__char_pbuf__size_t_buflen_+set}" = set; then :
++if { as_var=`$as_echo "ac_cv_c_prototype_struct passwd *getpwent_r(struct passwd *src, char *buf, size_t buflen)" | $as_tr_sh`; eval "test \"\${$as_var+set}\" = set"; }; then :
    $as_echo_n "(cached) " >&6
  else
 -  cat >conftest.$ac_ext <<_ACEOF
@@ -42333,26 +42875,17 @@
 -  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
++		`$as_echo "ac_cv_c_prototype_struct passwd *getpwent_r(struct passwd *src, char *buf, size_t buflen)" | $as_tr_sh`=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
++		`$as_echo "ac_cv_c_prototype_struct passwd *getpwent_r(struct passwd *src, char *buf, size_t buflen)" | $as_tr_sh`=no
 +
-+fi
+ fi
 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-+
- fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_prototype_struct_passwd_pgetpwent_r_struct_passwd_psrc__char_pbuf__size_t_buflen_" >&5
-+$as_echo "$ac_cv_c_prototype_struct_passwd_pgetpwent_r_struct_passwd_psrc__char_pbuf__size_t_buflen_" >&6; }
-+if test $ac_cv_c_prototype_struct_passwd_pgetpwent_r_struct_passwd_psrc__char_pbuf__size_t_buflen_ = yes; then :
-+
-+
-+$as_echo "#define SOLARIS_GETPWENT_R 1" >>confdefs.h
-+
  
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
@@ -42361,36 +42894,76 @@
 -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_echo "ac_cv_c_prototype_struct passwd *getpwent_r(struct passwd *src, char *buf, size_t buflen)" | $as_tr_sh`
++	       { $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
++if test $`$as_echo "ac_cv_c_prototype_struct passwd *getpwent_r(struct passwd *src, char *buf, size_t buflen)" | $as_tr_sh` = 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 :
++if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
  _ACEOF
-@@ -40324,252 +10025,221 @@
+@@ -40843,362 +10005,220 @@
  done
  
  
--
--
--
--for ac_func in getrlimit fsync fdatasync setpgid
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getgrent_r declaration" >&5
++$as_echo_n "checking for getgrent_r declaration... " >&6; }
++if test "${ac_cv_have_getgrent_r_decl+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
+ 
++    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
+ 
++	#include <unistd.h>
++	#include <grp.h>
+ 
++int
++main ()
++{
++int i = (int)getgrent_r
++  ;
++  return 0;
++}
++_ACEOF
++if ac_fn_c_try_compile "$LINENO"; then :
++  ac_cv_have_getgrent_r_decl=yes
++else
++  ac_cv_have_getgrent_r_decl=no
++fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getgrent_r_decl" >&5
++$as_echo "$ac_cv_have_getgrent_r_decl" >&6; }
++ if test x"$ac_cv_have_getgrent_r_decl" = x"yes"; then
+ 
++$as_echo "#define HAVE_GETGRENT_R_DECL 1" >>confdefs.h
+ 
++ fi
+ 
+-for ac_func in setpriv setgidx setuidx setgroups sysconf stat64 fstat64
 -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 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 { as_var=`$as_echo "ac_cv_c_prototype_struct group *getgrent_r(struct group *src, char *buf, int buflen)" | $as_tr_sh`; eval "test \"\${$as_var+set}\" = set"; }; then :
    $as_echo_n "(cached) " >&6
  else
 -  cat >conftest.$ac_ext <<_ACEOF
@@ -42398,25 +42971,29 @@
 -_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
-+    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
@@ -42431,17 +43008,20 @@
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
 -#endif
-+	#include <unistd.h>
-+	#include <grp.h>
++	#ifndef HAVE_GETGRENT_R_DECL
++	#error missing getgrent_r prototype
++	#endif
++	return NULL;
++
++		}
  
- int
- main ()
- {
+-int
+-main ()
+-{
 -return $ac_func ();
-+int i = (int)getgrent_r
-   ;
-   return 0;
- }
+-  ;
+-  return 0;
+-}
  _ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
@@ -42466,19 +43046,20 @@
 -       }; then
 -  eval "$as_ac_var=yes"
 +if ac_fn_c_try_compile "$LINENO"; then :
-+  ac_cv_have_getgrent_r_decl=yes
++
++		`$as_echo "ac_cv_c_prototype_struct group *getgrent_r(struct group *src, char *buf, int buflen)" | $as_tr_sh`=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
- fi
--
+-fi
++		`$as_echo "ac_cv_c_prototype_struct group *getgrent_r(struct group *src, char *buf, int buflen)" | $as_tr_sh`=no
+ 
 -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"'`
@@ -42489,71 +43070,35 @@
 -   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
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  
  fi
 -done
-+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+-
+-
+-
++eval ac_res=\$`$as_echo "ac_cv_c_prototype_struct group *getgrent_r(struct group *src, char *buf, int buflen)" | $as_tr_sh`
++	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
++$as_echo "$ac_res" >&6; }
++if test $`$as_echo "ac_cv_c_prototype_struct group *getgrent_r(struct group *src, char *buf, int buflen)" | $as_tr_sh` = yes; then :
  
-+fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_prototype_struct_group_pgetgrent_r_struct_group_psrc__char_pbuf__int_buflen_" >&5
-+$as_echo "$ac_cv_c_prototype_struct_group_pgetgrent_r_struct_group_psrc__char_pbuf__int_buflen_" >&6; }
-+if test $ac_cv_c_prototype_struct_group_pgetgrent_r_struct_group_psrc__char_pbuf__int_buflen_ = yes; then :
  
- 
 +$as_echo "#define SOLARIS_GETGRENT_R 1" >>confdefs.h
  
  
 +fi
  
--for ac_func in setsid glob strpbrk crypt16 getauthuid
+ 
+-for ac_func in lstat64 fopen64 atexit grantpt lseek64 ftruncate64 posix_fallocate posix_fallocate64
 -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 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 :
++if { as_var=`$as_echo "ac_cv_c_prototype_struct group *getgrent_r(struct group *src, char *buf, size_t buflen)" | $as_tr_sh`; eval "test \"\${$as_var+set}\" = set"; }; then :
    $as_echo_n "(cached) " >&6
  else
 -  cat >conftest.$ac_ext <<_ACEOF
@@ -42637,14 +43182,14 @@
 -  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
++		`$as_echo "ac_cv_c_prototype_struct group *getgrent_r(struct group *src, char *buf, size_t buflen)" | $as_tr_sh`=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
++		`$as_echo "ac_cv_c_prototype_struct group *getgrent_r(struct group *src, char *buf, size_t buflen)" | $as_tr_sh`=no
 +
  fi
 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
@@ -42656,49 +43201,99 @@
 -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_echo "ac_cv_c_prototype_struct group *getgrent_r(struct group *src, char *buf, size_t buflen)" | $as_tr_sh`
++	       { $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 :
-+
-+
+-  cat >>confdefs.h <<_ACEOF
+-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+-_ACEOF
++if test $`$as_echo "ac_cv_c_prototype_struct group *getgrent_r(struct group *src, char *buf, size_t buflen)" | $as_tr_sh` = yes; then :
+ 
+-fi
+-done
+ 
 +$as_echo "#define SOLARIS_GETGRENT_R 1" >>confdefs.h
-+
-+
+ 
+ 
 +fi
-+
+ 
 +for ac_func in getgrouplist
 +do :
 +  ac_fn_c_check_func "$LINENO" "getgrouplist" "ac_cv_func_getgrouplist"
 +if test "x$ac_cv_func_getgrouplist" = x""yes; then :
-   cat >>confdefs.h <<_ACEOF
--#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
++  cat >>confdefs.h <<_ACEOF
 +#define HAVE_GETGROUPLIST 1
- _ACEOF
++_ACEOF
  
- fi
- done
++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_n "(cached) " >&6
+-else
+-  cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
 +# locale
 +for ac_header in ctype.h locale.h langinfo.h
 +do :
 +  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-+eval as_val=\$$as_ac_Header
-+   if test "x$as_val" = x""yes; then :
++if eval test \"x\$"$as_ac_Header"\" = 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.  */
  
+-#ifdef __STDC__
+-# include <limits.h>
+-#else
+-# include <assert.h>
+-#endif
 +fi
  
+-#undef $ac_func
 +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.  */
+-#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
  
+-int
+-main ()
+-{
+-return $ac_func ();
+-  ;
+-  return 0;
+-}
 +# glob
 +for ac_header in fnmatch.h
 +do :
@@ -42706,88 +43301,125 @@
 +if test "x$ac_cv_header_fnmatch_h" = x""yes; then :
 +  cat >>confdefs.h <<_ACEOF
 +#define HAVE_FNMATCH_H 1
-+_ACEOF
+ _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
  
-+fi
+-	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
+-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
- 
--for ac_func in sigprocmask sigblock sigaction sigset innetgr setnetgrent getnetgrent endnetgrent
--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.  */
 +
++
 +# 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
++if eval test \"x\$"$as_ac_Header"\" = 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
--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
+ fi
 +
-+done
-+
-+
+ 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 :
++if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
 +  cat >>confdefs.h <<_ACEOF
 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
 +_ACEOF
 +
 +fi
-+
+ 
 +done
  
--#ifdef __STDC__
--# include <limits.h>
--#else
--# include <assert.h>
--#endif
  
--#undef $ac_func
-+
+ 
 +save_LIBS="$LIBS"
 +LIBS=""
-+
+ 
+-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
 +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
+   $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_func_search_save_LIBS=$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.  */
+-
+-#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
-@@ -40577,106 +10247,85 @@
+@@ -41206,100 +10226,84 @@
  #ifdef __cplusplus
  extern "C"
  #endif
@@ -42831,11 +43463,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
--
--	eval "$as_ac_var=no"
 +for ac_lib in '' dl; do
 +  if test -z "$ac_lib"; then
 +    ac_res="none required"
@@ -42845,7 +43472,7 @@
 +  fi
 +  if ac_fn_c_try_link "$LINENO"; then :
 +  ac_cv_search_dlopen=$ac_res
- fi
++fi
 +rm -f core conftest.err conftest.$ac_objext \
 +    conftest$ac_exeext
 +  if test "${ac_cv_search_dlopen+set}" = set; then :
@@ -42853,23 +43480,12 @@
 +fi
 +done
 +if test "${ac_cv_search_dlopen+set}" = set; then :
- 
--rm -rf conftest.dSYM
--rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
--      conftest$ac_exeext conftest.$ac_ext
-+else
++
+ else
+-  $as_echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
 +  ac_cv_search_dlopen=no
- 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
 +rm conftest.$ac_ext
 +LIBS=$ac_func_search_save_LIBS
 +fi
@@ -42879,10 +43495,13 @@
 +if test "$ac_res" != no; then :
 +  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
  
+-	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
++
 +for ac_header in dlfcn.h
 +do :
 +  ac_fn_c_check_header_mongrel "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default"
@@ -42890,28 +43509,34 @@
 +  cat >>confdefs.h <<_ACEOF
 +#define HAVE_DLFCN_H 1
 +_ACEOF
- 
-+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
- 
++
 +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
++if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+   cat >>confdefs.h <<_ACEOF
+ #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+ _ACEOF
  
 +else
 +  libreplace_cv_dlfcn=yes
-+fi
-+done
+ fi
+ done
  
  
--for ac_func in initgroups select poll rdchk getgrnam getgrent pathconf
+-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
@@ -42950,7 +43575,7 @@
  
  /* Override any GCC internal prototype to avoid an error.
     Use char because int might match the return type of a GCC
-@@ -40684,937 +10333,612 @@
+@@ -41307,711 +10311,613 @@
  #ifdef __cplusplus
  extern "C"
  #endif
@@ -43055,8 +43680,7 @@
 +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 :
++if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
  _ACEOF
@@ -43067,58 +43691,44 @@
  done
  
  
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototype void *dlopen(const char* filename, unsigned int flags)" >&5
-+$as_echo_n "checking for prototype void *dlopen(const char* filename, unsigned int flags)... " >&6; }
-+if test "${ac_cv_c_prototype_void_pdlopen_const_charp_filename__unsigned_int_flags_+set}" = set; then :
-+  $as_echo_n "(cached) " >&6
-+else
-+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h.  */
- 
-+		$ac_includes_default
- 
-+	#include <dlfcn.h>
- 
-+		void *dlopen(const char* filename, unsigned int flags)
-+		{
- 
-+	return 0;
- 
-+		}
- 
--for ac_func in setpriv setgidx setuidx setgroups sysconf stat64 fstat64
+-for ac_func in getdents64
 -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 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 { as_var=`$as_echo "ac_cv_c_prototype_void *dlopen(const char* filename, unsigned int flags)" | $as_tr_sh`; eval "test \"\${$as_var+set}\" = set"; }; then :
+   $as_echo_n "(cached) " >&6
+ else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
- _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
--
+ 
 -/* 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.  */
-+if ac_fn_c_try_compile "$LINENO"; then :
++		$ac_includes_default
  
 -#ifdef __STDC__
 -# include <limits.h>
 -#else
 -# include <assert.h>
 -#endif
-+		ac_cv_c_prototype_void_pdlopen_const_charp_filename__unsigned_int_flags_=yes
++	#include <dlfcn.h>
  
 -#undef $ac_func
-+else
++		void *dlopen(const char* filename, unsigned int flags)
++		{
  
 -/* Override any GCC internal prototype to avoid an error.
 -   Use char because int might match the return type of a GCC
@@ -43133,7 +43743,9 @@
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
 -#endif
-+		ac_cv_c_prototype_void_pdlopen_const_charp_filename__unsigned_int_flags_=no
++	return 0;
++
++		}
  
 -int
 -main ()
@@ -43142,7 +43754,7 @@
 -  ;
 -  return 0;
 -}
--_ACEOF
+ _ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -43165,21 +43777,19 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  eval "$as_ac_var=yes"
--else
++if ac_fn_c_try_compile "$LINENO"; then :
++
++		`$as_echo "ac_cv_c_prototype_void *dlopen(const char* filename, unsigned int flags)" | $as_tr_sh`=yes
++
+ 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
  
 -	eval "$as_ac_var=no"
++		`$as_echo "ac_cv_c_prototype_void *dlopen(const char* filename, unsigned int flags)" | $as_tr_sh`=no
++
  fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_prototype_void_pdlopen_const_charp_filename__unsigned_int_flags_" >&5
-+$as_echo "$ac_cv_c_prototype_void_pdlopen_const_charp_filename__unsigned_int_flags_" >&6; }
-+if test $ac_cv_c_prototype_void_pdlopen_const_charp_filename__unsigned_int_flags_ = yes; then :
-+
-+
-+$as_echo "#define DLOPEN_TAKES_UNSIGNED_FLAGS 1" >>confdefs.h
-+
++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 \
@@ -43188,50 +43798,41 @@
 -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_echo "ac_cv_c_prototype_void *dlopen(const char* filename, unsigned int flags)" | $as_tr_sh`
++	       { $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
 -  cat >>confdefs.h <<_ACEOF
 -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 -_ACEOF
++if test $`$as_echo "ac_cv_c_prototype_void *dlopen(const char* filename, unsigned int flags)" | $as_tr_sh` = yes; then :
++
++
++$as_echo "#define DLOPEN_TAKES_UNSIGNED_FLAGS 1" >>confdefs.h
++
  
-+
-+if test x"${libreplace_cv_dlfcn}" = x"yes";then
-+	LIBREPLACEOBJ="${LIBREPLACEOBJ} $libreplacedir/dlfcn.o"
  fi
 -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
++if test x"${libreplace_cv_dlfcn}" = x"yes";then
++	LIBREPLACEOBJ="${LIBREPLACEOBJ} $libreplacedir/dlfcn.o"
 +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
++LIBDL="$LIBS"
  
-+if test x"$libreplace_cv_HAVE_GETPASS" = x"yes" -a x"$libreplace_cv_HAVE_GETPASSPHRASE" = x"yes"; then
++LIBS="$save_LIBS"
  
-+$as_echo "#define REPLACE_GETPASS_BY_GETPASSPHRASE 1" >>confdefs.h
- 
- 
-+$as_echo "#define REPLACE_GETPASS 1" >>confdefs.h
- 
--for ac_func in lstat64 fopen64 atexit grantpt lseek64 ftruncate64 posix_fallocate posix_fallocate64
+-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
-+	LIBREPLACEOBJ="${LIBREPLACEOBJ} $libreplacedir/getpass.o"
- else
+-else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
@@ -43241,28 +43842,29 @@
 -/* 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
--
++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
+ 
 -/* 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_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
  
 -#ifdef __STDC__
 -# include <limits.h>
 -#else
 -# include <assert.h>
 -#endif
-+{ $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
++if test x"$libreplace_cv_HAVE_GETPASS" = x"yes" -a x"$libreplace_cv_HAVE_GETPASSPHRASE" = x"yes"; then
  
 -#undef $ac_func
-+SAVE_CPPFLAGS="$CPPFLAGS"
-+CPPFLAGS="$CPPFLAGS -I$libreplacedir/"
-+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h.  */
++$as_echo "#define REPLACE_GETPASS_BY_GETPASSPHRASE 1" >>confdefs.h
  
 -/* Override any GCC internal prototype to avoid an error.
 -   Use char because int might match the return type of a GCC
@@ -43277,6 +43879,23 @@
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
 -#endif
++
++$as_echo "#define REPLACE_GETPASS 1" >>confdefs.h
++
++	LIBREPLACEOBJ="${LIBREPLACEOBJ} $libreplacedir/getpass.o"
++else
++
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getpass should be replaced" >&5
++$as_echo_n "checking whether getpass should be replaced... " >&6; }
++if test "${libreplace_cv_REPLACE_GETPASS+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++
++SAVE_CPPFLAGS="$CPPFLAGS"
++CPPFLAGS="$CPPFLAGS -I$libreplacedir/"
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++
 +#include "confdefs.h"
 +#define NO_CONFIG_H
 +#include "$libreplacedir/getpass.c"
@@ -43321,38 +43940,62 @@
 +fi
 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 +CPPFLAGS="$SAVE_CPPFLAGS"
-+
-+fi
+ 
+-	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} $libreplacedir/getpass.o"
-+fi
-+
-+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
+ 
+ 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 syslog vsyslog timegm
+-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
 +_ACEOF
 +if ac_fn_c_try_run "$LINENO"; then :
 +  libreplace_cv_STRPTIME_OK=yes
-+else
+ else
+-  cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
 +  libreplace_cv_STRPTIME_OK=no
 +fi
 +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
@@ -43364,82 +44007,42 @@
 +{ $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
- 
--	eval "$as_ac_var=no"
--fi
++
 +$as_echo "#define REPLACE_STRPTIME 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
++
 +        LIBREPLACEOBJ="${LIBREPLACEOBJ} $libreplacedir/strptime.o"
- 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
++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_func" | $as_tr_cpp` 1
++if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
++  cat >>confdefs.h <<_ACEOF
 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
- 
- fi
--done
--
--
--
--
- 
-+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
-+#######################################
-+# 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 >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
--
+ 
 -/* 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.  */
@@ -43453,6 +44056,15 @@
 -#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.  */
  
 +		#include <stdio.h>
 +		#ifdef HAVE_DIRECT_H
@@ -43538,18 +44150,37 @@
  done
  
  
+-
+-for ac_func in setlocale nl_langinfo
+-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 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
- 
+   $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 :
 +  libreplace_cv_READDIR_NEEDED="assuming not"
 +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 test_readdir_os2_delete main
 +#include "$libreplacedir/test/os2_delete.c"
 +_ACEOF
@@ -43562,49 +44193,16 @@
 +  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 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_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
--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
-+done
  
 -#undef $ac_func
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libreplace_cv_READDIR_NEEDED" >&5
++$as_echo "$libreplace_cv_READDIR_NEEDED" >&6; }
  
 -/* Override any GCC internal prototype to avoid an error.
 -   Use char because int might match the return type of a GCC
@@ -43619,6 +44217,18 @@
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
 -#endif
++for ac_func in dirfd
++do :
++  ac_fn_c_check_func "$LINENO" "dirfd" "ac_cv_func_dirfd"
++if test "x$ac_cv_func_dirfd" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_DIRFD 1
++_ACEOF
++
++fi
++done
++
++
 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dirfd declaration" >&5
 +$as_echo_n "checking for dirfd declaration... " >&6; }
 +if test "${ac_cv_have_dirfd_decl+set}" = set; then :
@@ -43707,7 +44317,7 @@
  done
  
 -
--for ac_func in getpwent_r
+-for ac_func in nanosleep
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
@@ -43715,7 +44325,7 @@
 -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 :
++if { as_var=`$as_echo "ac_cv_c_prototype_long telldir(const DIR *dir)" | $as_tr_sh`; eval "test \"\${$as_var+set}\" = set"; }; then :
    $as_echo_n "(cached) " >&6
  else
 -  cat >conftest.$ac_ext <<_ACEOF
@@ -43795,14 +44405,14 @@
 -  eval "$as_ac_var=yes"
 +if ac_fn_c_try_compile "$LINENO"; then :
 +
-+		ac_cv_c_prototype_long_telldir_const_DIR_pdir_=yes
++		`$as_echo "ac_cv_c_prototype_long telldir(const DIR *dir)" | $as_tr_sh`=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
++		`$as_echo "ac_cv_c_prototype_long telldir(const DIR *dir)" | $as_tr_sh`=no
 +
  fi
 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
@@ -43814,157 +44424,71 @@
 -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_echo "ac_cv_c_prototype_long telldir(const DIR *dir)" | $as_tr_sh`
++	       { $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
 -  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 :
++if test $`$as_echo "ac_cv_c_prototype_long telldir(const DIR *dir)" | $as_tr_sh` = yes; then :
 +
 +
 +$as_echo "#define TELLDIR_TAKES_CONST_DIR 1" >>confdefs.h
 +
- 
- fi
--done
- 
- 
--for ac_func in getdents64
--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 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
--/* confdefs.h.  */
--_ACEOF
--cat confdefs.h >>conftest.$ac_ext
--cat >>conftest.$ac_ext <<_ACEOF
++if { as_var=`$as_echo "ac_cv_c_prototype_int seekdir(DIR *dir, long ofs)" | $as_tr_sh`; eval "test \"\${$as_var+set}\" = set"; }; then :
++  $as_echo_n "(cached) " >&6
++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
- 
--/* 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.  */
++/* end confdefs.h.  */
++
 +		$ac_includes_default
- 
--#ifdef __STDC__
--# include <limits.h>
--#else
--# include <assert.h>
--#endif
++
 +	#include <dirent.h>
- 
--#undef $ac_func
++
 +		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
--   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_int_seekdir_DIR_pdir__long_ofs_=yes
-+
++		`$as_echo "ac_cv_c_prototype_int seekdir(DIR *dir, long ofs)" | $as_tr_sh`=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_int_seekdir_DIR_pdir__long_ofs_=no
++		`$as_echo "ac_cv_c_prototype_int seekdir(DIR *dir, long ofs)" | $as_tr_sh`=no
  
--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
--  cat >>confdefs.h <<_ACEOF
--#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
--_ACEOF
++fi
 +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 :
+-ac_check_lib_ext_save_LIBS=$LIBS
+-LIBS="-lrt $LIBS  $LIBS"
++fi
++eval ac_res=\$`$as_echo "ac_cv_c_prototype_int seekdir(DIR *dir, long ofs)" | $as_tr_sh`
++	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
++$as_echo "$ac_res" >&6; }
++if test $`$as_echo "ac_cv_c_prototype_int seekdir(DIR *dir, long ofs)" | $as_tr_sh` = yes; then :
  
  
 +$as_echo "#define SEEKDIR_RETURNS_INT 1" >>confdefs.h
  
  
+-        { $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
 +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 "$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 :
@@ -43979,69 +44503,31 @@
 +	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; }
++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 $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
-+#include "$libreplacedir/repdir_getdirentries.c"
-+#define test_readdir_os2_delete main
-+#include "$libreplacedir/test/os2_delete.c"
-+_ACEOF
-+if ac_fn_c_try_run "$LINENO"; then :
-+  libreplace_cv_READDIR_GETDIRENTRIES=yes
-+else
-+  libreplace_cv_READDIR_GETDIRENTRIES=no
-+fi
-+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-+  conftest.$ac_objext conftest.beam conftest.$ac_ext
-+fi
- 
--#ifdef __STDC__
--# include <limits.h>
--#else
--# include <assert.h>
--#endif
- 
--#undef $ac_func
-+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
- 
 -/* 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
-+$as_echo "#define REPLACE_READDIR 1" >>confdefs.h
- 
+-char nanosleep ();
 -int
 -main ()
 -{
--return $ac_func ();
+-return nanosleep ();
 -  ;
 -  return 0;
 -}
--_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 conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -44063,28 +44549,43 @@
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
--  eval "$as_ac_var=yes"
+-  ac_cv_lib_ext_rt_nanosleep=yes;
+-		  ac_cv_lib_ext_rt=yes
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
++if ac_fn_c_try_run "$LINENO"; then :
++  libreplace_cv_READDIR_GETDIRENTRIES=yes
++else
++  libreplace_cv_READDIR_GETDIRENTRIES=no
++fi
++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
++  conftest.$ac_objext conftest.beam conftest.$ac_ext
++fi
  
--	eval "$as_ac_var=no"
--fi
-+$as_echo "#define REPLACE_READDIR_GETDIRENTRIES 1" >>confdefs.h
+-	ac_cv_lib_ext_rt_nanosleep=no;
+-		  ac_cv_lib_ext_rt=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
  
 -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 1" >>confdefs.h
+ 
++
++$as_echo "#define REPLACE_READDIR_GETDIRENTRIES 1" >>confdefs.h
++
 +	LIBREPLACEOBJ="${LIBREPLACEOBJ} $libreplacedir/repdir_getdirentries.o"
 +	libreplace_cv_READDIR_NEEDED=no
  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 "$as_me:$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
 +
 +#
 +# try to replace with getdents() if needed
@@ -44095,49 +44596,40 @@
 +  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 `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+-#define HAVE_NANOSLEEP 1
 +#define HAVE_GETDENTS 1
  _ACEOF
  
  fi
- done
++done
  
--
--
--
--for ac_func in syslog vsyslog timegm
--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
+-LIBS=$ac_check_lib_ext_save_LIBS
 +{ $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
--  cat >conftest.$ac_ext <<_ACEOF
--/* confdefs.h.  */
++  $as_echo_n "(cached) " >&6
++else
+ 
+-if test $ac_cv_lib_ext_rt = yes; then
+-  cat >>confdefs.h <<_ACEOF
+-#define HAVE_LIBRT 1
 -_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; }
++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 $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
++/* end 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.  */
+-		case "$LIBS" in
+-		    *-lrt*)
+-			;;
+-		    *)
+-			LIBS="-lrt $LIBS"
+-			;;
+-		esac
 +#define _LIBREPLACE_REPLACE_H
 +#error _donot_use_getdents_replacement_anymore
 +#include "$libreplacedir/repdir_getdents.c"
@@ -44153,78 +44645,31 @@
 +  conftest.$ac_objext conftest.beam conftest.$ac_ext
 +fi
  
--#ifdef __STDC__
--# include <limits.h>
--#else
--# include <assert.h>
--#endif
  
--#undef $ac_func
-+fi
+ fi
+-
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libreplace_cv_READDIR_GETDENTS" >&5
 +$as_echo "$libreplace_cv_READDIR_GETDENTS" >&6; }
-+fi
+ fi
+-done
 +if test x"$libreplace_cv_READDIR_GETDENTS" = x"yes"; then
  
--/* 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
 +$as_echo "#define REPLACE_READDIR 1" >>confdefs.h
  
--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"
--else
--  $as_echo "$as_me: failed program was:" >&5
--sed 's/^/| /' conftest.$ac_ext >&5
- 
--	eval "$as_ac_var=no"
+-for ac_func in utimensat
+-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
++
 +$as_echo "#define REPLACE_READDIR_GETDENTS 1" >>confdefs.h
 +
 +	LIBREPLACEOBJ="${LIBREPLACEOBJ} $libreplacedir/repdir_getdents.o"
 +	libreplace_cv_READDIR_NEEDED=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
++
 +{ $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
@@ -44232,17 +44677,12 @@
 +$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
+ else
+-  cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
 +	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 +$as_echo "yes" >&6; }
- 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
++fi
 +
 +###############################################
 +# test for where we get crypt() from
@@ -44250,48 +44690,34 @@
 +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_func" | $as_tr_cpp` 1
++  cat >>confdefs.h <<_ACEOF
 +#define HAVE_CRYPT_H 1
  _ACEOF
- 
- fi
--done
--
- 
-+done
- 
--for ac_func in setlocale nl_langinfo
--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 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
--  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.  */
--
++fi
+ 
 -#ifdef __STDC__
 -# include <limits.h>
 -#else
 -# include <assert.h>
 -#endif
++done
++
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt" >&5
++$as_echo_n "checking for library containing crypt... " >&6; }
++if test "${ac_cv_search_ext_crypt+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
  
 -#undef $ac_func
 +ac_func_search_ext_save_LIBS=$LIBS
@@ -44301,7 +44727,7 @@
  
  /* Override any GCC internal prototype to avoid an error.
     Use char because int might match the return type of a GCC
-@@ -41622,100 +10946,25 @@
+@@ -42019,103 +10925,25 @@
  #ifdef __cplusplus
  extern "C"
  #endif
@@ -44373,7 +44799,10 @@
 -done
 -
 -
--for ac_func in nanosleep
+-
+-
+-
+-for ac_func in mlock munlock mlockall munlockall
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
@@ -44412,7 +44841,7 @@
  
  /* Override any GCC internal prototype to avoid an error.
     Use char because int might match the return type of a GCC
-@@ -41723,1488 +10972,666 @@
+@@ -42123,315 +10951,140 @@
  #ifdef __cplusplus
  extern "C"
  #endif
@@ -44464,13 +44893,13 @@
 +if ac_fn_c_try_link "$LINENO"; then :
 +  ac_cv_search_ext_crypt="-l$ac_lib"
 +break
- fi
++fi
 +rm -f core conftest.err conftest.$ac_objext \
 +    conftest$ac_exeext conftest.$ac_ext
 +  done
 +fi
 +LIBS=$ac_func_search_ext_save_LIBS
-+fi
+ 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 :
@@ -44497,23 +44926,19 @@
 +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 :
++if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
  _ACEOF
  
- else
-+  as_fn_error "Required function not found" "$LINENO" 5
-+fi
-+done
++else
++  as_fn_error $? "Required function not found" "$LINENO" 5
+ fi
+ done
  
  
 +echo "LIBREPLACE_BROKEN_CHECKS: END"
  
--ac_check_lib_ext_save_LIBS=$LIBS
--LIBS="-lrt $LIBS  $LIBS"
--
 +for ac_func in syslog
 +do :
 +  ac_fn_c_check_func "$LINENO" "syslog" "ac_cv_func_syslog"
@@ -44522,155 +44947,27 @@
 +#define HAVE_SYSLOG 1
 +_ACEOF
  
-+else
-+  as_fn_error "Required function not found" "$LINENO" 5
-+fi
-+done
- 
- 
--        { $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
--  $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.  */
-+echo "LIBREPLACE_NETWORK_CHECKS: START"
- 
--/* 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 nanosleep ();
--int
--main ()
--{
--return nanosleep ();
--  ;
--  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_ext_rt_nanosleep=yes;
--		  ac_cv_lib_ext_rt=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
-+$as_echo "#define LIBREPLACE_NETWORK_CHECKS 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
-+LIBREPLACE_NETWORK_OBJS=""
-+LIBREPLACE_NETWORK_LIBS=""
- 
--fi
--{ $as_echo "$as_me:$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
-+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 HAVE_NANOSLEEP 1
-+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
- _ACEOF
- 
- fi
- 
--LIBS=$ac_check_lib_ext_save_LIBS
-+done
- 
--if test $ac_cv_lib_ext_rt = yes; then
-+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_LIBRT 1
-+#define HAVE_NETINET_IN_SYSTM_H 1
- _ACEOF
- 
--		case "$LIBS" in
--		    *-lrt*)
--			;;
--		    *)
--			LIBS="-lrt $LIBS"
--			;;
--		esac
--
--
- fi
- 
--fi
- done
- 
-+for ac_header in netinet/ip.h
-+do :
-+  ac_fn_c_check_header_compile "$LINENO" "netinet/ip.h" "ac_cv_header_netinet_ip_h" "
-+	#include <sys/types.h>
-+	#ifdef HAVE_NETINET_IN_H
-+	#include <netinet/in.h>
-+	#endif
-+	#ifdef HAVE_NETINET_IN_SYSTM_H
-+	#include <netinet/in_systm.h>
-+	#endif
- 
--for ac_func in utimensat
+-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
 -  $as_echo_n "(cached) " >&6
--else
+ 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.  */
 -/* 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_fn_error $? "Required function not found" "$LINENO" 5
++fi
++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
@@ -44681,9 +44978,9 @@
 -#else
 -# include <assert.h>
 -#endif
--
++echo "LIBREPLACE_NETWORK_CHECKS: START"
+ 
 -#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
@@ -44698,7 +44995,7 @@
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
 -#endif
-+done
++$as_echo "#define LIBREPLACE_NETWORK_CHECKS 1" >>confdefs.h
  
 -int
 -main ()
@@ -44707,12 +45004,14 @@
 -  ;
 -  return 0;
 -}
-+for ac_header in netinet/tcp.h netinet/in_ip.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 :
++if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
 +  cat >>confdefs.h <<_ACEOF
 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
@@ -44758,288 +45057,30 @@
 -   if test "x$as_val" = x""yes; then
 +done
 +
-+for ac_header in sys/sockio.h sys/un.h
++for ac_header in netinet/in_systm.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" "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 `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
++#define HAVE_NETINET_IN_SYSTM_H 1
  _ACEOF
  
  fi
 +
  done
  
-+for ac_header in sys/uio.h
++for ac_header in netinet/ip.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
++  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
  
-+fi
- 
-+done
- 
- 
--for ac_func in mlock munlock mlockall munlockall
--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 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
--/* 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
--
--/* 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.  */
- 
--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;}
- _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 :
-+  libreplace_cv_USABLE_NET_IF_H=yes
- else
--  $as_echo "$as_me: failed program was:" >&5
--sed 's/^/| /' conftest.$ac_ext >&5
-+  libreplace_cv_USABLE_NET_IF_H=no
- 
--	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
- 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: $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
- 
--fi
--done
-+$as_echo "#define HAVE_NET_IF_H 1" >>confdefs.h
- 
-+fi
- 
- 
- 
--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 "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 >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.  */
--
--#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
- 
-+$ac_includes_default
-+#include <sys/socket.h>
- int
- main ()
- {
--return $ac_func ();
-+socklen_t foo;
-   ;
-   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 :
-+  eval "ac_cv_type_$cv=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 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
- 
--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
--  cat >>confdefs.h <<_ACEOF
--#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-+
-+cat >>confdefs.h <<_ACEOF
-+#define $ac_tr_hdr 1
- _ACEOF
- 
- fi
--done
- 
- 
 -for ac_header in sys/mman.h
 -do
 -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
@@ -45047,18 +45088,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
-+
-+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
+-  $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; }
@@ -45067,19 +45103,13 @@
 -_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 ()
-+{
-+sa_family_t foo;
-+  ;
-+  return 0;
-+}
++"
++if test "x$ac_cv_header_netinet_ip_h" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_NETINET_IP_H 1
  _ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
@@ -45100,28 +45130,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
--
- 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 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 :
++done
  
 -# Is the header present?
 -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
@@ -45133,8 +45152,13 @@
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
 -#include <$ac_header>
-+cat >>confdefs.h <<_ACEOF
-+#define HAVE_SA_FAMILY_T 1
++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"
++if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
++  cat >>confdefs.h <<_ACEOF
++#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
 -if { (ac_try="$ac_cpp conftest.$ac_ext"
 -case "(($ac_try" in
@@ -45157,14 +45181,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; }
- 
+-
 -# So?  What about this header?
 -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
 -  yes:no: )
@@ -45201,66 +45225,71 @@
 -  $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; }
++done
  
- 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
-+
-+cat >>confdefs.h <<_ACEOF
-+#define $ac_tr_hdr 1
++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"
++if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+   cat >>confdefs.h <<_ACEOF
+ #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
+@@ -42440,1420 +11093,806 @@
  
- 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 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
+-  $as_echo_n "(cached) " >&6
+-else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
--_ACEOF
++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
 -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.  */
@@ -45274,17 +45303,28 @@
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
 -#endif
++{ $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
  
-+$ac_includes_default
-+#include <netdb.h>
- int
- main ()
- {
+-int
+-main ()
+-{
 -return $ac_func ();
-+struct addrinfo foo;
-   ;
-   return 0;
- }
+-  ;
+-  return 0;
+-}
++	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++
++		$ac_includes_default
++		#if HAVE_SYS_SOCKET_H
++		# include <sys/socket.h>
++		#endif
++		#include <net/if.h>
++		int main(void) {return 0;}
  _ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
@@ -45309,30 +45349,15 @@
 -       }; then
 -  eval "$as_ac_var=yes"
 +if ac_fn_c_try_compile "$LINENO"; then :
-+  eval "ac_cv_type_$cv=yes"
++  libreplace_cv_USABLE_NET_IF_H=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 addrinfo | sed 'y%abcdefghijklmnopqrstuvwxyz./- %ABCDEFGHIJKLMNOPQRSTUVWXYZ____%'`
-+if false; then
-+	ac_fn_c_check_type "$LINENO" "struct addrinfo" "ac_cv_type_struct_addrinfo" "$ac_includes_default"
-+if test "x$ac_cv_type_struct_addrinfo" = x""yes; then :
-+
-+cat >>confdefs.h <<_ACEOF
-+#define HAVE_STRUCT_ADDRINFO 1
-+_ACEOF
-+
++  libreplace_cv_USABLE_NET_IF_H=no
  
 -	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 \
@@ -45347,10 +45372,12 @@
 -   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: $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
 +
-+cat >>confdefs.h <<_ACEOF
-+#define $ac_tr_hdr 1
- _ACEOF
++$as_echo "#define HAVE_NET_IF_H 1" >>confdefs.h
  
  fi
 -done
@@ -45363,10 +45390,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
-+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 :
++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 eval "test \"\${ac_cv_type_$cv+set}\"" = set; then :
    $as_echo_n "(cached) " >&6
  else
 -  cat >conftest.$ac_ext <<_ACEOF
@@ -45413,7 +45440,7 @@
  main ()
  {
 -return $ac_func ();
-+struct sockaddr foo;
++socklen_t foo;
    ;
    return 0;
  }
@@ -45453,13 +45480,13 @@
 +{ $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____%'`
++  ac_tr_hdr=HAVE_`echo socklen_t | 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 :
++	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_STRUCT_SOCKADDR 1
++#define HAVE_SOCKLEN_T 1
 +_ACEOF
 +
  
@@ -45495,10 +45522,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
-+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 :
++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 eval "test \"\${ac_cv_type_$cv+set}\"" = set; then :
    $as_echo_n "(cached) " >&6
  else
 -  cat >conftest.$ac_ext <<_ACEOF
@@ -45511,7 +45538,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
@@ -45524,8 +45551,7 @@
 -#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.  */
@@ -45539,15 +45565,14 @@
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
 -#endif
+ 
++$ac_includes_default
 +#include <sys/socket.h>
-+#include <sys/types.h>
-+#include <netinet/in.h>
- 
  int
  main ()
  {
 -return $ac_func ();
-+struct sockaddr_storage foo;
++sa_family_t foo;
    ;
    return 0;
  }
@@ -45587,13 +45612,13 @@
 +{ $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____%'`
++  ac_tr_hdr=HAVE_`echo sa_family_t | 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 :
++	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_STRUCT_SOCKADDR_STORAGE 1
++#define HAVE_SA_FAMILY_T 1
 +_ACEOF
 +
  
@@ -45629,10 +45654,10 @@
 -$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 :
++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 eval "test \"\${ac_cv_type_$cv+set}\"" = set; then :
    $as_echo_n "(cached) " >&6
  else
 -  cat >conftest.$ac_ext <<_ACEOF
@@ -45656,10 +45681,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.  */
@@ -45673,15 +45697,14 @@
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
 -#endif
-+#include <sys/socket.h>
-+#include <sys/types.h>
-+#include <netinet/in.h>
  
++$ac_includes_default
++#include <netdb.h>
  int
  main ()
  {
 -return $ac_func ();
-+struct sockaddr_in6 foo;
++struct addrinfo foo;
    ;
    return 0;
  }
@@ -45713,30 +45736,15 @@
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	eval "$as_ac_var=no"
 +  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
- 
+-
 -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"'`
@@ -45747,25 +45755,33 @@
 -   if test "x$as_val" = x""yes; then
 -  cat >>confdefs.h <<_ACEOF
 -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
++ac_foo=`eval echo \\$ac_cv_type_$cv`
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_foo" >&5
++$as_echo "$ac_foo" >&6; }
++if test "$ac_foo" = yes; then
++  ac_tr_hdr=HAVE_`echo struct addrinfo | sed 'y%abcdefghijklmnopqrstuvwxyz./- %ABCDEFGHIJKLMNOPQRSTUVWXYZ____%'`
++if false; then
++	ac_fn_c_check_type "$LINENO" "struct addrinfo" "ac_cv_type_struct_addrinfo" "$ac_includes_default"
++if test "x$ac_cv_type_struct_addrinfo" = x""yes; then :
 +
 +cat >>confdefs.h <<_ACEOF
-+#define $ac_tr_hdr 1
++#define HAVE_STRUCT_ADDRINFO 1
  _ACEOF
  
++
++fi
++
  fi
 -done
--
  
++cat >>confdefs.h <<_ACEOF
++#define $ac_tr_hdr 1
++_ACEOF
+ 
 -# Find a method of generating a stack trace
++fi
  
-+if test x"$ac_cv_type_struct_sockaddr_storage" = x"yes"; then
-+ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_family" "ac_cv_member_struct_sockaddr_storage_ss_family" "
-+#include <sys/socket.h>
-+#include <sys/types.h>
-+#include <netinet/in.h>
  
-+"
-+if test "x$ac_cv_member_struct_sockaddr_storage_ss_family" = x""yes; then :
  
 -for ac_header in execinfo.h libexc.h libunwind.h
 -do
@@ -45774,13 +45790,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_n "(cached) " >&6
++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 eval "test \"\${ac_cv_type_$cv+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; }
@@ -45789,10 +45809,20 @@
 -_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>
--_ACEOF
++#include <sys/socket.h>
++int
++main ()
++{
++struct sockaddr foo;
++  ;
++  return 0;
++}
+ _ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -45812,17 +45842,28 @@
 -	 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
-+$as_echo "#define HAVE_SS_FAMILY 1" >>confdefs.h
- 
+-
 -	ac_header_compiler=no
++  eval "ac_cv_type_$cv=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
++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
@@ -45834,7 +45875,9 @@
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
 -#include <$ac_header>
--_ACEOF
++cat >>confdefs.h <<_ACEOF
++#define HAVE_STRUCT_SOCKADDR 1
+ _ACEOF
 -if { (ac_try="$ac_cpp conftest.$ac_ext"
 -case "(($ac_try" in
 -  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -45856,21 +45899,13 @@
 -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
-+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>
- 
+-
 -  ac_header_preproc=no
 -fi
-+"
-+if test "x$ac_cv_member_struct_sockaddr_storage___ss_family" = 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___SS_FAMILY 1" >>confdefs.h
  
 -# So?  What about this header?
 -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
@@ -45920,19 +45955,24 @@
 -   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 $ac_tr_hdr 1
+ _ACEOF
+ 
  fi
  
 -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 "$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 :
++
++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 eval "test \"\${ac_cv_type_$cv+set}\"" = set; then :
    $as_echo_n "(cached) " >&6
  else
 -  ac_func_search_save_LIBS=$LIBS
@@ -45941,8 +45981,7 @@
 -_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.  */
  
 -/* Override any GCC internal prototype to avoid an error.
@@ -45952,17 +45991,17 @@
 -extern "C"
 -#endif
 -char backtrace_symbols ();
++$ac_includes_default
++
++#include <sys/socket.h>
 +#include <sys/types.h>
-+#include <sys/socket.h>
 +#include <netinet/in.h>
 +
  int
  main ()
  {
 -return backtrace_symbols ();
-+
-+struct sockaddr_in sock; sock.sin_len = sizeof(sock);
-+
++struct sockaddr_storage foo;
    ;
    return 0;
  }
@@ -45997,17 +46036,29 @@
 -       }; then
 -  ac_cv_search_backtrace_symbols=$ac_res
 +if ac_fn_c_try_compile "$LINENO"; then :
-+
-+		libreplace_cv_HAVE_SOCK_SIN_LEN=yes
-+
++  eval "ac_cv_type_$cv=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_storage | sed 'y%abcdefghijklmnopqrstuvwxyz./- %ABCDEFGHIJKLMNOPQRSTUVWXYZ____%'`
++if false; then
++	ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" "$ac_includes_default"
++if test "x$ac_cv_type_struct_sockaddr_storage" = x""yes; then :
++
++cat >>confdefs.h <<_ACEOF
++#define HAVE_STRUCT_SOCKADDR_STORAGE 1
++_ACEOF
  
-+		libreplace_cv_HAVE_SOCK_SIN_LEN=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 \
@@ -46029,14 +46080,13 @@
 -ac_res=$ac_cv_search_backtrace_symbols
 -if test "$ac_res" != no; then
 -  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
-+{ $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
++
++cat >>confdefs.h <<_ACEOF
++#define $ac_tr_hdr 1
++_ACEOF
  
--fi
-+$as_echo "#define HAVE_SOCK_SIN_LEN 1" >>confdefs.h
+ fi
  
-+fi
  
 -for ac_func in backtrace_symbols
 -do
@@ -46044,11 +46094,11 @@
 -{ $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 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 :
++
++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 eval "test \"\${ac_cv_type_$cv+set}\"" = set; then :
    $as_echo_n "(cached) " >&6
  else
 -  cat >conftest.$ac_ext <<_ACEOF
@@ -46056,7 +46106,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
@@ -46073,8 +46124,7 @@
 -#endif
  
 -#undef $ac_func
-+	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h.  */
++$ac_includes_default
  
 -/* Override any GCC internal prototype to avoid an error.
 -   Use char because int might match the return type of a GCC
@@ -46089,20 +46139,15 @@
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
 -#endif
++#include <sys/socket.h>
 +#include <sys/types.h>
-+#include <stdlib.h>
-+#include <stddef.h>
-+#include <sys/socket.h>
-+#include <sys/un.h>
++#include <netinet/in.h>
  
  int
  main ()
  {
 -return $ac_func ();
-+
-+struct sockaddr_un sunaddr;
-+sunaddr.sun_family = AF_UNIX;
-+
++struct sockaddr_in6 foo;
    ;
    return 0;
  }
@@ -46130,16 +46175,30 @@
 -       }; then
 -  eval "$as_ac_var=yes"
 +if ac_fn_c_try_compile "$LINENO"; then :
-+
-+		libreplace_cv_HAVE_UNIXSOCKET=yes
-+
++  eval "ac_cv_type_$cv=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
-+		libreplace_cv_HAVE_UNIXSOCKET=no
+ fi
  
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
@@ -46154,22 +46213,53 @@
 -   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
++
++cat >>confdefs.h <<_ACEOF
++#define $ac_tr_hdr 1
+ _ACEOF
  
  fi
 -done
-+{ $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
  
 -{ $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
--  $as_echo_n "(cached) " >&6
--else
++if test x"$ac_cv_type_struct_sockaddr_storage" = x"yes"; then
++ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_family" "ac_cv_member_struct_sockaddr_storage_ss_family" "
++#include <sys/socket.h>
++#include <sys/types.h>
++#include <netinet/in.h>
++
++"
++if test "x$ac_cv_member_struct_sockaddr_storage_ss_family" = x""yes; then :
++
++$as_echo "#define HAVE_SS_FAMILY 1" >>confdefs.h
++
++fi
++
++
++if test x"$ac_cv_member_struct_sockaddr_storage_ss_family" != x"yes"; then
++ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "__ss_family" "ac_cv_member_struct_sockaddr_storage___ss_family" "
++#include <sys/socket.h>
++#include <sys/types.h>
++#include <netinet/in.h>
++
++"
++if test "x$ac_cv_member_struct_sockaddr_storage___ss_family" = x""yes; then :
++
++$as_echo "#define HAVE___SS_FAMILY 1" >>confdefs.h
++
++fi
++
++fi
++fi
++
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sin_len in sock" >&5
++$as_echo_n "checking for sin_len in sock... " >&6; }
++if test "${libreplace_cv_HAVE_SOCK_SIN_LEN+set}" = set; then :
+   $as_echo_n "(cached) " >&6
+ else
 -  ac_check_lib_save_LIBS=$LIBS
 -LIBS="-lexc  $LIBS"
 -cat >conftest.$ac_ext <<_ACEOF
@@ -46177,8 +46267,9 @@
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
-+fi
++
++	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
@@ -46187,19 +46278,20 @@
 -extern "C"
 -#endif
 -char trace_back_stack ();
--int
--main ()
--{
++#include <sys/types.h>
++#include <sys/socket.h>
++#include <netinet/in.h>
++
+ int
+ main ()
+ {
 -return trace_back_stack ();
--  ;
--  return 0;
--}
-+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
++
++struct sockaddr_in sock; sock.sin_len = sizeof(sock);
++
+   ;
+   return 0;
+ }
  _ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
@@ -46223,35 +46315,42 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  ac_cv_lib_exc_trace_back_stack=yes
--else
++if ac_fn_c_try_compile "$LINENO"; then :
++
++		libreplace_cv_HAVE_SOCK_SIN_LEN=yes
++
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
  
 -	ac_cv_lib_exc_trace_back_stack=no
- fi
-+done
+-fi
++		libreplace_cv_HAVE_SOCK_SIN_LEN=no
  
 -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
+ 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
 -  cat >>confdefs.h <<_ACEOF
 -#define HAVE_LIBEXC 1
 -_ACEOF
-+if test x"$ac_cv_func_connect" = x"no"; then
- 
+-
 -  LIBS="-lexc $LIBS"
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  
--fi
-+ac_check_lib_ext_save_LIBS=$LIBS
-+LIBS="-lnsl_s $LIBREPLACE_NETWORK_LIBS  $LIBS"
+ fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libreplace_cv_HAVE_SOCK_SIN_LEN" >&5
++$as_echo "$libreplace_cv_HAVE_SOCK_SIN_LEN" >&6; }
++if test x"$libreplace_cv_HAVE_SOCK_SIN_LEN" = x"yes"; then
  
++$as_echo "#define HAVE_SOCK_SIN_LEN 1" >>confdefs.h
  
 -# check for sysctlbyname for BSD systems
++fi
  
 -for ac_func in sysctlbyname
 -do
@@ -46259,9 +46358,11 @@
 -{ $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 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 :
++############################################
++# check for unix domain sockets
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for unix domain sockets" >&5
++$as_echo_n "checking for unix domain sockets... " >&6; }
++if test "${libreplace_cv_HAVE_UNIXSOCKET+set}" = set; then :
    $as_echo_n "(cached) " >&6
  else
 -  cat >conftest.$ac_ext <<_ACEOF
@@ -46269,8 +46370,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
@@ -46285,15 +46385,17 @@
 -#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
-@@ -43212,553 +11639,196 @@
- #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
@@ -46301,13 +46403,20 @@
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
 -#endif
--
-+char connect ();
++#include <sys/types.h>
++#include <stdlib.h>
++#include <stddef.h>
++#include <sys/socket.h>
++#include <sys/un.h>
+ 
  int
  main ()
  {
 -return $ac_func ();
-+return connect ();
++
++struct sockaddr_un sunaddr;
++sunaddr.sun_family = AF_UNIX;
++
    ;
    return 0;
  }
@@ -46334,19 +46443,17 @@
 -	 $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
++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
--
+ 
 -	eval "$as_ac_var=no"
-+  ac_cv_lib_ext_nsl_s_connect=no;
-+		  ac_cv_lib_ext_nsl_s=no
- fi
-+rm -f core conftest.err conftest.$ac_objext \
-+    conftest$ac_exeext conftest.$ac_ext
+-fi
++		libreplace_cv_HAVE_UNIXSOCKET=no
  
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
@@ -46359,20 +46466,22 @@
 -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_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
+-  cat >>confdefs.h <<_ACEOF
 -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 -_ACEOF
--
--fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ 
+ fi
 -done
 -
--
++{ $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
+ 
 -#############################
 -# check if building with gpfs
--
++$as_echo "#define HAVE_UNIXSOCKET 1" >>confdefs.h
+ 
 -for ac_header in gpfs_gpl.h
 -do
 -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
@@ -46381,7 +46490,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
@@ -46398,7 +46507,14 @@
 -/* end confdefs.h.  */
 -$ac_includes_default
 -#include <$ac_header>
--_ACEOF
++
++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
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -46421,14 +46537,16 @@
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
+ 
 -	ac_header_compiler=no
--fi
--
+ 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; }
--
++if test x"$ac_cv_func_connect" = x"no"; then
+ 
 -# Is the header present?
 -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
 -$as_echo_n "checking $ac_header presence... " >&6; }
@@ -46439,8 +46557,7 @@
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
 -#include <$ac_header>
-+#define HAVE_CONNECT 1
- _ACEOF
+-_ACEOF
 -if { (ac_try="$ac_cpp conftest.$ac_ext"
 -case "(($ac_try" in
 -  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -46462,10 +46579,12 @@
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
+ 
 -  ac_header_preproc=no
 -fi
--
++ac_check_lib_ext_save_LIBS=$LIBS
++LIBS="-lnsl_s $LIBREPLACE_NETWORK_LIBS  $LIBS"
+ 
 -rm -f conftest.err conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
 -$as_echo "$ac_header_preproc" >&6; }
@@ -46503,26 +46622,67 @@
 -{ $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 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
 -  eval "$as_ac_Header=\$ac_header_preproc"
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++
++/* Override any GCC internal prototype to avoid an error.
++   Use char because int might match the return type of a GCC
++   builtin and then its argument prototype would still apply.  */
++#ifdef __cplusplus
++extern "C"
++#endif
++char connect ();
++int
++main ()
++{
++return connect ();
++  ;
++  return 0;
++}
++_ACEOF
++if ac_fn_c_try_link "$LINENO"; then :
++  ac_cv_lib_ext_nsl_s_connect=yes;
++		  ac_cv_lib_ext_nsl_s=yes
++else
++  ac_cv_lib_ext_nsl_s_connect=no;
++		  ac_cv_lib_ext_nsl_s=no
  fi
 -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; }
-+LIBS=$ac_check_lib_ext_save_LIBS
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext 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
-+if test $ac_cv_lib_ext_nsl_s = 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_header" | $as_tr_cpp` 1
-+#define HAVE_LIBNSL_S 1
++#define HAVE_CONNECT 1
  _ACEOF
  
+ fi
++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
+ 
+-if test x"$ac_cv_header_gpfs_gpl_h" = x"yes"; then
 +		case "$LIBREPLACE_NETWORK_LIBS" in
 +		    *-lnsl_s*)
 +			;;
@@ -46530,22 +46690,13 @@
 +			LIBREPLACE_NETWORK_LIBS="-lnsl_s $LIBREPLACE_NETWORK_LIBS"
 +			;;
 +		esac
-+
-+
- fi
  
--done
- 
--if test x"$ac_cv_header_gpfs_gpl_h" = x"yes"; then
-+ac_check_lib_ext_save_LIBS=$LIBS
-+LIBS="-lnsl $LIBREPLACE_NETWORK_LIBS  $LIBS"
- 
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_GPFS 1
 -_ACEOF
  
 -    default_shared_modules="$default_shared_modules vfs_gpfs"
--fi
+ fi
  
 -#############################################
 -# check if building on Isilon OneFS
@@ -46557,6 +46708,12 @@
 -_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 connect in -lnsl" >&5
 +$as_echo_n "checking for connect in -lnsl... " >&6; }
 +if test "${ac_cv_lib_ext_nsl_connect+set}" = set; then :
@@ -46751,18 +46908,6 @@
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
--
--	{ $as_echo "$as_me:$LINENO: result: yes" >&5
--$as_echo "yes" >&6; }
--
--cat >>confdefs.h <<\_ACEOF
--#define HAVE_LIBUNWIND 1
--_ACEOF
--
--
--	# 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_connect=yes;
 +		  ac_cv_lib_ext_socket=yes
@@ -46773,6 +46918,38 @@
 +rm -f core conftest.err conftest.$ac_objext \
 +    conftest$ac_exeext conftest.$ac_ext
  
+-	{ $as_echo "$as_me:$LINENO: result: yes" >&5
+-$as_echo "yes" >&6; }
++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
+ 
+-cat >>confdefs.h <<\_ACEOF
+-#define HAVE_LIBUNWIND 1
++fi
++LIBS=$ac_check_lib_ext_save_LIBS
++
++if test $ac_cv_lib_ext_socket = yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_LIBSOCKET 1
+ _ACEOF
+ 
++		case "$LIBREPLACE_NETWORK_LIBS" in
++		    *-lsocket*)
++			;;
++		    *)
++			LIBREPLACE_NETWORK_LIBS="-lsocket $LIBREPLACE_NETWORK_LIBS"
++			;;
++		esac
+ 
+-	# If we have libunwind, test whether we also have libunwind-ptrace
+-	# which would let us unwind arbitrary processes.
+-	save_LIBS=$LIBS
+ 
 -for ac_header in libunwind-ptrace.h
 -do
 -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
@@ -46786,7 +46963,18 @@
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
 -$as_echo "$ac_res" >&6; }
--else
++
++
++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
 -  # Is the header compilable?
 -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
 -$as_echo_n "checking $ac_header usability... " >&6; }
@@ -46795,14 +46983,25 @@
 -_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
 -#include <$ac_header>
-+{ $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
++
++/* Override any GCC internal prototype to avoid an error.
++   Use char because int might match the return type of a GCC
++   builtin and then its argument prototype would still apply.  */
++#ifdef __cplusplus
++extern "C"
++#endif
++char connect ();
++int
++main ()
++{
++return connect ();
++  ;
++  return 0;
++}
  _ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
@@ -46823,18 +47022,33 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_header_compiler=yes
--else
++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
++  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
  
 -	ac_header_compiler=no
  fi
-+LIBS=$ac_check_lib_ext_save_LIBS
++{ $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 -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
+ 
 -# Is the header present?
 -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
 -$as_echo_n "checking $ac_header presence... " >&6; }
@@ -46845,9 +47059,9 @@
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
 -#include <$ac_header>
-+if test $ac_cv_lib_ext_socket = yes; then :
++if test $ac_cv_lib_ext_inet = yes; then :
 +  cat >>confdefs.h <<_ACEOF
-+#define HAVE_LIBSOCKET 1
++#define HAVE_LIBINET 1
  _ACEOF
 -if { (ac_try="$ac_cpp conftest.$ac_ext"
 -case "(($ac_try" in
@@ -46874,10 +47088,10 @@
 -  ac_header_preproc=no
 -fi
 +		case "$LIBREPLACE_NETWORK_LIBS" in
-+		    *-lsocket*)
++		    *-linet*)
 +			;;
 +		    *)
-+			LIBREPLACE_NETWORK_LIBS="-lsocket $LIBREPLACE_NETWORK_LIBS"
++			LIBREPLACE_NETWORK_LIBS="-linet $LIBREPLACE_NETWORK_LIBS"
 +			;;
 +		esac
  
@@ -46926,28 +47140,47 @@
 -		 $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_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 "#define HAVE_CONNECT 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
++
++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 `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
--_ACEOF
++#define HAVE_GETHOSTBYNAME 1
+ _ACEOF
  
--fi
-+ac_check_lib_ext_save_LIBS=$LIBS
-+LIBS="-linet $LIBREPLACE_NETWORK_LIBS  $LIBS"
+ 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_gethostbyname" = x"no"; 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 :
++
++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
 -  ac_check_lib_save_LIBS=$LIBS
@@ -46961,17 +47194,17 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -43767,349 +11837,220 @@
+@@ -43862,349 +11901,219 @@
  #ifdef __cplusplus
  extern "C"
  #endif
 -char _UPT_create ();
-+char connect ();
++char gethostbyname ();
  int
  main ()
  {
 -return _UPT_create ();
-+return connect ();
++return gethostbyname ();
    ;
    return 0;
  }
@@ -46999,15 +47232,15 @@
 -       }; then
 -  ac_cv_lib_unwind_ptrace__UPT_create=yes
 +if ac_fn_c_try_link "$LINENO"; then :
-+  ac_cv_lib_ext_inet_connect=yes;
-+		  ac_cv_lib_ext_inet=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
 -
 -	ac_cv_lib_unwind_ptrace__UPT_create=no
-+  ac_cv_lib_ext_inet_connect=no;
-+		  ac_cv_lib_ext_inet=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
@@ -47020,74 +47253,55 @@
 -{ $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_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
- 
+-
 -		LIBUNWIND_PTRACE="-lunwind-ptrace";
-+fi
-+LIBS=$ac_check_lib_ext_save_LIBS
- 
+-
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_LIBUNWIND_PTRACE 1
-+if test $ac_cv_lib_ext_inet = yes; then :
++{ $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_LIBINET 1
++#define HAVE_GETHOSTBYNAME 1
  _ACEOF
  
-+		case "$LIBREPLACE_NETWORK_LIBS" in
-+		    *-linet*)
-+			;;
-+		    *)
-+			LIBREPLACE_NETWORK_LIBS="-linet $LIBREPLACE_NETWORK_LIBS"
-+			;;
-+		esac
-+
- 
+-
 -else
 -   LIBUNWIND_PTRACE=""
  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
++LIBS=$ac_check_lib_ext_save_LIBS
  
-+$as_echo "#define HAVE_CONNECT 1" >>confdefs.h
++if test $ac_cv_lib_ext_nsl_s = yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_LIBNSL_S 1
++_ACEOF
  
 -	LIBS=$save_LIBS
-+	fi
-+fi
++		case "$LIBREPLACE_NETWORK_LIBS" in
++		    *-lnsl_s*)
++			;;
++		    *)
++			LIBREPLACE_NETWORK_LIBS="-lnsl_s $LIBREPLACE_NETWORK_LIBS"
++			;;
++		esac
  
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+for ac_func in gethostbyname
-+do :
-+  ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
-+if test "x$ac_cv_func_gethostbyname" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define HAVE_GETHOSTBYNAME 1
-+_ACEOF
  
 +fi
-+done
  
 -	{ $as_echo "$as_me:$LINENO: result: no" >&5
 -$as_echo "no" >&6; }
 -	LIBS=$save_LIBS
-+if test x"$ac_cv_func_gethostbyname" = x"no"; then
  
 -fi
++ac_check_lib_ext_save_LIBS=$LIBS
++LIBS="-lnsl $LIBREPLACE_NETWORK_LIBS  $LIBS"
  
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
-+ac_check_lib_ext_save_LIBS=$LIBS
-+LIBS="-lnsl_s $LIBREPLACE_NETWORK_LIBS  $LIBS"
  
 -# To use libunwind-ptrace, we also need to make some ptrace system calls.
 -if test x"$LIBUNWIND_PTRACE" != x"" ; then
@@ -47099,10 +47313,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
-+
-+        { $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 "$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
 -fi
 -ac_res=`eval 'as_val=${'$as_ac_Header'}
@@ -47158,22 +47371,22 @@
 -       } && test -s conftest.$ac_objext; then
 -  ac_header_compiler=yes
 +if ac_fn_c_try_link "$LINENO"; then :
-+  ac_cv_lib_ext_nsl_s_gethostbyname=yes;
-+		  ac_cv_lib_ext_nsl_s=yes
++  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
-+  ac_cv_lib_ext_nsl_s_gethostbyname=no;
-+		  ac_cv_lib_ext_nsl_s=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
  
 -	ac_header_compiler=no
  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 :
++{ $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
@@ -47194,9 +47407,9 @@
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
 -#include <$ac_header>
-+if test $ac_cv_lib_ext_nsl_s = yes; then :
++if test $ac_cv_lib_ext_nsl = yes; then :
 +  cat >>confdefs.h <<_ACEOF
-+#define HAVE_LIBNSL_S 1
++#define HAVE_LIBNSL 1
  _ACEOF
 -if { (ac_try="$ac_cpp conftest.$ac_ext"
 -case "(($ac_try" in
@@ -47223,10 +47436,10 @@
 -  ac_header_preproc=no
 -fi
 +		case "$LIBREPLACE_NETWORK_LIBS" in
-+		    *-lnsl_s*)
++		    *-lnsl*)
 +			;;
 +		    *)
-+			LIBREPLACE_NETWORK_LIBS="-lnsl_s $LIBREPLACE_NETWORK_LIBS"
++			LIBREPLACE_NETWORK_LIBS="-lnsl $LIBREPLACE_NETWORK_LIBS"
 +			;;
 +		esac
  
@@ -47286,7 +47499,7 @@
  
 -fi
 +ac_check_lib_ext_save_LIBS=$LIBS
-+LIBS="-lnsl $LIBREPLACE_NETWORK_LIBS  $LIBS"
++LIBS="-lsocket $LIBREPLACE_NETWORK_LIBS  $LIBS"
  
 -done
  
@@ -47298,9 +47511,9 @@
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
 +
-+        { $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 "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lsocket" >&5
++$as_echo_n "checking for gethostbyname in -lsocket... " >&6; }
++if test "${ac_cv_lib_ext_socket_gethostbyname+set}" = set; then :
 +  $as_echo_n "(cached) " >&6
 +else
 +  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -47357,188 +47570,41 @@
 -
 -		{ $as_echo "$as_me:$LINENO: result: yes" >&5
 -$as_echo "yes" >&6; }
--
--cat >>confdefs.h <<\_ACEOF
--#define HAVE_LINUX_PTRACE 1
--_ACEOF
--
--
 +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
--
--
--		{ $as_echo "$as_me:$LINENO: result: no" >&5
--$as_echo "no" >&6; }
--		LIBUNWIND_PTRACE=""
--
-+  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
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ext_nsl_gethostbyname" >&5
-+$as_echo "$ac_cv_lib_ext_nsl_gethostbyname" >&6; }
-+    if test $ac_cv_lib_ext_nsl_gethostbyname = yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define HAVE_GETHOSTBYNAME 1
-+_ACEOF
- 
-+fi
-+LIBS=$ac_check_lib_ext_save_LIBS
- 
-+if test $ac_cv_lib_ext_nsl = yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define HAVE_LIBNSL 1
-+_ACEOF
- 
-+		case "$LIBREPLACE_NETWORK_LIBS" in
-+		    *-lnsl*)
-+			;;
-+		    *)
-+			LIBREPLACE_NETWORK_LIBS="-lnsl $LIBREPLACE_NETWORK_LIBS"
-+			;;
-+		esac
- 
- 
-+fi
- 
- 
-+ac_check_lib_ext_save_LIBS=$LIBS
-+LIBS="-lsocket $LIBREPLACE_NETWORK_LIBS  $LIBS"
- 
- 
- 
--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 "$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.  */
--_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.  */
--
--#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
-@@ -44117,106 +12058,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
--    something starting with __ and the normal name is an alias.  */
--#if defined __stub_$ac_func || defined __stub___$ac_func
--choke me
--#endif
--
-+char gethostbyname ();
- int
- main ()
- {
--return $ac_func ();
-+return gethostbyname ();
-   ;
-   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 :
 +  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
++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
-+
+ 
+-cat >>confdefs.h <<\_ACEOF
+-#define HAVE_LINUX_PTRACE 1
 +fi
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ext_socket_gethostbyname" >&5
 +$as_echo "$ac_cv_lib_ext_socket_gethostbyname" >&6; }
 +    if test $ac_cv_lib_ext_socket_gethostbyname = yes; then :
 +  cat >>confdefs.h <<_ACEOF
 +#define HAVE_GETHOSTBYNAME 1
-+_ACEOF
+ _ACEOF
  
--	eval "$as_ac_var=no"
- fi
++fi
 +LIBS=$ac_check_lib_ext_save_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
--$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
+-else
+-  $as_echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
 +if test $ac_cv_lib_ext_socket = yes; then :
-   cat >>confdefs.h <<_ACEOF
--#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
++  cat >>confdefs.h <<_ACEOF
 +#define HAVE_LIBSOCKET 1
- _ACEOF
++_ACEOF
  
+-		{ $as_echo "$as_me:$LINENO: result: no" >&5
+-$as_echo "no" >&6; }
+-		LIBUNWIND_PTRACE=""
 +		case "$LIBREPLACE_NETWORK_LIBS" in
 +		    *-lsocket*)
 +			;;
@@ -47546,10 +47612,13 @@
 +			LIBREPLACE_NETWORK_LIBS="-lsocket $LIBREPLACE_NETWORK_LIBS"
 +			;;
 +		esac
-+
-+
+ 
+-fi
+ 
+-rm -rf conftest.dSYM
+-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+-      conftest$ac_exeext conftest.$ac_ext
  fi
--done
 +			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"
@@ -47577,14 +47646,14 @@
 +ac_check_lib_ext_save_LIBS=$LIBS
 +LIBS="-lipv6 $LIBREPLACE_NETWORK_LIBS  $LIBS"
  
--for ac_func in __dup __dup2 __opendir __readdir __seekdir __telldir __closedir
+ 
+ 
+-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 "$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 :
@@ -47616,7 +47685,7 @@
  
  /* Override any GCC internal prototype to avoid an error.
     Use char because int might match the return type of a GCC
-@@ -44224,3065 +12146,2377 @@
+@@ -44212,3172 +12121,2415 @@
  #ifdef __cplusplus
  extern "C"
  #endif
@@ -47666,21 +47735,14 @@
  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
+ fi
 +rm -f core conftest.err conftest.$ac_objext \
 +    conftest$ac_exeext conftest.$ac_ext
  
--	eval "$as_ac_var=no"
- fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ext_ipv6_if_nametoindex" >&5
-+$as_echo "$ac_cv_lib_ext_ipv6_if_nametoindex" >&6; }
-+    if test $ac_cv_lib_ext_ipv6_if_nametoindex = yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define HAVE_IF_NAMETOINDEX 1
-+_ACEOF
- 
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
@@ -47692,13 +47754,22 @@
 -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_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 HAVE_IF_NAMETOINDEX 1
+ _ACEOF
+ 
+ fi
+-done
 +LIBS=$ac_check_lib_ext_save_LIBS
 +
 +if test $ac_cv_lib_ext_ipv6 = yes; then :
-   cat >>confdefs.h <<_ACEOF
--#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
++  cat >>confdefs.h <<_ACEOF
 +#define HAVE_LIBIPV6 1
- _ACEOF
++_ACEOF
  
 +		case "$LIBREPLACE_NETWORK_LIBS" in
 +		    *-lipv6*)
@@ -47707,15 +47778,14 @@
 +			LIBREPLACE_NETWORK_LIBS="-lipv6 $LIBREPLACE_NETWORK_LIBS"
 +			;;
 +		esac
-+
-+
- fi
--done
+ 
+ 
++fi
 +			if test x"$ac_cv_lib_ext_ipv6_if_nametoindex" = x"yes"
 +	then
  
 +$as_echo "#define HAVE_IF_NAMETOINDEX 1" >>confdefs.h
-+
+ 
 +	fi
 +fi
  
@@ -47725,52 +47795,58 @@
 +libreplace_SAVE_CPPFLAGS="$CPPFLAGS"
 +CPPFLAGS="$CPPFLAGS -I$libreplacedir"
  
--for ac_func in __getcwd _getcwd
++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
+ 
+-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
+ else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
-+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
+-_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
++  LIBREPLACE_NETWORK_OBJS="${LIBREPLACE_NETWORK_OBJS} $libreplacedir/socketpair.o"
++fi
++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.  */
-+else
-+  LIBREPLACE_NETWORK_OBJS="${LIBREPLACE_NETWORK_OBJS} $libreplacedir/socketpair.o"
-+fi
-+done
  
 -#ifdef __STDC__
 -# include <limits.h>
 -#else
 -# include <assert.h>
 -#endif
- 
--#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
  
+-#undef $ac_func
++if test "$cross_compiling" = yes; then :
++  libreplace_cv_REPLACE_INET_NTOA=cross
++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.  */
@@ -47783,13 +47859,14 @@
 -    something starting with __ and the normal name is an alias.  */
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
--#endif
-+if test "$cross_compiling" = yes; then :
-+  libreplace_cv_REPLACE_INET_NTOA=cross
-+else
-+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h.  */
- 
++#include <stdio.h>
++#include <unistd.h>
++#include <sys/types.h>
++#include <netinet/in.h>
++#ifdef HAVE_ARPA_INET_H
++#include <arpa/inet.h>
+ #endif
+-
 -int
 -main ()
 -{
@@ -47797,13 +47874,6 @@
 -  ;
 -  return 0;
 -}
-+#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); }
@@ -47876,9 +47946,36 @@
  
 +$as_echo "#define REPLACE_INET_NTOA 1" >>confdefs.h
  
+-for ac_func in __getcwd _getcwd
+-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.  */
 +    LIBREPLACE_NETWORK_OBJS="${LIBREPLACE_NETWORK_OBJS} $libreplacedir/inet_ntoa.o"
 +fi
-+
+ 
+-#ifdef __STDC__
+-# include <limits.h>
+-#else
+-# include <assert.h>
+-#endif
 +for ac_func in inet_aton
 +do :
 +  ac_fn_c_check_func "$LINENO" "inet_aton" "ac_cv_func_inet_aton"
@@ -47886,59 +47983,128 @@
 +  cat >>confdefs.h <<_ACEOF
 +#define HAVE_INET_ATON 1
 +_ACEOF
-+
+ 
+-#undef $ac_func
 +else
 +  LIBREPLACE_NETWORK_OBJS="${LIBREPLACE_NETWORK_OBJS} $libreplacedir/inet_aton.o"
 +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.  */
+-#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
+ 
+-int
+-main ()
+-{
+-return $ac_func ();
+-  ;
+-  return 0;
+-}
 +for ac_func in inet_ntop
 +do :
 +  ac_fn_c_check_func "$LINENO" "inet_ntop" "ac_cv_func_inet_ntop"
 +if test "x$ac_cv_func_inet_ntop" = x""yes; then :
 +  cat >>confdefs.h <<_ACEOF
 +#define HAVE_INET_NTOP 1
-+_ACEOF
+ _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"
++else
++  LIBREPLACE_NETWORK_OBJS="${LIBREPLACE_NETWORK_OBJS} $libreplacedir/inet_ntop.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
+-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 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 `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
++#define HAVE_INET_PTON 1
+ _ACEOF
+ 
++else
++  LIBREPLACE_NETWORK_OBJS="${LIBREPLACE_NETWORK_OBJS} $libreplacedir/inet_pton.o"
+ fi
+ done
+ 
+ 
+-
+-
 -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
--  $as_echo_n "(cached) " >&6
++{ $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 >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
-+  LIBREPLACE_NETWORK_OBJS="${LIBREPLACE_NETWORK_OBJS} $libreplacedir/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
+-_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
-+  LIBREPLACE_NETWORK_OBJS="${LIBREPLACE_NETWORK_OBJS} $libreplacedir/inet_pton.o"
-+fi
-+done
- 
+-
 -#ifdef __STDC__
 -# include <limits.h>
 -#else
@@ -47946,11 +48112,8 @@
 -#endif
  
 -#undef $ac_func
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
-+$as_echo_n "checking for getaddrinfo... " >&6; }
-+if test "${libreplace_cv_HAVE_GETADDRINFO+set}" = set; then :
-+  $as_echo_n "(cached) " >&6
-+else
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
  
 -/* Override any GCC internal prototype to avoid an error.
 -   Use char because int might match the return type of a GCC
@@ -47964,15 +48127,12 @@
 -    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>
 +#if STDC_HEADERS
 +#include <stdlib.h>
 +#include <stddef.h>
-+#endif
+ #endif
+-
 +#include <sys/socket.h>
 +#include <netdb.h>
  int
@@ -48189,13 +48349,25 @@
 -
 -	eval "$as_ac_var=no"
 +  libreplace_cv_HAVE_GETIFADDRS=no
++fi
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
  fi
--
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libreplace_cv_HAVE_GETIFADDRS" >&5
++$as_echo "$libreplace_cv_HAVE_GETIFADDRS" >&6; }
++if test x"$libreplace_cv_HAVE_GETIFADDRS" = x"yes"; then
++
++$as_echo "#define HAVE_GETIFADDRS 1" >>confdefs.h
++
++
++$as_echo "#define HAVE_FREEIFADDRS 1" >>confdefs.h
++
++
++$as_echo "#define HAVE_STRUCT_IFADDRS 1" >>confdefs.h
+ 
 -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"'`
@@ -48206,23 +48378,7 @@
 -   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: $libreplace_cv_HAVE_GETIFADDRS" >&5
-+$as_echo "$libreplace_cv_HAVE_GETIFADDRS" >&6; }
-+if test x"$libreplace_cv_HAVE_GETIFADDRS" = x"yes"; then
- 
--fi
--done
-+$as_echo "#define HAVE_GETIFADDRS 1" >>confdefs.h
- 
- 
-+$as_echo "#define HAVE_FREEIFADDRS 1" >>confdefs.h
- 
- 
-+$as_echo "#define HAVE_STRUCT_IFADDRS 1" >>confdefs.h
- 
-+fi
- 
++
 +##################
 +# look for a method of finding the list of network interfaces
 +iface=no;
@@ -48231,13 +48387,13 @@
 +if test "${libreplace_cv_HAVE_IFACE_GETIFADDRS+set}" = set; then :
 +  $as_echo_n "(cached) " >&6
 +else
- 
++
 +if test "$cross_compiling" = yes; then :
 +  libreplace_cv_HAVE_IFACE_GETIFADDRS=cross
 +else
 +  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 +/* end confdefs.h.  */
- 
++
 +#define HAVE_IFACE_GETIFADDRS 1
 +#define NO_CONFIG_H 1
 +#define AUTOCONF_TEST 1
@@ -48248,7 +48404,7 @@
 +#include "$libreplacedir/getifaddrs.c"
 +#define getifaddrs_test main
 +#include "$libreplacedir/test/getifaddrs.c"
-+_ACEOF
+ _ACEOF
 +if ac_fn_c_try_run "$LINENO"; then :
 +  libreplace_cv_HAVE_IFACE_GETIFADDRS=yes
 +else
@@ -48258,28 +48414,74 @@
 +  conftest.$ac_objext conftest.beam conftest.$ac_ext
 +fi
  
--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
-+fi
+ 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} $libreplacedir/getifaddrs.o"
 +fi
-+
-+
+ 
+ 
 +if test $iface = no; then
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for iface AIX" >&5
 +$as_echo_n "checking for iface AIX... " >&6; }
 +if test "${libreplace_cv_HAVE_IFACE_AIX+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
+ 
++if test "$cross_compiling" = yes; then :
++  libreplace_cv_HAVE_IFACE_AIX=cross
++else
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
+ 
++#define HAVE_IFACE_AIX 1
++#define NO_CONFIG_H 1
++#define AUTOCONF_TEST 1
++#undef _XOPEN_SOURCE_EXTENDED
++#define SOCKET_WRAPPER_NOT_REPLACE
++#include "$libreplacedir/replace.c"
++#include "$libreplacedir/inet_ntop.c"
++#include "$libreplacedir/snprintf.c"
++#include "$libreplacedir/getifaddrs.c"
++#define getifaddrs_test main
++#include "$libreplacedir/test/getifaddrs.c"
++_ACEOF
++if ac_fn_c_try_run "$LINENO"; then :
++  libreplace_cv_HAVE_IFACE_AIX=yes
++else
++  libreplace_cv_HAVE_IFACE_AIX=no
++fi
++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
++  conftest.$ac_objext conftest.beam conftest.$ac_ext
++fi
+ 
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libreplace_cv_HAVE_IFACE_AIX" >&5
++$as_echo "$libreplace_cv_HAVE_IFACE_AIX" >&6; }
++if test x"$libreplace_cv_HAVE_IFACE_AIX" = x"yes"; then
++    iface=yes;
++$as_echo "#define HAVE_IFACE_AIX 1" >>confdefs.h
+ 
++fi
++fi
+ 
+ 
+-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
++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
 -  cat >conftest.$ac_ext <<_ACEOF
@@ -48289,7 +48491,7 @@
 -cat >>conftest.$ac_ext <<_ACEOF
 +
 +if test "$cross_compiling" = yes; then :
-+  libreplace_cv_HAVE_IFACE_AIX=cross
++  libreplace_cv_HAVE_IFACE_IFCONF=cross
 +else
 +  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
@@ -48301,10 +48503,9 @@
 -    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_AIX 1
++#define HAVE_IFACE_IFCONF 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"
@@ -48314,9 +48515,9 @@
 +#include "$libreplacedir/test/getifaddrs.c"
 +_ACEOF
 +if ac_fn_c_try_run "$LINENO"; then :
-+  libreplace_cv_HAVE_IFACE_AIX=yes
++  libreplace_cv_HAVE_IFACE_IFCONF=yes
 +else
-+  libreplace_cv_HAVE_IFACE_AIX=no
++  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
@@ -48328,11 +48529,11 @@
 -# include <assert.h>
 -#endif
 +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
++{ $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_AIX 1" >>confdefs.h
++$as_echo "#define HAVE_IFACE_IFCONF 1" >>confdefs.h
  
 -#undef $ac_func
 +fi
@@ -48351,6 +48552,12 @@
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
 -#endif
++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
  
 -int
 -main ()
@@ -48359,30 +48566,7 @@
 -  ;
 -  return 0;
 -}
-+if test $iface = no; then
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for iface ifconf" >&5
-+$as_echo_n "checking for iface ifconf... " >&6; }
-+if test "${libreplace_cv_HAVE_IFACE_IFCONF+set}" = set; then :
-+  $as_echo_n "(cached) " >&6
-+else
-+
-+if test "$cross_compiling" = yes; then :
-+  libreplace_cv_HAVE_IFACE_IFCONF=cross
-+else
-+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h.  */
-+
-+#define HAVE_IFACE_IFCONF 1
-+#define NO_CONFIG_H 1
-+#define AUTOCONF_TEST 1
-+#define SOCKET_WRAPPER_NOT_REPLACE
-+#include "$libreplacedir/replace.c"
-+#include "$libreplacedir/inet_ntop.c"
-+#include "$libreplacedir/snprintf.c"
-+#include "$libreplacedir/getifaddrs.c"
-+#define getifaddrs_test main
-+#include "$libreplacedir/test/getifaddrs.c"
- _ACEOF
+-_ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -48405,54 +48589,12 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  eval "$as_ac_var=yes"
-+if ac_fn_c_try_run "$LINENO"; then :
-+  libreplace_cv_HAVE_IFACE_IFCONF=yes
- else
--  $as_echo "$as_me: failed program was:" >&5
--sed 's/^/| /' conftest.$ac_ext >&5
-+  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
- 
--	eval "$as_ac_var=no"
- 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
- 
--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
--  cat >>confdefs.h <<_ACEOF
--#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
--_ACEOF
-+fi
-+
-+if test $iface = no; then
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for iface ifreq" >&5
-+$as_echo_n "checking for iface ifreq... " >&6; }
-+if test "${libreplace_cv_HAVE_IFACE_IFREQ+set}" = set; then :
-+  $as_echo_n "(cached) " >&6
-+else
-+
 +if test "$cross_compiling" = yes; then :
 +  libreplace_cv_HAVE_IFACE_IFREQ=cross
 +else
 +  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 +/* end confdefs.h.  */
- 
++
 +#define HAVE_IFACE_IFREQ 1
 +#define NO_CONFIG_H 1
 +#define AUTOCONF_TEST 1
@@ -48466,19 +48608,38 @@
 +_ACEOF
 +if ac_fn_c_try_run "$LINENO"; then :
 +  libreplace_cv_HAVE_IFACE_IFREQ=yes
-+else
+ else
+-  $as_echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	eval "$as_ac_var=no"
 +  libreplace_cv_HAVE_IFACE_IFREQ=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
 +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"'`
+-	       { $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
 -
 -
 -
 -
- 
-+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
@@ -49003,8 +49164,7 @@
 +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 eval test \"x\$"$as_ac_Header"\" = 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
@@ -49019,8 +49179,7 @@
 +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 eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
 +  cat >>confdefs.h <<_ACEOF
 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
 +_ACEOF
@@ -49033,8 +49192,7 @@
 +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 eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
 +  cat >>confdefs.h <<_ACEOF
 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
 +_ACEOF
@@ -49057,8 +49215,7 @@
 +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 eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
 +  cat >>confdefs.h <<_ACEOF
 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
@@ -49068,29 +49225,17 @@
 -/* 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 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
  
 -#undef $ac_func
 +fi
@@ -49117,12 +49262,11 @@
 -  ;
 -  return 0;
 -}
-+for ac_header in sys/mman.h sys/filio.h sys/priv.h sys/shm.h string.h strings.h stdlib.h
++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 :
++if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
 +  cat >>confdefs.h <<_ACEOF
 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
@@ -49168,12 +49312,11 @@
 -   if test "x$as_val" = x""yes; then
 +done
 +
-+for ac_header in sys/mount.h sys/vfs.h sys/fs/s5param.h sys/filsys.h termios.h termio.h
++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 :
++if eval test \"x\$"$as_ac_Header"\" = 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
@@ -49183,12 +49326,11 @@
 +
  done
  
-+for ac_header in sys/termio.h sys/statfs.h sys/dustat.h sys/statvfs.h stdarg.h
++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 eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
 +  cat >>confdefs.h <<_ACEOF
 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
 +_ACEOF
@@ -49197,12 +49339,13 @@
  
 +done
  
-+for ac_header in sys/sysmacros.h
++for ac_header in sys/termio.h sys/statfs.h sys/dustat.h sys/statvfs.h stdarg.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 :
++  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"
++if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
 +  cat >>confdefs.h <<_ACEOF
-+#define HAVE_SYS_SYSMACROS_H 1
++#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
 +_ACEOF
  
 +fi
@@ -49219,14 +49362,12 @@
 -else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
-+for ac_header in sys/syslog.h syslog.h
++for ac_header in sys/sysmacros.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" "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 `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
++#define HAVE_SYS_SYSMACROS_H 1
  _ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
@@ -49249,12 +49390,11 @@
 +done
  
 -#undef $ac_func
-+for ac_header in langinfo.h locale.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"
-+eval as_val=\$$as_ac_Header
-+   if test "x$as_val" = x""yes; then :
++if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
 +  cat >>confdefs.h <<_ACEOF
 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
 +_ACEOF
@@ -49283,12 +49423,13 @@
 -}
 +done
 +
-+for ac_header in xfs/libxfs.h
++for ac_header in langinfo.h locale.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 :
++  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"
++if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
 +  cat >>confdefs.h <<_ACEOF
-+#define HAVE_XFS_LIBXFS_H 1
++#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
@@ -49332,31 +49473,26 @@
 -   if test "x$as_val" = x""yes; then
 +done
 +
-+for ac_header in netgroup.h
++for ac_header in xfs/libxfs.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 :
++  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 `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-+#define HAVE_NETGROUP_H 1
++#define HAVE_XFS_LIBXFS_H 1
  _ACEOF
  
  fi
-+
- done
+-done
  
++done
  
-+for ac_header in rpcsvc/yp_prot.h
++for ac_header in netgroup.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 :
++  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_RPCSVC_YP_PROT_H 1
++#define HAVE_NETGROUP_H 1
 +_ACEOF
  
 +fi
@@ -49364,6 +49500,13 @@
 +done
  
  
++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
+ 
 -for ac_func in pwrite _pwrite __pwrite pwrite64 _pwrite64 __pwrite64
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
@@ -49374,13 +49517,10 @@
 -else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
-+## 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 :
++"
++if test "x$ac_cv_header_rpcsvc_yp_prot_h" = x""yes; then :
 +  cat >>confdefs.h <<_ACEOF
-+#define HAVE_SYS_MODE_H 1
++#define HAVE_RPCSVC_YP_PROT_H 1
  _ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
@@ -49425,16 +49565,7 @@
 -  ;
 -  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
+-_ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -49460,9 +49591,17 @@
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
++## 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
+ 
 -	eval "$as_ac_var=no"
--fi
+ fi
  
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
@@ -49475,13 +49614,27 @@
 -as_val=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
++done
++
++
++# 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 `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
++#define HAVE_COREFOUNDATION_CFSTRINGENCODINGCONVERTER_H 1
++_ACEOF
++
 +else
 +  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 `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
++  cat >>confdefs.h <<_ACEOF
 +#define HAVE_CFSTRINGENCODINGCONVERTER_H 1
  _ACEOF
  
@@ -49512,8 +49665,7 @@
 +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 eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
 +  cat >>confdefs.h <<_ACEOF
 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
@@ -49649,8 +49801,7 @@
 +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 eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
 +  cat >>confdefs.h <<_ACEOF
 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
@@ -49673,20 +49824,17 @@
 -# include <assert.h>
 -#endif
 +done
-+
+ 
+-#undef $ac_func
 +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 :
++if eval test \"x\$"$as_ac_Header"\" = 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.  */
@@ -49700,7 +49848,7 @@
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
 -#endif
-+done
++fi
  
 -int
 -main ()
@@ -49709,13 +49857,14 @@
 -  ;
 -  return 0;
 -}
++done
 +
++
 +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 :
++if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
 +  cat >>confdefs.h <<_ACEOF
 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
@@ -49765,8 +49914,7 @@
 +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 eval test \"x\$"$as_ac_Header"\" = 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
@@ -49783,8 +49931,7 @@
 +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 eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
 +  cat >>confdefs.h <<_ACEOF
 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
@@ -49838,8 +49985,7 @@
 +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 eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
 +  cat >>confdefs.h <<_ACEOF
 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
 +_ACEOF
@@ -49882,9 +50028,8 @@
 +  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; }; }
++as_fn_error 77 "cannot compute sizeof (int)
++See \`config.log' for more details" "$LINENO" 5 ; }
 +   else
 +     ac_cv_sizeof_int=0
 +   fi
@@ -49958,9 +50103,8 @@
 +  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; }; }
++as_fn_error 77 "cannot compute sizeof (long)
++See \`config.log' for more details" "$LINENO" 5 ; }
 +   else
 +     ac_cv_sizeof_long=0
 +   fi
@@ -50022,9 +50166,8 @@
 +  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; }; }
++as_fn_error 77 "cannot compute sizeof (long long)
++See \`config.log' for more details" "$LINENO" 5 ; }
 +   else
 +     ac_cv_sizeof_long_long=0
 +   fi
@@ -50112,9 +50255,8 @@
 +  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; }; }
++as_fn_error 77 "cannot compute sizeof (short)
++See \`config.log' for more details" "$LINENO" 5 ; }
 +   else
 +     ac_cv_sizeof_short=0
 +   fi
@@ -50813,8 +50955,8 @@
 -fi
 +     ;; #(
 +   *)
-+     as_fn_error "unknown endianness
-+ presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
++     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_mtimespec.tv_nsec" >&5
@@ -50944,8 +51086,7 @@
 +#define RETSIGTYPE $ac_cv_type_signal
 +_ACEOF
 +
- 
--	ac_cv_member_struct_stat_st_mtimespec_tv_nsec=no
++
 +{ $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 :
@@ -50954,7 +51095,8 @@
 +  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 +/* end confdefs.h.  */
 +#include <sys/types.h>
-+
+ 
+-	ac_cv_member_struct_stat_st_mtimespec_tv_nsec=no
 +_ACEOF
 +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
 +  $EGREP "uid_t" >/dev/null 2>&1; then :
@@ -51265,25 +51407,20 @@
 +  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 +$as_echo "no" >&6; }
 +fi
++
++
  
 -	cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
-+
-+
 +        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 -lcups"
 +		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 :
++if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
 +  cat >>confdefs.h <<_ACEOF
 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
@@ -51294,24 +51431,142 @@
 +
 +done
 +
++
 +		if test x"$ac_cv_header_cups_cups_h" = xyes -a \
 +		        x"$ac_cv_header_cups_language_h" = xyes; then
++			# try linking with -lcups alone first. That should work unless libcups is
++			# underlinked. With cups-config --libs we pull in unwanted and unneeded
++			# dendencies including thread libraries - use cups-config only if really
++			# required.
 +
-+$as_echo "#define HAVE_CUPS 1" >>confdefs.h
 +
-+			samba_cv_HAVE_CUPS=yes
++ac_check_lib_ext_save_LIBS=$LIBS
++LIBS="-lcups $ac_save_PRINT_LIBS   $LIBS"
 +
 +
++
++        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for httpConnect in -lcups" >&5
++$as_echo_n "checking for httpConnect in -lcups... " >&6; }
++if test "${ac_cv_lib_ext_cups_httpConnect+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+-$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.  */
++#ifdef __cplusplus
++extern "C"
++#endif
++char httpConnect ();
+ int
+ main ()
+ {
+-static struct stat ac_aggr;
+-if (sizeof ac_aggr.st_umtime)
+-return 0;
++return httpConnect ();
+   ;
+   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_member_struct_stat_st_umtime=yes
++if ac_fn_c_try_link "$LINENO"; then :
++  ac_cv_lib_ext_cups_httpConnect=yes;
++		  ac_cv_lib_ext_cups=yes
+ else
+-  $as_echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
++  ac_cv_lib_ext_cups_httpConnect=no;
++		  ac_cv_lib_ext_cups=no
++fi
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
++
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ext_cups_httpConnect" >&5
++$as_echo "$ac_cv_lib_ext_cups_httpConnect" >&6; }
++    if test $ac_cv_lib_ext_cups_httpConnect = yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_HTTPCONNECT 1
++_ACEOF
+ 
+-	ac_cv_member_struct_stat_st_umtime=no
+ fi
++LIBS=$ac_check_lib_ext_save_LIBS
+ 
+-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+-fi
++if test $ac_cv_lib_ext_cups = yes; then :
++  PRINT_LIBS"$ac_save_PRINT_LIBS -lcups"
+ 
+-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++
++else
++  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: your cups library doesn't link with -lcups alone, it might be underlinked." >&5
++$as_echo "$as_me: WARNING: your cups library doesn't link with -lcups alone, it might be underlinked." >&2;} ;
++				 PRINT_LIBS="$ac_save_PRINT_LIBS `$CUPS_CONFIG --libs`"
+ 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
+-_ACEOF
+ 
+-# Tru64
+-	samba_cv_stat_hires=yes
+-fi
++$as_echo "#define HAVE_CUPS 1" >>confdefs.h
+ 
++			samba_cv_HAVE_CUPS=yes
+ 
+-if test x"$samba_cv_stat_hires" = x"yes" ; then
+ 
+-cat >>confdefs.h <<\_ACEOF
+-#define HAVE_STAT_HIRES_TIMESTAMPS 1
+-_ACEOF
 +ac_check_lib_ext_save_LIBS=$LIBS
 +LIBS="-lcups $PRINT_LIBS  $LIBS"
+ 
+-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 httpConnectEncrypt in -lcups" >&5
 +$as_echo_n "checking for httpConnectEncrypt in -lcups... " >&6; }
 +if test "${ac_cv_lib_ext_cups_httpConnectEncrypt+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.  */
 -$ac_includes_default
@@ -51327,7 +51582,7 @@
  main ()
  {
 -static struct stat ac_aggr;
--if (sizeof ac_aggr.st_umtime)
+-if (ac_aggr.st_birthtimespec.tv_nsec)
 -return 0;
 +return httpConnectEncrypt ();
    ;
@@ -51352,7 +51607,7 @@
 -	 test -z "$ac_c_werror_flag" ||
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
--  ac_cv_member_struct_stat_st_umtime=yes
+-  ac_cv_member_struct_stat_st_birthtimespec_tv_nsec=yes
 +if ac_fn_c_try_link "$LINENO"; then :
 +  ac_cv_lib_ext_cups_httpConnectEncrypt=yes;
 +		  ac_cv_lib_ext_cups=yes
@@ -51364,14 +51619,29 @@
 +fi
 +rm -f core conftest.err conftest.$ac_objext \
 +    conftest$ac_exeext conftest.$ac_ext
-+
+ 
+-	cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
 +fi
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ext_cups_httpConnectEncrypt" >&5
 +$as_echo "$ac_cv_lib_ext_cups_httpConnectEncrypt" >&6; }
 +    if test $ac_cv_lib_ext_cups_httpConnectEncrypt = yes; then :
 +  cat >>confdefs.h <<_ACEOF
 +#define HAVE_HTTPCONNECTENCRYPT 1
-+_ACEOF
+ _ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
+-$ac_includes_default
+-int
+-main ()
+-{
+-static struct stat ac_aggr;
+-if (sizeof ac_aggr.st_birthtimespec.tv_nsec)
+-return 0;
+-  ;
+-  return 0;
+-}
 +
 +fi
 +LIBS=$ac_check_lib_ext_save_LIBS
@@ -51379,8 +51649,31 @@
 +if test $ac_cv_lib_ext_cups = yes; then :
 +  cat >>confdefs.h <<_ACEOF
 +#define HAVE_LIBCUPS 1
-+_ACEOF
-+
+ _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_member_struct_stat_st_birthtimespec_tv_nsec=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
 +		case "$PRINT_LIBS" in
 +		    *-lcups*)
 +			;;
@@ -51388,11 +51681,8 @@
 +			PRINT_LIBS="-lcups $PRINT_LIBS"
 +			;;
 +		esac
- 
--	ac_cv_member_struct_stat_st_umtime=no
--fi
- 
--rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++
++
  fi
 +		else
 +			{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups-config around but cups-devel not installed" >&5
@@ -51404,43 +51694,36 @@
  
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 +	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
++		as_fn_error $? "Cups support required but cups-config not located.  Make sure cups-devel related files are installed." "$LINENO" 5
 +        fi
  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
--_ACEOF
--
--# Tru64
--	samba_cv_stat_hires=yes
+-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
+-{ $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
  
+-cat >>confdefs.h <<_ACEOF
+-#define HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC 1
+-_ACEOF
  
--if test x"$samba_cv_stat_hires" = x"yes" ; then
 +if test x$enable_iprint != xno; then
 +	if test x"$samba_cv_HAVE_CUPS" = xyes; then
  
--cat >>confdefs.h <<\_ACEOF
--#define HAVE_STAT_HIRES_TIMESTAMPS 1
--_ACEOF
 +$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
++		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
  
--# 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:$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
 +############################################
 +# 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
@@ -51463,7 +51746,7 @@
  main ()
  {
 -static struct stat ac_aggr;
--if (ac_aggr.st_birthtimespec.tv_nsec)
+-if (ac_aggr.st_birthtime)
 -return 0;
 +
 +		if (0) {
@@ -51495,7 +51778,7 @@
 -	 test -z "$ac_c_werror_flag" ||
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
--  ac_cv_member_struct_stat_st_birthtimespec_tv_nsec=yes
+-  ac_cv_member_struct_stat_st_birthtime=yes
 +if ac_fn_c_try_link "$LINENO"; then :
 +  samba_cv_optimize_out_funcation_calls=yes
  else
@@ -51540,7 +51823,7 @@
  main ()
  {
 -static struct stat ac_aggr;
--if (sizeof ac_aggr.st_birthtimespec.tv_nsec)
+-if (sizeof ac_aggr.st_birthtime)
 -return 0;
 +
 +	struct msghdr msg;
@@ -51573,40 +51856,38 @@
 -	 test -z "$ac_c_werror_flag" ||
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
--  ac_cv_member_struct_stat_st_birthtimespec_tv_nsec=yes
+-  ac_cv_member_struct_stat_st_birthtime=yes
 +if ac_fn_c_try_compile "$LINENO"; then :
 +  samba_cv_msghdr_msg_control=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
+-	ac_cv_member_struct_stat_st_birthtime=no
 +  samba_cv_msghdr_msg_control=no
  fi
 -
--rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
--fi
--
  rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  fi
--{ $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
--
--cat >>confdefs.h <<_ACEOF
--#define HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC 1
--_ACEOF
 +{ $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
  
+-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+-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_MSGHDR_MSG_CONTROL 1" >>confdefs.h
  
- fi
+-cat >>confdefs.h <<_ACEOF
+-#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
+-_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
+-{ $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
 +#############################################
 +# check for fd passing struct via msg_acctrights
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fd passing via msg_acctrights" >&5
@@ -51625,7 +51906,7 @@
 -main ()
 -{
 -static struct stat ac_aggr;
--if (ac_aggr.st_birthtime)
+-if (ac_aggr.st_birthtimensec)
 -return 0;
 -  ;
 -  return 0;
@@ -51649,7 +51930,7 @@
 -	 test -z "$ac_c_werror_flag" ||
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
--  ac_cv_member_struct_stat_st_birthtime=yes
+-  ac_cv_member_struct_stat_st_birthtimensec=yes
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
@@ -51672,7 +51953,7 @@
  main ()
  {
 -static struct stat ac_aggr;
--if (sizeof ac_aggr.st_birthtime)
+-if (sizeof ac_aggr.st_birthtimensec)
 -return 0;
 +
 +	struct msghdr msg;
@@ -51702,14 +51983,14 @@
 -	 test -z "$ac_c_werror_flag" ||
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
--  ac_cv_member_struct_stat_st_birthtime=yes
+-  ac_cv_member_struct_stat_st_birthtimensec=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
 -
--	ac_cv_member_struct_stat_st_birthtime=no
+-	ac_cv_member_struct_stat_st_birthtimensec=no
 +  samba_cv_msghdr_msg_acctrights=no
  fi
 -
@@ -51723,12 +52004,12 @@
  
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  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 "$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
  
 -cat >>confdefs.h <<_ACEOF
--#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
+-#define HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC 1
 +for ac_func in dirfd
 +do :
 +  ac_fn_c_check_func "$LINENO" "dirfd" "ac_cv_func_dirfd"
@@ -51737,60 +52018,24 @@
 +#define HAVE_DIRFD 1
  _ACEOF
  
--{ $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
-+fi
+-
+ fi
 +done
-+
+ 
 +if test x"$ac_cv_func_dirfd" = x"yes"; then
 +	default_shared_modules="$default_shared_modules vfs_syncops vfs_dirsort"
-+fi
-+
+ 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 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
--  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
--int
--main ()
--{
--static struct stat ac_aggr;
--if (ac_aggr.st_birthtimensec)
--return 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
--  ac_cv_member_struct_stat_st_birthtimensec=yes
--else
--  $as_echo "$as_me: failed program was:" >&5
--sed 's/^/| /' conftest.$ac_ext >&5
  
 -	cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
@@ -51799,7 +52044,7 @@
 -cat >>conftest.$ac_ext <<_ACEOF
 +    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
--$ac_includes_default
+-#include <sys/stat.h>
 +
 +#include <sys/types.h>
 +#if STDC_HEADERS
@@ -51810,9 +52055,14 @@
  int
  main ()
  {
--static struct stat ac_aggr;
--if (sizeof ac_aggr.st_birthtimensec)
--return 0;
+-
+-		int a = UF_DOS_ARCHIVE;
+-		int h = UF_DOS_HIDDEN;
+-		int r = UF_DOS_RO;
+-		int s = UF_DOS_SYSTEM;
+-		int i = UF_DOS_NOINDEX;
+-		int f = UF_DOS_FLAGS;
+-
 +struct sigevent s;
    ;
    return 0;
@@ -51836,56 +52086,57 @@
 -	 test -z "$ac_c_werror_flag" ||
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
--  ac_cv_member_struct_stat_st_birthtimensec=yes
+-  samba_cv_stat_dos_flags=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_member_struct_stat_st_birthtimensec=no
+-	samba_cv_stat_dos_flags=no
 +  samba_cv_struct_sigevent=no
  fi
 -
  rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+-
  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: $samba_cv_struct_sigevent" >&5
 +$as_echo "$samba_cv_struct_sigevent" >&6; }
 +if test x"$samba_cv_struct_sigevent" = x"yes"; then
  
--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
+-if test x"$samba_cv_stat_dos_flags" = 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_STAT_ST_BIRTHTIMENSEC 1
+-cat >>confdefs.h <<\_ACEOF
+-#define HAVE_STAT_DOS_FLAGS 1
++cat >>confdefs.h <<_ACEOF
 +#define HAVE_STRUCT_SIGEVENT_SIGEV_VALUE_SIVAL_PTR 1
  _ACEOF
  
- 
++
  fi
 +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 :
  
--fi
+-#####################################
+-# needed for SRV lookups
 +cat >>confdefs.h <<_ACEOF
 +#define HAVE_STRUCT_SIGEVENT_SIGEV_VALUE_SIGVAL_PTR 1
 +_ACEOF
  
- 
+-{ $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
++
 +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
++
 +fi
 +
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec type" >&5
@@ -51893,21 +52144,28 @@
 +if test "${samba_cv_struct_timespec+set}" = set; then :
    $as_echo_n "(cached) " >&6
  else
- 
--	cat >conftest.$ac_ext <<_ACEOF
+-  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
++
 +    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
--#include <sys/stat.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
+ #endif
+-char dn_expand ();
 +#if TIME_WITH_SYS_TIME
 +# include <sys/time.h>
 +# include <time.h>
@@ -51922,28 +52180,21 @@
  int
  main ()
  {
--
--		int a = UF_DOS_ARCHIVE;
--		int h = UF_DOS_HIDDEN;
--		int r = UF_DOS_RO;
--		int s = UF_DOS_SYSTEM;
--		int i = UF_DOS_NOINDEX;
--		int f = UF_DOS_FLAGS;
--
+-return dn_expand ();
 +struct timespec ts;
    ;
    return 0;
  }
  _ACEOF
--rm -f conftest.$ac_objext
--if { (ac_try="$ac_compile"
+-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_compile") 2>conftest.er1
+-  (eval "$ac_link") 2>conftest.er1
 -  ac_status=$?
 -  grep -v '^ *+' conftest.er1 >conftest.err
 -  rm -f conftest.er1
@@ -51952,42 +52203,46 @@
 -  (exit $ac_status); } && {
 -	 test -z "$ac_c_werror_flag" ||
 -	 test ! -s conftest.err
--       } && test -s conftest.$ac_objext; then
--  samba_cv_stat_dos_flags=yes
+-       } && test -s conftest$ac_exeext && {
+-	 test "$cross_compiling" = yes ||
+-	 $as_test_x conftest$ac_exeext
+-       }; then
+-  ac_cv_lib_resolv_dn_expand=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
 -
--	samba_cv_stat_dos_flags=no
+-	ac_cv_lib_resolv_dn_expand=no
 +  samba_cv_struct_timespec=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
+-LIBS=$ac_check_lib_save_LIBS
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  fi
--{ $as_echo "$as_me:$LINENO: result: $samba_cv_stat_dos_flags" >&5
--$as_echo "$samba_cv_stat_dos_flags" >&6; }
--
--if test x"$samba_cv_stat_dos_flags" = 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_struct_timespec" >&5
 +$as_echo "$samba_cv_struct_timespec" >&6; }
 +if test x"$samba_cv_struct_timespec" = x"yes"; then
  
--cat >>confdefs.h <<\_ACEOF
--#define HAVE_STAT_DOS_FLAGS 1
--_ACEOF
+-  LIBS="-lresolv $LIBS"
 +$as_echo "#define HAVE_STRUCT_TIMESPEC 1" >>confdefs.h
  
  fi
  
--#####################################
--# needed for SRV lookups
 -
--{ $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 "$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
 +# 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
@@ -52010,11 +52265,11 @@
 -#ifdef __cplusplus
 -extern "C"
 -#endif
--char dn_expand ();
+-char _dn_expand ();
 -int
 -main ()
 -{
--return dn_expand ();
+-return _dn_expand ();
 -  ;
 -  return 0;
 -}
@@ -52047,74 +52302,47 @@
 -	 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_run "$LINENO"; then :
 +  samba_cv_have_setresuid=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
--	ac_cv_lib_resolv_dn_expand=no
 +  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
+ 
+-	ac_cv_lib_resolv__dn_expand=no
  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
++
++$as_echo "#define HAVE_SETRESUID 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
 -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_have_setresuid" >&5
-+$as_echo "$samba_cv_have_setresuid" >&6; }
-+if test x"$samba_cv_have_setresuid" = x"yes"; then
  
 -  LIBS="-lresolv $LIBS"
-+$as_echo "#define HAVE_SETRESUID 1" >>confdefs.h
- 
- 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
 +# 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
--  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.  */
++  $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 _dn_expand ();
--int
--main ()
--{
--return _dn_expand ();
--  ;
--  return 0;
--}
 +    if test "$cross_compiling" = yes; then :
 +  samba_cv_have_setresgid=cross
 +else
@@ -52123,66 +52351,28 @@
 +#include <unistd.h>
 +#include <errno.h>
 +main() { errno = 0; setresgid(1,1,1); exit(errno != 0 ? (errno==EPERM ? 0 : 1) : 0);}
- _ACEOF
--rm -f conftest.$ac_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
++_ACEOF
 +if ac_fn_c_try_run "$LINENO"; then :
 +  samba_cv_have_setresgid=yes
- else
--  $as_echo "$as_me: failed program was:" >&5
--sed 's/^/| /' conftest.$ac_ext >&5
--
--	ac_cv_lib_resolv__dn_expand=no
++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
  
--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
--  cat >>confdefs.h <<_ACEOF
--#define HAVE_LIBRESOLV 1
--_ACEOF
++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
  
--  LIBS="-lresolv $LIBS"
-+$as_echo "#define HAVE_SETRESGID 1" >>confdefs.h
- 
- 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
++$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 :
@@ -52269,25 +52459,13 @@
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
--	ac_cv_lib_resolv___dn_expand=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
--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
--  cat >>confdefs.h <<_ACEOF
--#define HAVE_LIBRESOLV 1
--_ACEOF
++fi
++
++fi
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_memcmp_working" >&5
 +$as_echo "$ac_cv_func_memcmp_working" >&6; }
 +test $ac_cv_func_memcmp_working = no && case " $LIBOBJS " in
@@ -52295,20 +52473,13 @@
 +  *) LIBOBJS="$LIBOBJS memcmp.$ac_objext"
 + ;;
 +esac
- 
--  LIBS="-lresolv $LIBS"
- 
--fi
- 
++
++
++
 +###############################################
 +# Readline included by default unless explicitly asked not to
 +test "${with_readline+set}" != "set" && with_readline=yes
- 
--#
--# Check for the functions putprpwnam, set_auth_parameters,
--# getspnam, bigcrypt and getprpwnam in -lsec and -lsecurity
--# Needed for OSF1 and HPUX.
--#
++
 +# 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; }
@@ -52320,84 +52491,101 @@
 +    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 +$as_echo "yes" >&6; }
  
+-	ac_cv_lib_resolv___dn_expand=no
+-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 :
++if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
 +  cat >>confdefs.h <<_ACEOF
 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
 +_ACEOF
  
-+fi
- 
--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.  */
+-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
++
 +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
+   cat >>confdefs.h <<_ACEOF
+-#define HAVE_LIBRESOLV 1
 +#define HAVE_READLINE_HISTORY_H 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
+-  LIBS="-lresolv $LIBS"
+-
+ fi
  
--#ifdef __STDC__
--# include <limits.h>
--#else
--# include <assert.h>
--#endif
+-
+-#
+-# Check for the functions putprpwnam, set_auth_parameters,
+-# getspnam, bigcrypt and getprpwnam in -lsec and -lsecurity
+-# Needed for OSF1 and HPUX.
+-#
 +done
  
--#undef $ac_func
-+
+ 
 +    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 :
++if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
 +  cat >>confdefs.h <<_ACEOF
 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
 +_ACEOF
-+
+ 
+-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 termlib in ncurses curses termcap terminfo termlib tinfo; do
 +       as_ac_Lib=`$as_echo "ac_cv_lib_${termlib}''_tgetent" | $as_tr_sh`
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -l${termlib}" >&5
 +$as_echo_n "checking for tgetent in -l${termlib}... " >&6; }
-+if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
-+  $as_echo_n "(cached) " >&6
-+else
++if eval "test \"\${$as_ac_Lib+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
 +  ac_check_lib_save_LIBS=$LIBS
 +LIBS="-l${termlib}  $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.  */
+-
+-#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
-@@ -47290,100 +14524,41 @@
+@@ -47385,100 +14537,40 @@
  #ifdef __cplusplus
  extern "C"
  #endif
@@ -52489,8 +52677,7 @@
 -		    # putprpwnam was not found and we already had libsecurity
 -		    # nothing to do here by default
 -		    true
-+eval as_val=\$$as_ac_Lib
-+   if test "x$as_val" = x""yes; then :
++if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
 +  TERMLIBS="-l${termlib}"; break
 +fi
  
@@ -52518,7 +52705,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -47392,111 +14567,106 @@
+@@ -47487,111 +14579,104 @@
  #ifdef __cplusplus
  extern "C"
  #endif
@@ -52622,8 +52809,7 @@
 +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 eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
 +  cat >>confdefs.h <<_ACEOF
 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
 +_ACEOF
@@ -52652,8 +52838,7 @@
 +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 eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
 +  cat >>confdefs.h <<_ACEOF
 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
 +_ACEOF
@@ -52668,7 +52853,7 @@
 +       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 :
++if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
    $as_echo_n "(cached) " >&6
  else
 -  cat >conftest.$ac_ext <<_ACEOF
@@ -52699,7 +52884,7 @@
  
  /* Override any GCC internal prototype to avoid an error.
     Use char because int might match the return type of a GCC
-@@ -47504,100 +14674,41 @@
+@@ -47599,100 +14684,40 @@
  #ifdef __cplusplus
  extern "C"
  #endif
@@ -52791,8 +52976,7 @@
 -		    # putprpwnam was not found and we already had libsec
 -		    # nothing to do here by default
 -		    true
-+eval as_val=\$$as_ac_Lib
-+   if test "x$as_val" = x""yes; then :
++if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
 +  TERMLIBS="-l${termlib}"; break
 +fi
  
@@ -52820,7 +53004,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -47606,112 +14717,68 @@
+@@ -47701,112 +14726,68 @@
  #ifdef __cplusplus
  extern "C"
  #endif
@@ -52921,11 +53105,11 @@
  
  fi
 -done
--
  
  
  
  
+-
 -for ac_func in set_auth_parameters
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
@@ -52968,7 +53152,7 @@
  
  /* Override any GCC internal prototype to avoid an error.
     Use char because int might match the return type of a GCC
-@@ -47719,100 +14786,54 @@
+@@ -47814,100 +14795,54 @@
  #ifdef __cplusplus
  extern "C"
  #endif
@@ -53097,7 +53281,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -47821,111 +14842,43 @@
+@@ -47916,111 +14851,43 @@
  #ifdef __cplusplus
  extern "C"
  #endif
@@ -53184,9 +53368,9 @@
  fi
 -done
 -
--
  
  
+-
 -for ac_func in set_auth_parameters
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
@@ -53227,7 +53411,7 @@
  
  /* Override any GCC internal prototype to avoid an error.
     Use char because int might match the return type of a GCC
-@@ -47933,316 +14886,299 @@
+@@ -48028,215 +14895,287 @@
  #ifdef __cplusplus
  extern "C"
  #endif
@@ -53271,9 +53455,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 '' nsl; do
 +  if test -z "$ac_lib"; then
 +    ac_res="none required"
@@ -53291,24 +53472,91 @@
 +fi
 +done
 +if test "${ac_cv_search_yp_get_default_domain+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_yp_get_default_domain=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_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"
++
++fi
++
++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
++done
++
++
++# 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
++
++fi
++done
++
++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"
++if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
++  cat >>confdefs.h <<_ACEOF
++#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
++_ACEOF
++
++fi
++done
++
++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
++
++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"
++if eval test \"x\$"$as_ac_var"\" = 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
@@ -53316,50 +53564,55 @@
 -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
++for ac_func in getrlimit fsync fdatasync setpgid
 +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 :
++  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
++ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
++if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
    cat >>confdefs.h <<_ACEOF
--#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-+#define HAVE_YP_GET_DEFAULT_DOMAIN 1
+ #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
  _ACEOF
  
 -        # set_auth_parameters was found in libc or existing $LIBS
+-
 +fi
 +done
  
- 
 -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
++for ac_func in setsid glob strpbrk crypt16 getauthuid
 +do :
-+  ac_fn_c_check_func "$LINENO" "execl" "ac_cv_func_execl"
-+if test "x$ac_cv_func_execl" = 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"
++if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
 +  cat >>confdefs.h <<_ACEOF
-+#define HAVE_EXECL 1
++#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
  _ACEOF
  
 +fi
 +done
  
-+if test x"$ac_cv_func_execl" = x"no"; then
-+    EXTRA_BIN_PROGS="$EXTRA_BIN_PROGS bin/smbrun\$(EXEEXT)"
++for ac_func in sigprocmask sigblock sigaction sigset innetgr setnetgrent getnetgrent endnetgrent
++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"
++if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
++  cat >>confdefs.h <<_ACEOF
++#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
++_ACEOF
+ 
+-else
 +fi
++done
  
--else
--
 -        # set_auth_parameters was not found, try adding libsec
 -	case " $LIBS " in
 -          *\ -lsec\ *)
-+for ac_func in getcwd fchown chmod fchmod mknod mknod64
++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 :
++if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
 +  cat >>confdefs.h <<_ACEOF
 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 +_ACEOF
@@ -53382,12 +53635,13 @@
 -LIBS="-lsec  $LIBS"
 -cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
-+for ac_func in strtol
++for ac_func in setpriv setgidx setuidx setgroups sysconf stat64 fstat64
 +do :
-+  ac_fn_c_check_func "$LINENO" "strtol" "ac_cv_func_strtol"
-+if test "x$ac_cv_func_strtol" = 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"
++if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
 +  cat >>confdefs.h <<_ACEOF
-+#define HAVE_STRTOL 1
++#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
  _ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
@@ -53410,12 +53664,11 @@
 +fi
 +done
 +
-+for ac_func in strchr chflags
++for ac_func in lstat64 fopen64 atexit grantpt lseek64 ftruncate64 posix_fallocate posix_fallocate64
 +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 :
++if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
 +  cat >>confdefs.h <<_ACEOF
 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
  _ACEOF
@@ -53449,12 +53702,11 @@
  fi
 +done
 +
-+for ac_func in getrlimit fsync fdatasync setpgid
++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 :
++if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
 +  cat >>confdefs.h <<_ACEOF
 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 +_ACEOF
@@ -53470,12 +53722,11 @@
 +done
  
 -		LIBS="-lsec $LIBS"
-+for ac_func in setsid glob strpbrk crypt16 getauthuid
++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"
-+eval as_val=\$$as_ac_var
-+   if test "x$as_val" = x""yes; then :
++if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
 +  cat >>confdefs.h <<_ACEOF
 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 +_ACEOF
@@ -53485,39 +53736,34 @@
  
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_SET_AUTH_PARAMETERS 1
-+for ac_func in sigprocmask sigblock sigaction sigset innetgr setnetgrent getnetgrent endnetgrent
++for ac_func in getpwent_r
 +do :
-+  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-+eval as_val=\$$as_ac_var
-+   if test "x$as_val" = x""yes; then :
++  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 `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
++#define HAVE_GETPWENT_R 1
  _ACEOF
  
 +fi
 +done
  
-+for ac_func in initgroups select poll rdchk getgrnam getgrent pathconf
++for ac_func in getdents64
 +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" "getdents64" "ac_cv_func_getdents64"
++if test "x$ac_cv_func_getdents64" = x""yes; then :
 +  cat >>confdefs.h <<_ACEOF
-+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
++#define HAVE_GETDENTS64 1
 +_ACEOF
  
 -else
 +fi
 +done
  
-+for ac_func in setpriv setgidx setuidx setgroups sysconf stat64 fstat64
++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"
-+eval as_val=\$$as_ac_var
-+   if test "x$as_val" = x""yes; then :
++if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
 +  cat >>confdefs.h <<_ACEOF
 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 +_ACEOF
@@ -53528,12 +53774,11 @@
 +fi
 +done
  
-+for ac_func in lstat64 fopen64 atexit grantpt lseek64 ftruncate64 posix_fallocate posix_fallocate64
++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 :
++if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
 +  cat >>confdefs.h <<_ACEOF
 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 +_ACEOF
@@ -53543,12 +53788,11 @@
  
 -	  ;;
 -        esac
-+for ac_func in fseek64 fseeko64 ftell64 ftello64 setluid getpwanam
++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 :
++if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
 +  cat >>confdefs.h <<_ACEOF
 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 +_ACEOF
@@ -53556,30 +53800,21 @@
  fi
  done
  
-+for ac_func in opendir64 readdir64 seekdir64 telldir64 rewinddir64 closedir64
++for ac_func in nanosleep
 +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" "nanosleep" "ac_cv_func_nanosleep"
++if test "x$ac_cv_func_nanosleep" = x""yes; then :
 +  cat >>confdefs.h <<_ACEOF
-+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
++#define HAVE_NANOSLEEP 1
 +_ACEOF
++
++else
  
-+fi
-+done
  
 -# UnixWare 7.x has its getspnam in -lgen
-+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
++ac_check_lib_ext_save_LIBS=$LIBS
++LIBS="-lrt $LIBS  $LIBS"
  
-+fi
-+done
  
 -for ac_func in getspnam
 -do
@@ -53587,20 +53822,19 @@
 -{ $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 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
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
-+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
+-_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
@@ -53609,32 +53843,21 @@
 -    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
-+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"
-+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
  
--/* 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
+@@ -48244,214 +15183,173 @@
+ #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
@@ -53642,24 +53865,16 @@
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
 -#endif
-+fi
-+done
- 
--int
--main ()
--{
+-
++char nanosleep ();
+ int
+ main ()
+ {
 -return $ac_func ();
--  ;
--  return 0;
--}
-+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
++return nanosleep ();
+   ;
+   return 0;
+ }
  _ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
@@ -53683,18 +53898,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_rt_nanosleep=yes;
++		  ac_cv_lib_ext_rt=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_rt_nanosleep=no;
++		  ac_cv_lib_ext_rt=no
  fi
-+done
++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
@@ -53702,45 +53923,56 @@
 -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
-+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 :
++{ $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 :
    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 HAVE_NANOSLEEP 1
  _ACEOF
  
 -        # getspnam was found in libc or existing $LIBS
 -
 +fi
-+done
++LIBS=$ac_check_lib_ext_save_LIBS
  
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_GETSPNAM 1
-+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 :
++if test $ac_cv_lib_ext_rt = yes; then :
 +  cat >>confdefs.h <<_ACEOF
-+#define HAVE_NANOSLEEP 1
++#define HAVE_LIBRT 1
  _ACEOF
  
-+else
++		case "$LIBS" in
++		    *-lrt*)
++			;;
++		    *)
++			LIBS="-lrt $LIBS"
++			;;
++		esac
  
  
 -else
-+ac_check_lib_ext_save_LIBS=$LIBS
-+LIBS="-lrt $LIBS  $LIBS"
++fi
++fi
++done
  
 -        # getspnam was not found, try adding libgen
 -	case " $LIBS " in
 -          *\ -lgen\ *)
++for ac_func in utimensat
++do :
++  ac_fn_c_check_func "$LINENO" "utimensat" "ac_cv_func_utimensat"
++if test "x$ac_cv_func_utimensat" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_UTIMENSAT 1
++_ACEOF
  
 -		    # getspnam was not found and we already had libgen
 -		    # nothing to do here by default
 -		    true
++fi
++done
  
 -	    ;;
 -          *)
@@ -53748,36 +53980,48 @@
 -	    { $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
-+        { $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
+-  $as_echo_n "(cached) " >&6
+-else
 -  ac_check_lib_save_LIBS=$LIBS
 -LIBS="-lgen  $LIBS"
 -cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
--_ACEOF
++for ac_func in mlock munlock mlockall munlockall
++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"
++if eval test \"x\$"$as_ac_var"\" = 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
-+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
+-/* end confdefs.h.  */
  
- /* Override any GCC internal prototype to avoid an error.
-@@ -48251,112 +15187,179 @@
- #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 getspnam ();
-+char nanosleep ();
- int
- main ()
- {
+-int
+-main ()
+-{
 -return getspnam ();
-+return nanosleep ();
-   ;
-   return 0;
- }
+-  ;
+-  return 0;
+-}
++fi
++done
++
++for ac_func in memalign posix_memalign hstrerror
++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"
++if eval test \"x\$"$as_ac_var"\" = 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"
@@ -53801,151 +54045,106 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  ac_cv_lib_gen_getspnam=yes
-+if ac_fn_c_try_link "$LINENO"; then :
-+  ac_cv_lib_ext_rt_nanosleep=yes;
-+		  ac_cv_lib_ext_rt=yes
- else
+-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
-+rm -f core conftest.err conftest.$ac_objext \
-+    conftest$ac_exeext conftest.$ac_ext
  
 -	ac_cv_lib_gen_getspnam=no
  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 :
-+  cat >>confdefs.h <<_ACEOF
-+#define HAVE_NANOSLEEP 1
-+_ACEOF
++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
- fi
+-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=$ac_check_lib_ext_save_LIBS
- 
--		LIBS="-lgen $LIBS"
-+if test $ac_cv_lib_ext_rt = yes; then :
++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"
++if test "x$ac_cv_header_sys_mman_h" = x""yes; then :
 +  cat >>confdefs.h <<_ACEOF
-+#define HAVE_LIBRT 1
++#define HAVE_SYS_MMAN_H 1
 +_ACEOF
-+
-+		case "$LIBS" in
-+		    *-lrt*)
-+			;;
-+		    *)
-+			LIBS="-lrt $LIBS"
-+			;;
-+		esac
  
- 
--cat >>confdefs.h <<\_ACEOF
--#define HAVE_GETSPNAM 1
+-		LIBS="-lgen $LIBS"
 +fi
-+fi
-+done
-+
-+for ac_func in utimensat
-+do :
-+  ac_fn_c_check_func "$LINENO" "utimensat" "ac_cv_func_utimensat"
-+if test "x$ac_cv_func_utimensat" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define HAVE_UTIMENSAT 1
- _ACEOF
  
-+fi
 +done
  
-+for ac_func in mlock munlock mlockall munlockall
+-cat >>confdefs.h <<\_ACEOF
+-#define HAVE_GETSPNAM 1
++# 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`
 +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 :
++if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
 +  cat >>confdefs.h <<_ACEOF
 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-+_ACEOF
+ _ACEOF
  
--else
 +fi
 +done
  
-+for ac_func in memalign posix_memalign hstrerror
++for ac_func in gettext dgettext
 +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 :
++if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
 +  cat >>confdefs.h <<_ACEOF
 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 +_ACEOF
  
+-else
+-
+-
 -			# getspnam was not found in libgen
 -			# nothing to do here by default
 -			true
 +fi
 +done
  
-+for ac_header in sys/mman.h
++for ac_func in bindtextdomain textdomain
 +do :
-+  ac_fn_c_check_header_mongrel "$LINENO" "sys/mman.h" "ac_cv_header_sys_mman_h" "$ac_includes_default"
-+if test "x$ac_cv_header_sys_mman_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"
++if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
 +  cat >>confdefs.h <<_ACEOF
-+#define HAVE_SYS_MMAN_H 1
++#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 +_ACEOF
  
  fi
++done
  
 -	  ;;
 -        esac
-+done
-+
-+# setbuffer, shmget, shm_open are needed for smbtorture
-+for ac_func in shmget shm_open
++for ac_func in strupr
 +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" "strupr" "ac_cv_func_strupr"
++if test "x$ac_cv_func_strupr" = x""yes; then :
 +  cat >>confdefs.h <<_ACEOF
-+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
++#define HAVE_STRUPR 1
 +_ACEOF
  
  fi
  done
  
-+for ac_func in gettext dgettext
+ 
++# Find a method of generating a stack trace
++for ac_header in execinfo.h libexc.h libunwind.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
-+   if test "x$as_val" = 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"
++if eval test \"x\$"$as_ac_Header"\" = 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
-+done
  
-+for ac_func in bindtextdomain textdomain
-+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
@@ -53954,66 +54153,40 @@
 -{ $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
++# libexecinfo provides backtrace_symbols on FreeBSD
++{ $as_echo "$as_me:${as_lineno-$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_n "(cached) " >&6
+ else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
-+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
+-_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
-+done
- 
+-
 -#ifdef __STDC__
 -# include <limits.h>
 -#else
 -# include <assert.h>
 -#endif
- 
+-
 -#undef $ac_func
-+# Find a method of generating a stack trace
-+for ac_header in execinfo.h libexc.h libunwind.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
-+
-+# libexecinfo provides backtrace_symbols on FreeBSD
-+{ $as_echo "$as_me:${as_lineno-$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_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
-@@ -48364,100 +15367,66 @@
+@@ -48459,100 +15357,66 @@
  #ifdef __cplusplus
  extern "C"
  #endif
@@ -54156,7 +54329,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -48466,212 +15435,191 @@
+@@ -48561,212 +15425,191 @@
  #ifdef __cplusplus
  extern "C"
  #endif
@@ -54213,34 +54386,20 @@
 -{ $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
--
--		LIBS="-lsecurity $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
++_ACEOF
  
--
--
--else
--
--
--			# getspnam was not found in libsecurity
--			# nothing to do here by default
--			true
--
+-		LIBS="-lsecurity $LIBS"
 +  LIBS="-lexc $LIBS"
  
- fi
++fi
  
--	  ;;
--        esac
+-cat >>confdefs.h <<\_ACEOF
+-#define HAVE_GETSPNAM 1
 +
 +# check for sysctlbyname for BSD systems
 +for ac_func in sysctlbyname
@@ -54249,14 +54408,78 @@
 +if test "x$ac_cv_func_sysctlbyname" = x""yes; then :
 +  cat >>confdefs.h <<_ACEOF
 +#define HAVE_SYSCTLBYNAME 1
+ _ACEOF
+ 
++fi
++done
+ 
+ 
+-else
++#############################
++# 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
  
++fi
+ 
+-			# getspnam was not found in libsecurity
+-			# nothing to do here by default
+-			true
++done
+ 
++if test x"$ac_cv_header_gpfs_gpl_h" = x"yes"; then
+ 
+-fi
++$as_echo "#define HAVE_GPFS 1" >>confdefs.h
+ 
+-	  ;;
+-        esac
++    default_shared_modules="$default_shared_modules vfs_gpfs"
++fi
+ 
++#############################################
++# check if building on Isilon OneFS
++printf "%s" "checking for Isilon OneFS... "
++save_LIBS="$LIBS"
++LIBS="$LIBS -lisi_version"
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++#include <isi_version/isi_version.h>
++int
++main ()
++{
++get_isilon_copyright()
++  ;
++  return 0;
++}
++_ACEOF
++if ac_fn_c_try_link "$LINENO"; then :
++  samba_cv_HAVE_ONEFS=yes
++else
++  samba_cv_HAVE_ONEFS=no
  fi
- done
+-done
++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
  
++$as_echo "#define HAVE_ONEFS 1" >>confdefs.h
  
--
--
++    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"
+ 
 -for ac_func in getspnam
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
@@ -54267,26 +54490,31 @@
 -else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
-+#############################
-+# 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
+-_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
++# 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
  
 -/* 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.  */
++UNWIND_ARCH="unknown"
++if test x"$UNAME_I" != x"unknown"; then
++	UNWIND_ARCH="$UNAME_I"
++elif test x"$UNAME_M" != x"unknown"; then
++	UNWIND_ARCH="$UNAME_M"
++elif test x"$UNAME_P" != x"unknown"; then
++	UNWIND_ARCH="$UNAME_P"
 +fi
  
 -#ifdef __STDC__
@@ -54294,10 +54522,26 @@
 -#else
 -# include <assert.h>
 -#endif
-+done
++case "$UNWIND_ARCH" in
++	unknown)
++		# This probably won't link without
++		# the platform-specific libunwind.
++		LIBS="$LIBS -lunwind"
++		;;
++	i386|i586|i686)
++		# Add the platform-specific libunwind module.
++		LIBS="$LIBS -lunwind -lunwind-x86"
++		;;
++	*)
++		# Add the platform-specific libunwind module.
++		# based on uname -i, uname -m or uname -p
++		LIBS="$LIBS -lunwind -lunwind-$UNWIND_ARCH"
++		;;
++esac
  
 -#undef $ac_func
-+if test x"$ac_cv_header_gpfs_gpl_h" = 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
@@ -54311,25 +54555,20 @@
 -    something starting with __ and the normal name is an alias.  */
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
--#endif
-+$as_echo "#define HAVE_GPFS 1" >>confdefs.h
-+
-+    default_shared_modules="$default_shared_modules vfs_gpfs"
-+fi
++#ifdef HAVE_LIBUNWIND_H
++#include <libunwind.h>
+ #endif
  
-+#############################################
-+# check if building on Isilon OneFS
-+printf "%s" "checking for Isilon OneFS... "
-+save_LIBS="$LIBS"
-+LIBS="$LIBS -lisi_version"
-+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h.  */
-+#include <isi_version/isi_version.h>
  int
  main ()
  {
 -return $ac_func ();
-+get_isilon_copyright()
++
++	unw_context_t ctx; unw_cursor_t cur;
++	char buf[256]; unw_word_t off;
++	unw_getcontext(&ctx); unw_init_local(&cur, &ctx);
++	unw_get_proc_name(&cur, buf, sizeof(buf), &off);
++
    ;
    return 0;
  }
@@ -54356,48 +54595,18 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  eval "$as_ac_var=yes"
-+if ac_fn_c_try_link "$LINENO"; then :
-+  samba_cv_HAVE_ONEFS=yes
- else
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+  samba_cv_HAVE_ONEFS=no
-+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
- 
+-
 -	eval "$as_ac_var=no"
-+$as_echo "#define HAVE_ONEFS 1" >>confdefs.h
-+
-+    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
+-fi
++if ac_fn_c_try_link "$LINENO"; then :
  
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
-+LIBS="$save_LIBS"
-+
-+# 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"
-+elif test x"$UNAME_M" != x"unknown"; then
-+	UNWIND_ARCH="$UNAME_M"
-+elif test x"$UNAME_P" != x"unknown"; then
-+	UNWIND_ARCH="$UNAME_P"
- fi
+-fi
 -ac_res=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
@@ -54408,59 +54617,15 @@
 -  cat >>confdefs.h <<_ACEOF
 -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 -_ACEOF
++	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }
  
 -        # getspnam was found in libc or existing $LIBS
-+case "$UNWIND_ARCH" in
-+	unknown)
-+		# This probably won't link without
-+		# the platform-specific libunwind.
-+		LIBS="$LIBS -lunwind"
-+		;;
-+	i386|i586|i686)
-+		# Add the platform-specific libunwind module.
-+		LIBS="$LIBS -lunwind -lunwind-x86"
-+		;;
-+	*)
-+		# Add the platform-specific libunwind module.
-+		# based on uname -i, uname -m or uname -p
-+		LIBS="$LIBS -lunwind -lunwind-$UNWIND_ARCH"
-+		;;
-+esac
++$as_echo "#define HAVE_LIBUNWIND 1" >>confdefs.h
  
-+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h.  */
  
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_GETSPNAM 1
-+#ifdef HAVE_LIBUNWIND_H
-+#include <libunwind.h>
-+#endif
-+
-+int
-+main ()
-+{
-+
-+	unw_context_t ctx; unw_cursor_t cur;
-+	char buf[256]; unw_word_t off;
-+	unw_getcontext(&ctx); unw_init_local(&cur, &ctx);
-+	unw_get_proc_name(&cur, buf, sizeof(buf), &off);
-+
-+  ;
-+  return 0;
-+}
- _ACEOF
-+if ac_fn_c_try_link "$LINENO"; then :
- 
-+	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-+$as_echo "yes" >&6; }
- 
-+$as_echo "#define HAVE_LIBUNWIND 1" >>confdefs.h
- 
--else
- 
--        # getspnam was not found, try adding libsec
--	case " $LIBS " in
--          *\ -lsec\ *)
 +	# If we have libunwind, test whether we also have libunwind-ptrace
 +	# which would let us unwind arbitrary processes.
 +	save_LIBS=$LIBS
@@ -54470,21 +54635,28 @@
 +if test "x$ac_cv_header_libunwind_ptrace_h" = x""yes; then :
 +  cat >>confdefs.h <<_ACEOF
 +#define HAVE_LIBUNWIND_PTRACE_H 1
-+_ACEOF
+ _ACEOF
  
++fi
+ 
++done
+ 
+-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
-+fi
- 
+-
 -	    ;;
 -          *)
 -	    # 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
-+done
-+
 +	{ $as_echo "$as_me:${as_lineno-$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 :
@@ -54502,7 +54674,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -48680,541 +15628,646 @@
+@@ -48775,969 +15618,632 @@
  #ifdef __cplusplus
  extern "C"
  #endif
@@ -54702,28 +54874,17 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  eval "$as_ac_var=yes"
-+if ac_fn_c_try_link "$LINENO"; then :
-+
-+		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-+$as_echo "yes" >&6; }
-+
-+$as_echo "#define HAVE_LINUX_PTRACE 1" >>confdefs.h
-+
-+
- else
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
- 
+-
 -	eval "$as_ac_var=no"
 -fi
-+		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-+$as_echo "no" >&6; }
-+		LIBUNWIND_PTRACE=""
- 
+-
 -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
@@ -54731,74 +54892,39 @@
 -as_val=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+rm -f core conftest.err conftest.$ac_objext \
-+    conftest$ac_exeext conftest.$ac_ext
-+fi
-+
-+
-+
-+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`
-+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
+-
 -        # bigcrypt was found in libc or existing $LIBS
 -
-+fi
-+done
++if ac_fn_c_try_link "$LINENO"; then :
  
 -cat >>confdefs.h <<\_ACEOF
 -#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`
-+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
++		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }
  
-+fi
-+done
++$as_echo "#define HAVE_LINUX_PTRACE 1" >>confdefs.h
  
-+for ac_func in __getcwd _getcwd
-+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
-+fi
-+done
+ else
  
 -        # bigcrypt was not found, try adding libsecurity
 -	case " $LIBS " in
 -          *\ -lsecurity\ *)
-+for ac_func in __xstat __fxstat __lxstat
-+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 "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++		LIBUNWIND_PTRACE=""
  
 -		    # bigcrypt was not found and we already had libsecurity
 -		    # nothing to do here by default
 -		    true
 +fi
-+done
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
++fi
  
 -	    ;;
 -          *)
@@ -54812,15 +54938,7 @@
 -LIBS="-lsecurity  $LIBS"
 -cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
-+for ac_func in _stat _lstat _fstat __stat __lstat __fstat
-+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.  */
@@ -54839,15 +54957,12 @@
 -  ;
 -  return 0;
 -}
-+fi
-+done
 +
-+for ac_func in _acl __acl _facl __facl _open __open _chdir __chdir
++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`
 +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 :
++if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
 +  cat >>confdefs.h <<_ACEOF
 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
  _ACEOF
@@ -54881,12 +54996,11 @@
  fi
 +done
 +
-+for ac_func in _close __close _fchdir __fchdir _fcntl __fcntl
++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`
 +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 :
++if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
 +  cat >>confdefs.h <<_ACEOF
 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 +_ACEOF
@@ -54902,12 +55016,11 @@
 +done
  
 -		LIBS="-lsecurity $LIBS"
-+for ac_func in getdents __getdents _lseek __lseek _read __read
++for ac_func in __getcwd _getcwd
 +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 :
++if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
 +  cat >>confdefs.h <<_ACEOF
 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 +_ACEOF
@@ -54917,12 +55030,11 @@
  
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_BIGCRYPT 1
-+for ac_func in getdirentries _write __write _fork __fork
++for ac_func in __xstat __fxstat __lxstat
 +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 :
++if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
 +  cat >>confdefs.h <<_ACEOF
 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
  _ACEOF
@@ -54930,12 +55042,11 @@
 +fi
 +done
  
-+for ac_func in _stat64 __stat64 _fstat64 __fstat64 _lstat64 __lstat64
++for ac_func in _stat _lstat _fstat __stat __lstat __fstat
 +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 :
++if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
 +  cat >>confdefs.h <<_ACEOF
 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 +_ACEOF
@@ -54944,12 +55055,11 @@
 +fi
 +done
  
-+for ac_func in __sys_llseek llseek _llseek __llseek readdir64 _readdir64 __readdir64
++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`
 +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 :
++if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
 +  cat >>confdefs.h <<_ACEOF
 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 +_ACEOF
@@ -54960,12 +55070,11 @@
 +fi
 +done
  
-+for ac_func in pread _pread __pread pread64 _pread64 __pread64
++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 :
++if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
 +  cat >>confdefs.h <<_ACEOF
 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 +_ACEOF
@@ -54975,12 +55084,11 @@
  
 -	  ;;
 -        esac
-+for ac_func in pwrite _pwrite __pwrite pwrite64 _pwrite64 __pwrite64
++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"
-+eval as_val=\$$as_ac_var
-+   if test "x$as_val" = x""yes; then :
++if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
 +  cat >>confdefs.h <<_ACEOF
 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 +_ACEOF
@@ -54988,12 +55096,11 @@
  fi
  done
  
-+for ac_func in open64 _open64 __open64 creat64
++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"
-+eval as_val=\$$as_ac_var
-+   if test "x$as_val" = x""yes; then :
++if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
 +  cat >>confdefs.h <<_ACEOF
 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 +_ACEOF
@@ -55012,12 +55119,13 @@
 -else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
-+for ac_func in prctl
++for ac_func in _stat64 __stat64 _fstat64 __fstat64 _lstat64 __lstat64
 +do :
-+  ac_fn_c_check_func "$LINENO" "prctl" "ac_cv_func_prctl"
-+if test "x$ac_cv_func_prctl" = 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"
++if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
 +  cat >>confdefs.h <<_ACEOF
-+#define HAVE_PRCTL 1
++#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
  _ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
@@ -55025,23 +55133,29 @@
 -/* 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
-+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h.  */
++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"
++if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
++  cat >>confdefs.h <<_ACEOF
++#define `$as_echo "HAVE_$ac_func" | $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
@@ -55055,18 +55169,24 @@
 -    something starting with __ and the normal name is an alias.  */
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
-+#ifdef HAVE_SYS_PRCTL_H
-+#include <sys/prctl.h>
- #endif
+-#endif
++fi
++done
  
- int
- main ()
- {
+-int
+-main ()
+-{
 -return $ac_func ();
-+int i; i = prtcl(0);
-   ;
-   return 0;
- }
+-  ;
+-  return 0;
+-}
++for ac_func in pread _pread __pread pread64 _pread64 __pread64
++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"
++if eval test \"x\$"$as_ac_var"\" = 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"
@@ -55090,63 +55210,18 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  eval "$as_ac_var=yes"
-+if ac_fn_c_try_compile "$LINENO"; then :
-+
-+$as_echo "#define HAVE_PRCTL 1" >>confdefs.h
-+
-+fi
-+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-+
-+#
-+#
-+#
-+case "$host_os" in
-+    *linux* | gnu* | k*bsd*-gnu | kopensolaris*-gnu)
-+       # glibc <= 2.3.2 has a broken getgrouplist
-+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for good getgrouplist" >&5
-+$as_echo_n "checking for good getgrouplist... " >&6; }
-+if test "${samba_cv_linux_getgrouplist_ok+set}" = set; then :
-+  $as_echo_n "(cached) " >&6
- else
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+  if test "$cross_compiling" = yes; then :
-+  samba_cv_linux_getgrouplist_ok=cross
-+else
-+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h.  */
-+
-+#include <unistd.h>
-+#include <sys/utsname.h>
-+main() {
-+       /* glibc up to 2.3 has a broken getgrouplist */
-+#if defined(__GLIBC__) && defined(__GLIBC_MINOR__)
-+       int libc_major = __GLIBC__;
-+       int libc_minor = __GLIBC_MINOR__;
-+
-+       if (libc_major < 2)
-+              exit(1);
-+       if ((libc_major == 2) && (libc_minor <= 3))
-+              exit(1);
-+#endif
-+       exit(0);
-+}
  
 -	eval "$as_ac_var=no"
-+_ACEOF
-+if ac_fn_c_try_run "$LINENO"; then :
-+  samba_cv_linux_getgrouplist_ok=yes
-+else
-+  samba_cv_linux_getgrouplist_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
++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
@@ -55154,77 +55229,53 @@
 -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_linux_getgrouplist_ok" >&5
-+$as_echo "$samba_cv_linux_getgrouplist_ok" >&6; }
-+       if test x"$samba_cv_linux_getgrouplist_ok" = x"yes"; then
-+
-+$as_echo "#define HAVE_GETGROUPLIST 1" >>confdefs.h
-+
-+       fi
-+       ;;
-+    *)
-+       for ac_func in getgrouplist
++for ac_func in pwrite _pwrite __pwrite pwrite64 _pwrite64 __pwrite64
 +do :
-+  ac_fn_c_check_func "$LINENO" "getgrouplist" "ac_cv_func_getgrouplist"
-+if test "x$ac_cv_func_getgrouplist" = 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"
++if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
    cat >>confdefs.h <<_ACEOF
--#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-+#define HAVE_GETGROUPLIST 1
+ #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
  _ACEOF
  
 -        # bigcrypt was found in libc or existing $LIBS
+-
 +fi
 +done
  
-+       ;;
-+esac
- 
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_BIGCRYPT 1
--_ACEOF
-+#
-+# stat64 family may need <sys/stat.h> on some systems, notably ReliantUNIX
-+#
++for ac_func in open64 _open64 __open64 creat64
++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"
++if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
++  cat >>confdefs.h <<_ACEOF
++#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+ _ACEOF
  
-+if test x$ac_cv_func_stat64 = xno ; then
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stat64 in <sys/stat.h>" >&5
-+$as_echo_n "checking for stat64 in <sys/stat.h>... " >&6; }
-+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h.  */
++fi
++done
  
-+#if defined(HAVE_UNISTD_H)
-+#include <unistd.h>
-+#endif
-+#include <sys/stat.h>
++for ac_func in prctl
++do :
++  ac_fn_c_check_func "$LINENO" "prctl" "ac_cv_func_prctl"
++if test "x$ac_cv_func_prctl" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_PRCTL 1
++_ACEOF
  
 -else
-+int
-+main ()
-+{
-+struct stat64 st64; exit(stat64(".",&st64));
-+  ;
-+  return 0;
-+}
-+_ACEOF
-+if ac_fn_c_try_link "$LINENO"; then :
-+  ac_cv_func_stat64=yes
-+fi
-+rm -f core conftest.err conftest.$ac_objext \
-+    conftest$ac_exeext conftest.$ac_ext
-+  { $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
- 
+-
 -        # bigcrypt was not found, try adding libsec
 -	case " $LIBS " in
 -          *\ -lsec\ *)
-+$as_echo "#define HAVE_STAT64 1" >>confdefs.h
++fi
++done
  
 -		    # bigcrypt was not found and we already had libsec
 -		    # nothing to do here by default
 -		    true
-+  fi
-+fi
  
 -	    ;;
 -          *)
@@ -55238,44 +55289,10 @@
 -LIBS="-lsec  $LIBS"
 -cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
-+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; }
-+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h.  */
-+
-+#if defined(HAVE_UNISTD_H)
-+#include <unistd.h>
-+#endif
-+#include <sys/stat.h>
-+
-+int
-+main ()
-+{
-+struct stat64 st64; exit(lstat64(".",&st64));
-+  ;
-+  return 0;
-+}
- _ACEOF
+-_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+if ac_fn_c_try_link "$LINENO"; then :
-+  ac_cv_func_lstat64=yes
-+fi
-+rm -f core conftest.err conftest.$ac_objext \
-+    conftest$ac_exeext conftest.$ac_ext
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_lstat64" >&5
-+$as_echo "$ac_cv_func_lstat64" >&6; }
-+  if test x$ac_cv_func_lstat64 = xyes ; then
-+    $as_echo "#define HAVE_LSTAT64 Whether lstat64() is available" >>confdefs.h
-+
-+  fi
-+fi
-+
-+if test x$ac_cv_func_fstat64 = xno ; then
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fstat64 in <sys/stat.h>" >&5
-+$as_echo_n "checking for fstat64 in <sys/stat.h>... " >&6; }
-+  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.
@@ -55283,17 +55300,16 @@
 -   builtin and then its argument prototype would still apply.  */
 -#ifdef __cplusplus
 -extern "C"
-+#if defined(HAVE_UNISTD_H)
-+#include <unistd.h>
++#ifdef HAVE_SYS_PRCTL_H
++#include <sys/prctl.h>
  #endif
 -char bigcrypt ();
-+#include <sys/stat.h>
 +
  int
  main ()
  {
 -return bigcrypt ();
-+struct stat64 st64; exit(fstat64(0,&st64));
++int i; i = prtcl(0);
    ;
    return 0;
  }
@@ -55323,97 +55339,11 @@
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+if ac_fn_c_try_link "$LINENO"; then :
-+  ac_cv_func_fstat64=yes
-+fi
-+rm -f core conftest.err conftest.$ac_objext \
-+    conftest$ac_exeext conftest.$ac_ext
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fstat64" >&5
-+$as_echo "$ac_cv_func_fstat64" >&6; }
-+  if test x$ac_cv_func_fstat64 = xyes ; then
-+
-+$as_echo "#define HAVE_FSTAT64 1" >>confdefs.h
-+
-+  fi
-+fi
-+
-+#################################################
-+# Check whether struct stat has timestamps with sub-second resolution.
-+#
-+
-+samba_cv_stat_hires=no
-+ac_fn_c_check_member "$LINENO" "struct stat" "st_mtim.tv_nsec" "ac_cv_member_struct_stat_st_mtim_tv_nsec" "$ac_includes_default"
-+if test "x$ac_cv_member_struct_stat_st_mtim_tv_nsec" = x""yes; then :
-+
-+cat >>confdefs.h <<_ACEOF
-+#define HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC 1
-+_ACEOF
-+
-+# Linux, Solaris
-+	samba_cv_stat_hires=yes
-+fi
-+
-+ac_fn_c_check_member "$LINENO" "struct stat" "st_mtimensec" "ac_cv_member_struct_stat_st_mtimensec" "$ac_includes_default"
-+if test "x$ac_cv_member_struct_stat_st_mtimensec" = x""yes; then :
-+
-+cat >>confdefs.h <<_ACEOF
-+#define HAVE_STRUCT_STAT_ST_MTIMENSEC 1
-+_ACEOF
-+
-+# BSD, if defined _POSIX_SOURCE
-+	samba_cv_stat_hires=yes
-+fi
-+
-+ac_fn_c_check_member "$LINENO" "struct stat" "st_mtimespec.tv_nsec" "ac_cv_member_struct_stat_st_mtimespec_tv_nsec" "$ac_includes_default"
-+if test "x$ac_cv_member_struct_stat_st_mtimespec_tv_nsec" = x""yes; then :
-+
-+cat >>confdefs.h <<_ACEOF
-+#define HAVE_STRUCT_STAT_ST_MTIMESPEC_TV_NSEC 1
-+_ACEOF
-+
-+# BSD, if not defined _POSIX_SOURCE
-+	samba_cv_stat_hires=yes
-+fi
-+
-+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 :
-+
-+cat >>confdefs.h <<_ACEOF
-+#define HAVE_STRUCT_STAT_ST_MTIME_N 1
-+_ACEOF
-+
-+# AIX
-+	samba_cv_stat_hires=yes
-+fi
-+
-+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 :
-+
-+cat >>confdefs.h <<_ACEOF
-+#define HAVE_STRUCT_STAT_ST_UMTIME 1
-+_ACEOF
-+
-+# Tru64
-+	samba_cv_stat_hires=yes
-+fi
-+
-+
-+if test x"$samba_cv_stat_hires" = x"yes" ; then
-+
-+$as_echo "#define HAVE_STAT_HIRES_TIMESTAMPS 1" >>confdefs.h
-+
-+fi
-+
-+# recent FreeBSD, NetBSD have creation timestamps called birthtime:
-+ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtimespec.tv_nsec" "ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" "$ac_includes_default"
-+if test "x$ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" = x""yes; then :
-+
-+cat >>confdefs.h <<_ACEOF
-+#define HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC 1
-+_ACEOF
++if ac_fn_c_try_compile "$LINENO"; then :
  
 -	ac_cv_lib_sec_bigcrypt=no
 -fi
++$as_echo "#define HAVE_PRCTL 1" >>confdefs.h
  
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
@@ -55423,79 +55353,103 @@
 -{ $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="-lsec $LIBS"
-+ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtime" "ac_cv_member_struct_stat_st_birthtime" "$ac_includes_default"
-+if test "x$ac_cv_member_struct_stat_st_birthtime" = x""yes; then :
-+
-+cat >>confdefs.h <<_ACEOF
-+#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
-+_ACEOF
- 
-+ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtimensec" "ac_cv_member_struct_stat_st_birthtimensec" "$ac_includes_default"
-+if test "x$ac_cv_member_struct_stat_st_birthtimensec" = x""yes; then :
- 
+-
+-
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_BIGCRYPT 1
-+cat >>confdefs.h <<_ACEOF
-+#define HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC 1
- _ACEOF
+-_ACEOF
+-
+-
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  
++#
++#
++#
++case "$host_os" in
++    *linux* | gnu* | k*bsd*-gnu | kopensolaris*-gnu)
++       # glibc <= 2.3.2 has a broken getgrouplist
++       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for good getgrouplist" >&5
++$as_echo_n "checking for good getgrouplist... " >&6; }
++if test "${samba_cv_linux_getgrouplist_ok+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  if test "$cross_compiling" = yes; then :
++  samba_cv_linux_getgrouplist_ok=cross
+ else
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
  
-+fi
++#include <unistd.h>
++#include <sys/utsname.h>
++main() {
++       /* glibc up to 2.3 has a broken getgrouplist */
++#if defined(__GLIBC__) && defined(__GLIBC_MINOR__)
++       int libc_major = __GLIBC__;
++       int libc_minor = __GLIBC_MINOR__;
  
--else
-+fi
- 
- 
 -			# bigcrypt was not found in libsec
 -			# nothing to do here by default
 -			true
++       if (libc_major < 2)
++              exit(1);
++       if ((libc_major == 2) && (libc_minor <= 3))
++              exit(1);
++#endif
++       exit(0);
++}
  
-+{ $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
++_ACEOF
++if ac_fn_c_try_run "$LINENO"; then :
++  samba_cv_linux_getgrouplist_ok=yes
 +else
++  samba_cv_linux_getgrouplist_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
-+	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h.  */
-+#include <sys/stat.h>
-+int
-+main ()
-+{
+ fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $samba_cv_linux_getgrouplist_ok" >&5
++$as_echo "$samba_cv_linux_getgrouplist_ok" >&6; }
++       if test x"$samba_cv_linux_getgrouplist_ok" = x"yes"; then
  
 -	  ;;
 -        esac
-+		int a = UF_DOS_ARCHIVE;
-+		int h = UF_DOS_HIDDEN;
-+		int r = UF_DOS_RO;
-+		int s = UF_DOS_SYSTEM;
-+		int i = UF_DOS_NOINDEX;
-+		int f = UF_DOS_FLAGS;
++$as_echo "#define HAVE_GETGROUPLIST 1" >>confdefs.h
++
++       fi
++       ;;
++    *)
++       for ac_func in getgrouplist
++do :
++  ac_fn_c_check_func "$LINENO" "getgrouplist" "ac_cv_func_getgrouplist"
++if test "x$ac_cv_func_getgrouplist" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_GETGROUPLIST 1
++_ACEOF
  
-+  ;
-+  return 0;
-+}
-+_ACEOF
-+if ac_fn_c_try_compile "$LINENO"; then :
-+  samba_cv_stat_dos_flags=yes
-+else
-+  samba_cv_stat_dos_flags=no
  fi
--done
-+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
  
-+fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $samba_cv_stat_dos_flags" >&5
-+$as_echo "$samba_cv_stat_dos_flags" >&6; }
++       ;;
++esac
  
-+if test x"$samba_cv_stat_dos_flags" = x"yes" ; then
++#
++# stat64 family may need <sys/stat.h> on some systems, notably ReliantUNIX
++#
  
-+$as_echo "#define HAVE_STAT_DOS_FLAGS 1" >>confdefs.h
++if test x$ac_cv_func_stat64 = xno ; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stat64 in <sys/stat.h>" >&5
++$as_echo_n "checking for stat64 in <sys/stat.h>... " >&6; }
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
  
-+fi
++#if defined(HAVE_UNISTD_H)
++#include <unistd.h>
++#endif
++#include <sys/stat.h>
  
 -for ac_func in getprpwnam
 -do
@@ -55503,22 +55457,21 @@
 -{ $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
-+#####################################
-+# needed for SRV lookups
-+{ $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
+-  $as_echo_n "(cached) " >&6
+-else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
--_ACEOF
++int
++main ()
++{
++struct stat64 st64; exit(stat64(".",&st64));
++  ;
++  return 0;
++}
+ _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.  */
+-/* 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
@@ -55527,35 +55480,54 @@
 -    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.  */
--
++if ac_fn_c_try_link "$LINENO"; then :
++  ac_cv_func_stat64=yes
++fi
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
++  { $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
+ 
 -#ifdef __STDC__
 -# include <limits.h>
 -#else
 -# include <assert.h>
 -#endif
--
++$as_echo "#define HAVE_STAT64 1" >>confdefs.h
+ 
 -#undef $ac_func
++  fi
++fi
  
- /* Override any GCC internal prototype to avoid an error.
-    Use char because int might match the return type of a GCC
-@@ -49222,100 +16275,43 @@
- #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
 -    something starting with __ and the normal name is an alias.  */
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
--#endif
--
-+char dn_expand ();
++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; }
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++
++#if defined(HAVE_UNISTD_H)
++#include <unistd.h>
+ #endif
++#include <sys/stat.h>
+ 
  int
  main ()
  {
 -return $ac_func ();
-+return dn_expand ();
++struct stat64 st64; exit(lstat64(".",&st64));
    ;
    return 0;
  }
@@ -55582,22 +55554,25 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  eval "$as_ac_var=yes"
-+if ac_fn_c_try_link "$LINENO"; then :
-+  ac_cv_lib_resolv_dn_expand=yes
- else
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	eval "$as_ac_var=no"
-+  ac_cv_lib_resolv_dn_expand=no
++if ac_fn_c_try_link "$LINENO"; then :
++  ac_cv_func_lstat64=yes
  fi
--
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_lstat64" >&5
++$as_echo "$ac_cv_func_lstat64" >&6; }
++  if test x$ac_cv_func_lstat64 = xyes ; then
++    $as_echo "#define HAVE_LSTAT64 Whether lstat64() is available" >>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
++  fi
  fi
 -ac_res=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
@@ -55606,10 +55581,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
+-  cat >>confdefs.h <<_ACEOF
 -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 -_ACEOF
 -
@@ -55618,13 +55590,10 @@
 -
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_GETPRPWNAM 1
-+#define HAVE_LIBRESOLV 1
- _ACEOF
- 
-+  LIBS="-lresolv $LIBS"
- 
-+fi
- 
+-_ACEOF
+-
+-
+-
 -else
 -
 -        # getprpwnam was not found, try adding libsecurity
@@ -55634,41 +55603,44 @@
 -		    # getprpwnam was not found and we already had libsecurity
 -		    # 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
-+{ $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
+-  $as_echo_n "(cached) " >&6
+-else
+-  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="-lresolv  $LIBS"
-+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++if test x$ac_cv_func_fstat64 = xno ; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fstat64 in <sys/stat.h>" >&5
++$as_echo_n "checking for fstat64 in <sys/stat.h>... " >&6; }
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
  
- /* Override any GCC internal prototype to avoid an error.
-@@ -49324,111 +16320,44 @@
- #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"
++#if defined(HAVE_UNISTD_H)
++#include <unistd.h>
  #endif
 -char getprpwnam ();
-+char _dn_expand ();
++#include <sys/stat.h>
++
  int
  main ()
  {
 -return getprpwnam ();
-+return _dn_expand ();
++struct stat64 st64; exit(fstat64(0,&st64));
    ;
    return 0;
  }
@@ -55695,104 +55667,142 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  ac_cv_lib_security_getprpwnam=yes
-+if ac_fn_c_try_link "$LINENO"; then :
-+  ac_cv_lib_resolv__dn_expand=yes
- else
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	ac_cv_lib_security_getprpwnam=no
-+  ac_cv_lib_resolv__dn_expand=no
++if ac_fn_c_try_link "$LINENO"; then :
++  ac_cv_func_fstat64=yes
  fi
--
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fstat64" >&5
++$as_echo "$ac_cv_func_fstat64" >&6; }
++  if test x$ac_cv_func_fstat64 = xyes ; then
+ 
 -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
++$as_echo "#define HAVE_FSTAT64 1" >>confdefs.h
++
++  fi
  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
--
+ 
 -		LIBS="-lsecurity $LIBS"
--
--
++#################################################
++# Check whether struct stat has timestamps with sub-second resolution.
++#
+ 
++samba_cv_stat_hires=no
++ac_fn_c_check_member "$LINENO" "struct stat" "st_mtim.tv_nsec" "ac_cv_member_struct_stat_st_mtim_tv_nsec" "$ac_includes_default"
++if test "x$ac_cv_member_struct_stat_st_mtim_tv_nsec" = x""yes; then :
+ 
 -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
++cat >>confdefs.h <<_ACEOF
++#define HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC 1
  _ACEOF
  
--
--
++# Linux, Solaris
++	samba_cv_stat_hires=yes
++fi
+ 
++ac_fn_c_check_member "$LINENO" "struct stat" "st_mtimensec" "ac_cv_member_struct_stat_st_mtimensec" "$ac_includes_default"
++if test "x$ac_cv_member_struct_stat_st_mtimensec" = x""yes; then :
+ 
 -else
--
--
++cat >>confdefs.h <<_ACEOF
++#define HAVE_STRUCT_STAT_ST_MTIMENSEC 1
++_ACEOF
+ 
++# BSD, if defined _POSIX_SOURCE
++	samba_cv_stat_hires=yes
++fi
+ 
 -			# getprpwnam was not found in libsecurity
 -			# nothing to do here by default
 -			true
--
--
--fi
--
++ac_fn_c_check_member "$LINENO" "struct stat" "st_mtimespec.tv_nsec" "ac_cv_member_struct_stat_st_mtimespec_tv_nsec" "$ac_includes_default"
++if test "x$ac_cv_member_struct_stat_st_mtimespec_tv_nsec" = x""yes; then :
+ 
++cat >>confdefs.h <<_ACEOF
++#define HAVE_STRUCT_STAT_ST_MTIMESPEC_TV_NSEC 1
++_ACEOF
+ 
++# BSD, if not defined _POSIX_SOURCE
++	samba_cv_stat_hires=yes
+ fi
+ 
 -	  ;;
 -        esac
-+  LIBS="-lresolv $LIBS"
++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 :
++
++cat >>confdefs.h <<_ACEOF
++#define HAVE_STRUCT_STAT_ST_MTIME_N 1
++_ACEOF
  
++# AIX
++	samba_cv_stat_hires=yes
  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 :
+ 
++cat >>confdefs.h <<_ACEOF
++#define HAVE_STRUCT_STAT_ST_UMTIME 1
++_ACEOF
+ 
++# Tru64
++	samba_cv_stat_hires=yes
++fi
+ 
 -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
 -$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 __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_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="-lresolv  $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.  */
--
++if test x"$samba_cv_stat_hires" = x"yes" ; then
+ 
 -#ifdef __STDC__
 -# include <limits.h>
 -#else
 -# include <assert.h>
 -#endif
--
++$as_echo "#define HAVE_STAT_HIRES_TIMESTAMPS 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
-@@ -49436,100 +16365,79 @@
- #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
@@ -55800,16 +55810,19 @@
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
 -#endif
--
-+char __dn_expand ();
- int
- main ()
- {
++# recent FreeBSD, NetBSD have creation timestamps called birthtime:
++ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtimespec.tv_nsec" "ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" "$ac_includes_default"
++if test "x$ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" = x""yes; then :
+ 
+-int
+-main ()
+-{
 -return $ac_func ();
-+return __dn_expand ();
-   ;
-   return 0;
- }
+-  ;
+-  return 0;
+-}
++cat >>confdefs.h <<_ACEOF
++#define HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC 1
  _ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
@@ -55833,22 +55846,16 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  eval "$as_ac_var=yes"
-+if ac_fn_c_try_link "$LINENO"; then :
-+  ac_cv_lib_resolv___dn_expand=yes
- else
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
+ 
 -	eval "$as_ac_var=no"
-+  ac_cv_lib_resolv___dn_expand=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
-+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"'`
@@ -55857,92 +55864,83 @@
 -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
+-  cat >>confdefs.h <<_ACEOF
 -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-+#define HAVE_LIBRESOLV 1
- _ACEOF
+-_ACEOF
  
 -        # getprpwnam was found in libc or existing $LIBS
-+  LIBS="-lresolv $LIBS"
++ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtime" "ac_cv_member_struct_stat_st_birthtime" "$ac_includes_default"
++if test "x$ac_cv_member_struct_stat_st_birthtime" = x""yes; then :
++
++cat >>confdefs.h <<_ACEOF
++#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
++_ACEOF
  
-+fi
++ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtimensec" "ac_cv_member_struct_stat_st_birthtimensec" "$ac_includes_default"
++if test "x$ac_cv_member_struct_stat_st_birthtimensec" = x""yes; then :
  
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_GETPRPWNAM 1
-+
-+#
-+# Check for the functions putprpwnam, set_auth_parameters,
-+# getspnam, bigcrypt and getprpwnam in -lsec and -lsecurity
-+# Needed for OSF1 and HPUX.
-+#
-+
-+
-+  for ac_func in putprpwnam
-+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
-+#define HAVE_PUTPRPWNAM 1
++cat >>confdefs.h <<_ACEOF
++#define HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC 1
  _ACEOF
  
-+        # putprpwnam was found in libc or existing $LIBS
-+
-+
-+$as_echo "#define HAVE_PUTPRPWNAM 1" >>confdefs.h
-+
  
++fi
  
- else
+-else
++fi
  
 -        # getprpwnam was not found, try adding libsec
-+        # putprpwnam was not found, try adding libsecurity
- 	case " $LIBS " in
+-	case " $LIBS " in
 -          *\ -lsec\ *)
-+          *\ -lsecurity\ *)
  
 -		    # getprpwnam was not found and we already had libsec
-+		    # putprpwnam was not found and we already had libsecurity
- 		    # nothing to do here by default
- 		    true
+-		    # 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
-+	    # 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 "$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
+-  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
-+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.
-@@ -49538,66 +16446,39 @@
- #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 getprpwnam ();
-+char putprpwnam ();
++	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++#include <sys/stat.h>
  int
  main ()
  {
 -return getprpwnam ();
-+return putprpwnam ();
++
++		int a = UF_DOS_ARCHIVE;
++		int h = UF_DOS_HIDDEN;
++		int r = UF_DOS_RO;
++		int s = UF_DOS_SYSTEM;
++		int i = UF_DOS_NOINDEX;
++		int f = UF_DOS_FLAGS;
++
    ;
    return 0;
  }
@@ -55969,52 +55967,56 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  ac_cv_lib_sec_getprpwnam=yes
-+if ac_fn_c_try_link "$LINENO"; then :
-+  ac_cv_lib_security_putprpwnam=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_sec_getprpwnam=no
-+  ac_cv_lib_security_putprpwnam=no
++  samba_cv_stat_dos_flags=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
- 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
-+{ $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="-lsec $LIBS"
-+		LIBS="-lsecurity $LIBS"
- 
- 
+-
+-
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_GETPRPWNAM 1
 -_ACEOF
-+$as_echo "#define HAVE_PUTPRPWNAM 1" >>confdefs.h
- 
- 
- 
- else
- 
- 
+-
+-
+-
+-else
+-
+-
 -			# getprpwnam was not found in libsec
-+			# putprpwnam was not found in libsecurity
- 			# nothing to do here by default
- 			true
+-			# nothing to do here by default
+-			true
+-
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $samba_cv_stat_dos_flags" >&5
++$as_echo "$samba_cv_stat_dos_flags" >&6; }
  
-@@ -49612,123 +16493,42 @@
+-fi
++if test x"$samba_cv_stat_dos_flags" = x"yes" ; then
  
+-	  ;;
+-        esac
++$as_echo "#define HAVE_STAT_DOS_FLAGS 1" >>confdefs.h
  
+ fi
+-done
+-
+-
  
 -
 -for ac_func in strsignal
@@ -56023,20 +56025,22 @@
 -{ $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
++#####################################
++# needed for SRV lookups
++{ $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
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
-+  for ac_func in putprpwnam
-+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
-+#define HAVE_PUTPRPWNAM 1
- _ACEOF
+-_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
++  ac_check_lib_save_LIBS=$LIBS
++LIBS="-lresolv  $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
@@ -56045,22 +56049,21 @@
 -    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
-+        # putprpwnam was found in libc or existing $LIBS
- 
+-
 -#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
+@@ -49745,85 +16251,43 @@
+ #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
@@ -56068,16 +56071,17 @@
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
 -#endif
-+$as_echo "#define HAVE_PUTPRPWNAM 1" >>confdefs.h
- 
--int
--main ()
--{
+-
++char dn_expand ();
+ int
+ main ()
+ {
 -return $ac_func ();
--  ;
--  return 0;
--}
--_ACEOF
++return dn_expand ();
+   ;
+   return 0;
+ }
+ _ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -56100,17 +56104,23 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  eval "$as_ac_var=yes"
--else
++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
- 
+-
 -	eval "$as_ac_var=no"
--fi
- 
++  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
--fi
++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"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
@@ -56118,20 +56128,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
++{ $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
--_ACEOF
-+else
++#define HAVE_LIBRESOLV 1
+ _ACEOF
  
 -fi
 -done
-+        # putprpwnam was not found, try adding libsec
-+	case " $LIBS " in
-+          *\ -lsec\ *)
++  LIBS="-lresolv $LIBS"
  
-+		    # putprpwnam was not found and we already had libsec
-+		    # nothing to do here by default
-+		    true
++fi
  
 -############################################
 -# Check if we have libattr
@@ -56140,12 +56149,9 @@
 -	{ $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
-+	    ;;
-+          *)
-+	    # putprpwnam was not found, try adding libsec
-+	    { $as_echo "$as_me:${as_lineno-$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 _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_func_search_save_LIBS=$LIBS
@@ -56155,22 +56161,22 @@
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
 +  ac_check_lib_save_LIBS=$LIBS
-+LIBS="-lsec  $LIBS"
++LIBS="-lresolv  $LIBS"
 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -49737,174 +16537,47 @@
+@@ -49832,108 +16296,44 @@
  #ifdef __cplusplus
  extern "C"
  #endif
 -char getproplist ();
-+char putprpwnam ();
++char _dn_expand ();
  int
  main ()
  {
 -return getproplist ();
-+return putprpwnam ();
++return _dn_expand ();
    ;
    return 0;
  }
@@ -56221,48 +56227,57 @@
 -if test "${ac_cv_search_getproplist+set}" = set; then
 -  :
 +if ac_fn_c_try_link "$LINENO"; then :
-+  ac_cv_lib_sec_putprpwnam=yes
++  ac_cv_lib_resolv__dn_expand=yes
  else
 -  ac_cv_search_getproplist=no
-+  ac_cv_lib_sec_putprpwnam=no
- fi
+-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
++  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"
-+{ $as_echo "$as_me:${as_lineno-$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 :
+-
++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
  
--fi
-+		LIBS="-lsec $LIBS"
++  LIBS="-lresolv $LIBS"
  
++fi
  
-+$as_echo "#define HAVE_PUTPRPWNAM 1" >>confdefs.h
- 
- 
- 
+-
+-
 -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
 -$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
++{ $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
 -  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="-lresolv  $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
@@ -56277,15 +56292,15 @@
 -#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
+ /* Override any GCC internal prototype to avoid an error.
+    Use char because int might match the return type of a GCC
+@@ -49941,103 +16341,80 @@
+ #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
@@ -56293,18 +56308,17 @@
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
 -#endif
-+			# putprpwnam was not found in libsec
-+			# nothing to do here by default
-+			true
- 
--int
--main ()
--{
+-
++char __dn_expand ();
+ int
+ main ()
+ {
 -return $ac_func ();
--  ;
--  return 0;
--}
--_ACEOF
++return __dn_expand ();
+   ;
+   return 0;
+ }
+ _ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -56327,17 +56341,23 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  eval "$as_ac_var=yes"
--else
++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
- 
+-
 -	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
--fi
++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"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
@@ -56345,19 +56365,42 @@
 -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_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
--_ACEOF
-+	  ;;
-+        esac
++#define HAVE_LIBRESOLV 1
+ _ACEOF
  
++  LIBS="-lresolv $LIBS"
++
  fi
- done
-@@ -49912,138 +16585,43 @@
+-done
  
  
++#
++# Check for the functions putprpwnam, set_auth_parameters,
++# getspnam, bigcrypt and getprpwnam in -lsec and -lsecurity
++# Needed for OSF1 and HPUX.
++#
++
++
++  for ac_func in putprpwnam
++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
++#define HAVE_PUTPRPWNAM 1
++_ACEOF
++
++        # 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
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
@@ -56365,43 +56408,54 @@
 -$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.  */
-+  for ac_func in set_auth_parameters
-+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 HAVE_SET_AUTH_PARAMETERS 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.  */
++        # putprpwnam was not found, try adding libsecurity
++	case " $LIBS " in
++          *\ -lsecurity\ *)
  
 -#ifdef __STDC__
 -# include <limits.h>
 -#else
 -# include <assert.h>
 -#endif
-+        # set_auth_parameters was found in libc or existing $LIBS
++		    # 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
+@@ -50045,100 +16422,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
@@ -56409,16 +56463,17 @@
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
 -#endif
-+$as_echo "#define HAVE_SET_AUTH_PARAMETERS 1" >>confdefs.h
- 
--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
@@ -56441,17 +56496,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
++  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
+ fi
  
 -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
@@ -56459,20 +56543,27 @@
 -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_func in putprpwnam
++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
 -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
--_ACEOF
-+else
++#define HAVE_PUTPRPWNAM 1
+ _ACEOF
  
 -fi
 -done
-+        # set_auth_parameters was not found, try adding libsecurity
-+	case " $LIBS " in
-+          *\ -lsecurity\ *)
++        # putprpwnam was found in libc or existing $LIBS
++
++
++$as_echo "#define HAVE_PUTPRPWNAM 1" >>confdefs.h
++
  
-+		    # set_auth_parameters was not found and we already had libsecurity
-+		    # nothing to do here by default
-+		    true
  
 -for ac_func in sizeof_proplist_entry
 -do
@@ -56480,43 +56571,52 @@
 -{ $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
-+	    ;;
-+          *)
-+	    # 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
+-  $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.  */
--
++        # putprpwnam was not found, try adding libsec
++	case " $LIBS " in
++          *\ -lsec\ *)
+ 
 -#ifdef __STDC__
 -# include <limits.h>
 -#else
 -# include <assert.h>
 -#endif
--
++		    # putprpwnam was not found and we already had libsec
++		    # nothing to do here by default
++		    true
+ 
 -#undef $ac_func
++	    ;;
++          *)
++	    # putprpwnam was not found, try adding libsec
++	    { $as_echo "$as_me:${as_lineno-$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_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
-@@ -50051,82 +16629,89 @@
+@@ -50146,82 +16513,90 @@
  #ifdef __cplusplus
  extern "C"
  #endif
@@ -56528,12 +56628,12 @@
 -choke me
 -#endif
 -
-+char set_auth_parameters ();
++char putprpwnam ();
  int
  main ()
  {
 -return $ac_func ();
-+return set_auth_parameters ();
++return putprpwnam ();
    ;
    return 0;
  }
@@ -56561,31 +56661,31 @@
 -       }; then
 -  eval "$as_ac_var=yes"
 +if ac_fn_c_try_link "$LINENO"; then :
-+  ac_cv_lib_security_set_auth_parameters=yes
++  ac_cv_lib_sec_putprpwnam=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+  ac_cv_lib_security_set_auth_parameters=no
++  ac_cv_lib_sec_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_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:${as_lineno-$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 :
 +
-+		LIBS="-lsecurity $LIBS"
++		LIBS="-lsec $LIBS"
 +
 +
-+$as_echo "#define HAVE_SET_AUTH_PARAMETERS 1" >>confdefs.h
++$as_echo "#define HAVE_PUTPRPWNAM 1" >>confdefs.h
 +
 +
 +
 +else
 +
 +
-+			# set_auth_parameters was not found in libsecurity
++			# putprpwnam was not found in libsec
 +			# nothing to do here by default
 +			true
 +
@@ -56611,6 +56711,7 @@
 +
 +
 +
++
 +  for ac_func in set_auth_parameters
 +do :
 +  ac_fn_c_check_func "$LINENO" "set_auth_parameters" "ac_cv_func_set_auth_parameters"
@@ -56636,20 +56737,20 @@
 +
 +else
 +
-+        # set_auth_parameters was not found, try adding libsec
++        # set_auth_parameters was not found, try adding libsecurity
 +	case " $LIBS " in
-+          *\ -lsec\ *)
++          *\ -lsecurity\ *)
 +
-+		    # set_auth_parameters was not found and we already had libsec
++		    # set_auth_parameters was not found and we already had libsecurity
 +		    # nothing to do here by default
 +		    true
 +
 +	    ;;
 +          *)
-+	    # 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 :
++	    # 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
 -  ac_func_search_save_LIBS=$LIBS
@@ -56659,12 +56760,12 @@
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
 +  ac_check_lib_save_LIBS=$LIBS
-+LIBS="-lsec  $LIBS"
++LIBS="-lsecurity  $LIBS"
 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -50135,109 +16720,92 @@
+@@ -50230,109 +16605,90 @@
  #ifdef __cplusplus
  extern "C"
  #endif
@@ -56709,21 +56810,21 @@
 -       }; then
 -  ac_cv_search_getxattr=$ac_res
 +if ac_fn_c_try_link "$LINENO"; then :
-+  ac_cv_lib_sec_set_auth_parameters=yes
++  ac_cv_lib_security_set_auth_parameters=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+  ac_cv_lib_sec_set_auth_parameters=no
++  ac_cv_lib_security_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
-+{ $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 :
++{ $as_echo "$as_me:${as_lineno-$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="-lsec $LIBS"
++		LIBS="-lsecurity $LIBS"
 +
 +
 +$as_echo "#define HAVE_SET_AUTH_PARAMETERS 1" >>confdefs.h
@@ -56747,7 +56848,7 @@
 -LIBS=$ac_func_search_save_LIBS
 +
 +
-+			# set_auth_parameters was not found in libsec
++			# set_auth_parameters was not found in libsecurity
 +			# nothing to do here by default
 +			true
 +
@@ -56765,22 +56866,20 @@
  fi
 +done
 +
-+
  
-+# UnixWare 7.x has its getspnam in -lgen
-+
-+  for ac_func in getspnam
+ 
++  for ac_func in set_auth_parameters
 +do :
-+  ac_fn_c_check_func "$LINENO" "getspnam" "ac_cv_func_getspnam"
-+if test "x$ac_cv_func_getspnam" = x""yes; then :
++  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 HAVE_GETSPNAM 1
++#define HAVE_SET_AUTH_PARAMETERS 1
 +_ACEOF
++
++        # set_auth_parameters was found in libc or existing $LIBS
  
-+        # getspnam was found in libc or existing $LIBS
  
- 
-+$as_echo "#define HAVE_GETSPNAM 1" >>confdefs.h
++$as_echo "#define HAVE_SET_AUTH_PARAMETERS 1" >>confdefs.h
 +
  
  
@@ -56806,36 +56905,36 @@
 -    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 libgen
++        # set_auth_parameters was not found, try adding libsec
 +	case " $LIBS " in
-+          *\ -lgen\ *)
++          *\ -lsec\ *)
  
 -#ifdef __STDC__
 -# include <limits.h>
 -#else
 -# include <assert.h>
 -#endif
-+		    # getspnam was not found and we already had libgen
++		    # set_auth_parameters was not found and we already had libsec
 +		    # nothing to do here by default
 +		    true
  
 -#undef $ac_func
 +	    ;;
 +          *)
-+	    # getspnam was not found, try adding libgen
-+	    { $as_echo "$as_me:${as_lineno-$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 :
++	    # 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_check_lib_save_LIBS=$LIBS
-+LIBS="-lgen  $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
-@@ -50245,65 +16813,47 @@
+@@ -50340,105 +16696,92 @@
  #ifdef __cplusplus
  extern "C"
  #endif
@@ -56847,12 +56946,12 @@
 -choke me
 -#endif
 -
-+char getspnam ();
++char set_auth_parameters ();
  int
  main ()
  {
 -return $ac_func ();
-+return getspnam ();
++return set_auth_parameters ();
    ;
    return 0;
  }
@@ -56880,33 +56979,33 @@
 -       }; then
 -  eval "$as_ac_var=yes"
 +if ac_fn_c_try_link "$LINENO"; then :
-+  ac_cv_lib_gen_getspnam=yes
++  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_gen_getspnam=no
-+fi
++  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
-+{ $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 :
++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 :
 +
-+		LIBS="-lgen $LIBS"
++		LIBS="-lsec $LIBS"
 +
 +
-+$as_echo "#define HAVE_GETSPNAM 1" >>confdefs.h
++$as_echo "#define HAVE_SET_AUTH_PARAMETERS 1" >>confdefs.h
 +
 +
 +
 +else
 +
 +
-+			# getspnam was not found in libgen
++			# set_auth_parameters was not found in libsec
 +			# nothing to do here by default
 +			true
 +
@@ -56931,10 +57030,11 @@
  
  fi
  done
-@@ -50311,39 +16861,43 @@
  
  
  
++# UnixWare 7.x has its getspnam in -lgen
++
 +  for ac_func in getspnam
 +do :
 +  ac_fn_c_check_func "$LINENO" "getspnam" "ac_cv_func_getspnam"
@@ -56942,7 +57042,7 @@
 +  cat >>confdefs.h <<_ACEOF
 +#define HAVE_GETSPNAM 1
 +_ACEOF
-+
+ 
 +        # getspnam was found in libc or existing $LIBS
 +
 +
@@ -56972,36 +57072,36 @@
 -    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 libsecurity
++        # getspnam was not found, try adding libgen
 +	case " $LIBS " in
-+          *\ -lsecurity\ *)
++          *\ -lgen\ *)
  
 -#ifdef __STDC__
 -# include <limits.h>
 -#else
 -# include <assert.h>
 -#endif
-+		    # getspnam was not found and we already had libsecurity
++		    # getspnam was not found and we already had libgen
 +		    # nothing to do here by default
 +		    true
  
 -#undef $ac_func
 +	    ;;
 +          *)
-+	    # getspnam was not found, try adding libsecurity
-+	    { $as_echo "$as_me:${as_lineno-$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 libgen
++	    { $as_echo "$as_me:${as_lineno-$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 :
 +  $as_echo_n "(cached) " >&6
 +else
 +  ac_check_lib_save_LIBS=$LIBS
-+LIBS="-lsecurity  $LIBS"
++LIBS="-lgen  $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
-@@ -50351,105 +16905,90 @@
+@@ -50446,65 +16789,47 @@
  #ifdef __cplusplus
  extern "C"
  #endif
@@ -57046,23 +57146,23 @@
 -       }; then
 -  eval "$as_ac_var=yes"
 +if ac_fn_c_try_link "$LINENO"; then :
-+  ac_cv_lib_security_getspnam=yes
++  ac_cv_lib_gen_getspnam=yes
  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
++  ac_cv_lib_gen_getspnam=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_getspnam" >&5
-+$as_echo "$ac_cv_lib_security_getspnam" >&6; }
-+if test "x$ac_cv_lib_security_getspnam" = x""yes; then :
++{ $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 :
 +
-+		LIBS="-lsecurity $LIBS"
++		LIBS="-lgen $LIBS"
 +
 +
 +$as_echo "#define HAVE_GETSPNAM 1" >>confdefs.h
@@ -57072,7 +57172,7 @@
 +else
 +
 +
-+			# getspnam was not found in libsecurity
++			# getspnam was not found in libgen
 +			# nothing to do here by default
 +			true
 +
@@ -57097,6 +57197,7 @@
  
  fi
  done
+@@ -50512,39 +16837,43 @@
  
  
  
@@ -57107,7 +57208,7 @@
 +  cat >>confdefs.h <<_ACEOF
 +#define HAVE_GETSPNAM 1
 +_ACEOF
- 
++
 +        # getspnam was found in libc or existing $LIBS
 +
 +
@@ -57137,36 +57238,36 @@
 -    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
++        # getspnam was not found, try adding libsecurity
 +	case " $LIBS " in
-+          *\ -lsec\ *)
++          *\ -lsecurity\ *)
  
 -#ifdef __STDC__
 -# include <limits.h>
 -#else
 -# include <assert.h>
 -#endif
-+		    # getspnam was not found and we already had libsec
++		    # getspnam was not found and we already had libsecurity
 +		    # 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 :
++	    # getspnam was not found, try adding libsecurity
++	    { $as_echo "$as_me:${as_lineno-$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_n "(cached) " >&6
 +else
 +  ac_check_lib_save_LIBS=$LIBS
-+LIBS="-lsec  $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
-@@ -50457,206 +16996,91 @@
+@@ -50552,103 +16881,90 @@
  #ifdef __cplusplus
  extern "C"
  #endif
@@ -57211,21 +57312,44 @@
 -       }; then
 -  eval "$as_ac_var=yes"
 +if ac_fn_c_try_link "$LINENO"; then :
-+  ac_cv_lib_sec_getspnam=yes
++  ac_cv_lib_security_getspnam=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
++  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
++{ $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 :
++
++		LIBS="-lsecurity $LIBS"
++
++
++$as_echo "#define HAVE_GETSPNAM 1" >>confdefs.h
++
++
++
++else
++
++
++			# getspnam was not found in libsecurity
++			# nothing to do here by default
++			true
++
+ 
 -	eval "$as_ac_var=no"
-+  ac_cv_lib_sec_getspnam=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
++	  ;;
++        esac
++
  fi
 -ac_res=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
@@ -57234,16 +57358,22 @@
 -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_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
 -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
--_ACEOF
-+{ $as_echo "$as_me:${as_lineno-$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 :
++#define HAVE_GETSPNAM 1
+ _ACEOF
  
 -fi
 -done
-+		LIBS="-lsec $LIBS"
++        # getspnam was found in libc or existing $LIBS
  
  
 +$as_echo "#define HAVE_GETSPNAM 1" >>confdefs.h
@@ -57272,24 +57402,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.  */
++        # 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 in libsec
-+			# nothing to do here by default
-+			true
++		    # 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
--   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
+@@ -50656,102 +16972,91 @@
+ #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
@@ -57297,16 +57442,17 @@
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
 -#endif
-+fi
- 
--int
--main ()
--{
+-
++char getspnam ();
+ int
+ main ()
+ {
 -return $ac_func ();
--  ;
--  return 0;
--}
--_ACEOF
++return getspnam ();
+   ;
+   return 0;
+ }
+ _ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -57329,20 +57475,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_sec_getspnam=yes
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+	  ;;
-+        esac
++  ac_cv_lib_sec_getspnam=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_sec_getspnam" >&5
++$as_echo "$ac_cv_lib_sec_getspnam" >&6; }
++if test "x$ac_cv_lib_sec_getspnam" = x""yes; then :
++
++		LIBS="-lsec $LIBS"
++
++
++$as_echo "#define HAVE_GETSPNAM 1" >>confdefs.h
++
++
++
++else
++
++
++			# getspnam was not found in libsec
++			# 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
@@ -57350,9 +57522,11 @@
 -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 bigcrypt
 +do :
 +  ac_fn_c_check_func "$LINENO" "bigcrypt" "ac_cv_func_bigcrypt"
@@ -57365,12 +57539,12 @@
 -fi
 -done
 +        # bigcrypt was found in libc or existing $LIBS
++
  
- 
 +$as_echo "#define HAVE_BIGCRYPT 1" >>confdefs.h
-+
  
  
+ 
 -for ac_func in setxattr lsetxattr fsetxattr
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
@@ -57422,7 +57596,7 @@
  
  /* Override any GCC internal prototype to avoid an error.
     Use char because int might match the return type of a GCC
-@@ -50664,103 +17088,90 @@
+@@ -50759,103 +17064,90 @@
  #ifdef __cplusplus
  extern "C"
  #endif
@@ -57468,9 +57642,7 @@
 -  eval "$as_ac_var=yes"
 +if ac_fn_c_try_link "$LINENO"; then :
 +  ac_cv_lib_security_bigcrypt=yes
- else
--  $as_echo "$as_me: failed program was:" >&5
--sed 's/^/| /' conftest.$ac_ext >&5
++else
 +  ac_cv_lib_security_bigcrypt=no
 +fi
 +rm -f core conftest.err conftest.$ac_objext \
@@ -57488,15 +57660,17 @@
 +
 +
 +
-+else
+ else
+-  $as_echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+ 
+-	eval "$as_ac_var=no"
 +
-+
 +			# bigcrypt was not found in libsecurity
 +			# nothing to do here by default
 +			true
 +
- 
--	eval "$as_ac_var=no"
++
  fi
  
 -rm -rf conftest.dSYM
@@ -57586,7 +57760,7 @@
  
  /* Override any GCC internal prototype to avoid an error.
     Use char because int might match the return type of a GCC
-@@ -50768,103 +17179,91 @@
+@@ -50863,103 +17155,91 @@
  #ifdef __cplusplus
  extern "C"
  #endif
@@ -57632,9 +57806,7 @@
 -  eval "$as_ac_var=yes"
 +if ac_fn_c_try_link "$LINENO"; then :
 +  ac_cv_lib_sec_bigcrypt=yes
- else
--  $as_echo "$as_me: failed program was:" >&5
--sed 's/^/| /' conftest.$ac_ext >&5
++else
 +  ac_cv_lib_sec_bigcrypt=no
 +fi
 +rm -f core conftest.err conftest.$ac_objext \
@@ -57652,15 +57824,17 @@
 +
 +
 +
-+else
+ else
+-  $as_echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+ 
+-	eval "$as_ac_var=no"
 +
-+
 +			# bigcrypt was not found in libsec
 +			# nothing to do here by default
 +			true
 +
- 
--	eval "$as_ac_var=no"
++
  fi
  
 -rm -rf conftest.dSYM
@@ -57751,7 +57925,7 @@
  
  /* Override any GCC internal prototype to avoid an error.
     Use char because int might match the return type of a GCC
-@@ -50872,107 +17271,90 @@
+@@ -50967,107 +17247,90 @@
  #ifdef __cplusplus
  extern "C"
  #endif
@@ -57797,7 +57971,9 @@
 -  eval "$as_ac_var=yes"
 +if ac_fn_c_try_link "$LINENO"; then :
 +  ac_cv_lib_security_getprpwnam=yes
-+else
+ else
+-  $as_echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
 +  ac_cv_lib_security_getprpwnam=no
 +fi
 +rm -f core conftest.err conftest.$ac_objext \
@@ -57815,17 +57991,15 @@
 +
 +
 +
- else
--  $as_echo "$as_me: failed program was:" >&5
--sed 's/^/| /' conftest.$ac_ext >&5
- 
--	eval "$as_ac_var=no"
++else
 +
++
 +			# getprpwnam was not found in libsecurity
 +			# nothing to do here by default
 +			true
 +
-+
+ 
+-	eval "$as_ac_var=no"
  fi
  
 -rm -rf conftest.dSYM
@@ -57921,7 +58095,7 @@
  
  /* Override any GCC internal prototype to avoid an error.
     Use char because int might match the return type of a GCC
-@@ -50980,190 +17362,77 @@
+@@ -51075,190 +17338,77 @@
  #ifdef __cplusplus
  extern "C"
  #endif
@@ -58150,7 +58324,7 @@
  
  /* Override any GCC internal prototype to avoid an error.
     Use char because int might match the return type of a GCC
-@@ -51171,62 +17440,53 @@
+@@ -51266,62 +17416,52 @@
  #ifdef __cplusplus
  extern "C"
  #endif
@@ -58218,10 +58392,10 @@
 -	eval "$as_ac_var=no"
 +else
 +  ac_cv_search_getproplist=no
- fi
++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
@@ -58244,12 +58418,11 @@
 +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 :
++if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
  _ACEOF
-@@ -51234,39 +17494,40 @@
+@@ -51329,39 +17469,39 @@
  fi
  done
  
@@ -58257,8 +58430,7 @@
 +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 :
++if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
 +  cat >>confdefs.h <<_ACEOF
 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 +_ACEOF
@@ -58317,7 +58489,7 @@
  
  /* Override any GCC internal prototype to avoid an error.
     Use char because int might match the return type of a GCC
-@@ -51274,62 +17535,53 @@
+@@ -51369,62 +17509,64 @@
  #ifdef __cplusplus
  extern "C"
  #endif
@@ -58361,9 +58533,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 '' attr; do
 +  if test -z "$ac_lib"; then
 +    ac_res="none required"
@@ -58381,24 +58550,40 @@
 +fi
 +done
 +if test "${ac_cv_search_getxattr+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_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"
++if eval test \"x\$"$as_ac_var"\" = 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
@@ -58406,26 +58591,23 @@
 -as_val=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+
-+	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`
 +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 :
++if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
  _ACEOF
-@@ -51337,102 +17589,77 @@
+@@ -51432,102 +17574,59 @@
  fi
  done
  
-+	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`
 +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 :
++if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
 +  cat >>confdefs.h <<_ACEOF
 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 +_ACEOF
@@ -58444,12 +58626,11 @@
 -else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
-+	for ac_func in removeea fremoveea lremoveea setea fsetea lsetea
++	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"
-+eval as_val=\$$as_ac_var
-+   if test "x$as_val" = x""yes; then :
++if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
 +  cat >>confdefs.h <<_ACEOF
 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
  _ACEOF
@@ -58474,12 +58655,11 @@
 +done
  
 -#undef $ac_func
-+	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`
 +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 :
++if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
 +  cat >>confdefs.h <<_ACEOF
 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 +_ACEOF
@@ -58507,12 +58687,11 @@
 -  ;
 -  return 0;
 -}
-+	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`
 +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 :
++if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
 +  cat >>confdefs.h <<_ACEOF
 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
  _ACEOF
@@ -58545,21 +58724,11 @@
 -	eval "$as_ac_var=no"
  fi
 +done
-+
-+	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"
-+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
- fi
+-fi
 -ac_res=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
@@ -58567,24 +58736,21 @@
 -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 attr_getf attr_listf attr_setf attr_removef
 +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 :
++if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
  _ACEOF
-@@ -51440,102 +17667,128 @@
+@@ -51535,102 +17634,124 @@
  fi
  done
  
 +  ;;
 +esac
-+
+ 
 +########################################################
 +# Check if attropen() is present if this is Solaris
 +case "$host_os" in
@@ -58600,15 +58766,15 @@
 +fi
 +done
  
-+  ;;
-+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
@@ -58711,12 +58877,12 @@
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $smb_attr_cv_xattr_add_opt" >&5
 +$as_echo "$smb_attr_cv_xattr_add_opt" >&6; }
 +	if test x"$smb_attr_cv_xattr_add_opt" = x"yes"; then
-+
-+$as_echo "#define XATTR_ADD_OPT 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 XATTR_ADD_OPT 1" >>confdefs.h
++
 +	fi
  fi
 -ac_res=`eval 'as_val=${'$as_ac_var'}
@@ -58739,8 +58905,7 @@
 +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 :
++if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
 +  cat >>confdefs.h <<_ACEOF
 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 +_ACEOF
@@ -58752,8 +58917,7 @@
 +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 :
++if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
 +  cat >>confdefs.h <<_ACEOF
 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 +_ACEOF
@@ -58765,8 +58929,7 @@
 +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 :
++if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
 +  cat >>confdefs.h <<_ACEOF
 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 +_ACEOF
@@ -58778,12 +58941,11 @@
 +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 :
++if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
  _ACEOF
-@@ -51547,7 +17800,7 @@
+@@ -51642,7 +17763,7 @@
  esac
  
  # Check whether --enable-static was given.
@@ -58792,7 +58954,7 @@
    enableval=$enable_static; p=${PACKAGE-default}
  case $enableval in
  yes) enable_static=yes ;;
-@@ -51569,7 +17822,7 @@
+@@ -51664,7 +17785,7 @@
  fi
  
  # Check whether --enable-shared was given.
@@ -58801,7 +58963,7 @@
    enableval=$enable_shared; p=${PACKAGE-default}
  case $enableval in
  yes) enable_shared=yes ;;
-@@ -51596,16 +17849,16 @@
+@@ -51691,16 +17812,16 @@
  PIE_CFLAGS=""
  PIE_LDFLAGS=""
  # Check whether --enable-pie was given.
@@ -58821,7 +58983,7 @@
    $as_echo_n "(cached) " >&6
  else
  
-@@ -51631,7 +17884,7 @@
+@@ -51726,7 +17847,7 @@
  		rm -f conftest*
  
  fi
@@ -58830,7 +58992,7 @@
  $as_echo "$samba_cv_fpie" >&6; }
  	if test x"${samba_cv_fpie}" = x"yes"
  	then
-@@ -51643,16 +17896,16 @@
+@@ -51738,16 +17859,16 @@
  # Set defaults
  RELRO_LDFLAGS=""
  # Check whether --enable-relro was given.
@@ -58850,7 +59012,7 @@
    $as_echo_n "(cached) " >&6
  else
  
-@@ -51661,11 +17914,11 @@
+@@ -51756,11 +17877,11 @@
  main () { return 0;}
  EOF
  		if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS -Wl,-z,relro -o conftest conftest.c 1>&5'
@@ -58865,7 +59027,7 @@
  		then
  			samba_cv_relro=yes
  		else
-@@ -51674,7 +17927,7 @@
+@@ -51769,7 +17890,7 @@
  		rm -f conftest*
  
  fi
@@ -58874,7 +59036,7 @@
  $as_echo "$samba_cv_relro" >&6; }
  	if test x"${samba_cv_relro}" = x"yes"
  	then
-@@ -51703,7 +17956,7 @@
+@@ -51798,7 +17919,7 @@
  # You need to specify how to create a shared library and
    # how to compile C code to produce PIC object files
  
@@ -58883,7 +59045,7 @@
  $as_echo_n "checking ability to build shared libraries... " >&6; }
  
    # and these are for particular systems
-@@ -51711,14 +17964,10 @@
+@@ -51806,14 +17927,10 @@
  		*linux* | gnu* | k*bsd*-gnu | kopensolaris*-gnu | *qnx*)
  			case "$host_os" in
  				*linux*)
@@ -58900,7 +59062,7 @@
   ;;
  			esac
  			BLDSHARED="true"
-@@ -51729,15 +17978,11 @@
+@@ -51824,15 +17941,11 @@
  			DYNEXP="-Wl,--export-dynamic"
  			PICFLAG="-fPIC"
  			SONAMEFLAG="-Wl,-soname="
@@ -58918,7 +59080,7 @@
  
  			BLDSHARED="true"
  			if test "${GCC}" = "yes"; then
-@@ -51757,33 +18002,23 @@
+@@ -51852,33 +17965,23 @@
  				SONAMEFLAG="-Wl,-h,"
  			fi
  
@@ -58957,7 +59119,7 @@
  
  			;;
  		*netbsd* | *freebsd* | *dragonfly* )
-@@ -51793,14 +18028,10 @@
+@@ -51888,14 +17991,10 @@
  			SONAMEFLAG="-Wl,-soname,"
  			PICFLAG="-fPIC -DPIC"
  
@@ -58974,7 +59136,7 @@
  
  			;;
  		*openbsd*)  BLDSHARED="true"
-@@ -51809,26 +18040,18 @@
+@@ -51904,26 +18003,18 @@
  			SONAMEFLAG="-Wl,-soname,"
  			PICFLAG="-fPIC"
  
@@ -59005,7 +59167,7 @@
  
  			;;
  			esac
-@@ -51841,15 +18064,11 @@
+@@ -51936,15 +18027,11 @@
  				PICFLAG="-KPIC"
  			fi
  
@@ -59023,7 +59185,7 @@
  
  			BLDSHARED="true"
  			# use expfull to export underscored symbols
-@@ -51865,25 +18084,17 @@
+@@ -51960,25 +18047,17 @@
  			fi
  
  
@@ -59053,7 +59215,7 @@
  
  			# Use special PIC flags for the native HP-UX compiler.
  				BLDSHARED="true"
-@@ -51905,74 +18116,52 @@
+@@ -52000,74 +18079,52 @@
  				DYNEXP="-Wl,-E,+b/usr/local/lib:/usr/lib"
  			fi
  
@@ -59141,7 +59303,7 @@
    $as_echo_n "(cached) " >&6
  else
    if test -n "$ROFF"; then
-@@ -51983,91 +18172,71 @@
+@@ -52078,91 +18135,71 @@
  do
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
@@ -59248,7 +59410,7 @@
  
  			BLDSHARED="true"
  			LDSHFLAGS="-dynamiclib -flat_namespace -undefined suppress"
-@@ -52081,16 +18250,12 @@
+@@ -52176,16 +18213,12 @@
                          # actually support the PIE stuff.
                          PIE_LDFLAGS=
                          PIE_CFLAGS=
@@ -59267,7 +59429,7 @@
  
  			;;
    esac
-@@ -52107,20 +18272,16 @@
+@@ -52202,20 +18235,16 @@
  	LDFLAGS="$LDFLAGS -L./bin"
  fi
  
@@ -59291,7 +59453,7 @@
  /* end confdefs.h.  */
  
  int
-@@ -52131,42 +18292,17 @@
+@@ -52226,42 +18255,17 @@
    return 0;
  }
  _ACEOF
@@ -59339,7 +59501,7 @@
  	LDFLAGS="$LD_AS_NEEDED_FLAG $saved_ldflags"
  	test x"$ld_as_needed_flag_found" = xyes && break
  done
-@@ -52179,16 +18315,12 @@
+@@ -52274,16 +18278,12 @@
  
  if test x$ac_cv_lib_readline_rl_callback_handler_install = xyes ; then
  	if test x$ld_as_needed_flag_found = xyes ; then
@@ -59358,7 +59520,7 @@
  /* end confdefs.h.  */
  
  int
-@@ -52199,40 +18331,15 @@
+@@ -52294,40 +18294,15 @@
    return 0;
  }
  _ACEOF
@@ -59404,7 +59566,7 @@
  		LIBS="$save_LIBS"
          fi
  fi
-@@ -52247,14 +18354,10 @@
+@@ -52342,14 +18317,10 @@
  
  for flags in "-Wl,-z,defs" "-error_unresolved" "-Wl,-error_unresolved" ; do
  	saved_ldflags="$LDFLAGS"
@@ -59421,7 +59583,7 @@
  /* end confdefs.h.  */
  
  int
-@@ -52265,94 +18368,69 @@
+@@ -52360,94 +18331,69 @@
    return 0;
  }
  _ACEOF
@@ -59541,7 +59703,7 @@
    $as_echo_n "(cached) " >&6
  else
  
-@@ -52361,18 +18439,18 @@
+@@ -52456,18 +18402,18 @@
     # The $SHLD and $LDSHFLAGS variables may contain references to other
     # variables so they need to be eval'ed.
     if { ac_try='$CC $CPPFLAGS $CFLAGS $PICFLAG -c -o shlib.o ${srcdir-.}/../tests/shlib.c 1>&5'
@@ -59566,7 +59728,7 @@
       then
         ac_cv_shlib_works=yes
       fi
-@@ -52381,7 +18459,7 @@
+@@ -52476,7 +18422,7 @@
  
  
  fi
@@ -59575,7 +59737,7 @@
  $as_echo "$ac_cv_shlib_works" >&6; }
  if test $ac_cv_shlib_works = no; then
     BLDSHARED=false
-@@ -52398,9 +18476,9 @@
+@@ -52493,9 +18439,9 @@
  	merged_build_possible=no
  fi
  
@@ -59587,7 +59749,7 @@
  $as_echo "$PICFLAG" >&6; }
  
  
-@@ -52472,10 +18550,10 @@
+@@ -52567,10 +18513,10 @@
  USESHARED=false
  
  
@@ -59600,7 +59762,7 @@
    enableval=$enable_shared_libs; enable_shared_libs=$enableval
  else
    enable_shared_libs=yes
-@@ -52486,11 +18564,11 @@
+@@ -52581,11 +18527,11 @@
  	USESHARED=$BLDSHARED
  fi
  
@@ -59614,7 +59776,7 @@
  $as_echo "$as_me: WARNING: --enable-shared-libs: no support for shared libraries" >&2;}
  fi
  
-@@ -52518,14 +18596,13 @@
+@@ -52613,14 +18559,13 @@
  
  
  # Check whether --with-static-libs was given.
@@ -59631,7 +59793,7 @@
  fi
  
  
-@@ -52547,7 +18624,7 @@
+@@ -52642,7 +18587,7 @@
  #  be extracted from their respective source directories
  #
  # Check whether --enable-external_libtalloc was given.
@@ -59640,7 +59802,7 @@
    enableval=$enable_external_libtalloc;  enable_external_libtalloc=$enableval
  else
     enable_external_libtalloc=auto
-@@ -52562,9 +18639,9 @@
+@@ -52657,9 +18602,9 @@
  	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
@@ -59652,7 +59814,7 @@
    $as_echo_n "(cached) " >&6
  else
    case $PKG_CONFIG in
-@@ -52577,14 +18654,14 @@
+@@ -52672,14 +18617,14 @@
  do
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
@@ -59670,7 +59832,7 @@
  IFS=$as_save_IFS
  
    ;;
-@@ -52592,10 +18669,10 @@
+@@ -52687,10 +18632,10 @@
  fi
  PKG_CONFIG=$ac_cv_path_PKG_CONFIG
  if test -n "$PKG_CONFIG"; then
@@ -59683,7 +59845,7 @@
  $as_echo "no" >&6; }
  fi
  
-@@ -52605,9 +18682,9 @@
+@@ -52700,9 +18645,9 @@
    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
@@ -59695,7 +59857,7 @@
    $as_echo_n "(cached) " >&6
  else
    case $ac_pt_PKG_CONFIG in
-@@ -52620,14 +18697,14 @@
+@@ -52715,14 +18660,14 @@
  do
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
@@ -59713,7 +59875,7 @@
  IFS=$as_save_IFS
  
    ;;
-@@ -52635,10 +18712,10 @@
+@@ -52730,10 +18675,10 @@
  fi
  ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
  if test -n "$ac_pt_PKG_CONFIG"; then
@@ -59726,7 +59888,7 @@
  $as_echo "no" >&6; }
  fi
  
-@@ -52647,7 +18724,7 @@
+@@ -52742,7 +18687,7 @@
    else
      case $cross_compiling:$ac_tool_warned in
  yes:)
@@ -59735,7 +59897,7 @@
  $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
  ac_tool_warned=yes ;;
  esac
-@@ -52660,13 +18737,13 @@
+@@ -52755,13 +18700,13 @@
  fi
  if test -n "$PKG_CONFIG"; then
  	_pkg_min_version=0.9.0
@@ -59752,7 +59914,7 @@
  $as_echo "no" >&6; }
  		PKG_CONFIG=""
  	fi
-@@ -52674,7 +18751,7 @@
+@@ -52769,7 +18714,7 @@
  fi
  
  pkg_failed=no
@@ -59761,7 +59923,7 @@
  $as_echo_n "checking for LIBTALLOC... " >&6; }
  
  if test -n "$PKG_CONFIG"; then
-@@ -52682,11 +18759,11 @@
+@@ -52777,11 +18722,11 @@
          pkg_cv_LIBTALLOC_CFLAGS="$LIBTALLOC_CFLAGS"
      else
          if test -n "$PKG_CONFIG" && \
@@ -59776,7 +59938,7 @@
    pkg_cv_LIBTALLOC_CFLAGS=`$PKG_CONFIG --cflags "talloc >= 2.0.1" 2>/dev/null`
  else
    pkg_failed=yes
-@@ -52700,11 +18777,11 @@
+@@ -52795,11 +18740,11 @@
          pkg_cv_LIBTALLOC_LIBS="$LIBTALLOC_LIBS"
      else
          if test -n "$PKG_CONFIG" && \
@@ -59791,7 +59953,7 @@
    pkg_cv_LIBTALLOC_LIBS=`$PKG_CONFIG --libs "talloc >= 2.0.1" 2>/dev/null`
  else
    pkg_failed=yes
-@@ -52731,768 +18808,112 @@
+@@ -52826,768 +18771,110 @@
  	# Put the nasty error message in config.log where it belongs
  	echo "$LIBTALLOC_PKG_ERRORS" >&5
  
@@ -59802,7 +59964,7 @@
 -			{ { $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; }; }
-+			as_fn_error "Unable to find libtalloc" "$LINENO" 5
++			as_fn_error $? "Unable to find libtalloc" "$LINENO" 5
  		  else
  			enable_external_libtalloc=no
  		  fi
@@ -60180,7 +60342,11 @@
 -  $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_fn_error $? "Unable to find libtalloc" "$LINENO" 5
++		  else
++			enable_external_libtalloc=no
++		  fi
+ 
 -( exit $ac_status )
 -if test "$ac_cv_type_size_t" = yes; then
 -     { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
@@ -60193,31 +60359,58 @@
 -   else
 -     ac_cv_sizeof_size_t=0
 -   fi
--fi
++else
++	LIBTALLOC_CFLAGS=$pkg_cv_LIBTALLOC_CFLAGS
++	LIBTALLOC_LIBS=$pkg_cv_LIBTALLOC_LIBS
++        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }
++	 enable_external_libtalloc=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
--fi
+ fi
 -rm -f conftest.val
--fi
++
++if test "x$enable_external_libtalloc" = xno
++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
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
 -$as_echo "$ac_cv_sizeof_size_t" >&6; }
--
--
--
++TALLOC_OBJ="talloc.o"
+ 
+ 
++TALLOC_CFLAGS="-I$srcdir/$tallocdir"
+ 
 -cat >>confdefs.h <<_ACEOF
 -#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
 -_ACEOF
--
--
--# The cast to long int works around a bug in the HP C Compiler
--# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
--# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
--# This bug is HP SR number 8606223364.
++
++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:$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 "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
++$as_echo_n "checking size of size_t... " >&6; }
++if test "${ac_cv_sizeof_size_t+set}" = set; then :
+   $as_echo_n "(cached) " >&6
+ else
 -  if test "$cross_compiling" = yes; then
 -  # Depending upon the size, compute the lo and hi bounds.
 -cat >conftest.$ac_ext <<_ACEOF
@@ -60293,50 +60486,24 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_hi=$ac_mid; break
-+			as_fn_error "Unable to find libtalloc" "$LINENO" 5
-+		  else
-+			enable_external_libtalloc=no
-+		  fi
-+
- else
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+	LIBTALLOC_CFLAGS=$pkg_cv_LIBTALLOC_CFLAGS
-+	LIBTALLOC_LIBS=$pkg_cv_LIBTALLOC_LIBS
-+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-+$as_echo "yes" >&6; }
-+	 enable_external_libtalloc=yes
-+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`
-+if test "x$enable_external_libtalloc" = xno
-+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"
- 
+-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
@@ -60349,8 +60516,7 @@
 -{
 -static int test_array [1 - 2 * !(((long int) (sizeof (void *))) < 0)];
 -test_array [0] = 0
-+TALLOC_CFLAGS="-I$srcdir/$tallocdir"
- 
+-
 -  ;
 -  return 0;
 -}
@@ -60387,6 +60553,7 @@
 -{
 -static int test_array [1 - 2 * !(((long int) (sizeof (void *))) >= $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 :
  
 -  ;
 -  return 0;
@@ -60411,53 +60578,41 @@
 -	 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
-+TALLOC_LIBS=""
- 
+-
 -	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
- 
--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 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: 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 :
- 
--	ac_lo= ac_hi=
-+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; }; }
++as_fn_error 77 "cannot compute sizeof (size_t)
++See \`config.log' for more details" "$LINENO" 5 ; }
 +   else
 +     ac_cv_sizeof_size_t=0
 +   fi
  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
+-
+-	ac_lo= ac_hi=
  fi
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
 +$as_echo "$ac_cv_sizeof_size_t" >&6; }
  
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+-fi
+ 
+-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -# Binary search between lo and hi bounds.
 -while test "x$ac_lo" != "x$ac_hi"; do
 -  ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
@@ -60473,11 +60628,13 @@
 -{
 -static int test_array [1 - 2 * !(((long int) (sizeof (void *))) <= $ac_mid)];
 -test_array [0] = 0
--
+ 
 -  ;
 -  return 0;
 -}
--_ACEOF
++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
@@ -60520,12 +60677,18 @@
 -     ac_cv_sizeof_void_p=0
 -   fi ;;
 -esac
--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 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
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
-+cat >>confdefs.h <<_ACEOF
-+#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
- _ACEOF
+-_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
@@ -60537,7 +60700,7 @@
 -int
 -main ()
 -{
- 
+-
 -  FILE *f = fopen ("conftest.val", "w");
 -  if (! f)
 -    return 1;
@@ -60558,6 +60721,7 @@
 -  /* Do not output a trailing newline, as this causes \r\n confusion
 -     on some platforms.  */
 -  return ferror (f) || fclose (f) != 0;
++  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p"        "$ac_includes_default"; then :
  
 -  ;
 -  return 0;
@@ -60586,24 +60750,14 @@
 -  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
 -  (exit $ac_status); }; }; then
 -  ac_cv_sizeof_void_p=`cat conftest.val`
-+# The cast to long int works around a bug in the HP C Compiler
-+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
-+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
-+# This bug is HP SR number 8606223364.
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
-+$as_echo_n "checking size of void *... " >&6; }
-+if test "${ac_cv_sizeof_void_p+set}" = set; then :
-+  $as_echo_n "(cached) " >&6
  else
 -  $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 (void *))" "ac_cv_sizeof_void_p"        "$ac_includes_default"; then :
- 
+-
 -( exit $ac_status )
 -if test "$ac_cv_type_void_p" = yes; then
 -     { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-+else
 +  if test "$ac_cv_type_void_p" = yes; then
 +     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
  $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
@@ -60612,9 +60766,8 @@
 -$as_echo "$as_me: error: cannot compute sizeof (void *)
 -See \`config.log' for more details." >&2;}
 -   { (exit 77); exit 77; }; }; }
-+{ as_fn_set_status 77
-+as_fn_error "cannot compute sizeof (void *)
-+See \`config.log' for more details." "$LINENO" 5; }; }
++as_fn_error 77 "cannot compute sizeof (void *)
++See \`config.log' for more details" "$LINENO" 5 ; }
     else
       ac_cv_sizeof_void_p=0
     fi
@@ -60630,7 +60783,7 @@
  $as_echo "$ac_cv_sizeof_void_p" >&6; }
  
  
-@@ -53504,17 +18925,15 @@
+@@ -53599,17 +18886,15 @@
  
  
  if test $ac_cv_sizeof_size_t -lt $ac_cv_sizeof_void_p; then
@@ -60649,11 +60802,11 @@
 -	{ { $as_echo "$as_me:$LINENO: error: sizeof(size_t) < sizeof(void *)" >&5
 -$as_echo "$as_me: error: sizeof(size_t) < sizeof(void *)" >&2;}
 -   { (exit 1); exit 1; }; }
-+	as_fn_error "sizeof(size_t) < sizeof(void *)" "$LINENO" 5
++	as_fn_error $? "sizeof(size_t) < sizeof(void *)" "$LINENO" 5
  fi
  
  if test x"$VERSIONSCRIPT" != "x"; then
-@@ -53549,16 +18968,16 @@
+@@ -53644,16 +18929,16 @@
  
  
  
@@ -60673,7 +60826,7 @@
  $as_echo "no" >&6; }
  		build_lib=no
  		;;
-@@ -53584,7 +19003,7 @@
+@@ -53679,7 +18964,7 @@
  	if eval $BLDSHARED = true; then
  		LIBTALLOC_SHARED=$LIBTALLOC_SHARED_TARGET
  		LIBTALLOC_TARGET=$LIBTALLOC_SHARED_TARGET
@@ -60682,7 +60835,7 @@
  $as_echo "yes" >&6; }
  		if test x"$USESHARED" != x"true" -o x"$LINK_LIBTALLOC" = "xSTATIC" ; then
  			enable_static=yes
-@@ -53597,12 +19016,12 @@
+@@ -53692,12 +18977,12 @@
  		enable_static=yes
  		LIBTALLOC_TARGET=$LIBTALLOC_STATIC_TARGET
  		LIBTALLOC_LIBS=$LIBTALLOC_STATIC_TARGET
@@ -60697,7 +60850,7 @@
  $as_echo "shared library not selected" >&6; }
  fi
  if test $enable_static = yes; then
-@@ -53628,7 +19047,7 @@
+@@ -53723,7 +19008,7 @@
  
  
  # Check whether --enable-external_libtdb was given.
@@ -60706,7 +60859,7 @@
    enableval=$enable_external_libtdb;  enable_external_libtalloc=$enableval
  else
     enable_external_libtalloc=auto
-@@ -53639,7 +19058,7 @@
+@@ -53734,7 +19019,7 @@
  then
  
  pkg_failed=no
@@ -60715,7 +60868,7 @@
  $as_echo_n "checking for LIBTDB... " >&6; }
  
  if test -n "$PKG_CONFIG"; then
-@@ -53647,11 +19066,11 @@
+@@ -53742,11 +19027,11 @@
          pkg_cv_LIBTDB_CFLAGS="$LIBTDB_CFLAGS"
      else
          if test -n "$PKG_CONFIG" && \
@@ -60730,7 +60883,7 @@
    pkg_cv_LIBTDB_CFLAGS=`$PKG_CONFIG --cflags "tdb >= 1.2.1" 2>/dev/null`
  else
    pkg_failed=yes
-@@ -53665,11 +19084,11 @@
+@@ -53760,11 +19045,11 @@
          pkg_cv_LIBTDB_LIBS="$LIBTDB_LIBS"
      else
          if test -n "$PKG_CONFIG" && \
@@ -60745,7 +60898,7 @@
    pkg_cv_LIBTDB_LIBS=`$PKG_CONFIG --libs "tdb >= 1.2.1" 2>/dev/null`
  else
    pkg_failed=yes
-@@ -53696,13 +19115,11 @@
+@@ -53791,13 +19076,11 @@
  	# Put the nasty error message in config.log where it belongs
  	echo "$LIBTDB_PKG_ERRORS" >&5
  
@@ -60757,22 +60910,22 @@
 -			{ { $as_echo "$as_me:$LINENO: error: Unable to find libtdb" >&5
 -$as_echo "$as_me: error: Unable to find libtdb" >&2;}
 -   { (exit 1); exit 1; }; }
-+			as_fn_error "Unable to find libtdb" "$LINENO" 5
++			as_fn_error $? "Unable to find libtdb" "$LINENO" 5
  		else
  			enable_external_libtdb=no
  		fi
-@@ -53710,9 +19127,7 @@
+@@ -53805,9 +19088,7 @@
  elif test $pkg_failed = untried; then
  
  		if test x$enable_external_libtdb = xyes; then
 -			{ { $as_echo "$as_me:$LINENO: error: Unable to find libtdb" >&5
 -$as_echo "$as_me: error: Unable to find libtdb" >&2;}
 -   { (exit 1); exit 1; }; }
-+			as_fn_error "Unable to find libtdb" "$LINENO" 5
++			as_fn_error $? "Unable to find libtdb" "$LINENO" 5
  		else
  			enable_external_libtdb=no
  		fi
-@@ -53720,7 +19135,7 @@
+@@ -53815,7 +19096,7 @@
  else
  	LIBTDB_CFLAGS=$pkg_cv_LIBTDB_CFLAGS
  	LIBTDB_LIBS=$pkg_cv_LIBTDB_LIBS
@@ -60781,18 +60934,18 @@
  $as_echo "yes" >&6; }
  	 enable_external_libtdb=yes
  fi
-@@ -53739,9 +19154,7 @@
+@@ -53834,9 +19115,7 @@
  	fi
  done
  if test x"$tdbdir" = "x"; then
 -   { { $as_echo "$as_me:$LINENO: error: cannot find tdb source in $tdbpaths" >&5
 -$as_echo "$as_me: error: cannot find tdb source in $tdbpaths" >&2;}
 -   { (exit 1); exit 1; }; }
-+   as_fn_error "cannot find tdb source in $tdbpaths" "$LINENO" 5
++   as_fn_error $? "cannot find tdb source in $tdbpaths" "$LINENO" 5
  fi
  TDB_OBJ="common/tdb.o common/dump.o common/transaction.o common/error.o common/traverse.o"
  TDB_OBJ="$TDB_OBJ common/freelist.o common/freelistcheck.o common/io.o common/lock.o common/open.o common/check.o"
-@@ -53754,104 +19167,12 @@
+@@ -53849,104 +19128,11 @@
  TDB_CFLAGS="-I$tdbdir/include"
  
  
@@ -60897,12 +61050,11 @@
 +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 :
++if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
  _ACEOF
-@@ -53859,151 +19180,12 @@
+@@ -53954,151 +19140,11 @@
  fi
  done
  
@@ -61054,12 +61206,11 @@
 +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 eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
-@@ -54014,17 +19196,13 @@
+@@ -54109,17 +19155,13 @@
  
  
  
@@ -61080,7 +61231,7 @@
  /* end confdefs.h.  */
  #include <unistd.h>
  int
-@@ -54035,56 +19213,29 @@
+@@ -54130,56 +19172,29 @@
    return 0;
  }
  _ACEOF
@@ -61144,7 +61295,7 @@
  /* end confdefs.h.  */
  #include <unistd.h>
  int
-@@ -54095,41 +19246,18 @@
+@@ -54190,41 +19205,18 @@
    return 0;
  }
  _ACEOF
@@ -61190,7 +61341,7 @@
  
   fi
  
-@@ -54166,16 +19294,16 @@
+@@ -54261,16 +19253,16 @@
  
  
  
@@ -61210,7 +61361,7 @@
  $as_echo "no" >&6; }
  		build_lib=no
  		;;
-@@ -54201,7 +19329,7 @@
+@@ -54296,7 +19288,7 @@
  	if eval $BLDSHARED = true; then
  		LIBTDB_SHARED=$LIBTDB_SHARED_TARGET
  		LIBTDB_TARGET=$LIBTDB_SHARED_TARGET
@@ -61219,7 +61370,7 @@
  $as_echo "yes" >&6; }
  		if test x"$USESHARED" != x"true" -o x"$LINK_LIBTDB" = "xSTATIC" ; then
  			enable_static=yes
-@@ -54214,12 +19342,12 @@
+@@ -54309,12 +19301,12 @@
  		enable_static=yes
  		LIBTDB_TARGET=$LIBTDB_STATIC_TARGET
  		LIBTDB_LIBS=$LIBTDB_STATIC_TARGET
@@ -61234,7 +61385,7 @@
  $as_echo "shared library not selected" >&6; }
  fi
  if test $enable_static = yes; then
-@@ -54275,16 +19403,16 @@
+@@ -54370,16 +19362,16 @@
  
  
  
@@ -61254,7 +61405,7 @@
  $as_echo "no" >&6; }
  		build_lib=no
  		;;
-@@ -54310,7 +19438,7 @@
+@@ -54405,7 +19397,7 @@
  	if eval $BLDSHARED = true; then
  		LIBNETAPI_SHARED=$LIBNETAPI_SHARED_TARGET
  		LIBNETAPI_TARGET=$LIBNETAPI_SHARED_TARGET
@@ -61263,7 +61414,7 @@
  $as_echo "yes" >&6; }
  		if test x"$USESHARED" != x"true" -o x"$LINK_LIBNETAPI" = "xSTATIC" ; then
  			enable_static=yes
-@@ -54323,12 +19451,12 @@
+@@ -54418,12 +19410,12 @@
  		enable_static=yes
  		LIBNETAPI_TARGET=$LIBNETAPI_STATIC_TARGET
  		LIBNETAPI_LIBS=$LIBNETAPI_STATIC_TARGET
@@ -61278,7 +61429,7 @@
  $as_echo "shared library not selected" >&6; }
  fi
  if test $enable_static = yes; then
-@@ -54366,16 +19494,16 @@
+@@ -54461,16 +19453,16 @@
  
  
  
@@ -61298,7 +61449,7 @@
  $as_echo "no" >&6; }
  		build_lib=no
  		;;
-@@ -54401,7 +19529,7 @@
+@@ -54496,7 +19488,7 @@
  	if eval $BLDSHARED = true; then
  		LIBSMBCLIENT_SHARED=$LIBSMBCLIENT_SHARED_TARGET
  		LIBSMBCLIENT_TARGET=$LIBSMBCLIENT_SHARED_TARGET
@@ -61307,7 +61458,7 @@
  $as_echo "yes" >&6; }
  		if test x"$USESHARED" != x"true" -o x"$LINK_LIBSMBCLIENT" = "xSTATIC" ; then
  			enable_static=yes
-@@ -54414,12 +19542,12 @@
+@@ -54509,12 +19501,12 @@
  		enable_static=yes
  		LIBSMBCLIENT_TARGET=$LIBSMBCLIENT_STATIC_TARGET
  		LIBSMBCLIENT_LIBS=$LIBSMBCLIENT_STATIC_TARGET
@@ -61322,7 +61473,7 @@
  $as_echo "shared library not selected" >&6; }
  fi
  if test $enable_static = yes; then
-@@ -54457,16 +19585,16 @@
+@@ -54552,16 +19544,16 @@
  
  
  
@@ -61342,7 +61493,7 @@
  $as_echo "no" >&6; }
  		build_lib=no
  		;;
-@@ -54492,7 +19620,7 @@
+@@ -54587,7 +19579,7 @@
  	if eval $BLDSHARED = true; then
  		LIBSMBSHAREMODES_SHARED=$LIBSMBSHAREMODES_SHARED_TARGET
  		LIBSMBSHAREMODES_TARGET=$LIBSMBSHAREMODES_SHARED_TARGET
@@ -61351,7 +61502,7 @@
  $as_echo "yes" >&6; }
  		if test x"$USESHARED" != x"true" -o x"$LINK_LIBSMBSHAREMODES" = "xSTATIC" ; then
  			enable_static=yes
-@@ -54505,12 +19633,12 @@
+@@ -54600,12 +19592,12 @@
  		enable_static=yes
  		LIBSMBSHAREMODES_TARGET=$LIBSMBSHAREMODES_STATIC_TARGET
  		LIBSMBSHAREMODES_LIBS=$LIBSMBSHAREMODES_STATIC_TARGET
@@ -61366,7 +61517,7 @@
  $as_echo "shared library not selected" >&6; }
  fi
  if test $enable_static = yes; then
-@@ -54548,19 +19676,19 @@
+@@ -54643,19 +19635,19 @@
  
  
  
@@ -61389,7 +61540,7 @@
  $as_echo "no" >&6; }
  		build_lib=no
  		;;
-@@ -54569,7 +19697,7 @@
+@@ -54664,7 +19656,7 @@
  else
  
  # if unspecified, default is not to build
@@ -61398,7 +61549,7 @@
  $as_echo "no" >&6; }
  build_lib=no
  
-@@ -54585,7 +19713,7 @@
+@@ -54680,7 +19672,7 @@
  	if eval $BLDSHARED = true; then
  		LIBADDNS_SHARED=$LIBADDNS_SHARED_TARGET
  		LIBADDNS_TARGET=$LIBADDNS_SHARED_TARGET
@@ -61407,7 +61558,7 @@
  $as_echo "yes" >&6; }
  		if test x"$USESHARED" != x"true" -o x"$LINK_LIBADDNS" = "xSTATIC" ; then
  			enable_static=yes
-@@ -54598,12 +19726,12 @@
+@@ -54693,12 +19685,12 @@
  		enable_static=yes
  		LIBADDNS_TARGET=$LIBADDNS_STATIC_TARGET
  		LIBADDNS_LIBS=$LIBADDNS_STATIC_TARGET
@@ -61422,7 +61573,7 @@
  $as_echo "shared library not selected" >&6; }
  fi
  if test $enable_static = yes; then
-@@ -54620,165 +19748,39 @@
+@@ -54715,270 +19707,51 @@
  
  ################
  
@@ -61430,24 +61581,21 @@
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long" >&5
  $as_echo_n "checking for long long... " >&6; }
 -if test "${samba_cv_have_longlong+set}" = set; then
-+if test "${samba_cv_have_longlong+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 :
-   samba_cv_have_longlong=cross
- else
+-  samba_cv_have_longlong=cross
+-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.  */
- #include <stdio.h>
- main() { long long x = 1000000; x *= x; exit(((x/1000000) == 1000000)? 0: 1); }
- _ACEOF
+-/* end confdefs.h.  */
+-#include <stdio.h>
+-main() { long long x = 1000000; x *= x; exit(((x/1000000) == 1000000)? 0: 1); }
+-_ACEOF
 -rm -f conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -61470,30 +61618,25 @@
 -  ac_status=$?
 -  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
 -  (exit $ac_status); }; }; then
-+if ac_fn_c_try_run "$LINENO"; then :
-   samba_cv_have_longlong=yes
- else
+-  samba_cv_have_longlong=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_longlong=no
-+  samba_cv_have_longlong=no
- 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
-+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-+  conftest.$ac_objext conftest.beam conftest.$ac_ext
- fi
- 
+-fi
 -
- fi
+-
+-fi
 -{ $as_echo "$as_me:$LINENO: result: $samba_cv_have_longlong" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $samba_cv_have_longlong" >&5
- $as_echo "$samba_cv_have_longlong" >&6; }
- if test x"$samba_cv_have_longlong" = x"yes"; then
- 
+-$as_echo "$samba_cv_have_longlong" >&6; }
+-if test x"$samba_cv_have_longlong" = x"yes"; then
+-
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_LONGLONG 1
 -_ACEOF
@@ -61585,29 +61728,29 @@
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
-+$as_echo "#define HAVE_LONGLONG 1" >>confdefs.h
- 
+-
 -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 :
- 
+-
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_intptr_t" >&5
 -$as_echo "$ac_cv_type_intptr_t" >&6; }
 -if test "x$ac_cv_type_intptr_t" = x""yes; then
 -  :
- else
- 
- cat >>confdefs.h <<_ACEOF
-@@ -54788,102 +19790,9 @@
- fi
- 
- else
+-else
+-
+-cat >>confdefs.h <<_ACEOF
+-#define intptr_t unsigned long long
+-_ACEOF
+-
+-fi
+-
+-else
 -    { $as_echo "$as_me:$LINENO: checking for intptr_t" >&5
 -$as_echo_n "checking for intptr_t... " >&6; }
 -if test "${ac_cv_type_intptr_t+set}" = set; then
--  $as_echo_n "(cached) " >&6
++if test "${samba_cv_have_longlong+set}" = set; then :
+   $as_echo_n "(cached) " >&6
 -else
 -  ac_cv_type_intptr_t=no
 -cat >conftest.$ac_ext <<_ACEOF
@@ -61649,7 +61792,13 @@
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
++else
++
++if test "$cross_compiling" = yes; then :
++  samba_cv_have_longlong=cross
++else
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
 -$ac_includes_default
 -int
 -main ()
@@ -61659,7 +61808,9 @@
 -  ;
 -  return 0;
 -}
--_ACEOF
++#include <stdio.h>
++main() { long long x = 1000000; x *= x; exit(((x/1000000) == 1000000)? 0: 1); }
+ _ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -61679,33 +61830,53 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  :
--else
++if ac_fn_c_try_run "$LINENO"; then :
++  samba_cv_have_longlong=yes
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
++  samba_cv_have_longlong=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_cv_type_intptr_t=yes
--fi
--
+ fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $samba_cv_have_longlong" >&5
++$as_echo "$samba_cv_have_longlong" >&6; }
++if test x"$samba_cv_have_longlong" = x"yes"; then
++
++$as_echo "#define HAVE_LONGLONG 1" >>confdefs.h
++
++    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 :
+ 
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
--else
+ else
 -  $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 :
  
++cat >>confdefs.h <<_ACEOF
++#define intptr_t unsigned long long
++_ACEOF
+ 
+ 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
 -$as_echo "$ac_cv_type_intptr_t" >&6; }
 -if test "x$ac_cv_type_intptr_t" = x""yes; then
 -  :
++else
++    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
-@@ -54898,17 +19807,13 @@
+@@ -54993,17 +19766,13 @@
  # Check if the compiler supports the LL prefix on long long integers.
  # AIX needs this.
  
@@ -61726,7 +61897,7 @@
  /* end confdefs.h.  */
  #include <stdio.h>
  int
-@@ -54919,190 +19824,97 @@
+@@ -55014,190 +19783,97 @@
    return 0;
  }
  _ACEOF
@@ -61869,8 +62040,8 @@
  /* end confdefs.h.  */
  #include <stdio.h>
  #include <sys/stat.h>
--main() { exit((sizeof(off_t) == 8) ? 0 : 1); }
--_ACEOF
+ main() { exit((sizeof(off_t) == 8) ? 0 : 1); }
+ _ACEOF
 -rm -f conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -61893,8 +62064,6 @@
 -  ac_status=$?
 -  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
 -  (exit $ac_status); }; }; then
-+main() { exit((sizeof(off_t) == 8) ? 0 : 1); }
-+_ACEOF
 +if ac_fn_c_try_run "$LINENO"; then :
    samba_cv_SIZEOF_OFF_T=yes
  else
@@ -61947,7 +62116,7 @@
  /* end confdefs.h.  */
  
  #if defined(HAVE_UNISTD_H)
-@@ -55112,67 +19924,34 @@
+@@ -55207,67 +19883,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
@@ -62025,7 +62194,7 @@
  /* end confdefs.h.  */
  
  #if defined(HAVE_UNISTD_H)
-@@ -55182,67 +19961,34 @@
+@@ -55277,67 +19920,34 @@
  #include <sys/stat.h>
  main() { exit((sizeof(ino_t) == 8) ? 0 : 1); }
  _ACEOF
@@ -62103,7 +62272,7 @@
  /* end confdefs.h.  */
  
  #if defined(HAVE_UNISTD_H)
-@@ -55252,67 +19998,34 @@
+@@ -55347,67 +19957,34 @@
  #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
@@ -62181,7 +62350,7 @@
  /* end confdefs.h.  */
  
  #if defined(HAVE_UNISTD_H)
-@@ -55322,67 +20035,34 @@
+@@ -55417,67 +19994,34 @@
  #include <sys/stat.h>
  main() { exit((sizeof(dev_t) == 8) ? 0 : 1); }
  _ACEOF
@@ -62259,7 +62428,7 @@
  /* end confdefs.h.  */
  
  #if defined(HAVE_UNISTD_H)
-@@ -55392,64 +20072,31 @@
+@@ -55487,64 +20031,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
@@ -62333,7 +62502,7 @@
  /* end confdefs.h.  */
  
  #if defined(HAVE_UNISTD_H)
-@@ -55465,55 +20112,28 @@
+@@ -55560,55 +20071,28 @@
    return 0;
  }
  _ACEOF
@@ -62396,7 +62565,7 @@
  /* end confdefs.h.  */
  
  #if defined(HAVE_UNISTD_H)
-@@ -55529,58 +20149,31 @@
+@@ -55624,58 +20108,31 @@
    return 0;
  }
  _ACEOF
@@ -62463,7 +62632,7 @@
  /* end confdefs.h.  */
  
  #if defined(HAVE_UNISTD_H)
-@@ -55589,67 +20182,34 @@
+@@ -55684,67 +20141,34 @@
  #include <sys/types.h>
  main() { dev_t dev; int i = major(dev); return 0; }
  _ACEOF
@@ -62541,7 +62710,7 @@
  /* end confdefs.h.  */
  
  #if defined(HAVE_UNISTD_H)
-@@ -55658,67 +20218,34 @@
+@@ -55753,67 +20177,34 @@
  #include <sys/types.h>
  main() { dev_t dev; int i = minor(dev); return 0; }
  _ACEOF
@@ -62619,7 +62788,7 @@
  /* end confdefs.h.  */
  
  #if defined(HAVE_UNISTD_H)
-@@ -55727,129 +20254,63 @@
+@@ -55822,129 +20213,63 @@
  #include <sys/types.h>
  main() { dev_t dev = makedev(1,2); return 0; }
  _ACEOF
@@ -62768,7 +62937,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <dirent.h>
-@@ -55862,55 +20323,28 @@
+@@ -55957,55 +20282,28 @@
    return 0;
  }
  _ACEOF
@@ -62831,7 +63000,7 @@
  /* end confdefs.h.  */
  #include <stdio.h>
  int
-@@ -55921,55 +20355,28 @@
+@@ -56016,55 +20314,28 @@
    return 0;
  }
  _ACEOF
@@ -62894,7 +63063,7 @@
  /* end confdefs.h.  */
  
  #include <sys/time.h>
-@@ -55982,46 +20389,19 @@
+@@ -56077,46 +20348,19 @@
    return 0;
  }
  _ACEOF
@@ -62947,7 +63116,7 @@
  
  fi
  
-@@ -56033,120 +20413,24 @@
+@@ -56128,120 +20372,24 @@
      # which rely on signals.
  
  
@@ -63076,7 +63245,7 @@
  /* end confdefs.h.  */
  
  #if TIME_WITH_SYS_TIME
-@@ -56170,58 +20454,27 @@
+@@ -56265,58 +20413,27 @@
    return 0;
  }
  _ACEOF
@@ -63143,7 +63312,7 @@
  /* end confdefs.h.  */
  
  #if TIME_WITH_SYS_TIME
-@@ -56245,58 +20498,27 @@
+@@ -56340,58 +20457,27 @@
    return 0;
  }
  _ACEOF
@@ -63210,7 +63379,7 @@
  /* end confdefs.h.  */
  
  #if TIME_WITH_SYS_TIME
-@@ -56320,49 +20542,22 @@
+@@ -56415,49 +20501,22 @@
    return 0;
  }
  _ACEOF
@@ -63266,7 +63435,7 @@
  
  
  
-@@ -56380,18 +20575,14 @@
+@@ -56475,18 +20534,14 @@
  	    ;;
            *)
  	    # clock_gettime was not found, try adding librt
@@ -63288,7 +63457,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -56409,60 +20600,29 @@
+@@ -56504,60 +20559,29 @@
    return 0;
  }
  _ACEOF
@@ -63358,7 +63527,7 @@
  /* end confdefs.h.  */
  
  #if TIME_WITH_SYS_TIME
-@@ -56486,58 +20646,27 @@
+@@ -56581,58 +20605,27 @@
    return 0;
  }
  _ACEOF
@@ -63425,7 +63594,7 @@
  /* end confdefs.h.  */
  
  #if TIME_WITH_SYS_TIME
-@@ -56561,58 +20690,27 @@
+@@ -56656,58 +20649,27 @@
    return 0;
  }
  _ACEOF
@@ -63492,7 +63661,7 @@
  /* end confdefs.h.  */
  
  #if TIME_WITH_SYS_TIME
-@@ -56636,49 +20734,22 @@
+@@ -56731,49 +20693,22 @@
    return 0;
  }
  _ACEOF
@@ -63548,7 +63717,7 @@
  
  
  
-@@ -56703,20 +20774,16 @@
+@@ -56798,85 +20733,48 @@
  
  fi
  
@@ -63569,14 +63738,13 @@
 -_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 <dirent.h>
-@@ -56724,216 +20791,67 @@
- if (di && di->d_name[-2] == '.' && di->d_name[-1] == 0 &&
- di->d_name[0] == 0) exit(0); exit(1);}
- _ACEOF
+-/* end confdefs.h.  */
+-#include <sys/types.h>
+-#include <dirent.h>
+-main() { struct dirent *di; DIR *d = opendir("."); di = readdir(d);
+-if (di && di->d_name[-2] == '.' && di->d_name[-1] == 0 &&
+-di->d_name[0] == 0) exit(0); exit(1);}
+-_ACEOF
 -rm -f conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -63599,6 +63767,14 @@
 -  ac_status=$?
 -  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
 -  (exit $ac_status); }; }; then
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++#include <sys/types.h>
++#include <dirent.h>
++main() { struct dirent *di; DIR *d = opendir("."); di = readdir(d);
++if (di && di->d_name[-2] == '.' && di->d_name[-1] == 0 &&
++di->d_name[0] == 0) exit(0); exit(1);}
++_ACEOF
 +if ac_fn_c_try_run "$LINENO"; then :
    samba_cv_HAVE_BROKEN_READDIR_NAME=yes
  else
@@ -63626,31 +63802,31 @@
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_BROKEN_READDIR_NAME 1
 -_ACEOF
--
--fi
--
++$as_echo "#define HAVE_BROKEN_READDIR_NAME 1" >>confdefs.h
+ 
+ fi
+ 
 -{ $as_echo "$as_me:$LINENO: checking for utimbuf" >&5
--$as_echo_n "checking for utimbuf... " >&6; }
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for utimbuf" >&5
+ $as_echo_n "checking for utimbuf... " >&6; }
 -if test "${samba_cv_HAVE_UTIMBUF+set}" = set; then
--  $as_echo_n "(cached) " >&6
--else
--
++if test "${samba_cv_HAVE_UTIMBUF+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 <sys/types.h>
--#include <utime.h>
--int
--main ()
--{
--struct utimbuf tbuf;  tbuf.actime = 0; tbuf.modtime = 1; exit(utime("foo.c",&tbuf));
--  ;
--  return 0;
--}
--_ACEOF
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ #include <sys/types.h>
+ #include <utime.h>
+@@ -56888,41 +20786,18 @@
+   return 0;
+ }
+ _ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -63669,37 +63845,41 @@
 -	 test -z "$ac_c_werror_flag" ||
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
--  samba_cv_HAVE_UTIMBUF=yes
--else
++if ac_fn_c_try_compile "$LINENO"; then :
+   samba_cv_HAVE_UTIMBUF=yes
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	samba_cv_HAVE_UTIMBUF=no
--fi
++  samba_cv_HAVE_UTIMBUF=no
+ fi
 -
--rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
--fi
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
 -{ $as_echo "$as_me:$LINENO: result: $samba_cv_HAVE_UTIMBUF" >&5
--$as_echo "$samba_cv_HAVE_UTIMBUF" >&6; }
--if test x"$samba_cv_HAVE_UTIMBUF" = x"yes"; then
--
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $samba_cv_HAVE_UTIMBUF" >&5
+ $as_echo "$samba_cv_HAVE_UTIMBUF" >&6; }
+ if test x"$samba_cv_HAVE_UTIMBUF" = x"yes"; then
+ 
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_UTIMBUF 1
 -_ACEOF
++$as_echo "#define HAVE_UTIMBUF 1" >>confdefs.h
+ 
+ fi
+ 
+@@ -56930,105 +20805,11 @@
+ # Check utmp details, but only if our OS offers utmp.h
+ if test x"$ac_cv_header_utmp_h" = x"yes"; then
+ 
 -
--fi
 -
--##############
--# Check utmp details, but only if our OS offers utmp.h
--if test x"$ac_cv_header_utmp_h" = x"yes"; then
 -
 -
 -
 -
--
--
--
--for ac_func in pututline pututxline updwtmp updwtmpx getutmpx getutxent
+ for ac_func in pututline pututxline updwtmp updwtmpx getutmpx getutxent
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
@@ -63744,29 +63924,14 @@
 -choke me
 -#endif
 -
-+$as_echo "#define HAVE_BROKEN_READDIR_NAME 1" >>confdefs.h
-+
-+fi
-+
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for utimbuf" >&5
-+$as_echo_n "checking for utimbuf... " >&6; }
-+if test "${samba_cv_HAVE_UTIMBUF+set}" = set; then :
-+  $as_echo_n "(cached) " >&6
-+else
-+
-+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h.  */
-+#include <sys/types.h>
-+#include <utime.h>
- int
- main ()
- {
+-int
+-main ()
+-{
 -return $ac_func ();
-+struct utimbuf tbuf;  tbuf.actime = 0; tbuf.modtime = 1; exit(utime("foo.c",&tbuf));
-   ;
-   return 0;
- }
- _ACEOF
+-  ;
+-  return 0;
+-}
+-_ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -63789,27 +63954,17 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  eval "$as_ac_var=yes"
-+if ac_fn_c_try_compile "$LINENO"; then :
-+  samba_cv_HAVE_UTIMBUF=yes
- else
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	eval "$as_ac_var=no"
-+  samba_cv_HAVE_UTIMBUF=no
-+fi
-+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $samba_cv_HAVE_UTIMBUF" >&5
-+$as_echo "$samba_cv_HAVE_UTIMBUF" >&6; }
-+if test x"$samba_cv_HAVE_UTIMBUF" = x"yes"; then
-+
-+$as_echo "#define HAVE_UTIMBUF 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
- fi
+-fi
 -ac_res=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
@@ -63817,21 +63972,14 @@
 -as_val=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+
-+##############
-+# Check utmp details, but only if our OS offers utmp.h
-+if test x"$ac_cv_header_utmp_h" = x"yes"; then
-+
-+for ac_func in pututline pututxline updwtmp updwtmpx getutmpx getutxent
 +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 :
++if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
  _ACEOF
-@@ -56942,17 +20860,13 @@
+@@ -57037,17 +20818,13 @@
  done
  
  
@@ -63852,7 +64000,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <utmp.h>
-@@ -56964,55 +20878,28 @@
+@@ -57059,55 +20836,28 @@
    return 0;
  }
  _ACEOF
@@ -63915,7 +64063,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <utmp.h>
-@@ -57024,55 +20911,28 @@
+@@ -57119,55 +20869,28 @@
    return 0;
  }
  _ACEOF
@@ -63978,7 +64126,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <utmp.h>
-@@ -57084,55 +20944,28 @@
+@@ -57179,55 +20902,28 @@
    return 0;
  }
  _ACEOF
@@ -64041,7 +64189,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <utmp.h>
-@@ -57144,55 +20977,28 @@
+@@ -57239,55 +20935,28 @@
    return 0;
  }
  _ACEOF
@@ -64104,7 +64252,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <utmp.h>
-@@ -57204,55 +21010,28 @@
+@@ -57299,55 +20968,28 @@
    return 0;
  }
  _ACEOF
@@ -64167,7 +64315,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <utmp.h>
-@@ -57264,55 +21043,28 @@
+@@ -57359,55 +21001,28 @@
    return 0;
  }
  _ACEOF
@@ -64230,7 +64378,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <utmp.h>
-@@ -57324,55 +21076,28 @@
+@@ -57419,55 +21034,28 @@
    return 0;
  }
  _ACEOF
@@ -64293,7 +64441,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <utmp.h>
-@@ -57384,55 +21109,28 @@
+@@ -57479,55 +21067,28 @@
    return 0;
  }
  _ACEOF
@@ -64356,7 +64504,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <utmp.h>
-@@ -57444,55 +21142,28 @@
+@@ -57539,55 +21100,28 @@
    return 0;
  }
  _ACEOF
@@ -64419,7 +64567,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <utmp.h>
-@@ -57504,55 +21175,28 @@
+@@ -57599,55 +21133,28 @@
    return 0;
  }
  _ACEOF
@@ -64482,7 +64630,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <utmp.h>
-@@ -57564,56 +21208,29 @@
+@@ -57659,56 +21166,29 @@
    return 0;
  }
  _ACEOF
@@ -64546,7 +64694,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <utmp.h>
-@@ -57625,56 +21242,29 @@
+@@ -57720,56 +21200,29 @@
    return 0;
  }
  _ACEOF
@@ -64610,7 +64758,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <utmpx.h>
-@@ -57686,41 +21276,18 @@
+@@ -57781,41 +21234,18 @@
    return 0;
  }
  _ACEOF
@@ -64656,7 +64804,7 @@
  
  fi
  
-@@ -57731,12 +21298,10 @@
+@@ -57826,12 +21256,10 @@
  ICONV_LOOK_DIRS="/usr /usr/local /sw /opt"
  
  # Check whether --with-libiconv was given.
@@ -64667,11 +64815,11 @@
 -    { { $as_echo "$as_me:$LINENO: error: argument to --with-libiconv must be a directory" >&5
 -$as_echo "$as_me: error: argument to --with-libiconv must be a directory" >&2;}
 -   { (exit 1); exit 1; }; }
-+    as_fn_error "argument to --with-libiconv must be a directory" "$LINENO" 5
++    as_fn_error $? "argument to --with-libiconv must be a directory" "$LINENO" 5
    else
       if test "$withval" != "yes" ; then
  	ICONV_PATH_SPEC=yes
-@@ -57782,7 +21347,7 @@
+@@ -57877,7 +21305,7 @@
  		export LDFLAGS LIBS CPPFLAGS
  		# Try to find iconv(3)
  
@@ -64680,7 +64828,7 @@
  $as_echo_n "checking for iconv in $i/$l... " >&6; }
      jm_cv_func_iconv="no"
      jm_cv_lib_iconv=""
-@@ -57790,11 +21355,7 @@
+@@ -57885,11 +21313,7 @@
      jm_save_LIBS="$LIBS"
  
      if test "$jm_cv_func_iconv" != yes; then
@@ -64693,7 +64841,7 @@
  /* end confdefs.h.  */
  #include <stdlib.h>
  #include <giconv.h>
-@@ -57808,48 +21369,17 @@
+@@ -57903,48 +21327,17 @@
    return 0;
  }
  _ACEOF
@@ -64746,7 +64894,7 @@
  /* end confdefs.h.  */
  #include <stdlib.h>
  #include <iconv.h>
-@@ -57863,49 +21393,18 @@
+@@ -57958,49 +21351,18 @@
    return 0;
  }
  _ACEOF
@@ -64800,7 +64948,7 @@
  /* end confdefs.h.  */
  #include <stdlib.h>
  #include <giconv.h>
-@@ -57919,53 +21418,22 @@
+@@ -58014,53 +21376,22 @@
    return 0;
  }
  _ACEOF
@@ -64858,7 +65006,7 @@
  /* end confdefs.h.  */
  #include <stdlib.h>
  #include <iconv.h>
-@@ -57979,50 +21447,19 @@
+@@ -58074,50 +21405,19 @@
    return 0;
  }
  _ACEOF
@@ -64913,7 +65061,7 @@
  /* end confdefs.h.  */
  #include <stdlib.h>
  #include <biconv.h>
-@@ -58036,42 +21473,15 @@
+@@ -58131,42 +21431,15 @@
    return 0;
  }
  _ACEOF
@@ -64959,7 +65107,7 @@
  
              LIBS="$jm_save_LIBS"
            fi
-@@ -58082,36 +21492,30 @@
+@@ -58177,36 +21450,30 @@
    if test "$jm_cv_func_iconv" = yes; then
      if test "$jm_cv_giconv" = yes; then
  
@@ -65003,7 +65151,7 @@
  $as_echo "no" >&6; }
    fi
  
-@@ -58149,16 +21553,12 @@
+@@ -58244,16 +21511,12 @@
  	# check for default dos charset name
  	for j in CP850 IBM850 ; do
  
@@ -65023,7 +65171,7 @@
  /* end confdefs.h.  */
  
  #include <$jm_cv_include>
-@@ -58171,43 +21571,16 @@
+@@ -58266,43 +21529,16 @@
  }
  
  _ACEOF
@@ -65072,7 +65220,7 @@
  $as_echo "$ICONV_CHARSET" >&6; }
  
  	    default_dos_charset="$ICONV_CHARSET"
-@@ -58219,16 +21592,12 @@
+@@ -58314,16 +21550,12 @@
  	# check for default display charset name
  	for j in ASCII 646 ; do
  
@@ -65092,7 +65240,7 @@
  /* end confdefs.h.  */
  
  #include <$jm_cv_include>
-@@ -58241,43 +21610,16 @@
+@@ -58336,43 +21568,16 @@
  }
  
  _ACEOF
@@ -65141,7 +65289,7 @@
  $as_echo "$ICONV_CHARSET" >&6; }
  
  	    default_display_charset="$ICONV_CHARSET"
-@@ -58289,16 +21631,12 @@
+@@ -58384,16 +21589,12 @@
  	# check for default unix charset name
  	for j in UTF-8 UTF8 ; do
  
@@ -65161,7 +65309,7 @@
  /* end confdefs.h.  */
  
  #include <$jm_cv_include>
-@@ -58311,43 +21649,16 @@
+@@ -58406,43 +21607,16 @@
  }
  
  _ACEOF
@@ -65210,7 +65358,7 @@
  $as_echo "$ICONV_CHARSET" >&6; }
  
  	    default_unix_charset="$ICONV_CHARSET"
-@@ -58386,9 +21697,9 @@
+@@ -58481,9 +21655,9 @@
  	    default_display_charset="ASCII"
  	    default_unix_charset="UTF-8"
  	    samba_cv_HAVE_NATIVE_ICONV=yes
@@ -65222,7 +65370,7 @@
  $as_echo "$as_me: WARNING: $default_dos_charset, $default_display_charset and $default_unix_charset to UCS-16LE" >&2;}
  	fi
  
-@@ -58412,9 +21723,7 @@
+@@ -58507,9 +21681,7 @@
  	    default_unix_charset="\"$default_unix_charset\""
  
  
@@ -65233,7 +65381,7 @@
  
  
  cat >>confdefs.h <<_ACEOF
-@@ -58448,7 +21757,7 @@
+@@ -58543,7 +21715,7 @@
  
  
  if test x"$ICONV_FOUND" = x"no" -o x"$samba_cv_HAVE_NATIVE_ICONV" != x"yes" ; then
@@ -65242,7 +65390,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;}
-@@ -58470,20 +21779,16 @@
+@@ -58565,20 +21737,16 @@
  fi
  
  
@@ -65267,7 +65415,7 @@
  /* end confdefs.h.  */
  
  #include <sys/types.h>
-@@ -58497,67 +21802,34 @@
+@@ -58592,67 +21760,34 @@
  }
  
  _ACEOF
@@ -65345,7 +65493,7 @@
  /* end confdefs.h.  */
  
  #include <sys/types.h>
-@@ -58571,204 +21843,36 @@
+@@ -58666,325 +21801,62 @@
  }
  
  _ACEOF
@@ -65380,40 +65528,33 @@
 -
 -( exit $ac_status )
 -samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=no
-+  samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=no
- 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
-+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-+  conftest.$ac_objext conftest.beam conftest.$ac_ext
- fi
- 
+-fi
 -
- fi
+-
+-fi
 -{ $as_echo "$as_me:$LINENO: result: $samba_cv_HAVE_KERNEL_CHANGE_NOTIFY" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $samba_cv_HAVE_KERNEL_CHANGE_NOTIFY" >&5
- $as_echo "$samba_cv_HAVE_KERNEL_CHANGE_NOTIFY" >&6; }
- if test x"$samba_cv_HAVE_KERNEL_CHANGE_NOTIFY" = x"yes"; then
- 
+-$as_echo "$samba_cv_HAVE_KERNEL_CHANGE_NOTIFY" >&6; }
+-if test x"$samba_cv_HAVE_KERNEL_CHANGE_NOTIFY" = x"yes"; then
+-
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_KERNEL_CHANGE_NOTIFY 1
 -_ACEOF
-+$as_echo "#define HAVE_KERNEL_CHANGE_NOTIFY 1" >>confdefs.h
- 
- fi
- 
+-
+-fi
+-
 -{ $as_echo "$as_me:$LINENO: checking for inotify support" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inotify support" >&5
- $as_echo_n "checking for inotify support... " >&6; }
+-$as_echo_n "checking for inotify support... " >&6; }
 -if test "${samba_cv_HAVE_INOTIFY+set}" = set; then
-+if test "${samba_cv_HAVE_INOTIFY+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
- 
+-  $as_echo_n "(cached) " >&6
+-else
 -
 -
 -
- for ac_header in linux/inotify.h asm/unistd.h sys/inotify.h
+-
+-for ac_header in linux/inotify.h asm/unistd.h sys/inotify.h
 -do
 -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
@@ -65545,38 +65686,44 @@
 -  $as_echo_n "(cached) " >&6
 -else
 -  eval "$as_ac_Header=\$ac_header_preproc"
--fi
++  samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=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
++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
++  conftest.$ac_objext conftest.beam conftest.$ac_ext
+ fi
 -as_val=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+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
-@@ -58776,120 +21880,26 @@
+-  cat >>confdefs.h <<_ACEOF
+-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+-_ACEOF
+ 
  fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $samba_cv_HAVE_KERNEL_CHANGE_NOTIFY" >&5
++$as_echo "$samba_cv_HAVE_KERNEL_CHANGE_NOTIFY" >&6; }
++if test x"$samba_cv_HAVE_KERNEL_CHANGE_NOTIFY" = x"yes"; then
  
- done
--
--
+-done
++$as_echo "#define HAVE_KERNEL_CHANGE_NOTIFY 1" >>confdefs.h
+ 
++fi
+ 
 -for ac_func in inotify_init
 -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 inotify support" >&5
++$as_echo_n "checking for inotify support... " >&6; }
++if test "${samba_cv_HAVE_INOTIFY+set}" = set; then :
+   $as_echo_n "(cached) " >&6
+ else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
@@ -65613,7 +65760,7 @@
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
 -#endif
--
+ 
 -int
 -main ()
 -{
@@ -65621,7 +65768,14 @@
 -  ;
 -  return 0;
 -}
--_ACEOF
++for ac_header in linux/inotify.h asm/unistd.h sys/inotify.h
++do :
++  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
++ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
++if eval test \"x\$"$as_ac_Header"\" = 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"
 -case "(($ac_try" in
@@ -65647,10 +65801,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
@@ -65662,6 +65816,7 @@
 -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 inotify_init
 +do :
@@ -65693,7 +65848,7 @@
  /* end confdefs.h.  */
  #include <asm/unistd.h>
  int
-@@ -58900,54 +21910,29 @@
+@@ -58995,54 +21867,29 @@
    return 0;
  }
  _ACEOF
@@ -65754,7 +65909,7 @@
  
  fi
  
-@@ -58956,157 +21941,18 @@
+@@ -59051,157 +21898,18 @@
  #	http://oss.sgi.com/projects/fam/
  #	http://savannah.nongnu.org/projects/fam/
  # Check whether --enable-fam was given.
@@ -65918,7 +66073,7 @@
  _ACEOF
   samba_cv_HAVE_FAM_H=yes
  else
-@@ -59118,18 +21964,14 @@
+@@ -59213,18 +21921,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.
@@ -65940,7 +66095,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -59147,43 +21989,18 @@
+@@ -59242,43 +21946,18 @@
    return 0;
  }
  _ACEOF
@@ -65990,7 +66145,7 @@
    samba_cv_HAVE_LIBFAM=yes; SMB_FAM_LIBS="-lfam"
  else
    samba_cv_HAVE_LIBFAM=no
-@@ -59194,23 +22011,17 @@
+@@ -59289,23 +21968,17 @@
              samba_fam_xtra=-lC
  
  
@@ -66017,7 +66172,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -59228,72 +22039,41 @@
+@@ -59323,72 +21996,41 @@
    return 0;
  }
  _ACEOF
@@ -66098,7 +66253,7 @@
  /* end confdefs.h.  */
  #include <fam.h>
  int
-@@ -59304,43 +22084,16 @@
+@@ -59399,43 +22041,16 @@
    return 0;
  }
  _ACEOF
@@ -66141,11 +66296,11 @@
 -        { { $as_echo "$as_me:$LINENO: error: FAM support requested but FAM library not available " >&5
 -$as_echo "$as_me: error: FAM support requested but FAM library not available " >&2;}
 -   { (exit 1); exit 1; }; }
-+        as_fn_error "FAM support requested but FAM library not available " "$LINENO" 5
++        as_fn_error $? "FAM support requested but FAM library not available " "$LINENO" 5
      fi
  fi
  
-@@ -59353,18 +22106,14 @@
+@@ -59448,18 +22063,14 @@
      samba_dmapi_libs=""
  
      if test x"$samba_dmapi_libs" = x"" ; then
@@ -66167,7 +66322,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -59382,61 +22131,32 @@
+@@ -59477,61 +22088,32 @@
    return 0;
  }
  _ACEOF
@@ -66238,7 +66393,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -59454,61 +22174,32 @@
+@@ -59549,61 +22131,32 @@
    return 0;
  }
  _ACEOF
@@ -66309,7 +66464,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -59526,61 +22217,32 @@
+@@ -59621,61 +22174,32 @@
    return 0;
  }
  _ACEOF
@@ -66380,7 +66535,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -59598,43 +22260,18 @@
+@@ -59693,43 +22217,18 @@
    return 0;
  }
  _ACEOF
@@ -66430,7 +66585,7 @@
    samba_dmapi_libs="-lxdsm"
  fi
  
-@@ -59643,153 +22280,12 @@
+@@ -59738,153 +22237,11 @@
  
      # Only bother to test ehaders if we have a candidate DMAPI library
      if test x"$samba_dmapi_libs" != x"" ; then
@@ -66585,12 +66740,11 @@
 +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 eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
-@@ -59803,11 +22299,7 @@
+@@ -59898,11 +22255,7 @@
      if test x"$samba_dmapi_libs" != x"" ; then
  	samba_dmapi_save_LIBS="$LIBS"
  	LIBS="$LIBS $samba_dmapi_libs"
@@ -66603,7 +66757,7 @@
  /* end confdefs.h.  */
  
  #include <time.h>      /* needed by Tru64 */
-@@ -59842,50 +22334,25 @@
+@@ -59937,466 +22290,154 @@
    return 0;
  }
  _ACEOF
@@ -66658,49 +66812,57 @@
  $as_echo "$as_me: DMAPI support not present" >&6;}
  
  	# DMAPI detection failure actions end
-@@ -59893,11 +22360,9 @@
- 	# DMAPI detection success actions start
- 
- 
+     else
+-	# DMAPI detection success actions start
+-
+-
 -cat >>confdefs.h <<\_ACEOF
 -#define USE_DMAPI 1
 -_ACEOF
-+$as_echo "#define USE_DMAPI 1" >>confdefs.h
- 
+-
 -		{ $as_echo "$as_me:$LINENO: Found DMAPI support in $samba_dmapi_libs" >&5
-+		{ $as_echo "$as_me:${as_lineno-$LINENO}: Found DMAPI support in $samba_dmapi_libs" >&5
- $as_echo "$as_me: Found DMAPI support in $samba_dmapi_libs" >&6;}
- 
- 	# DMAPI detection success actions end
-@@ -59911,20 +22376,16 @@
-     default_shared_modules="$default_shared_modules vfs_tsmsm"
- fi
- 
+-$as_echo "$as_me: Found DMAPI support in $samba_dmapi_libs" >&6;}
+-
+-	# DMAPI detection success actions end
+-    fi
+-
+-
+-
+-# Add TSM SM VFS module only if there are both GPFS and DMAPI support
+-# Theoretically it should work with AIX JFS2 too but this needs testing
+-if test x"$ac_cv_header_gpfs_gpl_h" = x"yes" && test x"$samba_dmapi_libs" != x"" ; then
+-    default_shared_modules="$default_shared_modules vfs_tsmsm"
+-fi
+-
 -{ $as_echo "$as_me:$LINENO: checking for kernel share modes" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kernel share modes" >&5
- $as_echo_n "checking for kernel share modes... " >&6; }
+-$as_echo_n "checking for kernel share modes... " >&6; }
 -if test "${samba_cv_HAVE_KERNEL_SHARE_MODES+set}" = set; then
-+if test "${samba_cv_HAVE_KERNEL_SHARE_MODES+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 :
-   samba_cv_HAVE_KERNEL_SHARE_MODES=cross
- else
+-  samba_cv_HAVE_KERNEL_SHARE_MODES=cross
+-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.  */
- 
- #include <sys/types.h>
-@@ -59940,65 +22401,32 @@
- }
- 
- _ACEOF
+-/* end confdefs.h.  */
+-
+-#include <sys/types.h>
+-#include <fcntl.h>
+-#include <signal.h>
+-#include <sys/file.h>
+-#ifndef LOCK_MAND
+-#define LOCK_MAND	32
+-#define LOCK_READ	64
+-#endif
+-main() {
+-       	exit(flock(open("/dev/null", O_RDWR), LOCK_MAND|LOCK_READ) != 0);
+-}
+-
+-_ACEOF
 -rm -f conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -66723,59 +66885,54 @@
 -  ac_status=$?
 -  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
 -  (exit $ac_status); }; }; then
-+if ac_fn_c_try_run "$LINENO"; then :
-   samba_cv_HAVE_KERNEL_SHARE_MODES=yes
- else
+-  samba_cv_HAVE_KERNEL_SHARE_MODES=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_KERNEL_SHARE_MODES=no
-+  samba_cv_HAVE_KERNEL_SHARE_MODES=no
- 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
-+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-+  conftest.$ac_objext conftest.beam conftest.$ac_ext
- fi
- 
+-fi
 -
- fi
+-
+-fi
 -{ $as_echo "$as_me:$LINENO: result: $samba_cv_HAVE_KERNEL_SHARE_MODES" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $samba_cv_HAVE_KERNEL_SHARE_MODES" >&5
- $as_echo "$samba_cv_HAVE_KERNEL_SHARE_MODES" >&6; }
- if test x"$samba_cv_HAVE_KERNEL_SHARE_MODES" = x"yes"; then
- 
+-$as_echo "$samba_cv_HAVE_KERNEL_SHARE_MODES" >&6; }
+-if test x"$samba_cv_HAVE_KERNEL_SHARE_MODES" = x"yes"; then
+-
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_KERNEL_SHARE_MODES 1
 -_ACEOF
-+$as_echo "#define HAVE_KERNEL_SHARE_MODES 1" >>confdefs.h
- 
- fi
- 
- 
+-
+-fi
+-
+-
 -{ $as_echo "$as_me:$LINENO: checking for IRIX kernel oplock type definitions" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for IRIX kernel oplock type definitions" >&5
- $as_echo_n "checking for IRIX kernel oplock type definitions... " >&6; }
+-$as_echo_n "checking for IRIX kernel oplock type definitions... " >&6; }
 -if test "${samba_cv_HAVE_KERNEL_OPLOCKS_IRIX+set}" = set; then
-+if test "${samba_cv_HAVE_KERNEL_OPLOCKS_IRIX+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.  */
- #include <sys/types.h>
- #include <fcntl.h>
-@@ -60010,185 +22438,29 @@
-   return 0;
- }
- _ACEOF
+-/* end confdefs.h.  */
+-#include <sys/types.h>
+-#include <fcntl.h>
+-int
+-main ()
+-{
+-oplock_stat_t t; t.os_state = OP_REVOKE; t.os_dev = 1; t.os_ino = 1;
+-  ;
+-  return 0;
+-}
+-_ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -66794,33 +66951,29 @@
 -	 test -z "$ac_c_werror_flag" ||
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
-+if ac_fn_c_try_compile "$LINENO"; then :
-   samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=yes
- else
+-  samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=yes
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=no
-+  samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=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: $samba_cv_HAVE_KERNEL_OPLOCKS_IRIX" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $samba_cv_HAVE_KERNEL_OPLOCKS_IRIX" >&5
- $as_echo "$samba_cv_HAVE_KERNEL_OPLOCKS_IRIX" >&6; }
- if test x"$samba_cv_HAVE_KERNEL_OPLOCKS_IRIX" = x"yes"; then
- 
+-$as_echo "$samba_cv_HAVE_KERNEL_OPLOCKS_IRIX" >&6; }
+-if test x"$samba_cv_HAVE_KERNEL_OPLOCKS_IRIX" = x"yes"; then
+-
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_KERNEL_OPLOCKS_IRIX 1
 -_ACEOF
-+$as_echo "#define HAVE_KERNEL_OPLOCKS_IRIX 1" >>confdefs.h
- 
- fi
- 
- #################################################
- # Check for POSIX capability support
- 
+-
+-fi
+-
+-#################################################
+-# Check for POSIX capability support
+-
 -if test "${ac_cv_header_sys_capability_h+set}" = set; then
 -  { $as_echo "$as_me:$LINENO: checking for sys/capability.h" >&5
 -$as_echo_n "checking for sys/capability.h... " >&6; }
@@ -66954,30 +67107,43 @@
 -
 -fi
 -if test "x$ac_cv_header_sys_capability_h" = x""yes; then
-+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 :
-   samba_cv_HAVE_SYS_CAPABILITY_H=yes;
+-  samba_cv_HAVE_SYS_CAPABILITY_H=yes;
++	# DMAPI detection success actions start
  
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_SYS_CAPABILITY_H 1
 -_ACEOF
-+$as_echo "#define HAVE_SYS_CAPABILITY_H 1" >>confdefs.h
  
- fi
+-fi
++$as_echo "#define USE_DMAPI 1" >>confdefs.h
  
-@@ -60198,110 +22470,18 @@
++		{ $as_echo "$as_me:${as_lineno-$LINENO}: Found DMAPI support in $samba_dmapi_libs" >&5
++$as_echo "$as_me: Found DMAPI support in $samba_dmapi_libs" >&6;}
  
-     ac_save_LIBS=$LIBS
++	# DMAPI detection success actions end
++    fi
  
--
+-if test x"$samba_cv_HAVE_SYS_CAPABILITY_H" = x"yes"; then
+ 
+-    ac_save_LIBS=$LIBS
+ 
++# Add TSM SM VFS module only if there are both GPFS and DMAPI support
++# Theoretically it should work with AIX JFS2 too but this needs testing
++if test x"$ac_cv_header_gpfs_gpl_h" = x"yes" && test x"$samba_dmapi_libs" != x"" ; then
++    default_shared_modules="$default_shared_modules vfs_tsmsm"
++fi
+ 
 -for ac_func in cap_get_proc
 -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 kernel share modes" >&5
++$as_echo_n "checking for kernel share modes... " >&6; }
++if test "${samba_cv_HAVE_KERNEL_SHARE_MODES+set}" = set; then :
+   $as_echo_n "(cached) " >&6
+ else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
@@ -66987,20 +67153,44 @@
 -/* 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.  */
--
++if test "$cross_compiling" = yes; then :
++  samba_cv_HAVE_KERNEL_SHARE_MODES=cross
++else
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
+ 
 -#ifdef __STDC__
 -# include <limits.h>
 -#else
 -# include <assert.h>
--#endif
--
++#include <sys/types.h>
++#include <fcntl.h>
++#include <signal.h>
++#include <sys/file.h>
++#ifndef LOCK_MAND
++#define LOCK_MAND	32
++#define LOCK_READ	64
+ #endif
++main() {
++       	exit(flock(open("/dev/null", O_RDWR), LOCK_MAND|LOCK_READ) != 0);
++}
+ 
 -#undef $ac_func
--
++_ACEOF
++if ac_fn_c_try_run "$LINENO"; then :
++  samba_cv_HAVE_KERNEL_SHARE_MODES=yes
++else
++  samba_cv_HAVE_KERNEL_SHARE_MODES=no
++fi
++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
++  conftest.$ac_objext conftest.beam conftest.$ac_ext
++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.  */
@@ -67014,15 +67204,35 @@
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
 -#endif
--
--int
--main ()
--{
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $samba_cv_HAVE_KERNEL_SHARE_MODES" >&5
++$as_echo "$samba_cv_HAVE_KERNEL_SHARE_MODES" >&6; }
++if test x"$samba_cv_HAVE_KERNEL_SHARE_MODES" = x"yes"; then
++
++$as_echo "#define HAVE_KERNEL_SHARE_MODES 1" >>confdefs.h
++
++fi
++
++
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for IRIX kernel oplock type definitions" >&5
++$as_echo_n "checking for IRIX kernel oplock type definitions... " >&6; }
++if test "${samba_cv_HAVE_KERNEL_OPLOCKS_IRIX+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
+ 
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++#include <sys/types.h>
++#include <fcntl.h>
+ int
+ main ()
+ {
 -return $ac_func ();
--  ;
--  return 0;
--}
--_ACEOF
++oplock_stat_t t; t.os_state = OP_REVOKE; t.os_dev = 1; t.os_ino = 1;
+   ;
+   return 0;
+ }
+ _ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -67045,17 +67255,37 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  eval "$as_ac_var=yes"
--else
++if ac_fn_c_try_compile "$LINENO"; then :
++  samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=yes
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
++  samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=no
++fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $samba_cv_HAVE_KERNEL_OPLOCKS_IRIX" >&5
++$as_echo "$samba_cv_HAVE_KERNEL_OPLOCKS_IRIX" >&6; }
++if test x"$samba_cv_HAVE_KERNEL_OPLOCKS_IRIX" = x"yes"; then
++
++$as_echo "#define HAVE_KERNEL_OPLOCKS_IRIX 1" >>confdefs.h
+ 
 -	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
++#################################################
++# Check for POSIX capability support
++
++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 :
++  samba_cv_HAVE_SYS_CAPABILITY_H=yes;
++
++$as_echo "#define HAVE_SYS_CAPABILITY_H 1" >>confdefs.h
++
+ fi
 -ac_res=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
@@ -67063,6 +67293,13 @@
 -as_val=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
++
++
++
++if test x"$samba_cv_HAVE_SYS_CAPABILITY_H" = x"yes"; then
++
++    ac_save_LIBS=$LIBS
++
 +  for ac_func in cap_get_proc
 +do :
 +  ac_fn_c_check_func "$LINENO" "cap_get_proc" "ac_cv_func_cap_get_proc"
@@ -67082,7 +67319,7 @@
  
  
  
-@@ -60318,18 +22498,14 @@
+@@ -60413,18 +22454,14 @@
  	    ;;
            *)
  	    # cap_get_proc was not found, try adding libcap
@@ -67104,7 +67341,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -60347,50 +22523,23 @@
+@@ -60442,50 +22479,23 @@
    return 0;
  }
  _ACEOF
@@ -67162,7 +67399,7 @@
  
  
  
-@@ -60412,20 +22561,16 @@
+@@ -60507,20 +22517,16 @@
  
  
  
@@ -67187,7 +67424,7 @@
  /* end confdefs.h.  */
  
  #include <sys/types.h>
-@@ -60441,52 +22586,23 @@
+@@ -60536,52 +22542,23 @@
   exit(0);
  }
  _ACEOF
@@ -67246,7 +67483,7 @@
  
  else
      LIBS=$ac_save_LIBS
-@@ -60499,17 +22615,13 @@
+@@ -60594,17 +22571,13 @@
  # This is *really* broken but some systems (DEC OSF1) do this.... JRA.
  #
  
@@ -67267,7 +67504,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #if defined(HAVE_RPC_RPC_H)
-@@ -60523,55 +22635,28 @@
+@@ -60618,55 +22591,28 @@
    return 0;
  }
  _ACEOF
@@ -67330,7 +67567,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #if defined(HAVE_RPC_RPC_H)
-@@ -60585,55 +22670,28 @@
+@@ -60680,55 +22626,28 @@
    return 0;
  }
  _ACEOF
@@ -67393,7 +67630,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #if defined(HAVE_RPC_RPC_H)
-@@ -60647,55 +22705,28 @@
+@@ -60742,55 +22661,28 @@
    return 0;
  }
  _ACEOF
@@ -67417,12 +67654,11 @@
 -       } && test -s conftest.$ac_objext; then
 +if ac_fn_c_try_compile "$LINENO"; then :
    samba_cv_HAVE_INT32_FROM_RPC_RPC_H=yes
--else
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	samba_cv_HAVE_INT32_FROM_RPC_RPC_H=no
-+else
 +  samba_cv_HAVE_INT32_FROM_RPC_RPC_H=no
  fi
 -
@@ -67457,7 +67693,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #if defined(HAVE_RPC_RPC_H)
-@@ -60709,56 +22740,29 @@
+@@ -60804,56 +22696,29 @@
    return 0;
  }
  _ACEOF
@@ -67521,7 +67757,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #ifdef HAVE_SYS_SECURITY_H
-@@ -60776,238 +22780,112 @@
+@@ -60871,238 +22736,112 @@
    return 0;
  }
  _ACEOF
@@ -67620,7 +67856,7 @@
 -{ { $as_echo "$as_me:$LINENO: error: cant find test code. Aborting config" >&5
 -$as_echo "$as_me: error: cant find test code. Aborting config" >&2;}
 -   { (exit 1); exit 1; }; }
-+  as_fn_error "cant find test code. Aborting config" "$LINENO" 5
++  as_fn_error $? "cant find test code. Aborting config" "$LINENO" 5
  fi
 -rm -rf conftest.dSYM
 -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
@@ -67796,7 +68032,7 @@
  /* end confdefs.h.  */
  #include <unistd.h>
  int
-@@ -61018,63 +22896,32 @@
+@@ -61113,63 +22852,32 @@
    return 0;
  }
  _ACEOF
@@ -67869,7 +68105,7 @@
  /* end confdefs.h.  */
  #include <unistd.h>
  int
-@@ -61085,63 +22932,32 @@
+@@ -61180,63 +22888,32 @@
    return 0;
  }
  _ACEOF
@@ -67942,7 +68178,7 @@
  /* end confdefs.h.  */
  #include <unistd.h>
  int
-@@ -61152,63 +22968,32 @@
+@@ -61247,63 +22924,32 @@
    return 0;
  }
  _ACEOF
@@ -68015,7 +68251,7 @@
  /* end confdefs.h.  */
  #include <unistd.h>
  int
-@@ -61219,147 +23004,30 @@
+@@ -61314,147 +22960,30 @@
    return 0;
  }
  _ACEOF
@@ -68173,7 +68409,7 @@
  _ACEOF
  
  fi
-@@ -61371,20 +23039,16 @@
+@@ -61466,20 +22995,16 @@
  seteuid=no;
  
  if test $seteuid = no; then
@@ -68198,7 +68434,7 @@
  /* end confdefs.h.  */
  
  #define AUTOCONF_TEST 1
-@@ -61392,50 +23056,21 @@
+@@ -61487,50 +23012,21 @@
  #include "confdefs.h"
  #include "${srcdir-.}/lib/util_sec.c"
  _ACEOF
@@ -68255,7 +68491,7 @@
  
  fi
  fi
-@@ -61443,20 +23078,16 @@
+@@ -61538,20 +23034,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
@@ -68280,7 +68516,7 @@
  /* end confdefs.h.  */
  
  #define AUTOCONF_TEST 1
-@@ -61464,69 +23095,36 @@
+@@ -61559,69 +23051,36 @@
  #include "confdefs.h"
  #include "${srcdir-.}/lib/util_sec.c"
  _ACEOF
@@ -68360,7 +68596,7 @@
  /* end confdefs.h.  */
  
  #define AUTOCONF_TEST 1
-@@ -61534,69 +23132,36 @@
+@@ -61629,69 +23088,36 @@
  #include "confdefs.h"
  #include "${srcdir-.}/lib/util_sec.c"
  _ACEOF
@@ -68440,7 +68676,7 @@
  /* end confdefs.h.  */
  
  #define AUTOCONF_TEST 1
-@@ -61604,64 +23169,31 @@
+@@ -61699,64 +23125,31 @@
  #include "confdefs.h"
  #include "${srcdir-.}/lib/util_sec.c"
  _ACEOF
@@ -68514,7 +68750,7 @@
  /* end confdefs.h.  */
  
  #include <sys/syscall.h>
-@@ -61675,195 +23207,98 @@
+@@ -61770,195 +23163,98 @@
    return 0;
  }
  _ACEOF
@@ -68647,23 +68883,20 @@
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken (glibc2.1/x86) 64 bit fcntl locking" >&5
  $as_echo_n "checking for broken (glibc2.1/x86) 64 bit fcntl locking... " >&6; }
 -if test "${samba_cv_HAVE_BROKEN_FCNTL64_LOCKS+set}" = set; then
-+if test "${samba_cv_HAVE_BROKEN_FCNTL64_LOCKS+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 :
-   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=cross
- else
+-  samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=cross
+-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.  */
- #include "${srcdir-.}/../tests/fcntl_lock64.c"
- _ACEOF
+-/* end confdefs.h.  */
+-#include "${srcdir-.}/../tests/fcntl_lock64.c"
+-_ACEOF
 -rm -f conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -68686,15 +68919,26 @@
 -  ac_status=$?
 -  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
 -  (exit $ac_status); }; }; then
-+if ac_fn_c_try_run "$LINENO"; then :
-   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=yes
+-  samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=yes
++if test "${samba_cv_HAVE_BROKEN_FCNTL64_LOCKS+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
--
+ 
 -( exit $ac_status )
 -samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=no
++if test "$cross_compiling" = yes; then :
++  samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=cross
++else
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++#include "${srcdir-.}/../tests/fcntl_lock64.c"
++_ACEOF
++if ac_fn_c_try_run "$LINENO"; then :
++  samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=yes
++else
 +  samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=no
  fi
 -rm -rf conftest.dSYM
@@ -68740,7 +68984,7 @@
  /* end confdefs.h.  */
  
  #if defined(HAVE_UNISTD_H)
-@@ -61887,67 +23322,34 @@
+@@ -61982,67 +23278,34 @@
  #endif
  }
  _ACEOF
@@ -68817,7 +69061,7 @@
  /* end confdefs.h.  */
  
    #define _XOPEN_SOURCE 600
-@@ -61965,56 +23367,29 @@
+@@ -62060,56 +23323,29 @@
    return 0;
  }
  _ACEOF
@@ -68881,7 +69125,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <sys/stat.h>
-@@ -62027,141 +23402,24 @@
+@@ -62122,141 +23358,24 @@
    return 0;
  }
  _ACEOF
@@ -69030,7 +69274,7 @@
  
  cat >>confdefs.h <<_ACEOF
  #define HAVE_BLKSIZE_T 1
-@@ -62169,103 +23427,9 @@
+@@ -62264,103 +23383,9 @@
  
  
  fi
@@ -69137,7 +69381,7 @@
  
  cat >>confdefs.h <<_ACEOF
  #define HAVE_BLKCNT_T 1
-@@ -62275,17 +23439,13 @@
+@@ -62370,17 +23395,13 @@
  fi
  
  
@@ -69158,7 +69402,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <sys/stat.h>
-@@ -62298,55 +23458,28 @@
+@@ -62393,55 +23414,28 @@
    return 0;
  }
  _ACEOF
@@ -69221,7 +69465,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <sys/stat.h>
-@@ -62359,57 +23492,30 @@
+@@ -62454,57 +23448,30 @@
    return 0;
  }
  _ACEOF
@@ -69286,7 +69530,7 @@
  /* end confdefs.h.  */
  
  #include <sys/types.h>
-@@ -62425,58 +23531,31 @@
+@@ -62520,58 +23487,31 @@
    return 0;
  }
  _ACEOF
@@ -69353,7 +69597,7 @@
  /* end confdefs.h.  */
  
  #include <stdio.h>
-@@ -62495,74 +23574,45 @@
+@@ -62590,74 +23530,45 @@
  }
  
  _ACEOF
@@ -69439,7 +69683,7 @@
  $as_echo "no" >&6; }
  
  fi
-@@ -62571,24 +23621,24 @@
+@@ -62666,24 +23577,24 @@
  ####################################################
  # check for Linux-specific AFS fake-kaserver support
  samba_cv_WITH_FAKE_KASERVER=no
@@ -69469,7 +69713,7 @@
  $as_echo "no" >&6; }
  
  fi
-@@ -62600,18 +23650,14 @@
+@@ -62695,18 +23606,14 @@
     test x"$samba_cv_WITH_FAKE_KASERVER" != x"no"; then
  
      # see if this box has the OpenSSL DES libraries
@@ -69491,7 +69735,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -62629,208 +23675,43 @@
+@@ -62724,208 +23631,42 @@
    return 0;
  }
  _ACEOF
@@ -69543,7 +69787,7 @@
 -  { { $as_echo "$as_me:$LINENO: error: OpenSSL library: libcrypto ot found!" >&5
 -$as_echo "$as_me: error: OpenSSL library: libcrypto ot found!" >&2;}
 -   { (exit 1); exit 1; }; }
-+  as_fn_error "OpenSSL library: libcrypto ot found!" "$LINENO" 5
++  as_fn_error $? "OpenSSL library: libcrypto ot found!" "$LINENO" 5
  fi
  
  
@@ -69711,12 +69955,11 @@
 +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 eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
-@@ -62842,12 +23723,10 @@
+@@ -62937,12 +23678,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
@@ -69727,11 +69970,11 @@
 -	    	{ { $as_echo "$as_me:$LINENO: error: AFS cannot be supported without afs.h" >&5
 -$as_echo "$as_me: error: AFS cannot be supported without afs.h" >&2;}
 -   { (exit 1); exit 1; }; }
-+	    	as_fn_error "AFS cannot be supported without afs.h" "$LINENO" 5
++	    	as_fn_error $? "AFS cannot be supported without afs.h" "$LINENO" 5
  	fi
      else
      	have_afs_headers=yes
-@@ -62857,9 +23736,7 @@
+@@ -62952,9 +23691,7 @@
  FAKE_KASERVER_OBJ=""
  if test x"$samba_cv_WITH_FAKE_KASERVER" != x"no" && test x"$have_afs_headers" = x"yes"; then
  
@@ -69742,7 +69985,7 @@
  
      FAKE_KASERVER_OBJ="utils/net_afs.o"
  fi
-@@ -62868,24 +23745,24 @@
+@@ -62963,24 +23700,24 @@
  #################################################
  # check whether to compile AFS/NT ACL mapping module
  samba_cv_WITH_VFS_AFSACL=no
@@ -69772,7 +70015,7 @@
  $as_echo "no" >&6; }
  
  fi
-@@ -62897,36 +23774,32 @@
+@@ -62992,36 +23729,32 @@
  
  if test x"$samba_cv_WITH_AFS" != x"no" && test x"$have_afs_headers" = x"yes"; then
  
@@ -69816,7 +70059,7 @@
  $as_echo "no" >&6; }
  
  fi
-@@ -62936,12 +23809,12 @@
+@@ -63031,12 +23764,12 @@
  # Compile with LDAP support?
  
  with_ldap_support=auto
@@ -69831,7 +70074,7 @@
    withval=$with_ldap;  case "$withval" in
      yes|no)
  	with_ldap_support=$withval
-@@ -62950,7 +23823,7 @@
+@@ -63045,7 +23778,7 @@
  fi
  
  
@@ -69840,7 +70083,7 @@
  $as_echo "$with_ldap_support" >&6; }
  
  SMBLDAP=""
-@@ -62965,150 +23838,12 @@
+@@ -63060,150 +23793,11 @@
    ##################################################################
    # first test for ldap.h and lber.h
    # (ldap.h is required for this test)
@@ -69992,26 +70235,25 @@
 +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 eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
-@@ -63120,11 +23855,9 @@
+@@ -63215,11 +23809,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; }; }
-+	 as_fn_error "ldap.h is needed for LDAP support" "$LINENO" 5
++	 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:${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
  
-@@ -63136,117 +23869,24 @@
+@@ -63231,117 +23823,24 @@
    # unsigned int in include/includes.h
    case $host_os in
  	*hpux*)
@@ -70129,14 +70371,14 @@
 -	 	{ { $as_echo "$as_me:$LINENO: error: ber_tag_t is needed for LDAP support" >&5
 -$as_echo "$as_me: error: ber_tag_t is needed for LDAP support" >&2;}
 -   { (exit 1); exit 1; }; }
-+	 	as_fn_error "ber_tag_t is needed for LDAP support" "$LINENO" 5
++	 	as_fn_error $? "ber_tag_t is needed for LDAP support" "$LINENO" 5
  		else
 -	 	{ $as_echo "$as_me:$LINENO: WARNING: ber_tag_t is needed for LDAP support" >&5
 +	 	{ $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;}
  		fi
  		with_ldap_support=no
-@@ -63263,23 +23903,17 @@
+@@ -63358,23 +23857,17 @@
    # this test must be before the libldap test
  
  
@@ -70163,7 +70405,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -63297,54 +23931,28 @@
+@@ -63392,54 +23885,28 @@
    return 0;
  }
  _ACEOF
@@ -70225,7 +70467,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_LIBLBER 1
  _ACEOF
-@@ -63360,25 +23968,19 @@
+@@ -63455,25 +23922,19 @@
  
  fi
  
@@ -70254,7 +70496,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.  */
-@@ -63419,61 +24021,31 @@
+@@ -63514,61 +23975,31 @@
    return 0;
  }
  _ACEOF
@@ -70325,7 +70567,7 @@
  /* end confdefs.h.  */
  #include <ldap.h>
  int
-@@ -63484,59 +24056,32 @@
+@@ -63579,59 +24010,32 @@
    return 0;
  }
  _ACEOF
@@ -70392,7 +70634,7 @@
  /* end confdefs.h.  */
  #include <lber.h>
  int
-@@ -63547,42 +24092,19 @@
+@@ -63642,42 +24046,19 @@
    return 0;
  }
  _ACEOF
@@ -70439,7 +70681,7 @@
  
    fi
  
-@@ -63590,23 +24112,17 @@
+@@ -63685,23 +24066,17 @@
    # now see if we can find the ldap libs in standard paths
  
  
@@ -70466,7 +70708,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -63624,54 +24140,28 @@
+@@ -63719,54 +24094,28 @@
    return 0;
  }
  _ACEOF
@@ -70528,7 +70770,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_LIBLDAP 1
  _ACEOF
-@@ -63687,25 +24177,19 @@
+@@ -63782,25 +24131,19 @@
  
  fi
  
@@ -70557,7 +70799,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.  */
-@@ -63746,62 +24230,32 @@
+@@ -63841,62 +24184,32 @@
    return 0;
  }
  _ACEOF
@@ -70629,7 +70871,7 @@
  /* end confdefs.h.  */
  
  	#include <lber.h>
-@@ -63814,37 +24268,16 @@
+@@ -63909,37 +24222,16 @@
    return 0;
  }
  _ACEOF
@@ -70670,7 +70912,7 @@
  $as_echo "$smb_ldap_cv_ldap_set_rebind_proc" >&6; }
  
  
-@@ -63855,19 +24288,14 @@
+@@ -63950,19 +24242,14 @@
  
  
  
@@ -70693,7 +70935,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.  */
-@@ -63908,55 +24336,27 @@
+@@ -64003,55 +24290,27 @@
    return 0;
  }
  _ACEOF
@@ -70756,7 +70998,7 @@
  
      CPPFLAGS="$CPPFLAGS -DLDAP_DEPRECATED"
      default_static_modules="$default_static_modules pdb_ldap idmap_ldap";
-@@ -63964,17 +24364,15 @@
+@@ -64059,17 +24318,15 @@
      SMBLDAP="lib/smbldap.o"
      SMBLDAPUTIL="lib/smbldap_util.o"
      with_ldap_support=yes
@@ -70771,14 +71013,14 @@
 -	{ { $as_echo "$as_me:$LINENO: error: libldap is needed for LDAP support" >&5
 -$as_echo "$as_me: error: libldap is needed for LDAP support" >&2;}
 -   { (exit 1); exit 1; }; }
-+	as_fn_error "libldap is needed for LDAP support" "$LINENO" 5
++	as_fn_error $? "libldap is needed for LDAP support" "$LINENO" 5
      else
 -	{ $as_echo "$as_me:$LINENO: WARNING: libldap is needed for LDAP support" >&5
 +	{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libldap is needed for LDAP support" >&5
  $as_echo "$as_me: WARNING: libldap is needed for LDAP support" >&2;}
      fi
  
-@@ -63989,12 +24387,12 @@
+@@ -64084,12 +24341,12 @@
  # active directory support
  
  with_ads_support=auto
@@ -70793,7 +71035,7 @@
    withval=$with_ads;  case "$withval" in
      yes|no)
  	with_ads_support="$withval"
-@@ -64003,7 +24401,7 @@
+@@ -64098,7 +24355,7 @@
  fi
  
  
@@ -70802,21 +71044,21 @@
  $as_echo "$with_ads_support" >&6; }
  
  FOUND_KRB5=no
-@@ -64012,11 +24410,9 @@
+@@ -64107,11 +24364,9 @@
  if test x"$with_ldap_support" != x"yes"; then
  
      if test x"$with_ads_support" = x"yes"; then
 -	{ { $as_echo "$as_me:$LINENO: error: Active Directory Support requires LDAP support" >&5
 -$as_echo "$as_me: error: Active Directory Support requires LDAP support" >&2;}
 -   { (exit 1); exit 1; }; }
-+	as_fn_error "Active Directory Support requires LDAP support" "$LINENO" 5
++	as_fn_error $? "Active Directory Support requires LDAP support" "$LINENO" 5
      elif test x"$with_ads_support" = x"auto"; then
 -	{ $as_echo "$as_me:$LINENO: WARNING: Disabling Active Directory support (requires LDAP support)" >&5
 +	{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Disabling Active Directory support (requires LDAP support)" >&5
  $as_echo "$as_me: WARNING: Disabling Active Directory support (requires LDAP support)" >&2;}
  	with_ads_support=no
      fi
-@@ -64031,19 +24427,14 @@
+@@ -64126,19 +24381,14 @@
  	*hpux*)
  
  
@@ -70839,7 +71081,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.  */
-@@ -64084,57 +24475,29 @@
+@@ -64179,57 +24429,29 @@
    return 0;
  }
  _ACEOF
@@ -70898,14 +71140,14 @@
 -	    { { $as_echo "$as_me:$LINENO: error: Active Directory support on HPUX requires ldap_init" >&5
 -$as_echo "$as_me: error: Active Directory support on HPUX requires ldap_init" >&2;}
 -   { (exit 1); exit 1; }; }
-+	    as_fn_error "Active Directory support on HPUX requires ldap_init" "$LINENO" 5
++	    as_fn_error $? "Active Directory support on HPUX requires ldap_init" "$LINENO" 5
  	elif test x"$with_ads_support" = x"auto"; then
 -	    { $as_echo "$as_me:$LINENO: WARNING: Disabling Active Directory support (requires ldap_init on HPUX)" >&5
 +	    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Disabling Active Directory support (requires ldap_init on HPUX)" >&5
  $as_echo "$as_me: WARNING: Disabling Active Directory support (requires ldap_init on HPUX)" >&2;}
  	    with_ads_support=no
  	fi
-@@ -64143,19 +24506,14 @@
+@@ -64238,19 +24460,14 @@
  	*)
  
  
@@ -70928,7 +71170,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.  */
-@@ -64196,57 +24554,29 @@
+@@ -64291,57 +24508,29 @@
    return 0;
  }
  _ACEOF
@@ -70987,14 +71229,14 @@
 -	    { { $as_echo "$as_me:$LINENO: error: Active Directory support requires ldap_initialize" >&5
 -$as_echo "$as_me: error: Active Directory support requires ldap_initialize" >&2;}
 -   { (exit 1); exit 1; }; }
-+	    as_fn_error "Active Directory support requires ldap_initialize" "$LINENO" 5
++	    as_fn_error $? "Active Directory support requires ldap_initialize" "$LINENO" 5
  	elif test x"$with_ads_support" = x"auto"; then
 -	    { $as_echo "$as_me:$LINENO: WARNING: Disabling Active Directory support (requires ldap_initialize)" >&5
 +	    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Disabling Active Directory support (requires ldap_initialize)" >&5
  $as_echo "$as_me: WARNING: Disabling Active Directory support (requires ldap_initialize)" >&2;}
  	    with_ads_support=no
  	fi
-@@ -64257,19 +24587,14 @@
+@@ -64352,19 +24541,14 @@
  
  
  
@@ -71017,7 +71259,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.  */
-@@ -64310,57 +24635,29 @@
+@@ -64405,57 +24589,29 @@
    return 0;
  }
  _ACEOF
@@ -71076,14 +71318,14 @@
 -	    { { $as_echo "$as_me:$LINENO: error: Active Directory support requires ldap_add_result_entry" >&5
 -$as_echo "$as_me: error: Active Directory support requires ldap_add_result_entry" >&2;}
 -   { (exit 1); exit 1; }; }
-+	    as_fn_error "Active Directory support requires ldap_add_result_entry" "$LINENO" 5
++	    as_fn_error $? "Active Directory support requires ldap_add_result_entry" "$LINENO" 5
  	elif test x"$with_ads_support" = x"auto"; then
 -	    { $as_echo "$as_me:$LINENO: WARNING: Disabling Active Directory support (requires ldap_add_result_entry)" >&5
 +	    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Disabling Active Directory support (requires ldap_add_result_entry)" >&5
  $as_echo "$as_me: WARNING: Disabling Active Directory support (requires ldap_add_result_entry)" >&2;}
  	    with_ads_support=no
  	fi
-@@ -64376,23 +24673,23 @@
+@@ -64471,23 +24627,23 @@
    if test x$FOUND_KRB5 = x"no"; then
      #################################################
      # check for location of Kerberos 5 install
@@ -71112,7 +71354,7 @@
  $as_echo "$withval" >&6; }
          KRB5_CFLAGS="-I$withval/include"
          KRB5_CPPFLAGS="-I$withval/include"
-@@ -64404,7 +24701,7 @@
+@@ -64499,7 +24655,7 @@
          ;;
        esac
  else
@@ -71121,7 +71363,7 @@
  $as_echo "no krb5-path given" >&6; }
  
  fi
-@@ -64415,9 +24712,9 @@
+@@ -64510,9 +24666,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
@@ -71133,7 +71375,7 @@
    $as_echo_n "(cached) " >&6
  else
    case $KRB5CONFIG in
-@@ -64430,14 +24727,14 @@
+@@ -64525,14 +24681,14 @@
  do
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
@@ -71151,7 +71393,7 @@
  IFS=$as_save_IFS
  
    ;;
-@@ -64445,15 +24742,15 @@
+@@ -64540,15 +24696,15 @@
  fi
  KRB5CONFIG=$ac_cv_path_KRB5CONFIG
  if test -n "$KRB5CONFIG"; then
@@ -71170,7 +71412,7 @@
  $as_echo_n "checking for working krb5-config... " >&6; }
    if test -x "$KRB5CONFIG" && $KRB5CONFIG --libs gssapi > /dev/null ; then
      ac_save_CFLAGS=$CFLAGS
-@@ -64467,17 +24764,17 @@
+@@ -64562,17 +24718,17 @@
      CFLAGS=$ac_save_CFLAGS;export CFLAGS
      LDFLAGS=$ac_save_LDFLAGS;export LDFLAGS
      FOUND_KRB5=yes
@@ -71191,7 +71433,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
-@@ -64485,17 +24782,17 @@
+@@ -64580,17 +24736,17 @@
            KRB5_CPPFLAGS="-I/usr/include/heimdal"
            KRB5_LDFLAGS="-L/usr/lib/heimdal/lib"
  	  FOUND_KRB5=yes
@@ -71212,7 +71454,7 @@
  $as_echo "no" >&6; }
      fi
    fi
-@@ -64503,17 +24800,17 @@
+@@ -64598,17 +24754,17 @@
    if test x$FOUND_KRB5 = x"no"; then
      #################################################
      # see if this box has the RedHat location for kerberos
@@ -71233,7 +71475,7 @@
  $as_echo "no" >&6; }
      fi
    fi
-@@ -64521,16 +24818,16 @@
+@@ -64616,16 +24772,16 @@
    if test x$FOUND_KRB5 = x"no"; then
      #################################################
      # see if this box has the OpenBSD location for heimdal krb5
@@ -71253,53 +71495,11 @@
  $as_echo "no" >&6; }
      fi
    fi
-@@ -64575,193 +24872,54 @@
-   KRB5_LIBS=$ac_new_flags
- 
- 
--  ac_new_flags=""
--  l=""
--  for i in $KRB5_LDFLAGS; do
--    case $l$i in
--    -L/usr/lib) ;;
--    -L/usr/lib/) ;;
--    -L/usr/lib64) ;;
--    -L/usr/lib64/) ;;
--    -Wl,-rpath,/usr/lib) l="";;
--    -Wl,-rpath,/usr/lib/) l="";;
--    -Wl,-rpath,/usr/lib64) l="";;
--    -Wl,-rpath,/usr/lib64/) l="";;
--    -Wl,-rpath) l=$i;;
--    -Wl,-rpath-Wl,/usr/lib) l="";;
--    -Wl,-rpath-Wl,/usr/lib/) l="";;
--    -Wl,-rpath-Wl,/usr/lib64) l="";;
--    -Wl,-rpath-Wl,/usr/lib64/) l="";;
--    *)
--    	s=" "
--        if test x"$ac_new_flags" = x""; then
--            s="";
--	fi
--        if test x"$l" = x""; then
--            ac_new_flags="$ac_new_flags$s$i";
--        else
--            ac_new_flags="$ac_new_flags$s$l $i";
--        fi
--        l=""
--        ;;
--    esac
--  done
--  KRB5_LDFLAGS=$ac_new_flags
+@@ -64712,151 +24868,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
 -
--  CFLAGS="$KRB5_CFLAGS $CFLAGS"
--  CPPFLAGS="$KRB5_CPPFLAGS $CPPFLAGS"
--  LDFLAGS="$KRB5_LDFLAGS $LDFLAGS"
--
--  KRB5_LIBS="$KRB5_LDFLAGS $KRB5_LIBS"
--
--  # 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
--
 -for ac_header in krb5.h
 -do
 -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
@@ -71395,39 +71595,7 @@
 -rm -f conftest.err conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
 -$as_echo "$ac_header_preproc" >&6; }
-+  ac_new_flags=""
-+  l=""
-+  for i in $KRB5_LDFLAGS; do
-+    case $l$i in
-+    -L/usr/lib) ;;
-+    -L/usr/lib/) ;;
-+    -L/usr/lib64) ;;
-+    -L/usr/lib64/) ;;
-+    -Wl,-rpath,/usr/lib) l="";;
-+    -Wl,-rpath,/usr/lib/) l="";;
-+    -Wl,-rpath,/usr/lib64) l="";;
-+    -Wl,-rpath,/usr/lib64/) l="";;
-+    -Wl,-rpath) l=$i;;
-+    -Wl,-rpath-Wl,/usr/lib) l="";;
-+    -Wl,-rpath-Wl,/usr/lib/) l="";;
-+    -Wl,-rpath-Wl,/usr/lib64) l="";;
-+    -Wl,-rpath-Wl,/usr/lib64/) l="";;
-+    *)
-+    	s=" "
-+        if test x"$ac_new_flags" = x""; then
-+            s="";
-+	fi
-+        if test x"$l" = x""; then
-+            ac_new_flags="$ac_new_flags$s$i";
-+        else
-+            ac_new_flags="$ac_new_flags$s$l $i";
-+        fi
-+        l=""
-+        ;;
-+    esac
-+  done
-+  KRB5_LDFLAGS=$ac_new_flags
- 
+-
 -# So?  What about this header?
 -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
 -  yes:no: )
@@ -71469,19 +71637,11 @@
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
 -$as_echo "$ac_res" >&6; }
-+  CFLAGS="$KRB5_CFLAGS $CFLAGS"
-+  CPPFLAGS="$KRB5_CPPFLAGS $CPPFLAGS"
-+  LDFLAGS="$KRB5_LDFLAGS $LDFLAGS"
- 
+-
 -fi
 -as_val=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+  KRB5_LIBS="$KRB5_LDFLAGS $KRB5_LIBS"
-+
-+  # 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
 +  for ac_header in krb5.h
 +do :
 +  ac_fn_c_check_header_mongrel "$LINENO" "krb5.h" "ac_cv_header_krb5_h" "$ac_includes_default"
@@ -71492,21 +71652,21 @@
  _ACEOF
  
  fi
-@@ -64775,11 +24933,9 @@
+@@ -64870,11 +24887,9 @@
      # i.e with_ads_support = auto, otherwise die with an error.
  
      if test x"$with_ads_support" = x"yes"; then
 -      { { $as_echo "$as_me:$LINENO: error: Active Directory cannot be supported without krb5.h" >&5
 -$as_echo "$as_me: error: Active Directory cannot be supported without krb5.h" >&2;}
 -   { (exit 1); exit 1; }; }
-+      as_fn_error "Active Directory cannot be supported without krb5.h" "$LINENO" 5
++      as_fn_error $? "Active Directory cannot be supported without krb5.h" "$LINENO" 5
      else
 -      { $as_echo "$as_me:$LINENO: WARNING: Active Directory cannot be supported without krb5.h" >&5
 +      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Active Directory cannot be supported without krb5.h" >&5
  $as_echo "$as_me: WARNING: Active Directory cannot be supported without krb5.h" >&2;}
      fi
  
-@@ -64791,65 +24947,16 @@
+@@ -64886,65 +24901,16 @@
      CPPFLAGS=$ac_save_CPPFLAGS
      LDFLAGS=$ac_save_LDFLAGS
    fi
@@ -71578,7 +71738,7 @@
  _ACEOF
  
  fi
-@@ -64866,17 +24973,13 @@
+@@ -64961,17 +24927,13 @@
  
    # check for new heimdal KRB5_DEPRECATED handling
  
@@ -71599,7 +71759,7 @@
  /* end confdefs.h.  */
  #define KRB5_DEPRECATED 1
        #include <krb5.h>
-@@ -64888,42 +24991,19 @@
+@@ -64983,42 +24945,19 @@
    return 0;
  }
  _ACEOF
@@ -71646,7 +71806,7 @@
  
    fi
  fi
-@@ -64937,152 +25017,12 @@
+@@ -65032,152 +24971,11 @@
  
    # now check for gssapi headers.  This is also done here to allow for
    # different kerberos include paths
@@ -71800,12 +71960,11 @@
 +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 eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
-@@ -65096,23 +25036,17 @@
+@@ -65191,23 +24989,17 @@
    # we might need the k5crypto and com_err libraries on some systems
  
  
@@ -71832,7 +71991,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -65130,54 +25064,28 @@
+@@ -65225,54 +25017,28 @@
    return 0;
  }
  _ACEOF
@@ -71894,7 +72053,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_LIBCOM_ERR 1
  _ACEOF
-@@ -65194,24 +25102,17 @@
+@@ -65289,24 +25055,17 @@
  fi
  
  
@@ -71922,7 +72081,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -65229,54 +25130,28 @@
+@@ -65324,54 +25083,28 @@
    return 0;
  }
  _ACEOF
@@ -71984,7 +72143,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_LIBK5CRYPTO 1
  _ACEOF
-@@ -65292,27 +25167,20 @@
+@@ -65387,27 +25120,20 @@
  
  fi
  
@@ -72015,7 +72174,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -65330,54 +25198,28 @@
+@@ -65425,54 +25151,28 @@
    return 0;
  }
  _ACEOF
@@ -72077,7 +72236,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_LIBCRYPTO 1
  _ACEOF
-@@ -65394,24 +25236,17 @@
+@@ -65489,24 +25189,17 @@
  fi
  
  
@@ -72105,7 +72264,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -65429,54 +25264,28 @@
+@@ -65524,54 +25217,28 @@
    return 0;
  }
  _ACEOF
@@ -72167,7 +72326,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_LIBASN1 1
  _ACEOF
-@@ -65493,24 +25302,17 @@
+@@ -65588,24 +25255,17 @@
  fi
  
  
@@ -72195,7 +72354,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -65528,54 +25330,28 @@
+@@ -65623,54 +25283,28 @@
    return 0;
  }
  _ACEOF
@@ -72257,7 +72416,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_LIBROKEN 1
  _ACEOF
-@@ -65591,27 +25367,20 @@
+@@ -65686,27 +25320,20 @@
  
  fi
  
@@ -72288,7 +72447,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -65629,54 +25398,28 @@
+@@ -65724,54 +25351,28 @@
    return 0;
  }
  _ACEOF
@@ -72350,7 +72509,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_LIBGSSAPI 1
  _ACEOF
-@@ -65692,29 +25435,22 @@
+@@ -65787,29 +25388,22 @@
  
  fi
  
@@ -72383,7 +72542,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -65732,54 +25468,28 @@
+@@ -65827,54 +25421,28 @@
    return 0;
  }
  _ACEOF
@@ -72445,7 +72604,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_LIBKRB5 1
  _ACEOF
-@@ -65796,24 +25506,17 @@
+@@ -65891,24 +25459,17 @@
  fi
  
  
@@ -72473,7 +72632,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -65831,54 +25534,28 @@
+@@ -65926,54 +25487,28 @@
    return 0;
  }
  _ACEOF
@@ -72535,7 +72694,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_LIBKRB5 1
  _ACEOF
-@@ -65894,29 +25571,22 @@
+@@ -65989,29 +25524,22 @@
  
  fi
  
@@ -72568,7 +72727,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -65934,54 +25604,28 @@
+@@ -66029,54 +25557,28 @@
    return 0;
  }
  _ACEOF
@@ -72630,7 +72789,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_LIBGSSAPI_KRB5 1
  _ACEOF
-@@ -65996,24 +25640,18 @@
+@@ -66091,24 +25593,18 @@
  		have_gssapi=yes
  
  fi
@@ -72658,7 +72817,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.  */
-@@ -66054,43 +25692,18 @@
+@@ -66149,43 +25645,18 @@
    return 0;
  }
  _ACEOF
@@ -72708,7 +72867,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_SET_REAL_TIME 1
  _ACEOF
-@@ -66098,20 +25711,14 @@
+@@ -66193,20 +25664,14 @@
  fi
  
  
@@ -72732,7 +72891,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.  */
-@@ -66152,43 +25759,18 @@
+@@ -66247,43 +25712,18 @@
    return 0;
  }
  _ACEOF
@@ -72782,7 +72941,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_SET_DEFAULT_IN_TKT_ETYPES 1
  _ACEOF
-@@ -66196,20 +25778,14 @@
+@@ -66291,20 +25731,14 @@
  fi
  
  
@@ -72806,7 +72965,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.  */
-@@ -66250,43 +25826,18 @@
+@@ -66345,43 +25779,18 @@
    return 0;
  }
  _ACEOF
@@ -72856,7 +73015,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_SET_DEFAULT_TGS_ENCTYPES 1
  _ACEOF
-@@ -66294,20 +25845,14 @@
+@@ -66389,20 +25798,14 @@
  fi
  
  
@@ -72880,7 +73039,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.  */
-@@ -66348,43 +25893,18 @@
+@@ -66443,43 +25846,18 @@
    return 0;
  }
  _ACEOF
@@ -72930,7 +73089,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_SET_DEFAULT_TGS_KTYPES 1
  _ACEOF
-@@ -66392,20 +25912,14 @@
+@@ -66487,20 +25865,14 @@
  fi
  
  
@@ -72954,7 +73113,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.  */
-@@ -66446,43 +25960,18 @@
+@@ -66541,43 +25913,18 @@
    return 0;
  }
  _ACEOF
@@ -73004,7 +73163,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_PRINCIPAL2SALT 1
  _ACEOF
-@@ -66490,20 +25979,14 @@
+@@ -66585,20 +25932,14 @@
  fi
  
  
@@ -73028,7 +73187,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.  */
-@@ -66544,43 +26027,18 @@
+@@ -66639,43 +25980,18 @@
    return 0;
  }
  _ACEOF
@@ -73078,7 +73237,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_USE_ENCTYPE 1
  _ACEOF
-@@ -66588,20 +26046,14 @@
+@@ -66683,20 +25999,14 @@
  fi
  
  
@@ -73102,7 +73261,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.  */
-@@ -66642,43 +26094,18 @@
+@@ -66737,43 +26047,18 @@
    return 0;
  }
  _ACEOF
@@ -73152,7 +73311,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_STRING_TO_KEY 1
  _ACEOF
-@@ -66686,20 +26113,14 @@
+@@ -66781,20 +26066,14 @@
  fi
  
  
@@ -73176,7 +73335,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.  */
-@@ -66740,43 +26161,18 @@
+@@ -66835,43 +26114,18 @@
    return 0;
  }
  _ACEOF
@@ -73226,7 +73385,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_GET_PW_SALT 1
  _ACEOF
-@@ -66784,20 +26180,14 @@
+@@ -66879,20 +26133,14 @@
  fi
  
  
@@ -73250,7 +73409,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.  */
-@@ -66838,43 +26228,18 @@
+@@ -66933,43 +26181,18 @@
    return 0;
  }
  _ACEOF
@@ -73300,7 +73459,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_STRING_TO_KEY_SALT 1
  _ACEOF
-@@ -66882,20 +26247,14 @@
+@@ -66977,20 +26200,14 @@
  fi
  
  
@@ -73324,7 +73483,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.  */
-@@ -66936,43 +26295,18 @@
+@@ -67031,43 +26248,18 @@
    return 0;
  }
  _ACEOF
@@ -73374,7 +73533,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_AUTH_CON_SETKEY 1
  _ACEOF
-@@ -66980,20 +26314,14 @@
+@@ -67075,20 +26267,14 @@
  fi
  
  
@@ -73398,7 +73557,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.  */
-@@ -67034,43 +26362,18 @@
+@@ -67129,43 +26315,18 @@
    return 0;
  }
  _ACEOF
@@ -73448,7 +73607,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_AUTH_CON_SETUSERUSERKEY 1
  _ACEOF
-@@ -67078,20 +26381,14 @@
+@@ -67173,20 +26334,14 @@
  fi
  
  
@@ -73472,7 +73631,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.  */
-@@ -67132,43 +26429,18 @@
+@@ -67227,43 +26382,18 @@
    return 0;
  }
  _ACEOF
@@ -73522,7 +73681,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_LOCATE_KDC 1
  _ACEOF
-@@ -67176,20 +26448,14 @@
+@@ -67271,20 +26401,14 @@
  fi
  
  
@@ -73546,7 +73705,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.  */
-@@ -67230,43 +26496,18 @@
+@@ -67325,43 +26449,18 @@
    return 0;
  }
  _ACEOF
@@ -73596,7 +73755,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_GET_PERMITTED_ENCTYPES 1
  _ACEOF
-@@ -67274,20 +26515,14 @@
+@@ -67369,20 +26468,14 @@
  fi
  
  
@@ -73620,7 +73779,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.  */
-@@ -67328,43 +26563,18 @@
+@@ -67423,43 +26516,18 @@
    return 0;
  }
  _ACEOF
@@ -73670,7 +73829,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_GET_DEFAULT_IN_TKT_ETYPES 1
  _ACEOF
-@@ -67372,20 +26582,14 @@
+@@ -67467,20 +26535,14 @@
  fi
  
  
@@ -73694,7 +73853,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.  */
-@@ -67426,43 +26630,18 @@
+@@ -67521,43 +26583,18 @@
    return 0;
  }
  _ACEOF
@@ -73744,7 +73903,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_FREE_DATA_CONTENTS 1
  _ACEOF
-@@ -67470,20 +26649,14 @@
+@@ -67565,20 +26602,14 @@
  fi
  
  
@@ -73768,7 +73927,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.  */
-@@ -67524,43 +26697,18 @@
+@@ -67619,43 +26650,18 @@
    return 0;
  }
  _ACEOF
@@ -73818,7 +73977,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_PRINCIPAL_GET_COMP_STRING 1
  _ACEOF
-@@ -67568,20 +26716,14 @@
+@@ -67663,20 +26669,14 @@
  fi
  
  
@@ -73842,7 +74001,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.  */
-@@ -67622,43 +26764,18 @@
+@@ -67717,43 +26717,18 @@
    return 0;
  }
  _ACEOF
@@ -73892,7 +74051,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_FREE_UNPARSED_NAME 1
  _ACEOF
-@@ -67666,20 +26783,14 @@
+@@ -67761,20 +26736,14 @@
  fi
  
  
@@ -73916,7 +74075,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.  */
-@@ -67720,43 +26831,18 @@
+@@ -67815,43 +26784,18 @@
    return 0;
  }
  _ACEOF
@@ -73966,7 +74125,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_FREE_KEYTAB_ENTRY_CONTENTS 1
  _ACEOF
-@@ -67764,20 +26850,14 @@
+@@ -67859,20 +26803,14 @@
  fi
  
  
@@ -73990,7 +74149,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.  */
-@@ -67818,43 +26898,18 @@
+@@ -67913,43 +26851,18 @@
    return 0;
  }
  _ACEOF
@@ -74040,7 +74199,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_KT_FREE_ENTRY 1
  _ACEOF
-@@ -67862,20 +26917,14 @@
+@@ -67957,20 +26870,14 @@
  fi
  
  
@@ -74064,7 +74223,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.  */
-@@ -67916,43 +26965,18 @@
+@@ -68011,43 +26918,18 @@
    return 0;
  }
  _ACEOF
@@ -74114,7 +74273,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_KRBHST_INIT 1
  _ACEOF
-@@ -67960,20 +26984,14 @@
+@@ -68055,20 +26937,14 @@
  fi
  
  
@@ -74138,7 +74297,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.  */
-@@ -68014,43 +27032,18 @@
+@@ -68109,43 +26985,18 @@
    return 0;
  }
  _ACEOF
@@ -74188,7 +74347,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_KRBHST_GET_ADDRINFO 1
  _ACEOF
-@@ -68058,20 +27051,14 @@
+@@ -68153,20 +27004,14 @@
  fi
  
  
@@ -74212,7 +74371,7 @@
  /* 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.  */
-@@ -68112,43 +27099,18 @@
+@@ -68207,43 +27052,18 @@
    return 0;
  }
  _ACEOF
@@ -74262,7 +74421,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_C_ENCTYPE_COMPARE 1
  _ACEOF
-@@ -68156,20 +27118,14 @@
+@@ -68251,20 +27071,14 @@
  fi
  
  
@@ -74286,7 +74445,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.  */
-@@ -68210,43 +27166,18 @@
+@@ -68305,43 +27119,18 @@
    return 0;
  }
  _ACEOF
@@ -74336,7 +74495,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_ENCTYPES_COMPATIBLE_KEYS 1
  _ACEOF
-@@ -68254,20 +27185,14 @@
+@@ -68349,20 +27138,14 @@
  fi
  
  
@@ -74360,7 +74519,7 @@
  /* 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.  */
-@@ -68308,43 +27233,18 @@
+@@ -68403,43 +27186,18 @@
    return 0;
  }
  _ACEOF
@@ -74410,7 +74569,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_CRYPTO_INIT 1
  _ACEOF
-@@ -68352,20 +27252,14 @@
+@@ -68447,20 +27205,14 @@
  fi
  
  
@@ -74434,7 +74593,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.  */
-@@ -68406,43 +27300,18 @@
+@@ -68501,43 +27253,18 @@
    return 0;
  }
  _ACEOF
@@ -74484,7 +74643,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_CRYPTO_DESTROY 1
  _ACEOF
-@@ -68450,20 +27319,14 @@
+@@ -68545,20 +27272,14 @@
  fi
  
  
@@ -74508,7 +74667,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.  */
-@@ -68504,43 +27367,18 @@
+@@ -68599,43 +27320,18 @@
    return 0;
  }
  _ACEOF
@@ -74558,7 +74717,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_DECODE_AP_REQ 1
  _ACEOF
-@@ -68548,20 +27386,14 @@
+@@ -68643,20 +27339,14 @@
  fi
  
  
@@ -74582,7 +74741,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.  */
-@@ -68602,43 +27434,18 @@
+@@ -68697,43 +27387,18 @@
    return 0;
  }
  _ACEOF
@@ -74632,7 +74791,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_FREE_AP_REQ 1
  _ACEOF
-@@ -68646,20 +27453,14 @@
+@@ -68741,20 +27406,14 @@
  fi
  
  
@@ -74656,7 +74815,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.  */
-@@ -68700,43 +27501,18 @@
+@@ -68795,43 +27454,18 @@
    return 0;
  }
  _ACEOF
@@ -74706,7 +74865,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_VERIFY_CHECKSUM 1
  _ACEOF
-@@ -68744,20 +27520,14 @@
+@@ -68839,20 +27473,14 @@
  fi
  
  
@@ -74730,7 +74889,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.  */
-@@ -68798,43 +27568,18 @@
+@@ -68893,43 +27521,18 @@
    return 0;
  }
  _ACEOF
@@ -74780,7 +74939,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_C_VERIFY_CHECKSUM 1
  _ACEOF
-@@ -68842,20 +27587,14 @@
+@@ -68937,20 +27540,14 @@
  fi
  
  
@@ -74804,7 +74963,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.  */
-@@ -68896,43 +27635,18 @@
+@@ -68991,43 +27588,18 @@
    return 0;
  }
  _ACEOF
@@ -74854,7 +75013,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_PRINCIPAL_COMPARE_ANY_REALM 1
  _ACEOF
-@@ -68940,20 +27654,14 @@
+@@ -69035,20 +27607,14 @@
  fi
  
  
@@ -74878,7 +75037,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.  */
-@@ -68994,43 +27702,18 @@
+@@ -69089,43 +27655,18 @@
    return 0;
  }
  _ACEOF
@@ -74928,7 +75087,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_PARSE_NAME_NOREALM 1
  _ACEOF
-@@ -69038,20 +27721,14 @@
+@@ -69133,20 +27674,14 @@
  fi
  
  
@@ -74952,7 +75111,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.  */
-@@ -69092,43 +27769,18 @@
+@@ -69187,43 +27722,18 @@
    return 0;
  }
  _ACEOF
@@ -75002,7 +75161,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_PRINC_SIZE 1
  _ACEOF
-@@ -69136,20 +27788,14 @@
+@@ -69231,20 +27741,14 @@
  fi
  
  
@@ -75026,7 +75185,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.  */
-@@ -69190,43 +27836,18 @@
+@@ -69285,43 +27789,18 @@
    return 0;
  }
  _ACEOF
@@ -75076,7 +75235,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_GET_INIT_CREDS_OPT_SET_PAC_REQUEST 1
  _ACEOF
-@@ -69234,20 +27855,14 @@
+@@ -69329,20 +27808,14 @@
  fi
  
  
@@ -75100,10 +75259,19 @@
  /* 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.  */
-@@ -69288,43 +27903,18 @@
-   return 0;
- }
- _ACEOF
+@@ -69374,52 +27847,27 @@
+ #if defined __stub_krb5_get_renewed_creds || defined __stub___krb5_get_renewed_creds
+ choke me
+ #endif
+-
+-int
+-main ()
+-{
+-return krb5_get_renewed_creds ();
+-  ;
+-  return 0;
+-}
+-_ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -75125,6 +75293,15 @@
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
++
++int
++main ()
++{
++return krb5_get_renewed_creds ();
++  ;
++  return 0;
++}
++_ACEOF
 +if ac_fn_c_try_link "$LINENO"; then :
    ac_cv_func_ext_krb5_get_renewed_creds=yes
  else
@@ -75150,7 +75327,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_GET_RENEWED_CREDS 1
  _ACEOF
-@@ -69332,20 +27922,14 @@
+@@ -69427,20 +27875,14 @@
  fi
  
  
@@ -75174,7 +75351,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.  */
-@@ -69386,43 +27970,18 @@
+@@ -69481,43 +27923,18 @@
    return 0;
  }
  _ACEOF
@@ -75224,7 +75401,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_GET_KDC_CRED 1
  _ACEOF
-@@ -69430,20 +27989,14 @@
+@@ -69525,20 +27942,14 @@
  fi
  
  
@@ -75248,7 +75425,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.  */
-@@ -69484,43 +28037,18 @@
+@@ -69579,43 +27990,18 @@
    return 0;
  }
  _ACEOF
@@ -75298,7 +75475,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_FREE_ERROR_CONTENTS 1
  _ACEOF
-@@ -69528,20 +28056,14 @@
+@@ -69623,20 +28009,14 @@
  fi
  
  
@@ -75322,7 +75499,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.  */
-@@ -69582,43 +28104,18 @@
+@@ -69677,43 +28057,18 @@
    return 0;
  }
  _ACEOF
@@ -75372,7 +75549,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_INITIALIZE_KRB5_ERROR_TABLE 1
  _ACEOF
-@@ -69626,20 +28123,14 @@
+@@ -69721,20 +28076,14 @@
  fi
  
  
@@ -75396,7 +75573,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.  */
-@@ -69680,43 +28171,18 @@
+@@ -69775,43 +28124,18 @@
    return 0;
  }
  _ACEOF
@@ -75446,7 +75623,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_GET_INIT_CREDS_OPT_ALLOC 1
  _ACEOF
-@@ -69724,20 +28190,14 @@
+@@ -69819,20 +28143,14 @@
  fi
  
  
@@ -75470,7 +75647,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.  */
-@@ -69778,43 +28238,18 @@
+@@ -69873,43 +28191,18 @@
    return 0;
  }
  _ACEOF
@@ -75520,7 +75697,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_GET_INIT_CREDS_OPT_FREE 1
  _ACEOF
-@@ -69822,20 +28257,14 @@
+@@ -69917,20 +28210,14 @@
  fi
  
  
@@ -75544,19 +75721,10 @@
  /* 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.  */
-@@ -69867,52 +28296,27 @@
- #if defined __stub_krb5_get_init_creds_opt_get_error || defined __stub___krb5_get_init_creds_opt_get_error
- choke me
- #endif
--
--int
--main ()
--{
--return krb5_get_init_creds_opt_get_error ();
--  ;
--  return 0;
--}
--_ACEOF
+@@ -69971,43 +28258,18 @@
+   return 0;
+ }
+ _ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -75578,15 +75746,6 @@
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
-+
-+int
-+main ()
-+{
-+return krb5_get_init_creds_opt_get_error ();
-+  ;
-+  return 0;
-+}
-+_ACEOF
 +if ac_fn_c_try_link "$LINENO"; then :
    ac_cv_func_ext_krb5_get_init_creds_opt_get_error=yes
  else
@@ -75612,7 +75771,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_GET_INIT_CREDS_OPT_GET_ERROR 1
  _ACEOF
-@@ -69920,20 +28324,14 @@
+@@ -70015,20 +28277,14 @@
  fi
  
  
@@ -75636,7 +75795,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.  */
-@@ -69974,43 +28372,18 @@
+@@ -70069,43 +28325,18 @@
    return 0;
  }
  _ACEOF
@@ -75686,7 +75845,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_ENCTYPE_TO_STRING 1
  _ACEOF
-@@ -70018,20 +28391,14 @@
+@@ -70113,20 +28344,14 @@
  fi
  
  
@@ -75710,7 +75869,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.  */
-@@ -70072,43 +28439,18 @@
+@@ -70167,43 +28392,18 @@
    return 0;
  }
  _ACEOF
@@ -75760,7 +75919,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_FWD_TGT_CREDS 1
  _ACEOF
-@@ -70116,20 +28458,14 @@
+@@ -70211,20 +28411,14 @@
  fi
  
  
@@ -75784,7 +75943,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.  */
-@@ -70170,43 +28506,18 @@
+@@ -70265,43 +28459,18 @@
    return 0;
  }
  _ACEOF
@@ -75834,7 +75993,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_AUTH_CON_SET_REQ_CKSUMTYPE 1
  _ACEOF
-@@ -70214,20 +28525,14 @@
+@@ -70309,20 +28478,14 @@
  fi
  
  
@@ -75858,7 +76017,7 @@
  /* end confdefs.h.  */
  /* Define krb5_get_creds_opt_alloc to an innocuous variant, in case <limits.h> declares krb5_get_creds_opt_alloc.
     For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-@@ -70268,43 +28573,18 @@
+@@ -70363,43 +28526,18 @@
    return 0;
  }
  _ACEOF
@@ -75908,7 +76067,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_GET_CREDS_OPT_ALLOC 1
  _ACEOF
-@@ -70312,20 +28592,14 @@
+@@ -70407,20 +28545,14 @@
  fi
  
  
@@ -75932,7 +76091,7 @@
  /* end confdefs.h.  */
  /* Define krb5_get_creds_opt_set_impersonate to an innocuous variant, in case <limits.h> declares krb5_get_creds_opt_set_impersonate.
     For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-@@ -70366,43 +28640,18 @@
+@@ -70461,43 +28593,18 @@
    return 0;
  }
  _ACEOF
@@ -75982,7 +76141,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_GET_CREDS_OPT_SET_IMPERSONATE 1
  _ACEOF
-@@ -70410,20 +28659,14 @@
+@@ -70505,20 +28612,14 @@
  fi
  
  
@@ -76006,7 +76165,7 @@
  /* end confdefs.h.  */
  /* Define krb5_get_creds to an innocuous variant, in case <limits.h> declares krb5_get_creds.
     For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-@@ -70464,43 +28707,18 @@
+@@ -70559,43 +28660,18 @@
    return 0;
  }
  _ACEOF
@@ -76056,7 +76215,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_GET_CREDS 1
  _ACEOF
-@@ -70508,20 +28726,14 @@
+@@ -70603,20 +28679,14 @@
  fi
  
  
@@ -76080,7 +76239,7 @@
  /* end confdefs.h.  */
  /* Define krb5_get_credentials_for_user to an innocuous variant, in case <limits.h> declares krb5_get_credentials_for_user.
     For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-@@ -70562,43 +28774,18 @@
+@@ -70657,43 +28727,18 @@
    return 0;
  }
  _ACEOF
@@ -76130,7 +76289,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_GET_CREDENTIALS_FOR_USER 1
  _ACEOF
-@@ -70606,20 +28793,14 @@
+@@ -70701,20 +28746,14 @@
  fi
  
  
@@ -76154,7 +76313,7 @@
  /* end confdefs.h.  */
  /* Define krb5_get_host_realm to an innocuous variant, in case <limits.h> declares krb5_get_host_realm.
     For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-@@ -70660,43 +28841,18 @@
+@@ -70755,43 +28794,18 @@
    return 0;
  }
  _ACEOF
@@ -76204,7 +76363,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_GET_HOST_REALM 1
  _ACEOF
-@@ -70704,20 +28860,14 @@
+@@ -70799,20 +28813,14 @@
  fi
  
  
@@ -76228,7 +76387,7 @@
  /* end confdefs.h.  */
  /* Define krb5_free_host_realm to an innocuous variant, in case <limits.h> declares krb5_free_host_realm.
     For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-@@ -70758,208 +28908,62 @@
+@@ -70853,208 +28861,62 @@
    return 0;
  }
  _ACEOF
@@ -76425,16 +76584,16 @@
  
  cat >>confdefs.h <<_ACEOF
 -#define HAVE_DECL_KRB5_AUTH_CON_SET_REQ_CKSUMTYPE 1
--_ACEOF
--
--
--else
--  cat >>confdefs.h <<_ACEOF
--#define HAVE_DECL_KRB5_AUTH_CON_SET_REQ_CKSUMTYPE 0
 +#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
 -
 -
@@ -76458,7 +76617,7 @@
  /* end confdefs.h.  */
  
  		#include <krb5.h>
-@@ -70979,57 +28983,30 @@
+@@ -71074,57 +28936,30 @@
    return 0;
  }
  _ACEOF
@@ -76523,7 +76682,7 @@
  /* end confdefs.h.  */
  
  		    #include <krb5.h>
-@@ -71045,58 +29022,31 @@
+@@ -71140,58 +28975,31 @@
    return 0;
  }
  _ACEOF
@@ -76589,7 +76748,7 @@
  /* end confdefs.h.  */
  
  	#include <krb5.h>
-@@ -71108,36 +29058,15 @@
+@@ -71203,36 +29011,15 @@
    return 0;
  }
  _ACEOF
@@ -76629,7 +76788,7 @@
  $as_echo "$smb_krb5_cv_verify_checksum" >&6; }
  
  cat >>confdefs.h <<_ACEOF
-@@ -71145,17 +29074,13 @@
+@@ -71240,17 +29027,13 @@
  _ACEOF
  
  
@@ -76650,7 +76809,7 @@
  /* end confdefs.h.  */
  #include <krb5.h>
  int
-@@ -71166,56 +29091,29 @@
+@@ -71261,56 +29044,29 @@
    return 0;
  }
  _ACEOF
@@ -76714,7 +76873,7 @@
  /* end confdefs.h.  */
  #include <krb5.h>
  int
-@@ -71226,56 +29124,29 @@
+@@ -71321,56 +29077,29 @@
    return 0;
  }
  _ACEOF
@@ -76778,7 +76937,7 @@
  /* end confdefs.h.  */
  #include <krb5.h>
  int
-@@ -71286,56 +29157,29 @@
+@@ -71381,56 +29110,29 @@
    return 0;
  }
  _ACEOF
@@ -76842,7 +77001,7 @@
  /* end confdefs.h.  */
  #include <krb5.h>
  int
-@@ -71346,56 +29190,29 @@
+@@ -71441,56 +29143,29 @@
    return 0;
  }
  _ACEOF
@@ -76906,7 +77065,7 @@
  /* end confdefs.h.  */
  #include <krb5.h>
  int
-@@ -71406,56 +29223,29 @@
+@@ -71501,56 +29176,29 @@
    return 0;
  }
  _ACEOF
@@ -76970,7 +77129,7 @@
  /* end confdefs.h.  */
  #include <krb5.h>
  int
-@@ -71466,56 +29256,29 @@
+@@ -71561,56 +29209,29 @@
    return 0;
  }
  _ACEOF
@@ -77034,7 +77193,7 @@
  /* end confdefs.h.  */
  #include <krb5.h>
  int
-@@ -71526,56 +29289,29 @@
+@@ -71621,56 +29242,29 @@
    return 0;
  }
  _ACEOF
@@ -77098,7 +77257,7 @@
  /* end confdefs.h.  */
  #include <krb5.h>
  int
-@@ -71586,55 +29322,28 @@
+@@ -71681,55 +29275,28 @@
    return 0;
  }
  _ACEOF
@@ -77161,7 +77320,7 @@
  /* end confdefs.h.  */
  #include <krb5.h>
  int
-@@ -71645,56 +29354,29 @@
+@@ -71740,56 +29307,29 @@
    return 0;
  }
  _ACEOF
@@ -77225,7 +77384,7 @@
  /* end confdefs.h.  */
  #include <krb5.h>
  int
-@@ -71705,56 +29387,29 @@
+@@ -71800,56 +29340,29 @@
    return 0;
  }
  _ACEOF
@@ -77289,7 +77448,7 @@
  /* end confdefs.h.  */
  #include <krb5.h>
  int
-@@ -71765,56 +29420,29 @@
+@@ -71860,56 +29373,29 @@
    return 0;
  }
  _ACEOF
@@ -77353,7 +77512,7 @@
  /* end confdefs.h.  */
  #include <krb5.h>
  int
-@@ -71825,56 +29453,29 @@
+@@ -71920,56 +29406,29 @@
    return 0;
  }
  _ACEOF
@@ -77417,7 +77576,7 @@
  /* end confdefs.h.  */
  #include <krb5.h>
  int
-@@ -71885,47 +29486,22 @@
+@@ -71980,47 +29439,22 @@
    return 0;
  }
  _ACEOF
@@ -77471,7 +77630,7 @@
  /* end confdefs.h.  */
  #include <krb5.h>
  int
-@@ -71936,58 +29512,31 @@
+@@ -72031,58 +29465,31 @@
    return 0;
  }
  _ACEOF
@@ -77537,7 +77696,7 @@
  /* end confdefs.h.  */
  #include <krb5.h>
  int
-@@ -71998,56 +29547,29 @@
+@@ -72093,56 +29500,29 @@
    return 0;
  }
  _ACEOF
@@ -77601,7 +77760,7 @@
  /* end confdefs.h.  */
  #include <krb5.h>
  int
-@@ -72058,56 +29580,29 @@
+@@ -72153,56 +29533,29 @@
    return 0;
  }
  _ACEOF
@@ -77665,7 +77824,7 @@
  /* end confdefs.h.  */
  #include <krb5.h>
  int
-@@ -72118,56 +29613,29 @@
+@@ -72213,56 +29566,29 @@
    return 0;
  }
  _ACEOF
@@ -77729,7 +77888,7 @@
  /* end confdefs.h.  */
  #include <krb5.h>
  int
-@@ -72178,56 +29646,29 @@
+@@ -72273,56 +29599,29 @@
    return 0;
  }
  _ACEOF
@@ -77793,7 +77952,7 @@
  /* end confdefs.h.  */
  #include <krb5.h>
  int
-@@ -72238,61 +29679,30 @@
+@@ -72333,61 +29632,30 @@
    return 0;
  }
  _ACEOF
@@ -77864,7 +78023,7 @@
  /* end confdefs.h.  */
  #include <krb5.h>
  int
-@@ -72303,56 +29713,29 @@
+@@ -72398,56 +29666,29 @@
    return 0;
  }
  _ACEOF
@@ -77928,7 +78087,7 @@
  /* end confdefs.h.  */
  #include <krb5.h>
  int
-@@ -72363,56 +29746,29 @@
+@@ -72458,56 +29699,29 @@
    return 0;
  }
  _ACEOF
@@ -77992,7 +78151,7 @@
  /* end confdefs.h.  */
  #include <krb5.h>
  int
-@@ -72423,65 +29779,35 @@
+@@ -72518,65 +29732,35 @@
    return 0;
  }
  _ACEOF
@@ -78057,8 +78216,8 @@
 -$as_echo "$as_me: error: cannot run test program while cross compiling
 -See \`config.log' for more details." >&2;}
 -   { (exit 1); exit 1; }; }; }
-+as_fn_error "cannot run test program while cross compiling
-+See \`config.log' for more details." "$LINENO" 5; }
++as_fn_error $? "cannot run test program while cross compiling
++See \`config.log' for more details" "$LINENO" 5 ; }
  else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
@@ -78069,7 +78228,7 @@
  /* end confdefs.h.  */
  
  #include<krb5.h>
-@@ -72494,65 +29820,32 @@
+@@ -72589,65 +29773,32 @@
      return krb5_kt_resolve(context, "WRFILE:api", &keytab);
    }
  _ACEOF
@@ -78144,7 +78303,7 @@
  /* end confdefs.h.  */
  #include <krb5.h>
  int
-@@ -72563,56 +29856,29 @@
+@@ -72658,56 +29809,29 @@
    return 0;
  }
  _ACEOF
@@ -78208,7 +78367,7 @@
  /* end confdefs.h.  */
  #include <krb5.h>
  int
-@@ -72626,56 +29892,29 @@
+@@ -72721,56 +29845,29 @@
    return 0;
  }
  _ACEOF
@@ -78272,7 +78431,7 @@
  /* end confdefs.h.  */
  #include <krb5.h>
  int
-@@ -72686,56 +29925,29 @@
+@@ -72781,56 +29878,29 @@
    return 0;
  }
  _ACEOF
@@ -78336,7 +78495,7 @@
  /* end confdefs.h.  */
  #include <krb5.h>
  int
-@@ -72747,49 +29959,26 @@
+@@ -72842,49 +29912,26 @@
    return 0;
  }
  _ACEOF
@@ -78392,7 +78551,7 @@
    $as_echo_n "(cached) " >&6
  else
  
-@@ -72803,20 +29992,13 @@
+@@ -72898,20 +29945,13 @@
  	old_LDFLAGS="$LDFLAGS";
  	LDFLAGS="$LDFLAGS";
  	export LDFLAGS;
@@ -78406,8 +78565,8 @@
 -$as_echo "$as_me: error: cannot run test program while cross compiling
 -See \`config.log' for more details." >&2;}
 -   { (exit 1); exit 1; }; }; }
-+as_fn_error "cannot run test program while cross compiling
-+See \`config.log' for more details." "$LINENO" 5; }
++as_fn_error $? "cannot run test program while cross compiling
++See \`config.log' for more details" "$LINENO" 5 ; }
  else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
@@ -78418,7 +78577,7 @@
  /* end confdefs.h.  */
  
  		#include <stdlib.h>
-@@ -72830,42 +30012,15 @@
+@@ -72925,42 +29965,15 @@
  		}
  
  _ACEOF
@@ -78465,7 +78624,7 @@
  	CFLAGS="$old_CFLAGS";
  	old_CFLAGS="";
  	export CFLAGS;
-@@ -72877,20 +30032,18 @@
+@@ -72972,20 +29985,18 @@
  	export LDFLAGS;
  
  fi
@@ -78490,7 +78649,7 @@
    $as_echo_n "(cached) " >&6
  else
  
-@@ -72904,20 +30057,13 @@
+@@ -72999,20 +30010,13 @@
  	old_LDFLAGS="$LDFLAGS";
  	LDFLAGS="$LDFLAGS";
  	export LDFLAGS;
@@ -78504,8 +78663,8 @@
 -$as_echo "$as_me: error: cannot run test program while cross compiling
 -See \`config.log' for more details." >&2;}
 -   { (exit 1); exit 1; }; }; }
-+as_fn_error "cannot run test program while cross compiling
-+See \`config.log' for more details." "$LINENO" 5; }
++as_fn_error $? "cannot run test program while cross compiling
++See \`config.log' for more details" "$LINENO" 5 ; }
  else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
@@ -78516,7 +78675,7 @@
  /* end confdefs.h.  */
  
  		#include <krb5.h>
-@@ -72928,42 +30074,15 @@
+@@ -73023,42 +30027,15 @@
  		}
  
  _ACEOF
@@ -78563,7 +78722,7 @@
  	CFLAGS="$old_CFLAGS";
  	old_CFLAGS="";
  	export CFLAGS;
-@@ -72975,29 +30094,23 @@
+@@ -73070,29 +30047,23 @@
  	export LDFLAGS;
  
  fi
@@ -78598,7 +78757,7 @@
  /* end confdefs.h.  */
  #include <krb5.h>
  int
-@@ -73008,61 +30121,30 @@
+@@ -73103,61 +30074,30 @@
    return 0;
  }
  _ACEOF
@@ -78669,7 +78828,7 @@
  /* end confdefs.h.  */
  #include <krb5.h>
  int
-@@ -73073,47 +30155,20 @@
+@@ -73168,47 +30108,20 @@
    return 0;
  }
  _ACEOF
@@ -78723,7 +78882,7 @@
  
    fi
  
-@@ -73125,7 +30180,7 @@
+@@ -73220,7 +30133,7 @@
    #
    #
    if test x"$ac_cv_lib_ext_krb5_krb5_mk_req_extended" != x"yes"; then
@@ -78732,7 +78891,7 @@
  $as_echo "$as_me: WARNING: krb5_mk_req_extended not found in -lkrb5" >&2;}
      use_ads=no
    fi
-@@ -73133,7 +30188,7 @@
+@@ -73228,7 +30141,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
@@ -78741,7 +78900,7 @@
  $as_echo "$as_me: WARNING: no CREATE_KEY_FUNCTIONS detected" >&2;}
      use_ads=no
    fi
-@@ -73141,7 +30196,7 @@
+@@ -73236,7 +30149,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
@@ -78750,7 +78909,7 @@
  $as_echo "$as_me: WARNING: no GET_ENCTYPES_FUNCTIONS detected" >&2;}
      use_ads=no
    fi
-@@ -73149,7 +30204,7 @@
+@@ -73244,7 +30157,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
@@ -78759,7 +78918,7 @@
  $as_echo "$as_me: WARNING: no KT_FREE_FUNCTION detected" >&2;}
      use_ads=no
    fi
-@@ -73157,7 +30212,7 @@
+@@ -73252,7 +30165,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
@@ -78768,7 +78927,7 @@
  $as_echo "$as_me: WARNING: no KRB5_VERIFY_CHECKSUM_FUNCTION detected" >&2;}
      use_ads=no
    fi
-@@ -73169,14 +30224,14 @@
+@@ -73264,14 +30177,14 @@
  
        if test x"$ac_cv_func_ext_free_AP_REQ" != x"yes"
        then
@@ -78785,7 +78944,7 @@
  $as_echo "$as_me: WARNING: no KRB5_AP_REQ_DECODING_FUNCTION detected" >&2;}
  	use_ads=no
        fi
-@@ -73185,29 +30240,21 @@
+@@ -73280,29 +30193,21 @@
  
    if test x"$use_ads" = x"yes"; then
  
@@ -78813,14 +78972,14 @@
 -	{ { $as_echo "$as_me:$LINENO: error: krb5 libs don't have all features required for Active Directory support" >&5
 -$as_echo "$as_me: error: krb5 libs don't have all features required for Active Directory support" >&2;}
 -   { (exit 1); exit 1; }; }
-+	as_fn_error "krb5 libs don't have all features required for Active Directory support" "$LINENO" 5
++	as_fn_error $? "krb5 libs don't have all features required for Active Directory support" "$LINENO" 5
      else
 -	{ $as_echo "$as_me:$LINENO: WARNING: krb5 libs don't have all features required for Active Directory support" >&5
 +	{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: krb5 libs don't have all features required for Active Directory support" >&5
  $as_echo "$as_me: WARNING: krb5 libs don't have all features required for Active Directory support" >&2;}
      fi
  
-@@ -73233,9 +30280,9 @@
+@@ -73328,9 +30233,9 @@
      KRB5_LIBS=""
      with_ads_support=no
    fi
@@ -78832,7 +78991,7 @@
  $as_echo "$use_ads" >&6; }
  
  LIBS="$ac_save_LIBS"
-@@ -73247,23 +30294,17 @@
+@@ -73342,23 +30247,17 @@
  
  
  
@@ -78859,7 +79018,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -73281,54 +30322,28 @@
+@@ -73376,54 +30275,28 @@
    return 0;
  }
  _ACEOF
@@ -78921,7 +79080,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_LIBNSCD 1
  _ACEOF
-@@ -73343,7 +30358,6 @@
+@@ -73438,7 +30311,6 @@
  
  
  fi
@@ -78929,7 +79088,7 @@
  PASSDB_LIBS="$PASSDB_LIBS $NSCD_LIBS"
  
  
-@@ -73351,12 +30365,12 @@
+@@ -73446,12 +30318,12 @@
  # Compile with DNS Updates support?
  
  with_dnsupdate_support=no
@@ -78944,7 +79103,7 @@
    withval=$with_dnsupdate;  case "$withval" in
      yes|no)
  	with_dnsupdate_support=$withval
-@@ -73365,7 +30379,7 @@
+@@ -73460,7 +30332,7 @@
  fi
  
  
@@ -78953,7 +79112,7 @@
  $as_echo "$with_dnsupdate_support" >&6; }
  
  if test x"$with_dnsupdate_support" != x"no"; then
-@@ -73379,151 +30393,12 @@
+@@ -73474,151 +30346,12 @@
    ##################################################################
    # then test for uuid.h (necessary to generate unique DNS keynames
    # (uuid.h is required for this test)
@@ -79110,21 +79269,21 @@
  _ACEOF
  
  fi
-@@ -73533,11 +30408,9 @@
+@@ -73628,11 +30361,9 @@
  
    if test x"$ac_cv_header_uuid_uuid_h" != x"yes"; then
  	if test x"$with_dnsupdate_support" = x"yes"; then
 -	 { { $as_echo "$as_me:$LINENO: error: uuid.h is needed to enable DNS Updates support" >&5
 -$as_echo "$as_me: error: uuid.h is needed to enable DNS Updates support" >&2;}
 -   { (exit 1); exit 1; }; }
-+	 as_fn_error "uuid.h is needed to enable DNS Updates support" "$LINENO" 5
++	 as_fn_error $? "uuid.h is needed to enable DNS Updates support" "$LINENO" 5
  	else
 -	 { $as_echo "$as_me:$LINENO: WARNING: uuid.h is needed to enable DNS Updates support" >&5
 +	 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: uuid.h is needed to enable DNS Updates support" >&5
  $as_echo "$as_me: WARNING: uuid.h is needed to enable DNS Updates support" >&2;}
  	fi
  	with_dnsupdate_support=no
-@@ -73553,102 +30426,12 @@
+@@ -73648,102 +30379,12 @@
  
    UUID_LIBS=""
  
@@ -79232,7 +79391,7 @@
  _ACEOF
  
          # uuid_generate was found in libc or existing $LIBS
-@@ -73665,9 +30448,7 @@
+@@ -73760,9 +30401,7 @@
  
  	    with_dnsupdate_support=yes
  
@@ -79243,21 +79402,21 @@
  
  
  
-@@ -73680,11 +30461,9 @@
+@@ -73775,11 +30414,9 @@
  
  
  	    if test x"$with_dnsupdate_support" = x"yes"; then
 -		{ { $as_echo "$as_me:$LINENO: error: libuuid is needed to enable DNS Updates support" >&5
 -$as_echo "$as_me: error: libuuid is needed to enable DNS Updates support" >&2;}
 -   { (exit 1); exit 1; }; }
-+		as_fn_error "libuuid is needed to enable DNS Updates support" "$LINENO" 5
++		as_fn_error $? "libuuid is needed to enable DNS Updates support" "$LINENO" 5
  	    else
 -		{ $as_echo "$as_me:$LINENO: WARNING: libuuid is needed to enable DNS Updates support" >&5
 +		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libuuid is needed to enable DNS Updates support" >&5
  $as_echo "$as_me: WARNING: libuuid is needed to enable DNS Updates support" >&2;}
  	    fi
  	    with_dnsupdate_support=no
-@@ -73693,18 +30472,14 @@
+@@ -73788,18 +30425,14 @@
  	    ;;
            *)
  	    # uuid_generate was not found, try adding libuuid
@@ -79279,7 +79438,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -73722,43 +30497,18 @@
+@@ -73817,43 +30450,18 @@
    return 0;
  }
  _ACEOF
@@ -79329,7 +79488,7 @@
  
  		LIBS="-luuid $LIBS"
  
-@@ -73774,9 +30524,7 @@
+@@ -73869,9 +30477,7 @@
  
  	    with_dnsupdate_support=yes
  
@@ -79340,21 +79499,21 @@
  
  
  
-@@ -73786,11 +30534,9 @@
+@@ -73881,11 +30487,9 @@
  
  
  	    if test x"$with_dnsupdate_support" = x"yes"; then
 -		{ { $as_echo "$as_me:$LINENO: error: libuuid is needed to enable DNS Updates support" >&5
 -$as_echo "$as_me: error: libuuid is needed to enable DNS Updates support" >&2;}
 -   { (exit 1); exit 1; }; }
-+		as_fn_error "libuuid is needed to enable DNS Updates support" "$LINENO" 5
++		as_fn_error $? "libuuid is needed to enable DNS Updates support" "$LINENO" 5
  	    else
 -		{ $as_echo "$as_me:$LINENO: WARNING: libuuid is needed to enable DNS Updates support" >&5
 +		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libuuid is needed to enable DNS Updates support" >&5
  $as_echo "$as_me: WARNING: libuuid is needed to enable DNS Updates support" >&2;}
  	    fi
  	    with_dnsupdate_support=no
-@@ -73810,28 +30556,26 @@
+@@ -73905,28 +30509,26 @@
  
  #################################################
  # check for automount support
@@ -79389,7 +79548,7 @@
  $as_echo "no" >&6; }
  
  fi
-@@ -73842,34 +30586,30 @@
+@@ -73937,34 +30539,30 @@
  CIFSMOUNT_PROGS=""
  INSTALL_CIFSMOUNT=""
  UNINSTALL_CIFSMOUNT=""
@@ -79426,11 +79585,11 @@
 -		{ { $as_echo "$as_me:$LINENO: error: not on a linux system!" >&5
 -$as_echo "$as_me: error: not on a linux system!" >&2;}
 -   { (exit 1); exit 1; }; }
-+		as_fn_error "not on a linux system!" "$LINENO" 5
++		as_fn_error $? "not on a linux system!" "$LINENO" 5
  		;;
  	esac
      ;;
-@@ -73877,19 +30617,17 @@
+@@ -73972,19 +30570,17 @@
  else
     case "$host_os" in
    *linux*)
@@ -79453,7 +79612,7 @@
  $as_echo "no" >&6; }
  	;;
    esac
-@@ -73900,40 +30638,36 @@
+@@ -73995,192 +30591,49 @@
  CIFSUMOUNT_PROGS=""
  INSTALL_CIFSUMOUNT=""
  UNINSTALL_CIFSUMOUNT=""
@@ -79485,7 +79644,7 @@
 -		{ { $as_echo "$as_me:$LINENO: error: not on a linux system!" >&5
 -$as_echo "$as_me: error: not on a linux system!" >&2;}
 -   { (exit 1); exit 1; }; }
-+		as_fn_error "not on a linux system!" "$LINENO" 5
++		as_fn_error $? "not on a linux system!" "$LINENO" 5
  		;;
  	esac
  	;;
@@ -79494,19 +79653,18 @@
 +	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  $as_echo "no" >&6; }
  	;;
-   esac
- else
+-  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
-@@ -73941,151 +30675,12 @@
- 
- #################################################
- # check for cifs.upcall support
+-$as_echo "no" >&6; }
 -
- for ac_header in keyutils.h
+-fi
+-
+-
+-#################################################
+-# check for cifs.upcall support
+-
+-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
@@ -79591,13 +79749,16 @@
 -	 test ! -s conftest.err
 -       }; then
 -  ac_header_preproc=yes
--else
++  esac
+ 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; }
+ 
 -  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; }
@@ -79643,11 +79804,14 @@
 -		 $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
++#################################################
++# 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 :
@@ -79657,7 +79821,7 @@
  _ACEOF
   HAVE_KEYUTILS_H=1
  else
-@@ -74097,34 +30692,28 @@
+@@ -74192,34 +30645,28 @@
  CIFSUPCALL_PROGS=""
  INSTALL_CIFSUPCALL=""
  UNINSTALL_CIFSUPCALL=""
@@ -79681,12 +79845,12 @@
 -			{ { $as_echo "$as_me:$LINENO: error: ADS support should be enabled for building cifs.upcall" >&5
 -$as_echo "$as_me: error: ADS support should be enabled for building cifs.upcall" >&2;}
 -   { (exit 1); exit 1; }; }
-+			as_fn_error "ADS support should be enabled for building cifs.upcall" "$LINENO" 5
++			as_fn_error $? "ADS support should be enabled for building cifs.upcall" "$LINENO" 5
  		elif test x"$HAVE_KEYUTILS_H" != "x1"; then
 -			{ { $as_echo "$as_me:$LINENO: error: keyutils package is required for cifs.upcall" >&5
 -$as_echo "$as_me: error: keyutils package is required for cifs.upcall" >&2;}
 -   { (exit 1); exit 1; }; }
-+			as_fn_error "keyutils package is required for cifs.upcall" "$LINENO" 5
++			as_fn_error $? "keyutils package is required for cifs.upcall" "$LINENO" 5
  		else
 -			{ $as_echo "$as_me:$LINENO: result: yes" >&5
 +			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
@@ -79699,18 +79863,18 @@
  
  			CIFSUPCALL_PROGS="bin/cifs.upcall"
  			INSTALL_CIFSUPCALL="installcifsupcall"
-@@ -74132,9 +30721,7 @@
+@@ -74227,9 +30674,7 @@
  		fi
  		;;
  	*)
 -		{ { $as_echo "$as_me:$LINENO: error: not on a linux system!" >&5
 -$as_echo "$as_me: error: not on a linux system!" >&2;}
 -   { (exit 1); exit 1; }; }
-+		as_fn_error "not on a linux system!" "$LINENO" 5
++		as_fn_error $? "not on a linux system!" "$LINENO" 5
  		;;
  	esac
      ;;
-@@ -74143,18 +30730,16 @@
+@@ -74238,18 +30683,16 @@
     case "$host_os" in
    *linux*)
  	if test x"$use_ads" != x"yes"; then
@@ -79733,7 +79897,7 @@
  
  		CIFSUPCALL_PROGS="bin/cifs.upcall"
  		INSTALL_CIFSUPCALL="installcifsupcall"
-@@ -74162,191 +30747,53 @@
+@@ -74257,7 +30700,7 @@
  	fi
  	;;
    *)
@@ -79741,46 +79905,36 @@
 +	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  $as_echo "no" >&6; }
  	;;
--  esac
--
--fi
--
--
--
--#################################################
--# Check for a PAM clear-text auth, accounts, password
--# and session support. Most PAM implementations keep their
--# headers in /usr/include/security. Darwin keeps its in
--# /usr/include/pam.
--
--with_pam_for_crypt=no
--try_pam=auto
+   esac
+@@ -74274,11 +30717,11 @@
+ 
+ with_pam_for_crypt=no
+ try_pam=auto
 -{ $as_echo "$as_me:$LINENO: checking whether to try PAM support" >&5
--$as_echo_n "checking whether to try PAM support... " >&6; }
--
--# Check whether --with-pam was given.
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to try PAM support" >&5
+ $as_echo_n "checking whether to try PAM support... " >&6; }
+ 
+ # Check whether --with-pam was given.
 -if test "${with_pam+set}" = set; then
--  withval=$with_pam;  case "$withval" in
--  yes|no|auto)
--    try_pam=$withval
--    ;;
--  esac
--
--fi
--
++if test "${with_pam+set}" = set; then :
+   withval=$with_pam;  case "$withval" in
+   yes|no|auto)
+     try_pam=$withval
+@@ -74287,7 +30730,7 @@
+ 
+ fi
+ 
 -{ $as_echo "$as_me:$LINENO: result: $try_pam" >&5
--$as_echo "$try_pam" >&6; }
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $try_pam" >&5
+ $as_echo "$try_pam" >&6; }
+ 
+ use_pam=no
+@@ -74298,150 +30741,11 @@
+ 
+ 	# Most systems have PAM headers in /usr/include/security, but Darwin
+ 	# has them in /usr/include/pam.
 -
--use_pam=no
--create_pam_modules=no
--if test x"${try_pam}" != x"no";then
--	use_pam=yes
--	create_pam_modules=yes
 -
--	# Most systems have PAM headers in /usr/include/security, but Darwin
--	# has them in /usr/include/pam.
--
--
 -for ac_header in security/pam_appl.h pam/pam_appl.h
 -do
 -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
@@ -79869,15 +80023,14 @@
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+  esac
- 
+-
 -  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: )
@@ -79906,24 +80059,7 @@
 -## ---------------------------------------- ##
 -_ASBOX
 -     ) | sed "s/^/$as_me: WARNING:     /" >&2
-+
-+#################################################
-+# Check for a PAM clear-text auth, accounts, password
-+# and session support. Most PAM implementations keep their
-+# headers in /usr/include/security. Darwin keeps its in
-+# /usr/include/pam.
-+
-+with_pam_for_crypt=no
-+try_pam=auto
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to try PAM support" >&5
-+$as_echo_n "checking whether to try PAM support... " >&6; }
-+
-+# Check whether --with-pam was given.
-+if test "${with_pam+set}" = set; then :
-+  withval=$with_pam;  case "$withval" in
-+  yes|no|auto)
-+    try_pam=$withval
-     ;;
+-    ;;
 -esac
 -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
 -$as_echo_n "checking for $ac_header... " >&6; }
@@ -79936,45 +80072,31 @@
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
 -$as_echo "$ac_res" >&6; }
-+  esac
- 
- fi
+-
+-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: $try_pam" >&5
-+$as_echo "$try_pam" >&6; }
-+
-+use_pam=no
-+create_pam_modules=no
-+if test x"${try_pam}" != x"no";then
-+	use_pam=yes
-+	create_pam_modules=yes
-+
-+	# Most systems have PAM headers in /usr/include/security, but Darwin
-+	# has them in /usr/include/pam.
 +	for ac_header in security/pam_appl.h pam/pam_appl.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 eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
-@@ -74358,9 +30805,7 @@
+@@ -74453,9 +30757,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
 -			{ { $as_echo "$as_me:$LINENO: error: --with-pam=yes but pam_appl.h not found" >&5
 -$as_echo "$as_me: error: --with-pam=yes but pam_appl.h not found" >&2;}
 -   { (exit 1); exit 1; }; }
-+			as_fn_error "--with-pam=yes but pam_appl.h not found" "$LINENO" 5
++			as_fn_error $? "--with-pam=yes but pam_appl.h not found" "$LINENO" 5
  		fi
  		use_pam=no
  		create_pam_modules=no
-@@ -74368,23 +30813,17 @@
+@@ -74463,23 +30765,17 @@
  
  
  
@@ -80001,7 +80123,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -74402,54 +30841,28 @@
+@@ -74497,54 +30793,28 @@
    return 0;
  }
  _ACEOF
@@ -80063,7 +80185,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_LIBPAM 1
  _ACEOF
-@@ -74464,34 +30877,18 @@
+@@ -74559,34 +30829,18 @@
  
  
  fi
@@ -80073,7 +80195,7 @@
 -			{ { $as_echo "$as_me:$LINENO: error: --with-pam=yes but libpam not found" >&5
 -$as_echo "$as_me: error: --with-pam=yes but libpam not found" >&2;}
 -   { (exit 1); exit 1; }; }
-+			as_fn_error "--with-pam=yes but libpam not found" "$LINENO" 5
++			as_fn_error $? "--with-pam=yes but libpam not found" "$LINENO" 5
  		fi
  		use_pam=no
  		create_pam_modules=no
@@ -80103,7 +80225,7 @@
  		#if HAVE_SECURITY_PAM_APPL_H
  		#include <security/pam_appl.h>
  		#endif
-@@ -74499,44 +30896,9 @@
+@@ -74594,44 +30848,8 @@
  		#include <pam/pam_appl.h>
  		#endif
  
@@ -80146,19 +80268,18 @@
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
 +"
-+eval as_val=\$$as_ac_Header
-+   if test "x$as_val" = x""yes; then :
++if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
-@@ -74548,179 +30910,33 @@
+@@ -74643,179 +30861,32 @@
  	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
 -			{ { $as_echo "$as_me:$LINENO: error: --with-pam=yes but pam_modules.h not found" >&5
 -$as_echo "$as_me: error: --with-pam=yes but pam_modules.h not found" >&2;}
 -   { (exit 1); exit 1; }; }
-+			as_fn_error "--with-pam=yes but pam_modules.h not found" "$LINENO" 5
++			as_fn_error $? "--with-pam=yes but pam_modules.h not found" "$LINENO" 5
         fi
  		create_pam_modules=no
      fi
@@ -80336,12 +80457,11 @@
 +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 eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
-@@ -74729,150 +30945,12 @@
+@@ -74824,150 +30895,11 @@
  
  done
  
@@ -80493,12 +80613,11 @@
 +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 eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
-@@ -74883,19 +30961,14 @@
+@@ -74978,19 +30910,14 @@
  
  
  
@@ -80521,7 +80640,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.  */
-@@ -74936,72 +31009,42 @@
+@@ -75031,72 +30958,42 @@
    return 0;
  }
  _ACEOF
@@ -80606,7 +80725,7 @@
  /* end confdefs.h.  */
  
  #if (!defined(LINUX))
-@@ -75039,36 +31082,11 @@
+@@ -75134,36 +31031,11 @@
    return 0;
  }
  _ACEOF
@@ -80645,7 +80764,7 @@
  rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  
  #################################################
-@@ -75078,19 +31096,17 @@
+@@ -75173,19 +31045,17 @@
  UNINSTALL_PAM_MODULES=""
  
  try_pam_smbpass=auto
@@ -80664,18 +80783,18 @@
 -    { { $as_echo "$as_me:$LINENO: error: valid options are yes,no,auto" >&5
 -$as_echo "$as_me: error: valid options are yes,no,auto" >&2;}
 -   { (exit 1); exit 1; }; }
-+    as_fn_error "valid options are yes,no,auto" "$LINENO" 5
++    as_fn_error $? "valid options are yes,no,auto" "$LINENO" 5
    ;;
    esac
  
-@@ -75104,16 +31120,12 @@
+@@ -75199,16 +31069,12 @@
  	# Conditions under which pam_smbpass can't be built.
  	if test x"$BLDSHARED" != xtrue ; then
  		if test x"${try_pam_smbpass}" = xyes ; then
 -			{ { $as_echo "$as_me:$LINENO: error: No support for shared modules" >&5
 -$as_echo "$as_me: error: No support for shared modules" >&2;}
 -   { (exit 1); exit 1; }; }
-+			as_fn_error "No support for shared modules" "$LINENO" 5
++			as_fn_error $? "No support for shared modules" "$LINENO" 5
  		fi
  		use_pam_smbpass=no
  	elif test x"$create_pam_modules" != xyes ; then
@@ -80683,11 +80802,11 @@
 -			{ { $as_echo "$as_me:$LINENO: error: No support for PAM MODULES" >&5
 -$as_echo "$as_me: error: No support for PAM MODULES" >&2;}
 -   { (exit 1); exit 1; }; }
-+			as_fn_error "No support for PAM MODULES" "$LINENO" 5
++			as_fn_error $? "No support for PAM MODULES" "$LINENO" 5
  		fi
  		use_pam_smbpass=no
  	fi
-@@ -75124,7 +31136,7 @@
+@@ -75219,7 +31085,7 @@
  		UNINSTALL_PAM_MODULES="uninstallpammodules"
  	fi
  fi
@@ -80696,7 +80815,7 @@
  $as_echo "$use_pam_smbpass" >&6; }
  
  
-@@ -75135,98 +31147,63 @@
+@@ -75230,98 +31096,63 @@
  ## $with_pam_for_crypt variable as above   --jerry
  ##
  if test $with_pam_for_crypt = no; then
@@ -80811,7 +80930,7 @@
  $as_echo "no" >&6; }
  
  fi
-@@ -75234,28 +31211,26 @@
+@@ -75329,28 +31160,26 @@
  
  #################################################
  # check for syslog logging
@@ -80846,7 +80965,7 @@
  $as_echo "no" >&6; }
  
  fi
-@@ -75263,16 +31238,14 @@
+@@ -75358,16 +31187,14 @@
  
  #################################################
  # check for custom syslog facility
@@ -80862,11 +80981,11 @@
 -    { { $as_echo "$as_me:$LINENO: error: argument to --with-syslog-facility must be a string" >&5
 -$as_echo "$as_me: error: argument to --with-syslog-facility must be a string" >&2;}
 -   { (exit 1); exit 1; }; }
-+    as_fn_error "argument to --with-syslog-facility must be a string" "$LINENO" 5
++    as_fn_error $? "argument to --with-syslog-facility must be a string" "$LINENO" 5
    else
       if test "$withval" != "yes" ; then
          syslog_facility="$withval"
-@@ -75297,14 +31270,14 @@
+@@ -75392,14 +31219,14 @@
  samba_cv_TRY_SYS_QUOTAS=auto
  samba_cv_SYSQUOTA_FOUND=no
  
@@ -80884,7 +81003,7 @@
  $as_echo "yes" >&6; }
      samba_cv_WITH_QUOTAS=yes
      samba_cv_TRY_QUOTAS=yes
-@@ -75313,7 +31286,7 @@
+@@ -75408,7 +31235,7 @@
      samba_cv_TRY_SYS_QUOTAS=auto
      ;;
    auto)
@@ -80893,7 +81012,7 @@
  $as_echo "auto" >&6; }
      samba_cv_WITH_QUOTAS=auto
      samba_cv_TRY_QUOTAS=auto
-@@ -75322,74 +31295,74 @@
+@@ -75417,719 +31244,165 @@
      samba_cv_TRY_SYS_QUOTAS=auto
      ;;
    no)
@@ -80944,47 +81063,45 @@
      ;;
    no)
 -    { $as_echo "$as_me:$LINENO: result: no" >&5
-+    { $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 "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 "$as_me:${as_lineno-$LINENO}: result: ${samba_cv_TRY_SYS_QUOTAS}" >&5
- $as_echo "${samba_cv_TRY_SYS_QUOTAS}" >&6; }
-     ;;
-   esac
- else
+-$as_echo "${samba_cv_TRY_SYS_QUOTAS}" >&6; }
+-    ;;
+-  esac
+-else
 -  { $as_echo "$as_me:$LINENO: result: ${samba_cv_TRY_SYS_QUOTAS}" >&5
-+  { $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 "${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 "$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_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 "$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 "yes" >&6; }
+-            samba_cv_TRY_SYS_QUOTAS=yes
+-            samba_cv_RUN_QUOTA_TESTS=yes
+-	    ;;
+-	*)
 -	    { $as_echo "$as_me:$LINENO: result: no" >&5
-+	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  $as_echo "no" >&6; }
-             samba_cv_TRY_SYS_QUOTAS=no
- 	    ;;
-@@ -75400,641 +31373,87 @@
- # only check for quota stuff if --with-quotas
- if test x"$samba_cv_RUN_QUOTA_TESTS" != x"no"; then
- 
+-            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*)
@@ -81274,7 +81391,9 @@
 -    { $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
--    ;;
++    samba_cv_WITH_SYS_QUOTAS=no
++    samba_cv_TRY_SYS_QUOTAS=no
+     ;;
 -  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;}
@@ -81294,35 +81413,66 @@
 -## ---------------------------------------- ##
 -_ASBOX
 -     ) | sed "s/^/$as_me: WARNING:     /" >&2
--    ;;
++  *)
++    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${samba_cv_TRY_SYS_QUOTAS}" >&5
++$as_echo "${samba_cv_TRY_SYS_QUOTAS}" >&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
 -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}: result: ${samba_cv_TRY_SYS_QUOTAS}" >&5
++$as_echo "${samba_cv_TRY_SYS_QUOTAS}" >&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
 -_ACEOF
--
--fi
--
+ 
++
++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
+ 
 -done
--
--
++#############################################
++# 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
+ 
 -# For quotas on Linux XFS filesystems
--
++$as_echo "#define HAVE_QUOTACTL_LINUX 1" >>confdefs.h
+ 
 -for ac_header in linux/dqblk_xfs.h
 -do
 -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
@@ -81371,14 +81521,20 @@
 -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
--
+ 
 -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
 -$as_echo_n "checking $ac_header presence... " >&6; }
@@ -81394,7 +81550,19 @@
 -case "(($ac_try" in
 -  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
 -  *) ac_try_echo=$ac_try;;
--esac
++	    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
 -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
@@ -81411,23 +81579,16 @@
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+case "$host_os" in
-+	# on linux we didn't need to test we have builtin support
-+	*linux*)
-+	    samba_cv_SYSQUOTA_FOUND=yes
  
 -  ac_header_preproc=no
 -fi
-+$as_echo "#define HAVE_QUOTACTL_LINUX 1" >>confdefs.h
++# 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 :
  
 -rm -f conftest.err conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
 -$as_echo "$ac_header_preproc" >&6; }
-+	    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; }
  
 -# So?  What about this header?
 -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
@@ -81458,22 +81619,7 @@
 -_ASBOX
 -     ) | sed "s/^/$as_me: WARNING:     /" >&2
 -    ;;
-+
-+$as_echo "#define HAVE_LINUX_XFS_QUOTAS 1" >>confdefs.h
-+
-+	    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
 -{ $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
@@ -81485,6 +81631,7 @@
 -		 $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'}
@@ -81493,18 +81640,15 @@
 -  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 :
++	    cat >> confdefs.h <<\EOF
++#include <asm/types.h>
++EOF
  
 -fi
  
 -done
-+$as_echo "#define HAVE_ASM_TYPES_H 1" >>confdefs.h
++fi
  
-+	    cat >> confdefs.h <<\EOF
-+#include <asm/types.h>
-+EOF
  
 -# For sys/quota.h and linux/quota.h
  
@@ -81516,7 +81660,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
@@ -81533,9 +81677,6 @@
 -/* 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 :
@@ -81681,7 +81822,7 @@
  _ACEOF
  
  fi
-@@ -76044,17 +31463,13 @@
+@@ -76139,17 +31412,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
@@ -81702,7 +81843,7 @@
  /* end confdefs.h.  */
  
  #include "confdefs.h"
-@@ -76074,35 +31489,14 @@
+@@ -76169,35 +31438,14 @@
    return 0;
  }
  _ACEOF
@@ -81741,7 +81882,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
-@@ -76110,17 +31504,13 @@
+@@ -76205,17 +31453,13 @@
  fi
  
  # if we have struct dqblk .dqb_fsoftlimit instead of .dqb_isoftlimit on IRIX
@@ -81762,7 +81903,7 @@
  /* end confdefs.h.  */
  
  #include "confdefs.h"
-@@ -76138,41 +31528,18 @@
+@@ -76233,41 +31477,18 @@
    return 0;
  }
  _ACEOF
@@ -81808,7 +81949,7 @@
  
  fi
  
-@@ -76180,9 +31547,9 @@
+@@ -76275,9 +31496,9 @@
  # look for a working quota system
  
  if test x"$samba_cv_SYSQUOTA_FOUND" != x"yes"; then
@@ -81820,7 +81961,7 @@
    $as_echo_n "(cached) " >&6
  else
  
-@@ -76196,14 +31563,10 @@
+@@ -76291,14 +31512,10 @@
  	old_LDFLAGS="$LDFLAGS";
  	LDFLAGS="$LDFLAGS";
  	export LDFLAGS;
@@ -81837,7 +81978,7 @@
  /* end confdefs.h.  */
  
  #define HAVE_QUOTACTL_4A 1
-@@ -76211,42 +31574,15 @@
+@@ -76306,42 +31523,15 @@
  #include "confdefs.h"
  #include "${srcdir-.}/../tests/sysquotas.c"
  _ACEOF
@@ -81884,7 +82025,7 @@
  	CFLAGS="$old_CFLAGS";
  	old_CFLAGS="";
  	export CFLAGS;
-@@ -76258,23 +31594,21 @@
+@@ -76353,23 +31543,21 @@
  	export LDFLAGS;
  
  fi
@@ -81912,7 +82053,7 @@
    $as_echo_n "(cached) " >&6
  else
  
-@@ -76288,14 +31622,10 @@
+@@ -76383,14 +31571,10 @@
  	old_LDFLAGS="$LDFLAGS";
  	LDFLAGS="$LDFLAGS";
  	export LDFLAGS;
@@ -81929,7 +82070,7 @@
  /* end confdefs.h.  */
  
  #define HAVE_QUOTACTL_4B 1
-@@ -76303,42 +31633,15 @@
+@@ -76398,42 +31582,15 @@
  #include "confdefs.h"
  #include "${srcdir-.}/../tests/sysquotas.c"
  _ACEOF
@@ -81976,7 +82117,7 @@
  	CFLAGS="$old_CFLAGS";
  	old_CFLAGS="";
  	export CFLAGS;
-@@ -76350,24 +31653,22 @@
+@@ -76445,24 +31602,22 @@
  	export LDFLAGS;
  
  fi
@@ -82005,7 +82146,7 @@
    $as_echo_n "(cached) " >&6
  else
  
-@@ -76381,14 +31682,10 @@
+@@ -76476,14 +31631,10 @@
  	old_LDFLAGS="$LDFLAGS";
  	LDFLAGS="$LDFLAGS";
  	export LDFLAGS;
@@ -82022,7 +82163,7 @@
  /* end confdefs.h.  */
  
  #define HAVE_QUOTACTL_3 1
-@@ -76396,42 +31693,15 @@
+@@ -76491,42 +31642,15 @@
  #include "confdefs.h"
  #include "${srcdir-.}/../tests/sysquotas.c"
  _ACEOF
@@ -82069,7 +82210,7 @@
  	CFLAGS="$old_CFLAGS";
  	old_CFLAGS="";
  	export CFLAGS;
-@@ -76443,15 +31713,13 @@
+@@ -76538,15 +31662,13 @@
  	export LDFLAGS;
  
  fi
@@ -82087,7 +82228,7 @@
  
      samba_cv_sysquotas_file="lib/sysquotas_3.c"
  fi
-@@ -76459,151 +31727,12 @@
+@@ -76554,151 +31676,12 @@
  
  #################################################
  # check for mntent.h and struct mntent
@@ -82243,7 +82384,7 @@
  _ACEOF
  
  fi
-@@ -76612,102 +31741,12 @@
+@@ -76707,102 +31690,11 @@
  
  #################################################
  # check for setmntent,getmntent,endmntent
@@ -82346,12 +82487,11 @@
 +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 :
++if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
  _ACEOF
-@@ -76718,151 +31757,12 @@
+@@ -76813,151 +31705,12 @@
  
  #################################################
  # check for devnm.h and struct mntent
@@ -82507,7 +82647,7 @@
  _ACEOF
  
  fi
-@@ -76871,102 +31771,12 @@
+@@ -76966,102 +31719,12 @@
  
  #################################################
  # check for devnm
@@ -82614,7 +82754,7 @@
  _ACEOF
  
  fi
-@@ -76989,19 +31799,15 @@
+@@ -77084,19 +31747,15 @@
  fi
  
  if test x"$samba_cv_SYSQUOTA_FOUND" != x"no"; then
@@ -82637,7 +82777,7 @@
  /* end confdefs.h.  */
  
  #include "confdefs.h"
-@@ -77019,76 +31825,47 @@
+@@ -77114,76 +31773,47 @@
    return 0;
  }
  _ACEOF
@@ -82725,7 +82865,7 @@
  /* end confdefs.h.  */
  
  #include "confdefs.h"
-@@ -77106,62 +31883,35 @@
+@@ -77201,62 +31831,35 @@
    return 0;
  }
  _ACEOF
@@ -82795,7 +82935,7 @@
  /* end confdefs.h.  */
  
  #include "confdefs.h"
-@@ -77177,56 +31927,33 @@
+@@ -77272,56 +31875,33 @@
    return 0;
  }
  _ACEOF
@@ -82860,7 +83000,7 @@
  $as_echo "no" >&6; }
      fi
  fi
-@@ -77238,12 +31965,12 @@
+@@ -77333,12 +31913,12 @@
  #################################################
  # check for experimental utmp accounting
  
@@ -82875,7 +83015,7 @@
    withval=$with_utmp;  case "$withval" in
    no)
  		WITH_UTMP=no
-@@ -77266,41 +31993,35 @@
+@@ -77361,41 +31941,35 @@
  # Display test results
  
  if test x"$WITH_UTMP" = x"yes"; then
@@ -82925,7 +83065,7 @@
  /* end confdefs.h.  */
  
  #if defined(HAVE_UNISTD_H)
-@@ -77314,51 +32035,22 @@
+@@ -77409,51 +31983,22 @@
      exit (statvfs64 (".", &fsd));
    }
  _ACEOF
@@ -82953,14 +83093,13 @@
 -  (exit $ac_status); }; }; then
 +if ac_fn_c_try_run "$LINENO"; then :
    fu_cv_sys_stat_statvfs64=yes
--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 )
 -fu_cv_sys_stat_statvfs64=no
-+else
 +  fu_cv_sys_stat_statvfs64=no
  fi
 -rm -rf conftest.dSYM
@@ -82984,7 +83123,7 @@
  
    fi
  fi
-@@ -77371,16 +32063,12 @@
+@@ -77466,16 +32011,12 @@
  # is what it gets when this test fails.
  if test $space = no; then
    # SVR4
@@ -83004,7 +83143,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <sys/statvfs.h>
-@@ -77392,47 +32080,20 @@
+@@ -77487,47 +32028,20 @@
    return 0;
  }
  _ACEOF
@@ -83058,7 +83197,7 @@
  
    fi
  fi
-@@ -77440,17 +32101,13 @@
+@@ -77535,17 +32049,13 @@
  # smbd/statvfs.c assumes that statvfs.f_fsid is an integer.
  # This is not the case on ancient Linux systems.
  
@@ -83079,7 +83218,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <sys/statvfs.h>
-@@ -77462,57 +32119,30 @@
+@@ -77557,57 +32067,30 @@
    return 0;
  }
  _ACEOF
@@ -83144,7 +83283,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <sys/statvfs.h>
-@@ -77524,56 +32154,29 @@
+@@ -77619,56 +32102,29 @@
    return 0;
  }
  _ACEOF
@@ -83208,7 +83347,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <sys/statvfs.h>
-@@ -77585,55 +32188,28 @@
+@@ -77680,55 +32136,28 @@
    return 0;
  }
  _ACEOF
@@ -83271,7 +83410,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <sys/statvfs.h>
-@@ -77645,59 +32221,32 @@
+@@ -77740,59 +32169,32 @@
    return 0;
  }
  _ACEOF
@@ -83339,7 +83478,7 @@
  /* end confdefs.h.  */
  
  #include <sys/param.h>
-@@ -77710,71 +32259,38 @@
+@@ -77805,71 +32207,38 @@
      exit (statfs (".", &fsd, sizeof (struct statfs)));
    }
  _ACEOF
@@ -83421,7 +83560,7 @@
  /* end confdefs.h.  */
  
  #ifdef HAVE_SYS_PARAM_H
-@@ -77793,71 +32309,38 @@
+@@ -77888,71 +32257,38 @@
    exit (statfs (".", &fsd));
    }
  _ACEOF
@@ -83503,7 +83642,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <sys/statfs.h>
-@@ -77867,71 +32350,38 @@
+@@ -77962,71 +32298,38 @@
    exit (statfs (".", &fsd, sizeof fsd, 0));
    }
  _ACEOF
@@ -83585,7 +83724,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #ifdef HAVE_SYS_PARAM_H
-@@ -77947,71 +32397,38 @@
+@@ -78042,71 +32345,38 @@
    exit (statfs (".", &fsd));
    }
  _ACEOF
@@ -83667,7 +83806,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #ifdef HAVE_SYS_PARAM_H
-@@ -78031,52 +32448,23 @@
+@@ -78126,52 +32396,23 @@
    exit (statfs (".", &fsd) != 1);
    }
  _ACEOF
@@ -83726,26 +83865,36 @@
  
    fi
  fi
-@@ -78089,13 +32477,9 @@
- # If we don't have all of these then disable large
- # file support.
- #
+@@ -78181,513 +32422,99 @@
+ # use <4GB files we must have the following minimal support
+ # available.
+ # long long, and a 64 bit off_t or off64_t.
+-# If we don't have all of these then disable large
+-# file support.
+-#
 -{ $as_echo "$as_me:$LINENO: checking if large file support can be enabled" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if large file support can be enabled" >&5
- $as_echo_n "checking if large file support can be enabled... " >&6; }
+-$as_echo_n "checking if large file support can be enabled... " >&6; }
 -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.  */
- 
- #if defined(HAVE_LONGLONG) && (defined(HAVE_OFF64_T) || (defined(SIZEOF_OFF_T) && (SIZEOF_OFF_T == 8)))
-@@ -78112,41 +32496,18 @@
-   return 0;
- }
- _ACEOF
+-/* end confdefs.h.  */
+-
+-#if defined(HAVE_LONGLONG) && (defined(HAVE_OFF64_T) || (defined(SIZEOF_OFF_T) && (SIZEOF_OFF_T == 8)))
+-#include <sys/types.h>
+-#else
+-__COMPILE_ERROR_
+-#endif
+-
+-int
+-main ()
+-{
+-int i
+-  ;
+-  return 0;
+-}
+-_ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -83764,50 +83913,52 @@
 -	 test -z "$ac_c_werror_flag" ||
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
-+if ac_fn_c_try_compile "$LINENO"; then :
-   samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=yes
- else
+-  samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=yes
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=no
-+  samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=no
- fi
+-fi
 -
- rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- if test x"$samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT" = x"yes"; then
- 
+-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+-if test x"$samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT" = x"yes"; then
+-
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_EXPLICIT_LARGEFILE_SUPPORT 1
 -_ACEOF
-+$as_echo "#define HAVE_EXPLICIT_LARGEFILE_SUPPORT 1" >>confdefs.h
- 
- fi
+-
+-fi
 -{ $as_echo "$as_me:$LINENO: result: $samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT" >&5
- $as_echo "$samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT" >&6; }
- 
- #################################################
-@@ -78156,10 +32517,10 @@
- 
- 
- # Check whether --with-ctdb was given.
+-$as_echo "$samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT" >&6; }
+-
+-#################################################
+-# check for cluster extensions
+-
+-CTDB_CFLAGS=""
+-
+-
+-# Check whether --with-ctdb was given.
 -if test "${with_ctdb+set}" = set; then
-+if test "${with_ctdb+set}" = set; then :
-   withval=$with_ctdb;  case "$withval" in
-   yes|no)
+-  withval=$with_ctdb;  case "$withval" in
+-  yes|no)
 -    { $as_echo "$as_me:$LINENO: WARNING: --with-ctdb called without argument" >&5
-+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ctdb called without argument" >&5
- $as_echo "$as_me: WARNING: --with-ctdb called without argument" >&2;}
-     ;;
-   *)
-@@ -78173,71 +32534,23 @@
- CPPFLAGS="$CPPFLAGS ${SAMBA_CONFIGURE_CPPFLAGS} $CTDB_CPPFLAGS"
- ctdb_broken="missing or broken headers"
- 
+-$as_echo "$as_me: WARNING: --with-ctdb called without argument" >&2;}
+-    ;;
+-  *)
+-    CTDB_CPPFLAGS="-I$withval/include"
+-    ;;
+-  esac
+-fi
 -
 -
- for ac_header in ctdb.h ctdb_private.h
+-SAVED_CPPFLAGS="$CPPFLAGS"
+-CPPFLAGS="$CPPFLAGS ${SAMBA_CONFIGURE_CPPFLAGS} $CTDB_CPPFLAGS"
+-ctdb_broken="missing or broken headers"
+-
+-
+-
+-for ac_header in ctdb.h ctdb_private.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
@@ -83823,23 +83974,16 @@
 -/* end confdefs.h.  */
 -
 -#include "confdefs.h"
-+do :
-+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-+ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
-+#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\"
- #define private #error __USED_RESERVED_WORD_private__
- #include <talloc.h>
- #include <tdb.h>
- #include <ctdb.h>
- 
+-#define private #error __USED_RESERVED_WORD_private__
+-#include <talloc.h>
+-#include <tdb.h>
+-#include <ctdb.h>
 -
+-
 -#include <$ac_header>
 -_ACEOF
 -rm -f conftest.$ac_objext
@@ -83877,37 +84021,47 @@
 -as_val=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+"
-+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
-@@ -78248,17 +32561,13 @@
- 
- 
- 
+-  cat >>confdefs.h <<_ACEOF
+-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+-_ACEOF
+-
+-fi
+-
+-done
+-
+-
+-
 - { $as_echo "$as_me:$LINENO: checking for CTDB_CONTROL_TRANS3_COMMIT declaration" >&5
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CTDB_CONTROL_TRANS3_COMMIT declaration" >&5
- $as_echo_n "checking for CTDB_CONTROL_TRANS3_COMMIT declaration... " >&6; }
+-$as_echo_n "checking for CTDB_CONTROL_TRANS3_COMMIT declaration... " >&6; }
 -if test "${ac_cv_have_CTDB_CONTROL_TRANS3_COMMIT_decl+set}" = set; then
-+if test "${ac_cv_have_CTDB_CONTROL_TRANS3_COMMIT_decl+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.  */
- 
- #include "confdefs.h"
-@@ -78279,41 +32588,18 @@
-   return 0;
- }
- _ACEOF
+-/* end confdefs.h.  */
+-
+-#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 ()
+-{
+-int i = (int)CTDB_CONTROL_TRANS3_COMMIT
+-  ;
+-  return 0;
+-}
+-_ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -83926,34 +84080,33 @@
 -	 test -z "$ac_c_werror_flag" ||
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
-+if ac_fn_c_try_compile "$LINENO"; then :
-   ac_cv_have_CTDB_CONTROL_TRANS3_COMMIT_decl=yes
- else
+-  ac_cv_have_CTDB_CONTROL_TRANS3_COMMIT_decl=yes
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	ac_cv_have_CTDB_CONTROL_TRANS3_COMMIT_decl=no
-+  ac_cv_have_CTDB_CONTROL_TRANS3_COMMIT_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_have_CTDB_CONTROL_TRANS3_COMMIT_decl" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_CTDB_CONTROL_TRANS3_COMMIT_decl" >&5
- $as_echo "$ac_cv_have_CTDB_CONTROL_TRANS3_COMMIT_decl" >&6; }
-  if test x"$ac_cv_have_CTDB_CONTROL_TRANS3_COMMIT_decl" = x"yes"; then
- 
+-$as_echo "$ac_cv_have_CTDB_CONTROL_TRANS3_COMMIT_decl" >&6; }
+- if test x"$ac_cv_have_CTDB_CONTROL_TRANS3_COMMIT_decl" = x"yes"; then
+-
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_CTDB_CONTROL_TRANS3_COMMIT_DECL 1
 -_ACEOF
-+$as_echo "#define HAVE_CTDB_CONTROL_TRANS3_COMMIT_DECL 1" >>confdefs.h
- 
-  fi
- 
-@@ -78324,255 +32610,43 @@
- fi
- 
- # in ctdb 1.0.57 ctdb_control_tcp was temparary renamed to ctdb_tcp_client
+-
+- fi
+-
+-if test x"$ac_cv_have_CTDB_CONTROL_TRANS3_COMMIT_decl" = x"yes"; then
+-	ctdb_broken=no
+-else
+-	ctdb_broken="ctdb transaction support missing or too old"
+-fi
+-
+-# in ctdb 1.0.57 ctdb_control_tcp was temparary renamed to ctdb_tcp_client
 -{ $as_echo "$as_me:$LINENO: checking for struct ctdb_tcp_client" >&5
 -$as_echo_n "checking for struct ctdb_tcp_client... " >&6; }
 -if test "${ac_cv_type_struct_ctdb_tcp_client+set}" = set; then
@@ -84013,21 +84166,16 @@
 -/* end confdefs.h.  */
 -
 -#include "confdefs.h"
-+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>
- 
+-#include <talloc.h>
+-#include <tdb.h>
+-#include <ctdb.h>
+-#include <ctdb_private.h>
 -
+-
 -int
 -main ()
 -{
@@ -84076,19 +84224,16 @@
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_struct_ctdb_tcp_client" >&5
 -$as_echo "$ac_cv_type_struct_ctdb_tcp_client" >&6; }
 -if test "x$ac_cv_type_struct_ctdb_tcp_client" = x""yes; then
-+"
-+if test "x$ac_cv_type_struct_ctdb_tcp_client" = x""yes; then :
- 
- 
+-
+-
 -cat >>confdefs.h <<\_ACEOF
 -#define ctdb_control_tcp ctdb_tcp_client
 -_ACEOF
-+$as_echo "#define ctdb_control_tcp ctdb_tcp_client" >>confdefs.h
- 
- 
- fi
- 
- 
+-
+-
+-fi
+-
+-
 -{ $as_echo "$as_me:$LINENO: checking for struct ctdb_control_tcp" >&5
 -$as_echo_n "checking for struct ctdb_control_tcp... " >&6; }
 -if test "${ac_cv_type_struct_ctdb_control_tcp+set}" = set; then
@@ -84145,33 +84290,40 @@
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
--
++# If we don't have all of these then disable large
++# file support.
++#
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if large file support can be enabled" >&5
++$as_echo_n "checking if large file support can be enabled... " >&6; }
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ 
 -#include "confdefs.h"
-+ac_fn_c_check_type "$LINENO" "struct ctdb_control_tcp" "ac_cv_type_struct_ctdb_control_tcp" "
-+#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>
+-#include <talloc.h>
+-#include <tdb.h>
+-#include <ctdb.h>
+-#include <ctdb_private.h>
+-
++#if defined(HAVE_LONGLONG) && (defined(HAVE_OFF64_T) || (defined(SIZEOF_OFF_T) && (SIZEOF_OFF_T == 8)))
++#include <sys/types.h>
++#else
++__COMPILE_ERROR_
++#endif
  
--
--int
--main ()
--{
+ int
+ main ()
+ {
 -if (sizeof ((struct ctdb_control_tcp)))
 -	  return 0;
--  ;
--  return 0;
--}
--_ACEOF
++int i
+   ;
+   return 0;
+ }
+ _ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -84191,74 +84343,122 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  :
--else
++if ac_fn_c_try_compile "$LINENO"; then :
++  samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=yes
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	ac_cv_type_struct_ctdb_control_tcp=yes
--fi
++  samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=no
+ fi
 -
--rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ 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
--
++if test x"$samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT" = x"yes"; then
+ 
++$as_echo "#define HAVE_EXPLICIT_LARGEFILE_SUPPORT 1" >>confdefs.h
+ 
+ fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT" >&5
++$as_echo "$samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT" >&6; }
+ 
 -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
-+"
-+if test "x$ac_cv_type_struct_ctdb_control_tcp" = x""yes; then :
++#################################################
++# check for cluster extensions
  
++CTDB_CFLAGS=""
  
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_STRUCT_CTDB_CONTROL_TCP 1
 -_ACEOF
-+$as_echo "#define HAVE_STRUCT_CTDB_CONTROL_TCP 1" >>confdefs.h
++
++# Check whether --with-ctdb was given.
++if test "${with_ctdb+set}" = set; then :
++  withval=$with_ctdb;  case "$withval" in
++  yes|no)
++    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ctdb called without argument" >&5
++$as_echo "$as_me: WARNING: --with-ctdb called without argument" >&2;}
++    ;;
++  *)
++    CTDB_CPPFLAGS="-I$withval/include"
++    ;;
++  esac
++fi
  
  
- else
-@@ -78582,139 +32656,33 @@
+-else
++SAVED_CPPFLAGS="$CPPFLAGS"
++CPPFLAGS="$CPPFLAGS ${SAMBA_CONFIGURE_CPPFLAGS} $CTDB_CPPFLAGS"
++ctdb_broken="missing or broken headers"
+ 
+-	ctdb_broken="missing struct ctdb_control_tcp"
++for ac_header in ctdb.h ctdb_private.h
++do :
++  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
++ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
++#include \"confdefs.h\"
++#define NO_CONFIG_H
++#include \"replace.h\"
++#include \"system/wait.h\"
++#include \"system/network.h\"
++#define private #error __USED_RESERVED_WORD_private__
++#include <talloc.h>
++#include <tdb.h>
++#include <ctdb.h>
++
++"
++if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
++  cat >>confdefs.h <<_ACEOF
++#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
++_ACEOF
+ 
  fi
  
++done
++
++
  
 -{ $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
--  $as_echo_n "(cached) " >&6
--else
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CTDB_CONTROL_TRANS3_COMMIT declaration" >&5
++$as_echo_n "checking for CTDB_CONTROL_TRANS3_COMMIT declaration... " >&6; }
++if test "${ac_cv_have_CTDB_CONTROL_TRANS3_COMMIT_decl+set}" = set; then :
+   $as_echo_n "(cached) " >&6
+ else
 -  ac_cv_type_struct_ctdb_control_tcp_addr=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.  */
+ 
+ #include "confdefs.h"
+@@ -78700,116 +32527,109 @@
+ #include <ctdb.h>
+ #include <ctdb_private.h>
+ 
 -
--#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 ()
--{
+ int
+ main ()
+ {
 -if (sizeof (struct ctdb_control_tcp_addr))
 -       return 0;
--  ;
--  return 0;
--}
--_ACEOF
++int i = (int)CTDB_CONTROL_TRANS3_COMMIT
+   ;
+   return 0;
+ }
+ _ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -84283,9 +84483,30 @@
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
--
++if ac_fn_c_try_compile "$LINENO"; then :
++  ac_cv_have_CTDB_CONTROL_TRANS3_COMMIT_decl=yes
++else
++  ac_cv_have_CTDB_CONTROL_TRANS3_COMMIT_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_TRANS3_COMMIT_decl" >&5
++$as_echo "$ac_cv_have_CTDB_CONTROL_TRANS3_COMMIT_decl" >&6; }
++ if test x"$ac_cv_have_CTDB_CONTROL_TRANS3_COMMIT_decl" = x"yes"; then
+ 
 -#include "confdefs.h"
-+ac_fn_c_check_type "$LINENO" "struct ctdb_control_tcp_addr" "ac_cv_type_struct_ctdb_control_tcp_addr" "
++$as_echo "#define HAVE_CTDB_CONTROL_TRANS3_COMMIT_DECL 1" >>confdefs.h
++
++ fi
++
++if test x"$ac_cv_have_CTDB_CONTROL_TRANS3_COMMIT_decl" = x"yes"; then
++	ctdb_broken=no
++else
++	ctdb_broken="ctdb transaction support missing or too old"
++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"
@@ -84299,7 +84520,12 @@
  #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
+ 
 -int
 -main ()
 -{
@@ -84331,30 +84557,62 @@
 -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
--
+ fi
+ 
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
--else
++
++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 <talloc.h>
++#include <tdb.h>
++#include <ctdb.h>
++#include <ctdb_private.h>
++
++"
++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
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
--
--fi
--
+ 
++	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" "
++#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 :
  
- 
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_STRUCT_CTDB_CONTROL_TCP_ADDR 1
 -_ACEOF
++
 +$as_echo "#define HAVE_STRUCT_CTDB_CONTROL_TCP_ADDR 1" >>confdefs.h
  
  
@@ -84372,14 +84630,14 @@
    withval=$with_cluster_support;
  fi
  
-@@ -78725,44 +32693,38 @@
+@@ -78820,44 +32640,38 @@
  
  if test x"$ac_cv_header_ctdb_private_h" != x"yes"; then
  	if test "x$with_cluster_support" = "xyes"; then
 -		{ { $as_echo "$as_me:$LINENO: error: \"ctdb_private.h is required for cluster support\"" >&5
 -$as_echo "$as_me: error: \"ctdb_private.h is required for cluster support\"" >&2;}
 -   { (exit 1); exit 1; }; }
-+		as_fn_error "\"ctdb_private.h is required for cluster support\"" "$LINENO" 5
++		as_fn_error $? "\"ctdb_private.h is required for cluster support\"" "$LINENO" 5
  	fi
  	with_cluster_support=no
  fi
@@ -84389,7 +84647,7 @@
 -		{ { $as_echo "$as_me:$LINENO: error: \"cluster support: $ctdb_broken\"" >&5
 -$as_echo "$as_me: error: \"cluster support: $ctdb_broken\"" >&2;}
 -   { (exit 1); exit 1; }; }
-+		as_fn_error "\"cluster support: $ctdb_broken\"" "$LINENO" 5
++		as_fn_error $? "\"cluster support: $ctdb_broken\"" "$LINENO" 5
  	fi
  	with_cluster_support=no
  fi
@@ -84424,7 +84682,7 @@
    withval=$with_acl_support;  case "$withval" in
  	yes|no)
  		with_acl_support="$withval"
-@@ -78775,105 +32737,85 @@
+@@ -78870,105 +32684,85 @@
  	with_acl_support="auto"
  fi
  
@@ -84551,7 +84809,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -78891,60 +32833,31 @@
+@@ -78986,60 +32780,31 @@
    return 0;
  }
  _ACEOF
@@ -84621,7 +84879,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -78962,61 +32875,32 @@
+@@ -79057,61 +32822,32 @@
    return 0;
  }
  _ACEOF
@@ -84692,7 +84950,7 @@
  /* end confdefs.h.  */
  
  				#include <sys/types.h>
-@@ -79035,64 +32919,33 @@
+@@ -79130,64 +32866,33 @@
    return 0;
  }
  _ACEOF
@@ -84767,7 +85025,7 @@
  /* end confdefs.h.  */
  
  					#include <sys/types.h>
-@@ -79110,58 +32963,29 @@
+@@ -79205,58 +32910,29 @@
    return 0;
  }
  _ACEOF
@@ -84834,7 +85092,7 @@
  
  		fi
  		;;
-@@ -79173,31 +32997,27 @@
+@@ -79268,31 +32944,27 @@
  #################################################
  # check for AIO support
  
@@ -84872,7 +85130,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -79215,58 +33035,29 @@
+@@ -79310,58 +32982,29 @@
    return 0;
  }
  _ACEOF
@@ -84940,7 +85198,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -79284,59 +33075,30 @@
+@@ -79379,59 +33022,30 @@
    return 0;
  }
  _ACEOF
@@ -85009,7 +85267,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <aio.h>
-@@ -79348,55 +33110,26 @@
+@@ -79443,55 +33057,26 @@
    return 0;
  }
  _ACEOF
@@ -85073,7 +85331,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <aio.h>
-@@ -79408,716 +33141,317 @@
+@@ -79503,716 +33088,317 @@
    return 0;
  }
  _ACEOF
@@ -85928,7 +86186,7 @@
  $as_echo "no" >&6; }
  
  fi
-@@ -80134,30 +33468,26 @@
+@@ -80229,30 +33415,26 @@
  # check for sendfile support
  
  with_sendfile_support=yes
@@ -85965,7 +86223,7 @@
  /* end confdefs.h.  */
  #include <sys/sendfile.h>
  int
-@@ -80173,53 +33503,24 @@
+@@ -80268,53 +33450,24 @@
    return 0;
  }
  _ACEOF
@@ -86027,7 +86285,7 @@
  /* end confdefs.h.  */
  #include <sys/sendfile.h>
  int
-@@ -80235,54 +33536,25 @@
+@@ -80330,54 +33483,25 @@
    return 0;
  }
  _ACEOF
@@ -86090,7 +86348,7 @@
  /* end confdefs.h.  */
  \
  #if defined(_FILE_OFFSET_BITS) && (_FILE_OFFSET_BITS == 64)
-@@ -80302,103 +33574,58 @@
+@@ -80397,103 +33521,58 @@
    return 0;
  }
  _ACEOF
@@ -86211,7 +86469,7 @@
  /* end confdefs.h.  */
  \
  #include <sys/types.h>
-@@ -80425,76 +33652,41 @@
+@@ -80520,76 +33599,41 @@
    return 0;
  }
  _ACEOF
@@ -86300,7 +86558,7 @@
  /* end confdefs.h.  */
  \
  #include <sys/socket.h>
-@@ -80518,73 +33710,38 @@
+@@ -80613,73 +33657,38 @@
    return 0;
  }
  _ACEOF
@@ -86386,7 +86644,7 @@
  /* end confdefs.h.  */
  \
  #include <sys/socket.h>
-@@ -80608,77 +33765,41 @@
+@@ -80703,77 +33712,41 @@
    return 0;
  }
  _ACEOF
@@ -86476,7 +86734,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -80696,43 +33817,18 @@
+@@ -80791,43 +33764,18 @@
    return 0;
  }
  _ACEOF
@@ -86526,7 +86784,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_LIBSENDFILE 1
  _ACEOF
-@@ -80741,17 +33837,13 @@
+@@ -80836,17 +33784,13 @@
  
  fi
  
@@ -86547,7 +86805,7 @@
  /* end confdefs.h.  */
  \
  #include <sys/sendfile.h>
-@@ -80782,74 +33874,39 @@
+@@ -80877,74 +33821,39 @@
    return 0;
  }
  _ACEOF
@@ -86634,7 +86892,7 @@
  /* end confdefs.h.  */
  \
  #include <sys/sendfile.h>
-@@ -80880,75 +33937,40 @@
+@@ -80975,75 +33884,40 @@
    return 0;
  }
  _ACEOF
@@ -86722,7 +86980,7 @@
  /* end confdefs.h.  */
  \
  #include <sys/socket.h>
-@@ -80976,59 +33998,28 @@
+@@ -81071,59 +33945,28 @@
    return 0;
  }
  _ACEOF
@@ -86791,7 +87049,7 @@
  $as_echo "no" >&6; };
  	fi
  	;;
-@@ -81037,12 +34028,12 @@
+@@ -81132,12 +33975,12 @@
          esac
          ;;
    *)
@@ -86806,7 +87064,7 @@
  $as_echo "yes" >&6; }
  
  fi
-@@ -81051,17 +34042,13 @@
+@@ -81146,17 +33989,13 @@
  ############################################
  # See if we have the Linux readahead syscall.
  
@@ -86827,7 +87085,7 @@
  /* end confdefs.h.  */
  
  #if defined(HAVE_UNISTD_H)
-@@ -81076,62 +34063,31 @@
+@@ -81171,62 +34010,31 @@
    return 0;
  }
  _ACEOF
@@ -86899,7 +87157,7 @@
  /* end confdefs.h.  */
  #include <fcntl.h>
  int
-@@ -81142,41 +34098,18 @@
+@@ -81237,41 +34045,18 @@
    return 0;
  }
  _ACEOF
@@ -86945,7 +87203,7 @@
  
   fi
  
-@@ -81184,17 +34117,13 @@
+@@ -81279,17 +34064,13 @@
  ############################################
  # See if we have the posix_fadvise syscall.
  
@@ -86966,7 +87224,7 @@
  /* end confdefs.h.  */
  
  #if defined(HAVE_UNISTD_H)
-@@ -81209,47 +34138,20 @@
+@@ -81304,47 +34085,20 @@
    return 0;
  }
  _ACEOF
@@ -86993,12 +87251,11 @@
 -       }; then
 +if ac_fn_c_try_link "$LINENO"; then :
    samba_cv_HAVE_POSIX_FADVISE=yes
--else
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	samba_cv_HAVE_POSIX_FADVISE=no
-+else
 +  samba_cv_HAVE_POSIX_FADVISE=no
  fi
 -
@@ -87021,7 +87278,7 @@
  
  fi
  
-@@ -81258,17 +34160,13 @@
+@@ -81353,17 +34107,13 @@
  
  case "$host_os" in
  *linux*)
@@ -87042,7 +87299,7 @@
  /* end confdefs.h.  */
  
  #if defined(HAVE_UNISTD_H)
-@@ -81283,40 +34181,15 @@
+@@ -81378,40 +34128,15 @@
    return 0;
  }
  _ACEOF
@@ -87088,7 +87345,7 @@
  $as_echo "$samba_cv_HAVE_LINUX_SPLICE" >&6; }
  ;;
  *)
-@@ -81326,24 +34199,18 @@
+@@ -81421,24 +34146,18 @@
  
  if test x"$samba_cv_HAVE_LINUX_SPLICE" = x"yes"; then
  
@@ -87117,7 +87374,7 @@
  /* end confdefs.h.  */
  #include <fcntl.h>
  int
-@@ -81354,41 +34221,18 @@
+@@ -81449,41 +34168,18 @@
    return 0;
  }
  _ACEOF
@@ -87163,7 +87420,7 @@
  
   fi
  
-@@ -81396,68 +34240,35 @@
+@@ -81491,68 +34187,35 @@
  ############################################
  # See if we have the a broken readlink syscall.
  
@@ -87242,7 +87499,7 @@
  
  fi
  
-@@ -81465,7 +34276,7 @@
+@@ -81560,7 +34223,7 @@
  # Check whether winbind is supported on this platform.  If so we need to
  # build and install client programs, sbin programs and shared libraries
  
@@ -87251,7 +87508,7 @@
  $as_echo_n "checking whether to build winbind... " >&6; }
  
  # Initially, the value of $host_os decides whether winbind is supported
-@@ -81477,7 +34288,7 @@
+@@ -81572,7 +34235,7 @@
  # We define this here so --with-winbind can override it.
  
  # Check whether --with-wbclient was given.
@@ -87260,7 +87517,7 @@
    withval=$with_wbclient;
    case "$withval" in
          no)
-@@ -81575,7 +34386,7 @@
+@@ -81670,7 +34333,7 @@
  
  
  # Check whether --with-winbind was given.
@@ -87269,7 +87526,7 @@
    withval=$with_winbind;
    case "$withval" in
  	yes)
-@@ -81606,18 +34417,14 @@
+@@ -81701,18 +34364,14 @@
  	WINBIND_WINS_NSS=""
  fi
  if test x"$HAVE_WBCLIENT" = x"yes"; then
@@ -87291,7 +87548,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -81635,57 +34442,28 @@
+@@ -81730,57 +34389,28 @@
    return 0;
  }
  _ACEOF
@@ -87343,7 +87600,7 @@
 -  { { $as_echo "$as_me:$LINENO: error: Could not find wbclient" >&5
 -$as_echo "$as_me: error: Could not find wbclient" >&2;}
 -   { (exit 1); exit 1; }; }
-+  as_fn_error "Could not find wbclient" "$LINENO" 5
++  as_fn_error $? "Could not find wbclient" "$LINENO" 5
  fi
  
  	LIBWBCLIENT_LIBS="$LIBWBCLIENT_LIBS $WBCLIENT_LDFLAGS"
@@ -87358,7 +87615,7 @@
  
  	EXTRA_BIN_PROGS="$EXTRA_BIN_PROGS bin/wbinfo\$(EXEEXT)"
  else
-@@ -81714,12 +34492,10 @@
+@@ -81809,12 +34439,10 @@
  fi
  
  if test x"$HAVE_WINBIND" = x"yes"; then
@@ -87373,7 +87630,7 @@
  
  
  	EXTRA_BIN_PROGS="$EXTRA_BIN_PROGS bin/wbinfo\$(EXEEXT)"
-@@ -81730,7 +34506,7 @@
+@@ -81825,7 +34453,7 @@
  		UNINSTALL_PAM_MODULES="uninstallpammodules"
  	fi
  else
@@ -87382,7 +87639,7 @@
  $as_echo "no$winbind_no_reason" >&6; }
  fi
  
-@@ -81743,108 +34519,11 @@
+@@ -81838,108 +34466,11 @@
  
  
  # Solaris 10 does have new member in nss_XbyY_key
@@ -87495,7 +87752,7 @@
  
  fi
  
-@@ -81852,318 +34531,29 @@
+@@ -81947,424 +34478,40 @@
  # Solaris has some extra fields in struct passwd that need to be
  # initialised otherwise nscd crashes.
  
@@ -87658,10 +87915,7 @@
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
 -#include <pwd.h>
-+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 :
- 
+-
 -int
 -main ()
 -{
@@ -87694,33 +87948,28 @@
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+$as_echo "#define HAVE_PASSWD_PW_COMMENT 1" >>confdefs.h
- 
+-
 -	ac_cv_member_struct_passwd_pw_age=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_member_struct_passwd_pw_age" >&5
 -$as_echo "$ac_cv_member_struct_passwd_pw_age" >&6; }
 -if test "x$ac_cv_member_struct_passwd_pw_age" = x""yes; then
-+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 :
- 
+-
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_PASSWD_PW_AGE 1
 -_ACEOF
-+$as_echo "#define HAVE_PASSWD_PW_AGE 1" >>confdefs.h
- 
- fi
- 
- 
- # AIX 4.3.x and 5.1 do not have as many members in
- # struct secmethod_table as AIX 5.2
+-
+-fi
+-
+-
+-# AIX 4.3.x and 5.1 do not have as many members in
+-# struct secmethod_table as AIX 5.2
 -{ $as_echo "$as_me:$LINENO: checking for struct secmethod_table.method_attrlist" >&5
 -$as_echo_n "checking for struct secmethod_table.method_attrlist... " >&6; }
 -if test "${ac_cv_member_struct_secmethod_table_method_attrlist+set}" = set; then
@@ -87807,25 +88056,31 @@
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
++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 :
+ 
 -	ac_cv_member_struct_secmethod_table_method_attrlist=no
 -fi
--
++$as_echo "#define HAVE_PASSWD_PW_COMMENT 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
-+ac_fn_c_check_member "$LINENO" "struct secmethod_table" "method_attrlist" "ac_cv_member_struct_secmethod_table_method_attrlist" "#include <usersec.h>
+ 
+-cat >>confdefs.h <<_ACEOF
+-#define HAVE_STRUCT_SECMETHOD_TABLE_METHOD_ATTRLIST 1
+-_ACEOF
++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_secmethod_table_method_attrlist" = x""yes; then :
++if test "x$ac_cv_member_struct_passwd_pw_age" = x""yes; then :
  
- cat >>confdefs.h <<_ACEOF
- #define HAVE_STRUCT_SECMETHOD_TABLE_METHOD_ATTRLIST 1
-@@ -82172,104 +34562,9 @@
++$as_echo "#define HAVE_PASSWD_PW_AGE 1" >>confdefs.h
  
  fi
  
@@ -87874,7 +88129,7 @@
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
+ 
 -	cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
@@ -87882,7 +88137,12 @@
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
 -#include <usersec.h>
--
++# 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 :
+ 
 -int
 -main ()
 -{
@@ -87892,7 +88152,9 @@
 -  ;
 -  return 0;
 -}
--_ACEOF
++cat >>confdefs.h <<_ACEOF
++#define HAVE_STRUCT_SECMETHOD_TABLE_METHOD_ATTRLIST 1
+ _ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -87915,13 +88177,13 @@
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
+ 
 -	ac_cv_member_struct_secmethod_table_method_version=no
 -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
 -fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_secmethod_table_method_version" >&5
@@ -87933,7 +88195,7 @@
  
  cat >>confdefs.h <<_ACEOF
  #define HAVE_STRUCT_SECMETHOD_TABLE_METHOD_VERSION 1
-@@ -82279,17 +34574,13 @@
+@@ -82374,17 +34521,13 @@
  fi
  
  
@@ -87954,7 +88216,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <sys/socket.h>
-@@ -82304,41 +34595,18 @@
+@@ -82399,41 +34542,18 @@
    return 0;
  }
  _ACEOF
@@ -88000,7 +88262,7 @@
  
  fi
  
-@@ -82348,7 +34616,7 @@
+@@ -82443,7 +34563,7 @@
  
  
  # Check whether --with-included-popt was given.
@@ -88009,7 +88271,7 @@
    withval=$with_included_popt;
    case "$withval" in
  	yes)
-@@ -82361,18 +34629,14 @@
+@@ -82456,18 +34576,14 @@
  fi
  
  if test x"$INCLUDED_POPT" != x"yes"; then
@@ -88031,7 +88293,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -82390,43 +34654,18 @@
+@@ -82485,43 +34601,18 @@
    return 0;
  }
  _ACEOF
@@ -88081,7 +88343,7 @@
    INCLUDED_POPT=no
  else
    INCLUDED_POPT=yes
-@@ -82434,16 +34673,16 @@
+@@ -82529,16 +34620,16 @@
  
  fi
  
@@ -88101,7 +88363,7 @@
  $as_echo "no" >&6; }
  	BUILD_POPT=""
      POPTLIBS="-lpopt"
-@@ -82456,7 +34695,7 @@
+@@ -82551,7 +34642,7 @@
  # Check if user wants DNS service discovery support
  
  # Check whether --enable-dnssd was given.
@@ -88110,7 +88372,7 @@
    enableval=$enable_dnssd;
  fi
  
-@@ -82465,151 +34704,12 @@
+@@ -82560,151 +34651,12 @@
  if test x"$enable_dnssd" = x"yes"; then
      have_dnssd_support=yes
  
@@ -88267,7 +88529,7 @@
  _ACEOF
  
  fi
-@@ -82622,102 +34722,12 @@
+@@ -82717,102 +34669,12 @@
  
      # On Darwin the DNSSD API is in libc, but on other platforms it's
      # probably in -ldns_sd
@@ -88375,7 +88637,7 @@
  _ACEOF
  
  fi
-@@ -82725,23 +34735,17 @@
+@@ -82820,23 +34682,17 @@
  
  
  
@@ -88402,15 +88664,10 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -82754,59 +34758,33 @@
- int
- main ()
- {
--return DNSServiceRegister ();
--  ;
--  return 0;
--}
--_ACEOF
+@@ -82854,54 +34710,28 @@
+   return 0;
+ }
+ _ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -88432,11 +88689,6 @@
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
-+return DNSServiceRegister ();
-+  ;
-+  return 0;
-+}
-+_ACEOF
 +if ac_fn_c_try_link "$LINENO"; then :
    ac_cv_lib_ext_dns_sd_DNSServiceRegister=yes;
  		  ac_cv_lib_ext_dns_sd=yes
@@ -88474,7 +88726,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_LIBDNS_SD 1
  _ACEOF
-@@ -82821,7 +34799,6 @@
+@@ -82916,7 +34746,6 @@
  
  
  fi
@@ -88482,7 +88734,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
-@@ -82829,15 +34806,11 @@
+@@ -82924,15 +34753,11 @@
  
      if test x"$have_dnssd_support" = x"yes"; then
  
@@ -88496,11 +88748,11 @@
 -	    { { $as_echo "$as_me:$LINENO: error: DNS service discovery support not available" >&5
 -$as_echo "$as_me: error: DNS service discovery support not available" >&2;}
 -   { (exit 1); exit 1; }; }
-+	    as_fn_error "DNS service discovery support not available" "$LINENO" 5
++	    as_fn_error $? "DNS service discovery support not available" "$LINENO" 5
  	fi
      fi
  
-@@ -82847,7 +34820,7 @@
+@@ -82942,7 +34767,7 @@
  # Check if user wants avahi support
  
  # Check whether --enable-avahi was given.
@@ -88509,7 +88761,7 @@
    enableval=$enable_avahi;
  fi
  
-@@ -82855,151 +34828,12 @@
+@@ -82950,151 +34775,12 @@
  if test x"$enable_avahi" != x"no"; then
      have_avahi_support=yes
  
@@ -88666,7 +88918,7 @@
  _ACEOF
  
  fi
-@@ -83010,151 +34844,12 @@
+@@ -83105,151 +34791,12 @@
  	have_avahi_support=no
      fi
  
@@ -88823,7 +89075,7 @@
  _ACEOF
  
  fi
-@@ -83166,18 +34861,14 @@
+@@ -83261,18 +34808,14 @@
      fi
  
      save_LIBS="$LIBS"
@@ -88845,7 +89097,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -83195,58 +34886,29 @@
+@@ -83290,58 +34833,29 @@
    return 0;
  }
  _ACEOF
@@ -88913,7 +89165,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -83264,43 +34926,18 @@
+@@ -83359,43 +34873,18 @@
    return 0;
  }
  _ACEOF
@@ -88963,7 +89215,7 @@
    have_avahi_strerror=yes
  fi
  
-@@ -83315,17 +34952,13 @@
+@@ -83410,17 +34899,13 @@
          AVAHI_LIBS="-lavahi-client -lavahi-common"
  
  
@@ -88979,11 +89231,11 @@
 -	    { { $as_echo "$as_me:$LINENO: error: avahi support not available" >&5
 -$as_echo "$as_me: error: avahi support not available" >&2;}
 -   { (exit 1); exit 1; }; }
-+	    as_fn_error "avahi support not available" "$LINENO" 5
++	    as_fn_error $? "avahi support not available" "$LINENO" 5
  	fi
      fi
  fi
-@@ -83340,18 +34973,14 @@
+@@ -83435,18 +34920,14 @@
  # If it's error, then the user didn't
  # define it.
  if test "x$PTHREAD_LDFLAGS" = xerror; then
@@ -89005,7 +89257,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -83369,43 +34998,18 @@
+@@ -83464,43 +34945,18 @@
    return 0;
  }
  _ACEOF
@@ -89055,7 +89307,7 @@
  
  	     PTHREAD_CFLAGS="-D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS"
  	     PTHREAD_LDFLAGS="-lpthread"
-@@ -83414,18 +35018,14 @@
+@@ -83509,18 +34965,14 @@
  fi
  
  if test "x$PTHREAD_LDFLAGS" = xerror; then
@@ -89077,7 +89329,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -83443,43 +35043,18 @@
+@@ -83538,43 +34990,18 @@
    return 0;
  }
  _ACEOF
@@ -89127,7 +89379,7 @@
  
  	     PTHREAD_CFLAGS="-D_THREAD_SAFE"
  	     PTHREAD_LDFLAGS="-lpthreads"
-@@ -83488,18 +35063,14 @@
+@@ -83583,18 +35010,14 @@
  fi
  
  if test "x$PTHREAD_LDFLAGS" = xerror; then
@@ -89149,7 +89401,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -83517,43 +35088,18 @@
+@@ -83612,43 +35035,18 @@
    return 0;
  }
  _ACEOF
@@ -89199,7 +89451,7 @@
  
  		PTHREAD_CFLAGS="-D_THREAD_SAFE -pthread"
  		PTHREAD_LDFLAGS="-pthread"
-@@ -83562,92 +35108,8 @@
+@@ -83657,92 +35055,8 @@
  fi
  
  if test "x$PTHREAD_LDFLAGS" = xerror; then
@@ -89294,7 +89546,7 @@
  
  		 PTHREAD_CFLAGS="-D_REENTRANT"
  		 PTHREAD_LDFLAGS="-lpthread"
-@@ -83658,18 +35120,14 @@
+@@ -83753,18 +35067,14 @@
  # especially for HP-UX, where the AC_CHECK_FUNC macro fails to test for
  # pthread_attr_init. On pthread_mutex_lock it works there...
  if test "x$PTHREAD_LDFLAGS" = xerror; then
@@ -89316,10 +89568,18 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -83687,43 +35145,18 @@
-   return 0;
- }
- _ACEOF
+@@ -83774,51 +35084,26 @@
+ extern "C"
+ #endif
+ char pthread_mutex_lock ();
+-int
+-main ()
+-{
+-return pthread_mutex_lock ();
+-  ;
+-  return 0;
+-}
+-_ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -89341,6 +89601,14 @@
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
++int
++main ()
++{
++return pthread_mutex_lock ();
++  ;
++  return 0;
++}
++_ACEOF
 +if ac_fn_c_try_link "$LINENO"; then :
    ac_cv_lib_pthread_pthread_mutex_lock=yes
  else
@@ -89366,7 +89634,7 @@
  
  		PTHREAD_CFLAGS="-D_REENTRANT"
  		PTHREAD_LDFLAGS="-lpthread"
-@@ -83742,151 +35175,12 @@
+@@ -83837,151 +35122,12 @@
  	CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
  	ac_save_LDFLAGS=$LDFLAGS
  	LDFLAGS="$LDFLAGS $PTHREAD_LDFLAGS"
@@ -89523,7 +89791,7 @@
  _ACEOF
  
  fi
-@@ -83896,9 +35190,7 @@
+@@ -83991,9 +35137,7 @@
  	CFLAGS=$ac_save_CFLAGS
  	LDFLAGS=$ac_save_LDFLAGS
  
@@ -89534,7 +89802,7 @@
  
  fi
  
-@@ -83906,24 +35198,20 @@
+@@ -84001,24 +35145,20 @@
  # Check if user wants pthreadpool support
  
  # Check whether --enable-pthreadpool was given.
@@ -89548,7 +89816,7 @@
 -	{ { $as_echo "$as_me:$LINENO: error: pthreadpool support cannot be enabled when pthread support was found" >&5
 -$as_echo "$as_me: error: pthreadpool support cannot be enabled when pthread support was found" >&2;}
 -   { (exit 1); exit 1; }; }
-+	as_fn_error "pthreadpool support cannot be enabled when pthread support was found" "$LINENO" 5
++	as_fn_error $? "pthreadpool support cannot be enabled when pthread support was found" "$LINENO" 5
  fi
  
  if test x"$enable_pthreadpool" = x"yes" -a x"$samba_cv_HAVE_PTHREAD" = x"yes"; then
@@ -89562,7 +89830,7 @@
  
      PTHREADPOOL_OBJ="lib/pthreadpool.o"
  
-@@ -83934,7 +35222,7 @@
+@@ -84029,7 +35169,7 @@
  
  
  # Check whether --with-included-iniparser was given.
@@ -89571,7 +89839,7 @@
    withval=$with_included_iniparser;
    case "$withval" in
  	yes)
-@@ -83947,18 +35235,14 @@
+@@ -84042,18 +35182,14 @@
  fi
  
  if test x"$INCLUDED_INIPARSER" != x"yes"; then
@@ -89593,7 +89861,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -83976,43 +35260,18 @@
+@@ -84071,43 +35207,18 @@
    return 0;
  }
  _ACEOF
@@ -89643,7 +89911,7 @@
    INCLUDED_INIPARSER=no
  else
    INCLUDED_INIPARSER=yes
-@@ -84020,260 +35279,40 @@
+@@ -84115,16 +35226,16 @@
  
  fi
  
@@ -89655,22 +89923,18 @@
 +    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  $as_echo "yes" >&6; }
      BUILD_INIPARSER='$(INIPARSER_OBJ)'
--	INIPARSERLIBS=""
--    FLAGS1="$FLAGS1 -I\$(srcdir)/iniparser/src"
--else
+ 	INIPARSERLIBS=""
+     FLAGS1="$FLAGS1 -I\$(srcdir)/iniparser/src"
+ else
 -    { $as_echo "$as_me:$LINENO: result: no" >&5
--$as_echo "no" >&6; }
--	BUILD_INIPARSER=""
--    INIPARSERLIBS="-liniparser"
--fi
--
--
--
--
--
--
--# Checks for the vfs_fileid module
--# Start
++    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+ $as_echo "no" >&6; }
+ 	BUILD_INIPARSER=""
+     INIPARSERLIBS="-liniparser"
+@@ -84137,238 +35248,18 @@
+ 
+ # Checks for the vfs_fileid module
+ # Start
 -{ $as_echo "$as_me:$LINENO: checking for getmntent" >&5
 -$as_echo_n "checking for getmntent... " >&6; }
 -if test "${ac_cv_func_getmntent+set}" = set; then
@@ -89749,17 +90013,19 @@
 -
 -	ac_cv_func_getmntent=no
 -fi
--
++ac_fn_c_check_func "$LINENO" "getmntent" "ac_cv_func_getmntent"
++if test "x$ac_cv_func_getmntent" = 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
+ fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_getmntent" >&5
 -$as_echo "$ac_cv_func_getmntent" >&6; }
 -
--
--
--for ac_header in sys/statfs.h
+ 
+ 
+ for ac_header in sys/statfs.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
@@ -89889,37 +90155,18 @@
 -$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
-+	INIPARSERLIBS=""
-+    FLAGS1="$FLAGS1 -I\$(srcdir)/iniparser/src"
- else
+-else
 -  eval "$as_ac_Header=\$ac_header_preproc"
-+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-+$as_echo "no" >&6; }
-+	BUILD_INIPARSER=""
-+    INIPARSERLIBS="-liniparser"
- 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; }
-+
-+
-+
-+
-+
-+
-+# Checks for the vfs_fileid module
-+# Start
-+ac_fn_c_check_func "$LINENO" "getmntent" "ac_cv_func_getmntent"
-+if test "x$ac_cv_func_getmntent" = x""yes; then :
- 
- 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/statfs.h
 +do :
 +  ac_fn_c_check_header_mongrel "$LINENO" "sys/statfs.h" "ac_cv_header_sys_statfs_h" "$ac_includes_default"
 +if test "x$ac_cv_header_sys_statfs_h" = x""yes; then :
@@ -89929,7 +90176,7 @@
  _ACEOF
  
  fi
-@@ -84281,20 +35320,16 @@
+@@ -84376,20 +35267,16 @@
  done
  
  
@@ -89954,7 +90201,7 @@
  /* end confdefs.h.  */
  
  		#include <sys/types.h>
-@@ -84306,46 +35341,19 @@
+@@ -84401,46 +35288,19 @@
  			return statfs (".", &fsd);
  		}
  _ACEOF
@@ -90006,7 +90253,7 @@
  $as_echo "$vfsfileid_cv_statfs" >&6; }
  
  if test x"$ac_cv_func_getmntent" = x"yes" -a \
-@@ -84380,7 +35388,7 @@
+@@ -84475,7 +35335,7 @@
  
  
  # Check whether --with-static-modules was given.
@@ -90015,7 +90262,7 @@
    withval=$with_static_modules;  if test $withval; then
  	for i in `echo $withval | sed -e 's/,/ /g'`
  	do
-@@ -84392,7 +35400,7 @@
+@@ -84487,7 +35347,7 @@
  
  
  # Check whether --with-shared-modules was given.
@@ -90024,7 +90271,7 @@
    withval=$with_shared_modules;  if test $withval; then
  	for i in `echo $withval | sed -e 's/,/ /g'`
  	do
-@@ -84409,7 +35417,7 @@
+@@ -84504,7 +35364,7 @@
  fi
  
  
@@ -90033,7 +90280,7 @@
  $as_echo_n "checking how to build pdb_ldap... " >&6; }
  	if test "$MODULE_pdb_ldap"; then
  		DEST=$MODULE_pdb_ldap
-@@ -84421,12 +35429,10 @@
+@@ -84516,12 +35376,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -90048,7 +90295,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules pdb_ldap"
-@@ -84437,16 +35443,16 @@
+@@ -84532,16 +35390,16 @@
  		PDB_STATIC="$PDB_STATIC passdb/pdb_ldap.o passdb/pdb_nds.o"
  
  		 PASSDB_LIBS="$PASSDB_LIBS $LDAP_LIBS"
@@ -90068,7 +90315,7 @@
  $as_echo_n "checking how to build pdb_ads... " >&6; }
  	if test "$MODULE_pdb_ads"; then
  		DEST=$MODULE_pdb_ads
-@@ -84458,12 +35464,10 @@
+@@ -84553,12 +35411,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -90083,7 +90330,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules pdb_ads"
-@@ -84474,16 +35478,16 @@
+@@ -84569,16 +35425,16 @@
  		PDB_STATIC="$PDB_STATIC passdb/pdb_ads.o \$(TLDAP_OBJ)"
  
  
@@ -90103,7 +90350,7 @@
  $as_echo_n "checking how to build pdb_smbpasswd... " >&6; }
  	if test "$MODULE_pdb_smbpasswd"; then
  		DEST=$MODULE_pdb_smbpasswd
-@@ -84495,12 +35499,10 @@
+@@ -84590,12 +35446,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -90118,7 +90365,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules pdb_smbpasswd"
-@@ -84511,16 +35513,16 @@
+@@ -84606,16 +35460,16 @@
  		PDB_STATIC="$PDB_STATIC passdb/pdb_smbpasswd.o"
  
  
@@ -90138,7 +90385,7 @@
  $as_echo_n "checking how to build pdb_tdbsam... " >&6; }
  	if test "$MODULE_pdb_tdbsam"; then
  		DEST=$MODULE_pdb_tdbsam
-@@ -84532,12 +35534,10 @@
+@@ -84627,12 +35481,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -90153,7 +90400,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules pdb_tdbsam"
-@@ -84548,16 +35548,16 @@
+@@ -84643,16 +35495,16 @@
  		PDB_STATIC="$PDB_STATIC passdb/pdb_tdb.o"
  
  
@@ -90173,7 +90420,7 @@
  $as_echo_n "checking how to build pdb_wbc_sam... " >&6; }
  	if test "$MODULE_pdb_wbc_sam"; then
  		DEST=$MODULE_pdb_wbc_sam
-@@ -84569,12 +35569,10 @@
+@@ -84664,12 +35516,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -90188,7 +90435,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules pdb_wbc_sam"
-@@ -84585,11 +35583,11 @@
+@@ -84680,11 +35530,11 @@
  		PDB_STATIC="$PDB_STATIC passdb/pdb_wbc_sam.o"
  
  
@@ -90202,7 +90449,7 @@
  $as_echo "not" >&6; }
  	fi
  
-@@ -84611,7 +35609,7 @@
+@@ -84706,7 +35556,7 @@
  
  
  
@@ -90211,7 +90458,7 @@
  $as_echo_n "checking how to build rpc_lsarpc... " >&6; }
  	if test "$MODULE_rpc_lsarpc"; then
  		DEST=$MODULE_rpc_lsarpc
-@@ -84623,12 +35621,10 @@
+@@ -84718,12 +35568,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -90226,7 +90473,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules rpc_lsarpc"
-@@ -84639,16 +35635,16 @@
+@@ -84734,16 +35582,16 @@
  		RPC_STATIC="$RPC_STATIC \$(RPC_LSA_OBJ)"
  
  
@@ -90246,7 +90493,7 @@
  $as_echo_n "checking how to build rpc_winreg... " >&6; }
  	if test "$MODULE_rpc_winreg"; then
  		DEST=$MODULE_rpc_winreg
-@@ -84660,12 +35656,10 @@
+@@ -84755,12 +35603,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -90261,7 +90508,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules rpc_winreg"
-@@ -84676,16 +35670,16 @@
+@@ -84771,16 +35617,16 @@
  		RPC_STATIC="$RPC_STATIC \$(RPC_REG_OBJ)"
  
  
@@ -90281,7 +90528,7 @@
  $as_echo_n "checking how to build rpc_initshutdown... " >&6; }
  	if test "$MODULE_rpc_initshutdown"; then
  		DEST=$MODULE_rpc_initshutdown
-@@ -84697,12 +35691,10 @@
+@@ -84792,12 +35638,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -90296,7 +90543,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules rpc_initshutdown"
-@@ -84713,16 +35705,16 @@
+@@ -84808,16 +35652,16 @@
  		RPC_STATIC="$RPC_STATIC \$(RPC_INITSHUTDOWN_OBJ)"
  
  
@@ -90316,7 +90563,7 @@
  $as_echo_n "checking how to build rpc_dssetup... " >&6; }
  	if test "$MODULE_rpc_dssetup"; then
  		DEST=$MODULE_rpc_dssetup
-@@ -84734,12 +35726,10 @@
+@@ -84829,12 +35673,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -90331,7 +90578,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules rpc_dssetup"
-@@ -84750,16 +35740,16 @@
+@@ -84845,16 +35687,16 @@
  		RPC_STATIC="$RPC_STATIC \$(RPC_DSSETUP_OBJ)"
  
  
@@ -90351,7 +90598,7 @@
  $as_echo_n "checking how to build rpc_wkssvc... " >&6; }
  	if test "$MODULE_rpc_wkssvc"; then
  		DEST=$MODULE_rpc_wkssvc
-@@ -84771,12 +35761,10 @@
+@@ -84866,12 +35708,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -90366,7 +90613,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules rpc_wkssvc"
-@@ -84787,16 +35775,16 @@
+@@ -84882,16 +35722,16 @@
  		RPC_STATIC="$RPC_STATIC \$(RPC_WKS_OBJ)"
  
  
@@ -90386,7 +90633,7 @@
  $as_echo_n "checking how to build rpc_svcctl... " >&6; }
  	if test "$MODULE_rpc_svcctl"; then
  		DEST=$MODULE_rpc_svcctl
-@@ -84808,12 +35796,10 @@
+@@ -84903,12 +35743,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -90401,7 +90648,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules rpc_svcctl"
-@@ -84824,16 +35810,16 @@
+@@ -84919,16 +35757,16 @@
  		RPC_STATIC="$RPC_STATIC \$(RPC_SVCCTL_OBJ)"
  
  
@@ -90421,7 +90668,7 @@
  $as_echo_n "checking how to build rpc_ntsvcs... " >&6; }
  	if test "$MODULE_rpc_ntsvcs"; then
  		DEST=$MODULE_rpc_ntsvcs
-@@ -84845,12 +35831,10 @@
+@@ -84940,12 +35778,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -90436,7 +90683,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules rpc_ntsvcs"
-@@ -84861,16 +35845,16 @@
+@@ -84956,16 +35792,16 @@
  		RPC_STATIC="$RPC_STATIC \$(RPC_NTSVCS_OBJ)"
  
  
@@ -90456,7 +90703,7 @@
  $as_echo_n "checking how to build rpc_netlogon... " >&6; }
  	if test "$MODULE_rpc_netlogon"; then
  		DEST=$MODULE_rpc_netlogon
-@@ -84882,12 +35866,10 @@
+@@ -84977,12 +35813,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -90471,7 +90718,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules rpc_netlogon"
-@@ -84898,16 +35880,16 @@
+@@ -84993,16 +35827,16 @@
  		RPC_STATIC="$RPC_STATIC \$(RPC_NETLOG_OBJ)"
  
  
@@ -90491,7 +90738,7 @@
  $as_echo_n "checking how to build rpc_netdfs... " >&6; }
  	if test "$MODULE_rpc_netdfs"; then
  		DEST=$MODULE_rpc_netdfs
-@@ -84919,12 +35901,10 @@
+@@ -85014,12 +35848,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -90506,7 +90753,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules rpc_netdfs"
-@@ -84935,16 +35915,16 @@
+@@ -85030,16 +35862,16 @@
  		RPC_STATIC="$RPC_STATIC \$(RPC_DFS_OBJ)"
  
  
@@ -90526,7 +90773,7 @@
  $as_echo_n "checking how to build rpc_srvsvc... " >&6; }
  	if test "$MODULE_rpc_srvsvc"; then
  		DEST=$MODULE_rpc_srvsvc
-@@ -84956,12 +35936,10 @@
+@@ -85051,12 +35883,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -90541,7 +90788,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules rpc_srvsvc"
-@@ -84972,16 +35950,16 @@
+@@ -85067,16 +35897,16 @@
  		RPC_STATIC="$RPC_STATIC \$(RPC_SVC_OBJ)"
  
  
@@ -90561,7 +90808,7 @@
  $as_echo_n "checking how to build rpc_spoolss... " >&6; }
  	if test "$MODULE_rpc_spoolss"; then
  		DEST=$MODULE_rpc_spoolss
-@@ -84993,12 +35971,10 @@
+@@ -85088,12 +35918,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -90576,7 +90823,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules rpc_spoolss"
-@@ -85009,16 +35985,16 @@
+@@ -85104,16 +35932,16 @@
  		RPC_STATIC="$RPC_STATIC \$(RPC_SPOOLSS_OBJ)"
  
  
@@ -90596,7 +90843,7 @@
  $as_echo_n "checking how to build rpc_eventlog... " >&6; }
  	if test "$MODULE_rpc_eventlog"; then
  		DEST=$MODULE_rpc_eventlog
-@@ -85030,12 +36006,10 @@
+@@ -85125,12 +35953,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -90611,7 +90858,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules rpc_eventlog"
-@@ -85046,16 +36020,16 @@
+@@ -85141,16 +35967,16 @@
  		RPC_STATIC="$RPC_STATIC \$(RPC_EVENTLOG_OBJ)"
  
  
@@ -90631,7 +90878,7 @@
  $as_echo_n "checking how to build rpc_samr... " >&6; }
  	if test "$MODULE_rpc_samr"; then
  		DEST=$MODULE_rpc_samr
-@@ -85067,12 +36041,10 @@
+@@ -85162,12 +35988,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -90646,7 +90893,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules rpc_samr"
-@@ -85083,16 +36055,16 @@
+@@ -85178,16 +36002,16 @@
  		RPC_STATIC="$RPC_STATIC \$(RPC_SAMR_OBJ)"
  
  
@@ -90666,7 +90913,7 @@
  $as_echo_n "checking how to build rpc_rpcecho... " >&6; }
  	if test "$MODULE_rpc_rpcecho"; then
  		DEST=$MODULE_rpc_rpcecho
-@@ -85104,12 +36076,10 @@
+@@ -85199,12 +36023,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -90681,7 +90928,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules rpc_rpcecho"
-@@ -85120,11 +36090,11 @@
+@@ -85215,11 +36037,11 @@
  		RPC_STATIC="$RPC_STATIC \$(RPC_ECHO_OBJ)"
  
  
@@ -90695,7 +90942,7 @@
  $as_echo "not" >&6; }
  	fi
  
-@@ -85145,7 +36115,7 @@
+@@ -85240,7 +36062,7 @@
  
  
  
@@ -90704,7 +90951,7 @@
  $as_echo_n "checking how to build idmap_ldap... " >&6; }
  	if test "$MODULE_idmap_ldap"; then
  		DEST=$MODULE_idmap_ldap
-@@ -85157,12 +36127,10 @@
+@@ -85252,12 +36074,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -90719,7 +90966,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules idmap_ldap"
-@@ -85173,16 +36141,16 @@
+@@ -85268,16 +36088,16 @@
  		IDMAP_STATIC="$IDMAP_STATIC winbindd/idmap_ldap.o"
  
  
@@ -90739,7 +90986,7 @@
  $as_echo_n "checking how to build idmap_tdb... " >&6; }
  	if test "$MODULE_idmap_tdb"; then
  		DEST=$MODULE_idmap_tdb
-@@ -85194,12 +36162,10 @@
+@@ -85289,12 +36109,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -90754,7 +91001,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules idmap_tdb"
-@@ -85210,16 +36176,16 @@
+@@ -85305,16 +36123,16 @@
  		IDMAP_STATIC="$IDMAP_STATIC winbindd/idmap_tdb.o"
  
  
@@ -90774,7 +91021,7 @@
  $as_echo_n "checking how to build idmap_tdb2... " >&6; }
  	if test "$MODULE_idmap_tdb2"; then
  		DEST=$MODULE_idmap_tdb2
-@@ -85231,12 +36197,10 @@
+@@ -85326,12 +36144,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -90789,7 +91036,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules idmap_tdb2"
-@@ -85247,16 +36211,16 @@
+@@ -85342,16 +36158,16 @@
  		IDMAP_STATIC="$IDMAP_STATIC winbindd/idmap_tdb2.o"
  
  
@@ -90809,7 +91056,7 @@
  $as_echo_n "checking how to build idmap_passdb... " >&6; }
  	if test "$MODULE_idmap_passdb"; then
  		DEST=$MODULE_idmap_passdb
-@@ -85268,12 +36232,10 @@
+@@ -85363,12 +36179,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -90824,7 +91071,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules idmap_passdb"
-@@ -85284,16 +36246,16 @@
+@@ -85379,16 +36193,16 @@
  		IDMAP_STATIC="$IDMAP_STATIC winbindd/idmap_passdb.o"
  
  
@@ -90844,7 +91091,7 @@
  $as_echo_n "checking how to build idmap_nss... " >&6; }
  	if test "$MODULE_idmap_nss"; then
  		DEST=$MODULE_idmap_nss
-@@ -85305,12 +36267,10 @@
+@@ -85400,12 +36214,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -90859,7 +91106,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules idmap_nss"
-@@ -85321,16 +36281,16 @@
+@@ -85416,16 +36228,16 @@
  		IDMAP_STATIC="$IDMAP_STATIC winbindd/idmap_nss.o"
  
  
@@ -90879,7 +91126,7 @@
  $as_echo_n "checking how to build idmap_rid... " >&6; }
  	if test "$MODULE_idmap_rid"; then
  		DEST=$MODULE_idmap_rid
-@@ -85342,12 +36302,10 @@
+@@ -85437,12 +36249,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -90894,7 +91141,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules idmap_rid"
-@@ -85358,16 +36316,16 @@
+@@ -85453,16 +36263,16 @@
  		IDMAP_STATIC="$IDMAP_STATIC winbindd/idmap_rid.o"
  
  
@@ -90914,7 +91161,7 @@
  $as_echo_n "checking how to build idmap_ad... " >&6; }
  	if test "$MODULE_idmap_ad"; then
  		DEST=$MODULE_idmap_ad
-@@ -85379,12 +36337,10 @@
+@@ -85474,12 +36284,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -90929,7 +91176,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules idmap_ad"
-@@ -85395,16 +36351,16 @@
+@@ -85490,16 +36298,16 @@
  		IDMAP_STATIC="$IDMAP_STATIC winbindd/idmap_ad.o"
  
  
@@ -90949,7 +91196,7 @@
  $as_echo_n "checking how to build idmap_hash... " >&6; }
  	if test "$MODULE_idmap_hash"; then
  		DEST=$MODULE_idmap_hash
-@@ -85416,12 +36372,10 @@
+@@ -85511,12 +36319,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -90964,7 +91211,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules idmap_hash"
-@@ -85432,16 +36386,16 @@
+@@ -85527,16 +36333,16 @@
  		IDMAP_STATIC="$IDMAP_STATIC \$(IDMAP_HASH_OBJ)"
  
  
@@ -90984,7 +91231,7 @@
  $as_echo_n "checking how to build idmap_adex... " >&6; }
  	if test "$MODULE_idmap_adex"; then
  		DEST=$MODULE_idmap_adex
-@@ -85453,12 +36407,10 @@
+@@ -85548,12 +36354,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -90999,7 +91246,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules idmap_adex"
-@@ -85469,11 +36421,11 @@
+@@ -85564,11 +36368,11 @@
  		IDMAP_STATIC="$IDMAP_STATIC \$(IDMAP_ADEX_OBJ)"
  
  
@@ -91013,7 +91260,7 @@
  $as_echo "not" >&6; }
  	fi
  
-@@ -85494,7 +36446,7 @@
+@@ -85589,7 +36393,7 @@
  
  
  
@@ -91022,7 +91269,7 @@
  $as_echo_n "checking how to build nss_info_template... " >&6; }
  	if test "$MODULE_nss_info_template"; then
  		DEST=$MODULE_nss_info_template
-@@ -85506,12 +36458,10 @@
+@@ -85601,12 +36405,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -91037,7 +91284,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules nss_info_template"
-@@ -85522,11 +36472,11 @@
+@@ -85617,11 +36419,11 @@
  		NSS_INFO_STATIC="$NSS_INFO_STATIC winbindd/nss_info_template.o"
  
  
@@ -91051,7 +91298,7 @@
  $as_echo "not" >&6; }
  	fi
  
-@@ -85547,7 +36497,7 @@
+@@ -85642,7 +36444,7 @@
  
  
  
@@ -91060,7 +91307,7 @@
  $as_echo_n "checking how to build charset_weird... " >&6; }
  	if test "$MODULE_charset_weird"; then
  		DEST=$MODULE_charset_weird
-@@ -85559,12 +36509,10 @@
+@@ -85654,12 +36456,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -91075,7 +91322,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules charset_weird"
-@@ -85575,16 +36523,16 @@
+@@ -85670,16 +36470,16 @@
  		CHARSET_STATIC="$CHARSET_STATIC modules/weird.o"
  
  
@@ -91095,7 +91342,7 @@
  $as_echo_n "checking how to build charset_CP850... " >&6; }
  	if test "$MODULE_charset_CP850"; then
  		DEST=$MODULE_charset_CP850
-@@ -85596,12 +36544,10 @@
+@@ -85691,12 +36491,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -91110,7 +91357,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules charset_CP850"
-@@ -85612,16 +36558,16 @@
+@@ -85707,16 +36505,16 @@
  		CHARSET_STATIC="$CHARSET_STATIC modules/CP850.o"
  
  
@@ -91130,7 +91377,7 @@
  $as_echo_n "checking how to build charset_CP437... " >&6; }
  	if test "$MODULE_charset_CP437"; then
  		DEST=$MODULE_charset_CP437
-@@ -85633,12 +36579,10 @@
+@@ -85728,12 +36526,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -91145,7 +91392,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules charset_CP437"
-@@ -85649,16 +36593,16 @@
+@@ -85744,16 +36540,16 @@
  		CHARSET_STATIC="$CHARSET_STATIC modules/CP437.o"
  
  
@@ -91165,7 +91412,7 @@
  $as_echo_n "checking how to build charset_macosxfs... " >&6; }
  	if test "$MODULE_charset_macosxfs"; then
  		DEST=$MODULE_charset_macosxfs
-@@ -85670,12 +36614,10 @@
+@@ -85765,12 +36561,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -91180,7 +91427,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules charset_macosxfs"
-@@ -85686,11 +36628,11 @@
+@@ -85781,11 +36575,11 @@
  		CHARSET_STATIC="$CHARSET_STATIC modules/charset_macosxfs.o"
  
  
@@ -91194,7 +91441,7 @@
  $as_echo "not" >&6; }
  	fi
  
-@@ -85711,7 +36653,7 @@
+@@ -85806,7 +36600,7 @@
  
  
  
@@ -91203,7 +91450,7 @@
  $as_echo_n "checking how to build auth_sam... " >&6; }
  	if test "$MODULE_auth_sam"; then
  		DEST=$MODULE_auth_sam
-@@ -85723,12 +36665,10 @@
+@@ -85818,12 +36612,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -91218,7 +91465,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules auth_sam"
-@@ -85739,16 +36679,16 @@
+@@ -85834,16 +36626,16 @@
  		AUTH_STATIC="$AUTH_STATIC \$(AUTH_SAM_OBJ)"
  
  
@@ -91238,7 +91485,7 @@
  $as_echo_n "checking how to build auth_unix... " >&6; }
  	if test "$MODULE_auth_unix"; then
  		DEST=$MODULE_auth_unix
-@@ -85760,12 +36700,10 @@
+@@ -85855,12 +36647,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -91253,7 +91500,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules auth_unix"
-@@ -85776,16 +36714,16 @@
+@@ -85871,16 +36661,16 @@
  		AUTH_STATIC="$AUTH_STATIC \$(AUTH_UNIX_OBJ)"
  
  
@@ -91273,7 +91520,7 @@
  $as_echo_n "checking how to build auth_winbind... " >&6; }
  	if test "$MODULE_auth_winbind"; then
  		DEST=$MODULE_auth_winbind
-@@ -85797,12 +36735,10 @@
+@@ -85892,12 +36682,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -91288,7 +91535,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules auth_winbind"
-@@ -85813,16 +36749,16 @@
+@@ -85908,16 +36696,16 @@
  		AUTH_STATIC="$AUTH_STATIC \$(AUTH_WINBIND_OBJ)"
  
  
@@ -91308,7 +91555,7 @@
  $as_echo_n "checking how to build auth_wbc... " >&6; }
  	if test "$MODULE_auth_wbc"; then
  		DEST=$MODULE_auth_wbc
-@@ -85834,12 +36770,10 @@
+@@ -85929,12 +36717,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -91323,7 +91570,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules auth_wbc"
-@@ -85850,16 +36784,16 @@
+@@ -85945,16 +36731,16 @@
  		AUTH_STATIC="$AUTH_STATIC \$(AUTH_WBC_OBJ)"
  
  
@@ -91343,7 +91590,7 @@
  $as_echo_n "checking how to build auth_server... " >&6; }
  	if test "$MODULE_auth_server"; then
  		DEST=$MODULE_auth_server
-@@ -85871,12 +36805,10 @@
+@@ -85966,12 +36752,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -91358,7 +91605,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules auth_server"
-@@ -85887,16 +36819,16 @@
+@@ -85982,16 +36766,16 @@
  		AUTH_STATIC="$AUTH_STATIC \$(AUTH_SERVER_OBJ)"
  
  
@@ -91378,7 +91625,7 @@
  $as_echo_n "checking how to build auth_domain... " >&6; }
  	if test "$MODULE_auth_domain"; then
  		DEST=$MODULE_auth_domain
-@@ -85908,12 +36840,10 @@
+@@ -86003,12 +36787,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -91393,7 +91640,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules auth_domain"
-@@ -85924,16 +36854,16 @@
+@@ -86019,16 +36801,16 @@
  		AUTH_STATIC="$AUTH_STATIC \$(AUTH_DOMAIN_OBJ)"
  
  
@@ -91413,7 +91660,7 @@
  $as_echo_n "checking how to build auth_builtin... " >&6; }
  	if test "$MODULE_auth_builtin"; then
  		DEST=$MODULE_auth_builtin
-@@ -85945,12 +36875,10 @@
+@@ -86040,12 +36822,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -91428,7 +91675,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules auth_builtin"
-@@ -85961,16 +36889,16 @@
+@@ -86056,16 +36836,16 @@
  		AUTH_STATIC="$AUTH_STATIC \$(AUTH_BUILTIN_OBJ)"
  
  
@@ -91448,7 +91695,7 @@
  $as_echo_n "checking how to build auth_script... " >&6; }
  	if test "$MODULE_auth_script"; then
  		DEST=$MODULE_auth_script
-@@ -85982,12 +36910,10 @@
+@@ -86077,12 +36857,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -91463,7 +91710,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules auth_script"
-@@ -85998,16 +36924,16 @@
+@@ -86093,16 +36871,16 @@
  		AUTH_STATIC="$AUTH_STATIC \$(AUTH_SCRIPT_OBJ)"
  
  
@@ -91483,7 +91730,7 @@
  $as_echo_n "checking how to build auth_netlogond... " >&6; }
  	if test "$MODULE_auth_netlogond"; then
  		DEST=$MODULE_auth_netlogond
-@@ -86019,12 +36945,10 @@
+@@ -86114,12 +36892,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -91498,7 +91745,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules auth_netlogond"
-@@ -86035,11 +36959,11 @@
+@@ -86130,11 +36906,11 @@
  		AUTH_STATIC="$AUTH_STATIC \$(AUTH_NETLOGOND_OBJ)"
  
  
@@ -91512,7 +91759,7 @@
  $as_echo "not" >&6; }
  	fi
  
-@@ -86060,7 +36984,7 @@
+@@ -86155,7 +36931,7 @@
  
  
  
@@ -91521,7 +91768,7 @@
  $as_echo_n "checking how to build vfs_default... " >&6; }
  	if test "$MODULE_vfs_default"; then
  		DEST=$MODULE_vfs_default
-@@ -86072,12 +36996,10 @@
+@@ -86167,12 +36943,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -91536,7 +91783,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_default"
-@@ -86088,16 +37010,16 @@
+@@ -86183,16 +36957,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_DEFAULT_OBJ)"
  
  
@@ -91556,7 +91803,7 @@
  $as_echo_n "checking how to build vfs_recycle... " >&6; }
  	if test "$MODULE_vfs_recycle"; then
  		DEST=$MODULE_vfs_recycle
-@@ -86109,12 +37031,10 @@
+@@ -86204,12 +36978,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -91571,7 +91818,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_recycle"
-@@ -86125,16 +37045,16 @@
+@@ -86220,16 +36992,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_RECYCLE_OBJ)"
  
  
@@ -91591,7 +91838,7 @@
  $as_echo_n "checking how to build vfs_audit... " >&6; }
  	if test "$MODULE_vfs_audit"; then
  		DEST=$MODULE_vfs_audit
-@@ -86146,12 +37066,10 @@
+@@ -86241,12 +37013,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -91606,7 +91853,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_audit"
-@@ -86162,16 +37080,16 @@
+@@ -86257,16 +37027,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_AUDIT_OBJ)"
  
  
@@ -91626,7 +91873,7 @@
  $as_echo_n "checking how to build vfs_extd_audit... " >&6; }
  	if test "$MODULE_vfs_extd_audit"; then
  		DEST=$MODULE_vfs_extd_audit
-@@ -86183,12 +37101,10 @@
+@@ -86278,12 +37048,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -91641,7 +91888,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_extd_audit"
-@@ -86199,16 +37115,16 @@
+@@ -86294,16 +37062,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_EXTD_AUDIT_OBJ)"
  
  
@@ -91661,7 +91908,7 @@
  $as_echo_n "checking how to build vfs_full_audit... " >&6; }
  	if test "$MODULE_vfs_full_audit"; then
  		DEST=$MODULE_vfs_full_audit
-@@ -86220,12 +37136,10 @@
+@@ -86315,12 +37083,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -91676,7 +91923,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_full_audit"
-@@ -86236,16 +37150,16 @@
+@@ -86331,16 +37097,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_FULL_AUDIT_OBJ)"
  
  
@@ -91696,7 +91943,7 @@
  $as_echo_n "checking how to build vfs_netatalk... " >&6; }
  	if test "$MODULE_vfs_netatalk"; then
  		DEST=$MODULE_vfs_netatalk
-@@ -86257,12 +37171,10 @@
+@@ -86352,12 +37118,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -91711,7 +91958,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_netatalk"
-@@ -86273,16 +37185,16 @@
+@@ -86368,16 +37132,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_NETATALK_OBJ)"
  
  
@@ -91731,7 +91978,7 @@
  $as_echo_n "checking how to build vfs_fake_perms... " >&6; }
  	if test "$MODULE_vfs_fake_perms"; then
  		DEST=$MODULE_vfs_fake_perms
-@@ -86294,12 +37206,10 @@
+@@ -86389,12 +37153,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -91746,7 +91993,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_fake_perms"
-@@ -86310,16 +37220,16 @@
+@@ -86405,16 +37167,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_FAKE_PERMS_OBJ)"
  
  
@@ -91766,7 +92013,7 @@
  $as_echo_n "checking how to build vfs_default_quota... " >&6; }
  	if test "$MODULE_vfs_default_quota"; then
  		DEST=$MODULE_vfs_default_quota
-@@ -86331,12 +37241,10 @@
+@@ -86426,12 +37188,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -91781,7 +92028,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_default_quota"
-@@ -86347,16 +37255,16 @@
+@@ -86442,16 +37202,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_DEFAULT_QUOTA_OBJ)"
  
  
@@ -91801,7 +92048,7 @@
  $as_echo_n "checking how to build vfs_readonly... " >&6; }
  	if test "$MODULE_vfs_readonly"; then
  		DEST=$MODULE_vfs_readonly
-@@ -86368,12 +37276,10 @@
+@@ -86463,12 +37223,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -91816,7 +92063,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_readonly"
-@@ -86384,16 +37290,16 @@
+@@ -86479,16 +37237,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_READONLY_OBJ)"
  
  
@@ -91836,7 +92083,7 @@
  $as_echo_n "checking how to build vfs_cap... " >&6; }
  	if test "$MODULE_vfs_cap"; then
  		DEST=$MODULE_vfs_cap
-@@ -86405,12 +37311,10 @@
+@@ -86500,12 +37258,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -91851,7 +92098,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_cap"
-@@ -86421,16 +37325,16 @@
+@@ -86516,16 +37272,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_CAP_OBJ)"
  
  
@@ -91871,7 +92118,7 @@
  $as_echo_n "checking how to build vfs_expand_msdfs... " >&6; }
  	if test "$MODULE_vfs_expand_msdfs"; then
  		DEST=$MODULE_vfs_expand_msdfs
-@@ -86442,12 +37346,10 @@
+@@ -86537,12 +37293,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -91886,7 +92133,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_expand_msdfs"
-@@ -86458,16 +37360,16 @@
+@@ -86553,16 +37307,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_EXPAND_MSDFS_OBJ)"
  
  
@@ -91906,7 +92153,7 @@
  $as_echo_n "checking how to build vfs_shadow_copy... " >&6; }
  	if test "$MODULE_vfs_shadow_copy"; then
  		DEST=$MODULE_vfs_shadow_copy
-@@ -86479,12 +37381,10 @@
+@@ -86574,12 +37328,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -91921,7 +92168,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_shadow_copy"
-@@ -86495,16 +37395,16 @@
+@@ -86590,16 +37342,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_SHADOW_COPY_OBJ)"
  
  
@@ -91941,7 +92188,7 @@
  $as_echo_n "checking how to build vfs_shadow_copy2... " >&6; }
  	if test "$MODULE_vfs_shadow_copy2"; then
  		DEST=$MODULE_vfs_shadow_copy2
-@@ -86516,12 +37416,10 @@
+@@ -86611,12 +37363,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -91956,7 +92203,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_shadow_copy2"
-@@ -86532,16 +37430,16 @@
+@@ -86627,16 +37377,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_SHADOW_COPY2_OBJ)"
  
  
@@ -91976,7 +92223,7 @@
  $as_echo_n "checking how to build vfs_afsacl... " >&6; }
  	if test "$MODULE_vfs_afsacl"; then
  		DEST=$MODULE_vfs_afsacl
-@@ -86553,12 +37451,10 @@
+@@ -86648,12 +37398,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -91991,7 +92238,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_afsacl"
-@@ -86569,16 +37465,16 @@
+@@ -86664,16 +37412,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_AFSACL_OBJ)"
  
  
@@ -92011,7 +92258,7 @@
  $as_echo_n "checking how to build vfs_xattr_tdb... " >&6; }
  	if test "$MODULE_vfs_xattr_tdb"; then
  		DEST=$MODULE_vfs_xattr_tdb
-@@ -86590,12 +37486,10 @@
+@@ -86685,12 +37433,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -92026,7 +92273,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_xattr_tdb"
-@@ -86606,16 +37500,16 @@
+@@ -86701,16 +37447,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_XATTR_TDB_OBJ)"
  
  
@@ -92046,7 +92293,7 @@
  $as_echo_n "checking how to build vfs_posixacl... " >&6; }
  	if test "$MODULE_vfs_posixacl"; then
  		DEST=$MODULE_vfs_posixacl
-@@ -86627,12 +37521,10 @@
+@@ -86722,12 +37468,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -92061,7 +92308,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_posixacl"
-@@ -86643,16 +37535,16 @@
+@@ -86738,16 +37482,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_POSIXACL_OBJ)"
  
  
@@ -92081,7 +92328,7 @@
  $as_echo_n "checking how to build vfs_aixacl... " >&6; }
  	if test "$MODULE_vfs_aixacl"; then
  		DEST=$MODULE_vfs_aixacl
-@@ -86664,12 +37556,10 @@
+@@ -86759,12 +37503,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -92096,7 +92343,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_aixacl"
-@@ -86680,16 +37570,16 @@
+@@ -86775,16 +37517,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_AIXACL_OBJ)"
  
  
@@ -92116,7 +92363,7 @@
  $as_echo_n "checking how to build vfs_aixacl2... " >&6; }
  	if test "$MODULE_vfs_aixacl2"; then
  		DEST=$MODULE_vfs_aixacl2
-@@ -86701,12 +37591,10 @@
+@@ -86796,12 +37538,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -92131,7 +92378,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_aixacl2"
-@@ -86717,16 +37605,16 @@
+@@ -86812,16 +37552,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_AIXACL2_OBJ)"
  
  
@@ -92151,7 +92398,7 @@
  $as_echo_n "checking how to build vfs_solarisacl... " >&6; }
  	if test "$MODULE_vfs_solarisacl"; then
  		DEST=$MODULE_vfs_solarisacl
-@@ -86738,12 +37626,10 @@
+@@ -86833,12 +37573,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -92166,7 +92413,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_solarisacl"
-@@ -86754,16 +37640,16 @@
+@@ -86849,16 +37587,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_SOLARISACL_OBJ)"
  
  
@@ -92186,7 +92433,7 @@
  $as_echo_n "checking how to build vfs_irixacl... " >&6; }
  	if test "$MODULE_vfs_irixacl"; then
  		DEST=$MODULE_vfs_irixacl
-@@ -86775,12 +37661,10 @@
+@@ -86870,12 +37608,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -92201,7 +92448,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_irixacl"
-@@ -86791,16 +37675,16 @@
+@@ -86886,16 +37622,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_IRIXACL_OBJ)"
  
  
@@ -92221,7 +92468,7 @@
  $as_echo_n "checking how to build vfs_hpuxacl... " >&6; }
  	if test "$MODULE_vfs_hpuxacl"; then
  		DEST=$MODULE_vfs_hpuxacl
-@@ -86812,12 +37696,10 @@
+@@ -86907,12 +37643,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -92236,7 +92483,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_hpuxacl"
-@@ -86828,16 +37710,16 @@
+@@ -86923,16 +37657,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_HPUXACL_OBJ)"
  
  
@@ -92256,7 +92503,7 @@
  $as_echo_n "checking how to build vfs_tru64acl... " >&6; }
  	if test "$MODULE_vfs_tru64acl"; then
  		DEST=$MODULE_vfs_tru64acl
-@@ -86849,12 +37731,10 @@
+@@ -86944,12 +37678,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -92271,7 +92518,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_tru64acl"
-@@ -86865,16 +37745,16 @@
+@@ -86960,16 +37692,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_TRU64ACL_OBJ)"
  
  
@@ -92291,7 +92538,7 @@
  $as_echo_n "checking how to build vfs_catia... " >&6; }
  	if test "$MODULE_vfs_catia"; then
  		DEST=$MODULE_vfs_catia
-@@ -86886,12 +37766,10 @@
+@@ -86981,12 +37713,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -92306,7 +92553,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_catia"
-@@ -86902,16 +37780,16 @@
+@@ -86997,16 +37727,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_CATIA_OBJ)"
  
  
@@ -92326,7 +92573,7 @@
  $as_echo_n "checking how to build vfs_streams_xattr... " >&6; }
  	if test "$MODULE_vfs_streams_xattr"; then
  		DEST=$MODULE_vfs_streams_xattr
-@@ -86923,12 +37801,10 @@
+@@ -87018,12 +37748,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -92341,7 +92588,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_streams_xattr"
-@@ -86939,16 +37815,16 @@
+@@ -87034,16 +37762,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_STREAMS_XATTR_OBJ)"
  
  
@@ -92361,7 +92608,7 @@
  $as_echo_n "checking how to build vfs_streams_depot... " >&6; }
  	if test "$MODULE_vfs_streams_depot"; then
  		DEST=$MODULE_vfs_streams_depot
-@@ -86960,12 +37836,10 @@
+@@ -87055,12 +37783,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -92376,7 +92623,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_streams_depot"
-@@ -86976,16 +37850,16 @@
+@@ -87071,16 +37797,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_STREAMS_DEPOT_OBJ)"
  
  
@@ -92396,7 +92643,7 @@
  $as_echo_n "checking how to build vfs_cacheprime... " >&6; }
  	if test "$MODULE_vfs_cacheprime"; then
  		DEST=$MODULE_vfs_cacheprime
-@@ -86997,12 +37871,10 @@
+@@ -87092,12 +37818,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -92411,7 +92658,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_cacheprime"
-@@ -87013,16 +37885,16 @@
+@@ -87108,16 +37832,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_CACHEPRIME_OBJ)"
  
  
@@ -92431,7 +92678,7 @@
  $as_echo_n "checking how to build vfs_prealloc... " >&6; }
  	if test "$MODULE_vfs_prealloc"; then
  		DEST=$MODULE_vfs_prealloc
-@@ -87034,12 +37906,10 @@
+@@ -87129,12 +37853,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -92446,7 +92693,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_prealloc"
-@@ -87050,16 +37920,16 @@
+@@ -87145,16 +37867,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_PREALLOC_OBJ)"
  
  
@@ -92466,7 +92713,7 @@
  $as_echo_n "checking how to build vfs_commit... " >&6; }
  	if test "$MODULE_vfs_commit"; then
  		DEST=$MODULE_vfs_commit
-@@ -87071,12 +37941,10 @@
+@@ -87166,12 +37888,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -92481,7 +92728,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_commit"
-@@ -87087,16 +37955,16 @@
+@@ -87182,16 +37902,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_COMMIT_OBJ)"
  
  
@@ -92501,7 +92748,7 @@
  $as_echo_n "checking how to build vfs_gpfs... " >&6; }
  	if test "$MODULE_vfs_gpfs"; then
  		DEST=$MODULE_vfs_gpfs
-@@ -87108,12 +37976,10 @@
+@@ -87203,12 +37923,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -92516,7 +92763,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_gpfs"
-@@ -87124,16 +37990,16 @@
+@@ -87219,16 +37937,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_GPFS_OBJ)"
  
  
@@ -92536,7 +92783,7 @@
  $as_echo_n "checking how to build vfs_readahead... " >&6; }
  	if test "$MODULE_vfs_readahead"; then
  		DEST=$MODULE_vfs_readahead
-@@ -87145,12 +38011,10 @@
+@@ -87240,12 +37958,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -92551,7 +92798,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_readahead"
-@@ -87161,16 +38025,16 @@
+@@ -87256,16 +37972,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_READAHEAD_OBJ)"
  
  
@@ -92571,7 +92818,7 @@
  $as_echo_n "checking how to build vfs_tsmsm... " >&6; }
  	if test "$MODULE_vfs_tsmsm"; then
  		DEST=$MODULE_vfs_tsmsm
-@@ -87182,12 +38046,10 @@
+@@ -87277,12 +37993,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -92586,7 +92833,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_tsmsm"
-@@ -87198,16 +38060,16 @@
+@@ -87293,16 +38007,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_TSMSM_OBJ)"
  
  
@@ -92606,7 +92853,7 @@
  $as_echo_n "checking how to build vfs_fileid... " >&6; }
  	if test "$MODULE_vfs_fileid"; then
  		DEST=$MODULE_vfs_fileid
-@@ -87219,12 +38081,10 @@
+@@ -87314,12 +38028,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -92621,7 +92868,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_fileid"
-@@ -87235,16 +38095,16 @@
+@@ -87330,16 +38042,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_FILEID_OBJ)"
  
  
@@ -92641,7 +92888,7 @@
  $as_echo_n "checking how to build vfs_aio_fork... " >&6; }
  	if test "$MODULE_vfs_aio_fork"; then
  		DEST=$MODULE_vfs_aio_fork
-@@ -87256,12 +38116,10 @@
+@@ -87351,12 +38063,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -92656,7 +92903,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_aio_fork"
-@@ -87272,16 +38130,16 @@
+@@ -87367,16 +38077,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_AIO_FORK_OBJ)"
  
  
@@ -92676,7 +92923,7 @@
  $as_echo_n "checking how to build vfs_preopen... " >&6; }
  	if test "$MODULE_vfs_preopen"; then
  		DEST=$MODULE_vfs_preopen
-@@ -87293,12 +38151,10 @@
+@@ -87388,12 +38098,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -92691,7 +92938,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_preopen"
-@@ -87309,16 +38165,16 @@
+@@ -87404,16 +38112,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_PREOPEN_OBJ)"
  
  
@@ -92711,7 +92958,7 @@
  $as_echo_n "checking how to build vfs_syncops... " >&6; }
  	if test "$MODULE_vfs_syncops"; then
  		DEST=$MODULE_vfs_syncops
-@@ -87330,12 +38186,10 @@
+@@ -87425,12 +38133,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -92726,7 +92973,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_syncops"
-@@ -87346,16 +38200,16 @@
+@@ -87441,16 +38147,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_SYNCOPS_OBJ)"
  
  
@@ -92746,7 +92993,7 @@
  $as_echo_n "checking how to build vfs_zfsacl... " >&6; }
  	if test "$MODULE_vfs_zfsacl"; then
  		DEST=$MODULE_vfs_zfsacl
-@@ -87367,12 +38221,10 @@
+@@ -87462,12 +38168,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -92761,7 +93008,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_zfsacl"
-@@ -87383,16 +38235,16 @@
+@@ -87478,16 +38182,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_ZFSACL_OBJ)"
  
  
@@ -92781,7 +93028,7 @@
  $as_echo_n "checking how to build vfs_notify_fam... " >&6; }
  	if test "$MODULE_vfs_notify_fam"; then
  		DEST=$MODULE_vfs_notify_fam
-@@ -87404,12 +38256,10 @@
+@@ -87499,12 +38203,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -92796,7 +93043,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_notify_fam"
-@@ -87420,16 +38270,16 @@
+@@ -87515,16 +38217,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_NOTIFY_FAM_OBJ)"
  
  
@@ -92816,7 +93063,7 @@
  $as_echo_n "checking how to build vfs_acl_xattr... " >&6; }
  	if test "$MODULE_vfs_acl_xattr"; then
  		DEST=$MODULE_vfs_acl_xattr
-@@ -87441,12 +38291,10 @@
+@@ -87536,12 +38238,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -92831,7 +93078,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_acl_xattr"
-@@ -87457,16 +38305,16 @@
+@@ -87552,16 +38252,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_ACL_XATTR_OBJ)"
  
  
@@ -92851,7 +93098,7 @@
  $as_echo_n "checking how to build vfs_acl_tdb... " >&6; }
  	if test "$MODULE_vfs_acl_tdb"; then
  		DEST=$MODULE_vfs_acl_tdb
-@@ -87478,12 +38326,10 @@
+@@ -87573,12 +38273,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -92866,7 +93113,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_acl_tdb"
-@@ -87494,16 +38340,16 @@
+@@ -87589,16 +38287,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_ACL_TDB_OBJ)"
  
  
@@ -92886,7 +93133,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
-@@ -87515,12 +38361,10 @@
+@@ -87610,12 +38308,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -92901,7 +93148,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_smb_traffic_analyzer"
-@@ -87531,16 +38375,16 @@
+@@ -87626,16 +38322,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_SMB_TRAFFIC_ANALYZER_OBJ)"
  
  
@@ -92921,7 +93168,7 @@
  $as_echo_n "checking how to build vfs_onefs... " >&6; }
  	if test "$MODULE_vfs_onefs"; then
  		DEST=$MODULE_vfs_onefs
-@@ -87552,12 +38396,10 @@
+@@ -87647,12 +38343,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -92936,7 +93183,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_onefs"
-@@ -87568,16 +38410,16 @@
+@@ -87663,16 +38357,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_ONEFS)"
  
  
@@ -92956,7 +93203,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
-@@ -87589,12 +38431,10 @@
+@@ -87684,12 +38378,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -92971,7 +93218,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_onefs_shadow_copy"
-@@ -87605,16 +38445,16 @@
+@@ -87700,16 +38392,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_ONEFS_SHADOW_COPY)"
  
  
@@ -92991,7 +93238,7 @@
  $as_echo_n "checking how to build vfs_dirsort... " >&6; }
  	if test "$MODULE_vfs_dirsort"; then
  		DEST=$MODULE_vfs_dirsort
-@@ -87626,12 +38466,10 @@
+@@ -87721,12 +38413,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -93006,7 +93253,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_dirsort"
-@@ -87642,16 +38480,16 @@
+@@ -87737,16 +38427,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_DIRSORT_OBJ)"
  
  
@@ -93026,7 +93273,7 @@
  $as_echo_n "checking how to build vfs_scannedonly... " >&6; }
  	if test "$MODULE_vfs_scannedonly"; then
  		DEST=$MODULE_vfs_scannedonly
-@@ -87663,12 +38501,10 @@
+@@ -87758,12 +38448,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -93041,7 +93288,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_scannedonly"
-@@ -87679,11 +38515,11 @@
+@@ -87774,11 +38462,11 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_SCANNEDONLY_OBJ)"
  
  
@@ -93055,7 +93302,7 @@
  $as_echo "not" >&6; }
  	fi
  
-@@ -87705,7 +38541,7 @@
+@@ -87800,7 +38488,7 @@
  
  
  
@@ -93064,7 +93311,7 @@
  $as_echo_n "checking how to build perfcount_onefs... " >&6; }
  	if test "$MODULE_perfcount_onefs"; then
  		DEST=$MODULE_perfcount_onefs
-@@ -87717,12 +38553,10 @@
+@@ -87812,12 +38500,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -93079,7 +93326,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules perfcount_onefs"
-@@ -87733,16 +38567,16 @@
+@@ -87828,16 +38514,16 @@
  		PERFCOUNT_STATIC="$PERFCOUNT_STATIC \$(PERFCOUNT_ONEFS)"
  
  
@@ -93099,7 +93346,7 @@
  $as_echo_n "checking how to build perfcount_test... " >&6; }
  	if test "$MODULE_perfcount_test"; then
  		DEST=$MODULE_perfcount_test
-@@ -87754,12 +38588,10 @@
+@@ -87849,12 +38535,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -93114,7 +93361,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules perfcount_test"
-@@ -87770,11 +38602,11 @@
+@@ -87865,11 +38549,11 @@
  		PERFCOUNT_STATIC="$PERFCOUNT_STATIC \$(PERFCOUNT_TEST)"
  
  
@@ -93128,7 +93375,7 @@
  $as_echo "not" >&6; }
  	fi
  
-@@ -87795,7 +38627,7 @@
+@@ -87890,7 +38574,7 @@
  
  
  
@@ -93137,7 +93384,7 @@
  $as_echo_n "checking how to build gpext_registry... " >&6; }
  	if test "$MODULE_gpext_registry"; then
  		DEST=$MODULE_gpext_registry
-@@ -87807,12 +38639,10 @@
+@@ -87902,12 +38586,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -93152,7 +93399,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules gpext_registry"
-@@ -87823,16 +38653,16 @@
+@@ -87918,16 +38600,16 @@
  		GPEXT_STATIC="$GPEXT_STATIC libgpo/gpext/registry.o"
  
  
@@ -93172,7 +93419,7 @@
  $as_echo_n "checking how to build gpext_scripts... " >&6; }
  	if test "$MODULE_gpext_scripts"; then
  		DEST=$MODULE_gpext_scripts
-@@ -87844,12 +38674,10 @@
+@@ -87939,12 +38621,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -93187,7 +93434,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules gpext_scripts"
-@@ -87860,16 +38688,16 @@
+@@ -87955,16 +38635,16 @@
  		GPEXT_STATIC="$GPEXT_STATIC libgpo/gpext/scripts.o"
  
  
@@ -93207,7 +93454,7 @@
  $as_echo_n "checking how to build gpext_security... " >&6; }
  	if test "$MODULE_gpext_security"; then
  		DEST=$MODULE_gpext_security
-@@ -87881,12 +38709,10 @@
+@@ -87976,12 +38656,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -93222,7 +93469,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules gpext_security"
-@@ -87897,11 +38723,11 @@
+@@ -87992,11 +38670,11 @@
  		GPEXT_STATIC="$GPEXT_STATIC libgpo/gpext/security.o"
  
  
@@ -93236,7 +93483,7 @@
  $as_echo "not" >&6; }
  	fi
  
-@@ -87937,18 +38763,16 @@
+@@ -88032,18 +38710,16 @@
  #################################################
  # If run from the build farm, enable NASTY hacks
  #################################################
@@ -93259,7 +93506,7 @@
  $as_echo "no" >&6; }
  fi
  
-@@ -87965,11 +38789,11 @@
+@@ -88060,11 +38736,11 @@
      rt_signal_lease_works=yes
      rt_signal_aio_works=yes
  
@@ -93274,7 +93521,7 @@
  $as_echo "cross" >&6; }
  
  	    # cross compiling, I hope you know what you are doing
-@@ -87977,11 +38801,7 @@
+@@ -88072,11 +38748,7 @@
  
  
  else
@@ -93287,7 +93534,7 @@
  /* end confdefs.h.  */
  
  #include <sys/types.h>
-@@ -88040,41 +38860,16 @@
+@@ -88135,41 +38807,16 @@
  }
  
  _ACEOF
@@ -93333,7 +93580,7 @@
  /* end confdefs.h.  */
  
  int
-@@ -88085,61 +38880,31 @@
+@@ -88180,61 +38827,31 @@
    return 0;
  }
  _ACEOF
@@ -93402,7 +93649,7 @@
  $as_echo "no" >&6; }
  	    case "$ac_status" in
  		1|11|101|111)  rt_signal_lease_ok=no ;;
-@@ -88153,13 +38918,9 @@
+@@ -88248,13 +38865,9 @@
  
  	    # no RT_SIGNAL bug, we are golden
  
@@ -93418,7 +93665,7 @@
  /* end confdefs.h.  */
  
  int
-@@ -88170,65 +38931,39 @@
+@@ -88265,65 +38878,39 @@
    return 0;
  }
  _ACEOF
@@ -93493,18 +93740,18 @@
    enableval=$enable_merged_build;  enable_merged_build=$enableval
  else
     enable_merged_build=auto
-@@ -88237,9 +38972,7 @@
+@@ -88332,9 +38919,7 @@
  
  if test x"$enable_merged_build" = x"yes" -a \
  	x"$merged_build_possible" = x"no" ; then
 -	{ { $as_echo "$as_me:$LINENO: error: Merged build required but not possible" >&5
 -$as_echo "$as_me: error: Merged build required but not possible" >&2;}
 -   { (exit 1); exit 1; }; }
-+	as_fn_error "Merged build required but not possible" "$LINENO" 5
++	as_fn_error $? "Merged build required but not possible" "$LINENO" 5
  fi
  
  
-@@ -88262,9 +38995,9 @@
+@@ -88357,9 +38942,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
@@ -93516,7 +93763,7 @@
    $as_echo_n "(cached) " >&6
  else
    case $PYTHON in
-@@ -88277,14 +39010,14 @@
+@@ -88372,14 +38957,14 @@
  do
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
@@ -93534,7 +93781,7 @@
  IFS=$as_save_IFS
  
    ;;
-@@ -88292,10 +39025,10 @@
+@@ -88387,10 +38972,10 @@
  fi
  PYTHON=$ac_cv_path_PYTHON
  if test -n "$PYTHON"; then
@@ -93547,7 +93794,7 @@
  $as_echo "no" >&6; }
  fi
  
-@@ -88306,9 +39039,9 @@
+@@ -88401,9 +38986,9 @@
  	else
  		# Extract the first word of "python[$PYTHON_VER]", so it can be a program name with args.
  set dummy python$PYTHON_VER; ac_word=$2
@@ -93559,7 +93806,7 @@
    $as_echo_n "(cached) " >&6
  else
    case $PYTHON in
-@@ -88321,14 +39054,14 @@
+@@ -88416,14 +39001,14 @@
  do
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
@@ -93577,7 +93824,7 @@
  IFS=$as_save_IFS
  
    ;;
-@@ -88336,10 +39069,10 @@
+@@ -88431,10 +39016,10 @@
  fi
  PYTHON=$ac_cv_path_PYTHON
  if test -n "$PYTHON"; then
@@ -93590,7 +93837,7 @@
  $as_echo "no" >&6; }
  fi
  
-@@ -88347,7 +39080,7 @@
+@@ -88442,7 +39027,7 @@
  	fi
  	if test -z "$PYTHON"; then
  		working_python=no
@@ -93599,7 +93846,7 @@
  $as_echo "$as_me: WARNING: No python found" >&2;}
  	fi
  
-@@ -88358,9 +39091,9 @@
+@@ -88453,9 +39038,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
@@ -93611,7 +93858,7 @@
    $as_echo_n "(cached) " >&6
  else
    case $PYTHON_CONFIG in
-@@ -88373,14 +39106,14 @@
+@@ -88468,14 +39053,14 @@
  do
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
@@ -93629,7 +93876,7 @@
  IFS=$as_save_IFS
  
    ;;
-@@ -88388,10 +39121,10 @@
+@@ -88483,10 +39068,10 @@
  fi
  PYTHON_CONFIG=$ac_cv_path_PYTHON_CONFIG
  if test -n "$PYTHON_CONFIG"; then
@@ -93642,7 +93889,7 @@
  $as_echo "no" >&6; }
  fi
  
-@@ -88402,9 +39135,9 @@
+@@ -88497,9 +39082,9 @@
  	else
  		# Extract the first word of "python[$PYTHON_VER]-config", so it can be a program name with args.
  set dummy python$PYTHON_VER-config; ac_word=$2
@@ -93654,7 +93901,7 @@
    $as_echo_n "(cached) " >&6
  else
    case $PYTHON_CONFIG in
-@@ -88417,14 +39150,14 @@
+@@ -88512,14 +39097,14 @@
  do
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
@@ -93672,7 +93919,7 @@
  IFS=$as_save_IFS
  
    ;;
-@@ -88432,10 +39165,10 @@
+@@ -88527,10 +39112,10 @@
  fi
  PYTHON_CONFIG=$ac_cv_path_PYTHON_CONFIG
  if test -n "$PYTHON_CONFIG"; then
@@ -93685,7 +93932,7 @@
  $as_echo "no" >&6; }
  fi
  
-@@ -88443,7 +39176,7 @@
+@@ -88538,7 +39123,7 @@
  	fi
  
  	if test -z "$PYTHON_CONFIG"; then
@@ -93694,7 +93941,7 @@
  $as_echo "$as_me: WARNING: No python-config found" >&2;}
  	else
  
-@@ -88453,11 +39186,7 @@
+@@ -88548,11 +39133,7 @@
  		LIBS="$LIBS `$PYTHON_CONFIG --ldflags`"
  		CFLAGS="$CFLAGS `$PYTHON_CONFIG --includes`"
  
@@ -93707,7 +93954,7 @@
  /* end confdefs.h.  */
  
                                  #undef HAVE_UINTPTR_T
-@@ -88474,42 +39203,15 @@
+@@ -88569,42 +39150,15 @@
    return 0;
  }
  _ACEOF
@@ -93753,7 +94000,7 @@
  		LIBS="$ac_save_LIBS"
  		CFLAGS="$ac_save_CFLAGS"
  	fi
-@@ -88521,11 +39223,7 @@
+@@ -88616,11 +39170,7 @@
  		LIBS="$LIBS `$PYTHON_CONFIG --ldflags`"
  		CFLAGS="$CFLAGS `$PYTHON_CONFIG --cflags`"
  
@@ -93766,7 +94013,7 @@
  /* end confdefs.h.  */
  
                                  #undef HAVE_UINTPTR_T
-@@ -88542,42 +39240,15 @@
+@@ -88637,42 +39187,15 @@
    return 0;
  }
  _ACEOF
@@ -93812,7 +94059,7 @@
  		LIBS="$ac_save_LIBS"
  		CFLAGS="$ac_save_CFLAGS"
  	fi
-@@ -88592,11 +39263,7 @@
+@@ -88687,11 +39210,7 @@
  		LIBS="$LIBS `echo -n -L${base}/lib " "; $PYTHON_CONFIG --ldflags`"
  		CFLAGS="$CFLAGS `$PYTHON_CONFIG --includes`"
  
@@ -93825,7 +94072,7 @@
  /* end confdefs.h.  */
  
                                  #undef HAVE_UINTPTR_T
-@@ -88613,42 +39280,15 @@
+@@ -88708,42 +39227,15 @@
    return 0;
  }
  _ACEOF
@@ -93871,7 +94118,7 @@
  		LIBS="$ac_save_LIBS"
  		CFLAGS="$ac_save_CFLAGS"
  	fi
-@@ -88660,11 +39300,7 @@
+@@ -88755,11 +39247,7 @@
  		LIBS="$LIBS `echo -n -L${base}/lib " "; $PYTHON_CONFIG --ldflags`"
  		CFLAGS="$CFLAGS `$PYTHON_CONFIG --cflags`"
  
@@ -93884,7 +94131,7 @@
  /* end confdefs.h.  */
  
                                  #undef HAVE_UINTPTR_T
-@@ -88681,42 +39317,15 @@
+@@ -88776,42 +39264,15 @@
    return 0;
  }
  _ACEOF
@@ -93930,7 +94177,7 @@
  		LIBS="$ac_save_LIBS"
  		CFLAGS="$ac_save_CFLAGS"
  	fi
-@@ -88746,11 +39355,7 @@
+@@ -88841,11 +39302,7 @@
  		LIBS="$LIBS $DISTUTILS_LDFLAGS"
  		CFLAGS="$CFLAGS $DISTUTILS_CFLAGS"
  
@@ -93943,7 +94190,7 @@
  /* end confdefs.h.  */
  
                                  #undef HAVE_UINTPTR_T
-@@ -88767,64 +39372,37 @@
+@@ -88862,64 +39319,37 @@
    return 0;
  }
  _ACEOF
@@ -94016,7 +94263,7 @@
  $as_echo "$merged_build_possible" >&6; }
  
  	# Enable merged build automatically if possible, when in developer mode
-@@ -88880,9 +39458,9 @@
+@@ -88975,9 +39405,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
@@ -94028,7 +94275,7 @@
    $as_echo_n "(cached) " >&6
  else
    case $PYTHON in
-@@ -88895,14 +39473,14 @@
+@@ -88990,14 +39420,14 @@
  do
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
@@ -94046,7 +94293,7 @@
  IFS=$as_save_IFS
  
    ;;
-@@ -88910,10 +39488,10 @@
+@@ -89005,10 +39435,10 @@
  fi
  PYTHON=$ac_cv_path_PYTHON
  if test -n "$PYTHON"; then
@@ -94059,7 +94306,7 @@
  $as_echo "no" >&6; }
  fi
  
-@@ -88924,9 +39502,9 @@
+@@ -89019,9 +39449,9 @@
  	else
  		# Extract the first word of "python[$PYTHON_VER]", so it can be a program name with args.
  set dummy python$PYTHON_VER; ac_word=$2
@@ -94071,7 +94318,7 @@
    $as_echo_n "(cached) " >&6
  else
    case $PYTHON in
-@@ -88939,14 +39517,14 @@
+@@ -89034,14 +39464,14 @@
  do
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
@@ -94089,7 +94336,7 @@
  IFS=$as_save_IFS
  
    ;;
-@@ -88954,10 +39532,10 @@
+@@ -89049,10 +39479,10 @@
  fi
  PYTHON=$ac_cv_path_PYTHON
  if test -n "$PYTHON"; then
@@ -94102,7 +94349,7 @@
  $as_echo "no" >&6; }
  fi
  
-@@ -88965,7 +39543,7 @@
+@@ -89060,7 +39490,7 @@
  	fi
  	if test -z "$PYTHON"; then
  		working_python=no
@@ -94111,7 +94358,7 @@
  $as_echo "$as_me: WARNING: No python found" >&2;}
  	fi
  
-@@ -88976,9 +39554,9 @@
+@@ -89071,9 +39501,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
@@ -94123,7 +94370,7 @@
    $as_echo_n "(cached) " >&6
  else
    case $PYTHON_CONFIG in
-@@ -88991,14 +39569,14 @@
+@@ -89086,14 +39516,14 @@
  do
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
@@ -94141,7 +94388,7 @@
  IFS=$as_save_IFS
  
    ;;
-@@ -89006,10 +39584,10 @@
+@@ -89101,10 +39531,10 @@
  fi
  PYTHON_CONFIG=$ac_cv_path_PYTHON_CONFIG
  if test -n "$PYTHON_CONFIG"; then
@@ -94154,7 +94401,7 @@
  $as_echo "no" >&6; }
  fi
  
-@@ -89020,9 +39598,9 @@
+@@ -89115,9 +39545,9 @@
  	else
  		# Extract the first word of "python[$PYTHON_VER]-config", so it can be a program name with args.
  set dummy python$PYTHON_VER-config; ac_word=$2
@@ -94166,7 +94413,7 @@
    $as_echo_n "(cached) " >&6
  else
    case $PYTHON_CONFIG in
-@@ -89035,14 +39613,14 @@
+@@ -89130,14 +39560,14 @@
  do
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
@@ -94184,7 +94431,7 @@
  IFS=$as_save_IFS
  
    ;;
-@@ -89050,10 +39628,10 @@
+@@ -89145,10 +39575,10 @@
  fi
  PYTHON_CONFIG=$ac_cv_path_PYTHON_CONFIG
  if test -n "$PYTHON_CONFIG"; then
@@ -94197,7 +94444,7 @@
  $as_echo "no" >&6; }
  fi
  
-@@ -89061,7 +39639,7 @@
+@@ -89156,7 +39586,7 @@
  	fi
  
  	if test -z "$PYTHON_CONFIG"; then
@@ -94206,7 +94453,7 @@
  $as_echo "$as_me: WARNING: No python-config found" >&2;}
  	else
  
-@@ -89071,11 +39649,7 @@
+@@ -89166,11 +39596,7 @@
  		LIBS="$LIBS `$PYTHON_CONFIG --ldflags`"
  		CFLAGS="$CFLAGS `$PYTHON_CONFIG --includes`"
  
@@ -94219,7 +94466,7 @@
  /* end confdefs.h.  */
  
                                  #undef HAVE_UINTPTR_T
-@@ -89092,42 +39666,15 @@
+@@ -89187,42 +39613,15 @@
    return 0;
  }
  _ACEOF
@@ -94265,7 +94512,7 @@
  		LIBS="$ac_save_LIBS"
  		CFLAGS="$ac_save_CFLAGS"
  	fi
-@@ -89139,11 +39686,7 @@
+@@ -89234,11 +39633,7 @@
  		LIBS="$LIBS `$PYTHON_CONFIG --ldflags`"
  		CFLAGS="$CFLAGS `$PYTHON_CONFIG --cflags`"
  
@@ -94278,10 +94525,11 @@
  /* end confdefs.h.  */
  
                                  #undef HAVE_UINTPTR_T
-@@ -89160,42 +39703,15 @@
+@@ -89254,43 +39649,16 @@
+   ;
    return 0;
  }
- _ACEOF
+-_ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -94303,17 +94551,21 @@
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
+-
+-				PYTHON_LDFLAGS="`$PYTHON_CONFIG --ldflags`"
+-				PYTHON_CFLAGS="`$PYTHON_CONFIG --cflags`"
+-				working_python=yes
+-
+-else
+-  $as_echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
++_ACEOF
 +if ac_fn_c_try_link "$LINENO"; then :
  
- 				PYTHON_LDFLAGS="`$PYTHON_CONFIG --ldflags`"
- 				PYTHON_CFLAGS="`$PYTHON_CONFIG --cflags`"
- 				working_python=yes
++				PYTHON_LDFLAGS="`$PYTHON_CONFIG --ldflags`"
++				PYTHON_CFLAGS="`$PYTHON_CONFIG --cflags`"
++				working_python=yes
  
--else
--  $as_echo "$as_me: failed program was:" >&5
--sed 's/^/| /' conftest.$ac_ext >&5
--
--
  fi
 -
 -rm -rf conftest.dSYM
@@ -94324,7 +94576,7 @@
  		LIBS="$ac_save_LIBS"
  		CFLAGS="$ac_save_CFLAGS"
  	fi
-@@ -89210,11 +39726,7 @@
+@@ -89305,11 +39673,7 @@
  		LIBS="$LIBS `echo -n -L${base}/lib " "; $PYTHON_CONFIG --ldflags`"
  		CFLAGS="$CFLAGS `$PYTHON_CONFIG --includes`"
  
@@ -94337,7 +94589,7 @@
  /* end confdefs.h.  */
  
                                  #undef HAVE_UINTPTR_T
-@@ -89231,42 +39743,15 @@
+@@ -89326,42 +39690,15 @@
    return 0;
  }
  _ACEOF
@@ -94383,7 +94635,7 @@
  		LIBS="$ac_save_LIBS"
  		CFLAGS="$ac_save_CFLAGS"
  	fi
-@@ -89278,11 +39763,7 @@
+@@ -89373,11 +39710,7 @@
  		LIBS="$LIBS `echo -n -L${base}/lib " "; $PYTHON_CONFIG --ldflags`"
  		CFLAGS="$CFLAGS `$PYTHON_CONFIG --cflags`"
  
@@ -94396,7 +94648,7 @@
  /* end confdefs.h.  */
  
                                  #undef HAVE_UINTPTR_T
-@@ -89299,42 +39780,15 @@
+@@ -89394,42 +39727,15 @@
    return 0;
  }
  _ACEOF
@@ -94442,7 +94694,7 @@
  		LIBS="$ac_save_LIBS"
  		CFLAGS="$ac_save_CFLAGS"
  	fi
-@@ -89364,11 +39818,7 @@
+@@ -89459,11 +39765,7 @@
  		LIBS="$LIBS $DISTUTILS_LDFLAGS"
  		CFLAGS="$CFLAGS $DISTUTILS_CFLAGS"
  
@@ -94455,7 +94707,7 @@
  /* end confdefs.h.  */
  
                                  #undef HAVE_UINTPTR_T
-@@ -89385,52 +39835,25 @@
+@@ -89480,52 +39782,25 @@
    return 0;
  }
  _ACEOF
@@ -94513,7 +94765,7 @@
  $as_echo "yes" >&6; }
  
  
-@@ -89458,20 +39881,18 @@
+@@ -89553,20 +39828,18 @@
  
  
  	else
@@ -94524,7 +94776,7 @@
 -{ { $as_echo "$as_me:$LINENO: error: Python not found. Please install Python 2.x and its development headers/libraries." >&5
 -$as_echo "$as_me: error: Python not found. Please install Python 2.x and its development headers/libraries." >&2;}
 -   { (exit 1); exit 1; }; }
-+as_fn_error "Python not found. Please install Python 2.x and its development headers/libraries." "$LINENO" 5
++as_fn_error $? "Python not found. Please install Python 2.x and its development headers/libraries." "$LINENO" 5
  
  	fi
  
@@ -94538,93 +94790,26 @@
  $as_echo "$pythondir" >&6; }
  
  
-@@ -89486,553 +39907,133 @@
+@@ -89651,161 +39924,21 @@
  
+ EXTERNAL_READLINE=no
+ # test for where we get readline() from
+-{ $as_echo "$as_me:$LINENO: checking whether to use readline" >&5
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use readline" >&5
+ $as_echo_n "checking whether to use readline... " >&6; }
  
- 
--	MAKE_SETTINGS="$MAKE_SETTINGS
--LIBREPLACE_EXT_ENABLE =
--"
--SMB_INFO_ENABLES="$SMB_INFO_ENABLES
--\$enabled{\"LIBREPLACE_EXT\"} = \"\";"
--
--
--
--MAKE_SETTINGS="$MAKE_SETTINGS
--LIBREPLACE_NETWORK_LIBS = ${LIBREPLACE_NETWORK_LIBS}
--LIBREPLACE_NETWORK_CFLAGS =
--LIBREPLACE_NETWORK_CPPFLAGS =
--LIBREPLACE_NETWORK_LDFLAGS =
--"
--
--
--
--	MAKE_SETTINGS="$MAKE_SETTINGS
--LIBREPLACE_NETWORK_ENABLE =
--"
--SMB_INFO_ENABLES="$SMB_INFO_ENABLES
--\$enabled{\"LIBREPLACE_NETWORK\"} = \"\";"
--
--
--
--MAKE_SETTINGS="$MAKE_SETTINGS
--LIBREPLACE_CFLAGS = -I../lib/replace
--LIBREPLACE_ENABLE = YES
--LIBREPLACE_OBJ_FILES = ${LIBREPLACE_OBJS}
--"
--
--SMB_INFO_SUBSYSTEMS="$SMB_INFO_SUBSYSTEMS
--###################################
--# Start Subsystem LIBREPLACE
--[SUBSYSTEM::LIBREPLACE]
--PRIVATE_DEPENDENCIES = LIBREPLACE_EXT LIBREPLACE_NETWORK
--CFLAGS = \$(LIBREPLACE_CFLAGS)
--ENABLE = YES
--# End Subsystem LIBREPLACE
--###################################
--"
--
--
--LIBREPLACE_HOSTCC_OBJS=`echo ${LIBREPLACE_OBJS} |sed -e 's/\.o/\.ho/g'`
--
--
--MAKE_SETTINGS="$MAKE_SETTINGS
--LIBREPLACE_HOSTCC_CFLAGS = -I../lib/replace
--LIBREPLACE_HOSTCC_ENABLE = YES
--LIBREPLACE_HOSTCC_OBJ_FILES = ${LIBREPLACE_HOSTCC_OBJS}
--"
--
--SMB_INFO_SUBSYSTEMS="$SMB_INFO_SUBSYSTEMS
--###################################
--# Start Subsystem LIBREPLACE_HOSTCC
--[SUBSYSTEM::LIBREPLACE_HOSTCC]
--PRIVATE_DEPENDENCIES =
--CFLAGS = \$(LIBREPLACE_HOSTCC_CFLAGS)
--ENABLE = YES
--# End Subsystem LIBREPLACE_HOSTCC
--###################################
--"
--
--
--###############################################
--# Readline included by default unless explicitly asked not to
--test "${with_readline+set}" != "set" && with_readline=yes
--
--EXTERNAL_READLINE=no
--# test for where we get readline() from
--{ $as_echo "$as_me:$LINENO: checking whether to use readline" >&5
--$as_echo_n "checking whether to use readline... " >&6; }
--
--# Check whether --with-readline was given.
+ # Check whether --with-readline was given.
 -if test "${with_readline+set}" = set; then
--  withval=$with_readline;   case "$with_readline" in
--  yes)
++if test "${with_readline+set}" = set; then :
+   withval=$with_readline;   case "$with_readline" in
+   yes)
 -    { $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; }
+ 
 -
 -
 -
--
 -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`
@@ -94762,31 +94947,24 @@
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
 -$as_echo "$ac_res" >&6; }
-+	MAKE_SETTINGS="$MAKE_SETTINGS
-+LIBREPLACE_EXT_ENABLE =
-+"
-+SMB_INFO_ENABLES="$SMB_INFO_ENABLES
-+\$enabled{\"LIBREPLACE_EXT\"} = \"\";"
- 
+-
 -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 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"
++if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+   cat >>confdefs.h <<_ACEOF
+ #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+ _ACEOF
+@@ -89814,151 +39947,12 @@
  
--fi
+ done
  
--done
-+MAKE_SETTINGS="$MAKE_SETTINGS
-+LIBREPLACE_NETWORK_LIBS = ${LIBREPLACE_NETWORK_LIBS}
-+LIBREPLACE_NETWORK_CFLAGS =
-+LIBREPLACE_NETWORK_CPPFLAGS =
-+LIBREPLACE_NETWORK_LDFLAGS =
-+"
- 
- 
+-
 -for ac_header in readline/history.h
 -do
 -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
@@ -94835,19 +95013,14 @@
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
- 
+-
 -	ac_header_compiler=no
 -fi
-+	MAKE_SETTINGS="$MAKE_SETTINGS
-+LIBREPLACE_NETWORK_ENABLE =
-+"
-+SMB_INFO_ENABLES="$SMB_INFO_ENABLES
-+\$enabled{\"LIBREPLACE_NETWORK\"} = \"\";"
- 
+-
 -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; }
@@ -94880,29 +95053,14 @@
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
- 
+-
 -  ac_header_preproc=no
 -fi
-+MAKE_SETTINGS="$MAKE_SETTINGS
-+LIBREPLACE_CFLAGS = -I../lib/replace
-+LIBREPLACE_ENABLE = YES
-+LIBREPLACE_OBJ_FILES = ${LIBREPLACE_OBJS}
-+"
- 
+-
 -rm -f conftest.err conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
 -$as_echo "$ac_header_preproc" >&6; }
-+SMB_INFO_SUBSYSTEMS="$SMB_INFO_SUBSYSTEMS
-+###################################
-+# Start Subsystem LIBREPLACE
-+[SUBSYSTEM::LIBREPLACE]
-+PRIVATE_DEPENDENCIES = LIBREPLACE_EXT LIBREPLACE_NETWORK
-+CFLAGS = \$(LIBREPLACE_CFLAGS)
-+ENABLE = YES
-+# End Subsystem LIBREPLACE
-+###################################
-+"
- 
+-
 -# So?  What about this header?
 -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
 -  yes:no: )
@@ -94944,41 +95102,27 @@
 -		 $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
++    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 `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
--_ACEOF
-+LIBREPLACE_HOSTCC_OBJS=`echo ${LIBREPLACE_OBJS} |sed -e 's/\.o/\.ho/g'`
++#define HAVE_READLINE_HISTORY_H 1
+ _ACEOF
  
--fi
+ fi
+@@ -89966,168 +39960,25 @@
+ done
  
--done
-+MAKE_SETTINGS="$MAKE_SETTINGS
-+LIBREPLACE_HOSTCC_CFLAGS = -I../lib/replace
-+LIBREPLACE_HOSTCC_ENABLE = YES
-+LIBREPLACE_HOSTCC_OBJ_FILES = ${LIBREPLACE_HOSTCC_OBJS}
-+"
  
-+SMB_INFO_SUBSYSTEMS="$SMB_INFO_SUBSYSTEMS
-+###################################
-+# Start Subsystem LIBREPLACE_HOSTCC
-+[SUBSYSTEM::LIBREPLACE_HOSTCC]
-+PRIVATE_DEPENDENCIES =
-+CFLAGS = \$(LIBREPLACE_HOSTCC_CFLAGS)
-+ENABLE = YES
-+# End Subsystem LIBREPLACE_HOSTCC
-+###################################
-+"
- 
- 
-+###############################################
-+# Readline included by default unless explicitly asked not to
-+test "${with_readline+set}" != "set" && with_readline=yes
- 
+-
+-
 -for ac_header in readline.h readline/readline.h
 -do
 -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
@@ -95004,27 +95148,7 @@
 -/* end confdefs.h.  */
 -$ac_includes_default
 -#include <$ac_header>
-+EXTERNAL_READLINE=no
-+# test for where we get readline() from
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use readline" >&5
-+$as_echo_n "checking whether to use readline... " >&6; }
-+
-+# Check whether --with-readline was given.
-+if test "${with_readline+set}" = set; then :
-+  withval=$with_readline;   case "$with_readline" in
-+  yes)
-+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-+$as_echo "yes" >&6; }
-+
-+    for ac_header in readline.h history.h readline/readline.h
-+do :
-+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-+eval as_val=\$$as_ac_Header
-+   if test "x$as_val" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
- _ACEOF
+-_ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -95047,15 +95171,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; }
@@ -95066,13 +95189,7 @@
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
 -#include <$ac_header>
-+    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
+-_ACEOF
 -if { (ac_try="$ac_cpp conftest.$ac_ext"
 -case "(($ac_try" in
 -  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -95094,15 +95211,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: )
@@ -95144,7 +95260,7 @@
 -		 $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"'`
@@ -95153,8 +95269,7 @@
 +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 eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
@@ -95165,7 +95280,7 @@
 +{ $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
-+if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
++if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
    $as_echo_n "(cached) " >&6
  else
    ac_check_lib_save_LIBS=$LIBS
@@ -95179,7 +95294,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -90050,63 +40051,32 @@
+@@ -90145,63 +39996,31 @@
    return 0;
  }
  _ACEOF
@@ -95230,8 +95345,7 @@
 -as_val=`eval 'as_val=${'$as_ac_Lib'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+eval as_val=\$$as_ac_Lib
-+   if test "x$as_val" = x""yes; then :
++if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
    TERMLIBS="-l${termlib}"; break
  fi
  
@@ -95254,7 +95368,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -90124,43 +40094,18 @@
+@@ -90219,43 +40038,18 @@
    return 0;
  }
  _ACEOF
@@ -95304,7 +95418,7 @@
    TERMLIBS="-lreadline $TERMLIBS"
         EXTERNAL_READLINE=yes
         break
-@@ -90174,11 +40119,11 @@
+@@ -90269,11 +40063,11 @@
  
      ;;
    no)
@@ -95318,7 +95432,7 @@
  $as_echo "yes" >&6; }
  
      # Needed for AC_CHECK_HEADERS and AC_CHECK_LIB to look at
-@@ -90190,151 +40135,12 @@
+@@ -90285,151 +40079,11 @@
      LDFLAGS="-L$with_readline/lib $LDFLAGS"
      CPPFLAGS="-I$with_readline/include $CPPFLAGS"
  
@@ -95471,12 +95585,11 @@
 +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 eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
-@@ -90343,151 +40149,12 @@
+@@ -90438,151 +40092,12 @@
  
  done
  
@@ -95633,7 +95746,7 @@
  _ACEOF
  
  fi
-@@ -90495,168 +40162,26 @@
+@@ -90590,168 +40105,25 @@
  done
  
  
@@ -95785,8 +95898,7 @@
 +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 eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
@@ -95797,7 +95909,7 @@
 +{ $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
-+if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
++if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
    $as_echo_n "(cached) " >&6
  else
    ac_check_lib_save_LIBS=$LIBS
@@ -95811,7 +95923,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -90674,63 +40199,32 @@
+@@ -90769,63 +40141,31 @@
    return 0;
  }
  _ACEOF
@@ -95862,8 +95974,7 @@
 -as_val=`eval 'as_val=${'$as_ac_Lib'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+eval as_val=\$$as_ac_Lib
-+   if test "x$as_val" = x""yes; then :
++if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
    TERMLIBS="-l${termlib}"; break
  fi
  
@@ -95886,10 +95997,18 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -90748,43 +40242,18 @@
-   return 0;
- }
- _ACEOF
+@@ -90835,51 +40175,26 @@
+ extern "C"
+ #endif
+ char rl_callback_handler_install ();
+-int
+-main ()
+-{
+-return rl_callback_handler_install ();
+-  ;
+-  return 0;
+-}
+-_ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -95911,6 +96030,14 @@
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
++int
++main ()
++{
++return rl_callback_handler_install ();
++  ;
++  return 0;
++}
++_ACEOF
 +if ac_fn_c_try_link "$LINENO"; then :
    ac_cv_lib_readline_rl_callback_handler_install=yes
  else
@@ -95936,7 +96063,7 @@
    TERMLDFLAGS="-L$with_readline/lib"
         TERMCPPFLAGS="-I$with_readline/include"
         LDFLAGS="-L$with_readline/lib $LDFLAGS"
-@@ -90804,7 +40273,7 @@
+@@ -90899,7 +40214,7 @@
      ;;
    esac
  else
@@ -95945,7 +96072,7 @@
  $as_echo "no" >&6; }
  
  fi
-@@ -90813,18 +40282,14 @@
+@@ -90908,18 +40223,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.
@@ -95967,15 +96094,10 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -90837,142 +40302,53 @@
- int
- main ()
- {
--return rl_completion_matches ();
--  ;
--  return 0;
--}
--_ACEOF
+@@ -90937,137 +40248,48 @@
+   return 0;
+ }
+ _ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -95997,31 +96119,38 @@
 -	 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
@@ -96034,10 +96163,11 @@
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
 -
--    #include <stdio.h>
--    #include <readline/readline.h>
++ac_fn_c_check_decl "$LINENO" "rl_event_hook" "ac_cv_have_decl_rl_event_hook" "
+     #include <stdio.h>
+     #include <readline/readline.h>
+ 
 -
--
 -int
 -main ()
 -{
@@ -96068,61 +96198,38 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_cv_have_decl_rl_event_hook=yes
-+return rl_completion_matches ();
-+  ;
-+  return 0;
-+}
-+_ACEOF
-+if ac_fn_c_try_link "$LINENO"; then :
-+  ac_cv_lib_readline_rl_completion_matches=yes
++"
++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
- fi
+-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
++  ac_have_decl=0
  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: $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 :
  
--cat >>confdefs.h <<_ACEOF
+ cat >>confdefs.h <<_ACEOF
 -#define HAVE_DECL_RL_EVENT_HOOK 1
 -_ACEOF
-+$as_echo "#define HAVE_NEW_LIBREADLINE 1" >>confdefs.h
- 
-+fi
- 
+-
+-
 -else
 -  cat >>confdefs.h <<_ACEOF
 -#define HAVE_DECL_RL_EVENT_HOOK 0
--_ACEOF
- 
-+# not all readline libs have rl_event_hook or history_list
-+ac_fn_c_check_decl "$LINENO" "rl_event_hook" "ac_cv_have_decl_rl_event_hook" "
-+    #include <stdio.h>
-+    #include <readline/readline.h>
- 
-+"
-+if test "x$ac_cv_have_decl_rl_event_hook" = x""yes; then :
-+  ac_have_decl=1
-+else
-+  ac_have_decl=0
- fi
- 
-+cat >>confdefs.h <<_ACEOF
 +#define HAVE_DECL_RL_EVENT_HOOK $ac_have_decl
-+_ACEOF
+ _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; }
@@ -96141,7 +96248,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -90990,60 +40366,31 @@
+@@ -91085,60 +40307,31 @@
    return 0;
  }
  _ACEOF
@@ -96212,7 +96319,7 @@
  
  
  MAKE_SETTINGS="$MAKE_SETTINGS
-@@ -91098,7 +40445,7 @@
+@@ -91193,7 +40386,7 @@
  ###################################
  "
  
@@ -96221,7 +96328,7 @@
  $as_echo "no" >&6; }
  fi
  
-@@ -91107,102 +40454,9 @@
+@@ -91202,102 +40395,9 @@
  
  
  
@@ -96326,7 +96433,7 @@
  else
  
  cat >>confdefs.h <<_ACEOF
-@@ -91211,102 +40465,9 @@
+@@ -91306,102 +40406,9 @@
  
  fi
  
@@ -96431,7 +96538,7 @@
  else
  
  cat >>confdefs.h <<_ACEOF
-@@ -91316,151 +40477,12 @@
+@@ -91411,151 +40418,12 @@
  fi
  
  
@@ -96587,7 +96694,7 @@
  _ACEOF
  
  else
-@@ -91470,151 +40492,12 @@
+@@ -91565,151 +40433,12 @@
  done
  
  
@@ -96743,7 +96850,7 @@
  _ACEOF
  
  else
-@@ -91624,29 +40507,6 @@
+@@ -91719,29 +40448,6 @@
  done
  
  
@@ -96773,7 +96880,7 @@
  for ac_header in 				\
  	crypt.h					\
  	curses.h				\
-@@ -91672,147 +40532,11 @@
+@@ -91767,147 +40473,10 @@
  	netinet6/in6.h				\
  	libintl.h
  
@@ -96921,12 +97028,11 @@
 +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 eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
-@@ -91822,42 +40546,6 @@
+@@ -91917,42 +40486,6 @@
  done
  
  
@@ -96969,10 +97075,23 @@
  for ac_func in 				\
  	atexit					\
  	cgetent					\
-@@ -91890,271 +40578,65 @@
- 	warn					\
- 	errx					\
- 	warnx					\
+@@ -91972,117 +40505,29 @@
+ 	strncasecmp				\
+ 	strptime				\
+ 	strsep					\
+-	strsep_copy				\
+-	strtok_r				\
+-	strupr					\
+-	swab					\
+-	umask					\
+-	uname					\
+-	unsetenv				\
+-	closefrom				\
+-	hstrerror				\
+-	err					\
+-	warn					\
+-	errx					\
+-	warnx					\
 -	flock					\
 -	getipnodebyname				\
 -	getipnodebyaddr				\
@@ -97059,7 +97178,25 @@
 -
 -	eval "$as_ac_var=no"
 -fi
--
++	strsep_copy				\
++	strtok_r				\
++	strupr					\
++	swab					\
++	umask					\
++	uname					\
++	unsetenv				\
++	closefrom				\
++	hstrerror				\
++	err					\
++	warn					\
++	errx					\
++	warnx					\
++	flock					\
++	getipnodebyname				\
++	getipnodebyaddr				\
++	freehostent				\
++	writev
+ 
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
@@ -97071,39 +97208,38 @@
 -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
--
--
--
--
++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"
++if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+   cat >>confdefs.h <<_ACEOF
+ #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+ _ACEOF
+@@ -92093,17 +40538,13 @@
+ 
+ 
+ 
 -{ $as_echo "$as_me:$LINENO: checking for bswap16" >&5
--$as_echo_n "checking for bswap16... " >&6; }
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for bswap16" >&5
+ $as_echo_n "checking for bswap16... " >&6; }
 -if test "${ac_cv_love_func_bswap16+set}" = set; then
--  $as_echo_n "(cached) " >&6
--else
--
++if test "${ac_cv_love_func_bswap16+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 ()
--{
--bswap16(0)
--  ;
--  return 0;
--}
--_ACEOF
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ #ifdef HAVE_SYS_BSWAP_H
+ #include <sys/bswap.h>
+@@ -92116,140 +40557,25 @@
+   return 0;
+ }
+ _ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -97125,49 +97261,36 @@
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
--  eval "ac_cv_love_func_bswap16=yes"
--else
++if ac_fn_c_try_link "$LINENO"; then :
+   eval "ac_cv_love_func_bswap16=yes"
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+	flock					\
-+	getipnodebyname				\
-+	getipnodebyaddr				\
-+	freehostent				\
-+	writev
- 
+-
 -	eval "ac_cv_love_func_bswap16=no"
--fi
-+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 "ac_cv_love_func_bswap16=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
  fi
-+done
  
  
--eval "ac_res=\$ac_cv_love_func_bswap16"
+ eval "ac_res=\$ac_cv_love_func_bswap16"
  
--if false; then
- 
+ if false; then
+-
 -for ac_func in bswap16
 -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 bswap16" >&5
-+$as_echo_n "checking for bswap16... " >&6; }
-+if test "${ac_cv_love_func_bswap16+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
+-  $as_echo_n "(cached) " >&6
+-else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
@@ -97190,7 +97313,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.  */
@@ -97203,21 +97326,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 ();
-+bswap16(0)
-   ;
-   return 0;
- }
- _ACEOF
+-  ;
+-  return 0;
+-}
+-_ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -97240,22 +97358,17 @@
 -	 $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_bswap16=yes"
- else
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	eval "$as_ac_var=no"
-+  eval "ac_cv_love_func_bswap16=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
-+rm -f core conftest.err conftest.$ac_objext \
-+    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
@@ -97263,11 +97376,6 @@
 -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_love_func_bswap16"
-+
-+if false; then
 +	for ac_func in bswap16
 +do :
 +  ac_fn_c_check_func "$LINENO" "bswap16" "ac_cv_func_bswap16"
@@ -97278,7 +97386,7 @@
  _ACEOF
  
  fi
-@@ -92170,11 +40652,11 @@
+@@ -92265,11 +40591,11 @@
  #define $ac_tr_func 1
  _ACEOF
  
@@ -97292,7 +97400,7 @@
  $as_echo "no" >&6; }
  	;;
  esac
-@@ -92184,17 +40666,13 @@
+@@ -92279,17 +40605,13 @@
  
  
  
@@ -97313,7 +97421,7 @@
  /* end confdefs.h.  */
  #ifdef HAVE_SYS_BSWAP_H
  #include <sys/bswap.h>
-@@ -92207,140 +40685,25 @@
+@@ -92302,140 +40624,25 @@
    return 0;
  }
  _ACEOF
@@ -97463,7 +97571,7 @@
  _ACEOF
  
  fi
-@@ -92356,11 +40719,11 @@
+@@ -92451,11 +40658,11 @@
  #define $ac_tr_func 1
  _ACEOF
  
@@ -97477,7 +97585,7 @@
  $as_echo "no" >&6; }
  	;;
  esac
-@@ -92371,25 +40734,21 @@
+@@ -92466,25 +40673,21 @@
  
  
  
@@ -97507,7 +97615,7 @@
    ac_cv_struct_winsize=yes; break
  fi
  rm -f conftest*
-@@ -92399,63 +40758,45 @@
+@@ -92494,63 +40697,45 @@
  
  if test "$ac_cv_struct_winsize" = "yes"; then
  
@@ -97582,7 +97690,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <signal.h>
-@@ -92468,35 +40809,14 @@
+@@ -92563,35 +40748,14 @@
    return 0;
  }
  _ACEOF
@@ -97621,7 +97729,7 @@
  $as_echo "$ac_cv_type_signal" >&6; }
  
  cat >>confdefs.h <<_ACEOF
-@@ -92506,9 +40826,7 @@
+@@ -92601,9 +40765,7 @@
  
  if test "$ac_cv_type_signal" = "void" ; then
  
@@ -97632,7 +97740,7 @@
  
  fi
  
-@@ -92539,18 +40857,14 @@
+@@ -92634,18 +40796,14 @@
  
  
  
@@ -97654,7 +97762,7 @@
  /* end confdefs.h.  */
  #ifdef HAVE_SYS_TYPES_H
  #include <sys/types.h>
-@@ -92567,44 +40881,15 @@
+@@ -92662,44 +40820,15 @@
    return 0;
  }
  _ACEOF
@@ -97704,7 +97812,7 @@
  /* end confdefs.h.  */
  extern int h_errno;
  int foo(void) { return h_errno; }
-@@ -92616,44 +40901,19 @@
+@@ -92711,44 +40840,19 @@
    return 0;
  }
  _ACEOF
@@ -97754,7 +97862,7 @@
  $as_echo "$ac_foo" >&6; }
  if test "$ac_foo" = yes; then
  
-@@ -92661,81 +40921,23 @@
+@@ -92756,87 +40860,26 @@
  #define HAVE_H_ERRNO 1
  _ACEOF
  
@@ -97815,15 +97923,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
@@ -97836,19 +97944,21 @@
  _ACEOF
  
 -
+ fi
+ 
+ 
 -fi
 -
 -
- fi
+-
+-
+-
  
  
-@@ -92751,151 +40953,12 @@
  
+@@ -92850,147 +40893,10 @@
  
  
--
--
--
  for ac_header in pty.h util.h libutil.h
 -do
 -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
@@ -97994,12 +98104,11 @@
 +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 eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
-@@ -92907,23 +40970,17 @@
+@@ -93002,23 +40908,17 @@
  
  
  
@@ -98026,7 +98135,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -92941,54 +40998,28 @@
+@@ -93036,54 +40936,28 @@
    return 0;
  }
  _ACEOF
@@ -98088,7 +98197,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_LIBUTIL 1
  _ACEOF
-@@ -93005,7 +41036,6 @@
+@@ -93100,7 +40974,6 @@
  fi
  
  
@@ -98096,7 +98205,7 @@
  	MAKE_SETTINGS="$MAKE_SETTINGS
  OPENPTY_ENABLE = YES
  "
-@@ -93025,23 +41055,17 @@
+@@ -93120,23 +40993,17 @@
  
  
  
@@ -98123,7 +98232,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -93059,54 +41083,28 @@
+@@ -93154,54 +41021,28 @@
    return 0;
  }
  _ACEOF
@@ -98185,7 +98294,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_LIBINTL 1
  _ACEOF
-@@ -93123,7 +41121,6 @@
+@@ -93218,7 +41059,6 @@
  fi
  
  
@@ -98193,7 +98302,7 @@
  	MAKE_SETTINGS="$MAKE_SETTINGS
  INTL_ENABLE = YES
  "
-@@ -93147,150 +41144,12 @@
+@@ -93242,150 +41082,11 @@
  
  
  
@@ -98344,12 +98453,11 @@
 +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 eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
-@@ -93300,22 +41159,9 @@
+@@ -93395,22 +41096,9 @@
  done
  
  
@@ -98374,7 +98482,7 @@
  #ifdef HAVE_SYS_TYPES_H
  #include <sys/types.h>
  #endif
-@@ -93326,46 +41172,10 @@
+@@ -93421,46 +41109,10 @@
  #include <arpa/nameser.h>
  #endif
  
@@ -98424,7 +98532,7 @@
  _ACEOF
  
  fi
-@@ -93377,9 +41187,9 @@
+@@ -93472,9 +41124,9 @@
  
  
  
@@ -98436,7 +98544,7 @@
    $as_echo_n "(cached) " >&6
  else
  
-@@ -93394,11 +41204,7 @@
+@@ -93489,174 +41141,53 @@
  		*) ac_lib="-l$ac_lib" ;;
  		esac
  		LIBS=" $ac_lib  $ac_save_LIBS"
@@ -98449,10 +98557,24 @@
  /* end confdefs.h.  */
  
  #include <stdio.h>
-@@ -93420,148 +41226,31 @@
- {
- res_search(0,0,0,0,0)
-   ;
+ #ifdef HAVE_SYS_TYPES_H
+ #include <sys/types.h>
+ #endif
+-#ifdef HAVE_NETINET_IN_H
+-#include <netinet/in.h>
+-#endif
+-#ifdef HAVE_ARPA_NAMESER_H
+-#include <arpa/nameser.h>
+-#endif
+-#ifdef HAVE_RESOLV_H
+-#include <resolv.h>
+-#endif
+-
+-int
+-main ()
+-{
+-res_search(0,0,0,0,0)
+-  ;
 -  return 0;
 -}
 -_ACEOF
@@ -98527,7 +98649,9 @@
 -# include <limits.h>
 -#else
 -# include <assert.h>
--#endif
++#ifdef HAVE_NETINET_IN_H
++#include <netinet/in.h>
+ #endif
 -
 -#undef $ac_func
 -
@@ -98536,23 +98660,28 @@
 -   builtin and then its argument prototype would still apply.  */
 -#ifdef __cplusplus
 -extern "C"
--#endif
++#ifdef HAVE_ARPA_NAMESER_H
++#include <arpa/nameser.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_RESOLV_H
++#include <resolv.h>
+ #endif
+ 
+ int
+ main ()
+ {
 -return $ac_func ();
--  ;
--  return 0;
--}
--_ACEOF
++res_search(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
@@ -98580,9 +98709,6 @@
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	eval "$as_ac_var=no"
-+  return 0;
-+}
-+_ACEOF
 +if ac_fn_c_try_link "$LINENO"; then :
 +  eval "if test -n \"$ac_lib\";then ac_cv_funclib_res_search=$ac_lib; else ac_cv_funclib_res_search=yes; fi";break
 +fi
@@ -98619,7 +98745,7 @@
  _ACEOF
  
  fi
-@@ -93581,13 +41270,13 @@
+@@ -93676,13 +41207,13 @@
  #define $ac_tr_func 1
  _ACEOF
  
@@ -98635,7 +98761,7 @@
  $as_echo "no" >&6; }
  	;;
  	*)
-@@ -93601,7 +41290,7 @@
+@@ -93696,7 +41227,7 @@
  #define $ac_tr_lib 1
  _ACEOF
  
@@ -98644,7 +98770,7 @@
  $as_echo "yes, in $ac_res" >&6; }
  	;;
  esac
-@@ -93616,9 +41305,9 @@
+@@ -93711,9 +41242,9 @@
  
  
  
@@ -98656,7 +98782,7 @@
    $as_echo_n "(cached) " >&6
  else
  
-@@ -93633,11 +41322,7 @@
+@@ -93728,11 +41259,7 @@
  		*) ac_lib="-l$ac_lib" ;;
  		esac
  		LIBS=" $ac_lib  $ac_save_LIBS"
@@ -98669,7 +98795,7 @@
  /* end confdefs.h.  */
  
  #include <stdio.h>
-@@ -93662,38 +41347,11 @@
+@@ -93757,38 +41284,11 @@
    return 0;
  }
  _ACEOF
@@ -98711,7 +98837,7 @@
  	done
  	eval "ac_cv_funclib_res_nsearch=\${ac_cv_funclib_res_nsearch-no}"
  	LIBS="$ac_save_LIBS"
-@@ -93705,102 +41363,12 @@
+@@ -93800,102 +41300,12 @@
  eval "ac_res=\$ac_cv_funclib_res_nsearch"
  
  if false; then
@@ -98819,7 +98945,7 @@
  _ACEOF
  
  fi
-@@ -93820,13 +41388,13 @@
+@@ -93915,13 +41325,13 @@
  #define $ac_tr_func 1
  _ACEOF
  
@@ -98835,7 +98961,7 @@
  $as_echo "no" >&6; }
  	;;
  	*)
-@@ -93840,7 +41408,7 @@
+@@ -93935,7 +41345,7 @@
  #define $ac_tr_lib 1
  _ACEOF
  
@@ -98844,7 +98970,7 @@
  $as_echo "yes, in $ac_res" >&6; }
  	;;
  esac
-@@ -93855,9 +41423,9 @@
+@@ -93950,9 +41360,9 @@
  
  
  
@@ -98856,7 +98982,7 @@
    $as_echo_n "(cached) " >&6
  else
  
-@@ -93872,11 +41440,7 @@
+@@ -93967,11 +41377,7 @@
  		*) ac_lib="-l$ac_lib" ;;
  		esac
  		LIBS=" $ac_lib  $ac_save_LIBS"
@@ -98869,7 +98995,7 @@
  /* end confdefs.h.  */
  
  #include <stdio.h>
-@@ -93901,38 +41465,11 @@
+@@ -93996,38 +41402,11 @@
    return 0;
  }
  _ACEOF
@@ -98911,7 +99037,7 @@
  	done
  	eval "ac_cv_funclib_res_ndestroy=\${ac_cv_funclib_res_ndestroy-no}"
  	LIBS="$ac_save_LIBS"
-@@ -93944,102 +41481,12 @@
+@@ -94039,102 +41418,12 @@
  eval "ac_res=\$ac_cv_funclib_res_ndestroy"
  
  if false; then
@@ -99019,7 +99145,7 @@
  _ACEOF
  
  fi
-@@ -94059,13 +41506,13 @@
+@@ -94154,13 +41443,13 @@
  #define $ac_tr_func 1
  _ACEOF
  
@@ -99035,7 +99161,7 @@
  $as_echo "no" >&6; }
  	;;
  	*)
-@@ -94079,7 +41526,7 @@
+@@ -94174,7 +41463,7 @@
  #define $ac_tr_lib 1
  _ACEOF
  
@@ -99044,7 +99170,7 @@
  $as_echo "yes, in $ac_res" >&6; }
  	;;
  esac
-@@ -94093,9 +41540,9 @@
+@@ -94188,9 +41477,9 @@
  
  
  
@@ -99056,7 +99182,7 @@
    $as_echo_n "(cached) " >&6
  else
  
-@@ -94110,11 +41557,7 @@
+@@ -94205,11 +41494,7 @@
  		*) ac_lib="-l$ac_lib" ;;
  		esac
  		LIBS=" $ac_lib  $ac_save_LIBS"
@@ -99069,7 +99195,7 @@
  /* end confdefs.h.  */
  
  #ifdef HAVE_DNS_H
-@@ -94129,38 +41572,11 @@
+@@ -94224,38 +41509,11 @@
    return 0;
  }
  _ACEOF
@@ -99111,7 +99237,7 @@
  	done
  	eval "ac_cv_funclib_dns_search=\${ac_cv_funclib_dns_search-no}"
  	LIBS="$ac_save_LIBS"
-@@ -94172,102 +41588,12 @@
+@@ -94267,102 +41525,12 @@
  eval "ac_res=\$ac_cv_funclib_dns_search"
  
  if false; then
@@ -99219,7 +99345,7 @@
  _ACEOF
  
  fi
-@@ -94287,13 +41613,13 @@
+@@ -94382,13 +41550,13 @@
  #define $ac_tr_func 1
  _ACEOF
  
@@ -99235,7 +99361,7 @@
  $as_echo "no" >&6; }
  	;;
  	*)
-@@ -94307,7 +41633,7 @@
+@@ -94402,7 +41570,7 @@
  #define $ac_tr_lib 1
  _ACEOF
  
@@ -99244,7 +99370,7 @@
  $as_echo "yes, in $ac_res" >&6; }
  	;;
  esac
-@@ -94319,9 +41645,9 @@
+@@ -94414,9 +41582,9 @@
  
  
  
@@ -99256,7 +99382,7 @@
    $as_echo_n "(cached) " >&6
  else
  
-@@ -94336,11 +41662,7 @@
+@@ -94431,11 +41599,7 @@
  		*) ac_lib="-l$ac_lib" ;;
  		esac
  		LIBS=" $ac_lib  $ac_save_LIBS"
@@ -99269,7 +99395,7 @@
  /* end confdefs.h.  */
  
  #include <stdio.h>
-@@ -94365,38 +41687,11 @@
+@@ -94460,38 +41624,11 @@
    return 0;
  }
  _ACEOF
@@ -99311,7 +99437,7 @@
  	done
  	eval "ac_cv_funclib_dn_expand=\${ac_cv_funclib_dn_expand-no}"
  	LIBS="$ac_save_LIBS"
-@@ -94408,102 +41703,12 @@
+@@ -94503,102 +41640,12 @@
  eval "ac_res=\$ac_cv_funclib_dn_expand"
  
  if false; then
@@ -99419,7 +99545,7 @@
  _ACEOF
  
  fi
-@@ -94523,13 +41728,13 @@
+@@ -94618,13 +41665,13 @@
  #define $ac_tr_func 1
  _ACEOF
  
@@ -99435,7 +99561,7 @@
  $as_echo "no" >&6; }
  	;;
  	*)
-@@ -94543,7 +41748,7 @@
+@@ -94638,7 +41685,7 @@
  #define $ac_tr_lib 1
  _ACEOF
  
@@ -99444,7 +99570,7 @@
  $as_echo "yes, in $ac_res" >&6; }
  	;;
  esac
-@@ -94555,18 +41760,14 @@
+@@ -94650,18 +41697,14 @@
  
  
  
@@ -99466,7 +99592,7 @@
  /* end confdefs.h.  */
  #include <stdio.h>
  #ifdef HAVE_SYS_TYPES_H
-@@ -94590,44 +41791,15 @@
+@@ -94685,44 +41728,15 @@
    return 0;
  }
  _ACEOF
@@ -99516,7 +99642,7 @@
  /* end confdefs.h.  */
  extern int _res;
  int foo(void) { return _res; }
-@@ -94639,44 +41811,19 @@
+@@ -94734,44 +41748,19 @@
    return 0;
  }
  _ACEOF
@@ -99566,7 +99692,7 @@
  $as_echo "$ac_foo" >&6; }
  if test "$ac_foo" = yes; then
  
-@@ -94684,18 +41831,7 @@
+@@ -94779,18 +41768,7 @@
  #define HAVE__RES 1
  _ACEOF
  
@@ -99586,7 +99712,7 @@
  #ifdef HAVE_SYS_TYPES_H
  #include <sys/types.h>
  #endif
-@@ -94708,64 +41844,17 @@
+@@ -94803,64 +41781,17 @@
  #ifdef HAVE_RESOLV_H
  #include <resolv.h>
  #endif
@@ -99629,15 +99755,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
@@ -99656,7 +99782,7 @@
  fi
  
  
-@@ -94831,9 +41920,9 @@
+@@ -94926,9 +41857,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
@@ -99668,7 +99794,7 @@
    $as_echo_n "(cached) " >&6
  else
    if test -n "$LEX"; then
-@@ -94844,24 +41933,24 @@
+@@ -94939,24 +41870,24 @@
  do
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
@@ -99698,7 +99824,7 @@
  $as_echo "no" >&6; }
  fi
  
-@@ -94890,20 +41979,20 @@
+@@ -94985,20 +41916,20 @@
    return ! yylex () + ! yywrap ();
  }
  _ACEOF
@@ -99726,14 +99852,14 @@
    $as_echo_n "(cached) " >&6
  else
  
-@@ -94912,19 +42001,17 @@
+@@ -95007,19 +41938,17 @@
  elif test -f lexyy.c; then
    ac_cv_prog_lex_root=lexyy
  else
 -  { { $as_echo "$as_me:$LINENO: error: cannot find output from $LEX; giving up" >&5
 -$as_echo "$as_me: error: cannot find output from $LEX; giving up" >&2;}
 -   { (exit 1); exit 1; }; }
-+  as_fn_error "cannot find output from $LEX; giving up" "$LINENO" 5
++  as_fn_error $? "cannot find output from $LEX; giving up" "$LINENO" 5
  fi
  fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_lex_root" >&5
@@ -99750,7 +99876,7 @@
    $as_echo_n "(cached) " >&6
  else
  
-@@ -94932,55 +42019,29 @@
+@@ -95027,55 +41956,29 @@
      ac_cv_lib_lex='none needed'
      for ac_lib in '' -lfl -ll; do
        LIBS="$ac_lib $ac_save_LIBS"
@@ -99814,7 +99940,7 @@
    $as_echo_n "(cached) " >&6
  else
    # POSIX says lex can declare yytext either as a pointer or an array; the
-@@ -94989,52 +42050,24 @@
+@@ -95084,52 +41987,24 @@
  ac_cv_prog_lex_yytext_pointer=no
  ac_save_LIBS=$LIBS
  LIBS="$LEXLIB $ac_save_LIBS"
@@ -99874,7 +100000,7 @@
  
  fi
  rm -f conftest.l $LEX_OUTPUT_ROOT.c
-@@ -95044,9 +42077,9 @@
+@@ -95139,9 +42014,9 @@
  if test x"$LEX_BASENAME" = x"flex"; then
  	# "flex 2.5.33"
  	FLEX_VERSION=`$LEX --version | cut -d ' ' -f2`
@@ -99886,7 +100012,7 @@
  $as_echo "$FLEX_VERSION" >&6; }
  	FLEX_MAJOR=`echo $FLEX_VERSION | cut -d '.' -f1`
  	FLEX_MINOR=`echo $FLEX_VERSION | cut -d '.' -f2`
-@@ -95059,9 +42092,9 @@
+@@ -95154,9 +42029,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
@@ -99898,7 +100024,7 @@
    $as_echo_n "(cached) " >&6
  else
    if test -n "$YACC"; then
-@@ -95072,24 +42105,24 @@
+@@ -95167,24 +42042,24 @@
  do
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
@@ -99928,7 +100054,7 @@
  $as_echo "no" >&6; }
  fi
  
-@@ -95102,9 +42135,9 @@
+@@ -95197,9 +42072,9 @@
  if test x"$YACC_BASENAME" = x"bison -y"; then
  	# bison (GNU Bison) 2.3
  	BISON_VERSION=`$YACC --version | head -1 | cut -d ' ' -f4`
@@ -99940,7 +100066,7 @@
  $as_echo "$BISON_VERSION" >&6; }
  	BISON_MAJOR=`echo $BISON_VERSION | cut -d '.' -f1`
  	BISON_MINOR=`echo $BISON_VERSION | cut -d '.' -f2`
-@@ -95112,7 +42145,7 @@
+@@ -95207,7 +42082,7 @@
  	YACC_VERSION="bison-$BISON_MAJOR.$BISON_MINOR"
  fi
  
@@ -99949,7 +100075,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
-@@ -95128,7 +42161,7 @@
+@@ -95223,7 +42098,7 @@
  	LEX=false
  	YACC=false
  fi
@@ -99958,7 +100084,7 @@
  $as_echo "$LEX_YACC" >&6; }
  
  # Portions of heimdal kerberos are unpacked into source/heimdal
-@@ -95136,21 +42169,15 @@
+@@ -95231,21 +42106,15 @@
  
  # if we ever get to using a host kerberos, we might add conditionals here
  
@@ -99983,19 +100109,10 @@
  
  HAVE_GSSAPI=YES
  
-@@ -95230,193 +42257,48 @@
- SMB_INFO_ENABLES="$SMB_INFO_ENABLES
- \$enabled{\"HEIMDAL_ROKEN_PROGNAME\"} = \"YES\";"
+@@ -95334,184 +42203,39 @@
  
--
--	MAKE_SETTINGS="$MAKE_SETTINGS
--HEIMDAL_ROKEN_PROGNAME_H_ENABLE = YES
--"
--SMB_INFO_ENABLES="$SMB_INFO_ENABLES
--\$enabled{\"HEIMDAL_ROKEN_PROGNAME_H\"} = \"YES\";"
--
--fi
--
+ fi
+ 
 -VPATH="$VPATH:\$(HEIMDAL_VPATH)"
 -
 -
@@ -100106,7 +100223,8 @@
 -rm -f conftest.err conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
 -$as_echo "$ac_header_preproc" >&6; }
--
++VPATH="$VPATH:\$(HEIMDAL_VPATH)"
+ 
 -# So?  What about this header?
 -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
 -  yes:no: )
@@ -100148,22 +100266,11 @@
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
 -$as_echo "$ac_res" >&6; }
--
-+
-+	MAKE_SETTINGS="$MAKE_SETTINGS
-+HEIMDAL_ROKEN_PROGNAME_H_ENABLE = YES
-+"
-+SMB_INFO_ENABLES="$SMB_INFO_ENABLES
-+\$enabled{\"HEIMDAL_ROKEN_PROGNAME_H\"} = \"YES\";"
-+
- fi
+ 
+-fi
 -as_val=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+
-+VPATH="$VPATH:\$(HEIMDAL_VPATH)"
-+
-+
 +$as_echo "#define SAMBA4_INTERNAL_HEIMDAL 1" >>confdefs.h
 +
 +
@@ -100205,7 +100312,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -95434,46 +42316,15 @@
+@@ -95529,46 +42253,15 @@
    return 0;
  }
  _ACEOF
@@ -100256,7 +100363,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -95491,65 +42342,32 @@
+@@ -95586,65 +42279,32 @@
    return 0;
  }
  _ACEOF
@@ -100330,7 +100437,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.  */
-@@ -95590,43 +42408,18 @@
+@@ -95685,43 +42345,18 @@
    return 0;
  }
  _ACEOF
@@ -100380,7 +100487,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_BACKTRACE 1
  _ACEOF
-@@ -95634,7 +42427,6 @@
+@@ -95729,7 +42364,6 @@
  fi
  
  
@@ -100388,7 +100495,7 @@
  if test x"$ac_cv_header_execinfo_h" = x"yes" -a x"$ac_cv_func_ext_backtrace" = x"yes";then
  
  	MAKE_SETTINGS="$MAKE_SETTINGS
-@@ -95720,102 +42512,12 @@
+@@ -95815,102 +42449,11 @@
  
  
  
@@ -100491,12 +100598,11 @@
 +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 :
++if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
  _ACEOF
-@@ -95824,102 +42526,12 @@
+@@ -95919,102 +42462,12 @@
  done
  
  
@@ -100603,7 +100709,7 @@
  _ACEOF
  
  fi
-@@ -95928,153 +42540,14 @@
+@@ -96023,153 +42476,13 @@
  
  #################################################
  # these tests are taken from the GNU fileutils package
@@ -100758,12 +100864,11 @@
 +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 eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
-@@ -96084,65 +42557,16 @@
+@@ -96179,65 +42492,16 @@
  done
  
  
@@ -100834,7 +100939,7 @@
  _ACEOF
  
  fi
-@@ -96155,19 +42579,15 @@
+@@ -96250,19 +42514,15 @@
  # Test for statvfs64.
  if test $space = no; then
    # SVR4
@@ -100858,7 +100963,7 @@
  /* end confdefs.h.  */
  
  #if defined(HAVE_UNISTD_H)
-@@ -96181,51 +42601,22 @@
+@@ -96276,51 +42536,22 @@
      exit (statvfs64 (".", &fsd));
    }
  _ACEOF
@@ -100916,7 +101021,7 @@
  
    fi
  fi
-@@ -96238,16 +42629,12 @@
+@@ -96333,16 +42564,12 @@
  # is what it gets when this test fails.
  if test $space = no; then
    # SVR4
@@ -100936,7 +101041,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <sys/statvfs.h>
-@@ -96259,64 +42646,33 @@
+@@ -96354,64 +42581,33 @@
    return 0;
  }
  _ACEOF
@@ -101010,7 +101115,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <sys/statvfs.h>
-@@ -96328,59 +42684,32 @@
+@@ -96423,59 +42619,32 @@
    return 0;
  }
  _ACEOF
@@ -101078,7 +101183,7 @@
  /* end confdefs.h.  */
  
  #include <sys/param.h>
-@@ -96393,71 +42722,38 @@
+@@ -96488,71 +42657,38 @@
      exit (statfs (".", &fsd, sizeof (struct statfs)));
    }
  _ACEOF
@@ -101160,7 +101265,7 @@
  /* end confdefs.h.  */
  
  #ifdef HAVE_SYS_PARAM_H
-@@ -96476,71 +42772,38 @@
+@@ -96571,71 +42707,38 @@
    exit (statfs (".", &fsd));
    }
  _ACEOF
@@ -101242,7 +101347,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <sys/statfs.h>
-@@ -96550,71 +42813,38 @@
+@@ -96645,71 +42748,38 @@
    exit (statfs (".", &fsd, sizeof fsd, 0));
    }
  _ACEOF
@@ -101324,7 +101429,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #ifdef HAVE_SYS_PARAM_H
-@@ -96630,71 +42860,38 @@
+@@ -96725,71 +42795,38 @@
    exit (statfs (".", &fsd));
    }
  _ACEOF
@@ -101406,7 +101511,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #ifdef HAVE_SYS_PARAM_H
-@@ -96714,201 +42911,33 @@
+@@ -96809,201 +42846,32 @@
    exit (statfs (".", &fsd) != 1);
    }
  _ACEOF
@@ -101432,8 +101537,9 @@
 -  ac_status=$?
 -  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
 -  (exit $ac_status); }; }; then
--  fu_cv_sys_stat_fs_data=yes
--else
++if ac_fn_c_try_run "$LINENO"; then :
+   fu_cv_sys_stat_fs_data=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
@@ -101593,9 +101699,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
-+if ac_fn_c_try_run "$LINENO"; then :
-+  fu_cv_sys_stat_fs_data=yes
- else
+-else
 -  eval "$as_ac_Header=\$ac_header_preproc"
 +  fu_cv_sys_stat_fs_data=no
  fi
@@ -101626,12 +101730,11 @@
 +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 eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
-@@ -96917,19 +42946,15 @@
+@@ -97012,19 +42880,15 @@
  
  done
  
@@ -101654,7 +101757,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -96947,46 +42972,15 @@
+@@ -97042,46 +42906,15 @@
    return 0;
  }
  _ACEOF
@@ -101705,7 +101808,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -97004,65 +42998,32 @@
+@@ -97099,65 +42932,32 @@
    return 0;
  }
  _ACEOF
@@ -101779,7 +101882,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.  */
-@@ -97103,50 +43064,24 @@
+@@ -97198,50 +42998,24 @@
    return 0;
  }
  _ACEOF
@@ -101836,7 +101939,7 @@
  MAKE_SETTINGS="$MAKE_SETTINGS
  XATTR_LIBS = ${XATTR_LIBS}
  XATTR_CFLAGS = ${XATTR_CFLAGS}
-@@ -97156,18 +43091,14 @@
+@@ -97251,18 +43025,14 @@
  
  
  if test x"$ac_cv_func_ext_flistxattr" = x"yes"; then
@@ -101858,7 +101961,7 @@
  /* end confdefs.h.  */
  
  	 	#include <sys/types.h>
-@@ -97190,48 +43121,23 @@
+@@ -97285,48 +43055,23 @@
    return 0;
  }
  _ACEOF
@@ -101912,7 +102015,7 @@
  
  
  	MAKE_SETTINGS="$MAKE_SETTINGS
-@@ -97243,20 +43149,16 @@
+@@ -97338,20 +43083,16 @@
  fi
  
  
@@ -101937,7 +102040,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <sys/capability.h>
-@@ -97271,117 +43173,55 @@
+@@ -97366,117 +43107,55 @@
  }
  
  _ACEOF
@@ -102071,7 +102174,7 @@
  
  fi
  
-@@ -97389,7 +43229,7 @@
+@@ -97484,7 +43163,7 @@
  INCLUDED_POPT=auto
  
  # Check whether --with-included-popt was given.
@@ -102080,7 +102183,7 @@
    withval=$with_included_popt;  INCLUDED_POPT=$withval
  fi
  
-@@ -97398,169 +43238,26 @@
+@@ -97493,169 +43172,26 @@
  
  
  if test x"$INCLUDED_POPT" != x"yes"; then
@@ -102258,7 +102361,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -97578,43 +43275,18 @@
+@@ -97673,43 +43209,18 @@
    return 0;
  }
  _ACEOF
@@ -102308,7 +102411,7 @@
     POPT_LIBS="-lpopt"
  fi
  
-@@ -97626,9 +43298,9 @@
+@@ -97721,9 +43232,9 @@
  	fi
  fi
  
@@ -102320,14 +102423,14 @@
  $as_echo "$INCLUDED_POPT" >&6; }
  if test x"$INCLUDED_POPT" != x"no"; then
  			poptdir=""
-@@ -97642,156 +43314,16 @@
+@@ -97737,156 +43248,15 @@
  		fi
  	done
          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; }; }
-+		as_fn_error "cannot find popt source in $poptpaths" "$LINENO" 5
++		as_fn_error $? "cannot find popt source in $poptpaths" "$LINENO" 5
  	fi
  	POPT_OBJ="popt.o findme.o poptconfig.o popthelp.o poptparse.o"
  
@@ -102479,12 +102582,11 @@
 +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 eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
-@@ -97830,12 +43362,10 @@
+@@ -97925,12 +43295,10 @@
  LOOK_DIRS="/usr /usr/local /sw"
  
  # Check whether --with-libiconv was given.
@@ -102495,11 +102597,11 @@
 -    { { $as_echo "$as_me:$LINENO: error: I won't take no for an answer" >&5
 -$as_echo "$as_me: error: I won't take no for an answer" >&2;}
 -   { (exit 1); exit 1; }; }
-+    as_fn_error "I won't take no for an answer" "$LINENO" 5
++    as_fn_error $? "I won't take no for an answer" "$LINENO" 5
    else
       if test "$withval" != "yes" ; then
  
-@@ -97847,26 +43377,20 @@
+@@ -97942,26 +43310,20 @@
  	LIBS=-liconv
  
  
@@ -102523,7 +102625,7 @@
 -   { (exit 1); exit 1; }; }
 +  if test "$cross_compiling" = yes; then :
 +  { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross" >&5
-+$as_echo "cross" >&6; }; as_fn_error "No iconv library found in $withval" "$LINENO" 5
++$as_echo "cross" >&6; }; as_fn_error $? "No iconv library found in $withval" "$LINENO" 5
  else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
@@ -102534,7 +102636,7 @@
  /* end confdefs.h.  */
  #include <stdlib.h>
  #include <giconv.h>
-@@ -97879,33 +43403,10 @@
+@@ -97974,33 +43336,10 @@
  }
  
  _ACEOF
@@ -102571,7 +102673,7 @@
  
  		ICONV_FOUND=yes;
  		ICONV_CPPFLAGS="$CPPFLAGS"
-@@ -97913,29 +43414,17 @@
+@@ -98008,29 +43347,17 @@
  		ICONV_LDFLAGS="$LDFLAGS"
  
  else
@@ -102585,7 +102687,7 @@
 -$as_echo "$as_me: error: No iconv library found in $withval" >&2;}
 -   { (exit 1); exit 1; }; }
 +  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-+$as_echo "no" >&6; }; as_fn_error "No iconv library found in $withval" "$LINENO" 5
++$as_echo "no" >&6; }; as_fn_error $? "No iconv library found in $withval" "$LINENO" 5
  fi
 -rm -rf conftest.dSYM
 -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
@@ -102606,7 +102708,7 @@
  /* end confdefs.h.  */
  #include <stdlib.h>
  #include <iconv.h>
-@@ -97948,33 +43437,10 @@
+@@ -98043,33 +43370,10 @@
  }
  
  _ACEOF
@@ -102643,7 +102745,7 @@
  
  		ICONV_FOUND=yes;
  		ICONV_CPPFLAGS="$CPPFLAGS"
-@@ -97982,28 +43448,17 @@
+@@ -98077,28 +43381,17 @@
  		ICONV_LDFLAGS="$LDFLAGS"
  
  else
@@ -102667,7 +102769,7 @@
 -   { (exit 1); exit 1; }; }
 +  if test "$cross_compiling" = yes; then :
 +  { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross" >&5
-+$as_echo "cross" >&6; }; as_fn_error "No iconv library found in $withval" "$LINENO" 5
++$as_echo "cross" >&6; }; as_fn_error $? "No iconv library found in $withval" "$LINENO" 5
  else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
@@ -102678,7 +102780,7 @@
  /* end confdefs.h.  */
  #include <stdlib.h>
  #include <giconv.h>
-@@ -98016,33 +43471,10 @@
+@@ -98111,33 +43404,10 @@
  }
  
  _ACEOF
@@ -102715,7 +102817,7 @@
  
  		ICONV_FOUND=yes;
  		ICONV_CPPFLAGS="$CPPFLAGS"
-@@ -98050,31 +43482,22 @@
+@@ -98145,31 +43415,22 @@
  		ICONV_LDFLAGS="$LDFLAGS"
  
  else
@@ -102729,7 +102831,7 @@
 -$as_echo "$as_me: error: No iconv library found in $withval" >&2;}
 -   { (exit 1); exit 1; }; }
 +  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-+$as_echo "no" >&6; }; as_fn_error "No iconv library found in $withval" "$LINENO" 5
++$as_echo "no" >&6; }; as_fn_error $? "No iconv library found in $withval" "$LINENO" 5
  fi
 -rm -rf conftest.dSYM
 -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
@@ -102753,7 +102855,7 @@
  	CPPFLAGS="$save_CPPFLAGS"
  	LDFLAGS="$save_LDFLAGS"
  	LIBS="$save_LIBS"
-@@ -98087,17 +43510,13 @@
+@@ -98182,17 +43443,13 @@
  
  if test x$ICONV_FOUND = xno; then
  
@@ -102775,7 +102877,7 @@
  /* end confdefs.h.  */
  #include <stdlib.h>
  #include <iconv.h>
-@@ -98110,49 +43529,20 @@
+@@ -98205,49 +43462,20 @@
  }
  
  _ACEOF
@@ -102831,7 +102933,7 @@
  fi
  
  for i in $LOOK_DIRS ; do
-@@ -98169,24 +43559,20 @@
+@@ -98264,24 +43492,20 @@
  	LIBS=-liconv
  
  
@@ -102863,7 +102965,7 @@
  /* end confdefs.h.  */
  #include <stdlib.h>
  #include <giconv.h>
-@@ -98199,33 +43585,10 @@
+@@ -98294,33 +43518,10 @@
  }
  
  _ACEOF
@@ -102900,7 +103002,7 @@
  
  		ICONV_FOUND=yes
  		ICONV_CPPFLAGS="$CPPFLAGS"
-@@ -98233,27 +43596,17 @@
+@@ -98328,27 +43529,17 @@
  		ICONV_LDFLAGS="$LDFLAGS"
  
  else
@@ -102932,7 +103034,7 @@
  /* end confdefs.h.  */
  #include <stdlib.h>
  #include <iconv.h>
-@@ -98266,33 +43619,10 @@
+@@ -98361,33 +43552,10 @@
  }
  
  _ACEOF
@@ -102969,7 +103071,7 @@
  
  		ICONV_FOUND=yes
  		ICONV_CPPFLAGS="$CPPFLAGS"
-@@ -98300,26 +43630,17 @@
+@@ -98395,335 +43563,114 @@
  		ICONV_LDFLAGS="$LDFLAGS"
  
  else
@@ -103001,10 +103103,14 @@
  /* end confdefs.h.  */
  #include <stdlib.h>
  #include <giconv.h>
-@@ -98331,304 +43652,92 @@
-    return 0;
- }
  
+-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"
@@ -103185,26 +103291,20 @@
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+_ACEOF
-+if ac_fn_c_try_run "$LINENO"; then :
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-+$as_echo "yes" >&6; };
-+$as_echo "#define HAVE_GICONV_H 1" >>confdefs.h
- 
+-
 -	eval "$as_ac_var=no"
 -fi
-+		ICONV_FOUND=yes
-+		ICONV_CPPFLAGS="$CPPFLAGS"
-+		ICONV_LIBS="$LIBS"
-+		ICONV_LDFLAGS="$LDFLAGS"
++int main()
++{
++   iconv_t cd = iconv_open("ASCII","UCS-2LE");
++   if (cd == 0 || cd == (iconv_t)-1) return -1;
++   return 0;
++}
  
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
-+else
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-+$as_echo "no" >&6; };
- fi
+-fi
 -ac_res=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
@@ -103214,7 +103314,21 @@
 -   if test "x$as_val" = x""yes; then
 -  cat >>confdefs.h <<_ACEOF
 -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
--_ACEOF
+ _ACEOF
++if ac_fn_c_try_run "$LINENO"; then :
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; };
++$as_echo "#define HAVE_GICONV_H 1" >>confdefs.h
++
++		ICONV_FOUND=yes
++		ICONV_CPPFLAGS="$CPPFLAGS"
++		ICONV_LIBS="$LIBS"
++		ICONV_LDFLAGS="$LDFLAGS"
++
++else
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; };
++fi
 +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
 +  conftest.$ac_objext conftest.beam conftest.$ac_ext
 +fi
@@ -103373,7 +103487,7 @@
  _ACEOF
  
  fi
-@@ -98707,151 +43816,12 @@
+@@ -98802,151 +43749,12 @@
  
  
  
@@ -103529,7 +103643,7 @@
  _ACEOF
  
  fi
-@@ -98861,23 +43831,17 @@
+@@ -98956,23 +43764,17 @@
  
  
  
@@ -103556,7 +103670,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -98895,54 +43859,28 @@
+@@ -98990,54 +43792,28 @@
    return 0;
  }
  _ACEOF
@@ -103618,7 +103732,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_LIBZ 1
  _ACEOF
-@@ -98958,18 +43896,13 @@
+@@ -99053,18 +43829,13 @@
  
  fi
  
@@ -103640,7 +103754,7 @@
  /* end confdefs.h.  */
  
  		#include <zlib.h>
-@@ -98987,40 +43920,19 @@
+@@ -99082,40 +43853,19 @@
    return 0;
  }
  _ACEOF
@@ -103683,7 +103797,7 @@
  $as_echo "$samba_cv_zlib_1_2_3" >&6; }
  
  if test x"$ac_cv_header_zlib_h" = x"yes" -a \
-@@ -99079,9 +43991,9 @@
+@@ -99174,9 +43924,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
@@ -103695,7 +103809,7 @@
    $as_echo_n "(cached) " >&6
  else
    case $PKG_CONFIG in
-@@ -99094,14 +44006,14 @@
+@@ -99189,14 +43939,14 @@
  do
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
@@ -103713,7 +103827,7 @@
  IFS=$as_save_IFS
  
    test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
-@@ -99110,10 +44022,10 @@
+@@ -99205,10 +43955,10 @@
  fi
  PKG_CONFIG=$ac_cv_path_PKG_CONFIG
  if test -n "$PKG_CONFIG"; then
@@ -103726,7 +103840,7 @@
  $as_echo "no" >&6; }
  fi
  
-@@ -99129,52 +44041,27 @@
+@@ -99224,52 +43974,27 @@
  	else
  		SAMBA_PKG_CONFIG_MIN_VERSION="0.9.0"
  		if $PKG_CONFIG --atleast-pkgconfig-version $SAMBA_PKG_CONFIG_MIN_VERSION; then
@@ -103786,7 +103900,7 @@
  
  	MAKE_SETTINGS="$MAKE_SETTINGS
  LIBTALLOC_ENABLE = YES
-@@ -99182,22 +44069,16 @@
+@@ -99277,22 +44002,16 @@
  SMB_INFO_ENABLES="$SMB_INFO_ENABLES
  \$enabled{\"LIBTALLOC\"} = \"YES\";"
  
@@ -103813,7 +103927,7 @@
  				CFLAGS="$OLD_CFLAGS"
  
  				ac_cv_LIBTALLOC_libs_only_other="`$PKG_CONFIG --libs-only-other 'talloc >= 2.0.1'` `$PKG_CONFIG --libs-only-L 'talloc >= 2.0.1'`"
-@@ -99258,7 +44139,7 @@
+@@ -99353,7 +44072,7 @@
  				ac_cv_LIBTALLOC_found=yes
  
  			else
@@ -103822,7 +103936,7 @@
  $as_echo "no" >&6; }
  				$PKG_CONFIG --errors-to-stdout --print-errors 'talloc >= 2.0.1'
  				ac_cv_LIBTALLOC_found=no
-@@ -99292,9 +44173,9 @@
+@@ -99387,9 +44106,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
@@ -103834,7 +103948,7 @@
    $as_echo_n "(cached) " >&6
  else
    case $PKG_CONFIG in
-@@ -99307,14 +44188,14 @@
+@@ -99402,14 +44121,14 @@
  do
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
@@ -103852,7 +103966,7 @@
  IFS=$as_save_IFS
  
    test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
-@@ -99323,10 +44204,10 @@
+@@ -99418,10 +44137,10 @@
  fi
  PKG_CONFIG=$ac_cv_path_PKG_CONFIG
  if test -n "$PKG_CONFIG"; then
@@ -103865,7 +103979,7 @@
  $as_echo "no" >&6; }
  fi
  
-@@ -99342,52 +44223,27 @@
+@@ -99437,52 +44156,27 @@
  	else
  		SAMBA_PKG_CONFIG_MIN_VERSION="0.9.0"
  		if $PKG_CONFIG --atleast-pkgconfig-version $SAMBA_PKG_CONFIG_MIN_VERSION; then
@@ -103925,7 +104039,7 @@
  
  	MAKE_SETTINGS="$MAKE_SETTINGS
  LIBTDB_ENABLE = YES
-@@ -99395,22 +44251,16 @@
+@@ -99490,22 +44184,16 @@
  SMB_INFO_ENABLES="$SMB_INFO_ENABLES
  \$enabled{\"LIBTDB\"} = \"YES\";"
  
@@ -103952,7 +104066,7 @@
  				CFLAGS="$OLD_CFLAGS"
  
  				ac_cv_LIBTDB_libs_only_other="`$PKG_CONFIG --libs-only-other 'tdb >= 1.2.1'` `$PKG_CONFIG --libs-only-L 'tdb >= 1.2.1'`"
-@@ -99471,7 +44321,7 @@
+@@ -99566,7 +44254,7 @@
  				ac_cv_LIBTDB_found=yes
  
  			else
@@ -103961,18 +104075,18 @@
  $as_echo "no" >&6; }
  				$PKG_CONFIG --errors-to-stdout --print-errors 'tdb >= 1.2.1'
  				ac_cv_LIBTDB_found=no
-@@ -99496,9 +44346,7 @@
+@@ -99591,9 +44279,7 @@
  	fi
  done
  if test x"$tdbdir" = "x"; then
 -   { { $as_echo "$as_me:$LINENO: error: cannot find tdb source in $tdbpaths" >&5
 -$as_echo "$as_me: error: cannot find tdb source in $tdbpaths" >&2;}
 -   { (exit 1); exit 1; }; }
-+   as_fn_error "cannot find tdb source in $tdbpaths" "$LINENO" 5
++   as_fn_error $? "cannot find tdb source in $tdbpaths" "$LINENO" 5
  fi
  TDB_OBJ="common/tdb.o common/dump.o common/transaction.o common/error.o common/traverse.o"
  TDB_OBJ="$TDB_OBJ common/freelist.o common/freelistcheck.o common/io.o common/lock.o common/open.o common/check.o"
-@@ -99511,104 +44359,12 @@
+@@ -99606,104 +44292,11 @@
  TDB_CFLAGS="-I$tdbdir/include"
  
  
@@ -104077,12 +104191,11 @@
 +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 :
++if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
  _ACEOF
-@@ -99616,151 +44372,12 @@
+@@ -99711,151 +44304,11 @@
  fi
  done
  
@@ -104234,12 +104347,11 @@
 +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 eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
-@@ -99771,17 +44388,13 @@
+@@ -99866,17 +44319,13 @@
  
  
  
@@ -104260,7 +104372,7 @@
  /* end confdefs.h.  */
  #include <unistd.h>
  int
-@@ -99792,56 +44405,29 @@
+@@ -99887,56 +44336,29 @@
    return 0;
  }
  _ACEOF
@@ -104324,7 +104436,7 @@
  /* end confdefs.h.  */
  #include <unistd.h>
  int
-@@ -99852,41 +44438,18 @@
+@@ -99947,41 +44369,18 @@
    return 0;
  }
  _ACEOF
@@ -104370,7 +104482,7 @@
  
   fi
  
-@@ -99917,9 +44480,9 @@
+@@ -100012,9 +44411,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
@@ -104382,7 +104494,7 @@
    $as_echo_n "(cached) " >&6
  else
    case $PKG_CONFIG in
-@@ -99932,14 +44495,14 @@
+@@ -100027,14 +44426,14 @@
  do
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
@@ -104400,7 +104512,7 @@
  IFS=$as_save_IFS
  
    test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
-@@ -99948,10 +44511,10 @@
+@@ -100043,10 +44442,10 @@
  fi
  PKG_CONFIG=$ac_cv_path_PKG_CONFIG
  if test -n "$PKG_CONFIG"; then
@@ -104413,7 +104525,7 @@
  $as_echo "no" >&6; }
  fi
  
-@@ -99967,52 +44530,27 @@
+@@ -100062,52 +44461,27 @@
  	else
  		SAMBA_PKG_CONFIG_MIN_VERSION="0.9.0"
  		if $PKG_CONFIG --atleast-pkgconfig-version $SAMBA_PKG_CONFIG_MIN_VERSION; then
@@ -104473,7 +104585,7 @@
  
  	MAKE_SETTINGS="$MAKE_SETTINGS
  LIBTEVENT_ENABLE = YES
-@@ -100020,22 +44558,16 @@
+@@ -100115,22 +44489,16 @@
  SMB_INFO_ENABLES="$SMB_INFO_ENABLES
  \$enabled{\"LIBTEVENT\"} = \"YES\";"
  
@@ -104500,7 +104612,7 @@
  				CFLAGS="$OLD_CFLAGS"
  
  				ac_cv_LIBTEVENT_libs_only_other="`$PKG_CONFIG --libs-only-other 'tevent = 0.9.8'` `$PKG_CONFIG --libs-only-L 'tevent = 0.9.8'`"
-@@ -100096,7 +44628,7 @@
+@@ -100191,7 +44559,7 @@
  				ac_cv_LIBTEVENT_found=yes
  
  			else
@@ -104509,10 +104621,11 @@
  $as_echo "no" >&6; }
  				$PKG_CONFIG --errors-to-stdout --print-errors 'tevent = 0.9.8'
  				ac_cv_LIBTEVENT_found=no
-@@ -100117,281 +44649,50 @@
+@@ -100211,282 +44579,51 @@
  
+ 
  if test x"$teventdir" = "x"; then
- 	teventdir=""
+-	teventdir=""
 -	teventpaths="$srcdir $srcdir/../lib/tevent $srcdir/tevent $srcdir/../tevent"
 -	for d in $teventpaths; do
 -		if test -f "$d/tevent.c"; then
@@ -104688,6 +104801,7 @@
 -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
 -_ACEOF
 -
++	teventdir=""
 +	teventpaths="$srcdir $srcdir/../lib/tevent $srcdir/tevent $srcdir/../tevent"
 +	for d in $teventpaths; do
 +		if test -f "$d/tevent.c"; then
@@ -104696,7 +104810,7 @@
 +		fi
 +	done
 +	if test x"$teventdir" = "x"; then
-+	   as_fn_error "cannot find libtevent source in $teventpaths" "$LINENO" 5
++	   as_fn_error $? "cannot find libtevent source in $teventpaths" "$LINENO" 5
 +	fi
  fi
  
@@ -104822,7 +104936,7 @@
  _ACEOF
  
  fi
-@@ -100400,9 +44701,7 @@
+@@ -100495,9 +44632,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"
  
@@ -104833,7 +104947,7 @@
  
  fi
  
-@@ -100458,9 +44757,9 @@
+@@ -100553,9 +44688,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
@@ -104845,7 +104959,7 @@
    $as_echo_n "(cached) " >&6
  else
    case $PKG_CONFIG in
-@@ -100473,14 +44772,14 @@
+@@ -100568,14 +44703,14 @@
  do
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
@@ -104863,7 +104977,7 @@
  IFS=$as_save_IFS
  
    test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
-@@ -100489,10 +44788,10 @@
+@@ -100584,10 +44719,10 @@
  fi
  PKG_CONFIG=$ac_cv_path_PKG_CONFIG
  if test -n "$PKG_CONFIG"; then
@@ -104876,7 +104990,7 @@
  $as_echo "no" >&6; }
  fi
  
-@@ -100508,52 +44807,27 @@
+@@ -100603,52 +44738,27 @@
  	else
  		SAMBA_PKG_CONFIG_MIN_VERSION="0.9.0"
  		if $PKG_CONFIG --atleast-pkgconfig-version $SAMBA_PKG_CONFIG_MIN_VERSION; then
@@ -104936,7 +105050,7 @@
  
  	MAKE_SETTINGS="$MAKE_SETTINGS
  LIBLDB_ENABLE = YES
-@@ -100561,22 +44835,16 @@
+@@ -100656,22 +44766,16 @@
  SMB_INFO_ENABLES="$SMB_INFO_ENABLES
  \$enabled{\"LIBLDB\"} = \"YES\";"
  
@@ -104963,7 +105077,7 @@
  				CFLAGS="$OLD_CFLAGS"
  
  				ac_cv_LIBLDB_libs_only_other="`$PKG_CONFIG --libs-only-other 'ldb = 0.9.10'` `$PKG_CONFIG --libs-only-L 'ldb = 0.9.10'`"
-@@ -100637,7 +44905,7 @@
+@@ -100732,7 +44836,7 @@
  				ac_cv_LIBLDB_found=yes
  
  			else
@@ -104972,7 +105086,7 @@
  $as_echo "no" >&6; }
  				$PKG_CONFIG --errors-to-stdout --print-errors 'ldb = 0.9.10'
  				ac_cv_LIBLDB_found=no
-@@ -100683,12 +44951,12 @@
+@@ -100778,12 +44882,12 @@
  
  SQLITE3_LIBS=""
  with_sqlite3_support=no
@@ -104987,7 +105101,7 @@
    withval=$with_sqlite3;  case "$withval" in
      yes|no|auto)
  	with_sqlite3_support=$withval
-@@ -100697,157 +44965,18 @@
+@@ -100792,157 +44896,18 @@
  fi
  
  
@@ -105151,21 +105265,21 @@
  _ACEOF
  
  fi
-@@ -100857,11 +44986,9 @@
+@@ -100952,11 +44917,9 @@
  
    if test x"$ac_cv_header_sqlite3_h" != x"yes"; then
  	if test x"$with_sqlite3_support" = x"yes"; then
 -	 { { $as_echo "$as_me:$LINENO: error: sqlite3.h is needed for SQLITE3 support" >&5
 -$as_echo "$as_me: error: sqlite3.h is needed for SQLITE3 support" >&2;}
 -   { (exit 1); exit 1; }; }
-+	 as_fn_error "sqlite3.h is needed for SQLITE3 support" "$LINENO" 5
++	 as_fn_error $? "sqlite3.h is needed for SQLITE3 support" "$LINENO" 5
  	else
 -	 { $as_echo "$as_me:$LINENO: WARNING: sqlite3.h is needed for SQLITE3 support" >&5
 +	 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: sqlite3.h is needed for SQLITE3 support" >&5
  $as_echo "$as_me: WARNING: sqlite3.h is needed for SQLITE3 support" >&2;}
  	fi
  
-@@ -100876,23 +45003,17 @@
+@@ -100971,23 +44934,17 @@
    # now see if we can find the sqlite3 libs in standard paths
  
  
@@ -105192,7 +105306,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -100910,54 +45031,28 @@
+@@ -101005,54 +44962,28 @@
    return 0;
  }
  _ACEOF
@@ -105254,7 +105368,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_LIBSQLITE3 1
  _ACEOF
-@@ -100973,21 +45068,16 @@
+@@ -101068,21 +44999,16 @@
  
  fi
  
@@ -105280,21 +105394,21 @@
  $as_echo "yes" >&6; }
      with_sqlite3_support=yes
  
-@@ -100999,11 +45089,9 @@
+@@ -101094,11 +45020,9 @@
  
    else
      if test x"$with_sqlite3_support" = x"yes"; then
 -	{ { $as_echo "$as_me:$LINENO: error: libsqlite3 is needed for SQLITE3 support" >&5
 -$as_echo "$as_me: error: libsqlite3 is needed for SQLITE3 support" >&2;}
 -   { (exit 1); exit 1; }; }
-+	as_fn_error "libsqlite3 is needed for SQLITE3 support" "$LINENO" 5
++	as_fn_error $? "libsqlite3 is needed for SQLITE3 support" "$LINENO" 5
      else
 -	{ $as_echo "$as_me:$LINENO: WARNING: libsqlite3 is needed for SQLITE3 support" >&5
 +	{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libsqlite3 is needed for SQLITE3 support" >&5
  $as_echo "$as_me: WARNING: libsqlite3 is needed for SQLITE3 support" >&2;}
      fi
  
-@@ -101073,7 +45161,7 @@
+@@ -101168,7 +45092,7 @@
  
  use_gnutls=auto
  # Check whether --enable-gnutls was given.
@@ -105303,7 +105417,7 @@
    enableval=$enable_gnutls; if test x$enable_gnutls = xno; then
          use_gnutls=no
      fi
-@@ -101087,9 +45175,9 @@
+@@ -101182,9 +45106,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
@@ -105315,7 +105429,7 @@
    $as_echo_n "(cached) " >&6
  else
    case $PKG_CONFIG in
-@@ -101102,14 +45190,14 @@
+@@ -101197,14 +45121,14 @@
  do
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
@@ -105333,7 +105447,7 @@
  IFS=$as_save_IFS
  
    test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
-@@ -101118,10 +45206,10 @@
+@@ -101213,10 +45137,10 @@
  fi
  PKG_CONFIG=$ac_cv_path_PKG_CONFIG
  if test -n "$PKG_CONFIG"; then
@@ -105346,7 +105460,7 @@
  $as_echo "no" >&6; }
  fi
  
-@@ -101137,52 +45225,27 @@
+@@ -101232,52 +45156,27 @@
  	else
  		SAMBA_PKG_CONFIG_MIN_VERSION="0.9.0"
  		if $PKG_CONFIG --atleast-pkgconfig-version $SAMBA_PKG_CONFIG_MIN_VERSION; then
@@ -105406,7 +105520,7 @@
  
  	MAKE_SETTINGS="$MAKE_SETTINGS
  GNUTLS_ENABLE = YES
-@@ -101190,22 +45253,16 @@
+@@ -101285,22 +45184,16 @@
  SMB_INFO_ENABLES="$SMB_INFO_ENABLES
  \$enabled{\"GNUTLS\"} = \"YES\";"
  
@@ -105433,20 +105547,40 @@
  				CFLAGS="$OLD_CFLAGS"
  
  				ac_cv_GNUTLS_libs_only_other="`$PKG_CONFIG --libs-only-other 'gnutls >= 1.4.0'` `$PKG_CONFIG --libs-only-L 'gnutls >= 1.4.0'`"
-@@ -101266,7 +45323,7 @@
- 				ac_cv_GNUTLS_found=yes
+@@ -101352,796 +45245,187 @@
  
- 			else
+ MAKE_SETTINGS="$MAKE_SETTINGS
+ GNUTLS_LIBS = `$PKG_CONFIG --libs-only-l 'gnutls >= 1.4.0'`
+-GNUTLS_CFLAGS = `$PKG_CONFIG --cflags-only-other 'gnutls >= 1.4.0'`
+-GNUTLS_CPPFLAGS = $ac_cv_GNUTLS_includedir_only
+-GNUTLS_LDFLAGS = $ac_cv_GNUTLS_libs_only_other
+-"
+-
+-
+-				ac_cv_GNUTLS_found=yes
+-
+-			else
 -				{ $as_echo "$as_me:$LINENO: result: no" >&5
-+				{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
- $as_echo "no" >&6; }
- 				$PKG_CONFIG --errors-to-stdout --print-errors 'gnutls >= 1.4.0'
- 				ac_cv_GNUTLS_found=no
-@@ -101286,151 +45343,12 @@
- fi
- 
- if test x$use_gnutls = xauto; then
+-$as_echo "no" >&6; }
+-				$PKG_CONFIG --errors-to-stdout --print-errors 'gnutls >= 1.4.0'
+-				ac_cv_GNUTLS_found=no
+-			fi
+-		else
+-			echo "*** Your version of pkg-config is too old. You need version $SAMBA_PKG_CONFIG_MIN_VERSION or newer."
+-			echo "*** See http://pkg-config.freedesktop.org/"
+-			ac_cv_GNUTLS_found=no
+-		fi
+-	fi
+-	if test x$ac_cv_GNUTLS_found = x"yes"; then
+-		use_gnutls=yes
+-	else
+-		use_gnutls=no
+-	fi
 -
+-fi
+-
+-if test x$use_gnutls = xauto; then
+-
 -for ac_header in gnutls/gnutls.h
 -do
 -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
@@ -105589,47 +105723,50 @@
 -as_val=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+	for ac_header in gnutls/gnutls.h
-+do :
-+  ac_fn_c_check_header_mongrel "$LINENO" "gnutls/gnutls.h" "ac_cv_header_gnutls_gnutls_h" "$ac_includes_default"
-+if test "x$ac_cv_header_gnutls_gnutls_h" = x""yes; then :
-   cat >>confdefs.h <<_ACEOF
+-  cat >>confdefs.h <<_ACEOF
 -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-+#define HAVE_GNUTLS_GNUTLS_H 1
- _ACEOF
- 
- fi
-@@ -101439,23 +45357,17 @@
- 
- 
- 
+-_ACEOF
 -
- ac_check_lib_ext_save_LIBS=$LIBS
- LIBS="-lgnutls $GNUTLS_LIBS  $LIBS"
- 
- 
- 
+-fi
 -
+-done
+-
+-
+-
+-
+-ac_check_lib_ext_save_LIBS=$LIBS
+-LIBS="-lgnutls $GNUTLS_LIBS  $LIBS"
+-
+-
+-
+-
 -        { $as_echo "$as_me:$LINENO: checking for gnutls_global_init in -lgnutls" >&5
-+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gnutls_global_init in -lgnutls" >&5
- $as_echo_n "checking for gnutls_global_init in -lgnutls... " >&6; }
+-$as_echo_n "checking for gnutls_global_init in -lgnutls... " >&6; }
 -if test "${ac_cv_lib_ext_gnutls_gnutls_global_init+set}" = set; then
-+if test "${ac_cv_lib_ext_gnutls_gnutls_global_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.  */
- 
- /* Override any GCC internal prototype to avoid an error.
-@@ -101473,580 +45385,116 @@
-   return 0;
- }
- _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 gnutls_global_init ();
+-int
+-main ()
+-{
+-return gnutls_global_init ();
+-  ;
+-  return 0;
+-}
+-_ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -105651,8 +105788,7 @@
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
-+if ac_fn_c_try_link "$LINENO"; then :
-   ac_cv_lib_ext_gnutls_gnutls_global_init=yes;
+-  ac_cv_lib_ext_gnutls_gnutls_global_init=yes;
 -		  ac_cv_lib_ext_gnutls=yes
 -else
 -  $as_echo "$as_me: failed program was:" >&5
@@ -105925,54 +106061,103 @@
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
++GNUTLS_CFLAGS = `$PKG_CONFIG --cflags-only-other 'gnutls >= 1.4.0'`
++GNUTLS_CPPFLAGS = $ac_cv_GNUTLS_includedir_only
++GNUTLS_LDFLAGS = $ac_cv_GNUTLS_libs_only_other
++"
+ 
 -	ac_cv_type_gnutls_datum=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
--
++				ac_cv_GNUTLS_found=yes
+ 
++			else
++				{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++				$PKG_CONFIG --errors-to-stdout --print-errors 'gnutls >= 1.4.0'
++				ac_cv_GNUTLS_found=no
++			fi
++		else
++			echo "*** Your version of pkg-config is too old. You need version $SAMBA_PKG_CONFIG_MIN_VERSION or newer."
++			echo "*** See http://pkg-config.freedesktop.org/"
++			ac_cv_GNUTLS_found=no
++		fi
++	fi
++	if test x$ac_cv_GNUTLS_found = x"yes"; then
++		use_gnutls=yes
++	else
++		use_gnutls=no
++	fi
+ 
+ fi
+ 
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
--fi
++if test x$use_gnutls = xauto; then
++	for ac_header in gnutls/gnutls.h
++do :
++  ac_fn_c_check_header_mongrel "$LINENO" "gnutls/gnutls.h" "ac_cv_header_gnutls_gnutls_h" "$ac_includes_default"
++if test "x$ac_cv_header_gnutls_gnutls_h" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_GNUTLS_GNUTLS_H 1
++_ACEOF
++
+ fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_gnutls_datum" >&5
 -$as_echo "$ac_cv_type_gnutls_datum" >&6; }
 -if test "x$ac_cv_type_gnutls_datum" = x""yes; then
--
+ 
 -cat >>confdefs.h <<_ACEOF
 -#define HAVE_GNUTLS_DATUM 1
 -_ACEOF
--
--
++done
+ 
+ 
 -fi
--
+ 
 -	{ $as_echo "$as_me:$LINENO: checking for gnutls_datum_t" >&5
 -$as_echo_n "checking for gnutls_datum_t... " >&6; }
 -if test "${ac_cv_type_gnutls_datum_t+set}" = set; then
--  $as_echo_n "(cached) " >&6
--else
++ac_check_lib_ext_save_LIBS=$LIBS
++LIBS="-lgnutls $GNUTLS_LIBS  $LIBS"
++
++
++
++        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gnutls_global_init in -lgnutls" >&5
++$as_echo_n "checking for gnutls_global_init in -lgnutls... " >&6; }
++if test "${ac_cv_lib_ext_gnutls_gnutls_global_init+set}" = set; then :
+   $as_echo_n "(cached) " >&6
+ else
 -  ac_cv_type_gnutls_datum_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.  */
 -#include "gnutls/gnutls.h"
--
--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.  */
++#ifdef __cplusplus
++extern "C"
++#endif
++char gnutls_global_init ();
+ int
+ main ()
+ {
 -if (sizeof (gnutls_datum_t))
 -       return 0;
--  ;
--  return 0;
--}
--_ACEOF
++return gnutls_global_init ();
+   ;
+   return 0;
+ }
+ _ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -105998,7 +106183,16 @@
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
 -#include "gnutls/gnutls.h"
--
++if ac_fn_c_try_link "$LINENO"; then :
++  ac_cv_lib_ext_gnutls_gnutls_global_init=yes;
++		  ac_cv_lib_ext_gnutls=yes
++else
++  ac_cv_lib_ext_gnutls_gnutls_global_init=no;
++		  ac_cv_lib_ext_gnutls=no
++fi
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
+ 
 -int
 -main ()
 -{
@@ -106007,7 +106201,13 @@
 -  ;
 -  return 0;
 -}
--_ACEOF
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ext_gnutls_gnutls_global_init" >&5
++$as_echo "$ac_cv_lib_ext_gnutls_gnutls_global_init" >&6; }
++    if test $ac_cv_lib_ext_gnutls_gnutls_global_init = yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_GNUTLS_GLOBAL_INIT 1
+ _ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -106027,23 +106227,9 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  :
-+		  ac_cv_lib_ext_gnutls=yes
- else
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+  ac_cv_lib_ext_gnutls_gnutls_global_init=no;
-+		  ac_cv_lib_ext_gnutls=no
-+fi
-+rm -f core conftest.err conftest.$ac_objext \
-+    conftest$ac_exeext conftest.$ac_ext
-+
-+fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ext_gnutls_gnutls_global_init" >&5
-+$as_echo "$ac_cv_lib_ext_gnutls_gnutls_global_init" >&6; }
-+    if test $ac_cv_lib_ext_gnutls_gnutls_global_init = yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define HAVE_GNUTLS_GLOBAL_INIT 1
-+_ACEOF
  
 -	ac_cv_type_gnutls_datum_t=yes
  fi
@@ -106087,7 +106273,7 @@
 -#define HAVE_GNUTLS_DATUM_T 1
 -_ACEOF
 +	if test x"$ac_cv_header_gnutls_gnutls_h" = x"yes" -a x"$ac_cv_lib_ext_gnutls_gnutls_global_init" = x"yes" -a x"$ac_cv_have_decl_gnutls_x509_crt_set_version" = x"yes";then
-+
+ 
 +	MAKE_SETTINGS="$MAKE_SETTINGS
 +GNUTLS_ENABLE = YES
 +"
@@ -106100,7 +106286,7 @@
 +
 +"
 +if test "x$ac_cv_have_decl_gnutls_x509_crt_set_subject_key_id" = x""yes; then :
- 
++
 +$as_echo "#define HAVE_GNUTLS_X509_CRT_SET_SUBJECT_KEY_ID 1" >>confdefs.h
  
  fi
@@ -106286,7 +106472,7 @@
  _ACEOF
  
  fi
-@@ -102055,23 +45503,17 @@
+@@ -102150,23 +45434,17 @@
  
  
  
@@ -106313,7 +106499,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -102089,54 +45531,28 @@
+@@ -102184,54 +45462,28 @@
    return 0;
  }
  _ACEOF
@@ -106375,7 +106561,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_LIBGCRYPT 1
  _ACEOF
-@@ -102152,7 +45568,6 @@
+@@ -102247,7 +45499,6 @@
  
  fi
  
@@ -106383,7 +106569,7 @@
  MAKE_SETTINGS="$MAKE_SETTINGS
  GCRYPT_LIBS = $GCRYPT_LIBS
  GCRYPT_CFLAGS =
-@@ -102169,7 +45584,7 @@
+@@ -102264,7 +45515,7 @@
  
  use_netapi=auto
  # Check whether --enable-netapi was given.
@@ -106392,7 +106578,7 @@
    enableval=$enable_netapi; if test x$enable_netapi = xno; then
          use_netapi=no
      fi
-@@ -102191,151 +45606,12 @@
+@@ -102286,151 +45537,12 @@
  \$enabled{\"TORTURE_LIBNETAPI\"} = \"NO\";"
  
  if test x$use_netapi != xno; then
@@ -106549,7 +106735,7 @@
  _ACEOF
  
  fi
-@@ -102344,23 +45620,17 @@
+@@ -102439,23 +45551,17 @@
  
  
  
@@ -106576,7 +106762,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -102378,54 +45648,28 @@
+@@ -102473,54 +45579,28 @@
    return 0;
  }
  _ACEOF
@@ -106638,7 +106824,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_LIBNETAPI 1
  _ACEOF
-@@ -102442,24 +45686,17 @@
+@@ -102537,24 +45617,17 @@
  fi
  
  
@@ -106666,7 +106852,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -102477,54 +45714,28 @@
+@@ -102572,54 +45645,28 @@
    return 0;
  }
  _ACEOF
@@ -106728,7 +106914,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_LIBNETAPI 1
  _ACEOF
-@@ -102541,24 +45752,17 @@
+@@ -102636,24 +45683,17 @@
  fi
  
  
@@ -106756,7 +106942,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -102576,54 +45780,28 @@
+@@ -102671,54 +45711,28 @@
    return 0;
  }
  _ACEOF
@@ -106818,7 +107004,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_LIBNETAPI 1
  _ACEOF
-@@ -102640,24 +45818,17 @@
+@@ -102735,24 +45749,17 @@
  fi
  
  
@@ -106846,7 +107032,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -102675,54 +45846,28 @@
+@@ -102770,54 +45777,28 @@
    return 0;
  }
  _ACEOF
@@ -106908,7 +107094,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_LIBNETAPI 1
  _ACEOF
-@@ -102739,24 +45884,17 @@
+@@ -102834,24 +45815,17 @@
  fi
  
  
@@ -106936,7 +107122,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -102774,54 +45912,28 @@
+@@ -102869,54 +45843,28 @@
    return 0;
  }
  _ACEOF
@@ -106998,7 +107184,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_LIBNETAPI 1
  _ACEOF
-@@ -102836,12 +45948,9 @@
+@@ -102931,12 +45879,9 @@
  
  
  fi
@@ -107012,18 +107198,18 @@
  
  
  	MAKE_SETTINGS="$MAKE_SETTINGS
-@@ -102859,9 +45968,7 @@
+@@ -102954,9 +45899,7 @@
  
  	else
  		if test x$use_netapi != xauto; then
 -			{ { $as_echo "$as_me:$LINENO: error: --enable-netapi: libnetapi not found" >&5
 -$as_echo "$as_me: error: --enable-netapi: libnetapi not found" >&2;}
 -   { (exit 1); exit 1; }; }
-+			as_fn_error "--enable-netapi: libnetapi not found" "$LINENO" 5
++			as_fn_error $? "--enable-netapi: libnetapi not found" "$LINENO" 5
  		fi
  	fi
  
-@@ -102902,19 +46009,17 @@
+@@ -102997,19 +45940,17 @@
  
  #################################################
  # check for pthread support
@@ -107043,11 +107229,11 @@
 -			{ { $as_echo "$as_me:$LINENO: error: You cannot enable threads when you don't have pread/pwrite!" >&5
 -$as_echo "$as_me: error: You cannot enable threads when you don't have pread/pwrite!" >&2;}
 -   { (exit 1); exit 1; }; }
-+			as_fn_error "You cannot enable threads when you don't have pread/pwrite!" "$LINENO" 5
++			as_fn_error $? "You cannot enable threads when you don't have pread/pwrite!" "$LINENO" 5
  		fi
  
  	MAKE_SETTINGS="$MAKE_SETTINGS
-@@ -102932,12 +46037,12 @@
+@@ -103027,12 +45968,12 @@
  
  	;;
  	*)
@@ -107062,7 +107248,7 @@
  $as_echo "no" >&6; }
  
  fi
-@@ -102953,274 +46058,45 @@
+@@ -103048,274 +45989,45 @@
  
  
  
@@ -107350,10 +107536,15 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -103238,54 +46114,28 @@
-   return 0;
- }
- _ACEOF
+@@ -103328,59 +46040,33 @@
+ int
+ main ()
+ {
+-return setproctitle ();
+-  ;
+-  return 0;
+-}
+-_ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -107375,6 +107566,11 @@
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
++return setproctitle ();
++  ;
++  return 0;
++}
++_ACEOF
 +if ac_fn_c_try_link "$LINENO"; then :
    ac_cv_lib_ext_setproctitle_setproctitle=yes;
  		  ac_cv_lib_ext_setproctitle=yes
@@ -107412,7 +107608,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_LIBSETPROCTITLE 1
  _ACEOF
-@@ -103301,15 +46151,14 @@
+@@ -103396,15 +46082,14 @@
  
  fi
  
@@ -107430,7 +107626,7 @@
  $as_echo "yes" >&6; }
  
  	MAKE_SETTINGS="$MAKE_SETTINGS
-@@ -103319,22 +46168,20 @@
+@@ -103414,22 +46099,20 @@
  \$enabled{\"SETPROCTITLE\"} = \"YES\";"
  
  
@@ -107457,7 +107653,7 @@
  $as_echo "no" >&6; }
  
  fi
-@@ -103352,238 +46199,68 @@
+@@ -103447,17 +46130,13 @@
  
  
  
@@ -107478,21 +107674,10 @@
  /* end confdefs.h.  */
  
  #include <sys/types.h>
- #include <sys/stat.h>
- #include <unistd.h>
- 
--int
--main ()
--{
--struct stat st;
-- st.st_mtim.tv_nsec;
-- st.st_atim.tv_nsec;
-- st.st_ctim.tv_nsec;
--
--  ;
--  return 0;
--}
--_ACEOF
+@@ -103476,209 +46155,43 @@
+   return 0;
+ }
+ _ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -107511,29 +107696,33 @@
 -	 test -z "$ac_c_werror_flag" ||
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
--  ac_cv_decl_have_stat_tv_nsec=yes
--else
++if ac_fn_c_try_compile "$LINENO"; then :
+   ac_cv_decl_have_stat_tv_nsec=yes
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	ac_cv_decl_have_stat_tv_nsec=no
--fi
++  ac_cv_decl_have_stat_tv_nsec=no
+ fi
 -
--rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
--
--fi
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ 
+ fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_stat_tv_nsec" >&5
--$as_echo "$ac_cv_have_stat_tv_nsec" >&6; }
--if test x"$ac_cv_decl_have_stat_tv_nsec" = x"yes"; then
--
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_stat_tv_nsec" >&5
+ $as_echo "$ac_cv_have_stat_tv_nsec" >&6; }
+ if test x"$ac_cv_decl_have_stat_tv_nsec" = x"yes"; then
+ 
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_STAT_TV_NSEC 1
 -_ACEOF
++$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
+ 
+ fi
+ 
 -
--fi
--
--
--for ac_header in blkid/blkid.h
+ for ac_header in blkid/blkid.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
@@ -107588,14 +107777,7 @@
 -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; }
-+int
-+main ()
-+{
-+struct stat st;
-+ st.st_mtim.tv_nsec;
-+ st.st_atim.tv_nsec;
-+ st.st_ctim.tv_nsec;
- 
+-
 -# Is the header present?
 -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
 -$as_echo_n "checking $ac_header presence... " >&6; }
@@ -107606,10 +107788,7 @@
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
 -#include <$ac_header>
-+  ;
-+  return 0;
-+}
- _ACEOF
+-_ACEOF
 -if { (ac_try="$ac_cpp conftest.$ac_ext"
 -case "(($ac_try" in
 -  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -107628,26 +107807,17 @@
 -	 test ! -s conftest.err
 -       }; then
 -  ac_header_preproc=yes
-+if ac_fn_c_try_compile "$LINENO"; then :
-+  ac_cv_decl_have_stat_tv_nsec=yes
- else
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+  ac_cv_decl_have_stat_tv_nsec=no
-+fi
-+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- 
+-
 -  ac_header_preproc=no
- fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_stat_tv_nsec" >&5
-+$as_echo "$ac_cv_have_stat_tv_nsec" >&6; }
-+if test x"$ac_cv_decl_have_stat_tv_nsec" = x"yes"; then
- 
+-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_STAT_TV_NSEC 1" >>confdefs.h
- 
+-
 -# So?  What about this header?
 -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
 -  yes:no: )
@@ -107684,17 +107854,16 @@
 -  $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; }
- 
+-
 -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 blkid/blkid.h
 +do :
 +  ac_fn_c_check_header_mongrel "$LINENO" "blkid/blkid.h" "ac_cv_header_blkid_blkid_h" "$ac_includes_default"
 +if test "x$ac_cv_header_blkid_blkid_h" = x""yes; then :
@@ -107726,7 +107895,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -103601,46 +46278,15 @@
+@@ -103696,46 +46209,15 @@
    return 0;
  }
  _ACEOF
@@ -107777,7 +107946,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -103658,65 +46304,32 @@
+@@ -103753,65 +46235,32 @@
    return 0;
  }
  _ACEOF
@@ -107851,7 +108020,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.  */
-@@ -103757,50 +46370,24 @@
+@@ -103852,50 +46301,24 @@
    return 0;
  }
  _ACEOF
@@ -107908,7 +108077,7 @@
  MAKE_SETTINGS="$MAKE_SETTINGS
  BLKID_LIBS = ${BLKID_LIBS}
  BLKID_CFLAGS = ${BLKID_CFLAGS}
-@@ -103811,9 +46398,7 @@
+@@ -103906,9 +46329,7 @@
  
  if test x"$ac_cv_func_ext_blkid_get_cache" = x"yes"; then
  
@@ -107919,7 +108088,7 @@
  
  
  	MAKE_SETTINGS="$MAKE_SETTINGS
-@@ -103841,102 +46426,12 @@
+@@ -103936,102 +46357,12 @@
  
  fi
  
@@ -108026,7 +108195,7 @@
  _ACEOF
  
  fi
-@@ -103946,151 +46441,12 @@
+@@ -104041,151 +46372,12 @@
  ###############################
  # start SMB_EXT_LIB_PAM
  # check for security/pam_appl.h and -lpam
@@ -108182,7 +108351,7 @@
  _ACEOF
  
  fi
-@@ -104099,23 +46455,17 @@
+@@ -104194,23 +46386,17 @@
  
  
  
@@ -108209,7 +108378,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -104133,54 +46483,28 @@
+@@ -104228,54 +46414,28 @@
    return 0;
  }
  _ACEOF
@@ -108271,7 +108440,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_LIBPAM 1
  _ACEOF
-@@ -104195,7 +46519,6 @@
+@@ -104290,7 +46450,6 @@
  
  
  fi
@@ -108279,7 +108448,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
-@@ -104221,23 +46544,17 @@
+@@ -104316,23 +46475,17 @@
  # test for where we get crypt() from
  
  
@@ -108306,7 +108475,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -104255,54 +46572,28 @@
+@@ -104350,54 +46503,28 @@
    return 0;
  }
  _ACEOF
@@ -108368,7 +108537,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_LIBCRYPT 1
  _ACEOF
-@@ -104318,7 +46609,6 @@
+@@ -104413,7 +46540,6 @@
  
  fi
  
@@ -108376,7 +108545,7 @@
  	MAKE_SETTINGS="$MAKE_SETTINGS
  CRYPT_ENABLE = YES
  "
-@@ -104335,102 +46625,12 @@
+@@ -104430,102 +46556,11 @@
  
  
  
@@ -108479,12 +108648,11 @@
 +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 :
++if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
  _ACEOF
-@@ -104439,151 +46639,12 @@
+@@ -104534,151 +46569,12 @@
  done
  
  
@@ -108640,7 +108808,7 @@
  _ACEOF
  
  fi
-@@ -104592,23 +46653,17 @@
+@@ -104687,23 +46583,17 @@
  
  
  
@@ -108667,7 +108835,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -104626,54 +46681,28 @@
+@@ -104721,54 +46611,28 @@
    return 0;
  }
  _ACEOF
@@ -108729,7 +108897,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_LIBSASL2 1
  _ACEOF
-@@ -104689,7 +46718,6 @@
+@@ -104784,7 +46648,6 @@
  
  fi
  
@@ -108737,25 +108905,11 @@
  if test x"$ac_cv_header_sasl_sasl_h" = x"yes" -a x"$ac_cv_lib_ext_sasl2_sasl_client_init" = x"yes";then
  
  	MAKE_SETTINGS="$MAKE_SETTINGS
-@@ -104735,312 +46763,88 @@
-             ac_new_flags="$ac_new_flags$s$i";
-         else
-             ac_new_flags="$ac_new_flags$s$l $i";
--        fi
--        l=""
--        ;;
--    esac
+@@ -104844,298 +46707,73 @@
+     -I/usr/include|-I/usr/include/) ;;
+     *) ac_new_flags="$ac_new_flags $i" ;;
+     esac
 -  done
--  SASL_LDFLAGS=$ac_new_flags
--
--
--  ac_new_flags=""
--  for i in $SASL_CPPFLAGS; do
--    case $i in
--    -I/usr/include|-I/usr/include/) ;;
--    *) ac_new_flags="$ac_new_flags $i" ;;
--    esac
--  done
 -  SASL_CPPFLAGS=$ac_new_flags
 -
 -
@@ -108847,14 +109001,24 @@
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
++  done
++  SASL_CPPFLAGS=$ac_new_flags
+ 
 -	ac_header_compiler=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; }
--
++  ac_new_flags=""
++  for i in $SASL_CFLAGS; do
++    case $i in
++    -I/usr/include|-I/usr/include/) ;;
++    *) ac_new_flags="$ac_new_flags $i" ;;
++    esac
++  done
++  SASL_CFLAGS=$ac_new_flags
+ 
 -# Is the header present?
 -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
 -$as_echo_n "checking $ac_header presence... " >&6; }
@@ -108884,40 +109048,16 @@
 -	 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
-+        fi
-+        l=""
-+        ;;
-+    esac
-+  done
-+  SASL_LDFLAGS=$ac_new_flags
- 
+-
 -  ac_header_preproc=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; }
-+  ac_new_flags=""
-+  for i in $SASL_CPPFLAGS; do
-+    case $i in
-+    -I/usr/include|-I/usr/include/) ;;
-+    *) ac_new_flags="$ac_new_flags $i" ;;
-+    esac
-+  done
-+  SASL_CPPFLAGS=$ac_new_flags
-+
-+
-+  ac_new_flags=""
-+  for i in $SASL_CFLAGS; do
-+    case $i in
-+    -I/usr/include|-I/usr/include/) ;;
-+    *) ac_new_flags="$ac_new_flags $i" ;;
-+    esac
-+  done
-+  SASL_CFLAGS=$ac_new_flags
  
 -# So?  What about this header?
 -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
@@ -108953,30 +109093,36 @@
 -$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
 -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; }
++	MAKE_SETTINGS="$MAKE_SETTINGS
++cyrus_sasl_ENABLE = NO
++"
++SMB_INFO_ENABLES="$SMB_INFO_ENABLES
++\$enabled{\"cyrus_sasl\"} = \"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
-+	MAKE_SETTINGS="$MAKE_SETTINGS
-+cyrus_sasl_ENABLE = NO
-+"
-+SMB_INFO_ENABLES="$SMB_INFO_ENABLES
-+\$enabled{\"cyrus_sasl\"} = \"NO\";"
  
- fi
+-fi
  
 -done
++MAKE_SETTINGS="$MAKE_SETTINGS
++SASL_LIBS = $SASL_LIBS
++SASL_CFLAGS = ${SASL_CFLAGS}
++SASL_CPPFLAGS = ${SASL_CPPFLAGS}
++SASL_LDFLAGS = ${SASL_LDFLAGS}
++"
  
 -{ $as_echo "$as_me:$LINENO: checking for inotify_init" >&5
 -$as_echo_n "checking for inotify_init... " >&6; }
@@ -108992,12 +109138,6 @@
 -/* 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
-+MAKE_SETTINGS="$MAKE_SETTINGS
-+SASL_LIBS = $SASL_LIBS
-+SASL_CFLAGS = ${SASL_CFLAGS}
-+SASL_CPPFLAGS = ${SASL_CPPFLAGS}
-+SASL_LDFLAGS = ${SASL_LDFLAGS}
-+"
  
 -/* System header to define __stub macros and hopefully few prototypes,
 -    which can conflict with char inotify_init (); below.
@@ -109011,6 +109151,11 @@
 -#endif
  
 -#undef inotify_init
++	MAKE_SETTINGS="$MAKE_SETTINGS
++server_service_kdc_ENABLE = $HAVE_KRB5
++"
++SMB_INFO_ENABLES="$SMB_INFO_ENABLES
++\$enabled{\"server_service_kdc\"} = \"$HAVE_KRB5\";"
  
 -/* Override any GCC internal prototype to avoid an error.
 -   Use char because int might match the return type of a GCC
@@ -109025,11 +109170,6 @@
 -#if defined __stub_inotify_init || defined __stub___inotify_init
 -choke me
 -#endif
-+	MAKE_SETTINGS="$MAKE_SETTINGS
-+server_service_kdc_ENABLE = $HAVE_KRB5
-+"
-+SMB_INFO_ENABLES="$SMB_INFO_ENABLES
-+\$enabled{\"server_service_kdc\"} = \"$HAVE_KRB5\";"
  
 -int
 -main ()
@@ -109038,13 +109178,11 @@
 -  ;
 -  return 0;
 -}
-+
 +for ac_header in linux/inotify.h asm/unistd.h sys/inotify.h
 +do :
 +  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-+eval as_val=\$$as_ac_Header
-+   if test "x$as_val" = x""yes; then :
++if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
 +  cat >>confdefs.h <<_ACEOF
 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
@@ -109107,7 +109245,7 @@
  /* end confdefs.h.  */
  #include <asm/unistd.h>
  int
-@@ -105051,41 +46855,18 @@
+@@ -105146,41 +46784,18 @@
    return 0;
  }
  _ACEOF
@@ -109153,7 +109291,7 @@
  
   fi
  
-@@ -105129,17 +46910,13 @@
+@@ -105224,17 +46839,13 @@
  fi
  
  
@@ -109174,7 +109312,7 @@
  /* end confdefs.h.  */
  #include <fcntl.h>
  int
-@@ -105150,56 +46927,29 @@
+@@ -105245,56 +46856,29 @@
    return 0;
  }
  _ACEOF
@@ -109238,7 +109376,7 @@
  /* end confdefs.h.  */
  #include <signal.h>
  int
-@@ -105210,41 +46960,18 @@
+@@ -105305,41 +46889,18 @@
    return 0;
  }
  _ACEOF
@@ -109284,7 +109422,7 @@
  
   fi
  
-@@ -105268,151 +46995,12 @@
+@@ -105363,151 +46924,11 @@
  
  fi
  
@@ -109436,12 +109574,11 @@
 +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 eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
-@@ -105726,151 +47314,12 @@
+@@ -105821,151 +47242,12 @@
  
  
  
@@ -109597,7 +109734,7 @@
  _ACEOF
  
  fi
-@@ -105880,23 +47329,17 @@
+@@ -105975,23 +47257,17 @@
  
  
  
@@ -109624,7 +109761,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -105914,54 +47357,28 @@
+@@ -106009,54 +47285,28 @@
    return 0;
  }
  _ACEOF
@@ -109686,7 +109823,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_LIBZ 1
  _ACEOF
-@@ -105977,18 +47394,13 @@
+@@ -106072,18 +47322,13 @@
  
  fi
  
@@ -109708,7 +109845,7 @@
  /* end confdefs.h.  */
  
  		#include <zlib.h>
-@@ -106006,40 +47418,19 @@
+@@ -106101,40 +47346,19 @@
    return 0;
  }
  _ACEOF
@@ -109751,7 +109888,7 @@
  $as_echo "$samba_cv_zlib_1_2_3" >&6; }
  
  if test x"$ac_cv_header_zlib_h" = x"yes" -a \
-@@ -106061,7 +47452,7 @@
+@@ -106156,7 +47380,7 @@
  
  
  # Check whether --enable-dmalloc was given.
@@ -109760,7 +109897,7 @@
    enableval=$enable_dmalloc;
  fi
  
-@@ -106069,14 +47460,10 @@
+@@ -106164,14 +47388,10 @@
  if test "x$enable_dmalloc" = xyes
  then
  
@@ -109777,7 +109914,7 @@
  
  	LIBS="$LIBS -ldmalloc"
  fi
-@@ -106174,87 +47561,54 @@
+@@ -106269,87 +47489,54 @@
  #################################################
  # Display summary of libraries detected
  
@@ -109867,7 +110004,7 @@
 -{ { $as_echo "$as_me:$LINENO: error: summary failure. Aborting config" >&5
 -$as_echo "$as_me: error: summary failure. Aborting config" >&2;}
 -   { (exit 1); exit 1; }; }; exit 1;
-+  as_fn_error "summary failure. Aborting config" "$LINENO" 5; exit 1;
++  as_fn_error $? "summary failure. Aborting config" "$LINENO" 5 ; exit 1;
  fi
 -rm -rf conftest.dSYM
 -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
@@ -109881,7 +110018,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
-@@ -106313,13 +47667,13 @@
+@@ -106408,13 +47595,13 @@
      case $ac_val in #(
      *${as_nl}*)
        case $ac_var in #(
@@ -109897,7 +110034,7 @@
        esac ;;
      esac
    done
-@@ -106327,8 +47681,8 @@
+@@ -106422,8 +47609,8 @@
    (set) 2>&1 |
      case $as_nl`(ac_space=' '; set) 2>&1` in #(
      *${as_nl}ac_space=\ *)
@@ -109908,7 +110045,7 @@
        sed -n \
  	"s/'/'\\\\''/g;
  	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
-@@ -106351,11 +47705,11 @@
+@@ -106446,11 +47633,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" &&
@@ -109922,7 +110059,14 @@
  $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
    fi
  fi
-@@ -106375,8 +47729,8 @@
+@@ -106464,14 +47651,15 @@
+ 
+ ac_libobjs=
+ ac_ltlibobjs=
++U=
+ for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
+   # 1. Remove the extension, and $U if already installed.
+   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
    ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
    # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
    #    will be set to the directory where LIBOBJS objects are built.
@@ -109933,7 +110077,7 @@
  done
  LIBOBJS=$ac_libobjs
  
-@@ -106400,9 +47754,10 @@
+@@ -106495,9 +47683,10 @@
  ac_write_fail=0
  ac_clean_files_save=$ac_clean_files
  ac_clean_files="$ac_clean_files $CONFIG_STATUS"
@@ -109946,7 +110090,7 @@
  #! $SHELL
  # Generated by $as_me.
  # Run this file to recreate the current configuration.
-@@ -106412,17 +47767,18 @@
+@@ -106507,17 +47696,18 @@
  debug=false
  ac_cs_recheck=false
  ac_cs_silent=false
@@ -109972,7 +110116,7 @@
    emulate sh
    NULLCMD=:
    # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
-@@ -106430,23 +47786,15 @@
+@@ -106525,23 +47715,15 @@
    alias -g '${1+"$@"}'='"$@"'
    setopt NO_GLOB_SUBST
  else
@@ -110001,7 +110145,7 @@
  as_nl='
  '
  export as_nl
-@@ -106454,7 +47802,13 @@
+@@ -106549,7 +47731,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
@@ -110016,7 +110160,7 @@
    as_echo='printf %s\n'
    as_echo_n='printf %s'
  else
-@@ -106465,7 +47819,7 @@
+@@ -106560,7 +47748,7 @@
      as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
      as_echo_n_body='eval
        arg=$1;
@@ -110025,7 +110169,7 @@
        *"$as_nl"*)
  	expr "X$arg" : "X\\(.*\\)$as_nl";
  	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
-@@ -106488,13 +47842,6 @@
+@@ -106583,13 +47771,6 @@
    }
  fi
  
@@ -110039,7 +110183,7 @@
  
  # IFS
  # We need space, tab and new line, in precisely that order.  Quoting is
-@@ -106504,15 +47851,15 @@
+@@ -106599,15 +47780,15 @@
  IFS=" ""	$as_nl"
  
  # Find who we are.  Look in the path if we contain no directory separator.
@@ -110058,7 +110202,7 @@
  IFS=$as_save_IFS
  
       ;;
-@@ -106524,12 +47871,16 @@
+@@ -106619,12 +47800,16 @@
  fi
  if test ! -f "$as_myself"; then
    $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
@@ -110079,7 +110223,7 @@
  done
  PS1='$ '
  PS2='> '
-@@ -106541,7 +47892,89 @@
+@@ -106636,7 +47821,89 @@
  LANGUAGE=C
  export LANGUAGE
  
@@ -110088,19 +110232,19 @@
 +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
 +
 +
-+# as_fn_error ERROR [LINENO LOG_FD]
-+# ---------------------------------
++# as_fn_error STATUS ERROR [LINENO LOG_FD]
++# ----------------------------------------
 +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
 +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
-+# script with status $?, using 1 if that was 0.
++# script with STATUS, using 1 if that was 0.
 +as_fn_error ()
 +{
-+  as_status=$?; test $as_status -eq 0 && as_status=1
-+  if test "$3"; then
-+    as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-+    $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
++  as_status=$1; test $as_status -eq 0 && as_status=1
++  if test "$4"; then
++    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
++    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
 +  fi
-+  $as_echo "$as_me: error: $1" >&2
++  $as_echo "$as_me: error: $2" >&2
 +  as_fn_exit $as_status
 +} # as_fn_error
 +
@@ -110170,7 +110314,7 @@
  if expr a : '\(a\)' >/dev/null 2>&1 &&
     test "X`expr 00001 : '.*\(...\)'`" = X001; then
    as_expr=expr
-@@ -106555,8 +47988,12 @@
+@@ -106650,8 +47917,12 @@
    as_basename=false
  fi
  
@@ -110184,7 +110328,7 @@
  as_me=`$as_basename -- "$0" ||
  $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
  	 X"$0" : 'X\(//\)$' \| \
-@@ -106576,76 +48013,25 @@
+@@ -106671,76 +47942,25 @@
  	  }
  	  s/.*/./; q'`
  
@@ -110272,7 +110416,7 @@
  
  rm -f conf$$ conf$$.exe conf$$.file
  if test -d conf$$.dir; then
-@@ -106674,8 +48060,56 @@
+@@ -106769,8 +47989,56 @@
  rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
  rmdir conf$$.dir 2>/dev/null
  
@@ -110320,7 +110464,7 @@
 +      test -d "$as_dir" && break
 +    done
 +    test -z "$as_dirs" || eval "mkdir $as_dirs"
-+  } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
++  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
 +
 +
 +} # as_fn_mkdir_p
@@ -110330,7 +110474,7 @@
  else
    test -d ./-p && rmdir ./-p
    as_mkdir_p=false
-@@ -106694,10 +48128,10 @@
+@@ -106789,10 +48057,10 @@
        if test -d "$1"; then
  	test -d "$1/.";
        else
@@ -110343,7 +110487,7 @@
  	???[sx]*):;;*)false;;esac;fi
      '\'' sh
    '
-@@ -106712,13 +48146,19 @@
+@@ -106807,13 +48075,19 @@
  
  
  exec 6>&1
@@ -110361,11 +110505,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.65.  Invocation command line was
++generated by GNU Autoconf 2.67.  Invocation command line was
  
    CONFIG_FILES    = $CONFIG_FILES
    CONFIG_HEADERS  = $CONFIG_HEADERS
-@@ -106750,13 +48190,15 @@
+@@ -106845,13 +48119,15 @@
  
  cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
  ac_cs_usage="\
@@ -110384,7 +110528,7 @@
    -q, --quiet, --silent
                     do not print progress messages
    -d, --debug      don't remove temporary files
-@@ -106775,16 +48217,17 @@
+@@ -106870,16 +48146,17 @@
  Configuration commands:
  $config_commands
  
@@ -110398,15 +110542,33 @@
  Samba config.status 3
 -configured by $0, generated by GNU Autoconf 2.63,
 -  with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
-+configured by $0, generated by GNU Autoconf 2.65,
++configured by $0, generated by GNU Autoconf 2.67,
 +  with options \\"\$ac_cs_config\\"
  
 -Copyright (C) 2008 Free Software Foundation, Inc.
-+Copyright (C) 2009 Free Software Foundation, Inc.
++Copyright (C) 2010 Free Software Foundation, Inc.
  This config.status script is free software; the Free Software Foundation
  gives unlimited permission to copy, distribute and modify it."
  
-@@ -106819,6 +48262,8 @@
+@@ -106896,11 +48173,16 @@
+ while test $# != 0
+ do
+   case $1 in
+-  --*=*)
++  --*=?*)
+     ac_option=`expr "X$1" : 'X\([^=]*\)='`
+     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
+     ac_shift=:
+     ;;
++  --*=)
++    ac_option=`expr "X$1" : 'X\([^=]*\)='`
++    ac_optarg=
++    ac_shift=:
++    ;;
+   *)
+     ac_option=$1
+     ac_optarg=$2
+@@ -106914,27 +48196,29 @@
      ac_cs_recheck=: ;;
    --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
      $as_echo "$ac_cs_version"; exit ;;
@@ -110415,9 +110577,10 @@
    --debug | --debu | --deb | --de | --d | -d )
      debug=: ;;
    --file | --fil | --fi | --f )
-@@ -106826,20 +48271,19 @@
+     $ac_shift
      case $ac_optarg in
      *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
++    '') as_fn_error $? "missing file argument" ;;
      esac
 -    CONFIG_FILES="$CONFIG_FILES '$ac_optarg'"
 +    as_fn_append CONFIG_FILES " '$ac_optarg'"
@@ -110435,19 +110598,19 @@
 -    { $as_echo "$as_me: error: ambiguous option: $1
 -Try \`$0 --help' for more information." >&2
 -   { (exit 1); exit 1; }; };;
-+    as_fn_error "ambiguous option: \`$1'
++    as_fn_error $? "ambiguous option: \`$1'
 +Try \`$0 --help' for more information.";;
    --help | --hel | -h )
      $as_echo "$ac_cs_usage"; exit ;;
    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
-@@ -106847,11 +48291,10 @@
+@@ -106942,11 +48226,10 @@
      ac_cs_silent=: ;;
  
    # This is an error.
 -  -*) { $as_echo "$as_me: error: unrecognized option: $1
 -Try \`$0 --help' for more information." >&2
 -   { (exit 1); exit 1; }; } ;;
-+  -*) as_fn_error "unrecognized option: \`$1'
++  -*) as_fn_error $? "unrecognized option: \`$1'
 +Try \`$0 --help' for more information." ;;
  
 -  *) ac_config_targets="$ac_config_targets $1"
@@ -110455,18 +110618,18 @@
       ac_need_defaults=false ;;
  
    esac
-@@ -106944,9 +48387,7 @@
+@@ -107039,9 +48322,7 @@
      "pkgconfig/smbsharemodes.pc") CONFIG_FILES="$CONFIG_FILES pkgconfig/smbsharemodes.pc" ;;
      "../examples/libsmbclient/Makefile.internal") CONFIG_FILES="$CONFIG_FILES ../examples/libsmbclient/Makefile.internal" ;;
  
 -  *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
 -$as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
 -   { (exit 1); exit 1; }; };;
-+  *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
++  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;;
    esac
  done
  
-@@ -106973,7 +48414,7 @@
+@@ -107068,7 +48349,7 @@
    trap 'exit_status=$?
    { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
  ' 0
@@ -110475,7 +110638,7 @@
  }
  # Create a (secure) tmp directory for tmp files.
  
-@@ -106984,11 +48425,7 @@
+@@ -107079,11 +48360,7 @@
  {
    tmp=./conf$$-$RANDOM
    (umask 077 && mkdir "$tmp")
@@ -110484,11 +110647,11 @@
 -   $as_echo "$as_me: cannot create a temporary directory in ." >&2
 -   { (exit 1); exit 1; }
 -}
-+} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
++} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
  
  # Set up the scripts for CONFIG_FILES section.
  # No need to generate them if there are no CONFIG_FILES.
-@@ -106996,10 +48433,16 @@
+@@ -107091,7 +48368,13 @@
  if test -n "$CONFIG_FILES"; then
  
  
@@ -110503,27 +110666,24 @@
 +fi
  ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
  if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
--  ac_cs_awk_cr='\\r'
-+  ac_cs_awk_cr='\r'
- else
-   ac_cs_awk_cr=$ac_cr
- fi
-@@ -107013,24 +48456,18 @@
+   ac_cs_awk_cr='\\r'
+@@ -107108,24 +48391,18 @@
    echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
    echo "_ACEOF"
  } >conf$$subs.sh ||
 -  { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
 -$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
 -   { (exit 1); exit 1; }; }
-+  as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
- ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
+-ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
++  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
++ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
  ac_delim='%!_!# '
  for ac_last_try in false false false false false :; do
    . ./conf$$subs.sh ||
 -    { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
 -$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
 -   { (exit 1); exit 1; }; }
-+    as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
++    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
  
    ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
    if test $ac_delim_n = $ac_delim_num; then
@@ -110532,11 +110692,11 @@
 -    { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
 -$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
 -   { (exit 1); exit 1; }; }
-+    as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
++    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
    else
      ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
    fi
-@@ -107052,7 +48489,7 @@
+@@ -107147,7 +48424,7 @@
  t delim
  :nl
  h
@@ -110545,7 +110705,7 @@
  t more1
  s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
  p
-@@ -107066,7 +48503,7 @@
+@@ -107161,7 +48438,7 @@
  t nl
  :delim
  h
@@ -110554,58 +110714,86 @@
  t more2
  s/["\\]/\\&/g; s/^/"/; s/$/"/
  p
-@@ -107119,9 +48556,7 @@
+@@ -107214,22 +48491,28 @@
  else
    cat
  fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
 -  || { { $as_echo "$as_me:$LINENO: error: could not setup config files machinery" >&5
 -$as_echo "$as_me: error: could not setup config files machinery" >&2;}
 -   { (exit 1); exit 1; }; }
-+  || as_fn_error "could not setup config files machinery" "$LINENO" 5
++  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
  _ACEOF
  
- # VPATH may cause trouble with some makes, so we remove $(srcdir),
-@@ -107162,9 +48597,7 @@
+-# VPATH may cause trouble with some makes, so we remove $(srcdir),
+-# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
++# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
++# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
+ # trailing colons and then remove the whole line if VPATH becomes empty
+ # (actually we leave an empty line to preserve line numbers).
+ if test "x$srcdir" = x.; then
+-  ac_vpsub='/^[	 ]*VPATH[	 ]*=/{
+-s/:*\$(srcdir):*/:/
+-s/:*\${srcdir}:*/:/
+-s/:*@srcdir@:*/:/
+-s/^\([^=]*=[	 ]*\):*/\1/
++  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
++h
++s///
++s/^/:/
++s/[	 ]*$/:/
++s/:\$(srcdir):/:/g
++s/:\${srcdir}:/:/g
++s/:@srcdir@:/:/g
++s/^:*//
+ s/:*$//
++x
++s/\(=[	 ]*\).*/\1/
++G
++s/\n//
+ s/^[^=]*=[	 ]*$//
+ }'
+ fi
+@@ -107257,9 +48540,7 @@
    if test -z "$ac_t"; then
      break
    elif $ac_last_try; then
 -    { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_HEADERS" >&5
 -$as_echo "$as_me: error: could not make $CONFIG_HEADERS" >&2;}
 -   { (exit 1); exit 1; }; }
-+    as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
++    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
    else
      ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
    fi
-@@ -107249,9 +48682,7 @@
+@@ -107344,9 +48625,7 @@
  _ACAWK
  _ACEOF
  cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 -  { { $as_echo "$as_me:$LINENO: error: could not setup config headers machinery" >&5
 -$as_echo "$as_me: error: could not setup config headers machinery" >&2;}
 -   { (exit 1); exit 1; }; }
-+  as_fn_error "could not setup config headers machinery" "$LINENO" 5
++  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
  fi # test -n "$CONFIG_HEADERS"
  
  
-@@ -107264,9 +48695,7 @@
+@@ -107359,9 +48638,7 @@
    esac
    case $ac_mode$ac_tag in
    :[FHL]*:*);;
 -  :L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: invalid tag $ac_tag" >&5
 -$as_echo "$as_me: error: invalid tag $ac_tag" >&2;}
 -   { (exit 1); exit 1; }; };;
-+  :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
++  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;;
    :[FH]-) ac_tag=-:-;;
    :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
    esac
-@@ -107294,12 +48723,10 @@
+@@ -107389,12 +48666,10 @@
  	   [\\/$]*) false;;
  	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
  	   esac ||
 -	   { { $as_echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
 -$as_echo "$as_me: error: cannot find input file: $ac_f" >&2;}
 -   { (exit 1); exit 1; }; };;
-+	   as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
++	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;;
        esac
        case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
 -      ac_file_inputs="$ac_file_inputs '$ac_f'"
@@ -110613,7 +110801,7 @@
      done
  
      # Let's still pretend it is `configure' which instantiates (i.e., don't
-@@ -107310,7 +48737,7 @@
+@@ -107405,7 +48680,7 @@
  	`' by configure.'
      if test x"$ac_file" != x-; then
        configure_input="$ac_file.  $configure_input"
@@ -110622,18 +110810,18 @@
  $as_echo "$as_me: creating $ac_file" >&6;}
      fi
      # Neutralize special characters interpreted by sed in replacement strings.
-@@ -107323,9 +48750,7 @@
+@@ -107418,9 +48693,7 @@
  
      case $ac_tag in
      *:-:* | *:-) cat >"$tmp/stdin" \
 -      || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
 -$as_echo "$as_me: error: could not create $ac_file" >&2;}
 -   { (exit 1); exit 1; }; } ;;
-+      || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
++      || as_fn_error $? "could not create $ac_file" "$LINENO" 5  ;;
      esac
      ;;
    esac
-@@ -107353,47 +48778,7 @@
+@@ -107448,47 +48721,7 @@
  	    q
  	  }
  	  s/.*/./; q'`
@@ -110682,7 +110870,7 @@
    ac_builddir=.
  
  case "$ac_dir" in
-@@ -107445,7 +48830,6 @@
+@@ -107540,7 +48773,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=
@@ -110690,7 +110878,7 @@
  ac_sed_dataroot='
  /datarootdir/ {
    p
-@@ -107455,12 +48839,11 @@
+@@ -107550,12 +48782,11 @@
  /@docdir@/p
  /@infodir@/p
  /@localedir@/p
@@ -110705,7 +110893,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
-@@ -107470,7 +48853,7 @@
+@@ -107565,7 +48796,7 @@
    s&@infodir@&$infodir&g
    s&@localedir@&$localedir&g
    s&@mandir@&$mandir&g
@@ -110714,42 +110902,46 @@
  esac
  _ACEOF
  
-@@ -107498,14 +48881,12 @@
+@@ -107593,26 +48824,22 @@
  $ac_datarootdir_hack
  "
  eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
 -  || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
 -$as_echo "$as_me: error: could not create $ac_file" >&2;}
 -   { (exit 1); exit 1; }; }
-+  || as_fn_error "could not create $ac_file" "$LINENO" 5
++  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
  
  test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
    { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
    { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
 -  { $as_echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+-which seems to be undefined.  Please make sure it is defined." >&5
 +  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
- which seems to be undefined.  Please make sure it is defined." >&5
++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;}
-@@ -107515,9 +48896,7 @@
+-which seems to be undefined.  Please make sure it is defined." >&2;}
++which seems to be undefined.  Please make sure it is defined" >&2;}
+ 
+   rm -f "$tmp/stdin"
+   case $ac_file in
    -) cat "$tmp/out" && rm -f "$tmp/out";;
    *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
    esac \
 -  || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
 -$as_echo "$as_me: error: could not create $ac_file" >&2;}
 -   { (exit 1); exit 1; }; }
-+  || as_fn_error "could not create $ac_file" "$LINENO" 5
++  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
   ;;
    :H)
    #
-@@ -107528,29 +48907,23 @@
+@@ -107623,29 +48850,23 @@
        $as_echo "/* $configure_input  */" \
        && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
      } >"$tmp/config.h" \
 -      || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
 -$as_echo "$as_me: error: could not create $ac_file" >&2;}
 -   { (exit 1); exit 1; }; }
-+      || as_fn_error "could not create $ac_file" "$LINENO" 5
++      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
      if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
 -      { $as_echo "$as_me:$LINENO: $ac_file is unchanged" >&5
 +      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
@@ -110760,7 +110952,7 @@
 -	|| { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
 -$as_echo "$as_me: error: could not create $ac_file" >&2;}
 -   { (exit 1); exit 1; }; }
-+	|| as_fn_error "could not create $ac_file" "$LINENO" 5
++	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
      fi
    else
      $as_echo "/* $configure_input  */" \
@@ -110768,7 +110960,7 @@
 -      || { { $as_echo "$as_me:$LINENO: error: could not create -" >&5
 -$as_echo "$as_me: error: could not create -" >&2;}
 -   { (exit 1); exit 1; }; }
-+      || as_fn_error "could not create -" "$LINENO" 5
++      || as_fn_error $? "could not create -" "$LINENO" 5
    fi
   ;;
  
@@ -110777,7 +110969,7 @@
  $as_echo "$as_me: executing $ac_file commands" >&6;}
   ;;
    esac
-@@ -107576,15 +48949,12 @@
+@@ -107671,15 +48892,12 @@
  done # for ac_tag
  
  
@@ -110791,16 +110983,16 @@
 -  { { $as_echo "$as_me:$LINENO: error: write failure creating $CONFIG_STATUS" >&5
 -$as_echo "$as_me: error: write failure creating $CONFIG_STATUS" >&2;}
 -   { (exit 1); exit 1; }; }
-+  as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
++  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
  
  
  # configure is writing to config.log, and then calls config.status.
-@@ -107605,10 +48975,10 @@
+@@ -107700,10 +48918,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.
 -  $ac_cs_success || { (exit 1); exit 1; }
-+  $ac_cs_success || as_fn_exit $?
++  $ac_cs_success || as_fn_exit 1
  fi
  if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
 -  { $as_echo "$as_me:$LINENO: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
@@ -110808,7 +111000,7 @@
  $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
  fi
  
-@@ -107619,8 +48989,8 @@
+@@ -107714,8 +48932,8 @@
  # Print very concise instructions on building/use
  if test "x$enable_dmalloc" = xyes
  then

Modified: branches/samba/backports.org/lenny/lib/util/charset/charset.h
===================================================================
--- branches/samba/backports.org/lenny/lib/util/charset/charset.h	2010-10-23 19:21:11 UTC (rev 3631)
+++ branches/samba/backports.org/lenny/lib/util/charset/charset.h	2010-10-26 20:27:36 UTC (rev 3632)
@@ -242,7 +242,7 @@
 			 char **outbuf, size_t *outbytesleft)					\
 {												\
 	while (*inbytesleft >= 1 && *outbytesleft >= 2) {					\
-		*(uint16*)(*outbuf) = to_ucs2[((unsigned char*)(*inbuf))[0]];			\
+		SSVAL(*outbuf, 0, to_ucs2[((unsigned char*)(*inbuf))[0]]);			\
 		(*inbytesleft)  -= 1;								\
 		(*outbytesleft) -= 2;								\
 		(*inbuf)  += 1;									\

Modified: branches/samba/backports.org/lenny/libcli/auth/credentials.c
===================================================================
--- branches/samba/backports.org/lenny/libcli/auth/credentials.c	2010-10-23 19:21:11 UTC (rev 3631)
+++ branches/samba/backports.org/lenny/libcli/auth/credentials.c	2010-10-26 20:27:36 UTC (rev 3632)
@@ -24,6 +24,7 @@
 #include "system/time.h"
 #include "../lib/crypto/crypto.h"
 #include "libcli/auth/libcli_auth.h"
+#include "../libcli/security/dom_sid.h"
 
 static void netlogon_creds_step_crypt(struct netlogon_creds_CredentialState *creds,
 				      const struct netr_Credential *in,
@@ -202,7 +203,7 @@
 								  struct netr_Credential *initial_credential,
 								  uint32_t negotiate_flags)
 {
-	struct netlogon_creds_CredentialState *creds = talloc(mem_ctx, struct netlogon_creds_CredentialState);
+	struct netlogon_creds_CredentialState *creds = talloc_zero(mem_ctx, struct netlogon_creds_CredentialState);
 	
 	if (!creds) {
 		return NULL;
@@ -453,3 +454,46 @@
 	}
 }	
 
+/*
+  copy a netlogon_creds_CredentialState struct
+*/
+
+struct netlogon_creds_CredentialState *netlogon_creds_copy(TALLOC_CTX *mem_ctx,
+							   struct netlogon_creds_CredentialState *creds_in)
+{
+	struct netlogon_creds_CredentialState *creds = talloc_zero(mem_ctx, struct netlogon_creds_CredentialState);
+
+	if (!creds) {
+		return NULL;
+	}
+
+	creds->sequence			= creds_in->sequence;
+	creds->negotiate_flags		= creds_in->negotiate_flags;
+	creds->secure_channel_type	= creds_in->secure_channel_type;
+
+	creds->computer_name = talloc_strdup(creds, creds_in->computer_name);
+	if (!creds->computer_name) {
+		talloc_free(creds);
+		return NULL;
+	}
+	creds->account_name = talloc_strdup(creds, creds_in->account_name);
+	if (!creds->account_name) {
+		talloc_free(creds);
+		return NULL;
+	}
+
+	if (creds_in->sid) {
+		creds->sid = dom_sid_dup(creds, creds_in->sid);
+		if (!creds->sid) {
+			talloc_free(creds);
+			return NULL;
+		}
+	}
+
+	memcpy(creds->session_key, creds_in->session_key, sizeof(creds->session_key));
+	memcpy(creds->seed.data, creds_in->seed.data, sizeof(creds->seed.data));
+	memcpy(creds->client.data, creds_in->client.data, sizeof(creds->client.data));
+	memcpy(creds->server.data, creds_in->server.data, sizeof(creds->server.data));
+
+	return creds;
+}

Modified: branches/samba/backports.org/lenny/libcli/auth/proto.h
===================================================================
--- branches/samba/backports.org/lenny/libcli/auth/proto.h	2010-10-23 19:21:11 UTC (rev 3631)
+++ branches/samba/backports.org/lenny/libcli/auth/proto.h	2010-10-26 20:27:36 UTC (rev 3632)
@@ -35,6 +35,8 @@
 				struct netr_Authenticator *next);
 bool netlogon_creds_client_check(struct netlogon_creds_CredentialState *creds,
 			const struct netr_Credential *received_credentials);
+struct netlogon_creds_CredentialState *netlogon_creds_copy(TALLOC_CTX *mem_ctx,
+							   struct netlogon_creds_CredentialState *creds_in);
 
 /*****************************************************************
 The above functions are common to the client and server interface

Modified: branches/samba/backports.org/lenny/librpc/gen_ndr/cli_epmapper.c
===================================================================
--- branches/samba/backports.org/lenny/librpc/gen_ndr/cli_epmapper.c	2010-10-23 19:21:11 UTC (rev 3631)
+++ branches/samba/backports.org/lenny/librpc/gen_ndr/cli_epmapper.c	2010-10-26 20:27:36 UTC (rev 3632)
@@ -380,7 +380,11 @@
 	/* Copy out parameters */
 	*state->orig.out.entry_handle = *state->tmp.out.entry_handle;
 	*state->orig.out.num_ents = *state->tmp.out.num_ents;
-	memcpy(state->orig.out.entries, state->tmp.out.entries, (state->tmp.in.max_ents) * sizeof(*state->orig.out.entries));
+	if ((*state->tmp.out.num_ents) > (state->tmp.in.max_ents)) {
+		tevent_req_nterror(req, NT_STATUS_INVALID_NETWORK_RESPONSE);
+		return;
+	}
+	memcpy(state->orig.out.entries, state->tmp.out.entries, (*state->tmp.out.num_ents) * sizeof(*state->orig.out.entries));
 
 	/* Copy result */
 	state->orig.out.result = state->tmp.out.result;
@@ -453,7 +457,10 @@
 	/* Return variables */
 	*entry_handle = *r.out.entry_handle;
 	*num_ents = *r.out.num_ents;
-	memcpy(entries, r.out.entries, (r.in.max_ents) * sizeof(*entries));
+	if ((*r.out.num_ents) > (r.in.max_ents)) {
+		return NT_STATUS_INVALID_NETWORK_RESPONSE;
+	}
+	memcpy(entries, r.out.entries, (*r.out.num_ents) * sizeof(*entries));
 
 	/* Return result */
 	return NT_STATUS_OK;
@@ -549,7 +556,11 @@
 	/* Copy out parameters */
 	*state->orig.out.entry_handle = *state->tmp.out.entry_handle;
 	*state->orig.out.num_towers = *state->tmp.out.num_towers;
-	memcpy(state->orig.out.towers, state->tmp.out.towers, (state->tmp.in.max_towers) * sizeof(*state->orig.out.towers));
+	if ((*state->tmp.out.num_towers) > (state->tmp.in.max_towers)) {
+		tevent_req_nterror(req, NT_STATUS_INVALID_NETWORK_RESPONSE);
+		return;
+	}
+	memcpy(state->orig.out.towers, state->tmp.out.towers, (*state->tmp.out.num_towers) * sizeof(*state->orig.out.towers));
 
 	/* Copy result */
 	state->orig.out.result = state->tmp.out.result;
@@ -618,7 +629,10 @@
 	/* Return variables */
 	*entry_handle = *r.out.entry_handle;
 	*num_towers = *r.out.num_towers;
-	memcpy(towers, r.out.towers, (r.in.max_towers) * sizeof(*towers));
+	if ((*r.out.num_towers) > (r.in.max_towers)) {
+		return NT_STATUS_INVALID_NETWORK_RESPONSE;
+	}
+	memcpy(towers, r.out.towers, (*r.out.num_towers) * sizeof(*towers));
 
 	/* Return result */
 	return NT_STATUS_OK;

Modified: branches/samba/backports.org/lenny/librpc/gen_ndr/cli_ntsvcs.c
===================================================================
--- branches/samba/backports.org/lenny/librpc/gen_ndr/cli_ntsvcs.c	2010-10-23 19:21:11 UTC (rev 3631)
+++ branches/samba/backports.org/lenny/librpc/gen_ndr/cli_ntsvcs.c	2010-10-26 20:27:36 UTC (rev 3632)
@@ -1459,7 +1459,11 @@
 	}
 
 	/* Copy out parameters */
-	memcpy(state->orig.out.buffer, state->tmp.out.buffer, (*state->tmp.in.length) * sizeof(*state->orig.out.buffer));
+	if ((*state->tmp.out.length) > (*state->tmp.in.length)) {
+		tevent_req_nterror(req, NT_STATUS_INVALID_NETWORK_RESPONSE);
+		return;
+	}
+	memcpy(state->orig.out.buffer, state->tmp.out.buffer, (*state->tmp.out.length) * sizeof(*state->orig.out.buffer));
 	*state->orig.out.length = *state->tmp.out.length;
 
 	/* Copy result */
@@ -1525,7 +1529,10 @@
 	}
 
 	/* Return variables */
-	memcpy(buffer, r.out.buffer, (*r.in.length) * sizeof(*buffer));
+	if ((*r.out.length) > (*r.in.length)) {
+		return NT_STATUS_INVALID_NETWORK_RESPONSE;
+	}
+	memcpy(buffer, r.out.buffer, (*r.out.length) * sizeof(*buffer));
 	*length = *r.out.length;
 
 	/* Return result */
@@ -1918,7 +1925,11 @@
 
 	/* Copy out parameters */
 	*state->orig.out.reg_data_type = *state->tmp.out.reg_data_type;
-	memcpy(state->orig.out.buffer, state->tmp.out.buffer, (*state->tmp.in.buffer_size) * sizeof(*state->orig.out.buffer));
+	if ((*state->tmp.out.buffer_size) > (*state->tmp.in.buffer_size)) {
+		tevent_req_nterror(req, NT_STATUS_INVALID_NETWORK_RESPONSE);
+		return;
+	}
+	memcpy(state->orig.out.buffer, state->tmp.out.buffer, (*state->tmp.out.buffer_size) * sizeof(*state->orig.out.buffer));
 	*state->orig.out.buffer_size = *state->tmp.out.buffer_size;
 	*state->orig.out.needed = *state->tmp.out.needed;
 
@@ -1992,7 +2003,10 @@
 
 	/* Return variables */
 	*reg_data_type = *r.out.reg_data_type;
-	memcpy(buffer, r.out.buffer, (*r.in.buffer_size) * sizeof(*buffer));
+	if ((*r.out.buffer_size) > (*r.in.buffer_size)) {
+		return NT_STATUS_INVALID_NETWORK_RESPONSE;
+	}
+	memcpy(buffer, r.out.buffer, (*r.out.buffer_size) * sizeof(*buffer));
 	*buffer_size = *r.out.buffer_size;
 	*needed = *r.out.needed;
 

Modified: branches/samba/backports.org/lenny/librpc/gen_ndr/cli_winreg.c
===================================================================
--- branches/samba/backports.org/lenny/librpc/gen_ndr/cli_winreg.c	2010-10-23 19:21:11 UTC (rev 3631)
+++ branches/samba/backports.org/lenny/librpc/gen_ndr/cli_winreg.c	2010-10-26 20:27:36 UTC (rev 3632)
@@ -1668,7 +1668,15 @@
 		*state->orig.out.type = *state->tmp.out.type;
 	}
 	if (state->orig.out.value && state->tmp.out.value) {
-		memcpy(state->orig.out.value, state->tmp.out.value, (*state->tmp.in.size) * sizeof(*state->orig.out.value));
+		if ((*state->tmp.out.size) > (*state->tmp.in.size)) {
+			tevent_req_nterror(req, NT_STATUS_INVALID_NETWORK_RESPONSE);
+			return;
+		}
+		if ((*state->tmp.out.length) > (*state->tmp.out.size)) {
+			tevent_req_nterror(req, NT_STATUS_INVALID_NETWORK_RESPONSE);
+			return;
+		}
+		memcpy(state->orig.out.value, state->tmp.out.value, (*state->tmp.out.length) * sizeof(*state->orig.out.value));
 	}
 	if (state->orig.out.size && state->tmp.out.size) {
 		*state->orig.out.size = *state->tmp.out.size;
@@ -1752,7 +1760,13 @@
 		*type = *r.out.type;
 	}
 	if (value && r.out.value) {
-		memcpy(value, r.out.value, (*r.in.size) * sizeof(*value));
+		if ((*r.out.size) > (*r.in.size)) {
+			return NT_STATUS_INVALID_NETWORK_RESPONSE;
+		}
+		if ((*r.out.length) > (*r.out.size)) {
+			return NT_STATUS_INVALID_NETWORK_RESPONSE;
+		}
+		memcpy(value, r.out.value, (*r.out.length) * sizeof(*value));
 	}
 	if (size && r.out.size) {
 		*size = *r.out.size;
@@ -2823,7 +2837,15 @@
 		*state->orig.out.type = *state->tmp.out.type;
 	}
 	if (state->orig.out.data && state->tmp.out.data) {
-		memcpy(state->orig.out.data, state->tmp.out.data, (state->tmp.in.data_size?*state->tmp.in.data_size:0) * sizeof(*state->orig.out.data));
+		if ((state->tmp.out.data_size?*state->tmp.out.data_size:0) > (state->tmp.in.data_size?*state->tmp.in.data_size:0)) {
+			tevent_req_nterror(req, NT_STATUS_INVALID_NETWORK_RESPONSE);
+			return;
+		}
+		if ((state->tmp.out.data_length?*state->tmp.out.data_length:0) > (state->tmp.out.data_size?*state->tmp.out.data_size:0)) {
+			tevent_req_nterror(req, NT_STATUS_INVALID_NETWORK_RESPONSE);
+			return;
+		}
+		memcpy(state->orig.out.data, state->tmp.out.data, (state->tmp.out.data_length?*state->tmp.out.data_length:0) * sizeof(*state->orig.out.data));
 	}
 	if (state->orig.out.data_size && state->tmp.out.data_size) {
 		*state->orig.out.data_size = *state->tmp.out.data_size;
@@ -2904,7 +2926,13 @@
 		*type = *r.out.type;
 	}
 	if (data && r.out.data) {
-		memcpy(data, r.out.data, (r.in.data_size?*r.in.data_size:0) * sizeof(*data));
+		if ((r.out.data_size?*r.out.data_size:0) > (r.in.data_size?*r.in.data_size:0)) {
+			return NT_STATUS_INVALID_NETWORK_RESPONSE;
+		}
+		if ((r.out.data_length?*r.out.data_length:0) > (r.out.data_size?*r.out.data_size:0)) {
+			return NT_STATUS_INVALID_NETWORK_RESPONSE;
+		}
+		memcpy(data, r.out.data, (r.out.data_length?*r.out.data_length:0) * sizeof(*data));
 	}
 	if (data_size && r.out.data_size) {
 		*data_size = *r.out.data_size;
@@ -4629,7 +4657,11 @@
 	/* Copy out parameters */
 	memcpy(state->orig.out.values, state->tmp.out.values, (state->tmp.in.num_values) * sizeof(*state->orig.out.values));
 	if (state->orig.out.buffer && state->tmp.out.buffer) {
-		memcpy(state->orig.out.buffer, state->tmp.out.buffer, (*state->tmp.in.buffer_size) * sizeof(*state->orig.out.buffer));
+		if ((*state->tmp.out.buffer_size) > (*state->tmp.in.buffer_size)) {
+			tevent_req_nterror(req, NT_STATUS_INVALID_NETWORK_RESPONSE);
+			return;
+		}
+		memcpy(state->orig.out.buffer, state->tmp.out.buffer, (*state->tmp.out.buffer_size) * sizeof(*state->orig.out.buffer));
 	}
 	*state->orig.out.buffer_size = *state->tmp.out.buffer_size;
 
@@ -4701,7 +4733,10 @@
 	/* Return variables */
 	memcpy(values, r.out.values, (r.in.num_values) * sizeof(*values));
 	if (buffer && r.out.buffer) {
-		memcpy(buffer, r.out.buffer, (*r.in.buffer_size) * sizeof(*buffer));
+		if ((*r.out.buffer_size) > (*r.in.buffer_size)) {
+			return NT_STATUS_INVALID_NETWORK_RESPONSE;
+		}
+		memcpy(buffer, r.out.buffer, (*r.out.buffer_size) * sizeof(*buffer));
 	}
 	*buffer_size = *r.out.buffer_size;
 

Modified: branches/samba/backports.org/lenny/librpc/ndr/libndr.h
===================================================================
--- branches/samba/backports.org/lenny/librpc/ndr/libndr.h	2010-10-23 19:21:11 UTC (rev 3631)
+++ branches/samba/backports.org/lenny/librpc/ndr/libndr.h	2010-10-26 20:27:36 UTC (rev 3632)
@@ -543,6 +543,7 @@
 
 /* GUIDs */
 bool GUID_equal(const struct GUID *u1, const struct GUID *u2);
+NTSTATUS GUID_from_ndr_blob(const DATA_BLOB *b, struct GUID *guid);
 NTSTATUS GUID_from_data_blob(const DATA_BLOB *s, struct GUID *guid);
 NTSTATUS GUID_from_string(const char *s, struct GUID *guid);
 NTSTATUS NS_GUID_from_string(const char *s, struct GUID *guid);

Modified: branches/samba/backports.org/lenny/librpc/ndr/uuid.c
===================================================================
--- branches/samba/backports.org/lenny/librpc/ndr/uuid.c	2010-10-23 19:21:11 UTC (rev 3631)
+++ branches/samba/backports.org/lenny/librpc/ndr/uuid.c	2010-10-26 20:27:36 UTC (rev 3632)
@@ -25,7 +25,26 @@
 #include "librpc/ndr/libndr.h"
 #include "librpc/gen_ndr/ndr_misc.h"
 
+
 /**
+  build a GUID from a NDR data blob
+*/
+_PUBLIC_ NTSTATUS GUID_from_ndr_blob(const DATA_BLOB *b, struct GUID *guid)
+{
+	enum ndr_err_code ndr_err;
+	TALLOC_CTX *mem_ctx;
+
+	mem_ctx = talloc_new(NULL);
+	NT_STATUS_HAVE_NO_MEMORY(mem_ctx);
+
+	ndr_err = ndr_pull_struct_blob_all(b, mem_ctx, NULL, guid,
+					   (ndr_pull_flags_fn_t)ndr_pull_GUID);
+	talloc_free(mem_ctx);
+	return ndr_map_error2ntstatus(ndr_err);
+}
+
+
+/**
   build a GUID from a string
 */
 _PUBLIC_ NTSTATUS GUID_from_data_blob(const DATA_BLOB *s, struct GUID *guid)
@@ -81,29 +100,16 @@
 	} else if (s->length == 32) {
 		size_t rlen = strhex_to_str((char *)blob16.data, blob16.length,
 					    (const char *)s->data, s->length);
-		if (rlen == blob16.length) {
-			/* goto the ndr_pull_struct_blob() path */
-			status = NT_STATUS_OK;
-			s = &blob16;
+		if (rlen != blob16.length) {
+			return NT_STATUS_INVALID_PARAMETER;
 		}
+
+		s = &blob16;
+		return GUID_from_ndr_blob(s, guid);
 	}
 
 	if (s->length == 16) {
-		enum ndr_err_code ndr_err;
-		struct GUID guid2;
-		TALLOC_CTX *mem_ctx;
-
-		mem_ctx = talloc_new(NULL);
-		NT_STATUS_HAVE_NO_MEMORY(mem_ctx);
-
-		ndr_err = ndr_pull_struct_blob(s, mem_ctx, NULL, &guid2,
-					       (ndr_pull_flags_fn_t)ndr_pull_GUID);
-		talloc_free(mem_ctx);
-		if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
-			return ndr_map_error2ntstatus(ndr_err);
-		}
-		*guid = guid2;
-		return NT_STATUS_OK;
+		return GUID_from_ndr_blob(s, guid);
 	}
 
 	if (!NT_STATUS_IS_OK(status)) {

Modified: branches/samba/backports.org/lenny/nsswitch/wb_common.c
===================================================================
--- branches/samba/backports.org/lenny/nsswitch/wb_common.c	2010-10-23 19:21:11 UTC (rev 3631)
+++ branches/samba/backports.org/lenny/nsswitch/wb_common.c	2010-10-26 20:27:36 UTC (rev 3632)
@@ -61,6 +61,9 @@
 
 /* Close established socket */
 
+#if HAVE_FUNCTION_ATTRIBUTE_DESTRUCTOR
+__attribute__((destructor))
+#endif
 void winbind_close_sock(void)
 {
 	if (winbindd_fd != -1) {

Modified: branches/samba/backports.org/lenny/packaging/RHEL/makerpms.sh
===================================================================
--- branches/samba/backports.org/lenny/packaging/RHEL/makerpms.sh	2010-10-23 19:21:11 UTC (rev 3631)
+++ branches/samba/backports.org/lenny/packaging/RHEL/makerpms.sh	2010-10-26 20:27:36 UTC (rev 3632)
@@ -20,7 +20,7 @@
 
 USERID=`id -u`
 GRPID=`id -g`
-VERSION='3.5.5'
+VERSION='3.5.6'
 REVISION=''
 SPECFILE="samba.spec"
 RPMVER=`rpm --version | awk '{print $3}'`

Modified: branches/samba/backports.org/lenny/packaging/RHEL/samba.spec
===================================================================
--- branches/samba/backports.org/lenny/packaging/RHEL/samba.spec	2010-10-23 19:21:11 UTC (rev 3631)
+++ branches/samba/backports.org/lenny/packaging/RHEL/samba.spec	2010-10-26 20:27:36 UTC (rev 3632)
@@ -5,7 +5,7 @@
 Vendor: Samba Team
 Packager: Samba Team <samba at samba.org>
 Name:         samba
-Version:      3.5.5
+Version:      3.5.6
 Release:      1
 Epoch:        0
 License: GNU GPL version 3

Modified: branches/samba/backports.org/lenny/packaging/RHEL-CTDB/samba.spec
===================================================================
--- branches/samba/backports.org/lenny/packaging/RHEL-CTDB/samba.spec	2010-10-23 19:21:11 UTC (rev 3631)
+++ branches/samba/backports.org/lenny/packaging/RHEL-CTDB/samba.spec	2010-10-26 20:27:36 UTC (rev 3632)
@@ -5,7 +5,7 @@
 Vendor: Samba Team
 Packager: Samba Team <samba at samba.org>
 Name:         samba
-Version:      3.5.5
+Version:      3.5.6
 Release:      1GITHASH
 Epoch:        0
 License: GNU GPL version 3

Modified: branches/samba/backports.org/lenny/pidl/lib/Parse/Pidl/Samba3/ClientNDR.pm
===================================================================
--- branches/samba/backports.org/lenny/pidl/lib/Parse/Pidl/Samba3/ClientNDR.pm	2010-10-23 19:21:11 UTC (rev 3631)
+++ branches/samba/backports.org/lenny/pidl/lib/Parse/Pidl/Samba3/ClientNDR.pm	2010-10-26 20:27:36 UTC (rev 3632)
@@ -15,7 +15,7 @@
 use Parse::Pidl qw(fatal warning error);
 use Parse::Pidl::Util qw(has_property ParseExpr);
 use Parse::Pidl::Samba4 qw(DeclLong);
-use Parse::Pidl::Samba4::Header qw(GenerateFunctionInEnv);
+use Parse::Pidl::Samba4::Header qw(GenerateFunctionInEnv GenerateFunctionOutEnv);
 
 use vars qw($VERSION);
 $VERSION = '0.01';
@@ -71,12 +71,27 @@
 	}
 }
 
-sub ParseOutputArgument($$$;$$)
+sub ParseInvalidResponse($$)
 {
-	my ($self, $fn, $e, $r, $o) = @_;
+	my ($self, $type) = @_;
+
+	if ($type eq "sync") {
+		$self->pidl("return NT_STATUS_INVALID_NETWORK_RESPONSE;");
+	} elsif ($type eq "async") {
+		$self->pidl("tevent_req_nterror(req, NT_STATUS_INVALID_NETWORK_RESPONSE);");
+		$self->pidl("return;");
+	} else {
+		die("ParseInvalidResponse($type)");
+	}
+}
+
+sub ParseOutputArgument($$$;$$$)
+{
+	my ($self, $fn, $e, $r, $o, $invalid_response_type) = @_;
 	my $level = 0;
 	$r = "r." unless defined($r);
 	$o = "" unless defined($o);
+	$invalid_response_type = "sync" unless defined($invalid_response_type);
 
 	if ($e->{LEVELS}[0]->{TYPE} ne "POINTER" and $e->{LEVELS}[0]->{TYPE} ne "ARRAY") {
 		$self->pidl("return NT_STATUS_NOT_SUPPORTED;");
@@ -97,17 +112,37 @@
 		# Since the data is being copied into a user-provided data 
 		# structure, the user should be able to know the size beforehand 
 		# to allocate a structure of the right size.
-		my $env = GenerateFunctionInEnv($fn, $r);
+		my $in_env = GenerateFunctionInEnv($fn, $r);
+		my $out_env = GenerateFunctionOutEnv($fn, $r);
 		my $l = $e->{LEVELS}[$level];
 		unless (defined($l->{SIZE_IS})) {
+			$self->pidl('#error No size known for [out] array `$e->{NAME}');
 			error($e->{ORIGINAL}, "no size known for [out] array `$e->{NAME}'");
-			$self->pidl('#error No size known for [out] array `$e->{NAME}');
 		} else {
-			my $size_is = ParseExpr($l->{SIZE_IS}, $env, $e->{ORIGINAL});
+			my $in_size_is = ParseExpr($l->{SIZE_IS}, $in_env, $e->{ORIGINAL});
+			my $out_size_is = ParseExpr($l->{SIZE_IS}, $out_env, $e->{ORIGINAL});
+			my $out_length_is = $out_size_is;
+			if (defined($l->{LENGTH_IS})) {
+				$out_length_is = ParseExpr($l->{LENGTH_IS}, $out_env, $e->{ORIGINAL});
+			}
+			if ($out_size_is ne $in_size_is) {
+				$self->pidl("if (($out_size_is) > ($in_size_is)) {");
+				$self->indent;
+				$self->ParseInvalidResponse($invalid_response_type);
+				$self->deindent;
+				$self->pidl("}");
+			}
+			if ($out_length_is ne $out_size_is) {
+				$self->pidl("if (($out_length_is) > ($out_size_is)) {");
+				$self->indent;
+				$self->ParseInvalidResponse($invalid_response_type);
+				$self->deindent;
+				$self->pidl("}");
+			}
 			if (has_property($e, "charset")) {
-				$self->pidl("memcpy(discard_const_p(uint8_t *, $o$e->{NAME}), ${r}out.$e->{NAME}, ($size_is) * sizeof(*$o$e->{NAME}));");
+				$self->pidl("memcpy(discard_const_p(uint8_t *, $o$e->{NAME}), ${r}out.$e->{NAME}, ($out_length_is) * sizeof(*$o$e->{NAME}));");
 			} else {
-				$self->pidl("memcpy($o$e->{NAME}, ${r}out.$e->{NAME}, ($size_is) * sizeof(*$o$e->{NAME}));");
+				$self->pidl("memcpy($o$e->{NAME}, ${r}out.$e->{NAME}, ($out_length_is) * sizeof(*$o$e->{NAME}));");
 			}
 		}
 	} else {
@@ -281,7 +316,10 @@
 	foreach my $e (@{$fn->{ELEMENTS}}) {
 		next unless (grep(/out/, @{$e->{DIRECTION}}));
 
-		$self->ParseOutputArgument($fn, $e, "state->tmp.", "state->orig.out.");
+		$self->ParseOutputArgument($fn, $e,
+					   "state->tmp.",
+					   "state->orig.out.",
+					   "async");
 	}
 	$self->pidl("");
 

Modified: branches/samba/backports.org/lenny/source3/Makefile.in
===================================================================
--- branches/samba/backports.org/lenny/source3/Makefile.in	2010-10-23 19:21:11 UTC (rev 3631)
+++ branches/samba/backports.org/lenny/source3/Makefile.in	2010-10-26 20:27:36 UTC (rev 3632)
@@ -2617,6 +2617,10 @@
 	@echo "Building plugin $@"
 	@$(SHLD_MODULE) winbindd/idmap_rid.o
 
+bin/passdb. at SHLIBEXT@: $(BINARY_PREREQS) winbindd/idmap_passdb.o
+	@echo "Building plugin $@"
+	@$(SHLD_MODULE) winbindd/idmap_passdb.o
+
 bin/ad. at SHLIBEXT@: $(BINARY_PREREQS) winbindd/idmap_ad.o
 	@echo "Building plugin $@"
 	@$(SHLD_MODULE) winbindd/idmap_ad.o

Modified: branches/samba/backports.org/lenny/source3/VERSION
===================================================================
--- branches/samba/backports.org/lenny/source3/VERSION	2010-10-23 19:21:11 UTC (rev 3631)
+++ branches/samba/backports.org/lenny/source3/VERSION	2010-10-26 20:27:36 UTC (rev 3632)
@@ -25,7 +25,7 @@
 ########################################################
 SAMBA_VERSION_MAJOR=3
 SAMBA_VERSION_MINOR=5
-SAMBA_VERSION_RELEASE=5
+SAMBA_VERSION_RELEASE=6
 
 ########################################################
 # Bug fix releases use a letter for the patch revision #

Modified: branches/samba/backports.org/lenny/source3/configure
===================================================================
--- branches/samba/backports.org/lenny/source3/configure	2010-10-23 19:21:11 UTC (rev 3631)
+++ branches/samba/backports.org/lenny/source3/configure	2010-10-26 20:27:36 UTC (rev 3632)
@@ -37022,12 +37022,8 @@
 
         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 -lcups"
 
 
 for ac_header in cups/cups.h cups/language.h
@@ -37180,9 +37176,108 @@
 
 done
 
+
 		if test x"$ac_cv_header_cups_cups_h" = xyes -a \
 		        x"$ac_cv_header_cups_language_h" = xyes; then
+			# try linking with -lcups alone first. That should work unless libcups is
+			# underlinked. With cups-config --libs we pull in unwanted and unneeded
+			# dendencies including thread libraries - use cups-config only if really
+			# required.
 
+
+
+ac_check_lib_ext_save_LIBS=$LIBS
+LIBS="-lcups $ac_save_PRINT_LIBS   $LIBS"
+
+
+
+
+        { $as_echo "$as_me:$LINENO: checking for httpConnect in -lcups" >&5
+$as_echo_n "checking for httpConnect in -lcups... " >&6; }
+if test "${ac_cv_lib_ext_cups_httpConnect+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.  */
+
+/* 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 httpConnect ();
+int
+main ()
+{
+return httpConnect ();
+  ;
+  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_ext_cups_httpConnect=yes;
+		  ac_cv_lib_ext_cups=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_lib_ext_cups_httpConnect=no;
+		  ac_cv_lib_ext_cups=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
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ext_cups_httpConnect" >&5
+$as_echo "$ac_cv_lib_ext_cups_httpConnect" >&6; }
+    if test $ac_cv_lib_ext_cups_httpConnect = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_HTTPCONNECT 1
+_ACEOF
+
+fi
+
+LIBS=$ac_check_lib_ext_save_LIBS
+
+if test $ac_cv_lib_ext_cups = yes; then
+  PRINT_LIBS"$ac_save_PRINT_LIBS -lcups"
+
+
+else
+  { $as_echo "$as_me:$LINENO: WARNING: your cups library doesn't link with -lcups alone, it might be underlinked." >&5
+$as_echo "$as_me: WARNING: your cups library doesn't link with -lcups alone, it might be underlinked." >&2;} ;
+				 PRINT_LIBS="$ac_save_PRINT_LIBS `$CUPS_CONFIG --libs`"
+fi
+
+
+
 cat >>confdefs.h <<\_ACEOF
 #define HAVE_CUPS 1
 _ACEOF

Modified: branches/samba/backports.org/lenny/source3/configure.in
===================================================================
--- branches/samba/backports.org/lenny/source3/configure.in	2010-10-23 19:21:11 UTC (rev 3631)
+++ branches/samba/backports.org/lenny/source3/configure.in	2010-10-26 20:27:36 UTC (rev 3632)
@@ -756,15 +756,21 @@
 
         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 -lcups"
 		AC_CHECK_HEADERS(cups/cups.h cups/language.h)
+
 		if test x"$ac_cv_header_cups_cups_h" = xyes -a \
 		        x"$ac_cv_header_cups_language_h" = xyes; then
+			# try linking with -lcups alone first. That should work unless libcups is
+			# underlinked. With cups-config --libs we pull in unwanted and unneeded
+			# dendencies including thread libraries - use cups-config only if really
+			# required. 
+			AC_CHECK_LIB_EXT(cups, ac_save_PRINT_LIBS , httpConnect,
+				[PRINT_LIBS"$ac_save_PRINT_LIBS -lcups"],
+				[AC_MSG_WARN([your cups library doesn't link with -lcups alone, it might be underlinked.]) ;
+				 PRINT_LIBS="$ac_save_PRINT_LIBS `$CUPS_CONFIG --libs`"])
+
 			AC_DEFINE(HAVE_CUPS,1,[Whether we have CUPS])
 			samba_cv_HAVE_CUPS=yes
 			AC_CHECK_LIB_EXT(cups, PRINT_LIBS, httpConnectEncrypt)

Modified: branches/samba/backports.org/lenny/source3/include/config.h.in
===================================================================
--- branches/samba/backports.org/lenny/source3/include/config.h.in	2010-10-23 19:21:11 UTC (rev 3631)
+++ branches/samba/backports.org/lenny/source3/include/config.h.in	2010-10-26 20:27:36 UTC (rev 3632)
@@ -914,6 +914,9 @@
 /* Define to 1 if you have the `hstrerror' function. */
 #undef HAVE_HSTRERROR
 
+/* Define to 1 if you have the `httpConnect' function. */
+#undef HAVE_HTTPCONNECT
+
 /* Define to 1 if you have the `httpConnectEncrypt' function. */
 #undef HAVE_HTTPCONNECTENCRYPT
 

Modified: branches/samba/backports.org/lenny/source3/include/proto.h
===================================================================
--- branches/samba/backports.org/lenny/source3/include/proto.h	2010-10-23 19:21:11 UTC (rev 3631)
+++ branches/samba/backports.org/lenny/source3/include/proto.h	2010-10-26 20:27:36 UTC (rev 3632)
@@ -3191,8 +3191,8 @@
 int matching_len_bits(unsigned char *p1, unsigned char *p2, size_t len);
 void sort_query_replies(char *data, int n, struct in_addr ip);
 char *name_mangle(TALLOC_CTX *mem_ctx, char *In, char name_type);
-int name_extract(char *buf,int ofs, fstring name);
-int name_len(char *s1);
+int name_extract(unsigned char *buf,size_t buf_len, unsigned int ofs, fstring name);
+int name_len(unsigned char *s1, size_t buf_len);
 
 /* The following definitions come from libsmb/nterr.c  */
 
@@ -5595,6 +5595,8 @@
 WERROR push_spoolss_PrinterData(TALLOC_CTX *mem_ctx, DATA_BLOB *blob,
 				enum winreg_Type type,
 				union spoolss_PrinterData *data);
+void spoolss_printerinfo2_to_setprinterinfo2(const struct spoolss_PrinterInfo2 *i,
+					     struct spoolss_SetPrinterInfo2 *s);
 
 /* The following definitions come from rpc_client/init_lsa.c  */
 
@@ -6583,7 +6585,8 @@
 
 /* The following definitions come from smbd/open.c  */
 
-NTSTATUS smb1_file_se_access_check(const struct security_descriptor *sd,
+NTSTATUS smb1_file_se_access_check(connection_struct *conn,
+			  const struct security_descriptor *sd,
                           const NT_USER_TOKEN *token,
                           uint32_t access_desired,
                           uint32_t *access_granted);
@@ -6856,7 +6859,7 @@
 			      files_struct *fsp);
 bool fsp_belongs_conn(connection_struct *conn, struct smb_request *req,
 		      files_struct *fsp);
-void reply_special(char *inbuf);
+void reply_special(char *inbuf, size_t inbuf_len);
 void reply_tcon(struct smb_request *req);
 void reply_tcon_and_X(struct smb_request *req);
 void reply_unknown_new(struct smb_request *req, uint8 type);

Modified: branches/samba/backports.org/lenny/source3/include/version.h
===================================================================
--- branches/samba/backports.org/lenny/source3/include/version.h	2010-10-23 19:21:11 UTC (rev 3631)
+++ branches/samba/backports.org/lenny/source3/include/version.h	2010-10-26 20:27:36 UTC (rev 3632)
@@ -1,8 +1,8 @@
 /* Autogenerated by script/mkversion.sh */
 #define SAMBA_VERSION_MAJOR 3
 #define SAMBA_VERSION_MINOR 5
-#define SAMBA_VERSION_RELEASE 5
-#define SAMBA_VERSION_OFFICIAL_STRING "3.5.5"
+#define SAMBA_VERSION_RELEASE 6
+#define SAMBA_VERSION_OFFICIAL_STRING "3.5.6"
 #ifdef SAMBA_VERSION_VENDOR_FUNCTION
 #  define SAMBA_VERSION_STRING SAMBA_VERSION_VENDOR_FUNCTION
 #else /* SAMBA_VERSION_VENDOR_FUNCTION */

Modified: branches/samba/backports.org/lenny/source3/lib/netapi/cm.c
===================================================================
--- branches/samba/backports.org/lenny/source3/lib/netapi/cm.c	2010-10-23 19:21:11 UTC (rev 3631)
+++ branches/samba/backports.org/lenny/source3/lib/netapi/cm.c	2010-10-26 20:27:36 UTC (rev 3632)
@@ -25,18 +25,58 @@
 /********************************************************************
 ********************************************************************/
 
+struct client_ipc_connection {
+	struct client_ipc_connection *prev, *next;
+	struct cli_state *cli;
+	struct client_pipe_connection *pipe_connections;
+};
+
+struct client_pipe_connection {
+	struct client_pipe_connection *prev, *next;
+	struct rpc_pipe_client *pipe;
+};
+
+/********************************************************************
+********************************************************************/
+
+static struct client_ipc_connection *ipc_cm_find(
+	struct libnetapi_private_ctx *priv_ctx, const char *server_name)
+{
+	struct client_ipc_connection *p;
+
+	for (p = priv_ctx->ipc_connections; p; p = p->next) {
+		if (strequal(p->cli->desthost, server_name)) {
+			return p;
+		}
+	}
+
+	return NULL;
+}
+
+/********************************************************************
+********************************************************************/
+
 static WERROR libnetapi_open_ipc_connection(struct libnetapi_ctx *ctx,
 					    const char *server_name,
-					    struct cli_state **cli)
+					    struct client_ipc_connection **pp)
 {
+	struct libnetapi_private_ctx *priv_ctx =
+		(struct libnetapi_private_ctx *)ctx->private_data;
 	struct user_auth_info *auth_info = NULL;
 	struct cli_state *cli_ipc = NULL;
+	struct client_ipc_connection *p;
 
-	if (!ctx || !cli || !server_name) {
+	if (!ctx || !pp || !server_name) {
 		return WERR_INVALID_PARAM;
 	}
 
-	auth_info = user_auth_info_init(NULL);
+	p = ipc_cm_find(priv_ctx, server_name);
+	if (p) {
+		*pp = p;
+		return WERR_OK;
+	}
+
+	auth_info = user_auth_info_init(ctx);
 	if (!auth_info) {
 		return WERR_NOMEM;
 	}
@@ -78,30 +118,29 @@
 		return WERR_CAN_NOT_COMPLETE;
 	}
 
-	*cli = cli_ipc;
+	p = TALLOC_ZERO_P(ctx, struct client_ipc_connection);
+	if (p == NULL) {
+		return WERR_NOMEM;
+	}
 
+	p->cli = cli_ipc;
+	DLIST_ADD(priv_ctx->ipc_connections, p);
+
+	*pp = p;
+
 	return WERR_OK;
 }
 
 /********************************************************************
 ********************************************************************/
 
-struct client_pipe_connection {
-	struct client_pipe_connection *prev, *next;
-	struct rpc_pipe_client *pipe;
-	struct cli_state *cli;
-};
-
-static struct client_pipe_connection *pipe_connections;
-
-/********************************************************************
-********************************************************************/
-
 WERROR libnetapi_shutdown_cm(struct libnetapi_ctx *ctx)
 {
-	struct client_pipe_connection *p;
+	struct libnetapi_private_ctx *priv_ctx =
+		(struct libnetapi_private_ctx *)ctx->private_data;
+	struct client_ipc_connection *p;
 
-	for (p = pipe_connections; p; p = p->next) {
+	for (p = priv_ctx->ipc_connections; p; p = p->next) {
 		cli_shutdown(p->cli);
 	}
 
@@ -111,19 +150,19 @@
 /********************************************************************
 ********************************************************************/
 
-static NTSTATUS pipe_cm_find(struct cli_state *cli,
+static NTSTATUS pipe_cm_find(struct client_ipc_connection *ipc,
 			     const struct ndr_syntax_id *interface,
 			     struct rpc_pipe_client **presult)
 {
 	struct client_pipe_connection *p;
 
-	for (p = pipe_connections; p; p = p->next) {
+	for (p = ipc->pipe_connections; p; p = p->next) {
 
 		if (!rpc_pipe_np_smb_conn(p->pipe)) {
 			return NT_STATUS_PIPE_EMPTY;
 		}
 
-		if (strequal(cli->desthost, p->pipe->desthost)
+		if (strequal(ipc->cli->desthost, p->pipe->desthost)
 		    && ndr_syntax_id_equal(&p->pipe->abstract_syntax,
 					   interface)) {
 			*presult = p->pipe;
@@ -138,7 +177,7 @@
 ********************************************************************/
 
 static NTSTATUS pipe_cm_connect(TALLOC_CTX *mem_ctx,
-				struct cli_state *cli,
+				struct client_ipc_connection *ipc,
 				const struct ndr_syntax_id *interface,
 				struct rpc_pipe_client **presult)
 {
@@ -150,14 +189,13 @@
 		return NT_STATUS_NO_MEMORY;
 	}
 
-	status = cli_rpc_pipe_open_noauth(cli, interface, &p->pipe);
+	status = cli_rpc_pipe_open_noauth(ipc->cli, interface, &p->pipe);
 	if (!NT_STATUS_IS_OK(status)) {
 		TALLOC_FREE(p);
 		return status;
 	}
 
-	p->cli = cli;
-	DLIST_ADD(pipe_connections, p);
+	DLIST_ADD(ipc->pipe_connections, p);
 
 	*presult = p->pipe;
 	return NT_STATUS_OK;
@@ -167,15 +205,15 @@
 ********************************************************************/
 
 static NTSTATUS pipe_cm_open(TALLOC_CTX *ctx,
-			     struct cli_state *cli,
+			     struct client_ipc_connection *ipc,
 			     const struct ndr_syntax_id *interface,
 			     struct rpc_pipe_client **presult)
 {
-	if (NT_STATUS_IS_OK(pipe_cm_find(cli, interface, presult))) {
+	if (NT_STATUS_IS_OK(pipe_cm_find(ipc, interface, presult))) {
 		return NT_STATUS_OK;
 	}
 
-	return pipe_cm_connect(ctx, cli, interface, presult);
+	return pipe_cm_connect(ctx, ipc, interface, presult);
 }
 
 /********************************************************************
@@ -189,18 +227,18 @@
 	struct rpc_pipe_client *result = NULL;
 	NTSTATUS status;
 	WERROR werr;
-	struct cli_state *cli = NULL;
+	struct client_ipc_connection *ipc = NULL;
 
 	if (!presult) {
 		return WERR_INVALID_PARAM;
 	}
 
-	werr = libnetapi_open_ipc_connection(ctx, server_name, &cli);
+	werr = libnetapi_open_ipc_connection(ctx, server_name, &ipc);
 	if (!W_ERROR_IS_OK(werr)) {
 		return werr;
 	}
 
-	status = pipe_cm_open(ctx, cli, interface, &result);
+	status = pipe_cm_open(ctx, ipc, interface, &result);
 	if (!NT_STATUS_IS_OK(status)) {
 		libnetapi_set_error_string(ctx, "failed to open PIPE %s: %s",
 			get_pipe_name_from_syntax(talloc_tos(), interface),

Modified: branches/samba/backports.org/lenny/source3/lib/netapi/netapi_private.h
===================================================================
--- branches/samba/backports.org/lenny/source3/lib/netapi/netapi_private.h	2010-10-23 19:21:11 UTC (rev 3631)
+++ branches/samba/backports.org/lenny/source3/lib/netapi/netapi_private.h	2010-10-26 20:27:36 UTC (rev 3632)
@@ -43,6 +43,7 @@
 		struct policy_handle builtin_handle;
 	} samr;
 
+	struct client_ipc_connection *ipc_connections;
 };
 
 NET_API_STATUS libnetapi_get_password(struct libnetapi_ctx *ctx, char **password);

Modified: branches/samba/backports.org/lenny/source3/lib/system.c
===================================================================
--- branches/samba/backports.org/lenny/source3/lib/system.c	2010-10-23 19:21:11 UTC (rev 3631)
+++ branches/samba/backports.org/lenny/source3/lib/system.c	2010-10-26 20:27:36 UTC (rev 3632)
@@ -534,8 +534,17 @@
 	dst->st_ex_mtime = get_mtimespec(src);
 	dst->st_ex_ctime = get_ctimespec(src);
 	make_create_timespec(src, dst, fake_dir_create_times);
+#ifdef HAVE_STAT_ST_BLKSIZE
 	dst->st_ex_blksize = src->st_blksize;
+#else
+	dst->st_ex_blksize = STAT_ST_BLOCKSIZE;
+#endif
+
+#ifdef HAVE_STAT_ST_BLOCKS
 	dst->st_ex_blocks = src->st_blocks;
+#else
+	dst->st_ex_blocks = src->st_size / dst->st_ex_blksize + 1;
+#endif
 
 #ifdef HAVE_STAT_ST_FLAGS
 	dst->st_ex_flags = src->st_flags;

Modified: branches/samba/backports.org/lenny/source3/lib/tdb_validate.c
===================================================================
--- branches/samba/backports.org/lenny/source3/lib/tdb_validate.c	2010-10-23 19:21:11 UTC (rev 3631)
+++ branches/samba/backports.org/lenny/source3/lib/tdb_validate.c	2010-10-26 20:27:36 UTC (rev 3632)
@@ -192,7 +192,7 @@
 
 	DEBUG(5, ("tdb_validate_open called for tdb '%s'\n", tdb_path));
 
-	tdb = tdb_open_log(tdb_path, 0, TDB_DEFAULT, O_RDONLY, 0);
+	tdb = tdb_open_log(tdb_path, 0, TDB_DEFAULT, O_RDWR, 0);
 	if (!tdb) {
 		DEBUG(1, ("Error opening tdb %s\n", tdb_path));
 		return ret;

Modified: branches/samba/backports.org/lenny/source3/libads/sasl.c
===================================================================
--- branches/samba/backports.org/lenny/source3/libads/sasl.c	2010-10-23 19:21:11 UTC (rev 3631)
+++ branches/samba/backports.org/lenny/source3/libads/sasl.c	2010-10-26 20:27:36 UTC (rev 3632)
@@ -769,7 +769,8 @@
 
 	/* the server sent us the first part of the SPNEGO exchange in the negprot 
 	   reply */
-	if (!spnego_parse_negTokenInit(blob, OIDs, &given_principal)) {
+	if (!spnego_parse_negTokenInit(blob, OIDs, &given_principal) ||
+			OIDs[0] == NULL) {
 		data_blob_free(&blob);
 		status = ADS_ERROR(LDAP_OPERATIONS_ERROR);
 		goto failed;

Modified: branches/samba/backports.org/lenny/source3/libsmb/cliconnect.c
===================================================================
--- branches/samba/backports.org/lenny/source3/libsmb/cliconnect.c	2010-10-23 19:21:11 UTC (rev 3631)
+++ branches/samba/backports.org/lenny/source3/libsmb/cliconnect.c	2010-10-26 20:27:36 UTC (rev 3632)
@@ -1007,7 +1007,8 @@
 	 * negprot reply. It is WRONG to depend on the principal sent in the
 	 * negprot reply, but right now we do it. If we don't receive one,
 	 * we try to best guess, then fall back to NTLM.  */
-	if (!spnego_parse_negTokenInit(blob, OIDs, &principal)) {
+	if (!spnego_parse_negTokenInit(blob, OIDs, &principal) ||
+			OIDs[0] == NULL) {
 		data_blob_free(&blob);
 		return ADS_ERROR_NT(NT_STATUS_INVALID_PARAMETER);
 	}
@@ -1872,6 +1873,7 @@
 {
 	char *p;
 	int len = 4;
+	int namelen = 0;
 	char *tmp;
 
 	/* 445 doesn't have session request */
@@ -1890,8 +1892,11 @@
 	}
 
 	p = cli->outbuf+len;
-	memcpy(p, tmp, name_len(tmp));
-	len += name_len(tmp);
+	namelen = name_len((unsigned char *)tmp, talloc_get_size(tmp));
+	if (namelen > 0) {
+		memcpy(p, tmp, namelen);
+		len += namelen;
+	}
 	TALLOC_FREE(tmp);
 
 	/* and my name */
@@ -1903,8 +1908,11 @@
 	}
 
 	p = cli->outbuf+len;
-	memcpy(p, tmp, name_len(tmp));
-	len += name_len(tmp);
+	namelen = name_len((unsigned char *)tmp, talloc_get_size(tmp));
+	if (namelen > 0) {
+		memcpy(p, tmp, namelen);
+		len += namelen;
+	}
 	TALLOC_FREE(tmp);
 
 	/* send a session request (RFC 1002) */

Modified: branches/samba/backports.org/lenny/source3/libsmb/clikrb5.c
===================================================================
--- branches/samba/backports.org/lenny/source3/libsmb/clikrb5.c	2010-10-23 19:21:11 UTC (rev 3631)
+++ branches/samba/backports.org/lenny/source3/libsmb/clikrb5.c	2010-10-26 20:27:36 UTC (rev 3632)
@@ -28,14 +28,16 @@
 
 #define GSSAPI_CHECKSUM      0x8003             /* Checksum type value for Kerberos */
 #define GSSAPI_BNDLENGTH     16                 /* Bind Length (rfc-1964 pg.3) */
-#define GSSAPI_CHECKSUM_SIZE (12+GSSAPI_BNDLENGTH)
+#define GSSAPI_CHECKSUM_SIZE (4+GSSAPI_BNDLENGTH+4) /* Length of bind length,
+							bind field, flags field. */
 
-#if defined(TKT_FLG_OK_AS_DELEGATE ) && defined(HAVE_KRB5_FWD_TGT_CREDS) && defined(HAVE_KRB5_AUTH_CON_SET_REQ_CKSUMTYPE) && defined(KRB5_AUTH_CONTEXT_USE_SUBKEY)
-static krb5_error_code ads_krb5_get_fwd_ticket( krb5_context context,
-                                         krb5_auth_context *auth_context,
-                                         krb5_creds *credsp,
-                                         krb5_ccache ccache,
-                                         krb5_data *authenticator);
+/* MIT krb5 1.7beta3 (in Ubuntu Karmic) is missing the prototype,
+   but still has the symbol */
+#if !HAVE_DECL_KRB5_AUTH_CON_SET_REQ_CKSUMTYPE
+krb5_error_code krb5_auth_con_set_req_cksumtype(  
+	krb5_context     context,
+	krb5_auth_context      auth_context,  
+	krb5_cksumtype     cksumtype);
 #endif
 
 /**************************************************************
@@ -645,6 +647,92 @@
 	return True;
 }
 
+/* Allocate and setup the auth context into the state we need. */
+
+static krb5_error_code setup_auth_context(krb5_context context,
+			krb5_auth_context *auth_context)
+{
+	krb5_error_code retval;
+
+	retval = krb5_auth_con_init(context, auth_context );
+	if (retval) {
+		DEBUG(1,("krb5_auth_con_init failed (%s)\n",
+			error_message(retval)));
+		return retval;
+	}
+
+	/* Ensure this is an addressless ticket. */
+	retval = krb5_auth_con_setaddrs(context, *auth_context, NULL, NULL);
+	if (retval) {
+		DEBUG(1,("krb5_auth_con_setaddrs failed (%s)\n",
+			error_message(retval)));
+	}
+
+	return retval;
+}
+
+static krb5_error_code create_gss_checksum(krb5_data *in_data, /* [inout] */
+						uint32_t gss_flags)
+{
+	unsigned int orig_length = in_data->length;
+	unsigned int base_cksum_size = GSSAPI_CHECKSUM_SIZE;
+	char *gss_cksum = NULL;
+
+	if (orig_length) {
+		/* Extra length field for delgated ticket. */
+		base_cksum_size += 4;
+	}
+
+	if ((unsigned int)base_cksum_size + orig_length <
+			(unsigned int)base_cksum_size) {
+                return EINVAL;
+        }
+
+	gss_cksum = (char *)SMB_MALLOC(base_cksum_size + orig_length);
+	if (gss_cksum == NULL) {
+		return ENOMEM;
+        }
+
+	memset(gss_cksum, '\0', base_cksum_size + orig_length);
+	SIVAL(gss_cksum, 0, GSSAPI_BNDLENGTH);
+
+	/* Precalculated MD5sum of NULL channel bindings (20 bytes) */
+	/* Channel bindings are: (all ints encoded as little endian)
+
+		[4 bytes] initiator_addrtype (255 for null bindings)
+		[4 bytes] initiator_address length
+			[n bytes] .. initiator_address data - not present
+				     in null bindings.
+		[4 bytes] acceptor_addrtype (255 for null bindings)
+		[4 bytes] acceptor_address length
+			[n bytes] .. acceptor_address data - not present
+				     in null bindings.
+		[4 bytes] application_data length
+			[n bytes] .. application_ data - not present
+				     in null bindings.
+		MD5 of this is ""\x14\x8f\x0c\xf7\xb1u\xdey*J\x9a%\xdfV\xc5\x18"
+	*/
+
+	memcpy(&gss_cksum[4],
+		"\x14\x8f\x0c\xf7\xb1u\xdey*J\x9a%\xdfV\xc5\x18",
+		GSSAPI_BNDLENGTH);
+
+	SIVAL(gss_cksum, 20, gss_flags);
+
+	if (orig_length) {
+		SSVAL(gss_cksum, 24, 1); /* The Delegation Option identifier */
+		SSVAL(gss_cksum, 26, orig_length);
+		/* Copy the kerberos KRB_CRED data */
+		memcpy(gss_cksum + 28, in_data->data, orig_length);
+		free(in_data->data);
+		in_data->data = NULL;
+		in_data->length = 0;
+	}
+	in_data->data = gss_cksum;
+	in_data->length = base_cksum_size + orig_length;
+	return 0;
+}
+
 /*
   we can't use krb5_mk_req because w2k wants the service to be in a particular format
 */
@@ -665,7 +753,8 @@
 	krb5_data in_data;
 	bool creds_ready = False;
 	int i = 0, maxtries = 3;
-	
+	uint32_t gss_flags = 0;
+
 	ZERO_STRUCT(in_data);
 
 	retval = smb_krb5_parse_name(context, principal, &server);
@@ -735,45 +824,51 @@
 		*expire_time = (time_t)credsp->times.endtime;
 	}
 
-#if defined(TKT_FLG_OK_AS_DELEGATE ) && defined(HAVE_KRB5_FWD_TGT_CREDS) && defined(HAVE_KRB5_AUTH_CON_SET_REQ_CKSUMTYPE) && defined(KRB5_AUTH_CONTEXT_USE_SUBKEY)
+	/* Allocate the auth_context. */
+	retval = setup_auth_context(context, auth_context);
+	if (retval) {
+		DEBUG(1,("setup_auth_context failed (%s)\n",
+			error_message(retval)));
+		goto cleanup_creds;
+	}
+
+#if defined(TKT_FLG_OK_AS_DELEGATE ) && defined(HAVE_KRB5_FWD_TGT_CREDS) && defined(HAVE_KRB5_AUTH_CON_SETUSERUSERKEY) && defined(KRB5_AUTH_CONTEXT_USE_SUBKEY)
 	if( credsp->ticket_flags & TKT_FLG_OK_AS_DELEGATE ) {
 		/* Fetch a forwarded TGT from the KDC so that we can hand off a 2nd ticket
 		 as part of the kerberos exchange. */
 
 		DEBUG( 3, ("ads_krb5_mk_req: server marked as OK to delegate to, building forwardable TGT\n")  );
 
-		if( *auth_context == NULL ) {
-			/* Allocate if it has not yet been allocated. */
-			retval = krb5_auth_con_init( context, auth_context );
-			if (retval) {
-				DEBUG(1,("ads_krb5_mk_req: krb5_auth_con_init failed (%s)\n",
-					error_message(retval)));
-				goto cleanup_creds;
-			}
-		}
-
-		retval = krb5_auth_con_setuseruserkey( context, *auth_context, &credsp->keyblock );
+		retval = krb5_auth_con_setuseruserkey(context,
+					*auth_context,
+					&credsp->keyblock );
 		if (retval) {
-			DEBUG(1,("ads_krb5_mk_req: krb5_auth_con_setuseruserkey failed (%s)\n",
+			DEBUG(1,("krb5_auth_con_setuseruserkey failed (%s)\n",
 				error_message(retval)));
 			goto cleanup_creds;
 		}
 
 		/* Must use a subkey for forwarded tickets. */
-		retval = krb5_auth_con_setflags( context, *auth_context, KRB5_AUTH_CONTEXT_USE_SUBKEY);
+		retval = krb5_auth_con_setflags(context,
+				*auth_context,
+				KRB5_AUTH_CONTEXT_USE_SUBKEY);
 		if (retval) {
-			DEBUG(1,("ads_krb5_mk_req: krb5_auth_con_setflags failed (%s)\n",
+			DEBUG(1,("krb5_auth_con_setflags failed (%s)\n",
 				error_message(retval)));
 			goto cleanup_creds;
 		}
 
-		retval = ads_krb5_get_fwd_ticket( context,
-						auth_context,
-						credsp,
-						ccache,
-						&in_data );
+		retval = krb5_fwd_tgt_creds(context,/* Krb5 context [in] */
+				*auth_context,  /* Authentication context [in] */
+				CONST_DISCARD(char *, KRB5_TGS_NAME),  /* Ticket service name ("krbtgt") [in] */
+				credsp->client, /* Client principal for the tgt [in] */
+				credsp->server, /* Server principal for the tgt [in] */
+				ccache,         /* Credential cache to use for storage [in] */
+				1,              /* Turn on for "Forwardable ticket" [in] */
+				&in_data );     /* Resulting response [out] */
+
 		if (retval) {
-			DEBUG( 3, ("ads_krb5_get_fwd_ticket failed (%s)\n",
+			DEBUG( 3, ("krb5_fwd_tgt_creds failed (%s)\n",
 				   error_message( retval ) ) );
 
 			/*
@@ -788,10 +883,35 @@
 			}
 			krb5_auth_con_free(context, *auth_context);
 			*auth_context = NULL;
+			retval = setup_auth_context(context, auth_context);
+			if (retval) {
+				DEBUG(1,("setup_auth_context failed (%s)\n",
+					error_message(retval)));
+				goto cleanup_creds;
+			}
+		} else {
+			/* We got a delegated ticket. */
+			gss_flags |= GSS_C_DELEG_FLAG;
 		}
 	}
 #endif
 
+	/* Frees and reallocates in_data into a GSS checksum blob. */
+	retval = create_gss_checksum(&in_data, gss_flags);
+	if (retval) {
+		goto cleanup_data;
+	}
+
+#if defined(HAVE_KRB5_AUTH_CON_SET_REQ_CKSUMTYPE)
+	/* We always want GSS-checksum types. */
+	retval = krb5_auth_con_set_req_cksumtype(context, *auth_context, GSSAPI_CHECKSUM );
+	if (retval) {
+		DEBUG(1,("krb5_auth_con_set_req_cksumtype failed (%s)\n",
+			error_message(retval)));
+		goto cleanup_data;
+	}
+#endif
+
 	retval = krb5_mk_req_extended(context, auth_context, ap_req_options, 
 				      &in_data, credsp, outbuf);
 	if (retval) {
@@ -799,6 +919,7 @@
 			 error_message(retval)));
 	}
 
+cleanup_data:
 	if (in_data.data) {
 		free( in_data.data );
 		in_data.length = 0;
@@ -1846,128 +1967,6 @@
 	return ret;
 }
 
-#if defined(TKT_FLG_OK_AS_DELEGATE ) && defined(HAVE_KRB5_FWD_TGT_CREDS) && defined(HAVE_KRB5_AUTH_CON_SET_REQ_CKSUMTYPE) && defined(KRB5_AUTH_CONTEXT_USE_SUBKEY)
-/**************************************************************
-Routine: ads_krb5_get_fwd_ticket
- Description:
-    When a service ticket is flagged as trusted
-    for delegation we should provide a forwardable
-    ticket so that the remote host can act on our
-    behalf.  This is done by taking the 2nd forwardable
-    TGT and storing it in the GSS-API authenticator
-    "checksum".  This routine will populate
-    the krb5_data authenticator with this TGT.
- Parameters:
-    krb5_context context: The kerberos context for this authentication.
-    krb5_auth_context:    The authentication context.
-    krb5_creds *credsp:   The ticket credentials (AS-REP).
-    krb5_ccache ccache:   The credentials cache.
-    krb5_data &authenticator: The checksum field that will store the TGT, and
-     authenticator.data must be freed by the caller.
-
- Returns:
-    krb5_error_code: 0 if no errors, otherwise set.
-**************************************************************/
-
-static krb5_error_code ads_krb5_get_fwd_ticket( krb5_context context,
-					 krb5_auth_context *auth_context,
-					 krb5_creds *credsp,
-					 krb5_ccache ccache,
-					 krb5_data *authenticator)
-{
-	krb5_data fwdData;
-	krb5_error_code retval = 0;
-	char *pChksum = NULL;
-	char *p = NULL;
-
-/* MIT krb5 1.7beta3 (in Ubuntu Karmic) is missing the prototype,
-   but still has the symbol */
-#if !HAVE_DECL_KRB5_AUTH_CON_SET_REQ_CKSUMTYPE
-krb5_error_code krb5_auth_con_set_req_cksumtype(  
-	krb5_context     context,
-	krb5_auth_context      auth_context,  
-	krb5_cksumtype     cksumtype);
-#endif
-
-	ZERO_STRUCT(fwdData);
-	ZERO_STRUCTP(authenticator);
-
-	retval = krb5_fwd_tgt_creds(context,/* Krb5 context [in] */
-				*auth_context,  /* Authentication context [in] */
-				CONST_DISCARD(char *, KRB5_TGS_NAME),  /* Ticket service name ("krbtgt") [in] */
-				credsp->client, /* Client principal for the tgt [in] */
-				credsp->server, /* Server principal for the tgt [in] */
-				ccache,         /* Credential cache to use for storage [in] */
-				1,              /* Turn on for "Forwardable ticket" [in] */
-				&fwdData );     /* Resulting response [out] */
-
-
-	if (retval) {
-		DEBUG(1,("ads_krb5_get_fwd_ticket: krb5_fwd_tgt_creds failed (%s)\n", 
-			error_message(retval)));
-		goto out;
-	}
-
-	if ((unsigned int)GSSAPI_CHECKSUM_SIZE + (unsigned int)fwdData.length <
-		(unsigned int)GSSAPI_CHECKSUM_SIZE) {
-		retval = EINVAL;
-		goto out;
-	}
-
-	/* We're going to allocate a gssChecksum structure with a little
-	   extra data the length of the kerberos credentials length
-	   (APPLICATION 22) so that we can pack it on the end of the structure.
-	*/
-
-	pChksum	= (char *)SMB_MALLOC(GSSAPI_CHECKSUM_SIZE + fwdData.length );
-	if (!pChksum) {
-		retval = ENOMEM;
-		goto out;
-	}
-
-	p = pChksum;
-
-	SIVAL(p, 0, GSSAPI_BNDLENGTH);
-	p += 4;
-
-	/* Zero out the bindings fields */
-	memset(p, '\0', GSSAPI_BNDLENGTH );
-	p += GSSAPI_BNDLENGTH;
-
-	SIVAL(p, 0, GSS_C_DELEG_FLAG );
-	p += 4;
-	SSVAL(p, 0, 1 );
-	p += 2;
-	SSVAL(p, 0, fwdData.length );
-	p += 2;
-
-	/* Migrate the kerberos KRB_CRED data to the checksum delegation */
-	memcpy(p, fwdData.data, fwdData.length );
-	p += fwdData.length;
-
-	/* We need to do this in order to allow our GSS-API  */
-	retval = krb5_auth_con_set_req_cksumtype( context, *auth_context, GSSAPI_CHECKSUM );
-	if (retval) {
-		goto out;
-	}
-
-	/* We now have a service ticket, now turn it into an AP-REQ. */
-	authenticator->length = fwdData.length + GSSAPI_CHECKSUM_SIZE;
-
-	/* Caller should call free() when they're done with this. */
-	authenticator->data = (char *)pChksum;
-
-  out:
-
- 	/* Remove that input data, we never needed it anyway. */
-   	if (fwdData.length > 0) {
-  		krb5_free_data_contents( context, &fwdData );
-   	}
-
-	return retval;
-}
-#endif
-
 #if defined(HAVE_KRB5_GET_CREDS_OPT_SET_IMPERSONATE) && \
     defined(HAVE_KRB5_GET_CREDS_OPT_ALLOC) && \
     defined(HAVE_KRB5_GET_CREDS)

Modified: branches/samba/backports.org/lenny/source3/libsmb/climessage.c
===================================================================
--- branches/samba/backports.org/lenny/source3/libsmb/climessage.c	2010-10-23 19:21:11 UTC (rev 3631)
+++ branches/samba/backports.org/lenny/source3/libsmb/climessage.c	2010-10-26 20:27:36 UTC (rev 3632)
@@ -63,8 +63,10 @@
 
 	*p++ = 4;
 	memcpy(p, utmp, ulen);
+	p += ulen;
 	*p++ = 4;
 	memcpy(p, htmp, hlen);
+	p += hlen;
 	TALLOC_FREE(htmp);
 	TALLOC_FREE(utmp);
 
@@ -163,8 +165,8 @@
 		TALLOC_FREE(tmp);
 		return tevent_req_post(req, ev);
 	}
-	SCVAL(bytes, 0, 0);	/* pad */
-	SSVAL(bytes, 1, msglen);
+	SCVAL(bytes, 0, 1);	/* pad */
+	SSVAL(bytes+1, 0, msglen);
 	memcpy(bytes+3, msg, msglen);
 	TALLOC_FREE(tmp);
 

Modified: branches/samba/backports.org/lenny/source3/libsmb/clispnego.c
===================================================================
--- branches/samba/backports.org/lenny/source3/libsmb/clispnego.c	2010-10-23 19:21:11 UTC (rev 3631)
+++ branches/samba/backports.org/lenny/source3/libsmb/clispnego.c	2010-10-26 20:27:36 UTC (rev 3632)
@@ -4,7 +4,7 @@
    Copyright (C) Andrew Tridgell 2001
    Copyright (C) Jim McDonough <jmcd at us.ibm.com> 2002
    Copyright (C) Luke Howard     2003
-   
+
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 3 of the License, or
@@ -146,9 +146,16 @@
 	asn1_start_tag(data,ASN1_APPLICATION(0));
 
 	asn1_check_OID(data,OID_SPNEGO);
+
+	/* negTokenInit  [0]  NegTokenInit */
 	asn1_start_tag(data,ASN1_CONTEXT(0));
 	asn1_start_tag(data,ASN1_SEQUENCE(0));
 
+	/* mechTypes [0] MechTypeList  OPTIONAL */
+
+	/* Not really optional, we depend on this to decide
+	 * what mechanisms we have to work with. */
+
 	asn1_start_tag(data,ASN1_CONTEXT(0));
 	asn1_start_tag(data,ASN1_SEQUENCE(0));
 	for (i=0; asn1_tag_remaining(data) > 0 && i < ASN1_MAX_OIDS-1; i++) {
@@ -161,11 +168,45 @@
 	asn1_end_tag(data);
 
 	*principal = NULL;
-	if (asn1_tag_remaining(data) > 0) {
+
+	/*
+	  Win7 + Live Sign-in Assistant attaches a mechToken
+	  ASN1_CONTEXT(2) to the negTokenInit packet
+	  which breaks our negotiation if we just assume
+	  the next tag is ASN1_CONTEXT(3).
+	*/
+
+	if (asn1_peek_tag(data, ASN1_CONTEXT(1))) {
+		uint8 flags;
+
+		/* reqFlags [1] ContextFlags  OPTIONAL */
+		asn1_start_tag(data, ASN1_CONTEXT(1));
+		asn1_start_tag(data, ASN1_BIT_STRING);
+		while (asn1_tag_remaining(data) > 0) {
+			asn1_read_uint8(data, &flags);
+		}
+		asn1_end_tag(data);
+		asn1_end_tag(data);
+	}
+
+	if (asn1_peek_tag(data, ASN1_CONTEXT(2))) {
+		/* mechToken [2] OCTET STRING  OPTIONAL */
+		DATA_BLOB token;
+		asn1_start_tag(data, ASN1_CONTEXT(2));
+		asn1_read_OctetString(data, talloc_autofree_context(),
+			&token);
+		asn1_end_tag(data);
+		/* Throw away the token - not used. */
+		data_blob_free(&token);
+	}
+
+	if (asn1_peek_tag(data, ASN1_CONTEXT(3))) {
+		/* mechListMIC [3] OCTET STRING  OPTIONAL */
 		asn1_start_tag(data, ASN1_CONTEXT(3));
 		asn1_start_tag(data, ASN1_SEQUENCE(0));
 		asn1_start_tag(data, ASN1_CONTEXT(0));
-		asn1_read_GeneralString(data,talloc_autofree_context(),principal);
+		asn1_read_GeneralString(data,talloc_autofree_context(),
+			principal);
 		asn1_end_tag(data);
 		asn1_end_tag(data);
 		asn1_end_tag(data);

Modified: branches/samba/backports.org/lenny/source3/libsmb/nmblib.c
===================================================================
--- branches/samba/backports.org/lenny/source3/libsmb/nmblib.c	2010-10-23 19:21:11 UTC (rev 3631)
+++ branches/samba/backports.org/lenny/source3/libsmb/nmblib.c	2010-10-26 20:27:36 UTC (rev 3632)
@@ -1237,21 +1237,33 @@
 
 /****************************************************************************
  Interpret the weird netbios "name" into a unix fstring. Return the name type.
+ Returns -1 on error.
 ****************************************************************************/
 
-static int name_interpret(char *in, fstring name)
+static int name_interpret(unsigned char *buf, size_t buf_len,
+		unsigned char *in, fstring name)
 {
+	unsigned char *end_ptr = buf + buf_len;
 	int ret;
-	int len = (*in++) / 2;
+	unsigned int len;
 	fstring out_string;
-	char *out = out_string;
+	unsigned char *out = (unsigned char *)out_string;
 
 	*out=0;
 
-	if (len > 30 || len<1)
-		return(0);
+	if (in >= end_ptr) {
+		return -1;
+	}
+	len = (*in++) / 2;
 
+	if (len<1) {
+		return -1;
+	}
+
 	while (len--) {
+		if (&in[1] >= end_ptr) {
+			return -1;
+		}
 		if (in[0] < 'A' || in[0] > 'P' || in[1] < 'A' || in[1] > 'P') {
 			*out = 0;
 			return(0);
@@ -1259,21 +1271,13 @@
 		*out = ((in[0]-'A')<<4) + (in[1]-'A');
 		in += 2;
 		out++;
+		if (PTR_DIFF(out,out_string) >= sizeof(fstring)) {
+			return -1;
+		}
 	}
 	ret = out[-1];
 	out[-1] = 0;
 
-#ifdef NETBIOS_SCOPE
-	/* Handle any scope names */
-	while(*in) {
-		*out++ = '.'; /* Scope names are separated by periods */
-		len = *(unsigned char *)in++;
-		StrnCpy(out, in, len);
-		out += len;
-		*out=0;
-		in += len;
-	}
-#endif
 	pull_ascii_fstring(name, out_string);
 
 	return(ret);
@@ -1352,12 +1356,25 @@
  Find a pointer to a netbios name.
 ****************************************************************************/
 
-static char *name_ptr(char *buf,int ofs)
+static unsigned char *name_ptr(unsigned char *buf, size_t buf_len, unsigned int ofs)
 {
-	unsigned char c = *(unsigned char *)(buf+ofs);
+	unsigned char c = 0;
 
+	if (ofs > buf_len || buf_len < 1) {
+		return NULL;
+	}
+
+	c = *(unsigned char *)(buf+ofs);
 	if ((c & 0xC0) == 0xC0) {
-		uint16 l = RSVAL(buf, ofs) & 0x3FFF;
+		uint16 l = 0;
+
+		if (ofs > buf_len - 1) {
+			return NULL;
+		}
+		l = RSVAL(buf, ofs) & 0x3FFF;
+		if (l > buf_len) {
+			return NULL;
+		}
 		DEBUG(5,("name ptr to pos %d from %d is %s\n",l,ofs,buf+l));
 		return(buf + l);
 	} else {
@@ -1367,37 +1384,48 @@
 
 /****************************************************************************
  Extract a netbios name from a buf (into a unix string) return name type.
+ Returns -1 on error.
 ****************************************************************************/
 
-int name_extract(char *buf,int ofs, fstring name)
+int name_extract(unsigned char *buf, size_t buf_len, unsigned int ofs, fstring name)
 {
-	char *p = name_ptr(buf,ofs);
-	int d = PTR_DIFF(p,buf+ofs);
+	unsigned char *p = name_ptr(buf,buf_len,ofs);
 
 	name[0] = '\0';
-	if (d < -50 || d > 50)
-		return(0);
-	return(name_interpret(p,name));
+	if (p == NULL) {
+		return -1;
+	}
+	return(name_interpret(buf,buf_len,p,name));
 }
 
 /****************************************************************************
  Return the total storage length of a mangled name.
+ Returns -1 on error.
 ****************************************************************************/
 
-int name_len(char *s1)
+int name_len(unsigned char *s1, size_t buf_len)
 {
 	/* NOTE: this argument _must_ be unsigned */
 	unsigned char *s = (unsigned char *)s1;
-	int len;
+	int len = 0;
 
+	if (buf_len < 1) {
+		return -1;
+	}
 	/* If the two high bits of the byte are set, return 2. */
-	if (0xC0 == (*s & 0xC0))
+	if (0xC0 == (*s & 0xC0)) {
+		if (buf_len < 2) {
+			return -1;
+		}
 		return(2);
+	}
 
 	/* Add up the length bytes. */
 	for (len = 1; (*s); s += (*s) + 1) {
 		len += *s + 1;
-		SMB_ASSERT(len < 80);
+		if (len > buf_len) {
+			return -1;
+		}
 	}
 
 	return(len);

Modified: branches/samba/backports.org/lenny/source3/modules/vfs_acl_common.c
===================================================================
--- branches/samba/backports.org/lenny/source3/modules/vfs_acl_common.c	2010-10-23 19:21:11 UTC (rev 3631)
+++ branches/samba/backports.org/lenny/source3/modules/vfs_acl_common.c	2010-10-26 20:27:36 UTC (rev 3632)
@@ -471,7 +471,8 @@
 			nt_errstr(status) ));
 		return status;
 	}
-	status = smb1_file_se_access_check(parent_desc,
+	status = smb1_file_se_access_check(handle->conn,
+					parent_desc,
 					handle->conn->server_info->ptok,
 					access_mask,
 					&access_granted);
@@ -535,7 +536,8 @@
 				&pdesc);
         if (NT_STATUS_IS_OK(status)) {
 		/* See if we can access it. */
-		status = smb1_file_se_access_check(pdesc,
+		status = smb1_file_se_access_check(handle->conn,
+					pdesc,
 					handle->conn->server_info->ptok,
 					fsp->access_mask,
 					&access_granted);

Modified: branches/samba/backports.org/lenny/source3/printing/load.c
===================================================================
--- branches/samba/backports.org/lenny/source3/printing/load.c	2010-10-23 19:21:11 UTC (rev 3631)
+++ branches/samba/backports.org/lenny/source3/printing/load.c	2010-10-26 20:27:36 UTC (rev 3632)
@@ -31,6 +31,10 @@
 	char *saveptr;
 
 	if (pnum < 0)
+		if (process_registry_service(PRINTERS_NAME))
+			pnum = lp_servicenumber(PRINTERS_NAME);
+
+	if (pnum < 0)
 		return;
 
 	if ((str = SMB_STRDUP(lp_auto_services())) == NULL)

Modified: branches/samba/backports.org/lenny/source3/printing/nt_printing.c
===================================================================
--- branches/samba/backports.org/lenny/source3/printing/nt_printing.c	2010-10-23 19:21:11 UTC (rev 3631)
+++ branches/samba/backports.org/lenny/source3/printing/nt_printing.c	2010-10-26 20:27:36 UTC (rev 3632)
@@ -5727,7 +5727,9 @@
 
         if (!NT_STATUS_IS_OK(status) &&
 	    (token_contains_name_in_list(uidtoname(server_info->utok.uid),
-					 NULL, NULL, server_info->ptok,
+					 pdb_get_domain(server_info->sam_account),
+					 NULL,
+					 server_info->ptok,
 					 lp_printer_admin(snum)))) {
 		talloc_destroy(mem_ctx);
 		return True;

Modified: branches/samba/backports.org/lenny/source3/registry/reg_api.c
===================================================================
--- branches/samba/backports.org/lenny/source3/registry/reg_api.c	2010-10-23 19:21:11 UTC (rev 3631)
+++ branches/samba/backports.org/lenny/source3/registry/reg_api.c	2010-10-26 20:27:36 UTC (rev 3632)
@@ -953,7 +953,7 @@
 	/* open the registry file....fail if the file already exists */
 
 	regfile = regfio_open(fname, (O_RDWR|O_CREAT|O_EXCL),
-			      (S_IREAD|S_IWRITE));
+			      (S_IRUSR|S_IWUSR));
 	if (regfile == NULL) {
 		DEBUG(0,("backup_registry_key: failed to open \"%s\" (%s)\n",
 			 fname, strerror(errno) ));

Modified: branches/samba/backports.org/lenny/source3/rpc_client/cli_pipe.c
===================================================================
--- branches/samba/backports.org/lenny/source3/rpc_client/cli_pipe.c	2010-10-23 19:21:11 UTC (rev 3631)
+++ branches/samba/backports.org/lenny/source3/rpc_client/cli_pipe.c	2010-10-26 20:27:36 UTC (rev 3632)
@@ -3213,7 +3213,7 @@
 	result->a_u.schannel_auth->state = SCHANNEL_STATE_START;
 	result->a_u.schannel_auth->seq_num = 0;
 	result->a_u.schannel_auth->initiator = true;
-	result->a_u.schannel_auth->creds = creds;
+	result->a_u.schannel_auth->creds = netlogon_creds_copy(result, creds);
 
 	*presult = result;
 	return NT_STATUS_OK;
@@ -4044,9 +4044,13 @@
 
 	/*
 	 * The credentials on a new netlogon pipe are the ones we are passed
-	 * in - reference them in
+	 * in - copy them over
 	 */
-	result->dc = talloc_move(result, pdc);
+	result->dc = netlogon_creds_copy(result, *pdc);
+	if (result->dc == NULL) {
+		TALLOC_FREE(result);
+		return NT_STATUS_NO_MEMORY;
+	}
 
 	DEBUG(10,("cli_rpc_pipe_open_schannel_with_key: opened pipe %s to machine %s "
 		  "for domain %s and bound using schannel.\n",

Modified: branches/samba/backports.org/lenny/source3/rpc_client/init_spoolss.c
===================================================================
--- branches/samba/backports.org/lenny/source3/rpc_client/init_spoolss.c	2010-10-23 19:21:11 UTC (rev 3631)
+++ branches/samba/backports.org/lenny/source3/rpc_client/init_spoolss.c	2010-10-26 20:27:36 UTC (rev 3632)
@@ -73,3 +73,32 @@
 	}
 	return WERR_OK;
 }
+
+/*******************************************************************
+ ********************************************************************/
+
+void spoolss_printerinfo2_to_setprinterinfo2(const struct spoolss_PrinterInfo2 *i,
+					     struct spoolss_SetPrinterInfo2 *s)
+{
+	s->servername		= i->servername;
+	s->printername		= i->printername;
+	s->sharename		= i->sharename;
+	s->portname		= i->portname;
+	s->drivername		= i->drivername;
+	s->comment		= i->comment;
+	s->location		= i->location;
+	s->devmode_ptr		= 0;
+	s->sepfile		= i->sepfile;
+	s->printprocessor	= i->printprocessor;
+	s->datatype		= i->datatype;
+	s->parameters		= i->parameters;
+	s->secdesc_ptr		= 0;
+	s->attributes		= i->attributes;
+	s->priority		= i->priority;
+	s->defaultpriority	= i->defaultpriority;
+	s->starttime		= i->starttime;
+	s->untiltime		= i->untiltime;
+	s->status		= i->status;
+	s->cjobs		= i->cjobs;
+	s->averageppm		= i->averageppm;
+}

Modified: branches/samba/backports.org/lenny/source3/rpc_server/srv_pipe.c
===================================================================
--- branches/samba/backports.org/lenny/source3/rpc_server/srv_pipe.c	2010-10-23 19:21:11 UTC (rev 3631)
+++ branches/samba/backports.org/lenny/source3/rpc_server/srv_pipe.c	2010-10-26 20:27:36 UTC (rev 3632)
@@ -1184,7 +1184,8 @@
 	}
 
 	/* parse out the OIDs and the first sec blob */
-	if (!parse_negTokenTarg(blob, OIDs, &secblob)) {
+	if (!parse_negTokenTarg(blob, OIDs, &secblob) ||
+			OIDs[0] == NULL) {
 		DEBUG(0,("pipe_spnego_auth_bind_negotiate: Failed to parse the security blob.\n"));
 		goto err;
         }

Modified: branches/samba/backports.org/lenny/source3/rpc_server/srv_spoolss_nt.c
===================================================================
--- branches/samba/backports.org/lenny/source3/rpc_server/srv_spoolss_nt.c	2010-10-23 19:21:11 UTC (rev 3631)
+++ branches/samba/backports.org/lenny/source3/rpc_server/srv_spoolss_nt.c	2010-10-26 20:27:36 UTC (rev 3632)
@@ -432,6 +432,14 @@
 	NT_PRINTER_INFO_LEVEL *printer = NULL;
 	WERROR result;
 
+	/*
+	 * Hopefully nobody names his printers like this. Maybe \ or ,
+	 * are illegal in printer names even?
+	 */
+	const char printer_not_found[] = "Printer \\, !@#$%^&*( not found";
+	char *cache_key;
+	char *tmp;
+
 	DEBUG(4,("Setting printer name=%s (len=%lu)\n", handlename,
 		(unsigned long)strlen(handlename)));
 
@@ -474,6 +482,27 @@
 		found = true;
 	}
 
+	/*
+	 * With hundreds of printers, the "for" loop iterating all
+	 * shares can be quite expensive, as it is done on every
+	 * OpenPrinter. The loop maps "aprinter" to "sname", the
+	 * result of which we cache in gencache.
+	 */
+
+	cache_key = talloc_asprintf(talloc_tos(), "PRINTERNAME/%s",
+				    aprinter);
+	if ((cache_key != NULL) && gencache_get(cache_key, &tmp, NULL)) {
+
+		found = (strcmp(tmp, printer_not_found) != 0);
+		if (!found) {
+			DEBUG(4, ("Printer %s not found\n", aprinter));
+			SAFE_FREE(tmp);
+			return false;
+		}
+		fstrcpy(sname, tmp);
+		SAFE_FREE(tmp);
+	}
+
 	/* Search all sharenames first as this is easier than pulling
 	   the printer_info_2 off of disk. Don't use find_service() since
 	   that calls out to map_username() */
@@ -539,10 +568,20 @@
 	free_a_printer( &printer, 2);
 
 	if ( !found ) {
+		if (cache_key != NULL) {
+			gencache_set(cache_key, printer_not_found,
+				     time(NULL)+300);
+			TALLOC_FREE(cache_key);
+		}
 		DEBUGADD(4,("Printer not found\n"));
 		return false;
 	}
 
+	if (cache_key != NULL) {
+		gencache_set(cache_key, sname, time(NULL)+300);
+		TALLOC_FREE(cache_key);
+	}
+
 	DEBUGADD(4,("set_printer_hnd_name: Printer found: %s -> %s\n", aprinter, sname));
 
 	fstrcpy(Printer->sharename, sname);
@@ -1645,7 +1684,8 @@
 						 &se_printop ) &&
 			    !token_contains_name_in_list(
 				    uidtoname(p->server_info->utok.uid),
-				    NULL, NULL,
+				    pdb_get_domain(p->server_info->sam_account),
+				    NULL,
 				    p->server_info->ptok,
 				    lp_printer_admin(snum))) {
 				close_printer_handle(p, r->out.handle);
@@ -1941,8 +1981,10 @@
 	if ( (p->server_info->utok.uid != sec_initial_uid())
 		&& !user_has_privileges(p->server_info->ptok, &se_printop )
 		&& !token_contains_name_in_list(
-			uidtoname(p->server_info->utok.uid), NULL,
-			NULL, p->server_info->ptok,
+			uidtoname(p->server_info->utok.uid),
+			pdb_get_domain(p->server_info->sam_account),
+			NULL,
+			p->server_info->ptok,
 			lp_printer_admin(-1)) )
 	{
 		return WERR_ACCESS_DENIED;
@@ -2040,7 +2082,9 @@
 	if ( (p->server_info->utok.uid != sec_initial_uid())
 		&& !user_has_privileges(p->server_info->ptok, &se_printop )
 		&& !token_contains_name_in_list(
-			uidtoname(p->server_info->utok.uid), NULL, NULL,
+			uidtoname(p->server_info->utok.uid),
+			pdb_get_domain(p->server_info->sam_account),
+			NULL,
 			p->server_info->ptok, lp_printer_admin(-1)) )
 	{
 		return WERR_ACCESS_DENIED;
@@ -7845,7 +7889,8 @@
 	if ((p->server_info->utok.uid != sec_initial_uid()) &&
 	     !user_has_privileges(p->server_info->ptok, &se_printop) &&
 	     !token_contains_name_in_list(uidtoname(p->server_info->utok.uid),
-					  NULL, NULL,
+					  pdb_get_domain(p->server_info->sam_account),
+					  NULL,
 					  p->server_info->ptok,
 					  lp_printer_admin(snum))) {
 		DEBUG(2,("_spoolss_Addform: denied by insufficient permissions.\n"));
@@ -7926,7 +7971,8 @@
 	if ((p->server_info->utok.uid != sec_initial_uid()) &&
 	     !user_has_privileges(p->server_info->ptok, &se_printop) &&
 	     !token_contains_name_in_list(uidtoname(p->server_info->utok.uid),
-					  NULL, NULL,
+					  pdb_get_domain(p->server_info->sam_account),
+					  NULL,
 					  p->server_info->ptok,
 					  lp_printer_admin(snum))) {
 		DEBUG(2,("_spoolss_DeleteForm: denied by insufficient permissions.\n"));
@@ -8009,7 +8055,8 @@
 	if ((p->server_info->utok.uid != sec_initial_uid()) &&
 	     !user_has_privileges(p->server_info->ptok, &se_printop) &&
 	     !token_contains_name_in_list(uidtoname(p->server_info->utok.uid),
-					  NULL, NULL,
+					  pdb_get_domain(p->server_info->sam_account),
+					  NULL,
 					  p->server_info->ptok,
 					  lp_printer_admin(snum))) {
 		DEBUG(2,("_spoolss_Setform: denied by insufficient permissions.\n"));

Modified: branches/samba/backports.org/lenny/source3/rpc_server/srv_winreg_nt.c
===================================================================
--- branches/samba/backports.org/lenny/source3/rpc_server/srv_winreg_nt.c	2010-10-23 19:21:11 UTC (rev 3631)
+++ branches/samba/backports.org/lenny/source3/rpc_server/srv_winreg_nt.c	2010-10-26 20:27:36 UTC (rev 3632)
@@ -220,8 +220,8 @@
 	struct registry_key *regkey = find_regkey_by_hnd( p, r->in.handle );
 	prs_struct    prs_hkpd;
 
-	uint8_t *outbuf;
-	uint32_t outbuf_size;
+	uint8_t *outbuf = NULL;
+	uint32_t outbuf_size = 0;
 
 	DATA_BLOB val_blob;
 	bool free_buf = False;

Modified: branches/samba/backports.org/lenny/source3/rpcclient/cmd_spoolss.c
===================================================================
--- branches/samba/backports.org/lenny/source3/rpcclient/cmd_spoolss.c	2010-10-23 19:21:11 UTC (rev 3631)
+++ branches/samba/backports.org/lenny/source3/rpcclient/cmd_spoolss.c	2010-10-26 20:27:36 UTC (rev 3632)
@@ -462,6 +462,7 @@
 	uint32_t 	info_level = 2;
 	union spoolss_PrinterInfo info;
 	struct spoolss_SetPrinterInfoCtr info_ctr;
+	struct spoolss_SetPrinterInfo2 info2;
 	const char	*printername, *comment = NULL;
 	struct spoolss_DevmodeContainer devmode_ctr;
 	struct sec_desc_buf secdesc_ctr;
@@ -501,12 +502,11 @@
 
 
 	/* Modify the comment. */
-	info.info2.comment = comment;
-	info.info2.secdesc = NULL;
-	info.info2.devmode = NULL;
+	spoolss_printerinfo2_to_setprinterinfo2(&info.info2, &info2);
+	info2.comment = comment;
 
 	info_ctr.level = 2;
-	info_ctr.info.info2 = (struct spoolss_SetPrinterInfo2 *)&info.info2;
+	info_ctr.info.info2 = &info2;
 
 	status = rpccli_spoolss_SetPrinter(cli, mem_ctx,
 					   &pol,
@@ -540,6 +540,7 @@
 	const char 	*printername,
 			*new_printername = NULL;
 	struct spoolss_SetPrinterInfoCtr info_ctr;
+	struct spoolss_SetPrinterInfo2 info2;
 	struct spoolss_DevmodeContainer devmode_ctr;
 	struct sec_desc_buf secdesc_ctr;
 
@@ -577,12 +578,11 @@
                 goto done;
 
 	/* Modify the printername. */
-	info.info2.printername = new_printername;
-	info.info2.devmode = NULL;
-	info.info2.secdesc = NULL;
+	spoolss_printerinfo2_to_setprinterinfo2(&info.info2, &info2);
+	info2.printername = new_printername;
 
-	info_ctr.level = info_level;
-	info_ctr.info.info2 = (struct spoolss_SetPrinterInfo2 *)&info.info2;
+	info_ctr.level = 2;
+	info_ctr.info.info2 = &info2;
 
 	status = rpccli_spoolss_SetPrinter(cli, mem_ctx,
 					   &pol,
@@ -1776,27 +1776,8 @@
 
 	/* Set the printer driver */
 
-	info2.servername	= info.info2.servername;
-	info2.printername	= info.info2.printername;
-	info2.sharename		= info.info2.sharename;
-	info2.portname		= info.info2.portname;
-	info2.drivername	= argv[2];
-	info2.comment		= info.info2.comment;
-	info2.location		= info.info2.location;
-	info2.devmode_ptr	= 0;
-	info2.sepfile		= info.info2.sepfile;
-	info2.printprocessor	= info.info2.printprocessor;
-	info2.datatype		= info.info2.datatype;
-	info2.parameters	= info.info2.parameters;
-	info2.secdesc_ptr	= 0;
-	info2.attributes	= info.info2.attributes;
-	info2.priority		= info.info2.priority;
-	info2.defaultpriority	= info.info2.defaultpriority;
-	info2.starttime		= info.info2.starttime;
-	info2.untiltime		= info.info2.untiltime;
-	info2.status		= info.info2.status;
-	info2.cjobs		= info.info2.cjobs;
-	info2.averageppm	= info.info2.averageppm;
+	spoolss_printerinfo2_to_setprinterinfo2(&info.info2, &info2);
+	info2.drivername = argv[2];
 
 	info_ctr.level = 2;
 	info_ctr.info.info2 = &info2;

Modified: branches/samba/backports.org/lenny/source3/rpcclient/rpcclient.c
===================================================================
--- branches/samba/backports.org/lenny/source3/rpcclient/rpcclient.c	2010-10-23 19:21:11 UTC (rev 3631)
+++ branches/samba/backports.org/lenny/source3/rpcclient/rpcclient.c	2010-10-26 20:27:36 UTC (rev 3632)
@@ -49,7 +49,7 @@
 ****************************************************************************/
 static char **completion_fn(const char *text, int start, int end)
 {
-#define MAX_COMPLETIONS 100
+#define MAX_COMPLETIONS 1000
 	char **matches;
 	int i, count=0;
 	struct cmd_list *commands = cmd_list;

Modified: branches/samba/backports.org/lenny/source3/smbd/fileio.c
===================================================================
--- branches/samba/backports.org/lenny/source3/smbd/fileio.c	2010-10-23 19:21:11 UTC (rev 3631)
+++ branches/samba/backports.org/lenny/source3/smbd/fileio.c	2010-10-26 20:27:36 UTC (rev 3632)
@@ -312,14 +312,15 @@
 		fsp->modified = True;
 
 		if (SMB_VFS_FSTAT(fsp, &fsp->fsp_name->st) == 0) {
-			int dosmode;
 			trigger_write_time_update(fsp);
-			dosmode = dos_mode(fsp->conn, fsp->fsp_name);
-			if ((lp_store_dos_attributes(SNUM(fsp->conn)) ||
-					MAP_ARCHIVE(fsp->conn)) &&
-					!IS_DOS_ARCHIVE(dosmode)) {
-				file_set_dosmode(fsp->conn, fsp->fsp_name,
+			if (!fsp->posix_open &&
+					(lp_store_dos_attributes(SNUM(fsp->conn)) ||
+					MAP_ARCHIVE(fsp->conn))) {
+				int dosmode = dos_mode(fsp->conn, fsp->fsp_name);
+				if (!IS_DOS_ARCHIVE(dosmode)) {
+					file_set_dosmode(fsp->conn, fsp->fsp_name,
 						 dosmode | aARCH, NULL, false);
+				}
 			}
 
 			/*

Modified: branches/samba/backports.org/lenny/source3/smbd/notify.c
===================================================================
--- branches/samba/backports.org/lenny/source3/smbd/notify.c	2010-10-23 19:21:11 UTC (rev 3631)
+++ branches/samba/backports.org/lenny/source3/smbd/notify.c	2010-10-26 20:27:36 UTC (rev 3632)
@@ -76,6 +76,7 @@
 	for (i=0; i<num_changes; i++) {
 		struct notify_change *c;
 		size_t namelen;
+		int    rem = 0;
 		uint32 u32_tmp;	/* Temp arg to prs_uint32 to avoid
 				 * signed/unsigned issues */
 
@@ -101,6 +102,11 @@
 		 */
 
 		u32_tmp = (i == num_changes-1) ? 0 : namelen + 12;
+
+		/* Align on 4-byte boundary according to MS-CIFS 2.2.7.4.2 */
+		if ((rem = u32_tmp % 4 ) != 0)
+			u32_tmp += 4 - rem;
+
 		if (!prs_uint32("offset", ps, 1, &u32_tmp)) goto fail;
 
 		u32_tmp = c->action;
@@ -116,6 +122,10 @@
 		 */
 		prs_set_offset(ps, prs_offset(ps)-2);
 
+		if (rem != 0) {
+			if (!prs_align_custom(ps, 4)) goto fail;
+		}
+
 		TALLOC_FREE(uni_name.buffer);
 
 		if (prs_offset(ps) > max_offset) {

Modified: branches/samba/backports.org/lenny/source3/smbd/open.c
===================================================================
--- branches/samba/backports.org/lenny/source3/smbd/open.c	2010-10-23 19:21:11 UTC (rev 3631)
+++ branches/samba/backports.org/lenny/source3/smbd/open.c	2010-10-26 20:27:36 UTC (rev 3632)
@@ -49,11 +49,23 @@
  SMB1 file varient of se_access_check. Never test FILE_READ_ATTRIBUTES.
 ****************************************************************************/
 
-NTSTATUS smb1_file_se_access_check(const struct security_descriptor *sd,
+NTSTATUS smb1_file_se_access_check(connection_struct *conn,
+			  const struct security_descriptor *sd,
                           const NT_USER_TOKEN *token,
                           uint32_t access_desired,
                           uint32_t *access_granted)
 {
+	*access_granted = 0;
+
+	if (conn->server_info->utok.uid == 0 || conn->admin_user) {
+		/* I'm sorry sir, I didn't know you were root... */
+		*access_granted = access_desired;
+		if (access_desired & SEC_FLAG_MAXIMUM_ALLOWED) {
+			*access_granted |= FILE_GENERIC_ALL;
+		}
+		return NT_STATUS_OK;
+	}
+
 	return se_access_check(sd,
 				token,
 				(access_desired & ~FILE_READ_ATTRIBUTES),
@@ -73,17 +85,6 @@
 	NTSTATUS status;
 	struct security_descriptor *sd = NULL;
 
-	*access_granted = 0;
-
-	if (conn->server_info->utok.uid == 0 || conn->admin_user) {
-		/* I'm sorry sir, I didn't know you were root... */
-		*access_granted = access_mask;
-		if (access_mask & SEC_FLAG_MAXIMUM_ALLOWED) {
-			*access_granted |= FILE_GENERIC_ALL;
-		}
-		return NT_STATUS_OK;
-	}
-
 	status = SMB_VFS_GET_NT_ACL(conn, smb_fname->base_name,
 			(OWNER_SECURITY_INFORMATION |
 			GROUP_SECURITY_INFORMATION |
@@ -97,7 +98,8 @@
 		return status;
 	}
 
-	status = smb1_file_se_access_check(sd,
+	status = smb1_file_se_access_check(conn,
+				sd,
 				conn->server_info->ptok,
 				access_mask,
 				access_granted);
@@ -1412,7 +1414,8 @@
 				return NT_STATUS_ACCESS_DENIED;
 			}
 
-			status = smb1_file_se_access_check(sd,
+			status = smb1_file_se_access_check(conn,
+					sd,
 					conn->server_info->ptok,
 					access_mask,
 					&access_granted);

Modified: branches/samba/backports.org/lenny/source3/smbd/oplock.c
===================================================================
--- branches/samba/backports.org/lenny/source3/smbd/oplock.c	2010-10-23 19:21:11 UTC (rev 3631)
+++ branches/samba/backports.org/lenny/source3/smbd/oplock.c	2010-10-26 20:27:36 UTC (rev 3632)
@@ -118,6 +118,7 @@
 	fsp->sent_oplock_break = NO_BREAK_SENT;
 
 	flush_write_cache(fsp, OPLOCK_RELEASE_FLUSH);
+	delete_write_cache(fsp);
 
 	TALLOC_FREE(fsp->oplock_timeout);
 }

Modified: branches/samba/backports.org/lenny/source3/smbd/process.c
===================================================================
--- branches/samba/backports.org/lenny/source3/smbd/process.c	2010-10-23 19:21:11 UTC (rev 3631)
+++ branches/samba/backports.org/lenny/source3/smbd/process.c	2010-10-26 20:27:36 UTC (rev 3632)
@@ -1488,7 +1488,7 @@
 		/*
 		 * NetBIOS session request, keepalive, etc.
 		 */
-		reply_special((char *)inbuf);
+		reply_special((char *)inbuf, nread);
 		goto done;
 	}
 

Modified: branches/samba/backports.org/lenny/source3/smbd/reply.c
===================================================================
--- branches/samba/backports.org/lenny/source3/smbd/reply.c	2010-10-23 19:21:11 UTC (rev 3631)
+++ branches/samba/backports.org/lenny/source3/smbd/reply.c	2010-10-26 20:27:36 UTC (rev 3632)
@@ -495,14 +495,11 @@
  Reply to a (netbios-level) special message.
 ****************************************************************************/
 
-void reply_special(char *inbuf)
+void reply_special(char *inbuf, size_t inbuf_size)
 {
 	int msg_type = CVAL(inbuf,0);
 	int msg_flags = CVAL(inbuf,1);
-	fstring name1,name2;
-	char name_type1, name_type2;
 	struct smbd_server_connection *sconn = smbd_server_conn;
-
 	/*
 	 * We only really use 4 bytes of the outbuf, but for the smb_setlen
 	 * calculation & friends (srv_send_smb uses that) we need the full smb
@@ -510,28 +507,49 @@
 	 */
 	char outbuf[smb_size];
 
-	*name1 = *name2 = 0;
-
 	memset(outbuf, '\0', sizeof(outbuf));
 
 	smb_setlen(outbuf,0);
 
 	switch (msg_type) {
 	case 0x81: /* session request */
+	{
+		/* inbuf_size is guarenteed to be at least 4. */
+		fstring name1,name2;
+		int name_type1, name_type2;
+		int name_len1, name_len2;
 
+		*name1 = *name2 = 0;
+
 		if (sconn->nbt.got_session) {
 			exit_server_cleanly("multiple session request not permitted");
 		}
 
 		SCVAL(outbuf,0,0x82);
 		SCVAL(outbuf,3,0);
-		if (name_len(inbuf+4) > 50 || 
-		    name_len(inbuf+4 + name_len(inbuf + 4)) > 50) {
+
+		/* inbuf_size is guaranteed to be at least 4. */
+		name_len1 = name_len((unsigned char *)(inbuf+4),inbuf_size - 4);
+		if (name_len1 <= 0 || name_len1 > inbuf_size - 4) {
 			DEBUG(0,("Invalid name length in session request\n"));
 			return;
 		}
-		name_type1 = name_extract(inbuf,4,name1);
-		name_type2 = name_extract(inbuf,4 + name_len(inbuf + 4),name2);
+		name_len2 = name_len((unsigned char *)(inbuf+4+name_len1),inbuf_size - 4 - name_len1);
+		if (name_len2 <= 0 || name_len2 > inbuf_size - 4 - name_len1) {
+			DEBUG(0,("Invalid name length in session request\n"));
+			return;
+		}
+
+		name_type1 = name_extract((unsigned char *)inbuf,
+				inbuf_size,(unsigned int)4,name1);
+		name_type2 = name_extract((unsigned char *)inbuf,
+				inbuf_size,(unsigned int)(4 + name_len1),name2);
+
+		if (name_type1 == -1 || name_type2 == -1) {
+			DEBUG(0,("Invalid name type in session request\n"));
+			return;
+		}
+
 		DEBUG(2,("netbios connect: name1=%s0x%x name2=%s0x%x\n",
 			 name1, name_type1, name2, name_type2));
 
@@ -565,6 +583,7 @@
 
 		sconn->nbt.got_session = true;
 		break;
+	}
 
 	case 0x89: /* session keepalive request 
 		      (some old clients produce this?) */
@@ -5846,8 +5865,9 @@
 			  "%s -> %s\n", smb_fname_str_dbg(fsp->fsp_name),
 			  smb_fname_str_dbg(smb_fname_dst)));
 
-		if (lp_map_archive(SNUM(conn)) ||
-		    lp_store_dos_attributes(SNUM(conn))) {
+		if (!lp_posix_pathnames() &&
+		    (lp_map_archive(SNUM(conn)) ||
+		    lp_store_dos_attributes(SNUM(conn)))) {
 			/* We must set the archive bit on the newly
 			   renamed file. */
 			if (SMB_VFS_STAT(conn, smb_fname_dst) == 0) {

Modified: branches/samba/backports.org/lenny/source3/smbd/sesssetup.c
===================================================================
--- branches/samba/backports.org/lenny/source3/smbd/sesssetup.c	2010-10-23 19:21:11 UTC (rev 3631)
+++ branches/samba/backports.org/lenny/source3/smbd/sesssetup.c	2010-10-26 20:27:36 UTC (rev 3632)
@@ -725,7 +725,8 @@
 	*kerb_mechOID = NULL;
 
 	/* parse out the OIDs and the first sec blob */
-	if (!parse_negTokenTarg(blob_in, OIDs, pblob_out)) {
+	if (!parse_negTokenTarg(blob_in, OIDs, pblob_out) ||
+			OIDs[0] == NULL) {
 		return NT_STATUS_LOGON_FAILURE;
 	}
 

Modified: branches/samba/backports.org/lenny/source3/smbd/trans2.c
===================================================================
--- branches/samba/backports.org/lenny/source3/smbd/trans2.c	2010-10-23 19:21:11 UTC (rev 3631)
+++ branches/samba/backports.org/lenny/source3/smbd/trans2.c	2010-10-26 20:27:36 UTC (rev 3632)
@@ -6594,6 +6594,7 @@
 	files_struct *all_fsps = NULL;
 	bool modify_mtime = true;
 	struct file_id id;
+	struct smb_filename *smb_fname_tmp = NULL;
 	SMB_STRUCT_STAT sbuf;
 
 	ZERO_STRUCT(ft);
@@ -6646,7 +6647,6 @@
 	sbuf = smb_fname->st;
 
 	if (!VALID_STAT(sbuf)) {
-		struct smb_filename *smb_fname_tmp = NULL;
 		/*
 		 * The only valid use of this is to create character and block
 		 * devices, and named pipes. This is deprecated (IMHO) and 
@@ -6675,7 +6675,7 @@
 		}
 
 		sbuf = smb_fname_tmp->st;
-		TALLOC_FREE(smb_fname_tmp);
+		smb_fname = smb_fname_tmp;
 
 		/* Ensure we don't try and change anything else. */
 		raw_unixmode = SMB_MODE_NO_CHANGE;

Modified: branches/samba/backports.org/lenny/source3/utils/net_ads.c
===================================================================
--- branches/samba/backports.org/lenny/source3/utils/net_ads.c	2010-10-23 19:21:11 UTC (rev 3631)
+++ branches/samba/backports.org/lenny/source3/utils/net_ads.c	2010-10-26 20:27:36 UTC (rev 3632)
@@ -541,7 +541,7 @@
 	char *escaped_user;
 	DOM_SID primary_group_sid;
 	uint32_t group_rid;
-	enum SID_NAME_USE type;
+	enum wbcSidType type;
 
 	if (argc < 1 || c->display_usage) {
 		return net_ads_user_usage(c, argc, argv);
@@ -596,7 +596,7 @@
 	wbc_status = wbcLookupSid((struct wbcDomainSid *)&primary_group_sid,
 				  NULL, /* don't look up domain */
 				  &primary_group,
-				  (enum wbcSidType *) &type);
+				  &type);
 	if (!WBC_ERROR_IS_OK(wbc_status)) {
 		d_fprintf(stderr, "wbcLookupSid: %s\n",
 			  wbcErrorString(wbc_status));

Modified: branches/samba/backports.org/lenny/source3/utils/net_rpc_printer.c
===================================================================
--- branches/samba/backports.org/lenny/source3/utils/net_rpc_printer.c	2010-10-23 19:21:11 UTC (rev 3631)
+++ branches/samba/backports.org/lenny/source3/utils/net_rpc_printer.c	2010-10-26 20:27:36 UTC (rev 3632)
@@ -754,6 +754,7 @@
 	WERROR result;
 	NTSTATUS status;
 	struct spoolss_SetPrinterInfoCtr info_ctr;
+	struct spoolss_SetPrinterInfo2 info2;
 	struct spoolss_DevmodeContainer devmode_ctr;
 	struct sec_desc_buf secdesc_ctr;
 
@@ -773,8 +774,8 @@
 			(void *)&info->info1;
 		break;
 	case 2:
-		info_ctr.info.info2 = (struct spoolss_SetPrinterInfo2 *)
-			(void *)&info->info2;
+		spoolss_printerinfo2_to_setprinterinfo2(&info->info2, &info2);
+		info_ctr.info.info2 = &info2;
 		break;
 	case 3:
 		info_ctr.info.info3 = (struct spoolss_SetPrinterInfo3 *)
@@ -2044,6 +2045,8 @@
 	/* do something for all printers */
 	for (i = 0; i < num_printers; i++) {
 
+		struct spoolss_SetPrinterInfo2 info2;
+
 		/* do some initialization */
 		printername = info_enum[i].info2.printername;
 		sharename = info_enum[i].info2.sharename;
@@ -2095,8 +2098,8 @@
 		d_printf(_("creating printer: %s\n"), printername);
 
 		info_ctr.level = level;
-		info_ctr.info.info2 = (struct spoolss_SetPrinterInfo2 *)
-			(void *)&info_src.info2;
+		spoolss_printerinfo2_to_setprinterinfo2(&info_src.info2, &info2);
+		info_ctr.info.info2 = &info2;
 
 		result = rpccli_spoolss_addprinterex(pipe_hnd_dst,
 						     mem_ctx,

Modified: branches/samba/backports.org/lenny/source3/utils/net_rpc_registry.c
===================================================================
--- branches/samba/backports.org/lenny/source3/utils/net_rpc_registry.c	2010-10-23 19:21:11 UTC (rev 3631)
+++ branches/samba/backports.org/lenny/source3/utils/net_rpc_registry.c	2010-10-26 20:27:36 UTC (rev 3632)
@@ -1150,7 +1150,8 @@
 	d_printf(_("ok\n"));
 
 	d_printf(_("Opening %s...."), argv[1]);
-	if ( !(outfile = regfio_open( argv[1], (O_RDWR|O_CREAT|O_TRUNC), (S_IREAD|S_IWRITE) )) ) {
+	if ( !(outfile = regfio_open( argv[1], (O_RDWR|O_CREAT|O_TRUNC),
+				      (S_IRUSR|S_IWUSR) )) ) {
 		d_fprintf(stderr, _("Failed to open %s for writing\n"),argv[1]);
 		goto out;
 	}

Modified: branches/samba/backports.org/lenny/source3/utils/profiles.c
===================================================================
--- branches/samba/backports.org/lenny/source3/utils/profiles.c	2010-10-23 19:21:11 UTC (rev 3631)
+++ branches/samba/backports.org/lenny/source3/utils/profiles.c	2010-10-26 20:27:36 UTC (rev 3632)
@@ -275,7 +275,8 @@
 		exit (1);
 	}
 
-	if ( !(outfile = regfio_open( new_filename, (O_RDWR|O_CREAT|O_TRUNC), (S_IREAD|S_IWRITE) )) ) {
+	if ( !(outfile = regfio_open( new_filename, (O_RDWR|O_CREAT|O_TRUNC),
+				      (S_IRUSR|S_IWUSR) )) ) {
 		fprintf( stderr, "Failed to open new file %s!\n", new_filename );
 		fprintf( stderr, "Error was (%s)\n", strerror(errno) );
 		exit (1);

Modified: branches/samba/backports.org/lenny/source3/utils/smbfilter.c
===================================================================
--- branches/samba/backports.org/lenny/source3/utils/smbfilter.c	2010-10-23 19:21:11 UTC (rev 3631)
+++ branches/samba/backports.org/lenny/source3/utils/smbfilter.c	2010-10-26 20:27:36 UTC (rev 3632)
@@ -74,20 +74,44 @@
 	}
 }
 
-static void filter_request(char *buf)
+static void filter_request(char *buf, size_t buf_len)
 {
 	int msg_type = CVAL(buf,0);
 	int type = CVAL(buf,smb_com);
+	unsigned x;
 	fstring name1,name2;
-	unsigned x;
+	int name_len1, name_len2;
+	int name_type1, name_type2;
 
 	if (msg_type) {
 		/* it's a netbios special */
-		switch (msg_type) {
+		switch (msg_type)
 		case 0x81:
 			/* session request */
-			name_extract(buf,4,name1);
-			name_extract(buf,4 + name_len(buf + 4),name2);
+			/* inbuf_size is guaranteed to be at least 4. */
+			name_len1 = name_len((unsigned char *)(buf+4),
+					buf_len - 4);
+			if (name_len1 <= 0 || name_len1 > buf_len - 4) {
+				DEBUG(0,("Invalid name length in session request\n"));
+				return;
+			}
+			name_len2 = name_len((unsigned char *)(buf+4+name_len1),
+					buf_len - 4 - name_len1);
+			if (name_len2 <= 0 || name_len2 > buf_len - 4 - name_len1) {
+				DEBUG(0,("Invalid name length in session request\n"));
+				return;
+			}
+
+			name_type1 = name_extract((unsigned char *)buf,
+					buf_len,(unsigned int)4,name1);
+			name_type2 = name_extract((unsigned char *)buf,
+					buf_len,(unsigned int)(4 + name_len1),name2);
+
+			if (name_type1 == -1 || name_type2 == -1) {
+				DEBUG(0,("Invalid name type in session request\n"));
+				return;
+			}
+
 			d_printf("sesion_request: %s -> %s\n",
 				 name1, name2);
 			if (netbiosname) {
@@ -97,11 +121,11 @@
 					/* replace the destination netbios
 					 * name */
 					memcpy(buf+4, mangled,
-					       name_len(mangled));
+					       name_len((unsigned char *)mangled,
+							talloc_get_size(mangled)));
 					TALLOC_FREE(mangled);
 				}
 			}
-		}
 		return;
 	}
 
@@ -118,7 +142,6 @@
 		SIVAL(buf, smb_vwv11, x);
 		break;
 	}
-
 }
 
 /****************************************************************************
@@ -184,7 +207,7 @@
 				d_printf("client closed connection\n");
 				exit(0);
 			}
-			filter_request(packet);
+			filter_request(packet, len);
 			if (!send_smb(s, packet)) {
 				d_printf("server is dead\n");
 				exit(1);

Modified: branches/samba/backports.org/lenny/source3/winbindd/winbindd_cm.c
===================================================================
--- branches/samba/backports.org/lenny/source3/winbindd/winbindd_cm.c	2010-10-23 19:21:11 UTC (rev 3631)
+++ branches/samba/backports.org/lenny/source3/winbindd/winbindd_cm.c	2010-10-26 20:27:36 UTC (rev 3632)
@@ -2016,30 +2016,30 @@
 /**********************************************************************
 ***********************************************************************/
 
-static bool cm_get_schannel_creds(struct winbindd_domain *domain,
+static NTSTATUS cm_get_schannel_creds(struct winbindd_domain *domain,
 				   struct netlogon_creds_CredentialState **ppdc)
 {
-	NTSTATUS result;
+	NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
 	struct rpc_pipe_client *netlogon_pipe;
 
 	if (lp_client_schannel() == False) {
-		return False;
+		return NT_STATUS_CANT_ACCESS_DOMAIN_INFO;;
 	}
 
 	result = cm_connect_netlogon(domain, &netlogon_pipe);
 	if (!NT_STATUS_IS_OK(result)) {
-		return False;
+		return result;
 	}
 
 	/* Return a pointer to the struct netlogon_creds_CredentialState from the
 	   netlogon pipe. */
 
 	if (!domain->conn.netlogon_pipe->dc) {
-		return false;
+		return NT_STATUS_INTERNAL_ERROR; /* This shouldn't happen. */
 	}
 
 	*ppdc = domain->conn.netlogon_pipe->dc;
-	return True;
+	return NT_STATUS_OK;
 }
 
 NTSTATUS cm_connect_sam(struct winbindd_domain *domain, TALLOC_CTX *mem_ctx,
@@ -2136,10 +2136,13 @@
 
 	/* Fall back to schannel if it's a W2K pre-SP1 box. */
 
-	if (!cm_get_schannel_creds(domain, &p_creds)) {
+	result = cm_get_schannel_creds(domain, &p_creds);
+	if (!NT_STATUS_IS_OK(result)) {
 		/* If this call fails - conn->cli can now be NULL ! */
 		DEBUG(10, ("cm_connect_sam: Could not get schannel auth info "
-			   "for domain %s, trying anon\n", domain->name));
+			   "for domain %s (error %s), trying anon\n",
+			domain->name,
+			nt_errstr(result) ));
 		goto anonymous;
 	}
 	result = cli_rpc_pipe_open_schannel_with_key
@@ -2231,6 +2234,7 @@
 			    struct rpc_pipe_client **cli)
 {
 	struct winbindd_cm_conn *conn;
+	struct netlogon_creds_CredentialState *creds;
 	NTSTATUS status;
 
 	DEBUG(10,("cm_connect_lsa_tcp\n"));
@@ -2251,14 +2255,20 @@
 
 	TALLOC_FREE(conn->lsa_pipe_tcp);
 
-	status = cli_rpc_pipe_open_schannel(conn->cli,
-					    &ndr_table_lsarpc.syntax_id,
-					    NCACN_IP_TCP,
-					    DCERPC_AUTH_LEVEL_PRIVACY,
-					    domain->name,
-					    &conn->lsa_pipe_tcp);
+	status = cm_get_schannel_creds(domain, &creds);
 	if (!NT_STATUS_IS_OK(status)) {
-		DEBUG(10,("cli_rpc_pipe_open_schannel failed: %s\n",
+		goto done;
+	}
+
+	status = cli_rpc_pipe_open_schannel_with_key(conn->cli,
+						     &ndr_table_lsarpc.syntax_id,
+						     NCACN_IP_TCP,
+						     DCERPC_AUTH_LEVEL_PRIVACY,
+						     domain->name,
+						     &creds,
+						     &conn->lsa_pipe_tcp);
+	if (!NT_STATUS_IS_OK(status)) {
+		DEBUG(10,("cli_rpc_pipe_open_schannel_with_key failed: %s\n",
 			nt_errstr(status)));
 		goto done;
 	}
@@ -2338,10 +2348,13 @@
 
 	/* Fall back to schannel if it's a W2K pre-SP1 box. */
 
-	if (!cm_get_schannel_creds(domain, &p_creds)) {
+	result = cm_get_schannel_creds(domain, &p_creds);
+	if (!NT_STATUS_IS_OK(result)) {
 		/* If this call fails - conn->cli can now be NULL ! */
 		DEBUG(10, ("cm_connect_lsa: Could not get schannel auth info "
-			   "for domain %s, trying anon\n", domain->name));
+			   "for domain %s (error %s), trying anon\n",
+			domain->name,
+			nt_errstr(result) ));
 		goto anonymous;
 	}
 	result = cli_rpc_pipe_open_schannel_with_key

Modified: branches/samba/backports.org/lenny/source3/winbindd/winbindd_dual_srv.c
===================================================================
--- branches/samba/backports.org/lenny/source3/winbindd/winbindd_dual_srv.c	2010-10-23 19:21:11 UTC (rev 3631)
+++ branches/samba/backports.org/lenny/source3/winbindd/winbindd_dual_srv.c	2010-10-26 20:27:36 UTC (rev 3632)
@@ -610,12 +610,12 @@
 
 	id.id = r->in.id;
 
-	switch (id.type) {
+	switch (r->in.type) {
 	case WBINT_ID_TYPE_UID:
 		id.type = ID_TYPE_UID;
 		status = idmap_set_uid_hwm(&id);
 		break;
-	case ID_TYPE_GID:
+	case WBINT_ID_TYPE_GID:
 		id.type = ID_TYPE_GID;
 		status = idmap_set_gid_hwm(&id);
 		break;

Modified: branches/samba/backports.org/lenny/source3/winbindd/winbindd_pam.c
===================================================================
--- branches/samba/backports.org/lenny/source3/winbindd/winbindd_pam.c	2010-10-23 19:21:11 UTC (rev 3631)
+++ branches/samba/backports.org/lenny/source3/winbindd/winbindd_pam.c	2010-10-26 20:27:36 UTC (rev 3632)
@@ -801,7 +801,7 @@
 void winbindd_pam_auth(struct winbindd_cli_state *state)
 {
 	struct winbindd_domain *domain;
-	fstring name_domain, name_user, mapped_user;
+	fstring name_domain, name_user;
 	char *mapped = NULL;
 	NTSTATUS result;
 	NTSTATUS name_map_status = NT_STATUS_UNSUCCESSFUL;
@@ -828,17 +828,15 @@
 					       state->request->data.auth.user,
 					       &mapped);
 
-	/* If the name normalization didnt' actually do anything,
-	   just use the original name */
+	/* Update the auth name if we did any mapping */
 
-	if (NT_STATUS_IS_OK(name_map_status)
-	    ||NT_STATUS_EQUAL(name_map_status, NT_STATUS_FILE_RENAMED)) {
-		fstrcpy(mapped_user, mapped);
-	} else {
-		fstrcpy(mapped_user, state->request->data.auth.user);
+	if (NT_STATUS_IS_OK(name_map_status) ||
+	    NT_STATUS_EQUAL(name_map_status, NT_STATUS_FILE_RENAMED))
+	{
+		fstrcpy(state->request->data.auth.user, mapped);
 	}
 
-	if (!canonicalize_username(mapped_user, name_domain, name_user)) {
+	if (!canonicalize_username(state->request->data.auth.user, name_domain, name_user)) {
 		result = NT_STATUS_NO_SUCH_USER;
 		goto done;
 	}





More information about the Pkg-samba-maint mailing list