[Pkg-samba-maint] r3572 - in trunk/samba/debian: . patches

bubulle at alioth.debian.org bubulle at alioth.debian.org
Mon Sep 6 20:23:37 UTC 2010


tags 460494 pending
tags 460494 pending
thanks

Author: bubulle
Date: 2010-09-06 20:23:16 +0000 (Mon, 06 Sep 2010)
New Revision: 3572

Added:
   trunk/samba/debian/samba-common.prerm
Modified:
   trunk/samba/debian/changelog
   trunk/samba/debian/control
   trunk/samba/debian/libsmbclient.symbols
   trunk/samba/debian/libwbclient0.symbols
   trunk/samba/debian/patches/README_nosmbldap-tools.patch
   trunk/samba/debian/patches/VERSION.patch
   trunk/samba/debian/patches/adapt_machine_creation_script.patch
   trunk/samba/debian/patches/autoconf.patch
   trunk/samba/debian/patches/codepages-location.patch
   trunk/samba/debian/patches/documentation.patch
   trunk/samba/debian/patches/external-talloc-support.patch
   trunk/samba/debian/patches/fhs-filespaths.patch
   trunk/samba/debian/patches/fix-manpages-warnings.patch
   trunk/samba/debian/patches/installswat.sh.patch
   trunk/samba/debian/patches/no-unnecessary-cups.patch
   trunk/samba/debian/patches/pam-examples.patch
   trunk/samba/debian/patches/series
   trunk/samba/debian/patches/shrink-dead-code.patch
   trunk/samba/debian/patches/smbclient-pager.patch
   trunk/samba/debian/patches/smbtar-bashism.patch
   trunk/samba/debian/patches/undefined-symbols.patch
   trunk/samba/debian/patches/usershare.patch
   trunk/samba/debian/rules
   trunk/samba/debian/samba-common-bin.postinst
   trunk/samba/debian/samba-common-bin.prerm
   trunk/samba/debian/samba-doc.doc-base.samba-using
   trunk/samba/debian/samba.postinst
   trunk/samba/debian/samba.prerm
   trunk/samba/debian/swat.links
Log:
Diff between 3.4.7~dfsg-2 and 3.5.2~dfsg-2
As 3.5.2~dfsg-2 is supposed to have everything from the trunk since
experimental was forked out and up to 3.4.7~dfsg-2, that should bring
us to the status of debian/ in 3.5.2~dfsg-2


Modified: trunk/samba/debian/changelog
===================================================================
--- trunk/samba/debian/changelog	2010-09-06 17:45:31 UTC (rev 3571)
+++ trunk/samba/debian/changelog	2010-09-06 20:23:16 UTC (rev 3572)
@@ -1,3 +1,57 @@
+samba (2:3.5.2~dfsg-2) experimental; urgency=low
+
+  * Resync changes with changes in trunk between 3:3.4.4~dfsg-1 and
+    2:3.4.7~dfsg-2
+
+ -- Christian Perrier <bubulle at debian.org>  Tue, 04 May 2010 17:13:47 +0200
+
+samba (2:3.5.2~dfsg-1) experimental; urgency=low
+
+  * New upstream release
+  * Bugs fixed upstream:
+    - Fix parsing of the gecos field
+      Closes: #460494
+
+ -- Christian Perrier <bubulle at debian.org>  Thu, 08 Apr 2010 19:48:07 +0200
+
+samba (2:3.5.1~dfsg-1) experimental; urgency=low
+
+  * New upstream release. Security fix: all smbd processes inherited
+    CAP_DAC_OVERRIDE capabilities, allowing all file system access to be
+    allowed even when permissions should have denied access.
+
+ -- Christian Perrier <bubulle at debian.org>  Tue, 09 Mar 2010 10:54:01 +0100
+
+samba (2:3.5.0dfsg-1) experimental; urgency=low
+
+  * New upstream release. Not using "3.5.0~dfsg" as version number
+    because we used a "higher" version number in previous versions.
+
+ -- Christian Perrier <bubulle at debian.org>  Tue, 02 Mar 2010 22:03:15 +0100
+
+samba (2:3.5.0~rc3~dfsg-1) experimental; urgency=low
+
+  * New upstream release candidate
+
+ -- Christian Perrier <bubulle at debian.org>  Sat, 20 Feb 2010 08:36:57 +0100
+
+samba (2:3.5.0~rc2~dfsg-1) experimental; urgency=low
+
+  * New upstream pre-release
+  * Use new --with-codepagedir option. Consequently drop
+    codepages-location.patch
+  * Drop "Using Samba" from the samba-doc file list as it was
+    removed upstream.
+
+ -- Christian Perrier <bubulle at debian.org>  Sun, 31 Jan 2010 11:53:48 +0100
+
+samba (2:3.5.0~rc1~dfsg-1) experimental; urgency=low
+
+  [ Christian Perrier ]
+  * New upstream pre-release
+
+ -- Christian Perrier <bubulle at debian.org>  Fri, 15 Jan 2010 23:31:01 +0100
+
 samba (2:3.4.8~dfsg-3) UNRELEASED; urgency=low
 
   [ Debconf translations ]  
@@ -125,6 +179,53 @@
 
  -- Christian Perrier <bubulle at debian.org>  Sat, 23 Jan 2010 12:16:42 +0100
 
+samba (2:3.5.2~dfsg-1) experimental; urgency=low
+
+  * New upstream release
+  * Bugs fixed upstream:
+    - Fix parsing of the gecos field
+      Closes: #460494
+
+ -- Christian Perrier <bubulle at debian.org>  Thu, 08 Apr 2010 19:48:07 +0200
+
+samba (2:3.5.1~dfsg-1) experimental; urgency=low
+
+  * New upstream release. Security fix: all smbd processes inherited
+    CAP_DAC_OVERRIDE capabilities, allowing all file system access to be
+    allowed even when permissions should have denied access.
+
+ -- Christian Perrier <bubulle at debian.org>  Tue, 09 Mar 2010 10:54:01 +0100
+
+samba (2:3.5.0dfsg-1) experimental; urgency=low
+
+  * New upstream release. Not using "3.5.0~dfsg" as version number
+    because we used a "higher" version number in previous versions.
+
+ -- Christian Perrier <bubulle at debian.org>  Tue, 02 Mar 2010 22:03:15 +0100
+
+samba (2:3.5.0~rc3~dfsg-1) experimental; urgency=low
+
+  * New upstream release candidate
+
+ -- Christian Perrier <bubulle at debian.org>  Sat, 20 Feb 2010 08:36:57 +0100
+
+samba (2:3.5.0~rc2~dfsg-1) experimental; urgency=low
+
+  * New upstream pre-release
+  * Use new --with-codepagedir option. Consequently drop
+    codepages-location.patch
+  * Drop "Using Samba" from the samba-doc file list as it was
+    removed upstream.
+
+ -- Christian Perrier <bubulle at debian.org>  Sun, 31 Jan 2010 11:53:48 +0100
+
+samba (2:3.5.0~rc1~dfsg-1) experimental; urgency=low
+
+  [ Christian Perrier ]
+  * New upstream pre-release
+
+ -- Christian Perrier <bubulle at debian.org>  Fri, 15 Jan 2010 23:31:01 +0100
+
 samba (2:3.4.4~dfsg-1) unstable; urgency=low
 
   * New upstream version.

Modified: trunk/samba/debian/control
===================================================================
--- trunk/samba/debian/control	2010-09-06 17:45:31 UTC (rev 3571)
+++ trunk/samba/debian/control	2010-09-06 20:23:16 UTC (rev 3572)
@@ -10,6 +10,7 @@
 	libtalloc-dev (>= 2.0.1-1~bpo50+1),
 	libcap2-dev  [alpha amd64 arm armeb armel avr32 hppa i386 ia64 lpia m32r m68k mips mipsel powerpc ppc64 s390 s390x sh3 sh3eb sh4 sh4eb sparc],
 	libkeyutils-dev  [alpha amd64 arm armeb armel avr32 hppa i386 ia64 lpia m32r m68k mips mipsel powerpc ppc64 s390 s390x sh3 sh3eb sh4 sh4eb sparc],
+	ctdb (>= 1.0.103) [alpha amd64 arm armeb armel avr32 hppa i386 ia64 lpia m32r m68k mips mipsel powerpc ppc64 s390 s390x sh3 sh3eb sh4 sh4eb sparc],
 	ctdb (>= 1.0.73) [alpha amd64 arm armeb armel avr32 hppa i386 ia64 lpia m32r m68k mips mipsel powerpc ppc64 s390 s390x sh3 sh3eb sh4 sh4eb sparc],
 	pkg-config
 Build-Conflicts: libfam-dev

Modified: trunk/samba/debian/libsmbclient.symbols
===================================================================
--- trunk/samba/debian/libsmbclient.symbols	2010-09-06 17:45:31 UTC (rev 3571)
+++ trunk/samba/debian/libsmbclient.symbols	2010-09-06 20:23:16 UTC (rev 3572)
@@ -62,6 +62,7 @@
  smbc_getOptionOpenShareMode at Base 2:3.2.0
  smbc_getOptionSmbEncryptionLevel at Base 2:3.2.0
  smbc_getOptionUrlEncodeReaddirEntries at Base 2:3.2.0
+ smbc_getOptionUseCCache at Base 2:3.5.0~rc2~dfsg
  smbc_getOptionUseKerberos at Base 2:3.2.0
  smbc_getOptionUserData at Base 2:3.2.0
  smbc_getServerCacheData at Base 2:3.2.0
@@ -144,6 +145,7 @@
  smbc_setOptionOpenShareMode at Base 2:3.2.0
  smbc_setOptionSmbEncryptionLevel at Base 2:3.2.0
  smbc_setOptionUrlEncodeReaddirEntries at Base 2:3.2.0
+ smbc_setOptionUseCCache at Base 2:3.5.0~rc2~dfsg
  smbc_setOptionUseKerberos at Base 2:3.2.0
  smbc_setOptionUserData at Base 2:3.2.0
  smbc_setServerCacheData at Base 2:3.2.0
@@ -154,6 +156,8 @@
  smbc_setxattr at Base 3.0.24
  smbc_stat at Base 3.0.24
  smbc_telldir at Base 3.0.24
+ smbc_thread_impl at Base 2:3.5.0~pre2
+ smbc_thread_posix at Base 2:3.5.0~pre2
  smbc_unlink at Base 3.0.24
  smbc_unlink_print_job at Base 3.0.24
  smbc_utime at Base 3.0.24

Modified: trunk/samba/debian/libwbclient0.symbols
===================================================================
--- trunk/samba/debian/libwbclient0.symbols	2010-09-06 17:45:31 UTC (rev 3571)
+++ trunk/samba/debian/libwbclient0.symbols	2010-09-06 20:23:16 UTC (rev 3572)
@@ -1,9 +1,27 @@
 libwbclient.so.0 libwbclient0 #MINVER#
+ map_wbc_err_from_errno at Base 2:3.5.0~pre2                                                                                     
+ tevent_req_is_wbcerr at Base 2:3.5.0~pre2                                                                                       
+ tevent_req_simple_recv_wbcerr at Base 2:3.5.0~pre2                                                                              
+ wb_context_init at Base 2:3.5.0~pre2                                                                                            
+ wb_req_read_recv at Base 2:3.5.0~pre2                                                                                           
+ wb_req_read_send at Base 2:3.5.0~pre2                                                                                           
+ wb_req_write_recv at Base 2:3.5.0~pre2                                                                                          
+ wb_req_write_send at Base 2:3.5.0~pre2                                                                                          
+ wb_resp_read_recv at Base 2:3.5.0~pre2                                                                                          
+ wb_resp_read_send at Base 2:3.5.0~pre2                                                                                          
+ wb_resp_write_recv at Base 2:3.5.0~pre2                                                                                         
+ wb_resp_write_send at Base 2:3.5.0~pre2                                                                                         
+ wb_simple_trans_recv at Base 2:3.5.0~pre2                                                                                       
+ wb_simple_trans_send at Base 2:3.5.0~pre2                                                                                       
+ wb_trans_recv at Base 2:3.5.0~pre2                                                                                              
+ wb_trans_send at Base 2:3.5.0~pre2                                                                                              
  wbcAllocateGid at Base 2:3.2.0
  wbcAllocateUid at Base 2:3.2.0
  wbcAuthenticateUser at Base 2:3.2.0
  wbcAuthenticateUserEx at Base 2:3.2.0
+ wbcChangeTrustCredentials at Base 2:3.5.0~pre2                                                                                  
  wbcCheckTrustCredentials at Base 2:3.2.0
+ wbcDebug at Base 2:3.5.0~pre2                                                                                                   
  wbcDomainInfo at Base 2:3.2.0
  wbcEndgrent at Base 2:3.2.0
  wbcEndpwent at Base 2:3.2.0
@@ -27,8 +45,11 @@
  wbcLookupSid at Base 2:3.2.0
  wbcLookupUserSids at Base 2:3.2.0
  wbcPing at Base 2:3.2.0
+ wbcPingDc at Base 2:3.5.0~rc1~dfsg
  wbcResolveWinsByIP at Base 2:3.2.0
  wbcResolveWinsByName at Base 2:3.2.0
+ wbcSetDebug at Base 2:3.5.0~pre2                                                                                                
+ wbcSetDebugStderr at Base 2:3.5.0~pre2                                                                                          
  wbcSetGidHwm at Base 2:3.2.0
  wbcSetGidMapping at Base 2:3.2.0
  wbcSetUidHwm at Base 2:3.2.0
@@ -38,12 +59,14 @@
  wbcSidToGid at Base 2:3.2.0
  wbcSidToString at Base 2:3.2.0
  wbcSidToUid at Base 2:3.2.0
+ wbcSidTypeString at Base 2:3.5.0~pre2                                                                                           
  wbcStringToSid at Base 2:3.2.0
  wbcUidToSid at Base 2:3.2.0
  wbcAddNamedBlob at Base 2:3.3.0
  wbcChangeUserPassword at Base 2:3.3.0
  wbcChangeUserPasswordEx at Base 2:3.3.0
  wbcCredentialCache at Base 2:3.3.0
+ wbcCredentialSave at Base 2:3.5.0~rc2~dfsg
  wbcGetDisplayName at Base 2:3.3.0
  wbcGetgrlist at Base 2:3.3.0
  wbcGuidToString at Base 2:3.3.0
@@ -61,4 +84,3 @@
  wbcStringToGuid at Base 2:3.3.0
  wbcGetSidAliases at Base 2:3.4.0~pre2
  wbcGetpwsid at Base 2:3.4.0~pre2
- 

Modified: trunk/samba/debian/patches/README_nosmbldap-tools.patch
===================================================================
--- trunk/samba/debian/patches/README_nosmbldap-tools.patch	2010-09-06 17:45:31 UTC (rev 3571)
+++ trunk/samba/debian/patches/README_nosmbldap-tools.patch	2010-09-06 20:23:16 UTC (rev 3572)
@@ -3,10 +3,10 @@
 Bug-Debian: http://bugs.debian.org/341934
 Forwarded: not-needed
 
-Index: b/examples/LDAP/README
+Index: experimental/examples/LDAP/README
 ===================================================================
---- a/examples/LDAP/README	2009-11-08 15:54:27.000000000 +0100
-+++ b/examples/LDAP/README	2009-11-08 15:55:34.000000000 +0100
+--- experimental.orig/examples/LDAP/README
++++ experimental/examples/LDAP/README
 @@ -69,6 +69,9 @@
  The smbldap-tools package can be downloaded individually from
  https://gna.org/projects/smbldap-tools/

Modified: trunk/samba/debian/patches/VERSION.patch
===================================================================
--- trunk/samba/debian/patches/VERSION.patch	2010-09-06 17:45:31 UTC (rev 3571)
+++ trunk/samba/debian/patches/VERSION.patch	2010-09-06 20:23:16 UTC (rev 3572)
@@ -2,10 +2,10 @@
 Author: Eloy A. Paris <peloy at debian.org>
 Forwarded: not-needed
 
-Index: b/source3/VERSION
+Index: experimental/source3/VERSION
 ===================================================================
---- a/source3/VERSION	2009-11-08 15:54:27.000000000 +0100
-+++ b/source3/VERSION	2009-11-08 15:55:35.000000000 +0100
+--- experimental.orig/source3/VERSION
++++ experimental/source3/VERSION
 @@ -84,7 +84,7 @@
  #       SAMBA_VERSION_VENDOR_FUNCTION                  #
  #                                                      #

Modified: trunk/samba/debian/patches/adapt_machine_creation_script.patch
===================================================================
--- trunk/samba/debian/patches/adapt_machine_creation_script.patch	2010-09-06 17:45:31 UTC (rev 3571)
+++ trunk/samba/debian/patches/adapt_machine_creation_script.patch	2010-09-06 20:23:16 UTC (rev 3572)
@@ -1,20 +0,0 @@
-Description: Adapt example script to Debian
-Author: Christian Perrier <bubulle at debian.org>
-Bug-Debian: http://bugs.debian.org/346234
-Forwarded: not-needed
-
-Index: samba/docs/manpages/smb.conf.5
-===================================================================
---- samba.orig/docs/manpages/smb.conf.5
-+++ samba/docs/manpages/smb.conf.5
-@@ -1153,8 +1153,8 @@
- Default:
- \fI\fIadd machine script\fR\fR\fI = \fR\fI\FC\F[]\fR\fI \fR
- .sp
--Example:
--\fI\fIadd machine script\fR\fR\fI = \fR\fI\FC/usr/sbin/adduser \-n \-g machines \-c Machine \-d /var/lib/nobody \-s /bin/false %u\F[]\fR\fI \fR
-+Example for Debian:
-+\fI\fIadd machine script\fR\fR\fI = \fR\fI\FC/usr/sbin/adduser \-\-disabled-password \-\-ingroup machines \-\-gecos Machine \-\-home /var/lib/samba \-\-shell /bin/false %u\F[]\fR\fI \fR
- .RE
- 
- add port command (G)

Modified: trunk/samba/debian/patches/autoconf.patch
===================================================================
--- trunk/samba/debian/patches/autoconf.patch	2010-09-06 17:45:31 UTC (rev 3571)
+++ trunk/samba/debian/patches/autoconf.patch	2010-09-06 20:23:16 UTC (rev 3572)
@@ -25,10 +25,10 @@
  quilt refresh
  find . -name '*.rej' | xargs rm
 
-Index: samba/source3/configure
+Index: experimental/source3/configure
 ===================================================================
---- samba.orig/source3/configure
-+++ samba/source3/configure
+--- experimental.orig/source3/configure
++++ experimental/source3/configure
 @@ -1,20 +1,24 @@
  #! /bin/sh
  # Guess values for system-dependent variables and create Makefiles.
@@ -838,7 +838,7 @@
  
  ac_unique_file="include/includes.h"
  ac_default_prefix=/usr/local/samba
-@@ -945,6 +902,7 @@
+@@ -957,6 +914,7 @@
  program_transform_name
  prefix
  exec_prefix
@@ -846,7 +846,7 @@
  PACKAGE_BUGREPORT
  PACKAGE_STRING
  PACKAGE_VERSION
-@@ -1164,8 +1122,7 @@
+@@ -1183,8 +1141,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 &&
@@ -856,7 +856,7 @@
      ac_useropt_orig=$ac_useropt
      ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
      case $ac_user_opts in
-@@ -1191,8 +1148,7 @@
+@@ -1210,8 +1167,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 &&
@@ -866,7 +866,7 @@
      ac_useropt_orig=$ac_useropt
      ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
      case $ac_user_opts in
-@@ -1396,8 +1352,7 @@
+@@ -1415,8 +1371,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 &&
@@ -876,7 +876,7 @@
      ac_useropt_orig=$ac_useropt
      ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
      case $ac_user_opts in
-@@ -1413,8 +1368,7 @@
+@@ -1432,8 +1387,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 &&
@@ -886,7 +886,7 @@
      ac_useropt_orig=$ac_useropt
      ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
      case $ac_user_opts in
-@@ -1444,17 +1398,17 @@
+@@ -1463,17 +1417,17 @@
    | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
      x_libraries=$ac_optarg ;;
  
@@ -910,7 +910,7 @@
      eval $ac_envvar=\$ac_optarg
      export $ac_envvar ;;
  
-@@ -1471,15 +1425,13 @@
+@@ -1490,15 +1444,13 @@
  
  if test -n "$ac_prev"; then
    ac_option=--`echo $ac_prev | sed 's/_/-/g'`
@@ -928,7 +928,7 @@
      *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
    esac
  fi
-@@ -1502,8 +1454,7 @@
+@@ -1521,8 +1473,7 @@
      [\\/$]* | ?:[\\/]* )  continue;;
      NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
    esac
@@ -938,7 +938,7 @@
  done
  
  # There might be people who depend on the old broken behavior: `$host'
-@@ -1533,11 +1484,9 @@
+@@ -1552,11 +1503,9 @@
  ac_pwd=`pwd` && test -n "$ac_pwd" &&
  ac_ls_di=`ls -di .` &&
  ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
@@ -952,7 +952,7 @@
  
  
  # Find the source files, if location was not specified.
-@@ -1576,13 +1525,11 @@
+@@ -1595,13 +1544,11 @@
  fi
  if test ! -r "$srcdir/$ac_unique_file"; then
    test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
@@ -968,7 +968,7 @@
  	pwd)`
  # When building in place, set srcdir=.
  if test "$ac_abs_confdir" = "$ac_pwd"; then
-@@ -1820,7 +1767,7 @@
+@@ -1848,7 +1795,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,7 +977,7 @@
                you have headers in a nonstandard directory <include dir>
    CPP         C preprocessor
    PKG_CONFIG  path to pkg-config utility
-@@ -1904,178 +1851,863 @@
+@@ -1935,178 +1882,863 @@
  if $ac_init_version; then
    cat <<\_ACEOF
  Samba configure 3
@@ -1987,7 +1987,7 @@
        *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
        esac
        $as_echo "$ac_var='\''$ac_val'\''"
-@@ -2119,39 +2751,41 @@
+@@ -2150,39 +2782,41 @@
      exit $exit_status
  ' 0
  for ac_signal in 1 2 13 15; do
@@ -2034,7 +2034,7 @@
  
  # Let the site file select an alternate cache file if it wants to.
  # Prefer an explicitly selected file to automatically selected ones.
-@@ -2169,8 +2803,8 @@
+@@ -2200,8 +2834,8 @@
  for ac_site_file in "$ac_site_file1" "$ac_site_file2"
  do
    test "x$ac_site_file" = xNONE && continue
@@ -2045,7 +2045,7 @@
  $as_echo "$as_me: loading site script $ac_site_file" >&6;}
      sed 's/^/| /' "$ac_site_file" >&5
      . "$ac_site_file"
-@@ -2178,10 +2812,10 @@
+@@ -2209,10 +2843,10 @@
  done
  
  if test -r "$cache_file"; then
@@ -2060,7 +2060,7 @@
  $as_echo "$as_me: loading cache $cache_file" >&6;}
      case $cache_file in
        [\\/]* | ?:[\\/]* ) . "$cache_file";;
-@@ -2189,7 +2823,7 @@
+@@ -2220,7 +2854,7 @@
      esac
    fi
  else
@@ -2069,7 +2069,7 @@
  $as_echo "$as_me: creating cache $cache_file" >&6;}
    >$cache_file
  fi
-@@ -2204,11 +2838,11 @@
+@@ -2235,11 +2869,11 @@
    eval ac_new_val=\$ac_env_${ac_var}_value
    case $ac_old_set,$ac_new_set in
      set,)
@@ -2083,7 +2083,7 @@
  $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
        ac_cache_corrupted=: ;;
      ,);;
-@@ -2218,17 +2852,17 @@
+@@ -2249,17 +2883,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 +2105,7 @@
  $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
        fi;;
    esac
-@@ -2240,43 +2874,20 @@
+@@ -2271,43 +2905,20 @@
      esac
      case " $ac_configure_args " in
        *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
@@ -2156,7 +2156,7 @@
  
  ac_ext=c
  ac_cpp='$CPP $CPPFLAGS'
-@@ -2290,14 +2901,12 @@
+@@ -2321,14 +2932,12 @@
  ac_config_headers="$ac_config_headers include/config.h"
  
  
@@ -2173,7 +2173,7 @@
  $as_echo "$as_me: WARNING: \$PATH contains /usr/ucb - build errors may follow" >&2;}
  	;;
  esac
-@@ -2329,24 +2938,16 @@
+@@ -2360,24 +2969,16 @@
  
  ac_aux_dir=
  for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
@@ -2206,7 +2206,7 @@
  fi
  
  # These three variables are undocumented and unsupported,
-@@ -2358,57 +2959,29 @@
+@@ -2389,57 +2990,29 @@
  ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
  
  
@@ -2227,7 +2227,7 @@
 -$as_echo "$as_me: error: cannot find libreplace in $libreplacepaths" >&2;}
 -   { (exit 1); exit 1; }; }
 -fi
--LIBREPLACEOBJ="replace.o"
+-LIBREPLACEOBJ="$libreplacedir/replace.o"
 -
 -
  # Make sure we can run config.sub.
@@ -2271,7 +2271,7 @@
  esac
  build=$ac_cv_build
  ac_save_IFS=$IFS; IFS='-'
-@@ -2424,28 +2997,24 @@
+@@ -2455,28 +3028,24 @@
  case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
  
  
@@ -2305,7 +2305,7 @@
  esac
  host=$ac_cv_host
  ac_save_IFS=$IFS; IFS='-'
-@@ -2461,28 +3030,24 @@
+@@ -2492,28 +3061,24 @@
  case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
  
  
@@ -2339,7 +2339,7 @@
  esac
  target=$ac_cv_target
  ac_save_IFS=$IFS; IFS='-'
-@@ -2505,6 +3070,27 @@
+@@ -2536,6 +3101,27 @@
      NONENONEs,x,x, &&
    program_prefix=${target_alias}-
  
@@ -2357,7 +2357,7 @@
 +if test x"$libreplacedir" = "x"; then
 +	as_fn_error "cannot find libreplace in $libreplacepaths" "$LINENO" 5
 +fi
-+LIBREPLACEOBJ="replace.o"
++LIBREPLACEOBJ="$libreplacedir/replace.o"
 +
 +
 +
@@ -2367,7 +2367,7 @@
  echo "LIBREPLACE_LOCATION_CHECKS: END"
  
  
-@@ -2533,7 +3119,7 @@
+@@ -2564,7 +3150,7 @@
  
  
  # Check whether --with-fhs was given.
@@ -2376,7 +2376,7 @@
    withval=$with_fhs;  case "$withval" in
    yes)
      lockdir="\${VARDIR}/lib/samba"
-@@ -2550,9 +3136,7 @@
+@@ -2581,9 +3167,7 @@
      cachedir="\${VARDIR}/lib/samba"
      ncalrpcdir="\${VARDIR}/ncalrpc"
  
@@ -2387,7 +2387,7 @@
  
      ;;
    esac
-@@ -2563,13 +3147,13 @@
+@@ -2594,13 +3178,13 @@
  # set private directory location
  
  # Check whether --with-privatedir was given.
@@ -2403,7 +2403,7 @@
  $as_echo "$as_me: WARNING: --with-privatedir called without argument - will use default" >&2;}
    ;;
    * )
-@@ -2583,13 +3167,13 @@
+@@ -2614,13 +3198,13 @@
  # set root sbin directory location
  
  # Check whether --with-rootsbindir was given.
@@ -2419,7 +2419,7 @@
  $as_echo "$as_me: WARNING: --with-rootsbindir called without argument - will use default" >&2;}
    ;;
    * )
-@@ -2603,13 +3187,13 @@
+@@ -2634,13 +3218,13 @@
  # set lock directory location
  
  # Check whether --with-lockdir was given.
@@ -2435,7 +2435,7 @@
  $as_echo "$as_me: WARNING: --with-lockdir called without argument - will use default" >&2;}
    ;;
    * )
-@@ -2623,13 +3207,13 @@
+@@ -2654,13 +3238,13 @@
  # set state directory location
  
  # Check whether --with-statedir was given.
@@ -2451,7 +2451,7 @@
  $as_echo "$as_me: WARNING: --with-statedir called without argument - will use default" >&2;}
    ;;
    * )
-@@ -2643,13 +3227,13 @@
+@@ -2674,13 +3258,13 @@
  # set cache directory location
  
  # Check whether --with-cachedir was given.
@@ -2467,7 +2467,7 @@
  $as_echo "$as_me: WARNING: --with-cachedir called without argument - will use default" >&2;}
    ;;
    * )
-@@ -2663,13 +3247,13 @@
+@@ -2694,13 +3278,13 @@
  # set pid directory location
  
  # Check whether --with-piddir was given.
@@ -2483,7 +2483,7 @@
  $as_echo "$as_me: WARNING: --with-piddir called without argument - will use default" >&2;}
    ;;
    * )
-@@ -2683,13 +3267,13 @@
+@@ -2714,13 +3298,13 @@
  # set ncalrpc directory location
  
  # Check whether --with-ncalrpcdir was given.
@@ -2499,7 +2499,7 @@
  $as_echo "$as_me: WARNING: --with-ncalrpcdir called without argument - will use default" >&2;}
    ;;
    * )
-@@ -2703,13 +3287,13 @@
+@@ -2734,13 +3318,13 @@
  # set SWAT directory location
  
  # Check whether --with-swatdir was given.
@@ -2515,7 +2515,7 @@
  $as_echo "$as_me: WARNING: --with-swatdir called without argument - will use default" >&2;}
    ;;
    * )
-@@ -2723,13 +3307,13 @@
+@@ -2754,13 +3338,13 @@
  # set configuration directory location
  
  # Check whether --with-configdir was given.
@@ -2531,7 +2531,7 @@
  $as_echo "$as_me: WARNING: --with-configdir called without argument - will use default" >&2;}
    ;;
    * )
-@@ -2743,13 +3327,13 @@
+@@ -2774,13 +3358,13 @@
  # set log directory location
  
  # Check whether --with-logfilebase was given.
@@ -2547,7 +2547,7 @@
  $as_echo "$as_me: WARNING: --with-logfilebase called without argument - will use default" >&2;}
    ;;
    * )
-@@ -2764,13 +3348,13 @@
+@@ -2795,13 +3379,13 @@
  # set shared modules (internal lib) directory location
  
  # Check whether --with-modulesdir was given.
@@ -2563,7 +2563,7 @@
  $as_echo "$as_me: WARNING: --with-modulesdir without argument - will use default" >&2;}
    ;;
    * )
-@@ -2784,13 +3368,13 @@
+@@ -2815,13 +3399,13 @@
  # set PAM modules directory location
  
  # Check whether --with-pammodulesdir was given.
@@ -2579,7 +2579,7 @@
  $as_echo "$as_me: WARNING: --with-pammodulesdir called without argument - will use default" >&2;}
    ;;
    * )
-@@ -2804,13 +3388,13 @@
+@@ -2835,13 +3419,13 @@
  # set man directory location
  
  # Check whether --with-mandir was given.
@@ -2595,7 +2595,7 @@
  $as_echo "$as_me: WARNING: --with-mandir without argument - will use default" >&2;}
    ;;
    * )
-@@ -2824,13 +3408,13 @@
+@@ -2855,13 +3439,13 @@
  # set locale directory location
  
  # Check whether --with-localedir was given.
@@ -2611,9 +2611,25 @@
  $as_echo "$as_me: WARNING: --with-localedir called without argument - will use default" >&2;}
    ;;
    *)
-@@ -2864,10 +3448,10 @@
+@@ -2875,13 +3459,13 @@
+ # set codepage directory location
  
+ # Check whether --with-codepagedir was given.
+-if test "${with_codepagedir+set}" = set; then
++if test "${with_codepagedir+set}" = set; then :
+   withval=$with_codepagedir;  case "$withval" in
+   yes|no)
+   #
+   # Just in case anybody calls it without argument
+   #
+-    { $as_echo "$as_me:$LINENO: WARNING: --with-codepagedir called without argument - will use default" >&5
++    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-codepagedir called without argument - will use default" >&5
+ $as_echo "$as_me: WARNING: --with-codepagedir called without argument - will use default" >&2;}
+   ;;
+   * )
+@@ -2915,10 +3499,10 @@
  
+ 
  # Check whether --with-selftest-prefix was given.
 -if test "${with_selftest_prefix+set}" = set; then
 +if test "${with_selftest_prefix+set}" = set; then :
@@ -2624,7 +2640,7 @@
  $as_echo "$as_me: WARNING: --with-selftest-prefix called without argument - will use default" >&2;}
    ;;
    * )
-@@ -2884,10 +3468,10 @@
+@@ -2935,10 +3519,10 @@
  
  
  # Check whether --with-selftest-shrdir was given.
@@ -2637,7 +2653,7 @@
  $as_echo "$as_me: WARNING: --with-selftest-shrdir called without argument - will use default" >&2;}
    ;;
    * )
-@@ -2906,19 +3490,15 @@
+@@ -2957,19 +3541,15 @@
  
  
  # Check whether --with-smbtorture4_path was given.
@@ -2660,7 +2676,7 @@
      fi
      smbtorture4_option="-t $withval"
    ;;
-@@ -2933,19 +3513,15 @@
+@@ -2984,19 +3564,15 @@
  
  
  # Check whether --with-selftest_custom_conf was given.
@@ -2683,7 +2699,7 @@
      fi
      selftest_custom_conf="-c $withval"
    ;;
-@@ -2958,7 +3534,7 @@
+@@ -3009,7 +3585,7 @@
  ## so that we don't mix -O and -g
  debug=no
  # Check whether --enable-debug was given.
@@ -2692,7 +2708,7 @@
    enableval=$enable_debug; if eval "test x$enable_debug = xyes"; then
  	debug=yes
      fi
-@@ -2968,7 +3544,7 @@
+@@ -3019,7 +3595,7 @@
  
  developer=no
  # Check whether --enable-developer was given.
@@ -2701,7 +2717,7 @@
    enableval=$enable_developer; if eval "test x$enable_developer = xyes"; then
          debug=yes
          developer=yes
-@@ -2978,7 +3554,7 @@
+@@ -3029,7 +3605,7 @@
  
  krb5developer=no
  # Check whether --enable-krb5developer was given.
@@ -2710,7 +2726,7 @@
    enableval=$enable_krb5developer; if eval "test x$enable_krb5developer = xyes"; then
          debug=yes
          developer=yes
-@@ -2989,7 +3565,7 @@
+@@ -3040,7 +3616,7 @@
  
  picky_developer=no
  # Check whether --enable-picky-developer was given.
@@ -2719,7 +2735,7 @@
    enableval=$enable_picky_developer; if eval "test x$enable_picky_developer = xyes"; then
          debug=yes
          developer=yes
-@@ -3000,7 +3576,7 @@
+@@ -3051,7 +3627,7 @@
  
  
  # Check whether --with-cfenc was given.
@@ -2728,7 +2744,7 @@
    withval=$with_cfenc;
  # May be in source $withval/CoreFoundation/StringEncodings.subproj.
  # Should have been in framework $withval/CoreFoundation.framework/Headers.
-@@ -3097,9 +3673,9 @@
+@@ -3148,9 +3724,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
@@ -2740,7 +2756,7 @@
    $as_echo_n "(cached) " >&6
  else
    if test -n "$CC"; then
-@@ -3110,24 +3686,24 @@
+@@ -3161,24 +3737,24 @@
  do
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
@@ -2770,7 +2786,7 @@
  $as_echo "no" >&6; }
  fi
  
-@@ -3137,9 +3713,9 @@
+@@ -3188,9 +3764,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
@@ -2782,7 +2798,7 @@
    $as_echo_n "(cached) " >&6
  else
    if test -n "$ac_ct_CC"; then
-@@ -3150,24 +3726,24 @@
+@@ -3201,24 +3777,24 @@
  do
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
@@ -2812,7 +2828,7 @@
  $as_echo "no" >&6; }
  fi
  
-@@ -3176,7 +3752,7 @@
+@@ -3227,7 +3803,7 @@
    else
      case $cross_compiling:$ac_tool_warned in
  yes:)
@@ -2821,7 +2837,7 @@
  $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
  ac_tool_warned=yes ;;
  esac
-@@ -3190,9 +3766,9 @@
+@@ -3241,9 +3817,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
@@ -2833,7 +2849,7 @@
    $as_echo_n "(cached) " >&6
  else
    if test -n "$CC"; then
-@@ -3203,24 +3779,24 @@
+@@ -3254,24 +3830,24 @@
  do
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
@@ -2863,7 +2879,7 @@
  $as_echo "no" >&6; }
  fi
  
-@@ -3230,9 +3806,9 @@
+@@ -3281,9 +3857,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
@@ -2875,7 +2891,7 @@
    $as_echo_n "(cached) " >&6
  else
    if test -n "$CC"; then
-@@ -3244,18 +3820,18 @@
+@@ -3295,18 +3871,18 @@
  do
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
@@ -2897,7 +2913,7 @@
  IFS=$as_save_IFS
  
  if test $ac_prog_rejected = yes; then
-@@ -3274,10 +3850,10 @@
+@@ -3325,10 +3901,10 @@
  fi
  CC=$ac_cv_prog_CC
  if test -n "$CC"; then
@@ -2910,7 +2926,7 @@
  $as_echo "no" >&6; }
  fi
  
-@@ -3289,9 +3865,9 @@
+@@ -3340,9 +3916,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
@@ -2922,7 +2938,7 @@
    $as_echo_n "(cached) " >&6
  else
    if test -n "$CC"; then
-@@ -3302,24 +3878,24 @@
+@@ -3353,24 +3929,24 @@
  do
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
@@ -2952,7 +2968,7 @@
  $as_echo "no" >&6; }
  fi
  
-@@ -3333,9 +3909,9 @@
+@@ -3384,9 +3960,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
@@ -2964,7 +2980,7 @@
    $as_echo_n "(cached) " >&6
  else
    if test -n "$ac_ct_CC"; then
-@@ -3346,24 +3922,24 @@
+@@ -3397,24 +3973,24 @@
  do
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
@@ -2994,7 +3010,7 @@
  $as_echo "no" >&6; }
  fi
  
-@@ -3376,7 +3952,7 @@
+@@ -3427,7 +4003,7 @@
    else
      case $cross_compiling:$ac_tool_warned in
  yes:)
@@ -3003,7 +3019,7 @@
  $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
  ac_tool_warned=yes ;;
  esac
-@@ -3387,57 +3963,37 @@
+@@ -3438,57 +4014,37 @@
  fi
  
  
@@ -3081,7 +3097,7 @@
  /* end confdefs.h.  */
  
  int
-@@ -3453,8 +4009,8 @@
+@@ -3504,8 +4060,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.
@@ -3092,7 +3108,7 @@
  ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
  
  # The possible output files:
-@@ -3470,17 +4026,17 @@
+@@ -3521,17 +4077,17 @@
  done
  rm -f $ac_rmfiles
  
@@ -3115,7 +3131,7 @@
    # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
  # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
  # in a Makefile.  We should not override ac_cv_exeext if it was cached,
-@@ -3497,7 +4053,7 @@
+@@ -3548,7 +4104,7 @@
  	# certainly right.
  	break;;
      *.* )
@@ -3124,7 +3140,7 @@
  	then :; else
  	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
  	fi
-@@ -3516,84 +4072,42 @@
+@@ -3567,84 +4123,42 @@
  else
    ac_file=''
  fi
@@ -3230,7 +3246,7 @@
    # If both `conftest.exe' and `conftest' are `present' (well, observable)
  # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
  # work properly (i.e., refer to `conftest.exe'), while it won't with
-@@ -3608,32 +4122,83 @@
+@@ -3659,32 +4173,83 @@
    esac
  done
  else
@@ -3330,7 +3346,7 @@
  /* end confdefs.h.  */
  
  int
-@@ -3645,17 +4210,17 @@
+@@ -3696,17 +4261,17 @@
  }
  _ACEOF
  rm -f conftest.o conftest.obj
@@ -3353,7 +3369,7 @@
    for ac_file in conftest.o conftest.obj conftest.*; do
    test -f "$ac_file" || continue;
    case $ac_file in
-@@ -3668,31 +4233,23 @@
+@@ -3719,31 +4284,23 @@
    $as_echo "$as_me: failed program was:" >&5
  sed 's/^/| /' conftest.$ac_ext >&5
  
@@ -3392,7 +3408,7 @@
  /* end confdefs.h.  */
  
  int
-@@ -3706,37 +4263,16 @@
+@@ -3757,37 +4314,16 @@
    return 0;
  }
  _ACEOF
@@ -3433,7 +3449,7 @@
  $as_echo "$ac_cv_c_compiler_gnu" >&6; }
  if test $ac_compiler_gnu = yes; then
    GCC=yes
-@@ -3745,20 +4281,16 @@
+@@ -3796,20 +4332,16 @@
  fi
  ac_test_CFLAGS=${CFLAGS+set}
  ac_save_CFLAGS=$CFLAGS
@@ -3457,7 +3473,7 @@
  /* end confdefs.h.  */
  
  int
-@@ -3769,35 +4301,11 @@
+@@ -3820,35 +4352,11 @@
    return 0;
  }
  _ACEOF
@@ -3496,7 +3512,7 @@
  /* end confdefs.h.  */
  
  int
-@@ -3808,36 +4316,12 @@
+@@ -3859,36 +4367,12 @@
    return 0;
  }
  _ACEOF
@@ -3537,7 +3553,7 @@
  /* end confdefs.h.  */
  
  int
-@@ -3848,42 +4332,17 @@
+@@ -3899,42 +4383,17 @@
    return 0;
  }
  _ACEOF
@@ -3582,7 +3598,7 @@
  $as_echo "$ac_cv_prog_cc_g" >&6; }
  if test "$ac_test_CFLAGS" = set; then
    CFLAGS=$ac_save_CFLAGS
-@@ -3900,18 +4359,14 @@
+@@ -3951,18 +4410,14 @@
      CFLAGS=
    fi
  fi
@@ -3604,7 +3620,7 @@
  /* end confdefs.h.  */
  #include <stdarg.h>
  #include <stdio.h>
-@@ -3968,32 +4423,9 @@
+@@ -4019,32 +4474,9 @@
  	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
  do
    CC="$ac_save_CC $ac_arg"
@@ -3638,7 +3654,7 @@
  rm -f core conftest.err conftest.$ac_objext
    test "x$ac_cv_prog_cc_c89" != "xno" && break
  done
-@@ -4004,17 +4436,19 @@
+@@ -4055,17 +4487,19 @@
  # AC_CACHE_VAL
  case "x$ac_cv_prog_cc_c89" in
    x)
@@ -3661,7 +3677,7 @@
  
  ac_ext=c
  ac_cpp='$CPP $CPPFLAGS'
-@@ -4025,18 +4459,14 @@
+@@ -4076,18 +4510,14 @@
  CFLAGS=$savedCFLAGS
  
  if test x"$GCC" != x"yes" ; then
@@ -3683,7 +3699,7 @@
  /* end confdefs.h.  */
  #include <stdarg.h>
  #include <stdbool.h>
-@@ -4178,32 +4608,9 @@
+@@ -4229,32 +4659,9 @@
  for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -xc99=all -qlanglvl=extc99
  do
    CC="$ac_save_CC $ac_arg"
@@ -3717,7 +3733,7 @@
  rm -f core conftest.err conftest.$ac_objext
    test "x$ac_cv_prog_cc_c99" != "xno" && break
  done
-@@ -4214,26 +4621,28 @@
+@@ -4265,26 +4672,28 @@
  # AC_CACHE_VAL
  case "x$ac_cv_prog_cc_c99" in
    x)
@@ -3751,7 +3767,7 @@
  $as_echo "${GCC_VERSION}" >&6; }
  fi
  
-@@ -4242,14 +4651,14 @@
+@@ -4293,14 +4702,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
@@ -3768,7 +3784,7 @@
    $as_echo_n "(cached) " >&6
  else
        # Double quotes because CPP needs to be expanded
-@@ -4264,11 +4673,7 @@
+@@ -4315,11 +4724,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.
@@ -3781,7 +3797,7 @@
  /* end confdefs.h.  */
  #ifdef __STDC__
  # include <limits.h>
-@@ -4277,78 +4682,34 @@
+@@ -4328,78 +4733,34 @@
  #endif
  		     Syntax error
  _ACEOF
@@ -3865,7 +3881,7 @@
    break
  fi
  
-@@ -4360,7 +4721,7 @@
+@@ -4411,7 +4772,7 @@
  else
    ac_cv_prog_CPP=$CPP
  fi
@@ -3874,7 +3890,7 @@
  $as_echo "$CPP" >&6; }
  ac_preproc_ok=false
  for ac_c_preproc_warn_flag in '' yes
-@@ -4371,11 +4732,7 @@
+@@ -4422,11 +4783,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.
@@ -3887,7 +3903,7 @@
  /* end confdefs.h.  */
  #ifdef __STDC__
  # include <limits.h>
-@@ -4384,87 +4741,40 @@
+@@ -4435,87 +4792,40 @@
  #endif
  		     Syntax error
  _ACEOF
@@ -3984,7 +4000,7 @@
  fi
  
  ac_ext=c
-@@ -4474,9 +4784,9 @@
+@@ -4525,9 +4835,9 @@
  ac_compiler_gnu=$ac_cv_c_compiler_gnu
  
  
@@ -3996,7 +4012,7 @@
    $as_echo_n "(cached) " >&6
  else
    if test -z "$GREP"; then
-@@ -4487,7 +4797,7 @@
+@@ -4538,7 +4848,7 @@
  do
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
@@ -4005,7 +4021,7 @@
      for ac_exec_ext in '' $ac_executable_extensions; do
        ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
        { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
-@@ -4507,7 +4817,7 @@
+@@ -4558,7 +4868,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
@@ -4014,7 +4030,7 @@
      if test $ac_count -gt ${ac_path_GREP_max-0}; then
        # Best one so far, save it but keep looking for a better one
        ac_cv_path_GREP="$ac_path_GREP"
-@@ -4522,26 +4832,24 @@
+@@ -4573,26 +4883,24 @@
        $ac_path_GREP_found && break 3
      done
    done
@@ -4046,7 +4062,7 @@
    $as_echo_n "(cached) " >&6
  else
    if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
-@@ -4555,7 +4863,7 @@
+@@ -4606,7 +4914,7 @@
  do
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
@@ -4055,7 +4071,7 @@
      for ac_exec_ext in '' $ac_executable_extensions; do
        ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
        { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
-@@ -4575,7 +4883,7 @@
+@@ -4626,7 +4934,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
@@ -4064,7 +4080,7 @@
      if test $ac_count -gt ${ac_path_EGREP_max-0}; then
        # Best one so far, save it but keep looking for a better one
        ac_cv_path_EGREP="$ac_path_EGREP"
-@@ -4590,12 +4898,10 @@
+@@ -4641,12 +4949,10 @@
        $ac_path_EGREP_found && break 3
      done
    done
@@ -4079,7 +4095,7 @@
    fi
  else
    ac_cv_path_EGREP=$EGREP
-@@ -4603,21 +4909,17 @@
+@@ -4654,21 +4960,17 @@
  
     fi
  fi
@@ -4105,7 +4121,7 @@
  /* end confdefs.h.  */
  #include <stdlib.h>
  #include <stdarg.h>
-@@ -4632,48 +4934,23 @@
+@@ -4683,48 +4985,23 @@
    return 0;
  }
  _ACEOF
@@ -4159,7 +4175,7 @@
  else
    ac_cv_header_stdc=no
  fi
-@@ -4683,18 +4960,14 @@
+@@ -4734,18 +5011,14 @@
  
  if test $ac_cv_header_stdc = yes; then
    # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
@@ -4181,7 +4197,7 @@
  else
    ac_cv_header_stdc=no
  fi
-@@ -4704,14 +4977,10 @@
+@@ -4755,14 +5028,10 @@
  
  if test $ac_cv_header_stdc = yes; then
    # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
@@ -4198,7 +4214,7 @@
  /* end confdefs.h.  */
  #include <ctype.h>
  #include <stdlib.h>
-@@ -4738,118 +5007,34 @@
+@@ -4789,118 +5058,34 @@
    return 0;
  }
  _ACEOF
@@ -4330,7 +4346,7 @@
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
-@@ -4860,139 +5045,8 @@
+@@ -4911,139 +5096,8 @@
  
  
  
@@ -4472,7 +4488,7 @@
    MINIX=yes
  else
    MINIX=
-@@ -5001,34 +5055,23 @@
+@@ -5052,34 +5106,23 @@
  
    if test "$MINIX" = yes; then
  
@@ -4513,7 +4529,7 @@
  /* end confdefs.h.  */
  
  #	  define __EXTENSIONS__ 1
-@@ -5041,71 +5084,35 @@
+@@ -5092,71 +5135,35 @@
    return 0;
  }
  _ACEOF
@@ -4596,7 +4612,7 @@
  /* end confdefs.h.  */
  #ifndef __APPLE_CC__
  	       not a universal capable compiler
-@@ -5113,46 +5120,34 @@
+@@ -5164,46 +5171,34 @@
  	     typedef int dummy;
  
  _ACEOF
@@ -4665,7 +4681,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  	     #include <sys/param.h>
-@@ -5170,30 +5165,9 @@
+@@ -5221,30 +5216,9 @@
    return 0;
  }
  _ACEOF
@@ -4698,7 +4714,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  		#include <sys/param.h>
-@@ -5209,49 +5183,18 @@
+@@ -5260,49 +5234,18 @@
    return 0;
  }
  _ACEOF
@@ -4751,7 +4767,7 @@
  /* end confdefs.h.  */
  #include <limits.h>
  
-@@ -5266,30 +5209,9 @@
+@@ -5317,30 +5260,9 @@
    return 0;
  }
  _ACEOF
@@ -4784,7 +4800,7 @@
  /* end confdefs.h.  */
  #include <limits.h>
  
-@@ -5304,51 +5226,20 @@
+@@ -5355,51 +5277,20 @@
    return 0;
  }
  _ACEOF
@@ -4840,7 +4856,7 @@
  /* end confdefs.h.  */
  short int ascii_mm[] =
  		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
-@@ -5374,24 +5265,7 @@
+@@ -5425,24 +5316,7 @@
    return 0;
  }
  _ACEOF
@@ -4866,7 +4882,7 @@
    if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
  	      ac_cv_c_bigendian=yes
  	    fi
-@@ -5403,20 +5277,10 @@
+@@ -5454,20 +5328,10 @@
  		ac_cv_c_bigendian=unknown
  	      fi
  	    fi
@@ -4888,7 +4904,7 @@
  /* end confdefs.h.  */
  $ac_includes_default
  int
-@@ -5436,81 +5300,43 @@
+@@ -5487,81 +5351,43 @@
    return 0;
  }
  _ACEOF
@@ -4982,7 +4998,7 @@
  /* end confdefs.h.  */
  #ifndef __cplusplus
  typedef int foo_t;
-@@ -5519,41 +5345,17 @@
+@@ -5570,41 +5396,17 @@
  #endif
  
  _ACEOF
@@ -5026,7 +5042,7 @@
  case $ac_cv_c_inline in
    inline | yes) ;;
    *)
-@@ -5573,14 +5375,10 @@
+@@ -5624,14 +5426,10 @@
  saved_CFLAGS="$CFLAGS";
  c99_init=no
  if test x"$c99_init" = x"no"; then
@@ -5043,7 +5059,7 @@
  /* end confdefs.h.  */
  #include <stdio.h>
  int
-@@ -5593,45 +5391,20 @@
+@@ -5644,45 +5442,20 @@
    return 0;
  }
  _ACEOF
@@ -5094,7 +5110,7 @@
  /* end confdefs.h.  */
  #include <stdio.h>
  int
-@@ -5644,45 +5417,20 @@
+@@ -5695,45 +5468,20 @@
    return 0;
  }
  _ACEOF
@@ -5145,7 +5161,7 @@
  /* end confdefs.h.  */
  #include <stdio.h>
  int
-@@ -5695,45 +5443,20 @@
+@@ -5746,45 +5494,20 @@
    return 0;
  }
  _ACEOF
@@ -5196,7 +5212,7 @@
  /* end confdefs.h.  */
  #include <stdio.h>
  int
-@@ -5746,45 +5469,20 @@
+@@ -5797,45 +5520,20 @@
    return 0;
  }
  _ACEOF
@@ -5247,7 +5263,7 @@
  /* end confdefs.h.  */
  #include <stdio.h>
  int
-@@ -5797,34 +5495,13 @@
+@@ -5848,34 +5546,13 @@
    return 0;
  }
  _ACEOF
@@ -5285,7 +5301,7 @@
  rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  fi
  
-@@ -5843,7 +5520,7 @@
+@@ -5894,7 +5571,7 @@
  else
      CFLAGS="$saved_CFLAGS"
      saved_CFLAGS=""
@@ -5294,7 +5310,7 @@
  $as_echo "$as_me: WARNING: c99 structure initializer are not supported" >&2;}
  fi
  
-@@ -5862,10 +5539,10 @@
+@@ -5913,10 +5590,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.
@@ -5307,7 +5323,7 @@
    $as_echo_n "(cached) " >&6
  else
    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-@@ -5873,11 +5550,11 @@
+@@ -5924,11 +5601,11 @@
  do
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
@@ -5323,7 +5339,7 @@
    /usr/ucb/* ) ;;
    *)
      # OSF1 and SCO ODT 3.0 have their own names for install.
-@@ -5914,7 +5591,7 @@
+@@ -5965,7 +5642,7 @@
      ;;
  esac
  
@@ -5332,7 +5348,7 @@
  IFS=$as_save_IFS
  
  rm -rf conftest.one conftest.two conftest.dir
-@@ -5930,7 +5607,7 @@
+@@ -5981,7 +5658,7 @@
      INSTALL=$ac_install_sh
    fi
  fi
@@ -5341,7 +5357,7 @@
  $as_echo "$INSTALL" >&6; }
  
  # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-@@ -5942,17 +5619,13 @@
+@@ -5993,17 +5670,13 @@
  test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
  
  
@@ -5362,7 +5378,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -5977,54 +5650,27 @@
+@@ -6028,54 +5701,27 @@
      ac_res=-l$ac_lib
      LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
    fi
@@ -5425,7 +5441,7 @@
    test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
  
  fi
-@@ -6032,7 +5678,6 @@
+@@ -6083,7 +5729,6 @@
  
  
  
@@ -5433,7 +5449,7 @@
   cat >>confdefs.h <<\EOF
  #ifndef _XOPEN_SOURCE_EXTENDED
  #define _XOPEN_SOURCE_EXTENDED 1
-@@ -6041,15 +5686,15 @@
+@@ -6092,15 +5737,15 @@
  
  
  # Check whether --enable-largefile was given.
@@ -5452,7 +5468,7 @@
    $as_echo_n "(cached) " >&6
  else
    ac_cv_sys_largefile_CC=no
-@@ -6058,11 +5703,7 @@
+@@ -6109,11 +5754,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.
@@ -5465,7 +5481,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
   /* Check that off_t can represent 2**63 - 1 correctly.
-@@ -6081,60 +5722,14 @@
+@@ -6132,60 +5773,14 @@
    return 0;
  }
  _ACEOF
@@ -5528,7 +5544,7 @@
  rm -f core conftest.err conftest.$ac_objext
  	 break
         done
-@@ -6142,23 +5737,19 @@
+@@ -6193,23 +5788,19 @@
         rm -f conftest.$ac_ext
      fi
  fi
@@ -5556,7 +5572,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
   /* Check that off_t can represent 2**63 - 1 correctly.
-@@ -6177,38 +5768,11 @@
+@@ -6228,38 +5819,11 @@
    return 0;
  }
  _ACEOF
@@ -5597,7 +5613,7 @@
  /* end confdefs.h.  */
  #define _FILE_OFFSET_BITS 64
  #include <sys/types.h>
-@@ -6228,38 +5792,15 @@
+@@ -6279,38 +5843,15 @@
    return 0;
  }
  _ACEOF
@@ -5638,7 +5654,7 @@
  $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
  case $ac_cv_sys_file_offset_bits in #(
    no | unknown) ;;
-@@ -6271,17 +5812,13 @@
+@@ -6322,17 +5863,13 @@
  esac
  rm -rf conftest*
    if test $ac_cv_sys_file_offset_bits = unknown; then
@@ -5659,7 +5675,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
   /* Check that off_t can represent 2**63 - 1 correctly.
-@@ -6300,38 +5837,11 @@
+@@ -6351,38 +5888,11 @@
    return 0;
  }
  _ACEOF
@@ -5700,7 +5716,7 @@
  /* end confdefs.h.  */
  #define _LARGE_FILES 1
  #include <sys/types.h>
-@@ -6351,38 +5861,15 @@
+@@ -6402,38 +5912,15 @@
    return 0;
  }
  _ACEOF
@@ -5741,7 +5757,7 @@
  $as_echo "$ac_cv_sys_large_files" >&6; }
  case $ac_cv_sys_large_files in #(
    no | unknown) ;;
-@@ -6406,31 +5893,25 @@
+@@ -6457,31 +5944,25 @@
  	*hpux*)
  		# mmap on HPUX is completely broken...
  
@@ -5778,7 +5794,7 @@
  
  		if test "${GCC}" != "yes"; then
  			## for funky AIX compiler using strncpy()
-@@ -6442,7 +5923,6 @@
+@@ -6493,7 +5974,6 @@
  
  
  
@@ -5786,7 +5802,7 @@
   cat >>confdefs.h <<\EOF
  #ifndef _XOPEN_SOURCE
  #define _XOPEN_SOURCE 600
-@@ -6452,7 +5932,6 @@
+@@ -6503,7 +5983,6 @@
  
  
  
@@ -5794,7 +5810,7 @@
   cat >>confdefs.h <<\EOF
  #ifndef _OSF_SOURCE
  #define _OSF_SOURCE 1
-@@ -6469,9 +5948,7 @@
+@@ -6520,9 +5999,7 @@
  			*)
  				CFLAGS="$CFLAGS -D_POSIX_C_SOURCE=200112L"
  
@@ -5805,7 +5821,7 @@
  
  				;;
  		esac
-@@ -6480,9 +5957,7 @@
+@@ -6531,9 +6008,7 @@
  			*)
  				CFLAGS="$CFLAGS -D_SYSV"
  
@@ -5816,7 +5832,7 @@
  
  				;;
  		esac
-@@ -6491,978 +5966,385 @@
+@@ -6542,978 +6017,385 @@
  
  
  
@@ -7050,7 +7066,7 @@
  _ACEOF
  
  
-@@ -7470,27613 +6352,429 @@
+@@ -7521,30401 +6403,2005 @@
  # 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.
@@ -7215,7 +7231,10 @@
 -  ;
 -  return 0;
 -}
--_ACEOF
++
++cat >>confdefs.h <<_ACEOF
++#define SIZEOF_SSIZE_T $ac_cv_sizeof_ssize_t
+ _ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -7239,8 +7258,13 @@
 -    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 SIZEOF_SSIZE_T $ac_cv_sizeof_ssize_t
++#define HAVE_INTPTR_T 1
  _ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
@@ -7256,14 +7280,12 @@
 -  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 :
 +
-+ac_fn_c_check_type "$LINENO" "intptr_t" "ac_cv_type_intptr_t" "$ac_includes_default"
-+if test "x$ac_cv_type_intptr_t" = x""yes; then :
-+
-+else
-+
 +cat >>confdefs.h <<_ACEOF
-+#define intptr_t long long
++#define HAVE_UINTPTR_T 1
  _ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
@@ -7284,13 +7306,7 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_lo=$ac_mid; break
-+
-+fi
-+
-+ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default"
-+if test "x$ac_cv_type_uintptr_t" = x""yes; then :
-+
- else
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
  
@@ -7300,26 +7316,22 @@
 -			  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 uintptr_t unsigned long long
++#define HAVE_PTRDIFF_T 1
 +_ACEOF
-+
- fi
  
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -  done
-+ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
-+if test "x$ac_cv_type_ptrdiff_t" = x""yes; then :
-+
- else
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
  
 -	ac_lo= ac_hi=
-+cat >>confdefs.h <<_ACEOF
-+#define ptrdiff_t unsigned long long
-+_ACEOF
-+
  fi
  
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
@@ -7403,17 +7415,13 @@
 +  libreplace_cv_immediate_structures=no
 +fi
 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-+
-+fi
+ 
+-	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
-+
-+$as_echo "#define HAVE_IMMEDIATE_STRUCTURES 1" >>confdefs.h
  
--	ac_lo=`expr '(' $ac_mid ')' + 1`
- fi
- 
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -done
 -case $ac_lo in
@@ -7430,15 +7438,7 @@
 -     ac_cv_sizeof_short=0
 -   fi ;;
 -esac
-+
-+echo "LIBREPLACE_CC_CHECKS: END"
-+
-+
-+
-+# Check whether --enable-external_libtalloc was given.
-+if test "${enable_external_libtalloc+set}" = set; then :
-+  enableval=$enable_external_libtalloc;  enable_external_libtalloc=$enableval
- else
+-else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
@@ -7453,8 +7453,7 @@
 -int
 -main ()
 -{
-+   enable_external_libtalloc=auto
-+fi
++$as_echo "#define HAVE_IMMEDIATE_STRUCTURES 1" >>confdefs.h
  
 -  FILE *f = fopen ("conftest.val", "w");
 -  if (! f)
@@ -7476,7 +7475,8 @@
 -  /* Do not output a trailing newline, as this causes \r\n confusion
 -     on some platforms.  */
 -  return ferror (f) || fclose (f) != 0;
--
++fi
+ 
 -  ;
 -  return 0;
 -}
@@ -7508,7 +7508,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
@@ -7526,17 +7526,39 @@
 -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 -fi
 -rm -f conftest.val
--fi
++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
 -{ $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
 -#define SIZEOF_SHORT $ac_cv_sizeof_short
 -_ACEOF
--
--
+ 
+ 
 -# The cast to long int works around a bug in the HP C Compiler
 -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
 -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
@@ -7560,7 +7582,8 @@
 -{
 -static int test_array [1 - 2 * !(((long int) (sizeof (long))) >= 0)];
 -test_array [0] = 0
--
++TEVENT_CFLAGS="-I$teventdir"
+ 
 -  ;
 -  return 0;
 -}
@@ -7597,11 +7620,21 @@
 -{
 -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;
 -}
--_ACEOF
++for ac_header in sys/epoll.h
++do :
++  ac_fn_c_check_header_mongrel "$LINENO" "sys/epoll.h" "ac_cv_header_sys_epoll_h" "$ac_includes_default"
++if test "x$ac_cv_header_sys_epoll_h" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_SYS_EPOLL_H 1
+ _ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -7624,24 +7657,31 @@
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
+ 
 -	ac_lo=`expr $ac_mid + 1`
 -			if test $ac_lo -le $ac_mid; then
 -			  ac_lo= ac_hi=
 -			  break
 -			fi
 -			ac_mid=`expr 2 '*' $ac_mid + 1`
--fi
--
+ 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.  */
--_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.  */
@@ -7651,7 +7691,7 @@
 -{
 -static int test_array [1 - 2 * !(((long int) (sizeof (long))) < 0)];
 -test_array [0] = 0
--
+ 
 -  ;
 -  return 0;
 -}
@@ -7688,7 +7728,9 @@
 -{
 -static int test_array [1 - 2 * !(((long int) (sizeof (long))) >= $ac_mid)];
 -test_array [0] = 0
--
++fi
++done
+ 
 -  ;
 -  return 0;
 -}
@@ -7715,27 +7757,33 @@
 -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
 -			  ac_lo= ac_hi=
 -			  break
 -			fi
 -			ac_mid=`expr 2 '*' $ac_mid`
--fi
--
+ fi
+ 
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -  done
 -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
--
+ 
 -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
@@ -7752,7 +7800,7 @@
 -{
 -static int test_array [1 - 2 * !(((long int) (sizeof (long))) <= $ac_mid)];
 -test_array [0] = 0
--
+ 
 -  ;
 -  return 0;
 -}
@@ -7779,10 +7827,28 @@
 -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`
--fi
--
++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
+ 
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -done
 -case $ac_lo in
@@ -7814,7 +7880,7 @@
 -int
 -main ()
 -{
--
+ 
 -  FILE *f = fopen ("conftest.val", "w");
 -  if (! f)
 -    return 1;
@@ -7835,7 +7901,7 @@
 -  /* Do not output a trailing newline, as this causes \r\n confusion
 -     on some platforms.  */
 -  return ferror (f) || fclose (f) != 0;
--
+ 
 -  ;
 -  return 0;
 -}
@@ -7867,7 +7933,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" = yes; then
 -     { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
@@ -7888,14 +7954,14 @@
 -fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
 -$as_echo "$ac_cv_sizeof_long" >&6; }
--
--
--
+ 
+ 
+ 
 -cat >>confdefs.h <<_ACEOF
 -#define SIZEOF_LONG $ac_cv_sizeof_long
 -_ACEOF
--
--
+ 
+ 
 -# The cast to long int works around a bug in the HP C Compiler
 -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
 -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
@@ -7919,7 +7985,7 @@
 -{
 -static int test_array [1 - 2 * !(((long int) (sizeof (long long))) >= 0)];
 -test_array [0] = 0
--
+ 
 -  ;
 -  return 0;
 -}
@@ -7956,7 +8022,7 @@
 -{
 -static int test_array [1 - 2 * !(((long int) (sizeof (long long))) <= $ac_mid)];
 -test_array [0] = 0
--
+ 
 -  ;
 -  return 0;
 -}
@@ -7983,7 +8049,7 @@
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
+ 
 -	ac_lo=`expr $ac_mid + 1`
 -			if test $ac_lo -le $ac_mid; then
 -			  ac_lo= ac_hi=
@@ -7991,13 +8057,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
@@ -8010,7 +8076,7 @@
 -{
 -static int test_array [1 - 2 * !(((long int) (sizeof (long long))) < 0)];
 -test_array [0] = 0
--
+ 
 -  ;
 -  return 0;
 -}
@@ -8047,7 +8113,7 @@
 -{
 -static int test_array [1 - 2 * !(((long int) (sizeof (long long))) >= $ac_mid)];
 -test_array [0] = 0
--
+ 
 -  ;
 -  return 0;
 -}
@@ -8074,7 +8140,7 @@
 -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=
@@ -8082,19 +8148,19 @@
 -			fi
 -			ac_mid=`expr 2 '*' $ac_mid`
 -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
--
+ 
 -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
@@ -8111,7 +8177,7 @@
 -{
 -static int test_array [1 - 2 * !(((long int) (sizeof (long long))) <= $ac_mid)];
 -test_array [0] = 0
--
+ 
 -  ;
 -  return 0;
 -}
@@ -8138,10 +8204,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
@@ -8173,7 +8239,7 @@
 -int
 -main ()
 -{
--
+ 
 -  FILE *f = fopen ("conftest.val", "w");
 -  if (! f)
 -    return 1;
@@ -8194,7 +8260,7 @@
 -  /* Do not output a trailing newline, as this causes \r\n confusion
 -     on some platforms.  */
 -  return ferror (f) || fclose (f) != 0;
--
+ 
 -  ;
 -  return 0;
 -}
@@ -8226,7 +8292,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
@@ -8247,15 +8313,15 @@
 -fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
 -$as_echo "$ac_cv_sizeof_long_long" >&6; }
--
--
--
+ 
+ 
+ 
 -cat >>confdefs.h <<_ACEOF
 -#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
 -_ACEOF
--
--
--
+ 
+ 
+ 
 -{ $as_echo "$as_me:$LINENO: checking for uint_t" >&5
 -$as_echo_n "checking for uint_t... " >&6; }
 -if test "${ac_cv_type_uint_t+set}" = set; then
@@ -8334,18 +8400,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
@@ -8353,13 +8419,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
@@ -8438,18 +8504,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
@@ -8457,13 +8523,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
@@ -8542,18 +8608,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
@@ -8561,13 +8627,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
@@ -8646,32 +8712,53 @@
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
+ 
 -	ac_cv_type_int16_t=yes
--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
++if test "x$CFLAGS" = x; then
++  CFLAGS="-O"
+ 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
--fi
++if eval "test x$developer = xyes"; then
++	enable_socket_wrapper=yes
+ 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
@@ -8750,33 +8837,46 @@
 -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
--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
 -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
++
++# Check whether --enable-nss-wrapper was given.
++if test "${enable_nss_wrapper+set}" = set; then :
++  enableval=$enable_nss_wrapper;
+ 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
--
--fi
--
--
+ 
++HAVE_NSS_WRAPPER=no
++
++if eval "test x$developer = xyes"; then
++	enable_nss_wrapper=yes
+ fi
+ 
++if eval "test x$enable_nss_wrapper = xyes"; then
+ 
 -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; }
@@ -8856,18 +8956,23 @@
 -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
--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
 -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
@@ -8875,13 +8980,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
@@ -8960,18 +9065,30 @@
 -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
@@ -8979,19 +9096,28 @@
 -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
--  $as_echo_n "(cached) " >&6
--else
++# Probe the gcc version for extra CFLAGS. We always stash these in
++# DEVELOPER_CFLAGS, so that you can turn them on and off with a simple
++# Makefile edit, avoiding the need to re-run configure.
++if test x"$ac_cv_c_compiler_gnu" = x"yes" ; then
++    	DEVELOPER_CFLAGS="-g -Wall -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -DDEBUG_PASSWORD -DDEVELOPER"
++	# Add -Wdeclaration-after-statement if compiler supports it
++	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that the C compiler understands -Wdeclaration-after-statement" >&5
++$as_echo_n "checking that the C compiler understands -Wdeclaration-after-statement... " >&6; }
++if test "${samba_cv_HAVE_Wdeclaration_after_statement+set}" = set; then :
+   $as_echo_n "(cached) " >&6
+ else
 -  ac_cv_type_int32_t=no
 -cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
@@ -9032,7 +9158,22 @@
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
++
++
++	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.  */
 -$ac_includes_default
 -int
 -main ()
@@ -9042,7 +9183,12 @@
 -  ;
 -  return 0;
 -}
--_ACEOF
++
++	    int main(void)
++	    {
++	    	return 0;
++	    }
+ _ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -9062,21 +9208,38 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  :
--else
++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
 -
 -	ac_cv_type_int32_t=yes
--fi
--
++  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
+ 
 -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
--
++	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; }
+ 
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_int32_t" >&5
@@ -9084,25 +9247,46 @@
 -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
--else
++	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_type_uint32_t=no
 -cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
 -$ac_includes_default
 -int
 -main ()
@@ -9112,7 +9296,12 @@
 -  ;
 -  return 0;
 -}
--_ACEOF
++
++	    int main(void)
++	    {
++	    	return 0;
++	    }
+ _ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -10792,15 +10981,13 @@
 -{ $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
--#define intptr_t long long
+-#define HAVE_INTPTR_T 1
 -_ACEOF
 -
+-
 -fi
--
 -{ $as_echo "$as_me:$LINENO: checking for uintptr_t" >&5
 -$as_echo_n "checking for uintptr_t... " >&6; }
 -if test "${ac_cv_type_uintptr_t+set}" = set; then
@@ -10896,15 +11083,13 @@
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
 -$as_echo "$ac_cv_type_uintptr_t" >&6; }
 -if test "x$ac_cv_type_uintptr_t" = x""yes; then
--  :
--else
 -
 -cat >>confdefs.h <<_ACEOF
--#define uintptr_t unsigned long long
+-#define HAVE_UINTPTR_T 1
 -_ACEOF
 -
+-
 -fi
--
 -{ $as_echo "$as_me:$LINENO: checking for ptrdiff_t" >&5
 -$as_echo_n "checking for ptrdiff_t... " >&6; }
 -if test "${ac_cv_type_ptrdiff_t+set}" = set; then
@@ -11000,13 +11185,12 @@
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_ptrdiff_t" >&5
 -$as_echo "$ac_cv_type_ptrdiff_t" >&6; }
 -if test "x$ac_cv_type_ptrdiff_t" = x""yes; then
--  :
--else
 -
 -cat >>confdefs.h <<_ACEOF
--#define ptrdiff_t unsigned long long
+-#define HAVE_PTRDIFF_T 1
 -_ACEOF
 -
+-
 -fi
 -
 -
@@ -11102,982 +11286,9 @@
 -
 -
 -
--# Check whether --enable-external_libtalloc was given.
--if test "${enable_external_libtalloc+set}" = set; then
--  enableval=$enable_external_libtalloc;  enable_external_libtalloc=$enableval
--else
--   enable_external_libtalloc=auto
--fi
 -
 -
--if test "x$enable_external_libtalloc" != xno
--then
 -
--
--if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
--	if test -n "$ac_tool_prefix"; then
--  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
--set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
--{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
--$as_echo_n "checking for $ac_word... " >&6; }
--if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
--  $as_echo_n "(cached) " >&6
--else
--  case $PKG_CONFIG in
--  [\\/]* | ?:[\\/]*)
--  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
--  ;;
--  *)
--  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
--for as_dir in $PATH
--do
--  IFS=$as_save_IFS
--  test -z "$as_dir" && as_dir=.
--  for ac_exec_ext in '' $ac_executable_extensions; do
--  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
--    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
--    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
--    break 2
--  fi
--done
--done
--IFS=$as_save_IFS
--
--  ;;
--esac
--fi
--PKG_CONFIG=$ac_cv_path_PKG_CONFIG
--if test -n "$PKG_CONFIG"; then
--  { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
--$as_echo "$PKG_CONFIG" >&6; }
--else
--  { $as_echo "$as_me:$LINENO: result: no" >&5
--$as_echo "no" >&6; }
--fi
--
--
--fi
--if test -z "$ac_cv_path_PKG_CONFIG"; then
--  ac_pt_PKG_CONFIG=$PKG_CONFIG
--  # Extract the first word of "pkg-config", so it can be a program name with args.
--set dummy pkg-config; ac_word=$2
--{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
--$as_echo_n "checking for $ac_word... " >&6; }
--if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
--  $as_echo_n "(cached) " >&6
--else
--  case $ac_pt_PKG_CONFIG in
--  [\\/]* | ?:[\\/]*)
--  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
--  ;;
--  *)
--  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
--for as_dir in $PATH
--do
--  IFS=$as_save_IFS
--  test -z "$as_dir" && as_dir=.
--  for ac_exec_ext in '' $ac_executable_extensions; do
--  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
--    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
--    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
--    break 2
--  fi
--done
--done
--IFS=$as_save_IFS
--
--  ;;
--esac
--fi
--ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
--if test -n "$ac_pt_PKG_CONFIG"; then
--  { $as_echo "$as_me:$LINENO: result: $ac_pt_PKG_CONFIG" >&5
--$as_echo "$ac_pt_PKG_CONFIG" >&6; }
--else
--  { $as_echo "$as_me:$LINENO: result: no" >&5
--$as_echo "no" >&6; }
--fi
--
--  if test "x$ac_pt_PKG_CONFIG" = x; then
--    PKG_CONFIG=""
--  else
--    case $cross_compiling:$ac_tool_warned in
--yes:)
--{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
--$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
--ac_tool_warned=yes ;;
--esac
--    PKG_CONFIG=$ac_pt_PKG_CONFIG
--  fi
--else
--  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
--fi
--
--fi
--if test -n "$PKG_CONFIG"; then
--	_pkg_min_version=0.9.0
--	{ $as_echo "$as_me:$LINENO: checking pkg-config is at least version $_pkg_min_version" >&5
--$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
--	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
--		{ $as_echo "$as_me:$LINENO: result: yes" >&5
--$as_echo "yes" >&6; }
--	else
--		{ $as_echo "$as_me:$LINENO: result: no" >&5
--$as_echo "no" >&6; }
--		PKG_CONFIG=""
--	fi
--
--fi
--
--pkg_failed=no
--{ $as_echo "$as_me:$LINENO: checking for TALLOC" >&5
--$as_echo_n "checking for TALLOC... " >&6; }
--
--if test -n "$PKG_CONFIG"; then
--    if test -n "$TALLOC_CFLAGS"; then
--        pkg_cv_TALLOC_CFLAGS="$TALLOC_CFLAGS"
--    else
--        if test -n "$PKG_CONFIG" && \
--    { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"talloc >= 1.3.0\"") >&5
--  ($PKG_CONFIG --exists --print-errors "talloc >= 1.3.0") 2>&5
--  ac_status=$?
--  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
--  (exit $ac_status); }; then
--  pkg_cv_TALLOC_CFLAGS=`$PKG_CONFIG --cflags "talloc >= 1.3.0" 2>/dev/null`
--else
--  pkg_failed=yes
--fi
--    fi
--else
--	pkg_failed=untried
--fi
--if test -n "$PKG_CONFIG"; then
--    if test -n "$TALLOC_LIBS"; then
--        pkg_cv_TALLOC_LIBS="$TALLOC_LIBS"
--    else
--        if test -n "$PKG_CONFIG" && \
--    { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"talloc >= 1.3.0\"") >&5
--  ($PKG_CONFIG --exists --print-errors "talloc >= 1.3.0") 2>&5
--  ac_status=$?
--  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
--  (exit $ac_status); }; then
--  pkg_cv_TALLOC_LIBS=`$PKG_CONFIG --libs "talloc >= 1.3.0" 2>/dev/null`
--else
--  pkg_failed=yes
--fi
--    fi
--else
--	pkg_failed=untried
--fi
--
--
--
--if test $pkg_failed = yes; then
--
--if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
--        _pkg_short_errors_supported=yes
--else
--        _pkg_short_errors_supported=no
--fi
--        if test $_pkg_short_errors_supported = yes; then
--	        TALLOC_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "talloc >= 1.3.0"`
--        else
--	        TALLOC_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "talloc >= 1.3.0"`
--        fi
--	# Put the nasty error message in config.log where it belongs
--	echo "$TALLOC_PKG_ERRORS" >&5
--
--	{ $as_echo "$as_me:$LINENO: result: no" >&5
--$as_echo "no" >&6; }
--                 if test "x$enable_external_libtalloc" = xyes; then
--		 	{ { $as_echo "$as_me:$LINENO: error: Unable to find libtalloc" >&5
--$as_echo "$as_me: error: Unable to find libtalloc" >&2;}
--   { (exit 1); exit 1; }; }
--	      else
--			enable_external_libtalloc=no
--		  fi
--
--elif test $pkg_failed = untried; then
--	 if test "x$enable_external_libtalloc" = xyes; then
--		 	{ { $as_echo "$as_me:$LINENO: error: Unable to find libtalloc" >&5
--$as_echo "$as_me: error: Unable to find libtalloc" >&2;}
--   { (exit 1); exit 1; }; }
--	      else
--			enable_external_libtalloc=no
--		  fi
--
--else
--	TALLOC_CFLAGS=$pkg_cv_TALLOC_CFLAGS
--	TALLOC_LIBS=$pkg_cv_TALLOC_LIBS
--        { $as_echo "$as_me:$LINENO: result: yes" >&5
--$as_echo "yes" >&6; }
--	 enable_external_libtalloc=yes
--fi
--fi
--
--if test "x$enable_external_libtalloc" != xyes
--then
--	tallocdir=""
--tallocpaths=". lib/talloc talloc ../talloc ../lib/talloc"
--for d in $tallocpaths; do
--	if test -f "$srcdir/$d/talloc.c"; then
--		tallocdir="$d"
--
--		break;
--	fi
--done
--if test x"$tallocdir" = "x"; then
--   { { $as_echo "$as_me:$LINENO: error: cannot find talloc source in $tallocpaths" >&5
--$as_echo "$as_me: error: cannot find talloc source in $tallocpaths" >&2;}
--   { (exit 1); exit 1; }; }
--fi
--TALLOC_OBJ="talloc.o"
--
--
--TALLOC_CFLAGS="-I$srcdir/$tallocdir"
--
--
--TALLOC_LIBS=""
--
--
--# The cast to long int works around a bug in the HP C Compiler
--# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
--# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
--# This bug is HP SR number 8606223364.
--{ $as_echo "$as_me:$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
--/* confdefs.h.  */
--_ACEOF
--cat confdefs.h >>conftest.$ac_ext
--cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
--$ac_includes_default
--int
--main ()
--{
--static int test_array [1 - 2 * !(((long int) (sizeof (size_t))) >= 0)];
--test_array [0] = 0
--
--  ;
--  return 0;
--}
--_ACEOF
--rm -f conftest.$ac_objext
--if { (ac_try="$ac_compile"
--case "(($ac_try" in
--  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
--  *) ac_try_echo=$ac_try;;
--esac
--eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
--$as_echo "$ac_try_echo") >&5
--  (eval "$ac_compile") 2>conftest.er1
--  ac_status=$?
--  grep -v '^ *+' conftest.er1 >conftest.err
--  rm -f conftest.er1
--  cat conftest.err >&5
--  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
--  (exit $ac_status); } && {
--	 test -z "$ac_c_werror_flag" ||
--	 test ! -s conftest.err
--       } && test -s conftest.$ac_objext; then
--  ac_lo=0 ac_mid=0
--  while :; do
--    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 int test_array [1 - 2 * !(((long int) (sizeof (size_t))) <= $ac_mid)];
--test_array [0] = 0
--
--  ;
--  return 0;
--}
--_ACEOF
--rm -f conftest.$ac_objext
--if { (ac_try="$ac_compile"
--case "(($ac_try" in
--  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
--  *) ac_try_echo=$ac_try;;
--esac
--eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
--$as_echo "$ac_try_echo") >&5
--  (eval "$ac_compile") 2>conftest.er1
--  ac_status=$?
--  grep -v '^ *+' conftest.er1 >conftest.err
--  rm -f conftest.er1
--  cat conftest.err >&5
--  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
--  (exit $ac_status); } && {
--	 test -z "$ac_c_werror_flag" ||
--	 test ! -s conftest.err
--       } && test -s conftest.$ac_objext; then
--  ac_hi=$ac_mid; break
--else
--  $as_echo "$as_me: failed program was:" >&5
--sed 's/^/| /' conftest.$ac_ext >&5
--
--	ac_lo=`expr $ac_mid + 1`
--			if test $ac_lo -le $ac_mid; then
--			  ac_lo= ac_hi=
--			  break
--			fi
--			ac_mid=`expr 2 '*' $ac_mid + 1`
--fi
--
--rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
--  done
--else
--  $as_echo "$as_me: failed program was:" >&5
--sed 's/^/| /' conftest.$ac_ext >&5
--
--	cat >conftest.$ac_ext <<_ACEOF
--/* confdefs.h.  */
--_ACEOF
--cat confdefs.h >>conftest.$ac_ext
--cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
--$ac_includes_default
--int
--main ()
--{
--static int test_array [1 - 2 * !(((long int) (sizeof (size_t))) < 0)];
--test_array [0] = 0
--
--  ;
--  return 0;
--}
--_ACEOF
--rm -f conftest.$ac_objext
--if { (ac_try="$ac_compile"
--case "(($ac_try" in
--  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
--  *) ac_try_echo=$ac_try;;
--esac
--eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
--$as_echo "$ac_try_echo") >&5
--  (eval "$ac_compile") 2>conftest.er1
--  ac_status=$?
--  grep -v '^ *+' conftest.er1 >conftest.err
--  rm -f conftest.er1
--  cat conftest.err >&5
--  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
--  (exit $ac_status); } && {
--	 test -z "$ac_c_werror_flag" ||
--	 test ! -s conftest.err
--       } && test -s conftest.$ac_objext; then
--  ac_hi=-1 ac_mid=-1
--  while :; do
--    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 int test_array [1 - 2 * !(((long int) (sizeof (size_t))) >= $ac_mid)];
--test_array [0] = 0
--
--  ;
--  return 0;
--}
--_ACEOF
--rm -f conftest.$ac_objext
--if { (ac_try="$ac_compile"
--case "(($ac_try" in
--  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
--  *) ac_try_echo=$ac_try;;
--esac
--eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
--$as_echo "$ac_try_echo") >&5
--  (eval "$ac_compile") 2>conftest.er1
--  ac_status=$?
--  grep -v '^ *+' conftest.er1 >conftest.err
--  rm -f conftest.er1
--  cat conftest.err >&5
--  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
--  (exit $ac_status); } && {
--	 test -z "$ac_c_werror_flag" ||
--	 test ! -s conftest.err
--       } && test -s conftest.$ac_objext; then
--  ac_lo=$ac_mid; break
--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
--
--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
--
--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`
--  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 int test_array [1 - 2 * !(((long int) (sizeof (size_t))) <= $ac_mid)];
--test_array [0] = 0
--
--  ;
--  return 0;
--}
--_ACEOF
--rm -f conftest.$ac_objext
--if { (ac_try="$ac_compile"
--case "(($ac_try" in
--  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
--  *) ac_try_echo=$ac_try;;
--esac
--eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
--$as_echo "$ac_try_echo") >&5
--  (eval "$ac_compile") 2>conftest.er1
--  ac_status=$?
--  grep -v '^ *+' conftest.er1 >conftest.err
--  rm -f conftest.er1
--  cat conftest.err >&5
--  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
--  (exit $ac_status); } && {
--	 test -z "$ac_c_werror_flag" ||
--	 test ! -s conftest.err
--       } && test -s conftest.$ac_objext; then
--  ac_hi=$ac_mid
--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
--?*) ac_cv_sizeof_size_t=$ac_lo;;
--'') if test "$ac_cv_type_size_t" = yes; then
--     { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
--$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
--{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
--See \`config.log' for more details." >&5
--$as_echo "$as_me: error: cannot compute sizeof (size_t)
--See \`config.log' for more details." >&2;}
--   { (exit 77); exit 77; }; }; }
--   else
--     ac_cv_sizeof_size_t=0
--   fi ;;
--esac
--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
--static long int longval () { return (long int) (sizeof (size_t)); }
--static unsigned long int ulongval () { return (long int) (sizeof (size_t)); }
--#include <stdio.h>
--#include <stdlib.h>
--int
--main ()
--{
--
--  FILE *f = fopen ("conftest.val", "w");
--  if (! f)
--    return 1;
--  if (((long int) (sizeof (size_t))) < 0)
--    {
--      long int i = longval ();
--      if (i != ((long int) (sizeof (size_t))))
--	return 1;
--      fprintf (f, "%ld", i);
--    }
--  else
--    {
--      unsigned long int i = ulongval ();
--      if (i != ((long int) (sizeof (size_t))))
--	return 1;
--      fprintf (f, "%lu", i);
--    }
--  /* Do not output a trailing newline, as this causes \r\n confusion
--     on some platforms.  */
--  return ferror (f) || fclose (f) != 0;
--
--  ;
--  return 0;
--}
--_ACEOF
--rm -f 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>&5
--  ac_status=$?
--  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
--  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
--  { (case "(($ac_try" in
--  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
--  *) ac_try_echo=$ac_try;;
--esac
--eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
--$as_echo "$ac_try_echo") >&5
--  (eval "$ac_try") 2>&5
--  ac_status=$?
--  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
--  (exit $ac_status); }; }; then
--  ac_cv_sizeof_size_t=`cat conftest.val`
--else
--  $as_echo "$as_me: program exited with status $ac_status" >&5
--$as_echo "$as_me: failed program was:" >&5
--sed 's/^/| /' conftest.$ac_ext >&5
--
--( exit $ac_status )
--if test "$ac_cv_type_size_t" = yes; then
--     { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
--$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
--{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
--See \`config.log' for more details." >&5
--$as_echo "$as_me: error: cannot compute sizeof (size_t)
--See \`config.log' for more details." >&2;}
--   { (exit 77); exit 77; }; }; }
--   else
--     ac_cv_sizeof_size_t=0
--   fi
--fi
--rm -rf conftest.dSYM
--rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
--fi
--rm -f conftest.val
--fi
--{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
--$as_echo "$ac_cv_sizeof_size_t" >&6; }
--
--
--
--cat >>confdefs.h <<_ACEOF
--#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
--_ACEOF
--
--
--# The cast to long int works around a bug in the HP C Compiler
--# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
--# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
--# This bug is HP SR number 8606223364.
--{ $as_echo "$as_me:$LINENO: checking size of void *" >&5
--$as_echo_n "checking size of void *... " >&6; }
--if test "${ac_cv_sizeof_void_p+set}" = set; then
--  $as_echo_n "(cached) " >&6
--else
--  if test "$cross_compiling" = yes; then
--  # Depending upon the size, compute the lo and hi bounds.
--cat >conftest.$ac_ext <<_ACEOF
--/* confdefs.h.  */
--_ACEOF
--cat confdefs.h >>conftest.$ac_ext
--cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
--$ac_includes_default
--int
--main ()
--{
--static int test_array [1 - 2 * !(((long int) (sizeof (void *))) >= 0)];
--test_array [0] = 0
--
--  ;
--  return 0;
--}
--_ACEOF
--rm -f conftest.$ac_objext
--if { (ac_try="$ac_compile"
--case "(($ac_try" in
--  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
--  *) ac_try_echo=$ac_try;;
--esac
--eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
--$as_echo "$ac_try_echo") >&5
--  (eval "$ac_compile") 2>conftest.er1
--  ac_status=$?
--  grep -v '^ *+' conftest.er1 >conftest.err
--  rm -f conftest.er1
--  cat conftest.err >&5
--  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
--  (exit $ac_status); } && {
--	 test -z "$ac_c_werror_flag" ||
--	 test ! -s conftest.err
--       } && test -s conftest.$ac_objext; then
--  ac_lo=0 ac_mid=0
--  while :; do
--    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 int test_array [1 - 2 * !(((long int) (sizeof (void *))) <= $ac_mid)];
--test_array [0] = 0
--
--  ;
--  return 0;
--}
--_ACEOF
--rm -f conftest.$ac_objext
--if { (ac_try="$ac_compile"
--case "(($ac_try" in
--  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
--  *) ac_try_echo=$ac_try;;
--esac
--eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
--$as_echo "$ac_try_echo") >&5
--  (eval "$ac_compile") 2>conftest.er1
--  ac_status=$?
--  grep -v '^ *+' conftest.er1 >conftest.err
--  rm -f conftest.er1
--  cat conftest.err >&5
--  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
--  (exit $ac_status); } && {
--	 test -z "$ac_c_werror_flag" ||
--	 test ! -s conftest.err
--       } && test -s conftest.$ac_objext; then
--  ac_hi=$ac_mid; break
--else
--  $as_echo "$as_me: failed program was:" >&5
--sed 's/^/| /' conftest.$ac_ext >&5
--
--	ac_lo=`expr $ac_mid + 1`
--			if test $ac_lo -le $ac_mid; then
--			  ac_lo= ac_hi=
--			  break
--			fi
--			ac_mid=`expr 2 '*' $ac_mid + 1`
--fi
--
--rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
--  done
--else
--  $as_echo "$as_me: failed program was:" >&5
--sed 's/^/| /' conftest.$ac_ext >&5
--
--	cat >conftest.$ac_ext <<_ACEOF
--/* confdefs.h.  */
--_ACEOF
--cat confdefs.h >>conftest.$ac_ext
--cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
--$ac_includes_default
--int
--main ()
--{
--static int test_array [1 - 2 * !(((long int) (sizeof (void *))) < 0)];
--test_array [0] = 0
--
--  ;
--  return 0;
--}
--_ACEOF
--rm -f conftest.$ac_objext
--if { (ac_try="$ac_compile"
--case "(($ac_try" in
--  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
--  *) ac_try_echo=$ac_try;;
--esac
--eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
--$as_echo "$ac_try_echo") >&5
--  (eval "$ac_compile") 2>conftest.er1
--  ac_status=$?
--  grep -v '^ *+' conftest.er1 >conftest.err
--  rm -f conftest.er1
--  cat conftest.err >&5
--  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
--  (exit $ac_status); } && {
--	 test -z "$ac_c_werror_flag" ||
--	 test ! -s conftest.err
--       } && test -s conftest.$ac_objext; then
--  ac_hi=-1 ac_mid=-1
--  while :; do
--    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 int test_array [1 - 2 * !(((long int) (sizeof (void *))) >= $ac_mid)];
--test_array [0] = 0
--
--  ;
--  return 0;
--}
--_ACEOF
--rm -f conftest.$ac_objext
--if { (ac_try="$ac_compile"
--case "(($ac_try" in
--  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
--  *) ac_try_echo=$ac_try;;
--esac
--eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
--$as_echo "$ac_try_echo") >&5
--  (eval "$ac_compile") 2>conftest.er1
--  ac_status=$?
--  grep -v '^ *+' conftest.er1 >conftest.err
--  rm -f conftest.er1
--  cat conftest.err >&5
--  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
--  (exit $ac_status); } && {
--	 test -z "$ac_c_werror_flag" ||
--	 test ! -s conftest.err
--       } && test -s conftest.$ac_objext; then
--  ac_lo=$ac_mid; break
--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
--
--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
--
--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`
--  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 int test_array [1 - 2 * !(((long int) (sizeof (void *))) <= $ac_mid)];
--test_array [0] = 0
--
--  ;
--  return 0;
--}
--_ACEOF
--rm -f conftest.$ac_objext
--if { (ac_try="$ac_compile"
--case "(($ac_try" in
--  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
--  *) ac_try_echo=$ac_try;;
--esac
--eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
--$as_echo "$ac_try_echo") >&5
--  (eval "$ac_compile") 2>conftest.er1
--  ac_status=$?
--  grep -v '^ *+' conftest.er1 >conftest.err
--  rm -f conftest.er1
--  cat conftest.err >&5
--  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
--  (exit $ac_status); } && {
--	 test -z "$ac_c_werror_flag" ||
--	 test ! -s conftest.err
--       } && test -s conftest.$ac_objext; then
--  ac_hi=$ac_mid
--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
--?*) ac_cv_sizeof_void_p=$ac_lo;;
--'') if test "$ac_cv_type_void_p" = yes; then
--     { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
--$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
--{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
--See \`config.log' for more details." >&5
--$as_echo "$as_me: error: cannot compute sizeof (void *)
--See \`config.log' for more details." >&2;}
--   { (exit 77); exit 77; }; }; }
--   else
--     ac_cv_sizeof_void_p=0
--   fi ;;
--esac
--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
--static long int longval () { return (long int) (sizeof (void *)); }
--static unsigned long int ulongval () { return (long int) (sizeof (void *)); }
--#include <stdio.h>
--#include <stdlib.h>
--int
--main ()
--{
--
--  FILE *f = fopen ("conftest.val", "w");
--  if (! f)
--    return 1;
--  if (((long int) (sizeof (void *))) < 0)
--    {
--      long int i = longval ();
--      if (i != ((long int) (sizeof (void *))))
--	return 1;
--      fprintf (f, "%ld", i);
--    }
--  else
--    {
--      unsigned long int i = ulongval ();
--      if (i != ((long int) (sizeof (void *))))
--	return 1;
--      fprintf (f, "%lu", i);
--    }
--  /* Do not output a trailing newline, as this causes \r\n confusion
--     on some platforms.  */
--  return ferror (f) || fclose (f) != 0;
--
--  ;
--  return 0;
--}
--_ACEOF
--rm -f 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>&5
--  ac_status=$?
--  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
--  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
--  { (case "(($ac_try" in
--  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
--  *) ac_try_echo=$ac_try;;
--esac
--eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
--$as_echo "$ac_try_echo") >&5
--  (eval "$ac_try") 2>&5
--  ac_status=$?
--  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
--  (exit $ac_status); }; }; then
--  ac_cv_sizeof_void_p=`cat conftest.val`
--else
--  $as_echo "$as_me: program exited with status $ac_status" >&5
--$as_echo "$as_me: failed program was:" >&5
--sed 's/^/| /' conftest.$ac_ext >&5
--
--( exit $ac_status )
--if test "$ac_cv_type_void_p" = yes; then
--     { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
--$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
--{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
--See \`config.log' for more details." >&5
--$as_echo "$as_me: error: cannot compute sizeof (void *)
--See \`config.log' for more details." >&2;}
--   { (exit 77); exit 77; }; }; }
--   else
--     ac_cv_sizeof_void_p=0
--   fi
--fi
--rm -rf conftest.dSYM
--rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
--fi
--rm -f conftest.val
--fi
--{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
--$as_echo "$ac_cv_sizeof_void_p" >&6; }
--
--
--
--cat >>confdefs.h <<_ACEOF
--#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
--_ACEOF
--
--
--
--if test $ac_cv_sizeof_size_t -lt $ac_cv_sizeof_void_p; then
--	{ $as_echo "$as_me:$LINENO: WARNING: size_t cannot represent the amount of used memory of a process" >&5
--$as_echo "$as_me: WARNING: size_t cannot represent the amount of used memory of a process" >&2;}
--	{ $as_echo "$as_me:$LINENO: WARNING: please report this to <samba-technical at samba.org>" >&5
--$as_echo "$as_me: WARNING: please report this to <samba-technical at samba.org>" >&2;}
--	{ $as_echo "$as_me:$LINENO: WARNING: sizeof(size_t) = $ac_cv_sizeof_size_t" >&5
--$as_echo "$as_me: WARNING: sizeof(size_t) = $ac_cv_sizeof_size_t" >&2;}
--	{ $as_echo "$as_me:$LINENO: WARNING: sizeof(void *) = $ac_cv_sizeof_void_p" >&5
--$as_echo "$as_me: WARNING: sizeof(void *) = $ac_cv_sizeof_void_p" >&2;}
--	{ { $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; }; }
--fi
--
--fi
--
--
--
--
 -if test x"$teventdir" = "x"; then
 -	teventdir=""
 -	teventpaths="$srcdir $srcdir/../lib/tevent $srcdir/tevent $srcdir/../tevent"
@@ -12383,27 +11594,9 @@
 -
 -LIBS="${LIBS} ${TEVENT_LIBS}"
 -
--# TODO: These should come from m4_include(lib/tdb/libtdb.m4)
--# but currently this fails: things have to get merged from s4.
--tdbdir="../lib/tdb"
--
--TDB_CFLAGS="-I${srcdir-.}/$tdbdir/include"
--
--
--LIBTDB_OBJ0=""
--for o in common/tdb.o common/dump.o common/transaction.o common/error.o \
--	     common/traverse.o common/freelist.o common/freelistcheck.o \
--		 common/io.o common/lock.o common/open.o;
--do
--	LIBTDB_OBJ0="$LIBTDB_OBJ0 $tdbdir/$o"
--done
--
--
 -SAMBA_CPPFLAGS="-Iinclude -I${srcdir-.}/include  -I. -I${srcdir-.}"
 -SAMBA_CPPFLAGS="${SAMBA_CPPFLAGS} -I${srcdir-.}/../lib/replace"
--SAMBA_CPPFLAGS="${SAMBA_CPPFLAGS} ${TALLOC_CFLAGS}"
 -SAMBA_CPPFLAGS="${SAMBA_CPPFLAGS} ${TEVENT_CFLAGS}"
--SAMBA_CPPFLAGS="${SAMBA_CPPFLAGS} ${TDB_CFLAGS}"
 -SAMBA_CPPFLAGS="${SAMBA_CPPFLAGS} -I${srcdir-.}/libaddns"
 -SAMBA_CPPFLAGS="${SAMBA_CPPFLAGS} -I${srcdir-.}/librpc"
 -SAMBA_CPPFLAGS="${SAMBA_CPPFLAGS} -I${srcdir-.}/.."
@@ -12471,6 +11664,8 @@
 -
 -
 -
+-
+-
 -# 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"
@@ -12578,7 +11773,7 @@
 -
 -
 -	old_CFLAGS="$CFLAGS";
--	CFLAGS="-Wdeclaration-after-statement";
+-	CFLAGS="$CFLAGS -Wdeclaration-after-statement";
 -	export CFLAGS;
 -	old_CPPFLAGS="$CPPFLAGS";
 -	CPPFLAGS="$CPPFLAGS";
@@ -12665,7 +11860,7 @@
 -
 -
 -	old_CFLAGS="$CFLAGS";
--	CFLAGS="-Werror-implicit-function-declaration";
+-	CFLAGS="$CFLAGS -Werror-implicit-function-declaration";
 -	export CFLAGS;
 -	old_CPPFLAGS="$CPPFLAGS";
 -	CPPFLAGS="$CPPFLAGS";
@@ -12753,27 +11948,6 @@
 -       fi
 -fi
 -
--# Check whether --enable-dmalloc was given.
--if test "${enable_dmalloc+set}" = set; then
--  enableval=$enable_dmalloc;
--fi
--
--
--if test "x$enable_dmalloc" = xyes
--then
--
--cat >>confdefs.h <<\_ACEOF
--#define ENABLE_DMALLOC 1
--_ACEOF
--
--
--cat >>confdefs.h <<\_ACEOF
--#define DMALLOC_FUNC_CHECK 1
--_ACEOF
--
--	LIBS="$LIBS -ldmalloc"
--fi
--
 -#################################################
 -# check for a shared memory profiling support
 -{ $as_echo "$as_me:$LINENO: checking whether to use profiling" >&5
@@ -13411,7 +12585,7 @@
 -
 -
 -	old_CFLAGS="$CFLAGS";
--	CFLAGS="-Werror";
+-	CFLAGS="$CFLAGS -Werror";
 -	export CFLAGS;
 -	old_CPPFLAGS="$CPPFLAGS";
 -	CPPFLAGS="$CPPFLAGS";
@@ -13494,7 +12668,7 @@
 -
 -
 -	old_CFLAGS="$CFLAGS";
--	CFLAGS="-w2";
+-	CFLAGS="$CFLAGS -w2";
 -	export CFLAGS;
 -	old_CPPFLAGS="$CPPFLAGS";
 -	CPPFLAGS="$CPPFLAGS";
@@ -13577,7 +12751,7 @@
 -
 -
 -	old_CFLAGS="$CFLAGS";
--	CFLAGS="-errwarn=%all";
+-	CFLAGS="$CFLAGS -errwarn=%all";
 -	export CFLAGS;
 -	old_CPPFLAGS="$CPPFLAGS";
 -	CPPFLAGS="$CPPFLAGS";
@@ -14069,13 +13243,17 @@
 -
 -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"
+-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"
+-   default_static_modules="$default_static_modules rpc_rpcecho pdb_ads"
 -   default_shared_modules="$default_shared_modules charset_weird perfcount_test"
 -fi
 -
@@ -14546,7 +13724,15 @@
 -      { $as_echo "$as_me:$LINENO: result: $GLIBC_LFS_SUPPORT" >&5
 -$as_echo "$GLIBC_LFS_SUPPORT" >&6; }
 -    ;;
+-    *qnx*)
+-        CPPFLAGS="-D_LARGEFILE64_SOURCE $CPPFLAGS"
 -
+-cat >>confdefs.h <<\_ACEOF
+-#define _LARGEFILE64_SOURCE 1
+-_ACEOF
+-
+-        ;;
+-
 -esac
 -
 -SAVE_CPPFLAGS="${CPPFLAGS}"
@@ -14570,10 +13756,10 @@
 -   { (exit 1); exit 1; }; }
 -fi
 -
--LIBREPLACEOBJ="replace.o"
+-LIBREPLACEOBJ="$libreplacedir/replace.o"
 -
 -
--LIBREPLACEOBJ="${LIBREPLACEOBJ} snprintf.o"
+-LIBREPLACEOBJ="${LIBREPLACEOBJ} $libreplacedir/snprintf.o"
 -
 -{ $as_echo "$as_me:$LINENO: checking return type of signal handlers" >&5
 -$as_echo_n "checking return type of signal handlers... " >&6; }
@@ -17364,13 +16550,164 @@
 -done
 -
 -
+-for ac_header in unix.h
+-do
+-as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+-  { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+-$as_echo_n "checking for $ac_header... " >&6; }
+-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+-  $as_echo_n "(cached) " >&6
+-fi
+-ac_res=`eval 'as_val=${'$as_ac_Header'}
+-		 $as_echo "$as_val"'`
+-	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+-$as_echo "$ac_res" >&6; }
+-else
+-  # Is the header compilable?
+-{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
+-$as_echo_n "checking $ac_header usability... " >&6; }
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
+-$ac_includes_default
+-#include <$ac_header>
+-_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_header_compiler=yes
+-else
+-  $as_echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
 -
+-	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; }
 -
+-# 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
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
+-#include <$ac_header>
+-_ACEOF
+-if { (ac_try="$ac_cpp conftest.$ac_ext"
+-case "(($ac_try" in
+-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+-  *) ac_try_echo=$ac_try;;
+-esac
+-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+-$as_echo "$ac_try_echo") >&5
+-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+-  ac_status=$?
+-  grep -v '^ *+' conftest.er1 >conftest.err
+-  rm -f conftest.er1
+-  cat conftest.err >&5
+-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); } >/dev/null && {
+-	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+-	 test ! -s conftest.err
+-       }; then
+-  ac_header_preproc=yes
+-else
+-  $as_echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
 -
+-  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; }
 -
+-# So?  What about this header?
+-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+-  yes:no: )
+-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+-$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+-$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+-    ac_header_preproc=yes
+-    ;;
+-  no:yes:* )
+-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+-$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+-$as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+-$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+-$as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+-$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+-$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+-    ( cat <<\_ASBOX
+-## ---------------------------------------- ##
+-## Report this to samba-technical at samba.org ##
+-## ---------------------------------------- ##
+-_ASBOX
+-     ) | sed "s/^/$as_me: WARNING:     /" >&2
+-    ;;
+-esac
+-{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+-$as_echo_n "checking for $ac_header... " >&6; }
+-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+-  $as_echo_n "(cached) " >&6
+-else
+-  eval "$as_ac_Header=\$ac_header_preproc"
+-fi
+-ac_res=`eval 'as_val=${'$as_ac_Header'}
+-		 $as_echo "$as_val"'`
+-	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+-$as_echo "$ac_res" >&6; }
 -
+-fi
+-as_val=`eval 'as_val=${'$as_ac_Header'}
+-		 $as_echo "$as_val"'`
+-   if test "x$as_val" = x""yes; then
+-  cat >>confdefs.h <<_ACEOF
+-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+-_ACEOF
+-
+-fi
+-
+-done
+-
+-
+-
+-
+-
+-
+-
+-
+-
 -for ac_func in seteuid setresuid setegid setresgid chroot bzero strerror
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
@@ -17583,7 +16920,8 @@
 -
 -
 -
--for ac_func in waitpid strlcpy strlcat initgroups memmove strdup
+-
+-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`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
@@ -22136,10 +21474,112 @@
 -
 -
 -
+-for ac_func in getgrouplist
+-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.  */
+-
+-#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
+-
+-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"
+-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
+-
+-fi
+-done
+-
+-
 -# locale
 -
 -
--for ac_header in ctype.h locale.h
+-
+-for ac_header in ctype.h locale.h langinfo.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
@@ -23521,7 +22961,7 @@
 -
 -
 -if test x"${libreplace_cv_dlfcn}" = x"yes";then
--	LIBREPLACEOBJ="${LIBREPLACEOBJ} dlfcn.o"
+-	LIBREPLACEOBJ="${LIBREPLACEOBJ} $libreplacedir/dlfcn.o"
 -fi
 -
 -LIBDL="$LIBS"
@@ -23717,7 +23157,7 @@
 -#define REPLACE_GETPASS 1
 -_ACEOF
 -
--	LIBREPLACEOBJ="${LIBREPLACEOBJ} getpass.o"
+-	LIBREPLACEOBJ="${LIBREPLACEOBJ} $libreplacedir/getpass.o"
 -else
 -
 -{ $as_echo "$as_me:$LINENO: checking whether getpass should be replaced" >&5
@@ -23785,7 +23225,7 @@
 -#define REPLACE_GETPASS 1
 -_ACEOF
 -
--	LIBREPLACEOBJ="${LIBREPLACEOBJ} getpass.o"
+-	LIBREPLACEOBJ="${LIBREPLACEOBJ} $libreplacedir/getpass.o"
 -fi
 -
 -fi
@@ -23856,7 +23296,7 @@
 -#define REPLACE_STRPTIME 1
 -_ACEOF
 -
--        LIBREPLACEOBJ="${LIBREPLACEOBJ} strptime.o"
+-        LIBREPLACEOBJ="${LIBREPLACEOBJ} $libreplacedir/strptime.o"
 -fi
 -
 -
@@ -24182,7 +23622,7 @@
 -_ACEOF
 -
 -else
--  LIBREPLACEOBJ="${LIBREPLACEOBJ} timegm.o"
+-  LIBREPLACEOBJ="${LIBREPLACEOBJ} $libreplacedir/timegm.o"
 -fi
 -done
 -
@@ -24734,7 +24174,7 @@
 -#define REPLACE_READDIR_GETDIRENTRIES 1
 -_ACEOF
 -
--	LIBREPLACEOBJ="${LIBREPLACEOBJ} repdir_getdirentries.o"
+-	LIBREPLACEOBJ="${LIBREPLACEOBJ} $libreplacedir/repdir_getdirentries.o"
 -	libreplace_cv_READDIR_NEEDED=no
 -fi
 -
@@ -24923,7 +24363,7 @@
 -#define REPLACE_READDIR_GETDENTS 1
 -_ACEOF
 -
--	LIBREPLACEOBJ="${LIBREPLACEOBJ} repdir_getdents.o"
+-	LIBREPLACEOBJ="${LIBREPLACEOBJ} $libreplacedir/repdir_getdents.o"
 -	libreplace_cv_READDIR_NEEDED=no
 -fi
 -
@@ -25226,7 +24666,7 @@
 -_ACEOF
 -
 -else
--   LIBREPLACEOBJ="${LIBREPLACEOBJ} crypt.o"
+-   LIBREPLACEOBJ="${LIBREPLACEOBJ} $libreplacedir/crypt.o"
 -fi
 -
 -
@@ -25234,8 +24674,7 @@
 -
 -
 -
--
--for ac_func in syslog printf memset memcpy
+-for ac_func in printf memset memcpy
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
@@ -25343,6 +24782,111 @@
 -echo "LIBREPLACE_BROKEN_CHECKS: END"
 -
 -
+-for ac_func in syslog
+-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.  */
+-
+-#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
+-
+-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"
+-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
+-
+-else
+-  { { $as_echo "$as_me:$LINENO: error: Required function not found" >&5
+-$as_echo "$as_me: error: Required function not found" >&2;}
+-   { (exit 1); exit 1; }; }
+-fi
+-done
+-
+-
 -echo "LIBREPLACE_NETWORK_CHECKS: START"
 -
 -
@@ -28888,7 +28432,7 @@
 -_ACEOF
 -
 -else
--  LIBREPLACE_NETWORK_OBJS="${LIBREPLACE_NETWORK_OBJS} socketpair.o"
+-  LIBREPLACE_NETWORK_OBJS="${LIBREPLACE_NETWORK_OBJS} $libreplacedir/socketpair.o"
 -fi
 -done
 -
@@ -29070,7 +28614,7 @@
 -#define REPLACE_INET_NTOA 1
 -_ACEOF
 -
--    LIBREPLACE_NETWORK_OBJS="${LIBREPLACE_NETWORK_OBJS} inet_ntoa.o"
+-    LIBREPLACE_NETWORK_OBJS="${LIBREPLACE_NETWORK_OBJS} $libreplacedir/inet_ntoa.o"
 -fi
 -
 -
@@ -29172,7 +28716,7 @@
 -_ACEOF
 -
 -else
--  LIBREPLACE_NETWORK_OBJS="${LIBREPLACE_NETWORK_OBJS} inet_aton.o"
+-  LIBREPLACE_NETWORK_OBJS="${LIBREPLACE_NETWORK_OBJS} $libreplacedir/inet_aton.o"
 -fi
 -done
 -
@@ -29276,7 +28820,7 @@
 -_ACEOF
 -
 -else
--  LIBREPLACE_NETWORK_OBJS="${LIBREPLACE_NETWORK_OBJS} inet_ntop.o"
+-  LIBREPLACE_NETWORK_OBJS="${LIBREPLACE_NETWORK_OBJS} $libreplacedir/inet_ntop.o"
 -fi
 -done
 -
@@ -29380,7 +28924,7 @@
 -_ACEOF
 -
 -else
--  LIBREPLACE_NETWORK_OBJS="${LIBREPLACE_NETWORK_OBJS} inet_pton.o"
+-  LIBREPLACE_NETWORK_OBJS="${LIBREPLACE_NETWORK_OBJS} $libreplacedir/inet_pton.o"
 -fi
 -done
 -
@@ -29482,7 +29026,7 @@
 -_ACEOF
 -
 -else
--	LIBREPLACE_NETWORK_OBJS="${LIBREPLACE_NETWORK_OBJS} getaddrinfo.o"
+-	LIBREPLACE_NETWORK_OBJS="${LIBREPLACE_NETWORK_OBJS} $libreplacedir/getaddrinfo.o"
 -fi
 -
 -
@@ -29912,7 +29456,7 @@
 -_ACEOF
 -
 -else
--	LIBREPLACE_NETWORK_OBJS="${LIBREPLACE_NETWORK_OBJS} getifaddrs.o"
+-	LIBREPLACE_NETWORK_OBJS="${LIBREPLACE_NETWORK_OBJS} $libreplacedir/getifaddrs.o"
 -fi
 -
 -
@@ -30244,12 +29788,13 @@
 -
 -LIBREPLACE_DIR=`echo ${libreplacedir} | sed -e "s;${srcdir};;" -e "s;^/;;"`
 -
--LIBREPLACE_OBJS=""
--for obj in ${LIBREPLACEOBJ}; do
--	LIBREPLACE_OBJS="${LIBREPLACE_OBJS} ${LIBREPLACE_DIR}/${obj}"
--done
+-LIBREPLACE_OBJS="${LIBREPLACEOBJ}"
 -
 -
+-LIBREPLACE_LIBS="${LIBREPLACE_NETWORK_LIBS}"
+-
+-
+-
 -# add -ldl to the global LIBS
 -LIBS="${LIBS} ${LIBDL} ${LIBREPLACE_NETWORK_LIBS}"
 -AUTH_LIBS="${AUTH_LIBS} ${CRYPT_LIBS}"
@@ -30570,8 +30115,7 @@
 -
 -
 -
--
--for ac_header in limits.h float.h pthread.h libintl.h
+-for ac_header in limits.h float.h libintl.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
@@ -33971,16 +33515,14 @@
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
- 
+-
 -	ac_header_compiler=no
 -fi
-+if test "x$enable_external_libtalloc" != xno
-+then
- 
+-
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 -$as_echo "$ac_header_compiler" >&6; }
- 
+-
 -# Is the header present?
 -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
 -$as_echo_n "checking $ac_header presence... " >&6; }
@@ -34010,15 +33552,7 @@
 -	 test ! -s conftest.err
 -       }; then
 -  ac_header_preproc=yes
-+if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
-+	if test -n "$ac_tool_prefix"; then
-+  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
-+set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-+$as_echo_n "checking for $ac_word... " >&6; }
-+if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
-+  $as_echo_n "(cached) " >&6
- else
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
@@ -34028,26 +33562,7 @@
 -rm -f conftest.err conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
 -$as_echo "$ac_header_preproc" >&6; }
-+  case $PKG_CONFIG in
-+  [\\/]* | ?:[\\/]*)
-+  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
-+  ;;
-+  *)
-+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-+for as_dir in $PATH
-+do
-+  IFS=$as_save_IFS
-+  test -z "$as_dir" && as_dir=.
-+    for ac_exec_ext in '' $ac_executable_extensions; do
-+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-+    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
-+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-+    break 2
-+  fi
-+done
-+  done
-+IFS=$as_save_IFS
- 
+-
 -# So?  What about this header?
 -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
 -  yes:no: )
@@ -34077,27 +33592,19 @@
 -_ASBOX
 -     ) | sed "s/^/$as_me: WARNING:     /" >&2
 -    ;;
-+  ;;
- esac
+-esac
 -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
 -$as_echo_n "checking for $ac_header... " >&6; }
 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
 -  $as_echo_n "(cached) " >&6
-+fi
-+PKG_CONFIG=$ac_cv_path_PKG_CONFIG
-+if test -n "$PKG_CONFIG"; then
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
-+$as_echo "$PKG_CONFIG" >&6; }
- else
+-else
 -  eval "$as_ac_Header=\$ac_header_preproc"
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-+$as_echo "no" >&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; }
- 
+-
 -fi
 -as_val=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
@@ -34105,9 +33612,9 @@
 -  cat >>confdefs.h <<_ACEOF
 -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
 -_ACEOF
- 
- fi
 -
+-fi
+-
 -done
 -
 -
@@ -34118,15 +33625,8 @@
 -{ $as_echo "$as_me:$LINENO: checking size of int" >&5
 -$as_echo_n "checking size of int... " >&6; }
 -if test "${ac_cv_sizeof_int+set}" = set; then
-+if test -z "$ac_cv_path_PKG_CONFIG"; then
-+  ac_pt_PKG_CONFIG=$PKG_CONFIG
-+  # Extract the first word of "pkg-config", so it can be a program name with args.
-+set dummy pkg-config; ac_word=$2
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-+$as_echo_n "checking for $ac_word... " >&6; }
-+if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
+-  $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
@@ -34178,26 +33678,7 @@
 -{
 -static int test_array [1 - 2 * !(((long int) (sizeof (int))) <= $ac_mid)];
 -test_array [0] = 0
-+  case $ac_pt_PKG_CONFIG in
-+  [\\/]* | ?:[\\/]*)
-+  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
-+  ;;
-+  *)
-+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-+for as_dir in $PATH
-+do
-+  IFS=$as_save_IFS
-+  test -z "$as_dir" && as_dir=.
-+    for ac_exec_ext in '' $ac_executable_extensions; do
-+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-+    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
-+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-+    break 2
-+  fi
-+done
-+  done
-+IFS=$as_save_IFS
- 
+-
 -  ;
 -  return 0;
 -}
@@ -34207,8 +33688,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
@@ -34232,15 +33712,11 @@
 -			  break
 -			fi
 -			ac_mid=`expr 2 '*' $ac_mid + 1`
- fi
+-fi
 -
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -  done
-+ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
-+if test -n "$ac_pt_PKG_CONFIG"; then
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
-+$as_echo "$ac_pt_PKG_CONFIG" >&6; }
- else
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
@@ -34293,10 +33769,7 @@
 -{
 -static int test_array [1 - 2 * !(((long int) (sizeof (int))) >= $ac_mid)];
 -test_array [0] = 0
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-+$as_echo "no" >&6; }
-+fi
- 
+-
 -  ;
 -  return 0;
 -}
@@ -34306,15 +33779,7 @@
 -case "(($ac_try" in
 -  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
 -  *) ac_try_echo=$ac_try;;
-+  if test "x$ac_pt_PKG_CONFIG" = x; then
-+    PKG_CONFIG=""
-+  else
-+    case $cross_compiling:$ac_tool_warned in
-+yes:)
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-+ac_tool_warned=yes ;;
- esac
+-esac
 -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 -$as_echo "$ac_try_echo") >&5
 -  (eval "$ac_compile") 2>conftest.er1
@@ -34328,9 +33793,7 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_lo=$ac_mid; break
-+    PKG_CONFIG=$ac_pt_PKG_CONFIG
-+  fi
- else
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
@@ -34340,9 +33803,8 @@
 -			  break
 -			fi
 -			ac_mid=`expr 2 '*' $ac_mid`
-+  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
- fi
- 
+-fi
+-
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -  done
 -else
@@ -34350,23 +33812,11 @@
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	ac_lo= ac_hi=
- fi
-+if test -n "$PKG_CONFIG"; then
-+	_pkg_min_version=0.9.0
-+	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
-+$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
-+	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
-+		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-+$as_echo "yes" >&6; }
-+	else
-+		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-+$as_echo "no" >&6; }
-+		PKG_CONFIG=""
-+	fi
- 
+-fi
+-
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- 
+-fi
+-
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -# Binary search between lo and hi bounds.
 -while test "x$ac_lo" != "x$ac_hi"; do
@@ -34383,10 +33833,7 @@
 -{
 -static int test_array [1 - 2 * !(((long int) (sizeof (int))) <= $ac_mid)];
 -test_array [0] = 0
-+pkg_failed=no
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for TALLOC" >&5
-+$as_echo_n "checking for TALLOC... " >&6; }
- 
+-
 -  ;
 -  return 0;
 -}
@@ -34400,14 +33847,7 @@
 -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 -$as_echo "$ac_try_echo") >&5
 -  (eval "$ac_compile") 2>conftest.er1
-+if test -n "$PKG_CONFIG"; then
-+    if test -n "$TALLOC_CFLAGS"; then
-+        pkg_cv_TALLOC_CFLAGS="$TALLOC_CFLAGS"
-+    else
-+        if test -n "$PKG_CONFIG" && \
-+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"talloc >= 1.3.0\""; } >&5
-+  ($PKG_CONFIG --exists --print-errors "talloc >= 1.3.0") 2>&5
-   ac_status=$?
+-  ac_status=$?
 -  grep -v '^ *+' conftest.er1 >conftest.err
 -  rm -f conftest.er1
 -  cat conftest.err >&5
@@ -34417,16 +33857,12 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_hi=$ac_mid
-+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-+  test $ac_status = 0; }; then
-+  pkg_cv_TALLOC_CFLAGS=`$PKG_CONFIG --cflags "talloc >= 1.3.0" 2>/dev/null`
- else
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	ac_lo=`expr '(' $ac_mid ')' + 1`
-+  pkg_failed=yes
- fi
+-fi
 -
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -done
@@ -34444,8 +33880,7 @@
 -     ac_cv_sizeof_int=0
 -   fi ;;
 -esac
-+    fi
- else
+-else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
@@ -34505,23 +33940,11 @@
 -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 -$as_echo "$ac_try_echo") >&5
 -  (eval "$ac_try") 2>&5
-+	pkg_failed=untried
-+fi
-+if test -n "$PKG_CONFIG"; then
-+    if test -n "$TALLOC_LIBS"; then
-+        pkg_cv_TALLOC_LIBS="$TALLOC_LIBS"
-+    else
-+        if test -n "$PKG_CONFIG" && \
-+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"talloc >= 1.3.0\""; } >&5
-+  ($PKG_CONFIG --exists --print-errors "talloc >= 1.3.0") 2>&5
-   ac_status=$?
+-  ac_status=$?
 -  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
 -  (exit $ac_status); }; }; then
 -  ac_cv_sizeof_int=`cat conftest.val`
-+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-+  test $ac_status = 0; }; then
-+  pkg_cv_TALLOC_LIBS=`$PKG_CONFIG --libs "talloc >= 1.3.0" 2>/dev/null`
- else
+-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
@@ -34541,13 +33964,9 @@
 -fi
 -rm -rf conftest.dSYM
 -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-+  pkg_failed=yes
- fi
+-fi
 -rm -f conftest.val
-+    fi
-+else
-+	pkg_failed=untried
- fi
+-fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
 -$as_echo "$ac_cv_sizeof_int" >&6; }
 -
@@ -34556,8 +33975,8 @@
 -cat >>confdefs.h <<_ACEOF
 -#define SIZEOF_INT $ac_cv_sizeof_int
 -_ACEOF
- 
- 
+-
+-
 -# The cast to long int works around a bug in the HP C Compiler
 -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
 -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
@@ -34581,7 +34000,7 @@
 -{
 -static int test_array [1 - 2 * !(((long int) (sizeof (long))) >= 0)];
 -test_array [0] = 0
- 
+-
 -  ;
 -  return 0;
 -}
@@ -34618,8 +34037,7 @@
 -{
 -static int test_array [1 - 2 * !(((long int) (sizeof (long))) <= $ac_mid)];
 -test_array [0] = 0
-+if test $pkg_failed = yes; then
- 
+-
 -  ;
 -  return 0;
 -}
@@ -34643,9 +34061,7 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_hi=$ac_mid; break
-+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
-+        _pkg_short_errors_supported=yes
- else
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
@@ -34655,16 +34071,8 @@
 -			  break
 -			fi
 -			ac_mid=`expr 2 '*' $ac_mid + 1`
-+        _pkg_short_errors_supported=no
- fi
-+        if test $_pkg_short_errors_supported = yes; then
-+	        TALLOC_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "talloc >= 1.3.0"`
-+        else
-+	        TALLOC_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "talloc >= 1.3.0"`
-+        fi
-+	# Put the nasty error message in config.log where it belongs
-+	echo "$TALLOC_PKG_ERRORS" >&5
- 
+-fi
+-
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -  done
 -else
@@ -34683,14 +34091,7 @@
 -{
 -static int test_array [1 - 2 * !(((long int) (sizeof (long))) < 0)];
 -test_array [0] = 0
-+	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-+$as_echo "no" >&6; }
-+                 if test "x$enable_external_libtalloc" = xyes; then
-+		 	as_fn_error "Unable to find libtalloc" "$LINENO" 5
-+	      else
-+			enable_external_libtalloc=no
-+		  fi
- 
+-
 -  ;
 -  return 0;
 -}
@@ -34727,13 +34128,7 @@
 -{
 -static int test_array [1 - 2 * !(((long int) (sizeof (long))) >= $ac_mid)];
 -test_array [0] = 0
-+elif test $pkg_failed = untried; then
-+	 if test "x$enable_external_libtalloc" = xyes; then
-+		 	as_fn_error "Unable to find libtalloc" "$LINENO" 5
-+	      else
-+			enable_external_libtalloc=no
-+		  fi
- 
+-
 -  ;
 -  return 0;
 -}
@@ -34757,7 +34152,7 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_lo=$ac_mid; break
- else
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
@@ -34767,12 +34162,7 @@
 -			  break
 -			fi
 -			ac_mid=`expr 2 '*' $ac_mid`
-+	TALLOC_CFLAGS=$pkg_cv_TALLOC_CFLAGS
-+	TALLOC_LIBS=$pkg_cv_TALLOC_LIBS
-+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-+$as_echo "yes" >&6; }
-+	 enable_external_libtalloc=yes
- fi
+-fi
 -
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -  done
@@ -34781,25 +34171,11 @@
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	ac_lo= ac_hi=
- fi
- 
+-fi
+-
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-+if test "x$enable_external_libtalloc" != xyes
-+then
-+	tallocdir=""
-+tallocpaths=". lib/talloc talloc ../talloc ../lib/talloc"
-+for d in $tallocpaths; do
-+	if test -f "$srcdir/$d/talloc.c"; then
-+		tallocdir="$d"
-+
-+		break;
-+	fi
-+done
-+if test x"$tallocdir" = "x"; then
-+   as_fn_error "cannot find talloc source in $tallocpaths" "$LINENO" 5
- fi
-+TALLOC_OBJ="talloc.o"
- 
+-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
@@ -34816,7 +34192,7 @@
 -{
 -static int test_array [1 - 2 * !(((long int) (sizeof (long))) <= $ac_mid)];
 -test_array [0] = 0
- 
+-
 -  ;
 -  return 0;
 -}
@@ -34843,11 +34219,10 @@
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+TALLOC_CFLAGS="-I$srcdir/$tallocdir"
- 
+-
 -	ac_lo=`expr '(' $ac_mid ')' + 1`
 -fi
- 
+-
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -done
 -case $ac_lo in
@@ -34879,8 +34254,7 @@
 -int
 -main ()
 -{
-+TALLOC_LIBS=""
- 
+-
 -  FILE *f = fopen ("conftest.val", "w");
 -  if (! f)
 -    return 1;
@@ -34901,7 +34275,7 @@
 -  /* Do not output a trailing newline, as this causes \r\n confusion
 -     on some platforms.  */
 -  return ferror (f) || fclose (f) != 0;
- 
+-
 -  ;
 -  return 0;
 -}
@@ -34929,71 +34303,48 @@
 -  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
 -  (exit $ac_status); }; }; then
 -  ac_cv_sizeof_long=`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 size_t" >&5
-+$as_echo_n "checking size of size_t... " >&6; }
-+if test "${ac_cv_sizeof_size_t+set}" = set; then :
-+  $as_echo_n "(cached) " >&6
- else
+-else
 -  $as_echo "$as_me: program exited with status $ac_status" >&5
 -$as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t"        "$ac_includes_default"; then :
- 
+-
 -( exit $ac_status )
 -if test "$ac_cv_type_long" = yes; then
 -     { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-+else
-+  if test "$ac_cv_type_size_t" = yes; then
-+     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
- $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
 -{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long)
 -See \`config.log' for more details." >&5
 -$as_echo "$as_me: error: cannot compute sizeof (long)
 -See \`config.log' for more details." >&2;}
 -   { (exit 77); exit 77; }; }; }
-+{ as_fn_set_status 77
-+as_fn_error "cannot compute sizeof (size_t)
-+See \`config.log' for more details." "$LINENO" 5; }; }
-    else
+-   else
 -     ac_cv_sizeof_long=0
-+     ac_cv_sizeof_size_t=0
-    fi
- fi
+-   fi
+-fi
 -rm -rf conftest.dSYM
 -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 -fi
 -rm -f conftest.val
-+
- fi
+-fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
 -$as_echo "$ac_cv_sizeof_long" >&6; }
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
-+$as_echo "$ac_cv_sizeof_size_t" >&6; }
- 
- 
- 
- cat >>confdefs.h <<_ACEOF
+-
+-
+-
+-cat >>confdefs.h <<_ACEOF
 -#define SIZEOF_LONG $ac_cv_sizeof_long
-+#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
- _ACEOF
- 
- 
-@@ -35084,4202 +6782,2108 @@
- # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
- # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
- # This bug is HP SR number 8606223364.
+-_ACEOF
+-
+-
+-# The cast to long int works around a bug in the HP C Compiler
+-# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+-# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+-# This bug is HP SR number 8606223364.
 -{ $as_echo "$as_me:$LINENO: checking size of long long" >&5
 -$as_echo_n "checking size of long long... " >&6; }
 -if test "${ac_cv_sizeof_long_long+set}" = set; then
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
-+$as_echo_n "checking size of void *... " >&6; }
-+if test "${ac_cv_sizeof_void_p+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
+-  $as_echo_n "(cached) " >&6
+-else
 -  if test "$cross_compiling" = yes; then
 -  # Depending upon the size, compute the lo and hi bounds.
 -cat >conftest.$ac_ext <<_ACEOF
@@ -35045,8 +34396,7 @@
 -{
 -static int test_array [1 - 2 * !(((long int) (sizeof (long long))) <= $ac_mid)];
 -test_array [0] = 0
-+  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p"        "$ac_includes_default"; then :
- 
+-
 -  ;
 -  return 0;
 -}
@@ -35070,36 +34420,24 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_hi=$ac_mid; break
- else
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+  if test "$ac_cv_type_void_p" = yes; then
-+     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-+{ as_fn_set_status 77
-+as_fn_error "cannot compute sizeof (void *)
-+See \`config.log' for more details." "$LINENO" 5; }; }
-+   else
-+     ac_cv_sizeof_void_p=0
-+   fi
-+fi
- 
+-
 -	ac_lo=`expr $ac_mid + 1`
 -			if test $ac_lo -le $ac_mid; then
 -			  ac_lo= ac_hi=
 -			  break
 -			fi
 -			ac_mid=`expr 2 '*' $ac_mid + 1`
- fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
-+$as_echo "$ac_cv_sizeof_void_p" >&6; }
- 
+-fi
+-
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -  done
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
- 
+-
 -	cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
@@ -35112,7 +34450,7 @@
 -{
 -static int test_array [1 - 2 * !(((long int) (sizeof (long long))) < 0)];
 -test_array [0] = 0
- 
+-
 -  ;
 -  return 0;
 -}
@@ -35139,9 +34477,7 @@
 -  while :; do
 -    cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
-+cat >>confdefs.h <<_ACEOF
-+#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
- _ACEOF
+-_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
@@ -35151,7 +34487,7 @@
 -{
 -static int test_array [1 - 2 * !(((long int) (sizeof (long long))) >= $ac_mid)];
 -test_array [0] = 0
- 
+-
 -  ;
 -  return 0;
 -}
@@ -35178,54 +34514,27 @@
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
- 
+-
 -	ac_hi=`expr '(' $ac_mid ')' - 1`
 -			if test $ac_mid -le $ac_hi; then
 -			  ac_lo= ac_hi=
 -			  break
 -			fi
 -			ac_mid=`expr 2 '*' $ac_mid`
-+
-+if test $ac_cv_sizeof_size_t -lt $ac_cv_sizeof_void_p; then
-+	{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: size_t cannot represent the amount of used memory of a process" >&5
-+$as_echo "$as_me: WARNING: size_t cannot represent the amount of used memory of a process" >&2;}
-+	{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: please report this to <samba-technical at samba.org>" >&5
-+$as_echo "$as_me: WARNING: please report this to <samba-technical at samba.org>" >&2;}
-+	{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: sizeof(size_t) = $ac_cv_sizeof_size_t" >&5
-+$as_echo "$as_me: WARNING: sizeof(size_t) = $ac_cv_sizeof_size_t" >&2;}
-+	{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: sizeof(void *) = $ac_cv_sizeof_void_p" >&5
-+$as_echo "$as_me: WARNING: sizeof(void *) = $ac_cv_sizeof_void_p" >&2;}
-+	as_fn_error "sizeof(size_t) < sizeof(void *)" "$LINENO" 5
- fi
- 
+-fi
+-
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -  done
- else
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	ac_lo= ac_hi=
-+	tallocdir=../lib/talloc
- fi
- 
+-fi
+-
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-+
-+
-+
-+if test x"$teventdir" = "x"; then
-+	teventdir=""
-+	teventpaths="$srcdir $srcdir/../lib/tevent $srcdir/tevent $srcdir/../tevent"
-+	for d in $teventpaths; do
-+		if test -f "$d/tevent.c"; then
-+			teventdir="$d"
-+			break;
-+		fi
-+	done
-+	if test x"$teventdir" = "x"; then
-+	   as_fn_error "cannot find libtevent source in $teventpaths" "$LINENO" 5
-+	fi
- fi
- 
+-fi
+-
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -# Binary search between lo and hi bounds.
 -while test "x$ac_lo" != "x$ac_hi"; do
@@ -35242,30 +34551,11 @@
 -{
 -static int test_array [1 - 2 * !(((long int) (sizeof (long long))) <= $ac_mid)];
 -test_array [0] = 0
-+TEVENT_OBJ=""
-+TEVENT_CFLAGS=""
-+TEVENT_LIBS=""
- 
+-
 -  ;
 -  return 0;
 -}
-+
-+
-+
-+TEVENT_CFLAGS="-I$teventdir"
-+
-+TEVENT_OBJ="tevent.o tevent_debug.o tevent_util.o"
-+TEVENT_OBJ="$TEVENT_OBJ tevent_fd.o tevent_timed.o tevent_immediate.o tevent_signal.o"
-+TEVENT_OBJ="$TEVENT_OBJ tevent_req.o tevent_wakeup.o tevent_queue.o"
-+TEVENT_OBJ="$TEVENT_OBJ tevent_standard.o tevent_select.o"
-+
-+for ac_header in sys/epoll.h
-+do :
-+  ac_fn_c_check_header_mongrel "$LINENO" "sys/epoll.h" "ac_cv_header_sys_epoll_h" "$ac_includes_default"
-+if test "x$ac_cv_header_sys_epoll_h" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define HAVE_SYS_EPOLL_H 1
- _ACEOF
+-_ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -35288,12 +34578,12 @@
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
- 
+-
 -	ac_lo=`expr '(' $ac_mid ')' + 1`
- fi
- 
+-fi
+-
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- done
+-done
 -case $ac_lo in
 -?*) ac_cv_sizeof_long_long=$ac_lo;;
 -'') if test "$ac_cv_type_long_long" = yes; then
@@ -35344,17 +34634,11 @@
 -  /* Do not output a trailing newline, as this causes \r\n confusion
 -     on some platforms.  */
 -  return ferror (f) || fclose (f) != 0;
- 
+-
 -  ;
 -  return 0;
 -}
-+for ac_func in epoll_create
-+do :
-+  ac_fn_c_check_func "$LINENO" "epoll_create" "ac_cv_func_epoll_create"
-+if test "x$ac_cv_func_epoll_create" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define HAVE_EPOLL_CREATE 1
- _ACEOF
+-_ACEOF
 -rm -f conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -35382,7 +34666,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
@@ -35395,38 +34679,22 @@
 -   else
 -     ac_cv_sizeof_long_long=0
 -   fi
- fi
+-fi
 -rm -rf conftest.dSYM
 -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-+done
-+
-+if test x"$ac_cv_header_sys_epoll_h" = x"yes" -a x"$ac_cv_func_epoll_create" = x"yes"; then
-+   TEVENT_OBJ="$TEVENT_OBJ tevent_epoll.o"
-+
-+$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
-+
- fi
+-fi
 -rm -f conftest.val
-+
-+if test x"$VERSIONSCRIPT" != "x"; then
-+    EXPORTSFILE=tevent.exports
-+
- fi
+-fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
 -$as_echo "$ac_cv_sizeof_long_long" >&6; }
- 
- 
- 
+-
+-
+-
 -cat >>confdefs.h <<_ACEOF
 -#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
 -_ACEOF
-+LIBTEVENT_OBJ0=""
-+for obj in ${TEVENT_OBJ}; do
-+	LIBTEVENT_OBJ0="${LIBTEVENT_OBJ0} ${teventdir}/${obj}"
-+done
- 
-+LIBS="${LIBS} ${TEVENT_LIBS}"
- 
+-
+-
 -# 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]];'.
@@ -35450,10 +34718,7 @@
 -{
 -static int test_array [1 - 2 * !(((long int) (sizeof (short))) >= 0)];
 -test_array [0] = 0
-+# TODO: These should come from m4_include(lib/tdb/libtdb.m4)
-+# but currently this fails: things have to get merged from s4.
-+tdbdir="../lib/tdb"
- 
+-
 -  ;
 -  return 0;
 -}
@@ -35490,8 +34755,7 @@
 -{
 -static int test_array [1 - 2 * !(((long int) (sizeof (short))) <= $ac_mid)];
 -test_array [0] = 0
-+TDB_CFLAGS="-I${srcdir-.}/$tdbdir/include"
- 
+-
 -  ;
 -  return 0;
 -}
@@ -35518,44 +34782,21 @@
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
- 
+-
 -	ac_lo=`expr $ac_mid + 1`
 -			if test $ac_lo -le $ac_mid; then
 -			  ac_lo= ac_hi=
 -			  break
 -			fi
 -			ac_mid=`expr 2 '*' $ac_mid + 1`
-+LIBTDB_OBJ0=""
-+for o in common/tdb.o common/dump.o common/transaction.o common/error.o \
-+	     common/traverse.o common/freelist.o common/freelistcheck.o \
-+		 common/io.o common/lock.o common/open.o;
-+do
-+	LIBTDB_OBJ0="$LIBTDB_OBJ0 $tdbdir/$o"
-+done
-+
-+
-+SAMBA_CPPFLAGS="-Iinclude -I${srcdir-.}/include  -I. -I${srcdir-.}"
-+SAMBA_CPPFLAGS="${SAMBA_CPPFLAGS} -I${srcdir-.}/../lib/replace"
-+SAMBA_CPPFLAGS="${SAMBA_CPPFLAGS} ${TALLOC_CFLAGS}"
-+SAMBA_CPPFLAGS="${SAMBA_CPPFLAGS} ${TEVENT_CFLAGS}"
-+SAMBA_CPPFLAGS="${SAMBA_CPPFLAGS} ${TDB_CFLAGS}"
-+SAMBA_CPPFLAGS="${SAMBA_CPPFLAGS} -I${srcdir-.}/libaddns"
-+SAMBA_CPPFLAGS="${SAMBA_CPPFLAGS} -I${srcdir-.}/librpc"
-+SAMBA_CPPFLAGS="${SAMBA_CPPFLAGS} -I${srcdir-.}/.."
-+
-+SAMBA_CONFIGURE_CPPFLAGS="${SAMBA_CPPFLAGS} -I${srcdir-.}/../lib/popt"
-+
-+## cleanup the $(srcdir) in the Makefile if we are outside of the tree
-+if test "x${srcdir-.}" != "x."; then
-+	SAMBA_CPPFLAGS=`echo ${SAMBA_CPPFLAGS} | sed -e "s;${srcdir};\$\(srcdir\);g"`
- fi
- 
+-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
@@ -35568,7 +34809,7 @@
 -{
 -static int test_array [1 - 2 * !(((long int) (sizeof (short))) < 0)];
 -test_array [0] = 0
- 
+-
 -  ;
 -  return 0;
 -}
@@ -35605,7 +34846,7 @@
 -{
 -static int test_array [1 - 2 * !(((long int) (sizeof (short))) >= $ac_mid)];
 -test_array [0] = 0
- 
+-
 -  ;
 -  return 0;
 -}
@@ -35632,7 +34873,7 @@
 -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=
@@ -35640,19 +34881,19 @@
 -			fi
 -			ac_mid=`expr 2 '*' $ac_mid`
 -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
- 
+-
 -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
@@ -35669,7 +34910,7 @@
 -{
 -static int test_array [1 - 2 * !(((long int) (sizeof (short))) <= $ac_mid)];
 -test_array [0] = 0
- 
+-
 -  ;
 -  return 0;
 -}
@@ -35696,10 +34937,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
@@ -35731,7 +34972,7 @@
 -int
 -main ()
 -{
- 
+-
 -  FILE *f = fopen ("conftest.val", "w");
 -  if (! f)
 -    return 1;
@@ -35752,7 +34993,7 @@
 -  /* Do not output a trailing newline, as this causes \r\n confusion
 -     on some platforms.  */
 -  return ferror (f) || fclose (f) != 0;
- 
+-
 -  ;
 -  return 0;
 -}
@@ -35780,11 +35021,13 @@
 -  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
 -  (exit $ac_status); }; }; then
 -  ac_cv_sizeof_short=`cat conftest.val`
--else
++if ac_fn_c_try_run "$LINENO"; then :
++  samba_cv_HAVE_Werror_implicit_function_declaration=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 )
 -if test "$ac_cv_type_short" = yes; then
 -     { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
@@ -35797,23 +35040,26 @@
 -   else
 -     ac_cv_sizeof_short=0
 -   fi
--fi
++  samba_cv_HAVE_Werror_implicit_function_declaration=no
+ fi
 -rm -rf conftest.dSYM
 -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
--fi
++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
++  conftest.$ac_objext conftest.beam conftest.$ac_ext
+ fi
 -rm -f conftest.val
 -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
- 
- 
- 
+-
+-
+-
 -{ $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
@@ -35825,7 +35071,7 @@
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
- 
+-
 -int
 -main ()
 -{
@@ -35853,7 +35099,7 @@
 -  { /* SCO 3.2v4 cc rejects this.  */
 -    char *t;
 -    char const *s = 0 ? (char *) 0 : (char const *) 0;
- 
+-
 -    *t++ = 0;
 -    if (s) return 0;
 -  }
@@ -35905,21 +35151,43 @@
 -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;
  
 -	ac_cv_c_const=no
 -fi
  
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
--fi
+ fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
 -$as_echo "$ac_cv_c_const" >&6; }
 -if test $ac_cv_c_const = no; then
++{ $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 const /**/
 -_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
  
--fi
++       if test x"$picky_developer" = x"yes"; then
++	    DEVELOPER_CFLAGS="$DEVELOPER_CFLAGS -Werror"
++       fi
+ fi
  
 -{ $as_echo "$as_me:$LINENO: checking for inline" >&5
 -$as_echo_n "checking for inline... " >&6; }
@@ -35939,7 +35207,7 @@
 -static $ac_kw foo_t static_foo () {return 0; }
 -$ac_kw foo_t foo () {return 0; }
 -#endif
- 
+-
 -_ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
@@ -35963,55 +35231,40 @@
 -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
 -  test "$ac_cv_c_inline" != no && break
 -done
++    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; }
  
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+# compile with optimization and without debugging by default, but
-+# allow people to set their own preference.
-+# do this here since AC_CACHE_CHECK apparently sets the CFLAGS to "-g -O2"
-+# if it has no value.  This prevent *very* large debug binaries from occurring
-+# by default.
-+if test "x$debug" = "xyes" ; then
-+	CFLAGS="${CFLAGS} -g"
-+fi
-+if test "x$CFLAGS" = x; then
-+  CFLAGS="-O"
  fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
 -$as_echo "$ac_cv_c_inline" >&6; }
  
-+# Check whether --enable-socket-wrapper was given.
-+if test "${enable_socket_wrapper+set}" = set; then :
-+  enableval=$enable_socket_wrapper;
-+fi
  
 -case $ac_cv_c_inline in
 -  inline | yes) ;;
@@ -36027,15 +35280,21 @@
 -_ACEOF
 -    ;;
 -esac
++merged_build_possible=yes
  
-+DEFAULT_TEST_OPTIONS=
-+HAVE_SOCKET_WRAPPER=no
  
 - { $as_echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
 -$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
 -if test "${ac_cv_c_bigendian+set}" = set; then
--  $as_echo_n "(cached) " >&6
--else
++for ac_prog in gawk mawk nawk awk
++do
++  # Extract the first word of "$ac_prog", so it can be a program name with args.
++set dummy $ac_prog; ac_word=$2
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if test "${ac_cv_prog_AWK+set}" = set; then :
+   $as_echo_n "(cached) " >&6
+ else
 -  ac_cv_c_bigendian=unknown
 -    # See if we're dealing with a universal compiler.
 -    cat >conftest.$ac_ext <<_ACEOF
@@ -36048,10 +35307,7 @@
 -	       not a universal capable compiler
 -	     #endif
 -	     typedef int dummy;
-+if eval "test x$developer = xyes"; then
-+	enable_socket_wrapper=yes
-+fi
- 
+-
 -_ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
@@ -36071,7 +35327,23 @@
 -	 test -z "$ac_c_werror_flag" ||
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
-+if eval "test x$enable_socket_wrapper = xyes"; then
++  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
  
 -	# Check for potential -arch flags.  It is not universal unless
 -	# there are some -arch flags.  Note that *ppc* also matches
@@ -36079,17 +35351,23 @@
 -	case "${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}" in  #(
 -	  *-arch*ppc*|*-arch*i386*|*-arch*x86_64*) ac_cv_c_bigendian=universal;;
 -	esac
--else
++fi
++fi
++AWK=$ac_cv_prog_AWK
++if test -n "$AWK"; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
++$as_echo "$AWK" >&6; }
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+$as_echo "#define SOCKET_WRAPPER 1" >>confdefs.h
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++fi
  
-+	DEFAULT_TEST_OPTIONS=--socket-wrapper
-+	HAVE_SOCKET_WRAPPER=yes
  
-+	# this is only used for samba3
-+	SOCKET_WRAPPER_OBJS="../lib/socket_wrapper/socket_wrapper.o"
- fi
+-fi
++  test -n "$AWK" && break
++done
  
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -    if test $ac_cv_c_bigendian = unknown; then
@@ -36102,6 +35380,7 @@
 -/* end confdefs.h.  */
 -#include <sys/types.h>
 -	     #include <sys/param.h>
++# Check for GNU make
  
 -int
 -main ()
@@ -36177,31 +35456,53 @@
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+# Check whether --enable-nss-wrapper was given.
-+if test "${enable_nss_wrapper+set}" = set; then :
-+  enableval=$enable_nss_wrapper;
-+fi
-+
  
 -	ac_cv_c_bigendian=no
-+HAVE_NSS_WRAPPER=no
-+
-+if eval "test x$developer = xyes"; then
-+	enable_nss_wrapper=yes
- fi
+-fi
  
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
--else
++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: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+if eval "test x$enable_nss_wrapper = xyes"; then
-+
-+$as_echo "#define NSS_WRAPPER 1" >>confdefs.h
+-
++  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
  
-+	HAVE_NSS_WRAPPER=yes
- 
-+	# this is only used for samba3
-+	NSS_WRAPPER_OBJS="../lib/nss_wrapper/nss_wrapper.o"
++  ;;
++esac
++fi
++MAKE=$ac_cv_path_MAKE
++if test -n "$MAKE"; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
++$as_echo "$MAKE" >&6; }
++else
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
  fi
  
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
@@ -36215,7 +35516,7 @@
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
 -#include <limits.h>
- 
+-
 -int
 -main ()
 -{
@@ -36253,6 +35554,8 @@
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
 -#include <limits.h>
++  test -n "$MAKE" && break
++done
  
 -int
 -main ()
@@ -36284,30 +35587,34 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_cv_c_bigendian=yes
--else
++{ $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 "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
  
 -	ac_cv_c_bigendian=no
--fi
++if ! $ac_cv_path_MAKE --version | head -1 | grep GNU 2>/dev/null >/dev/null
++then
++	samba_cv_gnu_make=no
++else
++	samba_cv_gnu_make=yes
+ fi
  
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
--else
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $samba_cv_gnu_make" >&5
++$as_echo "$samba_cv_gnu_make" >&6; }
++if test x$samba_cv_gnu_make = xyes; then
++	true
+ 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
- 
+-
+-
++	merged_build_possible=no
  fi
  
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
@@ -36378,24 +35685,13 @@
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
++# Check for perl
  
  
 -fi
  
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-+
-+
-+# Probe the gcc version for extra CFLAGS. We always stash these in
-+# DEVELOPER_CFLAGS, so that you can turn them on and off with a simple
-+# Makefile edit, avoiding the need to re-run configure.
-+if test x"$ac_cv_c_compiler_gnu" = x"yes" ; then
-+    	DEVELOPER_CFLAGS="-g -Wall -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -DDEBUG_PASSWORD -DDEVELOPER"
-+	# Add -Wdeclaration-after-statement if compiler supports it
-+	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that the C compiler understands -Wdeclaration-after-statement" >&5
-+$as_echo_n "checking that the C compiler understands -Wdeclaration-after-statement... " >&6; }
-+if test "${samba_cv_HAVE_Wdeclaration_after_statement+set}" = set; then :
-+  $as_echo_n "(cached) " >&6
- else
+-else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
@@ -36443,54 +35739,100 @@
 -  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
 -  (exit $ac_status); }; }; then
 -  ac_cv_c_bigendian=no
-+	old_CFLAGS="$CFLAGS";
-+	CFLAGS="-Wdeclaration-after-statement";
-+	export CFLAGS;
-+	old_CPPFLAGS="$CPPFLAGS";
-+	CPPFLAGS="$CPPFLAGS";
-+	export CPPFLAGS;
-+	old_LDFLAGS="$LDFLAGS";
-+	LDFLAGS="$LDFLAGS";
-+	export LDFLAGS;
-+	if test "$cross_compiling" = yes; then :
-+  samba_cv_HAVE_Wdeclaration_after_statement=cross
++case "$host_os" in
++	*irix*)
++		# On IRIX, we prefer Freeware or Nekoware Perl, because the
++		# system perl is so ancient.
++		# Extract the first word of "perl", so it can be a program name with args.
++set dummy perl; ac_word=$2
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if test "${ac_cv_path_PERL+set}" = set; then :
++  $as_echo_n "(cached) " >&6
  else
 -  $as_echo "$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 $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
  
 -( 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_Wdeclaration_after_statement=yes
-+else
-+  samba_cv_HAVE_Wdeclaration_after_statement=no
++  test -z "$ac_cv_path_PERL" && ac_cv_path_PERL=""""
++  ;;
++esac
  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
++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
  
-+	CFLAGS="$old_CFLAGS";
-+	old_CFLAGS="";
-+	export CFLAGS;
-+	CPPFLAGS="$old_CPPFLAGS";
-+	old_CPPFLAGS="";
-+	export CPPFLAGS;
-+	LDFLAGS="$old_LDFLAGS";
-+	old_LDFLAGS="";
-+	export LDFLAGS;
  
 -    fi
--fi
++		;;
++	*)
++		# Extract the first word of "perl", so it can be a program name with args.
++set dummy perl; ac_word=$2
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if test "${ac_cv_path_PERL+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  case $PERL in
++  [\\/]* | ?:[\\/]*)
++  ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
++  ;;
++  *)
++  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++  IFS=$as_save_IFS
++  test -z "$as_dir" && as_dir=.
++    for ac_exec_ext in '' $ac_executable_extensions; do
++  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++    ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
++    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
++    break 2
++  fi
++done
++  done
++IFS=$as_save_IFS
++
++  ;;
++esac
++fi
++PERL=$ac_cv_path_PERL
++if test -n "$PERL"; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
++$as_echo "$PERL" >&6; }
++else
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
+ fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
 -$as_echo "$ac_cv_c_bigendian" >&6; }
 - case $ac_cv_c_bigendian in #(
@@ -36502,7 +35844,7 @@
 -   no)
 -      ;; #(
 -   universal)
--
+ 
 -cat >>confdefs.h <<\_ACEOF
 -#define AC_APPLE_UNIVERSAL_BUILD 1
 -_ACEOF
@@ -36515,21 +35857,31 @@
 - presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
 -   { (exit 1); exit 1; }; } ;;
 - esac
++		;;
++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
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $samba_cv_HAVE_Wdeclaration_after_statement" >&5
-+$as_echo "$samba_cv_HAVE_Wdeclaration_after_statement" >&6; }
  
-+	if test x"$samba_cv_HAVE_Wdeclaration_after_statement" = x"yes"; then
-+	    DEVELOPER_CFLAGS="${DEVELOPER_CFLAGS} -Wdeclaration-after-statement"
-+	fi
  
 -{ $as_echo "$as_me:$LINENO: checking whether char is unsigned" >&5
 -$as_echo_n "checking whether char is unsigned... " >&6; }
 -if test "${ac_cv_c_char_unsigned+set}" = set; then
-+	#-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 :
++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
 -  cat >conftest.$ac_ext <<_ACEOF
@@ -36537,37 +35889,18 @@
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+
-+
-+	old_CFLAGS="$CFLAGS";
-+	CFLAGS="-Werror-implicit-function-declaration";
-+	export CFLAGS;
-+	old_CPPFLAGS="$CPPFLAGS";
-+	CPPFLAGS="$CPPFLAGS";
-+	export CPPFLAGS;
-+	old_LDFLAGS="$LDFLAGS";
-+	LDFLAGS="$LDFLAGS";
-+	export LDFLAGS;
-+	if test "$cross_compiling" = yes; then :
-+  samba_cv_HAVE_Werror_implicit_function_declaration=cross
-+else
-+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
+-/* end confdefs.h.  */
 -$ac_includes_default
 -int
 -main ()
 -{
 -static int test_array [1 - 2 * !(((char) -1) < 0)];
 -test_array [0] = 0
- 
+-
 -  ;
 -  return 0;
 -}
-+	    int main(void)
-+	    {
-+	    	return 0;
-+	    }
- _ACEOF
+-_ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -36587,46 +35920,30 @@
 -	 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_Werror_implicit_function_declaration=yes
++  if test -n "$AR"; then
++  ac_cv_prog_AR="$AR" # Let the user override the test.
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+  samba_cv_HAVE_Werror_implicit_function_declaration=no
-+fi
-+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-+  conftest.$ac_objext conftest.beam conftest.$ac_ext
-+fi
-+
-+	CFLAGS="$old_CFLAGS";
-+	old_CFLAGS="";
-+	export CFLAGS;
-+	CPPFLAGS="$old_CPPFLAGS";
-+	old_CPPFLAGS="";
-+	export CPPFLAGS;
-+	LDFLAGS="$old_LDFLAGS";
-+	old_LDFLAGS="";
-+	export LDFLAGS;
-+
++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
  
 -	ac_cv_c_char_unsigned=yes
  fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $samba_cv_HAVE_Werror_implicit_function_declaration" >&5
-+$as_echo "$samba_cv_HAVE_Werror_implicit_function_declaration" >&6; }
-+       if test x"$samba_cv_HAVE_Werror_implicit_function_declaration" = x"yes"; then
-+	    DEVELOPER_CFLAGS="${DEVELOPER_CFLAGS} -Werror-implicit-function-declaration"
-+       fi
- 
+-
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-+	# krb5developer is like developer, except we don't get
-+	# -Wstrict-prototypes.
-+       if test x"$krb5_developer" != x"$yes" ; then
-+	    DEVELOPER_CFLAGS="$DEVELOPER_CFLAGS -Wstrict-prototypes"
-+       fi
-+
-+       if test x"$picky_developer" = x"yes"; then
-+	    DEVELOPER_CFLAGS="$DEVELOPER_CFLAGS -Werror"
-+       fi
  fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
 -$as_echo "$ac_cv_c_char_unsigned" >&6; }
@@ -36634,18 +35951,30 @@
 -  cat >>confdefs.h <<\_ACEOF
 -#define __CHAR_UNSIGNED__ 1
 -_ACEOF
- 
-+# Check whether --enable-dmalloc was given.
-+if test "${enable_dmalloc+set}" = set; then :
-+  enableval=$enable_dmalloc;
+-
++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 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
++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
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
@@ -36654,9 +35983,7 @@
 -/* end confdefs.h.  */
 -#include <sys/types.h>
 -#include <signal.h>
-+if test "x$enable_dmalloc" = xyes
-+then
- 
+-
 -int
 -main ()
 -{
@@ -36684,42 +36011,70 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_cv_type_signal=int
--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_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+$as_echo "#define ENABLE_DMALLOC 1" >>confdefs.h
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++  IFS=$as_save_IFS
++  test -z "$as_dir" && as_dir=.
++    for ac_exec_ext in '' $ac_executable_extensions; do
++  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++    ac_cv_prog_ac_ct_AR="ar"
++    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
++    break 2
++  fi
++done
++  done
++IFS=$as_save_IFS
  
 -	ac_cv_type_signal=void
--fi
- 
+ fi
+-
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-+$as_echo "#define DMALLOC_FUNC_CHECK 1" >>confdefs.h
-+
-+	LIBS="$LIBS -ldmalloc"
  fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
 -$as_echo "$ac_cv_type_signal" >&6; }
++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
  
 -cat >>confdefs.h <<_ACEOF
 -#define RETSIGTYPE $ac_cv_type_signal
 -_ACEOF
-+#################################################
-+# check for a shared memory profiling support
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use profiling" >&5
-+$as_echo_n "checking whether to use profiling... " >&6; }
++  if test "x$ac_ct_AR" = x; then
++    AR=""
++  else
++    case $cross_compiling:$ac_tool_warned in
++yes:)
++{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
++$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
++ac_tool_warned=yes ;;
++esac
++    AR=$ac_ct_AR
++  fi
++else
++  AR="$ac_cv_prog_AR"
++fi
  
-+# Check whether --with-profiling-data was given.
-+if test "${with_profiling_data+set}" = set; then :
-+  withval=$with_profiling_data;  case "$withval" in
-+  yes)
-+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-+$as_echo "yes" >&6; }
  
 -{ $as_echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
 -$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
 -if test "${ac_cv_type_uid_t+set}" = set; then
--  $as_echo_n "(cached) " >&6
--else
++LD=ld
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
++$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
++if test "${ac_cv_prog_gnu_ld+set}" = set; then :
+   $as_echo_n "(cached) " >&6
+ else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
@@ -36727,54 +36082,89 @@
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
 -#include <sys/types.h>
-+$as_echo "#define WITH_PROFILE 1" >>confdefs.h
- 
+-
 -_ACEOF
 -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
 -  $EGREP "uid_t" >/dev/null 2>&1; then
 -  ac_cv_type_uid_t=yes
-+    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
++  # I'd rather use --version here, but apparently some GNU ld's only accept -v.
++if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
++  ac_cv_prog_gnu_ld=yes
  else
 -  ac_cv_type_uid_t=no
--fi
++  ac_cv_prog_gnu_ld=no
+ fi
 -rm -f conftest*
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-+$as_echo "no" >&6; }
- 
+-
  fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
 -$as_echo "$ac_cv_type_uid_t" >&6; }
 -if test $ac_cv_type_uid_t = no; then
--
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gnu_ld" >&5
++$as_echo "$ac_cv_prog_gnu_ld" >&6; }
+ 
 -cat >>confdefs.h <<\_ACEOF
 -#define uid_t int
 -_ACEOF
++
++if test "$ac_cv_prog_gnu_ld" = "yes"; then
++	ac_cv_gnu_ld_version=`$LD -v 2>/dev/null | head -1`
++	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking GNU ld release date" >&5
++$as_echo_n "checking GNU ld release date... " >&6; }
++		ac_cv_gnu_ld_date=`echo $ac_cv_gnu_ld_version | sed -n 's,^.*\([2-9][0-9][0-9][0-9]\)[-]*\([01][0-9]\)[-]*\([0-3][0-9]\).*$,\1\2\3,p'`
++		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_cv_gnu_ld_date}" >&5
++$as_echo "${ac_cv_gnu_ld_date}" >&6; }
++        if test -n "$ac_cv_gnu_ld_date"; then
++ 	if test "$ac_cv_gnu_ld_date" -lt 20030217; then
++ 		ac_cv_gnu_ld_no_default_allow_shlib_undefined=yes
++ 	fi
++	if test "$ac_cv_gnu_ld_date" -gt 20030101; then
++		ac_cv_gnu_ld_version_script=yes
++	fi
++        else
++           { $as_echo "$as_me:${as_lineno-$LINENO}: checking GNU ld release version" >&5
++$as_echo_n "checking GNU ld release version... " >&6; }
++                      ac_cv_gnu_ld_vernr=`echo $ac_cv_gnu_ld_version | sed -n 's,^[^0-9]*\([1-9][0-9]*\.[0-9][0-9]*\).*$,\1,p'`
++           ac_cv_gnu_ld_vernr_major=`echo $ac_cv_gnu_ld_vernr | cut -d '.' -f 1`
++           ac_cv_gnu_ld_vernr_minor=`echo $ac_cv_gnu_ld_vernr | cut -d '.' -f 2`
++                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_cv_gnu_ld_vernr}" >&5
++$as_echo "${ac_cv_gnu_ld_vernr}" >&6; }
++           { $as_echo "$as_me:${as_lineno-$LINENO}: checking GNU ld release version major" >&5
++$as_echo_n "checking GNU ld release version major... " >&6; }
++           { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_cv_gnu_ld_vernr_major}" >&5
++$as_echo "${ac_cv_gnu_ld_vernr_major}" >&6; }
++           { $as_echo "$as_me:${as_lineno-$LINENO}: checking GNU ld release version minor" >&5
++$as_echo_n "checking GNU ld release version minor... " >&6; }
++           { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_cv_gnu_ld_vernr_minor}" >&5
++$as_echo "${ac_cv_gnu_ld_vernr_minor}" >&6; }
++           if test "$ac_cv_gnu_ld_vernr_major" -lt 2 || test "$ac_cv_gnu_ld_vernr_minor" -lt 14; then
++             ac_cv_gnu_ld_no_default_allow_shlib_undefined=yes
++           fi
++           if test "$ac_cv_gnu_ld_vernr_major" -gt 2 || test "$ac_cv_gnu_ld_vernr_major" = 2 && test "$ac_cv_gnu_ld_vernr_minor" -ge 12; then
++             ac_cv_gnu_ld_version_script=yes
++           fi
++        fi
++fi
  
  
 -cat >>confdefs.h <<\_ACEOF
 -#define gid_t int
 -_ACEOF
-+merged_build_possible=yes
  
--fi
- 
++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
+-
 -{ $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
-+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 :
++set dummy $CC; ac_cc=`$as_echo "$2" |
++		      sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
++if { as_var=ac_cv_prog_cc_${ac_cc}_c_o; eval "test \"\${$as_var+set}\" = set"; }; then :
    $as_echo_n "(cached) " >&6
  else
 -  ac_cv_type_mode_t=no
@@ -36783,27 +36173,39 @@
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
 -$ac_includes_default
--int
--main ()
--{
++
+ int
+ main ()
+ {
 -if (sizeof (mode_t))
 -       return 0;
--  ;
--  return 0;
--}
--_ACEOF
++
+   ;
+   return 0;
+ }
+ _ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
--  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
--  *) ac_try_echo=$ac_try;;
--esac
++# Make sure it works both with $CC and with simple cc.
++# We do the test twice because some compilers refuse to overwrite an
++# existing .o file with -o, though they will create one.
++ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
++rm -f conftest2.*
++if { { case "(($ac_try" in
+   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+   *) ac_try_echo=$ac_try;;
+ esac
 -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 -$as_echo "$ac_try_echo") >&5
 -  (eval "$ac_compile") 2>conftest.er1
--  ac_status=$?
++eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
++$as_echo "$ac_try_echo"; } >&5
++  (eval "$ac_try") 2>&5
+   ac_status=$?
 -  grep -v '^ *+' conftest.er1 >conftest.err
 -  rm -f conftest.er1
 -  cat conftest.err >&5
@@ -36831,13 +36233,19 @@
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
--  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
--  *) ac_try_echo=$ac_try;;
--esac
++  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++  test $ac_status = 0; } &&
++   test -f conftest2.$ac_objext && { { case "(($ac_try" in
+   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+   *) ac_try_echo=$ac_try;;
+ esac
 -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 -$as_echo "$ac_try_echo") >&5
 -  (eval "$ac_compile") 2>conftest.er1
--  ac_status=$?
++eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
++$as_echo "$ac_try_echo"; } >&5
++  (eval "$ac_try") 2>&5
+   ac_status=$?
 -  grep -v '^ *+' conftest.er1 >conftest.err
 -  rm -f conftest.er1
 -  cat conftest.err >&5
@@ -36847,50 +36255,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_mode_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_mode_t" >&5
@@ -36898,26 +36277,18 @@
 -if test "x$ac_cv_type_mode_t" = x""yes; then
 -  :
 -else
- 
+-
 -cat >>confdefs.h <<_ACEOF
 -#define mode_t int
 -_ACEOF
- 
+-
 -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
-+
-+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_off_t=no
 -cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
@@ -36938,13 +36309,24 @@
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
--  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
--  *) ac_try_echo=$ac_try;;
--esac
++  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++  test $ac_status = 0; };
++then
++  eval ac_cv_prog_cc_${ac_cc}_c_o=yes
++  if test "x$CC" != xcc; then
++    # Test first that cc exists at all.
++    if { ac_try='cc -c conftest.$ac_ext >&5'
++  { { case "(($ac_try" in
+   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+   *) ac_try_echo=$ac_try;;
+ esac
 -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 -$as_echo "$ac_try_echo") >&5
 -  (eval "$ac_compile") 2>conftest.er1
--  ac_status=$?
++eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
++$as_echo "$ac_try_echo"; } >&5
++  (eval "$ac_try") 2>&5
+   ac_status=$?
 -  grep -v '^ *+' conftest.er1 >conftest.err
 -  rm -f conftest.er1
 -  cat conftest.err >&5
@@ -36972,34 +36354,21 @@
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
--  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
--  *) ac_try_echo=$ac_try;;
-+  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
-+
-+  ;;
++  $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
@@ -37009,68 +36378,77 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  :
-+fi
-+MAKE=$ac_cv_path_MAKE
-+if test -n "$MAKE"; then
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
-+$as_echo "$MAKE" >&6; }
++  $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
 -
 -	ac_cv_type_off_t=yes
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-+$as_echo "no" >&6; }
++  eval ac_cv_prog_cc_${ac_cc}_c_o=no
  fi
++rm -f core conftest*
  
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
--else
++fi
++if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
  
-+  test -n "$MAKE" && break
-+done
-+
-+
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we have GNU make" >&5
-+$as_echo_n "checking whether we have GNU make... " >&6; }
-+if test "${samba_cv_gnu_make+set}" = set; then :
-+  $as_echo_n "(cached) " >&6
-+else
++$as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h
  
-+if ! $ac_cv_path_MAKE --version | head -1 | grep GNU 2>/dev/null >/dev/null
-+then
-+	samba_cv_gnu_make=no
-+else
-+	samba_cv_gnu_make=yes
  fi
  
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
+-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
 -  :
-+{ $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
++if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then
++      BROKEN_CC=
  else
-+	merged_build_possible=no
-+fi
- 
+-
 -cat >>confdefs.h <<_ACEOF
 -#define off_t long int
 -_ACEOF
+-
++      BROKEN_CC=#
+ fi
  
--fi
-+# Check for perl
- 
 -{ $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
--  $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_size_t=no
 -cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
@@ -37149,79 +36527,68 @@
 -fi
  
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
--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
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
+-
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
  
- 
--fi
-+case "$host_os" in
-+	*irix*)
-+		# On IRIX, we prefer Freeware or Nekoware Perl, because the
-+		# system perl is so ancient.
-+		# Extract the first word of "perl", so it can be a program name with args.
-+set dummy perl; ac_word=$2
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-+$as_echo_n "checking for $ac_word... " >&6; }
-+if test "${ac_cv_path_PERL+set}" = set; then :
-+  $as_echo_n "(cached) " >&6
++  int main(void)
++  {
++  	return 0;
++  }
++_ACEOF
++if ac_fn_c_try_run "$LINENO"; then :
++  samba_cv_HAVE_Werror=yes
 +else
-+  case $PERL in
-+  [\\/]* | ?:[\\/]*)
-+  ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
-+  ;;
-+  *)
-+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-+as_dummy=""/usr/freeware/bin:/usr/nekoware/bin:$PATH""
-+for as_dir in $as_dummy
-+do
-+  IFS=$as_save_IFS
-+  test -z "$as_dir" && as_dir=.
-+    for ac_exec_ext in '' $ac_executable_extensions; do
-+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-+    ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
-+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-+    break 2
-+  fi
-+done
-+  done
-+IFS=$as_save_IFS
- 
++  samba_cv_HAVE_Werror=no
+ fi
+-
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-+  test -z "$ac_cv_path_PERL" && ac_cv_path_PERL=""""
-+  ;;
-+esac
++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_type_size_t" >&5
 -$as_echo "$ac_cv_type_size_t" >&6; }
 -if test "x$ac_cv_type_size_t" = x""yes; then
 -  :
-+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
+ 
 -cat >>confdefs.h <<_ACEOF
 -#define size_t unsigned int
 -_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: no" >&5
-+$as_echo "no" >&6; }
- fi
- 
 -{ $as_echo "$as_me:$LINENO: checking for pid_t" >&5
 -$as_echo_n "checking for pid_t... " >&6; }
 -if test "${ac_cv_type_pid_t+set}" = set; then
-+
-+		;;
-+	*)
-+		# 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
+-  $as_echo_n "(cached) " >&6
++{ $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
 -  ac_cv_type_pid_t=no
 -cat >conftest.$ac_ext <<_ACEOF
@@ -37279,28 +36646,7 @@
 -case "(($ac_try" in
 -  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
 -  *) ac_try_echo=$ac_try;;
-+  case $PERL in
-+  [\\/]* | ?:[\\/]*)
-+  ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
-+  ;;
-+  *)
-+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-+for as_dir in $PATH
-+do
-+  IFS=$as_save_IFS
-+  test -z "$as_dir" && as_dir=.
-+    for ac_exec_ext in '' $ac_executable_extensions; do
-+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-+    ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
-+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-+    break 2
-+  fi
-+done
-+  done
-+IFS=$as_save_IFS
-+
-+  ;;
- esac
+-esac
 -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 -$as_echo "$ac_try_echo") >&5
 -  (eval "$ac_compile") 2>conftest.er1
@@ -37314,100 +36660,80 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  :
-+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; }
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that the C compiler understands -w2" >&5
++$as_echo_n "checking that the C compiler understands -w2... " >&6; }
++if test "${samba_cv_HAVE_w2+set}" = set; then :
++  $as_echo_n "(cached) " >&6
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-+$as_echo "no" >&6; }
-+fi
-+
-+
-+		;;
-+esac
  
 -	ac_cv_type_pid_t=yes
-+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
+-fi
  
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-+
-+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
++	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
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
-+  if test -n "$AR"; then
-+  ac_cv_prog_AR="$AR" # Let the user override the test.
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
+ 
++  int main(void)
++  {
++  	return 0;
++  }
++_ACEOF
++if ac_fn_c_try_run "$LINENO"; then :
++  samba_cv_HAVE_w2=yes
 +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
- 
++  samba_cv_HAVE_w2=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
  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
 -  :
-+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
+-else
  
 -cat >>confdefs.h <<_ACEOF
 -#define pid_t int
 -_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:$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
-+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
+-  $as_echo_n "(cached) " >&6
++{ $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.  */
@@ -37445,16 +36771,34 @@
 -	 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
--
+ 
 -	cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_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 ()
@@ -37465,7 +36809,12 @@
 -  ;
 -  return 0;
 -}
--_ACEOF
++
++   int main(void)
++   {
++	return 0;
++   }
+ _ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -37485,97 +36834,142 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_cv_member_struct_stat_st_rdev=yes
-+  if test -n "$ac_ct_AR"; then
-+  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
++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_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
++  samba_cv_HAVE_errwarn=no
++fi
++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
++  conftest.$ac_objext conftest.beam conftest.$ac_ext
++fi
++
++	CFLAGS="$old_CFLAGS";
++	old_CFLAGS="";
++	export CFLAGS;
++	CPPFLAGS="$old_CPPFLAGS";
++	old_CPPFLAGS="";
++	export CPPFLAGS;
++	LDFLAGS="$old_LDFLAGS";
++	old_LDFLAGS="";
++	export LDFLAGS;
  
 -	ac_cv_member_struct_stat_st_rdev=no
  fi
 -
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $samba_cv_HAVE_errwarn" >&5
++$as_echo "$samba_cv_HAVE_errwarn" >&6; }
++if test x"$samba_cv_HAVE_errwarn" = x"yes"; then
++   Werror_FLAGS="-errwarn=%all"
++fi
  fi
 -
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-+ac_ct_AR=$ac_cv_prog_ac_ct_AR
-+if test -n "$ac_ct_AR"; then
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
-+$as_echo "$ac_ct_AR" >&6; }
-+else
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-+$as_echo "no" >&6; }
  fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
 -$as_echo "$ac_cv_member_struct_stat_st_rdev" >&6; }
 -if test "x$ac_cv_member_struct_stat_st_rdev" = x""yes; then
--
+ 
 -cat >>confdefs.h <<_ACEOF
 -#define HAVE_STRUCT_STAT_ST_RDEV 1
 -_ACEOF
--
--
++############################################
++# check if the compiler can handle negative enum values
++# and don't truncate the values to INT_MAX
++# a runtime test is needed here
++
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that the C compiler understands negative enum values" >&5
++$as_echo_n "checking that the C compiler understands negative enum values... " >&6; }
++if test "${samba_cv_CC_NEGATIVE_ENUM_VALUES+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++
++    if test "$cross_compiling" = yes; then :
++  { { $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 <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;
++	}
+ 
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_ST_RDEV 1
--_ACEOF
+ _ACEOF
++if ac_fn_c_try_run "$LINENO"; then :
++  samba_cv_CC_NEGATIVE_ENUM_VALUES=yes
++else
++  samba_cv__CC_NEGATIVE_ENUM_VALUES=no
++fi
++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
++  conftest.$ac_objext conftest.beam conftest.$ac_ext
++fi
  
-+  if test "x$ac_ct_AR" = x; then
-+    AR=""
-+  else
-+    case $cross_compiling:$ac_tool_warned in
-+yes:)
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-+ac_tool_warned=yes ;;
-+esac
-+    AR=$ac_ct_AR
-+  fi
-+else
-+  AR="$ac_cv_prog_AR"
  fi
++{ $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
  
  
 -{ $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
-+LD=ld
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
-+$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
-+if test "${ac_cv_prog_gnu_ld+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
+-  $as_echo_n "(cached) " >&6
+-else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
--
+ 
 -#include <unistd.h>
 -#include <sys/types.h>
 -#include <dirent.h>
--int
--main ()
--{
++saved_CFLAGS="$CFLAGS";
++c99_init=no
++if test x"$c99_init" = x"no"; then
++    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C99 designated initializers" >&5
++$as_echo_n "checking for C99 designated initializers... " >&6; }
++    CFLAGS="$saved_CFLAGS";
++    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++#include <stdio.h>
+ int
+ main ()
+ {
 -struct dirent d; d.d_off;
--  ;
--  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
@@ -37595,100 +36989,56 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_cv_dirent_d_off=yes
-+  # I'd rather use --version here, but apparently some GNU ld's only accept -v.
-+if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
-+  ac_cv_prog_gnu_ld=yes
++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
 -
 -	ac_cv_dirent_d_off=no
-+  ac_cv_prog_gnu_ld=no
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
  fi
 -
--rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  fi
 -{ $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: $ac_cv_prog_gnu_ld" >&5
-+$as_echo "$ac_cv_prog_gnu_ld" >&6; }
- 
+-
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_DIRENT_D_OFF 1
 -_ACEOF
- 
-+if test "$ac_cv_prog_gnu_ld" = "yes"; then
-+	ac_cv_gnu_ld_version=`$LD -v 2>/dev/null | head -1`
-+	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking GNU ld release date" >&5
-+$as_echo_n "checking GNU ld release date... " >&6; }
-+		ac_cv_gnu_ld_date=`echo $ac_cv_gnu_ld_version | sed -n 's,^.*\([2-9][0-9][0-9][0-9]\)[-]*\([01][0-9]\)[-]*\([0-3][0-9]\).*$,\1\2\3,p'`
-+		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_cv_gnu_ld_date}" >&5
-+$as_echo "${ac_cv_gnu_ld_date}" >&6; }
-+        if test -n "$ac_cv_gnu_ld_date"; then
-+ 	if test "$ac_cv_gnu_ld_date" -lt 20030217; then
-+ 		ac_cv_gnu_ld_no_default_allow_shlib_undefined=yes
-+ 	fi
-+	if test "$ac_cv_gnu_ld_date" -gt 20030101; then
-+		ac_cv_gnu_ld_version_script=yes
-+	fi
-+        else
-+           { $as_echo "$as_me:${as_lineno-$LINENO}: checking GNU ld release version" >&5
-+$as_echo_n "checking GNU ld release version... " >&6; }
-+                      ac_cv_gnu_ld_vernr=`echo $ac_cv_gnu_ld_version | sed -n 's,^[^0-9]*\([1-9][0-9]*\.[0-9][0-9]*\).*$,\1,p'`
-+           ac_cv_gnu_ld_vernr_major=`echo $ac_cv_gnu_ld_vernr | cut -d '.' -f 1`
-+           ac_cv_gnu_ld_vernr_minor=`echo $ac_cv_gnu_ld_vernr | cut -d '.' -f 2`
-+                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_cv_gnu_ld_vernr}" >&5
-+$as_echo "${ac_cv_gnu_ld_vernr}" >&6; }
-+           { $as_echo "$as_me:${as_lineno-$LINENO}: checking GNU ld release version major" >&5
-+$as_echo_n "checking GNU ld release version major... " >&6; }
-+           { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_cv_gnu_ld_vernr_major}" >&5
-+$as_echo "${ac_cv_gnu_ld_vernr_major}" >&6; }
-+           { $as_echo "$as_me:${as_lineno-$LINENO}: checking GNU ld release version minor" >&5
-+$as_echo_n "checking GNU ld release version minor... " >&6; }
-+           { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_cv_gnu_ld_vernr_minor}" >&5
-+$as_echo "${ac_cv_gnu_ld_vernr_minor}" >&6; }
-+           if test "$ac_cv_gnu_ld_vernr_major" -lt 2 || test "$ac_cv_gnu_ld_vernr_minor" -lt 14; then
-+             ac_cv_gnu_ld_no_default_allow_shlib_undefined=yes
-+           fi
-+           if test "$ac_cv_gnu_ld_vernr_major" -gt 2 || test "$ac_cv_gnu_ld_vernr_major" = 2 && test "$ac_cv_gnu_ld_vernr_minor" -ge 12; then
-+             ac_cv_gnu_ld_version_script=yes
-+           fi
-+        fi
- fi
- 
+-
+-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
-+
-+
-+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
+-  $as_echo_n "(cached) " >&6
+-else
 -  ac_cv_type_ssize_t=no
 -cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++if test x"$c99_init" = x"no"; then
++    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C99 designated initializers with -AC99" >&5
++$as_echo_n "checking for C99 designated initializers with -AC99... " >&6; }
++    CFLAGS="$saved_CFLAGS -AC99";
++    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
 -$ac_includes_default
-+
++#include <stdio.h>
  int
  main ()
  {
 -if (sizeof (ssize_t))
 -       return 0;
++ struct foo {int x;char y;};
++       struct foo bar = { .y = 'X', .x = 1 };
 +
    ;
    return 0;
@@ -37697,22 +37047,13 @@
 -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
@@ -37726,33 +37067,45 @@
 -_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
-+  $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
@@ -37770,15 +37123,20 @@
 -fi
 -
 -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
 -
 -
--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
+ 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
@@ -37802,38 +37160,36 @@
 -_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
-+  $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
@@ -37847,35 +37203,45 @@
 -_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 -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
-+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-+  test $ac_status = 0; }; }; then
-+      ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
-+      rm -f conftest2.*
-+      if { { case "(($ac_try" in
-   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-   *) ac_try_echo=$ac_try;;
- esac
+-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+-  *) ac_try_echo=$ac_try;;
+-esac
 -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 -$as_echo "$ac_try_echo") >&5
 -  (eval "$ac_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
@@ -37885,82 +37251,77 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  :
-+  $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
++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
 -
 -	ac_cv_type_wchar_t=yes
-+  eval ac_cv_prog_cc_${ac_cc}_c_o=no
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
  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; }
- else
+-
+ 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
-+  { $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
  
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
--fi
++if test "`uname`" = "HP-UX"; then
++  if test "$ac_cv_c_compiler_gnu" = no; then
++	# special override for broken HP-UX compiler - I can't find a way to test
++	# this properly (its a compiler bug)
++	CFLAGS="$CFLAGS -AC99";
++	c99_init=yes;
++  fi
+ fi
 -{ $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
 -  :
-+if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then
-+      BROKEN_CC=
- else
--
+-else
+ 
 -cat >>confdefs.h <<_ACEOF
 -#define wchar_t unsigned short
 -_ACEOF
--
-+      BROKEN_CC=#
++if test x"$c99_init" = x"yes"; then
++    saved_CFLAGS=""
+ 
++else
++    CFLAGS="$saved_CFLAGS"
++    saved_CFLAGS=""
++    as_fn_error "c99 structure initializer are not supported" "$LINENO" 5
  fi
  
  
 -############################################
 -# for cups support we need libcups, and a handful of header files
--
++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; }
+ 
 -# Check whether --enable-cups was given.
 -if test "${enable_cups+set}" = set; then
 -  enableval=$enable_cups;
 -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
++UNAME_R=`(uname -r) 2>/dev/null` || UNAME_R="unknown"
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking uname -r" >&5
++$as_echo_n "checking uname -r... " >&6; }
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNAME_R}" >&5
++$as_echo "${UNAME_R}" >&6; }
  
++UNAME_M=`(uname -m) 2>/dev/null` || UNAME_M="unknown"
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking uname -m" >&5
++$as_echo_n "checking uname -m... " >&6; }
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNAME_M}" >&5
++$as_echo "${UNAME_M}" >&6; }
  
 -if test x$enable_cups != xno; then
 -	# Extract the first word of "cups-config", so it can be a program name with args.
@@ -37969,18 +37330,7 @@
 -$as_echo_n "checking for $ac_word... " >&6; }
 -if test "${ac_cv_path_CUPS_CONFIG+set}" = set; then
 -  $as_echo_n "(cached) " >&6
-+	old_CFLAGS="$CFLAGS";
-+	CFLAGS="-Werror";
-+	export CFLAGS;
-+	old_CPPFLAGS="$CPPFLAGS";
-+	CPPFLAGS="$CPPFLAGS";
-+	export CPPFLAGS;
-+	old_LDFLAGS="$LDFLAGS";
-+	LDFLAGS="$LDFLAGS";
-+	export LDFLAGS;
-+	if test "$cross_compiling" = yes; then :
-+  samba_cv_HAVE_Werror=cross
- else
+-else
 -  case $CUPS_CONFIG in
 -  [\\/]* | ?:[\\/]*)
 -  ac_cv_path_CUPS_CONFIG="$CUPS_CONFIG" # Let the user override the test with a path.
@@ -38000,53 +37350,54 @@
 -done
 -done
 -IFS=$as_save_IFS
-+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h.  */
++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; }
  
 -  ;;
--esac
++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
 -fi
 -CUPS_CONFIG=$ac_cv_path_CUPS_CONFIG
 -if test -n "$CUPS_CONFIG"; then
 -  { $as_echo "$as_me:$LINENO: result: $CUPS_CONFIG" >&5
 -$as_echo "$CUPS_CONFIG" >&6; }
-+  int main(void)
-+  {
-+  	return 0;
-+  }
-+_ACEOF
-+if ac_fn_c_try_run "$LINENO"; then :
-+  samba_cv_HAVE_Werror=yes
- else
+-else
 -  { $as_echo "$as_me:$LINENO: result: no" >&5
 -$as_echo "no" >&6; }
-+  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
+-fi
  
-+	CFLAGS="$old_CFLAGS";
-+	old_CFLAGS="";
-+	export CFLAGS;
-+	CPPFLAGS="$old_CPPFLAGS";
-+	old_CPPFLAGS="";
-+	export CPPFLAGS;
-+	LDFLAGS="$old_LDFLAGS";
-+	old_LDFLAGS="";
-+	export LDFLAGS;
++DYNEXP=
  
--
++LDSHFLAGS_Z_DEFS=
+ 
 -        if test "x$CUPS_CONFIG" != x; then
--
++LDSHFLAGS_Z_NODEFS=
+ 
 -		ac_save_CFLAGS=$CFLAGS
 -		ac_save_LDFLAGS=$LDFLAGS
 -		ac_save_PRINT_LIBS=$PRINT_LIBS
 -		CFLAGS="$CFLAGS `$CUPS_CONFIG --cflags`"
 -		LDFLAGS="$LDFLAGS `$CUPS_CONFIG --ldflags`"
--		PRINT_LIBS="$PRINT_LIBS `$CUPS_CONFIG --libs`"
--
--
+-		PRINT_LIBS="$PRINT_LIBS -lcups"
+ 
++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"
+ 
 -for ac_header in cups/cups.h cups/language.h
 -do
 -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
@@ -38055,16 +37406,12 @@
 -$as_echo_n "checking for $ac_header... " >&6; }
 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
 -  $as_echo_n "(cached) " >&6
- fi
+-fi
 -ac_res=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
 -$as_echo "$ac_res" >&6; }
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: 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
+-else
 -  # Is the header compilable?
 -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
 -$as_echo_n "checking $ac_header usability... " >&6; }
@@ -38096,20 +37443,34 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_header_compiler=yes
-+{ $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
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
++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"
  
 -	ac_header_compiler=no
--fi
--
++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
+ 
 -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; }
++#
++# 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)
  
 -# Is the header present?
 -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
@@ -38119,27 +37480,9 @@
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+	old_CFLAGS="$CFLAGS";
-+	CFLAGS="-w2";
-+	export CFLAGS;
-+	old_CPPFLAGS="$CPPFLAGS";
-+	CPPFLAGS="$CPPFLAGS";
-+	export CPPFLAGS;
-+	old_LDFLAGS="$LDFLAGS";
-+	LDFLAGS="$LDFLAGS";
-+	export LDFLAGS;
-+	if test "$cross_compiling" = yes; then :
-+  samba_cv_HAVE_w2=cross
-+else
-+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
+-/* end confdefs.h.  */
 -#include <$ac_header>
-+
-+  int main(void)
-+  {
-+  	return 0;
-+  }
- _ACEOF
+-_ACEOF
 -if { (ac_try="$ac_cpp conftest.$ac_ext"
 -case "(($ac_try" in
 -  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -38158,20 +37501,28 @@
 -	 test ! -s conftest.err
 -       }; then
 -  ac_header_preproc=yes
-+if ac_fn_c_try_run "$LINENO"; then :
-+  samba_cv_HAVE_w2=yes
- else
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
++$as_echo "#define USE_BOTH_CRYPT_CALLS 1" >>confdefs.h
+ 
 -  ac_header_preproc=no
-+  samba_cv_HAVE_w2=no
- fi
--
+-fi
++		;;
++      esac
++      ;;
+ 
 -rm -f conftest.err conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
 -$as_echo "$ac_header_preproc" >&6; }
--
++#
++# 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="
++	  ;;
+ 
 -# So?  What about this header?
 -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
 -  yes:no: )
@@ -38208,13 +37559,19 @@
 -  $as_echo_n "(cached) " >&6
 -else
 -  eval "$as_ac_Header=\$ac_header_preproc"
-+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-+  conftest.$ac_objext conftest.beam conftest.$ac_ext
- 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; }
++#
++# AIX4.x doesn't even admit to having large
++# files *at all* unless the -D_LARGE_FILE or -D_LARGE_FILE_API flags are set.
++#
++    *aix4*)
++	  { $as_echo "$as_me:${as_lineno-$LINENO}: result: enabling large file support" >&5
++$as_echo "enabling large file support" >&6; }
++      CPPFLAGS="$CPPFLAGS -D_LARGE_FILES"
  
 -fi
 -as_val=`eval 'as_val=${'$as_ac_Header'}
@@ -38223,56 +37580,240 @@
 -  cat >>confdefs.h <<_ACEOF
 -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 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 "#define _LARGE_FILES 1" >>confdefs.h
  
- fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $samba_cv_HAVE_w2" >&5
-+$as_echo "$samba_cv_HAVE_w2" >&6; }
-+if test x"$samba_cv_HAVE_w2" = x"yes"; then
-+   Werror_FLAGS="-w2"
-+else
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that the C compiler understands -errwarn" >&5
-+$as_echo_n "checking that the C compiler understands -errwarn... " >&6; }
-+if test "${samba_cv_HAVE_errwarn+set}" = set; then :
-+  $as_echo_n "(cached) " >&6
-+else
+-fi
++      ;;
++#
++# 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*)
  
 -done
++$as_echo "#define SYSV 1" >>confdefs.h
  
 -		if test x"$ac_cv_header_cups_cups_h" = xyes -a \
 -		        x"$ac_cv_header_cups_language_h" = xyes; then
-+	old_CFLAGS="$CFLAGS";
-+	CFLAGS="-errwarn=%all";
-+	export CFLAGS;
-+	old_CPPFLAGS="$CPPFLAGS";
-+	CPPFLAGS="$CPPFLAGS";
-+	export CPPFLAGS;
-+	old_LDFLAGS="$LDFLAGS";
-+	LDFLAGS="$LDFLAGS";
-+	export LDFLAGS;
-+	if test "$cross_compiling" = yes; then :
-+  samba_cv_HAVE_errwarn=cross
-+else
-+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h.  */
++		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"
  
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_CUPS 1
-+   int main(void)
-+   {
-+	return 0;
-+   }
- _ACEOF
+-_ACEOF
++$as_echo "#define _LARGEFILE64_SOURCE 1" >>confdefs.h
+ 
+-			samba_cv_HAVE_CUPS=yes
++						;;
++					*)
++						CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_REENTRANT -D_FILE_OFFSET_BITS=64"
++						LDFLAGS="$LDFLAGS -lthread"
+ 
++$as_echo "#define _LARGEFILE64_SOURCE 1" >>confdefs.h
+ 
+ 
+-ac_check_lib_ext_save_LIBS=$LIBS
+-LIBS="-lcups $PRINT_LIBS  $LIBS"
++$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
+ 
++						;;
++				esac
++			else
++				CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_REENTRANT -D_FILE_OFFSET_BITS=64"
++				LDFLAGS="$LDFLAGS -lthread"
+ 
++$as_echo "#define _LARGEFILE64_SOURCE 1" >>confdefs.h
+ 
+ 
+-        { $as_echo "$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_n "(cached) " >&6
++$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
++
++			fi
++			;;
++		esac
++		;;
++#
++# IRIX uses SYSV printing.  Make sure to set that here
++#
++	*irix*)
++
++$as_echo "#define SYSV 1" >>confdefs.h
++
++		;;
++	*freebsd*|*dragonfly*)
++
++$as_echo "#define FREEBSD 1" >>confdefs.h
++
++		;;
++#
++# VOS may need to have POSIX support and System V compatibility enabled.
++#
++    *vos*)
++    case "$CPPFLAGS" in
++	  *-D_POSIX_C_SOURCE*)
++		;;
++	  *)
++		CPPFLAGS="$CPPFLAGS -D_POSIX_C_SOURCE=200112L"
++
++$as_echo "#define _POSIX_C_SOURCE 200112L" >>confdefs.h
++
++		;;
++    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
+ 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.
+-   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 <unistd.h>
++main () {
++#if _LFS64_LARGEFILE == 1
++exit(0);
++#else
++exit(1);
+ #endif
+-char httpConnectEncrypt ();
+-int
+-main ()
+-{
+-return httpConnectEncrypt ();
+-  ;
+-  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_httpConnectEncrypt=yes;
+-		  ac_cv_lib_ext_cups=yes
++_ACEOF
++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
 -
--			samba_cv_HAVE_CUPS=yes
+-	ac_cv_lib_ext_cups_httpConnectEncrypt=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
+-
++  SINIX_LFS_SUPPORT=no
+ 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
+-_ACEOF
+-
++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
++  conftest.$ac_objext conftest.beam conftest.$ac_ext
+ fi
+ 
+-LIBS=$ac_check_lib_ext_save_LIBS
+-
+-if test $ac_cv_lib_ext_cups = yes; then
+-  cat >>confdefs.h <<_ACEOF
+-#define HAVE_LIBCUPS 1
+-_ACEOF
+-
+-		case "$PRINT_LIBS" in
+-		    *-lcups*)
+-			;;
+-		    *)
+-			PRINT_LIBS="-lcups $PRINT_LIBS"
+-			;;
+-		esac
++        CPPFLAGS="$old_CPPFLAGS"
++        if test x$SINIX_LFS_SUPPORT = xyes ; then
++          CPPFLAGS="-D_LARGEFILE64_SOURCE $CPPFLAGS"
+ 
++$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
 -$as_echo "$as_me: WARNING: cups-config around but cups-devel not installed" >&2;}
@@ -38280,82 +37821,64 @@
 -			LDFLAGS=$ac_save_LDFLAGS
 -			PRINT_LIBS=$ac_save_PRINT_LIBS
 -		fi
--
++# Systems with LFS support.
++#
++    gnu* | k*bsd*-gnu | kopensolaris*-gnu)
++	CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS"
+ 
 -	elif test x"$enable_cups" = x"yes"; then
 -		{ { $as_echo "$as_me:$LINENO: error: Cups support required but cups-config not located.  Make sure cups-devel related files are installed." >&5
 -$as_echo "$as_me: error: Cups support required but cups-config not located.  Make sure cups-devel related files are installed." >&2;}
 -   { (exit 1); exit 1; }; }
 -        fi
-+if ac_fn_c_try_run "$LINENO"; then :
-+  samba_cv_HAVE_errwarn=yes
-+else
-+  samba_cv_HAVE_errwarn=no
- 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;
-+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-+  conftest.$ac_objext conftest.beam conftest.$ac_ext
- fi
+-fi
  
-+	CFLAGS="$old_CFLAGS";
-+	old_CFLAGS="";
-+	export CFLAGS;
-+	CPPFLAGS="$old_CPPFLAGS";
-+	old_CPPFLAGS="";
-+	export CPPFLAGS;
-+	LDFLAGS="$old_LDFLAGS";
-+	old_LDFLAGS="";
-+	export LDFLAGS;
++$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
--
+ 
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_IPRINT 1
 -_ACEOF
--
++$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
+ 
 -	elif test x"$enable_iprint" = x"yes"; then
 -		{ { $as_echo "$as_me:$LINENO: error: iPrint support required but cups not enabled.  Make sure cups-devel related files are installed and that cups is enabled." >&5
 -$as_echo "$as_me: error: iPrint support required but cups not enabled.  Make sure cups-devel related files are installed and that cups is enabled." >&2;}
 -   { (exit 1); exit 1; }; }
 -        fi
-+fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $samba_cv_HAVE_errwarn" >&5
-+$as_echo "$samba_cv_HAVE_errwarn" >&6; }
-+if test x"$samba_cv_HAVE_errwarn" = x"yes"; then
-+   Werror_FLAGS="-errwarn=%all"
-+fi
-+fi
- fi
+-fi
++	;;
  
- ############################################
+-############################################
 -# check if the compiler will optimize out function calls
 -{ $as_echo "$as_me:$LINENO: checking if the compiler will optimize out function calls" >&5
 -$as_echo_n "checking if the compiler will optimize out function calls... " >&6; }
 -if test "${samba_cv_optimize_out_funcation_calls+set}" = set; then
-+# check if the compiler can handle negative enum values
-+# and don't truncate the values to INT_MAX
-+# a runtime test is needed here
-+
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that the C compiler understands negative enum values" >&5
-+$as_echo_n "checking that the C compiler understands negative enum values... " >&6; }
-+if test "${samba_cv_CC_NEGATIVE_ENUM_VALUES+set}" = set; then :
-   $as_echo_n "(cached) " >&6
+-  $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
- 
+-
 -    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.  */
  
@@ -38363,31 +37886,49 @@
 -int
 -main ()
 -{
-+	#include <stdio.h>
-+	enum negative_values { NEGATIVE_VALUE = 0xFFFFFFFF };
-+	int main(void) {
-+		enum negative_values v1 = NEGATIVE_VALUE;
-+		unsigned v2 = NEGATIVE_VALUE;
++#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;
-+		if (v1 != 0xFFFFFFFF) {
-+			printf("%u != 0xFFFFFFFF\n", v1);
-+			return 1;
-+		}
-+		if (v2 != 0xFFFFFFFF) {
-+			printf("%u != 0xFFFFFFFF\n", v2);
-+			return 1;
- 		}
+-		}
++       /* Ensure this is glibc 2.2 or higher */
++#if defined(__GLIBC__) && defined(__GLIBC_MINOR__)
++       int libc_major = __GLIBC__;
++       int libc_minor = __GLIBC_MINOR__;
  
-+		return 0;
-+	}
++       if (libc_major < 2)
++              exit(1);
++       if (libc_minor < 2)
++              exit(1);
++#endif
  
 -  ;
 -  return 0;
--}
++       /* 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"
@@ -38412,13 +37953,13 @@
 -       }; then
 -  samba_cv_optimize_out_funcation_calls=yes
 +if ac_fn_c_try_run "$LINENO"; then :
-+  samba_cv_CC_NEGATIVE_ENUM_VALUES=yes
++  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
-+  samba_cv__CC_NEGATIVE_ENUM_VALUES=no
++  LINUX_LFS_SUPPORT=no
  fi
 -
 -rm -rf conftest.dSYM
@@ -38430,19 +37971,16 @@
 -{ $as_echo "$as_me:$LINENO: result: $samba_cv_optimize_out_funcation_calls" >&5
 -$as_echo "$samba_cv_optimize_out_funcation_calls" >&6; }
 -if test x"$samba_cv_optimize_out_funcation_calls" = x"yes"; then
--
+ 
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_COMPILER_WILL_OPTIMIZE_OUT_FNS 1
 -_ACEOF
++	CPPFLAGS="$old_CPPFLAGS"
++	if test x$LINUX_LFS_SUPPORT = xyes ; then
++		CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS"
  
- fi
-+{ $as_echo "$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
+-fi
++$as_echo "#define _LARGEFILE64_SOURCE 1" >>confdefs.h
  
 -#############################################
 -# check for fd passing struct via msg_control
@@ -38458,25 +37996,17 @@
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
++$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
  
 -#include <sys/types.h>
 -#include <stdlib.h>
 -#include <stddef.h>
 -#include <sys/socket.h>
 -#include <sys/un.h>
-+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 ()
- {
--
+-int
+-main ()
+-{
+ 
 -	struct msghdr msg;
 -	union {
 -	      struct cmsghdr cm;
@@ -38484,13 +38014,12 @@
 -	} control_un;
 -	msg.msg_control = control_un.control;
 -	msg.msg_controllen = sizeof(control_un.control);
-+ struct foo {int x;char y;};
-+       struct foo bar = { .y = 'X', .x = 1 };
++$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
  
-   ;
-   return 0;
- }
- _ACEOF
+-  ;
+-  return 0;
+-}
+-_ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -38510,69 +38039,84 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  samba_cv_msghdr_msg_control=yes
-+if ac_fn_c_try_compile "$LINENO"; then :
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-+$as_echo "yes" >&6; }; c99_init=yes
- else
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
++	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
-+  { $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
+-fi
++#
++# MacOS X is the *only* system that uses compose character in utf8. This
++# is so horribly broken....
++#
++    *darwin*)
+ 
+-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+-fi
 -{ $as_echo "$as_me:$LINENO: result: $samba_cv_msghdr_msg_control" >&5
 -$as_echo "$samba_cv_msghdr_msg_control" >&6; }
 -if test x"$samba_cv_msghdr_msg_control" = x"yes"; then
--
++$as_echo "#define BROKEN_UNICODE_COMPOSE_CHARACTERS 1" >>confdefs.h
+ 
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_MSGHDR_MSG_CONTROL 1
 -_ACEOF
--
+ 
 -fi
--
++# Add a system specific charset module.
++	default_shared_modules="$default_shared_modules charset_macosxfs"
+ 
 -#############################################
 -# check for fd passing struct via msg_acctrights
 -{ $as_echo "$as_me:$LINENO: checking for fd passing via msg_acctrights" >&5
 -$as_echo_n "checking for fd passing via msg_acctrights... " >&6; }
 -if test "${samba_cv_msghdr_msg_acctrights+set}" = set; then
 -  $as_echo_n "(cached) " >&6
--else
++	;;
++    *hurd*)
++        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LFS support" >&5
++$as_echo_n "checking for LFS support... " >&6; }
++        old_CPPFLAGS="$CPPFLAGS"
++        CPPFLAGS="-D_LARGEFILE64_SOURCE -D_GNU_SOURCE $CPPFLAGS"
++        if test "$cross_compiling" = yes; then :
++  GLIBC_LFS_SUPPORT=cross
+ else
 -
 -    cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_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.  */
--
+ 
 -#include <sys/types.h>
 -#include <stdlib.h>
 -#include <stddef.h>
 -#include <sys/socket.h>
 -#include <sys/un.h>
-+#include <stdio.h>
- int
- main ()
- {
+-int
+-main ()
+-{
 -
 -	struct msghdr msg;
 -	int fd;
 -	msg.msg_acctrights = (caddr_t) &fd;
 -	msg.msg_acctrightslen = sizeof(fd);
-+ struct foo {int x;char y;};
-+       struct foo bar = { .y = 'X', .x = 1 };
- 
-   ;
-   return 0;
+-
+-  ;
+-  return 0;
++#include <unistd.h>
++main () {
++#if _LFS64_LARGEFILE == 1
++exit(0);
++#else
++exit(1);
++#endif
  }
  _ACEOF
 -rm -f conftest.$ac_objext
@@ -38594,19 +38138,19 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  samba_cv_msghdr_msg_acctrights=yes
-+if ac_fn_c_try_compile "$LINENO"; then :
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-+$as_echo "yes" >&6; }; c99_init=yes
++if ac_fn_c_try_run "$LINENO"; then :
++  GLIBC_LFS_SUPPORT=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	samba_cv_msghdr_msg_acctrights=no
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-+$as_echo "no" >&6; }
++  GLIBC_LFS_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
++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; }
@@ -38615,10 +38159,14 @@
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_MSGHDR_MSG_ACCTRIGHTS 1
 -_ACEOF
--
+ 
 -fi
--
--
++        CPPFLAGS="$old_CPPFLAGS"
++        if test x$GLIBC_LFS_SUPPORT = xyes ; then
++          CPPFLAGS="-D_LARGEFILE64_SOURCE -D_GNU_SOURCE $CPPFLAGS"
+ 
++$as_echo "#define _LARGEFILE64_SOURCE 1" >>confdefs.h
+ 
 -for ac_func in dirfd
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
@@ -38632,29 +38180,32 @@
 -_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=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.  */
 -/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
 -   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
 -#define $ac_func innocuous_$ac_func
--
+ 
 -/* System header to define __stub macros and hopefully few prototypes,
 -    which can conflict with char $ac_func (); below.
 -    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
 -    <limits.h> exists even on freestanding compilers.  */
--
++$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
+ 
 -#ifdef __STDC__
 -# include <limits.h>
 -#else
 -# include <assert.h>
 -#endif
--
++        fi
++      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GLIBC_LFS_SUPPORT" >&5
++$as_echo "$GLIBC_LFS_SUPPORT" >&6; }
++    ;;
++    *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
 -   builtin and then its argument prototype would still apply.  */
@@ -38668,25 +38219,22 @@
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
 -#endif
--
-+#include <stdio.h>
- int
- main ()
- {
++        ;;
+ 
+-int
+-main ()
+-{
 -return $ac_func ();
-+ struct foo {int x;char y;};
-+       struct foo bar = { .y = 'X', .x = 1 };
-+
-   ;
-   return 0;
- }
- _ACEOF
+-  ;
+-  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
+ esac
 -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 -$as_echo "$ac_try_echo") >&5
 -  (eval "$ac_link") 2>conftest.er1
@@ -38703,16 +38251,13 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  eval "$as_ac_var=yes"
-+if ac_fn_c_try_compile "$LINENO"; then :
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-+$as_echo "yes" >&6; }; c99_init=yes
- else
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	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
@@ -38728,52 +38273,43 @@
 -#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; }
- fi
+-fi
 -done
 -
 -if test x"$ac_cv_func_dirfd" = x"yes"; then
 -	default_shared_modules="$default_shared_modules vfs_syncops vfs_dirsort"
-+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
--
+-fi
++SAVE_CPPFLAGS="${CPPFLAGS}"
++CPPFLAGS="${CPPFLAGS} ${SAMBA_CONFIGURE_CPPFLAGS}"
+ 
 -{ $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
 -else
--
+ 
 -    cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+if test x"$c99_init" = x"no"; then
-+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C99 designated initializers with -qlanglvl=stdc99" >&5
-+$as_echo_n "checking for C99 designated initializers with -qlanglvl=stdc99... " >&6; }
-+    CFLAGS="$saved_CFLAGS -qlanglvl=stdc99";
-+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
--
+-/* end confdefs.h.  */
++echo "LIBREPLACE_BROKEN_CHECKS: START"
+ 
 -#include <sys/types.h>
 -#if STDC_HEADERS
 -#include <stdlib.h>
 -#include <stddef.h>
 -#endif
 -#include <signal.h>
-+#include <stdio.h>
- int
- main ()
- {
+-int
+-main ()
+-{
 -struct sigevent s;
-+ 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
@@ -38793,28 +38329,34 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  samba_cv_struct_sigevent=yes
-+if ac_fn_c_try_compile "$LINENO"; then :
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-+$as_echo "yes" >&6; }; c99_init=yes
- else
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
++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"
+ 
 -	samba_cv_struct_sigevent=no
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-+$as_echo "no" >&6; }
++		break;
++	fi
++done
++if test x"$libreplacedir" = "x"; then
++	as_fn_error "cannot find libreplace in $libreplacepaths" "$LINENO" 5
  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_sigevent" >&5
 -$as_echo "$samba_cv_struct_sigevent" >&6; }
 -if test x"$samba_cv_struct_sigevent" = x"yes"; then
--
++LIBREPLACEOBJ="$libreplacedir/replace.o"
+ 
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_STRUCT_SIGEVENT 1
 -_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
@@ -38825,28 +38367,20 @@
 -_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 -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.  */
 -#include <signal.h>
--
-+#include <stdio.h>
- int
- main ()
- {
++LIBREPLACEOBJ="${LIBREPLACEOBJ} $libreplacedir/snprintf.o"
+ 
+-int
+-main ()
+-{
 -static struct sigevent ac_aggr;
 -if (ac_aggr.sigev_value.sival_ptr)
 -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
@@ -38866,44 +38400,35 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_cv_member_struct_sigevent_sigev_value_sival_ptr=yes
-+if ac_fn_c_try_compile "$LINENO"; then :
-+  { $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 return type of signal handlers" >&5
++$as_echo_n "checking return type of signal handlers... " >&6; }
++if test "${ac_cv_type_signal+set}" = set; then :
++  $as_echo_n "(cached) " >&6
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-+$as_echo "no" >&6; }
-+fi
-+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-+fi
- 
+-
 -	cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
--#include <signal.h>
-+if test "`uname`" = "HP-UX"; then
-+  if test "$ac_cv_c_compiler_gnu" = no; then
-+	# special override for broken HP-UX compiler - I can't find a way to test
-+	# this properly (its a compiler bug)
-+	CFLAGS="$CFLAGS -AC99";
-+	c99_init=yes;
-+  fi
-+fi
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
++#include <sys/types.h>
+ #include <signal.h>
  
--int
--main ()
--{
+ int
+ main ()
+ {
 -static struct sigevent ac_aggr;
 -if (sizeof ac_aggr.sigev_value.sival_ptr)
 -return 0;
--  ;
--  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
@@ -38923,243 +38448,50 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_cv_member_struct_sigevent_sigev_value_sival_ptr=yes
--else
++if ac_fn_c_try_compile "$LINENO"; then :
++  ac_cv_type_signal=int
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+if test x"$c99_init" = x"yes"; then
-+    saved_CFLAGS=""
- 
+-
 -	ac_cv_member_struct_sigevent_sigev_value_sival_ptr=no
-+else
-+    CFLAGS="$saved_CFLAGS"
-+    saved_CFLAGS=""
-+    as_fn_error "c99 structure initializer are not supported" "$LINENO" 5
- fi
- 
+-fi
+-
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-+
-+UNAME_S=`(uname -s) 2>/dev/null` || UNAME_S="unknown"
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking uname -s" >&5
-+$as_echo_n "checking uname -s... " >&6; }
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNAME_S}" >&5
-+$as_echo "${UNAME_S}" >&6; }
-+
-+UNAME_R=`(uname -r) 2>/dev/null` || UNAME_R="unknown"
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking uname -r" >&5
-+$as_echo_n "checking uname -r... " >&6; }
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNAME_R}" >&5
-+$as_echo "${UNAME_R}" >&6; }
-+
-+UNAME_M=`(uname -m) 2>/dev/null` || UNAME_M="unknown"
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking uname -m" >&5
-+$as_echo_n "checking uname -m... " >&6; }
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNAME_M}" >&5
-+$as_echo "${UNAME_M}" >&6; }
-+
-+UNAME_P=`(uname -p) 2>/dev/null` || UNAME_P="unknown"
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking uname -p" >&5
-+$as_echo_n "checking uname -p... " >&6; }
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNAME_P}" >&5
-+$as_echo "${UNAME_P}" >&6; }
-+
-+UNAME_I=`(uname -i) 2>/dev/null` || UNAME_I="unknown"
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking uname -i" >&5
-+$as_echo_n "checking uname -i... " >&6; }
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNAME_I}" >&5
-+$as_echo "${UNAME_I}" >&6; }
-+
-+  case "$host_os" in
-+	*irix6*)
-+		#TODO add to libreplace
-+		if test x"$ac_cv_c_compiler_gnu" != x"yes" ; then
-+																								CFLAGS="$CFLAGS -diag_error 1035"
-+												CFLAGS="$CFLAGS -woff 1209,1174,3201"
-+		fi
-+	;;
-+esac
-+
-+DYNEXP=
-+
-+
-+default_static_modules="pdb_smbpasswd pdb_tdbsam pdb_wbc_sam rpc_lsarpc rpc_samr rpc_winreg rpc_initshutdown rpc_dssetup rpc_wkssvc rpc_svcctl rpc_ntsvcs rpc_netlogon rpc_netdfs rpc_srvsvc rpc_spoolss rpc_eventlog auth_sam auth_unix auth_winbind auth_wbc auth_server auth_domain auth_builtin auth_netlogond vfs_default nss_info_template"
-+
-+default_shared_modules="vfs_recycle vfs_audit vfs_extd_audit vfs_full_audit vfs_netatalk vfs_fake_perms vfs_default_quota vfs_readonly vfs_cap vfs_expand_msdfs vfs_shadow_copy vfs_shadow_copy2 charset_CP850 charset_CP437 auth_script vfs_readahead vfs_xattr_tdb vfs_streams_xattr vfs_streams_depot vfs_acl_xattr vfs_acl_tdb vfs_smb_traffic_analyzer vfs_preopen"
-+
-+if test "x$developer" = xyes; then
-+   default_static_modules="$default_static_modules rpc_rpcecho"
-+   default_shared_modules="$default_shared_modules charset_weird perfcount_test"
++  ac_cv_type_signal=void
  fi
- 
--rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
--fi
+-
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_sigevent_sigev_value_sival_ptr" >&5
 -$as_echo "$ac_cv_member_struct_sigevent_sigev_value_sival_ptr" >&6; }
 -if test "x$ac_cv_member_struct_sigevent_sigev_value_sival_ptr" = x""yes; then
-+#
-+# Config CPPFLAG settings for strange OS's that must be set
-+# before other tests. Do NOT invoke AC_CHECK_HEADERS within this
-+# case statement; its first reference must be unconditional.
-+#
-+case "$host_os" in
-+    *hpux*)
-+#
-+# Defines needed for HPUX support.
-+# HPUX has bigcrypt but (sometimes?) doesn't use it for
-+# password hashing - hence the USE_BOTH_CRYPT_CALLS define.
-+#
-+      case `uname -r` in
-+		*9*|*10*|*11)
-+
-+$as_echo "#define USE_BOTH_CRYPT_CALLS 1" >>confdefs.h
-+
-+		;;
-+      esac
-+      ;;
-+
-+#
-+# CRAY Unicos has broken const handling
-+       *unicos*)
-+	  { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabling const" >&5
-+$as_echo "disabling const" >&6; }
-+	  CPPFLAGS="$CPPFLAGS -Dconst="
-+	  ;;
-+
-+#
-+# AIX4.x doesn't even admit to having large
-+# files *at all* unless the -D_LARGE_FILE or -D_LARGE_FILE_API flags are set.
-+#
-+    *aix4*)
-+	  { $as_echo "$as_me:${as_lineno-$LINENO}: result: enabling large file support" >&5
-+$as_echo "enabling large file support" >&6; }
-+      CPPFLAGS="$CPPFLAGS -D_LARGE_FILES"
-+
-+$as_echo "#define _LARGE_FILES 1" >>confdefs.h
-+
-+      ;;
-+#
-+# Defines needed for Solaris 2.6/2.7 aka 7.0 to make it admit
-+# to the existance of large files..
-+# Note that -D_LARGEFILE64_SOURCE is different from the Sun
-+# recommendations on large file support, however it makes the
-+# compile work using gcc 2.7 and 2.8, whereas using the Sun
-+# recommendation makes the compile fail on gcc2.7. JRA.
-+#
-+# Solaris uses SYSV printing.  Make sure to set that here.  --jerry
-+#
-+	*solaris*)
-+
-+$as_echo "#define SYSV 1" >>confdefs.h
-+
-+		case `uname -r` in
-+			5.0|5.0.*|5.1|5.1.*|5.2|5.2.*|5.3|5.3.*|5.5|5.5.*)
-+	  			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no large file support" >&5
-+$as_echo "no large file support" >&6; }
-+				;;
-+			5.*)
-+			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: enabling large file support" >&5
-+$as_echo "enabling large file support" >&6; }
-+			if test "$ac_cv_c_compiler_gnu" = yes; then
-+				${CC-cc} -v >conftest.c 2>&1
-+				ac_cv_gcc_compiler_version_number=`grep 'gcc version' conftest.c`
-+				rm -fr conftest.c
-+				case "$ac_cv_gcc_compiler_version_number" in
-+					*"gcc version 2.6"*|*"gcc version 2.7"*)
-+						CPPFLAGS="$CPPFLAGS -D_LARGEFILE64_SOURCE -D_REENTRANT"
-+						LDFLAGS="$LDFLAGS -lthread"
-+
-+$as_echo "#define _LARGEFILE64_SOURCE 1" >>confdefs.h
-+
-+						;;
-+					*)
-+						CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_REENTRANT -D_FILE_OFFSET_BITS=64"
-+						LDFLAGS="$LDFLAGS -lthread"
-+
-+$as_echo "#define _LARGEFILE64_SOURCE 1" >>confdefs.h
-+
-+
-+$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
-+
-+						;;
-+				esac
-+			else
-+				CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_REENTRANT -D_FILE_OFFSET_BITS=64"
-+				LDFLAGS="$LDFLAGS -lthread"
-+
-+$as_echo "#define _LARGEFILE64_SOURCE 1" >>confdefs.h
-+
-+
-+$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
-+
-+			fi
-+			;;
-+		esac
-+		;;
-+#
-+# IRIX uses SYSV printing.  Make sure to set that here
-+#
-+	*irix*)
-+
-+$as_echo "#define SYSV 1" >>confdefs.h
-+
-+		;;
-+	*freebsd*|*dragonfly*)
-+
-+$as_echo "#define FREEBSD 1" >>confdefs.h
-+
-+		;;
-+#
-+# VOS may need to have POSIX support and System V compatibility enabled.
-+#
-+    *vos*)
-+    case "$CPPFLAGS" in
-+	  *-D_POSIX_C_SOURCE*)
-+		;;
-+	  *)
-+		CPPFLAGS="$CPPFLAGS -D_POSIX_C_SOURCE=200112L"
-+
-+$as_echo "#define _POSIX_C_SOURCE 200112L" >>confdefs.h
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
++$as_echo "$ac_cv_type_signal" >&6; }
  
--cat >>confdefs.h <<_ACEOF
+ cat >>confdefs.h <<_ACEOF
 -#define HAVE_STRUCT_SIGEVENT_SIGEV_VALUE_SIVAL_PTR 1
--_ACEOF
-+		;;
-+    esac
-+    case "$CPPFLAGS" in
-+	  *-D_SYSV*|*-D_SVID_SOURCE*)
-+		;;
-+	  *)
-+		CPPFLAGS="$CPPFLAGS -D_SYSV"
++#define RETSIGTYPE $ac_cv_type_signal
+ _ACEOF
  
-+$as_echo "#define _SYSV 1" >>confdefs.h
  
 -fi
 -{ $as_echo "$as_me:$LINENO: checking for struct sigevent.sigev_value.sigval_ptr" >&5
 -$as_echo_n "checking for struct sigevent.sigev_value.sigval_ptr... " >&6; }
 -if test "${ac_cv_member_struct_sigevent_sigev_value_sigval_ptr+set}" = set; then
--  $as_echo_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
++{ $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 >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 <signal.h>
- 
+-
 -int
 -main ()
 -{
@@ -39168,15 +38500,8 @@
 -return 0;
 -  ;
 -  return 0;
-+#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
@@ -39196,27 +38521,19 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_cv_member_struct_sigevent_sigev_value_sigval_ptr=yes
-+if ac_fn_c_try_run "$LINENO"; then :
-+  SINIX_LFS_SUPPORT=yes
- else
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+  SINIX_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
- 
+-
 -	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 <signal.h>
-+        CPPFLAGS="$old_CPPFLAGS"
-+        if test x$SINIX_LFS_SUPPORT = xyes ; then
-+          CPPFLAGS="-D_LARGEFILE64_SOURCE $CPPFLAGS"
++#include <sys/types.h>
  
 -int
 -main ()
@@ -39227,7 +38544,7 @@
 -  ;
 -  return 0;
 -}
--_ACEOF
+ _ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -39247,78 +38564,59 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_cv_member_struct_sigevent_sigev_value_sigval_ptr=yes
--else
++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
-+$as_echo "#define _LARGEFILE64_SOURCE 1" >>confdefs.h
- 
+-
 -	ac_cv_member_struct_sigevent_sigev_value_sigval_ptr=no
--fi
-+          CFLAGS="`getconf LFS64_CFLAGS` $CFLAGS"
-+          LDFLAGS="`getconf LFS64_LDFLAGS` $LDFLAGS"
-+          LIBS="`getconf LFS64_LIBS` $LIBS"
-+        fi
-+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SINIX_LFS_SUPPORT" >&5
-+$as_echo "$SINIX_LFS_SUPPORT" >&6; }
-+      fi
-+    ;;
++  ac_cv_type_uid_t=no
+ fi
++rm -f conftest*
  
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
--fi
-+# Systems with LFS support.
-+#
-+    gnu* | k*bsd*-gnu | kopensolaris*-gnu)
-+	CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS"
+ 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
  
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_sigevent_sigev_value_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
-+$as_echo "#define _LARGEFILE64_SOURCE 1" >>confdefs.h
++$as_echo "#define uid_t int" >>confdefs.h
  
 -cat >>confdefs.h <<_ACEOF
 -#define HAVE_STRUCT_SIGEVENT_SIGEV_VALUE_SIGVAL_PTR 1
 -_ACEOF
  
-+$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
++$as_echo "#define gid_t int" >>confdefs.h
  
--fi
+ fi
  
 -fi
-+$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
++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 :
  
 -{ $as_echo "$as_me:$LINENO: checking for struct timespec type" >&5
 -$as_echo_n "checking for struct timespec type... " >&6; }
 -if test "${samba_cv_struct_timespec+set}" = set; then
 -  $as_echo_n "(cached) " >&6
--else
-+	;;
+ else
  
 -    cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+# Tests for linux LFS support. Need kernel 2.4 and glibc2.2 or greater support.
-+#
-+    *linux*)
-+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LFS support" >&5
-+$as_echo_n "checking for LFS support... " >&6; }
-+        old_CPPFLAGS="$CPPFLAGS"
-+        CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS"
-+       if test "$cross_compiling" = yes; then :
-+  LINUX_LFS_SUPPORT=cross
-+else
-+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
- 
+-/* end confdefs.h.  */
+-
 -#include <sys/types.h>
 -#if STDC_HEADERS
-+#include <unistd.h>
-+#include <sys/utsname.h>
-+#include <string.h>
- #include <stdlib.h>
+-#include <stdlib.h>
 -#include <stddef.h>
 -#endif
 -#if TIME_WITH_SYS_TIME
@@ -39362,40 +38660,30 @@
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+main() {
-+#if _LFS64_LARGEFILE == 1
-+       struct utsname uts;
-+       char *release;
-+       int major, minor;
++cat >>confdefs.h <<_ACEOF
++#define mode_t int
++_ACEOF
  
 -	samba_cv_struct_timespec=no
--fi
-+       /* Ensure this is glibc 2.2 or higher */
-+#if defined(__GLIBC__) && defined(__GLIBC_MINOR__)
-+       int libc_major = __GLIBC__;
-+       int libc_minor = __GLIBC_MINOR__;
+ 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
-+       if (libc_major < 2)
-+              exit(1);
-+       if (libc_minor < 2)
-+              exit(1);
-+#endif
++ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
++if test "x$ac_cv_type_off_t" = x""yes; then :
++
++else
  
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_STRUCT_TIMESPEC 1
--_ACEOF
-+       /* Ensure this is kernel 2.4 or higher */
++cat >>confdefs.h <<_ACEOF
++#define off_t long int
+ _ACEOF
  
--fi
-+       uname(&uts);
-+       release = strdup(uts.release);
-+       major = atoi(strsep(&release, "."));
-+       minor = atoi(strsep(&release, "."));
+ fi
  
 -# and glibc has setresuid under linux but the function does
 -# nothing until kernel 2.1.44! very dumb.
@@ -39404,17 +38692,12 @@
 -if test "${samba_cv_have_setresuid+set}" = set; then
 -  $as_echo_n "(cached) " >&6
 -else
-+       if (major > 2 || (major == 2 && minor > 3))
-+               exit(0);
-+       exit(1);
-+#else
-+       exit(1);
-+#endif
-+}
++ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
++if test "x$ac_cv_type_size_t" = x""yes; then :
  
 -    if test "$cross_compiling" = yes; then
 -  samba_cv_have_setresuid=cross
--else
+ else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
@@ -39423,6 +38706,9 @@
 -/* end confdefs.h.  */
 -#include <errno.h>
 -main() { setresuid(1,1,1); setresuid(2,2,2); exit(errno==EPERM?0:1);}
++
++cat >>confdefs.h <<_ACEOF
++#define size_t unsigned int
  _ACEOF
 -rm -f conftest$ac_exeext
 -if { (ac_try="$ac_link"
@@ -39447,39 +38733,45 @@
 -  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
 -  (exit $ac_status); }; }; then
 -  samba_cv_have_setresuid=yes
-+if ac_fn_c_try_run "$LINENO"; then :
-+  LINUX_LFS_SUPPORT=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_setresuid=no
-+  LINUX_LFS_SUPPORT=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
  
-+	CPPFLAGS="$old_CPPFLAGS"
-+	if test x$LINUX_LFS_SUPPORT = xyes ; then
-+		CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS"
++ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
++if test "x$ac_cv_type_pid_t" = x""yes; then :
++
++else
++
++cat >>confdefs.h <<_ACEOF
++#define pid_t int
++_ACEOF
  
--fi
+ fi
 -{ $as_echo "$as_me:$LINENO: result: $samba_cv_have_setresuid" >&5
 -$as_echo "$samba_cv_have_setresuid" >&6; }
 -if test x"$samba_cv_have_setresuid" = x"yes"; then
-+$as_echo "#define _LARGEFILE64_SOURCE 1" >>confdefs.h
  
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_SETRESUID 1
--_ACEOF
++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
  
--fi
-+$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
++
++$as_echo "#define HAVE_ST_RDEV 1" >>confdefs.h
++
+ fi
  
 -# Do the same check for setresguid...
 -#
@@ -39491,7 +38783,10 @@
  
 -    if test "$cross_compiling" = yes; then
 -  samba_cv_have_setresgid=cross
--else
++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 >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
@@ -39501,7 +38796,10 @@
 -#include <unistd.h>
 -#include <errno.h>
 -main() { errno = 0; setresgid(1,1,1); exit(errno != 0 ? (errno==EPERM ? 0 : 1) : 0);}
--_ACEOF
++
++cat >>confdefs.h <<_ACEOF
++#define ino_t unsigned
+ _ACEOF
 -rm -f conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -39529,54 +38827,52 @@
 -  $as_echo "$as_me: program exited with status $ac_status" >&5
 -$as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
  
 -( exit $ac_status )
 -samba_cv_have_setresgid=no
 -fi
 -rm -rf conftest.dSYM
 -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
--fi
-+	fi
-+	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINUX_LFS_SUPPORT" >&5
-+$as_echo "$LINUX_LFS_SUPPORT" >&6; }
-+	;;
+ fi
  
-+#
-+# MacOS X is the *only* system that uses compose character in utf8. This
-+# is so horribly broken....
-+#
-+    *darwin*)
++ac_fn_c_check_type "$LINENO" "loff_t" "ac_cv_type_loff_t" "$ac_includes_default"
++if test "x$ac_cv_type_loff_t" = x""yes; then :
++
++else
++
++cat >>confdefs.h <<_ACEOF
++#define loff_t off_t
++_ACEOF
  
--fi
+ 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
-+$as_echo "#define BROKEN_UNICODE_COMPOSE_CHARACTERS 1" >>confdefs.h
  
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_SETRESGID 1
--_ACEOF
++ac_fn_c_check_type "$LINENO" "offset_t" "ac_cv_type_offset_t" "$ac_includes_default"
++if test "x$ac_cv_type_offset_t" = x""yes; then :
++
++else
++
++cat >>confdefs.h <<_ACEOF
++#define offset_t loff_t
+ _ACEOF
  
--fi
-+# Add a system specific charset module.
-+	default_shared_modules="$default_shared_modules charset_macosxfs"
+ 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_n "(cached) " >&6
--else
++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
-+	;;
-+    *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
++  if test "$cross_compiling" = yes; then :
+   ac_cv_func_memcmp_working=no
  else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
@@ -39585,44 +38881,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 <unistd.h>
-+main () {
-+#if _LFS64_LARGEFILE == 1
-+exit(0);
-+#else
-+exit(1);
-+#endif
+ $ac_includes_default
+ int
+@@ -37950,44 +8436,17 @@
+   return 0;
  }
  _ACEOF
 -rm -f conftest$ac_exeext
@@ -39647,9 +38909,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 :
-+  GLIBC_LFS_SUPPORT=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
@@ -39657,7 +38918,7 @@
 -
 -( exit $ac_status )
 -ac_cv_func_memcmp_working=no
-+  GLIBC_LFS_SUPPORT=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
@@ -39665,65 +38926,35 @@
 +  conftest.$ac_objext conftest.beam conftest.$ac_ext
  fi
  
-+        CPPFLAGS="$old_CPPFLAGS"
-+        if test x$GLIBC_LFS_SUPPORT = xyes ; then
-+          CPPFLAGS="-D_LARGEFILE64_SOURCE -D_GNU_SOURCE $CPPFLAGS"
-+
-+$as_echo "#define _LARGEFILE64_SOURCE 1" >>confdefs.h
-+
-+
-+$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
-+
-+        fi
-+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GLIBC_LFS_SUPPORT" >&5
-+$as_echo "$GLIBC_LFS_SUPPORT" >&6; }
-+    ;;
- 
--fi
+-
+ 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 "* ) ;;
+@@ -37997,166 +8456,26 @@
  
-+SAVE_CPPFLAGS="${CPPFLAGS}"
-+CPPFLAGS="${CPPFLAGS} ${SAMBA_CONFIGURE_CPPFLAGS}"
  
  
 -###############################################
 -# Readline included by default unless explicitly asked not to
 -test "${with_readline+set}" != "set" && with_readline=yes
-+echo "LIBREPLACE_BROKEN_CHECKS: START"
- 
+-
 -# test for where we get readline() from
 -{ $as_echo "$as_me:$LINENO: checking whether to use readline" >&5
 -$as_echo_n "checking whether to use readline... " >&6; }
-+libreplacedir=""
-+libreplacepaths="$srcdir $srcdir/lib/replace $srcdir/libreplace $srcdir/../libreplace $srcdir/../replace $srcdir/../lib/replace $srcdir/../../../lib/replace"
-+for d in $libreplacepaths; do
-+	if test -f "$d/replace.c"; then
-+		libreplacedir="$d"
- 
+-
 -# Check whether --with-readline was given.
 -if test "${with_readline+set}" = set; then
 -  withval=$with_readline;   case "$with_readline" in
 -  yes)
 -    { $as_echo "$as_me:$LINENO: result: yes" >&5
 -$as_echo "yes" >&6; }
-+		break;
-+	fi
-+done
-+if test x"$libreplacedir" = "x"; then
-+	as_fn_error "cannot find libreplace in $libreplacepaths" "$LINENO" 5
-+fi
- 
-+LIBREPLACEOBJ="replace.o"
- 
- 
-+LIBREPLACEOBJ="${LIBREPLACEOBJ} snprintf.o"
- 
+-
+-
+-
+-
 -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`
@@ -39731,16 +38962,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 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
 -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; }
@@ -39749,21 +38977,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 <sys/types.h>
-+#include <signal.h>
-+
-+int
-+main ()
-+{
-+return *(signal (0, 0)) (0) == 1;
-+  ;
-+  return 0;
-+}
- _ACEOF
+-_ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -39783,23 +39000,17 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_header_compiler=yes
-+if ac_fn_c_try_compile "$LINENO"; then :
-+  ac_cv_type_signal=int
- else
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	ac_header_compiler=no
-+  ac_cv_type_signal=void
- fi
+-fi
 -
- rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 -$as_echo "$ac_header_compiler" >&6; }
-+fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
-+$as_echo "$ac_cv_type_signal" >&6; }
- 
+-
 -# Is the header present?
 -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
 -$as_echo_n "checking $ac_header presence... " >&6; }
@@ -39810,8 +39021,14 @@
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
 -#include <$ac_header>
-+cat >>confdefs.h <<_ACEOF
-+#define RETSIGTYPE $ac_cv_type_signal
++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
 -if { (ac_try="$ac_cpp conftest.$ac_ext"
 -case "(($ac_try" in
@@ -39834,14 +39051,15 @@
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
+ 
 -  ac_header_preproc=no
--fi
+ fi
++done
  
 -rm -f conftest.err conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
 -$as_echo "$ac_header_preproc" >&6; }
- 
+-
 -# So?  What about this header?
 -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
 -  yes:no: )
@@ -39875,45 +39093,33 @@
 -{ $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 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_n "(cached) " >&6
+-else
 -  eval "$as_ac_Header=\$ac_header_preproc"
 -fi
 -ac_res=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
 -$as_echo "$ac_res" >&6; }
-+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h.  */
-+#include <sys/types.h>
  
 -fi
 -as_val=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
--  cat >>confdefs.h <<_ACEOF
--#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 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
-+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*
+@@ -38165,149 +8484,12 @@
  
- fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
-+$as_echo "$ac_cv_type_uid_t" >&6; }
-+if test $ac_cv_type_uid_t = no; then
+ done
  
--done
-+$as_echo "#define uid_t int" >>confdefs.h
- 
- 
+-
 -for ac_header in readline/history.h
 -do
 -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
@@ -39962,17 +39168,14 @@
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+$as_echo "#define gid_t int" >>confdefs.h
- 
+-
 -	ac_header_compiler=no
- 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; }
-+ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
-+if test "x$ac_cv_type_mode_t" = x""yes; then :
- 
+-
 -# Is the header present?
 -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
 -$as_echo_n "checking $ac_header presence... " >&6; }
@@ -40002,23 +39205,17 @@
 -	 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
- 
+-
 -  ac_header_preproc=no
-+cat >>confdefs.h <<_ACEOF
-+#define mode_t int
-+_ACEOF
-+
- 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; }
-+ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
-+if test "x$ac_cv_type_off_t" = x""yes; then :
- 
+-
 -# So?  What about this header?
 -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
 -  yes:no: )
@@ -40053,57 +39250,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"
-+
-+cat >>confdefs.h <<_ACEOF
-+#define off_t long int
-+_ACEOF
-+
- fi
+-fi
 -ac_res=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
 -$as_echo "$ac_res" >&6; }
-+
-+ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
-+if test "x$ac_cv_type_size_t" = x""yes; then :
-+
-+else
-+
-+cat >>confdefs.h <<_ACEOF
-+#define size_t unsigned int
-+_ACEOF
- 
- fi
+-
+-fi
 -as_val=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
--  cat >>confdefs.h <<_ACEOF
--#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-+
-+ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
-+if test "x$ac_cv_type_pid_t" = x""yes; then :
-+
-+else
-+
-+cat >>confdefs.h <<_ACEOF
-+#define pid_t int
++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
+@@ -38317,474 +8499,97 @@
+ done
  
- fi
  
--done
-+ac_fn_c_check_member "$LINENO" "struct stat" "st_rdev" "ac_cv_member_struct_stat_st_rdev" "$ac_includes_default"
-+if test "x$ac_cv_member_struct_stat_st_rdev" = x""yes; then :
++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"
  
-+cat >>confdefs.h <<_ACEOF
-+#define HAVE_STRUCT_STAT_ST_RDEV 1
-+_ACEOF
- 
- 
-+$as_echo "#define HAVE_ST_RDEV 1" >>confdefs.h
- 
+-
 -for ac_header in readline.h readline/readline.h
 -do
 -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
@@ -40112,16 +39288,11 @@
 -$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_type "$LINENO" "ino_t" "ac_cv_type_ino_t" "$ac_includes_default"
-+if test "x$ac_cv_type_ino_t" = x""yes; then :
-+
  else
 -  # Is the header compilable?
 -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
@@ -40134,10 +39305,7 @@
 -/* end confdefs.h.  */
 -$ac_includes_default
 -#include <$ac_header>
-+
-+cat >>confdefs.h <<_ACEOF
-+#define ino_t unsigned
- _ACEOF
+-_ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -40160,15 +39328,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; }
-+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 :
++   ac_config_commands="$ac_config_commands mk-stdint.h"
  
 -# Is the header present?
 -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
@@ -40199,23 +39366,17 @@
 -	 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
  
 -  ac_header_preproc=no
-+cat >>confdefs.h <<_ACEOF
-+#define loff_t off_t
-+_ACEOF
-+
  fi
  
 -rm -f conftest.err conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
 -$as_echo "$ac_header_preproc" >&6; }
-+ac_fn_c_check_type "$LINENO" "offset_t" "ac_cv_type_offset_t" "$ac_includes_default"
-+if test "x$ac_cv_type_offset_t" = x""yes; then :
- 
+-
 -# So?  What about this header?
 -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
 -  yes:no: )
@@ -40250,7 +39411,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
- else
+-else
 -  eval "$as_ac_Header=\$ac_header_preproc"
 -fi
 -ac_res=`eval 'as_val=${'$as_ac_Header'}
@@ -40264,23 +39425,15 @@
 -   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 offset_t loff_t
- _ACEOF
+-_ACEOF
  
 -      for termlib in ncurses curses termcap terminfo termlib tinfo; do
 -       as_ac_Lib=`$as_echo "ac_cv_lib_${termlib}''_tgetent" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for tgetent in -l${termlib}" >&5
 -$as_echo_n "checking for tgetent in -l${termlib}... " >&6; }
 -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then
-+fi
-+
-+
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working memcmp" >&5
-+$as_echo_n "checking for working memcmp... " >&6; }
-+if test "${ac_cv_func_memcmp_working+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
+-  $as_echo_n "(cached) " >&6
+-else
 -  ac_check_lib_save_LIBS=$LIBS
 -LIBS="-l${termlib}  $LIBS"
 -cat >conftest.$ac_ext <<_ACEOF
@@ -40288,12 +39441,11 @@
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+  if test "$cross_compiling" = yes; then :
-+  ac_cv_func_memcmp_working=no
-+else
-+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
--
+-/* end confdefs.h.  */
++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"
+ 
 -/* 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.  */
@@ -40301,40 +39453,14 @@
 -extern "C"
 -#endif
 -char tgetent ();
-+$ac_includes_default
- int
- main ()
- {
+-int
+-main ()
+-{
 -return tgetent ();
-+
-+  /* Some versions of memcmp are not 8-bit clean.  */
-+  char c0 = '\100', c1 = '\200', c2 = '\201';
-+  if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0)
-+    return 1;
-+
-+  /* The Next x86 OpenStep bug shows up only when comparing 16 bytes
-+     or more and with at least one buffer not starting on a 4-byte boundary.
-+     William Lewis provided this test program.   */
-+  {
-+    char foo[21];
-+    char bar[21];
-+    int i;
-+    for (i = 0; i < 4; i++)
-+      {
-+	char *a = foo + i;
-+	char *b = bar + i;
-+	strcpy (a, "--------01111111");
-+	strcpy (b, "--------10000000");
-+	if (memcmp (a, b, 16) >= 0)
-+	  return 1;
-+      }
-+    return 0;
-+  }
-+
-   ;
-   return 0;
- }
- _ACEOF
+-  ;
+-  return 0;
+-}
+-_ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -40357,23 +39483,19 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  eval "$as_ac_Lib=yes"
-+if ac_fn_c_try_run "$LINENO"; then :
-+  ac_cv_func_memcmp_working=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
++   ac_config_commands="$ac_config_commands mk-stdbool.h"
+ 
 -	eval "$as_ac_Lib=no"
-+  ac_cv_func_memcmp_working=no
- fi
--
+-fi
+ 
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
 -LIBS=$ac_check_lib_save_LIBS
-+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-+  conftest.$ac_objext conftest.beam 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
@@ -40382,15 +39504,7 @@
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
 -  TERMLIBS="-l${termlib}"; break
-+
  fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_memcmp_working" >&5
-+$as_echo "$ac_cv_func_memcmp_working" >&6; }
-+test $ac_cv_func_memcmp_working = no && case " $LIBOBJS " in
-+  *" memcmp.$ac_objext "* ) ;;
-+  *) LIBOBJS="$LIBOBJS memcmp.$ac_objext"
-+ ;;
-+esac
  
 -      done
 -      { $as_echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
@@ -40421,16 +39535,7 @@
 -  ;
 -  return 0;
 -}
-+
-+for ac_func in pipe strftime srandom random srand rand usleep setbuffer lstat getpgrp utime utimes
-+do :
-+  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-+eval as_val=\$$as_ac_var
-+   if test "x$as_val" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
- _ACEOF
+-_ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -40458,8 +39563,7 @@
 -sed 's/^/| /' conftest.$ac_ext >&5
  
 -	ac_cv_lib_readline_rl_callback_handler_install=no
- fi
-+done
+-fi
  
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
@@ -40470,40 +39574,28 @@
 -$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"
++ac_fn_c_check_type "$LINENO" "bool" "ac_cv_type_bool" "
++$ac_includes_default
++#ifdef HAVE_STDBOOL_H
++#include <stdbool.h>
++#endif
  
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_LIBREADLINE 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
++"
++if test "x$ac_cv_type_bool" = x""yes; then :
  
 -       break
 -else
 -  TERMLIBS=
- fi
+-fi
++$as_echo "#define HAVE_BOOL 1" >>confdefs.h
  
-+done
-+
-+for ac_header in setjmp.h utime.h
-+do :
-+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-+eval as_val=\$$as_ac_Header
-+   if test "x$as_val" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-+_ACEOF
-+
  fi
  
- done
- 
+-done
+-
 -    ;;
 -  no)
 -    { $as_echo "$as_me:$LINENO: result: no" >&5
@@ -40517,16 +39609,19 @@
 -    # alternate readline path
 -    _ldflags=${LDFLAGS}
 -    _cppflags=${CPPFLAGS}
-+ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
-+if test "x$ac_cv_header_stdint_h" = x""yes; then :
-+   ac_config_commands="$ac_config_commands rm-stdint.h"
++ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "
++$ac_includes_default
++#ifdef HAVE_STDBOOL_H
++#include <stdbool.h>
++#endif
  
 -    # Add additional search path
 -    LDFLAGS="-L$with_readline/lib $LDFLAGS"
 -    CPPFLAGS="-I$with_readline/include $CPPFLAGS"
-+else
-+   ac_config_commands="$ac_config_commands mk-stdint.h"
++"
++if test "x$ac_cv_type__Bool" = x""yes; then :
  
++$as_echo "#define HAVE__Bool 1" >>confdefs.h
  
 +fi
  
@@ -40538,18 +39633,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 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
 -fi
 -ac_res=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
 -$as_echo "$ac_res" >&6; }
-+
-+ac_fn_c_check_header_mongrel "$LINENO" "stdbool.h" "ac_cv_header_stdbool_h" "$ac_includes_default"
-+if test "x$ac_cv_header_stdbool_h" = x""yes; then :
-+   ac_config_commands="$ac_config_commands rm-stdbool.h"
-+
- else
+-else
 -  # Is the header compilable?
 -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
 -$as_echo_n "checking $ac_header usability... " >&6; }
@@ -40559,16 +39652,7 @@
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
-+   ac_config_commands="$ac_config_commands mk-stdbool.h"
-+
-+
-+fi
-+
-+
-+
-+
-+ac_fn_c_check_type "$LINENO" "bool" "ac_cv_type_bool" "
- $ac_includes_default
+-$ac_includes_default
 -#include <$ac_header>
 -_ACEOF
 -rm -f conftest.$ac_objext
@@ -40590,21 +39674,13 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_header_compiler=yes
--else
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+#ifdef HAVE_STDBOOL_H
-+#include <stdbool.h>
-+#endif
-+
-+"
-+if test "x$ac_cv_type_bool" = x""yes; then :
-+
-+$as_echo "#define HAVE_BOOL 1" >>confdefs.h
- 
+-
 -	ac_header_compiler=no
- 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; }
@@ -40617,9 +39693,14 @@
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
++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>
--_ACEOF
++#include "$libreplacedir/test/shared_mmap.c"
+ _ACEOF
 -if { (ac_try="$ac_cpp conftest.$ac_ext"
 -case "(($ac_try" in
 -  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -40638,26 +39719,27 @@
 -	 test ! -s conftest.err
 -       }; then
 -  ac_header_preproc=yes
--else
++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
-+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
++  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
  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
@@ -40692,46 +39774,20 @@
 -{ $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 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
 -  eval "$as_ac_Header=\$ac_header_preproc"
-+
-+if test "$cross_compiling" = yes; then :
-+  libreplace_cv_HAVE_MMAP=cross
-+else
-+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h.  */
-+#include "$libreplacedir/test/shared_mmap.c"
-+_ACEOF
-+if ac_fn_c_try_run "$LINENO"; then :
-+  libreplace_cv_HAVE_MMAP=yes
-+else
-+  libreplace_cv_HAVE_MMAP=no
  fi
 -ac_res=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
 -$as_echo "$ac_res" >&6; }
-+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-+  conftest.$ac_objext conftest.beam conftest.$ac_ext
-+fi
-+
-+fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libreplace_cv_HAVE_MMAP" >&5
-+$as_echo "$libreplace_cv_HAVE_MMAP" >&6; }
-+if test x"$libreplace_cv_HAVE_MMAP" = x"yes"; then
-+
-+$as_echo "#define HAVE_MMAP 1" >>confdefs.h
  
- fi
+-fi
 -as_val=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
 +
-+
 +for ac_header in sys/syslog.h syslog.h
 +do :
 +  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
@@ -40741,7 +39797,7 @@
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
-@@ -39288,149 +8892,40 @@
+@@ -38793,149 +8598,40 @@
  
  done
  
@@ -40915,7 +39971,7 @@
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
-@@ -39439,733 +8934,557 @@
+@@ -38944,1149 +8640,569 @@
  
  done
  
@@ -40926,22 +39982,11 @@
 +  cat >>confdefs.h <<_ACEOF
 +#define HAVE_STROPTS_H 1
 +_ACEOF
-+
+ 
 +fi
-+
+ 
 +done
  
- 
-+for ac_func in seteuid setresuid setegid setresgid chroot bzero strerror
-+do :
-+  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-+eval as_val=\$$as_ac_var
-+   if test "x$as_val" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-+_ACEOF
- 
 -for ac_header in readline.h readline/readline.h
 -do
 -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
@@ -40950,7 +39995,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
@@ -40967,16 +40012,12 @@
 -/* end confdefs.h.  */
 -$ac_includes_default
 -#include <$ac_header>
-+done
-+
-+for ac_func in vsyslog setlinebuf mktime ftruncate chsize rename
++for ac_header in unix.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 :
++  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 `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
++#define HAVE_UNIX_H 1
  _ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
@@ -41003,30 +40044,19 @@
  
 -	ac_header_compiler=no
  fi
-+done
  
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 -$as_echo "$ac_header_compiler" >&6; }
-+for ac_func in waitpid strlcpy strlcat initgroups memmove strdup
-+do :
-+  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-+eval as_val=\$$as_ac_var
-+   if test "x$as_val" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-+_ACEOF
++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.  */
-+fi
-+done
 +
-+for ac_func in pread pwrite strndup strcasestr strtok_r mkdtemp dup2
++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"
@@ -41043,7 +40073,7 @@
 +fi
 +done
 +
-+for ac_func in isatty chown lchown link readlink symlink realpath
++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"
@@ -41081,6 +40111,15 @@
 -rm -f conftest.err conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
 -$as_echo "$ac_header_preproc" >&6; }
++for ac_func in waitpid wait4 strlcpy strlcat initgroups memmove strdup
++do :
++  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
++ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
++eval as_val=\$$as_ac_var
++   if test "x$as_val" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
++_ACEOF
  
 -# So?  What about this header?
 -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
@@ -41115,59 +40154,55 @@
 -{ $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 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
+-  $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
++
++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
+ 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 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_header" | $as_tr_cpp` 1
-+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h.  */
-+#include <unistd.h>
-+int
-+main ()
-+{
-+int i = (int)setresuid
-+  ;
-+  return 0;
-+}
++#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
  _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
  
 -      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 "#define HAVE_SETRESUID_DECL 1" >>confdefs.h
++fi
++done
 +
-+ fi
 +
-+
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for setresgid declaration" >&5
-+$as_echo_n "checking for setresgid declaration... " >&6; }
-+if test "${ac_cv_have_setresgid_decl+set}" = set; then :
++ { $as_echo "$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
 -  ac_check_lib_save_LIBS=$LIBS
@@ -41193,7 +40228,7 @@
  main ()
  {
 -return tgetent ();
-+int i = (int)setresgid
++int i = (int)setresuid
    ;
    return 0;
  }
@@ -41221,7 +40256,7 @@
 -       }; then
 -  eval "$as_ac_Lib=yes"
 +if ac_fn_c_try_compile "$LINENO"; then :
-+  ac_cv_have_setresgid_decl=yes
++  ac_cv_have_setresuid_decl=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
@@ -41233,7 +40268,7 @@
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
 -LIBS=$ac_check_lib_save_LIBS
-+  ac_cv_have_setresgid_decl=no
++  ac_cv_have_setresuid_decl=no
  fi
 -ac_res=`eval 'as_val=${'$as_ac_Lib'}
 -		 $as_echo "$as_val"'`
@@ -41245,19 +40280,135 @@
 -  TERMLIBS="-l${termlib}"; break
 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_setresgid_decl" >&5
-+$as_echo "$ac_cv_have_setresgid_decl" >&6; }
-+ if test x"$ac_cv_have_setresgid_decl" = x"yes"; then
++{ $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
  
 -      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_SETRESGID_DECL 1" >>confdefs.h
++$as_echo "#define HAVE_SETRESUID_DECL 1" >>confdefs.h
 +
 + fi
 +
 +
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for setresgid declaration" >&5
++$as_echo_n "checking for setresgid declaration... " >&6; }
++if test "${ac_cv_have_setresgid_decl+set}" = set; then :
+   $as_echo_n "(cached) " >&6
+ else
+-  ac_check_lib_save_LIBS=$LIBS
+-LIBS="-lreadline $TERMLIBS $LIBS"
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
+ 
+-/* Override any GCC internal prototype to avoid an error.
+-   Use char because int might match the return type of a GCC
+-   builtin and then its argument prototype would still apply.  */
+-#ifdef __cplusplus
+-extern "C"
+-#endif
+-char rl_callback_handler_install ();
++    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++#include <unistd.h>
+ int
+ main ()
+ {
+-return rl_callback_handler_install ();
++int i = (int)setresgid
+   ;
+   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_readline_rl_callback_handler_install=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
+-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_readline_rl_callback_handler_install" >&5
+-$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
+-if test "x$ac_cv_lib_readline_rl_callback_handler_install" = x""yes; then
+-  TERMLDFLAGS="-L$with_readline/lib"
+-       TERMCPPFLAGS="-I$with_readline/include"
+-       CPPFLAGS="-I$with_readline/include $CPPFLAGS"
+-       TERMLIBS="-lreadline $TERMLIBS"
+-
+-cat >>confdefs.h <<\_ACEOF
+-#define HAVE_LIBREADLINE 1
+-_ACEOF
+-
+-       break
++if ac_fn_c_try_compile "$LINENO"; then :
++  ac_cv_have_setresgid_decl=yes
+ else
+-  TERMLIBS= CPPFLAGS=$_cppflags
+-fi
+-
++  ac_cv_have_setresgid_decl=no
+ fi
+-
+-done
+-
+-
+-    LDFLAGS=$_ldflags
+-    ;;
+-  esac
+-else
+-  { $as_echo "$as_me:$LINENO: result: no" >&5
+-$as_echo "no" >&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
+ 
+ 
+-# The readline API changed slightly from readline3 to readline4, so
+-# code will generate warnings on one of them unless we have a few
+-# special cases.
+-{ $as_echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
+-$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
+-if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
 + { $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 :
@@ -41278,14 +40429,14 @@
 -#ifdef __cplusplus
 -extern "C"
 -#endif
--char rl_callback_handler_install ();
+-char rl_completion_matches ();
 +    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 +/* end confdefs.h.  */
 +#include <errno.h>
  int
  main ()
  {
--return rl_callback_handler_install ();
+-return rl_completion_matches ();
 +int i = (int)errno
    ;
    return 0;
@@ -41312,32 +40463,65 @@
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
--  ac_cv_lib_readline_rl_callback_handler_install=yes
+-  ac_cv_lib_readline_rl_completion_matches=yes
 +if ac_fn_c_try_compile "$LINENO"; then :
 +  ac_cv_have_errno_decl=yes
-+else
+ else
+-  $as_echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	ac_cv_lib_readline_rl_completion_matches=no
 +  ac_cv_have_errno_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
+-LIBS=$ac_check_lib_save_LIBS
 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-+fi
+ 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; }
+-if test "x$ac_cv_lib_readline_rl_completion_matches" = x""yes; then
 +{ $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
-+
+ 
+-cat >>confdefs.h <<\_ACEOF
+-#define HAVE_NEW_LIBREADLINE 1
+-_ACEOF
 +$as_echo "#define HAVE_ERRNO_DECL 1" >>confdefs.h
-+
+ 
+-fi
 + 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
 +{ $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
+   $as_echo_n "(cached) " >&6
  else
--  $as_echo "$as_me: failed program was:" >&5
--sed 's/^/| /' conftest.$ac_ext >&5
+-  cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
+-#include <readline/readline.h>
+-
+-int
+-main ()
+-{
+-#ifndef rl_event_hook
+-  (void) rl_event_hook;
+-#endif
  
--	ac_cv_lib_readline_rl_callback_handler_install=no
+-  ;
+-  return 0;
 +if test "$cross_compiling" = yes; then :
 +  libreplace_cv_HAVE_SECURE_MKSTEMP=cross
 +else
@@ -41356,79 +40540,141 @@
 +  if (fstat(fd, &st) != 0) exit(1);
 +  if ((st.st_mode & 0777) != 0600) exit(1);
 +  exit(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
+-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+-$as_echo "$ac_try_echo") >&5
+-  (eval "$ac_compile") 2>conftest.er1
+-  ac_status=$?
+-  grep -v '^ *+' conftest.er1 >conftest.err
+-  rm -f conftest.er1
+-  cat conftest.err >&5
+-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); } && {
+-	 test -z "$ac_c_werror_flag" ||
+-	 test ! -s conftest.err
+-       } && test -s conftest.$ac_objext; then
+-  ac_cv_have_decl_rl_event_hook=yes
 +if ac_fn_c_try_run "$LINENO"; then :
 +  libreplace_cv_HAVE_SECURE_MKSTEMP=yes
-+else
+ else
+-  $as_echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	ac_cv_have_decl_rl_event_hook=no
 +  libreplace_cv_HAVE_SECURE_MKSTEMP=no
 +fi
 +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
 +  conftest.$ac_objext conftest.beam conftest.$ac_ext
  fi
  
--rm -rf conftest.dSYM
--rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
--      conftest$ac_exeext conftest.$ac_ext
--LIBS=$ac_check_lib_save_LIBS
+-rm -f core conftest.err conftest.$ac_objext conftest.$ac_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
--  TERMLDFLAGS="-L$with_readline/lib"
--       TERMCPPFLAGS="-I$with_readline/include"
--       CPPFLAGS="-I$with_readline/include $CPPFLAGS"
--       TERMLIBS="-lreadline $TERMLIBS"
+-{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_rl_event_hook" >&5
+-$as_echo "$ac_cv_have_decl_rl_event_hook" >&6; }
+-if test "x$ac_cv_have_decl_rl_event_hook" = x""yes; then
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libreplace_cv_HAVE_SECURE_MKSTEMP" >&5
 +$as_echo "$libreplace_cv_HAVE_SECURE_MKSTEMP" >&6; }
 +if test x"$libreplace_cv_HAVE_SECURE_MKSTEMP" = x"yes"; then
  
--cat >>confdefs.h <<\_ACEOF
--#define HAVE_LIBREADLINE 1
+-cat >>confdefs.h <<_ACEOF
+-#define HAVE_DECL_RL_EVENT_HOOK 1
 -_ACEOF
 +$as_echo "#define HAVE_SECURE_MKSTEMP 1" >>confdefs.h
  
--       break
++fi
+ 
 -else
--  TERMLIBS= CPPFLAGS=$_cppflags
- fi
- 
 +for ac_header in stdio.h strings.h
 +do :
 +  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
 +eval as_val=\$$as_ac_Header
 +   if test "x$as_val" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
+   cat >>confdefs.h <<_ACEOF
+-#define HAVE_DECL_RL_EVENT_HOOK 0
 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-+_ACEOF
-+
+ _ACEOF
+ 
+-
  fi
  
- done
++done
  
+-{ $as_echo "$as_me:$LINENO: checking for history_list in -lreadline" >&5
+-$as_echo_n "checking for history_list in -lreadline... " >&6; }
+-if test "${ac_cv_lib_readline_history_list+set}" = set; then
+-  $as_echo_n "(cached) " >&6
 +ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
 +if test "x$ac_cv_have_decl_snprintf" = x""yes; then :
 +  ac_have_decl=1
-+else
+ else
+-  ac_check_lib_save_LIBS=$LIBS
+-LIBS="-lreadline $TERMLIBS $LIBS"
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
 +  ac_have_decl=0
 +fi
  
--    LDFLAGS=$_ldflags
--    ;;
--  esac
+-/* Override any GCC internal prototype to avoid an error.
+-   Use char because int might match the return type of a GCC
+-   builtin and then its argument prototype would still apply.  */
+-#ifdef __cplusplus
+-extern "C"
+-#endif
+-char history_list ();
+-int
+-main ()
+-{
+-return history_list ();
+-  ;
+-  return 0;
+-}
 +cat >>confdefs.h <<_ACEOF
 +#define HAVE_DECL_SNPRINTF $ac_have_decl
-+_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
+-  ac_cv_lib_readline_history_list=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:$LINENO: result: no" >&5
--$as_echo "no" >&6; }
+-  $as_echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
 +  ac_have_decl=0
 +fi
  
+-	ac_cv_lib_readline_history_list=no
 +cat >>confdefs.h <<_ACEOF
 +#define HAVE_DECL_VSNPRINTF $ac_have_decl
 +_ACEOF
@@ -41439,6 +40685,10 @@
 +  ac_have_decl=0
  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
 +cat >>confdefs.h <<_ACEOF
 +#define HAVE_DECL_ASPRINTF $ac_have_decl
 +_ACEOF
@@ -41447,12 +40697,17 @@
 +  ac_have_decl=1
 +else
 +  ac_have_decl=0
-+fi
+ fi
+-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_readline_history_list" >&5
+-$as_echo "$ac_cv_lib_readline_history_list" >&6; }
+-if test "x$ac_cv_lib_readline_history_list" = x""yes; then
  
+-cat >>confdefs.h <<\_ACEOF
+-#define HAVE_HISTORY_LIST 1
 +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`
@@ -41461,36 +40716,29 @@
 +   if test "x$as_val" = x""yes; then :
 +  cat >>confdefs.h <<_ACEOF
 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-+_ACEOF
+ _ACEOF
  
--# The readline API changed slightly from readline3 to readline4, so
--# code will generate warnings on one of them unless we have a few
--# special cases.
--{ $as_echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
--$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
--if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
-+fi
+ fi
 +done
-+
-+
+ 
+ 
+-###############################################
+-# 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
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C99 vsnprintf" >&5
 +$as_echo_n "checking for C99 vsnprintf... " >&6; }
 +if test "${libreplace_cv_HAVE_C99_VSNPRINTF+set}" = set; then :
    $as_echo_n "(cached) " >&6
  else
--  ac_check_lib_save_LIBS=$LIBS
--LIBS="-lreadline $TERMLIBS $LIBS"
+-  ac_func_search_save_LIBS=$LIBS
 -cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+
-+if test "$cross_compiling" = yes; then :
-+  libreplace_cv_HAVE_C99_VSNPRINTF=cross
-+else
-+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
+-/* end confdefs.h.  */
  
 -/* Override any GCC internal prototype to avoid an error.
 -   Use char because int might match the return type of a GCC
@@ -41498,13 +40746,52 @@
 -#ifdef __cplusplus
 -extern "C"
 -#endif
--char rl_completion_matches ();
+-char yp_get_default_domain ();
 -int
 -main ()
 -{
--return rl_completion_matches ();
+-return yp_get_default_domain ();
 -  ;
 -  return 0;
+-}
+-_ACEOF
+-for ac_lib in '' nsl; do
+-  if test -z "$ac_lib"; then
+-    ac_res="none required"
+-  else
+-    ac_res=-l$ac_lib
+-    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+-  fi
+-  rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (ac_try="$ac_link"
+-case "(($ac_try" in
+-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+-  *) ac_try_echo=$ac_try;;
+-esac
+-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+-$as_echo "$ac_try_echo") >&5
+-  (eval "$ac_link") 2>conftest.er1
+-  ac_status=$?
+-  grep -v '^ *+' conftest.er1 >conftest.err
+-  rm -f conftest.er1
+-  cat conftest.err >&5
+-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); } && {
+-	 test -z "$ac_c_werror_flag" ||
+-	 test ! -s conftest.err
+-       } && test -s conftest$ac_exeext && {
+-	 test "$cross_compiling" = yes ||
+-	 $as_test_x conftest$ac_exeext
+-       }; then
+-  ac_cv_search_yp_get_default_domain=$ac_res
++if test "$cross_compiling" = yes; then :
++  libreplace_cv_HAVE_C99_VSNPRINTF=cross
+ 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.  */
+ 
 +#include <sys/types.h>
 +#include <stdio.h>
 +#include <stdarg.h>
@@ -41515,12 +40802,22 @@
 +       char buf[20];
 +       long long l = 1234567890;
 +       l *= 100;
-+
+ 
+-fi
 +       va_start(ap, format);
 +       len = vsnprintf(buf, 0, format, ap);
 +       va_end(ap);
 +       if (len != 5) exit(1);
-+
+ 
+-rm -rf conftest.dSYM
+-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+-      conftest$ac_exeext
+-  if test "${ac_cv_search_yp_get_default_domain+set}" = set; then
+-  break
+-fi
+-done
+-if test "${ac_cv_search_yp_get_default_domain+set}" = set; then
+-  :
 +       va_start(ap, format);
 +       len = vsnprintf(0, 0, format, ap);
 +       va_end(ap);
@@ -41534,82 +40831,85 @@
 +       if (snprintf(buf, 20, "%s", 0) < 3) exit(7);
 +
 +       exit(0);
- }
++}
 +main() { foo("hello"); }
 +
- _ACEOF
--rm -f conftest.$ac_objext conftest$ac_exeext
--if { (ac_try="$ac_link"
--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_readline_rl_completion_matches=yes
++_ACEOF
 +if ac_fn_c_try_run "$LINENO"; then :
 +  libreplace_cv_HAVE_C99_VSNPRINTF=yes
  else
--  $as_echo "$as_me: failed program was:" >&5
--sed 's/^/| /' conftest.$ac_ext >&5
--
--	ac_cv_lib_readline_rl_completion_matches=no
+-  ac_cv_search_yp_get_default_domain=no
 +  libreplace_cv_HAVE_C99_VSNPRINTF=no
-+fi
+ fi
+-rm conftest.$ac_ext
+-LIBS=$ac_func_search_save_LIBS
 +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_search_yp_get_default_domain" >&5
+-$as_echo "$ac_cv_search_yp_get_default_domain" >&6; }
+-ac_res=$ac_cv_search_yp_get_default_domain
+-if test "$ac_res" != no; then
+-  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
  
--rm -rf conftest.dSYM
--rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
--      conftest$ac_exeext conftest.$ac_ext
--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; }
--if test "x$ac_cv_lib_readline_rl_completion_matches" = x""yes; then
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libreplace_cv_HAVE_C99_VSNPRINTF" >&5
 +$as_echo "$libreplace_cv_HAVE_C99_VSNPRINTF" >&6; }
 +if test x"$libreplace_cv_HAVE_C99_VSNPRINTF" = x"yes"; then
  
--cat >>confdefs.h <<\_ACEOF
--#define HAVE_NEW_LIBREADLINE 1
--_ACEOF
 +$as_echo "#define HAVE_C99_VSNPRINTF 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
-+{ $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
+-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
+-  $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 <readline/readline.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
+ 
+-/* 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 "$as_me:${as_lineno-$LINENO}: checking for va_copy" >&5
++$as_echo_n "checking for va_copy... " >&6; }
++if test "${libreplace_cv_HAVE_VA_COPY+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
+ 
 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 +/* end confdefs.h.  */
 +#include <stdarg.h>
@@ -41617,24 +40917,21 @@
  int
  main ()
  {
--#ifndef rl_event_hook
--  (void) rl_event_hook;
--#endif
--
+-return $ac_func ();
 +va_copy(ap1,ap2);
    ;
    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
@@ -41643,106 +40940,233 @@
 -  (exit $ac_status); } && {
 -	 test -z "$ac_c_werror_flag" ||
 -	 test ! -s conftest.err
--       } && test -s conftest.$ac_objext; then
--  ac_cv_have_decl_rl_event_hook=yes
+-       } && 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 :
 +  libreplace_cv_HAVE_VA_COPY=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_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
 +  libreplace_cv_HAVE_VA_COPY=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
 -
--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_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
+-done
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libreplace_cv_HAVE_VA_COPY" >&5
 +$as_echo "$libreplace_cv_HAVE_VA_COPY" >&6; }
 +if test x"$libreplace_cv_HAVE_VA_COPY" = x"yes"; then
  
--cat >>confdefs.h <<_ACEOF
--#define HAVE_DECL_RL_EVENT_HOOK 1
--_ACEOF
 +$as_echo "#define HAVE_VA_COPY 1" >>confdefs.h
  
+-# Check if we have execl, if not we need to compile smbrun.
 +fi
  
+-for ac_func in execl
+-do
+-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
+-$as_echo_n "checking for $ac_func... " >&6; }
+-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
 +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
+   $as_echo_n "(cached) " >&6
  else
--  cat >>confdefs.h <<_ACEOF
--#define HAVE_DECL_RL_EVENT_HOOK 0
-+
+-  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.  */
 +#include <stdarg.h>
 +va_list ap1,ap2;
-+int
-+main ()
-+{
+ int
+ main ()
+ {
+-return $ac_func ();
 +__va_copy(ap1,ap2);
-+  ;
-+  return 0;
-+}
+   ;
+   return 0;
+ }
  _ACEOF
+-rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (ac_try="$ac_link"
+-case "(($ac_try" in
+-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+-  *) ac_try_echo=$ac_try;;
+-esac
+-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+-$as_echo "$ac_try_echo") >&5
+-  (eval "$ac_link") 2>conftest.er1
+-  ac_status=$?
+-  grep -v '^ *+' conftest.er1 >conftest.err
+-  rm -f conftest.er1
+-  cat conftest.err >&5
+-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); } && {
+-	 test -z "$ac_c_werror_flag" ||
+-	 test ! -s conftest.err
+-       } && test -s conftest$ac_exeext && {
+-	 test "$cross_compiling" = yes ||
+-	 $as_test_x conftest$ac_exeext
+-       }; then
+-  eval "$as_ac_var=yes"
 +if ac_fn_c_try_link "$LINENO"; then :
 +  libreplace_cv_HAVE___VA_COPY=yes
-+else
+ else
+-  $as_echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	eval "$as_ac_var=no"
 +  libreplace_cv_HAVE___VA_COPY=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
+-$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_HAVE___VA_COPY" >&5
 +$as_echo "$libreplace_cv_HAVE___VA_COPY" >&6; }
 +if test x"$libreplace_cv_HAVE___VA_COPY" = x"yes"; then
  
+-fi
+-done
 +$as_echo "#define HAVE___VA_COPY 1" >>confdefs.h
  
+-if test x"$ac_cv_func_execl" = x"no"; then
+-    EXTRA_BIN_PROGS="$EXTRA_BIN_PROGS bin/smbrun\$(EXEEXT)"
++fi
  fi
-+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
+-
+-
+-
+-
+-
+-for ac_func in getcwd fchown chmod fchmod mknod mknod64
+-do
+-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
+-$as_echo_n "checking for $ac_func... " >&6; }
+-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __FUNCTION__ macro" >&5
 +$as_echo_n "checking for __FUNCTION__ macro... " >&6; }
 +if test "${libreplace_cv_HAVE_FUNCTION_MACRO+set}" = set; then :
    $as_echo_n "(cached) " >&6
  else
--  ac_check_lib_save_LIBS=$LIBS
--LIBS="-lreadline $TERMLIBS $LIBS"
--cat >conftest.$ac_ext <<_ACEOF
+-  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
- 
+-/* 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 history_list ();
+-char $ac_func ();
+-/* The GNU C library defines this for functions which it implements
+-    to always fail with ENOSYS.  Some functions are actually named
+-    something starting with __ and the normal name is an alias.  */
+-#if defined __stub_$ac_func || defined __stub___$ac_func
+-choke me
+-#endif
+ 
 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 +/* end confdefs.h.  */
 +#include <stdio.h>
  int
  main ()
  {
--return history_list ();
+-return $ac_func ();
 +printf("%s\n", __FUNCTION__);
    ;
    return 0;
@@ -41769,84 +41193,103 @@
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
--  ac_cv_lib_readline_history_list=yes
+-  eval "$as_ac_var=yes"
 +if ac_fn_c_try_compile "$LINENO"; then :
 +  libreplace_cv_HAVE_FUNCTION_MACRO=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
--	ac_cv_lib_readline_history_list=no
+-	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
--LIBS=$ac_check_lib_save_LIBS
 +  libreplace_cv_HAVE_FUNCTION_MACRO=no
  fi
--{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_readline_history_list" >&5
--$as_echo "$ac_cv_lib_readline_history_list" >&6; }
--if test "x$ac_cv_lib_readline_history_list" = x""yes; then
--
--cat >>confdefs.h <<\_ACEOF
--#define HAVE_HISTORY_LIST 1
+-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_HAVE_FUNCTION_MACRO" >&5
 +$as_echo "$libreplace_cv_HAVE_FUNCTION_MACRO" >&6; }
 +if test x"$libreplace_cv_HAVE_FUNCTION_MACRO" = x"yes"; then
  
 +$as_echo "#define HAVE_FUNCTION_MACRO 1" >>confdefs.h
  
--###############################################
--# test for where we get yp_get_default_domain() from
--{ $as_echo "$as_me:$LINENO: checking for library containing yp_get_default_domain" >&5
--$as_echo_n "checking for library containing yp_get_default_domain... " >&6; }
--if test "${ac_cv_search_yp_get_default_domain+set}" = set; then
+-for ac_func in strtol
+-do
+-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
+-$as_echo_n "checking for $ac_func... " >&6; }
+-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
 +else
 +        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __func__ macro" >&5
 +$as_echo_n "checking for __func__ macro... " >&6; }
 +if test "${libreplace_cv_HAVE_func_MACRO+set}" = set; then :
    $as_echo_n "(cached) " >&6
  else
--  ac_func_search_save_LIBS=$LIBS
--cat >conftest.$ac_ext <<_ACEOF
+-  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
- 
+-/* 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 yp_get_default_domain ();
+-char $ac_func ();
+-/* The GNU C library defines this for functions which it implements
+-    to always fail with ENOSYS.  Some functions are actually named
+-    something starting with __ and the normal name is an alias.  */
+-#if defined __stub_$ac_func || defined __stub___$ac_func
+-choke me
+-#endif
+ 
 +    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 +/* end confdefs.h.  */
 +#include <stdio.h>
  int
  main ()
  {
--return yp_get_default_domain ();
+-return $ac_func ();
 +printf("%s\n", __func__);
    ;
    return 0;
  }
  _ACEOF
--for ac_lib in '' nsl; do
--  if test -z "$ac_lib"; then
--    ac_res="none required"
--  else
--    ac_res=-l$ac_lib
--    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
--  fi
--  rm -f conftest.$ac_objext conftest$ac_exeext
+-rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
 -  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -41867,63 +41310,57 @@
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
--  ac_cv_search_yp_get_default_domain=$ac_res
+-  eval "$as_ac_var=yes"
 +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
+-
+-	eval "$as_ac_var=no"
 +  libreplace_cv_HAVE_func_MACRO=no
-+fi
+ fi
 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 +fi
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libreplace_cv_HAVE_func_MACRO" >&5
 +$as_echo "$libreplace_cv_HAVE_func_MACRO" >&6; }
 +    if test x"$libreplace_cv_HAVE_func_MACRO" = 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 HAVE_func_MACRO 1" >>confdefs.h
- 
++
 +    fi
  fi
- 
--rm -rf conftest.dSYM
--rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
--      conftest$ac_exeext
--  if test "${ac_cv_search_yp_get_default_domain+set}" = set; then
--  break
+-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 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
+   cat >>confdefs.h <<_ACEOF
+-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-+_ACEOF
-+
+ _ACEOF
+ 
  fi
 +
  done
--if test "${ac_cv_search_yp_get_default_domain+set}" = set; then
--  :
--else
--  ac_cv_search_yp_get_default_domain=no
--fi
--rm conftest.$ac_ext
--LIBS=$ac_func_search_save_LIBS
--fi
--{ $as_echo "$as_me:$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
  
 +ac_fn_c_check_type "$LINENO" "comparison_fn_t" "ac_cv_type_comparison_fn_t" "$ac_includes_default"
 +if test "x$ac_cv_type_comparison_fn_t" = x""yes; then :
  
--for ac_func in yp_get_default_domain
+-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
@@ -42048,13 +41485,14 @@
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
  _ACEOF
-@@ -40174,101 +9493,56 @@
+@@ -40095,102 +9211,56 @@
  done
  
  
--# Check if we have execl, if not we need to compile smbrun.
 -
--for ac_func in execl
+-
+-
+-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
@@ -42186,13 +41624,9 @@
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
  _ACEOF
-@@ -40276,353 +9550,184 @@
- fi
+@@ -40199,255 +9269,183 @@
  done
  
--if test x"$ac_cv_func_execl" = x"no"; then
--    EXTRA_BIN_PROGS="$EXTRA_BIN_PROGS bin/smbrun\$(EXEEXT)"
--fi
  
 +# this test disabled as we don't actually need __VA_ARGS__ yet
 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -42206,21 +41640,14 @@
  
 +$as_echo "#define HAVE__VA_ARGS__MACRO 1" >>confdefs.h
  
-+fi
-+rm -f conftest.err conftest.$ac_ext
- 
- 
--for ac_func in getcwd fchown chmod fchmod mknod mknod64
+-for ac_func in setsid glob strpbrk crypt16 getauthuid
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
 -$as_echo_n "checking for $ac_func... " >&6; }
 -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-+{ $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
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
@@ -42230,17 +41657,24 @@
 -/* 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
--
++fi
++rm -f conftest.err conftest.$ac_ext
+ 
 -/* 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
++{ $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
  
 -#undef $ac_func
 +    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -42324,134 +41758,52 @@
 +{ $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
+-fi
 -done
++$as_echo "#define HAVE_SIG_ATOMIC_T_TYPE 1" >>confdefs.h
  
++fi
  
--for ac_func in strtol
--do
--as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
--{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
--$as_echo_n "checking for $ac_func... " >&6; }
--if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+ 
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for O_DIRECT flag to open(2)" >&5
 +$as_echo_n "checking for O_DIRECT flag to open(2)... " >&6; }
 +if test "${libreplace_cv_HAVE_OPEN_O_DIRECT+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
--  cat >conftest.$ac_ext <<_ACEOF
--/* 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
++  $as_echo_n "(cached) " >&6
++else
  
--/* 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
 +#include <unistd.h>
 +#ifdef HAVE_FCNTL_H
 +#include <fcntl.h>
- #endif
--
- int
- main ()
- {
--return $ac_func ();
++#endif
++int
++main ()
++{
 +int fd = open("/dev/null", O_DIRECT);
-   ;
-   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"
++  ;
++  return 0;
++}
++_ACEOF
 +if ac_fn_c_try_compile "$LINENO"; then :
 +  libreplace_cv_HAVE_OPEN_O_DIRECT=yes
- else
--  $as_echo "$as_me: failed program was:" >&5
--sed 's/^/| /' conftest.$ac_ext >&5
--
--	eval "$as_ac_var=no"
++else
 +  libreplace_cv_HAVE_OPEN_O_DIRECT=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_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
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libreplace_cv_HAVE_OPEN_O_DIRECT" >&5
 +$as_echo "$libreplace_cv_HAVE_OPEN_O_DIRECT" >&6; }
 +if test x"$libreplace_cv_HAVE_OPEN_O_DIRECT" = x"yes"; then
  
--fi
--done
 +$as_echo "#define HAVE_OPEN_O_DIRECT 1" >>confdefs.h
  
 +fi
  
  
--for ac_func in strchr chflags
+-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
@@ -42471,43 +41823,20 @@
 -/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
 -   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
 -#define $ac_func innocuous_$ac_func
- 
+-
 -/* System header to define __stub macros and hopefully few prototypes,
 -    which can conflict with char $ac_func (); below.
 -    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
 -    <limits.h> exists even on freestanding compilers.  */
-+	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h.  */
-+#include <sys/types.h>
-+int
-+main ()
-+{
-+volatile int i = 0
-+  ;
-+  return 0;
-+}
-+_ACEOF
-+if ac_fn_c_try_compile "$LINENO"; then :
-+  libreplace_cv_volatile=yes
-+else
-+  libreplace_cv_volatile=no
-+fi
-+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-+fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libreplace_cv_volatile" >&5
-+$as_echo "$libreplace_cv_volatile" >&6; }
-+if test x"$libreplace_cv_volatile" = x"yes"; then
- 
+-
 -#ifdef __STDC__
 -# include <limits.h>
 -#else
 -# include <assert.h>
 -#endif
-+$as_echo "#define HAVE_VOLATILE 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
 -   builtin and then its argument prototype would still apply.  */
@@ -42521,26 +41850,15 @@
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
 -#endif
-+# filesys
-+ac_header_dirent=no
-+for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
-+  as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
-+$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
-+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then :
-+  $as_echo_n "(cached) " >&6
-+else
-+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ 
++	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 +/* end confdefs.h.  */
 +#include <sys/types.h>
-+#include <$ac_hdr>
- 
  int
  main ()
  {
 -return $ac_func ();
-+if ((DIR *) 0)
-+return 0;
++volatile int i = 0
    ;
    return 0;
  }
@@ -42568,12 +41886,49 @@
 -       }; then
 -  eval "$as_ac_var=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
--
++  libreplace_cv_volatile=no
++fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libreplace_cv_volatile" >&5
++$as_echo "$libreplace_cv_volatile" >&6; }
++if test x"$libreplace_cv_volatile" = x"yes"; then
++
++$as_echo "#define HAVE_VOLATILE 1" >>confdefs.h
++
++fi
++
++# filesys
++ac_header_dirent=no
++for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
++  as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
++$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
++if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then :
++  $as_echo_n "(cached) " >&6
++else
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++#include <sys/types.h>
++#include <$ac_hdr>
+ 
 -	eval "$as_ac_var=no"
++int
++main ()
++{
++if ((DIR *) 0)
++return 0;
++  ;
++  return 0;
++}
++_ACEOF
++if ac_fn_c_try_compile "$LINENO"; then :
++  eval "$as_ac_Header=yes"
++else
 +  eval "$as_ac_Header=no"
  fi
 -
@@ -42603,10 +41958,13 @@
 -done
 -
 -
+-
+-
+-
  
 -
 -
--for ac_func in getrlimit fsync fdatasync setpgid
+-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
@@ -42647,7 +42005,7 @@
  
  /* Override any GCC internal prototype to avoid an error.
     Use char because int might match the return type of a GCC
-@@ -40630,104 +9735,56 @@
+@@ -40455,106 +9453,56 @@
  #ifdef __cplusplus
  extern "C"
  #endif
@@ -42747,7 +42105,9 @@
 -
 -
 -
--for ac_func in setsid glob strpbrk crypt16 getauthuid
+-
+-
+-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
@@ -42786,7 +42146,7 @@
  
  /* Override any GCC internal prototype to avoid an error.
     Use char because int might match the return type of a GCC
-@@ -40735,170 +9792,148 @@
+@@ -40562,170 +9510,148 @@
  #ifdef __cplusplus
  extern "C"
  #endif
@@ -42921,7 +42281,7 @@
 +done
  
  
--for ac_func in sigprocmask sigblock sigaction sigset innetgr setnetgrent getnetgrent endnetgrent
+-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
@@ -42947,12 +42307,12 @@
 -/* 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
@@ -43057,7 +42417,7 @@
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
  _ACEOF
-@@ -40907,530 +9942,311 @@
+@@ -40734,210 +9660,170 @@
  done
  
  
@@ -43066,8 +42426,7 @@
 -
 -
 -
--
--for ac_func in initgroups select poll rdchk getgrnam getgrent pathconf
+-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
@@ -43163,12 +42522,19 @@
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	eval "$as_ac_var=no"
--fi
--
++  ac_cv_header_sys_wait_h=no
++fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5
++$as_echo "$ac_cv_header_sys_wait_h" >&6; }
++if test $ac_cv_header_sys_wait_h = yes; then
++
++$as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
+ 
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
-+  ac_cv_header_sys_wait_h=no
  fi
 -ac_res=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
@@ -43177,73 +42543,92 @@
 -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: $ac_cv_header_sys_wait_h" >&5
-+$as_echo "$ac_cv_header_sys_wait_h" >&6; }
-+if test $ac_cv_header_sys_wait_h = yes; then
- 
-+$as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
- 
-+fi
- 
- 
++
++
 +# capability
 +for ac_header in sys/capability.h
 +do :
 +  ac_fn_c_check_header_mongrel "$LINENO" "sys/capability.h" "ac_cv_header_sys_capability_h" "$ac_includes_default"
 +if test "x$ac_cv_header_sys_capability_h" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
+   cat >>confdefs.h <<_ACEOF
+-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 +#define HAVE_SYS_CAPABILITY_H 1
-+_ACEOF
+ _ACEOF
  
-+fi
+ fi
++
+ done
  
-+done
  
++case "$host_os" in
++*linux*)
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken RedHat 7.2 system header files" >&5
++$as_echo_n "checking for broken RedHat 7.2 system header files... " >&6; }
++if test "${libreplace_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
  
--for ac_func in setpriv setgidx setuidx setgroups sysconf stat64 fstat64
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
+ 
++	#ifdef HAVE_SYS_VFS_H
++	#include <sys/vfs.h>
++	#endif
++	#ifdef HAVE_SYS_CAPABILITY_H
++	#include <sys/capability.h>
++	#endif
+ 
++int
++main ()
++{
+ 
++	int i;
+ 
+-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
-+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
++  ;
++  return 0;
++}
+ _ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
 -/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
 -   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
 -#define $ac_func innocuous_$ac_func
--
++if ac_fn_c_try_compile "$LINENO"; then :
++  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
-+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h.  */
++fi
  
 -/* Override any GCC internal prototype to avoid an error.
 -   Use char because int might match the return type of a GCC
@@ -43258,19 +42643,26 @@
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
 -#endif
-+	#ifdef HAVE_SYS_VFS_H
-+	#include <sys/vfs.h>
-+	#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
++	#include <linux/types.h>
  
  int
  main ()
  {
 -return $ac_func ();
 +
-+	int i;
++	__s8 i;
 +
    ;
    return 0;
@@ -43299,19 +42691,26 @@
 -       }; then
 -  eval "$as_ac_var=yes"
 +if ac_fn_c_try_compile "$LINENO"; then :
-+  libreplace_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=no
++  libreplace_cv_BROKEN_RHEL5_SYS_CAP_HEADER=no
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+  libreplace_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=yes
++  libreplace_cv_BROKEN_RHEL5_SYS_CAP_HEADER=yes
  
 -	eval "$as_ac_var=no"
  fi
--
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libreplace_cv_BROKEN_RHEL5_SYS_CAP_HEADER" >&5
++$as_echo "$libreplace_cv_BROKEN_RHEL5_SYS_CAP_HEADER" >&6; }
++if test x"$libreplace_cv_BROKEN_RHEL5_SYS_CAP_HEADER" = x"yes"; then
++
++$as_echo "#define BROKEN_RHEL5_SYS_CAP_HEADER 1" >>confdefs.h
+ 
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
--fi
+ fi
 -ac_res=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
@@ -43319,34 +42718,46 @@
 -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
++;;
++esac
++
++# passwd
++for ac_header in grp.h sys/id.h compat.h shadow.h sys/priv.h pwd.h sys/security.h
++do :
++  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
++ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
++eval as_val=\$$as_ac_Header
++   if test "x$as_val" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
++_ACEOF
++
++fi
++
++done
++
++for ac_func in getpwnam_r getpwuid_r getpwent_r
++do :
++  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
++ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
++eval as_val=\$$as_ac_var
++   if test "x$as_val" = x""yes; then :
+   cat >>confdefs.h <<_ACEOF
+ #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+ _ACEOF
+@@ -40946,304 +9832,139 @@
+ done
  
-+$as_echo "#define BROKEN_REDHAT_7_SYSTEM_HEADERS 1" >>confdefs.h
  
-+fi
- 
--for ac_func in lstat64 fopen64 atexit grantpt lseek64 ftruncate64
+-for ac_func in getpwent_r
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
 -$as_echo_n "checking for $ac_func... " >&6; }
 -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken RHEL5 sys/capability.h" >&5
-+$as_echo_n "checking for broken RHEL5 sys/capability.h... " >&6; }
-+if test "${libreplace_cv_BROKEN_RHEL5_SYS_CAP_HEADER+set}" = set; then :
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpwent_r declaration" >&5
++$as_echo_n "checking for getpwent_r declaration... " >&6; }
++if test "${ac_cv_have_getpwent_r_decl+set}" = set; then :
    $as_echo_n "(cached) " >&6
  else
 -  cat >conftest.$ac_ext <<_ACEOF
@@ -43371,7 +42782,7 @@
 -#endif
  
 -#undef $ac_func
-+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 +/* end confdefs.h.  */
  
 -/* Override any GCC internal prototype to avoid an error.
@@ -43387,18 +42798,14 @@
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
 -#endif
-+	#ifdef HAVE_SYS_CAPABILITY_H
-+	#include <sys/capability.h>
-+	#endif
-+	#include <linux/types.h>
++	#include <unistd.h>
++	#include <pwd.h>
  
  int
  main ()
  {
 -return $ac_func ();
-+
-+	__s8 i;
-+
++int i = (int)getpwent_r
    ;
    return 0;
  }
@@ -43426,25 +42833,19 @@
 -       }; then
 -  eval "$as_ac_var=yes"
 +if ac_fn_c_try_compile "$LINENO"; then :
-+  libreplace_cv_BROKEN_RHEL5_SYS_CAP_HEADER=no
++  ac_cv_have_getpwent_r_decl=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+  libreplace_cv_BROKEN_RHEL5_SYS_CAP_HEADER=yes
- 
+-
 -	eval "$as_ac_var=no"
++  ac_cv_have_getpwent_r_decl=no
  fi
-+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-+fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libreplace_cv_BROKEN_RHEL5_SYS_CAP_HEADER" >&5
-+$as_echo "$libreplace_cv_BROKEN_RHEL5_SYS_CAP_HEADER" >&6; }
-+if test x"$libreplace_cv_BROKEN_RHEL5_SYS_CAP_HEADER" = x"yes"; then
-+
-+$as_echo "#define BROKEN_RHEL5_SYS_CAP_HEADER 1" >>confdefs.h
- 
+-
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  fi
 -ac_res=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
@@ -43453,51 +42854,28 @@
 -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"
-+eval as_val=\$$as_ac_Header
-+   if test "x$as_val" = x""yes; then :
-   cat >>confdefs.h <<_ACEOF
+-  cat >>confdefs.h <<_ACEOF
 -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
- _ACEOF
+-_ACEOF
++{ $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
  
- fi
+-fi
 -done
--
--
++$as_echo "#define HAVE_GETPWENT_R_DECL 1" >>confdefs.h
  
-+done
++ fi
  
-+for ac_func in getpwnam_r getpwuid_r getpwent_r
-+do :
-+  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-+eval as_val=\$$as_ac_var
-+   if test "x$as_val" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-+_ACEOF
- 
-+fi
-+done
- 
- 
--for ac_func in fseek64 fseeko64 ftell64 ftello64 setluid getpwanam
+-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 "$as_me:${as_lineno-$LINENO}: checking for getpwent_r declaration" >&5
-+$as_echo_n "checking for getpwent_r declaration... " >&6; }
-+if test "${ac_cv_have_getpwent_r_decl+set}" = set; then :
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototype struct passwd *getpwent_r(struct passwd *src, char *buf, int buflen)" >&5
++$as_echo_n "checking for prototype struct passwd *getpwent_r(struct passwd *src, char *buf, int buflen)... " >&6; }
++if test "${ac_cv_c_prototype_struct_passwd_pgetpwent_r_struct_passwd_psrc__char_pbuf__int_buflen_+set}" = set; then :
    $as_echo_n "(cached) " >&6
  else
 -  cat >conftest.$ac_ext <<_ACEOF
@@ -43505,25 +42883,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 <pwd.h>
  
 -#undef $ac_func
-+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h.  */
++		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
@@ -43538,17 +42920,20 @@
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
 -#endif
-+	#include <unistd.h>
-+	#include <pwd.h>
++	#ifndef HAVE_GETPWENT_R_DECL
++	#error missing getpwent_r prototype
++	#endif
++	return NULL;
++
++		}
  
- int
- main ()
- {
+-int
+-main ()
+-{
 -return $ac_func ();
-+int i = (int)getpwent_r
-   ;
-   return 0;
- }
+-  ;
+-  return 0;
+-}
  _ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
@@ -43573,19 +42958,20 @@
 -       }; then
 -  eval "$as_ac_var=yes"
 +if ac_fn_c_try_compile "$LINENO"; then :
-+  ac_cv_have_getpwent_r_decl=yes
++
++		ac_cv_c_prototype_struct_passwd_pgetpwent_r_struct_passwd_psrc__char_pbuf__int_buflen_=yes
++
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
+ 
 -	eval "$as_ac_var=no"
-+  ac_cv_have_getpwent_r_decl=no
- fi
--
+-fi
++		ac_cv_c_prototype_struct_passwd_pgetpwent_r_struct_passwd_psrc__char_pbuf__int_buflen_=no
+ 
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
-+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  fi
 -ac_res=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
@@ -43596,52 +42982,11 @@
 -   if test "x$as_val" = x""yes; then
 -  cat >>confdefs.h <<_ACEOF
 -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getpwent_r_decl" >&5
-+$as_echo "$ac_cv_have_getpwent_r_decl" >&6; }
-+ if test x"$ac_cv_have_getpwent_r_decl" = x"yes"; then
-+
-+$as_echo "#define HAVE_GETPWENT_R_DECL 1" >>confdefs.h
-+
-+ fi
-+
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototype struct passwd *getpwent_r(struct passwd *src, char *buf, int buflen)" >&5
-+$as_echo_n "checking for prototype struct passwd *getpwent_r(struct passwd *src, char *buf, int buflen)... " >&6; }
-+if test "${ac_cv_c_prototype_struct_passwd_pgetpwent_r_struct_passwd_psrc__char_pbuf__int_buflen_+set}" = set; then :
-+  $as_echo_n "(cached) " >&6
-+else
-+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h.  */
-+
-+		$ac_includes_default
-+
-+	#include <unistd.h>
-+	#include <pwd.h>
-+
-+		struct passwd *getpwent_r(struct passwd *src, char *buf, int buflen)
-+		{
-+
-+	#ifndef HAVE_GETPWENT_R_DECL
-+	#error missing getpwent_r prototype
-+	#endif
-+	return NULL;
-+
-+		}
-+
- _ACEOF
-+if ac_fn_c_try_compile "$LINENO"; then :
+-_ACEOF
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  
--fi
+ fi
 -done
-+		ac_cv_c_prototype_struct_passwd_pgetpwent_r_struct_passwd_psrc__char_pbuf__int_buflen_=yes
-+
-+else
- 
-+		ac_cv_c_prototype_struct_passwd_pgetpwent_r_struct_passwd_psrc__char_pbuf__int_buflen_=no
-+
-+fi
-+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- 
-+fi
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_prototype_struct_passwd_pgetpwent_r_struct_passwd_psrc__char_pbuf__int_buflen_" >&5
 +$as_echo "$ac_cv_c_prototype_struct_passwd_pgetpwent_r_struct_passwd_psrc__char_pbuf__int_buflen_" >&6; }
 +if test $ac_cv_c_prototype_struct_passwd_pgetpwent_r_struct_passwd_psrc__char_pbuf__int_buflen_ = yes; then :
@@ -43652,7 +42997,7 @@
  
 +fi
  
--for ac_func in opendir64 readdir64 seekdir64 telldir64 rewinddir64 closedir64
+-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
@@ -43687,11 +43032,16 @@
 -#endif
 +	#include <unistd.h>
 +	#include <pwd.h>
- 
--#undef $ac_func
++
 +		struct passwd *getpwent_r(struct passwd *src, char *buf, size_t buflen)
 +		{
  
+-#undef $ac_func
++	#ifndef HAVE_GETPWENT_R_DECL
++	#error missing getpwent_r prototype
++	#endif
++	return NULL;
+ 
 -/* 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.  */
@@ -43705,11 +43055,6 @@
 -#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
@@ -43786,11 +43131,13 @@
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
  _ACEOF
-@@ -41439,446 +10255,210 @@
+@@ -41252,328 +9973,220 @@
  done
  
  
--for ac_func in getpwent_r
+-
+-
+-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
@@ -43897,154 +43244,68 @@
 -   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_have_getgrent_r_decl" >&5
 +$as_echo "$ac_cv_have_getgrent_r_decl" >&6; }
 + if test x"$ac_cv_have_getgrent_r_decl" = x"yes"; then
- 
--fi
--done
++
 +$as_echo "#define HAVE_GETGRENT_R_DECL 1" >>confdefs.h
- 
++
 + fi
- 
--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 "$as_me:${as_lineno-$LINENO}: checking for prototype struct group *getgrent_r(struct group *src, char *buf, int buflen)" >&5
 +$as_echo_n "checking for prototype struct group *getgrent_r(struct group *src, char *buf, int buflen)... " >&6; }
 +if test "${ac_cv_c_prototype_struct_group_pgetgrent_r_struct_group_psrc__char_pbuf__int_buflen_+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
--  cat >conftest.$ac_ext <<_ACEOF
--/* confdefs.h.  */
--_ACEOF
--cat confdefs.h >>conftest.$ac_ext
--cat >>conftest.$ac_ext <<_ACEOF
++  $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 <unistd.h>
 +	#include <grp.h>
- 
--#undef $ac_func
++
 +		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
--   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_GETGRENT_R_DECL
 +	#error missing getgrent_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_group_pgetgrent_r_struct_group_psrc__char_pbuf__int_buflen_=yes
 +
- else
--  $as_echo "$as_me: failed program was:" >&5
--sed 's/^/| /' conftest.$ac_ext >&5
- 
--	eval "$as_ac_var=no"
--fi
++else
++
 +		ac_cv_c_prototype_struct_group_pgetgrent_r_struct_group_psrc__char_pbuf__int_buflen_=no
  
--rm -rf conftest.dSYM
--rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
--      conftest$ac_exeext conftest.$ac_ext
  fi
--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
+-done
 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  
- fi
--done
++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 setenv strcasecmp fcvt fcvtl
+-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 "#define SOLARIS_GETGRENT_R 1" >>confdefs.h
 +
++
++fi
++
++
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototype struct group *getgrent_r(struct group *src, char *buf, size_t buflen)" >&5
 +$as_echo_n "checking for prototype struct group *getgrent_r(struct group *src, char *buf, size_t buflen)... " >&6; }
 +if test "${ac_cv_c_prototype_struct_group_pgetgrent_r_struct_group_psrc__char_pbuf__size_t_buflen_+set}" = set; then :
@@ -44164,27 +43425,20 @@
 +
 +fi
 +
-+
-+# locale
-+for ac_header in ctype.h locale.h
++for ac_func in getgrouplist
 +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_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
-+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
++#define HAVE_GETGROUPLIST 1
  _ACEOF
  
  fi
--done
--
+ done
  
-+done
  
- 
--for ac_func in syslog vsyslog timegm
+-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
@@ -44194,13 +43448,15 @@
 -else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
-+# glob
-+for ac_header in fnmatch.h
++# locale
++for ac_header in ctype.h locale.h langinfo.h
 +do :
-+  ac_fn_c_check_header_mongrel "$LINENO" "fnmatch.h" "ac_cv_header_fnmatch_h" "$ac_includes_default"
-+if test "x$ac_cv_header_fnmatch_h" = x""yes; then :
++  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_FNMATCH_H 1
++#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
@@ -44208,12 +43464,12 @@
 -/* 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
@@ -44245,7 +43501,14 @@
 -  ;
 -  return 0;
 -}
--_ACEOF
++# glob
++for ac_header in fnmatch.h
++do :
++  ac_fn_c_check_header_mongrel "$LINENO" "fnmatch.h" "ac_cv_header_fnmatch_h" "$ac_includes_default"
++if test "x$ac_cv_header_fnmatch_h" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_FNMATCH_H 1
+ _ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -44271,16 +43534,6 @@
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+# shmem
-+for ac_header in sys/ipc.h sys/mman.h sys/shm.h
-+do :
-+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-+eval as_val=\$$as_ac_Header
-+   if test "x$as_val" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-+_ACEOF
  
 -	eval "$as_ac_var=no"
  fi
@@ -44299,8 +43552,8 @@
 +done
 +
 +
-+# terminal
-+for ac_header in termios.h termio.h sys/termio.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"
@@ -44311,18 +43564,34 @@
 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
  
- fi
+-else
++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 :
++  cat >>confdefs.h <<_ACEOF
++#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
++_ACEOF
  
--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
+-ac_check_lib_ext_save_LIBS=$LIBS
+-LIBS="-lrt $LIBS  $LIBS"
++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
 +save_LIBS="$LIBS"
 +LIBS=""
 +
@@ -44340,42 +43609,18 @@
 +  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
-@@ -41886,100 +10466,85 @@
+@@ -41582,112 +10195,85 @@
  #ifdef __cplusplus
  extern "C"
  #endif
--char $ac_func ();
--/* The GNU C library defines this for functions which it implements
--    to always fail with ENOSYS.  Some functions are actually named
--    something starting with __ and the normal name is an alias.  */
--#if defined __stub_$ac_func || defined __stub___$ac_func
--choke me
--#endif
--
+-char nanosleep ();
 +char dlopen ();
  int
  main ()
  {
--return $ac_func ();
+-return nanosleep ();
 +return dlopen ();
    ;
    return 0;
@@ -44402,7 +43647,8 @@
 -	 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
 +for ac_lib in '' dl; do
 +  if test -z "$ac_lib"; then
 +    ac_res="none required"
@@ -44435,32 +43681,33 @@
 +if test "$ac_res" != no; then :
 +  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
  
--	eval "$as_ac_var=no"
+-	ac_cv_lib_ext_rt_nanosleep=no;
+-		  ac_cv_lib_ext_rt=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_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 dlfcn.h
 +do :
 +  ac_fn_c_check_header_mongrel "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default"
 +if test "x$ac_cv_header_dlfcn_h" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
+   cat >>confdefs.h <<_ACEOF
+-#define HAVE_NANOSLEEP 1
 +#define HAVE_DLFCN_H 1
-+_ACEOF
-+
+ _ACEOF
+ 
  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
-+
+ 
+-LIBS=$ac_check_lib_ext_save_LIBS
 +done
-+
+ 
+-if test $ac_cv_lib_ext_rt = yes; then
 +for ac_func in dlopen dlsym dlerror dlclose
 +do :
 +  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
@@ -44468,16 +43715,28 @@
 +eval as_val=\$$as_ac_var
 +   if test "x$as_val" = x""yes; then :
    cat >>confdefs.h <<_ACEOF
- #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+-#define HAVE_LIBRT 1
++#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
  _ACEOF
  
+-		case "$LIBS" in
+-		    *-lrt*)
+-			;;
+-		    *)
+-			LIBS="-lrt $LIBS"
+-			;;
+-		esac
+-
+-
+-fi
+-
 +else
 +  libreplace_cv_dlfcn=yes
  fi
  done
  
  
--for ac_func in nanosleep
+-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
@@ -44516,7 +43775,7 @@
  
  /* Override any GCC internal prototype to avoid an error.
     Use char because int might match the return type of a GCC
-@@ -41987,1000 +10552,611 @@
+@@ -41695,419 +10281,231 @@
  #ifdef __cplusplus
  extern "C"
  #endif
@@ -44560,6 +43819,9 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  eval "$as_ac_var=yes"
+-else
+-  $as_echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
 +for ac_lib in '' sl; do
 +  if test -z "$ac_lib"; then
 +    ac_res="none required"
@@ -44577,35 +43839,23 @@
 +fi
 +done
 +if test "${ac_cv_search_shl_load+set}" = set; then :
-+
- else
--  $as_echo "$as_me: failed program was:" >&5
--sed 's/^/| /' conftest.$ac_ext >&5
+ 
+-	eval "$as_ac_var=no"
++else
 +  ac_cv_search_shl_load=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_shl_load" >&5
 +$as_echo "$ac_cv_search_shl_load" >&6; }
 +ac_res=$ac_cv_search_shl_load
 +if test "$ac_res" != no; then :
 +  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
  
--	eval "$as_ac_var=no"
- fi
- 
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
-+for ac_header in dl.h
-+do :
-+  ac_fn_c_check_header_mongrel "$LINENO" "dl.h" "ac_cv_header_dl_h" "$ac_includes_default"
-+if test "x$ac_cv_header_dl_h" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define HAVE_DL_H 1
-+_ACEOF
-+
  fi
 -ac_res=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
@@ -44615,184 +43865,54 @@
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
 +
++for ac_header in dl.h
++do :
++  ac_fn_c_check_header_mongrel "$LINENO" "dl.h" "ac_cv_header_dl_h" "$ac_includes_default"
++if test "x$ac_cv_header_dl_h" = x""yes; then :
+   cat >>confdefs.h <<_ACEOF
+-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
++#define HAVE_DL_H 1
+ _ACEOF
+ 
+ fi
+-done
+ 
 +done
-+
+ 
 +for ac_func in shl_load shl_unload shl_findsym
 +do :
 +  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
 +eval as_val=\$$as_ac_var
 +   if test "x$as_val" = x""yes; then :
-   cat >>confdefs.h <<_ACEOF
- #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
- _ACEOF
++  cat >>confdefs.h <<_ACEOF
++#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
++_ACEOF
  
- else
++else
 +  libreplace_cv_shl=yes
 +fi
 +done
  
  
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototype void *dlopen(const char* filename, unsigned int flags)" >&5
-+$as_echo_n "checking for prototype void *dlopen(const char* filename, unsigned int flags)... " >&6; }
-+if test "${ac_cv_c_prototype_void_pdlopen_const_charp_filename__unsigned_int_flags_+set}" = set; then :
-+  $as_echo_n "(cached) " >&6
-+else
-+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h.  */
- 
--ac_check_lib_ext_save_LIBS=$LIBS
--LIBS="-lrt $LIBS  $LIBS"
-+		$ac_includes_default
- 
-+	#include <dlfcn.h>
- 
-+		void *dlopen(const char* filename, unsigned int flags)
-+		{
- 
-+	return 0;
- 
--        { $as_echo "$as_me:$LINENO: checking for nanosleep in -lrt" >&5
--$as_echo_n "checking for nanosleep in -lrt... " >&6; }
--if test "${ac_cv_lib_ext_rt_nanosleep+set}" = set; then
--  $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 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
-+if ac_fn_c_try_compile "$LINENO"; then :
-+
-+		ac_cv_c_prototype_void_pdlopen_const_charp_filename__unsigned_int_flags_=yes
-+
- else
--  $as_echo "$as_me: failed program was:" >&5
--sed 's/^/| /' conftest.$ac_ext >&5
- 
--	ac_cv_lib_ext_rt_nanosleep=no;
--		  ac_cv_lib_ext_rt=no
--fi
-+		ac_cv_c_prototype_void_pdlopen_const_charp_filename__unsigned_int_flags_=no
- 
--rm -rf conftest.dSYM
--rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
--      conftest$ac_exeext conftest.$ac_ext
-+fi
-+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- 
- fi
--{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ext_rt_nanosleep" >&5
--$as_echo "$ac_cv_lib_ext_rt_nanosleep" >&6; }
--    if test $ac_cv_lib_ext_rt_nanosleep = yes; then
--  cat >>confdefs.h <<_ACEOF
--#define HAVE_NANOSLEEP 1
--_ACEOF
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_prototype_void_pdlopen_const_charp_filename__unsigned_int_flags_" >&5
-+$as_echo "$ac_cv_c_prototype_void_pdlopen_const_charp_filename__unsigned_int_flags_" >&6; }
-+if test $ac_cv_c_prototype_void_pdlopen_const_charp_filename__unsigned_int_flags_ = yes; then :
-+
-+
-+$as_echo "#define DLOPEN_TAKES_UNSIGNED_FLAGS 1" >>confdefs.h
-+
- 
- fi
- 
--LIBS=$ac_check_lib_ext_save_LIBS
- 
--if test $ac_cv_lib_ext_rt = yes; then
--  cat >>confdefs.h <<_ACEOF
--#define HAVE_LIBRT 1
--_ACEOF
-+if test x"${libreplace_cv_dlfcn}" = x"yes";then
-+	LIBREPLACEOBJ="${LIBREPLACEOBJ} dlfcn.o"
-+fi
- 
--		case "$LIBS" in
--		    *-lrt*)
--			;;
--		    *)
--			LIBS="-lrt $LIBS"
--			;;
--		esac
-+LIBDL="$LIBS"
- 
-+LIBS="$save_LIBS"
- 
-+ac_fn_c_check_func "$LINENO" "getpass" "ac_cv_func_getpass"
-+if test "x$ac_cv_func_getpass" = x""yes; then :
-+  libreplace_cv_HAVE_GETPASS=yes
- fi
- 
-+ac_fn_c_check_func "$LINENO" "getpassphrase" "ac_cv_func_getpassphrase"
-+if test "x$ac_cv_func_getpassphrase" = x""yes; then :
-+  libreplace_cv_HAVE_GETPASSPHRASE=yes
- fi
--done
- 
-+if test x"$libreplace_cv_HAVE_GETPASS" = x"yes" -a x"$libreplace_cv_HAVE_GETPASSPHRASE" = x"yes"; then
- 
-+$as_echo "#define REPLACE_GETPASS_BY_GETPASSPHRASE 1" >>confdefs.h
- 
- 
-+$as_echo "#define REPLACE_GETPASS 1" >>confdefs.h
- 
 -for ac_func in mlock munlock mlockall munlockall
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 -{ $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} getpass.o"
++{ $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 >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
 -/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
 -   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
 -#define $ac_func innocuous_$ac_func
@@ -44801,23 +43921,18 @@
 -    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
-+{ $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
++	#include <dlfcn.h>
  
 -#undef $ac_func
-+SAVE_CPPFLAGS="$CPPFLAGS"
-+CPPFLAGS="$CPPFLAGS -I$libreplacedir/"
-+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h.  */
++		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
@@ -44832,18 +43947,17 @@
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
 -#endif
-+#include "confdefs.h"
-+#define NO_CONFIG_H
-+#include "$libreplacedir/getpass.c"
++	return 0;
++
++		}
  
- int
- main ()
- {
+-int
+-main ()
+-{
 -return $ac_func ();
-+
-   ;
-   return 0;
- }
+-  ;
+-  return 0;
+-}
  _ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
@@ -44868,27 +43982,22 @@
 -       }; then
 -  eval "$as_ac_var=yes"
 +if ac_fn_c_try_compile "$LINENO"; then :
-+  libreplace_cv_REPLACE_GETPASS=yes
++
++		ac_cv_c_prototype_void_pdlopen_const_charp_filename__unsigned_int_flags_=yes
++
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+  libreplace_cv_REPLACE_GETPASS=no
-+fi
-+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-+CPPFLAGS="$SAVE_CPPFLAGS"
  
 -	eval "$as_ac_var=no"
++		ac_cv_c_prototype_void_pdlopen_const_charp_filename__unsigned_int_flags_=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 -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
-+$as_echo "#define REPLACE_GETPASS 1" >>confdefs.h
-+
-+	LIBREPLACEOBJ="${LIBREPLACEOBJ} getpass.o"
  fi
 -ac_res=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
@@ -44900,24 +44009,23 @@
 -  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_void_pdlopen_const_charp_filename__unsigned_int_flags_" >&5
++$as_echo "$ac_cv_c_prototype_void_pdlopen_const_charp_filename__unsigned_int_flags_" >&6; }
++if test $ac_cv_c_prototype_void_pdlopen_const_charp_filename__unsigned_int_flags_ = yes; then :
++
++
++$as_echo "#define DLOPEN_TAKES_UNSIGNED_FLAGS 1" >>confdefs.h
++
  
  fi
 -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.  */
++if test x"${libreplace_cv_dlfcn}" = x"yes";then
++	LIBREPLACEOBJ="${LIBREPLACEOBJ} $libreplacedir/dlfcn.o"
++fi
  
-+		#define LIBREPLACE_CONFIGURE_TEST_STRPTIME
-+		#include "$libreplacedir/test/strptime.c"
++LIBDL="$LIBS"
  
 -for ac_func in memalign posix_memalign hstrerror
 -do
@@ -44926,49 +44034,25 @@
 -$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 \
-+  conftest.$ac_objext conftest.beam conftest.$ac_ext
-+fi
-+
-+
-+fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libreplace_cv_STRPTIME_OK" >&5
-+$as_echo "$libreplace_cv_STRPTIME_OK" >&6; }
-+if test x"$libreplace_cv_STRPTIME_OK" != x"yes"; then
-+
-+$as_echo "#define REPLACE_STRPTIME 1" >>confdefs.h
-+
-+        LIBREPLACEOBJ="${LIBREPLACEOBJ} strptime.o"
-+fi
-+
-+for ac_header in direct.h windows.h winsock2.h ws2tcpip.h
-+do :
-+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-+eval as_val=\$$as_ac_Header
-+   if test "x$as_val" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
- _ACEOF
+-_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
++LIBS="$save_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.  */
++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
  
 -#ifdef __STDC__
@@ -44976,9 +44060,13 @@
 -#else
 -# include <assert.h>
 -#endif
-+done
++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
  
 -#undef $ac_func
++if test x"$libreplace_cv_HAVE_GETPASS" = x"yes" -a x"$libreplace_cv_HAVE_GETPASSPHRASE" = x"yes"; then
  
 -/* Override any GCC internal prototype to avoid an error.
 -   Use char because int might match the return type of a GCC
@@ -44993,28 +44081,34 @@
 -#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 "#define REPLACE_GETPASS_BY_GETPASSPHRASE 1" >>confdefs.h
++
++
++$as_echo "#define REPLACE_GETPASS 1" >>confdefs.h
++
++	LIBREPLACEOBJ="${LIBREPLACEOBJ} $libreplacedir/getpass.o"
++else
++
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getpass should be replaced" >&5
++$as_echo_n "checking whether getpass should be replaced... " >&6; }
++if test "${libreplace_cv_REPLACE_GETPASS+set}" = set; then :
 +  $as_echo_n "(cached) " >&6
 +else
-+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++
++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"
  
-+		#include <stdio.h>
-+		#ifdef HAVE_DIRECT_H
-+		#include <direct.h>
-+		#endif
  int
  main ()
  {
 -return $ac_func ();
 +
-+			mkdir("foo",0777);
-+			return 0;
-+
    ;
    return 0;
  }
@@ -45042,23 +44136,16 @@
 -       }; then
 -  eval "$as_ac_var=yes"
 +if ac_fn_c_try_compile "$LINENO"; then :
-+  libreplace_cv_mkdir_has_mode="yes"
++  libreplace_cv_REPLACE_GETPASS=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	eval "$as_ac_var=no"
-+  libreplace_cv_mkdir_has_mode="no"
-+fi
++  libreplace_cv_REPLACE_GETPASS=no
+ fi
 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libreplace_cv_mkdir_has_mode" >&5
-+$as_echo "$libreplace_cv_mkdir_has_mode" >&6; }
-+
-+if test "$libreplace_cv_mkdir_has_mode" = "yes"
-+then
-+
-+$as_echo "#define HAVE_MKDIR_MODE 1" >>confdefs.h
++CPPFLAGS="$SAVE_CPPFLAGS"
  
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
@@ -45071,21 +44158,20 @@
 -as_val=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
+-  cat >>confdefs.h <<_ACEOF
+-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+-_ACEOF
++{ $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
 +
-+for ac_func in timegm
-+do :
-+  ac_fn_c_check_func "$LINENO" "timegm" "ac_cv_func_timegm"
-+if test "x$ac_cv_func_timegm" = x""yes; then :
-   cat >>confdefs.h <<_ACEOF
--#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-+#define HAVE_TIMEGM 1
- _ACEOF
++$as_echo "#define REPLACE_GETPASS 1" >>confdefs.h
  
-+else
-+  LIBREPLACEOBJ="${LIBREPLACEOBJ} timegm.o"
++	LIBREPLACEOBJ="${LIBREPLACEOBJ} $libreplacedir/getpass.o"
  fi
- done
+-done
  
++fi
  
 -for ac_header in sys/mman.h
 -do
@@ -45094,16 +44180,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 "$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 "$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
 -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; }
@@ -45135,17 +44221,24 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_header_compiler=yes
--else
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
  
 -	ac_header_compiler=no
 -fi
--
++	if test "$cross_compiling" = yes; then :
++  libreplace_cv_STRPTIME_OK="assuming not"
++else
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
+ 
 -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; }
--
++		#define LIBREPLACE_CONFIGURE_TEST_STRPTIME
++		#include "$libreplacedir/test/strptime.c"
+ 
 -# Is the header present?
 -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
 -$as_echo_n "checking $ac_header presence... " >&6; }
@@ -45154,15 +44247,8 @@
 -_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.  */
 -#include <$ac_header>
-+
-+#define test_readdir_os2_delete main
-+#include "$libreplacedir/test/os2_delete.c"
  _ACEOF
 -if { (ac_try="$ac_cpp conftest.$ac_ext"
 -case "(($ac_try" in
@@ -45183,13 +44269,13 @@
 -       }; then
 -  ac_header_preproc=yes
 +if ac_fn_c_try_run "$LINENO"; then :
-+  libreplace_cv_READDIR_NEEDED=no
++  libreplace_cv_STRPTIME_OK=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -  ac_header_preproc=no
-+  libreplace_cv_READDIR_NEEDED=yes
++  libreplace_cv_STRPTIME_OK=no
 +fi
 +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
 +  conftest.$ac_objext conftest.beam conftest.$ac_ext
@@ -45240,24 +44326,29 @@
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
 -$as_echo "$ac_res" >&6; }
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libreplace_cv_READDIR_NEEDED" >&5
-+$as_echo "$libreplace_cv_READDIR_NEEDED" >&6; }
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libreplace_cv_STRPTIME_OK" >&5
++$as_echo "$libreplace_cv_STRPTIME_OK" >&6; }
++if test x"$libreplace_cv_STRPTIME_OK" != x"yes"; then
++
++$as_echo "#define REPLACE_STRPTIME 1" >>confdefs.h
  
--fi
++        LIBREPLACEOBJ="${LIBREPLACEOBJ} $libreplacedir/strptime.o"
+ 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 dirfd
++
++for ac_header in direct.h windows.h winsock2.h ws2tcpip.h
 +do :
-+  ac_fn_c_check_func "$LINENO" "dirfd" "ac_cv_func_dirfd"
-+if test "x$ac_cv_func_dirfd" = x""yes; then :
++  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
++ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
++eval as_val=\$$as_ac_Header
++   if test "x$as_val" = x""yes; then :
    cat >>confdefs.h <<_ACEOF
--#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-+#define HAVE_DIRFD 1
+ #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
+@@ -42116,581 +10514,378 @@
  
- fi
--
  done
  
 -# setbuffer, shmget, shm_open are needed for smbtorture
@@ -45269,9 +44360,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 dirfd declaration" >&5
-+$as_echo_n "checking for dirfd declaration... " >&6; }
-+if test "${ac_cv_have_dirfd_decl+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
@@ -45279,7 +44372,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
@@ -45311,6 +44405,175 @@
 -choke me
 -#endif
  
++		#include <stdio.h>
++		#ifdef HAVE_DIRECT_H
++		#include <direct.h>
++		#endif
+ int
+ main ()
+ {
+-return $ac_func ();
++
++			mkdir("foo",0777);
++			return 0;
++
+   ;
+   return 0;
+ }
+ _ACEOF
+-rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (ac_try="$ac_link"
+-case "(($ac_try" in
+-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+-  *) ac_try_echo=$ac_try;;
+-esac
+-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+-$as_echo "$ac_try_echo") >&5
+-  (eval "$ac_link") 2>conftest.er1
+-  ac_status=$?
+-  grep -v '^ *+' conftest.er1 >conftest.err
+-  rm -f conftest.er1
+-  cat conftest.err >&5
+-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); } && {
+-	 test -z "$ac_c_werror_flag" ||
+-	 test ! -s conftest.err
+-       } && test -s conftest$ac_exeext && {
+-	 test "$cross_compiling" = yes ||
+-	 $as_test_x conftest$ac_exeext
+-       }; then
+-  eval "$as_ac_var=yes"
++if ac_fn_c_try_compile "$LINENO"; then :
++  libreplace_cv_mkdir_has_mode="yes"
+ else
+-  $as_echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	eval "$as_ac_var=no"
++  libreplace_cv_mkdir_has_mode="no"
++fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libreplace_cv_mkdir_has_mode" >&5
++$as_echo "$libreplace_cv_mkdir_has_mode" >&6; }
++
++if test "$libreplace_cv_mkdir_has_mode" = "yes"
++then
++
++$as_echo "#define HAVE_MKDIR_MODE 1" >>confdefs.h
+ 
+-rm -rf conftest.dSYM
+-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+-      conftest$ac_exeext conftest.$ac_ext
+ fi
+-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 timegm
++do :
++  ac_fn_c_check_func "$LINENO" "timegm" "ac_cv_func_timegm"
++if test "x$ac_cv_func_timegm" = x""yes; then :
+   cat >>confdefs.h <<_ACEOF
+-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
++#define HAVE_TIMEGM 1
+ _ACEOF
+ 
++else
++  LIBREPLACEOBJ="${LIBREPLACEOBJ} $libreplacedir/timegm.o"
+ fi
+ done
+ 
+ 
+-
+-for ac_func in gettext dgettext
+-do
+-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
+-$as_echo_n "checking for $ac_func... " >&6; }
+-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for 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
+-  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.  */
+-/* 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
++if ac_fn_c_try_run "$LINENO"; then :
++  libreplace_cv_READDIR_NEEDED=no
++else
++  libreplace_cv_READDIR_NEEDED=yes
++fi
++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
++  conftest.$ac_objext conftest.beam conftest.$ac_ext
++fi
+ 
+-#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_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
+-   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
++for ac_func in dirfd
++do :
++  ac_fn_c_check_func "$LINENO" "dirfd" "ac_cv_func_dirfd"
++if test "x$ac_cv_func_dirfd" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_DIRFD 1
++_ACEOF
+ 
++fi
++done
++
++
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dirfd declaration" >&5
++$as_echo_n "checking for dirfd declaration... " >&6; }
++if test "${ac_cv_have_dirfd_decl+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++
 +    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 +/* end confdefs.h.  */
 +#include <dirent.h>
@@ -45353,17 +44616,13 @@
 -
 -	eval "$as_ac_var=no"
 +  ac_cv_have_dirfd_decl=no
-+fi
-+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_dirfd_decl" >&5
-+$as_echo "$ac_cv_have_dirfd_decl" >&6; }
-+ if test x"$ac_cv_have_dirfd_decl" = x"yes"; then
- 
+-
 -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_ext
+ fi
 -ac_res=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
@@ -45371,6 +44630,10 @@
 -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_have_dirfd_decl" >&5
++$as_echo "$ac_cv_have_dirfd_decl" >&6; }
++ if test x"$ac_cv_have_dirfd_decl" = x"yes"; then
++
 +$as_echo "#define HAVE_DIRFD_DECL 1" >>confdefs.h
 +
 + fi
@@ -45394,7 +44657,7 @@
  
 -
 -
--for ac_func in gettext dgettext
+-for ac_func in bindtextdomain textdomain
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
@@ -45740,7 +45003,7 @@
 +
 +$as_echo "#define REPLACE_READDIR_GETDIRENTRIES 1" >>confdefs.h
 +
-+	LIBREPLACEOBJ="${LIBREPLACEOBJ} repdir_getdirentries.o"
++	LIBREPLACEOBJ="${LIBREPLACEOBJ} $libreplacedir/repdir_getdirentries.o"
 +	libreplace_cv_READDIR_NEEDED=no
 +fi
 +
@@ -45776,13 +45039,7 @@
 +  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
 -#include <$ac_header>
-+
-+#define _LIBREPLACE_REPLACE_H
-+#error _donot_use_getdents_replacement_anymore
-+#include "$libreplacedir/repdir_getdents.c"
-+#define test_readdir_os2_delete main
-+#include "$libreplacedir/test/os2_delete.c"
- _ACEOF
+-_ACEOF
 -if { (ac_try="$ac_cpp conftest.$ac_ext"
 -case "(($ac_try" in
 -  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -45801,6 +45058,13 @@
 -	 test ! -s conftest.err
 -       }; then
 -  ac_header_preproc=yes
++
++#define _LIBREPLACE_REPLACE_H
++#error _donot_use_getdents_replacement_anymore
++#include "$libreplacedir/repdir_getdents.c"
++#define test_readdir_os2_delete main
++#include "$libreplacedir/test/os2_delete.c"
++_ACEOF
 +if ac_fn_c_try_run "$LINENO"; then :
 +  libreplace_cv_READDIR_GETDENTS=yes
  else
@@ -45864,7 +45128,7 @@
 +
 +$as_echo "#define REPLACE_READDIR_GETDENTS 1" >>confdefs.h
 +
-+	LIBREPLACEOBJ="${LIBREPLACEOBJ} repdir_getdents.o"
++	LIBREPLACEOBJ="${LIBREPLACEOBJ} $libreplacedir/repdir_getdents.o"
 +	libreplace_cv_READDIR_NEEDED=no
  fi
 -ac_res=`eval 'as_val=${'$as_ac_Header'}
@@ -45924,7 +45188,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -42989,105 +11165,25 @@
+@@ -42699,105 +10894,25 @@
  #ifdef __cplusplus
  extern "C"
  #endif
@@ -46040,7 +45304,7 @@
  
  /* Override any GCC internal prototype to avoid an error.
     Use char because int might match the return type of a GCC
-@@ -43095,1082 +11191,653 @@
+@@ -42805,1082 +10920,666 @@
  #ifdef __cplusplus
  extern "C"
  #endif
@@ -46092,13 +45356,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 :
@@ -46110,7 +45374,7 @@
 +$as_echo "#define HAVE_CRYPT 1" >>confdefs.h
 +
 +else
-+   LIBREPLACEOBJ="${LIBREPLACEOBJ} crypt.o"
++   LIBREPLACEOBJ="${LIBREPLACEOBJ} $libreplacedir/crypt.o"
  fi
 -ac_res=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
@@ -46121,7 +45385,7 @@
 -   if test "x$as_val" = x""yes; then
 +
 +
-+for ac_func in syslog printf memset memcpy
++for ac_func in printf memset memcpy
 +do :
 +  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
@@ -46141,12 +45405,24 @@
 -$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
++echo "LIBREPLACE_BROKEN_CHECKS: END"
++
++for ac_func in syslog
++do :
++  ac_fn_c_check_func "$LINENO" "syslog" "ac_cv_func_syslog"
++if test "x$ac_cv_func_syslog" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_SYSLOG 1
++_ACEOF
++
+ else
 -  ac_check_lib_save_LIBS=$LIBS
 -LIBS="-lexc  $LIBS"
 -cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
-+echo "LIBREPLACE_BROKEN_CHECKS: END"
++  as_fn_error "Required function not found" "$LINENO" 5
++fi
++done
 +
 +
 +echo "LIBREPLACE_NETWORK_CHECKS: START"
@@ -46283,7 +45559,8 @@
  fi
  
 +done
-+
+ 
+-# check for sysctlbyname for BSD systems
 +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"
@@ -46292,15 +45569,14 @@
 +#define HAVE_SYS_UIO_H 1
 +_ACEOF
  
--# check for sysctlbyname for BSD systems
-+fi
- 
 -for ac_func in sysctlbyname
 -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
++
 +done
 +
 +
@@ -46715,17 +45991,7 @@
 -	samba_cv_HAVE_ONEFS=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 addrinfo | sed 'y%abcdefghijklmnopqrstuvwxyz./- %ABCDEFGHIJKLMNOPQRSTUVWXYZ____%'`
-+if false; then
-+	ac_fn_c_check_type "$LINENO" "struct addrinfo" "ac_cv_type_struct_addrinfo" "$ac_includes_default"
-+if test "x$ac_cv_type_struct_addrinfo" = x""yes; then :
- 
+-
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
@@ -46734,20 +46000,28 @@
 -
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_ONEFS 1
-+cat >>confdefs.h <<_ACEOF
-+#define HAVE_STRUCT_ADDRINFO 1
- _ACEOF
- 
+-_ACEOF
+-
 -    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"
-+
++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 :
  
 -LIBS="$save_LIBS"
-+fi
++cat >>confdefs.h <<_ACEOF
++#define HAVE_STRUCT_ADDRINFO 1
++_ACEOF
  
 -# Note that all the libunwind symbols in the API are defined to internal
 -# platform-specific version, so we must include libunwind.h before checking
@@ -46755,9 +46029,6 @@
 -{ $as_echo "$as_me:$LINENO: checking for libunwind" >&5
 -$as_echo_n "checking for libunwind... " >&6; }
 -save_LIBS=$LIBS
-+cat >>confdefs.h <<_ACEOF
-+#define $ac_tr_hdr 1
-+_ACEOF
  
 -UNWIND_ARCH="unknown"
 -if test x"$UNAME_I" != x"unknown"; then
@@ -46784,10 +46055,13 @@
 -		LIBS="$LIBS -lunwind -lunwind-$UNWIND_ARCH"
 -		;;
 -esac
++fi
  
 -cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
--_ACEOF
++cat >>confdefs.h <<_ACEOF
++#define $ac_tr_hdr 1
+ _ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
@@ -46795,6 +46069,10 @@
 -#ifdef HAVE_LIBUNWIND_H
 -#include <libunwind.h>
 -#endif
++fi
++
++
+ 
 +cv=`echo "struct sockaddr" | sed 'y%./+- %__p__%'`
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct sockaddr" >&5
 +$as_echo_n "checking for struct sockaddr... " >&6; }
@@ -46803,7 +46081,7 @@
 +else
 +  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 +/* end confdefs.h.  */
- 
++
 +$ac_includes_default
 +#include <sys/socket.h>
  int
@@ -46856,20 +46134,20 @@
 +if false; then
 +	ac_fn_c_check_type "$LINENO" "struct sockaddr" "ac_cv_type_struct_sockaddr" "$ac_includes_default"
 +if test "x$ac_cv_type_struct_sockaddr" = x""yes; then :
- 
--	{ $as_echo "$as_me:$LINENO: result: yes" >&5
--$as_echo "yes" >&6; }
++
 +cat >>confdefs.h <<_ACEOF
 +#define HAVE_STRUCT_SOCKADDR 1
 +_ACEOF
-+
-+
-+fi
  
+-	{ $as_echo "$as_me:$LINENO: result: yes" >&5
+-$as_echo "yes" >&6; }
+ 
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_LIBUNWIND 1
 +fi
 +
++fi
++
 +cat >>confdefs.h <<_ACEOF
 +#define $ac_tr_hdr 1
  _ACEOF
@@ -47555,7 +46833,7 @@
  
  /* Override any GCC internal prototype to avoid an error.
     Use char because int might match the return type of a GCC
-@@ -44178,106 +11845,65 @@
+@@ -43888,106 +11587,131 @@
  #ifdef __cplusplus
  extern "C"
  #endif
@@ -47684,101 +46962,52 @@
 -    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
-@@ -44285,101 +11911,65 @@
- #ifdef __cplusplus
- extern "C"
++/* Override any GCC internal prototype to avoid an error.
++   Use char because int might match the return type of a GCC
++   builtin and then its argument prototype would still apply.  */
++#ifdef __cplusplus
++extern "C"
  #endif
--char $ac_func ();
--/* The GNU C library defines this for functions which it implements
--    to always fail with ENOSYS.  Some functions are actually named
--    something starting with __ and the normal name is an alias.  */
--#if defined __stub_$ac_func || defined __stub___$ac_func
--choke me
--#endif
--
 +char connect ();
- int
- main ()
- {
--return $ac_func ();
++int
++main ()
++{
 +return connect ();
-   ;
-   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"
++  ;
++  return 0;
++}
++_ACEOF
 +if ac_fn_c_try_link "$LINENO"; then :
 +  ac_cv_lib_ext_nsl_connect=yes;
 +		  ac_cv_lib_ext_nsl=yes
- else
--  $as_echo "$as_me: failed program was:" >&5
--sed 's/^/| /' conftest.$ac_ext >&5
++else
 +  ac_cv_lib_ext_nsl_connect=no;
 +		  ac_cv_lib_ext_nsl=no
 +fi
 +rm -f core conftest.err conftest.$ac_objext \
 +    conftest$ac_exeext conftest.$ac_ext
- 
--	eval "$as_ac_var=no"
- fi
++
++fi
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ext_nsl_connect" >&5
 +$as_echo "$ac_cv_lib_ext_nsl_connect" >&6; }
 +    if test $ac_cv_lib_ext_nsl_connect = yes; then :
 +  cat >>confdefs.h <<_ACEOF
 +#define HAVE_CONNECT 1
 +_ACEOF
- 
--rm -rf conftest.dSYM
--rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
--      conftest$ac_exeext conftest.$ac_ext
- 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
 +LIBS=$ac_check_lib_ext_save_LIBS
 +
 +if test $ac_cv_lib_ext_nsl = yes; then :
-   cat >>confdefs.h <<_ACEOF
--#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
++  cat >>confdefs.h <<_ACEOF
 +#define HAVE_LIBNSL 1
- _ACEOF
- 
++_ACEOF
++
 +		case "$LIBREPLACE_NETWORK_LIBS" in
 +		    *-lnsl*)
 +			;;
@@ -47788,53 +47017,26 @@
 +		esac
 +
 +
- fi
--done
- 
- 
++fi
++
++
 +ac_check_lib_ext_save_LIBS=$LIBS
 +LIBS="-lsocket $LIBREPLACE_NETWORK_LIBS  $LIBS"
 +
++
  
--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
-+
+-#undef $ac_func
 +        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
 +$as_echo_n "checking for connect in -lsocket... " >&6; }
 +if test "${ac_cv_lib_ext_socket_connect+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
--  cat >conftest.$ac_ext <<_ACEOF
--/* confdefs.h.  */
--_ACEOF
--cat confdefs.h >>conftest.$ac_ext
--cat >>conftest.$ac_ext <<_ACEOF
++  $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.  */
--
--#ifdef __STDC__
--# include <limits.h>
--#else
--# include <assert.h>
--#endif
--
--#undef $ac_func
++/* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
     Use char because int might match the return type of a GCC
-@@ -44387,102 +11977,65 @@
+@@ -43995,101 +11719,65 @@
  #ifdef __cplusplus
  extern "C"
  #endif
@@ -47889,9 +47091,8 @@
 +fi
 +rm -f core conftest.err conftest.$ac_objext \
 +    conftest$ac_exeext conftest.$ac_ext
- 
--	eval "$as_ac_var=no"
- fi
++
++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 :
@@ -47899,10 +47100,14 @@
 +#define HAVE_CONNECT 1
 +_ACEOF
  
+-	eval "$as_ac_var=no"
+ 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
+-fi
 -ac_res=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
@@ -47910,8 +47115,6 @@
 -as_val=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+LIBS=$ac_check_lib_ext_save_LIBS
-+
 +if test $ac_cv_lib_ext_socket = yes; then :
    cat >>confdefs.h <<_ACEOF
 -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
@@ -47933,15 +47136,15 @@
  
 +ac_check_lib_ext_save_LIBS=$LIBS
 +LIBS="-linet $LIBREPLACE_NETWORK_LIBS  $LIBS"
-+
  
- 
--for ac_func in __xstat __fxstat __lxstat
+-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 "$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 :
@@ -47973,7 +47176,7 @@
  
  /* Override any GCC internal prototype to avoid an error.
     Use char because int might match the return type of a GCC
-@@ -44490,105 +12043,88 @@
+@@ -44097,102 +11785,88 @@
  #ifdef __cplusplus
  extern "C"
  #endif
@@ -48023,42 +47226,28 @@
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
--	eval "$as_ac_var=no"
 +  ac_cv_lib_ext_inet_connect=no;
 +		  ac_cv_lib_ext_inet=no
- fi
++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
--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
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ext_inet_connect" >&5
 +$as_echo "$ac_cv_lib_ext_inet_connect" >&6; }
 +    if test $ac_cv_lib_ext_inet_connect = yes; then :
-   cat >>confdefs.h <<_ACEOF
--#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
++  cat >>confdefs.h <<_ACEOF
 +#define HAVE_CONNECT 1
- _ACEOF
- 
- fi
--done
++_ACEOF
++
++fi
 +LIBS=$ac_check_lib_ext_save_LIBS
- 
++
 +if test $ac_cv_lib_ext_inet = yes; then :
 +  cat >>confdefs.h <<_ACEOF
 +#define HAVE_LIBINET 1
 +_ACEOF
- 
++
 +		case "$LIBREPLACE_NETWORK_LIBS" in
 +		    *-linet*)
 +			;;
@@ -48066,76 +47255,89 @@
 +			LIBREPLACE_NETWORK_LIBS="-linet $LIBREPLACE_NETWORK_LIBS"
 +			;;
 +		esac
++
  
- 
-+fi
+-	eval "$as_ac_var=no"
+ 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
  
+-rm -rf conftest.dSYM
+-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+-      conftest$ac_exeext conftest.$ac_ext
 +$as_echo "#define HAVE_CONNECT 1" >>confdefs.h
- 
++
 +	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
++
++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_func" | $as_tr_cpp` 1
++#define HAVE_GETHOSTBYNAME 1
+ _ACEOF
  
--for ac_func in _stat _lstat _fstat __stat __lstat __fstat
+ fi
+ done
+ 
++if test x"$ac_cv_func_gethostbyname" = x"no"; then
++
+ 
++ac_check_lib_ext_save_LIBS=$LIBS
++LIBS="-lnsl_s $LIBREPLACE_NETWORK_LIBS  $LIBS"
+ 
+ 
+-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
--else
++
++        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl_s" >&5
++$as_echo_n "checking for gethostbyname in -lnsl_s... " >&6; }
++if test "${ac_cv_lib_ext_nsl_s_gethostbyname+set}" = set; then :
+   $as_echo_n "(cached) " >&6
+ else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
-+for ac_func in gethostbyname
-+do :
-+  ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
-+if test "x$ac_cv_func_gethostbyname" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define HAVE_GETHOSTBYNAME 1
- _ACEOF
+-_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
--/* 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.  */
-+fi
-+done
-+
-+if test x"$ac_cv_func_gethostbyname" = x"no"; then
-+
-+
-+ac_check_lib_ext_save_LIBS=$LIBS
-+LIBS="-lnsl_s $LIBREPLACE_NETWORK_LIBS  $LIBS"
- 
+-
 -#ifdef __STDC__
 -# include <limits.h>
 -#else
 -# include <assert.h>
 -#endif
- 
+-
 -#undef $ac_func
-+
-+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl_s" >&5
-+$as_echo_n "checking for gethostbyname in -lnsl_s... " >&6; }
-+if test "${ac_cv_lib_ext_nsl_s_gethostbyname+set}" = set; then :
-+  $as_echo_n "(cached) " >&6
-+else
-+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
     Use char because int might match the return type of a GCC
-@@ -44596,107 +12132,65 @@
+@@ -44200,105 +11874,65 @@
  #ifdef __cplusplus
  extern "C"
  #endif
@@ -48236,14 +47438,14 @@
 +ac_check_lib_ext_save_LIBS=$LIBS
 +LIBS="-lnsl $LIBREPLACE_NETWORK_LIBS  $LIBS"
  
- 
- 
--for ac_func in _acl __acl _facl __facl _open __open _chdir __chdir
+-for ac_func in _stat _lstat _fstat __stat __lstat __fstat
 -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 -lnsl" >&5
 +$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
 +if test "${ac_cv_lib_ext_nsl_gethostbyname+set}" = set; then :
@@ -48275,7 +47477,7 @@
  
  /* Override any GCC internal prototype to avoid an error.
     Use char because int might match the return type of a GCC
-@@ -44704,105 +12198,65 @@
+@@ -44306,107 +11940,65 @@
  #ifdef __cplusplus
  extern "C"
  #endif
@@ -48360,7 +47562,7 @@
 +  cat >>confdefs.h <<_ACEOF
 +#define HAVE_LIBNSL 1
 +_ACEOF
-+
+ 
 +		case "$LIBREPLACE_NETWORK_LIBS" in
 +		    *-lnsl*)
 +			;;
@@ -48377,13 +47579,13 @@
 +LIBS="-lsocket $LIBREPLACE_NETWORK_LIBS  $LIBS"
  
  
--for ac_func in _close __close _fchdir __fchdir _fcntl __fcntl
+ 
+-for ac_func in _acl __acl _facl __facl _open __open _chdir __chdir
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
 -$as_echo_n "checking for $ac_func... " >&6; }
 -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-+
 +        { $as_echo "$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 :
@@ -48415,7 +47617,7 @@
  
  /* Override any GCC internal prototype to avoid an error.
     Use char because int might match the return type of a GCC
-@@ -44810,105 +12264,87 @@
+@@ -44414,105 +12006,87 @@
  #ifdef __cplusplus
  extern "C"
  #endif
@@ -48521,7 +47723,7 @@
 +	fi
 +fi
  
--for ac_func in getdents __getdents _lseek __lseek _read __read
+-for ac_func in _close __close _fchdir __fchdir _fcntl __fcntl
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
@@ -48553,11 +47755,6 @@
 +done
 +
 +if test x"$ac_cv_func_if_nametoindex" = x"no"; then
-+
-+
-+ac_check_lib_ext_save_LIBS=$LIBS
-+LIBS="-lipv6 $LIBREPLACE_NETWORK_LIBS  $LIBS"
-+
  
 -#ifdef __STDC__
 -# include <limits.h>
@@ -48566,6 +47763,11 @@
 -#endif
  
 -#undef $ac_func
++ac_check_lib_ext_save_LIBS=$LIBS
++LIBS="-lipv6 $LIBREPLACE_NETWORK_LIBS  $LIBS"
++
++
++
 +        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for if_nametoindex in -lipv6" >&5
 +$as_echo_n "checking for if_nametoindex in -lipv6... " >&6; }
 +if test "${ac_cv_lib_ext_ipv6_if_nametoindex+set}" = set; then :
@@ -48576,7 +47778,7 @@
  
  /* Override any GCC internal prototype to avoid an error.
     Use char because int might match the return type of a GCC
-@@ -44916,2855 +12352,2216 @@
+@@ -44520,2540 +12094,2283 @@
  #ifdef __cplusplus
  extern "C"
  #endif
@@ -48626,14 +47828,21 @@
  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
@@ -48645,22 +47854,13 @@
 -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
+   cat >>confdefs.h <<_ACEOF
+-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 +#define HAVE_LIBIPV6 1
-+_ACEOF
+ _ACEOF
  
 +		case "$LIBREPLACE_NETWORK_LIBS" in
 +		    *-lipv6*)
@@ -48669,9 +47869,10 @@
 +			LIBREPLACE_NETWORK_LIBS="-lipv6 $LIBREPLACE_NETWORK_LIBS"
 +			;;
 +		esac
- 
- 
-+fi
++
++
+ fi
+-done
 +			if test x"$ac_cv_lib_ext_ipv6_if_nametoindex" = x"yes"
 +	then
  
@@ -48680,29 +47881,40 @@
 +	fi
 +fi
  
--for ac_func in getdirentries _write __write _fork __fork
--do
--as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
--{ $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.  */
 +# The following tests need LIBS="${LIBREPLACE_NETWORK_LIBS}"
 +old_LIBS=$LIBS
 +LIBS="${LIBREPLACE_NETWORK_LIBS}"
 +libreplace_SAVE_CPPFLAGS="$CPPFLAGS"
 +CPPFLAGS="$CPPFLAGS -I$libreplacedir"
-+
+ 
 +for ac_func in socketpair
 +do :
 +  ac_fn_c_check_func "$LINENO" "socketpair" "ac_cv_func_socketpair"
 +if test "x$ac_cv_func_socketpair" = x""yes; then :
 +  cat >>confdefs.h <<_ACEOF
 +#define HAVE_SOCKETPAIR 1
- _ACEOF
++_ACEOF
+ 
++else
++  LIBREPLACE_NETWORK_OBJS="${LIBREPLACE_NETWORK_OBJS} $libreplacedir/socketpair.o"
++fi
++done
+ 
+ 
+-for ac_func in getdents __getdents _lseek __lseek _read __read
+-do
+-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+-{ $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 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
+-  cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
@@ -48714,24 +47926,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.  */
++if test "$cross_compiling" = yes; then :
++  libreplace_cv_REPLACE_INET_NTOA=cross
 +else
-+  LIBREPLACE_NETWORK_OBJS="${LIBREPLACE_NETWORK_OBJS} socketpair.o"
-+fi
-+done
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
  
 -#ifdef __STDC__
 -# include <limits.h>
 -#else
 -# include <assert.h>
--#endif
++#include <stdio.h>
++#include <unistd.h>
++#include <sys/types.h>
++#include <netinet/in.h>
++#ifdef HAVE_ARPA_INET_H
++#include <arpa/inet.h>
+ #endif
++main() { struct in_addr ip; ip.s_addr = 0x12345678;
++if (strcmp(inet_ntoa(ip),"18.52.86.120") &&
++    strcmp(inet_ntoa(ip),"120.86.52.18")) { exit(0); }
++exit(1);}
++_ACEOF
++if ac_fn_c_try_run "$LINENO"; then :
++  libreplace_cv_REPLACE_INET_NTOA=yes
++else
++  libreplace_cv_REPLACE_INET_NTOA=no
++fi
++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
++  conftest.$ac_objext conftest.beam conftest.$ac_ext
++fi
  
 -#undef $ac_func
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken inet_ntoa" >&5
-+$as_echo_n "checking for broken inet_ntoa... " >&6; }
-+if test "${libreplace_cv_REPLACE_INET_NTOA+set}" = set; then :
-+  $as_echo_n "(cached) " >&6
-+else
- 
+-
 -/* Override any GCC internal prototype to avoid an error.
 -   Use char because int might match the return type of a GCC
 -   builtin and then its argument prototype would still apply.  */
@@ -48745,11 +47972,9 @@
 -#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.  */
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libreplace_cv_REPLACE_INET_NTOA" >&5
++$as_echo "$libreplace_cv_REPLACE_INET_NTOA" >&6; }
  
 -int
 -main ()
@@ -48758,17 +47983,12 @@
 -  ;
 -  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); }
-+exit(1);}
++for ac_func in inet_ntoa
++do :
++  ac_fn_c_check_func "$LINENO" "inet_ntoa" "ac_cv_func_inet_ntoa"
++if test "x$ac_cv_func_inet_ntoa" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_INET_NTOA 1
  _ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
@@ -48792,22 +48012,24 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  eval "$as_ac_var=yes"
-+if ac_fn_c_try_run "$LINENO"; then :
-+  libreplace_cv_REPLACE_INET_NTOA=yes
- else
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
+ 
 -	eval "$as_ac_var=no"
-+  libreplace_cv_REPLACE_INET_NTOA=no
-+fi
-+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-+  conftest.$ac_objext conftest.beam conftest.$ac_ext
++else
++  libreplace_cv_REPLACE_INET_NTOA=yes
  fi
++done
++
++if test x"$libreplace_cv_REPLACE_INET_NTOA" = x"yes"; then
++
++$as_echo "#define REPLACE_INET_NTOA 1" >>confdefs.h
  
 -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_OBJS} $libreplacedir/inet_ntoa.o"
  fi
 -ac_res=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
@@ -48816,53 +48038,45 @@
 -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: $libreplace_cv_REPLACE_INET_NTOA" >&5
-+$as_echo "$libreplace_cv_REPLACE_INET_NTOA" >&6; }
 +
-+for ac_func in inet_ntoa
++for ac_func in inet_aton
 +do :
-+  ac_fn_c_check_func "$LINENO" "inet_ntoa" "ac_cv_func_inet_ntoa"
-+if test "x$ac_cv_func_inet_ntoa" = x""yes; then :
++  ac_fn_c_check_func "$LINENO" "inet_aton" "ac_cv_func_inet_aton"
++if test "x$ac_cv_func_inet_aton" = x""yes; then :
    cat >>confdefs.h <<_ACEOF
 -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-+#define HAVE_INET_NTOA 1
++#define HAVE_INET_ATON 1
  _ACEOF
  
 +else
-+  libreplace_cv_REPLACE_INET_NTOA=yes
++  LIBREPLACE_NETWORK_OBJS="${LIBREPLACE_NETWORK_OBJS} $libreplacedir/inet_aton.o"
  fi
  done
  
-+if test x"$libreplace_cv_REPLACE_INET_NTOA" = x"yes"; then
-+
-+$as_echo "#define REPLACE_INET_NTOA 1" >>confdefs.h
  
-+    LIBREPLACE_NETWORK_OBJS="${LIBREPLACE_NETWORK_OBJS} inet_ntoa.o"
-+fi
- 
-+for ac_func in inet_aton
++for ac_func in inet_ntop
 +do :
-+  ac_fn_c_check_func "$LINENO" "inet_aton" "ac_cv_func_inet_aton"
-+if test "x$ac_cv_func_inet_aton" = x""yes; then :
++  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_ATON 1
++#define HAVE_INET_NTOP 1
 +_ACEOF
  
 +else
-+  LIBREPLACE_NETWORK_OBJS="${LIBREPLACE_NETWORK_OBJS} inet_aton.o"
++  LIBREPLACE_NETWORK_OBJS="${LIBREPLACE_NETWORK_OBJS} $libreplacedir/inet_ntop.o"
 +fi
 +done
  
  
-+for ac_func in inet_ntop
++for ac_func in inet_pton
 +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 :
++  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_NTOP 1
++#define HAVE_INET_PTON 1
 +_ACEOF
  
--for ac_func in _stat64 __stat64 _fstat64 __fstat64 _lstat64 __lstat64
+-for ac_func in getdirentries _write __write _fork __fork
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
@@ -48872,47 +48086,37 @@
  else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
-+  LIBREPLACE_NETWORK_OBJS="${LIBREPLACE_NETWORK_OBJS} inet_ntop.o"
-+fi
-+done
-+
-+
-+for ac_func in inet_pton
-+do :
-+  ac_fn_c_check_func "$LINENO" "inet_pton" "ac_cv_func_inet_pton"
-+if test "x$ac_cv_func_inet_pton" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define HAVE_INET_PTON 1
- _ACEOF
+-_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/inet_pton.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} inet_pton.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 getaddrinfo" >&5
 +$as_echo_n "checking for getaddrinfo... " >&6; }
 +if test "${libreplace_cv_HAVE_GETADDRINFO+set}" = set; then :
 +  $as_echo_n "(cached) " >&6
 +else
  
+-#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.  */
@@ -48925,15 +48129,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
@@ -48987,20 +48188,17 @@
 -
 -	eval "$as_ac_var=no"
 +  libreplace_cv_HAVE_GETADDRINFO=no
-+fi
+ fi
 +rm -f core conftest.err conftest.$ac_objext \
 +    conftest$ac_exeext conftest.$ac_ext
- fi
++fi
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libreplace_cv_HAVE_GETADDRINFO" >&5
 +$as_echo "$libreplace_cv_HAVE_GETADDRINFO" >&6; }
 +if test x"$libreplace_cv_HAVE_GETADDRINFO" = x"yes"; then
 +
 +$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
 +
- 
--rm -rf conftest.dSYM
--rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
--      conftest$ac_exeext conftest.$ac_ext
++
 +$as_echo "#define HAVE_GETNAMEINFO 1" >>confdefs.h
 +
 +
@@ -49008,9 +48206,12 @@
 +
 +
 +$as_echo "#define HAVE_GAI_STRERROR 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
 +else
-+	LIBREPLACE_NETWORK_OBJS="${LIBREPLACE_NETWORK_OBJS} getaddrinfo.o"
++	LIBREPLACE_NETWORK_OBJS="${LIBREPLACE_NETWORK_OBJS} $libreplacedir/getaddrinfo.o"
  fi
 -ac_res=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
@@ -49037,7 +48238,7 @@
 +ac_fn_c_check_member "$LINENO" "struct sockaddr" "sa_len" "ac_cv_member_struct_sockaddr_sa_len" "#include <sys/socket.h>
 +"
 +if test "x$ac_cv_member_struct_sockaddr_sa_len" = x""yes; then :
- 
++
 +cat >>confdefs.h <<_ACEOF
 +#define HAVE_STRUCT_SOCKADDR_SA_LEN 1
 +_ACEOF
@@ -49048,7 +48249,7 @@
 +fi
  
  
--for ac_func in __sys_llseek llseek _llseek __llseek readdir64 _readdir64 __readdir64
+-for ac_func in _stat64 __stat64 _fstat64 __fstat64 _lstat64 __lstat64
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
@@ -49149,12 +48350,26 @@
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	eval "$as_ac_var=no"
--fi
--
++  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
-+  libreplace_cv_HAVE_GETIFADDRS=no
  fi
 -ac_res=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
@@ -49165,59 +48380,22 @@
 -   if test "x$as_val" = x""yes; then
 -  cat >>confdefs.h <<_ACEOF
 -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
--_ACEOF
--
-+rm -f core conftest.err conftest.$ac_objext \
-+    conftest$ac_exeext conftest.$ac_ext
- fi
--done
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libreplace_cv_HAVE_GETIFADDRS" >&5
-+$as_echo "$libreplace_cv_HAVE_GETIFADDRS" >&6; }
-+if test x"$libreplace_cv_HAVE_GETIFADDRS" = x"yes"; then
- 
-+$as_echo "#define HAVE_GETIFADDRS 1" >>confdefs.h
- 
- 
-+$as_echo "#define HAVE_FREEIFADDRS 1" >>confdefs.h
- 
- 
-+$as_echo "#define HAVE_STRUCT_IFADDRS 1" >>confdefs.h
- 
-+fi
- 
--for ac_func in pread _pread __pread pread64 _pread64 __pread64
--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
++
 +##################
 +# look for a method of finding the list of network interfaces
 +iface=no;
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for iface getifaddrs" >&5
 +$as_echo_n "checking for iface getifaddrs... " >&6; }
 +if test "${libreplace_cv_HAVE_IFACE_GETIFADDRS+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
--  cat >conftest.$ac_ext <<_ACEOF
--/* confdefs.h.  */
--_ACEOF
--cat confdefs.h >>conftest.$ac_ext
--cat >>conftest.$ac_ext <<_ACEOF
++  $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 $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.  */
++
 +#define HAVE_IFACE_GETIFADDRS 1
 +#define NO_CONFIG_H 1
 +#define AUTOCONF_TEST 1
@@ -49228,7 +48406,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
@@ -49238,57 +48416,32 @@
 +  conftest.$ac_objext conftest.beam conftest.$ac_ext
 +fi
  
--#ifdef __STDC__
--# include <limits.h>
--#else
--# include <assert.h>
--#endif
-+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
- 
--#undef $ac_func
++
 +else
-+	LIBREPLACE_NETWORK_OBJS="${LIBREPLACE_NETWORK_OBJS} getifaddrs.o"
++	LIBREPLACE_NETWORK_OBJS="${LIBREPLACE_NETWORK_OBJS} $libreplacedir/getifaddrs.o"
 +fi
  
--/* Override any GCC internal prototype to avoid an error.
--   Use char because int might match the return type of a GCC
--   builtin and then its argument prototype would still apply.  */
--#ifdef __cplusplus
--extern "C"
--#endif
--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;
--}
 +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
@@ -49300,70 +48453,41 @@
 +#include "$libreplacedir/getifaddrs.c"
 +#define getifaddrs_test main
 +#include "$libreplacedir/test/getifaddrs.c"
- _ACEOF
--rm -f conftest.$ac_objext conftest$ac_exeext
--if { (ac_try="$ac_link"
--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"
++_ACEOF
 +if ac_fn_c_try_run "$LINENO"; then :
 +  libreplace_cv_HAVE_IFACE_AIX=yes
- else
--  $as_echo "$as_me: failed program was:" >&5
--sed 's/^/| /' conftest.$ac_ext >&5
++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
  
--	eval "$as_ac_var=no"
- fi
++fi
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libreplace_cv_HAVE_IFACE_AIX" >&5
 +$as_echo "$libreplace_cv_HAVE_IFACE_AIX" >&6; }
 +if test x"$libreplace_cv_HAVE_IFACE_AIX" = x"yes"; then
 +    iface=yes;
 +$as_echo "#define HAVE_IFACE_AIX 1" >>confdefs.h
  
--rm -rf conftest.dSYM
--rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
--      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
 +fi
-+
-+
++fi
+ 
+ 
+-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`
+-{ $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
+   $as_echo_n "(cached) " >&6
+ else
+-  cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
 +
 +if test "$cross_compiling" = yes; then :
 +  libreplace_cv_HAVE_IFACE_IFCONF=cross
@@ -49382,6 +48506,8 @@
 +#define getifaddrs_test main
 +#include "$libreplacedir/test/getifaddrs.c"
  _ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
 +if ac_fn_c_try_run "$LINENO"; then :
 +  libreplace_cv_HAVE_IFACE_IFCONF=yes
 +else
@@ -49390,31 +48516,37 @@
 +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
 +  conftest.$ac_objext conftest.beam conftest.$ac_ext
 +fi
- 
- fi
--done
++
++fi
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libreplace_cv_HAVE_IFACE_IFCONF" >&5
 +$as_echo "$libreplace_cv_HAVE_IFACE_IFCONF" >&6; }
 +if test x"$libreplace_cv_HAVE_IFACE_IFCONF" = x"yes"; then
 +    iface=yes;
 +$as_echo "#define HAVE_IFACE_IFCONF 1" >>confdefs.h
- 
++
 +fi
 +fi
- 
++
 +if test $iface = no; then
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for iface ifreq" >&5
 +$as_echo_n "checking for iface ifreq... " >&6; }
 +if test "${libreplace_cv_HAVE_IFACE_IFREQ+set}" = set; then :
 +  $as_echo_n "(cached) " >&6
 +else
- 
++
 +if test "$cross_compiling" = yes; then :
 +  libreplace_cv_HAVE_IFACE_IFREQ=cross
 +else
 +  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h.  */
+ /* 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 HAVE_IFACE_IFREQ 1
 +#define NO_CONFIG_H 1
 +#define AUTOCONF_TEST 1
@@ -49435,6 +48567,11 @@
 +  conftest.$ac_objext conftest.beam conftest.$ac_ext
 +fi
  
+-#ifdef __STDC__
+-# include <limits.h>
+-#else
+-# include <assert.h>
+-#endif
 +fi
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libreplace_cv_HAVE_IFACE_IFREQ" >&5
 +$as_echo "$libreplace_cv_HAVE_IFACE_IFREQ" >&6; }
@@ -49442,53 +48579,10 @@
 +    iface=yes;
 +$as_echo "#define HAVE_IFACE_IFREQ 1" >>confdefs.h
  
+-#undef $ac_func
 +fi
 +fi
  
--for ac_func in pwrite _pwrite __pwrite pwrite64 _pwrite64 __pwrite64
--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 ipv6 support" >&5
-+$as_echo_n "checking for ipv6 support... " >&6; }
-+if test "${libreplace_cv_HAVE_IPV6+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
--  cat >conftest.$ac_ext <<_ACEOF
--/* 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.  */
-+	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h.  */
- 
--#ifdef __STDC__
--# include <limits.h>
--#else
--# include <assert.h>
--#endif
-+#include <stdlib.h> /* for NULL */
-+#include <sys/socket.h>
-+#include <sys/types.h>
-+#include <netdb.h>
-+#include <netinet/in.h>
- 
--#undef $ac_func
-+int
-+main ()
-+{
- 
 -/* Override any GCC internal prototype to avoid an error.
 -   Use char because int might match the return type of a GCC
 -   builtin and then its argument prototype would still apply.  */
@@ -49502,6 +48596,26 @@
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
 -#endif
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ipv6 support" >&5
++$as_echo_n "checking for ipv6 support... " >&6; }
++if test "${libreplace_cv_HAVE_IPV6+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++
++	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++
++#include <stdlib.h> /* for NULL */
++#include <sys/socket.h>
++#include <sys/types.h>
++#include <netdb.h>
++#include <netinet/in.h>
+ 
+ int
+ main ()
+ {
+-return $ac_func ();
++
 +struct sockaddr_storage sa_store;
 +struct addrinfo *ai = NULL;
 +struct in6_addr in6addr;
@@ -49512,11 +48626,7 @@
 +	const char *es = gai_strerror(ret);
 +}
 +freeaddrinfo(ai);
- 
--int
--main ()
--{
--return $ac_func ();
++
    ;
    return 0;
  }
@@ -49589,7 +48699,11 @@
 +echo "LIBREPLACE_NETWORK_CHECKS: END"
  
  
--for ac_func in open64 _open64 __open64 creat64
++CPPFLAGS="${SAVE_CPPFLAGS}"
+ 
++LIBREPLACE_DIR=`echo ${libreplacedir} | sed -e "s;${srcdir};;" -e "s;^/;;"`
+ 
+-for ac_func in pread _pread __pread pread64 _pread64 __pread64
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
@@ -49606,23 +48720,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
-+CPPFLAGS="${SAVE_CPPFLAGS}"
++LIBREPLACE_OBJS="${LIBREPLACEOBJ}"
  
 -/* 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_DIR=`echo ${libreplacedir} | sed -e "s;${srcdir};;" -e "s;^/;;"`
  
 -#ifdef __STDC__
 -# include <limits.h>
 -#else
 -# include <assert.h>
 -#endif
-+LIBREPLACE_OBJS=""
-+for obj in ${LIBREPLACEOBJ}; do
-+	LIBREPLACE_OBJS="${LIBREPLACE_OBJS} ${LIBREPLACE_DIR}/${obj}"
-+done
++LIBREPLACE_LIBS="${LIBREPLACE_NETWORK_LIBS}"
  
 -#undef $ac_func
  
@@ -49639,9 +48749,6 @@
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
 -#endif
-+# add -ldl to the global LIBS
-+LIBS="${LIBS} ${LIBDL} ${LIBREPLACE_NETWORK_LIBS}"
-+AUTH_LIBS="${AUTH_LIBS} ${CRYPT_LIBS}"
  
 -int
 -main ()
@@ -49650,7 +48757,11 @@
 -  ;
 -  return 0;
 -}
++# add -ldl to the global LIBS
++LIBS="${LIBS} ${LIBDL} ${LIBREPLACE_NETWORK_LIBS}"
++AUTH_LIBS="${AUTH_LIBS} ${CRYPT_LIBS}"
 +
++
 +for ac_header in aio.h sys/fcntl.h sys/select.h fcntl.h sys/time.h sys/unistd.h rpc/nettype.h
 +do :
 +  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
@@ -49714,11 +48825,38 @@
  _ACEOF
  
  fi
--done
++
+ done
  
++for ac_header in limits.h float.h libintl.h
++do :
++  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
++ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
++eval as_val=\$$as_ac_Header
++   if test "x$as_val" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
++_ACEOF
+ 
++fi
+ 
 +done
  
--for ac_func in prctl
++for ac_header in rpc/rpc.h rpcsvc/nis.h rpcsvc/ypclnt.h
++do :
++  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
++ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
++eval as_val=\$$as_ac_Header
++   if test "x$as_val" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
++_ACEOF
+ 
++fi
+ 
++done
+ 
+-for ac_func in pwrite _pwrite __pwrite pwrite64 _pwrite64 __pwrite64
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
@@ -49728,7 +48866,7 @@
 -else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
-+for ac_header in limits.h float.h pthread.h libintl.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"
@@ -49756,8 +48894,9 @@
 -# include <assert.h>
 -#endif
 +done
-+
-+for ac_header in rpc/rpc.h rpcsvc/nis.h rpcsvc/ypclnt.h
+ 
+-#undef $ac_func
++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"
@@ -49767,9 +48906,6 @@
 +#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.  */
@@ -49783,7 +48919,7 @@
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
 -#endif
-+done
++fi
  
 -int
 -main ()
@@ -49792,7 +48928,9 @@
 -  ;
 -  return 0;
 -}
-+for ac_header in sys/param.h ctype.h sys/wait.h sys/resource.h sys/ioctl.h sys/ipc.h sys/prctl.h sys/sysctl.h
++done
++
++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"
@@ -49843,7 +48981,7 @@
 -   if test "x$as_val" = x""yes; then
 +done
 +
-+for ac_header in sys/mman.h sys/filio.h sys/priv.h sys/shm.h string.h strings.h stdlib.h
++for ac_header in sys/termio.h sys/statfs.h sys/dustat.h sys/statvfs.h stdarg.h
 +do :
 +  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
@@ -49859,111 +48997,29 @@
  
 +done
  
--cat >conftest.$ac_ext <<_ACEOF
--/* confdefs.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 :
-+  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.  */
- 
--#ifdef HAVE_SYS_PRCTL_H
--#include <sys/prctl.h>
--#endif
-+fi
- 
--int
--main ()
--{
--int i; i = prtcl(0);
--  ;
--  return 0;
--}
-+done
-+
-+for ac_header in sys/termio.h sys/statfs.h sys/dustat.h sys/statvfs.h stdarg.h
-+do :
-+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-+eval as_val=\$$as_ac_Header
-+   if test "x$as_val" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
- _ACEOF
--rm -f conftest.$ac_objext
--if { (ac_try="$ac_compile"
--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
- 
--cat >>confdefs.h <<\_ACEOF
--#define HAVE_PRCTL 1
-+fi
-+
-+done
-+
 +for ac_header in sys/sysmacros.h
 +do :
 +  ac_fn_c_check_header_mongrel "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default"
 +if test "x$ac_cv_header_sys_sysmacros_h" = x""yes; then :
 +  cat >>confdefs.h <<_ACEOF
 +#define HAVE_SYS_SYSMACROS_H 1
- _ACEOF
++_ACEOF
  
--else
--  $as_echo "$as_me: failed program was:" >&5
--sed 's/^/| /' conftest.$ac_ext >&5
 +fi
  
 +done
-+
-+for ac_header in sys/syslog.h syslog.h
-+do :
-+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-+eval as_val=\$$as_ac_Header
-+   if test "x$as_val" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-+_ACEOF
  
- fi
- 
--rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-+done
- 
--#
--#
--#
--case "$host_os" in
--    *linux* | gnu* | k*bsd*-gnu | kopensolaris*-gnu)
--       # glibc <= 2.3.2 has a broken getgrouplist
--       if test "$cross_compiling" = yes; then
--  linux_getgrouplist_ok=cross
+-for ac_func in open64 _open64 __open64 creat64
+-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_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"
@@ -49975,143 +49031,34 @@
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* 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__;
-+fi
- 
--       if (libc_major < 2)
--              exit(1);
--       if ((libc_major == 2) && (libc_minor <= 3))
--              exit(1);
--#endif
--       exit(0);
--}
-+done
- 
-+for ac_header in xfs/libxfs.h
-+do :
-+  ac_fn_c_check_header_mongrel "$LINENO" "xfs/libxfs.h" "ac_cv_header_xfs_libxfs_h" "$ac_includes_default"
-+if test "x$ac_cv_header_xfs_libxfs_h" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define HAVE_XFS_LIBXFS_H 1
- _ACEOF
--rm -f conftest$ac_exeext
--if { (ac_try="$ac_link"
--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>&5
--  ac_status=$?
--  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
--  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
--  { (case "(($ac_try" in
--  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
--  *) ac_try_echo=$ac_try;;
--esac
--eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
--$as_echo "$ac_try_echo") >&5
--  (eval "$ac_try") 2>&5
--  ac_status=$?
--  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
--  (exit $ac_status); }; }; then
--  linux_getgrouplist_ok=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 )
--linux_getgrouplist_ok=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
-+
-+done
-+
-+for ac_header in netgroup.h
-+do :
-+  ac_fn_c_check_header_mongrel "$LINENO" "netgroup.h" "ac_cv_header_netgroup_h" "$ac_includes_default"
-+if test "x$ac_cv_header_netgroup_h" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define HAVE_NETGROUP_H 1
-+_ACEOF
-+
- fi
- 
-+done
- 
--       if test x"$linux_getgrouplist_ok" = x"yes"; then
- 
--cat >>confdefs.h <<\_ACEOF
--#define HAVE_GETGROUPLIST 1
-+for ac_header in rpcsvc/yp_prot.h
-+do :
-+  ac_fn_c_check_header_compile "$LINENO" "rpcsvc/yp_prot.h" "ac_cv_header_rpcsvc_yp_prot_h" "
-+#if HAVE_RPC_RPC_H
-+#include <rpc/rpc.h>
-+#endif
-+
-+"
-+if test "x$ac_cv_header_rpcsvc_yp_prot_h" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define HAVE_RPCSVC_YP_PROT_H 1
- _ACEOF
- 
--       fi
--       ;;
--    *)
-+fi
- 
--for ac_func in getgrouplist
--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
-+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.  */
++fi
  
 -#ifdef __STDC__
 -# include <limits.h>
 -#else
 -# include <assert.h>
 -#endif
-+## These fail to compile on IRIX so just check for their presence
-+for ac_header in sys/mode.h
++done
+ 
+-#undef $ac_func
++for ac_header in langinfo.h locale.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 :
++  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_SYS_MODE_H 1
++#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.  */
@@ -50125,7 +49072,7 @@
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
 -#endif
-+done
++fi
  
 -int
 -main ()
@@ -50134,16 +49081,26 @@
 -  ;
 -  return 0;
 -}
++done
 +
-+# Look for Darwin headers
-+old_CPPFLAGS="$CPPFLAGS"
-+CPPFLAGS="-Iinclude $CPPFLAGS"
-+for ac_header in CoreFoundation/CFStringEncodingConverter.h
++for ac_header in xfs/libxfs.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 :
++  ac_fn_c_check_header_mongrel "$LINENO" "xfs/libxfs.h" "ac_cv_header_xfs_libxfs_h" "$ac_includes_default"
++if test "x$ac_cv_header_xfs_libxfs_h" = x""yes; then :
 +  cat >>confdefs.h <<_ACEOF
-+#define HAVE_COREFOUNDATION_CFSTRINGENCODINGCONVERTER_H 1
++#define HAVE_XFS_LIBXFS_H 1
++_ACEOF
++
++fi
++
++done
++
++for ac_header in netgroup.h
++do :
++  ac_fn_c_check_header_mongrel "$LINENO" "netgroup.h" "ac_cv_header_netgroup_h" "$ac_includes_default"
++if test "x$ac_cv_header_netgroup_h" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_NETGROUP_H 1
  _ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
@@ -50167,17 +49124,9 @@
 -	 $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
-+  for ac_header in CFStringEncodingConverter.h
-+do :
-+  ac_fn_c_check_header_mongrel "$LINENO" "CFStringEncodingConverter.h" "ac_cv_header_CFStringEncodingConverter_h" "$ac_includes_default"
-+if test "x$ac_cv_header_CFStringEncodingConverter_h" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define HAVE_CFSTRINGENCODINGCONVERTER_H 1
-+_ACEOF
  
 -	eval "$as_ac_var=no"
  fi
@@ -50187,6 +49136,20 @@
 -      conftest$ac_exeext conftest.$ac_ext
 +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
++
++"
++if test "x$ac_cv_header_rpcsvc_yp_prot_h" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_RPCSVC_YP_PROT_H 1
++_ACEOF
++
  fi
 -ac_res=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
@@ -50198,6 +49161,75 @@
 +
 +done
 +
++
++## 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 `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
++#define HAVE_SYS_MODE_H 1
+ _ACEOF
+ 
+ fi
++
+ done
+ 
+ 
+-for ac_func in prctl
+-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
++# 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
++
+ else
+-  cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
++  for ac_header in CFStringEncodingConverter.h
++do :
++  ac_fn_c_check_header_mongrel "$LINENO" "CFStringEncodingConverter.h" "ac_cv_header_CFStringEncodingConverter_h" "$ac_includes_default"
++if test "x$ac_cv_header_CFStringEncodingConverter_h" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_CFSTRINGENCODINGCONVERTER_H 1
+ _ACEOF
+-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
++
++fi
+ 
+-#undef $ac_func
++done
++
 +CPPFLAGS="$old_CPPFLAGS"
 +
 +# In valgrind 1.0.x, it's just valgrind.h.  In 1.9.x+ there's a
@@ -50208,47 +49240,41 @@
 +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
++  cat >>confdefs.h <<_ACEOF
 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
- _ACEOF
- 
- fi
++_ACEOF
 +
- done
++fi
++
++done
  
--       ;;
--esac
+-/* Override any GCC internal prototype to avoid an error.
+-   Use char because int might match the return type of a GCC
+-   builtin and then its argument prototype would still apply.  */
+-#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
  
- #
--# stat64 family may need <sys/stat.h> on some systems, notably ReliantUNIX
++#
 +# HPUX has a bug in that including shadow.h causes a re-definition of MAXINT.
 +# This causes configure to fail to detect it. Check for shadow separately on HPUX.
- #
--
--if test x$ac_cv_func_stat64 = xno ; then
--  { $as_echo "$as_me:$LINENO: checking for stat64 in <sys/stat.h>" >&5
--$as_echo_n "checking for stat64 in <sys/stat.h>... " >&6; }
--  cat >conftest.$ac_ext <<_ACEOF
--/* confdefs.h.  */
--_ACEOF
--cat confdefs.h >>conftest.$ac_ext
--cat >>conftest.$ac_ext <<_ACEOF
++#
 +case "$host_os" in
 +    *hpux*)
 +		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
--
--#if defined(HAVE_UNISTD_H)
--#include <unistd.h>
--#endif
--#include <sys/stat.h>
--
++/* end confdefs.h.  */
 +#include <shadow.h>
  int
  main ()
  {
--struct stat64 st64; exit(stat64(".",&st64));
+-return $ac_func ();
 +struct spwd testme
    ;
    return 0;
@@ -50275,7 +49301,7 @@
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
--  ac_cv_func_stat64=yes
+-  eval "$as_ac_var=yes"
 +if ac_fn_c_try_compile "$LINENO"; then :
 +  ac_cv_header_shadow_h=yes
  else
@@ -50287,7 +49313,7 @@
 +		if test x"$ac_cv_header_shadow_h" = x"yes"; then
 +
 +$as_echo "#define HAVE_SHADOW_H 1" >>confdefs.h
- 
++
 +		fi
 +	;;
 +esac
@@ -50299,18 +49325,14 @@
 +#define HAVE_SHADOW_H 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
--  { $as_echo "$as_me:$LINENO: result: $ac_cv_func_stat64" >&5
--$as_echo "$ac_cv_func_stat64" >&6; }
--  if test x$ac_cv_func_stat64 = xyes ; then
 +done
- 
--cat >>confdefs.h <<\_ACEOF
--#define HAVE_STAT64 1
++
 +for ac_header in nss.h nss_common.h nsswitch.h ns_api.h sys/security.h
 +do :
 +  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
@@ -50319,19 +49341,38 @@
 +   if test "x$as_val" = x""yes; then :
 +  cat >>confdefs.h <<_ACEOF
 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
++_ACEOF
++
+ fi
+-ac_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_header in syscall.h sys/syscall.h
++do :
++  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
++ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
++eval as_val=\$$as_ac_Header
++   if test "x$as_val" = x""yes; then :
+   cat >>confdefs.h <<_ACEOF
+-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
++#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
  
--  fi
  fi
++
+ done
  
--if test x$ac_cv_func_lstat64 = xno ; then
--  { $as_echo "$as_me:$LINENO: checking for lstat64 in <sys/stat.h>" >&5
--$as_echo_n "checking for lstat64 in <sys/stat.h>... " >&6; }
--  cat >conftest.$ac_ext <<_ACEOF
+ 
+-cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
-+done
-+
-+for ac_header in syscall.h sys/syscall.h
++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"
@@ -50344,29 +49385,38 @@
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
  
--#if defined(HAVE_UNISTD_H)
--#include <unistd.h>
+-#ifdef HAVE_SYS_PRCTL_H
+-#include <sys/prctl.h>
 -#endif
--#include <sys/stat.h>
 +fi
  
 -int
 -main ()
 -{
--struct stat64 st64; exit(lstat64(".",&st64));
+-int i; i = prtcl(0);
 -  ;
 -  return 0;
 -}
--_ACEOF
--rm -f conftest.$ac_objext conftest$ac_exeext
--if { (ac_try="$ac_link"
++done
++
++for ac_header in sys/ea.h sys/proplist.h
++do :
++  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
++ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
++eval as_val=\$$as_ac_Header
++   if test "x$as_val" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+ _ACEOF
+-rm -f conftest.$ac_objext
+-if { (ac_try="$ac_compile"
 -case "(($ac_try" in
 -  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
 -  *) ac_try_echo=$ac_try;;
 -esac
 -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 -$as_echo "$ac_try_echo") >&5
--  (eval "$ac_link") 2>conftest.er1
+-  (eval "$ac_compile") 2>conftest.er1
 -  ac_status=$?
 -  grep -v '^ *+' conftest.er1 >conftest.err
 -  rm -f conftest.er1
@@ -50375,60 +49425,15 @@
 -  (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_func_lstat64=yes
--else
--  $as_echo "$as_me: failed program was:" >&5
--sed 's/^/| /' conftest.$ac_ext >&5
-+done
+-       } && test -s conftest.$ac_objext; then
  
- 
-+for ac_header in sys/attributes.h attr/xattr.h sys/xattr.h sys/extattr.h sys/uio.h
-+do :
-+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-+eval as_val=\$$as_ac_Header
-+   if test "x$as_val" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-+_ACEOF
+-cat >>confdefs.h <<\_ACEOF
+-#define HAVE_PRCTL 1
++fi
 +
- fi
- 
--rm -rf conftest.dSYM
--rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
--      conftest$ac_exeext conftest.$ac_ext
--  { $as_echo "$as_me:$LINENO: result: $ac_cv_func_lstat64" >&5
--$as_echo "$ac_cv_func_lstat64" >&6; }
--  if test x$ac_cv_func_lstat64 = xyes ; then
--    cat >>confdefs.h <<\_ACEOF
--#define HAVE_LSTAT64 Whether lstat64() is available
 +done
 +
-+for ac_header in sys/ea.h sys/proplist.h
-+do :
-+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-+eval as_val=\$$as_ac_Header
-+   if test "x$as_val" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
- _ACEOF
- 
--  fi
- fi
- 
--if test x$ac_cv_func_fstat64 = xno ; then
--  { $as_echo "$as_me:$LINENO: checking for fstat64 in <sys/stat.h>" >&5
--$as_echo_n "checking for fstat64 in <sys/stat.h>... " >&6; }
--  cat >conftest.$ac_ext <<_ACEOF
--/* confdefs.h.  */
-+done
 +
-+
 +for ac_header in sys/cdefs.h glob.h
 +do :
 +  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
@@ -50438,26 +49443,15 @@
 +  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.  */
  
--#if defined(HAVE_UNISTD_H)
--#include <unistd.h>
--#endif
--#include <sys/stat.h>
+-else
+-  $as_echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
 +fi
- 
--int
--main ()
--{
--struct stat64 st64; exit(fstat64(0,&st64));
--  ;
--  return 0;
--}
++
 +done
 +
-+
+ 
 +# For experimental utmp support (lastlog on some BSD-like systems)
 +for ac_header in utmp.h utmpx.h lastlog.h
 +do :
@@ -50467,35 +49461,23 @@
 +   if test "x$as_val" = x""yes; then :
 +  cat >>confdefs.h <<_ACEOF
 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
- _ACEOF
--rm -f conftest.$ac_objext conftest$ac_exeext
--if { (ac_try="$ac_link"
--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_func_fstat64=yes
-+
-+fi
-+
++_ACEOF
+ 
+ fi
+ 
+-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 +done
+ 
+-#
+-#
+-#
+-case "$host_os" in
+-    *linux* | gnu* | k*bsd*-gnu | kopensolaris*-gnu)
+-       # glibc <= 2.3.2 has a broken getgrouplist
+-       { $as_echo "$as_me:$LINENO: checking for good getgrouplist" >&5
+-$as_echo_n "checking for good getgrouplist... " >&6; }
+-if test "${samba_cv_linux_getgrouplist_ok+set}" = set; then
 +
-+
 +# The cast to long int works around a bug in the HP C Compiler
 +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
 +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
@@ -50503,13 +49485,19 @@
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
 +$as_echo_n "checking size of int... " >&6; }
 +if test "${ac_cv_sizeof_int+set}" = set; then :
-+  $as_echo_n "(cached) " >&6
+   $as_echo_n "(cached) " >&6
  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
 +  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int"        "$ac_includes_default"; then :
- 
-+else
++
+ else
+-  cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
 +  if test "$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;}
@@ -50521,126 +49509,71 @@
 +   fi
 +fi
  
- 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__;
++fi
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
 +$as_echo "$ac_cv_sizeof_int" >&6; }
  
--rm -rf conftest.dSYM
--rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
--      conftest$ac_exeext conftest.$ac_ext
--  { $as_echo "$as_me:$LINENO: result: $ac_cv_func_fstat64" >&5
--$as_echo "$ac_cv_func_fstat64" >&6; }
--  if test x$ac_cv_func_fstat64 = xyes ; then
+-       if (libc_major < 2)
+-              exit(1);
+-       if ((libc_major == 2) && (libc_minor <= 3))
+-              exit(1);
+-#endif
+-       exit(0);
+-}
  
--cat >>confdefs.h <<\_ACEOF
--#define HAVE_FSTAT64 1
--_ACEOF
- 
--  fi
--fi
++
 +cat >>confdefs.h <<_ACEOF
 +#define SIZEOF_INT $ac_cv_sizeof_int
-+_ACEOF
- 
--#################################################
--# Check whether struct stat has timestamps with sub-second resolution.
--#
- 
--samba_cv_stat_hires=no
--{ $as_echo "$as_me:$LINENO: checking for struct stat.st_mtim.tv_nsec" >&5
--$as_echo_n "checking for struct stat.st_mtim.tv_nsec... " >&6; }
--if test "${ac_cv_member_struct_stat_st_mtim_tv_nsec+set}" = set; then
-+# The cast to long int works around a bug in the HP C Compiler
-+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
-+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
-+# This bug is HP SR number 8606223364.
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
-+$as_echo_n "checking size of long... " >&6; }
-+if test "${ac_cv_sizeof_long+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
--  cat >conftest.$ac_ext <<_ACEOF
--/* 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_mtim.tv_nsec)
--return 0;
--  ;
--  return 0;
--}
--_ACEOF
--rm -f conftest.$ac_objext
--if { (ac_try="$ac_compile"
+ _ACEOF
+-rm -f 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>&5
 -  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_mtim_tv_nsec=yes
--else
--  $as_echo "$as_me: failed program was:" >&5
--sed 's/^/| /' conftest.$ac_ext >&5
-+  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long"        "$ac_includes_default"; then :
- 
--	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 (sizeof ac_aggr.st_mtim.tv_nsec)
--return 0;
--  ;
--  return 0;
--}
--_ACEOF
--rm -f conftest.$ac_objext
--if { (ac_try="$ac_compile"
--case "(($ac_try" in
+-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+-  { (case "(($ac_try" in
 -  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
 -  *) ac_try_echo=$ac_try;;
 -esac
 -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 -$as_echo "$ac_try_echo") >&5
--  (eval "$ac_compile") 2>conftest.er1
+-  (eval "$ac_try") 2>&5
 -  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_mtim_tv_nsec=yes
+-  (exit $ac_status); }; }; then
+-  samba_cv_linux_getgrouplist_ok=yes
++
++
++# The cast to long int works around a bug in the HP C Compiler
++# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
++# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
++# This bug is HP SR number 8606223364.
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
++$as_echo_n "checking size of long... " >&6; }
++if test "${ac_cv_sizeof_long+set}" = set; then :
++  $as_echo_n "(cached) " >&6
  else
--  $as_echo "$as_me: failed program was:" >&5
+-  $as_echo "$as_me: program exited with status $ac_status" >&5
+-$as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
--	ac_cv_member_struct_stat_st_mtim_tv_nsec=no
++  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long"        "$ac_includes_default"; then :
+ 
+-( exit $ac_status )
+-samba_cv_linux_getgrouplist_ok=no
++else
 +  if test "$ac_cv_type_long" = yes; then
 +     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
@@ -50651,31 +49584,35 @@
 +     ac_cv_sizeof_long=0
 +   fi
  fi
- 
--rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+-rm -rf conftest.dSYM
+-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
++
  fi
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
 +$as_echo "$ac_cv_sizeof_long" >&6; }
-+
  
--rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ 
 -fi
--{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_mtim_tv_nsec" >&5
--$as_echo "$ac_cv_member_struct_stat_st_mtim_tv_nsec" >&6; }
--if test "x$ac_cv_member_struct_stat_st_mtim_tv_nsec" = x""yes; then
+-{ $as_echo "$as_me:$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
  
- cat >>confdefs.h <<_ACEOF
--#define HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC 1
+-cat >>confdefs.h <<\_ACEOF
+-#define HAVE_GETGROUPLIST 1
++cat >>confdefs.h <<_ACEOF
 +#define SIZEOF_LONG $ac_cv_sizeof_long
  _ACEOF
  
--# Linux, Solaris
--	samba_cv_stat_hires=yes
--fi
+-       fi
+-       ;;
+-    *)
  
--{ $as_echo "$as_me:$LINENO: checking for struct stat.st_mtimensec" >&5
--$as_echo_n "checking for struct stat.st_mtimensec... " >&6; }
--if test "${ac_cv_member_struct_stat_st_mtimensec+set}" = set; then
+-for ac_func in getgrouplist
+-do
+-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
+-$as_echo_n "checking for $ac_func... " >&6; }
+-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
 +# The 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]];'.
@@ -50691,82 +49628,16 @@
 -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_mtimensec)
--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_mtimensec=yes
--else
--  $as_echo "$as_me: failed program was:" >&5
--sed 's/^/| /' conftest.$ac_ext >&5
+-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+-#define $ac_func innocuous_$ac_func
 +  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long"        "$ac_includes_default"; then :
  
--	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 (sizeof ac_aggr.st_mtimensec)
--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_mtimensec=yes
- else
--  $as_echo "$as_me: failed program was:" >&5
--sed 's/^/| /' conftest.$ac_ext >&5
--
--	ac_cv_member_struct_stat_st_mtimensec=no
+-/* 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
 +  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;}
@@ -50776,67 +49647,52 @@
 +   else
 +     ac_cv_sizeof_long_long=0
 +   fi
- fi
++fi
  
--rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
+-#ifdef __STDC__
+-# include <limits.h>
+-#else
+-# include <assert.h>
+-#endif
++fi
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
 +$as_echo "$ac_cv_sizeof_long_long" >&6; }
-+
  
--rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
--fi
--{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_mtimensec" >&5
--$as_echo "$ac_cv_member_struct_stat_st_mtimensec" >&6; }
--if test "x$ac_cv_member_struct_stat_st_mtimensec" = x""yes; then
+-#undef $ac_func
  
- cat >>confdefs.h <<_ACEOF
--#define HAVE_STRUCT_STAT_ST_MTIMENSEC 1
-+#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
- _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
+-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
  
--# BSD, if defined _POSIX_SOURCE
--	samba_cv_stat_hires=yes
--fi
- 
--{ $as_echo "$as_me:$LINENO: checking for struct stat.st_mtimespec.tv_nsec" >&5
--$as_echo_n "checking for struct stat.st_mtimespec.tv_nsec... " >&6; }
--if test "${ac_cv_member_struct_stat_st_mtimespec_tv_nsec+set}" = set; then
-+# The cast to long int works around a bug in the HP C Compiler
-+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
-+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
-+# This bug is HP SR number 8606223364.
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
-+$as_echo_n "checking size of short... " >&6; }
-+if test "${ac_cv_sizeof_short+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
--  cat >conftest.$ac_ext <<_ACEOF
--/* 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_mtimespec.tv_nsec)
--return 0;
+-return $ac_func ();
 -  ;
 -  return 0;
 -}
--_ACEOF
--rm -f conftest.$ac_objext
--if { (ac_try="$ac_compile"
++cat >>confdefs.h <<_ACEOF
++#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
+ _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_compile") 2>conftest.er1
+-  (eval "$ac_link") 2>conftest.er1
 -  ac_status=$?
 -  grep -v '^ *+' conftest.er1 >conftest.err
 -  rm -f conftest.er1
@@ -50845,54 +49701,33 @@
 -  (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_mtimespec_tv_nsec=yes
+-       } && test -s conftest$ac_exeext && {
+-	 test "$cross_compiling" = yes ||
+-	 $as_test_x conftest$ac_exeext
+-       }; then
+-  eval "$as_ac_var=yes"
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
+ 
+-	eval "$as_ac_var=no"
+-fi
+ 
+-rm -rf conftest.dSYM
+-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+-      conftest$ac_exeext conftest.$ac_ext
++# The cast to long int works around a bug in the HP C Compiler
++# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
++# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
++# This bug is HP SR number 8606223364.
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
++$as_echo_n "checking size of short... " >&6; }
++if test "${ac_cv_sizeof_short+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
 +  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short"        "$ac_includes_default"; then :
- 
--	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 (sizeof ac_aggr.st_mtimespec.tv_nsec)
--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_mtimespec_tv_nsec=yes
- else
--  $as_echo "$as_me: failed program was:" >&5
--sed 's/^/| /' conftest.$ac_ext >&5
--
--	ac_cv_member_struct_stat_st_mtimespec_tv_nsec=no
++
++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;}
@@ -50903,91 +49738,59 @@
 +     ac_cv_sizeof_short=0
 +   fi
  fi
+-ac_res=`eval 'as_val=${'$as_ac_var'}
+-		 $as_echo "$as_val"'`
+-	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+-$as_echo "$ac_res" >&6; }
+-as_val=`eval 'as_val=${'$as_ac_var'}
+-		 $as_echo "$as_val"'`
+-   if test "x$as_val" = x""yes; then
+-  cat >>confdefs.h <<_ACEOF
+-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+-_ACEOF
  
--rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  fi
+-done
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
 +$as_echo "$ac_cv_sizeof_short" >&6; }
-+
  
--rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
--fi
--{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_mtimespec_tv_nsec" >&5
--$as_echo "$ac_cv_member_struct_stat_st_mtimespec_tv_nsec" >&6; }
--if test "x$ac_cv_member_struct_stat_st_mtimespec_tv_nsec" = x""yes; then
+-       ;;
+-esac
  
- cat >>confdefs.h <<_ACEOF
--#define HAVE_STRUCT_STAT_ST_MTIMESPEC_TV_NSEC 1
+-#
+-# stat64 family may need <sys/stat.h> on some systems, notably ReliantUNIX
+-#
+ 
+-if test x$ac_cv_func_stat64 = xno ; then
+-  { $as_echo "$as_me:$LINENO: checking for stat64 in <sys/stat.h>" >&5
+-$as_echo_n "checking for stat64 in <sys/stat.h>... " >&6; }
+-  cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
++cat >>confdefs.h <<_ACEOF
 +#define SIZEOF_SHORT $ac_cv_sizeof_short
  _ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
  
--# BSD, if not defined _POSIX_SOURCE
--	samba_cv_stat_hires=yes
--fi
- 
--{ $as_echo "$as_me:$LINENO: checking for struct stat.st_mtime_n" >&5
--$as_echo_n "checking for struct stat.st_mtime_n... " >&6; }
--if test "${ac_cv_member_struct_stat_st_mtime_n+set}" = set; then
+-#if defined(HAVE_UNISTD_H)
+-#include <unistd.h>
+-#endif
+-#include <sys/stat.h>
 +
++
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
 +$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
 +if test "${ac_cv_c_const+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
--  cat >conftest.$ac_ext <<_ACEOF
--/* confdefs.h.  */
--_ACEOF
--cat confdefs.h >>conftest.$ac_ext
--cat >>conftest.$ac_ext <<_ACEOF
++  $as_echo_n "(cached) " >&6
++else
 +  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
--$ac_includes_default
--int
--main ()
--{
--static struct stat ac_aggr;
--if (ac_aggr.st_mtime_n)
--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_mtime_n=yes
--else
--  $as_echo "$as_me: failed program was:" >&5
--sed 's/^/| /' conftest.$ac_ext >&5
++/* end confdefs.h.  */
  
--	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 (sizeof ac_aggr.st_mtime_n)
--return 0;
+-struct stat64 st64; exit(stat64(".",&st64));
 +/* FIXME: Include the comments suggested by Paul. */
 +#ifndef __cplusplus
 +  /* Ultrix mips cc rejects this.  */
@@ -51042,15 +49845,15 @@
    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
@@ -51059,34 +49862,34 @@
 -  (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_mtime_n=yes
+-       } && test -s conftest$ac_exeext && {
+-	 test "$cross_compiling" = yes ||
+-	 $as_test_x conftest$ac_exeext
+-       }; then
+-  ac_cv_func_stat64=yes
 +if ac_fn_c_try_compile "$LINENO"; then :
 +  ac_cv_c_const=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
--	ac_cv_member_struct_stat_st_mtime_n=no
 +  ac_cv_c_const=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:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
 +$as_echo "$ac_cv_c_const" >&6; }
 +if test $ac_cv_c_const = no; then
-+
+ 
 +$as_echo "#define const /**/" >>confdefs.h
  
--rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  fi
--{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_mtime_n" >&5
--$as_echo "$ac_cv_member_struct_stat_st_mtime_n" >&6; }
--if test "x$ac_cv_member_struct_stat_st_mtime_n" = x""yes; then
  
--cat >>confdefs.h <<_ACEOF
--#define HAVE_STRUCT_STAT_ST_MTIME_N 1
+-rm -rf conftest.dSYM
+-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+-      conftest$ac_exeext conftest.$ac_ext
+-  { $as_echo "$as_me:$LINENO: result: $ac_cv_func_stat64" >&5
+-$as_echo "$ac_cv_func_stat64" >&6; }
+-  if test x$ac_cv_func_stat64 = xyes ; then
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
 +$as_echo_n "checking for inline... " >&6; }
 +if test "${ac_cv_c_inline+set}" = set; then :
@@ -51101,21 +49904,34 @@
 +static $ac_kw foo_t static_foo () {return 0; }
 +$ac_kw foo_t foo () {return 0; }
 +#endif
-+
+ 
+-cat >>confdefs.h <<\_ACEOF
+-#define HAVE_STAT64 1
  _ACEOF
+-
+-  fi
 +if ac_fn_c_try_compile "$LINENO"; then :
 +  ac_cv_c_inline=$ac_kw
-+fi
+ fi
 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 +  test "$ac_cv_c_inline" != no && break
 +done
  
--# AIX
--	samba_cv_stat_hires=yes
- fi
+-if test x$ac_cv_func_lstat64 = xno ; then
+-  { $as_echo "$as_me:$LINENO: checking for lstat64 in <sys/stat.h>" >&5
+-$as_echo_n "checking for lstat64 in <sys/stat.h>... " >&6; }
+-  cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
++fi
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
 +$as_echo "$ac_cv_c_inline" >&6; }
-+
+ 
+-#if defined(HAVE_UNISTD_H)
+-#include <unistd.h>
 +case $ac_cv_c_inline in
 +  inline | yes) ;;
 +  *)
@@ -51126,21 +49942,49 @@
 +    cat >>confdefs.h <<_ACEOF
 +#ifndef __cplusplus
 +#define inline $ac_val
-+#endif
-+_ACEOF
+ #endif
+-#include <sys/stat.h>
+-
+-int
+-main ()
+-{
+-struct stat64 st64; exit(lstat64(".",&st64));
+-  ;
+-  return 0;
+-}
+ _ACEOF
+-rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (ac_try="$ac_link"
+-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
+-  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_func_lstat64=yes
+-else
+-  $as_echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
  
--{ $as_echo "$as_me:$LINENO: checking for struct stat.st_umtime" >&5
--$as_echo_n "checking for struct stat.st_umtime... " >&6; }
--if test "${ac_cv_member_struct_stat_st_umtime+set}" = set; then
 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
 +$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
 +if test "${ac_cv_c_bigendian+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
--  cat >conftest.$ac_ext <<_ACEOF
--/* confdefs.h.  */
++  $as_echo_n "(cached) " >&6
++else
 +  ac_cv_c_bigendian=unknown
 +    # See if we're dealing with a universal compiler.
 +    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -51149,12 +49993,21 @@
 +	       not a universal capable compiler
 +	     #endif
 +	     typedef int dummy;
-+
+ 
+-fi
+-
+-rm -rf conftest.dSYM
+-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+-      conftest$ac_exeext conftest.$ac_ext
+-  { $as_echo "$as_me:$LINENO: result: $ac_cv_func_lstat64" >&5
+-$as_echo "$ac_cv_func_lstat64" >&6; }
+-  if test x$ac_cv_func_lstat64 = xyes ; then
+-    cat >>confdefs.h <<\_ACEOF
+-#define HAVE_LSTAT64 Whether lstat64() is available
  _ACEOF
--cat confdefs.h >>conftest.$ac_ext
--cat >>conftest.$ac_ext <<_ACEOF
 +if ac_fn_c_try_compile "$LINENO"; then :
-+
+ 
+-  fi
 +	# Check for potential -arch flags.  It is not universal unless
 +	# there are at least two -arch flags with different values.
 +	ac_arch=
@@ -51176,74 +50029,51 @@
 +	   ac_prev=arch
 +	 fi
 +       done
-+fi
+ fi
 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 +    if test $ac_cv_c_bigendian = unknown; then
 +      # See if sys/param.h defines the BYTE_ORDER macro.
 +      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
--$ac_includes_default
++/* end confdefs.h.  */
 +#include <sys/types.h>
 +	     #include <sys/param.h>
 +
- int
- main ()
- {
--static struct stat ac_aggr;
--if (ac_aggr.st_umtime)
--return 0;
++int
++main ()
++{
 +#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
 +		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
 +		     && LITTLE_ENDIAN)
 +	      bogus endian macros
 +	     #endif
-+
-   ;
-   return 0;
- }
+ 
+-if test x$ac_cv_func_fstat64 = xno ; then
+-  { $as_echo "$as_me:$LINENO: checking for fstat64 in <sys/stat.h>" >&5
+-$as_echo_n "checking for fstat64 in <sys/stat.h>... " >&6; }
+-  cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
++  ;
++  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
--else
--  $as_echo "$as_me: failed program was:" >&5
--sed 's/^/| /' conftest.$ac_ext >&5
--
--	cat >conftest.$ac_ext <<_ACEOF
--/* confdefs.h.  */
--_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
 +if ac_fn_c_try_compile "$LINENO"; then :
 +  # It does; now see whether it defined to BIG_ENDIAN or not.
 +	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
--$ac_includes_default
+-
+-#if defined(HAVE_UNISTD_H)
+-#include <unistd.h>
+-#endif
+-#include <sys/stat.h>
 +#include <sys/types.h>
 +		#include <sys/param.h>
-+
+ 
  int
  main ()
  {
--static struct stat ac_aggr;
--if (sizeof ac_aggr.st_umtime)
--return 0;
+-struct stat64 st64; exit(fstat64(0,&st64));
 +#if BYTE_ORDER != BIG_ENDIAN
 +		 not big endian
 +		#endif
@@ -51252,15 +50082,15 @@
    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
@@ -51269,48 +50099,44 @@
 -  (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
+-       } && test -s conftest$ac_exeext && {
+-	 test "$cross_compiling" = yes ||
+-	 $as_test_x conftest$ac_exeext
+-       }; then
+-  ac_cv_func_fstat64=yes
 +if ac_fn_c_try_compile "$LINENO"; then :
 +  ac_cv_c_bigendian=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
--	ac_cv_member_struct_stat_st_umtime=no
+-
 +  ac_cv_c_bigendian=no
  fi
 -
- rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
+-rm -rf conftest.dSYM
+-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+-      conftest$ac_exeext conftest.$ac_ext
+-  { $as_echo "$as_me:$LINENO: result: $ac_cv_func_fstat64" >&5
+-$as_echo "$ac_cv_func_fstat64" >&6; }
+-  if test x$ac_cv_func_fstat64 = xyes ; then
 -
- rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
--fi
--{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_umtime" >&5
--$as_echo "$ac_cv_member_struct_stat_st_umtime" >&6; }
--if test "x$ac_cv_member_struct_stat_st_umtime" = x""yes; then
--
--cat >>confdefs.h <<_ACEOF
--#define HAVE_STRUCT_STAT_ST_UMTIME 1
+-cat >>confdefs.h <<\_ACEOF
+-#define HAVE_FSTAT64 1
 -_ACEOF
 -
--# Tru64
--	samba_cv_stat_hires=yes
--fi
+-  fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
 -
+-#################################################
+-# Check whether struct stat has timestamps with sub-second resolution.
+-#
 -
--if test x"$samba_cv_stat_hires" = x"yes" ; then
--
--cat >>confdefs.h <<\_ACEOF
--#define HAVE_STAT_HIRES_TIMESTAMPS 1
--_ACEOF
--
--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
+-samba_cv_stat_hires=no
+-{ $as_echo "$as_me:$LINENO: checking for struct stat.st_mtim.tv_nsec" >&5
+-$as_echo_n "checking for struct stat.st_mtim.tv_nsec... " >&6; }
+-if test "${ac_cv_member_struct_stat_st_mtim_tv_nsec+set}" = set; then
 -  $as_echo_n "(cached) " >&6
 -else
 -  cat >conftest.$ac_ext <<_ACEOF
@@ -51318,6 +50144,7 @@
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 +    fi
 +    if test $ac_cv_c_bigendian = unknown; then
 +      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
@@ -51330,7 +50157,7 @@
  main ()
  {
 -static struct stat ac_aggr;
--if (ac_aggr.st_birthtimespec.tv_nsec)
+-if (ac_aggr.st_mtim.tv_nsec)
 -return 0;
 +#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
 +	      bogus endian macros
@@ -51358,7 +50185,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_mtim_tv_nsec=yes
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
@@ -51379,7 +50206,7 @@
  main ()
  {
 -static struct stat ac_aggr;
--if (sizeof ac_aggr.st_birthtimespec.tv_nsec)
+-if (sizeof ac_aggr.st_mtim.tv_nsec)
 -return 0;
 +#ifndef _BIG_ENDIAN
 +		 not big endian
@@ -51407,14 +50234,14 @@
 -	 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_mtim_tv_nsec=yes
 +if ac_fn_c_try_compile "$LINENO"; then :
 +  ac_cv_c_bigendian=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
--	ac_cv_member_struct_stat_st_birthtimespec_tv_nsec=no
+-	ac_cv_member_struct_stat_st_mtim_tv_nsec=no
 +  ac_cv_c_bigendian=no
  fi
 -
@@ -51423,20 +50250,21 @@
 -
  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
+-{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_mtim_tv_nsec" >&5
+-$as_echo "$ac_cv_member_struct_stat_st_mtim_tv_nsec" >&6; }
+-if test "x$ac_cv_member_struct_stat_st_mtim_tv_nsec" = x""yes; then
 -
 -cat >>confdefs.h <<_ACEOF
--#define HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC 1
+-#define HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC 1
 -_ACEOF
 -
--
+-# Linux, Solaris
+-	samba_cv_stat_hires=yes
 -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_mtimensec" >&5
+-$as_echo_n "checking for struct stat.st_mtimensec... " >&6; }
+-if test "${ac_cv_member_struct_stat_st_mtimensec+set}" = set; then
 -  $as_echo_n "(cached) " >&6
 -else
 -  cat >conftest.$ac_ext <<_ACEOF
@@ -51472,7 +50300,7 @@
  main ()
  {
 -static struct stat ac_aggr;
--if (ac_aggr.st_birthtime)
+-if (ac_aggr.st_mtimensec)
 -return 0;
 +return use_ascii (foo) == use_ebcdic (foo);
    ;
@@ -51497,7 +50325,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_mtimensec=yes
 +if ac_fn_c_try_compile "$LINENO"; then :
 +  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
 +	      ac_cv_c_bigendian=yes
@@ -51528,7 +50356,7 @@
  main ()
  {
 -static struct stat ac_aggr;
--if (sizeof ac_aggr.st_birthtime)
+-if (sizeof ac_aggr.st_mtimensec)
 -return 0;
 +
 +	     /* Are we little or big endian?  From Harbison&Steele.  */
@@ -51562,14 +50390,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_mtimensec=yes
 +if ac_fn_c_try_run "$LINENO"; then :
 +  ac_cv_c_bigendian=no
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
--	ac_cv_member_struct_stat_st_birthtime=no
+-	ac_cv_member_struct_stat_st_mtimensec=no
 +  ac_cv_c_bigendian=yes
  fi
 -
@@ -51581,9 +50409,9 @@
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 +    fi
  fi
--{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_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_mtimensec" >&5
+-$as_echo "$ac_cv_member_struct_stat_st_mtimensec" >&6; }
+-if test "x$ac_cv_member_struct_stat_st_mtimensec" = x""yes; then
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
 +$as_echo "$ac_cv_c_bigendian" >&6; }
 + case $ac_cv_c_bigendian in #(
@@ -51595,19 +50423,22 @@
 +   universal)
  
 -cat >>confdefs.h <<_ACEOF
--#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
+-#define HAVE_STRUCT_STAT_ST_MTIMENSEC 1
 -_ACEOF
 +$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
-+
+ 
+-# BSD, if defined _POSIX_SOURCE
+-	samba_cv_stat_hires=yes
+-fi
 +     ;; #(
 +   *)
 +     as_fn_error "unknown endianness
 + presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
 + esac
  
--{ $as_echo "$as_me:$LINENO: checking for struct stat.st_birthtimensec" >&5
--$as_echo_n "checking for struct stat.st_birthtimensec... " >&6; }
--if test "${ac_cv_member_struct_stat_st_birthtimensec+set}" = set; then
+-{ $as_echo "$as_me:$LINENO: checking for struct stat.st_mtimespec.tv_nsec" >&5
+-$as_echo_n "checking for struct stat.st_mtimespec.tv_nsec... " >&6; }
+-if test "${ac_cv_member_struct_stat_st_mtimespec_tv_nsec+set}" = set; then
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
 +$as_echo_n "checking whether char is unsigned... " >&6; }
 +if test "${ac_cv_c_char_unsigned+set}" = set; then :
@@ -51625,7 +50456,7 @@
  main ()
  {
 -static struct stat ac_aggr;
--if (ac_aggr.st_birthtimensec)
+-if (ac_aggr.st_mtimespec.tv_nsec)
 -return 0;
 +static int test_array [1 - 2 * !(((char) -1) < 0)];
 +test_array [0] = 0
@@ -51652,7 +50483,7 @@
 -	 test -z "$ac_c_werror_flag" ||
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
--  ac_cv_member_struct_stat_st_birthtimensec=yes
+-  ac_cv_member_struct_stat_st_mtimespec_tv_nsec=yes
 +if ac_fn_c_try_compile "$LINENO"; then :
 +  ac_cv_c_char_unsigned=no
  else
@@ -51690,7 +50521,7 @@
  main ()
  {
 -static struct stat ac_aggr;
--if (sizeof ac_aggr.st_birthtimensec)
+-if (sizeof ac_aggr.st_mtimespec.tv_nsec)
 -return 0;
 +return *(signal (0, 0)) (0) == 1;
    ;
@@ -51715,34 +50546,25 @@
 -	 test -z "$ac_c_werror_flag" ||
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
--  ac_cv_member_struct_stat_st_birthtimensec=yes
+-  ac_cv_member_struct_stat_st_mtimespec_tv_nsec=yes
 +if ac_fn_c_try_compile "$LINENO"; then :
 +  ac_cv_type_signal=int
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
--	ac_cv_member_struct_stat_st_birthtimensec=no
 +  ac_cv_type_signal=void
- fi
--
--rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
--fi
--
- rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
--{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtimensec" >&5
--$as_echo "$ac_cv_member_struct_stat_st_birthtimensec" >&6; }
--if test "x$ac_cv_member_struct_stat_st_birthtimensec" = x""yes; then
++fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++fi
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
 +$as_echo "$ac_cv_type_signal" >&6; }
- 
- cat >>confdefs.h <<_ACEOF
--#define HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC 1
++
++cat >>confdefs.h <<_ACEOF
 +#define RETSIGTYPE $ac_cv_type_signal
- _ACEOF
++_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 :
@@ -51761,58 +50583,74 @@
  fi
 +rm -f conftest*
  
+-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  fi
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
 +$as_echo "$ac_cv_type_uid_t" >&6; }
 +if test $ac_cv_type_uid_t = no; then
- 
++
 +$as_echo "#define uid_t int" >>confdefs.h
++
++
++$as_echo "#define gid_t int" >>confdefs.h
  
- 
--{ $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_n "(cached) " >&6
-+$as_echo "#define gid_t int" >>confdefs.h
+-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+-{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_mtimespec_tv_nsec" >&5
+-$as_echo "$ac_cv_member_struct_stat_st_mtimespec_tv_nsec" >&6; }
+-if test "x$ac_cv_member_struct_stat_st_mtimespec_tv_nsec" = x""yes; then
 +
-+fi
-+
 +ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
 +if test "x$ac_cv_type_mode_t" = x""yes; then :
 +
++else
+ 
+ cat >>confdefs.h <<_ACEOF
+-#define HAVE_STRUCT_STAT_ST_MTIMESPEC_TV_NSEC 1
++#define mode_t int
+ _ACEOF
+ 
+-# BSD, if not defined _POSIX_SOURCE
+-	samba_cv_stat_hires=yes
+ fi
+ 
+-{ $as_echo "$as_me:$LINENO: checking for struct stat.st_mtime_n" >&5
+-$as_echo_n "checking for struct stat.st_mtime_n... " >&6; }
+-if test "${ac_cv_member_struct_stat_st_mtime_n+set}" = set; then
+-  $as_echo_n "(cached) " >&6
++ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
++if test "x$ac_cv_type_off_t" = x""yes; then :
++
  else
- 
--	cat >conftest.$ac_ext <<_ACEOF
+-  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
++
 +cat >>confdefs.h <<_ACEOF
-+#define mode_t int
++#define off_t long int
  _ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
--#include <sys/stat.h>
+-$ac_includes_default
 -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;
-+fi
- 
+-static struct stat ac_aggr;
+-if (ac_aggr.st_mtime_n)
+-return 0;
 -  ;
 -  return 0;
 -}
-+ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
-+if test "x$ac_cv_type_off_t" = x""yes; then :
 +
++fi
++
++ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
++if test "x$ac_cv_type_size_t" = x""yes; then :
++
 +else
 +
 +cat >>confdefs.h <<_ACEOF
-+#define off_t long int
++#define size_t unsigned int
  _ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
@@ -51832,102 +50670,72 @@
 -	 test -z "$ac_c_werror_flag" ||
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
--  samba_cv_stat_dos_flags=yes
+-  ac_cv_member_struct_stat_st_mtime_n=yes
 +
 +fi
 +
-+ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
-+if test "x$ac_cv_type_size_t" = x""yes; then :
++ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
++if test "x$ac_cv_type_pid_t" = x""yes; then :
 +
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
  
--	samba_cv_stat_dos_flags=no
+-	cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
 +cat >>confdefs.h <<_ACEOF
-+#define size_t unsigned int
++#define pid_t int
 +_ACEOF
 +
- fi
- 
--rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-+ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
-+if test "x$ac_cv_type_pid_t" = x""yes; then :
++fi
 +
-+else
-+
-+cat >>confdefs.h <<_ACEOF
-+#define pid_t int
-+_ACEOF
- 
- fi
--{ $as_echo "$as_me:$LINENO: result: $samba_cv_stat_dos_flags" >&5
--$as_echo "$samba_cv_stat_dos_flags" >&6; }
- 
--if test x"$samba_cv_stat_dos_flags" = x"yes" ; then
 +ac_fn_c_check_member "$LINENO" "struct stat" "st_rdev" "ac_cv_member_struct_stat_st_rdev" "$ac_includes_default"
 +if test "x$ac_cv_member_struct_stat_st_rdev" = x""yes; then :
- 
--cat >>confdefs.h <<\_ACEOF
--#define HAVE_STAT_DOS_FLAGS 1
++
 +cat >>confdefs.h <<_ACEOF
 +#define HAVE_STRUCT_STAT_ST_RDEV 1
  _ACEOF
- 
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
 +
++
 +$as_echo "#define HAVE_ST_RDEV 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
++fi
++
++
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for d_off in dirent" >&5
 +$as_echo_n "checking for d_off in dirent... " >&6; }
 +if test "${ac_cv_dirent_d_off+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
--  ac_check_lib_save_LIBS=$LIBS
--LIBS="-lresolv  $LIBS"
--cat >conftest.$ac_ext <<_ACEOF
--/* confdefs.h.  */
--_ACEOF
--cat confdefs.h >>conftest.$ac_ext
--cat >>conftest.$ac_ext <<_ACEOF
++  $as_echo_n "(cached) " >&6
++else
 +  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
- 
--/* Override any GCC internal prototype to avoid an error.
--   Use char because int might match the return type of a GCC
--   builtin and then its argument prototype would still apply.  */
--#ifdef __cplusplus
--extern "C"
--#endif
--char dn_expand ();
+-$ac_includes_default
++
 +#include <unistd.h>
 +#include <sys/types.h>
 +#include <dirent.h>
  int
  main ()
  {
--return dn_expand ();
+-static struct stat ac_aggr;
+-if (sizeof ac_aggr.st_mtime_n)
+-return 0;
 +struct dirent d; d.d_off;
    ;
    return 0;
  }
  _ACEOF
--rm -f conftest.$ac_objext conftest$ac_exeext
--if { (ac_try="$ac_link"
+-rm -f conftest.$ac_objext
+-if { (ac_try="$ac_compile"
 -case "(($ac_try" in
 -  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
 -  *) ac_try_echo=$ac_try;;
 -esac
 -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 -$as_echo "$ac_try_echo") >&5
--  (eval "$ac_link") 2>conftest.er1
+-  (eval "$ac_compile") 2>conftest.er1
 -  ac_status=$?
 -  grep -v '^ *+' conftest.er1 >conftest.err
 -  rm -f conftest.er1
@@ -51936,90 +50744,100 @@
 -  (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
+-       } && test -s conftest.$ac_objext; then
+-  ac_cv_member_struct_stat_st_mtime_n=yes
 +if ac_fn_c_try_compile "$LINENO"; then :
 +  ac_cv_dirent_d_off=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	ac_cv_member_struct_stat_st_mtime_n=no
 +  ac_cv_dirent_d_off=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:${as_lineno-$LINENO}: result: $ac_cv_dirent_d_off" >&5
 +$as_echo "$ac_cv_dirent_d_off" >&6; }
 +if test $ac_cv_dirent_d_off = yes; then
 +
 +$as_echo "#define HAVE_DIRENT_D_OFF 1" >>confdefs.h
  
--	ac_cv_lib_resolv_dn_expand=no
+-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  fi
- 
--rm -rf conftest.dSYM
--rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
--      conftest$ac_exeext conftest.$ac_ext
--LIBS=$ac_check_lib_save_LIBS
+-{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_mtime_n" >&5
+-$as_echo "$ac_cv_member_struct_stat_st_mtime_n" >&6; }
+-if test "x$ac_cv_member_struct_stat_st_mtime_n" = x""yes; then
++
 +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
+ 
+ cat >>confdefs.h <<_ACEOF
+-#define HAVE_STRUCT_STAT_ST_MTIME_N 1
 +#define ssize_t int
-+_ACEOF
-+
+ _ACEOF
+ 
+-# AIX
+-	samba_cv_stat_hires=yes
  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
-+
+ 
+-{ $as_echo "$as_me:$LINENO: checking for struct stat.st_umtime" >&5
+-$as_echo_n "checking for struct stat.st_umtime... " >&6; }
+-if test "${ac_cv_member_struct_stat_st_umtime+set}" = set; then
+-  $as_echo_n "(cached) " >&6
 +ac_fn_c_check_type "$LINENO" "wchar_t" "ac_cv_type_wchar_t" "$ac_includes_default"
 +if test "x$ac_cv_type_wchar_t" = x""yes; then :
 +
-+else
+ 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_umtime)
+-return 0;
+-  ;
+-  return 0;
+-}
 +
 +cat >>confdefs.h <<_ACEOF
 +#define wchar_t unsigned short
  _ACEOF
- 
--  LIBS="-lresolv $LIBS"
+-rm -f conftest.$ac_objext
+-if { (ac_try="$ac_compile"
+-case "(($ac_try" in
+-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+-  *) ac_try_echo=$ac_try;;
++
 +fi
 +
 +
 +############################################
 +# for cups support we need libcups, and a handful of header files
- 
++
 +# Check whether --enable-cups was given.
 +if test "${enable_cups+set}" = set; then :
 +  enableval=$enable_cups;
- fi
- 
- 
--{ $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
++
++
 +if test x$enable_cups != xno; then
 +	# Extract the first word of "cups-config", so it can be a program name with args.
 +set dummy cups-config; ac_word=$2
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 +$as_echo_n "checking for $ac_word... " >&6; }
 +if test "${ac_cv_path_CUPS_CONFIG+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
--  ac_check_lib_save_LIBS=$LIBS
--LIBS="-lresolv  $LIBS"
--cat >conftest.$ac_ext <<_ACEOF
--/* confdefs.h.  */
--_ACEOF
--cat confdefs.h >>conftest.$ac_ext
--cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
++  $as_echo_n "(cached) " >&6
++else
 +  case $CUPS_CONFIG in
 +  [\\/]* | ?:[\\/]*)
 +  ac_cv_path_CUPS_CONFIG="$CUPS_CONFIG" # Let the user override the test with a path.
@@ -52039,32 +50857,12 @@
 +done
 +  done
 +IFS=$as_save_IFS
- 
--/* Override any GCC internal prototype to avoid an error.
--   Use char because int might match the return type of a GCC
--   builtin and then its argument prototype would still apply.  */
--#ifdef __cplusplus
--extern "C"
--#endif
--char _dn_expand ();
--int
--main ()
--{
--return _dn_expand ();
--  ;
--  return 0;
--}
--_ACEOF
--rm -f conftest.$ac_objext conftest$ac_exeext
--if { (ac_try="$ac_link"
--case "(($ac_try" in
--  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
--  *) ac_try_echo=$ac_try;;
++
 +  ;;
  esac
 -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 -$as_echo "$ac_try_echo") >&5
--  (eval "$ac_link") 2>conftest.er1
+-  (eval "$ac_compile") 2>conftest.er1
 -  ac_status=$?
 -  grep -v '^ *+' conftest.er1 >conftest.err
 -  rm -f conftest.er1
@@ -52073,11 +50871,8 @@
 -  (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
+-       } && test -s conftest.$ac_objext; then
+-  ac_cv_member_struct_stat_st_umtime=yes
 +fi
 +CUPS_CONFIG=$ac_cv_path_CUPS_CONFIG
 +if test -n "$CUPS_CONFIG"; then
@@ -52086,52 +50881,137 @@
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
--	ac_cv_lib_resolv__dn_expand=no
 +  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 +$as_echo "no" >&6; }
- fi
- 
--rm -rf conftest.dSYM
--rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
--      conftest$ac_exeext conftest.$ac_ext
--LIBS=$ac_check_lib_save_LIBS
--fi
--{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_resolv__dn_expand" >&5
--$as_echo "$ac_cv_lib_resolv__dn_expand" >&6; }
--if test "x$ac_cv_lib_resolv__dn_expand" = x""yes; then
++fi
 +
 +
++
 +        if test "x$CUPS_CONFIG" != x; then
-+
+ 
+-	cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
 +		ac_save_CFLAGS=$CFLAGS
 +		ac_save_LDFLAGS=$LDFLAGS
 +		ac_save_PRINT_LIBS=$PRINT_LIBS
 +		CFLAGS="$CFLAGS `$CUPS_CONFIG --cflags`"
 +		LDFLAGS="$LDFLAGS `$CUPS_CONFIG --ldflags`"
-+		PRINT_LIBS="$PRINT_LIBS `$CUPS_CONFIG --libs`"
++		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 :
-   cat >>confdefs.h <<_ACEOF
--#define HAVE_LIBRESOLV 1
++  cat >>confdefs.h <<_ACEOF
 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
- 
--  LIBS="-lresolv $LIBS"
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++
 +fi
 +
 +done
- 
++
 +		if test x"$ac_cv_header_cups_cups_h" = xyes -a \
 +		        x"$ac_cv_header_cups_language_h" = xyes; then
 +
 +$as_echo "#define HAVE_CUPS 1" >>confdefs.h
 +
 +			samba_cv_HAVE_CUPS=yes
++
++
++ac_check_lib_ext_save_LIBS=$LIBS
++LIBS="-lcups $PRINT_LIBS  $LIBS"
++
++
++
++        { $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
++  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 httpConnectEncrypt ();
+ int
+ main ()
+ {
+-static struct stat ac_aggr;
+-if (sizeof ac_aggr.st_umtime)
+-return 0;
++return httpConnectEncrypt ();
+   ;
+   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_httpConnectEncrypt=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_httpConnectEncrypt=no;
++		  ac_cv_lib_ext_cups=no
++fi
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
+ 
+-	ac_cv_member_struct_stat_st_umtime=no
+ 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
++
++fi
++LIBS=$ac_check_lib_ext_save_LIBS
++
++if test $ac_cv_lib_ext_cups = yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_LIBCUPS 1
++_ACEOF
++
++		case "$PRINT_LIBS" in
++		    *-lcups*)
++			;;
++		    *)
++			PRINT_LIBS="-lcups $PRINT_LIBS"
++			;;
++		esac
++
+ 
+-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
 +$as_echo "$as_me: WARNING: cups-config around but cups-devel not installed" >&2;}
@@ -52139,31 +51019,46 @@
 +			LDFLAGS=$ac_save_LDFLAGS
 +			PRINT_LIBS=$ac_save_PRINT_LIBS
 +		fi
-+
+ 
+-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
 +        fi
-+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
 +# Check whether --enable-iprint was given.
 +if test "${enable_iprint+set}" = set; then :
 +  enableval=$enable_iprint;
  fi
  
  
--{ $as_echo "$as_me:$LINENO: checking for __dn_expand in -lresolv" >&5
--$as_echo_n "checking for __dn_expand in -lresolv... " >&6; }
--if test "${ac_cv_lib_resolv___dn_expand+set}" = set; then
+-if test x"$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
 +        fi
-+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
 +############################################
 +# 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
@@ -52171,9 +51066,7 @@
 +if test "${samba_cv_optimize_out_funcation_calls+set}" = set; then :
    $as_echo_n "(cached) " >&6
  else
--  ac_check_lib_save_LIBS=$LIBS
--LIBS="-lresolv  $LIBS"
--cat >conftest.$ac_ext <<_ACEOF
+-  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
@@ -52181,19 +51074,15 @@
 +
 +    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 __dn_expand ();
+-$ac_includes_default
++
 +#include <stdio.h>
  int
  main ()
  {
--return __dn_expand ();
+-static struct stat ac_aggr;
+-if (ac_aggr.st_birthtimespec.tv_nsec)
+-return 0;
 +
 +		if (0) {
 +		   this_function_does_not_exist();
@@ -52206,15 +51095,15 @@
    return 0;
  }
  _ACEOF
--rm -f conftest.$ac_objext conftest$ac_exeext
--if { (ac_try="$ac_link"
+-rm -f conftest.$ac_objext
+-if { (ac_try="$ac_compile"
 -case "(($ac_try" in
 -  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
 -  *) ac_try_echo=$ac_try;;
 -esac
 -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 -$as_echo "$ac_try_echo") >&5
--  (eval "$ac_link") 2>conftest.er1
+-  (eval "$ac_compile") 2>conftest.er1
 -  ac_status=$?
 -  grep -v '^ *+' conftest.er1 >conftest.err
 -  rm -f conftest.er1
@@ -52223,43 +51112,31 @@
 -  (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
+-       } && test -s conftest.$ac_objext; then
+-  ac_cv_member_struct_stat_st_birthtimespec_tv_nsec=yes
 +if ac_fn_c_try_link "$LINENO"; then :
 +  samba_cv_optimize_out_funcation_calls=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
--	ac_cv_lib_resolv___dn_expand=no
 +  samba_cv_optimize_out_funcation_calls=no
- fi
--
--rm -rf conftest.dSYM
--rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
--      conftest$ac_exeext conftest.$ac_ext
--LIBS=$ac_check_lib_save_LIBS
++fi
 +rm -f core conftest.err conftest.$ac_objext \
 +    conftest$ac_exeext conftest.$ac_ext
- 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_optimize_out_funcation_calls" >&5
 +$as_echo "$samba_cv_optimize_out_funcation_calls" >&6; }
 +if test x"$samba_cv_optimize_out_funcation_calls" = x"yes"; then
  
--  LIBS="-lresolv $LIBS"
+-	cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
 +$as_echo "#define HAVE_COMPILER_WILL_OPTIMIZE_OUT_FNS 1" >>confdefs.h
- 
- fi
- 
++
++fi
++
 +#############################################
 +# check for fd passing struct via msg_control
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fd passing via msg_control" >&5
@@ -52267,24 +51144,23 @@
 +if test "${samba_cv_msghdr_msg_control+set}" = set; then :
 +  $as_echo_n "(cached) " >&6
 +else
- 
--#
--# Check for the functions putprpwnam, set_auth_parameters,
--# getspnam, bigcrypt and getprpwnam in -lsec and -lsecurity
--# Needed for OSF1 and HPUX.
--#
++
 +    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h.  */
- 
+ /* end confdefs.h.  */
+-$ac_includes_default
++
 +#include <sys/types.h>
 +#include <stdlib.h>
 +#include <stddef.h>
 +#include <sys/socket.h>
 +#include <sys/un.h>
-+int
-+main ()
-+{
- 
+ int
+ main ()
+ {
+-static struct stat ac_aggr;
+-if (sizeof ac_aggr.st_birthtimespec.tv_nsec)
+-return 0;
++
 +	struct msghdr msg;
 +	union {
 +	      struct cmsghdr cm;
@@ -52292,76 +51168,119 @@
 +	} control_un;
 +	msg.msg_control = control_un.control;
 +	msg.msg_controllen = sizeof(control_un.control);
- 
--for ac_func in putprpwnam
--do
--as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
--{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
--$as_echo_n "checking for $ac_func... " >&6; }
--if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
--  $as_echo_n "(cached) " >&6
--else
--  cat >conftest.$ac_ext <<_ACEOF
--/* confdefs.h.  */
-+  ;
-+  return 0;
-+}
++
+   ;
+   return 0;
+ }
  _ACEOF
--cat confdefs.h >>conftest.$ac_ext
--cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
--/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
--   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
--#define $ac_func innocuous_$ac_func
+-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
 +if ac_fn_c_try_compile "$LINENO"; then :
 +  samba_cv_msghdr_msg_control=yes
-+else
+ 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
+-fi
+-
+-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 +  samba_cv_msghdr_msg_control=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_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
  
--/* System header to define __stub macros and hopefully few prototypes,
--    which can conflict with char $ac_func (); below.
--    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
--    <limits.h> exists even on freestanding compilers.  */
 +$as_echo "#define HAVE_MSGHDR_MSG_CONTROL 1" >>confdefs.h
  
--#ifdef __STDC__
--# include <limits.h>
--#else
--# include <assert.h>
--#endif
-+fi
+ fi
  
--#undef $ac_func
+-{ $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 for fd passing struct via msg_acctrights
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fd passing via msg_acctrights" >&5
 +$as_echo_n "checking for fd passing via msg_acctrights... " >&6; }
 +if test "${samba_cv_msghdr_msg_acctrights+set}" = set; then :
-+  $as_echo_n "(cached) " >&6
-+else
+   $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_birthtime)
+-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_birthtime=yes
+-else
+-  $as_echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
  
--/* 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 >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
++
 +#include <sys/types.h>
 +#include <stdlib.h>
 +#include <stddef.h>
@@ -52370,7 +51289,9 @@
  int
  main ()
  {
--return $ac_func ();
+-static struct stat ac_aggr;
+-if (sizeof ac_aggr.st_birthtime)
+-return 0;
 +
 +	struct msghdr msg;
 +	int fd;
@@ -52381,15 +51302,15 @@
    return 0;
  }
  _ACEOF
--rm -f conftest.$ac_objext conftest$ac_exeext
--if { (ac_try="$ac_link"
+-rm -f conftest.$ac_objext
+-if { (ac_try="$ac_compile"
 -case "(($ac_try" in
 -  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
 -  *) ac_try_echo=$ac_try;;
 -esac
 -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 -$as_echo "$ac_try_echo") >&5
--  (eval "$ac_link") 2>conftest.er1
+-  (eval "$ac_compile") 2>conftest.er1
 -  ac_status=$?
 -  grep -v '^ *+' conftest.er1 >conftest.err
 -  rm -f conftest.er1
@@ -52398,47 +51319,34 @@
 -  (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"
+-       } && test -s conftest.$ac_objext; then
+-  ac_cv_member_struct_stat_st_birthtime=yes
 +if ac_fn_c_try_compile "$LINENO"; then :
 +  samba_cv_msghdr_msg_acctrights=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
--	eval "$as_ac_var=no"
+-	ac_cv_member_struct_stat_st_birthtime=no
 +  samba_cv_msghdr_msg_acctrights=no
  fi
 -
--rm -rf conftest.dSYM
--rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
--      conftest$ac_exeext conftest.$ac_ext
-+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  fi
--ac_res=`eval 'as_val=${'$as_ac_var'}
--		 $as_echo "$as_val"'`
--	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
--$as_echo "$ac_res" >&6; }
--as_val=`eval 'as_val=${'$as_ac_var'}
--		 $as_echo "$as_val"'`
--   if test "x$as_val" = x""yes; then
--  cat >>confdefs.h <<_ACEOF
--#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
--_ACEOF
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $samba_cv_msghdr_msg_acctrights" >&5
 +$as_echo "$samba_cv_msghdr_msg_acctrights" >&6; }
 +if test x"$samba_cv_msghdr_msg_acctrights" = x"yes"; then
- 
--        # putprpwnam was found in libc or existing $LIBS
++
 +$as_echo "#define HAVE_MSGHDR_MSG_ACCTRIGHTS 1" >>confdefs.h
  
-+fi
+-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
  
--cat >>confdefs.h <<\_ACEOF
--#define HAVE_PUTPRPWNAM 1
+-cat >>confdefs.h <<_ACEOF
+-#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
 +for ac_func in dirfd
 +do :
 +  ac_fn_c_check_func "$LINENO" "dirfd" "ac_cv_func_dirfd"
@@ -52447,75 +51355,96 @@
 +#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
 +done
- 
++
 +if test x"$ac_cv_func_dirfd" = x"yes"; then
 +	default_shared_modules="$default_shared_modules vfs_syncops vfs_dirsort"
 +fi
- 
--else
--
--        # putprpwnam was not found, try adding libsecurity
--	case " $LIBS " in
--          *\ -lsecurity\ *)
--
--		    # putprpwnam was not found and we already had libsecurity
--		    # nothing to do here by default
--		    true
--
--	    ;;
--          *)
--	    # putprpwnam was not found, try adding libsecurity
--	    { $as_echo "$as_me:$LINENO: checking for putprpwnam in -lsecurity" >&5
--$as_echo_n "checking for putprpwnam in -lsecurity... " >&6; }
--if test "${ac_cv_lib_security_putprpwnam+set}" = set; then
++
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct sigevent type" >&5
 +$as_echo_n "checking for struct sigevent type... " >&6; }
 +if test "${samba_cv_struct_sigevent+set}" = set; then :
    $as_echo_n "(cached) " >&6
  else
--  ac_check_lib_save_LIBS=$LIBS
--LIBS="-lsecurity  $LIBS"
--cat >conftest.$ac_ext <<_ACEOF
+-  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+
+-/* end confdefs.h.  */
+-$ac_includes_default
+-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.  */
+-_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.
--   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"
+-$ac_includes_default
++
 +#include <sys/types.h>
 +#if STDC_HEADERS
 +#include <stdlib.h>
 +#include <stddef.h>
- #endif
--char putprpwnam ();
++#endif
 +#include <signal.h>
  int
  main ()
  {
--return putprpwnam ();
+-static struct stat ac_aggr;
+-if (sizeof ac_aggr.st_birthtimensec)
+-return 0;
 +struct sigevent s;
    ;
    return 0;
  }
  _ACEOF
--rm -f conftest.$ac_objext conftest$ac_exeext
--if { (ac_try="$ac_link"
+-rm -f conftest.$ac_objext
+-if { (ac_try="$ac_compile"
 -case "(($ac_try" in
 -  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
 -  *) ac_try_echo=$ac_try;;
 -esac
 -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 -$as_echo "$ac_try_echo") >&5
--  (eval "$ac_link") 2>conftest.er1
+-  (eval "$ac_compile") 2>conftest.er1
 -  ac_status=$?
 -  grep -v '^ *+' conftest.er1 >conftest.err
 -  rm -f conftest.er1
@@ -52524,127 +51453,79 @@
 -  (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_security_putprpwnam=yes
+-       } && test -s conftest.$ac_objext; then
+-  ac_cv_member_struct_stat_st_birthtimensec=yes
 +if ac_fn_c_try_compile "$LINENO"; then :
 +  samba_cv_struct_sigevent=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
--	ac_cv_lib_security_putprpwnam=no
+-	ac_cv_member_struct_stat_st_birthtimensec=no
 +  samba_cv_struct_sigevent=no
  fi
 -
--rm -rf conftest.dSYM
--rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
--      conftest$ac_exeext conftest.$ac_ext
--LIBS=$ac_check_lib_save_LIBS
-+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  fi
--{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_security_putprpwnam" >&5
--$as_echo "$ac_cv_lib_security_putprpwnam" >&6; }
--if test "x$ac_cv_lib_security_putprpwnam" = x""yes; then
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $samba_cv_struct_sigevent" >&5
 +$as_echo "$samba_cv_struct_sigevent" >&6; }
 +if test x"$samba_cv_struct_sigevent" = x"yes"; then
  
--		LIBS="-lsecurity $LIBS"
+-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+-fi
+-{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtimensec" >&5
+-$as_echo "$ac_cv_member_struct_stat_st_birthtimensec" >&6; }
+-if test "x$ac_cv_member_struct_stat_st_birthtimensec" = x""yes; then
 +$as_echo "#define HAVE_STRUCT_SIGEVENT 1" >>confdefs.h
- 
++
 +   ac_fn_c_check_member "$LINENO" "struct sigevent" "sigev_value.sival_ptr" "ac_cv_member_struct_sigevent_sigev_value_sival_ptr" "#include <signal.h>
 +"
 +if test "x$ac_cv_member_struct_sigevent_sigev_value_sival_ptr" = x""yes; then :
  
--cat >>confdefs.h <<\_ACEOF
--#define HAVE_PUTPRPWNAM 1
-+cat >>confdefs.h <<_ACEOF
+ cat >>confdefs.h <<_ACEOF
+-#define HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC 1
 +#define HAVE_STRUCT_SIGEVENT_SIGEV_VALUE_SIVAL_PTR 1
  _ACEOF
  
  
-+fi
+ 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 :
  
--else
--
--
--			# putprpwnam was not found in libsecurity
--			# nothing to do here by default
--			true
+-fi
 +cat >>confdefs.h <<_ACEOF
 +#define HAVE_STRUCT_SIGEVENT_SIGEV_VALUE_SIGVAL_PTR 1
 +_ACEOF
  
  
- fi
++fi
  
--	  ;;
--        esac
--
- fi
--done
--
--
- 
--
--for ac_func in putprpwnam
--do
--as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
--{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
--$as_echo_n "checking for $ac_func... " >&6; }
--if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+-{ $as_echo "$as_me:$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
 +$as_echo_n "checking for struct timespec type... " >&6; }
 +if test "${samba_cv_struct_timespec+set}" = set; then :
    $as_echo_n "(cached) " >&6
  else
--  cat >conftest.$ac_ext <<_ACEOF
+ 
+-	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"
+ /* end confdefs.h.  */
+-#include <sys/stat.h>
++
 +#include <sys/types.h>
 +#if STDC_HEADERS
 +#include <stdlib.h>
 +#include <stddef.h>
- #endif
--char $ac_func ();
--/* The GNU C library defines this for functions which it implements
--    to always fail with ENOSYS.  Some functions are actually named
--    something starting with __ and the normal name is an alias.  */
--#if defined __stub_$ac_func || defined __stub___$ac_func
--choke me
++#endif
 +#if TIME_WITH_SYS_TIME
 +# include <sys/time.h>
 +# include <time.h>
@@ -52654,26 +51535,33 @@
 +# else
 +#  include <time.h>
 +# endif
- #endif
- 
++#endif
++
  int
  main ()
  {
--return $ac_func ();
+-
+-		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 timespec ts;
    ;
    return 0;
  }
  _ACEOF
--rm -f conftest.$ac_objext conftest$ac_exeext
--if { (ac_try="$ac_link"
+-rm -f conftest.$ac_objext
+-if { (ac_try="$ac_compile"
 -case "(($ac_try" in
 -  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
 -  *) ac_try_echo=$ac_try;;
 -esac
 -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 -$as_echo "$ac_try_echo") >&5
--  (eval "$ac_link") 2>conftest.er1
+-  (eval "$ac_compile") 2>conftest.er1
 -  ac_status=$?
 -  grep -v '^ *+' conftest.er1 >conftest.err
 -  rm -f conftest.er1
@@ -52682,55 +51570,72 @@
 -  (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"
+-       } && test -s conftest.$ac_objext; then
+-  samba_cv_stat_dos_flags=yes
 +if ac_fn_c_try_compile "$LINENO"; then :
 +  samba_cv_struct_timespec=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
--	eval "$as_ac_var=no"
+-	samba_cv_stat_dos_flags=no
 +  samba_cv_struct_timespec=no
  fi
 -
--rm -rf conftest.dSYM
--rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
--      conftest$ac_exeext conftest.$ac_ext
-+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+-
  fi
--ac_res=`eval 'as_val=${'$as_ac_var'}
--		 $as_echo "$as_val"'`
--	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
--$as_echo "$ac_res" >&6; }
--as_val=`eval 'as_val=${'$as_ac_var'}
--		 $as_echo "$as_val"'`
--   if test "x$as_val" = x""yes; then
--  cat >>confdefs.h <<_ACEOF
--#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
--_ACEOF
+-{ $as_echo "$as_me:$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:${as_lineno-$LINENO}: result: $samba_cv_struct_timespec" >&5
 +$as_echo "$samba_cv_struct_timespec" >&6; }
 +if test x"$samba_cv_struct_timespec" = x"yes"; then
  
--        # putprpwnam was found in libc or existing $LIBS
+-cat >>confdefs.h <<\_ACEOF
+-#define HAVE_STAT_DOS_FLAGS 1
+-_ACEOF
 +$as_echo "#define HAVE_STRUCT_TIMESPEC 1" >>confdefs.h
  
-+fi
+ fi
  
--cat >>confdefs.h <<\_ACEOF
--#define HAVE_PUTPRPWNAM 1
+-#####################################
+-# 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
 +# and glibc has setresuid under linux but the function does
 +# nothing until kernel 2.1.44! very dumb.
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for real setresuid" >&5
 +$as_echo_n "checking for real setresuid... " >&6; }
 +if test "${samba_cv_have_setresuid+set}" = set; then :
-+  $as_echo_n "(cached) " >&6
-+else
-+
+   $as_echo_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.  */
+ 
+-/* 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_setresuid=cross
 +else
@@ -52739,35 +51644,95 @@
 +#include <errno.h>
 +main() { setresuid(1,1,1); setresuid(2,2,2); exit(errno==EPERM?0:1);}
  _ACEOF
+-rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (ac_try="$ac_link"
+-case "(($ac_try" in
+-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+-  *) ac_try_echo=$ac_try;;
+-esac
+-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+-$as_echo "$ac_try_echo") >&5
+-  (eval "$ac_link") 2>conftest.er1
+-  ac_status=$?
+-  grep -v '^ *+' conftest.er1 >conftest.err
+-  rm -f conftest.er1
+-  cat conftest.err >&5
+-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); } && {
+-	 test -z "$ac_c_werror_flag" ||
+-	 test ! -s conftest.err
+-       } && test -s conftest$ac_exeext && {
+-	 test "$cross_compiling" = yes ||
+-	 $as_test_x conftest$ac_exeext
+-       }; then
+-  ac_cv_lib_resolv_dn_expand=yes
 +if ac_fn_c_try_run "$LINENO"; then :
 +  samba_cv_have_setresuid=yes
-+else
+ 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
-+
-+fi
+ fi
+ 
+-rm -rf conftest.dSYM
+-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+-      conftest$ac_exeext conftest.$ac_ext
+-LIBS=$ac_check_lib_save_LIBS
+ 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
 +{ $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
+ 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
+   $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.  */
  
--        # putprpwnam was not found, try adding libsec
--	case " $LIBS " in
--          *\ -lsec\ *)
+-/* 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
@@ -52776,41 +51741,73 @@
 +#include <unistd.h>
 +#include <errno.h>
 +main() { errno = 0; setresgid(1,1,1); exit(errno != 0 ? (errno==EPERM ? 0 : 1) : 0);}
-+_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
+-  ac_cv_lib_resolv__dn_expand=yes
 +if ac_fn_c_try_run "$LINENO"; then :
 +  samba_cv_have_setresgid=yes
-+else
+ 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_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
+ fi
  
--		    # putprpwnam was not found and we already had libsec
--		    # nothing to do here by default
--		    true
-+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
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $samba_cv_have_setresgid" >&5
 +$as_echo "$samba_cv_have_setresgid" >&6; }
 +if test x"$samba_cv_have_setresgid" = x"yes"; then
  
--	    ;;
--          *)
--	    # putprpwnam was not found, try adding libsec
--	    { $as_echo "$as_me:$LINENO: checking for putprpwnam in -lsec" >&5
--$as_echo_n "checking for putprpwnam in -lsec... " >&6; }
--if test "${ac_cv_lib_sec_putprpwnam+set}" = set; then
+-  LIBS="-lresolv $LIBS"
 +$as_echo "#define HAVE_SETRESGID 1" >>confdefs.h
-+
-+fi
-+
+ 
+ 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 "$as_me:${as_lineno-$LINENO}: checking for working memcmp" >&5
 +$as_echo_n "checking for working memcmp... " >&6; }
 +if test "${ac_cv_func_memcmp_working+set}" = set; then :
    $as_echo_n "(cached) " >&6
  else
 -  ac_check_lib_save_LIBS=$LIBS
--LIBS="-lsec  $LIBS"
+-LIBS="-lresolv  $LIBS"
 -cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
@@ -52828,12 +51825,12 @@
 -#ifdef __cplusplus
 -extern "C"
 -#endif
--char putprpwnam ();
+-char __dn_expand ();
 +$ac_includes_default
  int
  main ()
  {
--return putprpwnam ();
+-return __dn_expand ();
 +
 +  /* Some versions of memcmp are not 8-bit clean.  */
 +  char c0 = '\100', c1 = '\200', c2 = '\201';
@@ -52884,14 +51881,14 @@
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
--  ac_cv_lib_sec_putprpwnam=yes
+-  ac_cv_lib_resolv___dn_expand=yes
 +if ac_fn_c_try_run "$LINENO"; then :
 +  ac_cv_func_memcmp_working=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
--	ac_cv_lib_sec_putprpwnam=no
+-	ac_cv_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 \
@@ -52903,9 +51900,9 @@
 -      conftest$ac_exeext conftest.$ac_ext
 -LIBS=$ac_check_lib_save_LIBS
  fi
--{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_sec_putprpwnam" >&5
--$as_echo "$ac_cv_lib_sec_putprpwnam" >&6; }
--if test "x$ac_cv_lib_sec_putprpwnam" = x""yes; then
+-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_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:${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
@@ -52913,46 +51910,46 @@
 +  *) LIBOBJS="$LIBOBJS memcmp.$ac_objext"
 + ;;
 +esac
- 
--		LIBS="-lsec $LIBS"
- 
- 
--cat >>confdefs.h <<\_ACEOF
--#define HAVE_PUTPRPWNAM 1
--_ACEOF
++
++
++
 +###############################################
 +# Readline included by default unless explicitly asked not to
 +test "${with_readline+set}" != "set" && with_readline=yes
- 
++
 +# test for where we get readline() from
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use readline" >&5
 +$as_echo_n "checking whether to use readline... " >&6; }
- 
++
 +# Check whether --with-readline was given.
 +if test "${with_readline+set}" = set; then :
 +  withval=$with_readline;   case "$with_readline" in
 +  yes)
 +    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 +$as_echo "yes" >&6; }
- 
--else
++
 +    for ac_header in readline.h history.h readline/readline.h
 +do :
 +  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
 +eval as_val=\$$as_ac_Header
 +   if test "x$as_val" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
+   cat >>confdefs.h <<_ACEOF
+-#define HAVE_LIBRESOLV 1
 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-+_ACEOF
+ _ACEOF
  
-+fi
+-  LIBS="-lresolv $LIBS"
+-
+ fi
  
--			# putprpwnam was not found in libsec
--			# nothing to do here by default
--			true
 +done
  
+-#
+-# Check for the functions putprpwnam, set_auth_parameters,
+-# getspnam, bigcrypt and getprpwnam in -lsec and -lsecurity
+-# Needed for OSF1 and HPUX.
+-#
 +    for ac_header in readline/history.h
 +do :
 +  ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
@@ -52961,15 +51958,17 @@
 +#define HAVE_READLINE_HISTORY_H 1
 +_ACEOF
  
- fi
++fi
++
++done
  
--	  ;;
--        esac
--
--fi
- done
  
- 
+-for ac_func in putprpwnam
+-do
+-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
+-$as_echo_n "checking for $ac_func... " >&6; }
+-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
 +    for ac_header in readline.h readline/readline.h
 +do :
 +  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
@@ -52979,15 +51978,7 @@
 +  cat >>confdefs.h <<_ACEOF
 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
 +_ACEOF
- 
--
--
--for ac_func in set_auth_parameters
--do
--as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
--{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
--$as_echo_n "checking for $ac_func... " >&6; }
--if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
++
 +      for termlib in ncurses curses termcap terminfo termlib tinfo; do
 +       as_ac_Lib=`$as_echo "ac_cv_lib_${termlib}''_tgetent" | $as_tr_sh`
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -l${termlib}" >&5
@@ -53023,7 +52014,7 @@
  
  /* Override any GCC internal prototype to avoid an error.
     Use char because int might match the return type of a GCC
-@@ -47772,100 +14569,41 @@
+@@ -47061,100 +14378,41 @@
  #ifdef __cplusplus
  extern "C"
  #endif
@@ -53097,22 +52088,22 @@
 -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 -_ACEOF
 -
--        # set_auth_parameters was found in libc or existing $LIBS
+-        # putprpwnam was found in libc or existing $LIBS
 -
 -
 -cat >>confdefs.h <<\_ACEOF
--#define HAVE_SET_AUTH_PARAMETERS 1
+-#define HAVE_PUTPRPWNAM 1
 -_ACEOF
 -
 -
 -
 -else
 -
--        # set_auth_parameters was not found, try adding libsecurity
+-        # putprpwnam was not found, try adding libsecurity
 -	case " $LIBS " in
 -          *\ -lsecurity\ *)
 -
--		    # set_auth_parameters was not found and we already had libsecurity
+-		    # putprpwnam was not found and we already had libsecurity
 -		    # nothing to do here by default
 -		    true
 +eval as_val=\$$as_ac_Lib
@@ -53122,10 +52113,10 @@
  
 -	    ;;
 -          *)
--	    # set_auth_parameters was not found, try adding libsecurity
--	    { $as_echo "$as_me:$LINENO: checking for set_auth_parameters in -lsecurity" >&5
--$as_echo_n "checking for set_auth_parameters in -lsecurity... " >&6; }
--if test "${ac_cv_lib_security_set_auth_parameters+set}" = set; then
+-	    # putprpwnam was not found, try adding libsecurity
+-	    { $as_echo "$as_me:$LINENO: checking for putprpwnam in -lsecurity" >&5
+-$as_echo_n "checking for putprpwnam in -lsecurity... " >&6; }
+-if test "${ac_cv_lib_security_putprpwnam+set}" = set; then
 +      done
 +      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
 +$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
@@ -53144,16 +52135,16 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -47874,111 +14612,149 @@
+@@ -47163,111 +14421,106 @@
  #ifdef __cplusplus
  extern "C"
  #endif
--char set_auth_parameters ();
+-char putprpwnam ();
 +char rl_callback_handler_install ();
  int
  main ()
  {
--return set_auth_parameters ();
+-return putprpwnam ();
 +return rl_callback_handler_install ();
    ;
    return 0;
@@ -53180,14 +52171,14 @@
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
--  ac_cv_lib_security_set_auth_parameters=yes
+-  ac_cv_lib_security_putprpwnam=yes
 +if ac_fn_c_try_link "$LINENO"; then :
 +  ac_cv_lib_readline_rl_callback_handler_install=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
--	ac_cv_lib_security_set_auth_parameters=no
+-	ac_cv_lib_security_putprpwnam=no
 +  ac_cv_lib_readline_rl_callback_handler_install=no
  fi
 -
@@ -53198,9 +52189,9 @@
 +    conftest$ac_exeext conftest.$ac_ext
  LIBS=$ac_check_lib_save_LIBS
  fi
--{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_security_set_auth_parameters" >&5
--$as_echo "$ac_cv_lib_security_set_auth_parameters" >&6; }
--if test "x$ac_cv_lib_security_set_auth_parameters" = x""yes; then
+-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_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 "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
@@ -53211,7 +52202,7 @@
 +$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
  
 -cat >>confdefs.h <<\_ACEOF
--#define HAVE_SET_AUTH_PARAMETERS 1
+-#define HAVE_PUTPRPWNAM 1
 -_ACEOF
 +       break
 +else
@@ -53237,7 +52228,7 @@
 +    _ldflags=${LDFLAGS}
 +    _cppflags=${CPPFLAGS}
  
--			# set_auth_parameters was not found in libsecurity
+-			# putprpwnam was not found in libsecurity
 -			# nothing to do here by default
 -			true
 +    # Add additional search path
@@ -53284,7 +52275,7 @@
 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
 +_ACEOF
  
--for ac_func in set_auth_parameters
+-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
@@ -53314,58 +52305,18 @@
 -    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>
-+/* Override any GCC internal prototype to avoid an error.
-+   Use char because int might match the return type of a GCC
-+   builtin and then its argument prototype would still apply.  */
-+#ifdef __cplusplus
-+extern "C"
- #endif
-+char tgetent ();
-+int
-+main ()
-+{
-+return tgetent ();
-+  ;
-+  return 0;
-+}
-+_ACEOF
-+if ac_fn_c_try_link "$LINENO"; then :
-+  eval "$as_ac_Lib=yes"
-+else
-+  eval "$as_ac_Lib=no"
-+fi
-+rm -f core conftest.err conftest.$ac_objext \
-+    conftest$ac_exeext conftest.$ac_ext
-+LIBS=$ac_check_lib_save_LIBS
-+fi
-+eval ac_res=\$$as_ac_Lib
-+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-+$as_echo "$ac_res" >&6; }
-+eval as_val=\$$as_ac_Lib
-+   if test "x$as_val" = x""yes; then :
-+  TERMLIBS="-l${termlib}"; break
-+fi
- 
+-#endif
+-
 -#undef $ac_func
-+      done
-+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
-+$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
-+if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then :
-+  $as_echo_n "(cached) " >&6
-+else
-+  ac_check_lib_save_LIBS=$LIBS
-+LIBS="-lreadline $TERMLIBS $LIBS"
-+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
     Use char because int might match the return type of a GCC
-@@ -47986,100 +14762,67 @@
+@@ -47275,100 +14528,41 @@
  #ifdef __cplusplus
  extern "C"
  #endif
@@ -53377,12 +52328,12 @@
 -choke me
 -#endif
 -
-+char rl_callback_handler_install ();
++char tgetent ();
  int
  main ()
  {
 -return $ac_func ();
-+return rl_callback_handler_install ();
++return tgetent ();
    ;
    return 0;
  }
@@ -53410,86 +52361,68 @@
 -       }; then
 -  eval "$as_ac_var=yes"
 +if ac_fn_c_try_link "$LINENO"; then :
-+  ac_cv_lib_readline_rl_callback_handler_install=yes
++  eval "$as_ac_Lib=yes"
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	eval "$as_ac_var=no"
-+  ac_cv_lib_readline_rl_callback_handler_install=no
++  eval "$as_ac_Lib=no"
  fi
+-
+-rm -rf conftest.dSYM
+-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+-      conftest$ac_exeext conftest.$ac_ext
 +rm -f core conftest.err conftest.$ac_objext \
 +    conftest$ac_exeext conftest.$ac_ext
 +LIBS=$ac_check_lib_save_LIBS
-+fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
-+$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
-+if test "x$ac_cv_lib_readline_rl_callback_handler_install" = x""yes; then :
-+  TERMLDFLAGS="-L$with_readline/lib"
-+       TERMCPPFLAGS="-I$with_readline/include"
-+       CPPFLAGS="-I$with_readline/include $CPPFLAGS"
-+       TERMLIBS="-lreadline $TERMLIBS"
-+
-+$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
- 
--rm -rf conftest.dSYM
--rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
--      conftest$ac_exeext conftest.$ac_ext
-+       break
-+else
-+  TERMLIBS= CPPFLAGS=$_cppflags
  fi
 -ac_res=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
--$as_echo "$ac_res" >&6; }
++eval ac_res=\$$as_ac_Lib
++	       { $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
- 
--        # set_auth_parameters was found in libc or existing $LIBS
-+fi
- 
-+done
- 
+-
+-        # putprpwnam was found in libc or existing $LIBS
+-
+-
 -cat >>confdefs.h <<\_ACEOF
--#define HAVE_SET_AUTH_PARAMETERS 1
+-#define HAVE_PUTPRPWNAM 1
 -_ACEOF
- 
-+    LDFLAGS=$_ldflags
-+    ;;
-+  esac
-+else
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-+$as_echo "no" >&6; }
- 
-+fi
- 
+-
+-
+-
 -else
- 
--        # set_auth_parameters was not found, try adding libsec
+-
+-        # putprpwnam was not found, try adding libsec
 -	case " $LIBS " in
 -          *\ -lsec\ *)
- 
--		    # set_auth_parameters was not found and we already had libsec
+-
+-		    # 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 :
++  TERMLIBS="-l${termlib}"; break
++fi
  
 -	    ;;
 -          *)
--	    # set_auth_parameters was not found, try adding libsec
--	    { $as_echo "$as_me:$LINENO: checking for set_auth_parameters in -lsec" >&5
--$as_echo_n "checking for set_auth_parameters in -lsec... " >&6; }
--if test "${ac_cv_lib_sec_set_auth_parameters+set}" = set; then
-+# The readline API changed slightly from readline3 to readline4, so
-+# code will generate warnings on one of them unless we have a few
-+# special cases.
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
-+$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
-+if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then :
+-	    # putprpwnam was not found, try adding libsec
+-	    { $as_echo "$as_me:$LINENO: checking for putprpwnam in -lsec" >&5
+-$as_echo_n "checking for putprpwnam in -lsec... " >&6; }
+-if test "${ac_cv_lib_sec_putprpwnam+set}" = set; then
++      done
++      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
++$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
++if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then :
    $as_echo_n "(cached) " >&6
  else
    ac_check_lib_save_LIBS=$LIBS
@@ -53504,17 +52437,17 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -48088,113 +14831,55 @@
+@@ -47377,112 +14571,68 @@
  #ifdef __cplusplus
  extern "C"
  #endif
--char set_auth_parameters ();
-+char rl_completion_matches ();
+-char putprpwnam ();
++char rl_callback_handler_install ();
  int
  main ()
  {
--return set_auth_parameters ();
-+return rl_completion_matches ();
+-return putprpwnam ();
++return rl_callback_handler_install ();
    ;
    return 0;
  }
@@ -53540,15 +52473,15 @@
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
--  ac_cv_lib_sec_set_auth_parameters=yes
+-  ac_cv_lib_sec_putprpwnam=yes
 +if ac_fn_c_try_link "$LINENO"; then :
-+  ac_cv_lib_readline_rl_completion_matches=yes
++  ac_cv_lib_readline_rl_callback_handler_install=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
--	ac_cv_lib_sec_set_auth_parameters=no
-+  ac_cv_lib_readline_rl_completion_matches=no
+-	ac_cv_lib_sec_putprpwnam=no
++  ac_cv_lib_readline_rl_callback_handler_install=no
  fi
 -
 -rm -rf conftest.dSYM
@@ -53558,63 +52491,70 @@
 +    conftest$ac_exeext conftest.$ac_ext
  LIBS=$ac_check_lib_save_LIBS
  fi
--{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_sec_set_auth_parameters" >&5
--$as_echo "$ac_cv_lib_sec_set_auth_parameters" >&6; }
--if test "x$ac_cv_lib_sec_set_auth_parameters" = x""yes; then
+-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_sec_putprpwnam" >&5
+-$as_echo "$ac_cv_lib_sec_putprpwnam" >&6; }
+-if test "x$ac_cv_lib_sec_putprpwnam" = x""yes; then
 -
 -		LIBS="-lsec $LIBS"
 -
 -
 -cat >>confdefs.h <<\_ACEOF
--#define HAVE_SET_AUTH_PARAMETERS 1
+-#define HAVE_PUTPRPWNAM 1
 -_ACEOF
 -
--
--
--else
--
--
--			# set_auth_parameters was not found in libsec
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
++$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
++if test "x$ac_cv_lib_readline_rl_callback_handler_install" = x""yes; then :
++  TERMLDFLAGS="-L$with_readline/lib"
++       TERMCPPFLAGS="-I$with_readline/include"
++       CPPFLAGS="-I$with_readline/include $CPPFLAGS"
++       TERMLIBS="-lreadline $TERMLIBS"
+ 
++$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
+ 
++       break
+ else
++  TERMLIBS= CPPFLAGS=$_cppflags
++fi
+ 
++fi
+ 
+-			# putprpwnam was not found in libsec
 -			# nothing to do here by default
 -			true
-+{ $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 :
+-
++done
  
-+$as_echo "#define HAVE_NEW_LIBREADLINE 1" >>confdefs.h
+-fi
  
- fi
- 
 -	  ;;
 -        esac
++    LDFLAGS=$_ldflags
++    ;;
++  esac
++else
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
  
-+# not all readline libs have rl_event_hook or history_list
-+ac_fn_c_check_decl "$LINENO" "rl_event_hook" "ac_cv_have_decl_rl_event_hook" "#include <readline/readline.h>
-+"
-+if test "x$ac_cv_have_decl_rl_event_hook" = x""yes; then :
-+  ac_have_decl=1
-+else
-+  ac_have_decl=0
  fi
 -done
--
--
--
--# UnixWare 7.x has its getspnam in -lgen
  
-+cat >>confdefs.h <<_ACEOF
-+#define HAVE_DECL_RL_EVENT_HOOK $ac_have_decl
-+_ACEOF
  
--for ac_func in getspnam
+ 
+ 
+-
+-for ac_func in set_auth_parameters
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
 -$as_echo_n "checking for $ac_func... " >&6; }
 -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for history_list in -lreadline" >&5
-+$as_echo_n "checking for history_list in -lreadline... " >&6; }
-+if test "${ac_cv_lib_readline_history_list+set}" = set; then :
++# The readline API changed slightly from readline3 to readline4, so
++# code will generate warnings on one of them unless we have a few
++# special cases.
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
++$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
++if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then :
    $as_echo_n "(cached) " >&6
  else
 -  cat >conftest.$ac_ext <<_ACEOF
@@ -53645,7 +52585,7 @@
  
  /* Override any GCC internal prototype to avoid an error.
     Use char because int might match the return type of a GCC
-@@ -48202,100 +14887,42 @@
+@@ -47490,100 +14640,54 @@
  #ifdef __cplusplus
  extern "C"
  #endif
@@ -53657,12 +52597,12 @@
 -choke me
 -#endif
 -
-+char history_list ();
++char rl_completion_matches ();
  int
  main ()
  {
 -return $ac_func ();
-+return history_list ();
++return rl_completion_matches ();
    ;
    return 0;
  }
@@ -53690,13 +52630,13 @@
 -       }; then
 -  eval "$as_ac_var=yes"
 +if ac_fn_c_try_link "$LINENO"; then :
-+  ac_cv_lib_readline_history_list=yes
++  ac_cv_lib_readline_rl_completion_matches=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	eval "$as_ac_var=no"
-+  ac_cv_lib_readline_history_list=no
++  ac_cv_lib_readline_rl_completion_matches=no
  fi
 -
 -rm -rf conftest.dSYM
@@ -53717,36 +52657,159 @@
 -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 -_ACEOF
 -
--        # getspnam was found in libc or existing $LIBS
+-        # set_auth_parameters was found in libc or existing $LIBS
 -
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
++$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
++if test "x$ac_cv_lib_readline_rl_completion_matches" = x""yes; then :
+ 
+-cat >>confdefs.h <<\_ACEOF
+-#define HAVE_SET_AUTH_PARAMETERS 1
+-_ACEOF
++$as_echo "#define HAVE_NEW_LIBREADLINE 1" >>confdefs.h
+ 
++fi
+ 
+ 
++# not all readline libs have rl_event_hook or history_list
++ac_fn_c_check_decl "$LINENO" "rl_event_hook" "ac_cv_have_decl_rl_event_hook" "#include <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
+ 
+-        # set_auth_parameters was not found, try adding libsecurity
+-	case " $LIBS " in
+-          *\ -lsecurity\ *)
 -
+-		    # set_auth_parameters was not found and we already had libsecurity
+-		    # nothing to do here by default
+-		    true
++cat >>confdefs.h <<_ACEOF
++#define HAVE_DECL_RL_EVENT_HOOK $ac_have_decl
++_ACEOF
+ 
+-	    ;;
+-          *)
+-	    # set_auth_parameters was not found, try adding libsecurity
+-	    { $as_echo "$as_me:$LINENO: checking for set_auth_parameters in -lsecurity" >&5
+-$as_echo_n "checking for set_auth_parameters in -lsecurity... " >&6; }
+-if test "${ac_cv_lib_security_set_auth_parameters+set}" = set; then
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for history_list in -lreadline" >&5
++$as_echo_n "checking for history_list in -lreadline... " >&6; }
++if test "${ac_cv_lib_readline_history_list+set}" = set; then :
+   $as_echo_n "(cached) " >&6
+ else
+   ac_check_lib_save_LIBS=$LIBS
+-LIBS="-lsecurity  $LIBS"
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++LIBS="-lreadline $TERMLIBS $LIBS"
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ 
+ /* Override any GCC internal prototype to avoid an error.
+@@ -47592,111 +14696,43 @@
+ #ifdef __cplusplus
+ extern "C"
+ #endif
+-char set_auth_parameters ();
++char history_list ();
+ int
+ main ()
+ {
+-return set_auth_parameters ();
++return history_list ();
+   ;
+   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_security_set_auth_parameters=yes
++if ac_fn_c_try_link "$LINENO"; then :
++  ac_cv_lib_readline_history_list=yes
+ else
+-  $as_echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	ac_cv_lib_security_set_auth_parameters=no
++  ac_cv_lib_readline_history_list=no
+ fi
+-
+-rm -rf conftest.dSYM
+-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+-      conftest$ac_exeext conftest.$ac_ext
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
+ LIBS=$ac_check_lib_save_LIBS
+ fi
+-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_security_set_auth_parameters" >&5
+-$as_echo "$ac_cv_lib_security_set_auth_parameters" >&6; }
+-if test "x$ac_cv_lib_security_set_auth_parameters" = x""yes; then
+-
+-		LIBS="-lsecurity $LIBS"
+-
+-
 -cat >>confdefs.h <<\_ACEOF
--#define HAVE_GETSPNAM 1
+-#define HAVE_SET_AUTH_PARAMETERS 1
 -_ACEOF
 -
 -
+-
+-else
+-
+-
+-			# set_auth_parameters was not found in libsecurity
+-			# nothing to do here by default
+-			true
+-
+-
+-fi
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_history_list" >&5
 +$as_echo "$ac_cv_lib_readline_history_list" >&6; }
 +if test "x$ac_cv_lib_readline_history_list" = x""yes; then :
  
--else
+-	  ;;
+-        esac
 +$as_echo "#define HAVE_HISTORY_LIST 1" >>confdefs.h
  
--        # getspnam was not found, try adding libgen
--	case " $LIBS " in
--          *\ -lgen\ *)
-+fi
+ fi
+-done
+-
  
--		    # getspnam was not found and we already had libgen
--		    # nothing to do here by default
--		    true
  
--	    ;;
--          *)
--	    # getspnam was not found, try adding libgen
--	    { $as_echo "$as_me:$LINENO: checking for getspnam in -lgen" >&5
--$as_echo_n "checking for getspnam in -lgen... " >&6; }
--if test "${ac_cv_lib_gen_getspnam+set}" = set; then
+-
+-for ac_func in set_auth_parameters
+-do
+-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
+-$as_echo_n "checking for $ac_func... " >&6; }
+-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
 +###############################################
 +# test for where we get yp_get_default_domain() from
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing yp_get_default_domain" >&5
@@ -53754,9 +52817,7 @@
 +if test "${ac_cv_search_yp_get_default_domain+set}" = set; then :
    $as_echo_n "(cached) " >&6
  else
--  ac_check_lib_save_LIBS=$LIBS
--LIBS="-lgen  $LIBS"
--cat >conftest.$ac_ext <<_ACEOF
+-  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
@@ -53764,18 +52825,42 @@
 +  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.
-@@ -48304,213 +14931,299 @@
+    Use char because int might match the return type of a GCC
+@@ -47704,316 +14740,299 @@
  #ifdef __cplusplus
  extern "C"
  #endif
--char getspnam ();
+-char $ac_func ();
+-/* The GNU C library defines this for functions which it implements
+-    to always fail with ENOSYS.  Some functions are actually named
+-    something starting with __ and the normal name is an alias.  */
+-#if defined __stub_$ac_func || defined __stub___$ac_func
+-choke me
+-#endif
+-
 +char yp_get_default_domain ();
  int
  main ()
  {
--return getspnam ();
+-return $ac_func ();
 +return yp_get_default_domain ();
    ;
    return 0;
@@ -53802,7 +52887,10 @@
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
--  ac_cv_lib_gen_getspnam=yes
+-  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"
@@ -53820,44 +52908,48 @@
 +fi
 +done
 +if test "${ac_cv_search_yp_get_default_domain+set}" = set; then :
-+
- else
--  $as_echo "$as_me: failed program was:" >&5
--sed 's/^/| /' conftest.$ac_ext >&5
+ 
+-	eval "$as_ac_var=no"
++else
 +  ac_cv_search_yp_get_default_domain=no
 +fi
 +rm conftest.$ac_ext
 +LIBS=$ac_func_search_save_LIBS
-+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"
  
--	ac_cv_lib_gen_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
--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
+-$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 yp_get_default_domain
 +do :
 +  ac_fn_c_check_func "$LINENO" "yp_get_default_domain" "ac_cv_func_yp_get_default_domain"
 +if test "x$ac_cv_func_yp_get_default_domain" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
+   cat >>confdefs.h <<_ACEOF
+-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 +#define HAVE_YP_GET_DEFAULT_DOMAIN 1
-+_ACEOF
-+
- 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
+ _ACEOF
+ 
+-        # set_auth_parameters was found in libc or existing $LIBS
++fi
 +done
  
--		LIBS="-lgen $LIBS"
  
+-cat >>confdefs.h <<\_ACEOF
+-#define HAVE_SET_AUTH_PARAMETERS 1
 +# Check if we have execl, if not we need to compile smbrun.
 +for ac_func in execl
 +do :
@@ -53865,17 +52957,20 @@
 +if test "x$ac_cv_func_execl" = x""yes; then :
 +  cat >>confdefs.h <<_ACEOF
 +#define HAVE_EXECL 1
-+_ACEOF
-+
+ _ACEOF
+ 
 +fi
 +done
  
--cat >>confdefs.h <<\_ACEOF
--#define HAVE_GETSPNAM 1
 +if test x"$ac_cv_func_execl" = x"no"; then
 +    EXTRA_BIN_PROGS="$EXTRA_BIN_PROGS bin/smbrun\$(EXEEXT)"
 +fi
-+
+ 
+-else
+-
+-        # set_auth_parameters was not found, try adding libsec
+-	case " $LIBS " in
+-          *\ -lsec\ *)
 +for ac_func in getcwd fchown chmod fchmod mknod mknod64
 +do :
 +  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
@@ -53884,24 +52979,157 @@
 +   if test "x$as_val" = x""yes; then :
 +  cat >>confdefs.h <<_ACEOF
 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
- _ACEOF
++_ACEOF
  
+-		    # set_auth_parameters was not found and we already had libsec
+-		    # nothing to do here by default
+-		    true
 +fi
 +done
  
+-	    ;;
+-          *)
+-	    # set_auth_parameters was not found, try adding libsec
+-	    { $as_echo "$as_me:$LINENO: checking for set_auth_parameters in -lsec" >&5
+-$as_echo_n "checking for set_auth_parameters in -lsec... " >&6; }
+-if test "${ac_cv_lib_sec_set_auth_parameters+set}" = set; then
+-  $as_echo_n "(cached) " >&6
+-else
+-  ac_check_lib_save_LIBS=$LIBS
+-LIBS="-lsec  $LIBS"
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
 +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
+-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 set_auth_parameters ();
+-int
+-main ()
+-{
+-return set_auth_parameters ();
+-  ;
+-  return 0;
+-}
++fi
++done
++
++for ac_func in strchr chflags
++do :
++  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
++ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
++eval as_val=\$$as_ac_var
++   if test "x$as_val" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+ _ACEOF
+-rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (ac_try="$ac_link"
+-case "(($ac_try" in
+-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+-  *) ac_try_echo=$ac_try;;
+-esac
+-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+-$as_echo "$ac_try_echo") >&5
+-  (eval "$ac_link") 2>conftest.er1
+-  ac_status=$?
+-  grep -v '^ *+' conftest.er1 >conftest.err
+-  rm -f conftest.er1
+-  cat conftest.err >&5
+-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); } && {
+-	 test -z "$ac_c_werror_flag" ||
+-	 test ! -s conftest.err
+-       } && test -s conftest$ac_exeext && {
+-	 test "$cross_compiling" = yes ||
+-	 $as_test_x conftest$ac_exeext
+-       }; then
+-  ac_cv_lib_sec_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
+ fi
++done
++
++for ac_func in getrlimit fsync fdatasync setpgid
++do :
++  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
++ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
++eval as_val=\$$as_ac_var
++   if test "x$as_val" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 +_ACEOF
  
+-rm -rf conftest.dSYM
+-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+-      conftest$ac_exeext conftest.$ac_ext
+-LIBS=$ac_check_lib_save_LIBS
+ fi
+-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_sec_set_auth_parameters" >&5
+-$as_echo "$ac_cv_lib_sec_set_auth_parameters" >&6; }
+-if test "x$ac_cv_lib_sec_set_auth_parameters" = x""yes; then
++done
+ 
+-		LIBS="-lsec $LIBS"
++for ac_func in setsid glob strpbrk crypt16 getauthuid
++do :
++  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
++ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
++eval as_val=\$$as_ac_var
++   if test "x$as_val" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
++_ACEOF
+ 
++fi
++done
+ 
+-cat >>confdefs.h <<\_ACEOF
+-#define HAVE_SET_AUTH_PARAMETERS 1
++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"
++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 initgroups select poll rdchk getgrnam getgrent pathconf
++do :
++  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
++ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
++eval as_val=\$$as_ac_var
++   if test "x$as_val" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
++_ACEOF
+ 
 -else
 +fi
 +done
  
-+for ac_func in strchr chflags
++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`
 +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
@@ -53911,13 +53139,13 @@
 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 +_ACEOF
  
--			# getspnam was not found in libgen
+-			# set_auth_parameters was not found in libsec
 -			# nothing to do here by default
 -			true
 +fi
 +done
  
-+for ac_func in getrlimit fsync fdatasync setpgid
++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"
@@ -53932,7 +53160,7 @@
  
 -	  ;;
 -        esac
-+for ac_func in setsid glob strpbrk crypt16 getauthuid
++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"
@@ -53945,7 +53173,7 @@
  fi
  done
  
-+for ac_func in sigprocmask sigblock sigaction sigset innetgr setnetgrent getnetgrent endnetgrent
++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"
@@ -53958,14 +53186,13 @@
 +fi
 +done
  
-+for ac_func in initgroups select poll rdchk getgrnam getgrent pathconf
+-# UnixWare 7.x has its getspnam in -lgen
++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
@@ -53981,14 +53208,12 @@
 -else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
-+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`
-+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
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
@@ -53996,20 +53221,22 @@
 -/* 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
-+for ac_func in lstat64 fopen64 atexit grantpt lseek64 ftruncate64
++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"
@@ -54019,10 +53246,6 @@
 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 +_ACEOF
  
--#undef $ac_func
-+fi
-+done
- 
 -/* Override any GCC internal prototype to avoid an error.
 -   Use char because int might match the return type of a GCC
 -   builtin and then its argument prototype would still apply.  */
@@ -54036,15 +53259,8 @@
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
 -#endif
-+for ac_func in fseek64 fseeko64 ftell64 ftello64 setluid getpwanam
-+do :
-+  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-+eval as_val=\$$as_ac_var
-+   if test "x$as_val" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-+_ACEOF
++fi
++done
  
 -int
 -main ()
@@ -54053,10 +53269,7 @@
 -  ;
 -  return 0;
 -}
-+fi
-+done
-+
-+for ac_func in opendir64 readdir64 seekdir64 telldir64 rewinddir64 closedir64
++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"
@@ -54064,17 +53277,6 @@
 +   if test "x$as_val" = x""yes; then :
 +  cat >>confdefs.h <<_ACEOF
 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-+_ACEOF
-+
-+fi
-+done
-+
-+for ac_func in getpwent_r
-+do :
-+  ac_fn_c_check_func "$LINENO" "getpwent_r" "ac_cv_func_getpwent_r"
-+if test "x$ac_cv_func_getpwent_r" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define HAVE_GETPWENT_R 1
  _ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
@@ -54105,19 +53307,11 @@
 -	eval "$as_ac_var=no"
  fi
 +done
-+
-+for ac_func in getdents64
-+do :
-+  ac_fn_c_check_func "$LINENO" "getdents64" "ac_cv_func_getdents64"
-+if test "x$ac_cv_func_getdents64" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define HAVE_GETDENTS64 1
-+_ACEOF
  
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
- fi
+-fi
 -ac_res=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
@@ -54125,9 +53319,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 setenv strcasecmp fcvt fcvtl
++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"
@@ -54138,72 +53330,48 @@
  _ACEOF
  
 -        # getspnam was found in libc or existing $LIBS
+-
 +fi
 +done
-+
-+for ac_func in syslog vsyslog timegm
-+do :
-+  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-+eval as_val=\$$as_ac_var
-+   if test "x$as_val" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-+_ACEOF
  
-+fi
-+done
- 
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_GETSPNAM 1
-+for ac_func in setlocale nl_langinfo
-+do :
-+  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-+eval as_val=\$$as_ac_var
-+   if test "x$as_val" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
- _ACEOF
- 
-+fi
-+done
- 
 +for ac_func in nanosleep
 +do :
 +  ac_fn_c_check_func "$LINENO" "nanosleep" "ac_cv_func_nanosleep"
 +if test "x$ac_cv_func_nanosleep" = x""yes; then :
 +  cat >>confdefs.h <<_ACEOF
 +#define HAVE_NANOSLEEP 1
-+_ACEOF
+ _ACEOF
  
- else
++else
  
--        # getspnam was not found, try adding libsecurity
+ 
+-else
++ac_check_lib_ext_save_LIBS=$LIBS
++LIBS="-lrt $LIBS  $LIBS"
+ 
+-        # getspnam was not found, try adding libgen
 -	case " $LIBS " in
--          *\ -lsecurity\ *)
+-          *\ -lgen\ *)
  
--		    # 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
-+ac_check_lib_ext_save_LIBS=$LIBS
-+LIBS="-lrt $LIBS  $LIBS"
  
 -	    ;;
 -          *)
--	    # getspnam was not found, try adding libsecurity
--	    { $as_echo "$as_me:$LINENO: checking for getspnam in -lsecurity" >&5
--$as_echo_n "checking for getspnam in -lsecurity... " >&6; }
--if test "${ac_cv_lib_security_getspnam+set}" = set; then
-+
-+
+-	    # getspnam was not found, try adding libgen
+-	    { $as_echo "$as_me:$LINENO: checking for getspnam in -lgen" >&5
+-$as_echo_n "checking for getspnam in -lgen... " >&6; }
+-if test "${ac_cv_lib_gen_getspnam+set}" = set; then
 +        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nanosleep in -lrt" >&5
 +$as_echo_n "checking for nanosleep in -lrt... " >&6; }
 +if test "${ac_cv_lib_ext_rt_nanosleep+set}" = set; then :
    $as_echo_n "(cached) " >&6
  else
 -  ac_check_lib_save_LIBS=$LIBS
--LIBS="-lsecurity  $LIBS"
+-LIBS="-lgen  $LIBS"
 -cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
@@ -54213,7 +53381,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -48519,111 +15232,223 @@
+@@ -48022,213 +15041,178 @@
  #ifdef __cplusplus
  extern "C"
  #endif
@@ -54249,36 +53417,56 @@
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
--  ac_cv_lib_security_getspnam=yes
+-  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
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	ac_cv_lib_gen_getspnam=no
 +  ac_cv_lib_ext_rt_nanosleep=no;
 +		  ac_cv_lib_ext_rt=no
-+fi
+ fi
 +rm -f core conftest.err conftest.$ac_objext \
 +    conftest$ac_exeext conftest.$ac_ext
-+
-+fi
+ 
+-rm -rf conftest.dSYM
+-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+-      conftest$ac_exeext conftest.$ac_ext
+-LIBS=$ac_check_lib_save_LIBS
+ fi
+-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_gen_getspnam" >&5
+-$as_echo "$ac_cv_lib_gen_getspnam" >&6; }
+-if test "x$ac_cv_lib_gen_getspnam" = x""yes; then
+-
+-		LIBS="-lgen $LIBS"
+-
+-
+-cat >>confdefs.h <<\_ACEOF
+-#define HAVE_GETSPNAM 1
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_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
+ _ACEOF
  
--	ac_cv_lib_security_getspnam=no
- fi
++fi
 +LIBS=$ac_check_lib_ext_save_LIBS
-+
+ 
 +if test $ac_cv_lib_ext_rt = yes; then :
 +  cat >>confdefs.h <<_ACEOF
 +#define HAVE_LIBRT 1
 +_ACEOF
-+
+ 
+-else
+-
+-
+-			# getspnam was not found in libgen
+-			# nothing to do here by default
+-			true
 +		case "$LIBS" in
 +		    *-lrt*)
 +			;;
@@ -54286,20 +53474,25 @@
 +			LIBS="-lrt $LIBS"
 +			;;
 +		esac
-+
  
--rm -rf conftest.dSYM
--rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
--      conftest$ac_exeext conftest.$ac_ext
--LIBS=$ac_check_lib_save_LIBS
+ 
  fi
--{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_security_getspnam" >&5
--$as_echo "$ac_cv_lib_security_getspnam" >&6; }
--if test "x$ac_cv_lib_security_getspnam" = x""yes; then
 +fi
 +done
  
--		LIBS="-lsecurity $LIBS"
+-	  ;;
+-        esac
++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
 +do :
 +  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
@@ -54313,8 +53506,6 @@
 +fi
 +done
  
--cat >>confdefs.h <<\_ACEOF
--#define HAVE_GETSPNAM 1
 +for ac_func in memalign posix_memalign hstrerror
 +do :
 +  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
@@ -54323,27 +53514,49 @@
 +   if test "x$as_val" = x""yes; then :
 +  cat >>confdefs.h <<_ACEOF
 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
- _ACEOF
++_ACEOF
  
 +fi
 +done
  
+-for ac_func in getspnam
+-do
+-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
+-$as_echo_n "checking for $ac_func... " >&6; }
+-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+-  $as_echo_n "(cached) " >&6
+-else
+-  cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
 +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_SYS_MMAN_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
  
--else
+-/* 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
  
--			# getspnam was not found in libsecurity
--			# nothing to do here by default
--			true
+-#undef $ac_func
 +# setbuffer, shmget, shm_open are needed for smbtorture
 +for ac_func in shmget shm_open
 +do :
@@ -54354,10 +53567,30 @@
 +  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
+-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
 +fi
 +done
  
+-int
+-main ()
+-{
+-return $ac_func ();
+-  ;
+-  return 0;
+-}
 +for ac_func in gettext dgettext
 +do :
 +  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
@@ -54366,25 +53599,78 @@
 +   if test "x$as_val" = x""yes; then :
 +  cat >>confdefs.h <<_ACEOF
 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-+_ACEOF
+ _ACEOF
+-rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (ac_try="$ac_link"
+-case "(($ac_try" in
+-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+-  *) ac_try_echo=$ac_try;;
+-esac
+-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+-$as_echo "$ac_try_echo") >&5
+-  (eval "$ac_link") 2>conftest.er1
+-  ac_status=$?
+-  grep -v '^ *+' conftest.er1 >conftest.err
+-  rm -f conftest.er1
+-  cat conftest.err >&5
+-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); } && {
+-	 test -z "$ac_c_werror_flag" ||
+-	 test ! -s conftest.err
+-       } && test -s conftest$ac_exeext && {
+-	 test "$cross_compiling" = yes ||
+-	 $as_test_x conftest$ac_exeext
+-       }; then
+-  eval "$as_ac_var=yes"
+-else
+-  $as_echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
  
+-	eval "$as_ac_var=no"
  fi
 +done
  
--	  ;;
--        esac
+-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 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
+ 
+-        # getspnam was found in libc or existing $LIBS
+-
++fi
++done
+ 
+-cat >>confdefs.h <<\_ACEOF
+-#define HAVE_GETSPNAM 1
 +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
  
- fi
- done
++fi
++done
  
  
+-else
 +# Find a method of generating a stack trace
 +for ac_header in execinfo.h libexc.h libunwind.h
 +do :
@@ -54395,24 +53681,32 @@
 +  cat >>confdefs.h <<_ACEOF
 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
 +_ACEOF
-+
+ 
+-        # getspnam was not found, try adding libsecurity
+-	case " $LIBS " in
+-          *\ -lsecurity\ *)
 +fi
  
+-		    # getspnam was not found and we already had libsecurity
+-		    # nothing to do here by default
+-		    true
 +done
  
--for ac_func in getspnam
--do
--as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
--{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
--$as_echo_n "checking for $ac_func... " >&6; }
--if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+-	    ;;
+-          *)
+-	    # getspnam was not found, try adding libsecurity
+-	    { $as_echo "$as_me:$LINENO: checking for getspnam in -lsecurity" >&5
+-$as_echo_n "checking for getspnam in -lsecurity... " >&6; }
+-if test "${ac_cv_lib_security_getspnam+set}" = set; then
 +# 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
+-  ac_check_lib_save_LIBS=$LIBS
+-LIBS="-lsecurity  $LIBS"
+-cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
@@ -54420,34 +53714,50 @@
 +  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>
-+/* 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"
+ /* Override any GCC internal prototype to avoid an error.
+@@ -48237,111 +15221,67 @@
+ #ifdef __cplusplus
+ extern "C"
  #endif
+-char getspnam ();
 +char backtrace_symbols ();
-+int
-+main ()
-+{
+ int
+ main ()
+ {
+-return getspnam ();
 +return backtrace_symbols ();
-+  ;
-+  return 0;
-+}
-+_ACEOF
+   ;
+   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_security_getspnam=yes
+-else
+-  $as_echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	ac_cv_lib_security_getspnam=no
 +for ac_lib in '' execinfo; do
 +  if test -z "$ac_lib"; then
 +    ac_res="none required"
@@ -54457,16 +53767,39 @@
 +  fi
 +  if ac_fn_c_try_link "$LINENO"; then :
 +  ac_cv_search_backtrace_symbols=$ac_res
-+fi
+ fi
+-
+-rm -rf conftest.dSYM
+-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+-      conftest$ac_exeext conftest.$ac_ext
+-LIBS=$ac_check_lib_save_LIBS
 +rm -f core conftest.err conftest.$ac_objext \
 +    conftest$ac_exeext
 +  if test "${ac_cv_search_backtrace_symbols+set}" = set; then :
 +  break
-+fi
+ fi
+-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_security_getspnam" >&5
+-$as_echo "$ac_cv_lib_security_getspnam" >&6; }
+-if test "x$ac_cv_lib_security_getspnam" = x""yes; then
+-
+-		LIBS="-lsecurity $LIBS"
+-
+-
+-cat >>confdefs.h <<\_ACEOF
+-#define HAVE_GETSPNAM 1
+-_ACEOF
+-
+-
 +done
 +if test "${ac_cv_search_backtrace_symbols+set}" = set; then :
-+
-+else
+ 
+ else
+-
+-
+-			# getspnam was not found in libsecurity
+-			# nothing to do here by default
+-			true
+-
 +  ac_cv_search_backtrace_symbols=no
 +fi
 +rm conftest.$ac_ext
@@ -54477,9 +53810,11 @@
 +ac_res=$ac_cv_search_backtrace_symbols
 +if test "$ac_res" != no; then :
 +  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
-+
-+fi
-+
+ 
+ fi
+ 
+-	  ;;
+-        esac
 +for ac_func in backtrace_symbols
 +do :
 +  ac_fn_c_check_func "$LINENO" "backtrace_symbols" "ac_cv_func_backtrace_symbols"
@@ -54487,24 +53822,53 @@
 +  cat >>confdefs.h <<_ACEOF
 +#define HAVE_BACKTRACE_SYMBOLS 1
 +_ACEOF
-+
-+fi
-+done
  
--#undef $ac_func
+ fi
+ done
+ 
+-
+-
+-
+-for ac_func in getspnam
+-do
+-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
+-$as_echo_n "checking for $ac_func... " >&6; }
+-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for trace_back_stack in -lexc" >&5
 +$as_echo_n "checking for trace_back_stack in -lexc... " >&6; }
 +if test "${ac_cv_lib_exc_trace_back_stack+set}" = set; then :
-+  $as_echo_n "(cached) " >&6
-+else
+   $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="-lexc  $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
-@@ -48631,214 +15456,192 @@
+@@ -48349,214 +15289,192 @@
  #ifdef __cplusplus
  extern "C"
  #endif
@@ -54695,45 +54059,31 @@
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
--	ac_cv_lib_sec_getspnam=no
 +  samba_cv_HAVE_ONEFS=no
- fi
++fi
 +rm -f core conftest.err conftest.$ac_objext \
 +    conftest$ac_exeext conftest.$ac_ext
 +echo $samba_cv_HAVE_ONEFS
 +if test x"$samba_cv_HAVE_ONEFS" = x"yes"; then
- 
--rm -rf conftest.dSYM
--rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
--      conftest$ac_exeext conftest.$ac_ext
--LIBS=$ac_check_lib_save_LIBS
--fi
--{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_sec_getspnam" >&5
--$as_echo "$ac_cv_lib_sec_getspnam" >&6; }
--if test "x$ac_cv_lib_sec_getspnam" = x""yes; then
++
 +$as_echo "#define HAVE_ONEFS 1" >>confdefs.h
- 
--		LIBS="-lsec $LIBS"
++
 +    default_shared_modules="$default_shared_modules vfs_onefs vfs_onefs_shadow_copy perfcount_onefs"
 +    default_static_modules="$default_static_modules"
 +    ONEFS_LIBS="-lisi_acl -lisi_ecs -lisi_event -lisi_util"
 +    # Need to also add general libs for oplocks support
 +    save_LIBS="$save_LIBS -lisi_ecs -lisi_event -lisi_util -ldevstat"
 +fi
- 
++
 +LIBS="$save_LIBS"
- 
--cat >>confdefs.h <<\_ACEOF
--#define HAVE_GETSPNAM 1
--_ACEOF
++
 +# Note that all the libunwind symbols in the API are defined to internal
 +# platform-specific version, so we must include libunwind.h before checking
 +# any of them.
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libunwind" >&5
 +$as_echo_n "checking for libunwind... " >&6; }
 +save_LIBS=$LIBS
- 
++
 +UNWIND_ARCH="unknown"
 +if test x"$UNAME_I" != x"unknown"; then
 +	UNWIND_ARCH="$UNAME_I"
@@ -54742,7 +54092,7 @@
 +elif test x"$UNAME_P" != x"unknown"; then
 +	UNWIND_ARCH="$UNAME_P"
 +fi
- 
++
 +case "$UNWIND_ARCH" in
 +	unknown)
 +		# This probably won't link without
@@ -54760,17 +54110,24 @@
 +		;;
 +esac
  
--else
+-	ac_cv_lib_sec_getspnam=no
+-fi
 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 +/* end confdefs.h.  */
  
+-rm -rf conftest.dSYM
+-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+-      conftest$ac_exeext conftest.$ac_ext
+-LIBS=$ac_check_lib_save_LIBS
+-fi
+-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_sec_getspnam" >&5
+-$as_echo "$ac_cv_lib_sec_getspnam" >&6; }
+-if test "x$ac_cv_lib_sec_getspnam" = x""yes; then
 +#ifdef HAVE_LIBUNWIND_H
 +#include <libunwind.h>
 +#endif
  
--			# getspnam was not found in libsec
--			# nothing to do here by default
--			true
+-		LIBS="-lsec $LIBS"
 +int
 +main ()
 +{
@@ -54780,22 +54137,25 @@
 +	unw_getcontext(&ctx); unw_init_local(&cur, &ctx);
 +	unw_get_proc_name(&cur, buf, sizeof(buf), &off);
  
--fi
+-cat >>confdefs.h <<\_ACEOF
+-#define HAVE_GETSPNAM 1
 +  ;
 +  return 0;
 +}
-+_ACEOF
+ _ACEOF
 +if ac_fn_c_try_link "$LINENO"; then :
  
--	  ;;
--        esac
 +	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 +$as_echo "yes" >&6; }
  
--fi
--done
 +$as_echo "#define HAVE_LIBUNWIND 1" >>confdefs.h
  
+-else
+-
+-
+-			# getspnam was not found in libsec
+-			# nothing to do here by default
+-			true
  
 +	# If we have libunwind, test whether we also have libunwind-ptrace
 +	# which would let us unwind arbitrary processes.
@@ -54808,10 +54168,18 @@
 +#define HAVE_LIBUNWIND_PTRACE_H 1
 +_ACEOF
  
-+fi
+ fi
  
-+done
+-	  ;;
+-        esac
+-
+-fi
+ done
  
+-
+-
+-
+-
 -for ac_func in bigcrypt
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
@@ -54851,7 +54219,7 @@
  
  /* Override any GCC internal prototype to avoid an error.
     Use char because int might match the return type of a GCC
-@@ -48846,856 +15649,638 @@
+@@ -48564,856 +15482,646 @@
  #ifdef __cplusplus
  extern "C"
  #endif
@@ -55185,12 +54553,12 @@
 -/* 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
@@ -55296,7 +54664,7 @@
 -        # bigcrypt was found in libc or existing $LIBS
 +fi
 +done
- 
++
 +for ac_func in __sys_llseek llseek _llseek __llseek readdir64 _readdir64 __readdir64
 +do :
 +  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
@@ -55307,11 +54675,11 @@
 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 +_ACEOF
  
++fi
++done
+ 
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_BIGCRYPT 1
-+fi
-+done
-+
 +for ac_func in pread _pread __pread pread64 _pread64 __pread64
 +do :
 +  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
@@ -55448,20 +54816,28 @@
 -
 -		LIBS="-lsec $LIBS"
 -
-+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- 
+-
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_BIGCRYPT 1
 -_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
-+       if test "$cross_compiling" = yes; then :
-+  linux_getgrouplist_ok=cross
++       { $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.  */
  
@@ -55473,6 +54849,9 @@
 +       int libc_major = __GLIBC__;
 +       int libc_minor = __GLIBC_MINOR__;
  
+-			# 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))
@@ -55483,26 +54862,23 @@
  
 +_ACEOF
 +if ac_fn_c_try_run "$LINENO"; then :
-+  linux_getgrouplist_ok=yes
- else
-+  linux_getgrouplist_ok=no
++  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
  
-+       if test x"$linux_getgrouplist_ok" = x"yes"; then
+ 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
  
--			# bigcrypt was not found in libsec
--			# nothing to do here by default
--			true
--
--
--fi
-+$as_echo "#define HAVE_GETGROUPLIST 1" >>confdefs.h
- 
 -	  ;;
 -        esac
++$as_echo "#define HAVE_GETGROUPLIST 1" >>confdefs.h
++
 +       fi
 +       ;;
 +    *)
@@ -55702,17 +55078,19 @@
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+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.  */
- 
+-/* 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"
++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.  */
++
 +#if defined(HAVE_UNISTD_H)
 +#include <unistd.h>
  #endif
@@ -56098,9 +55476,9 @@
  
  fi
 -done
- 
 -
 -
+ 
 -
 -for ac_func in strsignal
 -do
@@ -56143,7 +55521,7 @@
  
  /* Override any GCC internal prototype to avoid an error.
     Use char because int might match the return type of a GCC
-@@ -49703,85 +16288,43 @@
+@@ -49421,85 +16129,43 @@
  #ifdef __cplusplus
  extern "C"
  #endif
@@ -56249,7 +55627,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -49790,108 +16333,44 @@
+@@ -49508,108 +16174,44 @@
  #ifdef __cplusplus
  extern "C"
  #endif
@@ -56380,7 +55758,7 @@
  
  /* Override any GCC internal prototype to avoid an error.
     Use char because int might match the return type of a GCC
-@@ -49899,103 +16378,80 @@
+@@ -49617,103 +16219,80 @@
  #ifdef __cplusplus
  extern "C"
  #endif
@@ -56429,28 +55807,18 @@
  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
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv___dn_expand" >&5
-+$as_echo "$ac_cv_lib_resolv___dn_expand" >&6; }
-+if test "x$ac_cv_lib_resolv___dn_expand" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define HAVE_LIBRESOLV 1
-+_ACEOF
-+
-+  LIBS="-lresolv $LIBS"
- 
--	eval "$as_ac_var=no"
  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
@@ -56458,7 +55826,20 @@
 -as_val=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv___dn_expand" >&5
++$as_echo "$ac_cv_lib_resolv___dn_expand" >&6; }
++if test "x$ac_cv_lib_resolv___dn_expand" = x""yes; then :
+   cat >>confdefs.h <<_ACEOF
+-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
++#define HAVE_LIBRESOLV 1
+ _ACEOF
+ 
++  LIBS="-lresolv $LIBS"
 +
+ fi
+-done
+ 
+ 
 +#
 +# Check for the functions putprpwnam, set_auth_parameters,
 +# getspnam, bigcrypt and getprpwnam in -lsec and -lsecurity
@@ -56470,16 +55851,13 @@
 +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
++  cat >>confdefs.h <<_ACEOF
 +#define HAVE_PUTPRPWNAM 1
- _ACEOF
- 
--fi
--done
++_ACEOF
++
 +        # putprpwnam was found in libc or existing $LIBS
- 
- 
++
++
 +$as_echo "#define HAVE_PUTPRPWNAM 1" >>confdefs.h
  
  
@@ -56535,7 +55913,7 @@
  
  /* Override any GCC internal prototype to avoid an error.
     Use char because int might match the return type of a GCC
-@@ -50003,100 +16459,90 @@
+@@ -49721,183 +16300,89 @@
  #ifdef __cplusplus
  extern "C"
  #endif
@@ -56584,12 +55962,14 @@
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	eval "$as_ac_var=no"
 +  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
+ 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 :
@@ -56609,15 +55989,9 @@
 +			true
 +
  
--	eval "$as_ac_var=no"
- fi
- 
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
-+	  ;;
-+        esac
-+
  fi
 -ac_res=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
@@ -56626,28 +56000,17 @@
 -as_val=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+done
-+
-+
-+
-+  for ac_func in putprpwnam
-+do :
-+  ac_fn_c_check_func "$LINENO" "putprpwnam" "ac_cv_func_putprpwnam"
-+if test "x$ac_cv_func_putprpwnam" = x""yes; then :
-   cat >>confdefs.h <<_ACEOF
+-  cat >>confdefs.h <<_ACEOF
 -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-+#define HAVE_PUTPRPWNAM 1
- _ACEOF
- 
--fi
--done
-+        # putprpwnam was found in libc or existing $LIBS
+-_ACEOF
 +
-+
-+$as_echo "#define HAVE_PUTPRPWNAM 1" >>confdefs.h
-+
++	  ;;
++        esac
  
+ fi
+ done
  
+ 
 -for ac_func in sizeof_proplist_entry
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
@@ -56655,10 +56018,17 @@
 -$as_echo_n "checking for $ac_func... " >&6; }
 -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
 -  $as_echo_n "(cached) " >&6
- else
+-else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
--_ACEOF
++
++  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
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
@@ -56670,39 +56040,23 @@
 -    which can conflict with char $ac_func (); below.
 -    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
 -    <limits.h> exists even on freestanding compilers.  */
-+        # putprpwnam was not found, try adding libsec
-+	case " $LIBS " in
-+          *\ -lsec\ *)
++        # putprpwnam was found in libc or existing $LIBS
  
 -#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.  */
++$as_echo "#define HAVE_PUTPRPWNAM 1" >>confdefs.h
  
- /* Override any GCC internal prototype to avoid an error.
-    Use char because int might match the return type of a GCC
-@@ -50104,82 +16550,90 @@
- #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
@@ -56710,17 +56064,15 @@
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
 -#endif
--
-+char putprpwnam ();
- int
- main ()
- {
+ 
+-int
+-main ()
+-{
 -return $ac_func ();
-+return putprpwnam ();
-   ;
-   return 0;
- }
- _ACEOF
+-  ;
+-  return 0;
+-}
+-_ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -56743,46 +56095,18 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  eval "$as_ac_var=yes"
-+if ac_fn_c_try_link "$LINENO"; then :
-+  ac_cv_lib_sec_putprpwnam=yes
- else
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+  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_sec_putprpwnam" >&5
-+$as_echo "$ac_cv_lib_sec_putprpwnam" >&6; }
-+if test "x$ac_cv_lib_sec_putprpwnam" = x""yes; then :
-+
-+		LIBS="-lsec $LIBS"
-+
-+
-+$as_echo "#define HAVE_PUTPRPWNAM 1" >>confdefs.h
-+
-+
-+
-+else
-+
-+
-+			# putprpwnam was not found in libsec
-+			# nothing to do here by default
-+			true
-+
  
 -	eval "$as_ac_var=no"
- fi
+-fi
++else
  
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
-+	  ;;
-+        esac
-+
- fi
+-fi
 -ac_res=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
@@ -56790,50 +56114,30 @@
 -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 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
+-  cat >>confdefs.h <<_ACEOF
 -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-+#define HAVE_SET_AUTH_PARAMETERS 1
- _ACEOF
+-_ACEOF
++        # putprpwnam was not found, try adding libsec
++	case " $LIBS " in
++          *\ -lsec\ *)
  
 -fi
 -done
-+        # set_auth_parameters was found in libc or existing $LIBS
++		    # putprpwnam was not found and we already had libsec
++		    # nothing to do here by default
++		    true
  
 -  ;;
 -  *)
 -	{ $as_echo "$as_me:$LINENO: checking for library containing getxattr" >&5
 -$as_echo_n "checking for library containing getxattr... " >&6; }
 -if test "${ac_cv_search_getxattr+set}" = set; then
-+
-+$as_echo "#define HAVE_SET_AUTH_PARAMETERS 1" >>confdefs.h
-+
-+
-+
-+else
-+
-+        # set_auth_parameters was not found, try adding libsecurity
-+	case " $LIBS " in
-+          *\ -lsecurity\ *)
-+
-+		    # 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 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 :
++	    # 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_func_search_save_LIBS=$LIBS
@@ -56843,22 +56147,22 @@
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
 +  ac_check_lib_save_LIBS=$LIBS
-+LIBS="-lsecurity  $LIBS"
++LIBS="-lsec  $LIBS"
 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -50188,109 +16642,90 @@
+@@ -49906,109 +16391,91 @@
  #ifdef __cplusplus
  extern "C"
  #endif
 -char getxattr ();
-+char set_auth_parameters ();
++char putprpwnam ();
  int
  main ()
  {
 -return getxattr ();
-+return set_auth_parameters ();
++return putprpwnam ();
    ;
    return 0;
  }
@@ -56893,24 +56197,24 @@
 -       }; then
 -  ac_cv_search_getxattr=$ac_res
 +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
  
  
 -fi
@@ -56931,7 +56235,7 @@
 -LIBS=$ac_func_search_save_LIBS
 +
 +
-+			# set_auth_parameters was not found in libsecurity
++			# putprpwnam was not found in libsec
 +			# nothing to do here by default
 +			true
 +
@@ -56948,9 +56252,10 @@
  
  fi
 +done
-+
-+
-+
+ 
+ 
+ 
+ 
 +  for ac_func in set_auth_parameters
 +do :
 +  ac_fn_c_check_func "$LINENO" "set_auth_parameters" "ac_cv_func_set_auth_parameters"
@@ -56958,14 +56263,14 @@
 +  cat >>confdefs.h <<_ACEOF
 +#define HAVE_SET_AUTH_PARAMETERS 1
 +_ACEOF
- 
++
 +        # set_auth_parameters was found in libc or existing $LIBS
- 
- 
++
++
 +$as_echo "#define HAVE_SET_AUTH_PARAMETERS 1" >>confdefs.h
++
  
  
- 
 -for ac_func in getxattr lgetxattr fgetxattr listxattr llistxattr
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
@@ -56988,36 +56293,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.  */
-+        # set_auth_parameters was not found, try adding libsec
++        # set_auth_parameters was not found, try adding libsecurity
 +	case " $LIBS " in
-+          *\ -lsec\ *)
++          *\ -lsecurity\ *)
  
 -#ifdef __STDC__
 -# include <limits.h>
 -#else
 -# include <assert.h>
 -#endif
-+		    # 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
  
 -#undef $ac_func
 +	    ;;
 +          *)
-+	    # set_auth_parameters was not found, try adding libsec
-+	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for set_auth_parameters in -lsec" >&5
-+$as_echo_n "checking for set_auth_parameters in -lsec... " >&6; }
-+if test "${ac_cv_lib_sec_set_auth_parameters+set}" = set; then :
++	    # 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_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
-@@ -50298,105 +16733,92 @@
+@@ -50016,105 +16483,90 @@
  #ifdef __cplusplus
  extern "C"
  #endif
@@ -57062,23 +56367,23 @@
 -       }; then
 -  eval "$as_ac_var=yes"
 +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
 -
 -	eval "$as_ac_var=no"
-+  ac_cv_lib_sec_set_auth_parameters=no
-+fi
++  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 :
++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 :
 +
-+		LIBS="-lsec $LIBS"
++		LIBS="-lsecurity $LIBS"
 +
 +
 +$as_echo "#define HAVE_SET_AUTH_PARAMETERS 1" >>confdefs.h
@@ -57088,7 +56393,7 @@
 +else
 +
 +
-+			# set_auth_parameters was not found in libsec
++			# set_auth_parameters was not found in libsecurity
 +			# nothing to do here by default
 +			true
 +
@@ -57116,20 +56421,18 @@
  
  
  
-+# 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
 +
-+        # getspnam was found in libc or existing $LIBS
++        # set_auth_parameters 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
  
  
  
@@ -57155,36 +56458,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
-@@ -50404,65 +16826,47 @@
+@@ -50122,105 +16574,92 @@
  #ifdef __cplusplus
  extern "C"
  #endif
@@ -57196,12 +56499,12 @@
 -choke me
 -#endif
 -
-+char getspnam ();
++char set_auth_parameters ();
  int
  main ()
  {
 -return $ac_func ();
-+return getspnam ();
++return set_auth_parameters ();
    ;
    return 0;
  }
@@ -57229,33 +56532,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
++  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 :
++{ $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
 +
@@ -57280,10 +56583,11 @@
  
  fi
  done
-@@ -50470,39 +16874,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"
@@ -57294,7 +56598,7 @@
 +
 +        # getspnam was found in libc or existing $LIBS
 +
-+
+ 
 +$as_echo "#define HAVE_GETSPNAM 1" >>confdefs.h
  
  
@@ -57321,36 +56625,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
-@@ -50510,103 +16918,90 @@
+@@ -50228,103 +16667,91 @@
  #ifdef __cplusplus
  extern "C"
  #endif
@@ -57395,21 +56699,21 @@
 -       }; 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
-+  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
@@ -57419,7 +56723,7 @@
 +else
 +
 +
-+			# getspnam was not found in libsecurity
++			# getspnam was not found in libgen
 +			# nothing to do here by default
 +			true
 +
@@ -57445,6 +56749,7 @@
 +
 +
 +
++
 +  for ac_func in getspnam
 +do :
 +  ac_fn_c_check_func "$LINENO" "getspnam" "ac_cv_func_getspnam"
@@ -57457,65 +56762,64 @@
 -fi
 -done
 +        # getspnam was found in libc or existing $LIBS
-+
  
+ 
 +$as_echo "#define HAVE_GETSPNAM 1" >>confdefs.h
  
  
  
-+else
-+
-+        # getspnam was not found, try adding libsec
-+	case " $LIBS " in
-+          *\ -lsec\ *)
-+
-+		    # getspnam was not found and we already had libsec
-+		    # nothing to do here by default
-+		    true
- 
 -for ac_func in flistxattr removexattr lremovexattr fremovexattr
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
 -$as_echo_n "checking for $ac_func... " >&6; }
 -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-+	    ;;
-+          *)
-+	    # 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
+-  $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="-lsec  $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.  */
--
++        # getspnam was not found, try adding libsecurity
++	case " $LIBS " in
++          *\ -lsecurity\ *)
+ 
 -#ifdef __STDC__
 -# include <limits.h>
 -#else
 -# include <assert.h>
 -#endif
--
++		    # 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 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="-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
-@@ -50614,102 +17009,91 @@
+@@ -50332,102 +16759,90 @@
  #ifdef __cplusplus
  extern "C"
  #endif
@@ -57560,21 +56864,21 @@
 -       }; 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_sec_getspnam=no
++  ac_cv_lib_security_getspnam=no
 +fi
 +rm -f core conftest.err conftest.$ac_objext \
 +    conftest$ac_exeext conftest.$ac_ext
 +LIBS=$ac_check_lib_save_LIBS
 +fi
-+{ $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 :
++{ $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="-lsec $LIBS"
++		LIBS="-lsecurity $LIBS"
 +
 +
 +$as_echo "#define HAVE_GETSPNAM 1" >>confdefs.h
@@ -57584,7 +56888,7 @@
 +else
 +
 +
-+			# getspnam was not found in libsec
++			# getspnam was not found in libsecurity
 +			# nothing to do here by default
 +			true
 +
@@ -57610,22 +56914,21 @@
 +
 +
 +
-+
-+  for ac_func in bigcrypt
++  for ac_func in getspnam
 +do :
-+  ac_fn_c_check_func "$LINENO" "bigcrypt" "ac_cv_func_bigcrypt"
-+if test "x$ac_cv_func_bigcrypt" = x""yes; then :
++  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
-+#define HAVE_BIGCRYPT 1
++#define HAVE_GETSPNAM 1
  _ACEOF
  
 -fi
 -done
-+        # bigcrypt was found in libc or existing $LIBS
++        # getspnam was found in libc or existing $LIBS
  
  
-+$as_echo "#define HAVE_BIGCRYPT 1" >>confdefs.h
++$as_echo "#define HAVE_GETSPNAM 1" >>confdefs.h
 +
  
  
@@ -57651,36 +56954,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.  */
-+        # bigcrypt was not found, try adding libsecurity
++        # getspnam was not found, try adding libsec
 +	case " $LIBS " in
-+          *\ -lsecurity\ *)
++          *\ -lsec\ *)
  
 -#ifdef __STDC__
 -# include <limits.h>
 -#else
 -# include <assert.h>
 -#endif
-+		    # bigcrypt was not found and we already had libsecurity
++		    # getspnam was not found and we already had libsec
 +		    # nothing to do here by default
 +		    true
  
 -#undef $ac_func
 +	    ;;
 +          *)
-+	    # bigcrypt was not found, try adding libsecurity
-+	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bigcrypt in -lsecurity" >&5
-+$as_echo_n "checking for bigcrypt in -lsecurity... " >&6; }
-+if test "${ac_cv_lib_security_bigcrypt+set}" = set; then :
++	    # 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="-lsecurity  $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
-@@ -50717,103 +17101,90 @@
+@@ -50435,103 +16850,91 @@
  #ifdef __cplusplus
  extern "C"
  #endif
@@ -57692,12 +56995,12 @@
 -choke me
 -#endif
 -
-+char bigcrypt ();
++char getspnam ();
  int
  main ()
  {
 -return $ac_func ();
-+return bigcrypt ();
++return getspnam ();
    ;
    return 0;
  }
@@ -57725,31 +57028,31 @@
 -       }; then
 -  eval "$as_ac_var=yes"
 +if ac_fn_c_try_link "$LINENO"; then :
-+  ac_cv_lib_security_bigcrypt=yes
++  ac_cv_lib_sec_getspnam=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+  ac_cv_lib_security_bigcrypt=no
++  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_security_bigcrypt" >&5
-+$as_echo "$ac_cv_lib_security_bigcrypt" >&6; }
-+if test "x$ac_cv_lib_security_bigcrypt" = x""yes; then :
++{ $as_echo "$as_me:${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="-lsecurity $LIBS"
++		LIBS="-lsec $LIBS"
 +
 +
-+$as_echo "#define HAVE_BIGCRYPT 1" >>confdefs.h
++$as_echo "#define HAVE_GETSPNAM 1" >>confdefs.h
 +
 +
 +
 +else
 +
 +
-+			# bigcrypt was not found in libsecurity
++			# getspnam was not found in libsec
 +			# nothing to do here by default
 +			true
 +
@@ -57775,6 +57078,7 @@
 +
 +
 +
++
 +  for ac_func in bigcrypt
 +do :
 +  ac_fn_c_check_func "$LINENO" "bigcrypt" "ac_cv_func_bigcrypt"
@@ -57810,41 +57114,42 @@
 -/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
 -   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
 -#define $ac_func innocuous_$ac_func
- 
+-
 -/* System header to define __stub macros and hopefully few prototypes,
 -    which can conflict with char $ac_func (); below.
 -    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
 -    <limits.h> exists even on freestanding compilers.  */
-+        # bigcrypt was not found, try adding libsec
-+	case " $LIBS " in
-+          *\ -lsec\ *)
  
 -#ifdef __STDC__
 -# include <limits.h>
 -#else
 -# include <assert.h>
 -#endif
-+		    # bigcrypt was not found and we already had libsec
++        # bigcrypt was not found, try adding libsecurity
++	case " $LIBS " in
++          *\ -lsecurity\ *)
+ 
+-#undef $ac_func
++		    # bigcrypt was not found and we already had libsecurity
 +		    # nothing to do here by default
 +		    true
- 
--#undef $ac_func
++
 +	    ;;
 +          *)
-+	    # bigcrypt was not found, try adding libsec
-+	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bigcrypt in -lsec" >&5
-+$as_echo_n "checking for bigcrypt in -lsec... " >&6; }
-+if test "${ac_cv_lib_sec_bigcrypt+set}" = set; then :
++	    # bigcrypt was not found, try adding libsecurity
++	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bigcrypt in -lsecurity" >&5
++$as_echo_n "checking for bigcrypt in -lsecurity... " >&6; }
++if test "${ac_cv_lib_security_bigcrypt+set}" = set; then :
 +  $as_echo_n "(cached) " >&6
 +else
 +  ac_check_lib_save_LIBS=$LIBS
-+LIBS="-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
-@@ -50821,103 +17192,91 @@
+@@ -50539,103 +16942,90 @@
  #ifdef __cplusplus
  extern "C"
  #endif
@@ -57889,21 +57194,21 @@
 -       }; then
 -  eval "$as_ac_var=yes"
 +if ac_fn_c_try_link "$LINENO"; then :
-+  ac_cv_lib_sec_bigcrypt=yes
++  ac_cv_lib_security_bigcrypt=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+  ac_cv_lib_sec_bigcrypt=no
++  ac_cv_lib_security_bigcrypt=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_bigcrypt" >&5
-+$as_echo "$ac_cv_lib_sec_bigcrypt" >&6; }
-+if test "x$ac_cv_lib_sec_bigcrypt" = x""yes; then :
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_security_bigcrypt" >&5
++$as_echo "$ac_cv_lib_security_bigcrypt" >&6; }
++if test "x$ac_cv_lib_security_bigcrypt" = x""yes; then :
 +
-+		LIBS="-lsec $LIBS"
++		LIBS="-lsecurity $LIBS"
 +
 +
 +$as_echo "#define HAVE_BIGCRYPT 1" >>confdefs.h
@@ -57913,7 +57218,7 @@
 +else
 +
 +
-+			# bigcrypt was not found in libsec
++			# bigcrypt was not found in libsecurity
 +			# nothing to do here by default
 +			true
 +
@@ -57939,22 +57244,21 @@
 +
 +
 +
-+
-+  for ac_func in getprpwnam
++  for ac_func in bigcrypt
 +do :
-+  ac_fn_c_check_func "$LINENO" "getprpwnam" "ac_cv_func_getprpwnam"
-+if test "x$ac_cv_func_getprpwnam" = x""yes; then :
++  ac_fn_c_check_func "$LINENO" "bigcrypt" "ac_cv_func_bigcrypt"
++if test "x$ac_cv_func_bigcrypt" = x""yes; then :
    cat >>confdefs.h <<_ACEOF
 -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-+#define HAVE_GETPRPWNAM 1
++#define HAVE_BIGCRYPT 1
  _ACEOF
  
 -fi
 -done
-+        # getprpwnam was found in libc or existing $LIBS
++        # bigcrypt was found in libc or existing $LIBS
  
  
-+$as_echo "#define HAVE_GETPRPWNAM 1" >>confdefs.h
++$as_echo "#define HAVE_BIGCRYPT 1" >>confdefs.h
  
  
  
@@ -57980,36 +57284,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.  */
-+        # getprpwnam was not found, try adding libsecurity
++        # bigcrypt was not found, try adding libsec
 +	case " $LIBS " in
-+          *\ -lsecurity\ *)
++          *\ -lsec\ *)
  
 -#ifdef __STDC__
 -# include <limits.h>
 -#else
 -# include <assert.h>
 -#endif
-+		    # getprpwnam was not found and we already had libsecurity
++		    # bigcrypt was not found and we already had libsec
 +		    # nothing to do here by default
 +		    true
  
 -#undef $ac_func
 +	    ;;
 +          *)
-+	    # getprpwnam was not found, try adding libsecurity
-+	    { $as_echo "$as_me:${as_lineno-$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 :
++	    # bigcrypt was not found, try adding libsec
++	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bigcrypt in -lsec" >&5
++$as_echo_n "checking for bigcrypt in -lsec... " >&6; }
++if test "${ac_cv_lib_sec_bigcrypt+set}" = set; then :
 +  $as_echo_n "(cached) " >&6
 +else
 +  ac_check_lib_save_LIBS=$LIBS
-+LIBS="-lsecurity  $LIBS"
++LIBS="-lsec  $LIBS"
 +cat 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
-@@ -50925,107 +17284,90 @@
+@@ -50643,107 +17033,91 @@
  #ifdef __cplusplus
  extern "C"
  #endif
@@ -58021,12 +57325,12 @@
 -choke me
 -#endif
 -
-+char getprpwnam ();
++char bigcrypt ();
  int
  main ()
  {
 -return $ac_func ();
-+return getprpwnam ();
++return bigcrypt ();
    ;
    return 0;
  }
@@ -58054,31 +57358,31 @@
 -       }; then
 -  eval "$as_ac_var=yes"
 +if ac_fn_c_try_link "$LINENO"; then :
-+  ac_cv_lib_security_getprpwnam=yes
++  ac_cv_lib_sec_bigcrypt=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+  ac_cv_lib_security_getprpwnam=no
++  ac_cv_lib_sec_bigcrypt=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_getprpwnam" >&5
-+$as_echo "$ac_cv_lib_security_getprpwnam" >&6; }
-+if test "x$ac_cv_lib_security_getprpwnam" = x""yes; then :
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sec_bigcrypt" >&5
++$as_echo "$ac_cv_lib_sec_bigcrypt" >&6; }
++if test "x$ac_cv_lib_sec_bigcrypt" = x""yes; then :
 +
-+		LIBS="-lsecurity $LIBS"
++		LIBS="-lsec $LIBS"
 +
 +
-+$as_echo "#define HAVE_GETPRPWNAM 1" >>confdefs.h
++$as_echo "#define HAVE_BIGCRYPT 1" >>confdefs.h
 +
 +
 +
 +else
 +
 +
-+			# getprpwnam was not found in libsecurity
++			# bigcrypt was not found in libsec
 +			# nothing to do here by default
 +			true
 +
@@ -58104,6 +57408,7 @@
 +
 +
 +
++
 +  for ac_func in getprpwnam
 +do :
 +  ac_fn_c_check_func "$LINENO" "getprpwnam" "ac_cv_func_getprpwnam"
@@ -58150,36 +57455,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.  */
-+        # getprpwnam was not found, try adding libsec
++        # getprpwnam was not found, try adding libsecurity
 +	case " $LIBS " in
-+          *\ -lsec\ *)
++          *\ -lsecurity\ *)
  
 -#ifdef __STDC__
 -# include <limits.h>
 -#else
 -# include <assert.h>
 -#endif
-+		    # getprpwnam was not found and we already had libsec
++		    # getprpwnam was not found and we already had libsecurity
 +		    # nothing to do here by default
 +		    true
  
 -#undef $ac_func
 +	    ;;
 +          *)
-+	    # getprpwnam was not found, try adding libsec
-+	    { $as_echo "$as_me:${as_lineno-$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 :
++	    # getprpwnam was not found, try adding libsecurity
++	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getprpwnam in -lsecurity" >&5
++$as_echo_n "checking for getprpwnam in -lsecurity... " >&6; }
++if test "${ac_cv_lib_security_getprpwnam+set}" = set; then :
 +  $as_echo_n "(cached) " >&6
 +else
 +  ac_check_lib_save_LIBS=$LIBS
-+LIBS="-lsec  $LIBS"
++LIBS="-lsecurity  $LIBS"
 +cat 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
-@@ -51033,190 +17375,77 @@
+@@ -50751,190 +17125,90 @@
  #ifdef __cplusplus
  extern "C"
  #endif
@@ -58224,19 +57529,19 @@
 -       }; then
 -  eval "$as_ac_var=yes"
 +if ac_fn_c_try_link "$LINENO"; then :
-+  ac_cv_lib_sec_getprpwnam=yes
++  ac_cv_lib_security_getprpwnam=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_security_getprpwnam=no
+ fi
 -
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
-+  ac_cv_lib_sec_getprpwnam=no
- fi
+-fi
 -ac_res=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
@@ -58256,9 +57561,9 @@
 -
 -  ;;
 -esac
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sec_getprpwnam" >&5
-+$as_echo "$ac_cv_lib_sec_getprpwnam" >&6; }
-+if test "x$ac_cv_lib_sec_getprpwnam" = x""yes; then :
++{ $as_echo "$as_me:${as_lineno-$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 :
  
 -########################################################
 -# Do xattr functions take additional options like on Darwin?
@@ -58268,7 +57573,7 @@
 -if test "${smb_attr_cv_xattr_add_opt+set}" = set; then
 -  $as_echo_n "(cached) " >&6
 -else
-+		LIBS="-lsec $LIBS"
++		LIBS="-lsecurity $LIBS"
  
 -		old_LIBS=$LIBS
 -		LIBS="$LIBS $ACL_LIBS"
@@ -58324,7 +57629,7 @@
 -fi
  
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-+			# getprpwnam was not found in libsec
++			# getprpwnam was not found in libsecurity
 +			# nothing to do here by default
 +			true
 +
@@ -58350,23 +57655,186 @@
  
 -cat >>confdefs.h <<\_ACEOF
 -#define BROKEN_EXTATTR 1
--_ACEOF
++
++  for ac_func in getprpwnam
++do :
++  ac_fn_c_check_func "$LINENO" "getprpwnam" "ac_cv_func_getprpwnam"
++if test "x$ac_cv_func_getprpwnam" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_GETPRPWNAM 1
+ _ACEOF
  
 -    ;;
 -  *)
++        # getprpwnam was found in libc or existing $LIBS
++
++
++$as_echo "#define HAVE_GETPRPWNAM 1" >>confdefs.h
+ 
+ 
+ 
+-for ac_func in extattr_delete_fd extattr_delete_file extattr_delete_link
+-do
+-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
+-$as_echo_n "checking for $ac_func... " >&6; }
+-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+-  $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.  */
++        # getprpwnam was not found, try adding libsec
++	case " $LIBS " in
++          *\ -lsec\ *)
+ 
+-#ifdef __STDC__
+-# include <limits.h>
+-#else
+-# include <assert.h>
+-#endif
++		    # getprpwnam was not found and we already had libsec
++		    # nothing to do here by default
++		    true
+ 
+-#undef $ac_func
++	    ;;
++          *)
++	    # getprpwnam was not found, try adding libsec
++	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getprpwnam in -lsec" >&5
++$as_echo_n "checking for getprpwnam in -lsec... " >&6; }
++if test "${ac_cv_lib_sec_getprpwnam+set}" = set; then :
++  $as_echo_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
+@@ -50942,102 +17216,77 @@
+ #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 getprpwnam ();
+ int
+ main ()
+ {
+-return $ac_func ();
++return getprpwnam ();
+   ;
+   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_sec_getprpwnam=yes
+ else
+-  $as_echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
++  ac_cv_lib_sec_getprpwnam=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_getprpwnam" >&5
++$as_echo "$ac_cv_lib_sec_getprpwnam" >&6; }
++if test "x$ac_cv_lib_sec_getprpwnam" = x""yes; then :
++
++		LIBS="-lsec $LIBS"
++
++
++$as_echo "#define HAVE_GETPRPWNAM 1" >>confdefs.h
++
++
++
++else
++
++
++			# getprpwnam was not found in libsec
++			# nothing to do here by default
++			true
++
+ 
+-	eval "$as_ac_var=no"
+ fi
+ 
+-rm -rf conftest.dSYM
+-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+-      conftest$ac_exeext conftest.$ac_ext
++	  ;;
++        esac
++
+ fi
+-ac_res=`eval 'as_val=${'$as_ac_var'}
+-		 $as_echo "$as_val"'`
+-	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+-$as_echo "$ac_res" >&6; }
+-as_val=`eval 'as_val=${'$as_ac_var'}
+-		 $as_echo "$as_val"'`
+-   if test "x$as_val" = x""yes; then
++done
++
++
++
 +for ac_func in strsignal
 +do :
 +  ac_fn_c_check_func "$LINENO" "strsignal" "ac_cv_func_strsignal"
 +if test "x$ac_cv_func_strsignal" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
+   cat >>confdefs.h <<_ACEOF
+-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 +#define HAVE_STRSIGNAL 1
-+_ACEOF
+ _ACEOF
  
-+fi
-+done
+ fi
+ done
  
  
--for ac_func in extattr_delete_fd extattr_delete_file extattr_delete_link
+-
+-
+-for ac_func in extattr_get_fd extattr_get_file extattr_get_link
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
@@ -58408,7 +57876,7 @@
  
  /* Override any GCC internal prototype to avoid an error.
     Use char because int might match the return type of a GCC
-@@ -51224,62 +17453,66 @@
+@@ -51045,62 +17294,53 @@
  #ifdef __cplusplus
  extern "C"
  #endif
@@ -58452,6 +57920,9 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  eval "$as_ac_var=yes"
+-else
+-  $as_echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
 +for ac_lib in '' proplist; do
 +  if test -z "$ac_lib"; then
 +    ac_res="none required"
@@ -58469,41 +57940,24 @@
 +fi
 +done
 +if test "${ac_cv_search_getproplist+set}" = set; then :
-+
- else
--  $as_echo "$as_me: failed program was:" >&5
--sed 's/^/| /' conftest.$ac_ext >&5
+ 
+-	eval "$as_ac_var=no"
++else
 +  ac_cv_search_getproplist=no
 +fi
 +rm conftest.$ac_ext
 +LIBS=$ac_func_search_save_LIBS
-+fi
+ fi
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getproplist" >&5
 +$as_echo "$ac_cv_search_getproplist" >&6; }
 +ac_res=$ac_cv_search_getproplist
 +if test "$ac_res" != no; then :
 +  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
-+
-+fi
-+
-+	for ac_func in getproplist fgetproplist setproplist fsetproplist
-+do :
-+  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-+eval as_val=\$$as_ac_var
-+   if test "x$as_val" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-+_ACEOF
  
--	eval "$as_ac_var=no"
- fi
-+done
- 
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
--fi
+ fi
 -ac_res=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
@@ -58511,7 +57965,8 @@
 -as_val=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+	for ac_func in delproplist fdelproplist add_proplist_entry get_proplist_entry
++
++	for ac_func in getproplist fgetproplist setproplist fsetproplist
 +do :
 +  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
@@ -58520,10 +57975,23 @@
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
  _ACEOF
-@@ -51287,39 +17520,27 @@
+@@ -51108,39 +17348,40 @@
  fi
  done
  
++	for ac_func in delproplist fdelproplist add_proplist_entry get_proplist_entry
++do :
++  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
++ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
++eval as_val=\$$as_ac_var
++   if test "x$as_val" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
++_ACEOF
++
++fi
++done
+ 
 +	for ac_func in sizeof_proplist_entry
 +do :
 +  ac_fn_c_check_func "$LINENO" "sizeof_proplist_entry" "ac_cv_func_sizeof_proplist_entry"
@@ -58535,8 +58003,7 @@
 +fi
 +done
  
--
--for ac_func in extattr_get_fd extattr_get_file extattr_get_link
+-for ac_func in extattr_list_fd extattr_list_file extattr_list_link
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
@@ -58576,7 +58043,7 @@
  
  /* Override any GCC internal prototype to avoid an error.
     Use char because int might match the return type of a GCC
-@@ -51327,62 +17548,53 @@
+@@ -51148,62 +17389,118 @@
  #ifdef __cplusplus
  extern "C"
  #endif
@@ -58620,9 +58087,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"
@@ -58640,45 +58104,36 @@
 +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"
- 
--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
 +
++fi
++
 +	for ac_func in getxattr lgetxattr fgetxattr listxattr llistxattr
 +do :
 +  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
 +eval as_val=\$$as_ac_var
 +   if test "x$as_val" = x""yes; then :
-   cat >>confdefs.h <<_ACEOF
- #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
- _ACEOF
-@@ -51390,102 +17602,64 @@
- fi
- done
- 
++  cat >>confdefs.h <<_ACEOF
++#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
++_ACEOF
++
++fi
++done
++
 +	for ac_func in getea fgetea lgetea listea flistea llistea
 +do :
 +  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
@@ -58688,21 +58143,10 @@
 +  cat >>confdefs.h <<_ACEOF
 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 +_ACEOF
- 
++
 +fi
 +done
- 
--
--for ac_func in extattr_list_fd extattr_list_file extattr_list_link
--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 removeea fremoveea lremoveea setea fsetea lsetea
 +do :
 +  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
@@ -58711,28 +58155,11 @@
 +   if test "x$as_val" = x""yes; then :
 +  cat >>confdefs.h <<_ACEOF
 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
- _ACEOF
--cat confdefs.h >>conftest.$ac_ext
--cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
--/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
--   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
--#define $ac_func innocuous_$ac_func
--
--/* System header to define __stub macros and hopefully few prototypes,
--    which can conflict with char $ac_func (); below.
--    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
--    <limits.h> exists even on freestanding compilers.  */
- 
--#ifdef __STDC__
--# include <limits.h>
--#else
--# include <assert.h>
--#endif
++_ACEOF
++
 +fi
 +done
- 
--#undef $ac_func
++
 +	for ac_func in flistxattr removexattr lremovexattr fremovexattr
 +do :
 +  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
@@ -58743,29 +58170,10 @@
 +#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
--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
-+fi
+-	eval "$as_ac_var=no"
+ fi
 +done
- 
--int
--main ()
--{
--return $ac_func ();
--  ;
--  return 0;
--}
++
 +	for ac_func in setxattr lsetxattr fsetxattr
 +do :
 +  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
@@ -58774,41 +58182,12 @@
 +   if test "x$as_val" = x""yes; then :
 +  cat >>confdefs.h <<_ACEOF
 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
- _ACEOF
--rm -f conftest.$ac_objext conftest$ac_exeext
--if { (ac_try="$ac_link"
--case "(($ac_try" in
--  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
--  *) ac_try_echo=$ac_try;;
--esac
--eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
--$as_echo "$ac_try_echo") >&5
--  (eval "$ac_link") 2>conftest.er1
--  ac_status=$?
--  grep -v '^ *+' conftest.er1 >conftest.err
--  rm -f conftest.er1
--  cat conftest.err >&5
--  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
--  (exit $ac_status); } && {
--	 test -z "$ac_c_werror_flag" ||
--	 test ! -s conftest.err
--       } && test -s conftest$ac_exeext && {
--	 test "$cross_compiling" = yes ||
--	 $as_test_x conftest$ac_exeext
--       }; then
--  eval "$as_ac_var=yes"
--else
--  $as_echo "$as_me: failed program was:" >&5
--sed 's/^/| /' conftest.$ac_ext >&5
++_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
@@ -58816,6 +58195,8 @@
 -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_get attr_list attr_set attr_remove
 +do :
 +  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
@@ -58825,7 +58206,7 @@
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
  _ACEOF
-@@ -51493,102 +17667,141 @@
+@@ -51211,102 +17508,141 @@
  fi
  done
  
@@ -59042,7 +58423,7 @@
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
  _ACEOF
-@@ -51600,7 +17813,7 @@
+@@ -51318,7 +17654,7 @@
  esac
  
  # Check whether --enable-static was given.
@@ -59051,7 +58432,7 @@
    enableval=$enable_static; p=${PACKAGE-default}
  case $enableval in
  yes) enable_static=yes ;;
-@@ -51622,7 +17835,7 @@
+@@ -51340,7 +17676,7 @@
  fi
  
  # Check whether --enable-shared was given.
@@ -59060,7 +58441,7 @@
    enableval=$enable_shared; p=${PACKAGE-default}
  case $enableval in
  yes) enable_shared=yes ;;
-@@ -51649,16 +17862,16 @@
+@@ -51367,16 +17703,16 @@
  PIE_CFLAGS=""
  PIE_LDFLAGS=""
  # Check whether --enable-pie was given.
@@ -59080,7 +58461,7 @@
    $as_echo_n "(cached) " >&6
  else
  
-@@ -51667,11 +17880,11 @@
+@@ -51385,11 +17721,11 @@
  main () { return 0;}
  EOF
  		if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS -pie -fPIE -o conftest conftest.c 1>&5'
@@ -59095,7 +58476,7 @@
  		then
  			samba_cv_fpie=yes
  		else
-@@ -51680,7 +17893,7 @@
+@@ -51398,7 +17734,7 @@
  		rm -f conftest*
  
  fi
@@ -59104,7 +58485,7 @@
  $as_echo "$samba_cv_fpie" >&6; }
  	if test x"${samba_cv_fpie}" = x"yes"
  	then
-@@ -51692,16 +17905,16 @@
+@@ -51410,16 +17746,16 @@
  # Set defaults
  RELRO_LDFLAGS=""
  # Check whether --enable-relro was given.
@@ -59124,7 +58505,7 @@
    $as_echo_n "(cached) " >&6
  else
  
-@@ -51710,11 +17923,11 @@
+@@ -51428,11 +17764,11 @@
  main () { return 0;}
  EOF
  		if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS -Wl,-z,relro -o conftest conftest.c 1>&5'
@@ -59139,7 +58520,7 @@
  		then
  			samba_cv_relro=yes
  		else
-@@ -51723,7 +17936,7 @@
+@@ -51441,7 +17777,7 @@
  		rm -f conftest*
  
  fi
@@ -59148,7 +58529,7 @@
  $as_echo "$samba_cv_relro" >&6; }
  	if test x"${samba_cv_relro}" = x"yes"
  	then
-@@ -51752,7 +17965,7 @@
+@@ -51470,7 +17806,7 @@
  # You need to specify how to create a shared library and
    # how to compile C code to produce PIC object files
  
@@ -59157,7 +58538,7 @@
  $as_echo_n "checking ability to build shared libraries... " >&6; }
  
    # and these are for particular systems
-@@ -51760,14 +17973,10 @@
+@@ -51478,14 +17814,10 @@
  		*linux* | gnu* | k*bsd*-gnu | kopensolaris*-gnu | *qnx*)
  			case "$host_os" in
  				*linux*)
@@ -59174,7 +58555,7 @@
   ;;
  			esac
  			BLDSHARED="true"
-@@ -51779,15 +17988,11 @@
+@@ -51496,15 +17828,11 @@
  			DYNEXP="-Wl,--export-dynamic"
  			PICFLAG="-fPIC"
  			SONAMEFLAG="-Wl,-soname="
@@ -59192,7 +58573,7 @@
  
  			BLDSHARED="true"
  			LDSHFLAGS="-G"
-@@ -51805,33 +18010,23 @@
+@@ -51522,33 +17850,23 @@
  				LDSHFLAGS="-G \${CFLAGS}"
  			fi
  
@@ -59231,7 +58612,7 @@
  
  			;;
  		*netbsd* | *freebsd* | *dragonfly* )
-@@ -51841,14 +18036,10 @@
+@@ -51558,14 +17876,10 @@
  			SONAMEFLAG="-Wl,-soname,"
  			PICFLAG="-fPIC -DPIC"
  
@@ -59248,7 +58629,7 @@
  
  			;;
  		*openbsd*)  BLDSHARED="true"
-@@ -51857,26 +18048,18 @@
+@@ -51574,26 +17888,18 @@
  			SONAMEFLAG="-Wl,-soname,"
  			PICFLAG="-fPIC"
  
@@ -59279,7 +58660,7 @@
  
  			;;
  			esac
-@@ -51890,15 +18073,11 @@
+@@ -51607,15 +17913,11 @@
  				PICFLAG="-KPIC"
  			fi
  
@@ -59297,7 +58678,7 @@
  
  			BLDSHARED="true"
  			# use expfull to export underscored symbols
-@@ -51914,25 +18093,17 @@
+@@ -51631,25 +17933,17 @@
  			fi
  
  
@@ -59327,7 +58708,7 @@
  
  			# Use special PIC flags for the native HP-UX compiler.
  				BLDSHARED="true"
-@@ -51954,74 +18125,52 @@
+@@ -51671,74 +17965,52 @@
  				DYNEXP="-Wl,-E,+b/usr/local/lib:/usr/lib"
  			fi
  
@@ -59415,7 +58796,7 @@
    $as_echo_n "(cached) " >&6
  else
    if test -n "$ROFF"; then
-@@ -52032,91 +18181,71 @@
+@@ -51749,91 +18021,71 @@
  do
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
@@ -59522,7 +58903,7 @@
  
  			BLDSHARED="true"
  			LDSHFLAGS="-dynamiclib -flat_namespace -undefined suppress"
-@@ -52130,16 +18259,12 @@
+@@ -51847,16 +18099,12 @@
                          # actually support the PIE stuff.
                          PIE_LDFLAGS=
                          PIE_CFLAGS=
@@ -59541,7 +58922,7 @@
  
  			;;
    esac
-@@ -52156,53 +18281,53 @@
+@@ -51873,19 +18121,15 @@
  	LDFLAGS="$LDFLAGS -L./bin"
  fi
  
@@ -59549,6 +58930,141 @@
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $BLDSHARED" >&5
  $as_echo "$BLDSHARED" >&6; }
  
+ for flags in "-Wl,--as-needed" "-Wl,-z,ignore" "-z ignore" ; do
+ 	saved_ldflags="$LDFLAGS"
+-	{ $as_echo "$as_me:$LINENO: checking if $flags works" >&5
++	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $flags works" >&5
+ $as_echo_n "checking if $flags works... " >&6; }
+ 	LDFLAGS="$flags $saved_ldflags"
+-	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.  */
+ 
+ int
+@@ -51896,42 +18140,17 @@
+   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
+-  { $as_echo "$as_me:$LINENO: result: yes" >&5
++if ac_fn_c_try_link "$LINENO"; then :
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+ $as_echo "yes" >&6; }
+ 		LD_AS_NEEDED_FLAG=$flags
+ 		ld_as_needed_flag_found=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 "$as_me:${as_lineno-$LINENO}: result: no" >&5
+ $as_echo "no" >&6; }
+ fi
+-
+-rm -rf conftest.dSYM
+-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+-      conftest$ac_exeext conftest.$ac_ext
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
+ 	LDFLAGS="$LD_AS_NEEDED_FLAG $saved_ldflags"
+ 	test x"$ld_as_needed_flag_found" = xyes && break
+ done
+@@ -51944,14 +18163,10 @@
+ 
+ for flags in "-Wl,-z,defs" "-error_unresolved" "-Wl,-error_unresolved" ; do
+ 	saved_ldflags="$LDFLAGS"
+-	{ $as_echo "$as_me:$LINENO: checking if $flags works" >&5
++	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $flags works" >&5
+ $as_echo_n "checking if $flags works... " >&6; }
+ 	LDFLAGS="$flags $saved_ldflags"
+-	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.  */
+ 
+ int
+@@ -51962,94 +18177,69 @@
+   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
+-  { $as_echo "$as_me:$LINENO: result: yes" >&5
++if ac_fn_c_try_link "$LINENO"; then :
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+ $as_echo "yes" >&6; }
+ 	LDSHFLAGS_Z_DEFS=$flags
+ 	ldshflags_z_defs_found=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 "$as_me:${as_lineno-$LINENO}: result: no" >&5
+ $as_echo "no" >&6; }
+ fi
+-
+-rm -rf conftest.dSYM
+-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+-      conftest$ac_exeext conftest.$ac_ext
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
+ 	LDFLAGS=$saved_ldflags
+ 	test x"$ldshflags_z_defs_found" = xyes && break
+ done
+ 
+-{ $as_echo "$as_me:$LINENO: checking LDSHFLAGS_Z_DEFS" >&5
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHFLAGS_Z_DEFS" >&5
+ $as_echo_n "checking LDSHFLAGS_Z_DEFS... " >&6; }
+-{ $as_echo "$as_me:$LINENO: result: $LDSHFLAGS_Z_DEFS" >&5
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHFLAGS_Z_DEFS" >&5
+ $as_echo "$LDSHFLAGS_Z_DEFS" >&6; }
 -{ $as_echo "$as_me:$LINENO: checking LDFLAGS" >&5
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDFLAGS" >&5
  $as_echo_n "checking LDFLAGS... " >&6; }
@@ -59614,7 +59130,7 @@
    $as_echo_n "(cached) " >&6
  else
  
-@@ -52218,7 +18343,7 @@
+@@ -52065,7 +18255,7 @@
  
  
  fi
@@ -59623,8 +59139,8 @@
  $as_echo "$ac_cv_shlib_works" >&6; }
  if test $ac_cv_shlib_works = no; then
     BLDSHARED=false
-@@ -52234,9 +18359,9 @@
- 	SHLIBEXT="shared_libraries_disabled"
+@@ -52082,9 +18272,9 @@
+ 	merged_build_possible=no
  fi
  
 -{ $as_echo "$as_me:$LINENO: checking used PICFLAG" >&5
@@ -59635,8 +59151,1843 @@
  $as_echo "$PICFLAG" >&6; }
  
  
-@@ -52278,165 +18403,39 @@
+@@ -52156,10 +18346,10 @@
+ USESHARED=false
  
+ 
+-{ $as_echo "$as_me:$LINENO: checking whether to use shared libraries internally" >&5
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use shared libraries internally" >&5
+ $as_echo_n "checking whether to use shared libraries internally... " >&6; }
+ # Check whether --enable-shared-libs was given.
+-if test "${enable_shared_libs+set}" = set; then
++if test "${enable_shared_libs+set}" = set; then :
+   enableval=$enable_shared_libs; enable_shared_libs=$enableval
+ else
+   enable_shared_libs=yes
+@@ -52170,11 +18360,11 @@
+ 	USESHARED=$BLDSHARED
+ fi
+ 
+-{ $as_echo "$as_me:$LINENO: result: $USESHARED" >&5
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $USESHARED" >&5
+ $as_echo "$USESHARED" >&6; }
+ 
+ if test x"$enable_shared_libs" = x"yes" -a x"$BLDSHARED" != x"true" ; then
+-	{ $as_echo "$as_me:$LINENO: WARNING: --enable-shared-libs: no support for shared libraries" >&5
++	{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --enable-shared-libs: no support for shared libraries" >&5
+ $as_echo "$as_me: WARNING: --enable-shared-libs: no support for shared libraries" >&2;}
+ fi
+ 
+@@ -52202,14 +18392,13 @@
+ 
+ 
+ # Check whether --with-static-libs was given.
+-if test "${with_static_libs+set}" = set; then
+-  withval=$with_static_libs; if test $withval; then
++if test "${with_static_libs+set}" = set; then :
++  withval=$with_static_libs; if test $withval; then :
+   for lib in `echo $withval | sed -e 's/,/ /g'` ; do
+ 			lib=`echo $lib | tr '[a-z]' '[A-Z]'`
+ 			eval LINK_$lib=STATIC
+ 		done
+ fi
+-
+ fi
+ 
+ 
+@@ -52231,7 +18420,7 @@
+ #  be extracted from their respective source directories
+ #
+ # Check whether --enable-external_libtalloc was given.
+-if test "${enable_external_libtalloc+set}" = set; then
++if test "${enable_external_libtalloc+set}" = set; then :
+   enableval=$enable_external_libtalloc;  enable_external_libtalloc=$enableval
+ else
+    enable_external_libtalloc=auto
+@@ -52246,9 +18435,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
+-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+ $as_echo_n "checking for $ac_word... " >&6; }
+-if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
++if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
+   $as_echo_n "(cached) " >&6
+ else
+   case $PKG_CONFIG in
+@@ -52261,14 +18450,14 @@
+ do
+   IFS=$as_save_IFS
+   test -z "$as_dir" && as_dir=.
+-  for ac_exec_ext in '' $ac_executable_extensions; do
++    for ac_exec_ext in '' $ac_executable_extensions; do
+   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+     ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
++    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+     break 2
+   fi
+ done
+-done
++  done
+ IFS=$as_save_IFS
+ 
+   ;;
+@@ -52276,10 +18465,10 @@
+ fi
+ PKG_CONFIG=$ac_cv_path_PKG_CONFIG
+ if test -n "$PKG_CONFIG"; then
+-  { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
+ $as_echo "$PKG_CONFIG" >&6; }
+ else
+-  { $as_echo "$as_me:$LINENO: result: no" >&5
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+ $as_echo "no" >&6; }
+ fi
+ 
+@@ -52289,9 +18478,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
+-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+ $as_echo_n "checking for $ac_word... " >&6; }
+-if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
++if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
+   $as_echo_n "(cached) " >&6
+ else
+   case $ac_pt_PKG_CONFIG in
+@@ -52304,14 +18493,14 @@
+ do
+   IFS=$as_save_IFS
+   test -z "$as_dir" && as_dir=.
+-  for ac_exec_ext in '' $ac_executable_extensions; do
++    for ac_exec_ext in '' $ac_executable_extensions; do
+   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+     ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
++    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+     break 2
+   fi
+ done
+-done
++  done
+ IFS=$as_save_IFS
+ 
+   ;;
+@@ -52319,10 +18508,10 @@
+ fi
+ ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
+ if test -n "$ac_pt_PKG_CONFIG"; then
+-  { $as_echo "$as_me:$LINENO: result: $ac_pt_PKG_CONFIG" >&5
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
+ $as_echo "$ac_pt_PKG_CONFIG" >&6; }
+ else
+-  { $as_echo "$as_me:$LINENO: result: no" >&5
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+ $as_echo "no" >&6; }
+ fi
+ 
+@@ -52331,7 +18520,7 @@
+   else
+     case $cross_compiling:$ac_tool_warned in
+ yes:)
+-{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
++{ $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
+@@ -52344,13 +18533,13 @@
+ fi
+ if test -n "$PKG_CONFIG"; then
+ 	_pkg_min_version=0.9.0
+-	{ $as_echo "$as_me:$LINENO: checking pkg-config is at least version $_pkg_min_version" >&5
++	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
+ $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
+ 	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
+-		{ $as_echo "$as_me:$LINENO: result: yes" >&5
++		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+ $as_echo "yes" >&6; }
+ 	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=""
+ 	fi
+@@ -52358,7 +18547,7 @@
+ fi
+ 
+ pkg_failed=no
+-{ $as_echo "$as_me:$LINENO: checking for LIBTALLOC" >&5
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBTALLOC" >&5
+ $as_echo_n "checking for LIBTALLOC... " >&6; }
+ 
+ if test -n "$PKG_CONFIG"; then
+@@ -52366,11 +18555,11 @@
+         pkg_cv_LIBTALLOC_CFLAGS="$LIBTALLOC_CFLAGS"
+     else
+         if test -n "$PKG_CONFIG" && \
+-    { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"talloc >= 2.0.1\"") >&5
++    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"talloc >= 2.0.1\""; } >&5
+   ($PKG_CONFIG --exists --print-errors "talloc >= 2.0.1") 2>&5
+   ac_status=$?
+-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; then
++  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++  test $ac_status = 0; }; then
+   pkg_cv_LIBTALLOC_CFLAGS=`$PKG_CONFIG --cflags "talloc >= 2.0.1" 2>/dev/null`
+ else
+   pkg_failed=yes
+@@ -52384,11 +18573,11 @@
+         pkg_cv_LIBTALLOC_LIBS="$LIBTALLOC_LIBS"
+     else
+         if test -n "$PKG_CONFIG" && \
+-    { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"talloc >= 2.0.1\"") >&5
++    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"talloc >= 2.0.1\""; } >&5
+   ($PKG_CONFIG --exists --print-errors "talloc >= 2.0.1") 2>&5
+   ac_status=$?
+-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; then
++  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++  test $ac_status = 0; }; then
+   pkg_cv_LIBTALLOC_LIBS=`$PKG_CONFIG --libs "talloc >= 2.0.1" 2>/dev/null`
+ else
+   pkg_failed=yes
+@@ -52415,768 +18604,112 @@
+ 	# Put the nasty error message in config.log where it belongs
+ 	echo "$LIBTALLOC_PKG_ERRORS" >&5
+ 
+-	{ $as_echo "$as_me:$LINENO: result: no" >&5
++	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+ $as_echo "no" >&6; }
+                 if test x$enable_external_libtalloc = xyes; then
+-			{ { $as_echo "$as_me:$LINENO: error: Unable to find libtalloc" >&5
+-$as_echo "$as_me: error: Unable to find libtalloc" >&2;}
+-   { (exit 1); exit 1; }; }
++			as_fn_error "Unable to find libtalloc" "$LINENO" 5
+ 		  else
+ 			enable_external_libtalloc=no
+ 		  fi
+ 
+ elif test $pkg_failed = untried; then
+ 	if test x$enable_external_libtalloc = xyes; then
+-			{ { $as_echo "$as_me:$LINENO: error: Unable to find libtalloc" >&5
+-$as_echo "$as_me: error: Unable to find libtalloc" >&2;}
+-   { (exit 1); exit 1; }; }
+-		  else
+-			enable_external_libtalloc=no
+-		  fi
+-
+-else
+-	LIBTALLOC_CFLAGS=$pkg_cv_LIBTALLOC_CFLAGS
+-	LIBTALLOC_LIBS=$pkg_cv_LIBTALLOC_LIBS
+-        { $as_echo "$as_me:$LINENO: result: yes" >&5
+-$as_echo "yes" >&6; }
+-	 enable_external_libtalloc=yes
+-fi
+-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_echo "$as_me:$LINENO: error: cannot find talloc source in $tallocpaths" >&5
+-$as_echo "$as_me: error: cannot find talloc source in $tallocpaths" >&2;}
+-   { (exit 1); exit 1; }; }
+-fi
+-TALLOC_OBJ="talloc.o"
+-
+-
+-TALLOC_CFLAGS="-I$srcdir/$tallocdir"
+-
+-
+-TALLOC_LIBS=""
+-
+-
+-# The cast to long int works around a bug in the HP C Compiler
+-# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+-# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+-# This bug is HP SR number 8606223364.
+-{ $as_echo "$as_me:$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
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
+-$ac_includes_default
+-int
+-main ()
+-{
+-static int test_array [1 - 2 * !(((long int) (sizeof (size_t))) >= 0)];
+-test_array [0] = 0
+-
+-  ;
+-  return 0;
+-}
+-_ACEOF
+-rm -f conftest.$ac_objext
+-if { (ac_try="$ac_compile"
+-case "(($ac_try" in
+-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+-  *) ac_try_echo=$ac_try;;
+-esac
+-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+-$as_echo "$ac_try_echo") >&5
+-  (eval "$ac_compile") 2>conftest.er1
+-  ac_status=$?
+-  grep -v '^ *+' conftest.er1 >conftest.err
+-  rm -f conftest.er1
+-  cat conftest.err >&5
+-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); } && {
+-	 test -z "$ac_c_werror_flag" ||
+-	 test ! -s conftest.err
+-       } && test -s conftest.$ac_objext; then
+-  ac_lo=0 ac_mid=0
+-  while :; do
+-    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 int test_array [1 - 2 * !(((long int) (sizeof (size_t))) <= $ac_mid)];
+-test_array [0] = 0
+-
+-  ;
+-  return 0;
+-}
+-_ACEOF
+-rm -f conftest.$ac_objext
+-if { (ac_try="$ac_compile"
+-case "(($ac_try" in
+-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+-  *) ac_try_echo=$ac_try;;
+-esac
+-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+-$as_echo "$ac_try_echo") >&5
+-  (eval "$ac_compile") 2>conftest.er1
+-  ac_status=$?
+-  grep -v '^ *+' conftest.er1 >conftest.err
+-  rm -f conftest.er1
+-  cat conftest.err >&5
+-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); } && {
+-	 test -z "$ac_c_werror_flag" ||
+-	 test ! -s conftest.err
+-       } && test -s conftest.$ac_objext; then
+-  ac_hi=$ac_mid; break
+-else
+-  $as_echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	ac_lo=`expr $ac_mid + 1`
+-			if test $ac_lo -le $ac_mid; then
+-			  ac_lo= ac_hi=
+-			  break
+-			fi
+-			ac_mid=`expr 2 '*' $ac_mid + 1`
+-fi
+-
+-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+-  done
+-else
+-  $as_echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
+-$ac_includes_default
+-int
+-main ()
+-{
+-static int test_array [1 - 2 * !(((long int) (sizeof (size_t))) < 0)];
+-test_array [0] = 0
+-
+-  ;
+-  return 0;
+-}
+-_ACEOF
+-rm -f conftest.$ac_objext
+-if { (ac_try="$ac_compile"
+-case "(($ac_try" in
+-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+-  *) ac_try_echo=$ac_try;;
+-esac
+-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+-$as_echo "$ac_try_echo") >&5
+-  (eval "$ac_compile") 2>conftest.er1
+-  ac_status=$?
+-  grep -v '^ *+' conftest.er1 >conftest.err
+-  rm -f conftest.er1
+-  cat conftest.err >&5
+-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); } && {
+-	 test -z "$ac_c_werror_flag" ||
+-	 test ! -s conftest.err
+-       } && test -s conftest.$ac_objext; then
+-  ac_hi=-1 ac_mid=-1
+-  while :; do
+-    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 int test_array [1 - 2 * !(((long int) (sizeof (size_t))) >= $ac_mid)];
+-test_array [0] = 0
+-
+-  ;
+-  return 0;
+-}
+-_ACEOF
+-rm -f conftest.$ac_objext
+-if { (ac_try="$ac_compile"
+-case "(($ac_try" in
+-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+-  *) ac_try_echo=$ac_try;;
+-esac
+-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+-$as_echo "$ac_try_echo") >&5
+-  (eval "$ac_compile") 2>conftest.er1
+-  ac_status=$?
+-  grep -v '^ *+' conftest.er1 >conftest.err
+-  rm -f conftest.er1
+-  cat conftest.err >&5
+-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); } && {
+-	 test -z "$ac_c_werror_flag" ||
+-	 test ! -s conftest.err
+-       } && test -s conftest.$ac_objext; then
+-  ac_lo=$ac_mid; break
+-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
+-
+-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
+-
+-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`
+-  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 int test_array [1 - 2 * !(((long int) (sizeof (size_t))) <= $ac_mid)];
+-test_array [0] = 0
+-
+-  ;
+-  return 0;
+-}
+-_ACEOF
+-rm -f conftest.$ac_objext
+-if { (ac_try="$ac_compile"
+-case "(($ac_try" in
+-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+-  *) ac_try_echo=$ac_try;;
+-esac
+-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+-$as_echo "$ac_try_echo") >&5
+-  (eval "$ac_compile") 2>conftest.er1
+-  ac_status=$?
+-  grep -v '^ *+' conftest.er1 >conftest.err
+-  rm -f conftest.er1
+-  cat conftest.err >&5
+-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); } && {
+-	 test -z "$ac_c_werror_flag" ||
+-	 test ! -s conftest.err
+-       } && test -s conftest.$ac_objext; then
+-  ac_hi=$ac_mid
+-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
+-?*) ac_cv_sizeof_size_t=$ac_lo;;
+-'') if test "$ac_cv_type_size_t" = yes; then
+-     { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+-{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
+-See \`config.log' for more details." >&5
+-$as_echo "$as_me: error: cannot compute sizeof (size_t)
+-See \`config.log' for more details." >&2;}
+-   { (exit 77); exit 77; }; }; }
+-   else
+-     ac_cv_sizeof_size_t=0
+-   fi ;;
+-esac
+-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
+-static long int longval () { return (long int) (sizeof (size_t)); }
+-static unsigned long int ulongval () { return (long int) (sizeof (size_t)); }
+-#include <stdio.h>
+-#include <stdlib.h>
+-int
+-main ()
+-{
+-
+-  FILE *f = fopen ("conftest.val", "w");
+-  if (! f)
+-    return 1;
+-  if (((long int) (sizeof (size_t))) < 0)
+-    {
+-      long int i = longval ();
+-      if (i != ((long int) (sizeof (size_t))))
+-	return 1;
+-      fprintf (f, "%ld", i);
+-    }
+-  else
+-    {
+-      unsigned long int i = ulongval ();
+-      if (i != ((long int) (sizeof (size_t))))
+-	return 1;
+-      fprintf (f, "%lu", i);
+-    }
+-  /* Do not output a trailing newline, as this causes \r\n confusion
+-     on some platforms.  */
+-  return ferror (f) || fclose (f) != 0;
+-
+-  ;
+-  return 0;
+-}
+-_ACEOF
+-rm -f 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>&5
+-  ac_status=$?
+-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+-  { (case "(($ac_try" in
+-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+-  *) ac_try_echo=$ac_try;;
+-esac
+-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+-$as_echo "$ac_try_echo") >&5
+-  (eval "$ac_try") 2>&5
+-  ac_status=$?
+-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; }; then
+-  ac_cv_sizeof_size_t=`cat conftest.val`
+-else
+-  $as_echo "$as_me: program exited with status $ac_status" >&5
+-$as_echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-( exit $ac_status )
+-if test "$ac_cv_type_size_t" = yes; then
+-     { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+-{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
+-See \`config.log' for more details." >&5
+-$as_echo "$as_me: error: cannot compute sizeof (size_t)
+-See \`config.log' for more details." >&2;}
+-   { (exit 77); exit 77; }; }; }
+-   else
+-     ac_cv_sizeof_size_t=0
+-   fi
+-fi
+-rm -rf conftest.dSYM
+-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+-fi
+-rm -f conftest.val
+-fi
+-{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
+-$as_echo "$ac_cv_sizeof_size_t" >&6; }
+-
+-
+-
+-cat >>confdefs.h <<_ACEOF
+-#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
+-_ACEOF
+-
+-
+-# The cast to long int works around a bug in the HP C Compiler
+-# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+-# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+-# This bug is HP SR number 8606223364.
+-{ $as_echo "$as_me:$LINENO: checking size of void *" >&5
+-$as_echo_n "checking size of void *... " >&6; }
+-if test "${ac_cv_sizeof_void_p+set}" = set; then
+-  $as_echo_n "(cached) " >&6
+-else
+-  if test "$cross_compiling" = yes; then
+-  # Depending upon the size, compute the lo and hi bounds.
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
+-$ac_includes_default
+-int
+-main ()
+-{
+-static int test_array [1 - 2 * !(((long int) (sizeof (void *))) >= 0)];
+-test_array [0] = 0
+-
+-  ;
+-  return 0;
+-}
+-_ACEOF
+-rm -f conftest.$ac_objext
+-if { (ac_try="$ac_compile"
+-case "(($ac_try" in
+-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+-  *) ac_try_echo=$ac_try;;
+-esac
+-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+-$as_echo "$ac_try_echo") >&5
+-  (eval "$ac_compile") 2>conftest.er1
+-  ac_status=$?
+-  grep -v '^ *+' conftest.er1 >conftest.err
+-  rm -f conftest.er1
+-  cat conftest.err >&5
+-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); } && {
+-	 test -z "$ac_c_werror_flag" ||
+-	 test ! -s conftest.err
+-       } && test -s conftest.$ac_objext; then
+-  ac_lo=0 ac_mid=0
+-  while :; do
+-    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 int test_array [1 - 2 * !(((long int) (sizeof (void *))) <= $ac_mid)];
+-test_array [0] = 0
+-
+-  ;
+-  return 0;
+-}
+-_ACEOF
+-rm -f conftest.$ac_objext
+-if { (ac_try="$ac_compile"
+-case "(($ac_try" in
+-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+-  *) ac_try_echo=$ac_try;;
+-esac
+-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+-$as_echo "$ac_try_echo") >&5
+-  (eval "$ac_compile") 2>conftest.er1
+-  ac_status=$?
+-  grep -v '^ *+' conftest.er1 >conftest.err
+-  rm -f conftest.er1
+-  cat conftest.err >&5
+-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); } && {
+-	 test -z "$ac_c_werror_flag" ||
+-	 test ! -s conftest.err
+-       } && test -s conftest.$ac_objext; then
+-  ac_hi=$ac_mid; break
++			as_fn_error "Unable to find libtalloc" "$LINENO" 5
++		  else
++			enable_external_libtalloc=no
++		  fi
++
+ 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"
+ 
+-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
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
+-$ac_includes_default
+-int
+-main ()
+-{
+-static int test_array [1 - 2 * !(((long int) (sizeof (void *))) < 0)];
+-test_array [0] = 0
++TALLOC_CFLAGS="-I$srcdir/$tallocdir"
+ 
+-  ;
+-  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_hi=-1 ac_mid=-1
+-  while :; do
+-    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 int test_array [1 - 2 * !(((long int) (sizeof (void *))) >= $ac_mid)];
+-test_array [0] = 0
+ 
+-  ;
+-  return 0;
+-}
+-_ACEOF
+-rm -f conftest.$ac_objext
+-if { (ac_try="$ac_compile"
+-case "(($ac_try" in
+-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+-  *) ac_try_echo=$ac_try;;
+-esac
+-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+-$as_echo "$ac_try_echo") >&5
+-  (eval "$ac_compile") 2>conftest.er1
+-  ac_status=$?
+-  grep -v '^ *+' conftest.er1 >conftest.err
+-  rm -f conftest.er1
+-  cat conftest.err >&5
+-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); } && {
+-	 test -z "$ac_c_werror_flag" ||
+-	 test ! -s conftest.err
+-       } && test -s conftest.$ac_objext; then
+-  ac_lo=$ac_mid; break
+-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; }; }
++   else
++     ac_cv_sizeof_size_t=0
++   fi
+ fi
+ 
+-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
++$as_echo "$ac_cv_sizeof_size_t" >&6; }
+ 
+-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`
+-  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 int test_array [1 - 2 * !(((long int) (sizeof (void *))) <= $ac_mid)];
+-test_array [0] = 0
+-
+-  ;
+-  return 0;
+-}
+-_ACEOF
+-rm -f conftest.$ac_objext
+-if { (ac_try="$ac_compile"
+-case "(($ac_try" in
+-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+-  *) ac_try_echo=$ac_try;;
+-esac
+-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+-$as_echo "$ac_try_echo") >&5
+-  (eval "$ac_compile") 2>conftest.er1
+-  ac_status=$?
+-  grep -v '^ *+' conftest.er1 >conftest.err
+-  rm -f conftest.er1
+-  cat conftest.err >&5
+-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); } && {
+-	 test -z "$ac_c_werror_flag" ||
+-	 test ! -s conftest.err
+-       } && test -s conftest.$ac_objext; then
+-  ac_hi=$ac_mid
+-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
+-?*) ac_cv_sizeof_void_p=$ac_lo;;
+-'') if test "$ac_cv_type_void_p" = yes; then
+-     { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+-{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
+-See \`config.log' for more details." >&5
+-$as_echo "$as_me: error: cannot compute sizeof (void *)
+-See \`config.log' for more details." >&2;}
+-   { (exit 77); exit 77; }; }; }
+-   else
+-     ac_cv_sizeof_void_p=0
+-   fi ;;
+-esac
+-else
+-  cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
++cat >>confdefs.h <<_ACEOF
++#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
+ _ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
+-$ac_includes_default
+-static long int longval () { return (long int) (sizeof (void *)); }
+-static unsigned long int ulongval () { return (long int) (sizeof (void *)); }
+-#include <stdio.h>
+-#include <stdlib.h>
+-int
+-main ()
+-{
+ 
+-  FILE *f = fopen ("conftest.val", "w");
+-  if (! f)
+-    return 1;
+-  if (((long int) (sizeof (void *))) < 0)
+-    {
+-      long int i = longval ();
+-      if (i != ((long int) (sizeof (void *))))
+-	return 1;
+-      fprintf (f, "%ld", i);
+-    }
+-  else
+-    {
+-      unsigned long int i = ulongval ();
+-      if (i != ((long int) (sizeof (void *))))
+-	return 1;
+-      fprintf (f, "%lu", i);
+-    }
+-  /* Do not output a trailing newline, as this causes \r\n confusion
+-     on some platforms.  */
+-  return ferror (f) || fclose (f) != 0;
+ 
+-  ;
+-  return 0;
+-}
+-_ACEOF
+-rm -f 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>&5
+-  ac_status=$?
+-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+-  { (case "(($ac_try" in
+-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+-  *) ac_try_echo=$ac_try;;
+-esac
+-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+-$as_echo "$ac_try_echo") >&5
+-  (eval "$ac_try") 2>&5
+-  ac_status=$?
+-  $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;}
+-{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
+-See \`config.log' for more details." >&5
+-$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; }; }
+    else
+      ac_cv_sizeof_void_p=0
+    fi
+ fi
+-rm -rf conftest.dSYM
+-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+-fi
+-rm -f conftest.val
++
+ fi
+-{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
+ $as_echo "$ac_cv_sizeof_void_p" >&6; }
+ 
+ 
+@@ -53188,17 +18721,15 @@
+ 
+ 
+ if test $ac_cv_sizeof_size_t -lt $ac_cv_sizeof_void_p; then
+-	{ $as_echo "$as_me:$LINENO: WARNING: size_t cannot represent the amount of used memory of a process" >&5
++	{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: size_t cannot represent the amount of used memory of a process" >&5
+ $as_echo "$as_me: WARNING: size_t cannot represent the amount of used memory of a process" >&2;}
+-	{ $as_echo "$as_me:$LINENO: WARNING: please report this to <samba-technical at samba.org>" >&5
++	{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: please report this to <samba-technical at samba.org>" >&5
+ $as_echo "$as_me: WARNING: please report this to <samba-technical at samba.org>" >&2;}
+-	{ $as_echo "$as_me:$LINENO: WARNING: sizeof(size_t) = $ac_cv_sizeof_size_t" >&5
++	{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: sizeof(size_t) = $ac_cv_sizeof_size_t" >&5
+ $as_echo "$as_me: WARNING: sizeof(size_t) = $ac_cv_sizeof_size_t" >&2;}
+-	{ $as_echo "$as_me:$LINENO: WARNING: sizeof(void *) = $ac_cv_sizeof_void_p" >&5
++	{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: sizeof(void *) = $ac_cv_sizeof_void_p" >&5
+ $as_echo "$as_me: WARNING: sizeof(void *) = $ac_cv_sizeof_void_p" >&2;}
+-	{ { $as_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
+ fi
+ 
+ if test x"$VERSIONSCRIPT" != "x"; then
+@@ -53233,16 +18764,16 @@
+ 
+ 
+ 
+-{ $as_echo "$as_me:$LINENO: checking whether to build the libtalloc shared library" >&5
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build the libtalloc shared library" >&5
+ $as_echo_n "checking whether to build the libtalloc shared library... " >&6; }
+ 
+ 
+ # Check whether --with-libtalloc was given.
+-if test "${with_libtalloc+set}" = set; then
++if test "${with_libtalloc+set}" = set; then :
+   withval=$with_libtalloc;
+ case "$withval" in
+ 	no)
+-		{ $as_echo "$as_me:$LINENO: result: no" >&5
++		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+ $as_echo "no" >&6; }
+ 		build_lib=no
+ 		;;
+@@ -53268,7 +18799,7 @@
+ 	if eval $BLDSHARED = true; then
+ 		LIBTALLOC_SHARED=$LIBTALLOC_SHARED_TARGET
+ 		LIBTALLOC_TARGET=$LIBTALLOC_SHARED_TARGET
+-		{ $as_echo "$as_me:$LINENO: result: yes" >&5
++		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+ $as_echo "yes" >&6; }
+ 		if test x"$USESHARED" != x"true" -o x"$LINK_LIBTALLOC" = "xSTATIC" ; then
+ 			enable_static=yes
+@@ -53281,12 +18812,12 @@
+ 		enable_static=yes
+ 		LIBTALLOC_TARGET=$LIBTALLOC_STATIC_TARGET
+ 		LIBTALLOC_LIBS=$LIBTALLOC_STATIC_TARGET
+-		{ $as_echo "$as_me:$LINENO: result: no shared library support -- will supply static library" >&5
++		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no shared library support -- will supply static library" >&5
+ $as_echo "no shared library support -- will supply static library" >&6; }
+ 	fi
+ else
+ 	enable_static=yes
+-	{ $as_echo "$as_me:$LINENO: result: shared library not selected" >&5
++	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: shared library not selected" >&5
+ $as_echo "shared library not selected" >&6; }
+ fi
+ if test $enable_static = yes; then
+@@ -53312,7 +18843,7 @@
+ 
+ 
+ # Check whether --enable-external_libtdb was given.
+-if test "${enable_external_libtdb+set}" = set; then
++if test "${enable_external_libtdb+set}" = set; then :
+   enableval=$enable_external_libtdb;  enable_external_libtalloc=$enableval
+ else
+    enable_external_libtalloc=auto
+@@ -53323,7 +18854,7 @@
+ then
+ 
+ pkg_failed=no
+-{ $as_echo "$as_me:$LINENO: checking for LIBTDB" >&5
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBTDB" >&5
+ $as_echo_n "checking for LIBTDB... " >&6; }
+ 
+ if test -n "$PKG_CONFIG"; then
+@@ -53331,11 +18862,11 @@
+         pkg_cv_LIBTDB_CFLAGS="$LIBTDB_CFLAGS"
+     else
+         if test -n "$PKG_CONFIG" && \
+-    { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"tdb >= 1.2.1\"") >&5
++    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"tdb >= 1.2.1\""; } >&5
+   ($PKG_CONFIG --exists --print-errors "tdb >= 1.2.1") 2>&5
+   ac_status=$?
+-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; then
++  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++  test $ac_status = 0; }; then
+   pkg_cv_LIBTDB_CFLAGS=`$PKG_CONFIG --cflags "tdb >= 1.2.1" 2>/dev/null`
+ else
+   pkg_failed=yes
+@@ -53349,11 +18880,11 @@
+         pkg_cv_LIBTDB_LIBS="$LIBTDB_LIBS"
+     else
+         if test -n "$PKG_CONFIG" && \
+-    { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"tdb >= 1.2.1\"") >&5
++    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"tdb >= 1.2.1\""; } >&5
+   ($PKG_CONFIG --exists --print-errors "tdb >= 1.2.1") 2>&5
+   ac_status=$?
+-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; then
++  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++  test $ac_status = 0; }; then
+   pkg_cv_LIBTDB_LIBS=`$PKG_CONFIG --libs "tdb >= 1.2.1" 2>/dev/null`
+ else
+   pkg_failed=yes
+@@ -53380,13 +18911,11 @@
+ 	# Put the nasty error message in config.log where it belongs
+ 	echo "$LIBTDB_PKG_ERRORS" >&5
+ 
+-	{ $as_echo "$as_me:$LINENO: result: no" >&5
++	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+ $as_echo "no" >&6; }
+ 
+ 		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
+ 		else
+ 			enable_external_libtdb=no
+ 		fi
+@@ -53394,9 +18923,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
+ 		else
+ 			enable_external_libtdb=no
+ 		fi
+@@ -53404,7 +18931,7 @@
+ else
+ 	LIBTDB_CFLAGS=$pkg_cv_LIBTDB_CFLAGS
+ 	LIBTDB_LIBS=$pkg_cv_LIBTDB_LIBS
+-        { $as_echo "$as_me:$LINENO: result: yes" >&5
++        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+ $as_echo "yes" >&6; }
+ 	 enable_external_libtdb=yes
+ fi
+@@ -53423,9 +18950,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
+ 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"
+@@ -53438,104 +18963,12 @@
+ TDB_CFLAGS="-I$tdbdir/include"
+ 
+ 
+-
+-
+-
+-
+-
+ for ac_func in mmap pread pwrite getpagesize utime
+-do
+-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+-{ $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.  */
+-
+-#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
+-
+-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"
+-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
++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
+@@ -53543,151 +18976,12 @@
+ fi
+ done
+ 
+-
+-
+-
+ for ac_header in getopt.h sys/select.h sys/time.h
+-do
+-as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+-  { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+-$as_echo_n "checking for $ac_header... " >&6; }
+-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+-  $as_echo_n "(cached) " >&6
+-fi
+-ac_res=`eval 'as_val=${'$as_ac_Header'}
+-		 $as_echo "$as_val"'`
+-	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+-$as_echo "$ac_res" >&6; }
+-else
+-  # Is the header compilable?
+-{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
+-$as_echo_n "checking $ac_header usability... " >&6; }
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
+-$ac_includes_default
+-#include <$ac_header>
+-_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_header_compiler=yes
+-else
+-  $as_echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	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; }
+-
+-# 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
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
+-#include <$ac_header>
+-_ACEOF
+-if { (ac_try="$ac_cpp conftest.$ac_ext"
+-case "(($ac_try" in
+-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+-  *) ac_try_echo=$ac_try;;
+-esac
+-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+-$as_echo "$ac_try_echo") >&5
+-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+-  ac_status=$?
+-  grep -v '^ *+' conftest.er1 >conftest.err
+-  rm -f conftest.er1
+-  cat conftest.err >&5
+-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); } >/dev/null && {
+-	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+-	 test ! -s conftest.err
+-       }; then
+-  ac_header_preproc=yes
+-else
+-  $as_echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-  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; }
+-
+-# So?  What about this header?
+-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+-  yes:no: )
+-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+-$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+-$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+-    ac_header_preproc=yes
+-    ;;
+-  no:yes:* )
+-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+-$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+-$as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+-$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+-$as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+-$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+-$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+-    ( cat <<\_ASBOX
+-## ---------------------------------------- ##
+-## Report this to samba-technical at samba.org ##
+-## ---------------------------------------- ##
+-_ASBOX
+-     ) | sed "s/^/$as_me: WARNING:     /" >&2
+-    ;;
+-esac
+-{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+-$as_echo_n "checking for $ac_header... " >&6; }
+-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+-  $as_echo_n "(cached) " >&6
+-else
+-  eval "$as_ac_Header=\$ac_header_preproc"
+-fi
+-ac_res=`eval 'as_val=${'$as_ac_Header'}
+-		 $as_echo "$as_val"'`
+-	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+-$as_echo "$ac_res" >&6; }
+-
+-fi
+-as_val=`eval 'as_val=${'$as_ac_Header'}
+-		 $as_echo "$as_val"'`
+-   if test "x$as_val" = x""yes; then
++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
+@@ -53698,17 +18992,13 @@
+ 
+ 
+ 
+- { $as_echo "$as_me:$LINENO: checking for pread declaration" >&5
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pread declaration" >&5
+ $as_echo_n "checking for pread declaration... " >&6; }
+-if test "${ac_cv_have_pread_decl+set}" = set; then
++if test "${ac_cv_have_pread_decl+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.  */
+ #include <unistd.h>
+ int
+@@ -53719,56 +19009,29 @@
+   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
++if ac_fn_c_try_compile "$LINENO"; then :
+   ac_cv_have_pread_decl=yes
+ else
+-  $as_echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	ac_cv_have_pread_decl=no
++  ac_cv_have_pread_decl=no
+ fi
+-
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+-{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_pread_decl" >&5
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_pread_decl" >&5
+ $as_echo "$ac_cv_have_pread_decl" >&6; }
+  if test x"$ac_cv_have_pread_decl" = x"yes"; then
+ 
+-cat >>confdefs.h <<\_ACEOF
+-#define HAVE_PREAD_DECL 1
+-_ACEOF
++$as_echo "#define HAVE_PREAD_DECL 1" >>confdefs.h
+ 
+  fi
+ 
+ 
+- { $as_echo "$as_me:$LINENO: checking for pwrite declaration" >&5
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pwrite declaration" >&5
+ $as_echo_n "checking for pwrite declaration... " >&6; }
+-if test "${ac_cv_have_pwrite_decl+set}" = set; then
++if test "${ac_cv_have_pwrite_decl+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.  */
+ #include <unistd.h>
+ int
+@@ -53779,41 +19042,18 @@
+   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
++if ac_fn_c_try_compile "$LINENO"; then :
+   ac_cv_have_pwrite_decl=yes
+ else
+-  $as_echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	ac_cv_have_pwrite_decl=no
++  ac_cv_have_pwrite_decl=no
+ fi
+-
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+-{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_pwrite_decl" >&5
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_pwrite_decl" >&5
+ $as_echo "$ac_cv_have_pwrite_decl" >&6; }
+  if test x"$ac_cv_have_pwrite_decl" = x"yes"; then
+ 
+-cat >>confdefs.h <<\_ACEOF
+-#define HAVE_PWRITE_DECL 1
+-_ACEOF
++$as_echo "#define HAVE_PWRITE_DECL 1" >>confdefs.h
+ 
+  fi
+ 
+@@ -53850,16 +19090,16 @@
+ 
+ 
+ 
+-{ $as_echo "$as_me:$LINENO: checking whether to build the libtdb shared library" >&5
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build the libtdb shared library" >&5
+ $as_echo_n "checking whether to build the libtdb shared library... " >&6; }
+ 
+ 
+ # Check whether --with-libtdb was given.
+-if test "${with_libtdb+set}" = set; then
++if test "${with_libtdb+set}" = set; then :
+   withval=$with_libtdb;
+ case "$withval" in
+ 	no)
+-		{ $as_echo "$as_me:$LINENO: result: no" >&5
++		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+ $as_echo "no" >&6; }
+ 		build_lib=no
+ 		;;
+@@ -53885,7 +19125,7 @@
+ 	if eval $BLDSHARED = true; then
+ 		LIBTDB_SHARED=$LIBTDB_SHARED_TARGET
+ 		LIBTDB_TARGET=$LIBTDB_SHARED_TARGET
+-		{ $as_echo "$as_me:$LINENO: result: yes" >&5
++		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+ $as_echo "yes" >&6; }
+ 		if test x"$USESHARED" != x"true" -o x"$LINK_LIBTDB" = "xSTATIC" ; then
+ 			enable_static=yes
+@@ -53898,12 +19138,12 @@
+ 		enable_static=yes
+ 		LIBTDB_TARGET=$LIBTDB_STATIC_TARGET
+ 		LIBTDB_LIBS=$LIBTDB_STATIC_TARGET
+-		{ $as_echo "$as_me:$LINENO: result: no shared library support -- will supply static library" >&5
++		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no shared library support -- will supply static library" >&5
+ $as_echo "no shared library support -- will supply static library" >&6; }
+ 	fi
+ else
+ 	enable_static=yes
+-	{ $as_echo "$as_me:$LINENO: result: shared library not selected" >&5
++	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: shared library not selected" >&5
+ $as_echo "shared library not selected" >&6; }
+ fi
+ if test $enable_static = yes; then
+@@ -53959,16 +19199,16 @@
+ 
+ 
+ 
+-{ $as_echo "$as_me:$LINENO: checking whether to build the libnetapi shared library" >&5
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build the libnetapi shared library" >&5
+ $as_echo_n "checking whether to build the libnetapi shared library... " >&6; }
+ 
+ 
+ # Check whether --with-libnetapi was given.
+-if test "${with_libnetapi+set}" = set; then
++if test "${with_libnetapi+set}" = set; then :
+   withval=$with_libnetapi;
+ case "$withval" in
+ 	no)
+-		{ $as_echo "$as_me:$LINENO: result: no" >&5
++		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+ $as_echo "no" >&6; }
+ 		build_lib=no
+ 		;;
+@@ -53994,7 +19234,7 @@
+ 	if eval $BLDSHARED = true; then
+ 		LIBNETAPI_SHARED=$LIBNETAPI_SHARED_TARGET
+ 		LIBNETAPI_TARGET=$LIBNETAPI_SHARED_TARGET
+-		{ $as_echo "$as_me:$LINENO: result: yes" >&5
++		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+ $as_echo "yes" >&6; }
+ 		if test x"$USESHARED" != x"true" -o x"$LINK_LIBNETAPI" = "xSTATIC" ; then
+ 			enable_static=yes
+@@ -54007,12 +19247,12 @@
+ 		enable_static=yes
+ 		LIBNETAPI_TARGET=$LIBNETAPI_STATIC_TARGET
+ 		LIBNETAPI_LIBS=$LIBNETAPI_STATIC_TARGET
+-		{ $as_echo "$as_me:$LINENO: result: no shared library support -- will supply static library" >&5
++		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no shared library support -- will supply static library" >&5
+ $as_echo "no shared library support -- will supply static library" >&6; }
+ 	fi
+ else
+ 	enable_static=yes
+-	{ $as_echo "$as_me:$LINENO: result: shared library not selected" >&5
++	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: shared library not selected" >&5
+ $as_echo "shared library not selected" >&6; }
+ fi
+ if test $enable_static = yes; then
+@@ -54050,16 +19290,16 @@
+ 
+ 
+ 
+-{ $as_echo "$as_me:$LINENO: checking whether to build the libsmbclient shared library" >&5
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build the libsmbclient shared library" >&5
+ $as_echo_n "checking whether to build the libsmbclient shared library... " >&6; }
+ 
+ 
+ # Check whether --with-libsmbclient was given.
+-if test "${with_libsmbclient+set}" = set; then
++if test "${with_libsmbclient+set}" = set; then :
+   withval=$with_libsmbclient;
+ case "$withval" in
+ 	no)
+-		{ $as_echo "$as_me:$LINENO: result: no" >&5
++		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+ $as_echo "no" >&6; }
+ 		build_lib=no
+ 		;;
+@@ -54085,7 +19325,7 @@
+ 	if eval $BLDSHARED = true; then
+ 		LIBSMBCLIENT_SHARED=$LIBSMBCLIENT_SHARED_TARGET
+ 		LIBSMBCLIENT_TARGET=$LIBSMBCLIENT_SHARED_TARGET
+-		{ $as_echo "$as_me:$LINENO: result: yes" >&5
++		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+ $as_echo "yes" >&6; }
+ 		if test x"$USESHARED" != x"true" -o x"$LINK_LIBSMBCLIENT" = "xSTATIC" ; then
+ 			enable_static=yes
+@@ -54098,12 +19338,12 @@
+ 		enable_static=yes
+ 		LIBSMBCLIENT_TARGET=$LIBSMBCLIENT_STATIC_TARGET
+ 		LIBSMBCLIENT_LIBS=$LIBSMBCLIENT_STATIC_TARGET
+-		{ $as_echo "$as_me:$LINENO: result: no shared library support -- will supply static library" >&5
++		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no shared library support -- will supply static library" >&5
+ $as_echo "no shared library support -- will supply static library" >&6; }
+ 	fi
+ else
+ 	enable_static=yes
+-	{ $as_echo "$as_me:$LINENO: result: shared library not selected" >&5
++	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: shared library not selected" >&5
+ $as_echo "shared library not selected" >&6; }
+ fi
+ if test $enable_static = yes; then
+@@ -54141,16 +19381,16 @@
+ 
+ 
+ 
+-{ $as_echo "$as_me:$LINENO: checking whether to build the libsmbsharemodes shared library" >&5
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build the libsmbsharemodes shared library" >&5
+ $as_echo_n "checking whether to build the libsmbsharemodes shared library... " >&6; }
+ 
+ 
+ # Check whether --with-libsmbsharemodes was given.
+-if test "${with_libsmbsharemodes+set}" = set; then
++if test "${with_libsmbsharemodes+set}" = set; then :
+   withval=$with_libsmbsharemodes;
+ case "$withval" in
+ 	no)
+-		{ $as_echo "$as_me:$LINENO: result: no" >&5
++		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+ $as_echo "no" >&6; }
+ 		build_lib=no
+ 		;;
+@@ -54176,7 +19416,7 @@
+ 	if eval $BLDSHARED = true; then
+ 		LIBSMBSHAREMODES_SHARED=$LIBSMBSHAREMODES_SHARED_TARGET
+ 		LIBSMBSHAREMODES_TARGET=$LIBSMBSHAREMODES_SHARED_TARGET
+-		{ $as_echo "$as_me:$LINENO: result: yes" >&5
++		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+ $as_echo "yes" >&6; }
+ 		if test x"$USESHARED" != x"true" -o x"$LINK_LIBSMBSHAREMODES" = "xSTATIC" ; then
+ 			enable_static=yes
+@@ -54189,12 +19429,12 @@
+ 		enable_static=yes
+ 		LIBSMBSHAREMODES_TARGET=$LIBSMBSHAREMODES_STATIC_TARGET
+ 		LIBSMBSHAREMODES_LIBS=$LIBSMBSHAREMODES_STATIC_TARGET
+-		{ $as_echo "$as_me:$LINENO: result: no shared library support -- will supply static library" >&5
++		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no shared library support -- will supply static library" >&5
+ $as_echo "no shared library support -- will supply static library" >&6; }
+ 	fi
+ else
+ 	enable_static=yes
+-	{ $as_echo "$as_me:$LINENO: result: shared library not selected" >&5
++	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: shared library not selected" >&5
+ $as_echo "shared library not selected" >&6; }
+ fi
+ if test $enable_static = yes; then
+@@ -54232,19 +19472,19 @@
+ 
+ 
+ 
+-{ $as_echo "$as_me:$LINENO: checking whether to build the libaddns shared library" >&5
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build the libaddns shared library" >&5
+ $as_echo_n "checking whether to build the libaddns shared library... " >&6; }
+ 
+ 
+ # Check whether --with-libaddns was given.
+-if test "${with_libaddns+set}" = set; then
++if test "${with_libaddns+set}" = set; then :
+   withval=$with_libaddns;
+ case "$withval" in
+ 	yes)
+ 		build_lib=yes
+ 		;;
+ 	*)
+-		{ $as_echo "$as_me:$LINENO: result: no" >&5
++		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+ $as_echo "no" >&6; }
+ 		build_lib=no
+ 		;;
+@@ -54253,7 +19493,7 @@
+ else
+ 
+ # if unspecified, default is not to build
+-{ $as_echo "$as_me:$LINENO: result: no" >&5
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+ $as_echo "no" >&6; }
+ build_lib=no
+ 
+@@ -54269,7 +19509,7 @@
+ 	if eval $BLDSHARED = true; then
+ 		LIBADDNS_SHARED=$LIBADDNS_SHARED_TARGET
+ 		LIBADDNS_TARGET=$LIBADDNS_SHARED_TARGET
+-		{ $as_echo "$as_me:$LINENO: result: yes" >&5
++		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+ $as_echo "yes" >&6; }
+ 		if test x"$USESHARED" != x"true" -o x"$LINK_LIBADDNS" = "xSTATIC" ; then
+ 			enable_static=yes
+@@ -54282,12 +19522,12 @@
+ 		enable_static=yes
+ 		LIBADDNS_TARGET=$LIBADDNS_STATIC_TARGET
+ 		LIBADDNS_LIBS=$LIBADDNS_STATIC_TARGET
+-		{ $as_echo "$as_me:$LINENO: result: no shared library support -- will supply static library" >&5
++		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no shared library support -- will supply static library" >&5
+ $as_echo "no shared library support -- will supply static library" >&6; }
+ 	fi
+ else
+ 	enable_static=yes
+-	{ $as_echo "$as_me:$LINENO: result: shared library not selected" >&5
++	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: shared library not selected" >&5
+ $as_echo "shared library not selected" >&6; }
+ fi
+ if test $enable_static = yes; then
+@@ -54304,165 +19544,39 @@
+ 
  ################
  
 -{ $as_echo "$as_me:$LINENO: checking for long long" >&5
@@ -59813,7 +61164,7 @@
  else
  
  cat >>confdefs.h <<_ACEOF
-@@ -52446,102 +18445,9 @@
+@@ -54472,102 +19586,9 @@
  fi
  
  else
@@ -59904,11 +61255,11 @@
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
+-
+-fi
 +    ac_fn_c_check_type "$LINENO" "intptr_t" "ac_cv_type_intptr_t" "$ac_includes_default"
 +if test "x$ac_cv_type_intptr_t" = x""yes; then :
  
--fi
--
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_intptr_t" >&5
@@ -59918,7 +61269,7 @@
  else
  
  cat >>confdefs.h <<_ACEOF
-@@ -52556,17 +18462,13 @@
+@@ -54582,17 +19603,13 @@
  # Check if the compiler supports the LL prefix on long long integers.
  # AIX needs this.
  
@@ -59939,7 +61290,7 @@
  /* end confdefs.h.  */
  #include <stdio.h>
  int
-@@ -52577,190 +18479,97 @@
+@@ -54603,190 +19620,97 @@
    return 0;
  }
  _ACEOF
@@ -60082,8 +61433,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
@@ -60106,6 +61457,8 @@
 -  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
@@ -60158,7 +61511,7 @@
  /* end confdefs.h.  */
  
  #if defined(HAVE_UNISTD_H)
-@@ -52770,67 +18579,34 @@
+@@ -54796,67 +19720,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
@@ -60236,7 +61589,7 @@
  /* end confdefs.h.  */
  
  #if defined(HAVE_UNISTD_H)
-@@ -52840,67 +18616,34 @@
+@@ -54866,67 +19757,34 @@
  #include <sys/stat.h>
  main() { exit((sizeof(ino_t) == 8) ? 0 : 1); }
  _ACEOF
@@ -60314,12 +61667,10 @@
  /* end confdefs.h.  */
  
  #if defined(HAVE_UNISTD_H)
-@@ -52908,69 +18651,36 @@
- #endif
- #include <stdio.h>
+@@ -54936,67 +19794,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
+ main() { struct stat64 st; ino64_t s; if (sizeof(ino_t) == sizeof(ino64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
+ _ACEOF
 -rm -f conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -60342,8 +61693,6 @@
 -  ac_status=$?
 -  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
 -  (exit $ac_status); }; }; then
-+main() { struct stat64 st; ino64_t s; if (sizeof(ino_t) == sizeof(ino64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
-+_ACEOF
 +if ac_fn_c_try_run "$LINENO"; then :
    samba_cv_HAVE_INO64_T=yes
  else
@@ -60396,7 +61745,7 @@
  /* end confdefs.h.  */
  
  #if defined(HAVE_UNISTD_H)
-@@ -52980,67 +18690,34 @@
+@@ -55006,67 +19831,34 @@
  #include <sys/stat.h>
  main() { exit((sizeof(dev_t) == 8) ? 0 : 1); }
  _ACEOF
@@ -60474,7 +61823,7 @@
  /* end confdefs.h.  */
  
  #if defined(HAVE_UNISTD_H)
-@@ -53050,64 +18727,31 @@
+@@ -55076,64 +19868,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
@@ -60548,7 +61897,7 @@
  /* end confdefs.h.  */
  
  #if defined(HAVE_UNISTD_H)
-@@ -53123,55 +18767,28 @@
+@@ -55149,55 +19908,28 @@
    return 0;
  }
  _ACEOF
@@ -60611,7 +61960,7 @@
  /* end confdefs.h.  */
  
  #if defined(HAVE_UNISTD_H)
-@@ -53187,58 +18804,31 @@
+@@ -55213,58 +19945,31 @@
    return 0;
  }
  _ACEOF
@@ -60678,7 +62027,7 @@
  /* end confdefs.h.  */
  
  #if defined(HAVE_UNISTD_H)
-@@ -53247,67 +18837,34 @@
+@@ -55273,67 +19978,34 @@
  #include <sys/types.h>
  main() { dev_t dev; int i = major(dev); return 0; }
  _ACEOF
@@ -60756,7 +62105,7 @@
  /* end confdefs.h.  */
  
  #if defined(HAVE_UNISTD_H)
-@@ -53316,67 +18873,34 @@
+@@ -55342,67 +20014,34 @@
  #include <sys/types.h>
  main() { dev_t dev; int i = minor(dev); return 0; }
  _ACEOF
@@ -60834,7 +62183,7 @@
  /* end confdefs.h.  */
  
  #if defined(HAVE_UNISTD_H)
-@@ -53385,129 +18909,63 @@
+@@ -55411,129 +20050,63 @@
  #include <sys/types.h>
  main() { dev_t dev = makedev(1,2); return 0; }
  _ACEOF
@@ -60983,7 +62332,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <dirent.h>
-@@ -53520,55 +18978,28 @@
+@@ -55546,55 +20119,28 @@
    return 0;
  }
  _ACEOF
@@ -61046,7 +62395,7 @@
  /* end confdefs.h.  */
  #include <stdio.h>
  int
-@@ -53579,55 +19010,28 @@
+@@ -55605,55 +20151,28 @@
    return 0;
  }
  _ACEOF
@@ -61109,7 +62458,7 @@
  /* end confdefs.h.  */
  
  #include <sys/time.h>
-@@ -53640,46 +19044,19 @@
+@@ -55666,46 +20185,19 @@
    return 0;
  }
  _ACEOF
@@ -61162,7 +62511,7 @@
  
  fi
  
-@@ -53691,120 +19068,24 @@
+@@ -55717,120 +20209,24 @@
      # which rely on signals.
  
  
@@ -61291,7 +62640,7 @@
  /* end confdefs.h.  */
  
  #if TIME_WITH_SYS_TIME
-@@ -53828,58 +19109,27 @@
+@@ -55854,58 +20250,27 @@
    return 0;
  }
  _ACEOF
@@ -61358,7 +62707,7 @@
  /* end confdefs.h.  */
  
  #if TIME_WITH_SYS_TIME
-@@ -53903,58 +19153,27 @@
+@@ -55929,58 +20294,27 @@
    return 0;
  }
  _ACEOF
@@ -61425,7 +62774,7 @@
  /* end confdefs.h.  */
  
  #if TIME_WITH_SYS_TIME
-@@ -53978,49 +19197,22 @@
+@@ -56004,49 +20338,22 @@
    return 0;
  }
  _ACEOF
@@ -61481,7 +62830,7 @@
  
  
  
-@@ -54038,18 +19230,14 @@
+@@ -56064,18 +20371,14 @@
  	    ;;
            *)
  	    # clock_gettime was not found, try adding librt
@@ -61503,7 +62852,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -54067,60 +19255,29 @@
+@@ -56093,60 +20396,29 @@
    return 0;
  }
  _ACEOF
@@ -61573,7 +62922,7 @@
  /* end confdefs.h.  */
  
  #if TIME_WITH_SYS_TIME
-@@ -54144,58 +19301,27 @@
+@@ -56170,58 +20442,27 @@
    return 0;
  }
  _ACEOF
@@ -61640,7 +62989,7 @@
  /* end confdefs.h.  */
  
  #if TIME_WITH_SYS_TIME
-@@ -54219,58 +19345,27 @@
+@@ -56245,58 +20486,27 @@
    return 0;
  }
  _ACEOF
@@ -61707,7 +63056,7 @@
  /* end confdefs.h.  */
  
  #if TIME_WITH_SYS_TIME
-@@ -54294,49 +19389,22 @@
+@@ -56320,49 +20530,22 @@
    return 0;
  }
  _ACEOF
@@ -61763,7 +63112,7 @@
  
  
  
-@@ -54361,20 +19429,16 @@
+@@ -56387,20 +20570,16 @@
  
  fi
  
@@ -61788,7 +63137,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <dirent.h>
-@@ -54382,64 +19446,31 @@
+@@ -56408,216 +20587,67 @@
  if (di && di->d_name[-2] == '.' && di->d_name[-1] == 0 &&
  di->d_name[0] == 0) exit(0); exit(1);}
  _ACEOF
@@ -61841,31 +63190,31 @@
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_BROKEN_READDIR_NAME 1
 -_ACEOF
-+$as_echo "#define HAVE_BROKEN_READDIR_NAME 1" >>confdefs.h
- 
- fi
- 
+-
+-fi
+-
 -{ $as_echo "$as_me:$LINENO: checking for utimbuf" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for utimbuf" >&5
- $as_echo_n "checking for utimbuf... " >&6; }
+-$as_echo_n "checking for utimbuf... " >&6; }
 -if test "${samba_cv_HAVE_UTIMBUF+set}" = set; then
-+if test "${samba_cv_HAVE_UTIMBUF+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 <utime.h>
-@@ -54451,41 +19482,18 @@
-   return 0;
- }
- _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
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -61884,40 +63233,37 @@
 -	 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_UTIMBUF=yes
- else
+-  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
-+  samba_cv_HAVE_UTIMBUF=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_UTIMBUF" >&5
-+{ $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 "$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
- 
-@@ -54493,104 +19501,12 @@
- # 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
+-
+-
+-
+-
+-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
@@ -61962,14 +63308,29 @@
 -choke me
 -#endif
 -
--int
--main ()
--{
++$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 ()
+ {
 -return $ac_func ();
--  ;
--  return 0;
--}
--_ACEOF
++struct utimbuf tbuf;  tbuf.actime = 0; tbuf.modtime = 1; exit(utime("foo.c",&tbuf));
+   ;
+   return 0;
+ }
+ _ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -61992,17 +63353,27 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  eval "$as_ac_var=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
 -
 -	eval "$as_ac_var=no"
--fi
--
++  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
+ 
 -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
@@ -62010,6 +63381,12 @@
 -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"
@@ -62018,7 +63395,7 @@
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
  _ACEOF
-@@ -54599,17 +19515,13 @@
+@@ -56626,17 +20656,13 @@
  done
  
  
@@ -62039,7 +63416,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <utmp.h>
-@@ -54621,55 +19533,28 @@
+@@ -56648,55 +20674,28 @@
    return 0;
  }
  _ACEOF
@@ -62102,7 +63479,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <utmp.h>
-@@ -54681,55 +19566,28 @@
+@@ -56708,55 +20707,28 @@
    return 0;
  }
  _ACEOF
@@ -62165,7 +63542,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <utmp.h>
-@@ -54741,55 +19599,28 @@
+@@ -56768,55 +20740,28 @@
    return 0;
  }
  _ACEOF
@@ -62228,7 +63605,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <utmp.h>
-@@ -54801,55 +19632,28 @@
+@@ -56828,55 +20773,28 @@
    return 0;
  }
  _ACEOF
@@ -62291,14 +63668,10 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <utmp.h>
-@@ -54857,59 +19661,32 @@
- main ()
- {
- struct utmp ut;  time_t t; ut.ut_time = t;
--  ;
--  return 0;
--}
--_ACEOF
+@@ -56888,55 +20806,28 @@
+   return 0;
+ }
+ _ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -62317,10 +63690,6 @@
 -	 test -z "$ac_c_werror_flag" ||
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
-+  ;
-+  return 0;
-+}
-+_ACEOF
 +if ac_fn_c_try_compile "$LINENO"; then :
    samba_cv_HAVE_UT_UT_TIME=yes
  else
@@ -62362,7 +63731,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <utmp.h>
-@@ -54921,55 +19698,28 @@
+@@ -56948,55 +20839,28 @@
    return 0;
  }
  _ACEOF
@@ -62425,7 +63794,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <utmp.h>
-@@ -54981,55 +19731,28 @@
+@@ -57008,55 +20872,28 @@
    return 0;
  }
  _ACEOF
@@ -62488,7 +63857,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <utmp.h>
-@@ -55041,55 +19764,28 @@
+@@ -57068,55 +20905,28 @@
    return 0;
  }
  _ACEOF
@@ -62551,7 +63920,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <utmp.h>
-@@ -55101,55 +19797,28 @@
+@@ -57128,55 +20938,28 @@
    return 0;
  }
  _ACEOF
@@ -62614,7 +63983,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <utmp.h>
-@@ -55161,55 +19830,28 @@
+@@ -57188,55 +20971,28 @@
    return 0;
  }
  _ACEOF
@@ -62677,7 +64046,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <utmp.h>
-@@ -55221,56 +19863,29 @@
+@@ -57248,56 +21004,29 @@
    return 0;
  }
  _ACEOF
@@ -62741,7 +64110,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <utmp.h>
-@@ -55282,56 +19897,29 @@
+@@ -57309,56 +21038,29 @@
    return 0;
  }
  _ACEOF
@@ -62805,7 +64174,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <utmpx.h>
-@@ -55343,41 +19931,18 @@
+@@ -57370,41 +21072,18 @@
    return 0;
  }
  _ACEOF
@@ -62851,7 +64220,7 @@
  
  fi
  
-@@ -55388,12 +19953,10 @@
+@@ -57415,12 +21094,10 @@
  ICONV_LOOK_DIRS="/usr /usr/local /sw /opt"
  
  # Check whether --with-libiconv was given.
@@ -62866,7 +64235,7 @@
    else
       if test "$withval" != "yes" ; then
  	ICONV_PATH_SPEC=yes
-@@ -55439,7 +20002,7 @@
+@@ -57466,7 +21143,7 @@
  		export LDFLAGS LIBS CPPFLAGS
  		# Try to find iconv(3)
  
@@ -62875,7 +64244,7 @@
  $as_echo_n "checking for iconv in $i/$l... " >&6; }
      jm_cv_func_iconv="no"
      jm_cv_lib_iconv=""
-@@ -55447,11 +20010,7 @@
+@@ -57474,11 +21151,7 @@
      jm_save_LIBS="$LIBS"
  
      if test "$jm_cv_func_iconv" != yes; then
@@ -62888,7 +64257,7 @@
  /* end confdefs.h.  */
  #include <stdlib.h>
  #include <giconv.h>
-@@ -55465,48 +20024,17 @@
+@@ -57492,48 +21165,17 @@
    return 0;
  }
  _ACEOF
@@ -62941,7 +64310,7 @@
  /* end confdefs.h.  */
  #include <stdlib.h>
  #include <iconv.h>
-@@ -55520,49 +20048,18 @@
+@@ -57547,49 +21189,18 @@
    return 0;
  }
  _ACEOF
@@ -62995,7 +64364,7 @@
  /* end confdefs.h.  */
  #include <stdlib.h>
  #include <giconv.h>
-@@ -55576,53 +20073,22 @@
+@@ -57603,53 +21214,22 @@
    return 0;
  }
  _ACEOF
@@ -63053,7 +64422,7 @@
  /* end confdefs.h.  */
  #include <stdlib.h>
  #include <iconv.h>
-@@ -55636,50 +20102,19 @@
+@@ -57663,50 +21243,19 @@
    return 0;
  }
  _ACEOF
@@ -63108,7 +64477,7 @@
  /* end confdefs.h.  */
  #include <stdlib.h>
  #include <biconv.h>
-@@ -55693,42 +20128,15 @@
+@@ -57720,42 +21269,15 @@
    return 0;
  }
  _ACEOF
@@ -63154,7 +64523,7 @@
  
              LIBS="$jm_save_LIBS"
            fi
-@@ -55739,36 +20147,30 @@
+@@ -57766,36 +21288,30 @@
    if test "$jm_cv_func_iconv" = yes; then
      if test "$jm_cv_giconv" = yes; then
  
@@ -63198,7 +64567,7 @@
  $as_echo "no" >&6; }
    fi
  
-@@ -55806,16 +20208,12 @@
+@@ -57833,16 +21349,12 @@
  	# check for default dos charset name
  	for j in CP850 IBM850 ; do
  
@@ -63218,7 +64587,7 @@
  /* end confdefs.h.  */
  
  #include <$jm_cv_include>
-@@ -55828,43 +20226,16 @@
+@@ -57855,43 +21367,16 @@
  }
  
  _ACEOF
@@ -63267,7 +64636,7 @@
  $as_echo "$ICONV_CHARSET" >&6; }
  
  	    default_dos_charset="$ICONV_CHARSET"
-@@ -55876,16 +20247,12 @@
+@@ -57903,16 +21388,12 @@
  	# check for default display charset name
  	for j in ASCII 646 ; do
  
@@ -63287,7 +64656,7 @@
  /* end confdefs.h.  */
  
  #include <$jm_cv_include>
-@@ -55898,43 +20265,16 @@
+@@ -57925,43 +21406,16 @@
  }
  
  _ACEOF
@@ -63336,7 +64705,7 @@
  $as_echo "$ICONV_CHARSET" >&6; }
  
  	    default_display_charset="$ICONV_CHARSET"
-@@ -55946,16 +20286,12 @@
+@@ -57973,16 +21427,12 @@
  	# check for default unix charset name
  	for j in UTF-8 UTF8 ; do
  
@@ -63356,7 +64725,7 @@
  /* end confdefs.h.  */
  
  #include <$jm_cv_include>
-@@ -55968,43 +20304,16 @@
+@@ -57995,43 +21445,16 @@
  }
  
  _ACEOF
@@ -63405,7 +64774,7 @@
  $as_echo "$ICONV_CHARSET" >&6; }
  
  	    default_unix_charset="$ICONV_CHARSET"
-@@ -56043,9 +20352,9 @@
+@@ -58070,9 +21493,9 @@
  	    default_display_charset="ASCII"
  	    default_unix_charset="UTF-8"
  	    samba_cv_HAVE_NATIVE_ICONV=yes
@@ -63417,7 +64786,7 @@
  $as_echo "$as_me: WARNING: $default_dos_charset, $default_display_charset and $default_unix_charset to UCS-16LE" >&2;}
  	fi
  
-@@ -56069,9 +20378,7 @@
+@@ -58096,9 +21519,7 @@
  	    default_unix_charset="\"$default_unix_charset\""
  
  
@@ -63428,7 +64797,7 @@
  
  
  cat >>confdefs.h <<_ACEOF
-@@ -56105,7 +20412,7 @@
+@@ -58132,7 +21553,7 @@
  
  
  if test x"$ICONV_FOUND" = x"no" -o x"$samba_cv_HAVE_NATIVE_ICONV" != x"yes" ; then
@@ -63437,7 +64806,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;}
-@@ -56127,20 +20434,16 @@
+@@ -58154,20 +21575,16 @@
  fi
  
  
@@ -63462,7 +64831,7 @@
  /* end confdefs.h.  */
  
  #include <sys/types.h>
-@@ -56154,67 +20457,34 @@
+@@ -58181,67 +21598,34 @@
  }
  
  _ACEOF
@@ -63540,7 +64909,7 @@
  /* end confdefs.h.  */
  
  #include <sys/types.h>
-@@ -56228,204 +20498,36 @@
+@@ -58255,204 +21639,36 @@
  }
  
  _ACEOF
@@ -63758,12 +65127,13 @@
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
-@@ -56434,119 +20536,25 @@
+@@ -58460,120 +21676,26 @@
+ fi
  
  done
- 
 -
- for ac_func in inotify_init
+-
+-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
@@ -63856,6 +65226,8 @@
 -as_val=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
++
++for ac_func in inotify_init
 +do :
 +  ac_fn_c_check_func "$LINENO" "inotify_init" "ac_cv_func_inotify_init"
 +if test "x$ac_cv_func_inotify_init" = x""yes; then :
@@ -63885,7 +65257,7 @@
  /* end confdefs.h.  */
  #include <asm/unistd.h>
  int
-@@ -56557,54 +20565,29 @@
+@@ -58584,54 +21706,29 @@
    return 0;
  }
  _ACEOF
@@ -63946,7 +65318,7 @@
  
  fi
  
-@@ -56613,157 +20596,18 @@
+@@ -58640,157 +21737,18 @@
  #	http://oss.sgi.com/projects/fam/
  #	http://savannah.nongnu.org/projects/fam/
  # Check whether --enable-fam was given.
@@ -64110,7 +65482,7 @@
  _ACEOF
   samba_cv_HAVE_FAM_H=yes
  else
-@@ -56775,18 +20619,14 @@
+@@ -58802,18 +21760,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.
@@ -64132,11 +65504,10 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -56803,44 +20643,19 @@
-   ;
+@@ -58831,43 +21785,18 @@
    return 0;
  }
--_ACEOF
+ _ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -64158,7 +65529,6 @@
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
-+_ACEOF
 +if ac_fn_c_try_link "$LINENO"; then :
    ac_cv_lib_fam_FAMOpen2=yes
  else
@@ -64184,7 +65554,7 @@
    samba_cv_HAVE_LIBFAM=yes; SMB_FAM_LIBS="-lfam"
  else
    samba_cv_HAVE_LIBFAM=no
-@@ -56851,23 +20666,17 @@
+@@ -58878,23 +21807,17 @@
              samba_fam_xtra=-lC
  
  
@@ -64211,7 +65581,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -56885,72 +20694,41 @@
+@@ -58912,72 +21835,41 @@
    return 0;
  }
  _ACEOF
@@ -64292,7 +65662,7 @@
  /* end confdefs.h.  */
  #include <fam.h>
  int
-@@ -56961,43 +20739,16 @@
+@@ -58988,43 +21880,16 @@
    return 0;
  }
  _ACEOF
@@ -64339,7 +65709,7 @@
      fi
  fi
  
-@@ -57010,18 +20761,14 @@
+@@ -59037,18 +21902,14 @@
      samba_dmapi_libs=""
  
      if test x"$samba_dmapi_libs" = x"" ; then
@@ -64361,7 +65731,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -57039,61 +20786,32 @@
+@@ -59066,61 +21927,32 @@
    return 0;
  }
  _ACEOF
@@ -64432,7 +65802,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -57111,61 +20829,32 @@
+@@ -59138,61 +21970,32 @@
    return 0;
  }
  _ACEOF
@@ -64485,15 +65855,15 @@
      fi
  
      if test x"$samba_dmapi_libs" = x"" ; then
--	{ $as_echo "$as_me:$LINENO: checking for dm_get_eventlist in -lxdsm" >&5
-+	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dm_get_eventlist in -lxdsm" >&5
- $as_echo_n "checking for dm_get_eventlist in -lxdsm... " >&6; }
--if test "${ac_cv_lib_xdsm_dm_get_eventlist+set}" = set; then
-+if test "${ac_cv_lib_xdsm_dm_get_eventlist+set}" = set; then :
+-        { $as_echo "$as_me:$LINENO: checking for dm_get_eventlist in -ldmapi" >&5
++        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dm_get_eventlist in -ldmapi" >&5
+ $as_echo_n "checking for dm_get_eventlist in -ldmapi... " >&6; }
+-if test "${ac_cv_lib_dmapi_dm_get_eventlist+set}" = set; then
++if test "${ac_cv_lib_dmapi_dm_get_eventlist+set}" = set; then :
    $as_echo_n "(cached) " >&6
  else
    ac_check_lib_save_LIBS=$LIBS
- LIBS="-lxdsm  $LIBS"
+ LIBS="-ldmapi  $LIBS"
 -cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
@@ -64503,7 +65873,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -57183,61 +20872,32 @@
+@@ -59210,61 +22013,32 @@
    return 0;
  }
  _ACEOF
@@ -64529,13 +65899,13 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 +if ac_fn_c_try_link "$LINENO"; then :
-   ac_cv_lib_xdsm_dm_get_eventlist=yes
+   ac_cv_lib_dmapi_dm_get_eventlist=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
--	ac_cv_lib_xdsm_dm_get_eventlist=no
-+  ac_cv_lib_xdsm_dm_get_eventlist=no
+-	ac_cv_lib_dmapi_dm_get_eventlist=no
++  ac_cv_lib_dmapi_dm_get_eventlist=no
  fi
 -
 -rm -rf conftest.dSYM
@@ -64545,26 +65915,26 @@
 +    conftest$ac_exeext conftest.$ac_ext
  LIBS=$ac_check_lib_save_LIBS
  fi
--{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_xdsm_dm_get_eventlist" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xdsm_dm_get_eventlist" >&5
- $as_echo "$ac_cv_lib_xdsm_dm_get_eventlist" >&6; }
--if test "x$ac_cv_lib_xdsm_dm_get_eventlist" = x""yes; then
-+if test "x$ac_cv_lib_xdsm_dm_get_eventlist" = x""yes; then :
-   samba_dmapi_libs="-lxdsm"
+-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dmapi_dm_get_eventlist" >&5
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dmapi_dm_get_eventlist" >&5
+ $as_echo "$ac_cv_lib_dmapi_dm_get_eventlist" >&6; }
+-if test "x$ac_cv_lib_dmapi_dm_get_eventlist" = x""yes; then
++if test "x$ac_cv_lib_dmapi_dm_get_eventlist" = x""yes; then :
+   samba_dmapi_libs="-ldmapi"
  fi
  
      fi
  
      if test x"$samba_dmapi_libs" = x"" ; then
--        { $as_echo "$as_me:$LINENO: checking for dm_get_eventlist in -ldmapi" >&5
-+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dm_get_eventlist in -ldmapi" >&5
- $as_echo_n "checking for dm_get_eventlist in -ldmapi... " >&6; }
--if test "${ac_cv_lib_dmapi_dm_get_eventlist+set}" = set; then
-+if test "${ac_cv_lib_dmapi_dm_get_eventlist+set}" = set; then :
+-	{ $as_echo "$as_me:$LINENO: checking for dm_get_eventlist in -lxdsm" >&5
++	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dm_get_eventlist in -lxdsm" >&5
+ $as_echo_n "checking for dm_get_eventlist in -lxdsm... " >&6; }
+-if test "${ac_cv_lib_xdsm_dm_get_eventlist+set}" = set; then
++if test "${ac_cv_lib_xdsm_dm_get_eventlist+set}" = set; then :
    $as_echo_n "(cached) " >&6
  else
    ac_check_lib_save_LIBS=$LIBS
- LIBS="-ldmapi  $LIBS"
+ LIBS="-lxdsm  $LIBS"
 -cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
@@ -64574,7 +65944,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -57255,43 +20915,18 @@
+@@ -59282,43 +22056,18 @@
    return 0;
  }
  _ACEOF
@@ -64600,13 +65970,13 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 +if ac_fn_c_try_link "$LINENO"; then :
-   ac_cv_lib_dmapi_dm_get_eventlist=yes
+   ac_cv_lib_xdsm_dm_get_eventlist=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
--	ac_cv_lib_dmapi_dm_get_eventlist=no
-+  ac_cv_lib_dmapi_dm_get_eventlist=no
+-	ac_cv_lib_xdsm_dm_get_eventlist=no
++  ac_cv_lib_xdsm_dm_get_eventlist=no
  fi
 -
 -rm -rf conftest.dSYM
@@ -64616,15 +65986,15 @@
 +    conftest$ac_exeext conftest.$ac_ext
  LIBS=$ac_check_lib_save_LIBS
  fi
--{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dmapi_dm_get_eventlist" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dmapi_dm_get_eventlist" >&5
- $as_echo "$ac_cv_lib_dmapi_dm_get_eventlist" >&6; }
--if test "x$ac_cv_lib_dmapi_dm_get_eventlist" = x""yes; then
-+if test "x$ac_cv_lib_dmapi_dm_get_eventlist" = x""yes; then :
-   samba_dmapi_libs="-ldmapi"
+-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_xdsm_dm_get_eventlist" >&5
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xdsm_dm_get_eventlist" >&5
+ $as_echo "$ac_cv_lib_xdsm_dm_get_eventlist" >&6; }
+-if test "x$ac_cv_lib_xdsm_dm_get_eventlist" = x""yes; then
++if test "x$ac_cv_lib_xdsm_dm_get_eventlist" = x""yes; then :
+   samba_dmapi_libs="-lxdsm"
  fi
  
-@@ -57300,153 +20935,12 @@
+@@ -59327,153 +22076,12 @@
  
      # Only bother to test ehaders if we have a candidate DMAPI library
      if test x"$samba_dmapi_libs" != x"" ; then
@@ -64784,7 +66154,7 @@
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
-@@ -57460,11 +20954,7 @@
+@@ -59487,11 +22095,7 @@
      if test x"$samba_dmapi_libs" != x"" ; then
  	samba_dmapi_save_LIBS="$LIBS"
  	LIBS="$LIBS $samba_dmapi_libs"
@@ -64797,7 +66167,7 @@
  /* end confdefs.h.  */
  
  #include <time.h>      /* needed by Tru64 */
-@@ -57499,50 +20989,25 @@
+@@ -59526,50 +22130,25 @@
    return 0;
  }
  _ACEOF
@@ -64852,7 +66222,7 @@
  $as_echo "$as_me: DMAPI support not present" >&6;}
  
  	# DMAPI detection failure actions end
-@@ -57550,11 +21015,9 @@
+@@ -59577,11 +22156,9 @@
  	# DMAPI detection success actions start
  
  
@@ -64866,7 +66236,7 @@
  $as_echo "$as_me: Found DMAPI support in $samba_dmapi_libs" >&6;}
  
  	# DMAPI detection success actions end
-@@ -57568,20 +21031,16 @@
+@@ -59595,20 +22172,16 @@
      default_shared_modules="$default_shared_modules vfs_tsmsm"
  fi
  
@@ -64891,7 +66261,7 @@
  /* end confdefs.h.  */
  
  #include <sys/types.h>
-@@ -57597,65 +21056,32 @@
+@@ -59624,65 +22197,32 @@
  }
  
  _ACEOF
@@ -64966,7 +66336,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <fcntl.h>
-@@ -57667,185 +21093,29 @@
+@@ -59694,185 +22234,29 @@
    return 0;
  }
  _ACEOF
@@ -65159,7 +66529,7 @@
  
  fi
  
-@@ -57855,110 +21125,18 @@
+@@ -59882,110 +22266,18 @@
  
      ac_save_LIBS=$LIBS
  
@@ -65276,7 +66646,7 @@
  
  
  
-@@ -57975,18 +21153,14 @@
+@@ -60002,18 +22294,14 @@
  	    ;;
            *)
  	    # cap_get_proc was not found, try adding libcap
@@ -65298,7 +66668,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -58004,50 +21178,23 @@
+@@ -60031,50 +22319,23 @@
    return 0;
  }
  _ACEOF
@@ -65356,7 +66726,7 @@
  
  
  
-@@ -58069,20 +21216,16 @@
+@@ -60096,20 +22357,16 @@
  
  
  
@@ -65381,7 +66751,7 @@
  /* end confdefs.h.  */
  
  #include <sys/types.h>
-@@ -58098,52 +21241,23 @@
+@@ -60125,52 +22382,23 @@
   exit(0);
  }
  _ACEOF
@@ -65440,7 +66810,7 @@
  
  else
      LIBS=$ac_save_LIBS
-@@ -58156,17 +21270,13 @@
+@@ -60183,17 +22411,13 @@
  # This is *really* broken but some systems (DEC OSF1) do this.... JRA.
  #
  
@@ -65461,7 +66831,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #if defined(HAVE_RPC_RPC_H)
-@@ -58180,55 +21290,28 @@
+@@ -60207,55 +22431,28 @@
    return 0;
  }
  _ACEOF
@@ -65524,7 +66894,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #if defined(HAVE_RPC_RPC_H)
-@@ -58242,55 +21325,28 @@
+@@ -60269,55 +22466,28 @@
    return 0;
  }
  _ACEOF
@@ -65587,7 +66957,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #if defined(HAVE_RPC_RPC_H)
-@@ -58304,55 +21360,28 @@
+@@ -60331,55 +22501,28 @@
    return 0;
  }
  _ACEOF
@@ -65611,11 +66981,12 @@
 -       } && 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
 -
@@ -65650,7 +67021,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #if defined(HAVE_RPC_RPC_H)
-@@ -58366,56 +21395,29 @@
+@@ -60393,56 +22536,29 @@
    return 0;
  }
  _ACEOF
@@ -65714,7 +67085,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #ifdef HAVE_SYS_SECURITY_H
-@@ -58433,238 +21435,112 @@
+@@ -60460,238 +22576,112 @@
    return 0;
  }
  _ACEOF
@@ -65989,7 +67360,7 @@
  /* end confdefs.h.  */
  #include <unistd.h>
  int
-@@ -58675,63 +21551,32 @@
+@@ -60702,63 +22692,32 @@
    return 0;
  }
  _ACEOF
@@ -66016,12 +67387,11 @@
 -       }; then
 +if ac_fn_c_try_link "$LINENO"; then :
     samba_cv_SYSCONF_SC_NGROUPS_MAX=yes
--else
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	 samba_cv_SYSCONF_SC_NGROUPS_MAX=no
-+else
 +   samba_cv_SYSCONF_SC_NGROUPS_MAX=no
  fi
 -
@@ -66063,7 +67433,7 @@
  /* end confdefs.h.  */
  #include <unistd.h>
  int
-@@ -58742,63 +21587,32 @@
+@@ -60769,63 +22728,32 @@
    return 0;
  }
  _ACEOF
@@ -66136,7 +67506,7 @@
  /* end confdefs.h.  */
  #include <unistd.h>
  int
-@@ -58809,63 +21623,32 @@
+@@ -60836,63 +22764,32 @@
    return 0;
  }
  _ACEOF
@@ -66209,7 +67579,7 @@
  /* end confdefs.h.  */
  #include <unistd.h>
  int
-@@ -58876,147 +21659,30 @@
+@@ -60903,147 +22800,30 @@
    return 0;
  }
  _ACEOF
@@ -66367,7 +67737,7 @@
  _ACEOF
  
  fi
-@@ -59028,20 +21694,16 @@
+@@ -61055,20 +22835,16 @@
  seteuid=no;
  
  if test $seteuid = no; then
@@ -66392,7 +67762,7 @@
  /* end confdefs.h.  */
  
  #define AUTOCONF_TEST 1
-@@ -59049,50 +21711,21 @@
+@@ -61076,50 +22852,21 @@
  #include "confdefs.h"
  #include "${srcdir-.}/lib/util_sec.c"
  _ACEOF
@@ -66449,7 +67819,7 @@
  
  fi
  fi
-@@ -59100,20 +21733,16 @@
+@@ -61127,20 +22874,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
@@ -66474,7 +67844,7 @@
  /* end confdefs.h.  */
  
  #define AUTOCONF_TEST 1
-@@ -59121,69 +21750,36 @@
+@@ -61148,69 +22891,36 @@
  #include "confdefs.h"
  #include "${srcdir-.}/lib/util_sec.c"
  _ACEOF
@@ -66554,7 +67924,7 @@
  /* end confdefs.h.  */
  
  #define AUTOCONF_TEST 1
-@@ -59191,69 +21787,36 @@
+@@ -61218,69 +22928,36 @@
  #include "confdefs.h"
  #include "${srcdir-.}/lib/util_sec.c"
  _ACEOF
@@ -66634,7 +68004,7 @@
  /* end confdefs.h.  */
  
  #define AUTOCONF_TEST 1
-@@ -59261,64 +21824,31 @@
+@@ -61288,64 +22965,31 @@
  #include "confdefs.h"
  #include "${srcdir-.}/lib/util_sec.c"
  _ACEOF
@@ -66708,7 +68078,7 @@
  /* end confdefs.h.  */
  
  #include <sys/syscall.h>
-@@ -59332,195 +21862,98 @@
+@@ -61359,195 +23003,98 @@
    return 0;
  }
  _ACEOF
@@ -66934,7 +68304,7 @@
  /* end confdefs.h.  */
  
  #if defined(HAVE_UNISTD_H)
-@@ -59544,66 +21977,33 @@
+@@ -61571,67 +23118,34 @@
  #endif
  }
  _ACEOF
@@ -66993,6 +68363,71 @@
    fi
  fi
  
+ # glibc up to 2.3.6 had dangerously broken posix_fallocate(). DON'T USE IT.
+-{ $as_echo "$as_me:$LINENO: checking for broken posix_fallocate" >&5
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken posix_fallocate" >&5
+ $as_echo_n "checking for broken posix_fallocate... " >&6; }
+-if test "${samba_cv_HAVE_BROKEN_POSIX_FALLOCATE+set}" = set; then
++if test "${samba_cv_HAVE_BROKEN_POSIX_FALLOCATE+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 _XOPEN_SOURCE 600
+@@ -61649,56 +23163,29 @@
+   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
++if ac_fn_c_try_compile "$LINENO"; then :
+   samba_cv_HAVE_BROKEN_POSIX_FALLOCATE=no
+ else
+-  $as_echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	samba_cv_HAVE_BROKEN_POSIX_FALLOCATE=yes
++  samba_cv_HAVE_BROKEN_POSIX_FALLOCATE=yes
+ fi
+-
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+-{ $as_echo "$as_me:$LINENO: result: $samba_cv_HAVE_BROKEN_POSIX_FALLOCATE" >&5
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $samba_cv_HAVE_BROKEN_POSIX_FALLOCATE" >&5
+ $as_echo "$samba_cv_HAVE_BROKEN_POSIX_FALLOCATE" >&6; }
+ if test x"$samba_cv_HAVE_BROKEN_POSIX_FALLOCATE" = xyes; then
+ 
+-cat >>confdefs.h <<\_ACEOF
+-#define HAVE_BROKEN_POSIX_FALLOCATE /**/
+-_ACEOF
++$as_echo "#define HAVE_BROKEN_POSIX_FALLOCATE /**/" >>confdefs.h
+ 
+ fi
+ 
+ 
 -{ $as_echo "$as_me:$LINENO: checking for st_blocks in struct stat" >&5
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for st_blocks in struct stat" >&5
  $as_echo_n "checking for st_blocks in struct stat... " >&6; }
@@ -67010,7 +68445,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <sys/stat.h>
-@@ -59616,55 +22016,28 @@
+@@ -61711,141 +23198,24 @@
    return 0;
  }
  _ACEOF
@@ -67052,10 +68487,224 @@
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_STAT_ST_BLOCKS 1
 -_ACEOF
+-
+-fi
+-
+-{ $as_echo "$as_me:$LINENO: checking for blksize_t" >&5
+-$as_echo_n "checking for blksize_t... " >&6; }
+-if test "${ac_cv_type_blksize_t+set}" = set; then
+-  $as_echo_n "(cached) " >&6
+-else
+-  ac_cv_type_blksize_t=no
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
+-#include <sys/stat.h>
+-
+-int
+-main ()
+-{
+-if (sizeof (blksize_t))
+-       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
+-  cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
+-#include <sys/stat.h>
+-
+-int
+-main ()
+-{
+-if (sizeof ((blksize_t)))
+-	  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
+-  :
+-else
+-  $as_echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	ac_cv_type_blksize_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
+-
 +$as_echo "#define HAVE_STAT_ST_BLOCKS 1" >>confdefs.h
  
  fi
  
+-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+-fi
+-{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_blksize_t" >&5
+-$as_echo "$ac_cv_type_blksize_t" >&6; }
+-if test "x$ac_cv_type_blksize_t" = x""yes; then
++ac_fn_c_check_type "$LINENO" "blksize_t" "ac_cv_type_blksize_t" "#include <sys/stat.h>
++"
++if test "x$ac_cv_type_blksize_t" = x""yes; then :
+ 
+ cat >>confdefs.h <<_ACEOF
+ #define HAVE_BLKSIZE_T 1
+@@ -61853,103 +23223,9 @@
+ 
+ 
+ fi
+-{ $as_echo "$as_me:$LINENO: checking for blkcnt_t" >&5
+-$as_echo_n "checking for blkcnt_t... " >&6; }
+-if test "${ac_cv_type_blkcnt_t+set}" = set; then
+-  $as_echo_n "(cached) " >&6
+-else
+-  ac_cv_type_blkcnt_t=no
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
+-#include <sys/stat.h>
+-
+-int
+-main ()
+-{
+-if (sizeof (blkcnt_t))
+-       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
+-  cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
+-#include <sys/stat.h>
+-
+-int
+-main ()
+-{
+-if (sizeof ((blkcnt_t)))
+-	  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
+-  :
+-else
+-  $as_echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	ac_cv_type_blkcnt_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_blkcnt_t" >&5
+-$as_echo "$ac_cv_type_blkcnt_t" >&6; }
+-if test "x$ac_cv_type_blkcnt_t" = x""yes; then
++ac_fn_c_check_type "$LINENO" "blkcnt_t" "ac_cv_type_blkcnt_t" "#include <sys/stat.h>
++"
++if test "x$ac_cv_type_blkcnt_t" = x""yes; then :
+ 
+ cat >>confdefs.h <<_ACEOF
+ #define HAVE_BLKCNT_T 1
+@@ -61959,17 +23235,13 @@
+ fi
+ 
+ 
 -{ $as_echo "$as_me:$LINENO: checking for st_blksize in struct stat" >&5
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for st_blksize in struct stat" >&5
  $as_echo_n "checking for st_blksize in struct stat... " >&6; }
@@ -67073,7 +68722,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <sys/stat.h>
-@@ -59677,55 +22050,28 @@
+@@ -61982,55 +23254,28 @@
    return 0;
  }
  _ACEOF
@@ -67136,7 +68785,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <sys/stat.h>
-@@ -59738,57 +22084,30 @@
+@@ -62043,57 +23288,30 @@
    return 0;
  }
  _ACEOF
@@ -67201,7 +68850,7 @@
  /* end confdefs.h.  */
  
  #include <sys/types.h>
-@@ -59804,58 +22123,31 @@
+@@ -62109,58 +23327,31 @@
    return 0;
  }
  _ACEOF
@@ -67268,7 +68917,7 @@
  /* end confdefs.h.  */
  
  #include <stdio.h>
-@@ -59874,74 +22166,45 @@
+@@ -62179,74 +23370,45 @@
  }
  
  _ACEOF
@@ -67354,7 +69003,7 @@
  $as_echo "no" >&6; }
  
  fi
-@@ -59950,24 +22213,24 @@
+@@ -62255,24 +23417,24 @@
  ####################################################
  # check for Linux-specific AFS fake-kaserver support
  samba_cv_WITH_FAKE_KASERVER=no
@@ -67384,7 +69033,7 @@
  $as_echo "no" >&6; }
  
  fi
-@@ -59979,18 +22242,14 @@
+@@ -62284,18 +23446,14 @@
     test x"$samba_cv_WITH_FAKE_KASERVER" != x"no"; then
  
      # see if this box has the OpenSSL DES libraries
@@ -67406,7 +69055,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -60008,208 +22267,43 @@
+@@ -62313,208 +23471,43 @@
    return 0;
  }
  _ACEOF
@@ -67631,7 +69280,7 @@
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
-@@ -60221,12 +22315,10 @@
+@@ -62526,12 +23519,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
@@ -67646,7 +69295,7 @@
  	fi
      else
      	have_afs_headers=yes
-@@ -60236,9 +22328,7 @@
+@@ -62541,9 +23532,7 @@
  FAKE_KASERVER_OBJ=""
  if test x"$samba_cv_WITH_FAKE_KASERVER" != x"no" && test x"$have_afs_headers" = x"yes"; then
  
@@ -67657,7 +69306,7 @@
  
      FAKE_KASERVER_OBJ="utils/net_afs.o"
  fi
-@@ -60247,24 +22337,24 @@
+@@ -62552,24 +23541,24 @@
  #################################################
  # check whether to compile AFS/NT ACL mapping module
  samba_cv_WITH_VFS_AFSACL=no
@@ -67687,82 +69336,80 @@
  $as_echo "no" >&6; }
  
  fi
-@@ -60274,220 +22364,78 @@
-    default_shared_modules="$default_shared_modules vfs_afsacl"
- fi
+@@ -62581,36 +23570,32 @@
  
--if test x"$samba_cv_WITH_AFS" != x"no" && test x"$have_afs_headers" = x"yes"; then
--
+ if test x"$samba_cv_WITH_AFS" != x"no" && test x"$have_afs_headers" = x"yes"; then
+ 
 -cat >>confdefs.h <<\_ACEOF
 -#define WITH_AFS 1
 -_ACEOF
--
--fi
--
--#################################################
--# check for the DFS clear-text auth system
++$as_echo "#define WITH_AFS 1" >>confdefs.h
+ 
+ fi
+ 
+ #################################################
+ # check for the DFS clear-text auth system
 -{ $as_echo "$as_me:$LINENO: checking whether to use DFS clear-text auth" >&5
--$as_echo_n "checking whether to use DFS clear-text auth... " >&6; }
--
--# Check whether --with-dfs was given.
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use DFS clear-text auth" >&5
+ $as_echo_n "checking whether to use DFS clear-text auth... " >&6; }
+ 
+ # Check whether --with-dfs was given.
 -if test "${with_dfs+set}" = set; then
--  withval=$with_dfs;  case "$withval" in
--  yes)
++if test "${with_dfs+set}" = set; then :
+   withval=$with_dfs;  case "$withval" 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; }
+ 
 -cat >>confdefs.h <<\_ACEOF
 -#define WITH_DFS 1
 -_ACEOF
--
--    ;;
--  *)
++$as_echo "#define WITH_DFS 1" >>confdefs.h
+ 
+     ;;
+   *)
 -    { $as_echo "$as_me:$LINENO: result: no" >&5
--$as_echo "no" >&6; }
--    ;;
--  esac
--else
++    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+ $as_echo "no" >&6; }
+     ;;
+   esac
+ else
 -  { $as_echo "$as_me:$LINENO: result: no" >&5
--$as_echo "no" >&6; }
--
--fi
--
--
--########################################################
--# Compile with LDAP support?
--
--with_ldap_support=auto
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+ $as_echo "no" >&6; }
+ 
+ fi
+@@ -62620,12 +23605,12 @@
+ # Compile with LDAP support?
+ 
+ with_ldap_support=auto
 -{ $as_echo "$as_me:$LINENO: checking for LDAP support" >&5
--$as_echo_n "checking for LDAP support... " >&6; }
--
--
--# Check whether --with-ldap was given.
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDAP support" >&5
+ $as_echo_n "checking for LDAP support... " >&6; }
+ 
+ 
+ # Check whether --with-ldap was given.
 -if test "${with_ldap+set}" = set; then
--  withval=$with_ldap;  case "$withval" in
--    yes|no)
--	with_ldap_support=$withval
--	;;
--  esac
--fi
--
--
++if test "${with_ldap+set}" = set; then :
+   withval=$with_ldap;  case "$withval" in
+     yes|no)
+ 	with_ldap_support=$withval
+@@ -62634,7 +23619,7 @@
+ fi
+ 
+ 
 -{ $as_echo "$as_me:$LINENO: result: $with_ldap_support" >&5
--$as_echo "$with_ldap_support" >&6; }
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_ldap_support" >&5
+ $as_echo "$with_ldap_support" >&6; }
+ 
+ SMBLDAP=""
+@@ -62649,150 +23634,12 @@
+   ##################################################################
+   # first test for ldap.h and lber.h
+   # (ldap.h is required for this test)
 -
--SMBLDAP=""
 -
--SMBLDAPUTIL=""
--
--LDBLDAP=""
--
--
--if test x"$with_ldap_support" != x"no"; then
--
--  ##################################################################
--  # first test for ldap.h and lber.h
--  # (ldap.h is required for this test)
--
--
 -for ac_header in ldap.h lber.h
 -do
 -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
@@ -67853,29 +69500,12 @@
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -  ac_header_preproc=no
-+if test x"$samba_cv_WITH_AFS" != x"no" && test x"$have_afs_headers" = x"yes"; then
-+
-+$as_echo "#define WITH_AFS 1" >>confdefs.h
-+
- fi
- 
+-fi
+-
 -rm -f conftest.err conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
 -$as_echo "$ac_header_preproc" >&6; }
-+#################################################
-+# check for the DFS clear-text auth system
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use DFS clear-text auth" >&5
-+$as_echo_n "checking whether to use DFS clear-text auth... " >&6; }
-+
-+# Check whether --with-dfs was given.
-+if test "${with_dfs+set}" = set; then :
-+  withval=$with_dfs;  case "$withval" in
-+  yes)
-+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-+$as_echo "yes" >&6; }
-+
-+$as_echo "#define WITH_DFS 1" >>confdefs.h
- 
+-
 -# So?  What about this header?
 -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
 -  yes:no: )
@@ -67884,7 +69514,7 @@
 -    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
 -    ac_header_preproc=yes
-     ;;
+-    ;;
 -  no:yes:* )
 -    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
 -$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
@@ -67904,64 +69534,24 @@
 -## ---------------------------------------- ##
 -_ASBOX
 -     ) | sed "s/^/$as_me: WARNING:     /" >&2
-+  *)
-+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-+$as_echo "no" >&6; }
-     ;;
+-    ;;
 -esac
 -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
 -$as_echo_n "checking for $ac_header... " >&6; }
 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
 -  $as_echo_n "(cached) " >&6
-+  esac
- else
+-else
 -  eval "$as_ac_Header=\$ac_header_preproc"
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-+$as_echo "no" >&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; }
- 
-+
-+########################################################
-+# Compile with LDAP support?
-+
-+with_ldap_support=auto
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDAP support" >&5
-+$as_echo_n "checking for LDAP support... " >&6; }
-+
-+
-+# Check whether --with-ldap was given.
-+if test "${with_ldap+set}" = set; then :
-+  withval=$with_ldap;  case "$withval" in
-+    yes|no)
-+	with_ldap_support=$withval
-+	;;
-+  esac
- fi
+-
+-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: $with_ldap_support" >&5
-+$as_echo "$with_ldap_support" >&6; }
-+
-+SMBLDAP=""
-+
-+SMBLDAPUTIL=""
-+
-+LDBLDAP=""
-+
-+
-+if test x"$with_ldap_support" != x"no"; then
-+
-+  ##################################################################
-+  # first test for ldap.h and lber.h
-+  # (ldap.h is required for this test)
 +  for ac_header in ldap.h lber.h
 +do :
 +  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
@@ -67971,7 +69561,7 @@
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
-@@ -60499,11 +22447,9 @@
+@@ -62804,11 +23651,9 @@
  
    if test x"$ac_cv_header_ldap_h" != x"yes"; then
  	if test x"$with_ldap_support" = x"yes"; then
@@ -67985,7 +69575,7 @@
  $as_echo "$as_me: WARNING: ldap.h is needed for LDAP support" >&2;}
  	fi
  
-@@ -60515,117 +22461,24 @@
+@@ -62820,117 +23665,24 @@
    # unsigned int in include/includes.h
    case $host_os in
  	*hpux*)
@@ -68110,7 +69700,7 @@
  $as_echo "$as_me: WARNING: ber_tag_t is needed for LDAP support" >&2;}
  		fi
  		with_ldap_support=no
-@@ -60642,23 +22495,17 @@
+@@ -62947,23 +23699,17 @@
    # this test must be before the libldap test
  
  
@@ -68137,7 +69727,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -60676,54 +22523,28 @@
+@@ -62981,54 +23727,28 @@
    return 0;
  }
  _ACEOF
@@ -68199,7 +69789,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_LIBLBER 1
  _ACEOF
-@@ -60739,25 +22560,19 @@
+@@ -63044,25 +23764,19 @@
  
  fi
  
@@ -68228,7 +69818,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.  */
-@@ -60798,61 +22613,31 @@
+@@ -63103,61 +23817,31 @@
    return 0;
  }
  _ACEOF
@@ -68299,7 +69889,7 @@
  /* end confdefs.h.  */
  #include <ldap.h>
  int
-@@ -60863,59 +22648,32 @@
+@@ -63168,59 +23852,32 @@
    return 0;
  }
  _ACEOF
@@ -68366,7 +69956,7 @@
  /* end confdefs.h.  */
  #include <lber.h>
  int
-@@ -60926,42 +22684,19 @@
+@@ -63231,42 +23888,19 @@
    return 0;
  }
  _ACEOF
@@ -68413,7 +70003,7 @@
  
    fi
  
-@@ -60969,23 +22704,17 @@
+@@ -63274,23 +23908,17 @@
    # now see if we can find the ldap libs in standard paths
  
  
@@ -68440,7 +70030,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -61003,54 +22732,28 @@
+@@ -63308,54 +23936,28 @@
    return 0;
  }
  _ACEOF
@@ -68502,7 +70092,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_LIBLDAP 1
  _ACEOF
-@@ -61066,25 +22769,19 @@
+@@ -63371,25 +23973,19 @@
  
  fi
  
@@ -68531,7 +70121,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.  */
-@@ -61125,62 +22822,32 @@
+@@ -63430,62 +24026,32 @@
    return 0;
  }
  _ACEOF
@@ -68603,7 +70193,7 @@
  /* end confdefs.h.  */
  
  	#include <lber.h>
-@@ -61193,37 +22860,16 @@
+@@ -63498,37 +24064,16 @@
    return 0;
  }
  _ACEOF
@@ -68644,7 +70234,7 @@
  $as_echo "$smb_ldap_cv_ldap_set_rebind_proc" >&6; }
  
  
-@@ -61234,19 +22880,14 @@
+@@ -63539,19 +24084,14 @@
  
  
  
@@ -68667,7 +70257,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.  */
-@@ -61287,55 +22928,27 @@
+@@ -63592,55 +24132,27 @@
    return 0;
  }
  _ACEOF
@@ -68730,7 +70320,7 @@
  
      CPPFLAGS="$CPPFLAGS -DLDAP_DEPRECATED"
      default_static_modules="$default_static_modules pdb_ldap idmap_ldap";
-@@ -61343,17 +22956,15 @@
+@@ -63648,17 +24160,15 @@
      SMBLDAP="lib/smbldap.o"
      SMBLDAPUTIL="lib/smbldap_util.o"
      with_ldap_support=yes
@@ -68752,7 +70342,7 @@
  $as_echo "$as_me: WARNING: libldap is needed for LDAP support" >&2;}
      fi
  
-@@ -61368,12 +22979,12 @@
+@@ -63673,12 +24183,12 @@
  # active directory support
  
  with_ads_support=auto
@@ -68767,7 +70357,7 @@
    withval=$with_ads;  case "$withval" in
      yes|no)
  	with_ads_support="$withval"
-@@ -61382,7 +22993,7 @@
+@@ -63687,7 +24197,7 @@
  fi
  
  
@@ -68776,7 +70366,7 @@
  $as_echo "$with_ads_support" >&6; }
  
  FOUND_KRB5=no
-@@ -61391,11 +23002,9 @@
+@@ -63696,11 +24206,9 @@
  if test x"$with_ldap_support" != x"yes"; then
  
      if test x"$with_ads_support" = x"yes"; then
@@ -68790,7 +70380,7 @@
  $as_echo "$as_me: WARNING: Disabling Active Directory support (requires LDAP support)" >&2;}
  	with_ads_support=no
      fi
-@@ -61410,19 +23019,14 @@
+@@ -63715,19 +24223,14 @@
  	*hpux*)
  
  
@@ -68813,7 +70403,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.  */
-@@ -61463,57 +23067,29 @@
+@@ -63768,57 +24271,29 @@
    return 0;
  }
  _ACEOF
@@ -68879,7 +70469,7 @@
  $as_echo "$as_me: WARNING: Disabling Active Directory support (requires ldap_init on HPUX)" >&2;}
  	    with_ads_support=no
  	fi
-@@ -61522,19 +23098,14 @@
+@@ -63827,19 +24302,14 @@
  	*)
  
  
@@ -68902,7 +70492,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.  */
-@@ -61575,57 +23146,29 @@
+@@ -63880,57 +24350,29 @@
    return 0;
  }
  _ACEOF
@@ -68968,7 +70558,7 @@
  $as_echo "$as_me: WARNING: Disabling Active Directory support (requires ldap_initialize)" >&2;}
  	    with_ads_support=no
  	fi
-@@ -61636,19 +23179,14 @@
+@@ -63941,19 +24383,14 @@
  
  
  
@@ -68991,7 +70581,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.  */
-@@ -61689,57 +23227,29 @@
+@@ -63994,57 +24431,29 @@
    return 0;
  }
  _ACEOF
@@ -69057,7 +70647,7 @@
  $as_echo "$as_me: WARNING: Disabling Active Directory support (requires ldap_add_result_entry)" >&2;}
  	    with_ads_support=no
  	fi
-@@ -61755,23 +23265,23 @@
+@@ -64060,23 +24469,23 @@
    if test x$FOUND_KRB5 = x"no"; then
      #################################################
      # check for location of Kerberos 5 install
@@ -69086,7 +70676,7 @@
  $as_echo "$withval" >&6; }
          KRB5_CFLAGS="-I$withval/include"
          KRB5_CPPFLAGS="-I$withval/include"
-@@ -61783,7 +23293,7 @@
+@@ -64088,7 +24497,7 @@
          ;;
        esac
  else
@@ -69095,7 +70685,7 @@
  $as_echo "no krb5-path given" >&6; }
  
  fi
-@@ -61794,9 +23304,9 @@
+@@ -64099,9 +24508,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
@@ -69107,7 +70697,7 @@
    $as_echo_n "(cached) " >&6
  else
    case $KRB5CONFIG in
-@@ -61809,14 +23319,14 @@
+@@ -64114,14 +24523,14 @@
  do
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
@@ -69125,7 +70715,7 @@
  IFS=$as_save_IFS
  
    ;;
-@@ -61824,15 +23334,15 @@
+@@ -64129,15 +24538,15 @@
  fi
  KRB5CONFIG=$ac_cv_path_KRB5CONFIG
  if test -n "$KRB5CONFIG"; then
@@ -69144,7 +70734,7 @@
  $as_echo_n "checking for working krb5-config... " >&6; }
    if test -x "$KRB5CONFIG" && $KRB5CONFIG --libs gssapi > /dev/null ; then
      ac_save_CFLAGS=$CFLAGS
-@@ -61846,17 +23356,17 @@
+@@ -64151,17 +24560,17 @@
      CFLAGS=$ac_save_CFLAGS;export CFLAGS
      LDFLAGS=$ac_save_LDFLAGS;export LDFLAGS
      FOUND_KRB5=yes
@@ -69165,7 +70755,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
-@@ -61864,17 +23374,17 @@
+@@ -64169,17 +24578,17 @@
            KRB5_CPPFLAGS="-I/usr/include/heimdal"
            KRB5_LDFLAGS="-L/usr/lib/heimdal/lib"
  	  FOUND_KRB5=yes
@@ -69186,7 +70776,7 @@
  $as_echo "no" >&6; }
      fi
    fi
-@@ -61882,17 +23392,17 @@
+@@ -64187,17 +24596,17 @@
    if test x$FOUND_KRB5 = x"no"; then
      #################################################
      # see if this box has the RedHat location for kerberos
@@ -69207,7 +70797,7 @@
  $as_echo "no" >&6; }
      fi
    fi
-@@ -61900,16 +23410,16 @@
+@@ -64205,16 +24614,16 @@
    if test x$FOUND_KRB5 = x"no"; then
      #################################################
      # see if this box has the OpenBSD location for heimdal krb5
@@ -69227,11 +70817,53 @@
  $as_echo "no" >&6; }
      fi
    fi
-@@ -61996,151 +23506,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
+@@ -64259,193 +24668,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
 -
+-  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`
@@ -69327,7 +70959,39 @@
 -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: )
@@ -69369,11 +71033,19 @@
 -		 $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"
@@ -69384,7 +71056,7 @@
  _ACEOF
  
  fi
-@@ -62154,11 +23525,9 @@
+@@ -64459,11 +24729,9 @@
      # i.e with_ads_support = auto, otherwise die with an error.
  
      if test x"$with_ads_support" = x"yes"; then
@@ -69398,7 +71070,7 @@
  $as_echo "$as_me: WARNING: Active Directory cannot be supported without krb5.h" >&2;}
      fi
  
-@@ -62170,65 +23539,16 @@
+@@ -64475,65 +24743,16 @@
      CPPFLAGS=$ac_save_CPPFLAGS
      LDFLAGS=$ac_save_LDFLAGS
    fi
@@ -69470,7 +71142,7 @@
  _ACEOF
  
  fi
-@@ -62243,17 +23563,13 @@
+@@ -64550,17 +24769,13 @@
  
    # check for new heimdal KRB5_DEPRECATED handling
  
@@ -69491,7 +71163,7 @@
  /* end confdefs.h.  */
  #define KRB5_DEPRECATED 1
        #include <krb5.h>
-@@ -62265,42 +23581,19 @@
+@@ -64572,42 +24787,19 @@
    return 0;
  }
  _ACEOF
@@ -69538,7 +71210,7 @@
  
    fi
  fi
-@@ -62314,152 +23607,12 @@
+@@ -64621,152 +24813,12 @@
  
    # now check for gssapi headers.  This is also done here to allow for
    # different kerberos include paths
@@ -69697,7 +71369,7 @@
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
-@@ -62473,23 +23626,17 @@
+@@ -64780,23 +24832,17 @@
    # we might need the k5crypto and com_err libraries on some systems
  
  
@@ -69724,7 +71396,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -62507,54 +23654,28 @@
+@@ -64814,54 +24860,28 @@
    return 0;
  }
  _ACEOF
@@ -69786,7 +71458,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_LIBCOM_ERR 1
  _ACEOF
-@@ -62571,24 +23692,17 @@
+@@ -64878,24 +24898,17 @@
  fi
  
  
@@ -69814,7 +71486,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -62606,54 +23720,28 @@
+@@ -64913,54 +24926,28 @@
    return 0;
  }
  _ACEOF
@@ -69876,7 +71548,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_LIBK5CRYPTO 1
  _ACEOF
-@@ -62669,27 +23757,20 @@
+@@ -64976,27 +24963,20 @@
  
  fi
  
@@ -69907,7 +71579,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -62707,54 +23788,28 @@
+@@ -65014,54 +24994,28 @@
    return 0;
  }
  _ACEOF
@@ -69969,7 +71641,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_LIBCRYPTO 1
  _ACEOF
-@@ -62771,24 +23826,17 @@
+@@ -65078,24 +25032,17 @@
  fi
  
  
@@ -69997,7 +71669,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -62806,54 +23854,28 @@
+@@ -65113,54 +25060,28 @@
    return 0;
  }
  _ACEOF
@@ -70059,7 +71731,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_LIBASN1 1
  _ACEOF
-@@ -62870,24 +23892,17 @@
+@@ -65177,24 +25098,17 @@
  fi
  
  
@@ -70087,7 +71759,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -62905,54 +23920,28 @@
+@@ -65212,54 +25126,28 @@
    return 0;
  }
  _ACEOF
@@ -70149,7 +71821,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_LIBROKEN 1
  _ACEOF
-@@ -62968,27 +23957,20 @@
+@@ -65275,27 +25163,20 @@
  
  fi
  
@@ -70180,7 +71852,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -63006,54 +23988,28 @@
+@@ -65313,54 +25194,28 @@
    return 0;
  }
  _ACEOF
@@ -70242,7 +71914,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_LIBGSSAPI 1
  _ACEOF
-@@ -63069,29 +24025,22 @@
+@@ -65376,29 +25231,22 @@
  
  fi
  
@@ -70275,7 +71947,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -63109,54 +24058,28 @@
+@@ -65416,54 +25264,28 @@
    return 0;
  }
  _ACEOF
@@ -70337,7 +72009,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_LIBKRB5 1
  _ACEOF
-@@ -63173,24 +24096,17 @@
+@@ -65480,24 +25302,17 @@
  fi
  
  
@@ -70365,7 +72037,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -63208,54 +24124,28 @@
+@@ -65515,54 +25330,28 @@
    return 0;
  }
  _ACEOF
@@ -70427,7 +72099,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_LIBKRB5 1
  _ACEOF
-@@ -63271,29 +24161,22 @@
+@@ -65578,29 +25367,22 @@
  
  fi
  
@@ -70460,7 +72132,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -63311,54 +24194,28 @@
+@@ -65618,54 +25400,28 @@
    return 0;
  }
  _ACEOF
@@ -70522,7 +72194,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_LIBGSSAPI_KRB5 1
  _ACEOF
-@@ -63373,24 +24230,18 @@
+@@ -65680,24 +25436,18 @@
  		have_gssapi=yes
  
  fi
@@ -70550,7 +72222,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.  */
-@@ -63431,43 +24282,18 @@
+@@ -65738,43 +25488,18 @@
    return 0;
  }
  _ACEOF
@@ -70600,7 +72272,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_SET_REAL_TIME 1
  _ACEOF
-@@ -63475,20 +24301,14 @@
+@@ -65782,20 +25507,14 @@
  fi
  
  
@@ -70624,7 +72296,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.  */
-@@ -63529,43 +24349,18 @@
+@@ -65836,43 +25555,18 @@
    return 0;
  }
  _ACEOF
@@ -70674,7 +72346,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_SET_DEFAULT_IN_TKT_ETYPES 1
  _ACEOF
-@@ -63573,20 +24368,14 @@
+@@ -65880,20 +25574,14 @@
  fi
  
  
@@ -70698,7 +72370,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.  */
-@@ -63627,43 +24416,18 @@
+@@ -65934,43 +25622,18 @@
    return 0;
  }
  _ACEOF
@@ -70748,7 +72420,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_SET_DEFAULT_TGS_ENCTYPES 1
  _ACEOF
-@@ -63671,20 +24435,14 @@
+@@ -65978,20 +25641,14 @@
  fi
  
  
@@ -70772,7 +72444,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.  */
-@@ -63725,43 +24483,18 @@
+@@ -66032,43 +25689,18 @@
    return 0;
  }
  _ACEOF
@@ -70822,7 +72494,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_SET_DEFAULT_TGS_KTYPES 1
  _ACEOF
-@@ -63769,20 +24502,14 @@
+@@ -66076,20 +25708,14 @@
  fi
  
  
@@ -70846,7 +72518,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.  */
-@@ -63823,43 +24550,18 @@
+@@ -66130,43 +25756,18 @@
    return 0;
  }
  _ACEOF
@@ -70896,7 +72568,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_PRINCIPAL2SALT 1
  _ACEOF
-@@ -63867,20 +24569,14 @@
+@@ -66174,20 +25775,14 @@
  fi
  
  
@@ -70920,7 +72592,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.  */
-@@ -63921,43 +24617,18 @@
+@@ -66228,43 +25823,18 @@
    return 0;
  }
  _ACEOF
@@ -70970,7 +72642,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_USE_ENCTYPE 1
  _ACEOF
-@@ -63965,20 +24636,14 @@
+@@ -66272,20 +25842,14 @@
  fi
  
  
@@ -70994,7 +72666,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.  */
-@@ -64019,43 +24684,18 @@
+@@ -66326,43 +25890,18 @@
    return 0;
  }
  _ACEOF
@@ -71044,7 +72716,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_STRING_TO_KEY 1
  _ACEOF
-@@ -64063,20 +24703,14 @@
+@@ -66370,20 +25909,14 @@
  fi
  
  
@@ -71068,7 +72740,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.  */
-@@ -64117,43 +24751,18 @@
+@@ -66424,43 +25957,18 @@
    return 0;
  }
  _ACEOF
@@ -71118,7 +72790,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_GET_PW_SALT 1
  _ACEOF
-@@ -64161,20 +24770,14 @@
+@@ -66468,20 +25976,14 @@
  fi
  
  
@@ -71142,7 +72814,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.  */
-@@ -64215,43 +24818,18 @@
+@@ -66522,43 +26024,18 @@
    return 0;
  }
  _ACEOF
@@ -71192,7 +72864,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_STRING_TO_KEY_SALT 1
  _ACEOF
-@@ -64259,20 +24837,14 @@
+@@ -66566,20 +26043,14 @@
  fi
  
  
@@ -71216,7 +72888,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.  */
-@@ -64313,43 +24885,18 @@
+@@ -66620,43 +26091,18 @@
    return 0;
  }
  _ACEOF
@@ -71266,7 +72938,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_AUTH_CON_SETKEY 1
  _ACEOF
-@@ -64357,20 +24904,14 @@
+@@ -66664,20 +26110,14 @@
  fi
  
  
@@ -71290,7 +72962,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.  */
-@@ -64411,43 +24952,18 @@
+@@ -66718,43 +26158,18 @@
    return 0;
  }
  _ACEOF
@@ -71340,7 +73012,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_AUTH_CON_SETUSERUSERKEY 1
  _ACEOF
-@@ -64455,20 +24971,14 @@
+@@ -66762,20 +26177,14 @@
  fi
  
  
@@ -71364,7 +73036,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.  */
-@@ -64509,43 +25019,18 @@
+@@ -66816,43 +26225,18 @@
    return 0;
  }
  _ACEOF
@@ -71414,7 +73086,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_LOCATE_KDC 1
  _ACEOF
-@@ -64553,20 +25038,14 @@
+@@ -66860,20 +26244,14 @@
  fi
  
  
@@ -71438,7 +73110,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.  */
-@@ -64607,43 +25086,18 @@
+@@ -66914,43 +26292,18 @@
    return 0;
  }
  _ACEOF
@@ -71488,7 +73160,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_GET_PERMITTED_ENCTYPES 1
  _ACEOF
-@@ -64651,20 +25105,14 @@
+@@ -66958,20 +26311,14 @@
  fi
  
  
@@ -71512,7 +73184,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.  */
-@@ -64705,43 +25153,18 @@
+@@ -67012,43 +26359,18 @@
    return 0;
  }
  _ACEOF
@@ -71562,7 +73234,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_GET_DEFAULT_IN_TKT_ETYPES 1
  _ACEOF
-@@ -64749,20 +25172,14 @@
+@@ -67056,20 +26378,14 @@
  fi
  
  
@@ -71586,7 +73258,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.  */
-@@ -64803,43 +25220,18 @@
+@@ -67110,43 +26426,18 @@
    return 0;
  }
  _ACEOF
@@ -71636,7 +73308,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_FREE_DATA_CONTENTS 1
  _ACEOF
-@@ -64847,20 +25239,14 @@
+@@ -67154,20 +26445,14 @@
  fi
  
  
@@ -71660,7 +73332,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.  */
-@@ -64901,43 +25287,18 @@
+@@ -67208,43 +26493,18 @@
    return 0;
  }
  _ACEOF
@@ -71710,7 +73382,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_PRINCIPAL_GET_COMP_STRING 1
  _ACEOF
-@@ -64945,20 +25306,14 @@
+@@ -67252,20 +26512,14 @@
  fi
  
  
@@ -71734,7 +73406,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.  */
-@@ -64999,43 +25354,18 @@
+@@ -67306,43 +26560,18 @@
    return 0;
  }
  _ACEOF
@@ -71784,7 +73456,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_FREE_UNPARSED_NAME 1
  _ACEOF
-@@ -65043,20 +25373,14 @@
+@@ -67350,20 +26579,14 @@
  fi
  
  
@@ -71808,7 +73480,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.  */
-@@ -65097,43 +25421,18 @@
+@@ -67404,43 +26627,18 @@
    return 0;
  }
  _ACEOF
@@ -71858,7 +73530,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_FREE_KEYTAB_ENTRY_CONTENTS 1
  _ACEOF
-@@ -65141,20 +25440,14 @@
+@@ -67448,20 +26646,14 @@
  fi
  
  
@@ -71882,7 +73554,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.  */
-@@ -65195,43 +25488,18 @@
+@@ -67502,43 +26694,18 @@
    return 0;
  }
  _ACEOF
@@ -71932,7 +73604,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_KT_FREE_ENTRY 1
  _ACEOF
-@@ -65239,20 +25507,14 @@
+@@ -67546,20 +26713,14 @@
  fi
  
  
@@ -71956,7 +73628,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.  */
-@@ -65293,43 +25555,18 @@
+@@ -67600,43 +26761,18 @@
    return 0;
  }
  _ACEOF
@@ -72006,7 +73678,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_KRBHST_INIT 1
  _ACEOF
-@@ -65337,20 +25574,14 @@
+@@ -67644,20 +26780,14 @@
  fi
  
  
@@ -72030,7 +73702,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.  */
-@@ -65391,43 +25622,18 @@
+@@ -67698,43 +26828,18 @@
    return 0;
  }
  _ACEOF
@@ -72080,7 +73752,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_KRBHST_GET_ADDRINFO 1
  _ACEOF
-@@ -65435,20 +25641,14 @@
+@@ -67742,20 +26847,14 @@
  fi
  
  
@@ -72104,19 +73776,10 @@
  /* 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.  */
-@@ -65480,52 +25680,27 @@
- #if defined __stub_krb5_c_enctype_compare || defined __stub___krb5_c_enctype_compare
- choke me
- #endif
--
--int
--main ()
--{
--return krb5_c_enctype_compare ();
--  ;
--  return 0;
--}
--_ACEOF
+@@ -67796,43 +26895,18 @@
+   return 0;
+ }
+ _ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -72138,15 +73801,6 @@
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
-+
-+int
-+main ()
-+{
-+return krb5_c_enctype_compare ();
-+  ;
-+  return 0;
-+}
-+_ACEOF
 +if ac_fn_c_try_link "$LINENO"; then :
    ac_cv_func_ext_krb5_c_enctype_compare=yes
  else
@@ -72172,7 +73826,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_C_ENCTYPE_COMPARE 1
  _ACEOF
-@@ -65533,20 +25708,14 @@
+@@ -67840,20 +26914,14 @@
  fi
  
  
@@ -72196,7 +73850,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.  */
-@@ -65587,43 +25756,18 @@
+@@ -67894,43 +26962,18 @@
    return 0;
  }
  _ACEOF
@@ -72246,7 +73900,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_ENCTYPES_COMPATIBLE_KEYS 1
  _ACEOF
-@@ -65631,20 +25775,14 @@
+@@ -67938,20 +26981,14 @@
  fi
  
  
@@ -72270,7 +73924,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.  */
-@@ -65685,43 +25823,18 @@
+@@ -67992,43 +27029,18 @@
    return 0;
  }
  _ACEOF
@@ -72320,7 +73974,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_CRYPTO_INIT 1
  _ACEOF
-@@ -65729,20 +25842,14 @@
+@@ -68036,20 +27048,14 @@
  fi
  
  
@@ -72344,7 +73998,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.  */
-@@ -65783,43 +25890,18 @@
+@@ -68090,43 +27096,18 @@
    return 0;
  }
  _ACEOF
@@ -72394,7 +74048,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_CRYPTO_DESTROY 1
  _ACEOF
-@@ -65827,20 +25909,14 @@
+@@ -68134,20 +27115,14 @@
  fi
  
  
@@ -72418,7 +74072,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.  */
-@@ -65881,43 +25957,18 @@
+@@ -68188,43 +27163,18 @@
    return 0;
  }
  _ACEOF
@@ -72468,7 +74122,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_DECODE_AP_REQ 1
  _ACEOF
-@@ -65925,20 +25976,14 @@
+@@ -68232,20 +27182,14 @@
  fi
  
  
@@ -72492,7 +74146,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.  */
-@@ -65979,43 +26024,18 @@
+@@ -68286,43 +27230,18 @@
    return 0;
  }
  _ACEOF
@@ -72542,7 +74196,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_FREE_AP_REQ 1
  _ACEOF
-@@ -66023,20 +26043,14 @@
+@@ -68330,20 +27249,14 @@
  fi
  
  
@@ -72566,7 +74220,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.  */
-@@ -66077,43 +26091,18 @@
+@@ -68384,43 +27297,18 @@
    return 0;
  }
  _ACEOF
@@ -72616,7 +74270,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_VERIFY_CHECKSUM 1
  _ACEOF
-@@ -66121,20 +26110,14 @@
+@@ -68428,20 +27316,14 @@
  fi
  
  
@@ -72640,7 +74294,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.  */
-@@ -66175,43 +26158,18 @@
+@@ -68482,43 +27364,18 @@
    return 0;
  }
  _ACEOF
@@ -72690,7 +74344,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_C_VERIFY_CHECKSUM 1
  _ACEOF
-@@ -66219,20 +26177,14 @@
+@@ -68526,20 +27383,14 @@
  fi
  
  
@@ -72714,7 +74368,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.  */
-@@ -66273,43 +26225,18 @@
+@@ -68580,43 +27431,18 @@
    return 0;
  }
  _ACEOF
@@ -72764,7 +74418,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_PRINCIPAL_COMPARE_ANY_REALM 1
  _ACEOF
-@@ -66317,20 +26244,14 @@
+@@ -68624,20 +27450,14 @@
  fi
  
  
@@ -72788,7 +74442,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.  */
-@@ -66371,43 +26292,18 @@
+@@ -68678,43 +27498,18 @@
    return 0;
  }
  _ACEOF
@@ -72838,7 +74492,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_PARSE_NAME_NOREALM 1
  _ACEOF
-@@ -66415,20 +26311,14 @@
+@@ -68722,20 +27517,14 @@
  fi
  
  
@@ -72862,7 +74516,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.  */
-@@ -66469,43 +26359,18 @@
+@@ -68776,43 +27565,18 @@
    return 0;
  }
  _ACEOF
@@ -72912,7 +74566,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_PRINC_SIZE 1
  _ACEOF
-@@ -66513,20 +26378,14 @@
+@@ -68820,20 +27584,14 @@
  fi
  
  
@@ -72936,7 +74590,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.  */
-@@ -66567,43 +26426,18 @@
+@@ -68874,43 +27632,18 @@
    return 0;
  }
  _ACEOF
@@ -72986,7 +74640,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_GET_INIT_CREDS_OPT_SET_PAC_REQUEST 1
  _ACEOF
-@@ -66611,20 +26445,14 @@
+@@ -68918,20 +27651,14 @@
  fi
  
  
@@ -73010,7 +74664,7 @@
  /* end confdefs.h.  */
  /* Define krb5_get_renewed_creds to an innocuous variant, in case <limits.h> declares krb5_get_renewed_creds.
     For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-@@ -66665,43 +26493,18 @@
+@@ -68972,43 +27699,18 @@
    return 0;
  }
  _ACEOF
@@ -73060,7 +74714,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_GET_RENEWED_CREDS 1
  _ACEOF
-@@ -66709,20 +26512,14 @@
+@@ -69016,20 +27718,14 @@
  fi
  
  
@@ -73084,7 +74738,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.  */
-@@ -66763,43 +26560,18 @@
+@@ -69070,43 +27766,18 @@
    return 0;
  }
  _ACEOF
@@ -73134,7 +74788,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_GET_KDC_CRED 1
  _ACEOF
-@@ -66807,20 +26579,14 @@
+@@ -69114,20 +27785,14 @@
  fi
  
  
@@ -73158,7 +74812,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.  */
-@@ -66861,43 +26627,18 @@
+@@ -69168,43 +27833,18 @@
    return 0;
  }
  _ACEOF
@@ -73208,7 +74862,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_FREE_ERROR_CONTENTS 1
  _ACEOF
-@@ -66905,20 +26646,14 @@
+@@ -69212,20 +27852,14 @@
  fi
  
  
@@ -73232,7 +74886,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.  */
-@@ -66959,43 +26694,18 @@
+@@ -69266,43 +27900,18 @@
    return 0;
  }
  _ACEOF
@@ -73282,7 +74936,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_INITIALIZE_KRB5_ERROR_TABLE 1
  _ACEOF
-@@ -67003,20 +26713,14 @@
+@@ -69310,20 +27919,14 @@
  fi
  
  
@@ -73306,7 +74960,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.  */
-@@ -67057,43 +26761,18 @@
+@@ -69364,43 +27967,18 @@
    return 0;
  }
  _ACEOF
@@ -73356,7 +75010,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_GET_INIT_CREDS_OPT_ALLOC 1
  _ACEOF
-@@ -67101,20 +26780,14 @@
+@@ -69408,20 +27986,14 @@
  fi
  
  
@@ -73380,7 +75034,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.  */
-@@ -67155,43 +26828,18 @@
+@@ -69462,43 +28034,18 @@
    return 0;
  }
  _ACEOF
@@ -73430,7 +75084,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_GET_INIT_CREDS_OPT_FREE 1
  _ACEOF
-@@ -67199,20 +26847,14 @@
+@@ -69506,20 +28053,14 @@
  fi
  
  
@@ -73454,10 +75108,19 @@
  /* 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.  */
-@@ -67253,43 +26895,18 @@
-   return 0;
- }
- _ACEOF
+@@ -69551,52 +28092,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
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -73479,6 +75142,15 @@
 -	 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
@@ -73504,7 +75176,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_GET_INIT_CREDS_OPT_GET_ERROR 1
  _ACEOF
-@@ -67297,20 +26914,14 @@
+@@ -69604,20 +28120,14 @@
  fi
  
  
@@ -73528,7 +75200,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.  */
-@@ -67351,43 +26962,18 @@
+@@ -69658,43 +28168,18 @@
    return 0;
  }
  _ACEOF
@@ -73578,7 +75250,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_ENCTYPE_TO_STRING 1
  _ACEOF
-@@ -67395,20 +26981,14 @@
+@@ -69702,20 +28187,14 @@
  fi
  
  
@@ -73602,7 +75274,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.  */
-@@ -67449,43 +27029,18 @@
+@@ -69756,43 +28235,18 @@
    return 0;
  }
  _ACEOF
@@ -73652,7 +75324,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_FWD_TGT_CREDS 1
  _ACEOF
-@@ -67493,20 +27048,14 @@
+@@ -69800,20 +28254,14 @@
  fi
  
  
@@ -73676,7 +75348,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.  */
-@@ -67547,136 +27096,48 @@
+@@ -69854,43 +28302,18 @@
    return 0;
  }
  _ACEOF
@@ -73726,10 +75398,532 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_AUTH_CON_SET_REQ_CKSUMTYPE 1
  _ACEOF
+@@ -69898,20 +28321,14 @@
+ fi
  
+ 
+-
+-
+     ac_check_func_ext_save_LIBS=$LIBS
+     LIBS="$KRB5_LIBS $LIBS"
+-        { $as_echo "$as_me:$LINENO: checking for krb5_get_creds_opt_alloc" >&5
++        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb5_get_creds_opt_alloc" >&5
+ $as_echo_n "checking for krb5_get_creds_opt_alloc... " >&6; }
+-if test "${ac_cv_func_ext_krb5_get_creds_opt_alloc+set}" = set; then
++if test "${ac_cv_func_ext_krb5_get_creds_opt_alloc+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 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.  */
+@@ -69952,43 +28369,18 @@
+   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
++if ac_fn_c_try_link "$LINENO"; then :
+   ac_cv_func_ext_krb5_get_creds_opt_alloc=yes
+ else
+-  $as_echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	ac_cv_func_ext_krb5_get_creds_opt_alloc=no
++  ac_cv_func_ext_krb5_get_creds_opt_alloc=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
+-{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_ext_krb5_get_creds_opt_alloc" >&5
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_ext_krb5_get_creds_opt_alloc" >&5
+ $as_echo "$ac_cv_func_ext_krb5_get_creds_opt_alloc" >&6; }
+     LIBS=$ac_check_func_ext_save_LIBS
+-    if test $ac_cv_func_ext_krb5_get_creds_opt_alloc = yes; then
++    if test $ac_cv_func_ext_krb5_get_creds_opt_alloc = yes; then :
+   cat >>confdefs.h <<_ACEOF
+ #define HAVE_KRB5_GET_CREDS_OPT_ALLOC 1
+ _ACEOF
+@@ -69996,20 +28388,14 @@
+ fi
  
+ 
 -
+-
+     ac_check_func_ext_save_LIBS=$LIBS
+     LIBS="$KRB5_LIBS $LIBS"
+-        { $as_echo "$as_me:$LINENO: checking for krb5_get_creds_opt_set_impersonate" >&5
++        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb5_get_creds_opt_set_impersonate" >&5
+ $as_echo_n "checking for krb5_get_creds_opt_set_impersonate... " >&6; }
+-if test "${ac_cv_func_ext_krb5_get_creds_opt_set_impersonate+set}" = set; then
++if test "${ac_cv_func_ext_krb5_get_creds_opt_set_impersonate+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 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.  */
+@@ -70050,43 +28436,18 @@
+   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
++if ac_fn_c_try_link "$LINENO"; then :
+   ac_cv_func_ext_krb5_get_creds_opt_set_impersonate=yes
+ else
+-  $as_echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	ac_cv_func_ext_krb5_get_creds_opt_set_impersonate=no
++  ac_cv_func_ext_krb5_get_creds_opt_set_impersonate=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
+-{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_ext_krb5_get_creds_opt_set_impersonate" >&5
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_ext_krb5_get_creds_opt_set_impersonate" >&5
+ $as_echo "$ac_cv_func_ext_krb5_get_creds_opt_set_impersonate" >&6; }
+     LIBS=$ac_check_func_ext_save_LIBS
+-    if test $ac_cv_func_ext_krb5_get_creds_opt_set_impersonate = yes; then
++    if test $ac_cv_func_ext_krb5_get_creds_opt_set_impersonate = yes; then :
+   cat >>confdefs.h <<_ACEOF
+ #define HAVE_KRB5_GET_CREDS_OPT_SET_IMPERSONATE 1
+ _ACEOF
+@@ -70094,20 +28455,14 @@
+ fi
+ 
+ 
+-
+-
+     ac_check_func_ext_save_LIBS=$LIBS
+     LIBS="$KRB5_LIBS $LIBS"
+-        { $as_echo "$as_me:$LINENO: checking for krb5_get_creds" >&5
++        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb5_get_creds" >&5
+ $as_echo_n "checking for krb5_get_creds... " >&6; }
+-if test "${ac_cv_func_ext_krb5_get_creds+set}" = set; then
++if test "${ac_cv_func_ext_krb5_get_creds+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 krb5_get_creds to an innocuous variant, in case <limits.h> declares krb5_get_creds.
+    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+@@ -70148,43 +28503,18 @@
+   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
++if ac_fn_c_try_link "$LINENO"; then :
+   ac_cv_func_ext_krb5_get_creds=yes
+ else
+-  $as_echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	ac_cv_func_ext_krb5_get_creds=no
++  ac_cv_func_ext_krb5_get_creds=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
+-{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_ext_krb5_get_creds" >&5
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_ext_krb5_get_creds" >&5
+ $as_echo "$ac_cv_func_ext_krb5_get_creds" >&6; }
+     LIBS=$ac_check_func_ext_save_LIBS
+-    if test $ac_cv_func_ext_krb5_get_creds = yes; then
++    if test $ac_cv_func_ext_krb5_get_creds = yes; then :
+   cat >>confdefs.h <<_ACEOF
+ #define HAVE_KRB5_GET_CREDS 1
+ _ACEOF
+@@ -70192,20 +28522,14 @@
+ fi
+ 
+ 
+-
+-
+     ac_check_func_ext_save_LIBS=$LIBS
+     LIBS="$KRB5_LIBS $LIBS"
+-        { $as_echo "$as_me:$LINENO: checking for krb5_get_credentials_for_user" >&5
++        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb5_get_credentials_for_user" >&5
+ $as_echo_n "checking for krb5_get_credentials_for_user... " >&6; }
+-if test "${ac_cv_func_ext_krb5_get_credentials_for_user+set}" = set; then
++if test "${ac_cv_func_ext_krb5_get_credentials_for_user+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 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.  */
+@@ -70246,43 +28570,18 @@
+   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
++if ac_fn_c_try_link "$LINENO"; then :
+   ac_cv_func_ext_krb5_get_credentials_for_user=yes
+ else
+-  $as_echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	ac_cv_func_ext_krb5_get_credentials_for_user=no
++  ac_cv_func_ext_krb5_get_credentials_for_user=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
+-{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_ext_krb5_get_credentials_for_user" >&5
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_ext_krb5_get_credentials_for_user" >&5
+ $as_echo "$ac_cv_func_ext_krb5_get_credentials_for_user" >&6; }
+     LIBS=$ac_check_func_ext_save_LIBS
+-    if test $ac_cv_func_ext_krb5_get_credentials_for_user = yes; then
++    if test $ac_cv_func_ext_krb5_get_credentials_for_user = yes; then :
+   cat >>confdefs.h <<_ACEOF
+ #define HAVE_KRB5_GET_CREDENTIALS_FOR_USER 1
+ _ACEOF
+@@ -70290,20 +28589,14 @@
+ fi
+ 
+ 
+-
+-
+     ac_check_func_ext_save_LIBS=$LIBS
+     LIBS="$KRB5_LIBS $LIBS"
+-        { $as_echo "$as_me:$LINENO: checking for krb5_get_host_realm" >&5
++        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb5_get_host_realm" >&5
+ $as_echo_n "checking for krb5_get_host_realm... " >&6; }
+-if test "${ac_cv_func_ext_krb5_get_host_realm+set}" = set; then
++if test "${ac_cv_func_ext_krb5_get_host_realm+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 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.  */
+@@ -70344,43 +28637,18 @@
+   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
++if ac_fn_c_try_link "$LINENO"; then :
+   ac_cv_func_ext_krb5_get_host_realm=yes
+ else
+-  $as_echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	ac_cv_func_ext_krb5_get_host_realm=no
++  ac_cv_func_ext_krb5_get_host_realm=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
+-{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_ext_krb5_get_host_realm" >&5
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_ext_krb5_get_host_realm" >&5
+ $as_echo "$ac_cv_func_ext_krb5_get_host_realm" >&6; }
+     LIBS=$ac_check_func_ext_save_LIBS
+-    if test $ac_cv_func_ext_krb5_get_host_realm = yes; then
++    if test $ac_cv_func_ext_krb5_get_host_realm = yes; then :
+   cat >>confdefs.h <<_ACEOF
+ #define HAVE_KRB5_GET_HOST_REALM 1
+ _ACEOF
+@@ -70388,20 +28656,14 @@
+ fi
+ 
+ 
+-
+-
+     ac_check_func_ext_save_LIBS=$LIBS
+     LIBS="$KRB5_LIBS $LIBS"
+-        { $as_echo "$as_me:$LINENO: checking for krb5_free_host_realm" >&5
++        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb5_free_host_realm" >&5
+ $as_echo_n "checking for krb5_free_host_realm... " >&6; }
+-if test "${ac_cv_func_ext_krb5_free_host_realm+set}" = set; then
++if test "${ac_cv_func_ext_krb5_free_host_realm+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 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.  */
+@@ -70442,208 +28704,62 @@
+   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
++if ac_fn_c_try_link "$LINENO"; then :
+   ac_cv_func_ext_krb5_free_host_realm=yes
+ else
+-  $as_echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	ac_cv_func_ext_krb5_free_host_realm=no
++  ac_cv_func_ext_krb5_free_host_realm=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
+-{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_ext_krb5_free_host_realm" >&5
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_ext_krb5_free_host_realm" >&5
+ $as_echo "$ac_cv_func_ext_krb5_free_host_realm" >&6; }
+     LIBS=$ac_check_func_ext_save_LIBS
+-    if test $ac_cv_func_ext_krb5_free_host_realm = yes; then
++    if test $ac_cv_func_ext_krb5_free_host_realm = yes; then :
+   cat >>confdefs.h <<_ACEOF
+ #define HAVE_KRB5_FREE_HOST_REALM 1
+ _ACEOF
+ 
+ fi
+ 
+-
+   # MIT krb5 1.8 does not expose this call (yet)
+-  { $as_echo "$as_me:$LINENO: checking whether krb5_get_credentials_for_user is declared" >&5
+-$as_echo_n "checking whether krb5_get_credentials_for_user is declared... " >&6; }
+-if test "${ac_cv_have_decl_krb5_get_credentials_for_user+set}" = set; then
+-  $as_echo_n "(cached) " >&6
+-else
+-  cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
+-#include <krb5.h>
+-
+-int
+-main ()
+-{
+-#ifndef krb5_get_credentials_for_user
+-  (void) krb5_get_credentials_for_user;
+-#endif
+-
+-  ;
+-  return 0;
+-}
+-_ACEOF
+-rm -f conftest.$ac_objext
+-if { (ac_try="$ac_compile"
+-case "(($ac_try" in
+-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+-  *) ac_try_echo=$ac_try;;
+-esac
+-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+-$as_echo "$ac_try_echo") >&5
+-  (eval "$ac_compile") 2>conftest.er1
+-  ac_status=$?
+-  grep -v '^ *+' conftest.er1 >conftest.err
+-  rm -f conftest.er1
+-  cat conftest.err >&5
+-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); } && {
+-	 test -z "$ac_c_werror_flag" ||
+-	 test ! -s conftest.err
+-       } && test -s conftest.$ac_objext; then
+-  ac_cv_have_decl_krb5_get_credentials_for_user=yes
++  ac_fn_c_check_decl "$LINENO" "krb5_get_credentials_for_user" "ac_cv_have_decl_krb5_get_credentials_for_user" "#include <krb5.h>
++"
++if test "x$ac_cv_have_decl_krb5_get_credentials_for_user" = x""yes; then :
++  ac_have_decl=1
+ else
+-  $as_echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	ac_cv_have_decl_krb5_get_credentials_for_user=no
+-fi
+-
+-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++  ac_have_decl=0
+ fi
+-{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_krb5_get_credentials_for_user" >&5
+-$as_echo "$ac_cv_have_decl_krb5_get_credentials_for_user" >&6; }
+-if test "x$ac_cv_have_decl_krb5_get_credentials_for_user" = x""yes; then
+ 
+ cat >>confdefs.h <<_ACEOF
+-#define HAVE_DECL_KRB5_GET_CREDENTIALS_FOR_USER 1
+-_ACEOF
+-
+-
+-else
+-  cat >>confdefs.h <<_ACEOF
+-#define HAVE_DECL_KRB5_GET_CREDENTIALS_FOR_USER 0
++#define HAVE_DECL_KRB5_GET_CREDENTIALS_FOR_USER $ac_have_decl
+ _ACEOF
+ 
+ 
+-fi
+-
+-
+-
    # MIT krb5 1.7beta3 (in Ubuntu Karmic) does not have this declaration
    # but does have the symbol
 -  { $as_echo "$as_me:$LINENO: checking whether krb5_auth_con_set_req_cksumtype is declared" >&5
@@ -73795,16 +75989,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
 -
 -
@@ -73828,7 +76022,7 @@
  /* end confdefs.h.  */
  
  		#include <krb5.h>
-@@ -67696,57 +27157,30 @@
+@@ -70663,57 +28779,30 @@
    return 0;
  }
  _ACEOF
@@ -73893,7 +76087,7 @@
  /* end confdefs.h.  */
  
  		    #include <krb5.h>
-@@ -67762,58 +27196,31 @@
+@@ -70729,58 +28818,31 @@
    return 0;
  }
  _ACEOF
@@ -73959,7 +76153,7 @@
  /* end confdefs.h.  */
  
  	#include <krb5.h>
-@@ -67825,36 +27232,15 @@
+@@ -70792,36 +28854,15 @@
    return 0;
  }
  _ACEOF
@@ -73999,7 +76193,7 @@
  $as_echo "$smb_krb5_cv_verify_checksum" >&6; }
  
  cat >>confdefs.h <<_ACEOF
-@@ -67862,17 +27248,13 @@
+@@ -70829,17 +28870,13 @@
  _ACEOF
  
  
@@ -74020,7 +76214,7 @@
  /* end confdefs.h.  */
  #include <krb5.h>
  int
-@@ -67883,56 +27265,29 @@
+@@ -70850,56 +28887,29 @@
    return 0;
  }
  _ACEOF
@@ -74084,7 +76278,7 @@
  /* end confdefs.h.  */
  #include <krb5.h>
  int
-@@ -67943,56 +27298,29 @@
+@@ -70910,56 +28920,29 @@
    return 0;
  }
  _ACEOF
@@ -74148,7 +76342,7 @@
  /* end confdefs.h.  */
  #include <krb5.h>
  int
-@@ -68003,56 +27331,29 @@
+@@ -70970,56 +28953,29 @@
    return 0;
  }
  _ACEOF
@@ -74212,7 +76406,7 @@
  /* end confdefs.h.  */
  #include <krb5.h>
  int
-@@ -68063,56 +27364,29 @@
+@@ -71030,56 +28986,29 @@
    return 0;
  }
  _ACEOF
@@ -74276,7 +76470,7 @@
  /* end confdefs.h.  */
  #include <krb5.h>
  int
-@@ -68123,56 +27397,29 @@
+@@ -71090,56 +29019,29 @@
    return 0;
  }
  _ACEOF
@@ -74340,7 +76534,7 @@
  /* end confdefs.h.  */
  #include <krb5.h>
  int
-@@ -68183,56 +27430,29 @@
+@@ -71150,56 +29052,29 @@
    return 0;
  }
  _ACEOF
@@ -74404,7 +76598,7 @@
  /* end confdefs.h.  */
  #include <krb5.h>
  int
-@@ -68243,56 +27463,29 @@
+@@ -71210,56 +29085,29 @@
    return 0;
  }
  _ACEOF
@@ -74468,7 +76662,7 @@
  /* end confdefs.h.  */
  #include <krb5.h>
  int
-@@ -68303,55 +27496,28 @@
+@@ -71270,55 +29118,28 @@
    return 0;
  }
  _ACEOF
@@ -74531,7 +76725,7 @@
  /* end confdefs.h.  */
  #include <krb5.h>
  int
-@@ -68362,56 +27528,29 @@
+@@ -71329,56 +29150,29 @@
    return 0;
  }
  _ACEOF
@@ -74595,7 +76789,7 @@
  /* end confdefs.h.  */
  #include <krb5.h>
  int
-@@ -68422,56 +27561,29 @@
+@@ -71389,56 +29183,29 @@
    return 0;
  }
  _ACEOF
@@ -74659,7 +76853,7 @@
  /* end confdefs.h.  */
  #include <krb5.h>
  int
-@@ -68482,56 +27594,29 @@
+@@ -71449,56 +29216,29 @@
    return 0;
  }
  _ACEOF
@@ -74723,7 +76917,7 @@
  /* end confdefs.h.  */
  #include <krb5.h>
  int
-@@ -68542,56 +27627,29 @@
+@@ -71509,56 +29249,29 @@
    return 0;
  }
  _ACEOF
@@ -74787,7 +76981,7 @@
  /* end confdefs.h.  */
  #include <krb5.h>
  int
-@@ -68602,47 +27660,22 @@
+@@ -71569,47 +29282,22 @@
    return 0;
  }
  _ACEOF
@@ -74841,7 +77035,7 @@
  /* end confdefs.h.  */
  #include <krb5.h>
  int
-@@ -68653,58 +27686,31 @@
+@@ -71620,58 +29308,31 @@
    return 0;
  }
  _ACEOF
@@ -74907,7 +77101,7 @@
  /* end confdefs.h.  */
  #include <krb5.h>
  int
-@@ -68715,56 +27721,29 @@
+@@ -71682,56 +29343,29 @@
    return 0;
  }
  _ACEOF
@@ -74971,7 +77165,7 @@
  /* end confdefs.h.  */
  #include <krb5.h>
  int
-@@ -68775,56 +27754,29 @@
+@@ -71742,56 +29376,29 @@
    return 0;
  }
  _ACEOF
@@ -75035,7 +77229,7 @@
  /* end confdefs.h.  */
  #include <krb5.h>
  int
-@@ -68835,56 +27787,29 @@
+@@ -71802,56 +29409,29 @@
    return 0;
  }
  _ACEOF
@@ -75099,7 +77293,7 @@
  /* end confdefs.h.  */
  #include <krb5.h>
  int
-@@ -68895,56 +27820,29 @@
+@@ -71862,56 +29442,29 @@
    return 0;
  }
  _ACEOF
@@ -75163,7 +77357,7 @@
  /* end confdefs.h.  */
  #include <krb5.h>
  int
-@@ -68955,61 +27853,30 @@
+@@ -71922,61 +29475,30 @@
    return 0;
  }
  _ACEOF
@@ -75234,7 +77428,7 @@
  /* end confdefs.h.  */
  #include <krb5.h>
  int
-@@ -69020,56 +27887,29 @@
+@@ -71987,56 +29509,29 @@
    return 0;
  }
  _ACEOF
@@ -75298,7 +77492,7 @@
  /* end confdefs.h.  */
  #include <krb5.h>
  int
-@@ -69080,56 +27920,29 @@
+@@ -72047,56 +29542,29 @@
    return 0;
  }
  _ACEOF
@@ -75362,7 +77556,7 @@
  /* end confdefs.h.  */
  #include <krb5.h>
  int
-@@ -69140,65 +27953,35 @@
+@@ -72107,65 +29575,35 @@
    return 0;
  }
  _ACEOF
@@ -75439,7 +77633,7 @@
  /* end confdefs.h.  */
  
  #include<krb5.h>
-@@ -69211,65 +27994,32 @@
+@@ -72178,65 +29616,32 @@
      return krb5_kt_resolve(context, "WRFILE:api", &keytab);
    }
  _ACEOF
@@ -75497,6 +77691,70 @@
  
    fi
  
+-  { $as_echo "$as_me:$LINENO: checking for krb5_realm type" >&5
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb5_realm type" >&5
+ $as_echo_n "checking for krb5_realm type... " >&6; }
+-if test "${samba_cv_HAVE_KRB5_REALM_TYPE+set}" = set; then
++if test "${samba_cv_HAVE_KRB5_REALM_TYPE+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.  */
+ #include <krb5.h>
+ int
+@@ -72247,56 +29652,29 @@
+   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
++if ac_fn_c_try_compile "$LINENO"; then :
+   samba_cv_HAVE_KRB5_REALM_TYPE=yes
+ else
+-  $as_echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	samba_cv_HAVE_KRB5_REALM_TYPE=no
++  samba_cv_HAVE_KRB5_REALM_TYPE=no
+ fi
+-
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+-{ $as_echo "$as_me:$LINENO: result: $samba_cv_HAVE_KRB5_REALM_TYPE" >&5
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $samba_cv_HAVE_KRB5_REALM_TYPE" >&5
+ $as_echo "$samba_cv_HAVE_KRB5_REALM_TYPE" >&6; }
+ 
+   if test x"$samba_cv_HAVE_KRB5_REALM_TYPE" = x"yes"; then
+ 
+-cat >>confdefs.h <<\_ACEOF
+-#define HAVE_KRB5_REALM_TYPE 1
+-_ACEOF
++$as_echo "#define HAVE_KRB5_REALM_TYPE 1" >>confdefs.h
+ 
+   fi
+ 
 -  { $as_echo "$as_me:$LINENO: checking for krb5_princ_realm returns krb5_realm or krb5_data" >&5
 +  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb5_princ_realm returns krb5_realm or krb5_data" >&5
  $as_echo_n "checking for krb5_princ_realm returns krb5_realm or krb5_data... " >&6; }
@@ -75514,7 +77772,7 @@
  /* end confdefs.h.  */
  #include <krb5.h>
  int
-@@ -69283,56 +28033,29 @@
+@@ -72310,56 +29688,29 @@
    return 0;
  }
  _ACEOF
@@ -75578,7 +77836,7 @@
  /* end confdefs.h.  */
  #include <krb5.h>
  int
-@@ -69343,56 +28066,29 @@
+@@ -72370,56 +29721,29 @@
    return 0;
  }
  _ACEOF
@@ -75642,7 +77900,7 @@
  /* end confdefs.h.  */
  #include <krb5.h>
  int
-@@ -69404,49 +28100,26 @@
+@@ -72431,49 +29755,26 @@
    return 0;
  }
  _ACEOF
@@ -75698,7 +77956,7 @@
    $as_echo_n "(cached) " >&6
  else
  
-@@ -69460,20 +28133,13 @@
+@@ -72487,20 +29788,13 @@
  	old_LDFLAGS="$LDFLAGS";
  	LDFLAGS="$LDFLAGS";
  	export LDFLAGS;
@@ -75724,7 +77982,7 @@
  /* end confdefs.h.  */
  
  		#include <stdlib.h>
-@@ -69487,42 +28153,15 @@
+@@ -72514,42 +29808,15 @@
  		}
  
  _ACEOF
@@ -75771,7 +78029,7 @@
  	CFLAGS="$old_CFLAGS";
  	old_CFLAGS="";
  	export CFLAGS;
-@@ -69534,20 +28173,18 @@
+@@ -72561,20 +29828,18 @@
  	export LDFLAGS;
  
  fi
@@ -75796,7 +78054,7 @@
    $as_echo_n "(cached) " >&6
  else
  
-@@ -69561,20 +28198,13 @@
+@@ -72588,20 +29853,13 @@
  	old_LDFLAGS="$LDFLAGS";
  	LDFLAGS="$LDFLAGS";
  	export LDFLAGS;
@@ -75822,7 +78080,7 @@
  /* end confdefs.h.  */
  
  		#include <krb5.h>
-@@ -69585,42 +28215,15 @@
+@@ -72612,42 +29870,15 @@
  		}
  
  _ACEOF
@@ -75869,7 +78127,7 @@
  	CFLAGS="$old_CFLAGS";
  	old_CFLAGS="";
  	export CFLAGS;
-@@ -69632,29 +28235,23 @@
+@@ -72659,29 +29890,23 @@
  	export LDFLAGS;
  
  fi
@@ -75904,7 +78162,7 @@
  /* end confdefs.h.  */
  #include <krb5.h>
  int
-@@ -69665,61 +28262,30 @@
+@@ -72692,61 +29917,30 @@
    return 0;
  }
  _ACEOF
@@ -75975,7 +78233,7 @@
  /* end confdefs.h.  */
  #include <krb5.h>
  int
-@@ -69730,47 +28296,20 @@
+@@ -72757,47 +29951,20 @@
    return 0;
  }
  _ACEOF
@@ -76029,7 +78287,7 @@
  
    fi
  
-@@ -69782,7 +28321,7 @@
+@@ -72809,7 +29976,7 @@
    #
    #
    if test x"$ac_cv_lib_ext_krb5_krb5_mk_req_extended" != x"yes"; then
@@ -76038,7 +78296,7 @@
  $as_echo "$as_me: WARNING: krb5_mk_req_extended not found in -lkrb5" >&2;}
      use_ads=no
    fi
-@@ -69790,7 +28329,7 @@
+@@ -72817,7 +29984,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
@@ -76047,7 +78305,7 @@
  $as_echo "$as_me: WARNING: no CREATE_KEY_FUNCTIONS detected" >&2;}
      use_ads=no
    fi
-@@ -69798,7 +28337,7 @@
+@@ -72825,7 +29992,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
@@ -76056,7 +78314,7 @@
  $as_echo "$as_me: WARNING: no GET_ENCTYPES_FUNCTIONS detected" >&2;}
      use_ads=no
    fi
-@@ -69806,7 +28345,7 @@
+@@ -72833,7 +30000,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
@@ -76065,7 +78323,7 @@
  $as_echo "$as_me: WARNING: no KT_FREE_FUNCTION detected" >&2;}
      use_ads=no
    fi
-@@ -69814,7 +28353,7 @@
+@@ -72841,7 +30008,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
@@ -76074,7 +78332,7 @@
  $as_echo "$as_me: WARNING: no KRB5_VERIFY_CHECKSUM_FUNCTION detected" >&2;}
      use_ads=no
    fi
-@@ -69826,14 +28365,14 @@
+@@ -72853,14 +30020,14 @@
  
        if test x"$ac_cv_func_ext_free_AP_REQ" != x"yes"
        then
@@ -76091,7 +78349,7 @@
  $as_echo "$as_me: WARNING: no KRB5_AP_REQ_DECODING_FUNCTION detected" >&2;}
  	use_ads=no
        fi
-@@ -69842,29 +28381,21 @@
+@@ -72869,29 +30036,21 @@
  
    if test x"$use_ads" = x"yes"; then
  
@@ -76126,7 +78384,7 @@
  $as_echo "$as_me: WARNING: krb5 libs don't have all features required for Active Directory support" >&2;}
      fi
  
-@@ -69890,9 +28421,9 @@
+@@ -72917,9 +30076,9 @@
      KRB5_LIBS=""
      with_ads_support=no
    fi
@@ -76138,7 +78396,7 @@
  $as_echo "$use_ads" >&6; }
  
  LIBS="$ac_save_LIBS"
-@@ -69904,23 +28435,17 @@
+@@ -72931,23 +30090,17 @@
  
  
  
@@ -76165,7 +78423,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -69938,54 +28463,28 @@
+@@ -72965,54 +30118,28 @@
    return 0;
  }
  _ACEOF
@@ -76227,7 +78485,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_LIBNSCD 1
  _ACEOF
-@@ -70000,7 +28499,6 @@
+@@ -73027,7 +30154,6 @@
  
  
  fi
@@ -76235,7 +78493,7 @@
  PASSDB_LIBS="$PASSDB_LIBS $NSCD_LIBS"
  
  
-@@ -70008,12 +28506,12 @@
+@@ -73035,12 +30161,12 @@
  # Compile with DNS Updates support?
  
  with_dnsupdate_support=no
@@ -76250,7 +78508,7 @@
    withval=$with_dnsupdate;  case "$withval" in
      yes|no)
  	with_dnsupdate_support=$withval
-@@ -70022,7 +28520,7 @@
+@@ -73049,7 +30175,7 @@
  fi
  
  
@@ -76259,7 +78517,7 @@
  $as_echo "$with_dnsupdate_support" >&6; }
  
  if test x"$with_dnsupdate_support" != x"no"; then
-@@ -70036,151 +28534,12 @@
+@@ -73063,151 +30189,12 @@
    ##################################################################
    # then test for uuid.h (necessary to generate unique DNS keynames
    # (uuid.h is required for this test)
@@ -76416,7 +78674,7 @@
  _ACEOF
  
  fi
-@@ -70190,11 +28549,9 @@
+@@ -73217,11 +30204,9 @@
  
    if test x"$ac_cv_header_uuid_uuid_h" != x"yes"; then
  	if test x"$with_dnsupdate_support" = x"yes"; then
@@ -76430,7 +78688,7 @@
  $as_echo "$as_me: WARNING: uuid.h is needed to enable DNS Updates support" >&2;}
  	fi
  	with_dnsupdate_support=no
-@@ -70210,102 +28567,12 @@
+@@ -73237,102 +30222,12 @@
  
    UUID_LIBS=""
  
@@ -76538,7 +78796,7 @@
  _ACEOF
  
          # uuid_generate was found in libc or existing $LIBS
-@@ -70322,9 +28589,7 @@
+@@ -73349,9 +30244,7 @@
  
  	    with_dnsupdate_support=yes
  
@@ -76549,7 +78807,7 @@
  
  
  
-@@ -70337,11 +28602,9 @@
+@@ -73364,11 +30257,9 @@
  
  
  	    if test x"$with_dnsupdate_support" = x"yes"; then
@@ -76563,7 +78821,7 @@
  $as_echo "$as_me: WARNING: libuuid is needed to enable DNS Updates support" >&2;}
  	    fi
  	    with_dnsupdate_support=no
-@@ -70350,18 +28613,14 @@
+@@ -73377,18 +30268,14 @@
  	    ;;
            *)
  	    # uuid_generate was not found, try adding libuuid
@@ -76585,7 +78843,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -70379,43 +28638,18 @@
+@@ -73406,43 +30293,18 @@
    return 0;
  }
  _ACEOF
@@ -76635,7 +78893,7 @@
  
  		LIBS="-luuid $LIBS"
  
-@@ -70431,9 +28665,7 @@
+@@ -73458,9 +30320,7 @@
  
  	    with_dnsupdate_support=yes
  
@@ -76646,7 +78904,7 @@
  
  
  
-@@ -70443,11 +28675,9 @@
+@@ -73470,11 +30330,9 @@
  
  
  	    if test x"$with_dnsupdate_support" = x"yes"; then
@@ -76660,7 +78918,7 @@
  $as_echo "$as_me: WARNING: libuuid is needed to enable DNS Updates support" >&2;}
  	    fi
  	    with_dnsupdate_support=no
-@@ -70467,28 +28697,26 @@
+@@ -73494,28 +30352,26 @@
  
  #################################################
  # check for automount support
@@ -76695,13 +78953,13 @@
  $as_echo "no" >&6; }
  
  fi
-@@ -70499,34 +28727,30 @@
+@@ -73526,34 +30382,30 @@
  CIFSMOUNT_PROGS=""
  INSTALL_CIFSMOUNT=""
  UNINSTALL_CIFSMOUNT=""
--{ $as_echo "$as_me:$LINENO: checking whether to build mount.cifs and umount.cifs" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build mount.cifs and umount.cifs" >&5
- $as_echo_n "checking whether to build mount.cifs and umount.cifs... " >&6; }
+-{ $as_echo "$as_me:$LINENO: checking whether to build mount.cifs" >&5
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build mount.cifs" >&5
+ $as_echo_n "checking whether to build mount.cifs... " >&6; }
  
  # Check whether --with-cifsmount was given.
 -if test "${with_cifsmount+set}" = set; then
@@ -76724,7 +78982,7 @@
 -_ACEOF
 +$as_echo "#define WITH_CIFSMOUNT 1" >>confdefs.h
  
- 		CIFSMOUNT_PROGS="bin/mount.cifs bin/umount.cifs"
+ 		CIFSMOUNT_PROGS="bin/mount.cifs"
  		INSTALL_CIFSMOUNT="installcifsmount"
  		UNINSTALL_CIFSMOUNT="uninstallcifsmount"
  		;;
@@ -76736,7 +78994,7 @@
  		;;
  	esac
      ;;
-@@ -70534,19 +28758,17 @@
+@@ -73561,19 +30413,17 @@
  else
     case "$host_os" in
    *linux*)
@@ -76749,7 +79007,7 @@
 -_ACEOF
 +$as_echo "#define WITH_CIFSMOUNT 1" >>confdefs.h
  
- 	CIFSMOUNT_PROGS="bin/mount.cifs bin/umount.cifs"
+ 	CIFSMOUNT_PROGS="bin/mount.cifs"
  	INSTALL_CIFSMOUNT="installcifsmount"
  	UNINSTALL_CIFSMOUNT="uninstallcifsmount"
  	;;
@@ -76759,8 +79017,56 @@
  $as_echo "no" >&6; }
  	;;
    esac
-@@ -70556,151 +28778,12 @@
+@@ -73584,40 +30434,36 @@
+ CIFSUMOUNT_PROGS=""
+ INSTALL_CIFSUMOUNT=""
+ UNINSTALL_CIFSUMOUNT=""
+-{ $as_echo "$as_me:$LINENO: checking whether to build umount.cifs" >&5
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build umount.cifs" >&5
+ $as_echo_n "checking whether to build umount.cifs... " >&6; }
  
+ # Check whether --with-cifsumount was given.
+-if test "${with_cifsumount+set}" = set; then
++if test "${with_cifsumount+set}" = set; then :
+   withval=$with_cifsumount;  case "$withval" in
+   yes)
+ 	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; }
+ 
+-cat >>confdefs.h <<\_ACEOF
+-#define WITH_CIFSUMOUNT 1
+-_ACEOF
++$as_echo "#define WITH_CIFSUMOUNT 1" >>confdefs.h
+ 
+ 		CIFSUMOUNT_PROGS="bin/umount.cifs"
+ 		INSTALL_CIFSUMOUNT="installcifsumount"
+ 		UNINSTALL_CIFSUMOUNT="uninstallcifsumount"
+ 		;;
+ 	*)
+-		{ { $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
+ 		;;
+ 	esac
+ 	;;
+   *)
+-	{ $as_echo "$as_me:$LINENO: result: no" >&5
++	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+ $as_echo "no" >&6; }
+ 	;;
+   esac
+ else
+-  { $as_echo "$as_me:$LINENO: result: no" >&5
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+ $as_echo "no" >&6; }
+ 
+ fi
+@@ -73625,151 +30471,12 @@
+ 
  #################################################
  # check for cifs.upcall support
 -
@@ -76915,7 +79221,7 @@
  _ACEOF
   HAVE_KEYUTILS_H=1
  else
-@@ -70712,34 +28795,28 @@
+@@ -73781,34 +30488,28 @@
  CIFSUPCALL_PROGS=""
  INSTALL_CIFSUPCALL=""
  UNINSTALL_CIFSUPCALL=""
@@ -76957,7 +79263,7 @@
  
  			CIFSUPCALL_PROGS="bin/cifs.upcall"
  			INSTALL_CIFSUPCALL="installcifsupcall"
-@@ -70747,9 +28824,7 @@
+@@ -73816,9 +30517,7 @@
  		fi
  		;;
  	*)
@@ -76968,7 +79274,7 @@
  		;;
  	esac
      ;;
-@@ -70758,18 +28833,16 @@
+@@ -73827,18 +30526,16 @@
     case "$host_os" in
    *linux*)
  	if test x"$use_ads" != x"yes"; then
@@ -76991,7 +79297,7 @@
  
  		CIFSUPCALL_PROGS="bin/cifs.upcall"
  		INSTALL_CIFSUPCALL="installcifsupcall"
-@@ -70777,7 +28850,7 @@
+@@ -73846,191 +30543,53 @@
  	fi
  	;;
    *)
@@ -76999,36 +79305,46 @@
 +	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  $as_echo "no" >&6; }
  	;;
-   esac
-@@ -70794,11 +28867,11 @@
- 
- with_pam_for_crypt=no
- try_pam=no
+-  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
 -{ $as_echo "$as_me:$LINENO: checking whether to try PAM support" >&5
-+{ $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.
+-$as_echo_n "checking whether to try PAM support... " >&6; }
+-
+-# Check whether --with-pam was given.
 -if test "${with_pam+set}" = set; then
-+if test "${with_pam+set}" = set; then :
-   withval=$with_pam;  case "$withval" in
-   yes|no)
-     try_pam=$withval
-@@ -70807,7 +28880,7 @@
- 
- fi
- 
+-  withval=$with_pam;  case "$withval" in
+-  yes|no|auto)
+-    try_pam=$withval
+-    ;;
+-  esac
+-
+-fi
+-
 -{ $as_echo "$as_me:$LINENO: result: $try_pam" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $try_pam" >&5
- $as_echo "$try_pam" >&6; }
- 
- use_pam=no
-@@ -70818,150 +28891,12 @@
- 
- 	# Most systems have PAM headers in /usr/include/security, but Darwin
- 	# has them in /usr/include/pam.
+-$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`
@@ -77117,14 +79433,15 @@
 -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: )
@@ -77153,7 +79470,24 @@
 -## ---------------------------------------- ##
 -_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; }
@@ -77166,11 +79500,24 @@
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
 -$as_echo "$ac_res" >&6; }
--
--fi
++  esac
+ 
+ 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`
@@ -77180,7 +79527,7 @@
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
-@@ -70973,9 +28908,7 @@
+@@ -74042,9 +30601,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
@@ -77191,7 +79538,7 @@
  		fi
  		use_pam=no
  		create_pam_modules=no
-@@ -70983,23 +28916,17 @@
+@@ -74052,23 +30609,17 @@
  
  
  
@@ -77218,7 +79565,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -71017,54 +28944,28 @@
+@@ -74086,54 +30637,28 @@
    return 0;
  }
  _ACEOF
@@ -77280,7 +79627,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_LIBPAM 1
  _ACEOF
-@@ -71079,34 +28980,18 @@
+@@ -74148,34 +30673,18 @@
  
  
  fi
@@ -77320,7 +79667,7 @@
  		#if HAVE_SECURITY_PAM_APPL_H
  		#include <security/pam_appl.h>
  		#endif
-@@ -71114,44 +28999,9 @@
+@@ -74183,44 +30692,9 @@
  		#include <pam/pam_appl.h>
  		#endif
  
@@ -77368,7 +79715,7 @@
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
-@@ -71163,179 +29013,33 @@
+@@ -74232,179 +30706,33 @@
  	if test x"$ac_cv_header_security_pam_modules_h" = x"no" -a \
  		x"$ac_cv_header_pam_pam_modules_h" = x"no" ; then
  		if test x"${try_pam}" = x"yes";then
@@ -77558,7 +79905,7 @@
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
-@@ -71344,150 +29048,12 @@
+@@ -74413,150 +30741,12 @@
  
  done
  
@@ -77715,7 +80062,7 @@
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
-@@ -71498,19 +29064,14 @@
+@@ -74567,19 +30757,14 @@
  
  
  
@@ -77738,7 +80085,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.  */
-@@ -71551,62 +29112,36 @@
+@@ -74620,72 +30805,42 @@
    return 0;
  }
  _ACEOF
@@ -77812,10 +80159,60 @@
  $as_echo "$create_pam_modules" >&6; }
  fi # try_pam != no
  
-@@ -71615,26 +29150,22 @@
- PAM_MODULES=""
- INSTALL_PAM_MODULES=""
+ #################################################
+ # check for PAM_RADIO_TYPE
+-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(LINUX))
+@@ -74723,36 +30878,11 @@
+   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
+-
+-cat >>confdefs.h <<\_ACEOF
+-#define HAVE_PAM_RADIO_TYPE 1
+-_ACEOF
+-
+-else
+-  $as_echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
++if ac_fn_c_try_compile "$LINENO"; then :
+ 
++$as_echo "#define HAVE_PAM_RADIO_TYPE 1" >>confdefs.h
+ 
+ fi
+-
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ 
+ #################################################
+@@ -74762,19 +30892,17 @@
  UNINSTALL_PAM_MODULES=""
+ 
+ try_pam_smbpass=auto
 -{ $as_echo "$as_me:$LINENO: checking whether to use pam_smbpass" >&5
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use pam_smbpass" >&5
  $as_echo_n "checking whether to use pam_smbpass... " >&6; }
@@ -77824,42 +80221,46 @@
 -if test "${with_pam_smbpass+set}" = set; then
 +if test "${with_pam_smbpass+set}" = set; then :
    withval=$with_pam_smbpass;  case "$withval" in
-   yes)
--    { $as_echo "$as_me:$LINENO: result: yes" >&5
-+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
- $as_echo "yes" >&6; }
+   yes|no|auto)
+     try_pam_smbpass=$withval
+   ;;
+   *)
+-    { { $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
+   ;;
+   esac
  
-        # Conditions under which pam_smbpass should not be built.
- 
-        if test x"$BLDSHARED" != x"true"; then
--          { { $as_echo "$as_me:$LINENO: error: No support for shared modules" >&5
+@@ -74788,16 +30916,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
-        elif test x"$create_pam_modules" != x"yes"; then
--	  { { $as_echo "$as_me:$LINENO: error: No support for PAM MODULES" >&5
++			as_fn_error "No support for shared modules" "$LINENO" 5
+ 		fi
+ 		use_pam_smbpass=no
+ 	elif test x"$create_pam_modules" != xyes ; then
+ 		if test x"${try_pam_smbpass}" = xyes ; then
+-			{ { $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
-        else
-           PAM_MODULES="pam_smbpass"
-           INSTALL_PAM_MODULES="installpammodules"
-@@ -71642,12 +29173,12 @@
-        fi
-     ;;
-   *)
--    { $as_echo "$as_me:$LINENO: result: no" >&5
-+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
- $as_echo "no" >&6; }
-     ;;
-   esac
- else
--  { $as_echo "$as_me:$LINENO: result: no" >&5
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
- $as_echo "no" >&6; }
++			as_fn_error "No support for PAM MODULES" "$LINENO" 5
+ 		fi
+ 		use_pam_smbpass=no
+ 	fi
+@@ -74808,7 +30932,7 @@
+ 		UNINSTALL_PAM_MODULES="uninstallpammodules"
+ 	fi
+ fi
+-{ $as_echo "$as_me:$LINENO: result: $use_pam_smbpass" >&5
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $use_pam_smbpass" >&5
+ $as_echo "$use_pam_smbpass" >&6; }
  
- fi
-@@ -71661,98 +29192,63 @@
+ 
+@@ -74819,98 +30943,63 @@
  ## $with_pam_for_crypt variable as above   --jerry
  ##
  if test $with_pam_for_crypt = no; then
@@ -77974,7 +80375,7 @@
  $as_echo "no" >&6; }
  
  fi
-@@ -71760,28 +29256,26 @@
+@@ -74918,28 +31007,26 @@
  
  #################################################
  # check for syslog logging
@@ -78009,7 +80410,7 @@
  $as_echo "no" >&6; }
  
  fi
-@@ -71789,16 +29283,14 @@
+@@ -74947,16 +31034,14 @@
  
  #################################################
  # check for custom syslog facility
@@ -78029,7 +80430,7 @@
    else
       if test "$withval" != "yes" ; then
          syslog_facility="$withval"
-@@ -71823,14 +29315,14 @@
+@@ -74981,14 +31066,14 @@
  samba_cv_TRY_SYS_QUOTAS=auto
  samba_cv_SYSQUOTA_FOUND=no
  
@@ -78047,7 +80448,7 @@
  $as_echo "yes" >&6; }
      samba_cv_WITH_QUOTAS=yes
      samba_cv_TRY_QUOTAS=yes
-@@ -71839,7 +29331,7 @@
+@@ -74997,7 +31082,7 @@
      samba_cv_TRY_SYS_QUOTAS=auto
      ;;
    auto)
@@ -78056,7 +80457,7 @@
  $as_echo "auto" >&6; }
      samba_cv_WITH_QUOTAS=auto
      samba_cv_TRY_QUOTAS=auto
-@@ -71848,74 +29340,74 @@
+@@ -75006,74 +31091,74 @@
      samba_cv_TRY_SYS_QUOTAS=auto
      ;;
    no)
@@ -78144,41 +80545,40 @@
  $as_echo "no" >&6; }
              samba_cv_TRY_SYS_QUOTAS=no
  	    ;;
-@@ -71931,483 +29423,68 @@
- 	*linux*)
- 	    samba_cv_SYSQUOTA_FOUND=yes
+@@ -75084,641 +31169,87 @@
+ # 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
+-
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_QUOTACTL_LINUX 1
 -_ACEOF
-+$as_echo "#define HAVE_QUOTACTL_LINUX 1" >>confdefs.h
- 
- 	    samba_cv_sysquotas_file="lib/sysquotas_linux.c"
+-
+-	    samba_cv_sysquotas_file="lib/sysquotas_linux.c"
 -	    { $as_echo "$as_me:$LINENO: checking whether to use the lib/sysquotas_linux.c builtin support" >&5
-+	    { $as_echo "$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_n "checking whether to use the lib/sysquotas_linux.c builtin support... " >&6; }
 -	    { $as_echo "$as_me:$LINENO: result: yes" >&5
-+	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
- $as_echo "yes" >&6; }
- 
- 
+-$as_echo "yes" >&6; }
+-
+-
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_LINUX_XFS_QUOTAS 1
 -_ACEOF
-+$as_echo "#define HAVE_LINUX_XFS_QUOTAS 1" >>confdefs.h
- 
- 	    samba_cv_found_xfs_header=yes
+-
+-	    samba_cv_found_xfs_header=yes
 -	    { $as_echo "$as_me:$LINENO: checking whether to use the lib/sysquotas_xfs.c builtin support" >&5
-+	    { $as_echo "$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_n "checking whether to use the lib/sysquotas_xfs.c builtin support... " >&6; }
 -	    { $as_echo "$as_me:$LINENO: result: yes" >&5
-+	    { $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"
- 	    ;;
+-$as_echo "yes" >&6; }
+-	    ;;
+-	*solaris*)
+-	    # need to set this define when using static linking (BUG 1473)
+-	    CPPFLAGS="$CPPFLAGS -DSUNOS5"
+-	    ;;
 -	*)
 -	    ;;
 -esac
@@ -78459,9 +80859,7 @@
 -_ASBOX
 -     ) | sed "s/^/$as_me: WARNING:     /" >&2
 -    ;;
-+	*)
-+	    ;;
- esac
+-esac
 -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
 -$as_echo_n "checking for $ac_header... " >&6; }
 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
@@ -78473,7 +80871,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"'`
@@ -78481,21 +80879,14 @@
 -  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 :
- 
+-
 -fi
- 
+-
 -done
-+$as_echo "#define HAVE_ASM_TYPES_H 1" >>confdefs.h
- 
-+	    cat >> confdefs.h <<\EOF
-+#include <asm/types.h>
-+EOF
- 
+-
+-
 -# For quotas on Linux XFS filesystems
- 
+-
 -for ac_header in linux/dqblk_xfs.h
 -do
 -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
@@ -78504,7 +80895,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
@@ -78544,14 +80935,14 @@
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
- 
+-
 -	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; }
- 
+-
 -# Is the header present?
 -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
 -$as_echo_n "checking $ac_header presence... " >&6; }
@@ -78562,14 +80953,7 @@
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
 -#include <$ac_header>
-+# For quotas on Veritas VxFS filesystems
-+for ac_header in sys/fs/vx_quota.h
-+do :
-+  ac_fn_c_check_header_mongrel "$LINENO" "sys/fs/vx_quota.h" "ac_cv_header_sys_fs_vx_quota_h" "$ac_includes_default"
-+if test "x$ac_cv_header_sys_fs_vx_quota_h" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define HAVE_SYS_FS_VX_QUOTA_H 1
- _ACEOF
+-_ACEOF
 -if { (ac_try="$ac_cpp conftest.$ac_ext"
 -case "(($ac_try" in
 -  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -78591,14 +80975,23 @@
 -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
+-fi
++$as_echo "#define HAVE_QUOTACTL_LINUX 1" >>confdefs.h
  
 -rm -f conftest.err conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
 -$as_echo "$ac_header_preproc" >&6; }
-+done
++	    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
@@ -78629,7 +81022,22 @@
 -_ASBOX
 -     ) | sed "s/^/$as_me: WARNING:     /" >&2
 -    ;;
--esac
++
++$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
 -{ $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
@@ -78646,23 +81054,25 @@
 -as_val=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+# For quotas on Linux XFS filesystems
-+for ac_header in linux/dqblk_xfs.h
-+do :
-+  ac_fn_c_check_header_mongrel "$LINENO" "linux/dqblk_xfs.h" "ac_cv_header_linux_dqblk_xfs_h" "$ac_includes_default"
-+if test "x$ac_cv_header_linux_dqblk_xfs_h" = x""yes; then :
-   cat >>confdefs.h <<_ACEOF
+-  cat >>confdefs.h <<_ACEOF
 -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-+#define HAVE_LINUX_DQBLK_XFS_H 1
- _ACEOF
+-_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 :
  
- fi
-@@ -72416,151 +29493,12 @@
+-fi
  
+-done
++$as_echo "#define HAVE_ASM_TYPES_H 1" >>confdefs.h
  
- # For sys/quota.h and linux/quota.h
--
- for ac_header in sys/quota.h
++	    cat >> confdefs.h <<\EOF
++#include <asm/types.h>
++EOF
+ 
+-# For sys/quota.h and linux/quota.h
+ 
+-for ac_header in sys/quota.h
 -do
 -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
@@ -78670,7 +81080,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
@@ -78687,7 +81097,17 @@
 -/* end confdefs.h.  */
 -$ac_includes_default
 -#include <$ac_header>
--_ACEOF
++
++
++
++# For quotas on Veritas VxFS filesystems
++for ac_header in sys/fs/vx_quota.h
++do :
++  ac_fn_c_check_header_mongrel "$LINENO" "sys/fs/vx_quota.h" "ac_cv_header_sys_fs_vx_quota_h" "$ac_includes_default"
++if test "x$ac_cv_header_sys_fs_vx_quota_h" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_SYS_FS_VX_QUOTA_H 1
+ _ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -78710,14 +81130,15 @@
 -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; }
@@ -78728,7 +81149,15 @@
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
 -#include <$ac_header>
--_ACEOF
++
++# For quotas on Linux XFS filesystems
++for ac_header in linux/dqblk_xfs.h
++do :
++  ac_fn_c_check_header_mongrel "$LINENO" "linux/dqblk_xfs.h" "ac_cv_header_linux_dqblk_xfs_h" "$ac_includes_default"
++if test "x$ac_cv_header_linux_dqblk_xfs_h" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_LINUX_DQBLK_XFS_H 1
+ _ACEOF
 -if { (ac_try="$ac_cpp conftest.$ac_ext"
 -case "(($ac_try" in
 -  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -78750,14 +81179,15 @@
 -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: )
@@ -78799,11 +81229,13 @@
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
 -$as_echo "$ac_res" >&6; }
--
+ 
 -fi
 -as_val=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
++# For sys/quota.h and linux/quota.h
++for ac_header in sys/quota.h
 +do :
 +  ac_fn_c_check_header_mongrel "$LINENO" "sys/quota.h" "ac_cv_header_sys_quota_h" "$ac_includes_default"
 +if test "x$ac_cv_header_sys_quota_h" = x""yes; then :
@@ -78813,7 +81245,7 @@
  _ACEOF
  
  fi
-@@ -72570,17 +29508,13 @@
+@@ -75728,17 +31259,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
@@ -78834,7 +81266,7 @@
  /* end confdefs.h.  */
  
  #include "confdefs.h"
-@@ -72600,35 +29534,14 @@
+@@ -75758,35 +31285,14 @@
    return 0;
  }
  _ACEOF
@@ -78873,7 +81305,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
-@@ -72636,17 +29549,13 @@
+@@ -75794,17 +31300,13 @@
  fi
  
  # if we have struct dqblk .dqb_fsoftlimit instead of .dqb_isoftlimit on IRIX
@@ -78894,7 +81326,7 @@
  /* end confdefs.h.  */
  
  #include "confdefs.h"
-@@ -72664,41 +29573,18 @@
+@@ -75822,41 +31324,18 @@
    return 0;
  }
  _ACEOF
@@ -78940,7 +81372,7 @@
  
  fi
  
-@@ -72706,9 +29592,9 @@
+@@ -75864,9 +31343,9 @@
  # look for a working quota system
  
  if test x"$samba_cv_SYSQUOTA_FOUND" != x"yes"; then
@@ -78952,7 +81384,7 @@
    $as_echo_n "(cached) " >&6
  else
  
-@@ -72722,14 +29608,10 @@
+@@ -75880,14 +31359,10 @@
  	old_LDFLAGS="$LDFLAGS";
  	LDFLAGS="$LDFLAGS";
  	export LDFLAGS;
@@ -78969,7 +81401,7 @@
  /* end confdefs.h.  */
  
  #define HAVE_QUOTACTL_4A 1
-@@ -72737,42 +29619,15 @@
+@@ -75895,42 +31370,15 @@
  #include "confdefs.h"
  #include "${srcdir-.}/../tests/sysquotas.c"
  _ACEOF
@@ -79016,7 +81448,7 @@
  	CFLAGS="$old_CFLAGS";
  	old_CFLAGS="";
  	export CFLAGS;
-@@ -72784,23 +29639,21 @@
+@@ -75942,23 +31390,21 @@
  	export LDFLAGS;
  
  fi
@@ -79044,7 +81476,7 @@
    $as_echo_n "(cached) " >&6
  else
  
-@@ -72814,14 +29667,10 @@
+@@ -75972,14 +31418,10 @@
  	old_LDFLAGS="$LDFLAGS";
  	LDFLAGS="$LDFLAGS";
  	export LDFLAGS;
@@ -79061,7 +81493,7 @@
  /* end confdefs.h.  */
  
  #define HAVE_QUOTACTL_4B 1
-@@ -72829,42 +29678,15 @@
+@@ -75987,42 +31429,15 @@
  #include "confdefs.h"
  #include "${srcdir-.}/../tests/sysquotas.c"
  _ACEOF
@@ -79108,7 +81540,7 @@
  	CFLAGS="$old_CFLAGS";
  	old_CFLAGS="";
  	export CFLAGS;
-@@ -72876,24 +29698,22 @@
+@@ -76034,24 +31449,22 @@
  	export LDFLAGS;
  
  fi
@@ -79137,7 +81569,7 @@
    $as_echo_n "(cached) " >&6
  else
  
-@@ -72907,14 +29727,10 @@
+@@ -76065,14 +31478,10 @@
  	old_LDFLAGS="$LDFLAGS";
  	LDFLAGS="$LDFLAGS";
  	export LDFLAGS;
@@ -79154,7 +81586,7 @@
  /* end confdefs.h.  */
  
  #define HAVE_QUOTACTL_3 1
-@@ -72922,42 +29738,15 @@
+@@ -76080,42 +31489,15 @@
  #include "confdefs.h"
  #include "${srcdir-.}/../tests/sysquotas.c"
  _ACEOF
@@ -79201,7 +81633,7 @@
  	CFLAGS="$old_CFLAGS";
  	old_CFLAGS="";
  	export CFLAGS;
-@@ -72969,15 +29758,13 @@
+@@ -76127,15 +31509,13 @@
  	export LDFLAGS;
  
  fi
@@ -79219,7 +81651,7 @@
  
      samba_cv_sysquotas_file="lib/sysquotas_3.c"
  fi
-@@ -72985,151 +29772,12 @@
+@@ -76143,151 +31523,12 @@
  
  #################################################
  # check for mntent.h and struct mntent
@@ -79375,7 +81807,7 @@
  _ACEOF
  
  fi
-@@ -73138,102 +29786,12 @@
+@@ -76296,102 +31537,12 @@
  
  #################################################
  # check for setmntent,getmntent,endmntent
@@ -79483,7 +81915,7 @@
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
  _ACEOF
-@@ -73244,151 +29802,12 @@
+@@ -76402,151 +31553,12 @@
  
  #################################################
  # check for devnm.h and struct mntent
@@ -79639,7 +82071,7 @@
  _ACEOF
  
  fi
-@@ -73397,102 +29816,12 @@
+@@ -76555,102 +31567,12 @@
  
  #################################################
  # check for devnm
@@ -79746,7 +82178,7 @@
  _ACEOF
  
  fi
-@@ -73515,19 +29844,15 @@
+@@ -76673,19 +31595,15 @@
  fi
  
  if test x"$samba_cv_SYSQUOTA_FOUND" != x"no"; then
@@ -79769,7 +82201,7 @@
  /* end confdefs.h.  */
  
  #include "confdefs.h"
-@@ -73545,76 +29870,47 @@
+@@ -76703,76 +31621,47 @@
    return 0;
  }
  _ACEOF
@@ -79857,7 +82289,7 @@
  /* end confdefs.h.  */
  
  #include "confdefs.h"
-@@ -73632,62 +29928,35 @@
+@@ -76790,62 +31679,35 @@
    return 0;
  }
  _ACEOF
@@ -79902,9 +82334,8 @@
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_XFS_QUOTAS 1
 -_ACEOF
--
 +$as_echo "#define HAVE_XFS_QUOTAS 1" >>confdefs.h
-+
+ 
      fi
  fi
  fi
@@ -79928,7 +82359,7 @@
  /* end confdefs.h.  */
  
  #include "confdefs.h"
-@@ -73703,56 +29972,33 @@
+@@ -76861,56 +31723,33 @@
    return 0;
  }
  _ACEOF
@@ -79993,7 +82424,7 @@
  $as_echo "no" >&6; }
      fi
  fi
-@@ -73764,12 +30010,12 @@
+@@ -76922,12 +31761,12 @@
  #################################################
  # check for experimental utmp accounting
  
@@ -80008,7 +82439,7 @@
    withval=$with_utmp;  case "$withval" in
    no)
  		WITH_UTMP=no
-@@ -73792,15 +30038,13 @@
+@@ -76950,41 +31789,35 @@
  # Display test results
  
  if test x"$WITH_UTMP" = x"yes"; then
@@ -80027,328 +82458,7 @@
  $as_echo "no$utmp_no_reason" >&6; }
  fi
  
-@@ -73826,10 +30070,10 @@
- USESHARED=false
  
- 
--{ $as_echo "$as_me:$LINENO: checking whether to use shared libraries internally" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use shared libraries internally" >&5
- $as_echo_n "checking whether to use shared libraries internally... " >&6; }
- # Check whether --enable-shared-libs was given.
--if test "${enable_shared_libs+set}" = set; then
-+if test "${enable_shared_libs+set}" = set; then :
-   enableval=$enable_shared_libs; enable_shared_libs=$enableval
- else
-   enable_shared_libs=yes
-@@ -73840,11 +30084,11 @@
- 	USESHARED=$BLDSHARED
- fi
- 
--{ $as_echo "$as_me:$LINENO: result: $USESHARED" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $USESHARED" >&5
- $as_echo "$USESHARED" >&6; }
- 
- if test x"$enable_shared_libs" = x"yes" -a x"$BLDSHARED" != x"true" ; then
--	{ $as_echo "$as_me:$LINENO: WARNING: --enable-shared-libs: no support for shared libraries" >&5
-+	{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --enable-shared-libs: no support for shared libraries" >&5
- $as_echo "$as_me: WARNING: --enable-shared-libs: no support for shared libraries" >&2;}
- fi
- 
-@@ -73872,14 +30116,13 @@
- 
- 
- # Check whether --with-static-libs was given.
--if test "${with_static_libs+set}" = set; then
--  withval=$with_static_libs; if test $withval; then
-+if test "${with_static_libs+set}" = set; then :
-+  withval=$with_static_libs; if test $withval; then :
-   for lib in `echo $withval | sed -e 's/,/ /g'` ; do
- 			lib=`echo $lib | tr '[a-z]' '[A-Z]'`
- 			eval LINK_$lib=STATIC
- 		done
- fi
--
- fi
- 
- 
-@@ -73928,16 +30171,16 @@
- 
- 
- 
--{ $as_echo "$as_me:$LINENO: checking whether to build the libtalloc shared library" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build the libtalloc shared library" >&5
- $as_echo_n "checking whether to build the libtalloc shared library... " >&6; }
- 
- 
- # Check whether --with-libtalloc was given.
--if test "${with_libtalloc+set}" = set; then
-+if test "${with_libtalloc+set}" = set; then :
-   withval=$with_libtalloc;
- case "$withval" in
- 	no)
--		{ $as_echo "$as_me:$LINENO: result: no" >&5
-+		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
- $as_echo "no" >&6; }
- 		build_lib=no
- 		;;
-@@ -73963,7 +30206,7 @@
- 	if eval $BLDSHARED = true; then
- 		LIBTALLOC_SHARED=$LIBTALLOC_SHARED_TARGET
- 		LIBTALLOC_TARGET=$LIBTALLOC_SHARED_TARGET
--		{ $as_echo "$as_me:$LINENO: result: yes" >&5
-+		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
- $as_echo "yes" >&6; }
- 		if test x"$USESHARED" != x"true" -o x"$LINK_LIBTALLOC" = "xSTATIC" ; then
- 			enable_static=yes
-@@ -73976,12 +30219,12 @@
- 		enable_static=yes
- 		LIBTALLOC_TARGET=$LIBTALLOC_STATIC_TARGET
- 		LIBTALLOC_LIBS=$LIBTALLOC_STATIC_TARGET
--		{ $as_echo "$as_me:$LINENO: result: no shared library support -- will supply static library" >&5
-+		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no shared library support -- will supply static library" >&5
- $as_echo "no shared library support -- will supply static library" >&6; }
- 	fi
- else
- 	enable_static=yes
--	{ $as_echo "$as_me:$LINENO: result: shared library not selected" >&5
-+	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: shared library not selected" >&5
- $as_echo "shared library not selected" >&6; }
- fi
- if test $enable_static = yes; then
-@@ -74032,16 +30275,16 @@
- 
- 
- 
--{ $as_echo "$as_me:$LINENO: checking whether to build the libtdb shared library" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build the libtdb shared library" >&5
- $as_echo_n "checking whether to build the libtdb shared library... " >&6; }
- 
- 
- # Check whether --with-libtdb was given.
--if test "${with_libtdb+set}" = set; then
-+if test "${with_libtdb+set}" = set; then :
-   withval=$with_libtdb;
- case "$withval" in
- 	no)
--		{ $as_echo "$as_me:$LINENO: result: no" >&5
-+		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
- $as_echo "no" >&6; }
- 		build_lib=no
- 		;;
-@@ -74067,7 +30310,7 @@
- 	if eval $BLDSHARED = true; then
- 		LIBTDB_SHARED=$LIBTDB_SHARED_TARGET
- 		LIBTDB_TARGET=$LIBTDB_SHARED_TARGET
--		{ $as_echo "$as_me:$LINENO: result: yes" >&5
-+		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
- $as_echo "yes" >&6; }
- 		if test x"$USESHARED" != x"true" -o x"$LINK_LIBTDB" = "xSTATIC" ; then
- 			enable_static=yes
-@@ -74080,12 +30323,12 @@
- 		enable_static=yes
- 		LIBTDB_TARGET=$LIBTDB_STATIC_TARGET
- 		LIBTDB_LIBS=$LIBTDB_STATIC_TARGET
--		{ $as_echo "$as_me:$LINENO: result: no shared library support -- will supply static library" >&5
-+		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no shared library support -- will supply static library" >&5
- $as_echo "no shared library support -- will supply static library" >&6; }
- 	fi
- else
- 	enable_static=yes
--	{ $as_echo "$as_me:$LINENO: result: shared library not selected" >&5
-+	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: shared library not selected" >&5
- $as_echo "shared library not selected" >&6; }
- fi
- if test $enable_static = yes; then
-@@ -74123,16 +30366,16 @@
- 
- 
- 
--{ $as_echo "$as_me:$LINENO: checking whether to build the libnetapi shared library" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build the libnetapi shared library" >&5
- $as_echo_n "checking whether to build the libnetapi shared library... " >&6; }
- 
- 
- # Check whether --with-libnetapi was given.
--if test "${with_libnetapi+set}" = set; then
-+if test "${with_libnetapi+set}" = set; then :
-   withval=$with_libnetapi;
- case "$withval" in
- 	no)
--		{ $as_echo "$as_me:$LINENO: result: no" >&5
-+		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
- $as_echo "no" >&6; }
- 		build_lib=no
- 		;;
-@@ -74158,7 +30401,7 @@
- 	if eval $BLDSHARED = true; then
- 		LIBNETAPI_SHARED=$LIBNETAPI_SHARED_TARGET
- 		LIBNETAPI_TARGET=$LIBNETAPI_SHARED_TARGET
--		{ $as_echo "$as_me:$LINENO: result: yes" >&5
-+		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
- $as_echo "yes" >&6; }
- 		if test x"$USESHARED" != x"true" -o x"$LINK_LIBNETAPI" = "xSTATIC" ; then
- 			enable_static=yes
-@@ -74171,12 +30414,12 @@
- 		enable_static=yes
- 		LIBNETAPI_TARGET=$LIBNETAPI_STATIC_TARGET
- 		LIBNETAPI_LIBS=$LIBNETAPI_STATIC_TARGET
--		{ $as_echo "$as_me:$LINENO: result: no shared library support -- will supply static library" >&5
-+		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no shared library support -- will supply static library" >&5
- $as_echo "no shared library support -- will supply static library" >&6; }
- 	fi
- else
- 	enable_static=yes
--	{ $as_echo "$as_me:$LINENO: result: shared library not selected" >&5
-+	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: shared library not selected" >&5
- $as_echo "shared library not selected" >&6; }
- fi
- if test $enable_static = yes; then
-@@ -74214,16 +30457,16 @@
- 
- 
- 
--{ $as_echo "$as_me:$LINENO: checking whether to build the libsmbclient shared library" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build the libsmbclient shared library" >&5
- $as_echo_n "checking whether to build the libsmbclient shared library... " >&6; }
- 
- 
- # Check whether --with-libsmbclient was given.
--if test "${with_libsmbclient+set}" = set; then
-+if test "${with_libsmbclient+set}" = set; then :
-   withval=$with_libsmbclient;
- case "$withval" in
- 	no)
--		{ $as_echo "$as_me:$LINENO: result: no" >&5
-+		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
- $as_echo "no" >&6; }
- 		build_lib=no
- 		;;
-@@ -74249,7 +30492,7 @@
- 	if eval $BLDSHARED = true; then
- 		LIBSMBCLIENT_SHARED=$LIBSMBCLIENT_SHARED_TARGET
- 		LIBSMBCLIENT_TARGET=$LIBSMBCLIENT_SHARED_TARGET
--		{ $as_echo "$as_me:$LINENO: result: yes" >&5
-+		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
- $as_echo "yes" >&6; }
- 		if test x"$USESHARED" != x"true" -o x"$LINK_LIBSMBCLIENT" = "xSTATIC" ; then
- 			enable_static=yes
-@@ -74262,12 +30505,12 @@
- 		enable_static=yes
- 		LIBSMBCLIENT_TARGET=$LIBSMBCLIENT_STATIC_TARGET
- 		LIBSMBCLIENT_LIBS=$LIBSMBCLIENT_STATIC_TARGET
--		{ $as_echo "$as_me:$LINENO: result: no shared library support -- will supply static library" >&5
-+		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no shared library support -- will supply static library" >&5
- $as_echo "no shared library support -- will supply static library" >&6; }
- 	fi
- else
- 	enable_static=yes
--	{ $as_echo "$as_me:$LINENO: result: shared library not selected" >&5
-+	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: shared library not selected" >&5
- $as_echo "shared library not selected" >&6; }
- fi
- if test $enable_static = yes; then
-@@ -74305,16 +30548,16 @@
- 
- 
- 
--{ $as_echo "$as_me:$LINENO: checking whether to build the libsmbsharemodes shared library" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build the libsmbsharemodes shared library" >&5
- $as_echo_n "checking whether to build the libsmbsharemodes shared library... " >&6; }
- 
- 
- # Check whether --with-libsmbsharemodes was given.
--if test "${with_libsmbsharemodes+set}" = set; then
-+if test "${with_libsmbsharemodes+set}" = set; then :
-   withval=$with_libsmbsharemodes;
- case "$withval" in
- 	no)
--		{ $as_echo "$as_me:$LINENO: result: no" >&5
-+		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
- $as_echo "no" >&6; }
- 		build_lib=no
- 		;;
-@@ -74340,7 +30583,7 @@
- 	if eval $BLDSHARED = true; then
- 		LIBSMBSHAREMODES_SHARED=$LIBSMBSHAREMODES_SHARED_TARGET
- 		LIBSMBSHAREMODES_TARGET=$LIBSMBSHAREMODES_SHARED_TARGET
--		{ $as_echo "$as_me:$LINENO: result: yes" >&5
-+		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
- $as_echo "yes" >&6; }
- 		if test x"$USESHARED" != x"true" -o x"$LINK_LIBSMBSHAREMODES" = "xSTATIC" ; then
- 			enable_static=yes
-@@ -74353,12 +30596,12 @@
- 		enable_static=yes
- 		LIBSMBSHAREMODES_TARGET=$LIBSMBSHAREMODES_STATIC_TARGET
- 		LIBSMBSHAREMODES_LIBS=$LIBSMBSHAREMODES_STATIC_TARGET
--		{ $as_echo "$as_me:$LINENO: result: no shared library support -- will supply static library" >&5
-+		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no shared library support -- will supply static library" >&5
- $as_echo "no shared library support -- will supply static library" >&6; }
- 	fi
- else
- 	enable_static=yes
--	{ $as_echo "$as_me:$LINENO: result: shared library not selected" >&5
-+	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: shared library not selected" >&5
- $as_echo "shared library not selected" >&6; }
- fi
- if test $enable_static = yes; then
-@@ -74396,19 +30639,19 @@
- 
- 
- 
--{ $as_echo "$as_me:$LINENO: checking whether to build the libaddns shared library" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build the libaddns shared library" >&5
- $as_echo_n "checking whether to build the libaddns shared library... " >&6; }
- 
- 
- # Check whether --with-libaddns was given.
--if test "${with_libaddns+set}" = set; then
-+if test "${with_libaddns+set}" = set; then :
-   withval=$with_libaddns;
- case "$withval" in
- 	yes)
- 		build_lib=yes
- 		;;
- 	*)
--		{ $as_echo "$as_me:$LINENO: result: yes" >&5
-+		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
- $as_echo "yes" >&6; }
- 		build_lib=no
- 		;;
-@@ -74417,7 +30660,7 @@
- else
- 
- # if unspecified, default is not to build
--{ $as_echo "$as_me:$LINENO: result: yes" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
- $as_echo "yes" >&6; }
- build_lib=no
- 
-@@ -74433,7 +30676,7 @@
- 	if eval $BLDSHARED = true; then
- 		LIBADDNS_SHARED=$LIBADDNS_SHARED_TARGET
- 		LIBADDNS_TARGET=$LIBADDNS_SHARED_TARGET
--		{ $as_echo "$as_me:$LINENO: result: yes" >&5
-+		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
- $as_echo "yes" >&6; }
- 		if test x"$USESHARED" != x"true" -o x"$LINK_LIBADDNS" = "xSTATIC" ; then
- 			enable_static=yes
-@@ -74446,12 +30689,12 @@
- 		enable_static=yes
- 		LIBADDNS_TARGET=$LIBADDNS_STATIC_TARGET
- 		LIBADDNS_LIBS=$LIBADDNS_STATIC_TARGET
--		{ $as_echo "$as_me:$LINENO: result: no shared library support -- will supply static library" >&5
-+		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no shared library support -- will supply static library" >&5
- $as_echo "no shared library support -- will supply static library" >&6; }
- 	fi
- else
- 	enable_static=yes
--	{ $as_echo "$as_me:$LINENO: result: shared library not selected" >&5
-+	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: shared library not selected" >&5
- $as_echo "shared library not selected" >&6; }
- fi
- if test $enable_static = yes; then
-@@ -74467,26 +30710,22 @@
- 
  #################################################
  # these tests are taken from the GNU fileutils package
 -{ $as_echo "$as_me:$LINENO: checking how to get filesystem space usage..." >&5
@@ -80379,7 +82489,7 @@
  /* end confdefs.h.  */
  
  #if defined(HAVE_UNISTD_H)
-@@ -74500,51 +30739,22 @@
+@@ -76998,51 +31831,22 @@
      exit (statvfs64 (".", &fsd));
    }
  _ACEOF
@@ -80407,13 +82517,14 @@
 -  (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
@@ -80437,7 +82548,7 @@
  
    fi
  fi
-@@ -74557,16 +30767,12 @@
+@@ -77055,16 +31859,12 @@
  # is what it gets when this test fails.
  if test $space = no; then
    # SVR4
@@ -80457,7 +82568,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <sys/statvfs.h>
-@@ -74578,47 +30784,20 @@
+@@ -77076,47 +31876,20 @@
    return 0;
  }
  _ACEOF
@@ -80511,7 +82622,7 @@
  
    fi
  fi
-@@ -74626,17 +30805,13 @@
+@@ -77124,17 +31897,13 @@
  # smbd/statvfs.c assumes that statvfs.f_fsid is an integer.
  # This is not the case on ancient Linux systems.
  
@@ -80532,7 +82643,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <sys/statvfs.h>
-@@ -74648,57 +30823,30 @@
+@@ -77146,57 +31915,30 @@
    return 0;
  }
  _ACEOF
@@ -80597,7 +82708,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <sys/statvfs.h>
-@@ -74710,56 +30858,29 @@
+@@ -77208,56 +31950,29 @@
    return 0;
  }
  _ACEOF
@@ -80661,7 +82772,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <sys/statvfs.h>
-@@ -74771,55 +30892,28 @@
+@@ -77269,55 +31984,28 @@
    return 0;
  }
  _ACEOF
@@ -80724,7 +82835,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <sys/statvfs.h>
-@@ -74831,59 +30925,32 @@
+@@ -77329,59 +32017,32 @@
    return 0;
  }
  _ACEOF
@@ -80792,7 +82903,7 @@
  /* end confdefs.h.  */
  
  #include <sys/param.h>
-@@ -74896,71 +30963,38 @@
+@@ -77394,71 +32055,38 @@
      exit (statfs (".", &fsd, sizeof (struct statfs)));
    }
  _ACEOF
@@ -80874,7 +82985,7 @@
  /* end confdefs.h.  */
  
  #ifdef HAVE_SYS_PARAM_H
-@@ -74979,71 +31013,38 @@
+@@ -77477,71 +32105,38 @@
    exit (statfs (".", &fsd));
    }
  _ACEOF
@@ -80956,7 +83067,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <sys/statfs.h>
-@@ -75053,71 +31054,38 @@
+@@ -77551,71 +32146,38 @@
    exit (statfs (".", &fsd, sizeof fsd, 0));
    }
  _ACEOF
@@ -81038,7 +83149,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #ifdef HAVE_SYS_PARAM_H
-@@ -75133,71 +31101,38 @@
+@@ -77631,71 +32193,38 @@
    exit (statfs (".", &fsd));
    }
  _ACEOF
@@ -81120,7 +83231,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #ifdef HAVE_SYS_PARAM_H
-@@ -75217,52 +31152,23 @@
+@@ -77715,52 +32244,23 @@
    exit (statfs (".", &fsd) != 1);
    }
  _ACEOF
@@ -81179,7 +83290,7 @@
  
    fi
  fi
-@@ -75275,13 +31181,9 @@
+@@ -77773,13 +32273,9 @@
  # If we don't have all of these then disable large
  # file support.
  #
@@ -81195,7 +83306,7 @@
  /* end confdefs.h.  */
  
  #if defined(HAVE_LONGLONG) && (defined(HAVE_OFF64_T) || (defined(SIZEOF_OFF_T) && (SIZEOF_OFF_T == 8)))
-@@ -75298,41 +31200,18 @@
+@@ -77796,41 +32292,18 @@
    return 0;
  }
  _ACEOF
@@ -81241,7 +83352,7 @@
  $as_echo "$samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT" >&6; }
  
  #################################################
-@@ -75342,10 +31221,10 @@
+@@ -77840,10 +32313,10 @@
  
  
  # Check whether --with-ctdb was given.
@@ -81254,8 +83365,8 @@
  $as_echo "$as_me: WARNING: --with-ctdb called without argument" >&2;}
      ;;
    *)
-@@ -75359,471 +31238,40 @@
- CPPFLAGS="$CPPFLAGS $CTDB_CPPFLAGS"
+@@ -77857,71 +32330,23 @@
+ CPPFLAGS="$CPPFLAGS ${SAMBA_CONFIGURE_CPPFLAGS} $CTDB_CPPFLAGS"
  ctdb_broken="missing or broken headers"
  
 -
@@ -81334,46 +83445,33 @@
 +eval as_val=\$$as_ac_Header
 +   if test "x$as_val" = x""yes; then :
    cat >>confdefs.h <<_ACEOF
--#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
--_ACEOF
--
--fi
--
--done
--
--
--
-- { $as_echo "$as_me:$LINENO: checking for CTDB_CONTROL_TRANS2_COMMIT_RETRY declaration" >&5
--$as_echo_n "checking for CTDB_CONTROL_TRANS2_COMMIT_RETRY declaration... " >&6; }
--if test "${ac_cv_have_CTDB_CONTROL_TRANS2_COMMIT_RETRY_decl+set}" = set; then
--  $as_echo_n "(cached) " >&6
--else
--
+ #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+ _ACEOF
+@@ -77932,17 +32357,13 @@
+ 
+ 
+ 
+- { $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; }
+-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
+ 
 -    cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_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_TRANS2_COMMIT_RETRY
--  ;
--  return 0;
--}
--_ACEOF
++    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ 
+ #include "confdefs.h"
+@@ -77963,41 +32384,18 @@
+   return 0;
+ }
+ _ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -81392,33 +83490,34 @@
 -	 test -z "$ac_c_werror_flag" ||
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
--  ac_cv_have_CTDB_CONTROL_TRANS2_COMMIT_RETRY_decl=yes
--else
++if ac_fn_c_try_compile "$LINENO"; then :
+   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_TRANS2_COMMIT_RETRY_decl=no
--fi
+-	ac_cv_have_CTDB_CONTROL_TRANS3_COMMIT_decl=no
++  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:$LINENO: result: $ac_cv_have_CTDB_CONTROL_TRANS2_COMMIT_RETRY_decl" >&5
--$as_echo "$ac_cv_have_CTDB_CONTROL_TRANS2_COMMIT_RETRY_decl" >&6; }
-- if test x"$ac_cv_have_CTDB_CONTROL_TRANS2_COMMIT_RETRY_decl" = x"yes"; then
--
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ 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
+ 
 -cat >>confdefs.h <<\_ACEOF
--#define HAVE_CTDB_CONTROL_TRANS2_COMMIT_RETRY_DECL 1
+-#define HAVE_CTDB_CONTROL_TRANS3_COMMIT_DECL 1
 -_ACEOF
--
-- fi
--
--if test x"$ac_cv_have_CTDB_CONTROL_TRANS2_COMMIT_RETRY_decl" = x"yes"; then
--	ctdb_broken=no
--else
--	ctdb_broken="missing transaction support"
--fi
--
--# in ctdb 1.0.57 ctdb_control_tcp was temparary renamed to ctdb_tcp_client
++$as_echo "#define HAVE_CTDB_CONTROL_TRANS3_COMMIT_DECL 1" >>confdefs.h
+ 
+  fi
+ 
+@@ -78008,255 +32406,43 @@
+ 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
@@ -81478,16 +83577,21 @@
 -/* end confdefs.h.  */
 -
 -#include "confdefs.h"
--#define NO_CONFIG_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
 -#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 \"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 ()
 -{
@@ -81536,16 +83640,19 @@
 -{ $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
--
--
--fi
--
--
++$as_echo "#define ctdb_control_tcp ctdb_tcp_client" >>confdefs.h
+ 
+ 
+ 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
@@ -81605,16 +83712,21 @@
 -/* end confdefs.h.  */
 -
 -#include "confdefs.h"
--#define NO_CONFIG_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
 -#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 \"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 ()
 -{
@@ -81663,20 +83775,21 @@
 -{ $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 :
+ 
+ 
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_STRUCT_CTDB_CONTROL_TCP 1
 -_ACEOF
--
--
--else
--
--	ctdb_broken="missing struct ctdb_control_tcp"
--
--fi
--
--
++$as_echo "#define HAVE_STRUCT_CTDB_CONTROL_TCP 1" >>confdefs.h
+ 
+ 
+ else
+@@ -78266,139 +32452,33 @@
+ fi
+ 
+ 
 -{ $as_echo "$as_me:$LINENO: checking for struct ctdb_control_tcp_addr" >&5
 -$as_echo_n "checking for struct ctdb_control_tcp_addr... " >&6; }
 -if test "${ac_cv_type_struct_ctdb_control_tcp_addr+set}" = set; then
@@ -81730,42 +83843,36 @@
 -       } && test -s conftest.$ac_objext; then
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
-+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
- _ACEOF
+-_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+
-+fi
-+
-+done
-+
-+
-+
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CTDB_CONTROL_TRANS2_COMMIT_RETRY declaration" >&5
-+$as_echo_n "checking for CTDB_CONTROL_TRANS2_COMMIT_RETRY declaration... " >&6; }
-+if test "${ac_cv_have_CTDB_CONTROL_TRANS2_COMMIT_RETRY_decl+set}" = set; then :
-+  $as_echo_n "(cached) " >&6
-+else
-+
-+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
- 
- #include "confdefs.h"
-@@ -75836,71 +31284,109 @@
+-/* end confdefs.h.  */
+-
+-#include "confdefs.h"
++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 \"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;
-+int i = (int)CTDB_CONTROL_TRANS2_COMMIT_RETRY
-   ;
-   return 0;
- }
- _ACEOF
+-  ;
+-  return 0;
+-}
+-_ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -81785,103 +83892,33 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  :
-+if ac_fn_c_try_compile "$LINENO"; then :
-+  ac_cv_have_CTDB_CONTROL_TRANS2_COMMIT_RETRY_decl=yes
- else
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	ac_cv_type_struct_ctdb_control_tcp_addr=yes
-+  ac_cv_have_CTDB_CONTROL_TRANS2_COMMIT_RETRY_decl=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_have_CTDB_CONTROL_TRANS2_COMMIT_RETRY_decl" >&5
-+$as_echo "$ac_cv_have_CTDB_CONTROL_TRANS2_COMMIT_RETRY_decl" >&6; }
-+ if test x"$ac_cv_have_CTDB_CONTROL_TRANS2_COMMIT_RETRY_decl" = x"yes"; then
-+
-+$as_echo "#define HAVE_CTDB_CONTROL_TRANS2_COMMIT_RETRY_DECL 1" >>confdefs.h
-+
-+ fi
-+
-+if test x"$ac_cv_have_CTDB_CONTROL_TRANS2_COMMIT_RETRY_decl" = x"yes"; then
-+	ctdb_broken=no
- else
+-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
-+	ctdb_broken="missing transaction support"
-+fi
-+
-+# in ctdb 1.0.57 ctdb_control_tcp was temparary renamed to ctdb_tcp_client
-+ac_fn_c_check_type "$LINENO" "struct ctdb_tcp_client" "ac_cv_type_struct_ctdb_tcp_client" "
-+#include \"confdefs.h\"
-+#define NO_CONFIG_H
-+#include \"replace.h\"
-+#include \"system/wait.h\"
-+#include \"system/network.h\"
-+#include <talloc.h>
-+#include <tdb.h>
-+#include <ctdb.h>
-+#include <ctdb_private.h>
-+
-+"
-+if test "x$ac_cv_type_struct_ctdb_tcp_client" = x""yes; then :
-+
-+
-+$as_echo "#define ctdb_control_tcp ctdb_tcp_client" >>confdefs.h
- 
- 
- fi
- 
+-
+-
+-fi
+-
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-+
-+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
-+
-+	ctdb_broken="missing struct ctdb_control_tcp"
-+
- fi
+-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
++"
++if test "x$ac_cv_type_struct_ctdb_control_tcp_addr" = x""yes; then :
  
  
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_STRUCT_CTDB_CONTROL_TCP_ADDR 1
 -_ACEOF
-+ac_fn_c_check_type "$LINENO" "struct ctdb_control_tcp_addr" "ac_cv_type_struct_ctdb_control_tcp_addr" "
-+#include \"confdefs.h\"
-+#define NO_CONFIG_H
-+#include \"replace.h\"
-+#include \"system/wait.h\"
-+#include \"system/network.h\"
-+#include <talloc.h>
-+#include <tdb.h>
-+#include <ctdb.h>
-+#include <ctdb_private.h>
-+
-+"
-+if test "x$ac_cv_type_struct_ctdb_control_tcp_addr" = x""yes; then :
-+
-+
 +$as_echo "#define HAVE_STRUCT_CTDB_CONTROL_TCP_ADDR 1" >>confdefs.h
  
  
@@ -81899,7 +83936,7 @@
    withval=$with_cluster_support;
  fi
  
-@@ -75911,44 +31397,38 @@
+@@ -78409,44 +32489,38 @@
  
  if test x"$ac_cv_header_ctdb_private_h" != x"yes"; then
  	if test "x$with_cluster_support" = "xyes"; then
@@ -81951,7 +83988,7 @@
    withval=$with_acl_support;  case "$withval" in
  	yes|no)
  		with_acl_support="$withval"
-@@ -75961,105 +31441,85 @@
+@@ -78459,105 +32533,85 @@
  	with_acl_support="auto"
  fi
  
@@ -82078,7 +84115,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -76077,60 +31537,31 @@
+@@ -78575,60 +32629,31 @@
    return 0;
  }
  _ACEOF
@@ -82148,7 +84185,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -76148,61 +31579,32 @@
+@@ -78646,61 +32671,32 @@
    return 0;
  }
  _ACEOF
@@ -82219,7 +84256,7 @@
  /* end confdefs.h.  */
  
  				#include <sys/types.h>
-@@ -76221,64 +31623,33 @@
+@@ -78719,64 +32715,33 @@
    return 0;
  }
  _ACEOF
@@ -82294,7 +84331,7 @@
  /* end confdefs.h.  */
  
  					#include <sys/types.h>
-@@ -76296,58 +31667,29 @@
+@@ -78794,58 +32759,29 @@
    return 0;
  }
  _ACEOF
@@ -82361,7 +84398,7 @@
  
  		fi
  		;;
-@@ -76359,31 +31701,27 @@
+@@ -78857,31 +32793,27 @@
  #################################################
  # check for AIO support
  
@@ -82399,7 +84436,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -76401,58 +31739,29 @@
+@@ -78899,58 +32831,29 @@
    return 0;
  }
  _ACEOF
@@ -82467,7 +84504,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -76470,59 +31779,30 @@
+@@ -78968,59 +32871,30 @@
    return 0;
  }
  _ACEOF
@@ -82536,7 +84573,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <aio.h>
-@@ -76534,55 +31814,26 @@
+@@ -79032,55 +32906,26 @@
    return 0;
  }
  _ACEOF
@@ -82600,7 +84637,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <aio.h>
-@@ -76594,716 +31845,317 @@
+@@ -79092,716 +32937,317 @@
    return 0;
  }
  _ACEOF
@@ -83455,7 +85492,7 @@
  $as_echo "no" >&6; }
  
  fi
-@@ -77320,30 +32172,26 @@
+@@ -79818,30 +33264,26 @@
  # check for sendfile support
  
  with_sendfile_support=yes
@@ -83492,7 +85529,7 @@
  /* end confdefs.h.  */
  #include <sys/sendfile.h>
  int
-@@ -77359,53 +32207,24 @@
+@@ -79857,53 +33299,24 @@
    return 0;
  }
  _ACEOF
@@ -83554,7 +85591,7 @@
  /* end confdefs.h.  */
  #include <sys/sendfile.h>
  int
-@@ -77421,54 +32240,25 @@
+@@ -79919,54 +33332,25 @@
    return 0;
  }
  _ACEOF
@@ -83617,7 +85654,7 @@
  /* end confdefs.h.  */
  \
  #if defined(_FILE_OFFSET_BITS) && (_FILE_OFFSET_BITS == 64)
-@@ -77488,103 +32278,58 @@
+@@ -79986,103 +33370,58 @@
    return 0;
  }
  _ACEOF
@@ -83738,19 +85775,10 @@
  /* end confdefs.h.  */
  \
  #include <sys/types.h>
-@@ -77602,85 +32347,50 @@
- 	hdr.headers = &hdtrl;
- 	hdr.hdr_cnt = 1;
- 	hdr.trailers = NULL;
--	hdr.trl_cnt = 0;
--	hdtrl.iov_base = NULL;
--	hdtrl.iov_len = 0;
--	ret = sendfile(fromfd, tofd, offset, total, &hdr, &nwritten, 0);
--
--  ;
--  return 0;
--}
--_ACEOF
+@@ -80109,76 +33448,41 @@
+   return 0;
+ }
+ _ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -83772,15 +85800,6 @@
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
-+	hdr.trl_cnt = 0;
-+	hdtrl.iov_base = NULL;
-+	hdtrl.iov_len = 0;
-+	ret = sendfile(fromfd, tofd, offset, total, &hdr, &nwritten, 0);
-+
-+  ;
-+  return 0;
-+}
-+_ACEOF
 +if ac_fn_c_try_link "$LINENO"; then :
    samba_cv_HAVE_SENDFILE=yes
  else
@@ -83845,7 +85864,7 @@
  /* end confdefs.h.  */
  \
  #include <sys/socket.h>
-@@ -77704,73 +32414,38 @@
+@@ -80202,73 +33506,38 @@
    return 0;
  }
  _ACEOF
@@ -83931,7 +85950,7 @@
  /* end confdefs.h.  */
  \
  #include <sys/socket.h>
-@@ -77794,77 +32469,41 @@
+@@ -80292,77 +33561,41 @@
    return 0;
  }
  _ACEOF
@@ -84021,7 +86040,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -77882,43 +32521,18 @@
+@@ -80380,43 +33613,18 @@
    return 0;
  }
  _ACEOF
@@ -84071,7 +86090,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_LIBSENDFILE 1
  _ACEOF
-@@ -77927,17 +32541,13 @@
+@@ -80425,17 +33633,13 @@
  
  fi
  
@@ -84092,7 +86111,7 @@
  /* end confdefs.h.  */
  \
  #include <sys/sendfile.h>
-@@ -77968,74 +32578,39 @@
+@@ -80466,74 +33670,39 @@
    return 0;
  }
  _ACEOF
@@ -84179,7 +86198,7 @@
  /* end confdefs.h.  */
  \
  #include <sys/sendfile.h>
-@@ -78066,75 +32641,40 @@
+@@ -80564,75 +33733,40 @@
    return 0;
  }
  _ACEOF
@@ -84267,7 +86286,7 @@
  /* end confdefs.h.  */
  \
  #include <sys/socket.h>
-@@ -78162,59 +32702,28 @@
+@@ -80660,59 +33794,28 @@
    return 0;
  }
  _ACEOF
@@ -84336,7 +86355,7 @@
  $as_echo "no" >&6; };
  	fi
  	;;
-@@ -78223,12 +32732,12 @@
+@@ -80721,12 +33824,12 @@
          esac
          ;;
    *)
@@ -84351,7 +86370,7 @@
  $as_echo "yes" >&6; }
  
  fi
-@@ -78237,17 +32746,13 @@
+@@ -80735,17 +33838,13 @@
  ############################################
  # See if we have the Linux readahead syscall.
  
@@ -84372,7 +86391,7 @@
  /* end confdefs.h.  */
  
  #if defined(HAVE_UNISTD_H)
-@@ -78262,62 +32767,31 @@
+@@ -80760,62 +33859,31 @@
    return 0;
  }
  _ACEOF
@@ -84444,7 +86463,7 @@
  /* end confdefs.h.  */
  #include <fcntl.h>
  int
-@@ -78328,41 +32802,18 @@
+@@ -80826,41 +33894,18 @@
    return 0;
  }
  _ACEOF
@@ -84490,7 +86509,7 @@
  
   fi
  
-@@ -78370,17 +32821,13 @@
+@@ -80868,17 +33913,13 @@
  ############################################
  # See if we have the posix_fadvise syscall.
  
@@ -84511,7 +86530,7 @@
  /* end confdefs.h.  */
  
  #if defined(HAVE_UNISTD_H)
-@@ -78395,47 +32842,20 @@
+@@ -80893,47 +33934,20 @@
    return 0;
  }
  _ACEOF
@@ -84538,11 +86557,12 @@
 -       }; 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
 -
@@ -84565,7 +86585,7 @@
  
  fi
  
-@@ -78444,17 +32864,13 @@
+@@ -80942,17 +33956,13 @@
  
  case "$host_os" in
  *linux*)
@@ -84586,7 +86606,7 @@
  /* end confdefs.h.  */
  
  #if defined(HAVE_UNISTD_H)
-@@ -78469,40 +32885,15 @@
+@@ -80967,40 +33977,15 @@
    return 0;
  }
  _ACEOF
@@ -84632,7 +86652,7 @@
  $as_echo "$samba_cv_HAVE_LINUX_SPLICE" >&6; }
  ;;
  *)
-@@ -78512,24 +32903,18 @@
+@@ -81010,24 +33995,18 @@
  
  if test x"$samba_cv_HAVE_LINUX_SPLICE" = x"yes"; then
  
@@ -84661,7 +86681,7 @@
  /* end confdefs.h.  */
  #include <fcntl.h>
  int
-@@ -78540,41 +32925,18 @@
+@@ -81038,41 +34017,18 @@
    return 0;
  }
  _ACEOF
@@ -84707,7 +86727,7 @@
  
   fi
  
-@@ -78582,68 +32944,35 @@
+@@ -81080,68 +34036,35 @@
  ############################################
  # See if we have the a broken readlink syscall.
  
@@ -84786,7 +86806,7 @@
  
  fi
  
-@@ -78651,7 +32980,7 @@
+@@ -81149,7 +34072,7 @@
  # Check whether winbind is supported on this platform.  If so we need to
  # build and install client programs, sbin programs and shared libraries
  
@@ -84795,7 +86815,7 @@
  $as_echo_n "checking whether to build winbind... " >&6; }
  
  # Initially, the value of $host_os decides whether winbind is supported
-@@ -78663,7 +32992,7 @@
+@@ -81161,7 +34084,7 @@
  # We define this here so --with-winbind can override it.
  
  # Check whether --with-wbclient was given.
@@ -84804,7 +86824,7 @@
    withval=$with_wbclient;
    case "$withval" in
          no)
-@@ -78764,7 +33093,7 @@
+@@ -81259,7 +34182,7 @@
  
  
  # Check whether --with-winbind was given.
@@ -84813,7 +86833,7 @@
    withval=$with_winbind;
    case "$withval" in
  	yes)
-@@ -78795,18 +33124,14 @@
+@@ -81290,18 +34213,14 @@
  	WINBIND_WINS_NSS=""
  fi
  if test x"$HAVE_WBCLIENT" = x"yes"; then
@@ -84835,7 +86855,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -78824,57 +33149,28 @@
+@@ -81319,57 +34238,28 @@
    return 0;
  }
  _ACEOF
@@ -84902,7 +86922,7 @@
  
  	EXTRA_BIN_PROGS="$EXTRA_BIN_PROGS bin/wbinfo\$(EXEEXT)"
  else
-@@ -78905,12 +33201,10 @@
+@@ -81398,12 +34288,10 @@
  fi
  
  if test x"$HAVE_WINBIND" = x"yes"; then
@@ -84917,7 +86937,7 @@
  
  
  	EXTRA_BIN_PROGS="$EXTRA_BIN_PROGS bin/wbinfo\$(EXEEXT)"
-@@ -78921,22 +33215,18 @@
+@@ -81414,7 +34302,7 @@
  		UNINSTALL_PAM_MODULES="uninstallpammodules"
  	fi
  else
@@ -84926,83 +86946,9 @@
  $as_echo "no$winbind_no_reason" >&6; }
  fi
  
--{ $as_echo "$as_me:$LINENO: checking for pthread_mutex_lock in -lpthread" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_mutex_lock in -lpthread" >&5
- $as_echo_n "checking for pthread_mutex_lock in -lpthread... " >&6; }
--if test "${ac_cv_lib_pthread_pthread_mutex_lock+set}" = set; then
-+if test "${ac_cv_lib_pthread_pthread_mutex_lock+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
-   ac_check_lib_save_LIBS=$LIBS
- LIBS="-lpthread  $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.  */
+@@ -81427,108 +34315,11 @@
  
- /* Override any GCC internal prototype to avoid an error.
-@@ -78954,48 +33244,21 @@
-   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
-+if ac_fn_c_try_link "$LINENO"; then :
-   ac_cv_lib_pthread_pthread_mutex_lock=yes
- else
--  $as_echo "$as_me: failed program was:" >&5
--sed 's/^/| /' conftest.$ac_ext >&5
--
--	ac_cv_lib_pthread_pthread_mutex_lock=no
-+  ac_cv_lib_pthread_pthread_mutex_lock=no
- fi
--
--rm -rf conftest.dSYM
--rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
--      conftest$ac_exeext conftest.$ac_ext
-+rm -f core conftest.err conftest.$ac_objext \
-+    conftest$ac_exeext conftest.$ac_ext
- LIBS=$ac_check_lib_save_LIBS
- fi
--{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_mutex_lock" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_mutex_lock" >&5
- $as_echo "$ac_cv_lib_pthread_pthread_mutex_lock" >&6; }
--if test "x$ac_cv_lib_pthread_pthread_mutex_lock" = x""yes; then
-+if test "x$ac_cv_lib_pthread_pthread_mutex_lock" = x""yes; then :
-   WINBIND_NSS_PTHREAD="-lpthread"
  
--cat >>confdefs.h <<\_ACEOF
--#define HAVE_PTHREAD 1
--_ACEOF
-+$as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
- 
- fi
- 
-@@ -79012,533 +33275,52 @@
- 
- 
  # Solaris 10 does have new member in nss_XbyY_key
 -{ $as_echo "$as_me:$LINENO: checking for union nss_XbyY_key.ipnode.af_family" >&5
 -$as_echo_n "checking for union nss_XbyY_key.ipnode.af_family... " >&6; }
@@ -85102,17 +87048,21 @@
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_union_nss_XbyY_key_ipnode_af_family" >&5
 -$as_echo "$ac_cv_member_union_nss_XbyY_key_ipnode_af_family" >&6; }
 -if test "x$ac_cv_member_union_nss_XbyY_key_ipnode_af_family" = x""yes; then
--
++ac_fn_c_check_member "$LINENO" "union nss_XbyY_key" "ipnode.af_family" "ac_cv_member_union_nss_XbyY_key_ipnode_af_family" "#include <nss_dbdefs.h>
++"
++if test "x$ac_cv_member_union_nss_XbyY_key_ipnode_af_family" = x""yes; then :
+ 
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_NSS_XBYY_KEY_IPNODE 1
 -_ACEOF
--
--fi
--
--
--# Solaris has some extra fields in struct passwd that need to be
--# initialised otherwise nscd crashes.
--
++$as_echo "#define HAVE_NSS_XBYY_KEY_IPNODE 1" >>confdefs.h
+ 
+ fi
+ 
+@@ -81536,318 +34327,29 @@
+ # Solaris has some extra fields in struct passwd that need to be
+ # initialised otherwise nscd crashes.
+ 
 -{ $as_echo "$as_me:$LINENO: checking for struct passwd.pw_comment" >&5
 -$as_echo_n "checking for struct passwd.pw_comment... " >&6; }
 -if test "${ac_cv_member_struct_passwd_pw_comment+set}" = set; then
@@ -85272,7 +87222,10 @@
 -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 ()
 -{
@@ -85305,28 +87258,33 @@
 -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
--
--fi
--
--
--# AIX 4.3.x and 5.1 do not have as many members in
--# struct secmethod_table as AIX 5.2
++$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
 -{ $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
@@ -85425,17 +87383,16 @@
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_secmethod_table_method_attrlist" >&5
 -$as_echo "$ac_cv_member_struct_secmethod_table_method_attrlist" >&6; }
 -if test "x$ac_cv_member_struct_secmethod_table_method_attrlist" = x""yes; then
--
--cat >>confdefs.h <<_ACEOF
--#define HAVE_STRUCT_SECMETHOD_TABLE_METHOD_ATTRLIST 1
--_ACEOF
--
--
--fi
-+ac_fn_c_check_member "$LINENO" "union nss_XbyY_key" "ipnode.af_family" "ac_cv_member_union_nss_XbyY_key_ipnode_af_family" "#include <nss_dbdefs.h>
++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_union_nss_XbyY_key_ipnode_af_family" = x""yes; then :
++if test "x$ac_cv_member_struct_secmethod_table_method_attrlist" = x""yes; then :
  
+ cat >>confdefs.h <<_ACEOF
+ #define HAVE_STRUCT_SECMETHOD_TABLE_METHOD_ATTRLIST 1
+@@ -81856,104 +34358,9 @@
+ 
+ fi
+ 
 -{ $as_echo "$as_me:$LINENO: checking for struct secmethod_table.method_version" >&5
 -$as_echo_n "checking for struct secmethod_table.method_version... " >&6; }
 -if test "${ac_cv_member_struct_secmethod_table_method_version+set}" = set; then
@@ -85448,8 +87405,7 @@
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
 -#include <usersec.h>
-+$as_echo "#define HAVE_NSS_XBYY_KEY_IPNODE 1" >>confdefs.h
- 
+-
 -int
 -main ()
 -{
@@ -85482,8 +87438,7 @@
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+fi
- 
+-
 -	cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
@@ -85491,7 +87446,7 @@
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
 -#include <usersec.h>
- 
+-
 -int
 -main ()
 -{
@@ -85524,53 +87479,25 @@
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+# Solaris has some extra fields in struct passwd that need to be
-+# initialised otherwise nscd crashes.
-+
-+ac_fn_c_check_member "$LINENO" "struct passwd" "pw_comment" "ac_cv_member_struct_passwd_pw_comment" "#include <pwd.h>
-+"
-+if test "x$ac_cv_member_struct_passwd_pw_comment" = x""yes; then :
-+
-+$as_echo "#define HAVE_PASSWD_PW_COMMENT 1" >>confdefs.h
- 
+-
 -	ac_cv_member_struct_secmethod_table_method_version=no
- fi
- 
+-fi
+-
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-+
-+ac_fn_c_check_member "$LINENO" "struct passwd" "pw_age" "ac_cv_member_struct_passwd_pw_age" "#include <pwd.h>
-+"
-+if test "x$ac_cv_member_struct_passwd_pw_age" = x""yes; then :
-+
-+$as_echo "#define HAVE_PASSWD_PW_AGE 1" >>confdefs.h
-+
- fi
- 
+-fi
+-
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-+
-+# AIX 4.3.x and 5.1 do not have as many members in
-+# struct secmethod_table as AIX 5.2
-+ac_fn_c_check_member "$LINENO" "struct secmethod_table" "method_attrlist" "ac_cv_member_struct_secmethod_table_method_attrlist" "#include <usersec.h>
-+"
-+if test "x$ac_cv_member_struct_secmethod_table_method_attrlist" = x""yes; then :
-+
-+cat >>confdefs.h <<_ACEOF
-+#define HAVE_STRUCT_SECMETHOD_TABLE_METHOD_ATTRLIST 1
-+_ACEOF
-+
-+
- fi
+-fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_secmethod_table_method_version" >&5
 -$as_echo "$ac_cv_member_struct_secmethod_table_method_version" >&6; }
 -if test "x$ac_cv_member_struct_secmethod_table_method_version" = x""yes; then
-+
 +ac_fn_c_check_member "$LINENO" "struct secmethod_table" "method_version" "ac_cv_member_struct_secmethod_table_method_version" "#include <usersec.h>
 +"
 +if test "x$ac_cv_member_struct_secmethod_table_method_version" = x""yes; then :
  
  cat >>confdefs.h <<_ACEOF
  #define HAVE_STRUCT_SECMETHOD_TABLE_METHOD_VERSION 1
-@@ -79548,17 +33330,13 @@
+@@ -81963,17 +34370,13 @@
  fi
  
  
@@ -85591,7 +87518,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <sys/socket.h>
-@@ -79573,41 +33351,18 @@
+@@ -81988,41 +34391,18 @@
    return 0;
  }
  _ACEOF
@@ -85637,7 +87564,7 @@
  
  fi
  
-@@ -79617,7 +33372,7 @@
+@@ -82032,7 +34412,7 @@
  
  
  # Check whether --with-included-popt was given.
@@ -85646,7 +87573,7 @@
    withval=$with_included_popt;
    case "$withval" in
  	yes)
-@@ -79630,18 +33385,14 @@
+@@ -82045,18 +34425,14 @@
  fi
  
  if test x"$INCLUDED_POPT" != x"yes"; then
@@ -85668,7 +87595,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -79659,43 +33410,18 @@
+@@ -82074,43 +34450,18 @@
    return 0;
  }
  _ACEOF
@@ -85718,7 +87645,7 @@
    INCLUDED_POPT=no
  else
    INCLUDED_POPT=yes
-@@ -79703,16 +33429,16 @@
+@@ -82118,16 +34469,16 @@
  
  fi
  
@@ -85738,7 +87665,7 @@
  $as_echo "no" >&6; }
  	BUILD_POPT=""
      POPTLIBS="-lpopt"
-@@ -79725,7 +33451,7 @@
+@@ -82140,7 +34491,7 @@
  # Check if user wants DNS service discovery support
  
  # Check whether --enable-dnssd was given.
@@ -85747,7 +87674,7 @@
    enableval=$enable_dnssd;
  fi
  
-@@ -79734,151 +33460,12 @@
+@@ -82149,151 +34500,12 @@
  if test x"$enable_dnssd" = x"yes"; then
      have_dnssd_support=yes
  
@@ -85904,7 +87831,7 @@
  _ACEOF
  
  fi
-@@ -79891,102 +33478,12 @@
+@@ -82306,102 +34518,12 @@
  
      # On Darwin the DNSSD API is in libc, but on other platforms it's
      # probably in -ldns_sd
@@ -86012,7 +87939,7 @@
  _ACEOF
  
  fi
-@@ -79994,23 +33491,17 @@
+@@ -82409,23 +34531,17 @@
  
  
  
@@ -86039,10 +87966,15 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -80028,54 +33519,28 @@
-   return 0;
- }
- _ACEOF
+@@ -82438,59 +34554,33 @@
+ int
+ main ()
+ {
+-return DNSServiceRegister ();
+-  ;
+-  return 0;
+-}
+-_ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -86064,6 +87996,11 @@
 -	 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
@@ -86101,7 +88038,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_LIBDNS_SD 1
  _ACEOF
-@@ -80090,7 +33555,6 @@
+@@ -82505,7 +34595,6 @@
  
  
  fi
@@ -86109,7 +88046,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
-@@ -80098,15 +33562,11 @@
+@@ -82513,15 +34602,11 @@
  
      if test x"$have_dnssd_support" = x"yes"; then
  
@@ -86127,7 +88064,7 @@
  	fi
      fi
  
-@@ -80116,7 +33576,7 @@
+@@ -82531,7 +34616,7 @@
  # Check if user wants avahi support
  
  # Check whether --enable-avahi was given.
@@ -86136,7 +88073,7 @@
    enableval=$enable_avahi;
  fi
  
-@@ -80124,151 +33584,12 @@
+@@ -82539,151 +34624,12 @@
  if test x"$enable_avahi" != x"no"; then
      have_avahi_support=yes
  
@@ -86293,7 +88230,7 @@
  _ACEOF
  
  fi
-@@ -80279,151 +33600,12 @@
+@@ -82694,151 +34640,12 @@
  	have_avahi_support=no
      fi
  
@@ -86450,7 +88387,7 @@
  _ACEOF
  
  fi
-@@ -80435,18 +33617,14 @@
+@@ -82850,18 +34657,14 @@
      fi
  
      save_LIBS="$LIBS"
@@ -86472,7 +88409,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -80464,58 +33642,29 @@
+@@ -82879,58 +34682,29 @@
    return 0;
  }
  _ACEOF
@@ -86540,7 +88477,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -80533,43 +33682,18 @@
+@@ -82948,43 +34722,18 @@
    return 0;
  }
  _ACEOF
@@ -86590,7 +88527,7 @@
    have_avahi_strerror=yes
  fi
  
-@@ -80584,17 +33708,13 @@
+@@ -82999,17 +34748,13 @@
          AVAHI_LIBS="-lavahi-client -lavahi-common"
  
  
@@ -86610,16 +88547,595 @@
  	fi
      fi
  fi
-@@ -80604,7 +33724,7 @@
+@@ -83024,18 +34769,14 @@
+ # If it's error, then the user didn't
+ # define it.
+ if test "x$PTHREAD_LDFLAGS" = xerror; then
+-  { $as_echo "$as_me:$LINENO: checking for pthread_attr_init in -lpthread" >&5
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_attr_init in -lpthread" >&5
+ $as_echo_n "checking for pthread_attr_init in -lpthread... " >&6; }
+-if test "${ac_cv_lib_pthread_pthread_attr_init+set}" = set; then
++if test "${ac_cv_lib_pthread_pthread_attr_init+set}" = set; then :
+   $as_echo_n "(cached) " >&6
+ else
+   ac_check_lib_save_LIBS=$LIBS
+ LIBS="-lpthread  $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.  */
  
+ /* Override any GCC internal prototype to avoid an error.
+@@ -83053,43 +34794,18 @@
+   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
++if ac_fn_c_try_link "$LINENO"; then :
+   ac_cv_lib_pthread_pthread_attr_init=yes
+ else
+-  $as_echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	ac_cv_lib_pthread_pthread_attr_init=no
++  ac_cv_lib_pthread_pthread_attr_init=no
+ fi
+-
+-rm -rf conftest.dSYM
+-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+-      conftest$ac_exeext conftest.$ac_ext
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
+ LIBS=$ac_check_lib_save_LIBS
+ fi
+-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_attr_init" >&5
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_attr_init" >&5
+ $as_echo "$ac_cv_lib_pthread_pthread_attr_init" >&6; }
+-if test "x$ac_cv_lib_pthread_pthread_attr_init" = x""yes; then
++if test "x$ac_cv_lib_pthread_pthread_attr_init" = x""yes; then :
  
+ 	     PTHREAD_CFLAGS="-D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS"
+ 	     PTHREAD_LDFLAGS="-lpthread"
+@@ -83098,18 +34814,14 @@
+ fi
+ 
+ if test "x$PTHREAD_LDFLAGS" = xerror; then
+-  { $as_echo "$as_me:$LINENO: checking for pthread_attr_init in -lpthreads" >&5
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_attr_init in -lpthreads" >&5
+ $as_echo_n "checking for pthread_attr_init in -lpthreads... " >&6; }
+-if test "${ac_cv_lib_pthreads_pthread_attr_init+set}" = set; then
++if test "${ac_cv_lib_pthreads_pthread_attr_init+set}" = set; then :
+   $as_echo_n "(cached) " >&6
+ else
+   ac_check_lib_save_LIBS=$LIBS
+ LIBS="-lpthreads  $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.  */
+ 
+ /* Override any GCC internal prototype to avoid an error.
+@@ -83127,43 +34839,18 @@
+   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
++if ac_fn_c_try_link "$LINENO"; then :
+   ac_cv_lib_pthreads_pthread_attr_init=yes
+ else
+-  $as_echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	ac_cv_lib_pthreads_pthread_attr_init=no
++  ac_cv_lib_pthreads_pthread_attr_init=no
+ fi
+-
+-rm -rf conftest.dSYM
+-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+-      conftest$ac_exeext conftest.$ac_ext
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
+ LIBS=$ac_check_lib_save_LIBS
+ fi
+-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_attr_init" >&5
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_attr_init" >&5
+ $as_echo "$ac_cv_lib_pthreads_pthread_attr_init" >&6; }
+-if test "x$ac_cv_lib_pthreads_pthread_attr_init" = x""yes; then
++if test "x$ac_cv_lib_pthreads_pthread_attr_init" = x""yes; then :
+ 
+ 	     PTHREAD_CFLAGS="-D_THREAD_SAFE"
+ 	     PTHREAD_LDFLAGS="-lpthreads"
+@@ -83172,18 +34859,14 @@
+ fi
+ 
+ if test "x$PTHREAD_LDFLAGS" = xerror; then
+-   { $as_echo "$as_me:$LINENO: checking for pthread_attr_init in -lc_r" >&5
++   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_attr_init in -lc_r" >&5
+ $as_echo_n "checking for pthread_attr_init in -lc_r... " >&6; }
+-if test "${ac_cv_lib_c_r_pthread_attr_init+set}" = set; then
++if test "${ac_cv_lib_c_r_pthread_attr_init+set}" = set; then :
+   $as_echo_n "(cached) " >&6
+ else
+   ac_check_lib_save_LIBS=$LIBS
+ LIBS="-lc_r  $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.  */
+ 
+ /* Override any GCC internal prototype to avoid an error.
+@@ -83201,43 +34884,18 @@
+   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
++if ac_fn_c_try_link "$LINENO"; then :
+   ac_cv_lib_c_r_pthread_attr_init=yes
+ else
+-  $as_echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	ac_cv_lib_c_r_pthread_attr_init=no
++  ac_cv_lib_c_r_pthread_attr_init=no
+ fi
+-
+-rm -rf conftest.dSYM
+-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+-      conftest$ac_exeext conftest.$ac_ext
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
+ LIBS=$ac_check_lib_save_LIBS
+ fi
+-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_attr_init" >&5
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_attr_init" >&5
+ $as_echo "$ac_cv_lib_c_r_pthread_attr_init" >&6; }
+-if test "x$ac_cv_lib_c_r_pthread_attr_init" = x""yes; then
++if test "x$ac_cv_lib_c_r_pthread_attr_init" = x""yes; then :
+ 
+ 		PTHREAD_CFLAGS="-D_THREAD_SAFE -pthread"
+ 		PTHREAD_LDFLAGS="-pthread"
+@@ -83246,92 +34904,8 @@
+ fi
+ 
+ if test "x$PTHREAD_LDFLAGS" = xerror; then
+-   { $as_echo "$as_me:$LINENO: checking for pthread_attr_init" >&5
+-$as_echo_n "checking for pthread_attr_init... " >&6; }
+-if test "${ac_cv_func_pthread_attr_init+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 pthread_attr_init to an innocuous variant, in case <limits.h> declares pthread_attr_init.
+-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+-#define pthread_attr_init innocuous_pthread_attr_init
+-
+-/* System header to define __stub macros and hopefully few prototypes,
+-    which can conflict with char pthread_attr_init (); below.
+-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+-    <limits.h> exists even on freestanding compilers.  */
+-
+-#ifdef __STDC__
+-# include <limits.h>
+-#else
+-# include <assert.h>
+-#endif
+-
+-#undef pthread_attr_init
+-
+-/* 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 pthread_attr_init ();
+-/* The GNU C library defines this for functions which it implements
+-    to always fail with ENOSYS.  Some functions are actually named
+-    something starting with __ and the normal name is an alias.  */
+-#if defined __stub_pthread_attr_init || defined __stub___pthread_attr_init
+-choke me
+-#endif
+-
+-int
+-main ()
+-{
+-return pthread_attr_init ();
+-  ;
+-  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_func_pthread_attr_init=yes
+-else
+-  $as_echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	ac_cv_func_pthread_attr_init=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_func_pthread_attr_init" >&5
+-$as_echo "$ac_cv_func_pthread_attr_init" >&6; }
+-if test "x$ac_cv_func_pthread_attr_init" = x""yes; then
++   ac_fn_c_check_func "$LINENO" "pthread_attr_init" "ac_cv_func_pthread_attr_init"
++if test "x$ac_cv_func_pthread_attr_init" = x""yes; then :
+ 
+ 		 PTHREAD_CFLAGS="-D_REENTRANT"
+ 		 PTHREAD_LDFLAGS="-lpthread"
+@@ -83342,18 +34916,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
+-   { $as_echo "$as_me:$LINENO: checking for pthread_mutex_lock in -lpthread" >&5
++   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_mutex_lock in -lpthread" >&5
+ $as_echo_n "checking for pthread_mutex_lock in -lpthread... " >&6; }
+-if test "${ac_cv_lib_pthread_pthread_mutex_lock+set}" = set; then
++if test "${ac_cv_lib_pthread_pthread_mutex_lock+set}" = set; then :
+   $as_echo_n "(cached) " >&6
+ else
+   ac_check_lib_save_LIBS=$LIBS
+ LIBS="-lpthread  $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.  */
+ 
+ /* Override any GCC internal prototype to avoid an error.
+@@ -83371,43 +34941,18 @@
+   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
++if ac_fn_c_try_link "$LINENO"; then :
+   ac_cv_lib_pthread_pthread_mutex_lock=yes
+ else
+-  $as_echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	ac_cv_lib_pthread_pthread_mutex_lock=no
++  ac_cv_lib_pthread_pthread_mutex_lock=no
+ fi
+-
+-rm -rf conftest.dSYM
+-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+-      conftest$ac_exeext conftest.$ac_ext
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
+ LIBS=$ac_check_lib_save_LIBS
+ fi
+-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_mutex_lock" >&5
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_mutex_lock" >&5
+ $as_echo "$ac_cv_lib_pthread_pthread_mutex_lock" >&6; }
+-if test "x$ac_cv_lib_pthread_pthread_mutex_lock" = x""yes; then
++if test "x$ac_cv_lib_pthread_pthread_mutex_lock" = x""yes; then :
+ 
+ 		PTHREAD_CFLAGS="-D_REENTRANT"
+ 		PTHREAD_LDFLAGS="-lpthread"
+@@ -83426,151 +34971,12 @@
+ 	CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+ 	ac_save_LDFLAGS=$LDFLAGS
+ 	LDFLAGS="$LDFLAGS $PTHREAD_LDFLAGS"
+-
+-for ac_header in pthread.h
+-do
+-as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+-  { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+-$as_echo_n "checking for $ac_header... " >&6; }
+-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+-  $as_echo_n "(cached) " >&6
+-fi
+-ac_res=`eval 'as_val=${'$as_ac_Header'}
+-		 $as_echo "$as_val"'`
+-	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+-$as_echo "$ac_res" >&6; }
+-else
+-  # Is the header compilable?
+-{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
+-$as_echo_n "checking $ac_header usability... " >&6; }
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
+-$ac_includes_default
+-#include <$ac_header>
+-_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_header_compiler=yes
+-else
+-  $as_echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	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; }
+-
+-# 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
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
+-#include <$ac_header>
+-_ACEOF
+-if { (ac_try="$ac_cpp conftest.$ac_ext"
+-case "(($ac_try" in
+-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+-  *) ac_try_echo=$ac_try;;
+-esac
+-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+-$as_echo "$ac_try_echo") >&5
+-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+-  ac_status=$?
+-  grep -v '^ *+' conftest.er1 >conftest.err
+-  rm -f conftest.er1
+-  cat conftest.err >&5
+-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); } >/dev/null && {
+-	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+-	 test ! -s conftest.err
+-       }; then
+-  ac_header_preproc=yes
+-else
+-  $as_echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-  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; }
+-
+-# So?  What about this header?
+-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+-  yes:no: )
+-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+-$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+-$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+-    ac_header_preproc=yes
+-    ;;
+-  no:yes:* )
+-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+-$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+-$as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+-$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+-$as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+-$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+-$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+-    ( cat <<\_ASBOX
+-## ---------------------------------------- ##
+-## Report this to samba-technical at samba.org ##
+-## ---------------------------------------- ##
+-_ASBOX
+-     ) | sed "s/^/$as_me: WARNING:     /" >&2
+-    ;;
+-esac
+-{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+-$as_echo_n "checking for $ac_header... " >&6; }
+-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+-  $as_echo_n "(cached) " >&6
+-else
+-  eval "$as_ac_Header=\$ac_header_preproc"
+-fi
+-ac_res=`eval 'as_val=${'$as_ac_Header'}
+-		 $as_echo "$as_val"'`
+-	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+-$as_echo "$ac_res" >&6; }
+-
+-fi
+-as_val=`eval 'as_val=${'$as_ac_Header'}
+-		 $as_echo "$as_val"'`
+-   if test "x$as_val" = x""yes; then
++	for ac_header in pthread.h
++do :
++  ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
++if test "x$ac_cv_header_pthread_h" = x""yes; then :
+   cat >>confdefs.h <<_ACEOF
+-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
++#define HAVE_PTHREAD_H 1
+ _ACEOF
+ 
+ fi
+@@ -83580,9 +34986,7 @@
+ 	CFLAGS=$ac_save_CFLAGS
+ 	LDFLAGS=$ac_save_LDFLAGS
+ 
+-cat >>confdefs.h <<\_ACEOF
+-#define HAVE_PTHREAD 1
+-_ACEOF
++$as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
+ 
+ fi
+ 
+@@ -83590,24 +34994,20 @@
+ # Check if user wants pthreadpool support
+ 
+ # Check whether --enable-pthreadpool was given.
+-if test "${enable_pthreadpool+set}" = set; then
++if test "${enable_pthreadpool+set}" = set; then :
+   enableval=$enable_pthreadpool;
+ fi
+ 
+ 
+ if test x"$enable_pthreadpool" = xyes -a x"$samba_cv_HAVE_PTHREAD" != x"yes"; then
+-	{ { $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
+ fi
+ 
+ if test x"$enable_pthreadpool" = x"yes" -a x"$samba_cv_HAVE_PTHREAD" = x"yes"; then
+     LIBS="$LIBS $PTHREAD_LDFLAGS"
+     CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+ 
+-cat >>confdefs.h <<\_ACEOF
+-#define WITH_PTHREADPOOL 1
+-_ACEOF
++$as_echo "#define WITH_PTHREADPOOL 1" >>confdefs.h
+ 
+     PTHREADPOOL_OBJ="lib/pthreadpool.o"
+ 
+@@ -83618,7 +35018,7 @@
+ 
+ 
  # Check whether --with-included-iniparser was given.
 -if test "${with_included_iniparser+set}" = set; then
 +if test "${with_included_iniparser+set}" = set; then :
    withval=$with_included_iniparser;
    case "$withval" in
  	yes)
-@@ -80617,18 +33737,14 @@
+@@ -83631,18 +35031,14 @@
  fi
  
  if test x"$INCLUDED_INIPARSER" != x"yes"; then
@@ -86641,7 +89157,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -80646,43 +33762,18 @@
+@@ -83660,43 +35056,18 @@
    return 0;
  }
  _ACEOF
@@ -86691,7 +89207,7 @@
    INCLUDED_INIPARSER=no
  else
    INCLUDED_INIPARSER=yes
-@@ -80690,260 +33781,40 @@
+@@ -83704,260 +35075,40 @@
  
  fi
  
@@ -86703,12 +89219,11 @@
 +    { $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 "$as_me:${as_lineno-$LINENO}: result: no" >&5
- $as_echo "no" >&6; }
+-$as_echo "no" >&6; }
 -	BUILD_INIPARSER=""
 -    INIPARSERLIBS="-liniparser"
 -fi
@@ -86898,14 +89413,12 @@
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -  ac_header_preproc=no
-+	BUILD_INIPARSER=""
-+    INIPARSERLIBS="-liniparser"
- 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: )
@@ -86940,9 +89453,15 @@
 -$as_echo_n "checking for $ac_header... " >&6; }
 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
 -  $as_echo_n "(cached) " >&6
--else
++	INIPARSERLIBS=""
++    FLAGS1="$FLAGS1 -I\$(srcdir)/iniparser/src"
+ else
 -  eval "$as_ac_Header=\$ac_header_preproc"
--fi
++    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++	BUILD_INIPARSER=""
++    INIPARSERLIBS="-liniparser"
+ fi
 -ac_res=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
@@ -86951,6 +89470,8 @@
 +
 +
 +
++
++
 +# Checks for the vfs_fileid module
 +# Start
 +ac_fn_c_check_func "$LINENO" "getmntent" "ac_cv_func_getmntent"
@@ -86972,7 +89493,7 @@
  _ACEOF
  
  fi
-@@ -80951,20 +33822,16 @@
+@@ -83965,20 +35116,16 @@
  done
  
  
@@ -86997,7 +89518,7 @@
  /* end confdefs.h.  */
  
  		#include <sys/types.h>
-@@ -80976,46 +33843,19 @@
+@@ -83990,46 +35137,19 @@
  			return statfs (".", &fsd);
  		}
  _ACEOF
@@ -87049,7 +89570,7 @@
  $as_echo "$vfsfileid_cv_statfs" >&6; }
  
  if test x"$ac_cv_func_getmntent" = x"yes" -a \
-@@ -81050,7 +33890,7 @@
+@@ -84064,7 +35184,7 @@
  
  
  # Check whether --with-static-modules was given.
@@ -87058,7 +89579,7 @@
    withval=$with_static_modules;  if test $withval; then
  	for i in `echo $withval | sed -e 's/,/ /g'`
  	do
-@@ -81062,7 +33902,7 @@
+@@ -84076,7 +35196,7 @@
  
  
  # Check whether --with-shared-modules was given.
@@ -87067,16 +89588,16 @@
    withval=$with_shared_modules;  if test $withval; then
  	for i in `echo $withval | sed -e 's/,/ /g'`
  	do
-@@ -81073,7 +33913,7 @@
+@@ -84093,7 +35213,7 @@
+ fi
  
  
- 
 -	{ $as_echo "$as_me:$LINENO: checking how to build pdb_ldap" >&5
 +	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to build pdb_ldap" >&5
  $as_echo_n "checking how to build pdb_ldap... " >&6; }
  	if test "$MODULE_pdb_ldap"; then
  		DEST=$MODULE_pdb_ldap
-@@ -81085,12 +33925,10 @@
+@@ -84105,12 +35225,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -87091,7 +89612,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules pdb_ldap"
-@@ -81101,16 +33939,16 @@
+@@ -84121,16 +35239,16 @@
  		PDB_STATIC="$PDB_STATIC passdb/pdb_ldap.o passdb/pdb_nds.o"
  
  		 PASSDB_LIBS="$PASSDB_LIBS $LDAP_LIBS"
@@ -87106,12 +89627,47 @@
  	fi
  
  
+-	{ $as_echo "$as_me:$LINENO: checking how to build pdb_ads" >&5
++	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to build pdb_ads" >&5
+ $as_echo_n "checking how to build pdb_ads... " >&6; }
+ 	if test "$MODULE_pdb_ads"; then
+ 		DEST=$MODULE_pdb_ads
+@@ -84142,12 +35260,10 @@
+ 
+ 	if test x"$DEST" = xSHARED; then
+ 
+-cat >>confdefs.h <<\_ACEOF
+-#define pdb_ads_init init_samba_module
+-_ACEOF
++$as_echo "#define pdb_ads_init init_samba_module" >>confdefs.h
+ 
+ 		PDB_MODULES="$PDB_MODULES "bin/ads.$SHLIBEXT""
+-		{ $as_echo "$as_me:$LINENO: result: shared" >&5
++		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: shared" >&5
+ $as_echo "shared" >&6; }
+ 
+ 		string_shared_modules="$string_shared_modules pdb_ads"
+@@ -84158,16 +35274,16 @@
+ 		PDB_STATIC="$PDB_STATIC passdb/pdb_ads.o \$(TLDAP_OBJ)"
+ 
+ 
+-		{ $as_echo "$as_me:$LINENO: result: static" >&5
++		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
+ $as_echo "static" >&6; }
+ 	else
+ 	    string_ignored_modules="$string_ignored_modules pdb_ads"
+-		{ $as_echo "$as_me:$LINENO: result: not" >&5
++		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: not" >&5
+ $as_echo "not" >&6; }
+ 	fi
+ 
+ 
 -	{ $as_echo "$as_me:$LINENO: checking how to build pdb_smbpasswd" >&5
 +	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to build pdb_smbpasswd" >&5
  $as_echo_n "checking how to build pdb_smbpasswd... " >&6; }
  	if test "$MODULE_pdb_smbpasswd"; then
  		DEST=$MODULE_pdb_smbpasswd
-@@ -81122,12 +33960,10 @@
+@@ -84179,12 +35295,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -87126,7 +89682,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules pdb_smbpasswd"
-@@ -81138,16 +33974,16 @@
+@@ -84195,16 +35309,16 @@
  		PDB_STATIC="$PDB_STATIC passdb/pdb_smbpasswd.o"
  
  
@@ -87146,7 +89702,7 @@
  $as_echo_n "checking how to build pdb_tdbsam... " >&6; }
  	if test "$MODULE_pdb_tdbsam"; then
  		DEST=$MODULE_pdb_tdbsam
-@@ -81159,12 +33995,10 @@
+@@ -84216,12 +35330,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -87161,7 +89717,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules pdb_tdbsam"
-@@ -81175,16 +34009,16 @@
+@@ -84232,16 +35344,16 @@
  		PDB_STATIC="$PDB_STATIC passdb/pdb_tdb.o"
  
  
@@ -87181,7 +89737,7 @@
  $as_echo_n "checking how to build pdb_wbc_sam... " >&6; }
  	if test "$MODULE_pdb_wbc_sam"; then
  		DEST=$MODULE_pdb_wbc_sam
-@@ -81196,12 +34030,10 @@
+@@ -84253,12 +35365,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -87196,7 +89752,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules pdb_wbc_sam"
-@@ -81212,11 +34044,11 @@
+@@ -84269,11 +35379,11 @@
  		PDB_STATIC="$PDB_STATIC passdb/pdb_wbc_sam.o"
  
  
@@ -87210,7 +89766,7 @@
  $as_echo "not" >&6; }
  	fi
  
-@@ -81238,7 +34070,7 @@
+@@ -84295,7 +35405,7 @@
  
  
  
@@ -87219,7 +89775,7 @@
  $as_echo_n "checking how to build rpc_lsarpc... " >&6; }
  	if test "$MODULE_rpc_lsarpc"; then
  		DEST=$MODULE_rpc_lsarpc
-@@ -81250,12 +34082,10 @@
+@@ -84307,12 +35417,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -87234,7 +89790,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules rpc_lsarpc"
-@@ -81266,16 +34096,16 @@
+@@ -84323,16 +35431,16 @@
  		RPC_STATIC="$RPC_STATIC \$(RPC_LSA_OBJ)"
  
  
@@ -87254,7 +89810,7 @@
  $as_echo_n "checking how to build rpc_winreg... " >&6; }
  	if test "$MODULE_rpc_winreg"; then
  		DEST=$MODULE_rpc_winreg
-@@ -81287,12 +34117,10 @@
+@@ -84344,12 +35452,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -87269,7 +89825,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules rpc_winreg"
-@@ -81303,16 +34131,16 @@
+@@ -84360,16 +35466,16 @@
  		RPC_STATIC="$RPC_STATIC \$(RPC_REG_OBJ)"
  
  
@@ -87289,7 +89845,7 @@
  $as_echo_n "checking how to build rpc_initshutdown... " >&6; }
  	if test "$MODULE_rpc_initshutdown"; then
  		DEST=$MODULE_rpc_initshutdown
-@@ -81324,12 +34152,10 @@
+@@ -84381,12 +35487,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -87304,7 +89860,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules rpc_initshutdown"
-@@ -81340,16 +34166,16 @@
+@@ -84397,16 +35501,16 @@
  		RPC_STATIC="$RPC_STATIC \$(RPC_INITSHUTDOWN_OBJ)"
  
  
@@ -87324,7 +89880,7 @@
  $as_echo_n "checking how to build rpc_dssetup... " >&6; }
  	if test "$MODULE_rpc_dssetup"; then
  		DEST=$MODULE_rpc_dssetup
-@@ -81361,12 +34187,10 @@
+@@ -84418,12 +35522,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -87339,7 +89895,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules rpc_dssetup"
-@@ -81377,16 +34201,16 @@
+@@ -84434,16 +35536,16 @@
  		RPC_STATIC="$RPC_STATIC \$(RPC_DSSETUP_OBJ)"
  
  
@@ -87359,7 +89915,7 @@
  $as_echo_n "checking how to build rpc_wkssvc... " >&6; }
  	if test "$MODULE_rpc_wkssvc"; then
  		DEST=$MODULE_rpc_wkssvc
-@@ -81398,12 +34222,10 @@
+@@ -84455,12 +35557,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -87374,7 +89930,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules rpc_wkssvc"
-@@ -81414,16 +34236,16 @@
+@@ -84471,16 +35571,16 @@
  		RPC_STATIC="$RPC_STATIC \$(RPC_WKS_OBJ)"
  
  
@@ -87394,7 +89950,7 @@
  $as_echo_n "checking how to build rpc_svcctl... " >&6; }
  	if test "$MODULE_rpc_svcctl"; then
  		DEST=$MODULE_rpc_svcctl
-@@ -81435,12 +34257,10 @@
+@@ -84492,12 +35592,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -87409,7 +89965,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules rpc_svcctl"
-@@ -81451,16 +34271,16 @@
+@@ -84508,16 +35606,16 @@
  		RPC_STATIC="$RPC_STATIC \$(RPC_SVCCTL_OBJ)"
  
  
@@ -87429,7 +89985,7 @@
  $as_echo_n "checking how to build rpc_ntsvcs... " >&6; }
  	if test "$MODULE_rpc_ntsvcs"; then
  		DEST=$MODULE_rpc_ntsvcs
-@@ -81472,12 +34292,10 @@
+@@ -84529,12 +35627,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -87444,7 +90000,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules rpc_ntsvcs"
-@@ -81488,16 +34306,16 @@
+@@ -84545,16 +35641,16 @@
  		RPC_STATIC="$RPC_STATIC \$(RPC_NTSVCS_OBJ)"
  
  
@@ -87464,7 +90020,7 @@
  $as_echo_n "checking how to build rpc_netlogon... " >&6; }
  	if test "$MODULE_rpc_netlogon"; then
  		DEST=$MODULE_rpc_netlogon
-@@ -81509,12 +34327,10 @@
+@@ -84566,12 +35662,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -87479,7 +90035,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules rpc_netlogon"
-@@ -81525,16 +34341,16 @@
+@@ -84582,16 +35676,16 @@
  		RPC_STATIC="$RPC_STATIC \$(RPC_NETLOG_OBJ)"
  
  
@@ -87499,7 +90055,7 @@
  $as_echo_n "checking how to build rpc_netdfs... " >&6; }
  	if test "$MODULE_rpc_netdfs"; then
  		DEST=$MODULE_rpc_netdfs
-@@ -81546,12 +34362,10 @@
+@@ -84603,12 +35697,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -87514,7 +90070,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules rpc_netdfs"
-@@ -81562,16 +34376,16 @@
+@@ -84619,16 +35711,16 @@
  		RPC_STATIC="$RPC_STATIC \$(RPC_DFS_OBJ)"
  
  
@@ -87534,7 +90090,7 @@
  $as_echo_n "checking how to build rpc_srvsvc... " >&6; }
  	if test "$MODULE_rpc_srvsvc"; then
  		DEST=$MODULE_rpc_srvsvc
-@@ -81583,12 +34397,10 @@
+@@ -84640,12 +35732,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -87549,7 +90105,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules rpc_srvsvc"
-@@ -81599,16 +34411,16 @@
+@@ -84656,16 +35746,16 @@
  		RPC_STATIC="$RPC_STATIC \$(RPC_SVC_OBJ)"
  
  
@@ -87569,7 +90125,7 @@
  $as_echo_n "checking how to build rpc_spoolss... " >&6; }
  	if test "$MODULE_rpc_spoolss"; then
  		DEST=$MODULE_rpc_spoolss
-@@ -81620,12 +34432,10 @@
+@@ -84677,12 +35767,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -87584,7 +90140,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules rpc_spoolss"
-@@ -81636,16 +34446,16 @@
+@@ -84693,16 +35781,16 @@
  		RPC_STATIC="$RPC_STATIC \$(RPC_SPOOLSS_OBJ)"
  
  
@@ -87604,7 +90160,7 @@
  $as_echo_n "checking how to build rpc_eventlog... " >&6; }
  	if test "$MODULE_rpc_eventlog"; then
  		DEST=$MODULE_rpc_eventlog
-@@ -81657,12 +34467,10 @@
+@@ -84714,12 +35802,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -87619,7 +90175,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules rpc_eventlog"
-@@ -81673,16 +34481,16 @@
+@@ -84730,16 +35816,16 @@
  		RPC_STATIC="$RPC_STATIC \$(RPC_EVENTLOG_OBJ)"
  
  
@@ -87639,7 +90195,7 @@
  $as_echo_n "checking how to build rpc_samr... " >&6; }
  	if test "$MODULE_rpc_samr"; then
  		DEST=$MODULE_rpc_samr
-@@ -81694,12 +34502,10 @@
+@@ -84751,12 +35837,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -87654,7 +90210,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules rpc_samr"
-@@ -81710,16 +34516,16 @@
+@@ -84767,16 +35851,16 @@
  		RPC_STATIC="$RPC_STATIC \$(RPC_SAMR_OBJ)"
  
  
@@ -87674,7 +90230,7 @@
  $as_echo_n "checking how to build rpc_rpcecho... " >&6; }
  	if test "$MODULE_rpc_rpcecho"; then
  		DEST=$MODULE_rpc_rpcecho
-@@ -81731,12 +34537,10 @@
+@@ -84788,12 +35872,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -87689,7 +90245,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules rpc_rpcecho"
-@@ -81747,11 +34551,11 @@
+@@ -84804,11 +35886,11 @@
  		RPC_STATIC="$RPC_STATIC \$(RPC_ECHO_OBJ)"
  
  
@@ -87703,7 +90259,7 @@
  $as_echo "not" >&6; }
  	fi
  
-@@ -81772,7 +34576,7 @@
+@@ -84829,7 +35911,7 @@
  
  
  
@@ -87712,7 +90268,7 @@
  $as_echo_n "checking how to build idmap_ldap... " >&6; }
  	if test "$MODULE_idmap_ldap"; then
  		DEST=$MODULE_idmap_ldap
-@@ -81784,12 +34588,10 @@
+@@ -84841,12 +35923,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -87727,7 +90283,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules idmap_ldap"
-@@ -81800,16 +34602,16 @@
+@@ -84857,16 +35937,16 @@
  		IDMAP_STATIC="$IDMAP_STATIC winbindd/idmap_ldap.o"
  
  
@@ -87747,7 +90303,7 @@
  $as_echo_n "checking how to build idmap_tdb... " >&6; }
  	if test "$MODULE_idmap_tdb"; then
  		DEST=$MODULE_idmap_tdb
-@@ -81821,12 +34623,10 @@
+@@ -84878,12 +35958,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -87762,7 +90318,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules idmap_tdb"
-@@ -81837,16 +34637,16 @@
+@@ -84894,16 +35972,16 @@
  		IDMAP_STATIC="$IDMAP_STATIC winbindd/idmap_tdb.o"
  
  
@@ -87782,7 +90338,7 @@
  $as_echo_n "checking how to build idmap_tdb2... " >&6; }
  	if test "$MODULE_idmap_tdb2"; then
  		DEST=$MODULE_idmap_tdb2
-@@ -81858,12 +34658,10 @@
+@@ -84915,12 +35993,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -87797,7 +90353,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules idmap_tdb2"
-@@ -81874,16 +34672,16 @@
+@@ -84931,16 +36007,16 @@
  		IDMAP_STATIC="$IDMAP_STATIC winbindd/idmap_tdb2.o"
  
  
@@ -87817,7 +90373,7 @@
  $as_echo_n "checking how to build idmap_passdb... " >&6; }
  	if test "$MODULE_idmap_passdb"; then
  		DEST=$MODULE_idmap_passdb
-@@ -81895,12 +34693,10 @@
+@@ -84952,12 +36028,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -87832,7 +90388,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules idmap_passdb"
-@@ -81911,16 +34707,16 @@
+@@ -84968,16 +36042,16 @@
  		IDMAP_STATIC="$IDMAP_STATIC winbindd/idmap_passdb.o"
  
  
@@ -87852,7 +90408,7 @@
  $as_echo_n "checking how to build idmap_nss... " >&6; }
  	if test "$MODULE_idmap_nss"; then
  		DEST=$MODULE_idmap_nss
-@@ -81932,12 +34728,10 @@
+@@ -84989,12 +36063,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -87867,7 +90423,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules idmap_nss"
-@@ -81948,16 +34742,16 @@
+@@ -85005,16 +36077,16 @@
  		IDMAP_STATIC="$IDMAP_STATIC winbindd/idmap_nss.o"
  
  
@@ -87887,7 +90443,7 @@
  $as_echo_n "checking how to build idmap_rid... " >&6; }
  	if test "$MODULE_idmap_rid"; then
  		DEST=$MODULE_idmap_rid
-@@ -81969,12 +34763,10 @@
+@@ -85026,12 +36098,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -87902,7 +90458,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules idmap_rid"
-@@ -81985,16 +34777,16 @@
+@@ -85042,16 +36112,16 @@
  		IDMAP_STATIC="$IDMAP_STATIC winbindd/idmap_rid.o"
  
  
@@ -87922,7 +90478,7 @@
  $as_echo_n "checking how to build idmap_ad... " >&6; }
  	if test "$MODULE_idmap_ad"; then
  		DEST=$MODULE_idmap_ad
-@@ -82006,12 +34798,10 @@
+@@ -85063,12 +36133,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -87937,7 +90493,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules idmap_ad"
-@@ -82022,16 +34812,16 @@
+@@ -85079,16 +36147,16 @@
  		IDMAP_STATIC="$IDMAP_STATIC winbindd/idmap_ad.o"
  
  
@@ -87957,7 +90513,7 @@
  $as_echo_n "checking how to build idmap_hash... " >&6; }
  	if test "$MODULE_idmap_hash"; then
  		DEST=$MODULE_idmap_hash
-@@ -82043,12 +34833,10 @@
+@@ -85100,12 +36168,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -87972,7 +90528,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules idmap_hash"
-@@ -82059,16 +34847,16 @@
+@@ -85116,16 +36182,16 @@
  		IDMAP_STATIC="$IDMAP_STATIC \$(IDMAP_HASH_OBJ)"
  
  
@@ -87992,7 +90548,7 @@
  $as_echo_n "checking how to build idmap_adex... " >&6; }
  	if test "$MODULE_idmap_adex"; then
  		DEST=$MODULE_idmap_adex
-@@ -82080,12 +34868,10 @@
+@@ -85137,12 +36203,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -88007,7 +90563,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules idmap_adex"
-@@ -82096,11 +34882,11 @@
+@@ -85153,11 +36217,11 @@
  		IDMAP_STATIC="$IDMAP_STATIC \$(IDMAP_ADEX_OBJ)"
  
  
@@ -88021,7 +90577,7 @@
  $as_echo "not" >&6; }
  	fi
  
-@@ -82121,7 +34907,7 @@
+@@ -85178,7 +36242,7 @@
  
  
  
@@ -88030,7 +90586,7 @@
  $as_echo_n "checking how to build nss_info_template... " >&6; }
  	if test "$MODULE_nss_info_template"; then
  		DEST=$MODULE_nss_info_template
-@@ -82133,12 +34919,10 @@
+@@ -85190,12 +36254,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -88045,7 +90601,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules nss_info_template"
-@@ -82149,11 +34933,11 @@
+@@ -85206,11 +36268,11 @@
  		NSS_INFO_STATIC="$NSS_INFO_STATIC winbindd/nss_info_template.o"
  
  
@@ -88059,7 +90615,7 @@
  $as_echo "not" >&6; }
  	fi
  
-@@ -82174,7 +34958,7 @@
+@@ -85231,7 +36293,7 @@
  
  
  
@@ -88068,7 +90624,7 @@
  $as_echo_n "checking how to build charset_weird... " >&6; }
  	if test "$MODULE_charset_weird"; then
  		DEST=$MODULE_charset_weird
-@@ -82186,12 +34970,10 @@
+@@ -85243,12 +36305,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -88083,7 +90639,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules charset_weird"
-@@ -82202,16 +34984,16 @@
+@@ -85259,16 +36319,16 @@
  		CHARSET_STATIC="$CHARSET_STATIC modules/weird.o"
  
  
@@ -88103,7 +90659,7 @@
  $as_echo_n "checking how to build charset_CP850... " >&6; }
  	if test "$MODULE_charset_CP850"; then
  		DEST=$MODULE_charset_CP850
-@@ -82223,12 +35005,10 @@
+@@ -85280,12 +36340,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -88118,7 +90674,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules charset_CP850"
-@@ -82239,16 +35019,16 @@
+@@ -85296,16 +36354,16 @@
  		CHARSET_STATIC="$CHARSET_STATIC modules/CP850.o"
  
  
@@ -88138,7 +90694,7 @@
  $as_echo_n "checking how to build charset_CP437... " >&6; }
  	if test "$MODULE_charset_CP437"; then
  		DEST=$MODULE_charset_CP437
-@@ -82260,12 +35040,10 @@
+@@ -85317,12 +36375,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -88153,7 +90709,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules charset_CP437"
-@@ -82276,16 +35054,16 @@
+@@ -85333,16 +36389,16 @@
  		CHARSET_STATIC="$CHARSET_STATIC modules/CP437.o"
  
  
@@ -88173,7 +90729,7 @@
  $as_echo_n "checking how to build charset_macosxfs... " >&6; }
  	if test "$MODULE_charset_macosxfs"; then
  		DEST=$MODULE_charset_macosxfs
-@@ -82297,12 +35075,10 @@
+@@ -85354,12 +36410,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -88188,7 +90744,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules charset_macosxfs"
-@@ -82313,11 +35089,11 @@
+@@ -85370,11 +36424,11 @@
  		CHARSET_STATIC="$CHARSET_STATIC modules/charset_macosxfs.o"
  
  
@@ -88202,7 +90758,7 @@
  $as_echo "not" >&6; }
  	fi
  
-@@ -82338,7 +35114,7 @@
+@@ -85395,7 +36449,7 @@
  
  
  
@@ -88211,7 +90767,7 @@
  $as_echo_n "checking how to build auth_sam... " >&6; }
  	if test "$MODULE_auth_sam"; then
  		DEST=$MODULE_auth_sam
-@@ -82350,12 +35126,10 @@
+@@ -85407,12 +36461,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -88226,7 +90782,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules auth_sam"
-@@ -82366,16 +35140,16 @@
+@@ -85423,16 +36475,16 @@
  		AUTH_STATIC="$AUTH_STATIC \$(AUTH_SAM_OBJ)"
  
  
@@ -88246,7 +90802,7 @@
  $as_echo_n "checking how to build auth_unix... " >&6; }
  	if test "$MODULE_auth_unix"; then
  		DEST=$MODULE_auth_unix
-@@ -82387,12 +35161,10 @@
+@@ -85444,12 +36496,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -88261,7 +90817,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules auth_unix"
-@@ -82403,16 +35175,16 @@
+@@ -85460,16 +36510,16 @@
  		AUTH_STATIC="$AUTH_STATIC \$(AUTH_UNIX_OBJ)"
  
  
@@ -88281,7 +90837,7 @@
  $as_echo_n "checking how to build auth_winbind... " >&6; }
  	if test "$MODULE_auth_winbind"; then
  		DEST=$MODULE_auth_winbind
-@@ -82424,12 +35196,10 @@
+@@ -85481,12 +36531,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -88296,7 +90852,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules auth_winbind"
-@@ -82440,16 +35210,16 @@
+@@ -85497,16 +36545,16 @@
  		AUTH_STATIC="$AUTH_STATIC \$(AUTH_WINBIND_OBJ)"
  
  
@@ -88316,7 +90872,7 @@
  $as_echo_n "checking how to build auth_wbc... " >&6; }
  	if test "$MODULE_auth_wbc"; then
  		DEST=$MODULE_auth_wbc
-@@ -82461,12 +35231,10 @@
+@@ -85518,12 +36566,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -88331,7 +90887,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules auth_wbc"
-@@ -82477,16 +35245,16 @@
+@@ -85534,16 +36580,16 @@
  		AUTH_STATIC="$AUTH_STATIC \$(AUTH_WBC_OBJ)"
  
  
@@ -88351,7 +90907,7 @@
  $as_echo_n "checking how to build auth_server... " >&6; }
  	if test "$MODULE_auth_server"; then
  		DEST=$MODULE_auth_server
-@@ -82498,12 +35266,10 @@
+@@ -85555,12 +36601,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -88366,7 +90922,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules auth_server"
-@@ -82514,16 +35280,16 @@
+@@ -85571,16 +36615,16 @@
  		AUTH_STATIC="$AUTH_STATIC \$(AUTH_SERVER_OBJ)"
  
  
@@ -88386,7 +90942,7 @@
  $as_echo_n "checking how to build auth_domain... " >&6; }
  	if test "$MODULE_auth_domain"; then
  		DEST=$MODULE_auth_domain
-@@ -82535,12 +35301,10 @@
+@@ -85592,12 +36636,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -88401,7 +90957,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules auth_domain"
-@@ -82551,16 +35315,16 @@
+@@ -85608,16 +36650,16 @@
  		AUTH_STATIC="$AUTH_STATIC \$(AUTH_DOMAIN_OBJ)"
  
  
@@ -88421,7 +90977,7 @@
  $as_echo_n "checking how to build auth_builtin... " >&6; }
  	if test "$MODULE_auth_builtin"; then
  		DEST=$MODULE_auth_builtin
-@@ -82572,12 +35336,10 @@
+@@ -85629,12 +36671,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -88436,7 +90992,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules auth_builtin"
-@@ -82588,16 +35350,16 @@
+@@ -85645,16 +36685,16 @@
  		AUTH_STATIC="$AUTH_STATIC \$(AUTH_BUILTIN_OBJ)"
  
  
@@ -88456,7 +91012,7 @@
  $as_echo_n "checking how to build auth_script... " >&6; }
  	if test "$MODULE_auth_script"; then
  		DEST=$MODULE_auth_script
-@@ -82609,12 +35371,10 @@
+@@ -85666,12 +36706,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -88471,7 +91027,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules auth_script"
-@@ -82625,16 +35385,16 @@
+@@ -85682,16 +36720,16 @@
  		AUTH_STATIC="$AUTH_STATIC \$(AUTH_SCRIPT_OBJ)"
  
  
@@ -88491,7 +91047,7 @@
  $as_echo_n "checking how to build auth_netlogond... " >&6; }
  	if test "$MODULE_auth_netlogond"; then
  		DEST=$MODULE_auth_netlogond
-@@ -82646,12 +35406,10 @@
+@@ -85703,12 +36741,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -88506,7 +91062,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules auth_netlogond"
-@@ -82662,11 +35420,11 @@
+@@ -85719,11 +36755,11 @@
  		AUTH_STATIC="$AUTH_STATIC \$(AUTH_NETLOGOND_OBJ)"
  
  
@@ -88520,7 +91076,7 @@
  $as_echo "not" >&6; }
  	fi
  
-@@ -82687,7 +35445,7 @@
+@@ -85744,7 +36780,7 @@
  
  
  
@@ -88529,7 +91085,7 @@
  $as_echo_n "checking how to build vfs_default... " >&6; }
  	if test "$MODULE_vfs_default"; then
  		DEST=$MODULE_vfs_default
-@@ -82699,12 +35457,10 @@
+@@ -85756,12 +36792,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -88544,7 +91100,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_default"
-@@ -82715,16 +35471,16 @@
+@@ -85772,16 +36806,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_DEFAULT_OBJ)"
  
  
@@ -88564,7 +91120,7 @@
  $as_echo_n "checking how to build vfs_recycle... " >&6; }
  	if test "$MODULE_vfs_recycle"; then
  		DEST=$MODULE_vfs_recycle
-@@ -82736,12 +35492,10 @@
+@@ -85793,12 +36827,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -88579,7 +91135,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_recycle"
-@@ -82752,16 +35506,16 @@
+@@ -85809,16 +36841,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_RECYCLE_OBJ)"
  
  
@@ -88599,7 +91155,7 @@
  $as_echo_n "checking how to build vfs_audit... " >&6; }
  	if test "$MODULE_vfs_audit"; then
  		DEST=$MODULE_vfs_audit
-@@ -82773,12 +35527,10 @@
+@@ -85830,12 +36862,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -88614,7 +91170,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_audit"
-@@ -82789,16 +35541,16 @@
+@@ -85846,16 +36876,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_AUDIT_OBJ)"
  
  
@@ -88634,7 +91190,7 @@
  $as_echo_n "checking how to build vfs_extd_audit... " >&6; }
  	if test "$MODULE_vfs_extd_audit"; then
  		DEST=$MODULE_vfs_extd_audit
-@@ -82810,12 +35562,10 @@
+@@ -85867,12 +36897,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -88649,7 +91205,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_extd_audit"
-@@ -82826,16 +35576,16 @@
+@@ -85883,16 +36911,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_EXTD_AUDIT_OBJ)"
  
  
@@ -88669,7 +91225,7 @@
  $as_echo_n "checking how to build vfs_full_audit... " >&6; }
  	if test "$MODULE_vfs_full_audit"; then
  		DEST=$MODULE_vfs_full_audit
-@@ -82847,12 +35597,10 @@
+@@ -85904,12 +36932,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -88684,7 +91240,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_full_audit"
-@@ -82863,16 +35611,16 @@
+@@ -85920,16 +36946,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_FULL_AUDIT_OBJ)"
  
  
@@ -88704,7 +91260,7 @@
  $as_echo_n "checking how to build vfs_netatalk... " >&6; }
  	if test "$MODULE_vfs_netatalk"; then
  		DEST=$MODULE_vfs_netatalk
-@@ -82884,12 +35632,10 @@
+@@ -85941,12 +36967,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -88719,7 +91275,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_netatalk"
-@@ -82900,16 +35646,16 @@
+@@ -85957,16 +36981,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_NETATALK_OBJ)"
  
  
@@ -88739,7 +91295,7 @@
  $as_echo_n "checking how to build vfs_fake_perms... " >&6; }
  	if test "$MODULE_vfs_fake_perms"; then
  		DEST=$MODULE_vfs_fake_perms
-@@ -82921,12 +35667,10 @@
+@@ -85978,12 +37002,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -88754,7 +91310,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_fake_perms"
-@@ -82937,16 +35681,16 @@
+@@ -85994,16 +37016,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_FAKE_PERMS_OBJ)"
  
  
@@ -88774,7 +91330,7 @@
  $as_echo_n "checking how to build vfs_default_quota... " >&6; }
  	if test "$MODULE_vfs_default_quota"; then
  		DEST=$MODULE_vfs_default_quota
-@@ -82958,12 +35702,10 @@
+@@ -86015,12 +37037,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -88789,7 +91345,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_default_quota"
-@@ -82974,16 +35716,16 @@
+@@ -86031,16 +37051,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_DEFAULT_QUOTA_OBJ)"
  
  
@@ -88809,7 +91365,7 @@
  $as_echo_n "checking how to build vfs_readonly... " >&6; }
  	if test "$MODULE_vfs_readonly"; then
  		DEST=$MODULE_vfs_readonly
-@@ -82995,12 +35737,10 @@
+@@ -86052,12 +37072,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -88824,7 +91380,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_readonly"
-@@ -83011,16 +35751,16 @@
+@@ -86068,16 +37086,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_READONLY_OBJ)"
  
  
@@ -88844,7 +91400,7 @@
  $as_echo_n "checking how to build vfs_cap... " >&6; }
  	if test "$MODULE_vfs_cap"; then
  		DEST=$MODULE_vfs_cap
-@@ -83032,12 +35772,10 @@
+@@ -86089,12 +37107,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -88859,7 +91415,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_cap"
-@@ -83048,16 +35786,16 @@
+@@ -86105,16 +37121,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_CAP_OBJ)"
  
  
@@ -88879,7 +91435,7 @@
  $as_echo_n "checking how to build vfs_expand_msdfs... " >&6; }
  	if test "$MODULE_vfs_expand_msdfs"; then
  		DEST=$MODULE_vfs_expand_msdfs
-@@ -83069,12 +35807,10 @@
+@@ -86126,12 +37142,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -88894,7 +91450,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_expand_msdfs"
-@@ -83085,16 +35821,16 @@
+@@ -86142,16 +37156,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_EXPAND_MSDFS_OBJ)"
  
  
@@ -88914,7 +91470,7 @@
  $as_echo_n "checking how to build vfs_shadow_copy... " >&6; }
  	if test "$MODULE_vfs_shadow_copy"; then
  		DEST=$MODULE_vfs_shadow_copy
-@@ -83106,12 +35842,10 @@
+@@ -86163,12 +37177,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -88929,7 +91485,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_shadow_copy"
-@@ -83122,16 +35856,16 @@
+@@ -86179,16 +37191,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_SHADOW_COPY_OBJ)"
  
  
@@ -88949,7 +91505,7 @@
  $as_echo_n "checking how to build vfs_shadow_copy2... " >&6; }
  	if test "$MODULE_vfs_shadow_copy2"; then
  		DEST=$MODULE_vfs_shadow_copy2
-@@ -83143,12 +35877,10 @@
+@@ -86200,12 +37212,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -88964,7 +91520,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_shadow_copy2"
-@@ -83159,16 +35891,16 @@
+@@ -86216,16 +37226,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_SHADOW_COPY2_OBJ)"
  
  
@@ -88984,7 +91540,7 @@
  $as_echo_n "checking how to build vfs_afsacl... " >&6; }
  	if test "$MODULE_vfs_afsacl"; then
  		DEST=$MODULE_vfs_afsacl
-@@ -83180,12 +35912,10 @@
+@@ -86237,12 +37247,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -88999,7 +91555,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_afsacl"
-@@ -83196,16 +35926,16 @@
+@@ -86253,16 +37261,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_AFSACL_OBJ)"
  
  
@@ -89019,7 +91575,7 @@
  $as_echo_n "checking how to build vfs_xattr_tdb... " >&6; }
  	if test "$MODULE_vfs_xattr_tdb"; then
  		DEST=$MODULE_vfs_xattr_tdb
-@@ -83217,12 +35947,10 @@
+@@ -86274,12 +37282,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -89034,7 +91590,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_xattr_tdb"
-@@ -83233,16 +35961,16 @@
+@@ -86290,16 +37296,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_XATTR_TDB_OBJ)"
  
  
@@ -89054,7 +91610,7 @@
  $as_echo_n "checking how to build vfs_posixacl... " >&6; }
  	if test "$MODULE_vfs_posixacl"; then
  		DEST=$MODULE_vfs_posixacl
-@@ -83254,12 +35982,10 @@
+@@ -86311,12 +37317,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -89069,7 +91625,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_posixacl"
-@@ -83270,16 +35996,16 @@
+@@ -86327,16 +37331,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_POSIXACL_OBJ)"
  
  
@@ -89089,7 +91645,7 @@
  $as_echo_n "checking how to build vfs_aixacl... " >&6; }
  	if test "$MODULE_vfs_aixacl"; then
  		DEST=$MODULE_vfs_aixacl
-@@ -83291,12 +36017,10 @@
+@@ -86348,12 +37352,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -89104,7 +91660,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_aixacl"
-@@ -83307,16 +36031,16 @@
+@@ -86364,16 +37366,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_AIXACL_OBJ)"
  
  
@@ -89124,7 +91680,7 @@
  $as_echo_n "checking how to build vfs_aixacl2... " >&6; }
  	if test "$MODULE_vfs_aixacl2"; then
  		DEST=$MODULE_vfs_aixacl2
-@@ -83328,12 +36052,10 @@
+@@ -86385,12 +37387,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -89139,7 +91695,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_aixacl2"
-@@ -83344,16 +36066,16 @@
+@@ -86401,16 +37401,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_AIXACL2_OBJ)"
  
  
@@ -89159,7 +91715,7 @@
  $as_echo_n "checking how to build vfs_solarisacl... " >&6; }
  	if test "$MODULE_vfs_solarisacl"; then
  		DEST=$MODULE_vfs_solarisacl
-@@ -83365,12 +36087,10 @@
+@@ -86422,12 +37422,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -89174,7 +91730,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_solarisacl"
-@@ -83381,16 +36101,16 @@
+@@ -86438,16 +37436,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_SOLARISACL_OBJ)"
  
  
@@ -89194,7 +91750,7 @@
  $as_echo_n "checking how to build vfs_irixacl... " >&6; }
  	if test "$MODULE_vfs_irixacl"; then
  		DEST=$MODULE_vfs_irixacl
-@@ -83402,12 +36122,10 @@
+@@ -86459,12 +37457,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -89209,7 +91765,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_irixacl"
-@@ -83418,16 +36136,16 @@
+@@ -86475,16 +37471,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_IRIXACL_OBJ)"
  
  
@@ -89229,7 +91785,7 @@
  $as_echo_n "checking how to build vfs_hpuxacl... " >&6; }
  	if test "$MODULE_vfs_hpuxacl"; then
  		DEST=$MODULE_vfs_hpuxacl
-@@ -83439,12 +36157,10 @@
+@@ -86496,12 +37492,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -89244,7 +91800,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_hpuxacl"
-@@ -83455,16 +36171,16 @@
+@@ -86512,16 +37506,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_HPUXACL_OBJ)"
  
  
@@ -89264,7 +91820,7 @@
  $as_echo_n "checking how to build vfs_tru64acl... " >&6; }
  	if test "$MODULE_vfs_tru64acl"; then
  		DEST=$MODULE_vfs_tru64acl
-@@ -83476,12 +36192,10 @@
+@@ -86533,12 +37527,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -89279,7 +91835,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_tru64acl"
-@@ -83492,16 +36206,16 @@
+@@ -86549,16 +37541,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_TRU64ACL_OBJ)"
  
  
@@ -89299,7 +91855,7 @@
  $as_echo_n "checking how to build vfs_catia... " >&6; }
  	if test "$MODULE_vfs_catia"; then
  		DEST=$MODULE_vfs_catia
-@@ -83513,12 +36227,10 @@
+@@ -86570,12 +37562,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -89314,7 +91870,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_catia"
-@@ -83529,16 +36241,16 @@
+@@ -86586,16 +37576,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_CATIA_OBJ)"
  
  
@@ -89334,7 +91890,7 @@
  $as_echo_n "checking how to build vfs_streams_xattr... " >&6; }
  	if test "$MODULE_vfs_streams_xattr"; then
  		DEST=$MODULE_vfs_streams_xattr
-@@ -83550,12 +36262,10 @@
+@@ -86607,12 +37597,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -89349,7 +91905,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_streams_xattr"
-@@ -83566,16 +36276,16 @@
+@@ -86623,16 +37611,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_STREAMS_XATTR_OBJ)"
  
  
@@ -89369,7 +91925,7 @@
  $as_echo_n "checking how to build vfs_streams_depot... " >&6; }
  	if test "$MODULE_vfs_streams_depot"; then
  		DEST=$MODULE_vfs_streams_depot
-@@ -83587,12 +36297,10 @@
+@@ -86644,12 +37632,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -89384,7 +91940,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_streams_depot"
-@@ -83603,16 +36311,16 @@
+@@ -86660,16 +37646,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_STREAMS_DEPOT_OBJ)"
  
  
@@ -89404,7 +91960,7 @@
  $as_echo_n "checking how to build vfs_cacheprime... " >&6; }
  	if test "$MODULE_vfs_cacheprime"; then
  		DEST=$MODULE_vfs_cacheprime
-@@ -83624,12 +36332,10 @@
+@@ -86681,12 +37667,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -89419,7 +91975,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_cacheprime"
-@@ -83640,16 +36346,16 @@
+@@ -86697,16 +37681,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_CACHEPRIME_OBJ)"
  
  
@@ -89439,7 +91995,7 @@
  $as_echo_n "checking how to build vfs_prealloc... " >&6; }
  	if test "$MODULE_vfs_prealloc"; then
  		DEST=$MODULE_vfs_prealloc
-@@ -83661,12 +36367,10 @@
+@@ -86718,12 +37702,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -89454,7 +92010,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_prealloc"
-@@ -83677,16 +36381,16 @@
+@@ -86734,16 +37716,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_PREALLOC_OBJ)"
  
  
@@ -89474,7 +92030,7 @@
  $as_echo_n "checking how to build vfs_commit... " >&6; }
  	if test "$MODULE_vfs_commit"; then
  		DEST=$MODULE_vfs_commit
-@@ -83698,12 +36402,10 @@
+@@ -86755,12 +37737,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -89489,7 +92045,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_commit"
-@@ -83714,16 +36416,16 @@
+@@ -86771,16 +37751,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_COMMIT_OBJ)"
  
  
@@ -89509,7 +92065,7 @@
  $as_echo_n "checking how to build vfs_gpfs... " >&6; }
  	if test "$MODULE_vfs_gpfs"; then
  		DEST=$MODULE_vfs_gpfs
-@@ -83735,12 +36437,10 @@
+@@ -86792,12 +37772,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -89524,7 +92080,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_gpfs"
-@@ -83751,16 +36451,16 @@
+@@ -86808,16 +37786,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_GPFS_OBJ)"
  
  
@@ -89544,7 +92100,7 @@
  $as_echo_n "checking how to build vfs_readahead... " >&6; }
  	if test "$MODULE_vfs_readahead"; then
  		DEST=$MODULE_vfs_readahead
-@@ -83772,12 +36472,10 @@
+@@ -86829,12 +37807,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -89559,7 +92115,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_readahead"
-@@ -83788,16 +36486,16 @@
+@@ -86845,16 +37821,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_READAHEAD_OBJ)"
  
  
@@ -89579,7 +92135,7 @@
  $as_echo_n "checking how to build vfs_tsmsm... " >&6; }
  	if test "$MODULE_vfs_tsmsm"; then
  		DEST=$MODULE_vfs_tsmsm
-@@ -83809,12 +36507,10 @@
+@@ -86866,12 +37842,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -89594,7 +92150,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_tsmsm"
-@@ -83825,16 +36521,16 @@
+@@ -86882,16 +37856,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_TSMSM_OBJ)"
  
  
@@ -89614,7 +92170,7 @@
  $as_echo_n "checking how to build vfs_fileid... " >&6; }
  	if test "$MODULE_vfs_fileid"; then
  		DEST=$MODULE_vfs_fileid
-@@ -83846,12 +36542,10 @@
+@@ -86903,12 +37877,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -89629,7 +92185,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_fileid"
-@@ -83862,16 +36556,16 @@
+@@ -86919,16 +37891,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_FILEID_OBJ)"
  
  
@@ -89649,7 +92205,7 @@
  $as_echo_n "checking how to build vfs_aio_fork... " >&6; }
  	if test "$MODULE_vfs_aio_fork"; then
  		DEST=$MODULE_vfs_aio_fork
-@@ -83883,12 +36577,10 @@
+@@ -86940,12 +37912,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -89664,7 +92220,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_aio_fork"
-@@ -83899,16 +36591,16 @@
+@@ -86956,16 +37926,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_AIO_FORK_OBJ)"
  
  
@@ -89684,7 +92240,7 @@
  $as_echo_n "checking how to build vfs_preopen... " >&6; }
  	if test "$MODULE_vfs_preopen"; then
  		DEST=$MODULE_vfs_preopen
-@@ -83920,12 +36612,10 @@
+@@ -86977,12 +37947,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -89699,7 +92255,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_preopen"
-@@ -83936,16 +36626,16 @@
+@@ -86993,16 +37961,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_PREOPEN_OBJ)"
  
  
@@ -89719,7 +92275,7 @@
  $as_echo_n "checking how to build vfs_syncops... " >&6; }
  	if test "$MODULE_vfs_syncops"; then
  		DEST=$MODULE_vfs_syncops
-@@ -83957,12 +36647,10 @@
+@@ -87014,12 +37982,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -89734,7 +92290,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_syncops"
-@@ -83973,16 +36661,16 @@
+@@ -87030,16 +37996,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_SYNCOPS_OBJ)"
  
  
@@ -89754,7 +92310,7 @@
  $as_echo_n "checking how to build vfs_zfsacl... " >&6; }
  	if test "$MODULE_vfs_zfsacl"; then
  		DEST=$MODULE_vfs_zfsacl
-@@ -83994,12 +36682,10 @@
+@@ -87051,12 +38017,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -89769,7 +92325,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_zfsacl"
-@@ -84010,16 +36696,16 @@
+@@ -87067,16 +38031,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_ZFSACL_OBJ)"
  
  
@@ -89789,7 +92345,7 @@
  $as_echo_n "checking how to build vfs_notify_fam... " >&6; }
  	if test "$MODULE_vfs_notify_fam"; then
  		DEST=$MODULE_vfs_notify_fam
-@@ -84031,12 +36717,10 @@
+@@ -87088,12 +38052,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -89804,7 +92360,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_notify_fam"
-@@ -84047,16 +36731,16 @@
+@@ -87104,16 +38066,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_NOTIFY_FAM_OBJ)"
  
  
@@ -89824,7 +92380,7 @@
  $as_echo_n "checking how to build vfs_acl_xattr... " >&6; }
  	if test "$MODULE_vfs_acl_xattr"; then
  		DEST=$MODULE_vfs_acl_xattr
-@@ -84068,12 +36752,10 @@
+@@ -87125,12 +38087,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -89839,7 +92395,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_acl_xattr"
-@@ -84084,16 +36766,16 @@
+@@ -87141,16 +38101,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_ACL_XATTR_OBJ)"
  
  
@@ -89859,7 +92415,7 @@
  $as_echo_n "checking how to build vfs_acl_tdb... " >&6; }
  	if test "$MODULE_vfs_acl_tdb"; then
  		DEST=$MODULE_vfs_acl_tdb
-@@ -84105,12 +36787,10 @@
+@@ -87162,12 +38122,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -89874,7 +92430,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_acl_tdb"
-@@ -84121,16 +36801,16 @@
+@@ -87178,16 +38136,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_ACL_TDB_OBJ)"
  
  
@@ -89894,7 +92450,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
-@@ -84142,12 +36822,10 @@
+@@ -87199,12 +38157,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -89909,7 +92465,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_smb_traffic_analyzer"
-@@ -84158,16 +36836,16 @@
+@@ -87215,16 +38171,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_SMB_TRAFFIC_ANALYZER_OBJ)"
  
  
@@ -89929,7 +92485,7 @@
  $as_echo_n "checking how to build vfs_onefs... " >&6; }
  	if test "$MODULE_vfs_onefs"; then
  		DEST=$MODULE_vfs_onefs
-@@ -84179,12 +36857,10 @@
+@@ -87236,12 +38192,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -89944,7 +92500,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_onefs"
-@@ -84195,16 +36871,16 @@
+@@ -87252,16 +38206,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_ONEFS)"
  
  
@@ -89964,7 +92520,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
-@@ -84216,12 +36892,10 @@
+@@ -87273,12 +38227,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -89979,7 +92535,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_onefs_shadow_copy"
-@@ -84232,16 +36906,16 @@
+@@ -87289,16 +38241,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_ONEFS_SHADOW_COPY)"
  
  
@@ -89999,7 +92555,7 @@
  $as_echo_n "checking how to build vfs_dirsort... " >&6; }
  	if test "$MODULE_vfs_dirsort"; then
  		DEST=$MODULE_vfs_dirsort
-@@ -84253,12 +36927,10 @@
+@@ -87310,12 +38262,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -90014,7 +92570,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_dirsort"
-@@ -84269,11 +36941,11 @@
+@@ -87326,16 +38276,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_DIRSORT_OBJ)"
  
  
@@ -90028,16 +92584,51 @@
  $as_echo "not" >&6; }
  	fi
  
-@@ -84295,7 +36967,7 @@
  
+-	{ $as_echo "$as_me:$LINENO: checking how to build vfs_scannedonly" >&5
++	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to build vfs_scannedonly" >&5
+ $as_echo_n "checking how to build vfs_scannedonly... " >&6; }
+ 	if test "$MODULE_vfs_scannedonly"; then
+ 		DEST=$MODULE_vfs_scannedonly
+@@ -87347,12 +38297,10 @@
  
+ 	if test x"$DEST" = xSHARED; then
  
+-cat >>confdefs.h <<\_ACEOF
+-#define vfs_scannedonly_init init_samba_module
+-_ACEOF
++$as_echo "#define vfs_scannedonly_init init_samba_module" >>confdefs.h
+ 
+ 		VFS_MODULES="$VFS_MODULES "bin/scannedonly.$SHLIBEXT""
+-		{ $as_echo "$as_me:$LINENO: result: shared" >&5
++		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: shared" >&5
+ $as_echo "shared" >&6; }
+ 
+ 		string_shared_modules="$string_shared_modules vfs_scannedonly"
+@@ -87363,11 +38311,11 @@
+ 		VFS_STATIC="$VFS_STATIC \$(VFS_SCANNEDONLY_OBJ)"
+ 
+ 
+-		{ $as_echo "$as_me:$LINENO: result: static" >&5
++		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
+ $as_echo "static" >&6; }
+ 	else
+ 	    string_ignored_modules="$string_ignored_modules vfs_scannedonly"
+-		{ $as_echo "$as_me:$LINENO: result: not" >&5
++		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: not" >&5
+ $as_echo "not" >&6; }
+ 	fi
+ 
+@@ -87389,7 +38337,7 @@
+ 
+ 
+ 
 -	{ $as_echo "$as_me:$LINENO: checking how to build perfcount_onefs" >&5
 +	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to build perfcount_onefs" >&5
  $as_echo_n "checking how to build perfcount_onefs... " >&6; }
  	if test "$MODULE_perfcount_onefs"; then
  		DEST=$MODULE_perfcount_onefs
-@@ -84307,12 +36979,10 @@
+@@ -87401,12 +38349,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -90052,7 +92643,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules perfcount_onefs"
-@@ -84323,16 +36993,16 @@
+@@ -87417,16 +38363,16 @@
  		PERFCOUNT_STATIC="$PERFCOUNT_STATIC \$(PERFCOUNT_ONEFS)"
  
  
@@ -90072,7 +92663,7 @@
  $as_echo_n "checking how to build perfcount_test... " >&6; }
  	if test "$MODULE_perfcount_test"; then
  		DEST=$MODULE_perfcount_test
-@@ -84344,12 +37014,10 @@
+@@ -87438,12 +38384,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -90087,7 +92678,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules perfcount_test"
-@@ -84360,11 +37028,11 @@
+@@ -87454,11 +38398,11 @@
  		PERFCOUNT_STATIC="$PERFCOUNT_STATIC \$(PERFCOUNT_TEST)"
  
  
@@ -90101,7 +92692,7 @@
  $as_echo "not" >&6; }
  	fi
  
-@@ -84385,7 +37053,7 @@
+@@ -87479,7 +38423,7 @@
  
  
  
@@ -90110,7 +92701,7 @@
  $as_echo_n "checking how to build gpext_registry... " >&6; }
  	if test "$MODULE_gpext_registry"; then
  		DEST=$MODULE_gpext_registry
-@@ -84397,12 +37065,10 @@
+@@ -87491,12 +38435,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -90125,7 +92716,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules gpext_registry"
-@@ -84413,16 +37079,16 @@
+@@ -87507,16 +38449,16 @@
  		GPEXT_STATIC="$GPEXT_STATIC libgpo/gpext/registry.o"
  
  
@@ -90145,7 +92736,7 @@
  $as_echo_n "checking how to build gpext_scripts... " >&6; }
  	if test "$MODULE_gpext_scripts"; then
  		DEST=$MODULE_gpext_scripts
-@@ -84434,12 +37100,10 @@
+@@ -87528,12 +38470,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -90160,7 +92751,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules gpext_scripts"
-@@ -84450,16 +37114,16 @@
+@@ -87544,16 +38484,16 @@
  		GPEXT_STATIC="$GPEXT_STATIC libgpo/gpext/scripts.o"
  
  
@@ -90180,7 +92771,7 @@
  $as_echo_n "checking how to build gpext_security... " >&6; }
  	if test "$MODULE_gpext_security"; then
  		DEST=$MODULE_gpext_security
-@@ -84471,12 +37135,10 @@
+@@ -87565,12 +38505,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -90195,7 +92786,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules gpext_security"
-@@ -84487,11 +37149,11 @@
+@@ -87581,11 +38519,11 @@
  		GPEXT_STATIC="$GPEXT_STATIC libgpo/gpext/security.o"
  
  
@@ -90209,7 +92800,7 @@
  $as_echo "not" >&6; }
  	fi
  
-@@ -84527,18 +37189,16 @@
+@@ -87621,18 +38559,16 @@
  #################################################
  # If run from the build farm, enable NASTY hacks
  #################################################
@@ -90232,7 +92823,7 @@
  $as_echo "no" >&6; }
  fi
  
-@@ -84555,11 +37215,11 @@
+@@ -87649,11 +38585,11 @@
      rt_signal_lease_works=yes
      rt_signal_aio_works=yes
  
@@ -90247,7 +92838,7 @@
  $as_echo "cross" >&6; }
  
  	    # cross compiling, I hope you know what you are doing
-@@ -84567,11 +37227,7 @@
+@@ -87661,11 +38597,7 @@
  
  
  else
@@ -90260,7 +92851,7 @@
  /* end confdefs.h.  */
  
  #include <sys/types.h>
-@@ -84627,41 +37283,16 @@
+@@ -87724,41 +38656,16 @@
  }
  
  _ACEOF
@@ -90306,7 +92897,7 @@
  /* end confdefs.h.  */
  
  int
-@@ -84672,61 +37303,31 @@
+@@ -87769,61 +38676,31 @@
    return 0;
  }
  _ACEOF
@@ -90345,8 +92936,8 @@
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
+ 
 -
- 
 -	    { $as_echo "$as_me:$LINENO: result: no" >&5
 +	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  $as_echo "no" >&6; }
@@ -90367,15 +92958,15 @@
 -  $as_echo "$as_me: program exited with status $ac_status" >&5
 -$as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
+-
+-( exit $ac_status )
  
--( exit $ac_status )
--
 -	    { $as_echo "$as_me:$LINENO: result: no" >&5
 +	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  $as_echo "no" >&6; }
  	    case "$ac_status" in
  		1|11|101|111)  rt_signal_lease_ok=no ;;
-@@ -84740,13 +37341,9 @@
+@@ -87837,13 +38714,9 @@
  
  	    # no RT_SIGNAL bug, we are golden
  
@@ -90391,7 +92982,7 @@
  /* end confdefs.h.  */
  
  int
-@@ -84757,65 +37354,39 @@
+@@ -87854,65 +38727,39 @@
    return 0;
  }
  _ACEOF
@@ -90430,8 +93021,8 @@
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
+-
  
--
 -	    { $as_echo "$as_me:$LINENO: result: no" >&5
 +	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  $as_echo "no" >&6; }
@@ -90466,7 +93057,7 @@
    enableval=$enable_merged_build;  enable_merged_build=$enableval
  else
     enable_merged_build=auto
-@@ -84824,9 +37395,7 @@
+@@ -87921,9 +38768,7 @@
  
  if test x"$enable_merged_build" = x"yes" -a \
  	x"$merged_build_possible" = x"no" ; then
@@ -90477,10 +93068,53 @@
  fi
  
  
-@@ -84846,9 +37415,9 @@
+@@ -87946,9 +38791,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
+-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+ $as_echo_n "checking for $ac_word... " >&6; }
+-if test "${ac_cv_path_PYTHON+set}" = set; then
++if test "${ac_cv_path_PYTHON+set}" = set; then :
+   $as_echo_n "(cached) " >&6
+ else
+   case $PYTHON in
+@@ -87961,14 +38806,14 @@
+ do
+   IFS=$as_save_IFS
+   test -z "$as_dir" && as_dir=.
+-  for ac_exec_ext in '' $ac_executable_extensions; do
++    for ac_exec_ext in '' $ac_executable_extensions; do
+   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+     ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
+-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
++    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+     break 2
+   fi
+ done
+-done
++  done
+ IFS=$as_save_IFS
  
- 	# Extract the first word of "python[$PYTHON_VERSION]", so it can be a program name with args.
- set dummy python$PYTHON_VERSION; ac_word=$2
+   ;;
+@@ -87976,10 +38821,10 @@
+ fi
+ PYTHON=$ac_cv_path_PYTHON
+ if test -n "$PYTHON"; then
+-  { $as_echo "$as_me:$LINENO: result: $PYTHON" >&5
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
+ $as_echo "$PYTHON" >&6; }
+ else
+-  { $as_echo "$as_me:$LINENO: result: no" >&5
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+ $as_echo "no" >&6; }
+ fi
+ 
+@@ -87990,9 +38835,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
 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  $as_echo_n "checking for $ac_word... " >&6; }
@@ -90489,7 +93123,7 @@
    $as_echo_n "(cached) " >&6
  else
    case $PYTHON in
-@@ -84861,14 +37430,14 @@
+@@ -88005,14 +38850,14 @@
  do
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
@@ -90507,7 +93141,7 @@
  IFS=$as_save_IFS
  
    ;;
-@@ -84876,17 +37445,17 @@
+@@ -88020,10 +38865,10 @@
  fi
  PYTHON=$ac_cv_path_PYTHON
  if test -n "$PYTHON"; then
@@ -90520,7 +93154,8 @@
  $as_echo "no" >&6; }
  fi
  
- 
+@@ -88031,7 +38876,7 @@
+ 	fi
  	if test -z "$PYTHON"; then
  		working_python=no
 -		{ $as_echo "$as_me:$LINENO: WARNING: No python found" >&5
@@ -90528,7 +93163,7 @@
  $as_echo "$as_me: WARNING: No python found" >&2;}
  	fi
  
-@@ -84897,9 +37466,9 @@
+@@ -88042,9 +38887,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
@@ -90540,7 +93175,7 @@
    $as_echo_n "(cached) " >&6
  else
    case $PYTHON_CONFIG in
-@@ -84912,14 +37481,14 @@
+@@ -88057,14 +38902,14 @@
  do
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
@@ -90558,7 +93193,7 @@
  IFS=$as_save_IFS
  
    ;;
-@@ -84927,10 +37496,10 @@
+@@ -88072,10 +38917,10 @@
  fi
  PYTHON_CONFIG=$ac_cv_path_PYTHON_CONFIG
  if test -n "$PYTHON_CONFIG"; then
@@ -90571,10 +93206,10 @@
  $as_echo "no" >&6; }
  fi
  
-@@ -84941,9 +37510,9 @@
+@@ -88086,9 +38931,9 @@
  	else
- 		# Extract the first word of "python[$PYTHON_VERSION]-config", so it can be a program name with args.
- set dummy python$PYTHON_VERSION-config; ac_word=$2
+ 		# Extract the first word of "python[$PYTHON_VER]-config", so it can be a program name with args.
+ set dummy python$PYTHON_VER-config; ac_word=$2
 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  $as_echo_n "checking for $ac_word... " >&6; }
@@ -90583,7 +93218,7 @@
    $as_echo_n "(cached) " >&6
  else
    case $PYTHON_CONFIG in
-@@ -84956,14 +37525,14 @@
+@@ -88101,14 +38946,14 @@
  do
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
@@ -90601,7 +93236,7 @@
  IFS=$as_save_IFS
  
    ;;
-@@ -84971,10 +37540,10 @@
+@@ -88116,10 +38961,10 @@
  fi
  PYTHON_CONFIG=$ac_cv_path_PYTHON_CONFIG
  if test -n "$PYTHON_CONFIG"; then
@@ -90614,7 +93249,7 @@
  $as_echo "no" >&6; }
  fi
  
-@@ -84982,7 +37551,7 @@
+@@ -88127,7 +38972,7 @@
  	fi
  
  	if test -z "$PYTHON_CONFIG"; then
@@ -90623,7 +93258,7 @@
  $as_echo "$as_me: WARNING: No python-config found" >&2;}
  	else
  
-@@ -84992,11 +37561,7 @@
+@@ -88137,11 +38982,7 @@
  		LIBS="$LIBS `$PYTHON_CONFIG --ldflags`"
  		CFLAGS="$CFLAGS `$PYTHON_CONFIG --includes`"
  
@@ -90635,8 +93270,8 @@
 +		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
  
- 				/* we have our own configure tests */
-@@ -85012,42 +37577,15 @@
+                                 #undef HAVE_UINTPTR_T
+@@ -88158,42 +38999,15 @@
    return 0;
  }
  _ACEOF
@@ -90682,7 +93317,7 @@
  		LIBS="$ac_save_LIBS"
  		CFLAGS="$ac_save_CFLAGS"
  	fi
-@@ -85059,11 +37597,7 @@
+@@ -88205,11 +39019,7 @@
  		LIBS="$LIBS `$PYTHON_CONFIG --ldflags`"
  		CFLAGS="$CFLAGS `$PYTHON_CONFIG --cflags`"
  
@@ -90694,8 +93329,8 @@
 +		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
  
- 				/* we have our own configure tests */
-@@ -85079,42 +37613,15 @@
+                                 #undef HAVE_UINTPTR_T
+@@ -88226,42 +39036,15 @@
    return 0;
  }
  _ACEOF
@@ -90741,7 +93376,7 @@
  		LIBS="$ac_save_LIBS"
  		CFLAGS="$ac_save_CFLAGS"
  	fi
-@@ -85129,11 +37636,7 @@
+@@ -88276,11 +39059,7 @@
  		LIBS="$LIBS `echo -n -L${base}/lib " "; $PYTHON_CONFIG --ldflags`"
  		CFLAGS="$CFLAGS `$PYTHON_CONFIG --includes`"
  
@@ -90753,8 +93388,8 @@
 +		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
  
- 				/* we have our own configure tests */
-@@ -85149,42 +37652,15 @@
+                                 #undef HAVE_UINTPTR_T
+@@ -88297,42 +39076,15 @@
    return 0;
  }
  _ACEOF
@@ -90800,7 +93435,7 @@
  		LIBS="$ac_save_LIBS"
  		CFLAGS="$ac_save_CFLAGS"
  	fi
-@@ -85196,11 +37672,7 @@
+@@ -88344,11 +39096,7 @@
  		LIBS="$LIBS `echo -n -L${base}/lib " "; $PYTHON_CONFIG --ldflags`"
  		CFLAGS="$CFLAGS `$PYTHON_CONFIG --cflags`"
  
@@ -90812,8 +93447,8 @@
 +		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
  
- 				/* we have our own configure tests */
-@@ -85216,42 +37688,15 @@
+                                 #undef HAVE_UINTPTR_T
+@@ -88365,42 +39113,15 @@
    return 0;
  }
  _ACEOF
@@ -90859,7 +93494,7 @@
  		LIBS="$ac_save_LIBS"
  		CFLAGS="$ac_save_CFLAGS"
  	fi
-@@ -85281,11 +37726,7 @@
+@@ -88430,11 +39151,7 @@
  		LIBS="$LIBS $DISTUTILS_LDFLAGS"
  		CFLAGS="$CFLAGS $DISTUTILS_CFLAGS"
  
@@ -90871,8 +93506,8 @@
 +		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
  
- 				/* we have our own configure tests */
-@@ -85301,64 +37742,37 @@
+                                 #undef HAVE_UINTPTR_T
+@@ -88451,64 +39168,37 @@
    return 0;
  }
  _ACEOF
@@ -90945,10 +93580,53 @@
  $as_echo "$merged_build_possible" >&6; }
  
  	# Enable merged build automatically if possible, when in developer mode
-@@ -85411,9 +37825,9 @@
+@@ -88564,9 +39254,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
+-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+ $as_echo_n "checking for $ac_word... " >&6; }
+-if test "${ac_cv_path_PYTHON+set}" = set; then
++if test "${ac_cv_path_PYTHON+set}" = set; then :
+   $as_echo_n "(cached) " >&6
+ else
+   case $PYTHON in
+@@ -88579,14 +39269,14 @@
+ do
+   IFS=$as_save_IFS
+   test -z "$as_dir" && as_dir=.
+-  for ac_exec_ext in '' $ac_executable_extensions; do
++    for ac_exec_ext in '' $ac_executable_extensions; do
+   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+     ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
+-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
++    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+     break 2
+   fi
+ done
+-done
++  done
+ IFS=$as_save_IFS
  
- 	# Extract the first word of "python[$PYTHON_VERSION]", so it can be a program name with args.
- set dummy python$PYTHON_VERSION; ac_word=$2
+   ;;
+@@ -88594,10 +39284,10 @@
+ fi
+ PYTHON=$ac_cv_path_PYTHON
+ if test -n "$PYTHON"; then
+-  { $as_echo "$as_me:$LINENO: result: $PYTHON" >&5
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
+ $as_echo "$PYTHON" >&6; }
+ else
+-  { $as_echo "$as_me:$LINENO: result: no" >&5
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+ $as_echo "no" >&6; }
+ fi
+ 
+@@ -88608,9 +39298,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
 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  $as_echo_n "checking for $ac_word... " >&6; }
@@ -90957,7 +93635,7 @@
    $as_echo_n "(cached) " >&6
  else
    case $PYTHON in
-@@ -85426,14 +37840,14 @@
+@@ -88623,14 +39313,14 @@
  do
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
@@ -90975,7 +93653,7 @@
  IFS=$as_save_IFS
  
    ;;
-@@ -85441,17 +37855,17 @@
+@@ -88638,10 +39328,10 @@
  fi
  PYTHON=$ac_cv_path_PYTHON
  if test -n "$PYTHON"; then
@@ -90988,7 +93666,8 @@
  $as_echo "no" >&6; }
  fi
  
- 
+@@ -88649,7 +39339,7 @@
+ 	fi
  	if test -z "$PYTHON"; then
  		working_python=no
 -		{ $as_echo "$as_me:$LINENO: WARNING: No python found" >&5
@@ -90996,7 +93675,7 @@
  $as_echo "$as_me: WARNING: No python found" >&2;}
  	fi
  
-@@ -85462,9 +37876,9 @@
+@@ -88660,9 +39350,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
@@ -91008,7 +93687,7 @@
    $as_echo_n "(cached) " >&6
  else
    case $PYTHON_CONFIG in
-@@ -85477,14 +37891,14 @@
+@@ -88675,14 +39365,14 @@
  do
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
@@ -91026,7 +93705,7 @@
  IFS=$as_save_IFS
  
    ;;
-@@ -85492,10 +37906,10 @@
+@@ -88690,10 +39380,10 @@
  fi
  PYTHON_CONFIG=$ac_cv_path_PYTHON_CONFIG
  if test -n "$PYTHON_CONFIG"; then
@@ -91039,10 +93718,10 @@
  $as_echo "no" >&6; }
  fi
  
-@@ -85506,9 +37920,9 @@
+@@ -88704,9 +39394,9 @@
  	else
- 		# Extract the first word of "python[$PYTHON_VERSION]-config", so it can be a program name with args.
- set dummy python$PYTHON_VERSION-config; ac_word=$2
+ 		# Extract the first word of "python[$PYTHON_VER]-config", so it can be a program name with args.
+ set dummy python$PYTHON_VER-config; ac_word=$2
 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  $as_echo_n "checking for $ac_word... " >&6; }
@@ -91051,7 +93730,7 @@
    $as_echo_n "(cached) " >&6
  else
    case $PYTHON_CONFIG in
-@@ -85521,14 +37935,14 @@
+@@ -88719,14 +39409,14 @@
  do
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
@@ -91069,7 +93748,7 @@
  IFS=$as_save_IFS
  
    ;;
-@@ -85536,10 +37950,10 @@
+@@ -88734,10 +39424,10 @@
  fi
  PYTHON_CONFIG=$ac_cv_path_PYTHON_CONFIG
  if test -n "$PYTHON_CONFIG"; then
@@ -91082,7 +93761,7 @@
  $as_echo "no" >&6; }
  fi
  
-@@ -85547,7 +37961,7 @@
+@@ -88745,7 +39435,7 @@
  	fi
  
  	if test -z "$PYTHON_CONFIG"; then
@@ -91091,7 +93770,7 @@
  $as_echo "$as_me: WARNING: No python-config found" >&2;}
  	else
  
-@@ -85557,11 +37971,7 @@
+@@ -88755,11 +39445,7 @@
  		LIBS="$LIBS `$PYTHON_CONFIG --ldflags`"
  		CFLAGS="$CFLAGS `$PYTHON_CONFIG --includes`"
  
@@ -91103,8 +93782,8 @@
 +		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
  
- 				/* we have our own configure tests */
-@@ -85577,42 +37987,15 @@
+                                 #undef HAVE_UINTPTR_T
+@@ -88776,42 +39462,15 @@
    return 0;
  }
  _ACEOF
@@ -91150,7 +93829,7 @@
  		LIBS="$ac_save_LIBS"
  		CFLAGS="$ac_save_CFLAGS"
  	fi
-@@ -85624,11 +38007,7 @@
+@@ -88823,11 +39482,7 @@
  		LIBS="$LIBS `$PYTHON_CONFIG --ldflags`"
  		CFLAGS="$CFLAGS `$PYTHON_CONFIG --cflags`"
  
@@ -91162,8 +93841,8 @@
 +		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
  
- 				/* we have our own configure tests */
-@@ -85644,42 +38023,15 @@
+                                 #undef HAVE_UINTPTR_T
+@@ -88844,42 +39499,15 @@
    return 0;
  }
  _ACEOF
@@ -91209,7 +93888,7 @@
  		LIBS="$ac_save_LIBS"
  		CFLAGS="$ac_save_CFLAGS"
  	fi
-@@ -85694,11 +38046,7 @@
+@@ -88894,11 +39522,7 @@
  		LIBS="$LIBS `echo -n -L${base}/lib " "; $PYTHON_CONFIG --ldflags`"
  		CFLAGS="$CFLAGS `$PYTHON_CONFIG --includes`"
  
@@ -91221,8 +93900,8 @@
 +		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
  
- 				/* we have our own configure tests */
-@@ -85714,42 +38062,15 @@
+                                 #undef HAVE_UINTPTR_T
+@@ -88915,42 +39539,15 @@
    return 0;
  }
  _ACEOF
@@ -91268,7 +93947,7 @@
  		LIBS="$ac_save_LIBS"
  		CFLAGS="$ac_save_CFLAGS"
  	fi
-@@ -85761,11 +38082,7 @@
+@@ -88962,11 +39559,7 @@
  		LIBS="$LIBS `echo -n -L${base}/lib " "; $PYTHON_CONFIG --ldflags`"
  		CFLAGS="$CFLAGS `$PYTHON_CONFIG --cflags`"
  
@@ -91280,8 +93959,8 @@
 +		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
  
- 				/* we have our own configure tests */
-@@ -85781,42 +38098,15 @@
+                                 #undef HAVE_UINTPTR_T
+@@ -88983,42 +39576,15 @@
    return 0;
  }
  _ACEOF
@@ -91327,7 +94006,7 @@
  		LIBS="$ac_save_LIBS"
  		CFLAGS="$ac_save_CFLAGS"
  	fi
-@@ -85846,11 +38136,7 @@
+@@ -89048,11 +39614,7 @@
  		LIBS="$LIBS $DISTUTILS_LDFLAGS"
  		CFLAGS="$CFLAGS $DISTUTILS_CFLAGS"
  
@@ -91339,8 +94018,8 @@
 +		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
  
- 				/* we have our own configure tests */
-@@ -85866,52 +38152,25 @@
+                                 #undef HAVE_UINTPTR_T
+@@ -89069,52 +39631,25 @@
    return 0;
  }
  _ACEOF
@@ -91398,7 +94077,7 @@
  $as_echo "yes" >&6; }
  
  
-@@ -85939,20 +38198,18 @@
+@@ -89142,20 +39677,18 @@
  
  
  	else
@@ -91423,10 +94102,18 @@
  $as_echo "$pythondir" >&6; }
  
  
-@@ -85975,545 +38232,125 @@
+@@ -89170,553 +39703,133 @@
  
  
  
+-	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 =
@@ -91440,7 +94127,7 @@
 -LIBREPLACE_NETWORK_ENABLE =
 -"
 -SMB_INFO_ENABLES="$SMB_INFO_ENABLES
--\$enabled{LIBREPLACE_NETWORK} = \"\";"
+-\$enabled{\"LIBREPLACE_NETWORK\"} = \"\";"
 -
 -
 -
@@ -91639,7 +94326,12 @@
 -		 $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"'`
@@ -91647,6 +94339,10 @@
 -  cat >>confdefs.h <<_ACEOF
 -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
 -_ACEOF
+ 
+-fi
+ 
+-done
 +MAKE_SETTINGS="$MAKE_SETTINGS
 +LIBREPLACE_NETWORK_LIBS = ${LIBREPLACE_NETWORK_LIBS}
 +LIBREPLACE_NETWORK_CFLAGS =
@@ -91654,16 +94350,7 @@
 +LIBREPLACE_NETWORK_LDFLAGS =
 +"
  
--fi
  
--done
- 
-+	MAKE_SETTINGS="$MAKE_SETTINGS
-+LIBREPLACE_NETWORK_ENABLE =
-+"
-+SMB_INFO_ENABLES="$SMB_INFO_ENABLES
-+\$enabled{LIBREPLACE_NETWORK} = \"\";"
- 
 -for ac_header in readline/history.h
 -do
 -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
@@ -91715,15 +94402,15 @@
  
 -	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; }
-+MAKE_SETTINGS="$MAKE_SETTINGS
-+LIBREPLACE_CFLAGS = -I../lib/replace
-+LIBREPLACE_ENABLE = YES
-+LIBREPLACE_OBJ_FILES = ${LIBREPLACE_OBJS}
-+"
  
 -# Is the header present?
 -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
@@ -91757,6 +94444,18 @@
 -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
@@ -91768,14 +94467,6 @@
 +###################################
 +"
  
--  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; }
-+LIBREPLACE_HOSTCC_OBJS=`echo ${LIBREPLACE_OBJS} |sed -e 's/\.o/\.ho/g'`
- 
 -# So?  What about this header?
 -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
 -  yes:no: )
@@ -91825,13 +94516,17 @@
 -  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'`
+ 
+-fi
+ 
+-done
 +MAKE_SETTINGS="$MAKE_SETTINGS
 +LIBREPLACE_HOSTCC_CFLAGS = -I../lib/replace
 +LIBREPLACE_HOSTCC_ENABLE = YES
 +LIBREPLACE_HOSTCC_OBJ_FILES = ${LIBREPLACE_HOSTCC_OBJS}
 +"
  
--fi
 +SMB_INFO_SUBSYSTEMS="$SMB_INFO_SUBSYSTEMS
 +###################################
 +# Start Subsystem LIBREPLACE_HOSTCC
@@ -91843,24 +94538,11 @@
 +###################################
 +"
  
--done
  
 +###############################################
 +# Readline included by default unless explicitly asked not to
 +test "${with_readline+set}" != "set" && with_readline=yes
  
-+EXTERNAL_READLINE=no
-+# test for where we get readline() from
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use readline" >&5
-+$as_echo_n "checking whether to use readline... " >&6; }
- 
-+# Check whether --with-readline was given.
-+if test "${with_readline+set}" = set; then :
-+  withval=$with_readline;   case "$with_readline" in
-+  yes)
-+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-+$as_echo "yes" >&6; }
- 
 -for ac_header in readline.h readline/readline.h
 -do
 -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
@@ -91886,6 +94568,18 @@
 -/* 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`
@@ -92049,7 +94743,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -86531,63 +38368,32 @@
+@@ -89734,63 +39847,32 @@
    return 0;
  }
  _ACEOF
@@ -92124,7 +94818,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -86605,43 +38411,18 @@
+@@ -89808,43 +39890,18 @@
    return 0;
  }
  _ACEOF
@@ -92174,7 +94868,7 @@
    TERMLIBS="-lreadline $TERMLIBS"
         EXTERNAL_READLINE=yes
         break
-@@ -86655,11 +38436,11 @@
+@@ -89858,11 +39915,11 @@
  
      ;;
    no)
@@ -92188,7 +94882,7 @@
  $as_echo "yes" >&6; }
  
      # Needed for AC_CHECK_HEADERS and AC_CHECK_LIB to look at
-@@ -86671,151 +38452,12 @@
+@@ -89874,151 +39931,12 @@
      LDFLAGS="-L$with_readline/lib $LDFLAGS"
      CPPFLAGS="-I$with_readline/include $CPPFLAGS"
  
@@ -92346,7 +95040,7 @@
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
-@@ -86824,151 +38466,12 @@
+@@ -90027,151 +39945,12 @@
  
  done
  
@@ -92503,7 +95197,7 @@
  _ACEOF
  
  fi
-@@ -86976,168 +38479,26 @@
+@@ -90179,168 +39958,26 @@
  done
  
  
@@ -92681,7 +95375,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -87155,63 +38516,32 @@
+@@ -90358,63 +39995,32 @@
    return 0;
  }
  _ACEOF
@@ -92756,7 +95450,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -87229,43 +38559,18 @@
+@@ -90432,43 +40038,18 @@
    return 0;
  }
  _ACEOF
@@ -92806,7 +95500,7 @@
    TERMLDFLAGS="-L$with_readline/lib"
         TERMCPPFLAGS="-I$with_readline/include"
         LDFLAGS="-L$with_readline/lib $LDFLAGS"
-@@ -87285,7 +38590,7 @@
+@@ -90488,7 +40069,7 @@
      ;;
    esac
  else
@@ -92815,7 +95509,7 @@
  $as_echo "no" >&6; }
  
  fi
-@@ -87294,18 +38599,14 @@
+@@ -90497,18 +40078,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.
@@ -92837,10 +95531,15 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -87323,134 +38624,45 @@
-   return 0;
- }
- _ACEOF
+@@ -90521,142 +40098,53 @@
+ int
+ main ()
+ {
+-return rl_completion_matches ();
+-  ;
+-  return 0;
+-}
+-_ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -92862,38 +95561,31 @@
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
-+if ac_fn_c_try_link "$LINENO"; then :
-   ac_cv_lib_readline_rl_completion_matches=yes
- else
+-  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
-+  ac_cv_lib_readline_rl_completion_matches=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
+-LIBS=$ac_check_lib_save_LIBS
+-fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
-+{ $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; }
+-$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
-+$as_echo "#define HAVE_NEW_LIBREADLINE 1" >>confdefs.h
- 
- fi
- 
- 
- # not all readline libs have rl_event_hook or history_list
+-
+-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
@@ -92905,8 +95597,11 @@
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
--#include <readline/readline.h>
 -
+-    #include <stdio.h>
+-    #include <readline/readline.h>
+-
+-
 -int
 -main ()
 -{
@@ -92937,39 +95632,61 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_cv_have_decl_rl_event_hook=yes
-+ac_fn_c_check_decl "$LINENO" "rl_event_hook" "ac_cv_have_decl_rl_event_hook" "#include <readline/readline.h>
-+"
-+if test "x$ac_cv_have_decl_rl_event_hook" = x""yes; then :
-+  ac_have_decl=1
++return rl_completion_matches ();
++  ;
++  return 0;
++}
++_ACEOF
++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_have_decl_rl_event_hook=no
-+  ac_have_decl=0
++  ac_cv_lib_readline_rl_completion_matches=no
  fi
- 
+-
 -rm -f core conftest.err conftest.$ac_objext 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
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_rl_event_hook" >&5
 -$as_echo "$ac_cv_have_decl_rl_event_hook" >&6; }
 -if test "x$ac_cv_have_decl_rl_event_hook" = x""yes; then
--
- cat >>confdefs.h <<_ACEOF
++{ $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
 -#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; }
@@ -92988,15 +95705,10 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -87463,65 +38675,36 @@
- int
- main ()
- {
--return history_list ();
--  ;
--  return 0;
--}
--_ACEOF
+@@ -90674,60 +40162,31 @@
+   return 0;
+ }
+ _ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -93018,11 +95730,6 @@
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
-+return history_list ();
-+  ;
-+  return 0;
-+}
-+_ACEOF
 +if ac_fn_c_try_link "$LINENO"; then :
    ac_cv_lib_readline_history_list=yes
  else
@@ -93069,7 +95776,7 @@
  
  
  MAKE_SETTINGS="$MAKE_SETTINGS
-@@ -87576,7 +38759,7 @@
+@@ -90782,7 +40241,7 @@
  ###################################
  "
  
@@ -93078,7 +95785,7 @@
  $as_echo "no" >&6; }
  fi
  
-@@ -87585,102 +38768,9 @@
+@@ -90791,102 +40250,9 @@
  
  
  
@@ -93183,7 +95890,7 @@
  else
  
  cat >>confdefs.h <<_ACEOF
-@@ -87689,102 +38779,9 @@
+@@ -90895,102 +40261,9 @@
  
  fi
  
@@ -93288,7 +95995,7 @@
  else
  
  cat >>confdefs.h <<_ACEOF
-@@ -87794,151 +38791,12 @@
+@@ -91000,151 +40273,12 @@
  fi
  
  
@@ -93444,18 +96151,166 @@
  _ACEOF
  
  else
-@@ -87948,30 +38806,6 @@
+@@ -91154,151 +40288,12 @@
  done
  
  
 -
+ for ac_header in ifaddrs.h
+-do
+-as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+-  { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+-$as_echo_n "checking for $ac_header... " >&6; }
+-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+-  $as_echo_n "(cached) " >&6
+-fi
+-ac_res=`eval 'as_val=${'$as_ac_Header'}
+-		 $as_echo "$as_val"'`
+-	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+-$as_echo "$ac_res" >&6; }
+-else
+-  # Is the header compilable?
+-{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
+-$as_echo_n "checking $ac_header usability... " >&6; }
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
+-$ac_includes_default
+-#include <$ac_header>
+-_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_header_compiler=yes
+-else
+-  $as_echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
 -
+-	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; }
 -
+-# 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
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
+-#include <$ac_header>
+-_ACEOF
+-if { (ac_try="$ac_cpp conftest.$ac_ext"
+-case "(($ac_try" in
+-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+-  *) ac_try_echo=$ac_try;;
+-esac
+-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+-$as_echo "$ac_try_echo") >&5
+-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+-  ac_status=$?
+-  grep -v '^ *+' conftest.er1 >conftest.err
+-  rm -f conftest.er1
+-  cat conftest.err >&5
+-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); } >/dev/null && {
+-	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+-	 test ! -s conftest.err
+-       }; then
+-  ac_header_preproc=yes
+-else
+-  $as_echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
 -
+-  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; }
 -
+-# So?  What about this header?
+-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+-  yes:no: )
+-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+-$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+-$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+-    ac_header_preproc=yes
+-    ;;
+-  no:yes:* )
+-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+-$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+-$as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+-$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+-$as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+-$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+-$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+-    ( cat <<\_ASBOX
+-## ---------------------------------------- ##
+-## Report this to samba-technical at samba.org ##
+-## ---------------------------------------- ##
+-_ASBOX
+-     ) | sed "s/^/$as_me: WARNING:     /" >&2
+-    ;;
+-esac
+-{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+-$as_echo_n "checking for $ac_header... " >&6; }
+-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+-  $as_echo_n "(cached) " >&6
+-else
+-  eval "$as_ac_Header=\$ac_header_preproc"
+-fi
+-ac_res=`eval 'as_val=${'$as_ac_Header'}
+-		 $as_echo "$as_val"'`
+-	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+-$as_echo "$ac_res" >&6; }
 -
+-fi
+-as_val=`eval 'as_val=${'$as_ac_Header'}
+-		 $as_echo "$as_val"'`
+-   if test "x$as_val" = x""yes; then
++do :
++  ac_fn_c_check_header_mongrel "$LINENO" "ifaddrs.h" "ac_cv_header_ifaddrs_h" "$ac_includes_default"
++if test "x$ac_cv_header_ifaddrs_h" = x""yes; then :
+   cat >>confdefs.h <<_ACEOF
+-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
++#define HAVE_IFADDRS_H 1
+ _ACEOF
+ 
+ else
+@@ -91308,29 +40303,6 @@
+ done
+ 
+ 
 -
 -
 -
@@ -93472,10 +96327,17 @@
 -
 -
 -
+-
+-
+-
+-
+-
+-
+-
  for ac_header in 				\
  	crypt.h					\
  	curses.h				\
-@@ -87998,147 +38832,11 @@
+@@ -91356,147 +40328,11 @@
  	netinet6/in6.h				\
  	libintl.h
  
@@ -93628,7 +96490,7 @@
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
-@@ -88148,42 +38846,6 @@
+@@ -91506,42 +40342,6 @@
  done
  
  
@@ -93671,10 +96533,16 @@
  for ac_func in 				\
  	atexit					\
  	cgetent					\
-@@ -88222,98 +38884,11 @@
- 	freehostent				\
- 	writev
- 
+@@ -91574,271 +40374,65 @@
+ 	warn					\
+ 	errx					\
+ 	warnx					\
+-	flock					\
+-	getipnodebyname				\
+-	getipnodebyaddr				\
+-	freehostent				\
+-	writev
+-
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
@@ -93767,39 +96635,39 @@
 -as_val=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+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
-@@ -88324,17 +38899,13 @@
- 
- 
- 
+-  cat >>confdefs.h <<_ACEOF
+-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+-_ACEOF
+-
+-fi
+-done
+-
+-
+-
+-
 -{ $as_echo "$as_me:$LINENO: checking for bswap16" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for bswap16" >&5
- $as_echo_n "checking for bswap16... " >&6; }
+-$as_echo_n "checking for bswap16... " >&6; }
 -if test "${ac_cv_love_func_bswap16+set}" = set; then
-+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
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
- #ifdef HAVE_SYS_BSWAP_H
- #include <sys/bswap.h>
-@@ -88347,140 +38918,25 @@
-   return 0;
- }
- _ACEOF
+-/* end confdefs.h.  */
+-#ifdef HAVE_SYS_BSWAP_H
+-#include <sys/bswap.h>
+-#endif
+-int
+-main ()
+-{
+-bswap16(0)
+-  ;
+-  return 0;
+-}
+-_ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -93821,36 +96689,49 @@
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
-+if ac_fn_c_try_link "$LINENO"; then :
-   eval "ac_cv_love_func_bswap16=yes"
- else
+-  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"
-+  eval "ac_cv_love_func_bswap16=no"
- fi
--
+-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
+ 
 -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_n "(cached) " >&6
--else
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for bswap16" >&5
++$as_echo_n "checking for bswap16... " >&6; }
++if test "${ac_cv_love_func_bswap16+set}" = set; then :
+   $as_echo_n "(cached) " >&6
+ else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
@@ -93873,7 +96754,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.  */
@@ -93886,16 +96767,21 @@
 -    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.  */
++#ifdef HAVE_SYS_BSWAP_H
++#include <sys/bswap.h>
+ #endif
 -
--int
--main ()
--{
+ int
+ main ()
+ {
 -return $ac_func ();
--  ;
--  return 0;
--}
--_ACEOF
++bswap16(0)
+   ;
+   return 0;
+ }
+ _ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -93918,17 +96804,22 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  eval "$as_ac_var=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
 -
 -	eval "$as_ac_var=no"
--fi
++  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
--fi
++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"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
@@ -93936,6 +96827,11 @@
 -as_val=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
++
++
++eval "ac_res=\$ac_cv_love_func_bswap16"
++
++if false; then
 +	for ac_func in bswap16
 +do :
 +  ac_fn_c_check_func "$LINENO" "bswap16" "ac_cv_func_bswap16"
@@ -93946,7 +96842,7 @@
  _ACEOF
  
  fi
-@@ -88496,11 +38952,11 @@
+@@ -91854,11 +40448,11 @@
  #define $ac_tr_func 1
  _ACEOF
  
@@ -93960,7 +96856,7 @@
  $as_echo "no" >&6; }
  	;;
  esac
-@@ -88510,17 +38966,13 @@
+@@ -91868,17 +40462,13 @@
  
  
  
@@ -93981,7 +96877,7 @@
  /* end confdefs.h.  */
  #ifdef HAVE_SYS_BSWAP_H
  #include <sys/bswap.h>
-@@ -88533,140 +38985,25 @@
+@@ -91891,140 +40481,25 @@
    return 0;
  }
  _ACEOF
@@ -94013,18 +96909,21 @@
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	eval "ac_cv_love_func_bswap32=no"
--fi
++  eval "ac_cv_love_func_bswap32=no"
+ fi
 -
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
--fi
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
+ fi
+ 
+ 
+ eval "ac_res=\$ac_cv_love_func_bswap32"
+ 
+ if false; then
 -
--
--eval "ac_res=\$ac_cv_love_func_bswap32"
--
--if false; then
--
 -for ac_func in bswap32
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
@@ -94105,15 +97004,12 @@
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	eval "$as_ac_var=no"
-+  eval "ac_cv_love_func_bswap32=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
@@ -94121,11 +97017,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_bswap32"
-+
-+if false; then
 +	for ac_func in bswap32
 +do :
 +  ac_fn_c_check_func "$LINENO" "bswap32" "ac_cv_func_bswap32"
@@ -94136,7 +97027,7 @@
  _ACEOF
  
  fi
-@@ -88682,11 +39019,11 @@
+@@ -92040,11 +40515,11 @@
  #define $ac_tr_func 1
  _ACEOF
  
@@ -94150,7 +97041,7 @@
  $as_echo "no" >&6; }
  	;;
  esac
-@@ -88697,25 +39034,21 @@
+@@ -92055,25 +40530,21 @@
  
  
  
@@ -94180,7 +97071,7 @@
    ac_cv_struct_winsize=yes; break
  fi
  rm -f conftest*
-@@ -88725,63 +39058,45 @@
+@@ -92083,63 +40554,45 @@
  
  if test "$ac_cv_struct_winsize" = "yes"; then
  
@@ -94255,7 +97146,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <signal.h>
-@@ -88794,35 +39109,14 @@
+@@ -92152,35 +40605,14 @@
    return 0;
  }
  _ACEOF
@@ -94294,7 +97185,7 @@
  $as_echo "$ac_cv_type_signal" >&6; }
  
  cat >>confdefs.h <<_ACEOF
-@@ -88832,9 +39126,7 @@
+@@ -92190,9 +40622,7 @@
  
  if test "$ac_cv_type_signal" = "void" ; then
  
@@ -94305,7 +97196,7 @@
  
  fi
  
-@@ -88865,18 +39157,14 @@
+@@ -92223,18 +40653,14 @@
  
  
  
@@ -94327,7 +97218,7 @@
  /* end confdefs.h.  */
  #ifdef HAVE_SYS_TYPES_H
  #include <sys/types.h>
-@@ -88893,44 +39181,15 @@
+@@ -92251,44 +40677,15 @@
    return 0;
  }
  _ACEOF
@@ -94377,7 +97268,7 @@
  /* end confdefs.h.  */
  extern int h_errno;
  int foo(void) { return h_errno; }
-@@ -88942,44 +39201,19 @@
+@@ -92300,44 +40697,19 @@
    return 0;
  }
  _ACEOF
@@ -94427,7 +97318,7 @@
  $as_echo "$ac_foo" >&6; }
  if test "$ac_foo" = yes; then
  
-@@ -88987,85 +39221,26 @@
+@@ -92345,81 +40717,23 @@
  #define HAVE_H_ERRNO 1
  _ACEOF
  
@@ -94488,15 +97379,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
@@ -94509,17 +97400,176 @@
  _ACEOF
  
 -
+-fi
+-
+-
  fi
  
  
+@@ -92435,151 +40749,12 @@
+ 
+ 
+ 
+-
+-
+-
+ for ac_header in pty.h util.h libutil.h
+-do
+-as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+-  { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+-$as_echo_n "checking for $ac_header... " >&6; }
+-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+-  $as_echo_n "(cached) " >&6
 -fi
+-ac_res=`eval 'as_val=${'$as_ac_Header'}
+-		 $as_echo "$as_val"'`
+-	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+-$as_echo "$ac_res" >&6; }
+-else
+-  # Is the header compilable?
+-{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
+-$as_echo_n "checking $ac_header usability... " >&6; }
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
+-$ac_includes_default
+-#include <$ac_header>
+-_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_header_compiler=yes
+-else
+-  $as_echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
 -
+-	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; }
 -
+-# 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
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
+-#include <$ac_header>
+-_ACEOF
+-if { (ac_try="$ac_cpp conftest.$ac_ext"
+-case "(($ac_try" in
+-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+-  *) ac_try_echo=$ac_try;;
+-esac
+-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+-$as_echo "$ac_try_echo") >&5
+-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+-  ac_status=$?
+-  grep -v '^ *+' conftest.er1 >conftest.err
+-  rm -f conftest.er1
+-  cat conftest.err >&5
+-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); } >/dev/null && {
+-	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+-	 test ! -s conftest.err
+-       }; then
+-  ac_header_preproc=yes
+-else
+-  $as_echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-  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; }
+-
+-# So?  What about this header?
+-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+-  yes:no: )
+-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+-$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+-$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+-    ac_header_preproc=yes
+-    ;;
+-  no:yes:* )
+-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+-$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+-$as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+-$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+-$as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+-$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+-$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+-    ( cat <<\_ASBOX
+-## ---------------------------------------- ##
+-## Report this to samba-technical at samba.org ##
+-## ---------------------------------------- ##
+-_ASBOX
+-     ) | sed "s/^/$as_me: WARNING:     /" >&2
+-    ;;
+-esac
+-{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+-$as_echo_n "checking for $ac_header... " >&6; }
+-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+-  $as_echo_n "(cached) " >&6
+-else
+-  eval "$as_ac_Header=\$ac_header_preproc"
+-fi
+-ac_res=`eval 'as_val=${'$as_ac_Header'}
+-		 $as_echo "$as_val"'`
+-	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+-$as_echo "$ac_res" >&6; }
+-
+-fi
+-as_val=`eval 'as_val=${'$as_ac_Header'}
+-		 $as_echo "$as_val"'`
+-   if test "x$as_val" = x""yes; then
++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
+@@ -92591,23 +40766,17 @@
  
  
  
-@@ -89086,17 +39261,12 @@
+-
+ ac_check_lib_ext_save_LIBS=$LIBS
+ LIBS="-lutil $OPENPTY_LIBS  $LIBS"
  
  
  
@@ -94540,7 +97590,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -89114,54 +39284,28 @@
+@@ -92625,54 +40794,28 @@
    return 0;
  }
  _ACEOF
@@ -94602,7 +97652,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_LIBUTIL 1
  _ACEOF
-@@ -89178,7 +39322,6 @@
+@@ -92689,7 +40832,6 @@
  fi
  
  
@@ -94610,7 +97660,7 @@
  	MAKE_SETTINGS="$MAKE_SETTINGS
  OPENPTY_ENABLE = YES
  "
-@@ -89198,23 +39341,17 @@
+@@ -92709,23 +40851,17 @@
  
  
  
@@ -94637,7 +97687,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -89232,54 +39369,28 @@
+@@ -92743,54 +40879,28 @@
    return 0;
  }
  _ACEOF
@@ -94699,7 +97749,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_LIBINTL 1
  _ACEOF
-@@ -89296,7 +39407,6 @@
+@@ -92807,7 +40917,6 @@
  fi
  
  
@@ -94707,12 +97757,13 @@
  	MAKE_SETTINGS="$MAKE_SETTINGS
  INTL_ENABLE = YES
  "
-@@ -89320,151 +39430,12 @@
+@@ -92831,150 +40940,12 @@
  
  
  
 -
- for ac_header in arpa/nameser.h
+-
+ for ac_header in arpa/nameser.h dns.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
@@ -94855,15 +97906,14 @@
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
 +do :
-+  ac_fn_c_check_header_mongrel "$LINENO" "arpa/nameser.h" "ac_cv_header_arpa_nameser_h" "$ac_includes_default"
-+if test "x$ac_cv_header_arpa_nameser_h" = x""yes; then :
++  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
++ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
++eval as_val=\$$as_ac_Header
++   if test "x$as_val" = x""yes; then :
    cat >>confdefs.h <<_ACEOF
--#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-+#define HAVE_ARPA_NAMESER_H 1
+ #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
- 
- fi
-@@ -89472,22 +39443,9 @@
+@@ -92984,22 +40955,9 @@
  done
  
  
@@ -94888,7 +97938,7 @@
  #ifdef HAVE_SYS_TYPES_H
  #include <sys/types.h>
  #endif
-@@ -89498,46 +39456,10 @@
+@@ -93010,46 +40968,10 @@
  #include <arpa/nameser.h>
  #endif
  
@@ -94938,7 +97988,7 @@
  _ACEOF
  
  fi
-@@ -89549,9 +39471,9 @@
+@@ -93061,9 +40983,9 @@
  
  
  
@@ -94950,7 +98000,7 @@
    $as_echo_n "(cached) " >&6
  else
  
-@@ -89566,11 +39488,7 @@
+@@ -93078,11 +41000,7 @@
  		*) ac_lib="-l$ac_lib" ;;
  		esac
  		LIBS=" $ac_lib  $ac_save_LIBS"
@@ -94963,10 +98013,13 @@
  /* end confdefs.h.  */
  
  #include <stdio.h>
-@@ -89595,38 +39513,11 @@
-   return 0;
- }
- _ACEOF
+@@ -93104,148 +41022,31 @@
+ {
+ 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
@@ -94988,28 +98041,29 @@
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
-+if ac_fn_c_try_link "$LINENO"; then :
-   eval "if test -n \"$ac_lib\";then ac_cv_funclib_res_search=$ac_lib; else ac_cv_funclib_res_search=yes; fi";break
+-  eval "if test -n \"$ac_lib\";then ac_cv_funclib_res_search=$ac_lib; else ac_cv_funclib_res_search=yes; fi";break
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -
- fi
+-fi
 -
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
-+rm -f core conftest.err conftest.$ac_objext \
-+    conftest$ac_exeext conftest.$ac_ext
- 	done
- 	eval "ac_cv_funclib_res_search=\${ac_cv_funclib_res_search-no}"
- 	LIBS="$ac_save_LIBS"
-@@ -89638,102 +39529,12 @@
- eval "ac_res=\$ac_cv_funclib_res_search"
- 
- if false; then
+-	done
+-	eval "ac_cv_funclib_res_search=\${ac_cv_funclib_res_search-no}"
+-	LIBS="$ac_save_LIBS"
+-fi
 -
+-fi
+-
+-
+-eval "ac_res=\$ac_cv_funclib_res_search"
+-
+-if false; then
+-
 -for ac_func in res_search
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
@@ -95090,12 +98144,23 @@
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	eval "$as_ac_var=no"
--fi
--
++  return 0;
++}
++_ACEOF
++if ac_fn_c_try_link "$LINENO"; then :
++  eval "if test -n \"$ac_lib\";then ac_cv_funclib_res_search=$ac_lib; else ac_cv_funclib_res_search=yes; fi";break
++fi
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
++	done
++	eval "ac_cv_funclib_res_search=\${ac_cv_funclib_res_search-no}"
++	LIBS="$ac_save_LIBS"
+ fi
+ 
 -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
@@ -95103,6 +98168,11 @@
 -as_val=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
++
++
++eval "ac_res=\$ac_cv_funclib_res_search"
++
++if false; then
 +	for ac_func in res_search
 +do :
 +  ac_fn_c_check_func "$LINENO" "res_search" "ac_cv_func_res_search"
@@ -95113,7 +98183,7 @@
  _ACEOF
  
  fi
-@@ -89753,13 +39554,13 @@
+@@ -93265,13 +41066,13 @@
  #define $ac_tr_func 1
  _ACEOF
  
@@ -95129,7 +98199,7 @@
  $as_echo "no" >&6; }
  	;;
  	*)
-@@ -89773,7 +39574,7 @@
+@@ -93285,7 +41086,7 @@
  #define $ac_tr_lib 1
  _ACEOF
  
@@ -95138,7 +98208,7 @@
  $as_echo "yes, in $ac_res" >&6; }
  	;;
  esac
-@@ -89788,9 +39589,9 @@
+@@ -93300,9 +41101,9 @@
  
  
  
@@ -95150,7 +98220,7 @@
    $as_echo_n "(cached) " >&6
  else
  
-@@ -89805,11 +39606,7 @@
+@@ -93317,11 +41118,7 @@
  		*) ac_lib="-l$ac_lib" ;;
  		esac
  		LIBS=" $ac_lib  $ac_save_LIBS"
@@ -95163,7 +98233,7 @@
  /* end confdefs.h.  */
  
  #include <stdio.h>
-@@ -89834,38 +39631,11 @@
+@@ -93346,38 +41143,11 @@
    return 0;
  }
  _ACEOF
@@ -95205,7 +98275,7 @@
  	done
  	eval "ac_cv_funclib_res_nsearch=\${ac_cv_funclib_res_nsearch-no}"
  	LIBS="$ac_save_LIBS"
-@@ -89877,102 +39647,12 @@
+@@ -93389,102 +41159,12 @@
  eval "ac_res=\$ac_cv_funclib_res_nsearch"
  
  if false; then
@@ -95313,7 +98383,7 @@
  _ACEOF
  
  fi
-@@ -89992,13 +39672,13 @@
+@@ -93504,13 +41184,13 @@
  #define $ac_tr_func 1
  _ACEOF
  
@@ -95329,7 +98399,7 @@
  $as_echo "no" >&6; }
  	;;
  	*)
-@@ -90012,7 +39692,7 @@
+@@ -93524,7 +41204,7 @@
  #define $ac_tr_lib 1
  _ACEOF
  
@@ -95338,7 +98408,7 @@
  $as_echo "yes, in $ac_res" >&6; }
  	;;
  esac
-@@ -90027,9 +39707,9 @@
+@@ -93539,9 +41219,9 @@
  
  
  
@@ -95350,7 +98420,7 @@
    $as_echo_n "(cached) " >&6
  else
  
-@@ -90044,11 +39724,7 @@
+@@ -93556,11 +41236,7 @@
  		*) ac_lib="-l$ac_lib" ;;
  		esac
  		LIBS=" $ac_lib  $ac_save_LIBS"
@@ -95363,7 +98433,7 @@
  /* end confdefs.h.  */
  
  #include <stdio.h>
-@@ -90073,38 +39749,11 @@
+@@ -93585,38 +41261,11 @@
    return 0;
  }
  _ACEOF
@@ -95405,7 +98475,7 @@
  	done
  	eval "ac_cv_funclib_res_ndestroy=\${ac_cv_funclib_res_ndestroy-no}"
  	LIBS="$ac_save_LIBS"
-@@ -90116,102 +39765,12 @@
+@@ -93628,102 +41277,12 @@
  eval "ac_res=\$ac_cv_funclib_res_ndestroy"
  
  if false; then
@@ -95513,7 +98583,7 @@
  _ACEOF
  
  fi
-@@ -90231,13 +39790,13 @@
+@@ -93743,13 +41302,13 @@
  #define $ac_tr_func 1
  _ACEOF
  
@@ -95529,7 +98599,7 @@
  $as_echo "no" >&6; }
  	;;
  	*)
-@@ -90251,7 +39810,7 @@
+@@ -93763,7 +41322,7 @@
  #define $ac_tr_lib 1
  _ACEOF
  
@@ -95538,49 +98608,127 @@
  $as_echo "yes, in $ac_res" >&6; }
  	;;
  esac
-@@ -90266,9 +39825,9 @@
+@@ -93777,9 +41336,9 @@
  
  
  
--{ $as_echo "$as_me:$LINENO: checking for dn_expand" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dn_expand" >&5
- $as_echo_n "checking for dn_expand... " >&6; }
--if test "${ac_cv_funclib_dn_expand+set}" = set; then
-+if test "${ac_cv_funclib_dn_expand+set}" = set; then :
+-{ $as_echo "$as_me:$LINENO: checking for dns_search" >&5
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dns_search" >&5
+ $as_echo_n "checking for dns_search... " >&6; }
+-if test "${ac_cv_funclib_dns_search+set}" = set; then
++if test "${ac_cv_funclib_dns_search+set}" = set; then :
    $as_echo_n "(cached) " >&6
  else
  
-@@ -90281,176 +39840,55 @@
- 		no) continue ;;
- 		-l*) ;;
+@@ -93794,11 +41353,7 @@
  		*) ac_lib="-l$ac_lib" ;;
--		esac
--		LIBS=" $ac_lib  $ac_save_LIBS"
+ 		esac
+ 		LIBS=" $ac_lib  $ac_save_LIBS"
 -		cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
++		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ 
+ #ifdef HAVE_DNS_H
+@@ -93813,38 +41368,11 @@
+   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
++if ac_fn_c_try_link "$LINENO"; then :
+   eval "if test -n \"$ac_lib\";then ac_cv_funclib_dns_search=$ac_lib; else ac_cv_funclib_dns_search=yes; fi";break
+-else
+-  $as_echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-
+ fi
+-
+-rm -rf conftest.dSYM
+-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+-      conftest$ac_exeext conftest.$ac_ext
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
+ 	done
+ 	eval "ac_cv_funclib_dns_search=\${ac_cv_funclib_dns_search-no}"
+ 	LIBS="$ac_save_LIBS"
+@@ -93856,102 +41384,12 @@
+ eval "ac_res=\$ac_cv_funclib_dns_search"
+ 
+ if false; then
+-
+-for ac_func in dns_search
+-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
 -
--#include <stdio.h>
--#ifdef HAVE_SYS_TYPES_H
--#include <sys/types.h>
+-/* System header to define __stub macros and hopefully few prototypes,
+-    which can conflict with char $ac_func (); below.
+-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+-    <limits.h> exists even on freestanding compilers.  */
+-
+-#ifdef __STDC__
+-# include <limits.h>
+-#else
+-# include <assert.h>
 -#endif
--#ifdef HAVE_NETINET_IN_H
--#include <netinet/in.h>
+-
+-#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
--#ifdef HAVE_ARPA_NAMESER_H
--#include <arpa/nameser.h>
+-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_RESOLV_H
--#include <resolv.h>
--#endif
 -
 -int
 -main ()
 -{
--dn_expand(0,0,0,0,0)
+-return $ac_func ();
 -  ;
 -  return 0;
 -}
@@ -95606,29 +98754,132 @@
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
--  eval "if test -n \"$ac_lib\";then ac_cv_funclib_dn_expand=$ac_lib; else ac_cv_funclib_dn_expand=yes; fi";break
+-  eval "$as_ac_var=yes"
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
--
+-	eval "$as_ac_var=no"
 -fi
 -
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
--	done
--	eval "ac_cv_funclib_dn_expand=\${ac_cv_funclib_dn_expand-no}"
--	LIBS="$ac_save_LIBS"
 -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 dns_search
++do :
++  ac_fn_c_check_func "$LINENO" "dns_search" "ac_cv_func_dns_search"
++if test "x$ac_cv_func_dns_search" = x""yes; then :
+   cat >>confdefs.h <<_ACEOF
+-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
++#define HAVE_DNS_SEARCH 1
+ _ACEOF
+ 
+ fi
+@@ -93971,13 +41409,13 @@
+ #define $ac_tr_func 1
+ _ACEOF
+ 
+-	{ $as_echo "$as_me:$LINENO: result: yes" >&5
++	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+ $as_echo "yes" >&6; }
+ 	;;
+ 	no)
+ 	eval "ac_cv_func_dns_search=no"
+ 	eval "LIB_dns_search="
+-	{ $as_echo "$as_me:$LINENO: result: no" >&5
++	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+ $as_echo "no" >&6; }
+ 	;;
+ 	*)
+@@ -93991,7 +41429,7 @@
+ #define $ac_tr_lib 1
+ _ACEOF
+ 
+-	{ $as_echo "$as_me:$LINENO: result: yes, in $ac_res" >&5
++	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, in $ac_res" >&5
+ $as_echo "yes, in $ac_res" >&6; }
+ 	;;
+ esac
+@@ -94003,9 +41441,9 @@
+ 
+ 
+ 
+-{ $as_echo "$as_me:$LINENO: checking for dn_expand" >&5
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dn_expand" >&5
+ $as_echo_n "checking for dn_expand... " >&6; }
+-if test "${ac_cv_funclib_dn_expand+set}" = set; then
++if test "${ac_cv_funclib_dn_expand+set}" = set; then :
+   $as_echo_n "(cached) " >&6
+ else
+ 
+@@ -94020,11 +41458,7 @@
+ 		*) ac_lib="-l$ac_lib" ;;
+ 		esac
+ 		LIBS=" $ac_lib  $ac_save_LIBS"
+-		cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ 
+ #include <stdio.h>
+@@ -94049,38 +41483,11 @@
+   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
++if ac_fn_c_try_link "$LINENO"; then :
+   eval "if test -n \"$ac_lib\";then ac_cv_funclib_dn_expand=$ac_lib; else ac_cv_funclib_dn_expand=yes; fi";break
+-else
+-  $as_echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
 -
--fi
 -
+ fi
 -
--eval "ac_res=\$ac_cv_funclib_dn_expand"
+-rm -rf conftest.dSYM
+-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+-      conftest$ac_exeext conftest.$ac_ext
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
+ 	done
+ 	eval "ac_cv_funclib_dn_expand=\${ac_cv_funclib_dn_expand-no}"
+ 	LIBS="$ac_save_LIBS"
+@@ -94092,102 +41499,12 @@
+ eval "ac_res=\$ac_cv_funclib_dn_expand"
+ 
+ if false; then
 -
--if false; then
--
 -for ac_func in dn_expand
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
@@ -95642,10 +98893,7 @@
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+		esac
-+		LIBS=" $ac_lib  $ac_save_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
@@ -95654,15 +98902,12 @@
 -    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>
-+#include <stdio.h>
-+#ifdef HAVE_SYS_TYPES_H
-+#include <sys/types.h>
- #endif
+-#endif
 -
 -#undef $ac_func
 -
@@ -95671,31 +98916,23 @@
 -   builtin and then its argument prototype would still apply.  */
 -#ifdef __cplusplus
 -extern "C"
-+#ifdef HAVE_NETINET_IN_H
-+#include <netinet/in.h>
- #endif
+-#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
-+#ifdef HAVE_ARPA_NAMESER_H
-+#include <arpa/nameser.h>
-+#endif
-+#ifdef HAVE_RESOLV_H
-+#include <resolv.h>
- #endif
- 
- int
- main ()
- {
+-#endif
+-
+-int
+-main ()
+-{
 -return $ac_func ();
-+dn_expand(0,0,0,0,0)
-   ;
-   return 0;
- }
- _ACEOF
+-  ;
+-  return 0;
+-}
+-_ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -95723,20 +98960,12 @@
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	eval "$as_ac_var=no"
-+if ac_fn_c_try_link "$LINENO"; then :
-+  eval "if test -n \"$ac_lib\";then ac_cv_funclib_dn_expand=$ac_lib; else ac_cv_funclib_dn_expand=yes; fi";break
-+fi
-+rm -f core conftest.err conftest.$ac_objext \
-+    conftest$ac_exeext conftest.$ac_ext
-+	done
-+	eval "ac_cv_funclib_dn_expand=\${ac_cv_funclib_dn_expand-no}"
-+	LIBS="$ac_save_LIBS"
- fi
- 
+-fi
+-
 -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
@@ -95744,11 +98973,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_funclib_dn_expand"
-+
-+if false; then
 +	for ac_func in dn_expand
 +do :
 +  ac_fn_c_check_func "$LINENO" "dn_expand" "ac_cv_func_dn_expand"
@@ -95759,7 +98983,7 @@
  _ACEOF
  
  fi
-@@ -90470,13 +39908,13 @@
+@@ -94207,13 +41524,13 @@
  #define $ac_tr_func 1
  _ACEOF
  
@@ -95775,7 +98999,7 @@
  $as_echo "no" >&6; }
  	;;
  	*)
-@@ -90490,7 +39928,7 @@
+@@ -94227,7 +41544,7 @@
  #define $ac_tr_lib 1
  _ACEOF
  
@@ -95784,7 +99008,7 @@
  $as_echo "yes, in $ac_res" >&6; }
  	;;
  esac
-@@ -90502,18 +39940,14 @@
+@@ -94239,18 +41556,14 @@
  
  
  
@@ -95806,7 +99030,7 @@
  /* end confdefs.h.  */
  #include <stdio.h>
  #ifdef HAVE_SYS_TYPES_H
-@@ -90537,44 +39971,15 @@
+@@ -94274,44 +41587,15 @@
    return 0;
  }
  _ACEOF
@@ -95856,7 +99080,7 @@
  /* end confdefs.h.  */
  extern int _res;
  int foo(void) { return _res; }
-@@ -90586,44 +39991,19 @@
+@@ -94323,44 +41607,19 @@
    return 0;
  }
  _ACEOF
@@ -95906,7 +99130,7 @@
  $as_echo "$ac_foo" >&6; }
  if test "$ac_foo" = yes; then
  
-@@ -90631,18 +40011,7 @@
+@@ -94368,18 +41627,7 @@
  #define HAVE__RES 1
  _ACEOF
  
@@ -95926,7 +99150,7 @@
  #ifdef HAVE_SYS_TYPES_H
  #include <sys/types.h>
  #endif
-@@ -90655,64 +40024,17 @@
+@@ -94392,64 +41640,17 @@
  #ifdef HAVE_RESOLV_H
  #include <resolv.h>
  #endif
@@ -95996,7 +99220,7 @@
  fi
  
  
-@@ -90778,9 +40100,9 @@
+@@ -94515,9 +41716,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
@@ -96008,7 +99232,7 @@
    $as_echo_n "(cached) " >&6
  else
    if test -n "$LEX"; then
-@@ -90791,24 +40113,24 @@
+@@ -94528,24 +41729,24 @@
  do
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
@@ -96038,7 +99262,7 @@
  $as_echo "no" >&6; }
  fi
  
-@@ -90837,20 +40159,20 @@
+@@ -94574,20 +41775,20 @@
    return ! yylex () + ! yywrap ();
  }
  _ACEOF
@@ -96066,7 +99290,7 @@
    $as_echo_n "(cached) " >&6
  else
  
-@@ -90859,19 +40181,17 @@
+@@ -94596,19 +41797,17 @@
  elif test -f lexyy.c; then
    ac_cv_prog_lex_root=lexyy
  else
@@ -96090,7 +99314,7 @@
    $as_echo_n "(cached) " >&6
  else
  
-@@ -90879,55 +40199,29 @@
+@@ -94616,55 +41815,29 @@
      ac_cv_lib_lex='none needed'
      for ac_lib in '' -lfl -ll; do
        LIBS="$ac_lib $ac_save_LIBS"
@@ -96154,7 +99378,7 @@
    $as_echo_n "(cached) " >&6
  else
    # POSIX says lex can declare yytext either as a pointer or an array; the
-@@ -90936,52 +40230,24 @@
+@@ -94673,52 +41846,24 @@
  ac_cv_prog_lex_yytext_pointer=no
  ac_save_LIBS=$LIBS
  LIBS="$LEXLIB $ac_save_LIBS"
@@ -96214,7 +99438,7 @@
  
  fi
  rm -f conftest.l $LEX_OUTPUT_ROOT.c
-@@ -90991,9 +40257,9 @@
+@@ -94728,9 +41873,9 @@
  if test x"$LEX_BASENAME" = x"flex"; then
  	# "flex 2.5.33"
  	FLEX_VERSION=`$LEX --version | cut -d ' ' -f2`
@@ -96226,7 +99450,7 @@
  $as_echo "$FLEX_VERSION" >&6; }
  	FLEX_MAJOR=`echo $FLEX_VERSION | cut -d '.' -f1`
  	FLEX_MINOR=`echo $FLEX_VERSION | cut -d '.' -f2`
-@@ -91006,9 +40272,9 @@
+@@ -94743,9 +41888,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
@@ -96238,7 +99462,7 @@
    $as_echo_n "(cached) " >&6
  else
    if test -n "$YACC"; then
-@@ -91019,24 +40285,24 @@
+@@ -94756,24 +41901,24 @@
  do
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
@@ -96268,7 +99492,7 @@
  $as_echo "no" >&6; }
  fi
  
-@@ -91049,9 +40315,9 @@
+@@ -94786,9 +41931,9 @@
  if test x"$YACC_BASENAME" = x"bison -y"; then
  	# bison (GNU Bison) 2.3
  	BISON_VERSION=`$YACC --version | head -1 | cut -d ' ' -f4`
@@ -96280,7 +99504,7 @@
  $as_echo "$BISON_VERSION" >&6; }
  	BISON_MAJOR=`echo $BISON_VERSION | cut -d '.' -f1`
  	BISON_MINOR=`echo $BISON_VERSION | cut -d '.' -f2`
-@@ -91059,7 +40325,7 @@
+@@ -94796,7 +41941,7 @@
  	YACC_VERSION="bison-$BISON_MAJOR.$BISON_MINOR"
  fi
  
@@ -96289,7 +99513,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
-@@ -91075,7 +40341,7 @@
+@@ -94812,7 +41957,7 @@
  	LEX=false
  	YACC=false
  fi
@@ -96298,7 +99522,7 @@
  $as_echo "$LEX_YACC" >&6; }
  
  # Portions of heimdal kerberos are unpacked into source/heimdal
-@@ -91083,21 +40349,15 @@
+@@ -94820,21 +41965,15 @@
  
  # if we ever get to using a host kerberos, we might add conditionals here
  
@@ -96323,23 +99547,35 @@
  
  HAVE_GSSAPI=YES
  
-@@ -91189,9 +40449,7 @@
- VPATH="$VPATH:\$(HEIMDAL_VPATH)"
+@@ -94914,193 +42053,48 @@
+ SMB_INFO_ENABLES="$SMB_INFO_ENABLES
+ \$enabled{\"HEIMDAL_ROKEN_PROGNAME\"} = \"YES\";"
  
- 
+-
+-	MAKE_SETTINGS="$MAKE_SETTINGS
+-HEIMDAL_ROKEN_PROGNAME_H_ENABLE = YES
+-"
+-SMB_INFO_ENABLES="$SMB_INFO_ENABLES
+-\$enabled{\"HEIMDAL_ROKEN_PROGNAME_H\"} = \"YES\";"
+-
+-fi
+-
+-VPATH="$VPATH:\$(HEIMDAL_VPATH)"
+-
+-
 -cat >>confdefs.h <<\_ACEOF
 -#define SAMBA4_INTERNAL_HEIMDAL 1
 -_ACEOF
-+$as_echo "#define SAMBA4_INTERNAL_HEIMDAL 1" >>confdefs.h
- 
- 
- 
-@@ -91200,170 +40458,27 @@
- "
- 
- 
 -
- for ac_header in execinfo.h
+-
+-
+-SMB_INFO_EXT_LIBS="$SMB_INFO_EXT_LIBS
+-mkinclude heimdal_build/internal.mk
+-"
+-
+-
+-
+-for ac_header in execinfo.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
@@ -96477,10 +99713,31 @@
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
 -$as_echo "$ac_res" >&6; }
 -
--fi
++
++	MAKE_SETTINGS="$MAKE_SETTINGS
++HEIMDAL_ROKEN_PROGNAME_H_ENABLE = YES
++"
++SMB_INFO_ENABLES="$SMB_INFO_ENABLES
++\$enabled{\"HEIMDAL_ROKEN_PROGNAME_H\"} = \"YES\";"
++
+ 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
++
++
++
++SMB_INFO_EXT_LIBS="$SMB_INFO_EXT_LIBS
++mkinclude heimdal_build/internal.mk
++"
++
++
++for ac_header in execinfo.h
 +do :
 +  ac_fn_c_check_header_mongrel "$LINENO" "execinfo.h" "ac_cv_header_execinfo_h" "$ac_includes_default"
 +if test "x$ac_cv_header_execinfo_h" = x""yes; then :
@@ -96512,7 +99769,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -91381,46 +40496,15 @@
+@@ -95118,46 +42112,15 @@
    return 0;
  }
  _ACEOF
@@ -96563,7 +99820,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -91438,65 +40522,32 @@
+@@ -95175,65 +42138,32 @@
    return 0;
  }
  _ACEOF
@@ -96637,7 +99894,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.  */
-@@ -91537,43 +40588,18 @@
+@@ -95274,43 +42204,18 @@
    return 0;
  }
  _ACEOF
@@ -96687,7 +99944,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_BACKTRACE 1
  _ACEOF
-@@ -91581,7 +40607,6 @@
+@@ -95318,7 +42223,6 @@
  fi
  
  
@@ -96695,7 +99952,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
-@@ -91613,102 +40638,12 @@
+@@ -95404,102 +42308,12 @@
  
  
  
@@ -96803,7 +100060,7 @@
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
  _ACEOF
-@@ -91717,102 +40652,12 @@
+@@ -95508,102 +42322,12 @@
  done
  
  
@@ -96910,16 +100167,17 @@
  _ACEOF
  
  fi
-@@ -91821,221 +40666,33 @@
+@@ -95612,153 +42336,14 @@
  
  #################################################
  # these tests are taken from the GNU fileutils package
 -{ $as_echo "$as_me:$LINENO: checking how to get filesystem space usage..." >&5
--$as_echo "$as_me: checking how to get filesystem space usage..." >&6;}
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to get filesystem space usage..." >&5
+ $as_echo "$as_me: checking how to get filesystem space usage..." >&6;}
 -
 -
 -
--for ac_header in sys/statfs.h sys/statvfs.h sys/vfs.h
+ for ac_header in sys/statfs.h sys/statvfs.h sys/vfs.h
 -do
 -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
@@ -97061,17 +100319,20 @@
 -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
++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
+@@ -95768,65 +42353,16 @@
+ done
+ 
+ 
 -
--fi
--
--done
--
--
--
--for ac_header in sys/mount.h
+ for ac_header in sys/mount.h
 -do
 -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
@@ -97086,9 +100347,11 @@
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
 -$ac_includes_default
--#ifdef HAVE_SYS_PARAM_H
--#include <sys/param.h>
--#endif
++do :
++  ac_fn_c_check_header_compile "$LINENO" "sys/mount.h" "ac_cv_header_sys_mount_h" "$ac_includes_default
+ #ifdef HAVE_SYS_PARAM_H
+ #include <sys/param.h>
+ #endif
 -
 -#include <$ac_header>
 -_ACEOF
@@ -97114,21 +100377,10 @@
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to get filesystem space usage..." >&5
-+$as_echo "$as_me: checking how to get filesystem space usage..." >&6;}
-+for ac_header in sys/statfs.h sys/statvfs.h sys/vfs.h
-+do :
-+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-+eval as_val=\$$as_ac_Header
-+   if test "x$as_val" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-+_ACEOF
- 
+-
 -	eval "$as_ac_Header=no"
- fi
- 
+-fi
+-
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -fi
 -ac_res=`eval 'as_val=${'$as_ac_Header'}
@@ -97138,15 +100390,6 @@
 -as_val=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+done
-+
-+
-+for ac_header in sys/mount.h
-+do :
-+  ac_fn_c_check_header_compile "$LINENO" "sys/mount.h" "ac_cv_header_sys_mount_h" "$ac_includes_default
-+#ifdef HAVE_SYS_PARAM_H
-+#include <sys/param.h>
-+#endif
 +"
 +if test "x$ac_cv_header_sys_mount_h" = x""yes; then :
    cat >>confdefs.h <<_ACEOF
@@ -97155,7 +100398,7 @@
  _ACEOF
  
  fi
-@@ -92048,19 +40705,15 @@
+@@ -95839,19 +42375,15 @@
  # Test for statvfs64.
  if test $space = no; then
    # SVR4
@@ -97179,7 +100422,7 @@
  /* end confdefs.h.  */
  
  #if defined(HAVE_UNISTD_H)
-@@ -92074,51 +40727,22 @@
+@@ -95865,51 +42397,22 @@
      exit (statvfs64 (".", &fsd));
    }
  _ACEOF
@@ -97237,7 +100480,7 @@
  
    fi
  fi
-@@ -92131,16 +40755,12 @@
+@@ -95922,16 +42425,12 @@
  # is what it gets when this test fails.
  if test $space = no; then
    # SVR4
@@ -97257,7 +100500,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <sys/statvfs.h>
-@@ -92152,64 +40772,33 @@
+@@ -95943,64 +42442,33 @@
    return 0;
  }
  _ACEOF
@@ -97331,7 +100574,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <sys/statvfs.h>
-@@ -92221,59 +40810,32 @@
+@@ -96012,59 +42480,32 @@
    return 0;
  }
  _ACEOF
@@ -97399,7 +100642,7 @@
  /* end confdefs.h.  */
  
  #include <sys/param.h>
-@@ -92286,71 +40848,38 @@
+@@ -96077,71 +42518,38 @@
      exit (statfs (".", &fsd, sizeof (struct statfs)));
    }
  _ACEOF
@@ -97481,7 +100724,7 @@
  /* end confdefs.h.  */
  
  #ifdef HAVE_SYS_PARAM_H
-@@ -92369,71 +40898,38 @@
+@@ -96160,71 +42568,38 @@
    exit (statfs (".", &fsd));
    }
  _ACEOF
@@ -97563,7 +100806,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <sys/statfs.h>
-@@ -92443,71 +40939,38 @@
+@@ -96234,71 +42609,38 @@
    exit (statfs (".", &fsd, sizeof fsd, 0));
    }
  _ACEOF
@@ -97645,7 +100888,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #ifdef HAVE_SYS_PARAM_H
-@@ -92523,71 +40986,38 @@
+@@ -96314,71 +42656,38 @@
    exit (statfs (".", &fsd));
    }
  _ACEOF
@@ -97727,7 +100970,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #ifdef HAVE_SYS_PARAM_H
-@@ -92607,201 +41037,33 @@
+@@ -96398,201 +42707,33 @@
    exit (statfs (".", &fsd) != 1);
    }
  _ACEOF
@@ -97753,44 +100996,38 @@
 -  ac_status=$?
 -  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
 -  (exit $ac_status); }; }; then
-+if ac_fn_c_try_run "$LINENO"; then :
-   fu_cv_sys_stat_fs_data=yes
- else
+-  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
 -
 -( exit $ac_status )
 -fu_cv_sys_stat_fs_data=no
-+  fu_cv_sys_stat_fs_data=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: $fu_cv_sys_stat_fs_data" >&5
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fu_cv_sys_stat_fs_data" >&5
- $as_echo "$fu_cv_sys_stat_fs_data" >&6; }
-   if test $fu_cv_sys_stat_fs_data = yes; then
-     space=yes
- 
+-$as_echo "$fu_cv_sys_stat_fs_data" >&6; }
+-  if test $fu_cv_sys_stat_fs_data = yes; then
+-    space=yes
+-
 -cat >>confdefs.h <<\_ACEOF
 -#define STAT_STATFS2_FS_DATA 1
 -_ACEOF
-+$as_echo "#define STAT_STATFS2_FS_DATA 1" >>confdefs.h
- 
-   fi
- fi
- 
 -
+-  fi
+-fi
 -
 -
- for ac_header in sys/attributes.h attr/xattr.h sys/xattr.h
+-
+-
+-for ac_header in sys/attributes.h attr/xattr.h sys/xattr.h
 -do
 -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
@@ -97920,18 +101157,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
++if ac_fn_c_try_run "$LINENO"; then :
++  fu_cv_sys_stat_fs_data=yes
+ else
 -  eval "$as_ac_Header=\$ac_header_preproc"
--fi
++  fu_cv_sys_stat_fs_data=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
++
++fi
++
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fu_cv_sys_stat_fs_data" >&5
++$as_echo "$fu_cv_sys_stat_fs_data" >&6; }
++  if test $fu_cv_sys_stat_fs_data = yes; then
++    space=yes
+ 
++$as_echo "#define STAT_STATFS2_FS_DATA 1" >>confdefs.h
++
++  fi
+ fi
 -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/attributes.h attr/xattr.h sys/xattr.h
 +do :
 +  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
@@ -97940,7 +101195,7 @@
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
-@@ -92810,19 +41072,15 @@
+@@ -96601,19 +42742,15 @@
  
  done
  
@@ -97963,7 +101218,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -92840,46 +41098,15 @@
+@@ -96631,46 +42768,15 @@
    return 0;
  }
  _ACEOF
@@ -98014,7 +101269,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -92897,65 +41124,32 @@
+@@ -96688,65 +42794,32 @@
    return 0;
  }
  _ACEOF
@@ -98088,7 +101343,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.  */
-@@ -92996,50 +41190,24 @@
+@@ -96787,50 +42860,24 @@
    return 0;
  }
  _ACEOF
@@ -98145,7 +101400,7 @@
  MAKE_SETTINGS="$MAKE_SETTINGS
  XATTR_LIBS = ${XATTR_LIBS}
  XATTR_CFLAGS = ${XATTR_CFLAGS}
-@@ -93049,18 +41217,14 @@
+@@ -96840,18 +42887,14 @@
  
  
  if test x"$ac_cv_func_ext_flistxattr" = x"yes"; then
@@ -98167,7 +101422,7 @@
  /* end confdefs.h.  */
  
  	 	#include <sys/types.h>
-@@ -93083,48 +41247,23 @@
+@@ -96874,48 +42917,23 @@
    return 0;
  }
  _ACEOF
@@ -98221,7 +101476,7 @@
  
  
  	MAKE_SETTINGS="$MAKE_SETTINGS
-@@ -93136,20 +41275,16 @@
+@@ -96927,20 +42945,16 @@
  fi
  
  
@@ -98246,7 +101501,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <sys/capability.h>
-@@ -93164,117 +41299,55 @@
+@@ -96955,117 +42969,55 @@
  }
  
  _ACEOF
@@ -98313,7 +101568,7 @@
  
 -if test "$cross_compiling" = yes; then
 +if test "$cross_compiling" = yes; then :
-   samba_cv_HAVE_GETTIMEOFDAY_TZ=cross
+   samba_cv_HAVE_GETTIMEOFDAY_TZ=yes
  else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
@@ -98380,7 +101635,7 @@
  
  fi
  
-@@ -93282,7 +41355,7 @@
+@@ -97073,7 +43025,7 @@
  INCLUDED_POPT=auto
  
  # Check whether --with-included-popt was given.
@@ -98389,7 +101644,7 @@
    withval=$with_included_popt;  INCLUDED_POPT=$withval
  fi
  
-@@ -93291,169 +41364,26 @@
+@@ -97082,169 +43034,26 @@
  
  
  if test x"$INCLUDED_POPT" != x"yes"; then
@@ -98567,7 +101822,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -93471,43 +41401,18 @@
+@@ -97262,43 +43071,18 @@
    return 0;
  }
  _ACEOF
@@ -98617,7 +101872,7 @@
     POPT_LIBS="-lpopt"
  fi
  
-@@ -93519,9 +41424,9 @@
+@@ -97310,9 +43094,9 @@
  	fi
  fi
  
@@ -98629,7 +101884,7 @@
  $as_echo "$INCLUDED_POPT" >&6; }
  if test x"$INCLUDED_POPT" != x"no"; then
  			poptdir=""
-@@ -93535,156 +41440,16 @@
+@@ -97326,156 +43110,16 @@
  		fi
  	done
          if test x"$poptdir" = "x"; then
@@ -98793,7 +102048,7 @@
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
-@@ -93723,12 +41488,10 @@
+@@ -97514,12 +43158,10 @@
  LOOK_DIRS="/usr /usr/local /sw"
  
  # Check whether --with-libiconv was given.
@@ -98808,7 +102063,7 @@
    else
       if test "$withval" != "yes" ; then
  
-@@ -93740,65 +41503,36 @@
+@@ -97531,26 +43173,20 @@
  	LIBS=-liconv
  
  
@@ -98842,16 +102097,11 @@
 +  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
  #include <stdlib.h>
--#include <giconv.h>
--
--int main()
--{
--   iconv_t cd = iconv_open("ASCII","UCS-2LE");
--   if (cd == 0 || cd == (iconv_t)-1) return -1;
--   return 0;
--}
--
--_ACEOF
+ #include <giconv.h>
+@@ -97563,33 +43199,10 @@
+ }
+ 
+ _ACEOF
 -rm -f conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -98875,27 +102125,17 @@
 -  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
 -  (exit $ac_status); }; }; then
 -  { $as_echo "$as_me:$LINENO: result: yes" >&5
--$as_echo "yes" >&6; };
++if ac_fn_c_try_run "$LINENO"; then :
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+ $as_echo "yes" >&6; };
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_GICONV_H 1
-+#include <giconv.h>
-+
-+int main()
-+{
-+   iconv_t cd = iconv_open("ASCII","UCS-2LE");
-+   if (cd == 0 || cd == (iconv_t)-1) return -1;
-+   return 0;
-+}
-+
- _ACEOF
-+if ac_fn_c_try_run "$LINENO"; then :
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-+$as_echo "yes" >&6; };
+-_ACEOF
 +$as_echo "#define HAVE_GICONV_H 1" >>confdefs.h
  
  		ICONV_FOUND=yes;
  		ICONV_CPPFLAGS="$CPPFLAGS"
-@@ -93806,29 +41540,17 @@
+@@ -97597,29 +43210,17 @@
  		ICONV_LDFLAGS="$LDFLAGS"
  
  else
@@ -98930,7 +102170,7 @@
  /* end confdefs.h.  */
  #include <stdlib.h>
  #include <iconv.h>
-@@ -93841,33 +41563,10 @@
+@@ -97632,33 +43233,10 @@
  }
  
  _ACEOF
@@ -98967,7 +102207,7 @@
  
  		ICONV_FOUND=yes;
  		ICONV_CPPFLAGS="$CPPFLAGS"
-@@ -93875,28 +41574,17 @@
+@@ -97666,28 +43244,17 @@
  		ICONV_LDFLAGS="$LDFLAGS"
  
  else
@@ -99002,7 +102242,7 @@
  /* end confdefs.h.  */
  #include <stdlib.h>
  #include <giconv.h>
-@@ -93909,33 +41597,10 @@
+@@ -97700,33 +43267,10 @@
  }
  
  _ACEOF
@@ -99039,7 +102279,7 @@
  
  		ICONV_FOUND=yes;
  		ICONV_CPPFLAGS="$CPPFLAGS"
-@@ -93943,31 +41608,22 @@
+@@ -97734,31 +43278,22 @@
  		ICONV_LDFLAGS="$LDFLAGS"
  
  else
@@ -99077,7 +102317,7 @@
  	CPPFLAGS="$save_CPPFLAGS"
  	LDFLAGS="$save_LDFLAGS"
  	LIBS="$save_LIBS"
-@@ -93980,17 +41636,13 @@
+@@ -97771,17 +43306,13 @@
  
  if test x$ICONV_FOUND = xno; then
  
@@ -99099,7 +102339,7 @@
  /* end confdefs.h.  */
  #include <stdlib.h>
  #include <iconv.h>
-@@ -94003,49 +41655,20 @@
+@@ -97794,49 +43325,20 @@
  }
  
  _ACEOF
@@ -99155,7 +102395,7 @@
  fi
  
  for i in $LOOK_DIRS ; do
-@@ -94062,24 +41685,20 @@
+@@ -97853,24 +43355,20 @@
  	LIBS=-liconv
  
  
@@ -99187,7 +102427,7 @@
  /* end confdefs.h.  */
  #include <stdlib.h>
  #include <giconv.h>
-@@ -94092,33 +41711,10 @@
+@@ -97883,33 +43381,10 @@
  }
  
  _ACEOF
@@ -99224,7 +102464,7 @@
  
  		ICONV_FOUND=yes
  		ICONV_CPPFLAGS="$CPPFLAGS"
-@@ -94126,27 +41722,17 @@
+@@ -97917,27 +43392,17 @@
  		ICONV_LDFLAGS="$LDFLAGS"
  
  else
@@ -99256,7 +102496,7 @@
  /* end confdefs.h.  */
  #include <stdlib.h>
  #include <iconv.h>
-@@ -94159,33 +41745,10 @@
+@@ -97950,33 +43415,10 @@
  }
  
  _ACEOF
@@ -99293,7 +102533,7 @@
  
  		ICONV_FOUND=yes
  		ICONV_CPPFLAGS="$CPPFLAGS"
-@@ -94193,26 +41756,17 @@
+@@ -97984,26 +43426,17 @@
  		ICONV_LDFLAGS="$LDFLAGS"
  
  else
@@ -99325,10 +102565,11 @@
  /* end confdefs.h.  */
  #include <stdlib.h>
  #include <giconv.h>
-@@ -94225,33 +41779,10 @@
+@@ -98015,304 +43448,92 @@
+    return 0;
  }
  
- _ACEOF
+-_ACEOF
 -rm -f conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -99352,77 +102593,85 @@
 -  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
 -  (exit $ac_status); }; }; then
 -  { $as_echo "$as_me:$LINENO: result: yes" >&5
-+if ac_fn_c_try_run "$LINENO"; then :
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
- $as_echo "yes" >&6; };
+-$as_echo "yes" >&6; };
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_GICONV_H 1
 -_ACEOF
-+$as_echo "#define HAVE_GICONV_H 1" >>confdefs.h
- 
- 		ICONV_FOUND=yes
- 		ICONV_CPPFLAGS="$CPPFLAGS"
-@@ -94259,29 +41790,22 @@
- 		ICONV_LDFLAGS="$LDFLAGS"
- 
- else
+-
+-		ICONV_FOUND=yes
+-		ICONV_CPPFLAGS="$CPPFLAGS"
+-		ICONV_LIBS="$LIBS"
+-		ICONV_LDFLAGS="$LDFLAGS"
+-
+-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 )
 -{ $as_echo "$as_me:$LINENO: result: no" >&5
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
- $as_echo "no" >&6; };
- fi
+-$as_echo "no" >&6; };
+-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
 -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
 -
- 	CPPFLAGS="$save_CPPFLAGS"
- 	LDFLAGS="$save_LDFLAGS"
- 	LIBS="$save_LIBS"
-@@ -94289,7 +41813,7 @@
- done
- 
- if test x"$ICONV_FOUND" = x"no"; then
+-
+-
+-
+-	CPPFLAGS="$save_CPPFLAGS"
+-	LDFLAGS="$save_LDFLAGS"
+-	LIBS="$save_LIBS"
+-
+-done
+-
+-if test x"$ICONV_FOUND" = x"no"; then
 -    { $as_echo "$as_me:$LINENO: WARNING: Sufficient support for iconv function was not found.
-+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Sufficient support for iconv function was not found.
-     Install libiconv from http://www.gnu.org/software/libiconv/ for better charset compatibility!" >&5
- $as_echo "$as_me: WARNING: Sufficient support for iconv function was not found.
-     Install libiconv from http://www.gnu.org/software/libiconv/ for better charset compatibility!" >&2;}
-@@ -94302,9 +41826,7 @@
- 
- else
- 
+-    Install libiconv from http://www.gnu.org/software/libiconv/ for better charset compatibility!" >&5
+-$as_echo "$as_me: WARNING: Sufficient support for iconv function was not found.
+-    Install libiconv from http://www.gnu.org/software/libiconv/ for better charset compatibility!" >&2;}
+-
+-	MAKE_SETTINGS="$MAKE_SETTINGS
+-ICONV_ENABLE = NO
+-"
+-SMB_INFO_ENABLES="$SMB_INFO_ENABLES
+-\$enabled{\"ICONV\"} = \"NO\";"
+-
+-else
+-
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_NATIVE_ICONV 1
 -_ACEOF
-+$as_echo "#define HAVE_NATIVE_ICONV 1" >>confdefs.h
- 
- 
- 	MAKE_SETTINGS="$MAKE_SETTINGS
-@@ -94325,203 +41847,23 @@
- 
- 
- 
 -
- for ac_func in writev
+-
+-	MAKE_SETTINGS="$MAKE_SETTINGS
+-ICONV_ENABLE = YES
+-"
+-SMB_INFO_ENABLES="$SMB_INFO_ENABLES
+-\$enabled{\"ICONV\"} = \"YES\";"
+-
+-fi
+-
+-
+-MAKE_SETTINGS="$MAKE_SETTINGS
+-ICONV_LIBS = ${ICONV_LIBS}
+-ICONV_CFLAGS = ${ICONV_CFLAGS}
+-ICONV_CPPFLAGS = ${ICONV_CPPFLAGS}
+-ICONV_LDFLAGS = ${ICONV_LDFLAGS}
+-"
+-
+-
+-
+-
+-for ac_func in writev
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
@@ -99500,14 +102749,26 @@
 -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"
+ 
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
--fi
++else
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; };
+ fi
 -ac_res=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
@@ -99515,26 +102776,48 @@
 -as_val=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+do :
-+  ac_fn_c_check_func "$LINENO" "writev" "ac_cv_func_writev"
-+if test "x$ac_cv_func_writev" = x""yes; then :
-   cat >>confdefs.h <<_ACEOF
+-  cat >>confdefs.h <<_ACEOF
 -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-+#define HAVE_WRITEV 1
- _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
++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
++  conftest.$ac_objext conftest.beam conftest.$ac_ext
++fi
++
++
++
++	CPPFLAGS="$save_CPPFLAGS"
++	LDFLAGS="$save_LDFLAGS"
++	LIBS="$save_LIBS"
++
  done
  
--
- for ac_func in readv
++if test x"$ICONV_FOUND" = x"no"; then
++    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Sufficient support for iconv function was not found.
++    Install libiconv from http://www.gnu.org/software/libiconv/ for better charset compatibility!" >&5
++$as_echo "$as_me: WARNING: Sufficient support for iconv function was not found.
++    Install libiconv from http://www.gnu.org/software/libiconv/ for better charset compatibility!" >&2;}
++
++	MAKE_SETTINGS="$MAKE_SETTINGS
++ICONV_ENABLE = NO
++"
++SMB_INFO_ENABLES="$SMB_INFO_ENABLES
++\$enabled{\"ICONV\"} = \"NO\";"
+ 
+-for ac_func in readv
 -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.  */
 -_ACEOF
@@ -99544,20 +102827,26 @@
 -/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
 -   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
 -#define $ac_func innocuous_$ac_func
--
+ 
 -/* System header to define __stub macros and hopefully few prototypes,
 -    which can conflict with char $ac_func (); below.
 -    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
 -    <limits.h> exists even on freestanding compilers.  */
--
++$as_echo "#define HAVE_NATIVE_ICONV 1" >>confdefs.h
+ 
 -#ifdef __STDC__
 -# include <limits.h>
 -#else
 -# include <assert.h>
 -#endif
--
+ 
 -#undef $ac_func
--
++	MAKE_SETTINGS="$MAKE_SETTINGS
++ICONV_ENABLE = YES
++"
++SMB_INFO_ENABLES="$SMB_INFO_ENABLES
++\$enabled{\"ICONV\"} = \"YES\";"
+ 
 -/* 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.  */
@@ -99571,7 +102860,8 @@
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
 -#endif
--
++fi
+ 
 -int
 -main ()
 -{
@@ -99579,7 +102869,23 @@
 -  ;
 -  return 0;
 -}
--_ACEOF
++
++MAKE_SETTINGS="$MAKE_SETTINGS
++ICONV_LIBS = ${ICONV_LIBS}
++ICONV_CFLAGS = ${ICONV_CFLAGS}
++ICONV_CPPFLAGS = ${ICONV_CPPFLAGS}
++ICONV_LDFLAGS = ${ICONV_LDFLAGS}
++"
++
++
++
++for ac_func in writev
++do :
++  ac_fn_c_check_func "$LINENO" "writev" "ac_cv_func_writev"
++if test "x$ac_cv_func_writev" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_WRITEV 1
+ _ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -99605,10 +102911,11 @@
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
+ 
 -	eval "$as_ac_var=no"
--fi
--
+ fi
++done
+ 
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
@@ -99620,6 +102927,7 @@
 -as_val=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
++for ac_func in readv
 +do :
 +  ac_fn_c_check_func "$LINENO" "readv" "ac_cv_func_readv"
 +if test "x$ac_cv_func_readv" = x""yes; then :
@@ -99629,7 +102937,7 @@
  _ACEOF
  
  fi
-@@ -94600,151 +41942,12 @@
+@@ -98391,151 +43612,12 @@
  
  
  
@@ -99785,7 +103093,7 @@
  _ACEOF
  
  fi
-@@ -94754,23 +41957,17 @@
+@@ -98545,23 +43627,17 @@
  
  
  
@@ -99812,7 +103120,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -94788,54 +41985,28 @@
+@@ -98579,54 +43655,28 @@
    return 0;
  }
  _ACEOF
@@ -99874,7 +103182,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_LIBZ 1
  _ACEOF
-@@ -94851,18 +42022,13 @@
+@@ -98642,18 +43692,13 @@
  
  fi
  
@@ -99896,7 +103204,7 @@
  /* end confdefs.h.  */
  
  		#include <zlib.h>
-@@ -94880,40 +42046,19 @@
+@@ -98671,40 +43716,19 @@
    return 0;
  }
  _ACEOF
@@ -99939,7 +103247,7 @@
  $as_echo "$samba_cv_zlib_1_2_3" >&6; }
  
  if test x"$ac_cv_header_zlib_h" = x"yes" -a \
-@@ -94972,9 +42117,9 @@
+@@ -98763,9 +43787,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
@@ -99951,7 +103259,7 @@
    $as_echo_n "(cached) " >&6
  else
    case $PKG_CONFIG in
-@@ -94987,14 +42132,14 @@
+@@ -98778,14 +43802,14 @@
  do
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
@@ -99969,7 +103277,7 @@
  IFS=$as_save_IFS
  
    test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
-@@ -95003,10 +42148,10 @@
+@@ -98794,10 +43818,10 @@
  fi
  PKG_CONFIG=$ac_cv_path_PKG_CONFIG
  if test -n "$PKG_CONFIG"; then
@@ -99982,20 +103290,20 @@
  $as_echo "no" >&6; }
  fi
  
-@@ -95022,52 +42167,27 @@
+@@ -98813,52 +43837,27 @@
  	else
  		SAMBA_PKG_CONFIG_MIN_VERSION="0.9.0"
  		if $PKG_CONFIG --atleast-pkgconfig-version $SAMBA_PKG_CONFIG_MIN_VERSION; then
--			{ $as_echo "$as_me:$LINENO: checking for talloc >= $TALLOC_MIN_VERSION" >&5
-+			{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for talloc >= $TALLOC_MIN_VERSION" >&5
- $as_echo_n "checking for talloc >= $TALLOC_MIN_VERSION... " >&6; }
+-			{ $as_echo "$as_me:$LINENO: checking for talloc >= 2.0.1" >&5
++			{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for talloc >= 2.0.1" >&5
+ $as_echo_n "checking for talloc >= 2.0.1... " >&6; }
  
- 			if $PKG_CONFIG --exists 'talloc >= $TALLOC_MIN_VERSION' ; then
+ 			if $PKG_CONFIG --exists 'talloc >= 2.0.1' ; then
 -				{ $as_echo "$as_me:$LINENO: result: yes" >&5
 +				{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  $as_echo "yes" >&6; }
  
- 				LIBTALLOC_CFLAGS="`$PKG_CONFIG --cflags 'talloc >= $TALLOC_MIN_VERSION'`"
+ 				LIBTALLOC_CFLAGS="`$PKG_CONFIG --cflags 'talloc >= 2.0.1'`"
  				OLD_CFLAGS="$CFLAGS"
  				CFLAGS="$CFLAGS $LIBTALLOC_CFLAGS"
 -				{ $as_echo "$as_me:$LINENO: checking that the C compiler can use the LIBTALLOC_CFLAGS" >&5
@@ -100042,9 +103350,9 @@
  
  	MAKE_SETTINGS="$MAKE_SETTINGS
  LIBTALLOC_ENABLE = YES
-@@ -95075,22 +42195,16 @@
+@@ -98866,22 +43865,16 @@
  SMB_INFO_ENABLES="$SMB_INFO_ENABLES
- \$enabled{LIBTALLOC} = \"YES\";"
+ \$enabled{\"LIBTALLOC\"} = \"YES\";"
  
 -					{ $as_echo "$as_me:$LINENO: result: yes" >&5
 +					{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
@@ -100068,17 +103376,17 @@
 -
  				CFLAGS="$OLD_CFLAGS"
  
- 
-@@ -95105,7 +42219,7 @@
+ 				ac_cv_LIBTALLOC_libs_only_other="`$PKG_CONFIG --libs-only-other 'talloc >= 2.0.1'` `$PKG_CONFIG --libs-only-L 'talloc >= 2.0.1'`"
+@@ -98942,7 +43935,7 @@
  				ac_cv_LIBTALLOC_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 'talloc >= $TALLOC_MIN_VERSION'
+ 				$PKG_CONFIG --errors-to-stdout --print-errors 'talloc >= 2.0.1'
  				ac_cv_LIBTALLOC_found=no
-@@ -95135,9 +42249,9 @@
+@@ -98976,9 +43969,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
@@ -100090,7 +103398,7 @@
    $as_echo_n "(cached) " >&6
  else
    case $PKG_CONFIG in
-@@ -95150,14 +42264,14 @@
+@@ -98991,14 +43984,14 @@
  do
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
@@ -100108,7 +103416,7 @@
  IFS=$as_save_IFS
  
    test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
-@@ -95166,10 +42280,10 @@
+@@ -99007,10 +44000,10 @@
  fi
  PKG_CONFIG=$ac_cv_path_PKG_CONFIG
  if test -n "$PKG_CONFIG"; then
@@ -100121,20 +103429,20 @@
  $as_echo "no" >&6; }
  fi
  
-@@ -95185,52 +42299,27 @@
+@@ -99026,52 +44019,27 @@
  	else
  		SAMBA_PKG_CONFIG_MIN_VERSION="0.9.0"
  		if $PKG_CONFIG --atleast-pkgconfig-version $SAMBA_PKG_CONFIG_MIN_VERSION; then
--			{ $as_echo "$as_me:$LINENO: checking for tdb >= $TDB_MIN_VERSION" >&5
-+			{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tdb >= $TDB_MIN_VERSION" >&5
- $as_echo_n "checking for tdb >= $TDB_MIN_VERSION... " >&6; }
+-			{ $as_echo "$as_me:$LINENO: checking for tdb >= 1.2.1" >&5
++			{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tdb >= 1.2.1" >&5
+ $as_echo_n "checking for tdb >= 1.2.1... " >&6; }
  
- 			if $PKG_CONFIG --exists 'tdb >= $TDB_MIN_VERSION' ; then
+ 			if $PKG_CONFIG --exists 'tdb >= 1.2.1' ; then
 -				{ $as_echo "$as_me:$LINENO: result: yes" >&5
 +				{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  $as_echo "yes" >&6; }
  
- 				LIBTDB_CFLAGS="`$PKG_CONFIG --cflags 'tdb >= $TDB_MIN_VERSION'`"
+ 				LIBTDB_CFLAGS="`$PKG_CONFIG --cflags 'tdb >= 1.2.1'`"
  				OLD_CFLAGS="$CFLAGS"
  				CFLAGS="$CFLAGS $LIBTDB_CFLAGS"
 -				{ $as_echo "$as_me:$LINENO: checking that the C compiler can use the LIBTDB_CFLAGS" >&5
@@ -100181,9 +103489,9 @@
  
  	MAKE_SETTINGS="$MAKE_SETTINGS
  LIBTDB_ENABLE = YES
-@@ -95238,22 +42327,16 @@
+@@ -99079,22 +44047,16 @@
  SMB_INFO_ENABLES="$SMB_INFO_ENABLES
- \$enabled{LIBTDB} = \"YES\";"
+ \$enabled{\"LIBTDB\"} = \"YES\";"
  
 -					{ $as_echo "$as_me:$LINENO: result: yes" >&5
 +					{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
@@ -100207,17 +103515,17 @@
 -
  				CFLAGS="$OLD_CFLAGS"
  
- 
-@@ -95268,7 +42351,7 @@
+ 				ac_cv_LIBTDB_libs_only_other="`$PKG_CONFIG --libs-only-other 'tdb >= 1.2.1'` `$PKG_CONFIG --libs-only-L 'tdb >= 1.2.1'`"
+@@ -99155,7 +44117,7 @@
  				ac_cv_LIBTDB_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 'tdb >= $TDB_MIN_VERSION'
+ 				$PKG_CONFIG --errors-to-stdout --print-errors 'tdb >= 1.2.1'
  				ac_cv_LIBTDB_found=no
-@@ -95293,9 +42376,7 @@
+@@ -99180,9 +44142,7 @@
  	fi
  done
  if test x"$tdbdir" = "x"; then
@@ -100227,8 +103535,8 @@
 +   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"
-@@ -95308,104 +42389,12 @@
+ TDB_OBJ="$TDB_OBJ common/freelist.o common/freelistcheck.o common/io.o common/lock.o common/open.o common/check.o"
+@@ -99195,104 +44155,12 @@
  TDB_CFLAGS="-I$tdbdir/include"
  
  
@@ -100338,7 +103646,7 @@
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
  _ACEOF
-@@ -95413,151 +42402,12 @@
+@@ -99300,151 +44168,12 @@
  fi
  done
  
@@ -100495,7 +103803,7 @@
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
-@@ -95568,17 +42418,13 @@
+@@ -99455,17 +44184,13 @@
  
  
  
@@ -100516,7 +103824,7 @@
  /* end confdefs.h.  */
  #include <unistd.h>
  int
-@@ -95589,56 +42435,29 @@
+@@ -99476,56 +44201,29 @@
    return 0;
  }
  _ACEOF
@@ -100580,7 +103888,7 @@
  /* end confdefs.h.  */
  #include <unistd.h>
  int
-@@ -95649,41 +42468,18 @@
+@@ -99536,41 +44234,18 @@
    return 0;
  }
  _ACEOF
@@ -100626,7 +103934,7 @@
  
   fi
  
-@@ -95709,9 +42505,9 @@
+@@ -99601,9 +44276,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
@@ -100638,7 +103946,7 @@
    $as_echo_n "(cached) " >&6
  else
    case $PKG_CONFIG in
-@@ -95724,14 +42520,14 @@
+@@ -99616,14 +44291,14 @@
  do
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
@@ -100656,7 +103964,7 @@
  IFS=$as_save_IFS
  
    test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
-@@ -95740,10 +42536,10 @@
+@@ -99632,10 +44307,10 @@
  fi
  PKG_CONFIG=$ac_cv_path_PKG_CONFIG
  if test -n "$PKG_CONFIG"; then
@@ -100669,20 +103977,20 @@
  $as_echo "no" >&6; }
  fi
  
-@@ -95759,52 +42555,27 @@
+@@ -99651,52 +44326,27 @@
  	else
  		SAMBA_PKG_CONFIG_MIN_VERSION="0.9.0"
  		if $PKG_CONFIG --atleast-pkgconfig-version $SAMBA_PKG_CONFIG_MIN_VERSION; then
--			{ $as_echo "$as_me:$LINENO: checking for tevent = $TEVENT_REQUIRED_VERSION" >&5
-+			{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tevent = $TEVENT_REQUIRED_VERSION" >&5
- $as_echo_n "checking for tevent = $TEVENT_REQUIRED_VERSION... " >&6; }
+-			{ $as_echo "$as_me:$LINENO: checking for tevent = 0.9.8" >&5
++			{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tevent = 0.9.8" >&5
+ $as_echo_n "checking for tevent = 0.9.8... " >&6; }
  
- 			if $PKG_CONFIG --exists 'tevent = $TEVENT_REQUIRED_VERSION' ; then
+ 			if $PKG_CONFIG --exists 'tevent = 0.9.8' ; then
 -				{ $as_echo "$as_me:$LINENO: result: yes" >&5
 +				{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  $as_echo "yes" >&6; }
  
- 				LIBTEVENT_CFLAGS="`$PKG_CONFIG --cflags 'tevent = $TEVENT_REQUIRED_VERSION'`"
+ 				LIBTEVENT_CFLAGS="`$PKG_CONFIG --cflags 'tevent = 0.9.8'`"
  				OLD_CFLAGS="$CFLAGS"
  				CFLAGS="$CFLAGS $LIBTEVENT_CFLAGS"
 -				{ $as_echo "$as_me:$LINENO: checking that the C compiler can use the LIBTEVENT_CFLAGS" >&5
@@ -100729,9 +104037,9 @@
  
  	MAKE_SETTINGS="$MAKE_SETTINGS
  LIBTEVENT_ENABLE = YES
-@@ -95812,22 +42583,16 @@
+@@ -99704,22 +44354,16 @@
  SMB_INFO_ENABLES="$SMB_INFO_ENABLES
- \$enabled{LIBTEVENT} = \"YES\";"
+ \$enabled{\"LIBTEVENT\"} = \"YES\";"
  
 -					{ $as_echo "$as_me:$LINENO: result: yes" >&5
 +					{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
@@ -100755,33 +104063,50 @@
 -
  				CFLAGS="$OLD_CFLAGS"
  
- 
-@@ -95842,7 +42607,7 @@
+ 				ac_cv_LIBTEVENT_libs_only_other="`$PKG_CONFIG --libs-only-other 'tevent = 0.9.8'` `$PKG_CONFIG --libs-only-L 'tevent = 0.9.8'`"
+@@ -99780,7 +44424,7 @@
  				ac_cv_LIBTEVENT_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 'tevent = $TEVENT_REQUIRED_VERSION'
+ 				$PKG_CONFIG --errors-to-stdout --print-errors 'tevent = 0.9.8'
  				ac_cv_LIBTEVENT_found=no
-@@ -95871,9 +42636,7 @@
- 		fi
- 	done
- 	if test x"$teventdir" = "x"; then
+@@ -99801,281 +44445,50 @@
+ 
+ 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_echo "$as_me:$LINENO: error: cannot find libtevent source in $teventpaths" >&5
 -$as_echo "$as_me: error: cannot find libtevent source in $teventpaths" >&2;}
 -   { (exit 1); exit 1; }; }
-+	   as_fn_error "cannot find libtevent source in $teventpaths" "$LINENO" 5
- 	fi
- fi
- 
-@@ -95891,253 +42654,24 @@
- TEVENT_OBJ="$TEVENT_OBJ tevent_req.o tevent_wakeup.o tevent_queue.o"
- TEVENT_OBJ="$TEVENT_OBJ tevent_standard.o tevent_select.o"
- 
+-	fi
+-fi
 -
- for ac_header in sys/epoll.h
+-TEVENT_OBJ=""
+-TEVENT_CFLAGS=""
+-TEVENT_LIBS=""
+-
+-
+-
+-
+-TEVENT_CFLAGS="-I$teventdir"
+-
+-TEVENT_OBJ="tevent.o tevent_debug.o tevent_util.o"
+-TEVENT_OBJ="$TEVENT_OBJ tevent_fd.o tevent_timed.o tevent_immediate.o tevent_signal.o"
+-TEVENT_OBJ="$TEVENT_OBJ tevent_req.o tevent_wakeup.o tevent_queue.o"
+-TEVENT_OBJ="$TEVENT_OBJ tevent_standard.o tevent_select.o"
+-
+-
+-for ac_header in sys/epoll.h
 -do
 -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
@@ -100923,20 +104248,29 @@
 -as_val=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+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
+-  cat >>confdefs.h <<_ACEOF
 -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-+#define HAVE_SYS_EPOLL_H 1
- _ACEOF
- 
+-_ACEOF
+-
++	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
  
- done
+-done
+-
++TEVENT_OBJ=""
++TEVENT_CFLAGS=""
++TEVENT_LIBS=""
  
--
- for ac_func in epoll_create
+-for ac_func in epoll_create
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
@@ -100953,20 +104287,21 @@
 -/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
 -   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
 -#define $ac_func innocuous_$ac_func
--
+ 
 -/* System header to define __stub macros and hopefully few prototypes,
 -    which can conflict with char $ac_func (); below.
 -    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
 -    <limits.h> exists even on freestanding compilers.  */
--
+ 
 -#ifdef __STDC__
 -# include <limits.h>
 -#else
 -# include <assert.h>
 -#endif
--
+ 
 -#undef $ac_func
--
++TEVENT_CFLAGS="-I$teventdir"
+ 
 -/* 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.  */
@@ -100980,7 +104315,11 @@
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
 -#endif
--
++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"
+ 
 -int
 -main ()
 -{
@@ -100988,7 +104327,13 @@
 -  ;
 -  return 0;
 -}
--_ACEOF
++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 conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -101014,10 +104359,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
@@ -101029,6 +104374,9 @@
 -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 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 :
@@ -101038,7 +104386,7 @@
  _ACEOF
  
  fi
-@@ -96146,9 +42680,7 @@
+@@ -100084,9 +44497,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"
  
@@ -101049,7 +104397,7 @@
  
  fi
  
-@@ -96210,9 +42742,9 @@
+@@ -100142,9 +44553,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
@@ -101061,7 +104409,7 @@
    $as_echo_n "(cached) " >&6
  else
    case $PKG_CONFIG in
-@@ -96225,14 +42757,14 @@
+@@ -100157,14 +44568,14 @@
  do
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
@@ -101079,7 +104427,7 @@
  IFS=$as_save_IFS
  
    test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
-@@ -96241,10 +42773,10 @@
+@@ -100173,10 +44584,10 @@
  fi
  PKG_CONFIG=$ac_cv_path_PKG_CONFIG
  if test -n "$PKG_CONFIG"; then
@@ -101092,20 +104440,20 @@
  $as_echo "no" >&6; }
  fi
  
-@@ -96260,52 +42792,27 @@
+@@ -100192,52 +44603,27 @@
  	else
  		SAMBA_PKG_CONFIG_MIN_VERSION="0.9.0"
  		if $PKG_CONFIG --atleast-pkgconfig-version $SAMBA_PKG_CONFIG_MIN_VERSION; then
--			{ $as_echo "$as_me:$LINENO: checking for ldb = $LDB_REQUIRED_VERSION" >&5
-+			{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldb = $LDB_REQUIRED_VERSION" >&5
- $as_echo_n "checking for ldb = $LDB_REQUIRED_VERSION... " >&6; }
+-			{ $as_echo "$as_me:$LINENO: checking for ldb = 0.9.10" >&5
++			{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldb = 0.9.10" >&5
+ $as_echo_n "checking for ldb = 0.9.10... " >&6; }
  
- 			if $PKG_CONFIG --exists 'ldb = $LDB_REQUIRED_VERSION' ; then
+ 			if $PKG_CONFIG --exists 'ldb = 0.9.10' ; then
 -				{ $as_echo "$as_me:$LINENO: result: yes" >&5
 +				{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  $as_echo "yes" >&6; }
  
- 				LIBLDB_CFLAGS="`$PKG_CONFIG --cflags 'ldb = $LDB_REQUIRED_VERSION'`"
+ 				LIBLDB_CFLAGS="`$PKG_CONFIG --cflags 'ldb = 0.9.10'`"
  				OLD_CFLAGS="$CFLAGS"
  				CFLAGS="$CFLAGS $LIBLDB_CFLAGS"
 -				{ $as_echo "$as_me:$LINENO: checking that the C compiler can use the LIBLDB_CFLAGS" >&5
@@ -101152,9 +104500,9 @@
  
  	MAKE_SETTINGS="$MAKE_SETTINGS
  LIBLDB_ENABLE = YES
-@@ -96313,22 +42820,16 @@
+@@ -100245,22 +44631,16 @@
  SMB_INFO_ENABLES="$SMB_INFO_ENABLES
- \$enabled{LIBLDB} = \"YES\";"
+ \$enabled{\"LIBLDB\"} = \"YES\";"
  
 -					{ $as_echo "$as_me:$LINENO: result: yes" >&5
 +					{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
@@ -101178,17 +104526,17 @@
 -
  				CFLAGS="$OLD_CFLAGS"
  
- 
-@@ -96343,7 +42844,7 @@
+ 				ac_cv_LIBLDB_libs_only_other="`$PKG_CONFIG --libs-only-other 'ldb = 0.9.10'` `$PKG_CONFIG --libs-only-L 'ldb = 0.9.10'`"
+@@ -100321,7 +44701,7 @@
  				ac_cv_LIBLDB_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 'ldb = $LDB_REQUIRED_VERSION'
+ 				$PKG_CONFIG --errors-to-stdout --print-errors 'ldb = 0.9.10'
  				ac_cv_LIBLDB_found=no
-@@ -96389,12 +42890,12 @@
+@@ -100367,12 +44747,12 @@
  
  SQLITE3_LIBS=""
  with_sqlite3_support=no
@@ -101203,7 +104551,7 @@
    withval=$with_sqlite3;  case "$withval" in
      yes|no|auto)
  	with_sqlite3_support=$withval
-@@ -96403,157 +42904,18 @@
+@@ -100381,157 +44761,18 @@
  fi
  
  
@@ -101367,7 +104715,7 @@
  _ACEOF
  
  fi
-@@ -96563,11 +42925,9 @@
+@@ -100541,11 +44782,9 @@
  
    if test x"$ac_cv_header_sqlite3_h" != x"yes"; then
  	if test x"$with_sqlite3_support" = x"yes"; then
@@ -101381,7 +104729,7 @@
  $as_echo "$as_me: WARNING: sqlite3.h is needed for SQLITE3 support" >&2;}
  	fi
  
-@@ -96582,23 +42942,17 @@
+@@ -100560,23 +44799,17 @@
    # now see if we can find the sqlite3 libs in standard paths
  
  
@@ -101408,7 +104756,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -96616,54 +42970,28 @@
+@@ -100594,54 +44827,28 @@
    return 0;
  }
  _ACEOF
@@ -101470,7 +104818,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_LIBSQLITE3 1
  _ACEOF
-@@ -96679,21 +43007,16 @@
+@@ -100657,21 +44864,16 @@
  
  fi
  
@@ -101496,7 +104844,7 @@
  $as_echo "yes" >&6; }
      with_sqlite3_support=yes
  
-@@ -96705,11 +43028,9 @@
+@@ -100683,11 +44885,9 @@
  
    else
      if test x"$with_sqlite3_support" = x"yes"; then
@@ -101510,7 +104858,7 @@
  $as_echo "$as_me: WARNING: libsqlite3 is needed for SQLITE3 support" >&2;}
      fi
  
-@@ -96770,7 +43091,7 @@
+@@ -100757,7 +44957,7 @@
  
  use_gnutls=auto
  # Check whether --enable-gnutls was given.
@@ -101519,7 +104867,7 @@
    enableval=$enable_gnutls; if test x$enable_gnutls = xno; then
          use_gnutls=no
      fi
-@@ -96784,9 +43105,9 @@
+@@ -100771,9 +44971,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
@@ -101531,7 +104879,7 @@
    $as_echo_n "(cached) " >&6
  else
    case $PKG_CONFIG in
-@@ -96799,14 +43120,14 @@
+@@ -100786,14 +44986,14 @@
  do
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
@@ -101549,7 +104897,7 @@
  IFS=$as_save_IFS
  
    test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
-@@ -96815,10 +43136,10 @@
+@@ -100802,10 +45002,10 @@
  fi
  PKG_CONFIG=$ac_cv_path_PKG_CONFIG
  if test -n "$PKG_CONFIG"; then
@@ -101562,20 +104910,20 @@
  $as_echo "no" >&6; }
  fi
  
-@@ -96834,52 +43155,27 @@
+@@ -100821,52 +45021,27 @@
  	else
  		SAMBA_PKG_CONFIG_MIN_VERSION="0.9.0"
  		if $PKG_CONFIG --atleast-pkgconfig-version $SAMBA_PKG_CONFIG_MIN_VERSION; then
--			{ $as_echo "$as_me:$LINENO: checking for gnutls < 2.6.0" >&5
-+			{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gnutls < 2.6.0" >&5
- $as_echo_n "checking for gnutls < 2.6.0... " >&6; }
+-			{ $as_echo "$as_me:$LINENO: checking for gnutls >= 1.4.0" >&5
++			{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gnutls >= 1.4.0" >&5
+ $as_echo_n "checking for gnutls >= 1.4.0... " >&6; }
  
- 			if $PKG_CONFIG --exists 'gnutls < 2.6.0' ; then
+ 			if $PKG_CONFIG --exists 'gnutls >= 1.4.0' ; then
 -				{ $as_echo "$as_me:$LINENO: result: yes" >&5
 +				{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  $as_echo "yes" >&6; }
  
- 				GNUTLS_CFLAGS="`$PKG_CONFIG --cflags 'gnutls < 2.6.0'`"
+ 				GNUTLS_CFLAGS="`$PKG_CONFIG --cflags 'gnutls >= 1.4.0'`"
  				OLD_CFLAGS="$CFLAGS"
  				CFLAGS="$CFLAGS $GNUTLS_CFLAGS"
 -				{ $as_echo "$as_me:$LINENO: checking that the C compiler can use the GNUTLS_CFLAGS" >&5
@@ -101622,9 +104970,9 @@
  
  	MAKE_SETTINGS="$MAKE_SETTINGS
  GNUTLS_ENABLE = YES
-@@ -96887,22 +43183,16 @@
+@@ -100874,22 +45049,16 @@
  SMB_INFO_ENABLES="$SMB_INFO_ENABLES
- \$enabled{GNUTLS} = \"YES\";"
+ \$enabled{\"GNUTLS\"} = \"YES\";"
  
 -					{ $as_echo "$as_me:$LINENO: result: yes" >&5
 +					{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
@@ -101648,24 +104996,21 @@
 -
  				CFLAGS="$OLD_CFLAGS"
  
- 
-@@ -96917,7 +43207,7 @@
+ 				ac_cv_GNUTLS_libs_only_other="`$PKG_CONFIG --libs-only-other 'gnutls >= 1.4.0'` `$PKG_CONFIG --libs-only-L 'gnutls >= 1.4.0'`"
+@@ -100950,7 +45119,7 @@
  				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 < 2.6.0'
+ 				$PKG_CONFIG --errors-to-stdout --print-errors 'gnutls >= 1.4.0'
  				ac_cv_GNUTLS_found=no
-@@ -96934,770 +43224,161 @@
- 		use_gnutls=no
- 	fi
+@@ -100970,151 +45139,12 @@
+ fi
  
--fi
+ if test x$use_gnutls = xauto; then
 -
--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`
@@ -101808,50 +105153,47 @@
 -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 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 `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
--_ACEOF
++#define HAVE_GNUTLS_GNUTLS_H 1
+ _ACEOF
+ 
+ fi
+@@ -101123,23 +45153,17 @@
+ 
+ 
+ 
 -
--fi
+ ac_check_lib_ext_save_LIBS=$LIBS
+ LIBS="-lgnutls $GNUTLS_LIBS  $LIBS"
+ 
+ 
+ 
 -
--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_n "checking for gnutls_global_init in -lgnutls... " >&6; }
++        { $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
++if test "${ac_cv_lib_ext_gnutls_gnutls_global_init+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 gnutls_global_init ();
--int
--main ()
--{
--return gnutls_global_init ();
--  ;
--  return 0;
--}
--_ACEOF
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ 
+ /* Override any GCC internal prototype to avoid an error.
+@@ -101157,580 +45181,116 @@
+   return 0;
+ }
+ _ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -101873,7 +105215,8 @@
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
--  ac_cv_lib_ext_gnutls_gnutls_global_init=yes;
++if ac_fn_c_try_link "$LINENO"; then :
+   ac_cv_lib_ext_gnutls_gnutls_global_init=yes;
 -		  ac_cv_lib_ext_gnutls=yes
 -else
 -  $as_echo "$as_me: failed program was:" >&5
@@ -101986,7 +105329,7 @@
 -GNUTLS_ENABLE = YES
 -"
 -SMB_INFO_ENABLES="$SMB_INFO_ENABLES
--\$enabled{GNUTLS} = \"YES\";"
+-\$enabled{\"GNUTLS\"} = \"YES\";"
 -
 -		{ $as_echo "$as_me:$LINENO: checking whether gnutls_x509_crt_set_subject_key_id is declared" >&5
 -$as_echo_n "checking whether gnutls_x509_crt_set_subject_key_id is declared... " >&6; }
@@ -102010,19 +105353,11 @@
 -#ifndef gnutls_x509_crt_set_subject_key_id
 -  (void) gnutls_x509_crt_set_subject_key_id;
 -#endif
-+fi
- 
+-
 -  ;
 -  return 0;
 -}
-+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
+-_ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -102045,46 +105380,40 @@
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
- 
+-
 -	ac_cv_have_decl_gnutls_x509_crt_set_subject_key_id=no
- fi
- 
+-fi
+-
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_gnutls_x509_crt_set_subject_key_id" >&5
 -$as_echo "$ac_cv_have_decl_gnutls_x509_crt_set_subject_key_id" >&6; }
 -if test "x$ac_cv_have_decl_gnutls_x509_crt_set_subject_key_id" = x""yes; then
-+done
- 
+-
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_GNUTLS_X509_CRT_SET_SUBJECT_KEY_ID 1
 -_ACEOF
- 
+-
 -fi
- 
+-
 -	fi
-+ac_check_lib_ext_save_LIBS=$LIBS
-+LIBS="-lgnutls $GNUTLS_LIBS  $LIBS"
- 
+-
 -MAKE_SETTINGS="$MAKE_SETTINGS
 -GNUTLS_LIBS = $GNUTLS_LIBS
 -GNUTLS_CFLAGS =
 -GNUTLS_CPPFLAGS =
 -GNUTLS_LDFLAGS =
 -"
- 
- 
+-
+-
 -fi
 -if test x$use_gnutls = xyes; then
 -	#Some older versions have a different type name
 -	{ $as_echo "$as_me:$LINENO: checking for gnutls_datum" >&5
 -$as_echo_n "checking for gnutls_datum... " >&6; }
 -if test "${ac_cv_type_gnutls_datum+set}" = set; then
-+        { $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
+-  $as_echo_n "(cached) " >&6
+-else
 -  ac_cv_type_gnutls_datum=no
 -cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
@@ -102126,27 +105455,18 @@
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
+-/* end confdefs.h.  */
 -#include "gnutls/gnutls.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 ()
- {
+-
+-int
+-main ()
+-{
 -if (sizeof ((gnutls_datum)))
 -	  return 0;
-+return gnutls_global_init ();
-   ;
-   return 0;
- }
- _ACEOF
+-  ;
+-  return 0;
+-}
+-_ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -102174,39 +105494,26 @@
 -fi
 -
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-+if ac_fn_c_try_link "$LINENO"; then :
-+  ac_cv_lib_ext_gnutls_gnutls_global_init=yes;
-+		  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
+-
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
+-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
-+{ $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
- 
+-_ACEOF
 -
- fi
-+LIBS=$ac_check_lib_ext_save_LIBS
- 
+-
+-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
@@ -102215,15 +105522,12 @@
 -  ac_cv_type_gnutls_datum_t=no
 -cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
-+if test $ac_cv_lib_ext_gnutls = yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define HAVE_LIBGNUTLS 1
- _ACEOF
+-_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
 -#include "gnutls/gnutls.h"
- 
+-
 -int
 -main ()
 -{
@@ -102258,14 +105562,7 @@
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
 -#include "gnutls/gnutls.h"
-+		case "$GNUTLS_LIBS" in
-+		    *-lgnutls*)
-+			;;
-+		    *)
-+			GNUTLS_LIBS="-lgnutls $GNUTLS_LIBS"
-+			;;
-+		esac
- 
+-
 -int
 -main ()
 -{
@@ -102294,42 +105591,72 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  :
--else
++		  ac_cv_lib_ext_gnutls=yes
+ 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
-+	ac_fn_c_check_decl "$LINENO" "gnutls_x509_crt_set_version" "ac_cv_have_decl_gnutls_x509_crt_set_version" "
-+	#include <gnutls/gnutls.h>
-+	#include <gnutls/x509.h>
++LIBS=$ac_check_lib_ext_save_LIBS
  
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
++if test $ac_cv_lib_ext_gnutls = yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_LIBGNUTLS 1
++_ACEOF
++
++		case "$GNUTLS_LIBS" in
++		    *-lgnutls*)
++			;;
++		    *)
++			GNUTLS_LIBS="-lgnutls $GNUTLS_LIBS"
++			;;
++		esac
+ 
+ 
+ fi
++	ac_fn_c_check_decl "$LINENO" "gnutls_x509_crt_set_version" "ac_cv_have_decl_gnutls_x509_crt_set_version" "
++	#include <gnutls/gnutls.h>
++	#include <gnutls/x509.h>
++
 +"
 +if test "x$ac_cv_have_decl_gnutls_x509_crt_set_version" = x""yes; then :
- 
++
 +$as_echo "#define HAVE_GNUTLS_X509_CRT_SET_VERSION 1" >>confdefs.h
  
+-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_gnutls_datum_t" >&5
 -$as_echo "$ac_cv_type_gnutls_datum_t" >&6; }
 -if test "x$ac_cv_type_gnutls_datum_t" = x""yes; then
-+	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
  
 -cat >>confdefs.h <<_ACEOF
 -#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
 +"
 +SMB_INFO_ENABLES="$SMB_INFO_ENABLES
-+\$enabled{GNUTLS} = \"YES\";"
++\$enabled{\"GNUTLS\"} = \"YES\";"
 +
 +		ac_fn_c_check_decl "$LINENO" "gnutls_x509_crt_set_subject_key_id" "ac_cv_have_decl_gnutls_x509_crt_set_subject_key_id" "
 +	#include <gnutls/gnutls.h>
@@ -102523,7 +105850,7 @@
  _ACEOF
  
  fi
-@@ -97706,23 +43387,17 @@
+@@ -101739,23 +45299,17 @@
  
  
  
@@ -102550,7 +105877,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -97740,54 +43415,28 @@
+@@ -101773,54 +45327,28 @@
    return 0;
  }
  _ACEOF
@@ -102612,7 +105939,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_LIBGCRYPT 1
  _ACEOF
-@@ -97803,7 +43452,6 @@
+@@ -101836,7 +45364,6 @@
  
  fi
  
@@ -102620,8 +105947,648 @@
  MAKE_SETTINGS="$MAKE_SETTINGS
  GCRYPT_LIBS = $GCRYPT_LIBS
  GCRYPT_CFLAGS =
-@@ -97841,19 +43489,17 @@
+@@ -101853,7 +45380,7 @@
  
+ use_netapi=auto
+ # Check whether --enable-netapi was given.
+-if test "${enable_netapi+set}" = set; then
++if test "${enable_netapi+set}" = set; then :
+   enableval=$enable_netapi; if test x$enable_netapi = xno; then
+         use_netapi=no
+     fi
+@@ -101875,151 +45402,12 @@
+ \$enabled{\"TORTURE_LIBNETAPI\"} = \"NO\";"
+ 
+ if test x$use_netapi != xno; then
+-
+-for ac_header in netapi.h
+-do
+-as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+-  { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+-$as_echo_n "checking for $ac_header... " >&6; }
+-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+-  $as_echo_n "(cached) " >&6
+-fi
+-ac_res=`eval 'as_val=${'$as_ac_Header'}
+-		 $as_echo "$as_val"'`
+-	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+-$as_echo "$ac_res" >&6; }
+-else
+-  # Is the header compilable?
+-{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
+-$as_echo_n "checking $ac_header usability... " >&6; }
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
+-$ac_includes_default
+-#include <$ac_header>
+-_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_header_compiler=yes
+-else
+-  $as_echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	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; }
+-
+-# 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
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
+-#include <$ac_header>
+-_ACEOF
+-if { (ac_try="$ac_cpp conftest.$ac_ext"
+-case "(($ac_try" in
+-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+-  *) ac_try_echo=$ac_try;;
+-esac
+-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+-$as_echo "$ac_try_echo") >&5
+-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+-  ac_status=$?
+-  grep -v '^ *+' conftest.er1 >conftest.err
+-  rm -f conftest.er1
+-  cat conftest.err >&5
+-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); } >/dev/null && {
+-	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+-	 test ! -s conftest.err
+-       }; then
+-  ac_header_preproc=yes
+-else
+-  $as_echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-  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; }
+-
+-# So?  What about this header?
+-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+-  yes:no: )
+-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+-$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+-$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+-    ac_header_preproc=yes
+-    ;;
+-  no:yes:* )
+-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+-$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+-$as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+-$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+-$as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+-$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+-$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+-    ( cat <<\_ASBOX
+-## ---------------------------------------- ##
+-## Report this to samba-technical at samba.org ##
+-## ---------------------------------------- ##
+-_ASBOX
+-     ) | sed "s/^/$as_me: WARNING:     /" >&2
+-    ;;
+-esac
+-{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+-$as_echo_n "checking for $ac_header... " >&6; }
+-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+-  $as_echo_n "(cached) " >&6
+-else
+-  eval "$as_ac_Header=\$ac_header_preproc"
+-fi
+-ac_res=`eval 'as_val=${'$as_ac_Header'}
+-		 $as_echo "$as_val"'`
+-	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+-$as_echo "$ac_res" >&6; }
+-
+-fi
+-as_val=`eval 'as_val=${'$as_ac_Header'}
+-		 $as_echo "$as_val"'`
+-   if test "x$as_val" = x""yes; then
++	for ac_header in netapi.h
++do :
++  ac_fn_c_check_header_mongrel "$LINENO" "netapi.h" "ac_cv_header_netapi_h" "$ac_includes_default"
++if test "x$ac_cv_header_netapi_h" = x""yes; then :
+   cat >>confdefs.h <<_ACEOF
+-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
++#define HAVE_NETAPI_H 1
+ _ACEOF
+ 
+ fi
+@@ -102028,23 +45416,17 @@
+ 
+ 
+ 
+-
+ ac_check_lib_ext_save_LIBS=$LIBS
+ LIBS="-lnetapi $NETAPI_LIBS  $LIBS"
+ 
+ 
+ 
+-
+-        { $as_echo "$as_me:$LINENO: checking for libnetapi_init in -lnetapi" >&5
++        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libnetapi_init in -lnetapi" >&5
+ $as_echo_n "checking for libnetapi_init in -lnetapi... " >&6; }
+-if test "${ac_cv_lib_ext_netapi_libnetapi_init+set}" = set; then
++if test "${ac_cv_lib_ext_netapi_libnetapi_init+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.  */
+ 
+ /* Override any GCC internal prototype to avoid an error.
+@@ -102062,54 +45444,28 @@
+   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
++if ac_fn_c_try_link "$LINENO"; then :
+   ac_cv_lib_ext_netapi_libnetapi_init=yes;
+ 		  ac_cv_lib_ext_netapi=yes
+ else
+-  $as_echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	ac_cv_lib_ext_netapi_libnetapi_init=no;
++  ac_cv_lib_ext_netapi_libnetapi_init=no;
+ 		  ac_cv_lib_ext_netapi=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
+-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ext_netapi_libnetapi_init" >&5
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ext_netapi_libnetapi_init" >&5
+ $as_echo "$ac_cv_lib_ext_netapi_libnetapi_init" >&6; }
+-    if test $ac_cv_lib_ext_netapi_libnetapi_init = yes; then
++    if test $ac_cv_lib_ext_netapi_libnetapi_init = yes; then :
+   cat >>confdefs.h <<_ACEOF
+ #define HAVE_LIBNETAPI_INIT 1
+ _ACEOF
+ 
+ fi
+-
+ LIBS=$ac_check_lib_ext_save_LIBS
+ 
+-if test $ac_cv_lib_ext_netapi = yes; then
++if test $ac_cv_lib_ext_netapi = yes; then :
+   cat >>confdefs.h <<_ACEOF
+ #define HAVE_LIBNETAPI 1
+ _ACEOF
+@@ -102126,24 +45482,17 @@
+ fi
+ 
+ 
+-
+-
+ ac_check_lib_ext_save_LIBS=$LIBS
+ LIBS="-lnetapi $NETAPI_LIBS  $LIBS"
+ 
+ 
+ 
+-
+-        { $as_echo "$as_me:$LINENO: checking for NetUserModalsGet in -lnetapi" >&5
++        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NetUserModalsGet in -lnetapi" >&5
+ $as_echo_n "checking for NetUserModalsGet in -lnetapi... " >&6; }
+-if test "${ac_cv_lib_ext_netapi_NetUserModalsGet+set}" = set; then
++if test "${ac_cv_lib_ext_netapi_NetUserModalsGet+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.  */
+ 
+ /* Override any GCC internal prototype to avoid an error.
+@@ -102161,54 +45510,28 @@
+   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
++if ac_fn_c_try_link "$LINENO"; then :
+   ac_cv_lib_ext_netapi_NetUserModalsGet=yes;
+ 		  ac_cv_lib_ext_netapi=yes
+ else
+-  $as_echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	ac_cv_lib_ext_netapi_NetUserModalsGet=no;
++  ac_cv_lib_ext_netapi_NetUserModalsGet=no;
+ 		  ac_cv_lib_ext_netapi=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
+-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ext_netapi_NetUserModalsGet" >&5
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ext_netapi_NetUserModalsGet" >&5
+ $as_echo "$ac_cv_lib_ext_netapi_NetUserModalsGet" >&6; }
+-    if test $ac_cv_lib_ext_netapi_NetUserModalsGet = yes; then
++    if test $ac_cv_lib_ext_netapi_NetUserModalsGet = yes; then :
+   cat >>confdefs.h <<_ACEOF
+ #define HAVE_NETUSERMODALSGET 1
+ _ACEOF
+ 
+ fi
+-
+ LIBS=$ac_check_lib_ext_save_LIBS
+ 
+-if test $ac_cv_lib_ext_netapi = yes; then
++if test $ac_cv_lib_ext_netapi = yes; then :
+   cat >>confdefs.h <<_ACEOF
+ #define HAVE_LIBNETAPI 1
+ _ACEOF
+@@ -102225,24 +45548,17 @@
+ fi
+ 
+ 
+-
+-
+ ac_check_lib_ext_save_LIBS=$LIBS
+ LIBS="-lnetapi $NETAPI_LIBS  $LIBS"
+ 
+ 
+ 
+-
+-        { $as_echo "$as_me:$LINENO: checking for NetUserGetGroups in -lnetapi" >&5
++        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NetUserGetGroups in -lnetapi" >&5
+ $as_echo_n "checking for NetUserGetGroups in -lnetapi... " >&6; }
+-if test "${ac_cv_lib_ext_netapi_NetUserGetGroups+set}" = set; then
++if test "${ac_cv_lib_ext_netapi_NetUserGetGroups+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.  */
+ 
+ /* Override any GCC internal prototype to avoid an error.
+@@ -102260,54 +45576,28 @@
+   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
++if ac_fn_c_try_link "$LINENO"; then :
+   ac_cv_lib_ext_netapi_NetUserGetGroups=yes;
+ 		  ac_cv_lib_ext_netapi=yes
+ else
+-  $as_echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	ac_cv_lib_ext_netapi_NetUserGetGroups=no;
++  ac_cv_lib_ext_netapi_NetUserGetGroups=no;
+ 		  ac_cv_lib_ext_netapi=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
+-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ext_netapi_NetUserGetGroups" >&5
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ext_netapi_NetUserGetGroups" >&5
+ $as_echo "$ac_cv_lib_ext_netapi_NetUserGetGroups" >&6; }
+-    if test $ac_cv_lib_ext_netapi_NetUserGetGroups = yes; then
++    if test $ac_cv_lib_ext_netapi_NetUserGetGroups = yes; then :
+   cat >>confdefs.h <<_ACEOF
+ #define HAVE_NETUSERGETGROUPS 1
+ _ACEOF
+ 
+ fi
+-
+ LIBS=$ac_check_lib_ext_save_LIBS
+ 
+-if test $ac_cv_lib_ext_netapi = yes; then
++if test $ac_cv_lib_ext_netapi = yes; then :
+   cat >>confdefs.h <<_ACEOF
+ #define HAVE_LIBNETAPI 1
+ _ACEOF
+@@ -102324,24 +45614,17 @@
+ fi
+ 
+ 
+-
+-
+ ac_check_lib_ext_save_LIBS=$LIBS
+ LIBS="-lnetapi $NETAPI_LIBS  $LIBS"
+ 
+ 
+ 
+-
+-        { $as_echo "$as_me:$LINENO: checking for NetUserGetInfo in -lnetapi" >&5
++        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NetUserGetInfo in -lnetapi" >&5
+ $as_echo_n "checking for NetUserGetInfo in -lnetapi... " >&6; }
+-if test "${ac_cv_lib_ext_netapi_NetUserGetInfo+set}" = set; then
++if test "${ac_cv_lib_ext_netapi_NetUserGetInfo+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.  */
+ 
+ /* Override any GCC internal prototype to avoid an error.
+@@ -102359,54 +45642,28 @@
+   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
++if ac_fn_c_try_link "$LINENO"; then :
+   ac_cv_lib_ext_netapi_NetUserGetInfo=yes;
+ 		  ac_cv_lib_ext_netapi=yes
+ else
+-  $as_echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	ac_cv_lib_ext_netapi_NetUserGetInfo=no;
++  ac_cv_lib_ext_netapi_NetUserGetInfo=no;
+ 		  ac_cv_lib_ext_netapi=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
+-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ext_netapi_NetUserGetInfo" >&5
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ext_netapi_NetUserGetInfo" >&5
+ $as_echo "$ac_cv_lib_ext_netapi_NetUserGetInfo" >&6; }
+-    if test $ac_cv_lib_ext_netapi_NetUserGetInfo = yes; then
++    if test $ac_cv_lib_ext_netapi_NetUserGetInfo = yes; then :
+   cat >>confdefs.h <<_ACEOF
+ #define HAVE_NETUSERGETINFO 1
+ _ACEOF
+ 
+ fi
+-
+ LIBS=$ac_check_lib_ext_save_LIBS
+ 
+-if test $ac_cv_lib_ext_netapi = yes; then
++if test $ac_cv_lib_ext_netapi = yes; then :
+   cat >>confdefs.h <<_ACEOF
+ #define HAVE_LIBNETAPI 1
+ _ACEOF
+@@ -102423,24 +45680,17 @@
+ fi
+ 
+ 
+-
+-
+ ac_check_lib_ext_save_LIBS=$LIBS
+ LIBS="-lnetapi $NETAPI_LIBS  $LIBS"
+ 
+ 
+ 
+-
+-        { $as_echo "$as_me:$LINENO: checking for NetUserSetInfo in -lnetapi" >&5
++        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NetUserSetInfo in -lnetapi" >&5
+ $as_echo_n "checking for NetUserSetInfo in -lnetapi... " >&6; }
+-if test "${ac_cv_lib_ext_netapi_NetUserSetInfo+set}" = set; then
++if test "${ac_cv_lib_ext_netapi_NetUserSetInfo+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.  */
+ 
+ /* Override any GCC internal prototype to avoid an error.
+@@ -102458,54 +45708,28 @@
+   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
++if ac_fn_c_try_link "$LINENO"; then :
+   ac_cv_lib_ext_netapi_NetUserSetInfo=yes;
+ 		  ac_cv_lib_ext_netapi=yes
+ else
+-  $as_echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	ac_cv_lib_ext_netapi_NetUserSetInfo=no;
++  ac_cv_lib_ext_netapi_NetUserSetInfo=no;
+ 		  ac_cv_lib_ext_netapi=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
+-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ext_netapi_NetUserSetInfo" >&5
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ext_netapi_NetUserSetInfo" >&5
+ $as_echo "$ac_cv_lib_ext_netapi_NetUserSetInfo" >&6; }
+-    if test $ac_cv_lib_ext_netapi_NetUserSetInfo = yes; then
++    if test $ac_cv_lib_ext_netapi_NetUserSetInfo = yes; then :
+   cat >>confdefs.h <<_ACEOF
+ #define HAVE_NETUSERSETINFO 1
+ _ACEOF
+ 
+ fi
+-
+ LIBS=$ac_check_lib_ext_save_LIBS
+ 
+-if test $ac_cv_lib_ext_netapi = yes; then
++if test $ac_cv_lib_ext_netapi = yes; then :
+   cat >>confdefs.h <<_ACEOF
+ #define HAVE_LIBNETAPI 1
+ _ACEOF
+@@ -102520,12 +45744,9 @@
+ 
+ 
+ fi
+-
+ 	if test x"$ac_cv_header_netapi_h" = x"yes" -a x"$ac_cv_lib_ext_netapi_libnetapi_init" = x"yes" -a x"$ac_cv_lib_ext_netapi_NetUserModalsGet" = x"yes" -a x"$ac_cv_lib_ext_netapi_NetUserGetGroups" = x"yes" -a x"$ac_cv_lib_ext_netapi_NetUserGetInfo" = x"yes" -a x"$ac_cv_lib_ext_netapi_NetUserSetInfo" = x"yes";then
+ 
+-cat >>confdefs.h <<\_ACEOF
+-#define ENABLE_LIBNETAPI 1
+-_ACEOF
++$as_echo "#define ENABLE_LIBNETAPI 1" >>confdefs.h
+ 
+ 
+ 	MAKE_SETTINGS="$MAKE_SETTINGS
+@@ -102543,9 +45764,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
+ 		fi
+ 	fi
+ 
+@@ -102586,19 +45805,17 @@
+ 
  #################################################
  # check for pthread support
 -{ $as_echo "$as_me:$LINENO: checking whether to use pthreads" >&5
@@ -102644,7 +106611,7 @@
  		fi
  
  	MAKE_SETTINGS="$MAKE_SETTINGS
-@@ -97871,12 +43517,12 @@
+@@ -102616,12 +45833,12 @@
  
  	;;
  	*)
@@ -102659,7 +106626,7 @@
  $as_echo "no" >&6; }
  
  fi
-@@ -97892,274 +43538,45 @@
+@@ -102637,274 +45854,45 @@
  
  
  
@@ -102947,7 +106914,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -98177,54 +43594,28 @@
+@@ -102922,54 +45910,28 @@
    return 0;
  }
  _ACEOF
@@ -103009,7 +106976,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_LIBSETPROCTITLE 1
  _ACEOF
-@@ -98240,15 +43631,14 @@
+@@ -102985,15 +45947,14 @@
  
  fi
  
@@ -103027,8 +106994,8 @@
  $as_echo "yes" >&6; }
  
  	MAKE_SETTINGS="$MAKE_SETTINGS
-@@ -98258,22 +43648,20 @@
- \$enabled{SETPROCTITLE} = \"YES\";"
+@@ -103003,22 +45964,20 @@
+ \$enabled{\"SETPROCTITLE\"} = \"YES\";"
  
  
 -cat >>confdefs.h <<\_ACEOF
@@ -103054,7 +107021,7 @@
  $as_echo "no" >&6; }
  
  fi
-@@ -98291,17 +43679,13 @@
+@@ -103036,238 +45995,68 @@
  
  
  
@@ -103075,10 +107042,21 @@
  /* end confdefs.h.  */
  
  #include <sys/types.h>
-@@ -98320,209 +43704,43 @@
-   return 0;
- }
- _ACEOF
+ #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
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -103097,33 +107075,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 :
-   ac_cv_decl_have_stat_tv_nsec=yes
- else
+-  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
-+  ac_cv_decl_have_stat_tv_nsec=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_stat_tv_nsec" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_stat_tv_nsec" >&5
- $as_echo "$ac_cv_have_stat_tv_nsec" >&6; }
- if test x"$ac_cv_decl_have_stat_tv_nsec" = x"yes"; then
- 
+-$as_echo "$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
- 
 -
- for ac_header in blkid/blkid.h
+-fi
+-
+-
+-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
@@ -103178,7 +107152,14 @@
 -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; }
@@ -103189,7 +107170,10 @@
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
 -#include <$ac_header>
--_ACEOF
++  ;
++  return 0;
++}
+ _ACEOF
 -if { (ac_try="$ac_cpp conftest.$ac_ext"
 -case "(($ac_try" in
 -  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -103208,17 +107192,26 @@
 -	 test ! -s conftest.err
 -       }; then
 -  ac_header_preproc=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
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ 
 -  ac_header_preproc=no
--fi
--
+ 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
+ 
 -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: )
@@ -103255,16 +107248,17 @@
 -  $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 :
@@ -103296,7 +107290,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -98540,46 +43758,15 @@
+@@ -103285,46 +46074,15 @@
    return 0;
  }
  _ACEOF
@@ -103347,7 +107341,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -98597,65 +43784,32 @@
+@@ -103342,65 +46100,32 @@
    return 0;
  }
  _ACEOF
@@ -103374,13 +107368,12 @@
 -       }; then
 +if ac_fn_c_try_link "$LINENO"; then :
    ac_cv_search_ext_blkid_get_cache="-l$ac_lib"
--break
+ break
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -
-+break
  fi
 -
 -rm -rf conftest.dSYM
@@ -103422,7 +107415,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.  */
-@@ -98696,50 +43850,24 @@
+@@ -103441,50 +46166,24 @@
    return 0;
  }
  _ACEOF
@@ -103479,7 +107472,7 @@
  MAKE_SETTINGS="$MAKE_SETTINGS
  BLKID_LIBS = ${BLKID_LIBS}
  BLKID_CFLAGS = ${BLKID_CFLAGS}
-@@ -98750,9 +43878,7 @@
+@@ -103495,9 +46194,7 @@
  
  if test x"$ac_cv_func_ext_blkid_get_cache" = x"yes"; then
  
@@ -103490,7 +107483,7 @@
  
  
  	MAKE_SETTINGS="$MAKE_SETTINGS
-@@ -98780,102 +43906,12 @@
+@@ -103525,102 +46222,12 @@
  
  fi
  
@@ -103597,7 +107590,7 @@
  _ACEOF
  
  fi
-@@ -98885,151 +43921,12 @@
+@@ -103630,151 +46237,12 @@
  ###############################
  # start SMB_EXT_LIB_PAM
  # check for security/pam_appl.h and -lpam
@@ -103753,7 +107746,7 @@
  _ACEOF
  
  fi
-@@ -99038,23 +43935,17 @@
+@@ -103783,23 +46251,17 @@
  
  
  
@@ -103780,7 +107773,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -99072,54 +43963,28 @@
+@@ -103817,54 +46279,28 @@
    return 0;
  }
  _ACEOF
@@ -103842,7 +107835,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_LIBPAM 1
  _ACEOF
-@@ -99134,7 +43999,6 @@
+@@ -103879,7 +46315,6 @@
  
  
  fi
@@ -103850,7 +107843,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
-@@ -99160,23 +44024,17 @@
+@@ -103905,23 +46340,17 @@
  # test for where we get crypt() from
  
  
@@ -103877,7 +107870,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -99194,54 +44052,28 @@
+@@ -103939,54 +46368,28 @@
    return 0;
  }
  _ACEOF
@@ -103939,7 +107932,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_LIBCRYPT 1
  _ACEOF
-@@ -99257,7 +44089,6 @@
+@@ -104002,7 +46405,6 @@
  
  fi
  
@@ -103947,7 +107940,7 @@
  	MAKE_SETTINGS="$MAKE_SETTINGS
  CRYPT_ENABLE = YES
  "
-@@ -99274,102 +44105,12 @@
+@@ -104019,102 +46421,12 @@
  
  
  
@@ -104055,7 +108048,7 @@
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
  _ACEOF
-@@ -99378,151 +44119,12 @@
+@@ -104123,151 +46435,12 @@
  done
  
  
@@ -104211,44 +108204,37 @@
  _ACEOF
  
  fi
-@@ -99531,330 +44133,18 @@
+@@ -104276,23 +46449,17 @@
  
  
  
 -
  ac_check_lib_ext_save_LIBS=$LIBS
--LIBS="-lsasl2 $SASL_LIBS  $LIBS"
+ LIBS="-lsasl2 $SASL_LIBS  $LIBS"
+ 
+ 
+ 
 -
--
--
--
 -        { $as_echo "$as_me:$LINENO: checking for sasl_client_init in -lsasl2" >&5
--$as_echo_n "checking for sasl_client_init in -lsasl2... " >&6; }
++        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sasl_client_init in -lsasl2" >&5
+ $as_echo_n "checking for sasl_client_init in -lsasl2... " >&6; }
 -if test "${ac_cv_lib_ext_sasl2_sasl_client_init+set}" = set; then
--  $as_echo_n "(cached) " >&6
--else
++if test "${ac_cv_lib_ext_sasl2_sasl_client_init+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 sasl_client_init ();
--int
--main ()
--{
--return sasl_client_init ();
--  ;
--  return 0;
--}
--_ACEOF
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ 
+ /* Override any GCC internal prototype to avoid an error.
+@@ -104310,54 +46477,28 @@
+   return 0;
+ }
+ _ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -104270,74 +108256,89 @@
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
--  ac_cv_lib_ext_sasl2_sasl_client_init=yes;
--		  ac_cv_lib_ext_sasl2=yes
--else
++if ac_fn_c_try_link "$LINENO"; then :
+   ac_cv_lib_ext_sasl2_sasl_client_init=yes;
+ 		  ac_cv_lib_ext_sasl2=yes
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	ac_cv_lib_ext_sasl2_sasl_client_init=no;
--		  ac_cv_lib_ext_sasl2=no
--fi
++  ac_cv_lib_ext_sasl2_sasl_client_init=no;
+ 		  ac_cv_lib_ext_sasl2=no
+ fi
 -
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
--
--fi
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
+ 
+ fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ext_sasl2_sasl_client_init" >&5
--$as_echo "$ac_cv_lib_ext_sasl2_sasl_client_init" >&6; }
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ext_sasl2_sasl_client_init" >&5
+ $as_echo "$ac_cv_lib_ext_sasl2_sasl_client_init" >&6; }
 -    if test $ac_cv_lib_ext_sasl2_sasl_client_init = yes; then
--  cat >>confdefs.h <<_ACEOF
--#define HAVE_SASL_CLIENT_INIT 1
--_ACEOF
++    if test $ac_cv_lib_ext_sasl2_sasl_client_init = yes; then :
+   cat >>confdefs.h <<_ACEOF
+ #define HAVE_SASL_CLIENT_INIT 1
+ _ACEOF
+ 
+ fi
 -
--fi
--
--LIBS=$ac_check_lib_ext_save_LIBS
--
+ LIBS=$ac_check_lib_ext_save_LIBS
+ 
 -if test $ac_cv_lib_ext_sasl2 = yes; then
--  cat >>confdefs.h <<_ACEOF
--#define HAVE_LIBSASL2 1
--_ACEOF
++if test $ac_cv_lib_ext_sasl2 = yes; then :
+   cat >>confdefs.h <<_ACEOF
+ #define HAVE_LIBSASL2 1
+ _ACEOF
+@@ -104373,7 +46514,6 @@
+ 
+ fi
+ 
 -
--		case "$SASL_LIBS" in
--		    *-lsasl2*)
--			;;
--		    *)
--			SASL_LIBS="-lsasl2 $SASL_LIBS"
--			;;
--		esac
+ 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
+@@ -104419,312 +46559,88 @@
+             ac_new_flags="$ac_new_flags$s$i";
+         else
+             ac_new_flags="$ac_new_flags$s$l $i";
+-        fi
+-        l=""
+-        ;;
+-    esac
+-  done
+-  SASL_LDFLAGS=$ac_new_flags
 -
 -
--fi
+-  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
 -
 -
--if test x"$ac_cv_header_sasl_sasl_h" = x"yes" -a x"$ac_cv_lib_ext_sasl2_sasl_client_init" = x"yes";then
+-  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
 -
--	MAKE_SETTINGS="$MAKE_SETTINGS
--SASL_ENABLE = YES
--"
--SMB_INFO_ENABLES="$SMB_INFO_ENABLES
--\$enabled{SASL} = \"YES\";"
--
--
--	MAKE_SETTINGS="$MAKE_SETTINGS
--cyrus_sasl_ENABLE = YES
--"
--SMB_INFO_ENABLES="$SMB_INFO_ENABLES
--\$enabled{cyrus_sasl} = \"YES\";"
--
--	SASL_CFLAGS="$CFLAGS"
--	SASL_CPPFLAGS="$CPPFLAGS"
--	SASL_LDFLAGS="$LDFLAGS"
 -else
 -
 -	MAKE_SETTINGS="$MAKE_SETTINGS
 -cyrus_sasl_ENABLE = NO
 -"
 -SMB_INFO_ENABLES="$SMB_INFO_ENABLES
--\$enabled{cyrus_sasl} = \"NO\";"
+-\$enabled{\"cyrus_sasl\"} = \"NO\";"
 -
 -fi
 -
@@ -104356,7 +108357,7 @@
 -server_service_kdc_ENABLE = $HAVE_KRB5
 -"
 -SMB_INFO_ENABLES="$SMB_INFO_ENABLES
--\$enabled{server_service_kdc} = \"$HAVE_KRB5\";"
+-\$enabled{\"server_service_kdc\"} = \"$HAVE_KRB5\";"
 -
 -
 -
@@ -104450,14 +108451,38 @@
 -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
 -  yes:no: )
@@ -104492,14 +108517,14 @@
 -$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; }
--
+ 
 -fi
 -as_val=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
@@ -104507,11 +108532,16 @@
 -  cat >>confdefs.h <<_ACEOF
 -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
 -_ACEOF
--
--fi
--
++	MAKE_SETTINGS="$MAKE_SETTINGS
++cyrus_sasl_ENABLE = NO
++"
++SMB_INFO_ENABLES="$SMB_INFO_ENABLES
++\$enabled{\"cyrus_sasl\"} = \"NO\";"
+ 
+ fi
+ 
 -done
--
+ 
 -{ $as_echo "$as_me:$LINENO: checking for inotify_init" >&5
 -$as_echo_n "checking for inotify_init... " >&6; }
 -if test "${ac_cv_func_inotify_init+set}" = set; then
@@ -104526,7 +108556,12 @@
 -/* Define inotify_init to an innocuous variant, in case <limits.h> declares inotify_init.
 -   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
 -#define inotify_init innocuous_inotify_init
-+LIBS="-lsasl2 $SASL_LIBS  $LIBS"
++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.
@@ -104540,20 +108575,13 @@
 -#endif
  
 -#undef inotify_init
-+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sasl_client_init in -lsasl2" >&5
-+$as_echo_n "checking for sasl_client_init in -lsasl2... " >&6; }
-+if test "${ac_cv_lib_ext_sasl2_sasl_client_init+set}" = set; then :
-+  $as_echo_n "(cached) " >&6
-+else
-+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h.  */
  
- /* Override any GCC internal prototype to avoid an error.
-    Use char because int might match the return type of a GCC
-@@ -99862,70 +44152,125 @@
- #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 inotify_init ();
 -/* The GNU C library defines this for functions which it implements
 -    to always fail with ENOSYS.  Some functions are actually named
@@ -104561,16 +108589,28 @@
 -#if defined __stub_inotify_init || defined __stub___inotify_init
 -choke me
 -#endif
--
-+char sasl_client_init ();
- int
- main ()
- {
++	MAKE_SETTINGS="$MAKE_SETTINGS
++server_service_kdc_ENABLE = $HAVE_KRB5
++"
++SMB_INFO_ENABLES="$SMB_INFO_ENABLES
++\$enabled{\"server_service_kdc\"} = \"$HAVE_KRB5\";"
+ 
+-int
+-main ()
+-{
 -return inotify_init ();
-+return sasl_client_init ();
-   ;
-   return 0;
- }
+-  ;
+-  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 :
++  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"
@@ -104594,100 +108634,9 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  ac_cv_func_inotify_init=yes
-+if ac_fn_c_try_link "$LINENO"; then :
-+  ac_cv_lib_ext_sasl2_sasl_client_init=yes;
-+		  ac_cv_lib_ext_sasl2=yes
- else
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+  ac_cv_lib_ext_sasl2_sasl_client_init=no;
-+		  ac_cv_lib_ext_sasl2=no
-+fi
-+rm -f core conftest.err conftest.$ac_objext \
-+    conftest$ac_exeext conftest.$ac_ext
-+
-+fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ext_sasl2_sasl_client_init" >&5
-+$as_echo "$ac_cv_lib_ext_sasl2_sasl_client_init" >&6; }
-+    if test $ac_cv_lib_ext_sasl2_sasl_client_init = yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define HAVE_SASL_CLIENT_INIT 1
-+_ACEOF
-+
-+fi
-+LIBS=$ac_check_lib_ext_save_LIBS
-+
-+if test $ac_cv_lib_ext_sasl2 = yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define HAVE_LIBSASL2 1
-+_ACEOF
-+
-+		case "$SASL_LIBS" in
-+		    *-lsasl2*)
-+			;;
-+		    *)
-+			SASL_LIBS="-lsasl2 $SASL_LIBS"
-+			;;
-+		esac
-+
-+
-+fi
-+
-+if test x"$ac_cv_header_sasl_sasl_h" = x"yes" -a x"$ac_cv_lib_ext_sasl2_sasl_client_init" = x"yes";then
-+
-+	MAKE_SETTINGS="$MAKE_SETTINGS
-+SASL_ENABLE = YES
-+"
-+SMB_INFO_ENABLES="$SMB_INFO_ENABLES
-+\$enabled{SASL} = \"YES\";"
-+
-+
-+	MAKE_SETTINGS="$MAKE_SETTINGS
-+cyrus_sasl_ENABLE = YES
-+"
-+SMB_INFO_ENABLES="$SMB_INFO_ENABLES
-+\$enabled{cyrus_sasl} = \"YES\";"
-+
-+	SASL_CFLAGS="$CFLAGS"
-+	SASL_CPPFLAGS="$CPPFLAGS"
-+	SASL_LDFLAGS="$LDFLAGS"
-+else
-+
-+	MAKE_SETTINGS="$MAKE_SETTINGS
-+cyrus_sasl_ENABLE = NO
-+"
-+SMB_INFO_ENABLES="$SMB_INFO_ENABLES
-+\$enabled{cyrus_sasl} = \"NO\";"
-+
-+fi
-+
-+
-+MAKE_SETTINGS="$MAKE_SETTINGS
-+SASL_LIBS = $SASL_LIBS
-+SASL_CFLAGS = ${SASL_CFLAGS}
-+SASL_CPPFLAGS = ${SASL_CPPFLAGS}
-+SASL_LDFLAGS = ${SASL_LDFLAGS}
-+"
-+
-+
-+
-+
-+	MAKE_SETTINGS="$MAKE_SETTINGS
-+server_service_kdc_ENABLE = $HAVE_KRB5
-+"
-+SMB_INFO_ENABLES="$SMB_INFO_ENABLES
-+\$enabled{server_service_kdc} = \"$HAVE_KRB5\";"
-+
-+
-+for ac_header in linux/inotify.h asm/unistd.h sys/inotify.h
-+do :
-+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-+eval as_val=\$$as_ac_Header
-+   if test "x$as_val" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-+_ACEOF
  
 -	ac_cv_func_inotify_init=no
  fi
@@ -104722,7 +108671,7 @@
  /* end confdefs.h.  */
  #include <asm/unistd.h>
  int
-@@ -99936,41 +44281,18 @@
+@@ -104735,41 +46651,18 @@
    return 0;
  }
  _ACEOF
@@ -104768,7 +108717,7 @@
  
   fi
  
-@@ -100014,17 +44336,13 @@
+@@ -104813,17 +46706,13 @@
  fi
  
  
@@ -104789,7 +108738,7 @@
  /* end confdefs.h.  */
  #include <fcntl.h>
  int
-@@ -100035,56 +44353,29 @@
+@@ -104834,56 +46723,29 @@
    return 0;
  }
  _ACEOF
@@ -104853,7 +108802,7 @@
  /* end confdefs.h.  */
  #include <signal.h>
  int
-@@ -100095,41 +44386,18 @@
+@@ -104894,41 +46756,18 @@
    return 0;
  }
  _ACEOF
@@ -104899,7 +108848,7 @@
  
   fi
  
-@@ -100153,151 +44421,12 @@
+@@ -104952,151 +46791,12 @@
  
  fi
  
@@ -105056,7 +109005,7 @@
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
-@@ -100611,151 +44740,12 @@
+@@ -105410,151 +47110,12 @@
  
  
  
@@ -105212,7 +109161,7 @@
  _ACEOF
  
  fi
-@@ -100765,23 +44755,17 @@
+@@ -105564,23 +47125,17 @@
  
  
  
@@ -105239,7 +109188,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -100799,54 +44783,28 @@
+@@ -105598,54 +47153,28 @@
    return 0;
  }
  _ACEOF
@@ -105301,7 +109250,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_LIBZ 1
  _ACEOF
-@@ -100862,18 +44820,13 @@
+@@ -105661,18 +47190,13 @@
  
  fi
  
@@ -105323,7 +109272,7 @@
  /* end confdefs.h.  */
  
  		#include <zlib.h>
-@@ -100891,40 +44844,19 @@
+@@ -105690,40 +47214,19 @@
    return 0;
  }
  _ACEOF
@@ -105366,7 +109315,33 @@
  $as_echo "$samba_cv_zlib_1_2_3" >&6; }
  
  if test x"$ac_cv_header_zlib_h" = x"yes" -a \
-@@ -101038,87 +44970,54 @@
+@@ -105745,7 +47248,7 @@
+ 
+ 
+ # Check whether --enable-dmalloc was given.
+-if test "${enable_dmalloc+set}" = set; then
++if test "${enable_dmalloc+set}" = set; then :
+   enableval=$enable_dmalloc;
+ fi
+ 
+@@ -105753,14 +47256,10 @@
+ if test "x$enable_dmalloc" = xyes
+ then
+ 
+-cat >>confdefs.h <<\_ACEOF
+-#define ENABLE_DMALLOC 1
+-_ACEOF
++$as_echo "#define ENABLE_DMALLOC 1" >>confdefs.h
+ 
+ 
+-cat >>confdefs.h <<\_ACEOF
+-#define DMALLOC_FUNC_CHECK 1
+-_ACEOF
++$as_echo "#define DMALLOC_FUNC_CHECK 1" >>confdefs.h
+ 
+ 	LIBS="$LIBS -ldmalloc"
+ fi
+@@ -105858,87 +47357,54 @@
  #################################################
  # Display summary of libraries detected
  
@@ -105470,7 +109445,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
-@@ -101177,13 +45076,13 @@
+@@ -105997,13 +47463,13 @@
      case $ac_val in #(
      *${as_nl}*)
        case $ac_var in #(
@@ -105486,7 +109461,7 @@
        esac ;;
      esac
    done
-@@ -101191,8 +45090,8 @@
+@@ -106011,8 +47477,8 @@
    (set) 2>&1 |
      case $as_nl`(ac_space=' '; set) 2>&1` in #(
      *${as_nl}ac_space=\ *)
@@ -105497,7 +109472,7 @@
        sed -n \
  	"s/'/'\\\\''/g;
  	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
-@@ -101215,11 +45114,11 @@
+@@ -106035,11 +47501,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" &&
@@ -105511,7 +109486,7 @@
  $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
    fi
  fi
-@@ -101239,8 +45138,8 @@
+@@ -106059,8 +47525,8 @@
    ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
    # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
    #    will be set to the directory where LIBOBJS objects are built.
@@ -105522,7 +109497,7 @@
  done
  LIBOBJS=$ac_libobjs
  
-@@ -101264,9 +45163,10 @@
+@@ -106084,9 +47550,10 @@
  ac_write_fail=0
  ac_clean_files_save=$ac_clean_files
  ac_clean_files="$ac_clean_files $CONFIG_STATUS"
@@ -105535,7 +109510,7 @@
  #! $SHELL
  # Generated by $as_me.
  # Run this file to recreate the current configuration.
-@@ -101276,17 +45176,18 @@
+@@ -106096,17 +47563,18 @@
  debug=false
  ac_cs_recheck=false
  ac_cs_silent=false
@@ -105561,7 +109536,7 @@
    emulate sh
    NULLCMD=:
    # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
-@@ -101294,23 +45195,15 @@
+@@ -106114,23 +47582,15 @@
    alias -g '${1+"$@"}'='"$@"'
    setopt NO_GLOB_SUBST
  else
@@ -105590,7 +109565,7 @@
  as_nl='
  '
  export as_nl
-@@ -101318,7 +45211,13 @@
+@@ -106138,7 +47598,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
@@ -105605,7 +109580,7 @@
    as_echo='printf %s\n'
    as_echo_n='printf %s'
  else
-@@ -101329,7 +45228,7 @@
+@@ -106149,7 +47615,7 @@
      as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
      as_echo_n_body='eval
        arg=$1;
@@ -105614,7 +109589,7 @@
        *"$as_nl"*)
  	expr "X$arg" : "X\\(.*\\)$as_nl";
  	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
-@@ -101352,13 +45251,6 @@
+@@ -106172,13 +47638,6 @@
    }
  fi
  
@@ -105628,7 +109603,7 @@
  
  # IFS
  # We need space, tab and new line, in precisely that order.  Quoting is
-@@ -101368,15 +45260,15 @@
+@@ -106188,15 +47647,15 @@
  IFS=" ""	$as_nl"
  
  # Find who we are.  Look in the path if we contain no directory separator.
@@ -105647,7 +109622,7 @@
  IFS=$as_save_IFS
  
       ;;
-@@ -101388,12 +45280,16 @@
+@@ -106208,12 +47667,16 @@
  fi
  if test ! -f "$as_myself"; then
    $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
@@ -105668,7 +109643,7 @@
  done
  PS1='$ '
  PS2='> '
-@@ -101405,7 +45301,89 @@
+@@ -106225,7 +47688,89 @@
  LANGUAGE=C
  export LANGUAGE
  
@@ -105759,7 +109734,7 @@
  if expr a : '\(a\)' >/dev/null 2>&1 &&
     test "X`expr 00001 : '.*\(...\)'`" = X001; then
    as_expr=expr
-@@ -101419,8 +45397,12 @@
+@@ -106239,8 +47784,12 @@
    as_basename=false
  fi
  
@@ -105773,7 +109748,7 @@
  as_me=`$as_basename -- "$0" ||
  $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
  	 X"$0" : 'X\(//\)$' \| \
-@@ -101440,76 +45422,25 @@
+@@ -106260,76 +47809,25 @@
  	  }
  	  s/.*/./; q'`
  
@@ -105861,7 +109836,7 @@
  
  rm -f conf$$ conf$$.exe conf$$.file
  if test -d conf$$.dir; then
-@@ -101538,8 +45469,56 @@
+@@ -106358,8 +47856,56 @@
  rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
  rmdir conf$$.dir 2>/dev/null
  
@@ -105919,7 +109894,7 @@
  else
    test -d ./-p && rmdir ./-p
    as_mkdir_p=false
-@@ -101558,10 +45537,10 @@
+@@ -106378,10 +47924,10 @@
        if test -d "$1"; then
  	test -d "$1/.";
        else
@@ -105932,7 +109907,7 @@
  	???[sx]*):;;*)false;;esac;fi
      '\'' sh
    '
-@@ -101576,13 +45555,19 @@
+@@ -106396,13 +47942,19 @@
  
  
  exec 6>&1
@@ -105954,7 +109929,7 @@
  
    CONFIG_FILES    = $CONFIG_FILES
    CONFIG_HEADERS  = $CONFIG_HEADERS
-@@ -101614,13 +45599,15 @@
+@@ -106434,13 +47986,15 @@
  
  cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
  ac_cs_usage="\
@@ -105973,7 +109948,7 @@
    -q, --quiet, --silent
                     do not print progress messages
    -d, --debug      don't remove temporary files
-@@ -101639,16 +45626,17 @@
+@@ -106459,16 +48013,17 @@
  Configuration commands:
  $config_commands
  
@@ -105995,7 +109970,7 @@
  This config.status script is free software; the Free Software Foundation
  gives unlimited permission to copy, distribute and modify it."
  
-@@ -101683,6 +45671,8 @@
+@@ -106503,6 +48058,8 @@
      ac_cs_recheck=: ;;
    --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
      $as_echo "$ac_cs_version"; exit ;;
@@ -106004,7 +109979,7 @@
    --debug | --debu | --deb | --de | --d | -d )
      debug=: ;;
    --file | --fil | --fi | --f )
-@@ -101690,20 +45680,19 @@
+@@ -106510,20 +48067,19 @@
      case $ac_optarg in
      *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
      esac
@@ -106029,7 +110004,7 @@
    --help | --hel | -h )
      $as_echo "$ac_cs_usage"; exit ;;
    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
-@@ -101711,11 +45700,10 @@
+@@ -106531,11 +48087,10 @@
      ac_cs_silent=: ;;
  
    # This is an error.
@@ -106044,7 +110019,7 @@
       ac_need_defaults=false ;;
  
    esac
-@@ -101808,9 +45796,7 @@
+@@ -106628,9 +48183,7 @@
      "pkgconfig/smbsharemodes.pc") CONFIG_FILES="$CONFIG_FILES pkgconfig/smbsharemodes.pc" ;;
      "../examples/libsmbclient/Makefile.internal") CONFIG_FILES="$CONFIG_FILES ../examples/libsmbclient/Makefile.internal" ;;
  
@@ -106055,7 +110030,7 @@
    esac
  done
  
-@@ -101837,7 +45823,7 @@
+@@ -106657,7 +48210,7 @@
    trap 'exit_status=$?
    { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
  ' 0
@@ -106064,7 +110039,7 @@
  }
  # Create a (secure) tmp directory for tmp files.
  
-@@ -101848,11 +45834,7 @@
+@@ -106668,11 +48221,7 @@
  {
    tmp=./conf$$-$RANDOM
    (umask 077 && mkdir "$tmp")
@@ -106077,7 +110052,7 @@
  
  # Set up the scripts for CONFIG_FILES section.
  # No need to generate them if there are no CONFIG_FILES.
-@@ -101860,10 +45842,16 @@
+@@ -106680,10 +48229,16 @@
  if test -n "$CONFIG_FILES"; then
  
  
@@ -106097,7 +110072,7 @@
  else
    ac_cs_awk_cr=$ac_cr
  fi
-@@ -101877,24 +45865,18 @@
+@@ -106697,24 +48252,18 @@
    echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
    echo "_ACEOF"
  } >conf$$subs.sh ||
@@ -106125,7 +110100,7 @@
    else
      ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
    fi
-@@ -101916,7 +45898,7 @@
+@@ -106736,7 +48285,7 @@
  t delim
  :nl
  h
@@ -106134,7 +110109,7 @@
  t more1
  s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
  p
-@@ -101930,7 +45912,7 @@
+@@ -106750,7 +48299,7 @@
  t nl
  :delim
  h
@@ -106143,7 +110118,7 @@
  t more2
  s/["\\]/\\&/g; s/^/"/; s/$/"/
  p
-@@ -101983,9 +45965,7 @@
+@@ -106803,9 +48352,7 @@
  else
    cat
  fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
@@ -106154,7 +110129,7 @@
  _ACEOF
  
  # VPATH may cause trouble with some makes, so we remove $(srcdir),
-@@ -102026,9 +46006,7 @@
+@@ -106846,9 +48393,7 @@
    if test -z "$ac_t"; then
      break
    elif $ac_last_try; then
@@ -106165,7 +110140,7 @@
    else
      ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
    fi
-@@ -102113,9 +46091,7 @@
+@@ -106933,9 +48478,7 @@
  _ACAWK
  _ACEOF
  cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
@@ -106176,7 +110151,7 @@
  fi # test -n "$CONFIG_HEADERS"
  
  
-@@ -102128,9 +46104,7 @@
+@@ -106948,9 +48491,7 @@
    esac
    case $ac_mode$ac_tag in
    :[FHL]*:*);;
@@ -106187,7 +110162,7 @@
    :[FH]-) ac_tag=-:-;;
    :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
    esac
-@@ -102158,12 +46132,10 @@
+@@ -106978,12 +48519,10 @@
  	   [\\/$]*) false;;
  	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
  	   esac ||
@@ -106202,7 +110177,7 @@
      done
  
      # Let's still pretend it is `configure' which instantiates (i.e., don't
-@@ -102174,7 +46146,7 @@
+@@ -106994,7 +48533,7 @@
  	`' by configure.'
      if test x"$ac_file" != x-; then
        configure_input="$ac_file.  $configure_input"
@@ -106211,7 +110186,7 @@
  $as_echo "$as_me: creating $ac_file" >&6;}
      fi
      # Neutralize special characters interpreted by sed in replacement strings.
-@@ -102187,9 +46159,7 @@
+@@ -107007,9 +48546,7 @@
  
      case $ac_tag in
      *:-:* | *:-) cat >"$tmp/stdin" \
@@ -106222,7 +110197,7 @@
      esac
      ;;
    esac
-@@ -102217,47 +46187,7 @@
+@@ -107037,47 +48574,7 @@
  	    q
  	  }
  	  s/.*/./; q'`
@@ -106271,7 +110246,7 @@
    ac_builddir=.
  
  case "$ac_dir" in
-@@ -102309,7 +46239,6 @@
+@@ -107129,7 +48626,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=
@@ -106279,7 +110254,7 @@
  ac_sed_dataroot='
  /datarootdir/ {
    p
-@@ -102319,12 +46248,11 @@
+@@ -107139,12 +48635,11 @@
  /@docdir@/p
  /@infodir@/p
  /@localedir@/p
@@ -106294,7 +110269,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
-@@ -102334,7 +46262,7 @@
+@@ -107154,7 +48649,7 @@
    s&@infodir@&$infodir&g
    s&@localedir@&$localedir&g
    s&@mandir@&$mandir&g
@@ -106303,7 +110278,7 @@
  esac
  _ACEOF
  
-@@ -102362,14 +46290,12 @@
+@@ -107182,14 +48677,12 @@
  $ac_datarootdir_hack
  "
  eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
@@ -106320,7 +110295,7 @@
  which seems to be undefined.  Please make sure it is defined." >&5
  $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
  which seems to be undefined.  Please make sure it is defined." >&2;}
-@@ -102379,9 +46305,7 @@
+@@ -107199,9 +48692,7 @@
    -) cat "$tmp/out" && rm -f "$tmp/out";;
    *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
    esac \
@@ -106331,7 +110306,7 @@
   ;;
    :H)
    #
-@@ -102392,29 +46316,23 @@
+@@ -107212,29 +48703,23 @@
        $as_echo "/* $configure_input  */" \
        && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
      } >"$tmp/config.h" \
@@ -106366,7 +110341,7 @@
  $as_echo "$as_me: executing $ac_file commands" >&6;}
   ;;
    esac
-@@ -102440,15 +46358,12 @@
+@@ -107260,15 +48745,12 @@
  done # for ac_tag
  
  
@@ -106384,7 +110359,7 @@
  
  
  # configure is writing to config.log, and then calls config.status.
-@@ -102469,10 +46384,10 @@
+@@ -107289,10 +48771,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.
@@ -106397,7 +110372,7 @@
  $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
  fi
  
-@@ -102483,8 +46398,8 @@
+@@ -107303,8 +48785,8 @@
  # Print very concise instructions on building/use
  if test "x$enable_dmalloc" = xyes
  then

Modified: trunk/samba/debian/patches/codepages-location.patch
===================================================================
--- trunk/samba/debian/patches/codepages-location.patch	2010-09-06 17:45:31 UTC (rev 3571)
+++ trunk/samba/debian/patches/codepages-location.patch	2010-09-06 20:23:16 UTC (rev 3572)
@@ -1,19 +0,0 @@
-Description: Move codepage files to the datadir
- "codepagedir" is not configurable and the leads to build failures.
-Author: Christian Perrier <bubulle at debian.org>
-Bug: https://bugzilla.samba.org/show_bug.cgi?id=6444
-Forwarded: yes
-
-Index: b/source3/Makefile.in
-===================================================================
---- a/source3/Makefile.in	2009-11-08 15:55:34.000000000 +0100
-+++ b/source3/Makefile.in	2009-11-08 15:55:38.000000000 +0100
-@@ -156,7 +156,7 @@
- STATEDIR = @statedir@
- 
- # Where to look for (and install) codepage databases.
--CODEPAGEDIR = @codepagedir@
-+CODEPAGEDIR = @datadir@
- 
- # the directory where pid files go
- PIDDIR = @piddir@

Modified: trunk/samba/debian/patches/documentation.patch
===================================================================
--- trunk/samba/debian/patches/documentation.patch	2010-09-06 17:45:31 UTC (rev 3571)
+++ trunk/samba/debian/patches/documentation.patch	2010-09-06 20:23:16 UTC (rev 3572)
@@ -2,10 +2,10 @@
 Author: Christian Perrier <bubulle at debian.org>
 Forwarded: not-needed
 
-Index: samba/docs/manpages/swat.8
+Index: experimental/docs/manpages/swat.8
 ===================================================================
---- samba.orig/docs/manpages/swat.8
-+++ samba/docs/manpages/swat.8
+--- experimental.orig/docs/manpages/swat.8
++++ experimental/docs/manpages/swat.8
 @@ -261,85 +261,6 @@
  .RS 4
  Print a summary of command line options\&.
@@ -92,10 +92,27 @@
  .SH "LAUNCHING"
  .PP
  To launch SWAT just run your favorite web browser and point it at "http://localhost:901/"\&.
-Index: samba/docs/manpages/nmbd.8
+@@ -357,14 +278,11 @@
+ This file must contain a mapping of service name (e\&.g\&., swat) to service port (e\&.g\&., 901) and protocol type (e\&.g\&., tcp)\&.
+ .RE
+ .PP
+-\FC/usr/local/samba/lib/smb\&.conf\F[]
++\FC/etc/samba/smb\&.conf\F[]
+ .RS 4
+ This is the default location of the
+ \fBsmb.conf\fR(5)
+-server configuration file that swat edits\&. Other common places that systems install this file are
+-\FC /usr/samba/lib/smb\&.conf\F[]
+-and
+-\FC/etc/smb\&.conf \F[]\&. This file describes all the services the server is to make available to clients\&.
++server configuration file that swat edits\&. This file describes all the services the server is to make available to clients\&.
+ .RE
+ .SH "WARNINGS"
+ .PP
+Index: experimental/docs/manpages/nmbd.8
 ===================================================================
---- samba.orig/docs/manpages/nmbd.8
-+++ samba/docs/manpages/nmbd.8
+--- experimental.orig/docs/manpages/nmbd.8
++++ experimental/docs/manpages/nmbd.8
 @@ -265,10 +265,7 @@
  to answer any name queries\&. Adding a line to this file affects name NetBIOS resolution from this host
  \fIONLY\fR\&.
@@ -121,7 +138,7 @@
 -\FC/usr/samba/lib/smb\&.conf\F[]
 -and
 -\FC/etc/samba/smb\&.conf\F[]\&.
-+server configuration file\&.
+++server configuration file\&.
  .sp
  When run as a WINS server (see the
  \m[blue]\fBwins support\fR\m[]
@@ -133,15 +150,15 @@
 -directory (or the
 -\FCvar/locks\F[]
 -directory configured under wherever Samba was configured to install itself)\&. This will also cause
-+\FC/war/run/samba\F[]
++\FC/var/run/samba\F[]
 +directory\&. This will also cause
  \FCnmbd\F[]
  to dump out its server database in the
  \FClog\&.nmb\F[]
-Index: samba/docs/manpages/smbd.8
+Index: experimental/docs/manpages/smbd.8
 ===================================================================
---- samba.orig/docs/manpages/smbd.8
-+++ samba/docs/manpages/smbd.8
+--- experimental.orig/docs/manpages/smbd.8
++++ experimental/docs/manpages/smbd.8
 @@ -319,14 +319,11 @@
  \FCinetd\F[], this file must contain a mapping of service name (e\&.g\&., netbios\-ssn) to service port (e\&.g\&., 139) and protocol type (e\&.g\&., tcp)\&.
  .RE
@@ -155,29 +172,31 @@
 -\FC/usr/samba/lib/smb\&.conf\F[]
 -and
 -\FC/etc/samba/smb\&.conf\F[]\&.
-+server configuration file\&.
+++server configuration file\&.
  .sp
  This file describes all the services the server is to make available to clients\&. See
  \fBsmb.conf\fR(5)
-Index: samba/docs/manpages/lmhosts.5
+Index: experimental/docs/manpages/lmhosts.5
 ===================================================================
---- samba.orig/docs/manpages/lmhosts.5
-+++ samba/docs/manpages/lmhosts.5
-@@ -258,9 +258,7 @@
+--- experimental.orig/docs/manpages/lmhosts.5
++++ experimental/docs/manpages/lmhosts.5
+@@ -257,10 +257,8 @@
+ file\&.
  .SH "FILES"
  .PP
- lmhosts is loaded from the configuration directory\&. This is usually
+-lmhosts is loaded from the configuration directory\&. This is usually
 -\FC/etc/samba\F[]
 -or
 -\FC/usr/local/samba/lib\F[]\&.
++lmhosts is loaded from the configuration directory\&. This is
 +\FC/etc/samba\F[]\&.
  .SH "VERSION"
  .PP
  This man page is correct for version 3 of the Samba suite\&.
-Index: samba/docs/manpages/ntlm_auth.1
+Index: experimental/docs/manpages/ntlm_auth.1
 ===================================================================
---- samba.orig/docs/manpages/ntlm_auth.1
-+++ samba/docs/manpages/ntlm_auth.1
+--- experimental.orig/docs/manpages/ntlm_auth.1
++++ experimental/docs/manpages/ntlm_auth.1
 @@ -193,7 +193,7 @@
  Some of these commands also require access to the directory
  \FCwinbindd_privileged\F[]
@@ -205,10 +224,10 @@
  .RE
  .PP
  gss\-spnego\-client
-Index: samba/docs/manpages/tdbbackup.8
+Index: experimental/docs/manpages/tdbbackup.8
 ===================================================================
---- samba.orig/docs/manpages/tdbbackup.8
-+++ samba/docs/manpages/tdbbackup.8
+--- experimental.orig/docs/manpages/tdbbackup.8
++++ experimental/docs/manpages/tdbbackup.8
 @@ -227,7 +227,7 @@
  .\}
  
@@ -236,10 +255,10 @@
  .SH "VERSION"
  .PP
  This man page is correct for version 3 of the Samba suite\&.
-Index: samba/docs/manpages/winbindd.8
+Index: experimental/docs/manpages/winbindd.8
 ===================================================================
---- samba.orig/docs/manpages/winbindd.8
-+++ samba/docs/manpages/winbindd.8
+--- experimental.orig/docs/manpages/winbindd.8
++++ experimental/docs/manpages/winbindd.8
 @@ -771,16 +771,16 @@
  file are owned by root\&.
  .RE
@@ -253,7 +272,7 @@
  \FCntlm_auth\F[]
 -utility \- is restricted\&. By default, only users in the \'root\' group will get this access, however the administrator may change the group permissions on $LOCKDIR/winbindd_privileged to allow programs like \'squid\' to use ntlm_auth\&. Note that the winbind client will only attempt to connect to the winbindd daemon if both the
 -\FC$LOCKDIR/winbindd_privileged\F[]
-+utility \- is restricted\&. By default, only users in the \'root\' group will get this access, however the administrator may change the group permissions on /var/run/samba//winbindd_privileged to allow programs like \'squid\' to use ntlm_auth\&. Note that the winbind client will only attempt to connect to the winbindd daemon if both the
++utility \- is restricted\&. By default, only users in the \'root\' group will get this access, however the administrator may change the group permissions on /var/run/samba/winbindd_privileged to allow programs like \'squid\' to use ntlm_auth\&. Note that the winbind client will only attempt to connect to the winbindd daemon if both the
 +\FC/var/run/samba/winbindd_privileged\F[]
  directory and
 -\FC$LOCKDIR/winbindd_privileged/pipe\F[]

Modified: trunk/samba/debian/patches/external-talloc-support.patch
===================================================================
--- trunk/samba/debian/patches/external-talloc-support.patch	2010-09-06 17:45:31 UTC (rev 3571)
+++ trunk/samba/debian/patches/external-talloc-support.patch	2010-09-06 20:23:16 UTC (rev 3572)
@@ -1,18 +0,0 @@
-Description: Fix build against external libtalloc
- Upstream Makefile is untested with builds against external libtalloc; fix a
- make error when libtalloc is not being built.
-Author: Steve Langasek <vorlon at debian.org>
-
-Index: b/source3/configure.in
-===================================================================
---- a/source3/configure.in	2009-11-08 15:54:25.000000000 +0100
-+++ b/source3/configure.in	2009-11-08 15:55:38.000000000 +0100
-@@ -42,6 +42,8 @@
- if test "x$enable_external_libtalloc" != xyes
- then
- 	m4_include(../lib/talloc/libtalloc.m4)
-+else
-+	tallocdir=../lib/talloc
- fi
- 
- m4_include(../lib/tevent/libtevent.m4)

Modified: trunk/samba/debian/patches/fhs-filespaths.patch
===================================================================
--- trunk/samba/debian/patches/fhs-filespaths.patch	2010-09-06 17:45:31 UTC (rev 3571)
+++ trunk/samba/debian/patches/fhs-filespaths.patch	2010-09-06 20:23:16 UTC (rev 3572)
@@ -13,11 +13,11 @@
 Forwarded: not-needed
 
 
-Index: b/source3/passdb/pdb_tdb.c
+Index: experimental/source3/passdb/pdb_tdb.c
 ===================================================================
---- a/source3/passdb/pdb_tdb.c	2009-11-08 15:54:27.000000000 +0100
-+++ b/source3/passdb/pdb_tdb.c	2009-11-08 15:55:33.000000000 +0100
-@@ -1252,7 +1252,7 @@
+--- experimental.orig/source3/passdb/pdb_tdb.c
++++ experimental/source3/passdb/pdb_tdb.c
+@@ -1255,7 +1255,7 @@
  	/* save the path for later */
  
  	if (!location) {
@@ -26,11 +26,11 @@
  			     PASSDB_FILE_NAME) < 0) {
  			return NT_STATUS_NO_MEMORY;
  		}
-Index: b/source3/passdb/secrets.c
+Index: experimental/source3/passdb/secrets.c
 ===================================================================
---- a/source3/passdb/secrets.c	2009-11-08 15:54:27.000000000 +0100
-+++ b/source3/passdb/secrets.c	2009-11-08 15:55:33.000000000 +0100
-@@ -59,7 +59,7 @@
+--- experimental.orig/source3/passdb/secrets.c
++++ experimental/source3/passdb/secrets.c
+@@ -61,7 +61,7 @@
  		return True;
  
  	fname = talloc_asprintf(talloc_tos(), "%s/secrets.tdb",
@@ -39,12 +39,3 @@
  	if (fname == NULL) {
  		return false;
  	}
-@@ -1138,7 +1138,7 @@
- 	TDB_DATA vers;
- 	uint32 ver;
- 	TDB_CONTEXT *tdb_sc = NULL;
--	char *fname = talloc_asprintf(mem_ctx, "%s/schannel_store.tdb", lp_private_dir());
-+	char *fname = talloc_asprintf(mem_ctx, "%s/schannel_store.tdb", get_dyn_STATEDIR());
- 
- 	if (!fname) {
- 		return NULL;

Modified: trunk/samba/debian/patches/fix-manpages-warnings.patch
===================================================================
--- trunk/samba/debian/patches/fix-manpages-warnings.patch	2010-09-06 17:45:31 UTC (rev 3571)
+++ trunk/samba/debian/patches/fix-manpages-warnings.patch	2010-09-06 20:23:16 UTC (rev 3572)
@@ -1,2076 +0,0 @@
-Description: Fix warnings in manpages
- Lintian report non-existing macros in manpages.
-Author: Christian Perrier <bubulle at debian.org>
-
-Index: b/docs/manpages/eventlogadm.8
-===================================================================
---- a/docs/manpages/eventlogadm.8	2009-11-08 15:54:26.000000000 +0100
-+++ b/docs/manpages/eventlogadm.8	2009-11-08 15:55:36.000000000 +0100
-@@ -33,7 +33,6 @@
- .\" SH - level-one heading that works better for non-TTY output
- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- .de1 SH
--.\" put an extra blank line of space above the head in non-TTY output
- .if t \{\
- .sp 1
- .\}
-@@ -48,7 +47,6 @@
- .it 1 an-trap
- .nr an-no-space-flag 1
- .nr an-break-flag 1
--\." make the size of the head bigger
- .ps +3
- .ft B
- .ne (2v + 1u)
-@@ -82,7 +80,6 @@
- .nr an-no-space-flag 1
- .nr an-break-flag 1
- .ps \\n[PS-SS]u
--\." make the size of the head bigger
- .ps +2
- .ft B
- .ne (2v + 1u)
-Index: b/docs/manpages/findsmb.1
-===================================================================
---- a/docs/manpages/findsmb.1	2009-11-08 15:54:26.000000000 +0100
-+++ b/docs/manpages/findsmb.1	2009-11-08 15:55:36.000000000 +0100
-@@ -33,7 +33,6 @@
- .\" SH - level-one heading that works better for non-TTY output
- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- .de1 SH
--.\" put an extra blank line of space above the head in non-TTY output
- .if t \{\
- .sp 1
- .\}
-@@ -48,7 +47,6 @@
- .it 1 an-trap
- .nr an-no-space-flag 1
- .nr an-break-flag 1
--\." make the size of the head bigger
- .ps +3
- .ft B
- .ne (2v + 1u)
-@@ -82,7 +80,6 @@
- .nr an-no-space-flag 1
- .nr an-break-flag 1
- .ps \\n[PS-SS]u
--\." make the size of the head bigger
- .ps +2
- .ft B
- .ne (2v + 1u)
-Index: b/docs/manpages/idmap_ad.8
-===================================================================
---- a/docs/manpages/idmap_ad.8	2009-11-08 15:54:26.000000000 +0100
-+++ b/docs/manpages/idmap_ad.8	2009-11-08 15:55:36.000000000 +0100
-@@ -33,7 +33,6 @@
- .\" SH - level-one heading that works better for non-TTY output
- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- .de1 SH
--.\" put an extra blank line of space above the head in non-TTY output
- .if t \{\
- .sp 1
- .\}
-@@ -48,7 +47,6 @@
- .it 1 an-trap
- .nr an-no-space-flag 1
- .nr an-break-flag 1
--\." make the size of the head bigger
- .ps +3
- .ft B
- .ne (2v + 1u)
-@@ -82,7 +80,6 @@
- .nr an-no-space-flag 1
- .nr an-break-flag 1
- .ps \\n[PS-SS]u
--\." make the size of the head bigger
- .ps +2
- .ft B
- .ne (2v + 1u)
-Index: b/docs/manpages/idmap_adex.8
-===================================================================
---- a/docs/manpages/idmap_adex.8	2009-11-08 15:54:26.000000000 +0100
-+++ b/docs/manpages/idmap_adex.8	2009-11-08 15:55:36.000000000 +0100
-@@ -33,7 +33,6 @@
- .\" SH - level-one heading that works better for non-TTY output
- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- .de1 SH
--.\" put an extra blank line of space above the head in non-TTY output
- .if t \{\
- .sp 1
- .\}
-@@ -48,7 +47,6 @@
- .it 1 an-trap
- .nr an-no-space-flag 1
- .nr an-break-flag 1
--\." make the size of the head bigger
- .ps +3
- .ft B
- .ne (2v + 1u)
-@@ -82,7 +80,6 @@
- .nr an-no-space-flag 1
- .nr an-break-flag 1
- .ps \\n[PS-SS]u
--\." make the size of the head bigger
- .ps +2
- .ft B
- .ne (2v + 1u)
-Index: b/docs/manpages/idmap_hash.8
-===================================================================
---- a/docs/manpages/idmap_hash.8	2009-11-08 15:54:26.000000000 +0100
-+++ b/docs/manpages/idmap_hash.8	2009-11-08 15:55:36.000000000 +0100
-@@ -33,7 +33,6 @@
- .\" SH - level-one heading that works better for non-TTY output
- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- .de1 SH
--.\" put an extra blank line of space above the head in non-TTY output
- .if t \{\
- .sp 1
- .\}
-@@ -48,7 +47,6 @@
- .it 1 an-trap
- .nr an-no-space-flag 1
- .nr an-break-flag 1
--\." make the size of the head bigger
- .ps +3
- .ft B
- .ne (2v + 1u)
-@@ -82,7 +80,6 @@
- .nr an-no-space-flag 1
- .nr an-break-flag 1
- .ps \\n[PS-SS]u
--\." make the size of the head bigger
- .ps +2
- .ft B
- .ne (2v + 1u)
-Index: b/docs/manpages/idmap_ldap.8
-===================================================================
---- a/docs/manpages/idmap_ldap.8	2009-11-08 15:54:26.000000000 +0100
-+++ b/docs/manpages/idmap_ldap.8	2009-11-08 15:55:36.000000000 +0100
-@@ -33,7 +33,6 @@
- .\" SH - level-one heading that works better for non-TTY output
- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- .de1 SH
--.\" put an extra blank line of space above the head in non-TTY output
- .if t \{\
- .sp 1
- .\}
-@@ -48,7 +47,6 @@
- .it 1 an-trap
- .nr an-no-space-flag 1
- .nr an-break-flag 1
--\." make the size of the head bigger
- .ps +3
- .ft B
- .ne (2v + 1u)
-@@ -82,7 +80,6 @@
- .nr an-no-space-flag 1
- .nr an-break-flag 1
- .ps \\n[PS-SS]u
--\." make the size of the head bigger
- .ps +2
- .ft B
- .ne (2v + 1u)
-Index: b/docs/manpages/idmap_nss.8
-===================================================================
---- a/docs/manpages/idmap_nss.8	2009-11-08 15:54:26.000000000 +0100
-+++ b/docs/manpages/idmap_nss.8	2009-11-08 15:55:36.000000000 +0100
-@@ -33,7 +33,6 @@
- .\" SH - level-one heading that works better for non-TTY output
- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- .de1 SH
--.\" put an extra blank line of space above the head in non-TTY output
- .if t \{\
- .sp 1
- .\}
-@@ -48,7 +47,6 @@
- .it 1 an-trap
- .nr an-no-space-flag 1
- .nr an-break-flag 1
--\." make the size of the head bigger
- .ps +3
- .ft B
- .ne (2v + 1u)
-@@ -82,7 +80,6 @@
- .nr an-no-space-flag 1
- .nr an-break-flag 1
- .ps \\n[PS-SS]u
--\." make the size of the head bigger
- .ps +2
- .ft B
- .ne (2v + 1u)
-Index: b/docs/manpages/idmap_rid.8
-===================================================================
---- a/docs/manpages/idmap_rid.8	2009-11-08 15:54:26.000000000 +0100
-+++ b/docs/manpages/idmap_rid.8	2009-11-08 15:55:36.000000000 +0100
-@@ -33,7 +33,6 @@
- .\" SH - level-one heading that works better for non-TTY output
- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- .de1 SH
--.\" put an extra blank line of space above the head in non-TTY output
- .if t \{\
- .sp 1
- .\}
-@@ -48,7 +47,6 @@
- .it 1 an-trap
- .nr an-no-space-flag 1
- .nr an-break-flag 1
--\." make the size of the head bigger
- .ps +3
- .ft B
- .ne (2v + 1u)
-@@ -82,7 +80,6 @@
- .nr an-no-space-flag 1
- .nr an-break-flag 1
- .ps \\n[PS-SS]u
--\." make the size of the head bigger
- .ps +2
- .ft B
- .ne (2v + 1u)
-Index: b/docs/manpages/idmap_tdb.8
-===================================================================
---- a/docs/manpages/idmap_tdb.8	2009-11-08 15:54:26.000000000 +0100
-+++ b/docs/manpages/idmap_tdb.8	2009-11-08 15:55:36.000000000 +0100
-@@ -33,7 +33,6 @@
- .\" SH - level-one heading that works better for non-TTY output
- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- .de1 SH
--.\" put an extra blank line of space above the head in non-TTY output
- .if t \{\
- .sp 1
- .\}
-@@ -48,7 +47,6 @@
- .it 1 an-trap
- .nr an-no-space-flag 1
- .nr an-break-flag 1
--\." make the size of the head bigger
- .ps +3
- .ft B
- .ne (2v + 1u)
-@@ -82,7 +80,6 @@
- .nr an-no-space-flag 1
- .nr an-break-flag 1
- .ps \\n[PS-SS]u
--\." make the size of the head bigger
- .ps +2
- .ft B
- .ne (2v + 1u)
-Index: b/docs/manpages/idmap_tdb2.8
-===================================================================
---- a/docs/manpages/idmap_tdb2.8	2009-11-08 15:54:26.000000000 +0100
-+++ b/docs/manpages/idmap_tdb2.8	2009-11-08 15:55:36.000000000 +0100
-@@ -33,7 +33,6 @@
- .\" SH - level-one heading that works better for non-TTY output
- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- .de1 SH
--.\" put an extra blank line of space above the head in non-TTY output
- .if t \{\
- .sp 1
- .\}
-@@ -48,7 +47,6 @@
- .it 1 an-trap
- .nr an-no-space-flag 1
- .nr an-break-flag 1
--\." make the size of the head bigger
- .ps +3
- .ft B
- .ne (2v + 1u)
-@@ -82,7 +80,6 @@
- .nr an-no-space-flag 1
- .nr an-break-flag 1
- .ps \\n[PS-SS]u
--\." make the size of the head bigger
- .ps +2
- .ft B
- .ne (2v + 1u)
-Index: b/docs/manpages/ldb.3
-===================================================================
---- a/docs/manpages/ldb.3	2009-11-08 15:54:26.000000000 +0100
-+++ b/docs/manpages/ldb.3	2009-11-08 15:55:36.000000000 +0100
-@@ -33,7 +33,6 @@
- .\" SH - level-one heading that works better for non-TTY output
- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- .de1 SH
--.\" put an extra blank line of space above the head in non-TTY output
- .if t \{\
- .sp 1
- .\}
-@@ -48,7 +47,6 @@
- .it 1 an-trap
- .nr an-no-space-flag 1
- .nr an-break-flag 1
--\." make the size of the head bigger
- .ps +3
- .ft B
- .ne (2v + 1u)
-@@ -82,7 +80,6 @@
- .nr an-no-space-flag 1
- .nr an-break-flag 1
- .ps \\n[PS-SS]u
--\." make the size of the head bigger
- .ps +2
- .ft B
- .ne (2v + 1u)
-Index: b/docs/manpages/ldbadd.1
-===================================================================
---- a/docs/manpages/ldbadd.1	2009-11-08 15:54:26.000000000 +0100
-+++ b/docs/manpages/ldbadd.1	2009-11-08 15:55:36.000000000 +0100
-@@ -33,7 +33,6 @@
- .\" SH - level-one heading that works better for non-TTY output
- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- .de1 SH
--.\" put an extra blank line of space above the head in non-TTY output
- .if t \{\
- .sp 1
- .\}
-@@ -48,7 +47,6 @@
- .it 1 an-trap
- .nr an-no-space-flag 1
- .nr an-break-flag 1
--\." make the size of the head bigger
- .ps +3
- .ft B
- .ne (2v + 1u)
-@@ -82,7 +80,6 @@
- .nr an-no-space-flag 1
- .nr an-break-flag 1
- .ps \\n[PS-SS]u
--\." make the size of the head bigger
- .ps +2
- .ft B
- .ne (2v + 1u)
-Index: b/docs/manpages/ldbdel.1
-===================================================================
---- a/docs/manpages/ldbdel.1	2009-11-08 15:54:27.000000000 +0100
-+++ b/docs/manpages/ldbdel.1	2009-11-08 15:55:36.000000000 +0100
-@@ -33,7 +33,6 @@
- .\" SH - level-one heading that works better for non-TTY output
- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- .de1 SH
--.\" put an extra blank line of space above the head in non-TTY output
- .if t \{\
- .sp 1
- .\}
-@@ -48,7 +47,6 @@
- .it 1 an-trap
- .nr an-no-space-flag 1
- .nr an-break-flag 1
--\." make the size of the head bigger
- .ps +3
- .ft B
- .ne (2v + 1u)
-@@ -82,7 +80,6 @@
- .nr an-no-space-flag 1
- .nr an-break-flag 1
- .ps \\n[PS-SS]u
--\." make the size of the head bigger
- .ps +2
- .ft B
- .ne (2v + 1u)
-Index: b/docs/manpages/ldbedit.1
-===================================================================
---- a/docs/manpages/ldbedit.1	2009-11-08 15:54:27.000000000 +0100
-+++ b/docs/manpages/ldbedit.1	2009-11-08 15:55:36.000000000 +0100
-@@ -33,7 +33,6 @@
- .\" SH - level-one heading that works better for non-TTY output
- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- .de1 SH
--.\" put an extra blank line of space above the head in non-TTY output
- .if t \{\
- .sp 1
- .\}
-@@ -48,7 +47,6 @@
- .it 1 an-trap
- .nr an-no-space-flag 1
- .nr an-break-flag 1
--\." make the size of the head bigger
- .ps +3
- .ft B
- .ne (2v + 1u)
-@@ -82,7 +80,6 @@
- .nr an-no-space-flag 1
- .nr an-break-flag 1
- .ps \\n[PS-SS]u
--\." make the size of the head bigger
- .ps +2
- .ft B
- .ne (2v + 1u)
-Index: b/docs/manpages/ldbmodify.1
-===================================================================
---- a/docs/manpages/ldbmodify.1	2009-11-08 15:54:26.000000000 +0100
-+++ b/docs/manpages/ldbmodify.1	2009-11-08 15:55:36.000000000 +0100
-@@ -33,7 +33,6 @@
- .\" SH - level-one heading that works better for non-TTY output
- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- .de1 SH
--.\" put an extra blank line of space above the head in non-TTY output
- .if t \{\
- .sp 1
- .\}
-@@ -48,7 +47,6 @@
- .it 1 an-trap
- .nr an-no-space-flag 1
- .nr an-break-flag 1
--\." make the size of the head bigger
- .ps +3
- .ft B
- .ne (2v + 1u)
-@@ -82,7 +80,6 @@
- .nr an-no-space-flag 1
- .nr an-break-flag 1
- .ps \\n[PS-SS]u
--\." make the size of the head bigger
- .ps +2
- .ft B
- .ne (2v + 1u)
-Index: b/docs/manpages/ldbsearch.1
-===================================================================
---- a/docs/manpages/ldbsearch.1	2009-11-08 15:54:26.000000000 +0100
-+++ b/docs/manpages/ldbsearch.1	2009-11-08 15:55:36.000000000 +0100
-@@ -33,7 +33,6 @@
- .\" SH - level-one heading that works better for non-TTY output
- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- .de1 SH
--.\" put an extra blank line of space above the head in non-TTY output
- .if t \{\
- .sp 1
- .\}
-@@ -48,7 +47,6 @@
- .it 1 an-trap
- .nr an-no-space-flag 1
- .nr an-break-flag 1
--\." make the size of the head bigger
- .ps +3
- .ft B
- .ne (2v + 1u)
-@@ -82,7 +80,6 @@
- .nr an-no-space-flag 1
- .nr an-break-flag 1
- .ps \\n[PS-SS]u
--\." make the size of the head bigger
- .ps +2
- .ft B
- .ne (2v + 1u)
-Index: b/docs/manpages/libsmbclient.7
-===================================================================
---- a/docs/manpages/libsmbclient.7	2009-11-08 15:54:26.000000000 +0100
-+++ b/docs/manpages/libsmbclient.7	2009-11-08 15:55:36.000000000 +0100
-@@ -33,7 +33,6 @@
- .\" SH - level-one heading that works better for non-TTY output
- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- .de1 SH
--.\" put an extra blank line of space above the head in non-TTY output
- .if t \{\
- .sp 1
- .\}
-@@ -48,7 +47,6 @@
- .it 1 an-trap
- .nr an-no-space-flag 1
- .nr an-break-flag 1
--\." make the size of the head bigger
- .ps +3
- .ft B
- .ne (2v + 1u)
-@@ -82,7 +80,6 @@
- .nr an-no-space-flag 1
- .nr an-break-flag 1
- .ps \\n[PS-SS]u
--\." make the size of the head bigger
- .ps +2
- .ft B
- .ne (2v + 1u)
-Index: b/docs/manpages/lmhosts.5
-===================================================================
---- a/docs/manpages/lmhosts.5	2009-11-08 15:55:33.000000000 +0100
-+++ b/docs/manpages/lmhosts.5	2009-11-08 15:55:36.000000000 +0100
-@@ -33,7 +33,6 @@
- .\" SH - level-one heading that works better for non-TTY output
- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- .de1 SH
--.\" put an extra blank line of space above the head in non-TTY output
- .if t \{\
- .sp 1
- .\}
-@@ -48,7 +47,6 @@
- .it 1 an-trap
- .nr an-no-space-flag 1
- .nr an-break-flag 1
--\." make the size of the head bigger
- .ps +3
- .ft B
- .ne (2v + 1u)
-@@ -82,7 +80,6 @@
- .nr an-no-space-flag 1
- .nr an-break-flag 1
- .ps \\n[PS-SS]u
--\." make the size of the head bigger
- .ps +2
- .ft B
- .ne (2v + 1u)
-Index: b/docs/manpages/log2pcap.1
-===================================================================
---- a/docs/manpages/log2pcap.1	2009-11-08 15:54:26.000000000 +0100
-+++ b/docs/manpages/log2pcap.1	2009-11-08 15:55:36.000000000 +0100
-@@ -33,7 +33,6 @@
- .\" SH - level-one heading that works better for non-TTY output
- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- .de1 SH
--.\" put an extra blank line of space above the head in non-TTY output
- .if t \{\
- .sp 1
- .\}
-@@ -48,7 +47,6 @@
- .it 1 an-trap
- .nr an-no-space-flag 1
- .nr an-break-flag 1
--\." make the size of the head bigger
- .ps +3
- .ft B
- .ne (2v + 1u)
-@@ -82,7 +80,6 @@
- .nr an-no-space-flag 1
- .nr an-break-flag 1
- .ps \\n[PS-SS]u
--\." make the size of the head bigger
- .ps +2
- .ft B
- .ne (2v + 1u)
-Index: b/docs/manpages/net.8
-===================================================================
---- a/docs/manpages/net.8	2009-11-08 15:55:35.000000000 +0100
-+++ b/docs/manpages/net.8	2009-11-08 15:55:36.000000000 +0100
-@@ -33,7 +33,6 @@
- .\" SH - level-one heading that works better for non-TTY output
- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- .de1 SH
--.\" put an extra blank line of space above the head in non-TTY output
- .if t \{\
- .sp 1
- .\}
-@@ -48,7 +47,6 @@
- .it 1 an-trap
- .nr an-no-space-flag 1
- .nr an-break-flag 1
--\." make the size of the head bigger
- .ps +3
- .ft B
- .ne (2v + 1u)
-@@ -82,7 +80,6 @@
- .nr an-no-space-flag 1
- .nr an-break-flag 1
- .ps \\n[PS-SS]u
--\." make the size of the head bigger
- .ps +2
- .ft B
- .ne (2v + 1u)
-Index: b/docs/manpages/nmbd.8
-===================================================================
---- a/docs/manpages/nmbd.8	2009-11-08 15:55:33.000000000 +0100
-+++ b/docs/manpages/nmbd.8	2009-11-08 15:55:36.000000000 +0100
-@@ -33,7 +33,6 @@
- .\" SH - level-one heading that works better for non-TTY output
- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- .de1 SH
--.\" put an extra blank line of space above the head in non-TTY output
- .if t \{\
- .sp 1
- .\}
-@@ -48,7 +47,6 @@
- .it 1 an-trap
- .nr an-no-space-flag 1
- .nr an-break-flag 1
--\." make the size of the head bigger
- .ps +3
- .ft B
- .ne (2v + 1u)
-@@ -82,7 +80,6 @@
- .nr an-no-space-flag 1
- .nr an-break-flag 1
- .ps \\n[PS-SS]u
--\." make the size of the head bigger
- .ps +2
- .ft B
- .ne (2v + 1u)
-Index: b/docs/manpages/nmblookup.1
-===================================================================
---- a/docs/manpages/nmblookup.1	2009-11-08 15:54:26.000000000 +0100
-+++ b/docs/manpages/nmblookup.1	2009-11-08 15:55:36.000000000 +0100
-@@ -33,7 +33,6 @@
- .\" SH - level-one heading that works better for non-TTY output
- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- .de1 SH
--.\" put an extra blank line of space above the head in non-TTY output
- .if t \{\
- .sp 1
- .\}
-@@ -48,7 +47,6 @@
- .it 1 an-trap
- .nr an-no-space-flag 1
- .nr an-break-flag 1
--\." make the size of the head bigger
- .ps +3
- .ft B
- .ne (2v + 1u)
-@@ -82,7 +80,6 @@
- .nr an-no-space-flag 1
- .nr an-break-flag 1
- .ps \\n[PS-SS]u
--\." make the size of the head bigger
- .ps +2
- .ft B
- .ne (2v + 1u)
-Index: b/docs/manpages/ntlm_auth.1
-===================================================================
---- a/docs/manpages/ntlm_auth.1	2009-11-08 15:55:33.000000000 +0100
-+++ b/docs/manpages/ntlm_auth.1	2009-11-08 15:55:36.000000000 +0100
-@@ -33,7 +33,6 @@
- .\" SH - level-one heading that works better for non-TTY output
- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- .de1 SH
--.\" put an extra blank line of space above the head in non-TTY output
- .if t \{\
- .sp 1
- .\}
-@@ -48,7 +47,6 @@
- .it 1 an-trap
- .nr an-no-space-flag 1
- .nr an-break-flag 1
--\." make the size of the head bigger
- .ps +3
- .ft B
- .ne (2v + 1u)
-@@ -82,7 +80,6 @@
- .nr an-no-space-flag 1
- .nr an-break-flag 1
- .ps \\n[PS-SS]u
--\." make the size of the head bigger
- .ps +2
- .ft B
- .ne (2v + 1u)
-Index: b/docs/manpages/pam_winbind.8
-===================================================================
---- a/docs/manpages/pam_winbind.8	2009-11-08 15:54:27.000000000 +0100
-+++ b/docs/manpages/pam_winbind.8	2009-11-08 15:55:36.000000000 +0100
-@@ -33,7 +33,6 @@
- .\" SH - level-one heading that works better for non-TTY output
- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- .de1 SH
--.\" put an extra blank line of space above the head in non-TTY output
- .if t \{\
- .sp 1
- .\}
-@@ -48,7 +47,6 @@
- .it 1 an-trap
- .nr an-no-space-flag 1
- .nr an-break-flag 1
--\." make the size of the head bigger
- .ps +3
- .ft B
- .ne (2v + 1u)
-@@ -82,7 +80,6 @@
- .nr an-no-space-flag 1
- .nr an-break-flag 1
- .ps \\n[PS-SS]u
--\." make the size of the head bigger
- .ps +2
- .ft B
- .ne (2v + 1u)
-Index: b/docs/manpages/pdbedit.8
-===================================================================
---- a/docs/manpages/pdbedit.8	2009-11-08 15:54:26.000000000 +0100
-+++ b/docs/manpages/pdbedit.8	2009-11-08 15:55:36.000000000 +0100
-@@ -33,7 +33,6 @@
- .\" SH - level-one heading that works better for non-TTY output
- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- .de1 SH
--.\" put an extra blank line of space above the head in non-TTY output
- .if t \{\
- .sp 1
- .\}
-@@ -48,7 +47,6 @@
- .it 1 an-trap
- .nr an-no-space-flag 1
- .nr an-break-flag 1
--\." make the size of the head bigger
- .ps +3
- .ft B
- .ne (2v + 1u)
-@@ -82,7 +80,6 @@
- .nr an-no-space-flag 1
- .nr an-break-flag 1
- .ps \\n[PS-SS]u
--\." make the size of the head bigger
- .ps +2
- .ft B
- .ne (2v + 1u)
-Index: b/docs/manpages/profiles.1
-===================================================================
---- a/docs/manpages/profiles.1	2009-11-08 15:54:26.000000000 +0100
-+++ b/docs/manpages/profiles.1	2009-11-08 15:55:36.000000000 +0100
-@@ -33,7 +33,6 @@
- .\" SH - level-one heading that works better for non-TTY output
- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- .de1 SH
--.\" put an extra blank line of space above the head in non-TTY output
- .if t \{\
- .sp 1
- .\}
-@@ -48,7 +47,6 @@
- .it 1 an-trap
- .nr an-no-space-flag 1
- .nr an-break-flag 1
--\." make the size of the head bigger
- .ps +3
- .ft B
- .ne (2v + 1u)
-@@ -82,7 +80,6 @@
- .nr an-no-space-flag 1
- .nr an-break-flag 1
- .ps \\n[PS-SS]u
--\." make the size of the head bigger
- .ps +2
- .ft B
- .ne (2v + 1u)
-Index: b/docs/manpages/rpcclient.1
-===================================================================
---- a/docs/manpages/rpcclient.1	2009-11-08 15:54:26.000000000 +0100
-+++ b/docs/manpages/rpcclient.1	2009-11-08 15:55:36.000000000 +0100
-@@ -33,7 +33,6 @@
- .\" SH - level-one heading that works better for non-TTY output
- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- .de1 SH
--.\" put an extra blank line of space above the head in non-TTY output
- .if t \{\
- .sp 1
- .\}
-@@ -48,7 +47,6 @@
- .it 1 an-trap
- .nr an-no-space-flag 1
- .nr an-break-flag 1
--\." make the size of the head bigger
- .ps +3
- .ft B
- .ne (2v + 1u)
-@@ -82,7 +80,6 @@
- .nr an-no-space-flag 1
- .nr an-break-flag 1
- .ps \\n[PS-SS]u
--\." make the size of the head bigger
- .ps +2
- .ft B
- .ne (2v + 1u)
-Index: b/docs/manpages/samba.7
-===================================================================
---- a/docs/manpages/samba.7	2009-11-08 15:54:26.000000000 +0100
-+++ b/docs/manpages/samba.7	2009-11-08 15:55:36.000000000 +0100
-@@ -33,7 +33,6 @@
- .\" SH - level-one heading that works better for non-TTY output
- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- .de1 SH
--.\" put an extra blank line of space above the head in non-TTY output
- .if t \{\
- .sp 1
- .\}
-@@ -48,7 +47,6 @@
- .it 1 an-trap
- .nr an-no-space-flag 1
- .nr an-break-flag 1
--\." make the size of the head bigger
- .ps +3
- .ft B
- .ne (2v + 1u)
-@@ -82,7 +80,6 @@
- .nr an-no-space-flag 1
- .nr an-break-flag 1
- .ps \\n[PS-SS]u
--\." make the size of the head bigger
- .ps +2
- .ft B
- .ne (2v + 1u)
-Index: b/docs/manpages/smb.conf.5
-===================================================================
---- a/docs/manpages/smb.conf.5	2009-11-08 15:55:35.000000000 +0100
-+++ b/docs/manpages/smb.conf.5	2009-11-08 15:55:36.000000000 +0100
-@@ -33,7 +33,6 @@
- .\" SH - level-one heading that works better for non-TTY output
- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- .de1 SH
--.\" put an extra blank line of space above the head in non-TTY output
- .if t \{\
- .sp 1
- .\}
-@@ -48,7 +47,6 @@
- .it 1 an-trap
- .nr an-no-space-flag 1
- .nr an-break-flag 1
--\." make the size of the head bigger
- .ps +3
- .ft B
- .ne (2v + 1u)
-@@ -82,7 +80,6 @@
- .nr an-no-space-flag 1
- .nr an-break-flag 1
- .ps \\n[PS-SS]u
--\." make the size of the head bigger
- .ps +2
- .ft B
- .ne (2v + 1u)
-Index: b/docs/manpages/smbcacls.1
-===================================================================
---- a/docs/manpages/smbcacls.1	2009-11-08 15:54:26.000000000 +0100
-+++ b/docs/manpages/smbcacls.1	2009-11-08 15:55:36.000000000 +0100
-@@ -33,7 +33,6 @@
- .\" SH - level-one heading that works better for non-TTY output
- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- .de1 SH
--.\" put an extra blank line of space above the head in non-TTY output
- .if t \{\
- .sp 1
- .\}
-@@ -48,7 +47,6 @@
- .it 1 an-trap
- .nr an-no-space-flag 1
- .nr an-break-flag 1
--\." make the size of the head bigger
- .ps +3
- .ft B
- .ne (2v + 1u)
-@@ -82,7 +80,6 @@
- .nr an-no-space-flag 1
- .nr an-break-flag 1
- .ps \\n[PS-SS]u
--\." make the size of the head bigger
- .ps +2
- .ft B
- .ne (2v + 1u)
-Index: b/docs/manpages/smbclient.1
-===================================================================
---- a/docs/manpages/smbclient.1	2009-11-08 15:54:26.000000000 +0100
-+++ b/docs/manpages/smbclient.1	2009-11-08 15:55:36.000000000 +0100
-@@ -33,7 +33,6 @@
- .\" SH - level-one heading that works better for non-TTY output
- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- .de1 SH
--.\" put an extra blank line of space above the head in non-TTY output
- .if t \{\
- .sp 1
- .\}
-@@ -48,7 +47,6 @@
- .it 1 an-trap
- .nr an-no-space-flag 1
- .nr an-break-flag 1
--\." make the size of the head bigger
- .ps +3
- .ft B
- .ne (2v + 1u)
-@@ -82,7 +80,6 @@
- .nr an-no-space-flag 1
- .nr an-break-flag 1
- .ps \\n[PS-SS]u
--\." make the size of the head bigger
- .ps +2
- .ft B
- .ne (2v + 1u)
-Index: b/docs/manpages/smbcontrol.1
-===================================================================
---- a/docs/manpages/smbcontrol.1	2009-11-08 15:54:26.000000000 +0100
-+++ b/docs/manpages/smbcontrol.1	2009-11-08 15:55:36.000000000 +0100
-@@ -33,7 +33,6 @@
- .\" SH - level-one heading that works better for non-TTY output
- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- .de1 SH
--.\" put an extra blank line of space above the head in non-TTY output
- .if t \{\
- .sp 1
- .\}
-@@ -48,7 +47,6 @@
- .it 1 an-trap
- .nr an-no-space-flag 1
- .nr an-break-flag 1
--\." make the size of the head bigger
- .ps +3
- .ft B
- .ne (2v + 1u)
-@@ -82,7 +80,6 @@
- .nr an-no-space-flag 1
- .nr an-break-flag 1
- .ps \\n[PS-SS]u
--\." make the size of the head bigger
- .ps +2
- .ft B
- .ne (2v + 1u)
-Index: b/docs/manpages/smbcquotas.1
-===================================================================
---- a/docs/manpages/smbcquotas.1	2009-11-08 15:54:26.000000000 +0100
-+++ b/docs/manpages/smbcquotas.1	2009-11-08 15:55:36.000000000 +0100
-@@ -33,7 +33,6 @@
- .\" SH - level-one heading that works better for non-TTY output
- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- .de1 SH
--.\" put an extra blank line of space above the head in non-TTY output
- .if t \{\
- .sp 1
- .\}
-@@ -48,7 +47,6 @@
- .it 1 an-trap
- .nr an-no-space-flag 1
- .nr an-break-flag 1
--\." make the size of the head bigger
- .ps +3
- .ft B
- .ne (2v + 1u)
-@@ -82,7 +80,6 @@
- .nr an-no-space-flag 1
- .nr an-break-flag 1
- .ps \\n[PS-SS]u
--\." make the size of the head bigger
- .ps +2
- .ft B
- .ne (2v + 1u)
-Index: b/docs/manpages/smbd.8
-===================================================================
---- a/docs/manpages/smbd.8	2009-11-08 15:55:33.000000000 +0100
-+++ b/docs/manpages/smbd.8	2009-11-08 15:55:36.000000000 +0100
-@@ -33,7 +33,6 @@
- .\" SH - level-one heading that works better for non-TTY output
- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- .de1 SH
--.\" put an extra blank line of space above the head in non-TTY output
- .if t \{\
- .sp 1
- .\}
-@@ -48,7 +47,6 @@
- .it 1 an-trap
- .nr an-no-space-flag 1
- .nr an-break-flag 1
--\." make the size of the head bigger
- .ps +3
- .ft B
- .ne (2v + 1u)
-@@ -82,7 +80,6 @@
- .nr an-no-space-flag 1
- .nr an-break-flag 1
- .ps \\n[PS-SS]u
--\." make the size of the head bigger
- .ps +2
- .ft B
- .ne (2v + 1u)
-Index: b/docs/manpages/smbget.1
-===================================================================
---- a/docs/manpages/smbget.1	2009-11-08 15:54:26.000000000 +0100
-+++ b/docs/manpages/smbget.1	2009-11-08 15:55:36.000000000 +0100
-@@ -33,7 +33,6 @@
- .\" SH - level-one heading that works better for non-TTY output
- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- .de1 SH
--.\" put an extra blank line of space above the head in non-TTY output
- .if t \{\
- .sp 1
- .\}
-@@ -48,7 +47,6 @@
- .it 1 an-trap
- .nr an-no-space-flag 1
- .nr an-break-flag 1
--\." make the size of the head bigger
- .ps +3
- .ft B
- .ne (2v + 1u)
-@@ -82,7 +80,6 @@
- .nr an-no-space-flag 1
- .nr an-break-flag 1
- .ps \\n[PS-SS]u
--\." make the size of the head bigger
- .ps +2
- .ft B
- .ne (2v + 1u)
-Index: b/docs/manpages/smbgetrc.5
-===================================================================
---- a/docs/manpages/smbgetrc.5	2009-11-08 15:54:26.000000000 +0100
-+++ b/docs/manpages/smbgetrc.5	2009-11-08 15:55:36.000000000 +0100
-@@ -33,7 +33,6 @@
- .\" SH - level-one heading that works better for non-TTY output
- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- .de1 SH
--.\" put an extra blank line of space above the head in non-TTY output
- .if t \{\
- .sp 1
- .\}
-@@ -48,7 +47,6 @@
- .it 1 an-trap
- .nr an-no-space-flag 1
- .nr an-break-flag 1
--\." make the size of the head bigger
- .ps +3
- .ft B
- .ne (2v + 1u)
-@@ -82,7 +80,6 @@
- .nr an-no-space-flag 1
- .nr an-break-flag 1
- .ps \\n[PS-SS]u
--\." make the size of the head bigger
- .ps +2
- .ft B
- .ne (2v + 1u)
-Index: b/docs/manpages/smbpasswd.5
-===================================================================
---- a/docs/manpages/smbpasswd.5	2009-11-08 15:54:26.000000000 +0100
-+++ b/docs/manpages/smbpasswd.5	2009-11-08 15:55:36.000000000 +0100
-@@ -33,7 +33,6 @@
- .\" SH - level-one heading that works better for non-TTY output
- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- .de1 SH
--.\" put an extra blank line of space above the head in non-TTY output
- .if t \{\
- .sp 1
- .\}
-@@ -48,7 +47,6 @@
- .it 1 an-trap
- .nr an-no-space-flag 1
- .nr an-break-flag 1
--\." make the size of the head bigger
- .ps +3
- .ft B
- .ne (2v + 1u)
-@@ -82,7 +80,6 @@
- .nr an-no-space-flag 1
- .nr an-break-flag 1
- .ps \\n[PS-SS]u
--\." make the size of the head bigger
- .ps +2
- .ft B
- .ne (2v + 1u)
-Index: b/docs/manpages/smbpasswd.8
-===================================================================
---- a/docs/manpages/smbpasswd.8	2009-11-08 15:54:26.000000000 +0100
-+++ b/docs/manpages/smbpasswd.8	2009-11-08 15:55:36.000000000 +0100
-@@ -33,7 +33,6 @@
- .\" SH - level-one heading that works better for non-TTY output
- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- .de1 SH
--.\" put an extra blank line of space above the head in non-TTY output
- .if t \{\
- .sp 1
- .\}
-@@ -48,7 +47,6 @@
- .it 1 an-trap
- .nr an-no-space-flag 1
- .nr an-break-flag 1
--\." make the size of the head bigger
- .ps +3
- .ft B
- .ne (2v + 1u)
-@@ -82,7 +80,6 @@
- .nr an-no-space-flag 1
- .nr an-break-flag 1
- .ps \\n[PS-SS]u
--\." make the size of the head bigger
- .ps +2
- .ft B
- .ne (2v + 1u)
-Index: b/docs/manpages/smbspool.8
-===================================================================
---- a/docs/manpages/smbspool.8	2009-11-08 15:54:26.000000000 +0100
-+++ b/docs/manpages/smbspool.8	2009-11-08 15:55:36.000000000 +0100
-@@ -33,7 +33,6 @@
- .\" SH - level-one heading that works better for non-TTY output
- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- .de1 SH
--.\" put an extra blank line of space above the head in non-TTY output
- .if t \{\
- .sp 1
- .\}
-@@ -48,7 +47,6 @@
- .it 1 an-trap
- .nr an-no-space-flag 1
- .nr an-break-flag 1
--\." make the size of the head bigger
- .ps +3
- .ft B
- .ne (2v + 1u)
-@@ -82,7 +80,6 @@
- .nr an-no-space-flag 1
- .nr an-break-flag 1
- .ps \\n[PS-SS]u
--\." make the size of the head bigger
- .ps +2
- .ft B
- .ne (2v + 1u)
-Index: b/docs/manpages/smbstatus.1
-===================================================================
---- a/docs/manpages/smbstatus.1	2009-11-08 15:54:26.000000000 +0100
-+++ b/docs/manpages/smbstatus.1	2009-11-08 15:55:36.000000000 +0100
-@@ -33,7 +33,6 @@
- .\" SH - level-one heading that works better for non-TTY output
- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- .de1 SH
--.\" put an extra blank line of space above the head in non-TTY output
- .if t \{\
- .sp 1
- .\}
-@@ -48,7 +47,6 @@
- .it 1 an-trap
- .nr an-no-space-flag 1
- .nr an-break-flag 1
--\." make the size of the head bigger
- .ps +3
- .ft B
- .ne (2v + 1u)
-@@ -82,7 +80,6 @@
- .nr an-no-space-flag 1
- .nr an-break-flag 1
- .ps \\n[PS-SS]u
--\." make the size of the head bigger
- .ps +2
- .ft B
- .ne (2v + 1u)
-Index: b/docs/manpages/smbtar.1
-===================================================================
---- a/docs/manpages/smbtar.1	2009-11-08 15:54:26.000000000 +0100
-+++ b/docs/manpages/smbtar.1	2009-11-08 15:55:36.000000000 +0100
-@@ -33,7 +33,6 @@
- .\" SH - level-one heading that works better for non-TTY output
- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- .de1 SH
--.\" put an extra blank line of space above the head in non-TTY output
- .if t \{\
- .sp 1
- .\}
-@@ -48,7 +47,6 @@
- .it 1 an-trap
- .nr an-no-space-flag 1
- .nr an-break-flag 1
--\." make the size of the head bigger
- .ps +3
- .ft B
- .ne (2v + 1u)
-@@ -82,7 +80,6 @@
- .nr an-no-space-flag 1
- .nr an-break-flag 1
- .ps \\n[PS-SS]u
--\." make the size of the head bigger
- .ps +2
- .ft B
- .ne (2v + 1u)
-Index: b/docs/manpages/smbtree.1
-===================================================================
---- a/docs/manpages/smbtree.1	2009-11-08 15:54:26.000000000 +0100
-+++ b/docs/manpages/smbtree.1	2009-11-08 15:55:36.000000000 +0100
-@@ -33,7 +33,6 @@
- .\" SH - level-one heading that works better for non-TTY output
- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- .de1 SH
--.\" put an extra blank line of space above the head in non-TTY output
- .if t \{\
- .sp 1
- .\}
-@@ -48,7 +47,6 @@
- .it 1 an-trap
- .nr an-no-space-flag 1
- .nr an-break-flag 1
--\." make the size of the head bigger
- .ps +3
- .ft B
- .ne (2v + 1u)
-@@ -82,7 +80,6 @@
- .nr an-no-space-flag 1
- .nr an-break-flag 1
- .ps \\n[PS-SS]u
--\." make the size of the head bigger
- .ps +2
- .ft B
- .ne (2v + 1u)
-Index: b/docs/manpages/swat.8
-===================================================================
---- a/docs/manpages/swat.8	2009-11-08 15:55:33.000000000 +0100
-+++ b/docs/manpages/swat.8	2009-11-08 15:55:36.000000000 +0100
-@@ -33,7 +33,6 @@
- .\" SH - level-one heading that works better for non-TTY output
- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- .de1 SH
--.\" put an extra blank line of space above the head in non-TTY output
- .if t \{\
- .sp 1
- .\}
-@@ -48,7 +47,6 @@
- .it 1 an-trap
- .nr an-no-space-flag 1
- .nr an-break-flag 1
--\." make the size of the head bigger
- .ps +3
- .ft B
- .ne (2v + 1u)
-@@ -82,7 +80,6 @@
- .nr an-no-space-flag 1
- .nr an-break-flag 1
- .ps \\n[PS-SS]u
--\." make the size of the head bigger
- .ps +2
- .ft B
- .ne (2v + 1u)
-Index: b/docs/manpages/tdbbackup.8
-===================================================================
---- a/docs/manpages/tdbbackup.8	2009-11-08 15:55:33.000000000 +0100
-+++ b/docs/manpages/tdbbackup.8	2009-11-08 15:55:36.000000000 +0100
-@@ -33,7 +33,6 @@
- .\" SH - level-one heading that works better for non-TTY output
- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- .de1 SH
--.\" put an extra blank line of space above the head in non-TTY output
- .if t \{\
- .sp 1
- .\}
-@@ -48,7 +47,6 @@
- .it 1 an-trap
- .nr an-no-space-flag 1
- .nr an-break-flag 1
--\." make the size of the head bigger
- .ps +3
- .ft B
- .ne (2v + 1u)
-@@ -82,7 +80,6 @@
- .nr an-no-space-flag 1
- .nr an-break-flag 1
- .ps \\n[PS-SS]u
--\." make the size of the head bigger
- .ps +2
- .ft B
- .ne (2v + 1u)
-Index: b/docs/manpages/tdbdump.8
-===================================================================
---- a/docs/manpages/tdbdump.8	2009-11-08 15:54:27.000000000 +0100
-+++ b/docs/manpages/tdbdump.8	2009-11-08 15:55:36.000000000 +0100
-@@ -33,7 +33,6 @@
- .\" SH - level-one heading that works better for non-TTY output
- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- .de1 SH
--.\" put an extra blank line of space above the head in non-TTY output
- .if t \{\
- .sp 1
- .\}
-@@ -48,7 +47,6 @@
- .it 1 an-trap
- .nr an-no-space-flag 1
- .nr an-break-flag 1
--\." make the size of the head bigger
- .ps +3
- .ft B
- .ne (2v + 1u)
-@@ -82,7 +80,6 @@
- .nr an-no-space-flag 1
- .nr an-break-flag 1
- .ps \\n[PS-SS]u
--\." make the size of the head bigger
- .ps +2
- .ft B
- .ne (2v + 1u)
-Index: b/docs/manpages/tdbtool.8
-===================================================================
---- a/docs/manpages/tdbtool.8	2009-11-08 15:54:26.000000000 +0100
-+++ b/docs/manpages/tdbtool.8	2009-11-08 15:55:36.000000000 +0100
-@@ -33,7 +33,6 @@
- .\" SH - level-one heading that works better for non-TTY output
- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- .de1 SH
--.\" put an extra blank line of space above the head in non-TTY output
- .if t \{\
- .sp 1
- .\}
-@@ -48,7 +47,6 @@
- .it 1 an-trap
- .nr an-no-space-flag 1
- .nr an-break-flag 1
--\." make the size of the head bigger
- .ps +3
- .ft B
- .ne (2v + 1u)
-@@ -82,7 +80,6 @@
- .nr an-no-space-flag 1
- .nr an-break-flag 1
- .ps \\n[PS-SS]u
--\." make the size of the head bigger
- .ps +2
- .ft B
- .ne (2v + 1u)
-Index: b/docs/manpages/testparm.1
-===================================================================
---- a/docs/manpages/testparm.1	2009-11-08 15:54:26.000000000 +0100
-+++ b/docs/manpages/testparm.1	2009-11-08 15:55:36.000000000 +0100
-@@ -33,7 +33,6 @@
- .\" SH - level-one heading that works better for non-TTY output
- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- .de1 SH
--.\" put an extra blank line of space above the head in non-TTY output
- .if t \{\
- .sp 1
- .\}
-@@ -48,7 +47,6 @@
- .it 1 an-trap
- .nr an-no-space-flag 1
- .nr an-break-flag 1
--\." make the size of the head bigger
- .ps +3
- .ft B
- .ne (2v + 1u)
-@@ -82,7 +80,6 @@
- .nr an-no-space-flag 1
- .nr an-break-flag 1
- .ps \\n[PS-SS]u
--\." make the size of the head bigger
- .ps +2
- .ft B
- .ne (2v + 1u)
-Index: b/docs/manpages/vfs_audit.8
-===================================================================
---- a/docs/manpages/vfs_audit.8	2009-11-08 15:54:26.000000000 +0100
-+++ b/docs/manpages/vfs_audit.8	2009-11-08 15:55:36.000000000 +0100
-@@ -33,7 +33,6 @@
- .\" SH - level-one heading that works better for non-TTY output
- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- .de1 SH
--.\" put an extra blank line of space above the head in non-TTY output
- .if t \{\
- .sp 1
- .\}
-@@ -48,7 +47,6 @@
- .it 1 an-trap
- .nr an-no-space-flag 1
- .nr an-break-flag 1
--\." make the size of the head bigger
- .ps +3
- .ft B
- .ne (2v + 1u)
-@@ -82,7 +80,6 @@
- .nr an-no-space-flag 1
- .nr an-break-flag 1
- .ps \\n[PS-SS]u
--\." make the size of the head bigger
- .ps +2
- .ft B
- .ne (2v + 1u)
-Index: b/docs/manpages/vfs_cacheprime.8
-===================================================================
---- a/docs/manpages/vfs_cacheprime.8	2009-11-08 15:54:26.000000000 +0100
-+++ b/docs/manpages/vfs_cacheprime.8	2009-11-08 15:55:36.000000000 +0100
-@@ -33,7 +33,6 @@
- .\" SH - level-one heading that works better for non-TTY output
- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- .de1 SH
--.\" put an extra blank line of space above the head in non-TTY output
- .if t \{\
- .sp 1
- .\}
-@@ -48,7 +47,6 @@
- .it 1 an-trap
- .nr an-no-space-flag 1
- .nr an-break-flag 1
--\." make the size of the head bigger
- .ps +3
- .ft B
- .ne (2v + 1u)
-@@ -82,7 +80,6 @@
- .nr an-no-space-flag 1
- .nr an-break-flag 1
- .ps \\n[PS-SS]u
--\." make the size of the head bigger
- .ps +2
- .ft B
- .ne (2v + 1u)
-Index: b/docs/manpages/vfs_cap.8
-===================================================================
---- a/docs/manpages/vfs_cap.8	2009-11-08 15:54:27.000000000 +0100
-+++ b/docs/manpages/vfs_cap.8	2009-11-08 15:55:36.000000000 +0100
-@@ -33,7 +33,6 @@
- .\" SH - level-one heading that works better for non-TTY output
- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- .de1 SH
--.\" put an extra blank line of space above the head in non-TTY output
- .if t \{\
- .sp 1
- .\}
-@@ -48,7 +47,6 @@
- .it 1 an-trap
- .nr an-no-space-flag 1
- .nr an-break-flag 1
--\." make the size of the head bigger
- .ps +3
- .ft B
- .ne (2v + 1u)
-@@ -82,7 +80,6 @@
- .nr an-no-space-flag 1
- .nr an-break-flag 1
- .ps \\n[PS-SS]u
--\." make the size of the head bigger
- .ps +2
- .ft B
- .ne (2v + 1u)
-Index: b/docs/manpages/vfs_catia.8
-===================================================================
---- a/docs/manpages/vfs_catia.8	2009-11-08 15:54:26.000000000 +0100
-+++ b/docs/manpages/vfs_catia.8	2009-11-08 15:55:36.000000000 +0100
-@@ -33,7 +33,6 @@
- .\" SH - level-one heading that works better for non-TTY output
- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- .de1 SH
--.\" put an extra blank line of space above the head in non-TTY output
- .if t \{\
- .sp 1
- .\}
-@@ -48,7 +47,6 @@
- .it 1 an-trap
- .nr an-no-space-flag 1
- .nr an-break-flag 1
--\." make the size of the head bigger
- .ps +3
- .ft B
- .ne (2v + 1u)
-@@ -82,7 +80,6 @@
- .nr an-no-space-flag 1
- .nr an-break-flag 1
- .ps \\n[PS-SS]u
--\." make the size of the head bigger
- .ps +2
- .ft B
- .ne (2v + 1u)
-Index: b/docs/manpages/vfs_commit.8
-===================================================================
---- a/docs/manpages/vfs_commit.8	2009-11-08 15:54:26.000000000 +0100
-+++ b/docs/manpages/vfs_commit.8	2009-11-08 15:55:36.000000000 +0100
-@@ -33,7 +33,6 @@
- .\" SH - level-one heading that works better for non-TTY output
- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- .de1 SH
--.\" put an extra blank line of space above the head in non-TTY output
- .if t \{\
- .sp 1
- .\}
-@@ -48,7 +47,6 @@
- .it 1 an-trap
- .nr an-no-space-flag 1
- .nr an-break-flag 1
--\." make the size of the head bigger
- .ps +3
- .ft B
- .ne (2v + 1u)
-@@ -82,7 +80,6 @@
- .nr an-no-space-flag 1
- .nr an-break-flag 1
- .ps \\n[PS-SS]u
--\." make the size of the head bigger
- .ps +2
- .ft B
- .ne (2v + 1u)
-Index: b/docs/manpages/vfs_default_quota.8
-===================================================================
---- a/docs/manpages/vfs_default_quota.8	2009-11-08 15:54:27.000000000 +0100
-+++ b/docs/manpages/vfs_default_quota.8	2009-11-08 15:55:36.000000000 +0100
-@@ -33,7 +33,6 @@
- .\" SH - level-one heading that works better for non-TTY output
- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- .de1 SH
--.\" put an extra blank line of space above the head in non-TTY output
- .if t \{\
- .sp 1
- .\}
-@@ -48,7 +47,6 @@
- .it 1 an-trap
- .nr an-no-space-flag 1
- .nr an-break-flag 1
--\." make the size of the head bigger
- .ps +3
- .ft B
- .ne (2v + 1u)
-@@ -82,7 +80,6 @@
- .nr an-no-space-flag 1
- .nr an-break-flag 1
- .ps \\n[PS-SS]u
--\." make the size of the head bigger
- .ps +2
- .ft B
- .ne (2v + 1u)
-Index: b/docs/manpages/vfs_extd_audit.8
-===================================================================
---- a/docs/manpages/vfs_extd_audit.8	2009-11-08 15:54:26.000000000 +0100
-+++ b/docs/manpages/vfs_extd_audit.8	2009-11-08 15:55:36.000000000 +0100
-@@ -33,7 +33,6 @@
- .\" SH - level-one heading that works better for non-TTY output
- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- .de1 SH
--.\" put an extra blank line of space above the head in non-TTY output
- .if t \{\
- .sp 1
- .\}
-@@ -48,7 +47,6 @@
- .it 1 an-trap
- .nr an-no-space-flag 1
- .nr an-break-flag 1
--\." make the size of the head bigger
- .ps +3
- .ft B
- .ne (2v + 1u)
-@@ -82,7 +80,6 @@
- .nr an-no-space-flag 1
- .nr an-break-flag 1
- .ps \\n[PS-SS]u
--\." make the size of the head bigger
- .ps +2
- .ft B
- .ne (2v + 1u)
-Index: b/docs/manpages/vfs_fake_perms.8
-===================================================================
---- a/docs/manpages/vfs_fake_perms.8	2009-11-08 15:54:26.000000000 +0100
-+++ b/docs/manpages/vfs_fake_perms.8	2009-11-08 15:55:36.000000000 +0100
-@@ -33,7 +33,6 @@
- .\" SH - level-one heading that works better for non-TTY output
- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- .de1 SH
--.\" put an extra blank line of space above the head in non-TTY output
- .if t \{\
- .sp 1
- .\}
-@@ -48,7 +47,6 @@
- .it 1 an-trap
- .nr an-no-space-flag 1
- .nr an-break-flag 1
--\." make the size of the head bigger
- .ps +3
- .ft B
- .ne (2v + 1u)
-@@ -82,7 +80,6 @@
- .nr an-no-space-flag 1
- .nr an-break-flag 1
- .ps \\n[PS-SS]u
--\." make the size of the head bigger
- .ps +2
- .ft B
- .ne (2v + 1u)
-Index: b/docs/manpages/vfs_fileid.8
-===================================================================
---- a/docs/manpages/vfs_fileid.8	2009-11-08 15:54:26.000000000 +0100
-+++ b/docs/manpages/vfs_fileid.8	2009-11-08 15:55:36.000000000 +0100
-@@ -33,7 +33,6 @@
- .\" SH - level-one heading that works better for non-TTY output
- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- .de1 SH
--.\" put an extra blank line of space above the head in non-TTY output
- .if t \{\
- .sp 1
- .\}
-@@ -48,7 +47,6 @@
- .it 1 an-trap
- .nr an-no-space-flag 1
- .nr an-break-flag 1
--\." make the size of the head bigger
- .ps +3
- .ft B
- .ne (2v + 1u)
-@@ -82,7 +80,6 @@
- .nr an-no-space-flag 1
- .nr an-break-flag 1
- .ps \\n[PS-SS]u
--\." make the size of the head bigger
- .ps +2
- .ft B
- .ne (2v + 1u)
-Index: b/docs/manpages/vfs_full_audit.8
-===================================================================
---- a/docs/manpages/vfs_full_audit.8	2009-11-08 15:54:26.000000000 +0100
-+++ b/docs/manpages/vfs_full_audit.8	2009-11-08 15:55:36.000000000 +0100
-@@ -33,7 +33,6 @@
- .\" SH - level-one heading that works better for non-TTY output
- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- .de1 SH
--.\" put an extra blank line of space above the head in non-TTY output
- .if t \{\
- .sp 1
- .\}
-@@ -48,7 +47,6 @@
- .it 1 an-trap
- .nr an-no-space-flag 1
- .nr an-break-flag 1
--\." make the size of the head bigger
- .ps +3
- .ft B
- .ne (2v + 1u)
-@@ -82,7 +80,6 @@
- .nr an-no-space-flag 1
- .nr an-break-flag 1
- .ps \\n[PS-SS]u
--\." make the size of the head bigger
- .ps +2
- .ft B
- .ne (2v + 1u)
-Index: b/docs/manpages/vfs_gpfs.8
-===================================================================
---- a/docs/manpages/vfs_gpfs.8	2009-11-08 15:54:26.000000000 +0100
-+++ b/docs/manpages/vfs_gpfs.8	2009-11-08 15:55:36.000000000 +0100
-@@ -33,7 +33,6 @@
- .\" SH - level-one heading that works better for non-TTY output
- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- .de1 SH
--.\" put an extra blank line of space above the head in non-TTY output
- .if t \{\
- .sp 1
- .\}
-@@ -48,7 +47,6 @@
- .it 1 an-trap
- .nr an-no-space-flag 1
- .nr an-break-flag 1
--\." make the size of the head bigger
- .ps +3
- .ft B
- .ne (2v + 1u)
-@@ -82,7 +80,6 @@
- .nr an-no-space-flag 1
- .nr an-break-flag 1
- .ps \\n[PS-SS]u
--\." make the size of the head bigger
- .ps +2
- .ft B
- .ne (2v + 1u)
-Index: b/docs/manpages/vfs_netatalk.8
-===================================================================
---- a/docs/manpages/vfs_netatalk.8	2009-11-08 15:54:26.000000000 +0100
-+++ b/docs/manpages/vfs_netatalk.8	2009-11-08 15:55:36.000000000 +0100
-@@ -33,7 +33,6 @@
- .\" SH - level-one heading that works better for non-TTY output
- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- .de1 SH
--.\" put an extra blank line of space above the head in non-TTY output
- .if t \{\
- .sp 1
- .\}
-@@ -48,7 +47,6 @@
- .it 1 an-trap
- .nr an-no-space-flag 1
- .nr an-break-flag 1
--\." make the size of the head bigger
- .ps +3
- .ft B
- .ne (2v + 1u)
-@@ -82,7 +80,6 @@
- .nr an-no-space-flag 1
- .nr an-break-flag 1
- .ps \\n[PS-SS]u
--\." make the size of the head bigger
- .ps +2
- .ft B
- .ne (2v + 1u)
-Index: b/docs/manpages/vfs_notify_fam.8
-===================================================================
---- a/docs/manpages/vfs_notify_fam.8	2009-11-08 15:54:26.000000000 +0100
-+++ b/docs/manpages/vfs_notify_fam.8	2009-11-08 15:55:36.000000000 +0100
-@@ -33,7 +33,6 @@
- .\" SH - level-one heading that works better for non-TTY output
- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- .de1 SH
--.\" put an extra blank line of space above the head in non-TTY output
- .if t \{\
- .sp 1
- .\}
-@@ -48,7 +47,6 @@
- .it 1 an-trap
- .nr an-no-space-flag 1
- .nr an-break-flag 1
--\." make the size of the head bigger
- .ps +3
- .ft B
- .ne (2v + 1u)
-@@ -82,7 +80,6 @@
- .nr an-no-space-flag 1
- .nr an-break-flag 1
- .ps \\n[PS-SS]u
--\." make the size of the head bigger
- .ps +2
- .ft B
- .ne (2v + 1u)
-Index: b/docs/manpages/vfs_prealloc.8
-===================================================================
---- a/docs/manpages/vfs_prealloc.8	2009-11-08 15:54:26.000000000 +0100
-+++ b/docs/manpages/vfs_prealloc.8	2009-11-08 15:55:36.000000000 +0100
-@@ -33,7 +33,6 @@
- .\" SH - level-one heading that works better for non-TTY output
- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- .de1 SH
--.\" put an extra blank line of space above the head in non-TTY output
- .if t \{\
- .sp 1
- .\}
-@@ -48,7 +47,6 @@
- .it 1 an-trap
- .nr an-no-space-flag 1
- .nr an-break-flag 1
--\." make the size of the head bigger
- .ps +3
- .ft B
- .ne (2v + 1u)
-@@ -82,7 +80,6 @@
- .nr an-no-space-flag 1
- .nr an-break-flag 1
- .ps \\n[PS-SS]u
--\." make the size of the head bigger
- .ps +2
- .ft B
- .ne (2v + 1u)
-Index: b/docs/manpages/vfs_readahead.8
-===================================================================
---- a/docs/manpages/vfs_readahead.8	2009-11-08 15:54:26.000000000 +0100
-+++ b/docs/manpages/vfs_readahead.8	2009-11-08 15:55:36.000000000 +0100
-@@ -33,7 +33,6 @@
- .\" SH - level-one heading that works better for non-TTY output
- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- .de1 SH
--.\" put an extra blank line of space above the head in non-TTY output
- .if t \{\
- .sp 1
- .\}
-@@ -48,7 +47,6 @@
- .it 1 an-trap
- .nr an-no-space-flag 1
- .nr an-break-flag 1
--\." make the size of the head bigger
- .ps +3
- .ft B
- .ne (2v + 1u)
-@@ -82,7 +80,6 @@
- .nr an-no-space-flag 1
- .nr an-break-flag 1
- .ps \\n[PS-SS]u
--\." make the size of the head bigger
- .ps +2
- .ft B
- .ne (2v + 1u)
-Index: b/docs/manpages/vfs_readonly.8
-===================================================================
---- a/docs/manpages/vfs_readonly.8	2009-11-08 15:54:27.000000000 +0100
-+++ b/docs/manpages/vfs_readonly.8	2009-11-08 15:55:36.000000000 +0100
-@@ -33,7 +33,6 @@
- .\" SH - level-one heading that works better for non-TTY output
- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- .de1 SH
--.\" put an extra blank line of space above the head in non-TTY output
- .if t \{\
- .sp 1
- .\}
-@@ -48,7 +47,6 @@
- .it 1 an-trap
- .nr an-no-space-flag 1
- .nr an-break-flag 1
--\." make the size of the head bigger
- .ps +3
- .ft B
- .ne (2v + 1u)
-@@ -82,7 +80,6 @@
- .nr an-no-space-flag 1
- .nr an-break-flag 1
- .ps \\n[PS-SS]u
--\." make the size of the head bigger
- .ps +2
- .ft B
- .ne (2v + 1u)
-Index: b/docs/manpages/vfs_recycle.8
-===================================================================
---- a/docs/manpages/vfs_recycle.8	2009-11-08 15:54:26.000000000 +0100
-+++ b/docs/manpages/vfs_recycle.8	2009-11-08 15:55:36.000000000 +0100
-@@ -33,7 +33,6 @@
- .\" SH - level-one heading that works better for non-TTY output
- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- .de1 SH
--.\" put an extra blank line of space above the head in non-TTY output
- .if t \{\
- .sp 1
- .\}
-@@ -48,7 +47,6 @@
- .it 1 an-trap
- .nr an-no-space-flag 1
- .nr an-break-flag 1
--\." make the size of the head bigger
- .ps +3
- .ft B
- .ne (2v + 1u)
-@@ -82,7 +80,6 @@
- .nr an-no-space-flag 1
- .nr an-break-flag 1
- .ps \\n[PS-SS]u
--\." make the size of the head bigger
- .ps +2
- .ft B
- .ne (2v + 1u)
-Index: b/docs/manpages/vfs_shadow_copy.8
-===================================================================
---- a/docs/manpages/vfs_shadow_copy.8	2009-11-08 15:54:26.000000000 +0100
-+++ b/docs/manpages/vfs_shadow_copy.8	2009-11-08 15:55:36.000000000 +0100
-@@ -33,7 +33,6 @@
- .\" SH - level-one heading that works better for non-TTY output
- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- .de1 SH
--.\" put an extra blank line of space above the head in non-TTY output
- .if t \{\
- .sp 1
- .\}
-@@ -48,7 +47,6 @@
- .it 1 an-trap
- .nr an-no-space-flag 1
- .nr an-break-flag 1
--\." make the size of the head bigger
- .ps +3
- .ft B
- .ne (2v + 1u)
-@@ -82,7 +80,6 @@
- .nr an-no-space-flag 1
- .nr an-break-flag 1
- .ps \\n[PS-SS]u
--\." make the size of the head bigger
- .ps +2
- .ft B
- .ne (2v + 1u)
-Index: b/docs/manpages/vfs_shadow_copy2.8
-===================================================================
---- a/docs/manpages/vfs_shadow_copy2.8	2009-11-08 15:54:26.000000000 +0100
-+++ b/docs/manpages/vfs_shadow_copy2.8	2009-11-08 15:55:36.000000000 +0100
-@@ -33,7 +33,6 @@
- .\" SH - level-one heading that works better for non-TTY output
- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- .de1 SH
--.\" put an extra blank line of space above the head in non-TTY output
- .if t \{\
- .sp 1
- .\}
-@@ -48,7 +47,6 @@
- .it 1 an-trap
- .nr an-no-space-flag 1
- .nr an-break-flag 1
--\." make the size of the head bigger
- .ps +3
- .ft B
- .ne (2v + 1u)
-@@ -82,7 +80,6 @@
- .nr an-no-space-flag 1
- .nr an-break-flag 1
- .ps \\n[PS-SS]u
--\." make the size of the head bigger
- .ps +2
- .ft B
- .ne (2v + 1u)
-Index: b/docs/manpages/vfs_smb_traffic_analyzer.8
-===================================================================
---- a/docs/manpages/vfs_smb_traffic_analyzer.8	2009-11-08 15:54:27.000000000 +0100
-+++ b/docs/manpages/vfs_smb_traffic_analyzer.8	2009-11-08 15:55:36.000000000 +0100
-@@ -33,7 +33,6 @@
- .\" SH - level-one heading that works better for non-TTY output
- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- .de1 SH
--.\" put an extra blank line of space above the head in non-TTY output
- .if t \{\
- .sp 1
- .\}
-@@ -48,7 +47,6 @@
- .it 1 an-trap
- .nr an-no-space-flag 1
- .nr an-break-flag 1
--\." make the size of the head bigger
- .ps +3
- .ft B
- .ne (2v + 1u)
-@@ -82,7 +80,6 @@
- .nr an-no-space-flag 1
- .nr an-break-flag 1
- .ps \\n[PS-SS]u
--\." make the size of the head bigger
- .ps +2
- .ft B
- .ne (2v + 1u)
-Index: b/docs/manpages/vfs_streams_depot.8
-===================================================================
---- a/docs/manpages/vfs_streams_depot.8	2009-11-08 15:54:27.000000000 +0100
-+++ b/docs/manpages/vfs_streams_depot.8	2009-11-08 15:55:36.000000000 +0100
-@@ -33,7 +33,6 @@
- .\" SH - level-one heading that works better for non-TTY output
- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- .de1 SH
--.\" put an extra blank line of space above the head in non-TTY output
- .if t \{\
- .sp 1
- .\}
-@@ -48,7 +47,6 @@
- .it 1 an-trap
- .nr an-no-space-flag 1
- .nr an-break-flag 1
--\." make the size of the head bigger
- .ps +3
- .ft B
- .ne (2v + 1u)
-@@ -82,7 +80,6 @@
- .nr an-no-space-flag 1
- .nr an-break-flag 1
- .ps \\n[PS-SS]u
--\." make the size of the head bigger
- .ps +2
- .ft B
- .ne (2v + 1u)
-Index: b/docs/manpages/vfs_streams_xattr.8
-===================================================================
---- a/docs/manpages/vfs_streams_xattr.8	2009-11-08 15:54:27.000000000 +0100
-+++ b/docs/manpages/vfs_streams_xattr.8	2009-11-08 15:55:36.000000000 +0100
-@@ -33,7 +33,6 @@
- .\" SH - level-one heading that works better for non-TTY output
- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- .de1 SH
--.\" put an extra blank line of space above the head in non-TTY output
- .if t \{\
- .sp 1
- .\}
-@@ -48,7 +47,6 @@
- .it 1 an-trap
- .nr an-no-space-flag 1
- .nr an-break-flag 1
--\." make the size of the head bigger
- .ps +3
- .ft B
- .ne (2v + 1u)
-@@ -82,7 +80,6 @@
- .nr an-no-space-flag 1
- .nr an-break-flag 1
- .ps \\n[PS-SS]u
--\." make the size of the head bigger
- .ps +2
- .ft B
- .ne (2v + 1u)
-Index: b/docs/manpages/vfs_xattr_tdb.8
-===================================================================
---- a/docs/manpages/vfs_xattr_tdb.8	2009-11-08 15:54:26.000000000 +0100
-+++ b/docs/manpages/vfs_xattr_tdb.8	2009-11-08 15:55:36.000000000 +0100
-@@ -33,7 +33,6 @@
- .\" SH - level-one heading that works better for non-TTY output
- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- .de1 SH
--.\" put an extra blank line of space above the head in non-TTY output
- .if t \{\
- .sp 1
- .\}
-@@ -48,7 +47,6 @@
- .it 1 an-trap
- .nr an-no-space-flag 1
- .nr an-break-flag 1
--\." make the size of the head bigger
- .ps +3
- .ft B
- .ne (2v + 1u)
-@@ -82,7 +80,6 @@
- .nr an-no-space-flag 1
- .nr an-break-flag 1
- .ps \\n[PS-SS]u
--\." make the size of the head bigger
- .ps +2
- .ft B
- .ne (2v + 1u)
-Index: b/docs/manpages/vfstest.1
-===================================================================
---- a/docs/manpages/vfstest.1	2009-11-08 15:54:26.000000000 +0100
-+++ b/docs/manpages/vfstest.1	2009-11-08 15:55:36.000000000 +0100
-@@ -33,7 +33,6 @@
- .\" SH - level-one heading that works better for non-TTY output
- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- .de1 SH
--.\" put an extra blank line of space above the head in non-TTY output
- .if t \{\
- .sp 1
- .\}
-@@ -48,7 +47,6 @@
- .it 1 an-trap
- .nr an-no-space-flag 1
- .nr an-break-flag 1
--\." make the size of the head bigger
- .ps +3
- .ft B
- .ne (2v + 1u)
-@@ -82,7 +80,6 @@
- .nr an-no-space-flag 1
- .nr an-break-flag 1
- .ps \\n[PS-SS]u
--\." make the size of the head bigger
- .ps +2
- .ft B
- .ne (2v + 1u)
-Index: b/docs/manpages/wbinfo.1
-===================================================================
---- a/docs/manpages/wbinfo.1	2009-11-08 15:54:26.000000000 +0100
-+++ b/docs/manpages/wbinfo.1	2009-11-08 15:55:36.000000000 +0100
-@@ -33,7 +33,6 @@
- .\" SH - level-one heading that works better for non-TTY output
- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- .de1 SH
--.\" put an extra blank line of space above the head in non-TTY output
- .if t \{\
- .sp 1
- .\}
-@@ -48,7 +47,6 @@
- .it 1 an-trap
- .nr an-no-space-flag 1
- .nr an-break-flag 1
--\." make the size of the head bigger
- .ps +3
- .ft B
- .ne (2v + 1u)
-@@ -82,7 +80,6 @@
- .nr an-no-space-flag 1
- .nr an-break-flag 1
- .ps \\n[PS-SS]u
--\." make the size of the head bigger
- .ps +2
- .ft B
- .ne (2v + 1u)
-Index: b/docs/manpages/winbind_krb5_locator.7
-===================================================================
---- a/docs/manpages/winbind_krb5_locator.7	2009-11-08 15:54:26.000000000 +0100
-+++ b/docs/manpages/winbind_krb5_locator.7	2009-11-08 15:55:36.000000000 +0100
-@@ -33,7 +33,6 @@
- .\" SH - level-one heading that works better for non-TTY output
- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- .de1 SH
--.\" put an extra blank line of space above the head in non-TTY output
- .if t \{\
- .sp 1
- .\}
-@@ -48,7 +47,6 @@
- .it 1 an-trap
- .nr an-no-space-flag 1
- .nr an-break-flag 1
--\." make the size of the head bigger
- .ps +3
- .ft B
- .ne (2v + 1u)
-@@ -82,7 +80,6 @@
- .nr an-no-space-flag 1
- .nr an-break-flag 1
- .ps \\n[PS-SS]u
--\." make the size of the head bigger
- .ps +2
- .ft B
- .ne (2v + 1u)
-Index: b/docs/manpages/winbindd.8
-===================================================================
---- a/docs/manpages/winbindd.8	2009-11-08 15:55:33.000000000 +0100
-+++ b/docs/manpages/winbindd.8	2009-11-08 15:55:36.000000000 +0100
-@@ -33,7 +33,6 @@
- .\" SH - level-one heading that works better for non-TTY output
- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- .de1 SH
--.\" put an extra blank line of space above the head in non-TTY output
- .if t \{\
- .sp 1
- .\}
-@@ -48,7 +47,6 @@
- .it 1 an-trap
- .nr an-no-space-flag 1
- .nr an-break-flag 1
--\." make the size of the head bigger
- .ps +3
- .ft B
- .ne (2v + 1u)
-@@ -82,7 +80,6 @@
- .nr an-no-space-flag 1
- .nr an-break-flag 1
- .ps \\n[PS-SS]u
--\." make the size of the head bigger
- .ps +2
- .ft B
- .ne (2v + 1u)

Modified: trunk/samba/debian/patches/installswat.sh.patch
===================================================================
--- trunk/samba/debian/patches/installswat.sh.patch	2010-09-06 17:45:31 UTC (rev 3571)
+++ trunk/samba/debian/patches/installswat.sh.patch	2010-09-06 20:23:16 UTC (rev 3572)
@@ -4,10 +4,10 @@
 Author: Christian Perrier <bubulle at debian.org>
 Forwarded: not-needed
 
-Index: b/source3/script/installswat.sh
+Index: experimental/source3/script/installswat.sh
 ===================================================================
---- a/source3/script/installswat.sh	2009-11-08 15:54:27.000000000 +0100
-+++ b/source3/script/installswat.sh	2009-11-08 15:55:33.000000000 +0100
+--- experimental.orig/source3/script/installswat.sh
++++ experimental/source3/script/installswat.sh
 @@ -198,7 +198,11 @@
  
  # Install/ remove Using Samba book (but only if it is there)

Modified: trunk/samba/debian/patches/no-unnecessary-cups.patch
===================================================================
--- trunk/samba/debian/patches/no-unnecessary-cups.patch	2010-09-06 17:45:31 UTC (rev 3571)
+++ trunk/samba/debian/patches/no-unnecessary-cups.patch	2010-09-06 20:23:16 UTC (rev 3572)
@@ -6,11 +6,11 @@
 Bug: https://bugzilla.samba.org/show_bug.cgi?id=5525
 Forwarded: yes
 
-Index: b/source3/smbd/server.c
+Index: experimental/source3/smbd/server.c
 ===================================================================
---- a/source3/smbd/server.c	2009-11-08 15:54:27.000000000 +0100
-+++ b/source3/smbd/server.c	2009-11-08 15:55:36.000000000 +0100
-@@ -699,6 +699,10 @@
+--- experimental.orig/source3/smbd/server.c
++++ experimental/source3/smbd/server.c
+@@ -710,6 +710,10 @@
  	int pnum = lp_servicenumber(PRINTERS_NAME);
  	const char *pname;
  

Modified: trunk/samba/debian/patches/pam-examples.patch
===================================================================
--- trunk/samba/debian/patches/pam-examples.patch	2010-09-06 17:45:31 UTC (rev 3571)
+++ trunk/samba/debian/patches/pam-examples.patch	2010-09-06 20:23:16 UTC (rev 3572)
@@ -2,10 +2,10 @@
 Author: Christian Perrier <bubulle at debian.org>
 Forwarded: not-needed
 
-Index: b/source3/pam_smbpass/README
+Index: experimental/source3/pam_smbpass/README
 ===================================================================
---- a/source3/pam_smbpass/README	2009-11-08 15:54:27.000000000 +0100
-+++ b/source3/pam_smbpass/README	2009-11-08 15:55:34.000000000 +0100
+--- experimental.orig/source3/pam_smbpass/README
++++ experimental/source3/pam_smbpass/README
 @@ -37,7 +37,7 @@
  	smbconf=<file>	-	specify an alternate path to the smb.conf
  				file.

Modified: trunk/samba/debian/patches/series
===================================================================
--- trunk/samba/debian/patches/series	2010-09-06 17:45:31 UTC (rev 3571)
+++ trunk/samba/debian/patches/series	2010-09-06 20:23:16 UTC (rev 3572)
@@ -6,11 +6,8 @@
 smbclient-pager.patch
 undefined-symbols.patch
 VERSION.patch
-adapt_machine_creation_script.patch
 usershare.patch
 smbtar-bashism.patch
 no-unnecessary-cups.patch
-codepages-location.patch
-external-talloc-support.patch
 autoconf.patch
 bug_586337_upstream_7139.patch

Modified: trunk/samba/debian/patches/shrink-dead-code.patch
===================================================================
--- trunk/samba/debian/patches/shrink-dead-code.patch	2010-09-06 17:45:31 UTC (rev 3571)
+++ trunk/samba/debian/patches/shrink-dead-code.patch	2010-09-06 20:23:16 UTC (rev 3572)
@@ -1,470 +0,0 @@
-Description: Drop dead code from executables
- Comment by Michael Adam:
- .
- While this patch is clever in one respect, it has bad side effects:
- Functions that not used are removed from the binaries.
- For functions that are only used in shared objects, this is very bad,
- since these will refuse to work (load).
- .
- Example: librpc/gen_ndr/ndr_xattr.c:ndr_pull_xattr_NTACL() is only
- used in the acl_tdb and acl_xattr vfs modules.
- So the symbol is not present in smbd, and thus these modules will
- not work. The _do_ not work in the 3.3. packages that are out there.
- .
- I recommend not using this patch!
-Author: Steve Langasek <vorlon at debian.org>
-Forwarded: no
-Reviewed-By: Michael Adam <obnox at samba.org>
-
-Index: samba-3.3.4/source3/Makefile.in
-===================================================================
---- samba-3.3.4.orig/source3/Makefile.in	2009-05-02 14:33:23.654935629 +0200
-+++ samba-3.3.4/source3/Makefile.in	2009-05-02 14:34:41.393926942 +0200
-@@ -1336,182 +1336,243 @@
- 
- bin/nmbd at EXEEXT@: $(BINARY_PREREQS) $(NMBD_OBJ) @BUILD_POPT@ @LIBTALLOC_TARGET@ @LIBTDB_TARGET@
- 	@echo Linking $@
--	@$(CC) $(FLAGS) -o $@ $(NMBD_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) \
-+	@$(AR) -rc $@.a $(NMBD_OBJ)
-+	@$(CC) $(FLAGS) -o $@ $@.a $(LDFLAGS) $(DYNEXP) $(LIBS) \
- 		$(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(POPT_LIBS) \
- 		$(KRB5LIBS) $(LDAP_LIBS)
-+	@rm -f $@.a
- 
- bin/swat at EXEEXT@: $(BINARY_PREREQS) $(SWAT_OBJ) @BUILD_POPT@ @LIBTALLOC_TARGET@ @LIBTDB_TARGET@ @LIBWBCLIENT_SHARED@
- 	@echo Linking $@
--	@$(CC) $(FLAGS) -o $@ $(SWAT_OBJ) $(LDFLAGS) $(DYNEXP) $(PRINT_LIBS) \
-+	@$(AR) -rc $@.a $(SWAT_OBJ)
-+	@$(CC) $(FLAGS) -o $@ $@.a $(LDFLAGS) $(DYNEXP) $(PRINT_LIBS) \
- 	  $(AUTH_LIBS) $(LIBS) $(PASSDB_LIBS) $(POPT_LIBS) $(KRB5LIBS) \
- 	  $(LDAP_LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(WINBIND_LIBS)
-+	@rm -f $@.a
- 
- bin/rpcclient at EXEEXT@: $(BINARY_PREREQS) $(RPCCLIENT_OBJ) @BUILD_POPT@ @LIBTALLOC_TARGET@ @LIBTDB_TARGET@ @LIBWBCLIENT_SHARED@
- 	@echo Linking $@
--	@$(CC) $(FLAGS) -o $@ $(LDFLAGS) $(PASSDB_LIBS) $(RPCCLIENT_OBJ) \
-+	@$(AR) -rc $@.a $(RPCCLIENT_OBJ)
-+	@$(CC) $(FLAGS) -o $@ $@.a $(LDFLAGS) $(PASSDB_LIBS) \
- 		$(DYNEXP) $(TERMLDFLAGS) $(TERMLIBS) $(LIBS) $(POPT_LIBS) \
- 		$(KRB5LIBS) $(LDAP_LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) \
- 		$(WINBIND_LIBS)
-+	@rm -f $@.a
- 
- bin/smbclient at EXEEXT@: $(BINARY_PREREQS) $(CLIENT_OBJ) @BUILD_POPT@ @LIBTALLOC_TARGET@ @LIBTDB_TARGET@ @LIBWBCLIENT_SHARED@
- 	@echo Linking $@
--	@$(CC) $(FLAGS) -o $@ $(CLIENT_OBJ) $(LDFLAGS) $(DYNEXP) \
-+	@$(AR) -rc $@.a $(CLIENT_OBJ)
-+	@$(CC) $(FLAGS) -o $@ $@.a $(LDFLAGS) $(DYNEXP) \
- 		$(TERMLDFLAGS) $(TERMLIBS) $(LIBS) $(POPT_LIBS) \
- 		$(KRB5LIBS) $(LDAP_LIBS) $(NSCD_LIBS) $(DNSSD_LIBS) \
- 		$(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(WINBIND_LIBS)
-+	@rm -f $@.a
- 
- bin/net at EXEEXT@: $(BINARY_PREREQS) $(NET_OBJ) @BUILD_POPT@ @LIBTALLOC_TARGET@ @LIBTDB_TARGET@ @LIBWBCLIENT_SHARED@ @LIBNETAPI_SHARED@
- 	@echo Linking $@
--	@$(CC) $(FLAGS) -o $@ $(NET_OBJ) $(DYNEXP) $(LDFLAGS) $(LIBS) \
-+	@$(AR) -rc $@.a $(NET_OBJ)
-+	@$(CC) $(FLAGS) -o $@ $@.a $(DYNEXP) $(LDFLAGS) $(LIBS) \
- 		$(POPT_LIBS) $(KRB5LIBS) $(UUID_LIBS) $(LDAP_LIBS) \
- 		$(PASSDB_LIBS) $(TERMLDFLAGS) $(TERMLIBS) $(NSCD_LIBS) \
- 		@INIPARSERLIBS@ $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(WINBIND_LIBS) $(LIBNETAPI_LIBS)
-+	@rm -f $@.a
- 
- bin/profiles at EXEEXT@: $(BINARY_PREREQS) $(PROFILES_OBJ) @BUILD_POPT@ @LIBTALLOC_TARGET@ @LIBTDB_TARGET@
- 	@echo Linking $@
--	@$(CC) $(FLAGS) -o $@ $(PROFILES_OBJ) $(DYNEXP) $(LDFLAGS) $(LIBS) \
-+	@$(AR) -rc $@.a $(PROFILES_OBJ)
-+	@$(CC) $(FLAGS) -o $@ $@.a $(DYNEXP) $(LDFLAGS) $(LIBS) \
- 		$(LDAP_LIBS) $(POPT_LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS)
-+	@rm -f $@.a
- 
- bin/smbspool at EXEEXT@: $(BINARY_PREREQS) $(CUPS_OBJ) @BUILD_POPT@ @LIBTALLOC_TARGET@ @LIBTDB_TARGET@
- 	@echo Linking $@
--	@$(CC) $(FLAGS) -o $@ $(CUPS_OBJ) $(DYNEXP) $(LDFLAGS) $(LIBS) \
-+	@$(AR) -rc $@.a $(CUPS_OBJ)
-+	@$(CC) $(FLAGS) -o $@ $@.a $(DYNEXP) $(LDFLAGS) $(LIBS) \
- 		$(KRB5LIBS) $(LDAP_LIBS) $(POPT_LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS)
-+	@rm -f $@.a
- 
- bin/mount.cifs at EXEEXT@: $(BINARY_PREREQS) $(CIFS_MOUNT_OBJ) @BUILD_POPT@
- 	@echo Linking $@
--	@$(CC) $(FLAGS) -o $@ $(CIFS_MOUNT_OBJ) $(DYNEXP) $(LDFLAGS) $(POPT_LIBS)
-+	@$(AR) -rc $@.a $(CIFS_MOUNT_OBJ)
-+	@$(CC) $(FLAGS) -o $@ $@.a $(DYNEXP) $(LDFLAGS) $(POPT_LIBS)
-+	@rm -f $@.a
- 
- bin/umount.cifs at EXEEXT@: $(BINARY_PREREQS) $(CIFS_UMOUNT_OBJ) @BUILD_POPT@
- 	@echo Linking $@
--	@$(CC) $(FLAGS) -o $@ $(CIFS_UMOUNT_OBJ) $(DYNEXP) $(LDFLAGS) $(POPT_LIBS)
-+	@$(AR) -rc $@.a $(CIFS_UMOUNT_OBJ)
-+	@$(CC) $(FLAGS) -o $@ $@.a $(DYNEXP) $(LDFLAGS) $(POPT_LIBS)
-+	@rm -f $@.a
- 
- bin/cifs.upcall at EXEEXT@: $(BINARY_PREREQS) $(CIFS_UPCALL_OBJ) $(LIBSMBCLIENT_OBJ1) @BUILD_POPT@ @LIBTALLOC_TARGET@ @LIBTDB_TARGET@ @LIBWBCLIENT_SHARED@
- 	@echo Linking $@
--	@$(CC) $(FLAGS) -o $@ $(CIFS_UPCALL_OBJ) $(DYNEXP) $(LDFLAGS) \
-+	@$(AR) -rc $@.a $(CIFS_UPCALL_OBJ)
-+	@$(CC) $(FLAGS) -o $@ $@.a $(DYNEXP) $(LDFLAGS) \
- 		-lkeyutils $(LIBS) $(LIBSMBCLIENT_OBJ1) $(KRB5LIBS) \
- 		$(LDAP_LIBS) $(POPT_LIBS) $(LIBTALLOC_LIBS) $(WINBIND_LIBS) \
- 		$(LIBTDB_LIBS) $(NSCD_LIBS)
-+	@rm -f $@.a
- 
- bin/testparm at EXEEXT@: $(BINARY_PREREQS) $(TESTPARM_OBJ) @BUILD_POPT@ @LIBTALLOC_TARGET@ @LIBTDB_TARGET@
- 	@echo Linking $@
--	@$(CC) $(FLAGS) -o $@ $(TESTPARM_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) \
-+	@$(AR) -rc $@.a $(TESTPARM_OBJ)
-+	@$(CC) $(FLAGS) -o $@ $@.a $(LDFLAGS) $(DYNEXP) $(LIBS) \
- 		$(LDAP_LIBS) $(POPT_LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS)
-+	@rm -f $@.a
- 
- bin/smbstatus at EXEEXT@: $(BINARY_PREREQS) $(STATUS_OBJ) @BUILD_POPT@ @LIBTALLOC_TARGET@ @LIBTDB_TARGET@
- 	@echo Linking $@
--	@$(CC) $(FLAGS) -o $@ $(STATUS_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) \
-+	@$(AR) -rc $@.a $(STATUS_OBJ)
-+	@$(CC) $(FLAGS) -o $@ $@.a $(LDFLAGS) $(DYNEXP) $(LIBS) \
- 		$(LDAP_LIBS) $(POPT_LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS)
-+	@rm -f $@.a
- 
- bin/smbcontrol at EXEEXT@: $(BINARY_PREREQS) $(SMBCONTROL_OBJ) @BUILD_POPT@ @LIBTALLOC_TARGET@ @LIBTDB_TARGET@
- 	@echo Linking $@
--	@$(CC) -DUSING_SMBCONTROL $(FLAGS) -o $@ \
--		$(SMBCONTROL_OBJ) $(DYNEXP) $(LDFLAGS) \
-+	@$(AR) -rc $@.a $(SMBCONTROL_OBJ)
-+	@$(CC) -DUSING_SMBCONTROL $(FLAGS) -o $@ $@.a $(DYNEXP) $(LDFLAGS) \
- 		$(LIBS) $(LDAP_LIBS) @LIBUNWIND_PTRACE@ $(POPT_LIBS) \
- 		$(LIBTALLOC_LIBS) $(LIBTDB_LIBS)
-+	@rm -f $@.a
- 
- bin/smbtree at EXEEXT@: $(BINARY_PREREQS) $(SMBTREE_OBJ) @BUILD_POPT@ @LIBTALLOC_TARGET@ @LIBTDB_TARGET@ @LIBWBCLIENT_SHARED@
- 	@echo Linking $@
--	@$(CC) $(FLAGS) -o $@ $(SMBTREE_OBJ) $(LDFLAGS) $(DYNEXP) \
-+	@$(AR) -rc $@.a $(SMBTREE_OBJ)
-+	@$(CC) $(FLAGS) -o $@ $@.a $(LDFLAGS) $(DYNEXP) \
- 		$(LIBS) $(POPT_LIBS) $(KRB5LIBS) $(LDAP_LIBS) $(NSCD_LIBS) \
- 		$(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(WINBIND_LIBS)
-+	@rm -f $@.a
- 
- bin/smbpasswd at EXEEXT@: $(BINARY_PREREQS) $(SMBPASSWD_OBJ) @BUILD_POPT@ @LIBTALLOC_TARGET@ @LIBTDB_TARGET@ @LIBWBCLIENT_SHARED@
- 	@echo Linking $@
--	@$(CC) $(FLAGS) -o $@ $(SMBPASSWD_OBJ) $(LDFLAGS) $(PASSDB_LIBS) \
-+	@$(AR) -rc $@.a $(SMBPASSWD_OBJ)
-+	@$(CC) $(FLAGS) -o $@ $@.a $(LDFLAGS) $(PASSDB_LIBS) \
- 		$(DYNEXP) $(LIBS) $(POPT_LIBS) $(KRB5LIBS) $(LDAP_LIBS) \
- 		$(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(WINBIND_LIBS)
-+	@rm -f $@.a
- 
- bin/pdbedit at EXEEXT@: $(BINARY_PREREQS) $(PDBEDIT_OBJ) @BUILD_POPT@ @LIBTALLOC_TARGET@ @LIBTDB_TARGET@ @LIBWBCLIENT_SHARED@
- 	@echo Linking $@
--	@$(CC) $(FLAGS) -o $@ $(PDBEDIT_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) \
-+	@$(AR) -rc $@.a $(PDBEDIT_OBJ)
-+	@$(CC) $(FLAGS) -o $@ $@.a $(LDFLAGS) $(DYNEXP) $(LIBS) \
- 		$(POPT_LIBS) $(PASSDB_LIBS) $(LDAP_LIBS) $(LIBTALLOC_LIBS) \
- 		$(LIBTDB_LIBS) $(WINBIND_LIBS)
-+	@rm -f $@.a
- 
- bin/smbget at EXEEXT@: $(BINARY_PREREQS) $(SMBGET_OBJ) @BUILD_POPT@ @LIBTALLOC_TARGET@ @LIBTDB_TARGET@ @LIBWBCLIENT_SHARED@
- 	@echo Linking $@
--	@$(CC) $(FLAGS) -o $@ $(SMBGET_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) \
-+	@$(AR) -rc $@.a $(SMBGET_OBJ)
-+	@$(CC) $(FLAGS) -o $@ $@.a $(LDFLAGS) $(DYNEXP) $(LIBS) \
- 		$(POPT_LIBS)  $(KRB5LIBS) $(LDAP_LIBS) $(NSCD_LIBS) \
- 		$(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(WINBIND_LIBS)
-+	@rm -f $@.a
- 
- bin/nmblookup at EXEEXT@: $(BINARY_PREREQS) $(NMBLOOKUP_OBJ) @BUILD_POPT@ @LIBTALLOC_TARGET@ @LIBTDB_TARGET@
- 	@echo Linking $@
--	@$(CC) $(FLAGS) -o $@ $(NMBLOOKUP_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) \
-+	@$(AR) -rc $@.a $(NMBLOOKUP_OBJ)
-+	@$(CC) $(FLAGS) -o $@ $@.a $(LDFLAGS) $(DYNEXP) $(LIBS) \
- 		$(POPT_LIBS) $(LDAP_LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS)
-+	@rm -f $@.a
- 
- bin/smbtorture at EXEEXT@: $(BINARY_PREREQS) $(SMBTORTURE_OBJ) @BUILD_POPT@ @LIBTALLOC_TARGET@ @LIBTDB_TARGET@
- 	@echo Linking $@
--	@$(CC) $(FLAGS) -o $@ $(SMBTORTURE_OBJ) $(LDFLAGS) $(DYNEXP) \
-+	@$(AR) -rc $@.a $(SMBTORTURE_OBJ)
-+	@$(CC) $(FLAGS) -o $@ $@.a $(LDFLAGS) $(DYNEXP) \
- 		$(LIBS) $(KRB5LIBS) $(LDAP_LIBS) $(POPT_LIBS) $(LIBTALLOC_LIBS) \
- 		$(LIBTDB_LIBS)
-+	@rm -f $@.a
- 
- bin/talloctort at EXEEXT@: $(BINARY_PREREQS) $(TALLOCTORT_OBJ) @BUILD_POPT@ @LIBTALLOC_TARGET@ @LIBTDB_TARGET@
- 	@echo Linking $@
--	@$(CC) $(FLAGS) -o $@ $(TALLOCTORT_OBJ) $(LDFLAGS) \
-+	@$(AR) -rc $@.a $(TALLOCTORT_OBJ)
-+	@$(CC) $(FLAGS) -o $@ $@.a $(LDFLAGS) \
- 		$(DYNEXP) $(LIBS) $(LDAP_LIBS) $(POPT_LIBS) \
- 		$(LIBTALLOC_LIBS) $(LIBTDB_LIBS)
-+	@rm -f $@.a
- 
- bin/replacetort at EXEEXT@: $(REPLACETORT_OBJ) @BUILD_POPT@ @LIBTALLOC_TARGET@
- 	@echo Linking $@
--	@$(CC) $(FLAGS) @PIE_LDFLAGS@ -o $@ $(REPLACETORT_OBJ) $(LDFLAGS) \
-+	@$(AR) -rc $@.a $(REPLACETORT_OBJ)
-+	@$(CC) $(FLAGS) @PIE_LDFLAGS@ -o $@ $@.a $(LDFLAGS) \
- 		$(DYNEXP) $(LIBS) $(POPT_LIBS) $(LIBTALLOC_LIBS)
-+	@rm -f $@.a
- 
- bin/smbconftort at EXEEXT@: $(SMBCONFTORT_OBJ) @BUILD_POPT@ @LIBTALLOC_TARGET@ @LIBTDB_TARGET@
- 	@echo Linking $@
--	@$(CC) $(FLAGS) @PIE_LDFLAGS@ -o $@ $(SMBCONFTORT_OBJ) $(LDFLAGS) \
-+	@$(AR) -rc $@.a $(SMBCONFTORT_OBJ)
-+	@$(CC) $(FLAGS) @PIE_LDFLAGS@ -o $@ $@.a $(LDFLAGS) \
- 		$(DYNEXP) $(LIBS) $(LDAP_LIBS) $(POPT_LIBS) \
- 		$(LIBTALLOC_LIBS) $(LIBTDB_LIBS)
-+	@rm -f $@.a
- 
- bin/masktest at EXEEXT@: $(BINARY_PREREQS) $(MASKTEST_OBJ) @BUILD_POPT@ @LIBTALLOC_TARGET@ @LIBTDB_TARGET@
- 	@echo Linking $@
--	@$(CC) $(FLAGS) -o $@ $(MASKTEST_OBJ) $(LDFLAGS) $(DYNEXP) \
-+	@$(AR) -rc $@.a $(MASKTEST_OBJ)
-+	@$(CC) $(FLAGS) -o $@ $@.a $(LDFLAGS) $(DYNEXP) \
- 		$(LIBS) $(KRB5LIBS) $(LDAP_LIBS) $(POPT_LIBS) \
- 		$(LIBTALLOC_LIBS) $(LIBTDB_LIBS)
-+	@rm -f $@.a
- 
- bin/msgtest at EXEEXT@: $(BINARY_PREREQS) $(MSGTEST_OBJ) @BUILD_POPT@ @LIBTALLOC_TARGET@ @LIBTDB_TARGET@
- 	@echo Linking $@
--	@$(CC) $(FLAGS) -o $@ $(MSGTEST_OBJ) $(LDFLAGS) $(DYNEXP) \
-+	@$(AR) -rc $@.a $(MSGTEST_OBJ)
-+	@$(CC) $(FLAGS) -o $@ $@.a $(LDFLAGS) $(DYNEXP) \
- 		$(LIBS) $(KRB5LIBS) $(LDAP_LIBS) $(POPT_LIBS) \
- 		$(LIBTALLOC_LIBS) $(LIBTDB_LIBS)
-+	@rm -f $@.a
- 
- bin/smbcacls at EXEEXT@: $(BINARY_PREREQS) $(SMBCACLS_OBJ) @BUILD_POPT@ @LIBTALLOC_TARGET@ @LIBTDB_TARGET@ @LIBWBCLIENT_SHARED@
- 	@echo Linking $@
--	@$(CC) $(FLAGS) -o $@ $(SMBCACLS_OBJ) $(DYNEXP) $(LDFLAGS) \
-+	@$(AR) -rc $@.a $(SMBCACLS_OBJ)
-+	@$(CC) $(FLAGS) -o $@ $@.a $(DYNEXP) $(LDFLAGS) \
- 		$(LIBS) $(POPT_LIBS) $(KRB5LIBS) $(LDAP_LIBS) $(NSCD_LIBS) \
- 		$(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(WINBIND_LIBS)
-+	@rm -f $@.a
- 
- bin/smbcquotas at EXEEXT@: $(BINARY_PREREQS) $(SMBCQUOTAS_OBJ) @BUILD_POPT@ @LIBTALLOC_TARGET@ @LIBTDB_TARGET@ @LIBWBCLIENT_SHARED@
- 	@echo Linking $@
--	@$(CC) $(FLAGS) -o $@ $(SMBCQUOTAS_OBJ) $(DYNEXP) $(LDFLAGS) \
-+	@$(AR) -rc $@.a $(SMBCQUOTAS_OBJ)
-+	@$(CC) $(FLAGS) -o $@ $@.a $(DYNEXP) $(LDFLAGS) \
- 		$(LIBS) $(POPT_LIBS) $(KRB5LIBS) $(LDAP_LIBS) $(NSCD_LIBS) \
- 		$(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(WINBIND_LIBS)
-+	@rm -f $@.a
- 
- bin/eventlogadm at EXEEXT@: $(BINARY_PREREQS) $(EVTLOGADM_OBJ) @BUILD_POPT@ @LIBTALLOC_TARGET@ @LIBTDB_TARGET@
- 	@echo Linking $@
--	@$(CC) $(FLAGS) -o $@ $(EVTLOGADM_OBJ) $(DYNEXP) $(LDFLAGS) \
-+	@$(AR) -rc $@.a $(EVTLOGADM_OBJ)
-+	@$(CC) $(FLAGS) -o $@ $@.a $(DYNEXP) $(LDFLAGS) \
- 		$(LIBS) $(LDAP_LIBS) $(POPT_LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS)
-+	@rm -f $@.a
- 
- bin/sharesec at EXEEXT@: $(BINARY_PREREQS) $(SHARESEC_OBJ) @BUILD_POPT@ @LIBTALLOC_TARGET@ @LIBTDB_TARGET@
- 	@echo Linking $@
--	@$(CC) $(FLAGS) -o $@ $(SHARESEC_OBJ) $(DYNEXP) $(LDFLAGS) \
-+	@$(AR) -rc $@.a $(SHARESEC_OBJ)
-+	@$(CC) $(FLAGS) -o $@ $@.a $(DYNEXP) $(LDFLAGS) \
- 		$(LIBS) $(LDAP_LIBS) $(POPT_LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS)
-+	@rm -f $@.a
- 
- bin/locktest at EXEEXT@: $(BINARY_PREREQS) $(LOCKTEST_OBJ) @BUILD_POPT@ @LIBTALLOC_TARGET@ @LIBTDB_TARGET@
- 	@echo Linking $@
--	@$(CC) $(FLAGS) -o $@ $(LOCKTEST_OBJ) $(LDFLAGS) $(DYNEXP) \
-+	@$(AR) -rc $@.a $(LOCKTEST_OBJ)
-+	@$(CC) $(FLAGS) -o $@ $@.a $(LDFLAGS) $(DYNEXP) \
- 		$(LIBS) $(KRB5LIBS) $(LDAP_LIBS) $(POPT_LIBS) \
- 		$(LIBTALLOC_LIBS) $(LIBTDB_LIBS)
-+	@rm -f $@.a
- 
- bin/nsstest at EXEEXT@: $(BINARY_PREREQS) $(NSSTEST_OBJ) @BUILD_POPT@ @LIBTALLOC_TARGET@ @LIBTDB_TARGET@
- 	@echo Linking $@
--	@$(CC) $(FLAGS) -o $@ $(NSSTEST_OBJ) $(LDFLAGS) $(DYNEXP) \
-+	@$(AR) -rc $@.a $(NSSTEST_OBJ)
-+	@$(CC) $(FLAGS) -o $@ $@.a $(LDFLAGS) $(DYNEXP) \
- 		$(LIBS) $(KRB5LIBS)  $(LDAP_LIBS) $(POPT_LIBS) \
- 		$(LIBTALLOC_LIBS) $(LIBTDB_LIBS)
-+	@rm -f $@.a
- 
- bin/pdbtest at EXEEXT@: $(BINARY_PREREQS) $(PDBTEST_OBJ) @BUILD_POPT@ @LIBTALLOC_TARGET@ @LIBTDB_TARGET@ @LIBWBCLIENT_SHARED@
- 	@echo Linking $@
--	@$(CC) $(FLAGS) -o $@ $(PDBTEST_OBJ) $(LDFLAGS) $(DYNEXP) \
-+	@$(AR) -rc $@.a $(PDBTEST_OBJ)
-+	@$(CC) $(FLAGS) -o $@ $@.a $(LDFLAGS) $(DYNEXP) \
- 		$(LIBS) $(KRB5LIBS) $(LDAP_LIBS) $(PASSDB_LIBS) \
- 		$(POPT_LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(WINBIND_LIBS)
-+	@rm -f $@.a
- 
- bin/vfstest at EXEEXT@: $(BINARY_PREREQS) $(VFSTEST_OBJ) @BUILD_POPT@ @LIBTALLOC_TARGET@ @LIBTDB_TARGET@ @LIBWBCLIENT_SHARED@
- 	@echo Linking $@
-@@ -1523,72 +1584,96 @@
- 
- bin/smbiconv at EXEEXT@: $(BINARY_PREREQS) $(SMBICONV_OBJ) @BUILD_POPT@ @LIBTALLOC_TARGET@ @LIBTDB_TARGET@
- 	@echo Linking $@
--	@$(CC) $(FLAGS) -o $@ $(SMBICONV_OBJ) $(LDFLAGS) $(TERMLDFLAGS) \
-+	@$(AR) -rc $@.a $(SMBICONV_OBJ)
-+	@$(CC) $(FLAGS) -o $@ $@.a $(LDFLAGS) $(TERMLDFLAGS) \
- 		$(TERMLIBS) $(DYNEXP) $(LIBS) $(LDAP_LIBS) $(POPT_LIBS) \
- 		$(LIBTALLOC_LIBS) $(LIBTDB_LIBS)
-+	@rm -f $@.a
- 
- bin/log2pcap at EXEEXT@: $(BINARY_PREREQS) $(LOG2PCAP_OBJ) @BUILD_POPT@ @LIBTALLOC_TARGET@
- 	@echo Linking $@
--	@$(CC) $(FLAGS) -o $@ $(LOG2PCAP_OBJ) $(LDFLAGS) $(DYNEXP) \
-+	@$(AR) -rc $@.a $(LOG2PCAP_OBJ)
-+	@$(CC) $(FLAGS) -o $@ $@.a $(LDFLAGS) $(DYNEXP) \
- 		$(POPT_LIBS) $(LIBS) $(LIBTALLOC_LIBS)
-+	@rm -f $@.a
- 
- bin/locktest2 at EXEEXT@: $(BINARY_PREREQS) $(LOCKTEST2_OBJ) @BUILD_POPT@ @LIBTALLOC_TARGET@ @LIBTDB_TARGET@
- 	@echo Linking $@
--	@$(CC) $(FLAGS) -o $@ $(LOCKTEST2_OBJ) $(LDFLAGS) $(DYNEXP) \
-+	@$(AR) -rc $@.a $(LOCKTEST2_OBJ)
-+	@$(CC) $(FLAGS) -o $@ $@.a $(LDFLAGS) $(DYNEXP) \
- 		$(LIBS) $(KRB5LIBS) $(LDAP_LIBS) $(POPT_LIBS) \
- 		$(LIBTALLOC_LIBS) $(LIBTDB_LIBS)
-+	@rm -f $@.a
- 
- bin/ndrdump at EXEEXT@: $(BINARY_PREREQS) $(NDRDUMP_OBJ) @BUILD_POPT@ @LIBTALLOC_TARGET@ @LIBTDB_TARGET@
- 	@echo Linking $@
--	@$(CC) $(FLAGS) -o $@ $(NDRDUMP_OBJ) $(DYNEXP) $(LDFLAGS) $(LIBS) \
-+	@$(AR) -rc $@.a $(NDRDUMP_OBJ)
-+	@$(CC) $(FLAGS) -o $@ $@.a $(DYNEXP) $(LDFLAGS) $(LIBS) \
- 		$(POPT_LIBS) $(LDAP_LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS)
-+	@rm -f $@.a
- 
- bin/debug2html at EXEEXT@: $(BINARY_PREREQS) $(DEBUG2HTML_OBJ) @BUILD_POPT@ @LIBTALLOC_TARGET@
- 	@echo Linking $@
--	@$(CC) $(FLAGS) -o $@ $(DEBUG2HTML_OBJ) $(LDFLAGS) $(DYNEXP) \
-+	@$(AR) -rc $@.a $(DEBUG2HTML_OBJ)
-+	@$(CC) $(FLAGS) -o $@ $@.a $(LDFLAGS) $(DYNEXP) \
- 		$(LIBS) $(LIBTALLOC_LIBS)
-+	@rm -f $@.a
- 
- bin/smbfilter at EXEEXT@: $(BINARY_PREREQS) $(SMBFILTER_OBJ) @BUILD_POPT@ @LIBTALLOC_TARGET@ @LIBTDB_TARGET@
- 	@echo Linking $@
--	@$(CC) $(FLAGS) -o $@ $(SMBFILTER_OBJ) $(LDFLAGS) $(LIBS) \
-+	@$(AR) -rc $@.a $(SMBFILTER_OBJ)
-+	@$(CC) $(FLAGS) -o $@ $@.a $(LDFLAGS) $(LIBS) \
- 		$(KRB5LIBS) $(LDAP_LIBS) $(POPT_LIBS) \
- 		$(LIBTALLOC_LIBS) $(LIBTDB_LIBS)
-+	@rm -f $@.a
- 
- bin/ldbedit: $(BINARY_PREREQS) $(LDBEDIT_OBJ) @BUILD_POPT@ @LIBTALLOC_TARGET@ @LIBTDB_TARGET@ @LIBWBCLIENT_SHARED@
- 	@echo Linking $@
--	@$(CC) $(FLAGS) -o $@ $(LDBEDIT_OBJ) $(DYNEXP) $(LDFLAGS) \
-+	@$(AR) -rc $@.a $(LDBEDIT_OBJ)
-+	@$(CC) $(FLAGS) -o $@ $@.a $(DYNEXP) $(LDFLAGS) \
- 		$(LIBS) $(POPT_LIBS) $(LDAP_LIBS) \
- 		$(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(WINBIND_LIBS)
-+	@rm -f $@.a
- 
- bin/ldbsearch: $(BINARY_PREREQS) $(LDBSEARCH_OBJ) @BUILD_POPT@ @LIBTALLOC_TARGET@ @LIBTDB_TARGET@ @LIBWBCLIENT_SHARED@
- 	@echo Linking $@
--	@$(CC) $(FLAGS) -o $@ $(LDBSEARCH_OBJ) $(DYNEXP) $(LDFLAGS) \
-+	@$(AR) -rc $@.a $(LDBSEARCH_OBJ)
-+	@$(CC) $(FLAGS) -o $@ $@.a $(DYNEXP) $(LDFLAGS) \
- 		$(LIBS) $(POPT_LIBS) $(LDAP_LIBS) \
- 		$(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(WINBIND_LIBS)
-+	@rm -f $@.a
- 
- bin/ldbadd: $(BINARY_PREREQS) $(LDBADD_OBJ) @BUILD_POPT@ @LIBTALLOC_TARGET@ @LIBTDB_TARGET@ @LIBWBCLIENT_SHARED@
- 	@echo Linking $@
--	@$(CC) $(FLAGS) -o $@ $(LDBADD_OBJ) $(DYNEXP) $(LDFLAGS) \
-+	@$(AR) -rc $@.a $(LDBADD_OBJ)
-+	@$(CC) $(FLAGS) -o $@ $@.a $(DYNEXP) $(LDFLAGS) \
- 		$(LIBS) $(POPT_LIBS) $(LDAP_LIBS) \
- 		$(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(WINBIND_LIBS)
-+	@rm -f $@.a
- 
- bin/ldbmodify: $(BINARY_PREREQS) $(LDBMODIFY_OBJ) @BUILD_POPT@ @LIBTALLOC_TARGET@ @LIBTDB_TARGET@ @LIBWBCLIENT_SHARED@
- 	@echo Linking $@
--	@$(CC) $(FLAGS) -o $@ $(LDBMODIFY_OBJ) $(DYNEXP) $(LDFLAGS) \
-+	@$(AR) -rc $@.a $(LDBMODIFY_OBJ)
-+	@$(CC) $(FLAGS) -o $@ $@.a $(DYNEXP) $(LDFLAGS) \
- 		$(LIBS) $(POPT_LIBS) $(LDAP_LIBS) \
- 		$(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(WINBIND_LIBS)
-+	@rm -f $@.a
- 
- bin/ldbdel: $(BINARY_PREREQS) $(LDBDEL_OBJ) @BUILD_POPT@ @LIBTALLOC_TARGET@ @LIBTDB_TARGET@ @LIBWBCLIENT_SHARED@
- 	@echo Linking $@
--	@$(CC) $(FLAGS) -o $@ $(LDBDEL_OBJ) $(DYNEXP) $(LDFLAGS) \
-+	@$(AR) -rc $@.a $(LDBDEL_OBJ)
-+	@$(CC) $(FLAGS) -o $@ $@.a $(DYNEXP) $(LDFLAGS) \
- 		$(LIBS) $(POPT_LIBS) $(LDAP_LIBS) \
- 		$(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(WINBIND_LIBS)
-+	@rm -f $@.a
- 
- bin/ldbrename: $(BINARY_PREREQS) $(LDBRENAME_OBJ) @BUILD_POPT@ @LIBTALLOC_TARGET@ @LIBTDB_TARGET@ @LIBWBCLIENT_SHARED@
- 	@echo Linking $@
--	@$(CC) $(FLAGS) -o $@ $(LDBRENAME_OBJ) $(DYNEXP) $(LDFLAGS) \
-+	@$(AR) -rc $@.a $(LDBRENAME_OBJ)
-+	@$(CC) $(FLAGS) -o $@ $@.a $(DYNEXP) $(LDFLAGS) \
- 		$(LIBS) $(POPT_LIBS) $(LDAP_LIBS) \
- 		$(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(WINBIND_LIBS)
-+	@rm -f $@.a
- 
- 
- #####################################################################
-@@ -2187,10 +2272,12 @@
- 
- bin/vlp at EXEEXT@: $(BINARY_PREREQS) $(VLP_OBJ) @LIBTALLOC_TARGET@ @LIBTDB_TARGET@ @LIBWBCLIENT_SHARED@
- 	@echo "Linking $@"
--	@$(CC) $(FLAGS) -o $@ $(VLP_OBJ) $(LDFLAGS) $(DYNEXP) \
-+	@$(AR) -rc $@.a $(VLP_OBJ)
-+	@$(CC) $(FLAGS) -o $@ $@.a $(LDFLAGS) $(DYNEXP) \
- 		$(TERMLDFLAGS) $(TERMLIBS) $(LIBS) $(POPT_LIBS) \
- 		$(KRB5LIBS) $(LDAP_LIBS) $(NSCD_LIBS) \
- 		$(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(WINBIND_LIBS)
-+	@rm -f $@.a
- 
- @WINBIND_NSS@: $(BINARY_PREREQS) $(WINBIND_NSS_OBJ)
- 	@echo "Linking $@"
-@@ -2477,9 +2564,11 @@
- 
- bin/wbinfo at EXEEXT@: $(BINARY_PREREQS) $(WBINFO_OBJ) @BUILD_POPT@ @LIBTALLOC_TARGET@ @LIBTDB_TARGET@ @LIBWBCLIENT_SHARED@
- 	@echo Linking $@
--	@$(CC) $(FLAGS) -o $@ $(LDFLAGS) $(WBINFO_OBJ) $(DYNEXP) $(LIBS) \
-+	@$(AR) -rc $@.a $(WBINFO_OBJ)
-+	@$(CC) $(FLAGS) -o $@ $(LDFLAGS) $@.a $(DYNEXP) $(LIBS) \
- 		$(LDAP_LIBS) $(POPT_LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) \
- 		$(WINBIND_LIBS)
-+	@rm -f $@.a
- 
- bin/ntlm_auth at EXEEXT@: $(BINARY_PREREQS) $(NTLM_AUTH_OBJ) $(PARAM_OBJ) \
- 	$(LIB_NONSMBD_OBJ) @BUILD_POPT@ @LIBTALLOC_TARGET@ @LIBTDB_TARGET@ @LIBWBCLIENT_SHARED@
-@@ -2497,23 +2586,31 @@
- 
- bin/tdbbackup at EXEEXT@: $(BINARY_PREREQS) $(TDBBACKUP_OBJ) @LIBTALLOC_TARGET@ @LIBTDB_TARGET@
- 	@echo Linking $@
--	@$(CC) $(FLAGS) -o $@ $(LDFLAGS) $(TDBBACKUP_OBJ) $(DYNEXP) \
-+	@$(AR) -rc $@.a $(TDBBACKUP_OBJ)
-+	@$(CC) $(FLAGS) -o $@ $(LDFLAGS) $@.a $(DYNEXP) \
- 		$(LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS)
-+	@rm -f $@.a
- 
- bin/tdbtool at EXEEXT@: $(BINARY_PREREQS) $(TDBTOOL_OBJ) @LIBTALLOC_TARGET@ @LIBTDB_TARGET@
- 	@echo Linking $@
--	@$(CC) $(FLAGS) -o $@ $(LDFLAGS) $(TDBTOOL_OBJ) $(DYNEXP) \
-+	@$(AR) -rc $@.a $(TDBTOOL_OBJ)
-+	@$(CC) $(FLAGS) -o $@ $(LDFLAGS) $@.a $(DYNEXP) \
- 		$(LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS)
-+	@rm -f $@.a
- 
- bin/tdbdump at EXEEXT@: $(BINARY_PREREQS) $(TDBDUMP_OBJ) @LIBTALLOC_TARGET@ @LIBTDB_TARGET@
- 	@echo Linking $@
--	@$(CC) $(FLAGS) -o $@ $(LDFLAGS) $(TDBDUMP_OBJ) $(DYNEXP) \
-+	@$(AR) -rc $@.a $(TDBDUMP_OBJ)
-+	@$(CC) $(FLAGS) -o $@ $(LDFLAGS) $@.a $(DYNEXP) \
- 		$(LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS)
-+	@rm -f $@.a
- 
- bin/tdbtorture at EXEEXT@: $(BINARY_PREREQS) $(TDBTORTURE_OBJ) @LIBTALLOC_TARGET@ @LIBTDB_TARGET@
- 	@echo Linking $@
--	@$(CC) $(FLAGS) -o $@ $(LDFLAGS) $(TDBTORTURE_OBJ) $(DYNEXP) \
-+	@$(AR) -rc $@.a $(TDBTORTURE_OBJ)
-+	@$(CC) $(FLAGS) -o $@ $(LDFLAGS) $@.a $(DYNEXP) \
- 		$(LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS)
-+	@rm -f $@.a
- 
- bin/t_strcmp at EXEEXT@: $(BINARY_PREREQS) @LIBTALLOC_TARGET@ bin/libbigballofmud. at SHLIBEXT@ torture/t_strcmp.o
- 	$(CC) $(FLAGS) -o $@ $(DYNEXP) $(LIBS) $(LIBTALLOC_LIBS) \

Modified: trunk/samba/debian/patches/smbclient-pager.patch
===================================================================
--- trunk/samba/debian/patches/smbclient-pager.patch	2010-09-06 17:45:31 UTC (rev 3571)
+++ trunk/samba/debian/patches/smbclient-pager.patch	2010-09-06 20:23:16 UTC (rev 3572)
@@ -3,11 +3,11 @@
 Bug-Debian: http://bugs.debian.org/135603
 Forwarded: not-needed
 
-Index: b/source3/include/local.h
+Index: experimental/source3/include/local.h
 ===================================================================
---- a/source3/include/local.h	2009-11-08 15:54:27.000000000 +0100
-+++ b/source3/include/local.h	2009-11-08 15:55:34.000000000 +0100
-@@ -109,7 +109,7 @@
+--- experimental.orig/source3/include/local.h
++++ experimental/source3/include/local.h
+@@ -127,7 +127,7 @@
  /* the default pager to use for the client "more" command. Users can
     override this with the PAGER environment variable */
  #ifndef PAGER

Modified: trunk/samba/debian/patches/smbtar-bashism.patch
===================================================================
--- trunk/samba/debian/patches/smbtar-bashism.patch	2010-09-06 17:45:31 UTC (rev 3571)
+++ trunk/samba/debian/patches/smbtar-bashism.patch	2010-09-06 20:23:16 UTC (rev 3572)
@@ -3,10 +3,10 @@
 Bug-Debian: http://bugs.debian.org/486056
 Forwarded: no
 
-Index: b/source3/script/smbtar
+Index: experimental/source3/script/smbtar
 ===================================================================
---- a/source3/script/smbtar	2009-11-08 15:54:27.000000000 +0100
-+++ b/source3/script/smbtar	2009-11-08 15:55:36.000000000 +0100
+--- experimental.orig/source3/script/smbtar
++++ experimental/source3/script/smbtar
 @@ -151,7 +151,7 @@
  if [ -z "$verbose" ]; then
        echo "server    is $server"

Modified: trunk/samba/debian/patches/undefined-symbols.patch
===================================================================
--- trunk/samba/debian/patches/undefined-symbols.patch	2010-09-06 17:45:31 UTC (rev 3571)
+++ trunk/samba/debian/patches/undefined-symbols.patch	2010-09-06 20:23:16 UTC (rev 3572)
@@ -9,16 +9,16 @@
 Bug-Debian: http://bugs.debian.org/281181
 Forwarded: no
 
-Index: b/source3/Makefile.in
+Index: experimental/source3/Makefile.in
 ===================================================================
---- a/source3/Makefile.in	2009-11-08 15:54:27.000000000 +0100
-+++ b/source3/Makefile.in	2009-11-08 15:55:34.000000000 +0100
-@@ -2128,7 +2128,7 @@
+--- experimental.orig/source3/Makefile.in
++++ experimental/source3/Makefile.in
+@@ -2281,7 +2281,7 @@
  
- $(LIBSMBCLIENT_SHARED_TARGET_SONAME): $(BINARY_PREREQS) $(LIBSMBCLIENT_OBJ) $(LIBSMBCLIENT_SYMS) @LIBTALLOC_TARGET@ @LIBTDB_TARGET@ @LIBWBCLIENT_TARGET@
+ $(LIBSMBCLIENT_SHARED_TARGET_SONAME): $(BINARY_PREREQS) $(LIBSMBCLIENT_OBJ) $(LIBSMBCLIENT_THREAD_OBJ) $(LIBSMBCLIENT_SYMS) $(LIBTALLOC) $(LIBTDB) $(LIBWBCLIENT)
  	@echo Linking shared library $@
--	@$(SHLD_DSO) $(LIBSMBCLIENT_OBJ) \
-+	@$(SHLD_DSO) -Wl,-z,defs $(LIBSMBCLIENT_OBJ) \
+-	@$(SHLD_DSO) $(LIBSMBCLIENT_OBJ) $(LIBSMBCLIENT_THREAD_OBJ) \
++	@$(SHLD_DSO) -Wl,-z,defs $(LIBSMBCLIENT_OBJ) $(LIBSMBCLIENT_THREAD_OBJ) \
  		$(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(LIBWBCLIENT_LIBS) $(LIBS) \
- 		$(KRB5LIBS) $(LDAP_LIBS) $(NSCD_LIBS) $(ZLIB_LIBS) \
+ 		$(KRB5LIBS) $(LDAP_LIBS) $(NSCD_LIBS) $(ZLIB_LIBS) $(PTHREAD_LDFLAGS) \
  		@SONAMEFLAG@`basename $@`

Modified: trunk/samba/debian/patches/usershare.patch
===================================================================
--- trunk/samba/debian/patches/usershare.patch	2010-09-06 17:45:31 UTC (rev 3571)
+++ trunk/samba/debian/patches/usershare.patch	2010-09-06 20:23:16 UTC (rev 3572)
@@ -7,11 +7,11 @@
 Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/samba/+bug/128548
 Forwarded: not-needed
 
-Index: b/docs/manpages/net.8
+Index: experimental/docs/manpages/net.8
 ===================================================================
---- a/docs/manpages/net.8	2009-11-08 15:54:27.000000000 +0100
-+++ b/docs/manpages/net.8	2009-11-08 15:55:35.000000000 +0100
-@@ -917,9 +917,9 @@
+--- experimental.orig/docs/manpages/net.8
++++ experimental/docs/manpages/net.8
+@@ -916,9 +916,9 @@
  Store a secret for the specified domain, used primarily for domains that use idmap_ldap as a backend\&. In this case the secret is used as the password for the user DN used to bind to the ldap server\&.
  .SS "USERSHARE"
  .PP
@@ -23,11 +23,11 @@
  .PP
  The usershare commands are:
  .RS 4
-Index: b/source3/param/loadparm.c
+Index: experimental/source3/param/loadparm.c
 ===================================================================
---- a/source3/param/loadparm.c	2009-11-08 15:54:27.000000000 +0100
-+++ b/source3/param/loadparm.c	2009-11-08 15:55:35.000000000 +0100
-@@ -5098,7 +5098,7 @@
+--- experimental.orig/source3/param/loadparm.c
++++ experimental/source3/param/loadparm.c
+@@ -5189,7 +5189,7 @@
  	string_set(&Globals.szUsersharePath, s);
  	SAFE_FREE(s);
  	string_set(&Globals.szUsershareTemplateShare, "");

Modified: trunk/samba/debian/rules
===================================================================
--- trunk/samba/debian/rules	2010-09-06 17:45:31 UTC (rev 3571)
+++ trunk/samba/debian/rules	2010-09-06 20:23:16 UTC (rev 3572)
@@ -47,7 +47,6 @@
 		--with-automount \
 		--with-ldap \
 		--with-ads \
-		--without-smbmount \
 		--with-dnsupdate \
 		--without-libtdb \
 		--without-libnetapi \
@@ -58,9 +57,10 @@
 		--with-lockdir=/var/run/samba \
 		--with-statedir=/var/lib/samba \
 		--with-cachedir=/var/cache/samba \
+		--with-codepagedir=/usr/share/samba \
 		--enable-external-libtalloc \
 		--without-libtalloc \
-		--disable-avahi \
+		--disable-avahi
 
 ifeq ($(DEB_HOST_ARCH_OS),linux)
   conf_args += \

Modified: trunk/samba/debian/samba-common-bin.postinst
===================================================================
--- trunk/samba/debian/samba-common-bin.postinst	2010-09-06 17:45:31 UTC (rev 3571)
+++ trunk/samba/debian/samba-common-bin.postinst	2010-09-06 20:23:16 UTC (rev 3572)
@@ -4,11 +4,14 @@
 
 set -e
 
-update-alternatives --install /usr/bin/nmblookup nmblookup /usr/bin/nmblookup.samba3 0 \
-	--slave /usr/share/man/man1/nmblookup.1.gz nmblookup.1.gz /usr/share/man/man1/nmblookup.samba3.1.gz
-update-alternatives --install /usr/bin/net net /usr/bin/net.samba3 10 \
-	--slave /usr/share/man/man8/net.8.gz net.8.gz /usr/share/man/man8/net.samba3.8.gz
-update-alternatives --install /usr/bin/testparm testparm /usr/bin/testparm.samba3 10 \
-	--slave /usr/share/man/man1/testparm.1.gz testparm.1.gz /usr/share/man/man1/testparm.samba3.1.gz
+if [ "$1" = "configure" ]
+then
+	update-alternatives --install /usr/bin/nmblookup nmblookup /usr/bin/nmblookup.samba3 0 \
+		--slave /usr/share/man/man1/nmblookup.1.gz nmblookup.1.gz /usr/share/man/man1/nmblookup.samba3.1.gz
+	update-alternatives --install /usr/bin/net net /usr/bin/net.samba3 10 \
+		--slave /usr/share/man/man8/net.8.gz net.8.gz /usr/share/man/man8/net.samba3.8.gz
+	update-alternatives --install /usr/bin/testparm testparm /usr/bin/testparm.samba3 10 \
+		--slave /usr/share/man/man1/testparm.1.gz testparm.1.gz /usr/share/man/man1/testparm.samba3.1.gz
+fi
 
 #DEBHELPER#

Modified: trunk/samba/debian/samba-common-bin.prerm
===================================================================
--- trunk/samba/debian/samba-common-bin.prerm	2010-09-06 17:45:31 UTC (rev 3571)
+++ trunk/samba/debian/samba-common-bin.prerm	2010-09-06 20:23:16 UTC (rev 3572)
@@ -1,13 +0,0 @@
-#!/bin/sh
-
-set -e 
-
-if [ "x$1" != xupgrade ]; then
-	update-alternatives --remove nmblookup /usr/bin/nmblookup.samba3
-	update-alternatives --remove net /usr/bin/net.samba3
-	update-alternatives --remove testparm /usr/bin/testparm.samba3
-fi
-
-#DEBHELPER#
-
-exit 0

Added: trunk/samba/debian/samba-common.prerm
===================================================================
--- trunk/samba/debian/samba-common.prerm	                        (rev 0)
+++ trunk/samba/debian/samba-common.prerm	2010-09-06 20:23:16 UTC (rev 3572)
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+set -e 
+
+case "$1" in
+    remove|upgrade|deconfigure)
+	update-alternatives --remove nmblookup /usr/bin/nmblookup.samba3
+	update-alternatives --remove net /usr/bin/net.samba3
+	update-alternatives --remove testparm /usr/bin/testparm.samba3
+		;;
+esac
+
+#DEBHELPER#
+
+exit 0

Modified: trunk/samba/debian/samba-doc.doc-base.samba-using
===================================================================
--- trunk/samba/debian/samba-doc.doc-base.samba-using	2010-09-06 17:45:31 UTC (rev 3571)
+++ trunk/samba/debian/samba-doc.doc-base.samba-using	2010-09-06 20:23:16 UTC (rev 3572)
@@ -1,15 +0,0 @@
-Document: samba-using
-Title: Using Samba, 2nd Edition
-Author: Jay Ts, Robert Eckstein, and David Collier-Brown
-Abstract: This is a book about Samba, a software suite that networks
- Windows, Unix, and other operating systems using Windows' native
- networking protocol. Samba allows Unix servers to offer Windows
- networking services by matching the filesystem and networking models
- of Unix to those of Windows. Samba acts as a bridge between the two
- systems, connecting the corresponding parts of their architectures and
- providing a translation wherever necessary.
-Section: Network/File Transfer
-
-Format: HTML
-Index: /usr/share/doc/samba-doc/htmldocs/using_samba/toc.html
-Files: /usr/share/doc/samba-doc/htmldocs/using_samba/*

Modified: trunk/samba/debian/samba.postinst
===================================================================
--- trunk/samba/debian/samba.postinst	2010-09-06 17:45:31 UTC (rev 3571)
+++ trunk/samba/debian/samba.postinst	2010-09-06 20:23:16 UTC (rev 3572)
@@ -4,6 +4,23 @@
 #
 #
 
+case "$1" in
+	configure)
+		update-alternatives --install /usr/bin/smbstatus smbstatus /usr/bin/smbstatus.samba3 10 \
+			--slave /usr/share/man/man1/smbstatus.1.gz smbstatus.1.gz /usr/share/man/man1/smbstatus.samba3.1.gz
+		# continue below
+	;;
+
+	abort-upgrade|abort-remove|abort-deconfigure)
+		exit 0
+	;;
+
+	*)
+		echo "postinst called with unknown argument \`$1'" >&2
+		exit 0
+	;;
+esac
+
 # Handle debconf
 . /usr/share/debconf/confmodule
 
@@ -122,9 +139,6 @@
 	install -d -m 1770 -g sambashare /var/lib/samba/usershares
 fi
 
-update-alternatives --install /usr/bin/smbstatus smbstatus /usr/bin/smbstatus.samba3 10 \
-	--slave /usr/share/man/man1/smbstatus.1.gz smbstatus.1.gz /usr/share/man/man1/smbstatus.samba3.1.gz
-
 #DEBHELPER#
 
 exit 0

Modified: trunk/samba/debian/samba.prerm
===================================================================
--- trunk/samba/debian/samba.prerm	2010-09-06 17:45:31 UTC (rev 3571)
+++ trunk/samba/debian/samba.prerm	2010-09-06 20:23:16 UTC (rev 3572)
@@ -2,9 +2,11 @@
 
 set -e 
 
-if [ "x$1" != xupgrade ]; then
+case "$1" in
+    remove|upgrade|deconfigure)
 	update-alternatives --remove smbstatus /usr/bin/smbstatus.samba3
-fi
+	;;
+esac
 
 #DEBHELPER#
 

Modified: trunk/samba/debian/swat.links
===================================================================
--- trunk/samba/debian/swat.links	2010-09-06 17:45:31 UTC (rev 3571)
+++ trunk/samba/debian/swat.links	2010-09-06 20:23:16 UTC (rev 3572)
@@ -2,4 +2,3 @@
 usr/share/doc/samba-doc/htmldocs/Samba3-ByExample  usr/share/samba/swat/help/Samba3-ByExample
 usr/share/doc/samba-doc/htmldocs/Samba3-Developers-Guide  usr/share/samba/swat/help/Samba3-Developers-Guide
 usr/share/doc/samba-doc/htmldocs/Samba3-HOWTO  usr/share/samba/swat/help/Samba3-HOWTO
-usr/share/doc/samba-doc/htmldocs/using_samba  usr/share/samba/swat/help/using_samba





More information about the Pkg-samba-maint mailing list