[Pkg-samba-maint] r3264 - branches/samba/experimental/debian/patches

bubulle at alioth.debian.org bubulle at alioth.debian.org
Sun Jan 31 10:49:12 UTC 2010


Author: bubulle
Date: 2010-01-31 10:49:09 +0000 (Sun, 31 Jan 2010)
New Revision: 3264

Modified:
   branches/samba/experimental/debian/patches/autoconf.patch
Log:
Refresh for 3.5.0rc2


Modified: branches/samba/experimental/debian/patches/autoconf.patch
===================================================================
--- branches/samba/experimental/debian/patches/autoconf.patch	2010-01-31 10:47:08 UTC (rev 3263)
+++ branches/samba/experimental/debian/patches/autoconf.patch	2010-01-31 10:49:09 UTC (rev 3264)
@@ -8400,10 +8400,10 @@
 -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
@@ -8714,14 +8714,7 @@
 -sed 's/^/| /' conftest.$ac_ext >&5
  
 -	ac_cv_type_int16_t=yes
--fi
- 
--rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
--else
--  $as_echo "$as_me: failed program was:" >&5
--sed 's/^/| /' conftest.$ac_ext >&5
- 
- 
++
 +# 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"
@@ -8729,26 +8722,42 @@
 +# by default.
 +if test "x$debug" = "xyes" ; then
 +	CFLAGS="${CFLAGS} -g"
- fi
--
--rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++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
++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
  
-+# Check whether --enable-socket-wrapper was given.
-+if test "${enable_socket_wrapper+set}" = set; then :
-+  enableval=$enable_socket_wrapper;
- fi
+-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; }
@@ -8828,30 +8837,27 @@
 -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
-+DEFAULT_TEST_OPTIONS=
-+HAVE_SOCKET_WRAPPER=no
-+
-+if eval "test x$developer = xyes"; then
-+	enable_socket_wrapper=yes
++	# this is only used for samba3
++	SOCKET_WRAPPER_OBJS="../lib/socket_wrapper/socket_wrapper.o"
  fi
  
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+if eval "test x$enable_socket_wrapper = xyes"; then
  
-+$as_echo "#define SOCKET_WRAPPER 1" >>confdefs.h
  
 -fi
-+	DEFAULT_TEST_OPTIONS=--socket-wrapper
-+	HAVE_SOCKET_WRAPPER=yes
  
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-+	# this is only used for samba3
-+	SOCKET_WRAPPER_OBJS="../lib/socket_wrapper/socket_wrapper.o"
++
++# 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; }
@@ -8863,8 +8869,13 @@
 -#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
@@ -8945,26 +8956,25 @@
 -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
-+# Check whether --enable-nss-wrapper was given.
-+if test "${enable_nss_wrapper+set}" = set; then :
-+  enableval=$enable_nss_wrapper;
++	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
-+HAVE_NSS_WRAPPER=no
  
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-+if eval "test x$developer = xyes"; then
-+	enable_nss_wrapper=yes
- fi
+-fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_int32_t" >&5
 -$as_echo "$ac_cv_type_int32_t" >&6; }
 -if test "x$ac_cv_type_int32_t" = x""yes; then
@@ -8974,10 +8984,8 @@
 -cat >>confdefs.h <<_ACEOF
 -#define int32_t int
 -_ACEOF
-+if eval "test x$enable_nss_wrapper = xyes"; then
  
 -fi
-+$as_echo "#define NSS_WRAPPER 1" >>confdefs.h
  
 -{ $as_echo "$as_me:$LINENO: checking for uint32_t" >&5
 -$as_echo_n "checking for uint32_t... " >&6; }
@@ -9057,11 +9065,20 @@
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+	HAVE_NSS_WRAPPER=yes
++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
-+	# 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
@@ -9090,8 +9107,17 @@
 -{ $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.  */
@@ -9132,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 ()
@@ -9142,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
@@ -9162,32 +9208,37 @@
 -	 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
-+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_int32_t=yes
++  samba_cv_HAVE_Wdeclaration_after_statement=no
++fi
++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
++  conftest.$ac_objext conftest.beam conftest.$ac_ext
  fi
  
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
++	CFLAGS="$old_CFLAGS";
++	old_CFLAGS="";
++	export CFLAGS;
++	CPPFLAGS="$old_CPPFLAGS";
++	old_CPPFLAGS="";
++	export CPPFLAGS;
++	LDFLAGS="$old_LDFLAGS";
++	old_LDFLAGS="";
++	export LDFLAGS;
  
  
--fi
+ 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
@@ -9196,26 +9247,37 @@
 -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
-+# 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
+-  $as_echo_n "(cached) " >&6
++	old_CFLAGS="$CFLAGS";
++	CFLAGS="$CFLAGS -Werror-implicit-function-declaration";
++	export CFLAGS;
++	old_CPPFLAGS="$CPPFLAGS";
++	CPPFLAGS="$CPPFLAGS";
++	export CPPFLAGS;
++	old_LDFLAGS="$LDFLAGS";
++	LDFLAGS="$LDFLAGS";
++	export LDFLAGS;
++	if test "$cross_compiling" = yes; then :
++  samba_cv_HAVE_Werror_implicit_function_declaration=cross
  else
 -  ac_cv_type_uint32_t=no
 -cat >conftest.$ac_ext <<_ACEOF
@@ -9223,7 +9285,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.  */
 -$ac_includes_default
 -int
 -main ()
@@ -9233,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
@@ -9290,23 +9358,12 @@
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
- 
+-
 -	ac_cv_type_uint32_t=yes
 -fi
- 
+-
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-+	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
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
@@ -13193,7 +13250,7 @@
 -
 -default_static_modules="pdb_smbpasswd pdb_tdbsam pdb_wbc_sam rpc_lsarpc rpc_samr rpc_winreg rpc_initshutdown rpc_dssetup rpc_wkssvc rpc_svcctl rpc_ntsvcs rpc_netlogon rpc_netdfs rpc_srvsvc rpc_spoolss rpc_eventlog auth_sam auth_unix auth_winbind auth_wbc auth_server auth_domain auth_builtin auth_netlogond vfs_default nss_info_template"
 -
--default_shared_modules="vfs_recycle vfs_audit vfs_extd_audit vfs_full_audit vfs_netatalk vfs_fake_perms vfs_default_quota vfs_readonly vfs_cap vfs_expand_msdfs vfs_shadow_copy vfs_shadow_copy2 charset_CP850 charset_CP437 auth_script vfs_readahead vfs_xattr_tdb vfs_streams_xattr vfs_streams_depot vfs_acl_xattr vfs_acl_tdb vfs_smb_traffic_analyzer vfs_preopen vfs_catia"
+-default_shared_modules="vfs_recycle vfs_audit vfs_extd_audit vfs_full_audit vfs_netatalk vfs_fake_perms vfs_default_quota vfs_readonly vfs_cap vfs_expand_msdfs vfs_shadow_copy vfs_shadow_copy2 charset_CP850 charset_CP437 auth_script vfs_readahead vfs_xattr_tdb vfs_streams_xattr vfs_streams_depot vfs_acl_xattr vfs_acl_tdb vfs_smb_traffic_analyzer vfs_preopen vfs_catia vfs_scannedonly"
 -
 -if test "x$developer" = xyes; then
 -   default_static_modules="$default_static_modules rpc_rpcecho pdb_ads"
@@ -34965,7 +35022,9 @@
 -  $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
@@ -34985,9 +35044,12 @@
 -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
++  samba_cv_HAVE_Werror_implicit_function_declaration=no
+ fi
 -rm -f conftest.val
--fi
++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
++  conftest.$ac_objext conftest.beam conftest.$ac_ext
+ fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
 -$as_echo "$ac_cv_sizeof_short" >&6; }
 -
@@ -35063,7 +35125,7 @@
 -  }
 -  return !cs[0] && !zero.x;
 -#endif
--
+ 
 -  ;
 -  return 0;
 -}
@@ -35090,60 +35152,49 @@
 -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.  */
++	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
-+	    int main(void)
-+	    {
-+	    	return 0;
-+	    }
-+_ACEOF
-+if ac_fn_c_try_run "$LINENO"; then :
-+  samba_cv_HAVE_Wdeclaration_after_statement=yes
-+else
-+  samba_cv_HAVE_Wdeclaration_after_statement=no
- fi
--
+-fi
+ 
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-+  conftest.$ac_objext conftest.beam conftest.$ac_ext
  fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_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
-+	CFLAGS="$old_CFLAGS";
-+	old_CFLAGS="";
-+	export CFLAGS;
-+	CPPFLAGS="$old_CPPFLAGS";
-+	old_CPPFLAGS="";
-+	export CPPFLAGS;
-+	LDFLAGS="$old_LDFLAGS";
-+	old_LDFLAGS="";
-+	export LDFLAGS;
-+
++	# 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:${as_lineno-$LINENO}: result: $samba_cv_HAVE_Wdeclaration_after_statement" >&5
-+$as_echo "$samba_cv_HAVE_Wdeclaration_after_statement" >&6; }
  
 -{ $as_echo "$as_me:$LINENO: checking for inline" >&5
 -$as_echo_n "checking for inline... " >&6; }
 -if test "${ac_cv_c_inline+set}" = set; then
-+	if test x"$samba_cv_HAVE_Wdeclaration_after_statement" = x"yes"; then
-+	    DEVELOPER_CFLAGS="${DEVELOPER_CFLAGS} -Wdeclaration-after-statement"
-+	fi
-+
-+	#-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
+-  $as_echo_n "(cached) " >&6
+-else
 -  ac_cv_c_inline=no
 -for ac_kw in inline __inline__ __inline; do
 -  cat >conftest.$ac_ext <<_ACEOF
@@ -35151,33 +35202,14 @@
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+
-+
-+	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
-+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
+-/* end confdefs.h.  */
 -#ifndef __cplusplus
 -typedef int foo_t;
 -static $ac_kw foo_t static_foo () {return 0; }
 -$ac_kw foo_t foo () {return 0; }
 -#endif
- 
-+	    int main(void)
-+	    {
-+	    	return 0;
-+	    }
- _ACEOF
+-
+-_ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -35197,70 +35229,47 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_cv_c_inline=$ac_kw
-+if ac_fn_c_try_run "$LINENO"; then :
-+  samba_cv_HAVE_Werror_implicit_function_declaration=yes
- else
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+  samba_cv_HAVE_Werror_implicit_function_declaration=no
-+fi
-+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-+  conftest.$ac_objext conftest.beam conftest.$ac_ext
-+fi
-+
-+	CFLAGS="$old_CFLAGS";
-+	old_CFLAGS="";
-+	export CFLAGS;
-+	CPPFLAGS="$old_CPPFLAGS";
-+	old_CPPFLAGS="";
-+	export CPPFLAGS;
-+	LDFLAGS="$old_LDFLAGS";
-+	old_LDFLAGS="";
-+	export LDFLAGS;
++#################################################
++# 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 "$as_me:${as_lineno-$LINENO}: result: $samba_cv_HAVE_Werror_implicit_function_declaration" >&5
-+$as_echo "$samba_cv_HAVE_Werror_implicit_function_declaration" >&6; }
-+       if test x"$samba_cv_HAVE_Werror_implicit_function_declaration" = x"yes"; then
-+	    DEVELOPER_CFLAGS="${DEVELOPER_CFLAGS} -Werror-implicit-function-declaration"
-+       fi
+-fi
++$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
-+	# 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
++    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; }
  
-+       if test x"$picky_developer" = x"yes"; then
-+	    DEVELOPER_CFLAGS="$DEVELOPER_CFLAGS -Werror"
-+       fi
  fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
 -$as_echo "$ac_cv_c_inline" >&6; }
  
-+#################################################
-+# 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; }
  
 -case $ac_cv_c_inline in
 -  inline | yes) ;;
-+$as_echo "#define WITH_PROFILE 1" >>confdefs.h
-+
-+    samba_cv_WITH_PROFILE=yes
-+    ;;
-   *)
+-  *)
 -    case $ac_cv_c_inline in
 -      no) ac_val=;;
 -      *) ac_val=$ac_cv_c_inline;;
@@ -35270,25 +35279,14 @@
 -#define inline $ac_val
 -#endif
 -_ACEOF
-+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-+$as_echo "no" >&6; }
-+    samba_cv_WITH_PROFILE=no
-     ;;
+-    ;;
 -esac
-+  esac
-+else
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-+$as_echo "no" >&6; }
-+
-+fi
++merged_build_possible=yes
  
  
 - { $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
-+merged_build_possible=yes
-+
-+
 +for ac_prog in gawk mawk nawk awk
 +do
 +  # Extract the first word of "$ac_prog", so it can be a program name with args.
@@ -36492,22 +36490,7 @@
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+
-+
-+	old_CFLAGS="$CFLAGS";
-+	CFLAGS="$CFLAGS -Werror";
-+	export CFLAGS;
-+	old_CPPFLAGS="$CPPFLAGS";
-+	CPPFLAGS="$CPPFLAGS";
-+	export CPPFLAGS;
-+	old_LDFLAGS="$LDFLAGS";
-+	LDFLAGS="$LDFLAGS";
-+	export LDFLAGS;
-+	if test "$cross_compiling" = yes; then :
-+  samba_cv_HAVE_Werror=cross
-+else
-+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
+-/* end confdefs.h.  */
 -$ac_includes_default
 -int
 -main ()
@@ -36517,12 +36500,7 @@
 -  ;
 -  return 0;
 -}
-+
-+  int main(void)
-+  {
-+  	return 0;
-+  }
- _ACEOF
+-_ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -36542,55 +36520,16 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  :
-+if ac_fn_c_try_run "$LINENO"; then :
-+  samba_cv_HAVE_Werror=yes
- else
--  $as_echo "$as_me: failed program was:" >&5
--sed 's/^/| /' conftest.$ac_ext >&5
--
--	ac_cv_type_size_t=yes
-+  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
- 
--rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
-+	CFLAGS="$old_CFLAGS";
-+	old_CFLAGS="";
-+	export CFLAGS;
-+	CPPFLAGS="$old_CPPFLAGS";
-+	old_CPPFLAGS="";
-+	export CPPFLAGS;
-+	LDFLAGS="$old_LDFLAGS";
-+	old_LDFLAGS="";
-+	export LDFLAGS;
  
- fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $samba_cv_HAVE_Werror" >&5
-+$as_echo "$samba_cv_HAVE_Werror" >&6; }
-+if test x"$samba_cv_HAVE_Werror" = x"yes"; then
-+   Werror_FLAGS="-Werror"
-+else
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that the C compiler understands -w2" >&5
-+$as_echo_n "checking that the C compiler understands -w2... " >&6; }
-+if test "${samba_cv_HAVE_w2+set}" = set; then :
-+  $as_echo_n "(cached) " >&6
-+else
+-	ac_cv_type_size_t=yes
+-fi
  
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
--fi
--{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
--$as_echo "$ac_cv_type_size_t" >&6; }
--if test "x$ac_cv_type_size_t" = x""yes; then
--  :
-+
 +	old_CFLAGS="$CFLAGS";
-+	CFLAGS="$CFLAGS -w2";
++	CFLAGS="$CFLAGS -Werror";
 +	export CFLAGS;
 +	old_CPPFLAGS="$CPPFLAGS";
 +	CPPFLAGS="$CPPFLAGS";
@@ -36599,31 +36538,38 @@
 +	LDFLAGS="$LDFLAGS";
 +	export LDFLAGS;
 +	if test "$cross_compiling" = yes; then :
-+  samba_cv_HAVE_w2=cross
++  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.  */
  
--cat >>confdefs.h <<_ACEOF
--#define size_t unsigned int
 +  int main(void)
 +  {
 +  	return 0;
 +  }
- _ACEOF
--
++_ACEOF
 +if ac_fn_c_try_run "$LINENO"; then :
-+  samba_cv_HAVE_w2=yes
++  samba_cv_HAVE_Werror=yes
 +else
-+  samba_cv_HAVE_w2=no
-+fi
++  samba_cv_HAVE_Werror=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_size_t" >&5
+-$as_echo "$ac_cv_type_size_t" >&6; }
+-if test "x$ac_cv_type_size_t" = x""yes; then
+-  :
+-else
  
--{ $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
+-cat >>confdefs.h <<_ACEOF
+-#define size_t unsigned int
+-_ACEOF
 +	CFLAGS="$old_CFLAGS";
 +	old_CFLAGS="";
 +	export CFLAGS;
@@ -36633,17 +36579,17 @@
 +	LDFLAGS="$old_LDFLAGS";
 +	old_LDFLAGS="";
 +	export LDFLAGS;
-+
-+fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $samba_cv_HAVE_w2" >&5
-+$as_echo "$samba_cv_HAVE_w2" >&6; }
-+if test x"$samba_cv_HAVE_w2" = x"yes"; then
-+   Werror_FLAGS="-w2"
-+else
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that the C compiler understands -errwarn" >&5
-+$as_echo_n "checking that the C compiler understands -errwarn... " >&6; }
-+if test "${samba_cv_HAVE_errwarn+set}" = set; then :
-   $as_echo_n "(cached) " >&6
+ 
+ fi
+-
+-{ $as_echo "$as_me:$LINENO: checking for pid_t" >&5
+-$as_echo_n "checking for pid_t... " >&6; }
+-if test "${ac_cv_type_pid_t+set}" = set; then
+-  $as_echo_n "(cached) " >&6
++{ $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
@@ -36685,22 +36631,7 @@
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+
-+
-+	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.  */
+-/* end confdefs.h.  */
 -$ac_includes_default
 -int
 -main ()
@@ -36710,12 +36641,7 @@
 -  ;
 -  return 0;
 -}
-+
-+   int main(void)
-+   {
-+	return 0;
-+   }
- _ACEOF
+-_ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -36735,67 +36661,80 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  :
-+if ac_fn_c_try_run "$LINENO"; then :
-+  samba_cv_HAVE_errwarn=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
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
+ 
 -	ac_cv_type_pid_t=yes
-+  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
+-fi
  
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
--else
++	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
 -
-+	CFLAGS="$old_CFLAGS";
-+	old_CFLAGS="";
-+	export CFLAGS;
-+	CPPFLAGS="$old_CPPFLAGS";
-+	old_CPPFLAGS="";
-+	export CPPFLAGS;
-+	LDFLAGS="$old_LDFLAGS";
-+	old_LDFLAGS="";
-+	export LDFLAGS;
++  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
++  samba_cv_HAVE_w2=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"
++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
 -  :
 -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
 -
- fi
-+fi
-+
-+############################################
-+# check if the compiler can handle negative enum values
-+# and don't truncate the values to INT_MAX
-+# a runtime test is needed here
- 
 -{ $as_echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
 -$as_echo_n "checking for struct stat.st_rdev... " >&6; }
 -if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
-+{ $as_echo "$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
++{ $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.  */
@@ -36833,7 +36772,11 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_cv_member_struct_stat_st_rdev=yes
--else
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that the C compiler understands -errwarn" >&5
++$as_echo_n "checking that the C compiler understands -errwarn... " >&6; }
++if test "${samba_cv_HAVE_errwarn+set}" = set; then :
++  $as_echo_n "(cached) " >&6
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
  
@@ -36842,7 +36785,21 @@
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
++
++	old_CFLAGS="$CFLAGS";
++	CFLAGS="$CFLAGS -errwarn=%all";
++	export CFLAGS;
++	old_CPPFLAGS="$CPPFLAGS";
++	CPPFLAGS="$CPPFLAGS";
++	export CPPFLAGS;
++	old_LDFLAGS="$LDFLAGS";
++	LDFLAGS="$LDFLAGS";
++	export LDFLAGS;
++	if test "$cross_compiling" = yes; then :
++  samba_cv_HAVE_errwarn=cross
++else
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
 -$ac_includes_default
 -int
 -main ()
@@ -36853,7 +36810,12 @@
 -  ;
 -  return 0;
 -}
--_ACEOF
++
++   int main(void)
++   {
++	return 0;
++   }
+ _ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -36873,37 +36835,73 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_cv_member_struct_stat_st_rdev=yes
-+    if test "$cross_compiling" = yes; then :
-+  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-+as_fn_error "cannot run test program while cross compiling
-+See \`config.log' for more details." "$LINENO" 5; }
++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
--
++  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
+ fi
 -
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
--fi
-+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h.  */
- 
++{ $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
--fi
+ 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;
- 
--cat >>confdefs.h <<_ACEOF
--#define HAVE_STRUCT_STAT_ST_RDEV 1
--_ACEOF
++
 +		if (v1 != 0xFFFFFFFF) {
 +			printf("%u != 0xFFFFFFFF\n", v1);
 +			return 1;
@@ -37254,14 +37252,6 @@
 -	 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_wchar_t=yes
--fi
--
--rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 +if ac_fn_c_try_compile "$LINENO"; then :
 +  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 +$as_echo "yes" >&6; }; c99_init=yes
@@ -37269,43 +37259,70 @@
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
--
+-	ac_cv_type_wchar_t=yes
 +  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 +$as_echo "no" >&6; }
  fi
 -
  rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+-else
+-  $as_echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-
  fi
+ 
+-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++if test "`uname`" = "HP-UX"; then
++  if test "$ac_cv_c_compiler_gnu" = no; then
++	# special override for broken HP-UX compiler - I can't find a way to test
++	# this properly (its a compiler bug)
++	CFLAGS="$CFLAGS -AC99";
++	c99_init=yes;
++  fi
+ fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
 -$as_echo "$ac_cv_type_wchar_t" >&6; }
 -if test "x$ac_cv_type_wchar_t" = x""yes; then
 -  :
 -else
--
+ 
 -cat >>confdefs.h <<_ACEOF
 -#define wchar_t unsigned short
 -_ACEOF
--
--fi
--
++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;
-+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
+-fi
++UNAME_R=`(uname -r) 2>/dev/null` || UNAME_R="unknown"
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking uname -r" >&5
++$as_echo_n "checking uname -r... " >&6; }
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNAME_R}" >&5
++$as_echo "${UNAME_R}" >&6; }
  
-+if test x"$c99_init" = x"yes"; then
-+    saved_CFLAGS=""
++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.
@@ -37334,44 +37351,54 @@
 -done
 -done
 -IFS=$as_save_IFS
--
++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; }
- else
+-else
 -  { $as_echo "$as_me:$LINENO: result: no" >&5
 -$as_echo "no" >&6; }
-+    CFLAGS="$saved_CFLAGS"
-+    saved_CFLAGS=""
-+    as_fn_error "c99 structure initializer are not supported" "$LINENO" 5
- fi
+-fi
  
++DYNEXP=
  
-+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; }
++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 -lcups"
--
-+UNAME_R=`(uname -r) 2>/dev/null` || UNAME_R="unknown"
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking uname -r" >&5
-+$as_echo_n "checking uname -r... " >&6; }
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNAME_R}" >&5
-+$as_echo "${UNAME_R}" >&6; }
  
++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`
@@ -37420,28 +37447,31 @@
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+UNAME_M=`(uname -m) 2>/dev/null` || UNAME_M="unknown"
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking uname -m" >&5
-+$as_echo_n "checking uname -m... " >&6; }
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNAME_M}" >&5
-+$as_echo "${UNAME_M}" >&6; }
++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
-+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; }
++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; }
-+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; }
++#
++# 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
@@ -37458,15 +37488,7 @@
 -case "(($ac_try" in
 -  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
 -  *) ac_try_echo=$ac_try;;
-+  case "$host_os" in
-+	*irix6*)
-+		#TODO add to libreplace
-+		if test x"$ac_cv_c_compiler_gnu" != x"yes" ; then
-+																								CFLAGS="$CFLAGS -diag_error 1035"
-+												CFLAGS="$CFLAGS -woff 1209,1174,3201"
-+		fi
-+	;;
- esac
+-esac
 -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 -$as_echo "$ac_try_echo") >&5
 -  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
@@ -37483,14 +37505,24 @@
 -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
 -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; }
-+DYNEXP=
++#
++# 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
@@ -37533,7 +37565,14 @@
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
 -$as_echo "$ac_res" >&6; }
-+LDSHFLAGS_Z_DEFS=
++#
++# 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'}
@@ -37542,100 +37581,150 @@
 -  cat >>confdefs.h <<_ACEOF
 -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
 -_ACEOF
-+LDSHFLAGS_Z_NODEFS=
++$as_echo "#define _LARGE_FILES 1" >>confdefs.h
  
 -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
-+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"
++$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
-+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"
++		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
 -_ACEOF
-+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
++$as_echo "#define _LARGEFILE64_SOURCE 1" >>confdefs.h
  
 -			samba_cv_HAVE_CUPS=yes
-+#
-+# 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)
++						;;
++					*)
++						CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_REENTRANT -D_FILE_OFFSET_BITS=64"
++						LDFLAGS="$LDFLAGS -lthread"
  
-+$as_echo "#define USE_BOTH_CRYPT_CALLS 1" >>confdefs.h
++$as_echo "#define _LARGEFILE64_SOURCE 1" >>confdefs.h
  
-+		;;
-+      esac
-+      ;;
  
 -ac_check_lib_ext_save_LIBS=$LIBS
 -LIBS="-lcups $PRINT_LIBS  $LIBS"
-+#
-+# 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="
-+	  ;;
++$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
  
-+#
-+# 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"
++						;;
++				esac
++			else
++				CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_REENTRANT -D_FILE_OFFSET_BITS=64"
++				LDFLAGS="$LDFLAGS -lthread"
  
-+$as_echo "#define _LARGE_FILES 1" >>confdefs.h
++$as_echo "#define _LARGEFILE64_SOURCE 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 "$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
--else
++$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
--/* end confdefs.h.  */
-+$as_echo "#define SYSV 1" >>confdefs.h
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
  
 -/* Override any GCC internal prototype to avoid an error.
 -   Use char because int might match the return type of a GCC
 -   builtin and then its argument prototype would still apply.  */
 -#ifdef __cplusplus
 -extern "C"
--#endif
++#include <unistd.h>
++main () {
++#if _LFS64_LARGEFILE == 1
++exit(0);
++#else
++exit(1);
+ #endif
 -char httpConnectEncrypt ();
 -int
 -main ()
@@ -37668,87 +37757,64 @@
 -       }; then
 -  ac_cv_lib_ext_cups_httpConnectEncrypt=yes;
 -		  ac_cv_lib_ext_cups=yes
--else
++}
++_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
-+		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"
- 
+-
 -	ac_cv_lib_ext_cups_httpConnectEncrypt=no;
 -		  ac_cv_lib_ext_cups=no
 -fi
-+$as_echo "#define _LARGEFILE64_SOURCE 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
-+						;;
-+					*)
-+						CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_REENTRANT -D_FILE_OFFSET_BITS=64"
-+						LDFLAGS="$LDFLAGS -lthread"
- 
--fi
+-
++  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
-+$as_echo "#define _LARGEFILE64_SOURCE 1" >>confdefs.h
+-
++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
++  conftest.$ac_objext conftest.beam conftest.$ac_ext
+ fi
  
--fi
- 
 -LIBS=$ac_check_lib_ext_save_LIBS
-+$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
- 
+-
 -if test $ac_cv_lib_ext_cups = yes; then
 -  cat >>confdefs.h <<_ACEOF
 -#define HAVE_LIBCUPS 1
 -_ACEOF
-+						;;
-+				esac
-+			else
-+				CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_REENTRANT -D_FILE_OFFSET_BITS=64"
-+				LDFLAGS="$LDFLAGS -lthread"
- 
+-
 -		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
-+
-+
-+$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
- 
 -fi
-+		;;
-+	*freebsd*|*dragonfly*)
++          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
@@ -37757,7 +37823,10 @@
 -			LDFLAGS=$ac_save_LDFLAGS
 -			PRINT_LIBS=$ac_save_PRINT_LIBS
 -		fi
-+$as_echo "#define FREEBSD 1" >>confdefs.h
++# Systems with LFS support.
++#
++    gnu* | k*bsd*-gnu | kopensolaris*-gnu)
++	CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS"
  
 -	elif test x"$enable_cups" = x"yes"; then
 -		{ { $as_echo "$as_me:$LINENO: error: Cups support required but cups-config not located.  Make sure cups-devel related files are installed." >&5
@@ -37765,77 +37834,30 @@
 -   { (exit 1); exit 1; }; }
 -        fi
 -fi
-+		;;
-+#
-+# VOS may need to have POSIX support and System V compatibility enabled.
-+#
-+    *vos*)
-+    case "$CPPFLAGS" in
-+	  *-D_POSIX_C_SOURCE*)
-+		;;
-+	  *)
-+		CPPFLAGS="$CPPFLAGS -D_POSIX_C_SOURCE=200112L"
++$as_echo "#define _LARGEFILE64_SOURCE 1" >>confdefs.h
  
 -# Check whether --enable-iprint was given.
 -if test "${enable_iprint+set}" = set; then
 -  enableval=$enable_iprint;
 -fi
-+$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
++$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
-+    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 confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h.  */
  
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_IPRINT 1
-+#include <unistd.h>
-+main () {
-+#if _LFS64_LARGEFILE == 1
-+exit(0);
-+#else
-+exit(1);
-+#endif
-+}
- _ACEOF
--
+-_ACEOF
++$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
+ 
 -	elif test x"$enable_iprint" = x"yes"; then
 -		{ { $as_echo "$as_me:$LINENO: error: iPrint support required but cups not enabled.  Make sure cups-devel related files are installed and that cups is enabled." >&5
 -$as_echo "$as_me: error: iPrint support required but cups not enabled.  Make sure cups-devel related files are installed and that cups is enabled." >&2;}
 -   { (exit 1); exit 1; }; }
 -        fi
-+if ac_fn_c_try_run "$LINENO"; then :
-+  SINIX_LFS_SUPPORT=yes
-+else
-+  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
+-fi
++	;;
  
 -############################################
 -# check if the compiler will optimize out function calls
@@ -37843,48 +37865,73 @@
 -$as_echo_n "checking if the compiler will optimize out function calls... " >&6; }
 -if test "${samba_cv_optimize_out_funcation_calls+set}" = set; then
 -  $as_echo_n "(cached) " >&6
--else
-+        CPPFLAGS="$old_CPPFLAGS"
-+        if test x$SINIX_LFS_SUPPORT = xyes ; then
-+          CPPFLAGS="-D_LARGEFILE64_SOURCE $CPPFLAGS"
- 
++# 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
--/* end confdefs.h.  */
-+$as_echo "#define _LARGEFILE64_SOURCE 1" >>confdefs.h
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
  
 -#include <stdio.h>
 -int
 -main ()
 -{
-+          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
-+    ;;
++#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;
 -		}
-+# Systems with LFS support.
-+#
-+    gnu* | k*bsd*-gnu | kopensolaris*-gnu)
-+	CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS"
++       /* Ensure this is glibc 2.2 or higher */
++#if defined(__GLIBC__) && defined(__GLIBC_MINOR__)
++       int libc_major = __GLIBC__;
++       int libc_minor = __GLIBC_MINOR__;
  
-+$as_echo "#define _LARGEFILE64_SOURCE 1" >>confdefs.h
++       if (libc_major < 2)
++              exit(1);
++       if (libc_minor < 2)
++              exit(1);
++#endif
  
 -  ;
 -  return 0;
--}
--_ACEOF
++       /* 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"
 -case "(($ac_try" in
@@ -37907,18 +37954,22 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  samba_cv_optimize_out_funcation_calls=yes
--else
++if ac_fn_c_try_run "$LINENO"; then :
++  LINUX_LFS_SUPPORT=yes
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
- 
+-
 -	samba_cv_optimize_out_funcation_calls=no
--fi
-+$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
- 
++  LINUX_LFS_SUPPORT=no
+ fi
+-
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
--fi
++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
++  conftest.$ac_objext conftest.beam conftest.$ac_ext
+ fi
 -{ $as_echo "$as_me:$LINENO: result: $samba_cv_optimize_out_funcation_calls" >&5
 -$as_echo "$samba_cv_optimize_out_funcation_calls" >&6; }
 -if test x"$samba_cv_optimize_out_funcation_calls" = x"yes"; then
@@ -37926,10 +37977,12 @@
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_COMPILER_WILL_OPTIMIZE_OUT_FNS 1
 -_ACEOF
-+$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
++	CPPFLAGS="$old_CPPFLAGS"
++	if test x$LINUX_LFS_SUPPORT = xyes ; then
++		CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS"
  
 -fi
-+	;;
++$as_echo "#define _LARGEFILE64_SOURCE 1" >>confdefs.h
  
 -#############################################
 -# check for fd passing struct via msg_control
@@ -37937,41 +37990,24 @@
 -$as_echo_n "checking for fd passing via msg_control... " >&6; }
 -if test "${samba_cv_msghdr_msg_control+set}" = set; then
 -  $as_echo_n "(cached) " >&6
-+# Tests for linux LFS support. Need kernel 2.4 and glibc2.2 or greater support.
-+#
-+    *linux*)
-+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LFS support" >&5
-+$as_echo_n "checking for LFS support... " >&6; }
-+        old_CPPFLAGS="$CPPFLAGS"
-+        CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS"
-+       if test "$cross_compiling" = yes; then :
-+  LINUX_LFS_SUPPORT=cross
- else
--
+-else
+ 
 -    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.  */
++$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
  
 -#include <sys/types.h>
-+#include <unistd.h>
-+#include <sys/utsname.h>
-+#include <string.h>
- #include <stdlib.h>
+-#include <stdlib.h>
 -#include <stddef.h>
 -#include <sys/socket.h>
 -#include <sys/un.h>
 -int
 -main ()
 -{
-+main() {
-+#if _LFS64_LARGEFILE == 1
-+       struct utsname uts;
-+       char *release;
-+       int major, minor;
  
 -	struct msghdr msg;
 -	union {
@@ -37980,35 +38016,12 @@
 -	} control_un;
 -	msg.msg_control = control_un.control;
 -	msg.msg_controllen = sizeof(control_un.control);
-+       /* Ensure this is glibc 2.2 or higher */
-+#if defined(__GLIBC__) && defined(__GLIBC_MINOR__)
-+       int libc_major = __GLIBC__;
-+       int libc_minor = __GLIBC_MINOR__;
++$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
  
 -  ;
 -  return 0;
-+       if (libc_major < 2)
-+              exit(1);
-+       if (libc_minor < 2)
-+              exit(1);
-+#endif
-+
-+       /* 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
+-}
+-_ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -38028,32 +38041,36 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  samba_cv_msghdr_msg_control=yes
-+if ac_fn_c_try_run "$LINENO"; then :
-+  LINUX_LFS_SUPPORT=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
-+  LINUX_LFS_SUPPORT=no
- 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
-+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:$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
-+	CPPFLAGS="$old_CPPFLAGS"
-+	if test x$LINUX_LFS_SUPPORT = xyes ; then
-+		CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS"
++# Add a system specific charset module.
++	default_shared_modules="$default_shared_modules charset_macosxfs"
  
 -#############################################
 -# check for fd passing struct via msg_acctrights
@@ -38061,15 +38078,23 @@
 -$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 "#define _LARGEFILE64_SOURCE 1" >>confdefs.h
- 
++	;;
++    *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
--/* end confdefs.h.  */
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
  
 -#include <sys/types.h>
 -#include <stdlib.h>
@@ -38079,17 +38104,23 @@
 -int
 -main ()
 -{
-+$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
- 
+-
 -	struct msghdr msg;
 -	int fd;
 -	msg.msg_acctrights = (caddr_t) &fd;
 -	msg.msg_acctrightslen = sizeof(fd);
- 
+-
 -  ;
 -  return 0;
--}
--_ACEOF
++#include <unistd.h>
++main () {
++#if _LFS64_LARGEFILE == 1
++exit(0);
++#else
++exit(1);
++#endif
+ }
+ _ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -38109,38 +38140,34 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  samba_cv_msghdr_msg_acctrights=yes
--else
++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
-+$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
- 
+-
 -	samba_cv_msghdr_msg_acctrights=no
--fi
-+	fi
-+	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINUX_LFS_SUPPORT" >&5
-+$as_echo "$LINUX_LFS_SUPPORT" >&6; }
-+	;;
- 
++  GLIBC_LFS_SUPPORT=no
+ fi
+-
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
--fi
++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
++  conftest.$ac_objext conftest.beam conftest.$ac_ext
+ fi
 -{ $as_echo "$as_me:$LINENO: result: $samba_cv_msghdr_msg_acctrights" >&5
 -$as_echo "$samba_cv_msghdr_msg_acctrights" >&6; }
 -if test x"$samba_cv_msghdr_msg_acctrights" = x"yes"; then
-+#
-+# MacOS X is the *only* system that uses compose character in utf8. This
-+# is so horribly broken....
-+#
-+    *darwin*)
- 
+-
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_MSGHDR_MSG_ACCTRIGHTS 1
 -_ACEOF
-+$as_echo "#define BROKEN_UNICODE_COMPOSE_CHARACTERS 1" >>confdefs.h
  
 -fi
++        CPPFLAGS="$old_CPPFLAGS"
++        if test x$GLIBC_LFS_SUPPORT = xyes ; then
++          CPPFLAGS="-D_LARGEFILE64_SOURCE -D_GNU_SOURCE $CPPFLAGS"
  
-+# Add a system specific charset module.
-+	default_shared_modules="$default_shared_modules charset_macosxfs"
++$as_echo "#define _LARGEFILE64_SOURCE 1" >>confdefs.h
  
 -for ac_func in dirfd
 -do
@@ -38149,43 +38176,38 @@
 -$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
-+	;;
-+    *hurd*)
-+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LFS support" >&5
-+$as_echo_n "checking for LFS support... " >&6; }
-+        old_CPPFLAGS="$CPPFLAGS"
-+        CPPFLAGS="-D_LARGEFILE64_SOURCE -D_GNU_SOURCE $CPPFLAGS"
-+        if test "$cross_compiling" = yes; then :
-+  GLIBC_LFS_SUPPORT=cross
- else
+-else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* 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>
-+#include <unistd.h>
-+main () {
-+#if _LFS64_LARGEFILE == 1
-+exit(0);
- #else
+-#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.  */
@@ -38198,23 +38220,23 @@
 -    something starting with __ and the normal name is an alias.  */
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
-+exit(1);
- #endif
--
+-#endif
++        ;;
+ 
 -int
 -main ()
 -{
 -return $ac_func ();
 -  ;
 -  return 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
+ esac
 -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 -$as_echo "$ac_try_echo") >&5
 -  (eval "$ac_link") 2>conftest.er1
@@ -38231,22 +38253,17 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  eval "$as_ac_var=yes"
-+if ac_fn_c_try_run "$LINENO"; then :
-+  GLIBC_LFS_SUPPORT=yes
- else
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	eval "$as_ac_var=no"
-+  GLIBC_LFS_SUPPORT=no
- fi
+-fi
 -
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
-+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-+  conftest.$ac_objext conftest.beam conftest.$ac_ext
- fi
+-fi
 -ac_res=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
@@ -38257,17 +38274,15 @@
 -  cat >>confdefs.h <<_ACEOF
 -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 -_ACEOF
- 
+-
 -fi
 -done
-+        CPPFLAGS="$old_CPPFLAGS"
-+        if test x$GLIBC_LFS_SUPPORT = xyes ; then
-+          CPPFLAGS="-D_LARGEFILE64_SOURCE -D_GNU_SOURCE $CPPFLAGS"
  
 -if test x"$ac_cv_func_dirfd" = x"yes"; then
 -	default_shared_modules="$default_shared_modules vfs_syncops vfs_dirsort"
 -fi
-+$as_echo "#define _LARGEFILE64_SOURCE 1" >>confdefs.h
++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; }
@@ -38281,18 +38296,7 @@
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end 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; }
-+    ;;
-+    *qnx*)
-+        CPPFLAGS="-D_LARGEFILE64_SOURCE $CPPFLAGS"
-+
-+$as_echo "#define _LARGEFILE64_SOURCE 1" >>confdefs.h
-+
-+        ;;
++echo "LIBREPLACE_BROKEN_CHECKS: START"
  
 -#include <sys/types.h>
 -#if STDC_HEADERS
@@ -38313,7 +38317,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
@@ -38330,36 +38334,30 @@
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
- 
--	samba_cv_struct_sigevent=no
--fi
-+SAVE_CPPFLAGS="${CPPFLAGS}"
-+CPPFLAGS="${CPPFLAGS} ${SAMBA_CONFIGURE_CPPFLAGS}"
- 
--rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-+
-+echo "LIBREPLACE_BROKEN_CHECKS: START"
-+
 +libreplacedir=""
 +libreplacepaths="$srcdir $srcdir/lib/replace $srcdir/libreplace $srcdir/../libreplace $srcdir/../replace $srcdir/../lib/replace $srcdir/../../../lib/replace"
 +for d in $libreplacepaths; do
 +	if test -f "$d/replace.c"; then
 +		libreplacedir="$d"
-+
+ 
+-	samba_cv_struct_sigevent=no
 +		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
 -{ $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
-+LIBREPLACEOBJ="$libreplacedir/replace.o"
  
 -   { $as_echo "$as_me:$LINENO: checking for struct sigevent.sigev_value.sival_ptr" >&5
 -$as_echo_n "checking for struct sigevent.sigev_value.sival_ptr... " >&6; }
@@ -38373,6 +38371,7 @@
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
 -#include <signal.h>
++LIBREPLACEOBJ="${LIBREPLACEOBJ} $libreplacedir/snprintf.o"
  
 -int
 -main ()
@@ -38403,21 +38402,19 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_cv_member_struct_sigevent_sigev_value_sival_ptr=yes
--else
++{ $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
-+LIBREPLACEOBJ="${LIBREPLACEOBJ} $libreplacedir/snprintf.o"
- 
+-
 -	cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
-+$as_echo_n "checking return type of signal handlers... " >&6; }
-+if test "${ac_cv_type_signal+set}" = set; then :
-+  $as_echo_n "(cached) " >&6
-+else
 +  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
 +#include <sys/types.h>
@@ -38577,50 +38574,46 @@
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	ac_cv_member_struct_sigevent_sigev_value_sigval_ptr=no
+-fi
+-
+-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 +  ac_cv_type_uid_t=no
  fi
 +rm -f conftest*
  
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  fi
+-{ $as_echo "$as_me:$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 "$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 uid_t int" >>confdefs.h
- 
 -cat >>confdefs.h <<_ACEOF
 -#define HAVE_STRUCT_SIGEVENT_SIGEV_VALUE_SIGVAL_PTR 1
 -_ACEOF
++$as_echo "#define uid_t int" >>confdefs.h
  
+ 
+-fi
 +$as_echo "#define gid_t int" >>confdefs.h
  
  fi
  
--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 :
- 
 -{ $as_echo "$as_me:$LINENO: checking for struct timespec type" >&5
 -$as_echo_n "checking for struct timespec type... " >&6; }
 -if test "${samba_cv_struct_timespec+set}" = set; then
 -  $as_echo_n "(cached) " >&6
- else
- 
+-else
+-
 -    cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
-+cat >>confdefs.h <<_ACEOF
-+#define mode_t int
- _ACEOF
+-_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
- 
+-
 -#include <sys/types.h>
 -#if STDC_HEADERS
 -#include <stdlib.h>
@@ -38636,10 +38629,8 @@
 -#  include <time.h>
 -# endif
 -#endif
-+fi
-+
-+ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
-+if test "x$ac_cv_type_off_t" = x""yes; then :
++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 :
  
 -int
 -main ()
@@ -38675,7 +38666,7 @@
 -	samba_cv_struct_timespec=no
 -fi
 +cat >>confdefs.h <<_ACEOF
-+#define off_t long int
++#define mode_t int
 +_ACEOF
  
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
@@ -38686,13 +38677,13 @@
  
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_STRUCT_TIMESPEC 1
-+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" "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 size_t unsigned int
++#define off_t long int
  _ACEOF
  
  fi
@@ -38704,8 +38695,8 @@
 -if test "${samba_cv_have_setresuid+set}" = set; then
 -  $as_echo_n "(cached) " >&6
 -else
-+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 :
++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
@@ -38720,7 +38711,7 @@
 -main() { setresuid(1,1,1); setresuid(2,2,2); exit(errno==EPERM?0:1);}
 +
 +cat >>confdefs.h <<_ACEOF
-+#define pid_t int
++#define size_t unsigned int
  _ACEOF
 -rm -f conftest$ac_exeext
 -if { (ac_try="$ac_link"
@@ -38757,15 +38748,14 @@
 -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
  fi
  
-+ac_fn_c_check_member "$LINENO" "struct stat" "st_rdev" "ac_cv_member_struct_stat_st_rdev" "$ac_includes_default"
-+if test "x$ac_cv_member_struct_stat_st_rdev" = x""yes; then :
++ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
++if test "x$ac_cv_type_pid_t" = x""yes; then :
 +
++else
++
 +cat >>confdefs.h <<_ACEOF
-+#define HAVE_STRUCT_STAT_ST_RDEV 1
++#define pid_t int
 +_ACEOF
-+
-+
-+$as_echo "#define HAVE_ST_RDEV 1" >>confdefs.h
  
  fi
 -{ $as_echo "$as_me:$LINENO: result: $samba_cv_have_setresuid" >&5
@@ -38774,16 +38764,16 @@
  
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_SETRESUID 1
++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_type "$LINENO" "ino_t" "ac_cv_type_ino_t" "$ac_includes_default"
-+if test "x$ac_cv_type_ino_t" = x""yes; then :
-+
-+else
-+
 +cat >>confdefs.h <<_ACEOF
-+#define ino_t unsigned
++#define HAVE_STRUCT_STAT_ST_RDEV 1
  _ACEOF
  
++
++$as_echo "#define HAVE_ST_RDEV 1" >>confdefs.h
++
  fi
  
 -# Do the same check for setresguid...
@@ -38793,11 +38783,12 @@
 -if test "${samba_cv_have_setresgid+set}" = set; then
 -  $as_echo_n "(cached) " >&6
 -else
-+ac_fn_c_check_type "$LINENO" "loff_t" "ac_cv_type_loff_t" "$ac_includes_default"
-+if test "x$ac_cv_type_loff_t" = x""yes; then :
  
 -    if test "$cross_compiling" = yes; then
 -  samba_cv_have_setresgid=cross
++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.  */
@@ -38810,7 +38801,7 @@
 -main() { errno = 0; setresgid(1,1,1); exit(errno != 0 ? (errno==EPERM ? 0 : 1) : 0);}
 +
 +cat >>confdefs.h <<_ACEOF
-+#define loff_t off_t
++#define ino_t unsigned
  _ACEOF
 -rm -f conftest$ac_exeext
 -if { (ac_try="$ac_link"
@@ -38847,17 +38838,27 @@
 -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
  fi
  
-+ac_fn_c_check_type "$LINENO" "offset_t" "ac_cv_type_offset_t" "$ac_includes_default"
-+if test "x$ac_cv_type_offset_t" = x""yes; then :
++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
-+else
  
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_SETRESGID 1
++ac_fn_c_check_type "$LINENO" "offset_t" "ac_cv_type_offset_t" "$ac_includes_default"
++if test "x$ac_cv_type_offset_t" = x""yes; then :
++
++else
++
 +cat >>confdefs.h <<_ACEOF
 +#define offset_t loff_t
  _ACEOF
@@ -38935,50 +38936,28 @@
  $as_echo "$ac_cv_func_memcmp_working" >&6; }
  test $ac_cv_func_memcmp_working = no && case " $LIBOBJS " in
    *" memcmp.$ac_objext "* ) ;;
-@@ -37997,317 +8455,154 @@
+@@ -37997,166 +8455,26 @@
  
  
  
 -###############################################
 -# Readline included by default unless explicitly asked not to
 -test "${with_readline+set}" != "set" && with_readline=yes
-+for ac_func in pipe strftime srandom random srand rand usleep setbuffer lstat getpgrp utime utimes
-+do :
-+  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-+eval as_val=\$$as_ac_var
-+   if test "x$as_val" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-+_ACEOF
- 
+-
 -# test for where we get readline() from
 -{ $as_echo "$as_me:$LINENO: checking whether to use readline" >&5
 -$as_echo_n "checking whether to use readline... " >&6; }
-+fi
-+done
- 
+-
 -# 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; }
- 
-+for ac_header in stdbool.h stdint.h sys/select.h
-+do :
-+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-+eval as_val=\$$as_ac_Header
-+   if test "x$as_val" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-+_ACEOF
- 
-+fi
- 
-+done
- 
+-
+-
+-
+-
 -for ac_header in readline.h history.h readline/readline.h
 -do
 -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
@@ -39004,15 +38983,7 @@
 -/* end confdefs.h.  */
 -$ac_includes_default
 -#include <$ac_header>
-+for ac_header in setjmp.h utime.h
-+do :
-+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-+eval as_val=\$$as_ac_Header
-+   if test "x$as_val" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
- _ACEOF
+-_ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -39035,20 +39006,14 @@
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
- 
+-
 -	ac_header_compiler=no
- fi
- 
+-fi
+-
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 -$as_echo "$ac_header_compiler" >&6; }
-+done
-+
-+
-+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"
- 
+-
 -# Is the header present?
 -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
 -$as_echo_n "checking $ac_header presence... " >&6; }
@@ -39059,7 +39024,15 @@
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
 -#include <$ac_header>
--_ACEOF
++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
 -  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -39078,19 +39051,18 @@
 -	 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_config_commands="$ac_config_commands mk-stdint.h"
-+
  
 -  ac_header_preproc=no
  fi
++done
  
 -rm -f conftest.err conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
 -$as_echo "$ac_header_preproc" >&6; }
- 
+-
 -# So?  What about this header?
 -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
 -  yes:no: )
@@ -39125,33 +39097,32 @@
 -$as_echo_n "checking for $ac_header... " >&6; }
 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
 -  $as_echo_n "(cached) " >&6
-+
-+ac_fn_c_check_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
 -  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; }
-+   ac_config_commands="$ac_config_commands mk-stdbool.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
--_ACEOF
++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
+@@ -38165,149 +8483,12 @@
  
- fi
+ done
  
--done
- 
- 
+-
 -for ac_header in readline/history.h
 -do
 -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
@@ -39160,19 +39131,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
-+
-+ac_fn_c_check_type "$LINENO" "bool" "ac_cv_type_bool" "
-+$ac_includes_default
-+#ifdef HAVE_STDBOOL_H
-+#include <stdbool.h>
-+#endif
-+
-+"
-+if test "x$ac_cv_type_bool" = x""yes; then :
-+
-+$as_echo "#define HAVE_BOOL 1" >>confdefs.h
-+
- fi
+-fi
 -ac_res=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
@@ -39187,10 +39146,7 @@
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
-+
-+
-+ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "
- $ac_includes_default
+-$ac_includes_default
 -#include <$ac_header>
 -_ACEOF
 -rm -f conftest.$ac_objext
@@ -39215,22 +39171,14 @@
 -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; }
- 
+-
 -# Is the header present?
 -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
 -$as_echo_n "checking $ac_header presence... " >&6; }
@@ -39239,20 +39187,9 @@
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
-+$as_echo_n "checking for working mmap... " >&6; }
-+if test "${libreplace_cv_HAVE_MMAP+set}" = set; then :
-+  $as_echo_n "(cached) " >&6
-+else
-+
-+if test "$cross_compiling" = yes; then :
-+  libreplace_cv_HAVE_MMAP=cross
-+else
-+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
+-/* end confdefs.h.  */
 -#include <$ac_header>
-+#include "$libreplacedir/test/shared_mmap.c"
- _ACEOF
+-_ACEOF
 -if { (ac_try="$ac_cpp conftest.$ac_ext"
 -case "(($ac_try" in
 -  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -39271,28 +39208,17 @@
 -	 test ! -s conftest.err
 -       }; then
 -  ac_header_preproc=yes
-+if ac_fn_c_try_run "$LINENO"; then :
-+  libreplace_cv_HAVE_MMAP=yes
- else
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+  libreplace_cv_HAVE_MMAP=no
-+fi
-+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-+  conftest.$ac_objext conftest.beam conftest.$ac_ext
-+fi
- 
+-
 -  ac_header_preproc=no
- 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
- 
+-fi
+-
 -rm -f conftest.err conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
 -$as_echo "$ac_header_preproc" >&6; }
-+$as_echo "#define HAVE_MMAP 1" >>confdefs.h
- 
+-
 -# So?  What about this header?
 -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
 -  yes:no: )
@@ -39329,31 +39255,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; }
-+
-+
-+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
+-
+-fi
 -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/time.h time.h
++for ac_header in setjmp.h utime.h
 +do :
 +  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
@@ -39362,34 +39274,15 @@
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
-@@ -38316,475 +8611,274 @@
- 
+@@ -38317,474 +8498,97 @@
  done
  
-+for ac_header in stdarg.h vararg.h
-+do :
-+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-+eval as_val=\$$as_ac_Header
-+   if test "x$as_val" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-+_ACEOF
  
-+fi
++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"
  
-+done
-+
-+for ac_header in sys/mount.h mntent.h
-+do :
-+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-+eval as_val=\$$as_ac_Header
-+   if test "x$as_val" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-+_ACEOF
- 
+-
 -for ac_header in readline.h readline/readline.h
 -do
 -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
@@ -39398,7 +39291,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
@@ -39409,33 +39302,13 @@
 -$as_echo_n "checking $ac_header usability... " >&6; }
 -cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
-+
-+done
-+
-+for ac_header in stropts.h
-+do :
-+  ac_fn_c_check_header_mongrel "$LINENO" "stropts.h" "ac_cv_header_stropts_h" "$ac_includes_default"
-+if test "x$ac_cv_header_stropts_h" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define HAVE_STROPTS_H 1
- _ACEOF
+-_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
 -$ac_includes_default
 -#include <$ac_header>
-+
-+fi
-+
-+done
-+
-+for ac_header in unix.h
-+do :
-+  ac_fn_c_check_header_mongrel "$LINENO" "unix.h" "ac_cv_header_unix_h" "$ac_includes_default"
-+if test "x$ac_cv_header_unix_h" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define HAVE_UNIX_H 1
- _ACEOF
+-_ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -39455,50 +39328,29 @@
 -	 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
- 
+-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
++   ac_config_commands="$ac_config_commands mk-stdint.h"
  
 -# Is the header present?
 -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
 -$as_echo_n "checking $ac_header presence... " >&6; }
 -cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
-+
-+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
+-_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
 -#include <$ac_header>
-+
-+fi
-+done
-+
-+for ac_func in vsyslog setlinebuf mktime ftruncate chsize rename
-+do :
-+  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-+eval as_val=\$$as_ac_var
-+   if test "x$as_val" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
- _ACEOF
+-_ACEOF
 -if { (ac_try="$ac_cpp conftest.$ac_ext"
 -case "(($ac_try" in
 -  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -39523,21 +39375,11 @@
  
 -  ac_header_preproc=no
  fi
-+done
  
 -rm -f conftest.err conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
 -$as_echo "$ac_header_preproc" >&6; }
-+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
 -  yes:no: )
@@ -39574,54 +39416,27 @@
 -  $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
-+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
+-  cat >>confdefs.h <<_ACEOF
 -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
- _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
-+done
-+
-+
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for setresuid declaration" >&5
-+$as_echo_n "checking for setresuid declaration... " >&6; }
-+if test "${ac_cv_have_setresuid_decl+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
+-  $as_echo_n "(cached) " >&6
+-else
 -  ac_check_lib_save_LIBS=$LIBS
 -LIBS="-l${termlib}  $LIBS"
 -cat >conftest.$ac_ext <<_ACEOF
@@ -39629,28 +39444,10 @@
 -_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
-+main ()
-+{
-+int i = (int)setresuid
-+  ;
-+  return 0;
-+}
-+_ACEOF
-+if ac_fn_c_try_compile "$LINENO"; then :
-+  ac_cv_have_setresuid_decl=yes
-+else
-+  ac_cv_have_setresuid_decl=no
-+fi
-+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-+fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_setresuid_decl" >&5
-+$as_echo "$ac_cv_have_setresuid_decl" >&6; }
-+ if test x"$ac_cv_have_setresuid_decl" = x"yes"; then
+-/* 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
@@ -39659,29 +39456,14 @@
 -extern "C"
 -#endif
 -char tgetent ();
-+$as_echo "#define HAVE_SETRESUID_DECL 1" >>confdefs.h
-+
-+ fi
-+
-+
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for setresgid declaration" >&5
-+$as_echo_n "checking for setresgid declaration... " >&6; }
-+if test "${ac_cv_have_setresgid_decl+set}" = set; then :
-+  $as_echo_n "(cached) " >&6
-+else
-+
-+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h.  */
-+#include <unistd.h>
- int
- main ()
- {
+-int
+-main ()
+-{
 -return tgetent ();
-+int i = (int)setresgid
-   ;
-   return 0;
- }
- _ACEOF
+-  ;
+-  return 0;
+-}
+-_ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -39704,24 +39486,13 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  eval "$as_ac_Lib=yes"
-+if ac_fn_c_try_compile "$LINENO"; then :
-+  ac_cv_have_setresgid_decl=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+  ac_cv_have_setresgid_decl=no
-+fi
-+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-+fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_setresgid_decl" >&5
-+$as_echo "$ac_cv_have_setresgid_decl" >&6; }
-+ if test x"$ac_cv_have_setresgid_decl" = x"yes"; then
-+
-+$as_echo "#define HAVE_SETRESGID_DECL 1" >>confdefs.h
++   ac_config_commands="$ac_config_commands mk-stdbool.h"
  
 -	eval "$as_ac_Lib=no"
 -fi
-+ fi
  
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
@@ -39736,17 +39507,14 @@
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
 -  TERMLIBS="-l${termlib}"; break
--fi
+ fi
  
 -      done
 -      { $as_echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
 -$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
 -if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for errno declaration" >&5
-+$as_echo_n "checking for errno declaration... " >&6; }
-+if test "${ac_cv_have_errno_decl+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
+-  $as_echo_n "(cached) " >&6
+-else
 -  ac_check_lib_save_LIBS=$LIBS
 -LIBS="-lreadline $TERMLIBS $LIBS"
 -cat >conftest.$ac_ext <<_ACEOF
@@ -39763,18 +39531,14 @@
 -extern "C"
 -#endif
 -char rl_callback_handler_install ();
-+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h.  */
-+#include <errno.h>
- int
- main ()
- {
+-int
+-main ()
+-{
 -return rl_callback_handler_install ();
-+int i = (int)errno
-   ;
-   return 0;
- }
- _ACEOF
+-  ;
+-  return 0;
+-}
+-_ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -39800,10 +39564,10 @@
 -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
@@ -39813,24 +39577,25 @@
 -$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
 -_ACEOF
--
++"
++if test "x$ac_cv_type_bool" = x""yes; then :
+ 
 -       break
-+if ac_fn_c_try_compile "$LINENO"; then :
-+  ac_cv_have_errno_decl=yes
- else
+-else
 -  TERMLIBS=
-+  ac_cv_have_errno_decl=no
+-fi
++$as_echo "#define HAVE_BOOL 1" >>confdefs.h
+ 
  fi
--
-+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_errno_decl" >&5
-+$as_echo "$ac_cv_have_errno_decl" >&6; }
-+ if test x"$ac_cv_have_errno_decl" = x"yes"; then
  
 -done
 -
@@ -39852,11 +39617,9 @@
 -    LDFLAGS="-L$with_readline/lib $LDFLAGS"
 -    CPPFLAGS="-I$with_readline/include $CPPFLAGS"
 -
-+$as_echo "#define HAVE_ERRNO_DECL 1" >>confdefs.h
+-
  
-+ fi
- 
- 
+-
 -for ac_header in readline.h history.h readline/readline.h
 -do
 -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
@@ -39864,10 +39627,7 @@
 -  { $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 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
 -fi
 -ac_res=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
@@ -39883,7 +39643,8 @@
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
--$ac_includes_default
++ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "
+ $ac_includes_default
 -#include <$ac_header>
 -_ACEOF
 -rm -f conftest.$ac_objext
@@ -39905,16 +39666,21 @@
 -	 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
--
++#ifdef HAVE_STDBOOL_H
++#include <stdbool.h>
++#endif
+ 
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 -$as_echo "$ac_header_compiler" >&6; }
++"
++if test "x$ac_cv_type__Bool" = x""yes; then :
  
 -# Is the header present?
 -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
@@ -39924,27 +39690,9 @@
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+if test "$cross_compiling" = yes; then :
-+  libreplace_cv_HAVE_SECURE_MKSTEMP=cross
-+else
-+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
+-/* end confdefs.h.  */
 -#include <$ac_header>
-+#include <stdlib.h>
-+#include <sys/types.h>
-+#include <sys/stat.h>
-+#include <unistd.h>
-+main() {
-+  struct stat st;
-+  char tpl[20]="/tmp/test.XXXXXX";
-+  int fd = mkstemp(tpl);
-+  if (fd == -1) exit(1);
-+  unlink(tpl);
-+  if (fstat(fd, &st) != 0) exit(1);
-+  if ((st.st_mode & 0777) != 0600) exit(1);
-+  exit(0);
-+}
- _ACEOF
+-_ACEOF
 -if { (ac_try="$ac_cpp conftest.$ac_ext"
 -case "(($ac_try" in
 -  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -39963,27 +39711,17 @@
 -	 test ! -s conftest.err
 -       }; then
 -  ac_header_preproc=yes
-+if ac_fn_c_try_run "$LINENO"; then :
-+  libreplace_cv_HAVE_SECURE_MKSTEMP=yes
- else
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+  libreplace_cv_HAVE_SECURE_MKSTEMP=no
-+fi
-+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-+  conftest.$ac_objext conftest.beam conftest.$ac_ext
-+fi
++$as_echo "#define HAVE__Bool 1" >>confdefs.h
  
 -  ac_header_preproc=no
  fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libreplace_cv_HAVE_SECURE_MKSTEMP" >&5
-+$as_echo "$libreplace_cv_HAVE_SECURE_MKSTEMP" >&6; }
-+if test x"$libreplace_cv_HAVE_SECURE_MKSTEMP" = x"yes"; then
  
 -rm -f conftest.err conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
 -$as_echo "$ac_header_preproc" >&6; }
-+$as_echo "#define HAVE_SECURE_MKSTEMP 1" >>confdefs.h
  
 -# So?  What about this header?
 -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
@@ -40018,20 +39756,47 @@
 -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
 -$as_echo_n "checking for $ac_header... " >&6; }
 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
--  $as_echo_n "(cached) " >&6
--else
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
++$as_echo_n "checking for working mmap... " >&6; }
++if test "${libreplace_cv_HAVE_MMAP+set}" = set; then :
+   $as_echo_n "(cached) " >&6
+ else
 -  eval "$as_ac_Header=\$ac_header_preproc"
++
++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 stdio.h strings.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"
@@ -40040,7 +39805,7 @@
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
-@@ -38793,1135 +8887,564 @@
+@@ -38793,149 +8597,40 @@
  
  done
  
@@ -40058,10 +39823,7 @@
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
 -$as_echo "$ac_res" >&6; }
-+ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
-+if test "x$ac_cv_have_decl_snprintf" = x""yes; then :
-+  ac_have_decl=1
- else
+-else
 -  # Is the header compilable?
 -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
 -$as_echo_n "checking $ac_header usability... " >&6; }
@@ -40073,11 +39835,14 @@
 -/* end confdefs.h.  */
 -$ac_includes_default
 -#include <$ac_header>
-+  ac_have_decl=0
-+fi
-+
-+cat >>confdefs.h <<_ACEOF
-+#define HAVE_DECL_SNPRINTF $ac_have_decl
++for ac_header in sys/time.h time.h
++do :
++  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
++ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
++eval as_val=\$$as_ac_Header
++   if test "x$as_val" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
@@ -40098,21 +39863,18 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_header_compiler=yes
-+ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
-+if test "x$ac_cv_have_decl_vsnprintf" = x""yes; then :
-+  ac_have_decl=1
- else
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
+ 
 -	ac_header_compiler=no
-+  ac_have_decl=0
  fi
  
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 -$as_echo "$ac_header_compiler" >&6; }
--
++done
+ 
 -# Is the header present?
 -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
 -$as_echo_n "checking $ac_header presence... " >&6; }
@@ -40123,8 +39885,14 @@
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
 -#include <$ac_header>
-+cat >>confdefs.h <<_ACEOF
-+#define HAVE_DECL_VSNPRINTF $ac_have_decl
++for ac_header in stdarg.h vararg.h
++do :
++  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
++ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
++eval as_val=\$$as_ac_Header
++   if test "x$as_val" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
 -if { (ac_try="$ac_cpp conftest.$ac_ext"
 -case "(($ac_try" in
@@ -40144,15 +39912,11 @@
 -	 test ! -s conftest.err
 -       }; then
 -  ac_header_preproc=yes
-+ac_fn_c_check_decl "$LINENO" "asprintf" "ac_cv_have_decl_asprintf" "$ac_includes_default"
-+if test "x$ac_cv_have_decl_asprintf" = x""yes; then :
-+  ac_have_decl=1
- else
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
+ 
 -  ac_header_preproc=no
-+  ac_have_decl=0
  fi
  
 -rm -f conftest.err conftest.$ac_ext
@@ -40193,47 +39957,44 @@
 -$as_echo_n "checking for $ac_header... " >&6; }
 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
 -  $as_echo_n "(cached) " >&6
-+cat >>confdefs.h <<_ACEOF
-+#define HAVE_DECL_ASPRINTF $ac_have_decl
-+_ACEOF
-+ac_fn_c_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default"
-+if test "x$ac_cv_have_decl_vasprintf" = x""yes; then :
-+  ac_have_decl=1
- else
+-else
 -  eval "$as_ac_Header=\$ac_header_preproc"
-+  ac_have_decl=0
- fi
+-fi
 -ac_res=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
 -$as_echo "$ac_res" >&6; }
++done
  
 -fi
 -as_val=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+cat >>confdefs.h <<_ACEOF
-+#define HAVE_DECL_VASPRINTF $ac_have_decl
-+_ACEOF
-+
-+for ac_func in snprintf vsnprintf asprintf vasprintf
++for ac_header in sys/mount.h mntent.h
 +do :
-+  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-+eval as_val=\$$as_ac_var
++  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
++ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
++eval as_val=\$$as_ac_Header
 +   if test "x$as_val" = x""yes; then :
    cat >>confdefs.h <<_ACEOF
--#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+ #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
+@@ -38944,733 +8639,569 @@
  
- fi
--
  done
  
++for ac_header in stropts.h
++do :
++  ac_fn_c_check_header_mongrel "$LINENO" "stropts.h" "ac_cv_header_stropts_h" "$ac_includes_default"
++if test "x$ac_cv_header_stropts_h" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_STROPTS_H 1
++_ACEOF
  
--
--
++fi
+ 
++done
+ 
 -for ac_header in readline.h readline/readline.h
 -do
 -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
@@ -40241,16 +40002,13 @@
 -  { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
 -$as_echo_n "checking for $ac_header... " >&6; }
 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for 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
+-  $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; }
@@ -40262,7 +40020,13 @@
 -/* end confdefs.h.  */
 -$ac_includes_default
 -#include <$ac_header>
--_ACEOF
++for ac_header in unix.h
++do :
++  ac_fn_c_check_header_mongrel "$LINENO" "unix.h" "ac_cv_header_unix_h" "$ac_includes_default"
++if test "x$ac_cv_header_unix_h" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_UNIX_H 1
+ _ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -40282,62 +40046,49 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_header_compiler=yes
-+
-+if test "$cross_compiling" = yes; then :
-+  libreplace_cv_HAVE_C99_VSNPRINTF=cross
- else
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h.  */
  
 -	ac_header_compiler=no
--fi
-+#include <sys/types.h>
-+#include <stdio.h>
-+#include <stdarg.h>
-+#include <stdlib.h>
-+void foo(const char *format, ...) {
-+       va_list ap;
-+       int len;
-+       char buf[20];
-+       long long l = 1234567890;
-+       l *= 100;
+ fi
  
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 -$as_echo "$ac_header_compiler" >&6; }
-+       va_start(ap, format);
-+       len = vsnprintf(buf, 0, format, ap);
-+       va_end(ap);
-+       if (len != 5) exit(1);
-+
-+       va_start(ap, format);
-+       len = vsnprintf(0, 0, format, ap);
-+       va_end(ap);
-+       if (len != 5) exit(2);
-+
-+       if (snprintf(buf, 3, "hello") != 5 || strcmp(buf, "he") != 0) exit(3);
-+
-+       if (snprintf(buf, 20, "%lld", l) != 12 || strcmp(buf, "123456789000") != 0) exit(4);
-+       if (snprintf(buf, 20, "%zu", 123456789) != 9 || strcmp(buf, "123456789") != 0) exit(5);
-+       if (snprintf(buf, 20, "%2\$d %1\$d", 3, 4) != 3 || strcmp(buf, "4 3") != 0) exit(6);
-+       if (snprintf(buf, 20, "%s", 0) < 3) exit(7);
-+
-+       exit(0);
-+}
-+main() { foo("hello"); }
++done
  
 -# Is the header present?
 -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
 -$as_echo_n "checking $ac_header presence... " >&6; }
 -cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
--_ACEOF
++
++for ac_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
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
 -#include <$ac_header>
++
++fi
++done
++
++for ac_func in vsyslog setlinebuf mktime ftruncate chsize rename
++do :
++  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
++ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
++eval as_val=\$$as_ac_var
++   if test "x$as_val" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
  _ACEOF
 -if { (ac_try="$ac_cpp conftest.$ac_ext"
 -case "(($ac_try" in
@@ -40357,27 +40108,26 @@
 -	 test ! -s conftest.err
 -       }; then
 -  ac_header_preproc=yes
-+if ac_fn_c_try_run "$LINENO"; then :
-+  libreplace_cv_HAVE_C99_VSNPRINTF=yes
- else
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+  libreplace_cv_HAVE_C99_VSNPRINTF=no
-+fi
-+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-+  conftest.$ac_objext conftest.beam conftest.$ac_ext
-+fi
  
 -  ac_header_preproc=no
  fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libreplace_cv_HAVE_C99_VSNPRINTF" >&5
-+$as_echo "$libreplace_cv_HAVE_C99_VSNPRINTF" >&6; }
-+if test x"$libreplace_cv_HAVE_C99_VSNPRINTF" = x"yes"; then
++done
  
 -rm -f conftest.err conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
 -$as_echo "$ac_header_preproc" >&6; }
-+$as_echo "#define HAVE_C99_VSNPRINTF 1" >>confdefs.h
++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
@@ -40420,23 +40170,47 @@
 -		 $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
--_ACEOF
++#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+ _ACEOF
  
 -      for termlib in ncurses curses termcap terminfo termlib; do
 -       as_ac_Lib=`$as_echo "ac_cv_lib_${termlib}''_tgetent" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for tgetent in -l${termlib}" >&5
 -$as_echo_n "checking for tgetent in -l${termlib}... " >&6; }
 -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for va_copy" >&5
-+$as_echo_n "checking for va_copy... " >&6; }
-+if test "${libreplace_cv_HAVE_VA_COPY+set}" = set; then :
++fi
++done
++
++
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for setresuid declaration" >&5
++$as_echo_n "checking for setresuid declaration... " >&6; }
++if test "${ac_cv_have_setresuid_decl+set}" = set; then :
    $as_echo_n "(cached) " >&6
  else
 -  ac_check_lib_save_LIBS=$LIBS
@@ -40455,15 +40229,14 @@
 -extern "C"
 -#endif
 -char tgetent ();
-+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 +/* end confdefs.h.  */
-+#include <stdarg.h>
-+va_list ap1,ap2;
++#include <unistd.h>
  int
  main ()
  {
 -return tgetent ();
-+va_copy(ap1,ap2);
++int i = (int)setresuid
    ;
    return 0;
  }
@@ -40490,22 +40263,51 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  eval "$as_ac_Lib=yes"
-+if ac_fn_c_try_link "$LINENO"; then :
-+  libreplace_cv_HAVE_VA_COPY=yes
++if ac_fn_c_try_compile "$LINENO"; then :
++  ac_cv_have_setresuid_decl=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	eval "$as_ac_Lib=no"
-+  libreplace_cv_HAVE_VA_COPY=no
++  ac_cv_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
+ 
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
 -LIBS=$ac_check_lib_save_LIBS
-+rm -f core conftest.err conftest.$ac_objext \
-+    conftest$ac_exeext conftest.$ac_ext
++$as_echo "#define HAVE_SETRESUID_DECL 1" >>confdefs.h
++
++ fi
++
++
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for setresgid declaration" >&5
++$as_echo_n "checking for setresgid declaration... " >&6; }
++if test "${ac_cv_have_setresgid_decl+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++
++    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++#include <unistd.h>
++int
++main ()
++{
++int i = (int)setresgid
++  ;
++  return 0;
++}
++_ACEOF
++if ac_fn_c_try_compile "$LINENO"; then :
++  ac_cv_have_setresgid_decl=yes
++else
++  ac_cv_have_setresgid_decl=no
  fi
 -ac_res=`eval 'as_val=${'$as_ac_Lib'}
 -		 $as_echo "$as_val"'`
@@ -40515,22 +40317,24 @@
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
 -  TERMLIBS="-l${termlib}"; break
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libreplace_cv_HAVE_VA_COPY" >&5
-+$as_echo "$libreplace_cv_HAVE_VA_COPY" >&6; }
-+if test x"$libreplace_cv_HAVE_VA_COPY" = x"yes"; then
-+
-+$as_echo "#define HAVE_VA_COPY 1" >>confdefs.h
-+
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_setresgid_decl" >&5
++$as_echo "$ac_cv_have_setresgid_decl" >&6; }
++ if test x"$ac_cv_have_setresgid_decl" = x"yes"; then
  
 -      done
 -      { $as_echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
 -$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
 -if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
-+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 "#define HAVE_SETRESGID_DECL 1" >>confdefs.h
++
++ fi
++
++
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for errno declaration" >&5
++$as_echo_n "checking for errno declaration... " >&6; }
++if test "${ac_cv_have_errno_decl+set}" = set; then :
    $as_echo_n "(cached) " >&6
  else
 -  ac_check_lib_save_LIBS=$LIBS
@@ -40549,15 +40353,14 @@
 -extern "C"
 -#endif
 -char rl_callback_handler_install ();
-+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 +/* end confdefs.h.  */
-+#include <stdarg.h>
-+va_list ap1,ap2;
++#include <errno.h>
  int
  main ()
  {
 -return rl_callback_handler_install ();
-+__va_copy(ap1,ap2);
++int i = (int)errno
    ;
    return 0;
  }
@@ -40584,22 +40387,64 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  ac_cv_lib_readline_rl_callback_handler_install=yes
-+if ac_fn_c_try_link "$LINENO"; then :
-+  libreplace_cv_HAVE___VA_COPY=yes
++if ac_fn_c_try_compile "$LINENO"; then :
++  ac_cv_have_errno_decl=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
++  ac_cv_have_errno_decl=no
++fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_errno_decl" >&5
++$as_echo "$ac_cv_have_errno_decl" >&6; }
++ if test x"$ac_cv_have_errno_decl" = x"yes"; then
++
++$as_echo "#define HAVE_ERRNO_DECL 1" >>confdefs.h
++
++ fi
+ 
 -	ac_cv_lib_readline_rl_callback_handler_install=no
-+  libreplace_cv_HAVE___VA_COPY=no
++
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for secure mkstemp" >&5
++$as_echo_n "checking for secure mkstemp... " >&6; }
++if test "${libreplace_cv_HAVE_SECURE_MKSTEMP+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++
++if test "$cross_compiling" = yes; then :
++  libreplace_cv_HAVE_SECURE_MKSTEMP=cross
++else
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++#include <stdlib.h>
++#include <sys/types.h>
++#include <sys/stat.h>
++#include <unistd.h>
++main() {
++  struct stat st;
++  char tpl[20]="/tmp/test.XXXXXX";
++  int fd = mkstemp(tpl);
++  if (fd == -1) exit(1);
++  unlink(tpl);
++  if (fstat(fd, &st) != 0) exit(1);
++  if ((st.st_mode & 0777) != 0600) exit(1);
++  exit(0);
++}
++_ACEOF
++if ac_fn_c_try_run "$LINENO"; then :
++  libreplace_cv_HAVE_SECURE_MKSTEMP=yes
++else
++  libreplace_cv_HAVE_SECURE_MKSTEMP=no
++fi
++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
++  conftest.$ac_objext conftest.beam conftest.$ac_ext
  fi
--
+ 
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
 -LIBS=$ac_check_lib_save_LIBS
-+rm -f core conftest.err conftest.$ac_objext \
-+    conftest$ac_exeext conftest.$ac_ext
  fi
 -{ $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; }
@@ -40608,72 +40453,103 @@
 -       TERMCPPFLAGS="-I$with_readline/include"
 -       CPPFLAGS="-I$with_readline/include $CPPFLAGS"
 -       TERMLIBS="-lreadline $TERMLIBS"
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libreplace_cv_HAVE___VA_COPY" >&5
-+$as_echo "$libreplace_cv_HAVE___VA_COPY" >&6; }
-+if test x"$libreplace_cv_HAVE___VA_COPY" = 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
 -_ACEOF
-+$as_echo "#define HAVE___VA_COPY 1" >>confdefs.h
++$as_echo "#define HAVE_SECURE_MKSTEMP 1" >>confdefs.h
  
 -       break
 -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
++#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
++_ACEOF
++
  fi
  
--done
--
--
+ done
+ 
++ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
++if test "x$ac_cv_have_decl_snprintf" = x""yes; then :
++  ac_have_decl=1
++else
++  ac_have_decl=0
++fi
+ 
 -    LDFLAGS=$_ldflags
 -    ;;
 -  esac
-+{ $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
++cat >>confdefs.h <<_ACEOF
++#define HAVE_DECL_SNPRINTF $ac_have_decl
++_ACEOF
++ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
++if test "x$ac_cv_have_decl_vsnprintf" = x""yes; then :
++  ac_have_decl=1
  else
 -  { $as_echo "$as_me:$LINENO: result: no" >&5
 -$as_echo "no" >&6; }
++  ac_have_decl=0
++fi
++
++cat >>confdefs.h <<_ACEOF
++#define HAVE_DECL_VSNPRINTF $ac_have_decl
++_ACEOF
++ac_fn_c_check_decl "$LINENO" "asprintf" "ac_cv_have_decl_asprintf" "$ac_includes_default"
++if test "x$ac_cv_have_decl_asprintf" = x""yes; then :
++  ac_have_decl=1
++else
++  ac_have_decl=0
++fi
  
-+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h.  */
-+#include <stdio.h>
-+int
-+main ()
-+{
-+printf("%s\n", __FUNCTION__);
-+  ;
-+  return 0;
-+}
++cat >>confdefs.h <<_ACEOF
++#define HAVE_DECL_ASPRINTF $ac_have_decl
 +_ACEOF
-+if ac_fn_c_try_compile "$LINENO"; then :
-+  libreplace_cv_HAVE_FUNCTION_MACRO=yes
++ac_fn_c_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default"
++if test "x$ac_cv_have_decl_vasprintf" = x""yes; then :
++  ac_have_decl=1
 +else
-+  libreplace_cv_HAVE_FUNCTION_MACRO=no
++  ac_have_decl=0
  fi
-+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ 
++cat >>confdefs.h <<_ACEOF
++#define HAVE_DECL_VASPRINTF $ac_have_decl
++_ACEOF
+ 
++for ac_func in snprintf vsnprintf asprintf vasprintf
++do :
++  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
++ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
++eval as_val=\$$as_ac_var
++   if test "x$as_val" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
++_ACEOF
+ 
 +fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libreplace_cv_HAVE_FUNCTION_MACRO" >&5
-+$as_echo "$libreplace_cv_HAVE_FUNCTION_MACRO" >&6; }
-+if test x"$libreplace_cv_HAVE_FUNCTION_MACRO" = x"yes"; then
++done
  
-+$as_echo "#define HAVE_FUNCTION_MACRO 1" >>confdefs.h
- 
--
--
 -# The readline API changed slightly from readline3 to readline4, so
 -# code will generate warnings on one of them unless we have a few
 -# special cases.
 -{ $as_echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
 -$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
 -if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
-+else
-+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __func__ macro" >&5
-+$as_echo_n "checking for __func__ macro... " >&6; }
-+if test "${libreplace_cv_HAVE_func_MACRO+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
@@ -40683,7 +40559,12 @@
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
++
++if test "$cross_compiling" = yes; then :
++  libreplace_cv_HAVE_C99_VSNPRINTF=cross
++else
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
  
 -/* Override any GCC internal prototype to avoid an error.
 -   Use char because int might match the return type of a GCC
@@ -40692,17 +40573,44 @@
 -extern "C"
 -#endif
 -char rl_completion_matches ();
-+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h.  */
+-int
+-main ()
+-{
+-return rl_completion_matches ();
+-  ;
+-  return 0;
++#include <sys/types.h>
 +#include <stdio.h>
- int
- main ()
- {
--return rl_completion_matches ();
-+printf("%s\n", __func__);
-   ;
-   return 0;
++#include <stdarg.h>
++#include <stdlib.h>
++void foo(const char *format, ...) {
++       va_list ap;
++       int len;
++       char buf[20];
++       long long l = 1234567890;
++       l *= 100;
++
++       va_start(ap, format);
++       len = vsnprintf(buf, 0, format, ap);
++       va_end(ap);
++       if (len != 5) exit(1);
++
++       va_start(ap, format);
++       len = vsnprintf(0, 0, format, ap);
++       va_end(ap);
++       if (len != 5) exit(2);
++
++       if (snprintf(buf, 3, "hello") != 5 || strcmp(buf, "he") != 0) exit(3);
++
++       if (snprintf(buf, 20, "%lld", l) != 12 || strcmp(buf, "123456789000") != 0) exit(4);
++       if (snprintf(buf, 20, "%zu", 123456789) != 9 || strcmp(buf, "123456789") != 0) exit(5);
++       if (snprintf(buf, 20, "%2\$d %1\$d", 3, 4) != 3 || strcmp(buf, "4 3") != 0) exit(6);
++       if (snprintf(buf, 20, "%s", 0) < 3) exit(7);
++
++       exit(0);
  }
++main() { foo("hello"); }
++
  _ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
@@ -40726,66 +40634,46 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  ac_cv_lib_readline_rl_completion_matches=yes
-+if ac_fn_c_try_compile "$LINENO"; then :
-+  libreplace_cv_HAVE_func_MACRO=yes
++if ac_fn_c_try_run "$LINENO"; then :
++  libreplace_cv_HAVE_C99_VSNPRINTF=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	ac_cv_lib_readline_rl_completion_matches=no
-+  libreplace_cv_HAVE_func_MACRO=no
++  libreplace_cv_HAVE_C99_VSNPRINTF=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:${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
 -LIBS=$ac_check_lib_save_LIBS
-+$as_echo "#define HAVE_func_MACRO 1" >>confdefs.h
-+
-+    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: $libreplace_cv_HAVE_C99_VSNPRINTF" >&5
++$as_echo "$libreplace_cv_HAVE_C99_VSNPRINTF" >&6; }
++if test x"$libreplace_cv_HAVE_C99_VSNPRINTF" = x"yes"; then
  
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_NEW_LIBREADLINE 1
-+for ac_header in sys/param.h limits.h
-+do :
-+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-+eval as_val=\$$as_ac_Header
-+   if test "x$as_val" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
- _ACEOF
+-_ACEOF
++$as_echo "#define HAVE_C99_VSNPRINTF 1" >>confdefs.h
  
  fi
  
-+done
  
 -# not all readline libs have rl_event_hook or history_list
 -{ $as_echo "$as_me:$LINENO: checking whether rl_event_hook is declared" >&5
 -$as_echo_n "checking whether rl_event_hook is declared... " >&6; }
 -if test "${ac_cv_have_decl_rl_event_hook+set}" = set; then
-+
-+ac_fn_c_check_type "$LINENO" "comparison_fn_t" "ac_cv_type_comparison_fn_t" "$ac_includes_default"
-+if test "x$ac_cv_type_comparison_fn_t" = x""yes; then :
-+
-+$as_echo "#define HAVE_COMPARISON_FN_T 1" >>confdefs.h
-+
-+fi
-+
-+
-+
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for setenv declaration" >&5
-+$as_echo_n "checking for setenv declaration... " >&6; }
-+if test "${ac_cv_have_setenv_decl+set}" = set; then :
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for va_copy" >&5
++$as_echo_n "checking for va_copy... " >&6; }
++if test "${libreplace_cv_HAVE_VA_COPY+set}" = set; then :
    $as_echo_n "(cached) " >&6
  else
 -  cat >conftest.$ac_ext <<_ACEOF
@@ -40796,9 +40684,10 @@
 -/* end confdefs.h.  */
 -#include <readline/readline.h>
  
-+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 +/* end confdefs.h.  */
-+#include <stdlib.h>
++#include <stdarg.h>
++va_list ap1,ap2;
  int
  main ()
  {
@@ -40806,7 +40695,7 @@
 -  (void) rl_event_hook;
 -#endif
 -
-+int i = (int)setenv
++va_copy(ap1,ap2);
    ;
    return 0;
  }
@@ -40830,55 +40719,49 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_cv_have_decl_rl_event_hook=yes
-+if ac_fn_c_try_compile "$LINENO"; then :
-+  ac_cv_have_setenv_decl=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
-+  ac_cv_have_setenv_decl=no
++  libreplace_cv_HAVE_VA_COPY=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 conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
  fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_rl_event_hook" >&5
 -$as_echo "$ac_cv_have_decl_rl_event_hook" >&6; }
 -if test "x$ac_cv_have_decl_rl_event_hook" = x""yes; then
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_setenv_decl" >&5
-+$as_echo "$ac_cv_have_setenv_decl" >&6; }
-+ if test x"$ac_cv_have_setenv_decl" = x"yes"; then
- 
+-
 -cat >>confdefs.h <<_ACEOF
 -#define HAVE_DECL_RL_EVENT_HOOK 1
 -_ACEOF
-+$as_echo "#define HAVE_SETENV_DECL 1" >>confdefs.h
- 
-+ fi
- 
+-
+-
 -else
-+for ac_func in setenv unsetenv
-+do :
-+  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-+eval as_val=\$$as_ac_var
-+   if test "x$as_val" = x""yes; then :
-   cat >>confdefs.h <<_ACEOF
+-  cat >>confdefs.h <<_ACEOF
 -#define HAVE_DECL_RL_EVENT_HOOK 0
-+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
- _ACEOF
+-_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
  
--
++$as_echo "#define HAVE_VA_COPY 1" >>confdefs.h
+ 
  fi
-+done
  
- 
+-
 -{ $as_echo "$as_me:$LINENO: checking for history_list in -lreadline" >&5
 -$as_echo_n "checking for history_list in -lreadline... " >&6; }
 -if test "${ac_cv_lib_readline_history_list+set}" = set; then
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for environ declaration" >&5
-+$as_echo_n "checking for environ declaration... " >&6; }
-+if test "${ac_cv_have_environ_decl+set}" = set; then :
++if test x"$libreplace_cv_HAVE_VA_COPY" != x"yes"; then
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __va_copy" >&5
++$as_echo_n "checking for __va_copy... " >&6; }
++if test "${libreplace_cv_HAVE___VA_COPY+set}" = set; then :
    $as_echo_n "(cached) " >&6
  else
 -  ac_check_lib_save_LIBS=$LIBS
@@ -40897,14 +40780,15 @@
 -extern "C"
 -#endif
 -char history_list ();
-+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 +/* end confdefs.h.  */
-+#include <unistd.h>
++#include <stdarg.h>
++va_list ap1,ap2;
  int
  main ()
  {
 -return history_list ();
-+int i = (int)environ
++__va_copy(ap1,ap2);
    ;
    return 0;
  }
@@ -40931,45 +40815,23 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  ac_cv_lib_readline_history_list=yes
-+if ac_fn_c_try_compile "$LINENO"; then :
-+  ac_cv_have_environ_decl=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_environ_decl=no
+-
+-	ac_cv_lib_readline_history_list=no
++  libreplace_cv_HAVE___VA_COPY=no
 +fi
-+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-+fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_environ_decl" >&5
-+$as_echo "$ac_cv_have_environ_decl" >&6; }
-+ if test x"$ac_cv_have_environ_decl" = x"yes"; then
-+
-+$as_echo "#define HAVE_ENVIRON_DECL 1" >>confdefs.h
-+
-+ fi
-+
-+
-+for ac_func in strnlen
-+do :
-+  ac_fn_c_check_func "$LINENO" "strnlen" "ac_cv_func_strnlen"
-+if test "x$ac_cv_func_strnlen" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define HAVE_STRNLEN 1
-+_ACEOF
- 
--	ac_cv_lib_readline_history_list=no
++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___VA_COPY" >&5
++$as_echo "$libreplace_cv_HAVE___VA_COPY" >&6; }
++if test x"$libreplace_cv_HAVE___VA_COPY" = x"yes"; then
 +
-+for ac_func in strtoull __strtoull strtouq strtoll __strtoll strtoq
-+do :
-+  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-+eval as_val=\$$as_ac_var
-+   if test "x$as_val" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-+_ACEOF
++$as_echo "#define HAVE___VA_COPY 1" >>confdefs.h
  
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
@@ -40979,35 +40841,50 @@
 -{ $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
-+done
++fi
 +
-+
-+# this test disabled as we don't actually need __VA_ARGS__ yet
-+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h.  */
-+
-+#define eprintf(...) fprintf(stderr, __VA_ARGS__)
-+eprintf("bla", "bar");
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __FUNCTION__ macro" >&5
++$as_echo_n "checking for __FUNCTION__ macro... " >&6; }
++if test "${libreplace_cv_HAVE_FUNCTION_MACRO+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
  
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_HISTORY_LIST 1
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++#include <stdio.h>
++int
++main ()
++{
++printf("%s\n", __FUNCTION__);
++  ;
++  return 0;
++}
  _ACEOF
-+if ac_fn_c_try_cpp "$LINENO"; then :
-+
-+$as_echo "#define HAVE__VA_ARGS__MACRO 1" >>confdefs.h
- 
+-
++if ac_fn_c_try_compile "$LINENO"; then :
++  libreplace_cv_HAVE_FUNCTION_MACRO=yes
++else
++  libreplace_cv_HAVE_FUNCTION_MACRO=no
  fi
-+rm -f conftest.err conftest.$ac_ext
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libreplace_cv_HAVE_FUNCTION_MACRO" >&5
++$as_echo "$libreplace_cv_HAVE_FUNCTION_MACRO" >&6; }
++if test x"$libreplace_cv_HAVE_FUNCTION_MACRO" = x"yes"; then
  
++$as_echo "#define HAVE_FUNCTION_MACRO 1" >>confdefs.h
  
 -###############################################
 -# 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 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 :
++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
@@ -41016,27 +40893,23 @@
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+
-+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
+-/* end confdefs.h.  */
  
 -/* Override any GCC internal prototype to avoid an error.
 -   Use char because int might match the return type of a GCC
 -   builtin and then its argument prototype would still apply.  */
 -#ifdef __cplusplus
 -extern "C"
-+#include <sys/types.h>
-+#if STDC_HEADERS
-+#include <stdlib.h>
-+#include <stddef.h>
- #endif
+-#endif
 -char yp_get_default_domain ();
-+#include <signal.h>
++    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++#include <stdio.h>
  int
  main ()
  {
 -return yp_get_default_domain ();
-+sig_atomic_t i = 0
++printf("%s\n", __func__);
    ;
    return 0;
  }
@@ -41070,55 +40943,357 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  ac_cv_search_yp_get_default_domain=$ac_res
--else
++if ac_fn_c_try_compile "$LINENO"; then :
++  libreplace_cv_HAVE_func_MACRO=yes
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
--
--fi
--
++  libreplace_cv_HAVE_func_MACRO=no
++fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libreplace_cv_HAVE_func_MACRO" >&5
++$as_echo "$libreplace_cv_HAVE_func_MACRO" >&6; }
++    if test x"$libreplace_cv_HAVE_func_MACRO" = x"yes"; then
+ 
++$as_echo "#define HAVE_func_MACRO 1" >>confdefs.h
+ 
++    fi
+ fi
+ 
 -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
++for ac_header in sys/param.h limits.h
++do :
++  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
++ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
++eval as_val=\$$as_ac_Header
++   if test "x$as_val" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
++_ACEOF
++
+ fi
++
+ done
 -if test "${ac_cv_search_yp_get_default_domain+set}" = set; then
 -  :
-+if ac_fn_c_try_compile "$LINENO"; then :
-+  libreplace_cv_sig_atomic_t=yes
- else
+-else
 -  ac_cv_search_yp_get_default_domain=no
-+  libreplace_cv_sig_atomic_t=no
- fi
+-fi
 -rm conftest.$ac_ext
 -LIBS=$ac_func_search_save_LIBS
-+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
+-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"
-+{ $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
+ 
+-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
+-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
++$as_echo "#define HAVE_COMPARISON_FN_T 1" >>confdefs.h
+ 
+-/* System header to define __stub macros and hopefully few prototypes,
+-    which can conflict with char $ac_func (); below.
+-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+-    <limits.h> exists even on freestanding compilers.  */
++fi
+ 
+-#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
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for setenv declaration" >&5
++$as_echo_n "checking for setenv declaration... " >&6; }
++if test "${ac_cv_have_setenv_decl+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
+ 
++    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++#include <stdlib.h>
+ int
+ main ()
+ {
+-return $ac_func ();
++int i = (int)setenv
+   ;
+   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_have_setenv_decl=yes
+ else
+-  $as_echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	eval "$as_ac_var=no"
++  ac_cv_have_setenv_decl=no
+ fi
+-
+-rm -rf conftest.dSYM
+-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+-      conftest$ac_exeext conftest.$ac_ext
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+-ac_res=`eval 'as_val=${'$as_ac_var'}
+-		 $as_echo "$as_val"'`
+-	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+-$as_echo "$ac_res" >&6; }
+-as_val=`eval 'as_val=${'$as_ac_var'}
+-		 $as_echo "$as_val"'`
+-   if test "x$as_val" = x""yes; then
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_setenv_decl" >&5
++$as_echo "$ac_cv_have_setenv_decl" >&6; }
++ if test x"$ac_cv_have_setenv_decl" = x"yes"; then
 +
-+$as_echo "#define HAVE_SIG_ATOMIC_T_TYPE 1" >>confdefs.h
++$as_echo "#define HAVE_SETENV_DECL 1" >>confdefs.h
++
++ fi
++
++for ac_func in setenv unsetenv
++do :
++  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
++ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
++eval as_val=\$$as_ac_var
++   if test "x$as_val" = x""yes; then :
+   cat >>confdefs.h <<_ACEOF
+ #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+ _ACEOF
+@@ -39679,101 +9210,56 @@
+ done
  
+ 
+-# Check if we have execl, if not we need to compile smbrun.
+-
+-for ac_func in execl
+-do
+-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+-{ $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 environ declaration" >&5
++$as_echo_n "checking for environ declaration... " >&6; }
++if test "${ac_cv_have_environ_decl+set}" = set; then :
+   $as_echo_n "(cached) " >&6
+ else
+-  cat >conftest.$ac_ext <<_ACEOF
+-/* 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 <unistd.h>
+ int
+ main ()
+ {
+-return $ac_func ();
++int i = (int)environ
+   ;
+   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_have_environ_decl=yes
+ else
+-  $as_echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	eval "$as_ac_var=no"
++  ac_cv_have_environ_decl=no
++fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_environ_decl" >&5
++$as_echo "$ac_cv_have_environ_decl" >&6; }
++ if test x"$ac_cv_have_environ_decl" = x"yes"; then
++
++$as_echo "#define HAVE_ENVIRON_DECL 1" >>confdefs.h
++
++ fi
++
++
++for ac_func in strnlen
++do :
++  ac_fn_c_check_func "$LINENO" "strnlen" "ac_cv_func_strnlen"
++if test "x$ac_cv_func_strnlen" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_STRNLEN 1
++_ACEOF
  
+-rm -rf conftest.dSYM
+-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+-      conftest$ac_exeext conftest.$ac_ext
+ 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 strtoull __strtoull strtouq strtoll __strtoll strtoq
++do :
++  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
++ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
++eval as_val=\$$as_ac_var
++   if test "x$as_val" = x""yes; then :
+   cat >>confdefs.h <<_ACEOF
+ #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+ _ACEOF
+@@ -39781,353 +9267,184 @@
+ fi
+ done
  
--for ac_func in yp_get_default_domain
+-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
++/* end confdefs.h.  */
+ 
++#define eprintf(...) fprintf(stderr, __VA_ARGS__)
++eprintf("bla", "bar");
+ 
++_ACEOF
++if ac_fn_c_try_cpp "$LINENO"; then :
+ 
++$as_echo "#define HAVE__VA_ARGS__MACRO 1" >>confdefs.h
+ 
++fi
++rm -f conftest.err conftest.$ac_ext
+ 
+ 
+-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 O_DIRECT flag to open(2)" >&5
-+$as_echo_n "checking for O_DIRECT flag to open(2)... " >&6; }
-+if test "${libreplace_cv_HAVE_OPEN_O_DIRECT+set}" = set; then :
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sig_atomic_t type" >&5
++$as_echo_n "checking for sig_atomic_t type... " >&6; }
++if test "${libreplace_cv_sig_atomic_t+set}" = set; then :
    $as_echo_n "(cached) " >&6
  else
 -  cat >conftest.$ac_ext <<_ACEOF
@@ -41143,7 +41318,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.
@@ -41158,16 +41333,18 @@
 -    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>
++#include <sys/types.h>
++#if STDC_HEADERS
++#include <stdlib.h>
++#include <stddef.h>
  #endif
 -
++#include <signal.h>
  int
  main ()
  {
 -return $ac_func ();
-+int fd = open("/dev/null", O_DIRECT);
++sig_atomic_t i = 0
    ;
    return 0;
  }
@@ -41195,13 +41372,13 @@
 -       }; then
 -  eval "$as_ac_var=yes"
 +if ac_fn_c_try_compile "$LINENO"; then :
-+  libreplace_cv_HAVE_OPEN_O_DIRECT=yes
++  libreplace_cv_sig_atomic_t=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	eval "$as_ac_var=no"
-+  libreplace_cv_HAVE_OPEN_O_DIRECT=no
++  libreplace_cv_sig_atomic_t=no
  fi
 -
 -rm -rf conftest.dSYM
@@ -41219,27 +41396,25 @@
 -  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_OPEN_O_DIRECT" >&5
-+$as_echo "$libreplace_cv_HAVE_OPEN_O_DIRECT" >&6; }
-+if test x"$libreplace_cv_HAVE_OPEN_O_DIRECT" = x"yes"; then
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libreplace_cv_sig_atomic_t" >&5
++$as_echo "$libreplace_cv_sig_atomic_t" >&6; }
++if test x"$libreplace_cv_sig_atomic_t" = x"yes"; then
++
++$as_echo "#define HAVE_SIG_ATOMIC_T_TYPE 1" >>confdefs.h
  
--fi
+ fi
 -done
-+$as_echo "#define HAVE_OPEN_O_DIRECT 1" >>confdefs.h
  
-+fi
  
--# Check if we have execl, if not we need to compile smbrun.
- 
--for ac_func in execl
+-for ac_func in strtol
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
 -$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 that the C compiler understands volatile" >&5
-+$as_echo_n "checking that the C compiler understands volatile... " >&6; }
-+if test "${libreplace_cv_volatile+set}" = set; then :
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for O_DIRECT flag to open(2)" >&5
++$as_echo_n "checking for O_DIRECT flag to open(2)... " >&6; }
++if test "${libreplace_cv_HAVE_OPEN_O_DIRECT+set}" = set; then :
    $as_echo_n "(cached) " >&6
  else
 -  cat >conftest.$ac_ext <<_ACEOF
@@ -41256,7 +41431,7 @@
 -    which can conflict with char $ac_func (); below.
 -    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
 -    <limits.h> exists even on freestanding compilers.  */
--
+ 
 -#ifdef __STDC__
 -# include <limits.h>
 -#else
@@ -41264,7 +41439,9 @@
 -#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.  */
@@ -41277,16 +41454,16 @@
 -    something starting with __ and the normal name is an alias.  */
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
--#endif
- 
-+	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h.  */
-+#include <sys/types.h>
++#include <unistd.h>
++#ifdef HAVE_FCNTL_H
++#include <fcntl.h>
+ #endif
+-
  int
  main ()
  {
 -return $ac_func ();
-+volatile int i = 0
++int fd = open("/dev/null", O_DIRECT);
    ;
    return 0;
  }
@@ -41314,13 +41491,13 @@
 -       }; then
 -  eval "$as_ac_var=yes"
 +if ac_fn_c_try_compile "$LINENO"; then :
-+  libreplace_cv_volatile=yes
++  libreplace_cv_HAVE_OPEN_O_DIRECT=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	eval "$as_ac_var=no"
-+  libreplace_cv_volatile=no
++  libreplace_cv_HAVE_OPEN_O_DIRECT=no
  fi
 -
 -rm -rf conftest.dSYM
@@ -41338,37 +41515,26 @@
 -  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_volatile" >&5
-+$as_echo "$libreplace_cv_volatile" >&6; }
-+if test x"$libreplace_cv_volatile" = x"yes"; then
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libreplace_cv_HAVE_OPEN_O_DIRECT" >&5
++$as_echo "$libreplace_cv_HAVE_OPEN_O_DIRECT" >&6; }
++if test x"$libreplace_cv_HAVE_OPEN_O_DIRECT" = x"yes"; then
  
 -fi
 -done
-+$as_echo "#define HAVE_VOLATILE 1" >>confdefs.h
++$as_echo "#define HAVE_OPEN_O_DIRECT 1" >>confdefs.h
  
--if test x"$ac_cv_func_execl" = x"no"; then
--    EXTRA_BIN_PROGS="$EXTRA_BIN_PROGS bin/smbrun\$(EXEEXT)"
- fi
++fi
  
--
--
--
--
--
--
--for ac_func in getcwd fchown chmod fchmod mknod mknod64
+ 
+-for ac_func in strchr chflags
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
 -$as_echo_n "checking for $ac_func... " >&6; }
 -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-+# filesys
-+ac_header_dirent=no
-+for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
-+  as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
-+$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
-+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then :
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that the C compiler understands volatile" >&5
++$as_echo_n "checking that the C compiler understands volatile... " >&6; }
++if test "${libreplace_cv_volatile+set}" = set; then :
    $as_echo_n "(cached) " >&6
  else
 -  cat >conftest.$ac_ext <<_ACEOF
@@ -41376,25 +41542,47 @@
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
+-/* end confdefs.h.  */
 -/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
 -   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
 -#define $ac_func innocuous_$ac_func
--
+ 
 -/* System header to define __stub macros and hopefully few prototypes,
 -    which can conflict with char $ac_func (); below.
 -    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
 -    <limits.h> exists even on freestanding compilers.  */
--
++	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++#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.  */
@@ -41408,6 +41596,17 @@
 -#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
++/* end confdefs.h.  */
 +#include <sys/types.h>
 +#include <$ac_hdr>
  
@@ -41477,9 +41676,12 @@
 +ac_header_dirent=$ac_hdr; break
  fi
 -done
+-
+-
  
 -
--for ac_func in strtol
+-
+-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
@@ -41520,7 +41722,7 @@
  
  /* Override any GCC internal prototype to avoid an error.
     Use char because int might match the return type of a GCC
-@@ -39929,101 +9452,56 @@
+@@ -40135,104 +9452,56 @@
  #ifdef __cplusplus
  extern "C"
  #endif
@@ -41617,7 +41819,10 @@
  
 +fi
  
--for ac_func in strchr chflags
+-
+-
+-
+-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
@@ -41656,7 +41861,7 @@
  
  /* Override any GCC internal prototype to avoid an error.
     Use char because int might match the return type of a GCC
-@@ -40031,166 +9509,148 @@
+@@ -40240,170 +9509,148 @@
  #ifdef __cplusplus
  extern "C"
  #endif
@@ -41777,7 +41982,21 @@
 +done
  
  
--for ac_func in getrlimit fsync fdatasync setpgid
++# select
++for ac_header in sys/select.h
++do :
++  ac_fn_c_check_header_mongrel "$LINENO" "sys/select.h" "ac_cv_header_sys_select_h" "$ac_includes_default"
++if test "x$ac_cv_header_sys_select_h" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_SYS_SELECT_H 1
++_ACEOF
+ 
++fi
+ 
++done
+ 
+ 
+-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
@@ -41787,13 +42006,15 @@
 -else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
-+# select
-+for ac_header in sys/select.h
++# time
++for ac_header in sys/time.h utime.h
 +do :
-+  ac_fn_c_check_header_mongrel "$LINENO" "sys/select.h" "ac_cv_header_sys_select_h" "$ac_includes_default"
-+if test "x$ac_cv_header_sys_select_h" = x""yes; then :
++  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_SELECT_H 1
++#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
@@ -41801,21 +42022,21 @@
 -/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
 -   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
 -#define $ac_func innocuous_$ac_func
- 
+-
 -/* System header to define __stub macros and hopefully few prototypes,
 -    which can conflict with char $ac_func (); below.
 -    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
 -    <limits.h> exists even on freestanding compilers.  */
-+fi
  
 -#ifdef __STDC__
 -# include <limits.h>
 -#else
 -# include <assert.h>
 -#endif
-+done
++fi
  
 -#undef $ac_func
++done
  
 -/* Override any GCC internal prototype to avoid an error.
 -   Use char because int might match the return type of a GCC
@@ -41830,21 +42051,6 @@
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
 -#endif
-+# time
-+for ac_header in sys/time.h utime.h
-+do :
-+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-+eval as_val=\$$as_ac_Header
-+   if test "x$as_val" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-+_ACEOF
-+
-+fi
-+
-+done
-+
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
 +$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
 +if test "${ac_cv_header_time+set}" = set; then :
@@ -41863,9 +42069,9 @@
 +if ((struct tm *) 0)
 +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
@@ -41888,9 +42094,6 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  eval "$as_ac_var=yes"
-+  return 0;
-+}
-+_ACEOF
 +if ac_fn_c_try_compile "$LINENO"; then :
 +  ac_cv_header_time=yes
  else
@@ -41929,7 +42132,7 @@
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
  _ACEOF
-@@ -40199,425 +9659,311 @@
+@@ -40412,426 +9659,311 @@
  done
  
  
@@ -41937,7 +42140,9 @@
 -
 -
 -
--for ac_func in setsid glob strpbrk crypt16 getauthuid
+-
+-
+-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
@@ -42067,10 +42272,11 @@
  _ACEOF
  
  fi
-+
- done
+-done
  
++done
  
+ 
 +case "$host_os" in
 +*linux*)
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken RedHat 7.2 system header files" >&5
@@ -42078,10 +42284,10 @@
 +if test "${libreplace_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS+set}" = set; then :
 +  $as_echo_n "(cached) " >&6
 +else
-+
+ 
 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 +/* end confdefs.h.  */
-+
+ 
 +	#ifdef HAVE_SYS_VFS_H
 +	#include <sys/vfs.h>
 +	#endif
@@ -42095,61 +42301,57 @@
  
 +	int i;
  
-+  ;
-+  return 0;
-+}
-+_ACEOF
-+if ac_fn_c_try_compile "$LINENO"; then :
-+  libreplace_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=no
-+else
-+  libreplace_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=yes
- 
-+fi
-+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-+fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libreplace_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS" >&5
-+$as_echo "$libreplace_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS" >&6; }
-+if test x"$libreplace_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS" = x"yes"; then
- 
-+$as_echo "#define BROKEN_REDHAT_7_SYSTEM_HEADERS 1" >>confdefs.h
- 
-+fi
- 
--for ac_func in sigprocmask sigblock sigaction sigset innetgr setnetgrent getnetgrent endnetgrent
+-for ac_func in setpriv setgidx setuidx setgroups sysconf stat64 fstat64
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
 -$as_echo_n "checking for $ac_func... " >&6; }
 -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for 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
+-  $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
++
++fi
  
 -#undef $ac_func
-+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h.  */
++{ $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
  
 -/* Override any GCC internal prototype to avoid an error.
 -   Use char because int might match the return type of a GCC
@@ -42164,6 +42366,9 @@
 -#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_CAPABILITY_H
 +	#include <sys/capability.h>
 +	#endif
@@ -42246,13 +42451,9 @@
  _ACEOF
  
  fi
--done
--
--
--
++
+ done
  
-+done
- 
 +for ac_func in getpwnam_r getpwuid_r getpwent_r
 +do :
 +  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
@@ -42267,15 +42468,50 @@
 +done
  
  
--for ac_func in initgroups select poll rdchk getgrnam getgrent pathconf
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpwent_r declaration" >&5
++$as_echo_n "checking for getpwent_r declaration... " >&6; }
++if test "${ac_cv_have_getpwent_r_decl+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
+ 
++    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
+ 
++	#include <unistd.h>
++	#include <pwd.h>
+ 
++int
++main ()
++{
++int i = (int)getpwent_r
++  ;
++  return 0;
++}
++_ACEOF
++if ac_fn_c_try_compile "$LINENO"; then :
++  ac_cv_have_getpwent_r_decl=yes
++else
++  ac_cv_have_getpwent_r_decl=no
++fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getpwent_r_decl" >&5
++$as_echo "$ac_cv_have_getpwent_r_decl" >&6; }
++ if test x"$ac_cv_have_getpwent_r_decl" = x"yes"; then
+ 
++$as_echo "#define HAVE_GETPWENT_R_DECL 1" >>confdefs.h
+ 
+-for ac_func in lstat64 fopen64 atexit grantpt lseek64 ftruncate64 posix_fallocate posix_fallocate64
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
 -$as_echo_n "checking for $ac_func... " >&6; }
 -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpwent_r declaration" >&5
-+$as_echo_n "checking for getpwent_r declaration... " >&6; }
-+if test "${ac_cv_have_getpwent_r_decl+set}" = set; then :
++ 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 >conftest.$ac_ext <<_ACEOF
@@ -42283,25 +42519,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
@@ -42316,17 +42556,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"
@@ -42351,19 +42594,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"'`
@@ -42374,52 +42618,13 @@
 -   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 :
@@ -42428,14 +42633,14 @@
 +$as_echo "#define SOLARIS_GETPWENT_R 1" >>confdefs.h
  
  
--for ac_func in setpriv setgidx setuidx setgroups sysconf stat64 fstat64
++fi
+ 
+-for ac_func in fseek64 fseeko64 ftell64 ftello64 setluid getpwanam
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
 -$as_echo_n "checking for $ac_func... " >&6; }
 -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-+fi
-+
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototype struct passwd *getpwent_r(struct passwd *src, char *buf, size_t buflen)" >&5
 +$as_echo_n "checking for prototype struct passwd *getpwent_r(struct passwd *src, char *buf, size_t buflen)... " >&6; }
 +if test "${ac_cv_c_prototype_struct_passwd_pgetpwent_r_struct_passwd_psrc__char_pbuf__size_t_buflen_+set}" = set; then :
@@ -42465,16 +42670,11 @@
 -#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.  */
@@ -42488,6 +42688,11 @@
 -#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
@@ -42564,7 +42769,7 @@
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
  _ACEOF
-@@ -40626,255 +9972,221 @@
+@@ -40840,347 +9972,221 @@
  done
  
  
@@ -42601,15 +42806,14 @@
  
 +$as_echo "#define HAVE_GETGRENT_R_DECL 1" >>confdefs.h
  
-+ fi
- 
--
--for ac_func in lstat64 fopen64 atexit grantpt lseek64 ftruncate64 posix_fallocate posix_fallocate64
+-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
++ fi
++
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototype struct group *getgrent_r(struct group *src, char *buf, int buflen)" >&5
 +$as_echo_n "checking for prototype struct group *getgrent_r(struct group *src, char *buf, int buflen)... " >&6; }
 +if test "${ac_cv_c_prototype_struct_group_pgetgrent_r_struct_group_psrc__char_pbuf__int_buflen_+set}" = set; then :
@@ -42705,11 +42909,22 @@
 -	eval "$as_ac_var=no"
 -fi
 +		ac_cv_c_prototype_struct_group_pgetgrent_r_struct_group_psrc__char_pbuf__int_buflen_=no
++
++fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_prototype_struct_group_pgetgrent_r_struct_group_psrc__char_pbuf__int_buflen_" >&5
++$as_echo "$ac_cv_c_prototype_struct_group_pgetgrent_r_struct_group_psrc__char_pbuf__int_buflen_" >&6; }
++if test $ac_cv_c_prototype_struct_group_pgetgrent_r_struct_group_psrc__char_pbuf__int_buflen_ = yes; then :
++
++
++$as_echo "#define SOLARIS_GETGRENT_R 1" >>confdefs.h
  
 -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
@@ -42720,23 +42935,12 @@
 -  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_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 fseek64 fseeko64 ftell64 ftello64 setluid getpwanam
+-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
@@ -42837,10 +43041,20 @@
 -	eval "$as_ac_var=no"
 +		ac_cv_c_prototype_struct_group_pgetgrent_r_struct_group_psrc__char_pbuf__size_t_buflen_=no
 +
-+fi
+ 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
+ fi
+-ac_res=`eval 'as_val=${'$as_ac_var'}
+-		 $as_echo "$as_val"'`
+-	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+-$as_echo "$ac_res" >&6; }
+-as_val=`eval 'as_val=${'$as_ac_var'}
+-		 $as_echo "$as_val"'`
+-   if test "x$as_val" = x""yes; then
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_prototype_struct_group_pgetgrent_r_struct_group_psrc__char_pbuf__size_t_buflen_" >&5
 +$as_echo "$ac_cv_c_prototype_struct_group_pgetgrent_r_struct_group_psrc__char_pbuf__size_t_buflen_" >&6; }
 +if test $ac_cv_c_prototype_struct_group_pgetgrent_r_struct_group_psrc__char_pbuf__size_t_buflen_ = yes; then :
@@ -42855,14 +43069,25 @@
 +do :
 +  ac_fn_c_check_func "$LINENO" "getgrouplist" "ac_cv_func_getgrouplist"
 +if test "x$ac_cv_func_getgrouplist" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
+   cat >>confdefs.h <<_ACEOF
+-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 +#define HAVE_GETGROUPLIST 1
-+_ACEOF
-+
-+fi
-+done
-+
-+
+ _ACEOF
+ 
+ fi
+ done
+ 
+ 
+-for ac_func in getdents64
+-do
+-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
+-$as_echo_n "checking for $ac_func... " >&6; }
+-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+-  $as_echo_n "(cached) " >&6
+-else
+-  cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
 +# locale
 +for ac_header in ctype.h locale.h langinfo.h
 +do :
@@ -42872,16 +43097,50 @@
 +   if test "x$as_val" = x""yes; then :
 +  cat >>confdefs.h <<_ACEOF
 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-+_ACEOF
-+
- fi
+ _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.  */
  
--rm -rf conftest.dSYM
--rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
--      conftest$ac_exeext conftest.$ac_ext
+-#ifdef __STDC__
+-# include <limits.h>
+-#else
+-# include <assert.h>
+-#endif
++fi
+ 
+-#undef $ac_func
 +done
-+
-+
+ 
+-/* Override any GCC internal prototype to avoid an error.
+-   Use char because int might match the return type of a GCC
+-   builtin and then its argument prototype would still apply.  */
+-#ifdef __cplusplus
+-extern "C"
+-#endif
+-char $ac_func ();
+-/* The GNU C library defines this for functions which it implements
+-    to always fail with ENOSYS.  Some functions are actually named
+-    something starting with __ and the normal name is an alias.  */
+-#if defined __stub_$ac_func || defined __stub___$ac_func
+-choke me
+-#endif
+ 
+-int
+-main ()
+-{
+-return $ac_func ();
+-  ;
+-  return 0;
+-}
 +# glob
 +for ac_header in fnmatch.h
 +do :
@@ -42889,9 +43148,40 @@
 +if test "x$ac_cv_header_fnmatch_h" = x""yes; then :
 +  cat >>confdefs.h <<_ACEOF
 +#define HAVE_FNMATCH_H 1
-+_ACEOF
-+
+ _ACEOF
+-rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (ac_try="$ac_link"
+-case "(($ac_try" in
+-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+-  *) ac_try_echo=$ac_try;;
+-esac
+-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+-$as_echo "$ac_try_echo") >&5
+-  (eval "$ac_link") 2>conftest.er1
+-  ac_status=$?
+-  grep -v '^ *+' conftest.er1 >conftest.err
+-  rm -f conftest.er1
+-  cat conftest.err >&5
+-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); } && {
+-	 test -z "$ac_c_werror_flag" ||
+-	 test ! -s conftest.err
+-       } && test -s conftest$ac_exeext && {
+-	 test "$cross_compiling" = yes ||
+-	 $as_test_x conftest$ac_exeext
+-       }; then
+-  eval "$as_ac_var=yes"
+-else
+-  $as_echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+ 
+-	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
@@ -42899,7 +43189,6 @@
 -as_val=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+
 +done
 +
 +
@@ -42930,56 +43219,56 @@
 +  cat >>confdefs.h <<_ACEOF
 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
 +_ACEOF
-+
+ 
 +fi
  
 +done
  
- 
- 
-+save_LIBS="$LIBS"
-+LIBS=""
- 
--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
 -$as_echo_n "checking for $ac_func... " >&6; }
 -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-+libreplace_cv_dlfcn=no
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
-+$as_echo_n "checking for library containing dlopen... " >&6; }
-+if test "${ac_cv_search_dlopen+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
+-  $as_echo_n "(cached) " >&6
+-else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+  ac_func_search_save_LIBS=$LIBS
-+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
+-/* end confdefs.h.  */
 -/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
 -   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
 -#define $ac_func innocuous_$ac_func
--
+ 
 -/* System header to define __stub macros and hopefully few prototypes,
 -    which can conflict with char $ac_func (); below.
 -    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
 -    <limits.h> exists even on freestanding compilers.  */
--
+ 
 -#ifdef __STDC__
 -# include <limits.h>
 -#else
 -# include <assert.h>
 -#endif
--
++save_LIBS="$LIBS"
++LIBS=""
+ 
 -#undef $ac_func
++libreplace_cv_dlfcn=no
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
++$as_echo_n "checking for library containing dlopen... " >&6; }
++if test "${ac_cv_search_dlopen+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  ac_func_search_save_LIBS=$LIBS
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
     Use char because int might match the return type of a GCC
-@@ -40882,100 +10194,85 @@
+@@ -41188,102 +10194,85 @@
  #ifdef __cplusplus
  extern "C"
  #endif
@@ -43023,6 +43312,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 '' dl; do
 +  if test -z "$ac_lib"; then
 +    ac_res="none required"
@@ -43040,36 +43332,23 @@
 +fi
 +done
 +if test "${ac_cv_search_dlopen+set}" = set; then :
-+
- else
--  $as_echo "$as_me: failed program was:" >&5
--sed 's/^/| /' conftest.$ac_ext >&5
+ 
+-	eval "$as_ac_var=no"
++else
 +  ac_cv_search_dlopen=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_dlopen" >&5
 +$as_echo "$ac_cv_search_dlopen" >&6; }
 +ac_res=$ac_cv_search_dlopen
 +if test "$ac_res" != no; then :
 +  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
  
--	eval "$as_ac_var=no"
- fi
- 
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
-+
-+for ac_header in dlfcn.h
-+do :
-+  ac_fn_c_check_header_mongrel "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default"
-+if test "x$ac_cv_header_dlfcn_h" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define HAVE_DLFCN_H 1
-+_ACEOF
-+
  fi
 -ac_res=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
@@ -43079,25 +43358,37 @@
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
 +
-+done
 +
++for ac_header in dlfcn.h
++do :
++  ac_fn_c_check_header_mongrel "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default"
++if test "x$ac_cv_header_dlfcn_h" = x""yes; then :
+   cat >>confdefs.h <<_ACEOF
+-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
++#define HAVE_DLFCN_H 1
+ _ACEOF
+ 
+ fi
++
+ done
+ 
 +for ac_func in dlopen dlsym dlerror dlclose
 +do :
 +  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
 +eval as_val=\$$as_ac_var
 +   if test "x$as_val" = x""yes; then :
-   cat >>confdefs.h <<_ACEOF
- #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
- _ACEOF
++  cat >>confdefs.h <<_ACEOF
++#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
++_ACEOF
  
 +else
 +  libreplace_cv_dlfcn=yes
- fi
- done
++fi
++done
  
  
--for ac_func in 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
@@ -43136,7 +43427,7 @@
  
  /* Override any GCC internal prototype to avoid an error.
     Use char because int might match the return type of a GCC
-@@ -40983,1172 +10280,612 @@
+@@ -41291,966 +10280,612 @@
  #ifdef __cplusplus
  extern "C"
  #endif
@@ -43253,7 +43544,8 @@
  done
  
  
--for ac_func in getdents64
+-
+-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
@@ -43348,8 +43640,10 @@
 -sed 's/^/| /' conftest.$ac_ext >&5
  
 -	eval "$as_ac_var=no"
--fi
 +		ac_cv_c_prototype_void_pdlopen_const_charp_filename__unsigned_int_flags_=no
++
+ fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
@@ -43365,20 +43659,19 @@
 -  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_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 "#define DLOPEN_TAKES_UNSIGNED_FLAGS 1" >>confdefs.h
  
--for ac_func in setenv strcasecmp fcvt fcvtl
+-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
@@ -43395,22 +43688,27 @@
 -/* 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 test x"${libreplace_cv_dlfcn}" = x"yes";then
++	LIBREPLACEOBJ="${LIBREPLACEOBJ} $libreplacedir/dlfcn.o"
++fi
  
 -/* System header to define __stub macros and hopefully few prototypes,
 -    which can conflict with char $ac_func (); below.
 -    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
 -    <limits.h> exists even on freestanding compilers.  */
-+fi
++LIBDL="$LIBS"
  
 -#ifdef __STDC__
 -# include <limits.h>
 -#else
 -# include <assert.h>
 -#endif
++LIBS="$save_LIBS"
  
 -#undef $ac_func
-+if test x"${libreplace_cv_dlfcn}" = x"yes";then
-+	LIBREPLACEOBJ="${LIBREPLACEOBJ} $libreplacedir/dlfcn.o"
++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
  
 -/* Override any GCC internal prototype to avoid an error.
@@ -43426,130 +43724,32 @@
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
 -#endif
-+LIBDL="$LIBS"
- 
--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
-+LIBS="$save_LIBS"
- 
--	eval "$as_ac_var=no"
-+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
- 
--rm -rf conftest.dSYM
--rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
--      conftest$ac_exeext conftest.$ac_ext
 +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
--ac_res=`eval 'as_val=${'$as_ac_var'}
--		 $as_echo "$as_val"'`
--	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
--$as_echo "$ac_res" >&6; }
--as_val=`eval 'as_val=${'$as_ac_var'}
--		 $as_echo "$as_val"'`
--   if test "x$as_val" = x""yes; then
--  cat >>confdefs.h <<_ACEOF
--#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
--_ACEOF
- 
--fi
--done
++fi
++
 +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 syslog vsyslog timegm
--do
--as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
--{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
--$as_echo_n "checking for $ac_func... " >&6; }
--if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
--  $as_echo_n "(cached) " >&6
++
 +	LIBREPLACEOBJ="${LIBREPLACEOBJ} $libreplacedir/getpass.o"
- 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
++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
- 
--#undef $ac_func
++
 +SAVE_CPPFLAGS="$CPPFLAGS"
 +CPPFLAGS="$CPPFLAGS -I$libreplacedir/"
 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 +/* end confdefs.h.  */
- 
--/* Override any GCC internal prototype to avoid an error.
--   Use char because int might match the return type of a GCC
--   builtin and then its argument prototype would still apply.  */
--#ifdef __cplusplus
--extern "C"
--#endif
--char $ac_func ();
--/* The GNU C library defines this for functions which it implements
--    to always fail with ENOSYS.  Some functions are actually named
--    something starting with __ and the normal name is an alias.  */
--#if defined __stub_$ac_func || defined __stub___$ac_func
--choke me
--#endif
++
 +#include "confdefs.h"
 +#define NO_CONFIG_H
 +#include "$libreplacedir/getpass.c"
@@ -43590,16 +43790,23 @@
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
--	eval "$as_ac_var=no"
 +  libreplace_cv_REPLACE_GETPASS=no
- fi
++fi
 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 +CPPFLAGS="$SAVE_CPPFLAGS"
  
+-	eval "$as_ac_var=no"
+ fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libreplace_cv_REPLACE_GETPASS" >&5
++$as_echo "$libreplace_cv_REPLACE_GETPASS" >&6; }
++if test x"$libreplace_cv_REPLACE_GETPASS" = x"yes"; then
++
++$as_echo "#define REPLACE_GETPASS 1" >>confdefs.h
+ 
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
++	LIBREPLACEOBJ="${LIBREPLACEOBJ} $libreplacedir/getpass.o"
  fi
 -ac_res=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
@@ -43611,136 +43818,46 @@
 -  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
  
--fi
--done
-+$as_echo "#define REPLACE_GETPASS 1" >>confdefs.h
- 
-+	LIBREPLACEOBJ="${LIBREPLACEOBJ} $libreplacedir/getpass.o"
 +fi
- 
-+fi
- 
--for ac_func in setlocale nl_langinfo
--do
--as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
--{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
--$as_echo_n "checking for $ac_func... " >&6; }
--if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
++
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking 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
--  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
++  $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.  */
- 
--/* 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
++
 +		#define LIBREPLACE_CONFIGURE_TEST_STRPTIME
 +		#include "$libreplacedir/test/strptime.c"
- 
--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"
++
++_ACEOF
 +if ac_fn_c_try_run "$LINENO"; then :
 +  libreplace_cv_STRPTIME_OK=yes
  else
--  $as_echo "$as_me: failed program was:" >&5
--sed 's/^/| /' conftest.$ac_ext >&5
 +  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
-+
  
--	eval "$as_ac_var=no"
- 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
  
--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_STRPTIME 1" >>confdefs.h
-+
+-ac_check_lib_ext_save_LIBS=$LIBS
+-LIBS="-lrt $LIBS  $LIBS"
 +        LIBREPLACEOBJ="${LIBREPLACEOBJ} $libreplacedir/strptime.o"
- fi
--ac_res=`eval 'as_val=${'$as_ac_var'}
--		 $as_echo "$as_val"'`
--	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
--$as_echo "$ac_res" >&6; }
--as_val=`eval 'as_val=${'$as_ac_var'}
--		 $as_echo "$as_val"'`
--   if test "x$as_val" = x""yes; then
++fi
 +
 +for ac_header in direct.h windows.h winsock2.h ws2tcpip.h
 +do :
@@ -43748,22 +43865,18 @@
 +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
++_ACEOF
  
- fi
-+
- done
++fi
  
++done
  
--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
--$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 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
 +#######################################
 +# Check for mkdir mode
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mkdir supports mode" >&5
@@ -43778,37 +43891,14 @@
 -cat >>conftest.$ac_ext <<_ACEOF
 +  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
--/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
--   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
--#define $ac_func innocuous_$ac_func
--
--/* System header to define __stub macros and hopefully few prototypes,
--    which can conflict with char $ac_func (); below.
--    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
--    <limits.h> exists even on freestanding compilers.  */
--
--#ifdef __STDC__
--# include <limits.h>
--#else
--# include <assert.h>
--#endif
--
--#undef $ac_func
--
+ 
 -/* Override any GCC internal prototype to avoid an error.
 -   Use char because int might match the return type of a GCC
 -   builtin and then its argument prototype would still apply.  */
 -#ifdef __cplusplus
 -extern "C"
 -#endif
--char $ac_func ();
--/* The GNU C library defines this for functions which it implements
--    to always fail with ENOSYS.  Some functions are actually named
--    something starting with __ and the normal name is an alias.  */
--#if defined __stub_$ac_func || defined __stub___$ac_func
--choke me
--#endif
- 
+-char nanosleep ();
 +		#include <stdio.h>
 +		#ifdef HAVE_DIRECT_H
 +		#include <direct.h>
@@ -43816,7 +43906,7 @@
  int
  main ()
  {
--return $ac_func ();
+-return nanosleep ();
 +
 +			mkdir("foo",0777);
 +			return 0;
@@ -43846,14 +43936,16 @@
 -	 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
 +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"
+-	ac_cv_lib_ext_rt_nanosleep=no;
+-		  ac_cv_lib_ext_rt=no
 +  libreplace_cv_mkdir_has_mode="no"
 +fi
 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
@@ -43863,44 +43955,50 @@
 +
 +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
++$as_echo "#define HAVE_MKDIR_MODE 1" >>confdefs.h
+ 
  fi
--ac_res=`eval 'as_val=${'$as_ac_var'}
--		 $as_echo "$as_val"'`
--	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
--$as_echo "$ac_res" >&6; }
--as_val=`eval 'as_val=${'$as_ac_var'}
--		 $as_echo "$as_val"'`
--   if test "x$as_val" = x""yes; then
+-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ext_rt_nanosleep" >&5
+-$as_echo "$ac_cv_lib_ext_rt_nanosleep" >&6; }
+-    if test $ac_cv_lib_ext_rt_nanosleep = yes; then
 +
 +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_NANOSLEEP 1
 +#define HAVE_TIMEGM 1
  _ACEOF
  
- else
++else
 +  LIBREPLACEOBJ="${LIBREPLACEOBJ} $libreplacedir/timegm.o"
-+fi
+ fi
 +done
  
+-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
 +{ $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
  
--ac_check_lib_ext_save_LIBS=$LIBS
--LIBS="-lrt $LIBS  $LIBS"
+-		case "$LIBS" in
+-		    *-lrt*)
+-			;;
+-		    *)
+-			LIBS="-lrt $LIBS"
+-			;;
+-		esac
 +	if test "$cross_compiling" = yes; then :
 +  libreplace_cv_READDIR_NEEDED="assuming not"
 +else
@@ -43920,7 +44018,7 @@
 +fi
  
  
-+fi
+ fi
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libreplace_cv_READDIR_NEEDED" >&5
 +$as_echo "$libreplace_cv_READDIR_NEEDED" >&6; }
 +
@@ -43931,14 +44029,17 @@
 +  cat >>confdefs.h <<_ACEOF
 +#define HAVE_DIRFD 1
 +_ACEOF
-+
-+fi
-+done
  
+ 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
+ 
+-for ac_func in utimensat
+-do
+-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
+-$as_echo_n "checking for $ac_func... " >&6; }
+-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
 + { $as_echo "$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 :
@@ -43950,21 +44051,44 @@
 -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 nanosleep ();
+-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 <dirent.h>
  int
  main ()
  {
--return nanosleep ();
+-return $ac_func ();
 +int i = (int)dirfd
    ;
    return 0;
@@ -43991,43 +44115,43 @@
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
--  ac_cv_lib_ext_rt_nanosleep=yes;
--		  ac_cv_lib_ext_rt=yes
+-  eval "$as_ac_var=yes"
 +if ac_fn_c_try_compile "$LINENO"; then :
 +  ac_cv_have_dirfd_decl=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
+-	eval "$as_ac_var=no"
 +  ac_cv_have_dirfd_decl=no
  fi
 -
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
--
 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  fi
--{ $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
+-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 HAVE_NANOSLEEP 1
+-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 -_ACEOF
 +{ $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
  
 -fi
+-done
 +$as_echo "#define HAVE_DIRFD_DECL 1" >>confdefs.h
-+
+ 
 + fi
  
--LIBS=$ac_check_lib_ext_save_LIBS
  
--if test $ac_cv_lib_ext_rt = yes; then
 +#
 +# try to replace with getdirentries() if needed
 +#
@@ -44036,27 +44160,14 @@
 +do :
 +  ac_fn_c_check_func "$LINENO" "getdirentries" "ac_cv_func_getdirentries"
 +if test "x$ac_cv_func_getdirentries" = x""yes; then :
-   cat >>confdefs.h <<_ACEOF
--#define HAVE_LIBRT 1
++  cat >>confdefs.h <<_ACEOF
 +#define HAVE_GETDIRENTRIES 1
- _ACEOF
++_ACEOF
  
--		case "$LIBS" in
--		    *-lrt*)
--			;;
--		    *)
--			LIBS="-lrt $LIBS"
--			;;
--		esac
--
--
--fi
--
- fi
- done
++fi
++done
  
--
--for ac_func in utimensat
+-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
@@ -44180,15 +44291,15 @@
 +$as_echo "#define TELLDIR_TAKES_CONST_DIR 1" >>confdefs.h
  
  
-+fi
- 
--for ac_func in mlock munlock mlockall munlockall
+-for ac_func in memalign posix_memalign hstrerror
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
 -$as_echo_n "checking for $ac_func... " >&6; }
 -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
++fi
 +
++
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototype int seekdir(DIR *dir, long ofs)" >&5
 +$as_echo_n "checking for prototype int seekdir(DIR *dir, long ofs)... " >&6; }
 +if test "${ac_cv_c_prototype_int_seekdir_DIR_pdir__long_ofs_+set}" = set; then :
@@ -44304,155 +44415,6 @@
 +if test $ac_cv_c_prototype_int_seekdir_DIR_pdir__long_ofs_ = yes; then :
  
  
-+$as_echo "#define SEEKDIR_RETURNS_INT 1" >>confdefs.h
- 
- 
--for ac_func in memalign posix_memalign hstrerror
--do
--as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
--{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
--$as_echo_n "checking for $ac_func... " >&6; }
--if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-+fi
-+
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for replacing readdir using getdirentries()" >&5
-+$as_echo_n "checking for replacing readdir using getdirentries()... " >&6; }
-+if test "${libreplace_cv_READDIR_GETDIRENTRIES+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
--  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.  */
--/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
--   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
--#define $ac_func innocuous_$ac_func
- 
--/* System header to define __stub macros and hopefully few prototypes,
--    which can conflict with char $ac_func (); below.
--    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
--    <limits.h> exists even on freestanding compilers.  */
-+#define _LIBREPLACE_REPLACE_H
-+#include "$libreplacedir/repdir_getdirentries.c"
-+#define test_readdir_os2_delete main
-+#include "$libreplacedir/test/os2_delete.c"
-+_ACEOF
-+if ac_fn_c_try_run "$LINENO"; then :
-+  libreplace_cv_READDIR_GETDIRENTRIES=yes
-+else
-+  libreplace_cv_READDIR_GETDIRENTRIES=no
-+fi
-+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-+  conftest.$ac_objext conftest.beam conftest.$ac_ext
-+fi
- 
--#ifdef __STDC__
--# include <limits.h>
--#else
--# include <assert.h>
--#endif
- 
--#undef $ac_func
-+fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libreplace_cv_READDIR_GETDIRENTRIES" >&5
-+$as_echo "$libreplace_cv_READDIR_GETDIRENTRIES" >&6; }
-+fi
-+if test x"$libreplace_cv_READDIR_GETDIRENTRIES" = x"yes"; then
- 
--/* Override any GCC internal prototype to avoid an error.
--   Use char because int might match the return type of a GCC
--   builtin and then its argument prototype would still apply.  */
--#ifdef __cplusplus
--extern "C"
--#endif
--char $ac_func ();
--/* The GNU C library defines this for functions which it implements
--    to always fail with ENOSYS.  Some functions are actually named
--    something starting with __ and the normal name is an alias.  */
--#if defined __stub_$ac_func || defined __stub___$ac_func
--choke me
--#endif
-+$as_echo "#define REPLACE_READDIR 1" >>confdefs.h
- 
--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
-+$as_echo "#define REPLACE_READDIR_GETDIRENTRIES 1" >>confdefs.h
- 
--rm -rf conftest.dSYM
--rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
--      conftest$ac_exeext conftest.$ac_ext
-+	LIBREPLACEOBJ="${LIBREPLACEOBJ} $libreplacedir/repdir_getdirentries.o"
-+	libreplace_cv_READDIR_NEEDED=no
- fi
--ac_res=`eval 'as_val=${'$as_ac_var'}
--		 $as_echo "$as_val"'`
--	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
--$as_echo "$ac_res" >&6; }
--as_val=`eval 'as_val=${'$as_ac_var'}
--		 $as_echo "$as_val"'`
--   if test "x$as_val" = x""yes; then
-+
-+#
-+# try to replace with getdents() if needed
-+#
-+if test x"$libreplace_cv_READDIR_NEEDED" = x"yes"; then
-+for ac_func in getdents
-+do :
-+  ac_fn_c_check_func "$LINENO" "getdents" "ac_cv_func_getdents"
-+if test "x$ac_cv_func_getdents" = x""yes; then :
-   cat >>confdefs.h <<_ACEOF
--#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-+#define HAVE_GETDENTS 1
- _ACEOF
- 
- fi
- done
- 
--
 -for ac_header in sys/mman.h
 -do
 -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
@@ -44460,16 +44422,13 @@
 -  { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
 -$as_echo_n "checking for $ac_header... " >&6; }
 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for replacing readdir using getdents()" >&5
-+$as_echo_n "checking for replacing readdir using getdents()... " >&6; }
-+if test "${libreplace_cv_READDIR_GETDENTS+set}" = set; then :
-   $as_echo_n "(cached) " >&6
+-  $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; }
@@ -44478,24 +44437,10 @@
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+
-+	if test "$cross_compiling" = yes; then :
-+  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-+as_fn_error "cannot run test program while cross compiling
-+See \`config.log' for more details." "$LINENO" 5; }
-+else
-+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
+-/* end confdefs.h.  */
 -$ac_includes_default
 -#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
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -44515,29 +44460,23 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_header_compiler=yes
-+if ac_fn_c_try_run "$LINENO"; then :
-+  libreplace_cv_READDIR_GETDENTS=yes
- else
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+  libreplace_cv_READDIR_GETDENTS=no
-+fi
-+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-+  conftest.$ac_objext conftest.beam conftest.$ac_ext
-+fi
++$as_echo "#define SEEKDIR_RETURNS_INT 1" >>confdefs.h
++
  
 -	ac_header_compiler=no
-+
-+fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libreplace_cv_READDIR_GETDENTS" >&5
-+$as_echo "$libreplace_cv_READDIR_GETDENTS" >&6; }
  fi
-+if test x"$libreplace_cv_READDIR_GETDENTS" = x"yes"; then
  
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 -$as_echo "$ac_header_compiler" >&6; }
-+$as_echo "#define REPLACE_READDIR 1" >>confdefs.h
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for replacing readdir using getdirentries()" >&5
++$as_echo_n "checking for replacing readdir using getdirentries()... " >&6; }
++if test "${libreplace_cv_READDIR_GETDIRENTRIES+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
  
 -# Is the header present?
 -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
@@ -44547,9 +44486,21 @@
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
++	if test "$cross_compiling" = yes; then :
++  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
++$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
++as_fn_error "cannot run test program while cross compiling
++See \`config.log' for more details." "$LINENO" 5; }
++else
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
 -#include <$ac_header>
--_ACEOF
++
++#define _LIBREPLACE_REPLACE_H
++#include "$libreplacedir/repdir_getdirentries.c"
++#define test_readdir_os2_delete main
++#include "$libreplacedir/test/os2_delete.c"
+ _ACEOF
 -if { (ac_try="$ac_cpp conftest.$ac_ext"
 -case "(($ac_try" in
 -  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -44568,20 +44519,22 @@
 -	 test ! -s conftest.err
 -       }; then
 -  ac_header_preproc=yes
--else
++if ac_fn_c_try_run "$LINENO"; then :
++  libreplace_cv_READDIR_GETDIRENTRIES=yes
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
- 
+-
 -  ac_header_preproc=no
--fi
-+$as_echo "#define REPLACE_READDIR_GETDENTS 1" >>confdefs.h
++  libreplace_cv_READDIR_GETDIRENTRIES=no
++fi
++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
++  conftest.$ac_objext conftest.beam conftest.$ac_ext
+ fi
  
 -rm -f conftest.err conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
 -$as_echo "$ac_header_preproc" >&6; }
-+	LIBREPLACEOBJ="${LIBREPLACEOBJ} $libreplacedir/repdir_getdents.o"
-+	libreplace_cv_READDIR_NEEDED=no
-+fi
  
 -# So?  What about this header?
 -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
@@ -44617,40 +44570,45 @@
 -$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 a usable readdir()" >&5
-+$as_echo_n "checking a usable readdir()... " >&6; }
-+if test x"$libreplace_cv_READDIR_NEEDED" = x"yes"; then
-+	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-+$as_echo "no" >&6; }
-+	{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: the provided readdir() is broken" >&5
-+$as_echo "$as_me: WARNING: the provided readdir() is broken" >&2;}
- else
+-else
 -  eval "$as_ac_Header=\$ac_header_preproc"
-+	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-+$as_echo "yes" >&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; }
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libreplace_cv_READDIR_GETDIRENTRIES" >&5
++$as_echo "$libreplace_cv_READDIR_GETDIRENTRIES" >&6; }
++fi
++if test x"$libreplace_cv_READDIR_GETDIRENTRIES" = x"yes"; then
++
++$as_echo "#define REPLACE_READDIR 1" >>confdefs.h
  
--fi
++
++$as_echo "#define REPLACE_READDIR_GETDIRENTRIES 1" >>confdefs.h
++
++	LIBREPLACEOBJ="${LIBREPLACEOBJ} $libreplacedir/repdir_getdirentries.o"
++	libreplace_cv_READDIR_NEEDED=no
+ fi
 -as_val=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+###############################################
-+# test for where we get crypt() from
-+for ac_header in crypt.h
++
++#
++# try to replace with getdents() if needed
++#
++if test x"$libreplace_cv_READDIR_NEEDED" = x"yes"; then
++for ac_func in getdents
 +do :
-+  ac_fn_c_check_header_mongrel "$LINENO" "crypt.h" "ac_cv_header_crypt_h" "$ac_includes_default"
-+if test "x$ac_cv_header_crypt_h" = x""yes; then :
++  ac_fn_c_check_func "$LINENO" "getdents" "ac_cv_func_getdents"
++if test "x$ac_cv_func_getdents" = x""yes; then :
    cat >>confdefs.h <<_ACEOF
 -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-+#define HAVE_CRYPT_H 1
++#define HAVE_GETDENTS 1
  _ACEOF
  
  fi
- 
+-
  done
  
 -# setbuffer, shmget, shm_open are needed for smbtorture
@@ -44662,9 +44620,9 @@
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
 -$as_echo_n "checking for $ac_func... " >&6; }
 -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt" >&5
-+$as_echo_n "checking for library containing crypt... " >&6; }
-+if test "${ac_cv_search_ext_crypt+set}" = set; then :
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for replacing readdir using getdents()" >&5
++$as_echo_n "checking for replacing readdir using getdents()... " >&6; }
++if test "${libreplace_cv_READDIR_GETDENTS+set}" = set; then :
    $as_echo_n "(cached) " >&6
  else
 -  cat >conftest.$ac_ext <<_ACEOF
@@ -44672,7 +44630,15 @@
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
++
++	if test "$cross_compiling" = yes; then :
++  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
++$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
++as_fn_error "cannot run test program while cross compiling
++See \`config.log' for more details." "$LINENO" 5; }
++else
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
 -/* 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
@@ -44681,25 +44647,40 @@
 -    which can conflict with char $ac_func (); below.
 -    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
 -    <limits.h> exists even on freestanding compilers.  */
--
++#define _LIBREPLACE_REPLACE_H
++#error _donot_use_getdents_replacement_anymore
++#include "$libreplacedir/repdir_getdents.c"
++#define test_readdir_os2_delete main
++#include "$libreplacedir/test/os2_delete.c"
++_ACEOF
++if ac_fn_c_try_run "$LINENO"; then :
++  libreplace_cv_READDIR_GETDENTS=yes
++else
++  libreplace_cv_READDIR_GETDENTS=no
++fi
++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
++  conftest.$ac_objext conftest.beam conftest.$ac_ext
++fi
+ 
 -#ifdef __STDC__
 -# include <limits.h>
 -#else
 -# include <assert.h>
 -#endif
--
+ 
 -#undef $ac_func
-+ac_func_search_ext_save_LIBS=$LIBS
-+ac_cv_search_ext_crypt=no
-+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h.  */
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libreplace_cv_READDIR_GETDENTS" >&5
++$as_echo "$libreplace_cv_READDIR_GETDENTS" >&6; }
++fi
++if test x"$libreplace_cv_READDIR_GETDENTS" = x"yes"; then
  
- /* Override any GCC internal prototype to avoid an error.
-    Use char because int might match the return type of a GCC
-@@ -42156,101 +10893,25 @@
- #ifdef __cplusplus
- extern "C"
- #endif
+-/* Override any GCC internal prototype to avoid an error.
+-   Use char because int might match the return type of a GCC
+-   builtin and then its argument prototype would still apply.  */
+-#ifdef __cplusplus
+-extern "C"
+-#endif
 -char $ac_func ();
 -/* The GNU C library defines this for functions which it implements
 -    to always fail with ENOSYS.  Some functions are actually named
@@ -44707,17 +44688,16 @@
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
 -#endif
--
-+char crypt ();
- int
- main ()
- {
++$as_echo "#define REPLACE_READDIR 1" >>confdefs.h
+ 
+-int
+-main ()
+-{
 -return $ac_func ();
-+return crypt ();
-   ;
-   return 0;
- }
- _ACEOF
+-  ;
+-  return 0;
+-}
+-_ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -44743,14 +44723,28 @@
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
+ 
 -	eval "$as_ac_var=no"
--fi
--
++$as_echo "#define REPLACE_READDIR_GETDENTS 1" >>confdefs.h
++
++	LIBREPLACEOBJ="${LIBREPLACEOBJ} $libreplacedir/repdir_getdents.o"
++	libreplace_cv_READDIR_NEEDED=no
+ fi
+ 
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
--fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking a usable readdir()" >&5
++$as_echo_n "checking a usable readdir()... " >&6; }
++if test x"$libreplace_cv_READDIR_NEEDED" = x"yes"; then
++	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++	{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: the provided readdir() is broken" >&5
++$as_echo "$as_me: WARNING: the provided readdir() is broken" >&2;}
++else
++	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }
+ fi
 -ac_res=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
@@ -44758,37 +44752,41 @@
 -as_val=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
--  cat >>confdefs.h <<_ACEOF
++
++###############################################
++# test for where we get crypt() from
++for ac_header in crypt.h
++do :
++  ac_fn_c_check_header_mongrel "$LINENO" "crypt.h" "ac_cv_header_crypt_h" "$ac_includes_default"
++if test "x$ac_cv_header_crypt_h" = x""yes; then :
+   cat >>confdefs.h <<_ACEOF
 -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
--_ACEOF
--
-+if ac_fn_c_try_link "$LINENO"; then :
-+  ac_cv_search_ext_crypt="none required"
++#define HAVE_CRYPT_H 1
+ _ACEOF
+ 
  fi
 -done
 -
--
--
+ 
++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_n "(cached) " >&6
--else
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt" >&5
++$as_echo_n "checking for library containing crypt... " >&6; }
++if test "${ac_cv_search_ext_crypt+set}" = set; then :
+   $as_echo_n "(cached) " >&6
+ else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+rm -f core conftest.err conftest.$ac_objext \
-+    conftest$ac_exeext conftest.$ac_ext
-+if test "$ac_cv_search_ext_crypt" = no; then
-+  for ac_lib in crypt; do
-+    LIBS="-l$ac_lib $CRYPT_LIBS  $ac_func_search_save_ext_LIBS"
-+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
+-/* 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
@@ -44797,7 +44795,7 @@
 -    which can conflict with char $ac_func (); below.
 -    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
 -    <limits.h> exists even on freestanding compilers.  */
--
+ 
 -#ifdef __STDC__
 -# include <limits.h>
 -#else
@@ -44805,10 +44803,14 @@
 -#endif
 -
 -#undef $ac_func
++ac_func_search_ext_save_LIBS=$LIBS
++ac_cv_search_ext_crypt=no
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
     Use char because int might match the return type of a GCC
-@@ -42258,1278 +10919,665 @@
+@@ -42258,101 +10893,25 @@
  #ifdef __cplusplus
  extern "C"
  #endif
@@ -44857,29 +44859,12 @@
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	eval "$as_ac_var=no"
-+if ac_fn_c_try_link "$LINENO"; then :
-+  ac_cv_search_ext_crypt="-l$ac_lib"
-+break
-+fi
-+rm -f core conftest.err conftest.$ac_objext \
-+    conftest$ac_exeext conftest.$ac_ext
-+  done
-+fi
-+LIBS=$ac_func_search_ext_save_LIBS
- fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_ext_crypt" >&5
-+$as_echo "$ac_cv_search_ext_crypt" >&6; }
-+if test "$ac_cv_search_ext_crypt" != no; then :
-+  test "$ac_cv_search_ext_crypt" = "none required" || CRYPT_LIBS="$ac_cv_search_ext_crypt $CRYPT_LIBS"
- 
+-fi
+-
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
-+$as_echo "#define HAVE_CRYPT 1" >>confdefs.h
-+
-+else
-+   LIBREPLACEOBJ="${LIBREPLACEOBJ} $libreplacedir/crypt.o"
- fi
+-fi
 -ac_res=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
@@ -44887,26 +44872,17 @@
 -as_val=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+
-+
-+for ac_func in printf memset memcpy
-+do :
-+  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-+eval as_val=\$$as_ac_var
-+   if test "x$as_val" = x""yes; then :
-   cat >>confdefs.h <<_ACEOF
- #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
- _ACEOF
- 
-+else
-+  as_fn_error "Required function not found" "$LINENO" 5
+-  cat >>confdefs.h <<_ACEOF
+-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+-_ACEOF
+-
++if ac_fn_c_try_link "$LINENO"; then :
++  ac_cv_search_ext_crypt="none required"
  fi
- done
- 
- 
-+echo "LIBREPLACE_BROKEN_CHECKS: END"
- 
+-done
+-
+-
+-
 -for ac_func in bindtextdomain textdomain
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
@@ -44920,7 +44896,13 @@
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
++if test "$ac_cv_search_ext_crypt" = no; then
++  for ac_lib in crypt; do
++    LIBS="-l$ac_lib $CRYPT_LIBS  $ac_func_search_save_ext_LIBS"
++    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
 -/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
 -   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
 -#define $ac_func innocuous_$ac_func
@@ -44937,13 +44919,13 @@
 -#endif
 -
 -#undef $ac_func
--
--/* Override any GCC internal prototype to avoid an error.
--   Use char because int might match the return type of a GCC
--   builtin and then its argument prototype would still apply.  */
--#ifdef __cplusplus
--extern "C"
--#endif
+ 
+ /* Override any GCC internal prototype to avoid an error.
+    Use char because int might match the return type of a GCC
+@@ -42360,1176 +10919,665 @@
+ #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
@@ -44952,14 +44934,16 @@
 -choke me
 -#endif
 -
--int
--main ()
--{
++char crypt ();
+ int
+ main ()
+ {
 -return $ac_func ();
--  ;
--  return 0;
--}
--_ACEOF
++return crypt ();
+   ;
+   return 0;
+ }
+ _ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -44982,15 +44966,38 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  eval "$as_ac_var=yes"
--else
++if ac_fn_c_try_link "$LINENO"; then :
++  ac_cv_search_ext_crypt="-l$ac_lib"
++break
++fi
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
++  done
++fi
++LIBS=$ac_func_search_ext_save_LIBS
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_ext_crypt" >&5
++$as_echo "$ac_cv_search_ext_crypt" >&6; }
++if test "$ac_cv_search_ext_crypt" != no; then :
++  test "$ac_cv_search_ext_crypt" = "none required" || CRYPT_LIBS="$ac_cv_search_ext_crypt $CRYPT_LIBS"
++
++$as_echo "#define HAVE_CRYPT 1" >>confdefs.h
++
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+for ac_func in syslog
++   LIBREPLACEOBJ="${LIBREPLACEOBJ} $libreplacedir/crypt.o"
++fi
++
++
++for ac_func in printf memset memcpy
 +do :
-+  ac_fn_c_check_func "$LINENO" "syslog" "ac_cv_func_syslog"
-+if test "x$ac_cv_func_syslog" = x""yes; then :
++  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
++ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
++eval as_val=\$$as_ac_var
++   if test "x$as_val" = x""yes; then :
 +  cat >>confdefs.h <<_ACEOF
-+#define HAVE_SYSLOG 1
++#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 +_ACEOF
  
 -	eval "$as_ac_var=no"
@@ -45011,29 +45018,22 @@
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
 +
-+echo "LIBREPLACE_NETWORK_CHECKS: START"
++echo "LIBREPLACE_BROKEN_CHECKS: END"
 +
-+
-+$as_echo "#define LIBREPLACE_NETWORK_CHECKS 1" >>confdefs.h
-+
-+LIBREPLACE_NETWORK_OBJS=""
-+LIBREPLACE_NETWORK_LIBS=""
-+
-+for ac_header in sys/socket.h netinet/in.h netdb.h arpa/inet.h
++for ac_func in syslog
 +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" "syslog" "ac_cv_func_syslog"
++if test "x$ac_cv_func_syslog" = 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_SYSLOG 1
  _ACEOF
  
++else
++  as_fn_error "Required function not found" "$LINENO" 5
  fi
--done
+ done
  
-+done
  
 -for ac_func in strupr
 -do
@@ -45045,12 +45045,22 @@
 -else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
-+for ac_header in netinet/in_systm.h
++echo "LIBREPLACE_NETWORK_CHECKS: START"
++
++
++$as_echo "#define LIBREPLACE_NETWORK_CHECKS 1" >>confdefs.h
++
++LIBREPLACE_NETWORK_OBJS=""
++LIBREPLACE_NETWORK_LIBS=""
++
++for ac_header in sys/socket.h netinet/in.h netdb.h arpa/inet.h
 +do :
-+  ac_fn_c_check_header_mongrel "$LINENO" "netinet/in_systm.h" "ac_cv_header_netinet_in_systm_h" "$ac_includes_default"
-+if test "x$ac_cv_header_netinet_in_systm_h" = x""yes; then :
++  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
++ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
++eval as_val=\$$as_ac_Header
++   if test "x$as_val" = x""yes; then :
 +  cat >>confdefs.h <<_ACEOF
-+#define HAVE_NETINET_IN_SYSTM_H 1
++#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
@@ -45058,21 +45068,28 @@
 -/* 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
-+fi
++done
  
 -#undef $ac_func
-+done
++for ac_header in netinet/in_systm.h
++do :
++  ac_fn_c_check_header_mongrel "$LINENO" "netinet/in_systm.h" "ac_cv_header_netinet_in_systm_h" "$ac_includes_default"
++if test "x$ac_cv_header_netinet_in_systm_h" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_NETINET_IN_SYSTM_H 1
++_ACEOF
  
 -/* Override any GCC internal prototype to avoid an error.
 -   Use char because int might match the return type of a GCC
@@ -45087,6 +45104,17 @@
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
 -#endif
++fi
+ 
+-int
+-main ()
+-{
+-return $ac_func ();
+-  ;
+-  return 0;
+-}
++done
++
 +for ac_header in netinet/ip.h
 +do :
 +  ac_fn_c_check_header_compile "$LINENO" "netinet/ip.h" "ac_cv_header_netinet_ip_h" "
@@ -45097,14 +45125,7 @@
 +	#ifdef HAVE_NETINET_IN_SYSTM_H
 +	#include <netinet/in_systm.h>
 +	#endif
- 
--int
--main ()
--{
--return $ac_func ();
--  ;
--  return 0;
--}
++
 +"
 +if test "x$ac_cv_header_netinet_ip_h" = x""yes; then :
 +  cat >>confdefs.h <<_ACEOF
@@ -45503,13 +45524,13 @@
 -      conftest$ac_exeext
 -  if test "${ac_cv_search_backtrace_symbols+set}" = set; then
 -  break
--fi
+ fi
 -done
 -if test "${ac_cv_search_backtrace_symbols+set}" = set; then
 -  :
 -else
 -  ac_cv_search_backtrace_symbols=no
- fi
+-fi
 -rm conftest.$ac_ext
 -LIBS=$ac_func_search_save_LIBS
 -fi
@@ -46317,14 +46338,14 @@
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_LIBUNWIND 1
 -_ACEOF
+-
 +if ac_fn_c_try_compile "$LINENO"; then :
  
-+		libreplace_cv_HAVE_UNIXSOCKET=yes
- 
 -	# If we have libunwind, test whether we also have libunwind-ptrace
 -	# which would let us unwind arbitrary processes.
 -	save_LIBS=$LIBS
--
++		libreplace_cv_HAVE_UNIXSOCKET=yes
+ 
 -for ac_header in libunwind-ptrace.h
 -do
 -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
@@ -46338,7 +46359,7 @@
 -		 $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; }
@@ -46370,7 +46391,7 @@
 -	 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
  
@@ -46513,7 +46534,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -43538,349 +11586,197 @@
+@@ -43538,349 +11586,131 @@
  #ifdef __cplusplus
  extern "C"
  #endif
@@ -46587,15 +46608,33 @@
 -
 -else
 -   LIBUNWIND_PTRACE=""
+-fi
+-
+-
+-	LIBS=$save_LIBS
+-
+-else
+-  $as_echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-
+-	{ $as_echo "$as_me:$LINENO: result: no" >&5
+-$as_echo "no" >&6; }
+-	LIBS=$save_LIBS
+-
  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
 +if test $ac_cv_lib_ext_nsl_s = yes; then :
 +  cat >>confdefs.h <<_ACEOF
 +#define HAVE_LIBNSL_S 1
 +_ACEOF
  
--	LIBS=$save_LIBS
+-# To use libunwind-ptrace, we also need to make some ptrace system calls.
+-if test x"$LIBUNWIND_PTRACE" != x"" ; then
 +		case "$LIBREPLACE_NETWORK_LIBS" in
 +		    *-lnsl_s*)
 +			;;
@@ -46604,27 +46643,6 @@
 +			;;
 +		esac
  
--else
--  $as_echo "$as_me: failed program was:" >&5
--sed 's/^/| /' conftest.$ac_ext >&5
- 
-+fi
- 
--	{ $as_echo "$as_me:$LINENO: result: no" >&5
--$as_echo "no" >&6; }
--	LIBS=$save_LIBS
- 
--fi
-+ac_check_lib_ext_save_LIBS=$LIBS
-+LIBS="-lnsl $LIBREPLACE_NETWORK_LIBS  $LIBS"
- 
--rm -rf conftest.dSYM
--rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
--      conftest$ac_exeext conftest.$ac_ext
- 
--# To use libunwind-ptrace, we also need to make some ptrace system calls.
--if test x"$LIBUNWIND_PTRACE" != x"" ; then
- 
 -for ac_header in sys/ptrace.h
 -do
 -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
@@ -46632,16 +46650,13 @@
 -  { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
 -$as_echo_n "checking for $ac_header... " >&6; }
 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lnsl" >&5
-+$as_echo_n "checking for connect in -lnsl... " >&6; }
-+if test "${ac_cv_lib_ext_nsl_connect+set}" = set; then :
-   $as_echo_n "(cached) " >&6
+-  $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; }
@@ -46650,26 +46665,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>
-+
-+/* Override any GCC internal prototype to avoid an error.
-+   Use char because int might match the return type of a GCC
-+   builtin and then its argument prototype would still apply.  */
-+#ifdef __cplusplus
-+extern "C"
-+#endif
-+char connect ();
-+int
-+main ()
-+{
-+return connect ();
-+  ;
-+  return 0;
-+}
- _ACEOF
+-_ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -46689,32 +46688,16 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_header_compiler=yes
-+if ac_fn_c_try_link "$LINENO"; then :
-+  ac_cv_lib_ext_nsl_connect=yes;
-+		  ac_cv_lib_ext_nsl=yes
- else
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+  ac_cv_lib_ext_nsl_connect=no;
-+		  ac_cv_lib_ext_nsl=no
-+fi
-+rm -f core conftest.err conftest.$ac_objext \
-+    conftest$ac_exeext conftest.$ac_ext
  
 -	ac_header_compiler=no
  fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ext_nsl_connect" >&5
-+$as_echo "$ac_cv_lib_ext_nsl_connect" >&6; }
-+    if test $ac_cv_lib_ext_nsl_connect = yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define HAVE_CONNECT 1
-+_ACEOF
  
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 -$as_echo "$ac_header_compiler" >&6; }
-+fi
-+LIBS=$ac_check_lib_ext_save_LIBS
  
 -# Is the header present?
 -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
@@ -46726,10 +46709,7 @@
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
 -#include <$ac_header>
-+if test $ac_cv_lib_ext_nsl = yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define HAVE_LIBNSL 1
- _ACEOF
+-_ACEOF
 -if { (ac_try="$ac_cpp conftest.$ac_ext"
 -case "(($ac_try" in
 -  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -46751,16 +46731,11 @@
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
++ac_check_lib_ext_save_LIBS=$LIBS
++LIBS="-lnsl $LIBREPLACE_NETWORK_LIBS  $LIBS"
  
 -  ac_header_preproc=no
 -fi
-+		case "$LIBREPLACE_NETWORK_LIBS" in
-+		    *-lnsl*)
-+			;;
-+		    *)
-+			LIBREPLACE_NETWORK_LIBS="-lnsl $LIBREPLACE_NETWORK_LIBS"
-+			;;
-+		esac
  
 -rm -f conftest.err conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
@@ -46799,15 +46774,18 @@
 -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
 -$as_echo_n "checking for $ac_header... " >&6; }
 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
--  $as_echo_n "(cached) " >&6
--else
++        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lnsl" >&5
++$as_echo_n "checking for connect in -lnsl... " >&6; }
++if test "${ac_cv_lib_ext_nsl_connect+set}" = set; then :
+   $as_echo_n "(cached) " >&6
+ else
 -  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"'`
@@ -46815,13 +46793,11 @@
 -  cat >>confdefs.h <<_ACEOF
 -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
 -_ACEOF
- 
+-
 -fi
-+ac_check_lib_ext_save_LIBS=$LIBS
-+LIBS="-lsocket $LIBREPLACE_NETWORK_LIBS  $LIBS"
- 
+-
 -done
- 
+-
 -    { $as_echo "$as_me:$LINENO: checking for the Linux ptrace(2) interface" >&5
 -$as_echo_n "checking for the Linux ptrace(2) interface... " >&6; }
 -    cat >conftest.$ac_ext <<_ACEOF
@@ -46829,12 +46805,6 @@
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+
-+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
-+$as_echo_n "checking for connect in -lsocket... " >&6; }
-+if test "${ac_cv_lib_ext_socket_connect+set}" = set; then :
-+  $as_echo_n "(cached) " >&6
-+else
 +  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
  
@@ -46896,8 +46866,8 @@
 -
 -
 +if ac_fn_c_try_link "$LINENO"; then :
-+  ac_cv_lib_ext_socket_connect=yes;
-+		  ac_cv_lib_ext_socket=yes
++  ac_cv_lib_ext_nsl_connect=yes;
++		  ac_cv_lib_ext_nsl=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
@@ -46907,8 +46877,8 @@
 -$as_echo "no" >&6; }
 -		LIBUNWIND_PTRACE=""
 -
-+  ac_cv_lib_ext_socket_connect=no;
-+		  ac_cv_lib_ext_socket=no
++  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
@@ -46917,9 +46887,9 @@
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
  fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ext_socket_connect" >&5
-+$as_echo "$ac_cv_lib_ext_socket_connect" >&6; }
-+    if test $ac_cv_lib_ext_socket_connect = yes; then :
++{ $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
@@ -46927,16 +46897,16 @@
 +fi
 +LIBS=$ac_check_lib_ext_save_LIBS
  
-+if test $ac_cv_lib_ext_socket = yes; then :
++if test $ac_cv_lib_ext_nsl = yes; then :
 +  cat >>confdefs.h <<_ACEOF
-+#define HAVE_LIBSOCKET 1
++#define HAVE_LIBNSL 1
 +_ACEOF
  
 +		case "$LIBREPLACE_NETWORK_LIBS" in
-+		    *-lsocket*)
++		    *-lnsl*)
 +			;;
 +		    *)
-+			LIBREPLACE_NETWORK_LIBS="-lsocket $LIBREPLACE_NETWORK_LIBS"
++			LIBREPLACE_NETWORK_LIBS="-lnsl $LIBREPLACE_NETWORK_LIBS"
 +			;;
 +		esac
  
@@ -46945,7 +46915,7 @@
  
  
 +ac_check_lib_ext_save_LIBS=$LIBS
-+LIBS="-linet $LIBREPLACE_NETWORK_LIBS  $LIBS"
++LIBS="-lsocket $LIBREPLACE_NETWORK_LIBS  $LIBS"
  
  
  
@@ -46955,9 +46925,9 @@
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
 -$as_echo_n "checking for $ac_func... " >&6; }
 -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -linet" >&5
-+$as_echo_n "checking for connect in -linet... " >&6; }
-+if test "${ac_cv_lib_ext_inet_connect+set}" = set; then :
++        { $as_echo "$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
@@ -46986,7 +46956,7 @@
  
  /* Override any GCC internal prototype to avoid an error.
     Use char because int might match the return type of a GCC
-@@ -43888,106 +11784,88 @@
+@@ -43888,106 +11718,65 @@
  #ifdef __cplusplus
  extern "C"
  #endif
@@ -47031,6 +47001,148 @@
 -       }; then
 -  eval "$as_ac_var=yes"
 +if ac_fn_c_try_link "$LINENO"; then :
++  ac_cv_lib_ext_socket_connect=yes;
++		  ac_cv_lib_ext_socket=yes
+ else
+-  $as_echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	eval "$as_ac_var=no"
++  ac_cv_lib_ext_socket_connect=no;
++		  ac_cv_lib_ext_socket=no
+ fi
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
+ 
+-rm -rf conftest.dSYM
+-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+-      conftest$ac_exeext conftest.$ac_ext
+ fi
+-ac_res=`eval 'as_val=${'$as_ac_var'}
+-		 $as_echo "$as_val"'`
+-	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+-$as_echo "$ac_res" >&6; }
+-as_val=`eval 'as_val=${'$as_ac_var'}
+-		 $as_echo "$as_val"'`
+-   if test "x$as_val" = x""yes; then
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ext_socket_connect" >&5
++$as_echo "$ac_cv_lib_ext_socket_connect" >&6; }
++    if test $ac_cv_lib_ext_socket_connect = yes; then :
+   cat >>confdefs.h <<_ACEOF
+-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
++#define HAVE_CONNECT 1
+ _ACEOF
+ 
+ fi
+-done
+-
+-
++LIBS=$ac_check_lib_ext_save_LIBS
+ 
++if test $ac_cv_lib_ext_socket = yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_LIBSOCKET 1
++_ACEOF
+ 
++		case "$LIBREPLACE_NETWORK_LIBS" in
++		    *-lsocket*)
++			;;
++		    *)
++			LIBREPLACE_NETWORK_LIBS="-lsocket $LIBREPLACE_NETWORK_LIBS"
++			;;
++		esac
+ 
+ 
++fi
+ 
+ 
+-for ac_func in __dup __dup2 __opendir __readdir __seekdir __telldir __closedir
+-do
+-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
+-$as_echo_n "checking for $ac_func... " >&6; }
+-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+-  $as_echo_n "(cached) " >&6
+-else
+-  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
++ac_check_lib_ext_save_LIBS=$LIBS
++LIBS="-linet $LIBREPLACE_NETWORK_LIBS  $LIBS"
+ 
+-/* System header to define __stub macros and hopefully few prototypes,
+-    which can conflict with char $ac_func (); below.
+-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+-    <limits.h> exists even on freestanding compilers.  */
+ 
+-#ifdef __STDC__
+-# include <limits.h>
+-#else
+-# include <assert.h>
+-#endif
+ 
+-#undef $ac_func
++        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -linet" >&5
++$as_echo_n "checking for connect in -linet... " >&6; }
++if test "${ac_cv_lib_ext_inet_connect+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
+ 
+ /* Override any GCC internal prototype to avoid an error.
+    Use char because int might match the return type of a GCC
+@@ -43995,101 +11784,88 @@
+ #ifdef __cplusplus
+ extern "C"
+ #endif
+-char $ac_func ();
+-/* The GNU C library defines this for functions which it implements
+-    to always fail with ENOSYS.  Some functions are actually named
+-    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 ();
++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"
++if ac_fn_c_try_link "$LINENO"; then :
 +  ac_cv_lib_ext_inet_connect=yes;
 +		  ac_cv_lib_ext_inet=yes
  else
@@ -47041,23 +47153,35 @@
 +fi
 +rm -f core conftest.err conftest.$ac_objext \
 +    conftest$ac_exeext conftest.$ac_ext
-+
-+fi
+ 
+-	eval "$as_ac_var=no"
+ fi
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ext_inet_connect" >&5
 +$as_echo "$ac_cv_lib_ext_inet_connect" >&6; }
 +    if test $ac_cv_lib_ext_inet_connect = yes; then :
 +  cat >>confdefs.h <<_ACEOF
 +#define HAVE_CONNECT 1
 +_ACEOF
-+
-+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
 +LIBS=$ac_check_lib_ext_save_LIBS
 +
 +if test $ac_cv_lib_ext_inet = yes; then :
-+  cat >>confdefs.h <<_ACEOF
+   cat >>confdefs.h <<_ACEOF
+-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 +#define HAVE_LIBINET 1
-+_ACEOF
-+
+ _ACEOF
+ 
 +		case "$LIBREPLACE_NETWORK_LIBS" in
 +		    *-linet*)
 +			;;
@@ -47066,90 +47190,76 @@
 +			;;
 +		esac
 +
- 
--	eval "$as_ac_var=no"
++
  fi
+-done
 +			if test x"$ac_cv_lib_ext_nsl_s_connect" = x"yes" ||
 +		test x"$ac_cv_lib_ext_nsl_connect" = x"yes" ||
 +		test x"$ac_cv_lib_ext_socket_connect" = x"yes" ||
 +		test x"$ac_cv_lib_ext_inet_connect" = x"yes"
 +	then
-+
+ 
 +$as_echo "#define HAVE_CONNECT 1" >>confdefs.h
  
--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
--$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
++fi
  
- 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 __dup __dup2 __opendir __readdir __seekdir __telldir __closedir
+-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 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
+-  $as_echo_n "(cached) " >&6
+-else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
--_ACEOF
++for ac_func in gethostbyname
++do :
++  ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
++if test "x$ac_cv_func_gethostbyname" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_GETHOSTBYNAME 1
+ _ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
+-/* end confdefs.h.  */
 -/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
 -   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
 -#define $ac_func innocuous_$ac_func
--
+ 
 -/* System header to define __stub macros and hopefully few prototypes,
 -    which can conflict with char $ac_func (); below.
 -    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
 -    <limits.h> exists even on freestanding compilers.  */
--
++fi
++done
++
++if test x"$ac_cv_func_gethostbyname" = x"no"; then
+ 
 -#ifdef __STDC__
 -# include <limits.h>
 -#else
 -# include <assert.h>
 -#endif
--
+ 
 -#undef $ac_func
++ac_check_lib_ext_save_LIBS=$LIBS
++LIBS="-lnsl_s $LIBREPLACE_NETWORK_LIBS  $LIBS"
++
++
++
++        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl_s" >&5
++$as_echo_n "checking for gethostbyname in -lnsl_s... " >&6; }
++if test "${ac_cv_lib_ext_nsl_s_gethostbyname+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
     Use char because int might match the return type of a GCC
-@@ -43995,101 +11873,65 @@
+@@ -44097,102 +11873,65 @@
  #ifdef __cplusplus
  extern "C"
  #endif
@@ -47249,14 +47359,14 @@
 +ac_check_lib_ext_save_LIBS=$LIBS
 +LIBS="-lnsl $LIBREPLACE_NETWORK_LIBS  $LIBS"
  
--for ac_func in __getcwd _getcwd
+ 
+-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 "$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 :
@@ -47288,7 +47398,7 @@
  
  /* Override any GCC internal prototype to avoid an error.
     Use char because int might match the return type of a GCC
-@@ -44097,102 +11939,65 @@
+@@ -44200,105 +11939,65 @@
  #ifdef __cplusplus
  extern "C"
  #endif
@@ -47338,21 +47448,14 @@
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	eval "$as_ac_var=no"
 +  ac_cv_lib_ext_nsl_gethostbyname=no;
 +		  ac_cv_lib_ext_nsl=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_nsl_gethostbyname" >&5
-+$as_echo "$ac_cv_lib_ext_nsl_gethostbyname" >&6; }
-+    if test $ac_cv_lib_ext_nsl_gethostbyname = yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define HAVE_GETHOSTBYNAME 1
-+_ACEOF
- 
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
@@ -47364,14 +47467,23 @@
 -as_val=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ext_nsl_gethostbyname" >&5
++$as_echo "$ac_cv_lib_ext_nsl_gethostbyname" >&6; }
++    if test $ac_cv_lib_ext_nsl_gethostbyname = yes; then :
+   cat >>confdefs.h <<_ACEOF
+-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
++#define HAVE_GETHOSTBYNAME 1
+ _ACEOF
+ 
+ fi
+-done
 +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*)
 +			;;
@@ -47379,18 +47491,17 @@
 +			LIBREPLACE_NETWORK_LIBS="-lnsl $LIBREPLACE_NETWORK_LIBS"
 +			;;
 +		esac
-+
-+
- fi
--done
  
  
++fi
+ 
+ 
 +ac_check_lib_ext_save_LIBS=$LIBS
 +LIBS="-lsocket $LIBREPLACE_NETWORK_LIBS  $LIBS"
-+
  
  
--for ac_func in __xstat __fxstat __lxstat
+ 
+-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
@@ -47427,7 +47538,7 @@
  
  /* Override any GCC internal prototype to avoid an error.
     Use char because int might match the return type of a GCC
-@@ -44200,105 +12005,87 @@
+@@ -44306,107 +12005,87 @@
  #ifdef __cplusplus
  extern "C"
  #endif
@@ -47477,14 +47588,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_socket_gethostbyname=no;
 +		  ac_cv_lib_ext_socket=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_socket_gethostbyname" >&5
++$as_echo "$ac_cv_lib_ext_socket_gethostbyname" >&6; }
++    if test $ac_cv_lib_ext_socket_gethostbyname = yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_GETHOSTBYNAME 1
++_ACEOF
+ 
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
@@ -47496,23 +47614,14 @@
 -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_socket_gethostbyname" >&5
-+$as_echo "$ac_cv_lib_ext_socket_gethostbyname" >&6; }
-+    if test $ac_cv_lib_ext_socket_gethostbyname = 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
-+#define HAVE_GETHOSTBYNAME 1
++#define HAVE_LIBSOCKET 1
  _ACEOF
  
- fi
--done
-+LIBS=$ac_check_lib_ext_save_LIBS
- 
-+if test $ac_cv_lib_ext_socket = yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define HAVE_LIBSOCKET 1
-+_ACEOF
- 
 +		case "$LIBREPLACE_NETWORK_LIBS" in
 +		    *-lsocket*)
 +			;;
@@ -47520,9 +47629,10 @@
 +			LIBREPLACE_NETWORK_LIBS="-lsocket $LIBREPLACE_NETWORK_LIBS"
 +			;;
 +		esac
- 
- 
-+fi
++
++
+ fi
+-done
 +			if test x"$ac_cv_lib_ext_nsl_s_gethostbyname" = x"yes" ||
 +		test x"$ac_cv_lib_ext_nsl_gethostbyname" = x"yes" ||
 +		test x"$ac_cv_lib_ext_socket_gethostbyname" = x"yes"
@@ -47533,62 +47643,63 @@
 +	fi
 +fi
  
--for ac_func in _stat _lstat _fstat __stat __lstat __fstat
++for ac_func in if_nametoindex
++do :
++  ac_fn_c_check_func "$LINENO" "if_nametoindex" "ac_cv_func_if_nametoindex"
++if test "x$ac_cv_func_if_nametoindex" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_IF_NAMETOINDEX 1
++_ACEOF
+ 
++fi
++done
+ 
++if test x"$ac_cv_func_if_nametoindex" = x"no"; then
+ 
+ 
++ac_check_lib_ext_save_LIBS=$LIBS
++LIBS="-lipv6 $LIBREPLACE_NETWORK_LIBS  $LIBS"
+ 
+ 
+-for ac_func in _acl __acl _facl __facl _open __open _chdir __chdir
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
 -$as_echo_n "checking for $ac_func... " >&6; }
 -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
--  $as_echo_n "(cached) " >&6
--else
++
++        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for if_nametoindex in -lipv6" >&5
++$as_echo_n "checking for if_nametoindex in -lipv6... " >&6; }
++if test "${ac_cv_lib_ext_ipv6_if_nametoindex+set}" = set; then :
+   $as_echo_n "(cached) " >&6
+ else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
-+for ac_func in if_nametoindex
-+do :
-+  ac_fn_c_check_func "$LINENO" "if_nametoindex" "ac_cv_func_if_nametoindex"
-+if test "x$ac_cv_func_if_nametoindex" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define HAVE_IF_NAMETOINDEX 1
- _ACEOF
+-_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_if_nametoindex" = x"no"; then
-+
-+
-+ac_check_lib_ext_save_LIBS=$LIBS
-+LIBS="-lipv6 $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 if_nametoindex in -lipv6" >&5
-+$as_echo_n "checking for if_nametoindex in -lipv6... " >&6; }
-+if test "${ac_cv_lib_ext_ipv6_if_nametoindex+set}" = set; then :
-+  $as_echo_n "(cached) " >&6
-+else
-+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
     Use char because int might match the return type of a GCC
-@@ -44306,2760 +12093,2283 @@
+@@ -44414,2652 +12093,2283 @@
  #ifdef __cplusplus
  extern "C"
  #endif
@@ -47668,7 +47779,7 @@
  fi
 -done
 +LIBS=$ac_check_lib_ext_save_LIBS
- 
++
 +if test $ac_cv_lib_ext_ipv6 = yes; then :
 +  cat >>confdefs.h <<_ACEOF
 +#define HAVE_LIBIPV6 1
@@ -47698,58 +47809,52 @@
 +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
- 
--for ac_func in _acl __acl _facl __facl _open __open _chdir __chdir
+-for ac_func in _close __close _fchdir __fchdir _fcntl __fcntl
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
 -$as_echo_n "checking for $ac_func... " >&6; }
 -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
 -  $as_echo_n "(cached) " >&6
- else
+-else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
--_ACEOF
++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
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
 -/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
 -   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
 -#define $ac_func innocuous_$ac_func
-+  LIBREPLACE_NETWORK_OBJS="${LIBREPLACE_NETWORK_OBJS} $libreplacedir/socketpair.o"
-+fi
-+done
  
 -/* System header to define __stub macros and hopefully few prototypes,
 -    which can conflict with char $ac_func (); below.
 -    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
 -    <limits.h> exists even on freestanding compilers.  */
++else
++  LIBREPLACE_NETWORK_OBJS="${LIBREPLACE_NETWORK_OBJS} $libreplacedir/socketpair.o"
++fi
++done
  
 -#ifdef __STDC__
 -# include <limits.h>
 -#else
 -# include <assert.h>
 -#endif
+ 
+-#undef $ac_func
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken inet_ntoa" >&5
 +$as_echo_n "checking for broken inet_ntoa... " >&6; }
 +if test "${libreplace_cv_REPLACE_INET_NTOA+set}" = set; then :
 +  $as_echo_n "(cached) " >&6
 +else
  
--#undef $ac_func
-+if test "$cross_compiling" = yes; then :
-+  libreplace_cv_REPLACE_INET_NTOA=cross
-+else
-+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h.  */
- 
 -/* Override any GCC internal prototype to avoid an error.
 -   Use char because int might match the return type of a GCC
 -   builtin and then its argument prototype would still apply.  */
@@ -47762,14 +47867,13 @@
 -    something starting with __ and the normal name is an alias.  */
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
-+#include <stdio.h>
-+#include <unistd.h>
-+#include <sys/types.h>
-+#include <netinet/in.h>
-+#ifdef HAVE_ARPA_INET_H
-+#include <arpa/inet.h>
- #endif
--
+-#endif
++if test "$cross_compiling" = yes; then :
++  libreplace_cv_REPLACE_INET_NTOA=cross
++else
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
+ 
 -int
 -main ()
 -{
@@ -47777,6 +47881,13 @@
 -  ;
 -  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); }
@@ -47846,7 +47957,7 @@
  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} $libreplacedir/inet_ntoa.o"
@@ -47866,13 +47977,6 @@
 +done
  
  
--for ac_func in _close __close _fchdir __fchdir _fcntl __fcntl
--do
--as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
--{ $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
 +for ac_func in inet_ntop
 +do :
 +  ac_fn_c_check_func "$LINENO" "inet_ntop" "ac_cv_func_inet_ntop"
@@ -47880,7 +47984,14 @@
 +  cat >>confdefs.h <<_ACEOF
 +#define HAVE_INET_NTOP 1
 +_ACEOF
-+
+ 
+-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_n "(cached) " >&6
  else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
@@ -47996,17 +48107,35 @@
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
++  libreplace_cv_HAVE_GETADDRINFO=no
++fi
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libreplace_cv_HAVE_GETADDRINFO" >&5
++$as_echo "$libreplace_cv_HAVE_GETADDRINFO" >&6; }
++if test x"$libreplace_cv_HAVE_GETADDRINFO" = x"yes"; then
+ 
 -	eval "$as_ac_var=no"
-+  libreplace_cv_HAVE_GETADDRINFO=no
++$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
++
++
++$as_echo "#define HAVE_GETNAMEINFO 1" >>confdefs.h
++
++
++$as_echo "#define HAVE_FREEADDRINFO 1" >>confdefs.h
++
++
++$as_echo "#define HAVE_GAI_STRERROR 1" >>confdefs.h
++
++else
++	LIBREPLACE_NETWORK_OBJS="${LIBREPLACE_NETWORK_OBJS} $libreplacedir/getaddrinfo.o"
  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
@@ -48014,67 +48143,69 @@
 -as_val=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
--  cat >>confdefs.h <<_ACEOF
++for ac_header in ifaddrs.h
++do :
++  ac_fn_c_check_header_mongrel "$LINENO" "ifaddrs.h" "ac_cv_header_ifaddrs_h" "$ac_includes_default"
++if test "x$ac_cv_header_ifaddrs_h" = x""yes; then :
+   cat >>confdefs.h <<_ACEOF
 -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
--_ACEOF
-+{ $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
++#define HAVE_IFADDRS_H 1
+ _ACEOF
  
--fi
--done
-+$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
+ fi
++
+ done
  
  
-+$as_echo "#define HAVE_GETNAMEINFO 1" >>confdefs.h
++ac_fn_c_check_member "$LINENO" "struct sockaddr" "sa_len" "ac_cv_member_struct_sockaddr_sa_len" "#include <sys/socket.h>
++"
++if test "x$ac_cv_member_struct_sockaddr_sa_len" = x""yes; then :
  
++cat >>confdefs.h <<_ACEOF
++#define HAVE_STRUCT_SOCKADDR_SA_LEN 1
++_ACEOF
  
-+$as_echo "#define HAVE_FREEADDRINFO 1" >>confdefs.h
  
++$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
  
-+$as_echo "#define HAVE_GAI_STRERROR 1" >>confdefs.h
- 
--for ac_func in getdents __getdents _lseek __lseek _read __read
+-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
+-else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
-+	LIBREPLACE_NETWORK_OBJS="${LIBREPLACE_NETWORK_OBJS} $libreplacedir/getaddrinfo.o"
-+fi
-+
-+for ac_header in ifaddrs.h
-+do :
-+  ac_fn_c_check_header_mongrel "$LINENO" "ifaddrs.h" "ac_cv_header_ifaddrs_h" "$ac_includes_default"
-+if test "x$ac_cv_header_ifaddrs_h" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define HAVE_IFADDRS_H 1
- _ACEOF
+-_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
++fi
  
 -/* System header to define __stub macros and hopefully few prototypes,
 -    which can conflict with char $ac_func (); below.
 -    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
 -    <limits.h> exists even on freestanding compilers.  */
-+fi
  
 -#ifdef __STDC__
 -# include <limits.h>
 -#else
 -# include <assert.h>
 -#endif
-+done
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getifaddrs and freeifaddrs" >&5
++$as_echo_n "checking for getifaddrs and freeifaddrs... " >&6; }
++if test "${libreplace_cv_HAVE_GETIFADDRS+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
  
 -#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
@@ -48088,35 +48219,12 @@
 -    something starting with __ and the normal name is an alias.  */
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
--#endif
-+ac_fn_c_check_member "$LINENO" "struct sockaddr" "sa_len" "ac_cv_member_struct_sockaddr_sa_len" "#include <sys/socket.h>
-+"
-+if test "x$ac_cv_member_struct_sockaddr_sa_len" = x""yes; then :
-+
-+cat >>confdefs.h <<_ACEOF
-+#define HAVE_STRUCT_SOCKADDR_SA_LEN 1
-+_ACEOF
-+
-+
-+$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
-+
-+fi
-+
-+
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getifaddrs and freeifaddrs" >&5
-+$as_echo_n "checking for getifaddrs and freeifaddrs... " >&6; }
-+if test "${libreplace_cv_HAVE_GETIFADDRS+set}" = set; then :
-+  $as_echo_n "(cached) " >&6
-+else
-+
-+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h.  */
- 
 +#include <sys/types.h>
 +#if STDC_HEADERS
 +#include <stdlib.h>
 +#include <stddef.h>
-+#endif
+ #endif
+-
 +#include <sys/socket.h>
 +#include <netinet/in.h>
 +#include <arpa/inet.h>
@@ -48165,13 +48273,25 @@
 -
 -	eval "$as_ac_var=no"
 +  libreplace_cv_HAVE_GETIFADDRS=no
++fi
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
  fi
--
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libreplace_cv_HAVE_GETIFADDRS" >&5
++$as_echo "$libreplace_cv_HAVE_GETIFADDRS" >&6; }
++if test x"$libreplace_cv_HAVE_GETIFADDRS" = x"yes"; then
++
++$as_echo "#define HAVE_GETIFADDRS 1" >>confdefs.h
++
++
++$as_echo "#define HAVE_FREEIFADDRS 1" >>confdefs.h
++
++
++$as_echo "#define HAVE_STRUCT_IFADDRS 1" >>confdefs.h
+ 
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
-+rm -f core conftest.err conftest.$ac_objext \
-+    conftest$ac_exeext conftest.$ac_ext
  fi
 -ac_res=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
@@ -48182,56 +48302,22 @@
 -   if test "x$as_val" = x""yes; then
 -  cat >>confdefs.h <<_ACEOF
 -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
--_ACEOF
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libreplace_cv_HAVE_GETIFADDRS" >&5
-+$as_echo "$libreplace_cv_HAVE_GETIFADDRS" >&6; }
-+if test x"$libreplace_cv_HAVE_GETIFADDRS" = x"yes"; then
- 
--fi
--done
-+$as_echo "#define HAVE_GETIFADDRS 1" >>confdefs.h
- 
- 
-+$as_echo "#define HAVE_FREEIFADDRS 1" >>confdefs.h
- 
- 
-+$as_echo "#define HAVE_STRUCT_IFADDRS 1" >>confdefs.h
- 
-+fi
- 
--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
++
 +##################
 +# 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
@@ -48242,7 +48328,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
@@ -48252,83 +48338,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} $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;
--}
--_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 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
--  $as_echo "$as_me: failed program was:" >&5
--sed 's/^/| /' conftest.$ac_ext >&5
- 
--	eval "$as_ac_var=no"
++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
@@ -48348,46 +48383,40 @@
 +fi
 +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
 +  conftest.$ac_objext conftest.beam conftest.$ac_ext
- fi
++fi
  
--rm -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
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libreplace_cv_HAVE_IFACE_AIX" >&5
 +$as_echo "$libreplace_cv_HAVE_IFACE_AIX" >&6; }
 +if test x"$libreplace_cv_HAVE_IFACE_AIX" = x"yes"; then
 +    iface=yes;
 +$as_echo "#define HAVE_IFACE_AIX 1" >>confdefs.h
  
- fi
--done
 +fi
++fi
  
  
+-for ac_func in _stat64 __stat64 _fstat64 __fstat64 _lstat64 __lstat64
+-do
+-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+-{ $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
 +else
 +  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 +/* end confdefs.h.  */
- 
++
 +#define HAVE_IFACE_IFCONF 1
 +#define NO_CONFIG_H 1
 +#define AUTOCONF_TEST 1
@@ -48398,7 +48427,9 @@
 +#include "$libreplacedir/getifaddrs.c"
 +#define getifaddrs_test main
 +#include "$libreplacedir/test/getifaddrs.c"
-+_ACEOF
+ _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
@@ -48407,34 +48438,23 @@
 +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
 +  conftest.$ac_objext conftest.beam conftest.$ac_ext
 +fi
- 
++
 +fi
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libreplace_cv_HAVE_IFACE_IFCONF" >&5
 +$as_echo "$libreplace_cv_HAVE_IFACE_IFCONF" >&6; }
 +if test x"$libreplace_cv_HAVE_IFACE_IFCONF" = x"yes"; then
 +    iface=yes;
 +$as_echo "#define HAVE_IFACE_IFCONF 1" >>confdefs.h
- 
++
 +fi
 +fi
- 
--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
--$as_echo_n "checking for $ac_func... " >&6; }
--if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
++
 +if test $iface = no; then
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for iface ifreq" >&5
 +$as_echo_n "checking for iface ifreq... " >&6; }
 +if test "${libreplace_cv_HAVE_IFACE_IFREQ+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
--  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_IFREQ=cross
@@ -49017,6 +49037,20 @@
 +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
++
++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 HAVE_SYS_MODE_H 1
  _ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
@@ -49050,19 +49084,7 @@
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
-+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 HAVE_SYS_MODE_H 1
-+_ACEOF
-+
- fi
+-fi
 -ac_res=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
@@ -49070,7 +49092,6 @@
 -as_val=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+
 +done
 +
 +
@@ -49283,7 +49304,8 @@
 -# include <assert.h>
 -#endif
 +done
-+
+ 
+-#undef $ac_func
 +for ac_header in syscall.h sys/syscall.h
 +do :
 +  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
@@ -49294,9 +49316,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.  */
@@ -49310,7 +49329,7 @@
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
 -#endif
-+done
++fi
  
 -int
 -main ()
@@ -49319,7 +49338,9 @@
 -  ;
 -  return 0;
 -}
++done
 +
++
 +for ac_header in sys/attributes.h attr/xattr.h sys/xattr.h sys/extattr.h sys/uio.h
 +do :
 +  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
@@ -49505,6 +49526,10 @@
 +     ac_cv_sizeof_int=0
 +   fi
 +fi
++
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
++$as_echo "$ac_cv_sizeof_int" >&6; }
  
 -#include <unistd.h>
 -#include <sys/utsname.h>
@@ -49513,9 +49538,6 @@
 -#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; }
  
 -       if (libc_major < 2)
 -              exit(1);
@@ -49525,7 +49547,6 @@
 -       exit(0);
 -}
  
-+
 +cat >>confdefs.h <<_ACEOF
 +#define SIZEOF_INT $ac_cv_sizeof_int
  _ACEOF
@@ -49973,14 +49994,17 @@
 -	 $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
+-
+ 
+-fi
 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
 +$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
 +if test "${ac_cv_c_bigendian+set}" = set; then :
 +  $as_echo_n "(cached) " >&6
- else
--  $as_echo "$as_me: failed program was:" >&5
--sed 's/^/| /' conftest.$ac_ext >&5
++else
 +  ac_cv_c_bigendian=unknown
 +    # See if we're dealing with a universal compiler.
 +    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -49990,9 +50014,18 @@
 +	     #endif
 +	     typedef int dummy;
  
-+_ACEOF
+-rm -rf conftest.dSYM
+-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+-      conftest$ac_exeext conftest.$ac_ext
+-  { $as_echo "$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
 +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=
@@ -50023,18 +50056,11 @@
 +#include <sys/types.h>
 +	     #include <sys/param.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 "$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
--
--  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.  */
 +int
 +main ()
 +{
@@ -50043,12 +50069,7 @@
 +		     && LITTLE_ENDIAN)
 +	      bogus endian macros
 +	     #endif
- 
--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;
 +}
@@ -50559,9 +50580,8 @@
 +cat >>confdefs.h <<_ACEOF
 +#define RETSIGTYPE $ac_cv_type_signal
 +_ACEOF
- 
--	ac_cv_member_struct_stat_st_mtimespec_tv_nsec=no
 +
++
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
 +$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
 +if test "${ac_cv_type_uid_t+set}" = set; then :
@@ -50570,7 +50590,8 @@
 +  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 +/* end confdefs.h.  */
 +#include <sys/types.h>
-+
+ 
+-	ac_cv_member_struct_stat_st_mtimespec_tv_nsec=no
 +_ACEOF
 +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
 +  $EGREP "uid_t" >/dev/null 2>&1; then :
@@ -50883,11 +50904,11 @@
 +fi
 +
 +
-+
-+        if test "x$CUPS_CONFIG" != x; then
  
 -	cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
++        if test "x$CUPS_CONFIG" != x; then
++
 +		ac_save_CFLAGS=$CFLAGS
 +		ac_save_LDFLAGS=$LDFLAGS
 +		ac_save_PRINT_LIBS=$PRINT_LIBS
@@ -50996,7 +51017,9 @@
 +  cat >>confdefs.h <<_ACEOF
 +#define HAVE_LIBCUPS 1
 +_ACEOF
-+
+ 
+-	ac_cv_member_struct_stat_st_umtime=no
+-fi
 +		case "$PRINT_LIBS" in
 +		    *-lcups*)
 +			;;
@@ -51005,11 +51028,14 @@
 +			;;
 +		esac
  
--	ac_cv_member_struct_stat_st_umtime=no
+-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -fi
  
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  fi
+-{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_umtime" >&5
+-$as_echo "$ac_cv_member_struct_stat_st_umtime" >&6; }
+-if test "x$ac_cv_member_struct_stat_st_umtime" = x""yes; then
 +		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;}
@@ -51018,18 +51044,13 @@
 +			PRINT_LIBS=$ac_save_PRINT_LIBS
 +		fi
  
--rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+-cat >>confdefs.h <<_ACEOF
+-#define HAVE_STRUCT_STAT_ST_UMTIME 1
+-_ACEOF
 +	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
--{ $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
++fi
  
 -# Tru64
 -	samba_cv_stat_hires=yes
@@ -51490,20 +51511,20 @@
 +ac_fn_c_check_member "$LINENO" "struct sigevent" "sigev_value.sigval_ptr" "ac_cv_member_struct_sigevent_sigev_value_sigval_ptr" "#include <signal.h>
 +"
 +if test "x$ac_cv_member_struct_sigevent_sigev_value_sigval_ptr" = x""yes; then :
-+
+ 
+-fi
 +cat >>confdefs.h <<_ACEOF
 +#define HAVE_STRUCT_SIGEVENT_SIGEV_VALUE_SIGVAL_PTR 1
 +_ACEOF
  
--fi
  
 +fi
  
-+fi
- 
 -{ $as_echo "$as_me:$LINENO: checking whether there is DOS flags support in the stat struct" >&5
 -$as_echo_n "checking whether there is DOS flags support in the stat struct... " >&6; }
 -if test "${samba_cv_stat_dos_flags+set}" = set; then
++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 :
@@ -52537,11 +52558,11 @@
  
  fi
 -done
+-
  
  
  
  
--
 -for ac_func in set_auth_parameters
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
@@ -52799,10 +52820,10 @@
  
  fi
 -done
--
  
  
 -
+-
 -for ac_func in set_auth_parameters
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
@@ -53023,18 +53044,7 @@
 -  ;
 -  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
+-_ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -53060,6 +53070,18 @@
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
++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
  
 -	ac_cv_lib_sec_set_auth_parameters=no
  fi
@@ -53829,20 +53851,34 @@
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_security_getspnam" >&5
 -$as_echo "$ac_cv_lib_security_getspnam" >&6; }
 -if test "x$ac_cv_lib_security_getspnam" = x""yes; then
+-
+-		LIBS="-lsecurity $LIBS"
+-
+-
+-cat >>confdefs.h <<\_ACEOF
+-#define HAVE_GETSPNAM 1
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_exc_trace_back_stack" >&5
 +$as_echo "$ac_cv_lib_exc_trace_back_stack" >&6; }
 +if test "x$ac_cv_lib_exc_trace_back_stack" = x""yes; then :
 +  cat >>confdefs.h <<_ACEOF
 +#define HAVE_LIBEXC 1
-+_ACEOF
+ _ACEOF
  
--		LIBS="-lsecurity $LIBS"
+-
+-
+-else
+-
+-
+-			# getspnam was not found in libsecurity
+-			# nothing to do here by default
+-			true
+-
 +  LIBS="-lexc $LIBS"
  
-+fi
+ fi
  
--cat >>confdefs.h <<\_ACEOF
--#define HAVE_GETSPNAM 1
+-	  ;;
+-        esac
 +
 +# check for sysctlbyname for BSD systems
 +for ac_func in sysctlbyname
@@ -53851,78 +53887,14 @@
 +if test "x$ac_cv_func_sysctlbyname" = x""yes; then :
 +  cat >>confdefs.h <<_ACEOF
 +#define HAVE_SYSCTLBYNAME 1
- _ACEOF
- 
-+fi
-+done
- 
- 
--else
-+#############################
-+# check if building with gpfs
-+for ac_header in gpfs_gpl.h
-+do :
-+  ac_fn_c_check_header_mongrel "$LINENO" "gpfs_gpl.h" "ac_cv_header_gpfs_gpl_h" "$ac_includes_default"
-+if test "x$ac_cv_header_gpfs_gpl_h" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define HAVE_GPFS_GPL_H 1
 +_ACEOF
  
-+fi
+ fi
+ done
  
--			# getspnam was not found in libsecurity
--			# nothing to do here by default
--			true
-+done
-+
-+if test x"$ac_cv_header_gpfs_gpl_h" = x"yes"; then
  
-+$as_echo "#define HAVE_GPFS 1" >>confdefs.h
- 
-+    default_shared_modules="$default_shared_modules vfs_gpfs"
- fi
- 
--	  ;;
--        esac
 -
-+#############################################
-+# check if building on Isilon OneFS
-+printf "%s" "checking for Isilon OneFS... "
-+save_LIBS="$LIBS"
-+LIBS="$LIBS -lisi_version"
-+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h.  */
-+#include <isi_version/isi_version.h>
-+int
-+main ()
-+{
-+get_isilon_copyright()
-+  ;
-+  return 0;
-+}
-+_ACEOF
-+if ac_fn_c_try_link "$LINENO"; then :
-+  samba_cv_HAVE_ONEFS=yes
-+else
-+  samba_cv_HAVE_ONEFS=no
- fi
--done
-+rm -f core conftest.err conftest.$ac_objext \
-+    conftest$ac_exeext conftest.$ac_ext
-+echo $samba_cv_HAVE_ONEFS
-+if test x"$samba_cv_HAVE_ONEFS" = x"yes"; then
- 
-+$as_echo "#define HAVE_ONEFS 1" >>confdefs.h
- 
-+    default_shared_modules="$default_shared_modules vfs_onefs vfs_onefs_shadow_copy perfcount_onefs"
-+    default_static_modules="$default_static_modules"
-+    ONEFS_LIBS="-lisi_acl -lisi_ecs -lisi_event -lisi_util"
-+    # Need to also add general libs for oplocks support
-+    save_LIBS="$save_LIBS -lisi_ecs -lisi_event -lisi_util -ldevstat"
-+fi
- 
-+LIBS="$save_LIBS"
- 
+-
 -for ac_func in getspnam
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
@@ -53933,31 +53905,26 @@
 -else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
--_ACEOF
++#############################
++# check if building with gpfs
++for ac_header in gpfs_gpl.h
++do :
++  ac_fn_c_check_header_mongrel "$LINENO" "gpfs_gpl.h" "ac_cv_header_gpfs_gpl_h" "$ac_includes_default"
++if test "x$ac_cv_header_gpfs_gpl_h" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_GPFS_GPL_H 1
+ _ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
 -/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
 -   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
 -#define $ac_func innocuous_$ac_func
-+# Note that all the libunwind symbols in the API are defined to internal
-+# platform-specific version, so we must include libunwind.h before checking
-+# any of them.
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libunwind" >&5
-+$as_echo_n "checking for libunwind... " >&6; }
-+save_LIBS=$LIBS
  
 -/* System header to define __stub macros and hopefully few prototypes,
 -    which can conflict with char $ac_func (); below.
 -    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
 -    <limits.h> exists even on freestanding compilers.  */
-+UNWIND_ARCH="unknown"
-+if test x"$UNAME_I" != x"unknown"; then
-+	UNWIND_ARCH="$UNAME_I"
-+elif test x"$UNAME_M" != x"unknown"; then
-+	UNWIND_ARCH="$UNAME_M"
-+elif test x"$UNAME_P" != x"unknown"; then
-+	UNWIND_ARCH="$UNAME_P"
 +fi
  
 -#ifdef __STDC__
@@ -53965,26 +53932,10 @@
 -#else
 -# include <assert.h>
 -#endif
-+case "$UNWIND_ARCH" in
-+	unknown)
-+		# This probably won't link without
-+		# the platform-specific libunwind.
-+		LIBS="$LIBS -lunwind"
-+		;;
-+	i386|i586|i686)
-+		# Add the platform-specific libunwind module.
-+		LIBS="$LIBS -lunwind -lunwind-x86"
-+		;;
-+	*)
-+		# Add the platform-specific libunwind module.
-+		# based on uname -i, uname -m or uname -p
-+		LIBS="$LIBS -lunwind -lunwind-$UNWIND_ARCH"
-+		;;
-+esac
++done
  
 -#undef $ac_func
-+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h.  */
++if test x"$ac_cv_header_gpfs_gpl_h" = x"yes"; then
  
 -/* Override any GCC internal prototype to avoid an error.
 -   Use char because int might match the return type of a GCC
@@ -53998,20 +53949,25 @@
 -    something starting with __ and the normal name is an alias.  */
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
-+#ifdef HAVE_LIBUNWIND_H
-+#include <libunwind.h>
- #endif
+-#endif
++$as_echo "#define HAVE_GPFS 1" >>confdefs.h
++
++    default_shared_modules="$default_shared_modules vfs_gpfs"
++fi
  
++#############################################
++# check if building on Isilon OneFS
++printf "%s" "checking for Isilon OneFS... "
++save_LIBS="$LIBS"
++LIBS="$LIBS -lisi_version"
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++#include <isi_version/isi_version.h>
  int
  main ()
  {
 -return $ac_func ();
-+
-+	unw_context_t ctx; unw_cursor_t cur;
-+	char buf[256]; unw_word_t off;
-+	unw_getcontext(&ctx); unw_init_local(&cur, &ctx);
-+	unw_get_proc_name(&cur, buf, sizeof(buf), &off);
-+
++get_isilon_copyright()
    ;
    return 0;
  }
@@ -54038,18 +53994,48 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  eval "$as_ac_var=yes"
--else
++if ac_fn_c_try_link "$LINENO"; then :
++  samba_cv_HAVE_ONEFS=yes
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
++  samba_cv_HAVE_ONEFS=no
++fi
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
++echo $samba_cv_HAVE_ONEFS
++if test x"$samba_cv_HAVE_ONEFS" = x"yes"; then
+ 
 -	eval "$as_ac_var=no"
--fi
-+if ac_fn_c_try_link "$LINENO"; then :
++$as_echo "#define HAVE_ONEFS 1" >>confdefs.h
++
++    default_shared_modules="$default_shared_modules vfs_onefs vfs_onefs_shadow_copy perfcount_onefs"
++    default_static_modules="$default_static_modules"
++    ONEFS_LIBS="-lisi_acl -lisi_ecs -lisi_event -lisi_util"
++    # Need to also add general libs for oplocks support
++    save_LIBS="$save_LIBS -lisi_ecs -lisi_event -lisi_util -ldevstat"
+ fi
  
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
--fi
++LIBS="$save_LIBS"
++
++# Note that all the libunwind symbols in the API are defined to internal
++# platform-specific version, so we must include libunwind.h before checking
++# any of them.
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libunwind" >&5
++$as_echo_n "checking for libunwind... " >&6; }
++save_LIBS=$LIBS
++
++UNWIND_ARCH="unknown"
++if test x"$UNAME_I" != x"unknown"; then
++	UNWIND_ARCH="$UNAME_I"
++elif test x"$UNAME_M" != x"unknown"; then
++	UNWIND_ARCH="$UNAME_M"
++elif test x"$UNAME_P" != x"unknown"; then
++	UNWIND_ARCH="$UNAME_P"
+ fi
 -ac_res=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
@@ -54060,15 +54046,56 @@
 -  cat >>confdefs.h <<_ACEOF
 -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 -_ACEOF
+ 
+-        # getspnam was found in libc or existing $LIBS
++case "$UNWIND_ARCH" in
++	unknown)
++		# This probably won't link without
++		# the platform-specific libunwind.
++		LIBS="$LIBS -lunwind"
++		;;
++	i386|i586|i686)
++		# Add the platform-specific libunwind module.
++		LIBS="$LIBS -lunwind -lunwind-x86"
++		;;
++	*)
++		# Add the platform-specific libunwind module.
++		# based on uname -i, uname -m or uname -p
++		LIBS="$LIBS -lunwind -lunwind-$UNWIND_ARCH"
++		;;
++esac
+ 
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
+ 
+-cat >>confdefs.h <<\_ACEOF
+-#define HAVE_GETSPNAM 1
++#ifdef HAVE_LIBUNWIND_H
++#include <libunwind.h>
++#endif
++
++int
++main ()
++{
++
++	unw_context_t ctx; unw_cursor_t cur;
++	char buf[256]; unw_word_t off;
++	unw_getcontext(&ctx); unw_init_local(&cur, &ctx);
++	unw_get_proc_name(&cur, buf, sizeof(buf), &off);
++
++  ;
++  return 0;
++}
+ _ACEOF
++if ac_fn_c_try_link "$LINENO"; then :
++
 +	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 +$as_echo "yes" >&6; }
  
--        # getspnam was found in libc or existing $LIBS
 +$as_echo "#define HAVE_LIBUNWIND 1" >>confdefs.h
  
  
--cat >>confdefs.h <<\_ACEOF
--#define HAVE_GETSPNAM 1
+-else
 +	# If we have libunwind, test whether we also have libunwind-ptrace
 +	# which would let us unwind arbitrary processes.
 +	save_LIBS=$LIBS
@@ -54078,22 +54105,18 @@
 +if test "x$ac_cv_header_libunwind_ptrace_h" = x""yes; then :
 +  cat >>confdefs.h <<_ACEOF
 +#define HAVE_LIBUNWIND_PTRACE_H 1
- _ACEOF
++_ACEOF
  
-+fi
- 
-+done
- 
--else
--
 -        # getspnam was not found, try adding libsec
 -	case " $LIBS " in
 -          *\ -lsec\ *)
--
++fi
+ 
 -		    # getspnam was not found and we already had libsec
 -		    # nothing to do here by default
 -		    true
--
++done
+ 
 -	    ;;
 -          *)
 -	    # getspnam was not found, try adding libsec
@@ -54117,7 +54140,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -48457,969 +15481,649 @@
+@@ -48457,541 +15481,649 @@
  #ifdef __cplusplus
  extern "C"
  #endif
@@ -54317,17 +54340,28 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  eval "$as_ac_var=yes"
--else
++if ac_fn_c_try_link "$LINENO"; then :
++
++		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }
++
++$as_echo "#define HAVE_LINUX_PTRACE 1" >>confdefs.h
++
++
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
+ 
 -	eval "$as_ac_var=no"
 -fi
--
++		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++		LIBUNWIND_PTRACE=""
+ 
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
--fi
+ fi
 -ac_res=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
@@ -54335,39 +54369,74 @@
 -as_val=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
--  cat >>confdefs.h <<_ACEOF
--#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
--_ACEOF
--
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
++fi
++
++
++
++for ac_func in _dup _dup2 _opendir _readdir _seekdir _telldir _closedir
++do :
++  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
++ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
++eval as_val=\$$as_ac_var
++   if test "x$as_val" = x""yes; then :
+   cat >>confdefs.h <<_ACEOF
+ #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+ _ACEOF
+ 
 -        # bigcrypt was found in libc or existing $LIBS
 -
-+if ac_fn_c_try_link "$LINENO"; then :
++fi
++done
  
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_BIGCRYPT 1
--_ACEOF
-+		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-+$as_echo "yes" >&6; }
++for ac_func in __dup __dup2 __opendir __readdir __seekdir __telldir __closedir
++do :
++  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
++ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
++eval as_val=\$$as_ac_var
++   if test "x$as_val" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+ _ACEOF
  
-+$as_echo "#define HAVE_LINUX_PTRACE 1" >>confdefs.h
++fi
++done
  
++for ac_func in __getcwd _getcwd
++do :
++  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
++ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
++eval as_val=\$$as_ac_var
++   if test "x$as_val" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
++_ACEOF
  
- else
+-else
++fi
++done
  
 -        # bigcrypt was not found, try adding libsecurity
 -	case " $LIBS " in
 -          *\ -lsecurity\ *)
-+		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-+$as_echo "no" >&6; }
-+		LIBUNWIND_PTRACE=""
++for ac_func in __xstat __fxstat __lxstat
++do :
++  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
++ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
++eval as_val=\$$as_ac_var
++   if test "x$as_val" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
++_ACEOF
  
 -		    # bigcrypt was not found and we already had libsecurity
 -		    # nothing to do here by default
 -		    true
 +fi
-+rm -f core conftest.err conftest.$ac_objext \
-+    conftest$ac_exeext conftest.$ac_ext
-+fi
++done
  
 -	    ;;
 -          *)
@@ -54381,7 +54450,15 @@
 -LIBS="-lsecurity  $LIBS"
 -cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
--_ACEOF
++for ac_func in _stat _lstat _fstat __stat __lstat __fstat
++do :
++  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
++ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
++eval as_val=\$$as_ac_var
++   if test "x$as_val" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+ _ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
@@ -54400,8 +54477,10 @@
 -  ;
 -  return 0;
 -}
++fi
++done
 +
-+for ac_func in _dup _dup2 _opendir _readdir _seekdir _telldir _closedir
++for ac_func in _acl __acl _facl __facl _open __open _chdir __chdir
 +do :
 +  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
@@ -54440,7 +54519,7 @@
  fi
 +done
 +
-+for ac_func in __dup __dup2 __opendir __readdir __seekdir __telldir __closedir
++for ac_func in _close __close _fchdir __fchdir _fcntl __fcntl
 +do :
 +  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
@@ -54461,7 +54540,7 @@
 +done
  
 -		LIBS="-lsecurity $LIBS"
-+for ac_func in __getcwd _getcwd
++for ac_func in getdents __getdents _lseek __lseek _read __read
 +do :
 +  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
@@ -54476,7 +54555,7 @@
  
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_BIGCRYPT 1
-+for ac_func in __xstat __fxstat __lxstat
++for ac_func in getdirentries _write __write _fork __fork
 +do :
 +  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
@@ -54489,7 +54568,7 @@
 +fi
 +done
  
-+for ac_func in _stat _lstat _fstat __stat __lstat __fstat
++for ac_func in _stat64 __stat64 _fstat64 __fstat64 _lstat64 __lstat64
 +do :
 +  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
@@ -54503,7 +54582,7 @@
 +fi
 +done
  
-+for ac_func in _acl __acl _facl __facl _open __open _chdir __chdir
++for ac_func in __sys_llseek llseek _llseek __llseek readdir64 _readdir64 __readdir64
 +do :
 +  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
@@ -54519,7 +54598,7 @@
 +fi
 +done
  
-+for ac_func in _close __close _fchdir __fchdir _fcntl __fcntl
++for ac_func in pread _pread __pread pread64 _pread64 __pread64
 +do :
 +  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
@@ -54534,7 +54613,7 @@
  
 -	  ;;
 -        esac
-+for ac_func in getdents __getdents _lseek __lseek _read __read
++for ac_func in pwrite _pwrite __pwrite pwrite64 _pwrite64 __pwrite64
 +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"
@@ -54547,7 +54626,7 @@
  fi
  done
  
-+for ac_func in getdirentries _write __write _fork __fork
++for ac_func in open64 _open64 __open64 creat64
 +do :
 +  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
@@ -54571,14 +54650,12 @@
 -else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
-+for ac_func in _stat64 __stat64 _fstat64 __fstat64 _lstat64 __lstat64
++for ac_func in prctl
 +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" "prctl" "ac_cv_func_prctl"
++if test "x$ac_cv_func_prctl" = x""yes; then :
 +  cat >>confdefs.h <<_ACEOF
-+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
++#define HAVE_PRCTL 1
  _ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
@@ -54586,30 +54663,23 @@
 -/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
 -   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
 -#define $ac_func innocuous_$ac_func
--
+ 
 -/* System header to define __stub macros and hopefully few prototypes,
 -    which can conflict with char $ac_func (); below.
 -    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
 -    <limits.h> exists even on freestanding compilers.  */
++fi
++done
  
 -#ifdef __STDC__
 -# include <limits.h>
 -#else
 -# include <assert.h>
 -#endif
-+fi
-+done
  
 -#undef $ac_func
-+for ac_func in __sys_llseek llseek _llseek __llseek readdir64 _readdir64 __readdir64
-+do :
-+  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-+eval as_val=\$$as_ac_var
-+   if test "x$as_val" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-+_ACEOF
++cat confdefs.h - <<_ACEOF >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
@@ -54623,25 +54693,18 @@
 -    something starting with __ and the normal name is an alias.  */
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
--#endif
-+fi
-+done
++#ifdef HAVE_SYS_PRCTL_H
++#include <sys/prctl.h>
+ #endif
  
--int
--main ()
--{
+ int
+ main ()
+ {
 -return $ac_func ();
--  ;
--  return 0;
--}
-+for ac_func in pread _pread __pread pread64 _pread64 __pread64
-+do :
-+  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-+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
++int i; i = prtcl(0);
+   ;
+   return 0;
+ }
  _ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
@@ -54665,18 +54728,66 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  eval "$as_ac_var=yes"
--else
++if ac_fn_c_try_compile "$LINENO"; then :
++
++$as_echo "#define HAVE_PRCTL 1" >>confdefs.h
++
++fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++
++#
++#
++#
++case "$host_os" in
++    *linux* | gnu* | k*bsd*-gnu | kopensolaris*-gnu)
++       # glibc <= 2.3.2 has a broken getgrouplist
++       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for good getgrouplist" >&5
++$as_echo_n "checking for good getgrouplist... " >&6; }
++if test "${samba_cv_linux_getgrouplist_ok+set}" = set; then :
++  $as_echo_n "(cached) " >&6
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
++  if test "$cross_compiling" = yes; then :
++  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
++$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
++as_fn_error "cannot run test program while cross compiling
++See \`config.log' for more details." "$LINENO" 5; }
++else
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++
++#include <unistd.h>
++#include <sys/utsname.h>
++main() {
++       /* glibc up to 2.3 has a broken getgrouplist */
++#if defined(__GLIBC__) && defined(__GLIBC_MINOR__)
++       int libc_major = __GLIBC__;
++       int libc_minor = __GLIBC_MINOR__;
++
++       if (libc_major < 2)
++              exit(1);
++       if ((libc_major == 2) && (libc_minor <= 3))
++              exit(1);
++#endif
++       exit(0);
++}
  
 -	eval "$as_ac_var=no"
++_ACEOF
++if ac_fn_c_try_run "$LINENO"; then :
++  samba_cv_linux_getgrouplist_ok=yes
++else
++  samba_cv_linux_getgrouplist_ok=no
++fi
++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
++  conftest.$ac_objext conftest.beam conftest.$ac_ext
  fi
-+done
  
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
--fi
+ fi
 -ac_res=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
@@ -54684,55 +54795,77 @@
 -as_val=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+for ac_func in pwrite _pwrite __pwrite pwrite64 _pwrite64 __pwrite64
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $samba_cv_linux_getgrouplist_ok" >&5
++$as_echo "$samba_cv_linux_getgrouplist_ok" >&6; }
++       if test x"$samba_cv_linux_getgrouplist_ok" = x"yes"; then
++
++$as_echo "#define HAVE_GETGROUPLIST 1" >>confdefs.h
++
++       fi
++       ;;
++    *)
++       for ac_func in getgrouplist
 +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" "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_func" | $as_tr_cpp` 1
++#define HAVE_GETGROUPLIST 1
  _ACEOF
  
 -        # bigcrypt was found in libc or existing $LIBS
--
 +fi
 +done
  
++       ;;
++esac
+ 
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_BIGCRYPT 1
-+for ac_func in open64 _open64 __open64 creat64
-+do :
-+  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-+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
++#
++# stat64 family may need <sys/stat.h> on some systems, notably ReliantUNIX
++#
  
-+fi
-+done
++if test x$ac_cv_func_stat64 = xno ; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stat64 in <sys/stat.h>" >&5
++$as_echo_n "checking for stat64 in <sys/stat.h>... " >&6; }
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
  
-+for ac_func in prctl
-+do :
-+  ac_fn_c_check_func "$LINENO" "prctl" "ac_cv_func_prctl"
-+if test "x$ac_cv_func_prctl" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define HAVE_PRCTL 1
++#if defined(HAVE_UNISTD_H)
++#include <unistd.h>
++#endif
++#include <sys/stat.h>
+ 
+-else
++int
++main ()
++{
++struct stat64 st64; exit(stat64(".",&st64));
++  ;
++  return 0;
++}
 +_ACEOF
++if ac_fn_c_try_link "$LINENO"; then :
++  ac_cv_func_stat64=yes
++fi
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_stat64" >&5
++$as_echo "$ac_cv_func_stat64" >&6; }
++  if test x$ac_cv_func_stat64 = xyes ; then
  
--else
--
 -        # bigcrypt was not found, try adding libsec
 -	case " $LIBS " in
 -          *\ -lsec\ *)
-+fi
-+done
++$as_echo "#define HAVE_STAT64 1" >>confdefs.h
  
 -		    # bigcrypt was not found and we already had libsec
 -		    # nothing to do here by default
 -		    true
++  fi
++fi
  
 -	    ;;
 -          *)
@@ -54746,10 +54879,44 @@
 -LIBS="-lsec  $LIBS"
 -cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
--_ACEOF
++if test x$ac_cv_func_lstat64 = xno ; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lstat64 in <sys/stat.h>" >&5
++$as_echo_n "checking for lstat64 in <sys/stat.h>... " >&6; }
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++
++#if defined(HAVE_UNISTD_H)
++#include <unistd.h>
++#endif
++#include <sys/stat.h>
++
++int
++main ()
++{
++struct stat64 st64; exit(lstat64(".",&st64));
++  ;
++  return 0;
++}
+ _ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++if ac_fn_c_try_link "$LINENO"; then :
++  ac_cv_func_lstat64=yes
++fi
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_lstat64" >&5
++$as_echo "$ac_cv_func_lstat64" >&6; }
++  if test x$ac_cv_func_lstat64 = xyes ; then
++    $as_echo "#define HAVE_LSTAT64 Whether lstat64() is available" >>confdefs.h
++
++  fi
++fi
++
++if test x$ac_cv_func_fstat64 = xno ; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fstat64 in <sys/stat.h>" >&5
++$as_echo_n "checking for fstat64 in <sys/stat.h>... " >&6; }
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
  
 -/* Override any GCC internal prototype to avoid an error.
@@ -54757,16 +54924,17 @@
 -   builtin and then its argument prototype would still apply.  */
 -#ifdef __cplusplus
 -extern "C"
-+#ifdef HAVE_SYS_PRCTL_H
-+#include <sys/prctl.h>
++#if defined(HAVE_UNISTD_H)
++#include <unistd.h>
  #endif
 -char bigcrypt ();
++#include <sys/stat.h>
 +
  int
  main ()
  {
 -return bigcrypt ();
-+int i; i = prtcl(0);
++struct stat64 st64; exit(fstat64(0,&st64));
    ;
    return 0;
  }
@@ -54796,129 +54964,200 @@
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+if ac_fn_c_try_compile "$LINENO"; then :
++if ac_fn_c_try_link "$LINENO"; then :
++  ac_cv_func_fstat64=yes
++fi
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fstat64" >&5
++$as_echo "$ac_cv_func_fstat64" >&6; }
++  if test x$ac_cv_func_fstat64 = xyes ; then
++
++$as_echo "#define HAVE_FSTAT64 1" >>confdefs.h
++
++  fi
++fi
++
++#################################################
++# Check whether struct stat has timestamps with sub-second resolution.
++#
++
++samba_cv_stat_hires=no
++ac_fn_c_check_member "$LINENO" "struct stat" "st_mtim.tv_nsec" "ac_cv_member_struct_stat_st_mtim_tv_nsec" "$ac_includes_default"
++if test "x$ac_cv_member_struct_stat_st_mtim_tv_nsec" = x""yes; then :
++
++cat >>confdefs.h <<_ACEOF
++#define HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC 1
++_ACEOF
++
++# Linux, Solaris
++	samba_cv_stat_hires=yes
++fi
++
++ac_fn_c_check_member "$LINENO" "struct stat" "st_mtimensec" "ac_cv_member_struct_stat_st_mtimensec" "$ac_includes_default"
++if test "x$ac_cv_member_struct_stat_st_mtimensec" = x""yes; then :
++
++cat >>confdefs.h <<_ACEOF
++#define HAVE_STRUCT_STAT_ST_MTIMENSEC 1
++_ACEOF
++
++# BSD, if defined _POSIX_SOURCE
++	samba_cv_stat_hires=yes
++fi
++
++ac_fn_c_check_member "$LINENO" "struct stat" "st_mtimespec.tv_nsec" "ac_cv_member_struct_stat_st_mtimespec_tv_nsec" "$ac_includes_default"
++if test "x$ac_cv_member_struct_stat_st_mtimespec_tv_nsec" = x""yes; then :
++
++cat >>confdefs.h <<_ACEOF
++#define HAVE_STRUCT_STAT_ST_MTIMESPEC_TV_NSEC 1
++_ACEOF
++
++# BSD, if not defined _POSIX_SOURCE
++	samba_cv_stat_hires=yes
++fi
++
++ac_fn_c_check_member "$LINENO" "struct stat" "st_mtime_n" "ac_cv_member_struct_stat_st_mtime_n" "$ac_includes_default"
++if test "x$ac_cv_member_struct_stat_st_mtime_n" = x""yes; then :
++
++cat >>confdefs.h <<_ACEOF
++#define HAVE_STRUCT_STAT_ST_MTIME_N 1
++_ACEOF
++
++# AIX
++	samba_cv_stat_hires=yes
++fi
++
++ac_fn_c_check_member "$LINENO" "struct stat" "st_umtime" "ac_cv_member_struct_stat_st_umtime" "$ac_includes_default"
++if test "x$ac_cv_member_struct_stat_st_umtime" = x""yes; then :
++
++cat >>confdefs.h <<_ACEOF
++#define HAVE_STRUCT_STAT_ST_UMTIME 1
++_ACEOF
++
++# Tru64
++	samba_cv_stat_hires=yes
++fi
++
++
++if test x"$samba_cv_stat_hires" = x"yes" ; then
++
++$as_echo "#define HAVE_STAT_HIRES_TIMESTAMPS 1" >>confdefs.h
  
 -	ac_cv_lib_sec_bigcrypt=no
--fi
-+$as_echo "#define HAVE_PRCTL 1" >>confdefs.h
+ fi
  
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
 -LIBS=$ac_check_lib_save_LIBS
++# recent FreeBSD, NetBSD have creation timestamps called birthtime:
++ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtimespec.tv_nsec" "ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" "$ac_includes_default"
++if test "x$ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" = x""yes; then :
++
++cat >>confdefs.h <<_ACEOF
++#define HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC 1
++_ACEOF
++
++
  fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_sec_bigcrypt" >&5
 -$as_echo "$ac_cv_lib_sec_bigcrypt" >&6; }
 -if test "x$ac_cv_lib_sec_bigcrypt" = x""yes; then
--
+ 
 -		LIBS="-lsec $LIBS"
--
--
++ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtime" "ac_cv_member_struct_stat_st_birthtime" "$ac_includes_default"
++if test "x$ac_cv_member_struct_stat_st_birthtime" = x""yes; then :
+ 
++cat >>confdefs.h <<_ACEOF
++#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
++_ACEOF
+ 
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_BIGCRYPT 1
--_ACEOF
--
--
-+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtimensec" "ac_cv_member_struct_stat_st_birthtimensec" "$ac_includes_default"
++if test "x$ac_cv_member_struct_stat_st_birthtimensec" = x""yes; then :
++
++cat >>confdefs.h <<_ACEOF
++#define HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC 1
+ _ACEOF
  
-+#
-+#
-+#
-+case "$host_os" in
-+    *linux* | gnu* | k*bsd*-gnu | kopensolaris*-gnu)
-+       # glibc <= 2.3.2 has a broken getgrouplist
-+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for good getgrouplist" >&5
-+$as_echo_n "checking for good getgrouplist... " >&6; }
-+if test "${samba_cv_linux_getgrouplist_ok+set}" = set; then :
-+  $as_echo_n "(cached) " >&6
-+else
-+  if test "$cross_compiling" = yes; then :
-+  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-+as_fn_error "cannot run test program while cross compiling
-+See \`config.log' for more details." "$LINENO" 5; }
- else
-+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h.  */
  
-+#include <unistd.h>
-+#include <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
  
+-else
++fi
+ 
+ 
 -			# bigcrypt was not found in libsec
 -			# nothing to do here by default
 -			true
-+       if (libc_major < 2)
-+              exit(1);
-+       if ((libc_major == 2) && (libc_minor <= 3))
-+              exit(1);
-+#endif
-+       exit(0);
-+}
  
-+_ACEOF
-+if ac_fn_c_try_run "$LINENO"; then :
-+  samba_cv_linux_getgrouplist_ok=yes
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether there is DOS flags support in the stat struct" >&5
++$as_echo_n "checking whether there is DOS flags support in the stat struct... " >&6; }
++if test "${samba_cv_stat_dos_flags+set}" = set; then :
++  $as_echo_n "(cached) " >&6
 +else
-+  samba_cv_linux_getgrouplist_ok=no
-+fi
-+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-+  conftest.$ac_objext conftest.beam conftest.$ac_ext
-+fi
  
- fi
-+{ $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
+-fi
++	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++#include <sys/stat.h>
++int
++main ()
++{
  
 -	  ;;
 -        esac
-+$as_echo "#define HAVE_GETGROUPLIST 1" >>confdefs.h
-+
-+       fi
-+       ;;
-+    *)
-+       for ac_func in getgrouplist
-+do :
-+  ac_fn_c_check_func "$LINENO" "getgrouplist" "ac_cv_func_getgrouplist"
-+if test "x$ac_cv_func_getgrouplist" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define HAVE_GETGROUPLIST 1
++		int a = UF_DOS_ARCHIVE;
++		int h = UF_DOS_HIDDEN;
++		int r = UF_DOS_RO;
++		int s = UF_DOS_SYSTEM;
++		int i = UF_DOS_NOINDEX;
++		int f = UF_DOS_FLAGS;
+ 
++  ;
++  return 0;
++}
 +_ACEOF
- 
++if ac_fn_c_try_compile "$LINENO"; then :
++  samba_cv_stat_dos_flags=yes
++else
++  samba_cv_stat_dos_flags=no
  fi
- done
+-done
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  
-+       ;;
-+esac
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $samba_cv_stat_dos_flags" >&5
++$as_echo "$samba_cv_stat_dos_flags" >&6; }
  
-+#
-+# stat64 family may need <sys/stat.h> on some systems, notably ReliantUNIX
-+#
++if test x"$samba_cv_stat_dos_flags" = x"yes" ; then
  
--
--
++$as_echo "#define HAVE_STAT_DOS_FLAGS 1" >>confdefs.h
+ 
++fi
+ 
 -for ac_func in getprpwnam
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
 -$as_echo_n "checking for $ac_func... " >&6; }
 -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
--  $as_echo_n "(cached) " >&6
--else
++#####################################
++# needed for SRV lookups
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dn_expand in -lresolv" >&5
++$as_echo_n "checking for dn_expand in -lresolv... " >&6; }
++if test "${ac_cv_lib_resolv_dn_expand+set}" = set; then :
+   $as_echo_n "(cached) " >&6
+ else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+if test x$ac_cv_func_stat64 = xno ; then
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stat64 in <sys/stat.h>" >&5
-+$as_echo_n "checking for stat64 in <sys/stat.h>... " >&6; }
-+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++  ac_check_lib_save_LIBS=$LIBS
++LIBS="-lresolv  $LIBS"
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
 -/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
 -   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
@@ -54937,28 +55176,26 @@
 -
 -#undef $ac_func
  
--/* Override any GCC internal prototype to avoid an error.
--   Use char because int might match the return type of a GCC
--   builtin and then its argument prototype would still apply.  */
--#ifdef __cplusplus
--extern "C"
--#endif
+ /* Override any GCC internal prototype to avoid an error.
+    Use char because int might match the return type of a GCC
+@@ -48999,100 +16131,43 @@
+ #ifdef __cplusplus
+ extern "C"
+ #endif
 -char $ac_func ();
 -/* The GNU C library defines this for functions which it implements
 -    to always fail with ENOSYS.  Some functions are actually named
 -    something starting with __ and the normal name is an alias.  */
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
-+#if defined(HAVE_UNISTD_H)
-+#include <unistd.h>
- #endif
-+#include <sys/stat.h>
- 
+-#endif
+-
++char dn_expand ();
  int
  main ()
  {
 -return $ac_func ();
-+struct stat64 st64; exit(stat64(".",&st64));
++return dn_expand ();
    ;
    return 0;
  }
@@ -54985,18 +55222,22 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  eval "$as_ac_var=yes"
--else
++if ac_fn_c_try_link "$LINENO"; then :
++  ac_cv_lib_resolv_dn_expand=yes
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	eval "$as_ac_var=no"
--fi
++  ac_cv_lib_resolv_dn_expand=no
+ fi
 -
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
-+if ac_fn_c_try_link "$LINENO"; then :
-+  ac_cv_func_stat64=yes
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
  fi
 -ac_res=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
@@ -55005,7 +55246,10 @@
 -as_val=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
--  cat >>confdefs.h <<_ACEOF
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_dn_expand" >&5
++$as_echo "$ac_cv_lib_resolv_dn_expand" >&6; }
++if test "x$ac_cv_lib_resolv_dn_expand" = x""yes; then :
+   cat >>confdefs.h <<_ACEOF
 -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 -_ACEOF
 -
@@ -55014,94 +55258,57 @@
 -
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_GETPRPWNAM 1
--_ACEOF
--
-+rm -f core conftest.err conftest.$ac_objext \
-+    conftest$ac_exeext conftest.$ac_ext
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_stat64" >&5
-+$as_echo "$ac_cv_func_stat64" >&6; }
-+  if test x$ac_cv_func_stat64 = xyes ; then
++#define HAVE_LIBRESOLV 1
+ _ACEOF
  
-+$as_echo "#define HAVE_STAT64 1" >>confdefs.h
++  LIBS="-lresolv $LIBS"
  
--else
-+  fi
 +fi
  
+-else
+-
 -        # getprpwnam was not found, try adding libsecurity
 -	case " $LIBS " in
 -          *\ -lsecurity\ *)
-+if test x$ac_cv_func_lstat64 = xno ; then
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lstat64 in <sys/stat.h>" >&5
-+$as_echo_n "checking for lstat64 in <sys/stat.h>... " >&6; }
-+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h.  */
- 
+-
 -		    # getprpwnam was not found and we already had libsecurity
 -		    # nothing to do here by default
 -		    true
-+#if defined(HAVE_UNISTD_H)
-+#include <unistd.h>
-+#endif
-+#include <sys/stat.h>
- 
+-
 -	    ;;
 -          *)
 -	    # getprpwnam was not found, try adding libsecurity
 -	    { $as_echo "$as_me:$LINENO: checking for getprpwnam in -lsecurity" >&5
 -$as_echo_n "checking for getprpwnam in -lsecurity... " >&6; }
 -if test "${ac_cv_lib_security_getprpwnam+set}" = set; then
--  $as_echo_n "(cached) " >&6
--else
--  ac_check_lib_save_LIBS=$LIBS
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _dn_expand in -lresolv" >&5
++$as_echo_n "checking for _dn_expand in -lresolv... " >&6; }
++if test "${ac_cv_lib_resolv__dn_expand+set}" = set; then :
+   $as_echo_n "(cached) " >&6
+ else
+   ac_check_lib_save_LIBS=$LIBS
 -LIBS="-lsecurity  $LIBS"
 -cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
-+int
-+main ()
-+{
-+struct stat64 st64; exit(lstat64(".",&st64));
-+  ;
-+  return 0;
-+}
- _ACEOF
+-_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+if ac_fn_c_try_link "$LINENO"; then :
-+  ac_cv_func_lstat64=yes
-+fi
-+rm -f core conftest.err conftest.$ac_objext \
-+    conftest$ac_exeext conftest.$ac_ext
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_lstat64" >&5
-+$as_echo "$ac_cv_func_lstat64" >&6; }
-+  if test x$ac_cv_func_lstat64 = xyes ; then
-+    $as_echo "#define HAVE_LSTAT64 Whether lstat64() is available" >>confdefs.h
-+
-+  fi
-+fi
-+
-+if test x$ac_cv_func_fstat64 = xno ; then
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fstat64 in <sys/stat.h>" >&5
-+$as_echo_n "checking for fstat64 in <sys/stat.h>... " >&6; }
-+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++LIBS="-lresolv  $LIBS"
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
  
--/* Override any GCC internal prototype to avoid an error.
--   Use char because int might match the return type of a GCC
--   builtin and then its argument prototype would still apply.  */
--#ifdef __cplusplus
--extern "C"
-+#if defined(HAVE_UNISTD_H)
-+#include <unistd.h>
+ /* Override any GCC internal prototype to avoid an error.
+@@ -49101,111 +16176,44 @@
+ #ifdef __cplusplus
+ extern "C"
  #endif
 -char getprpwnam ();
-+#include <sys/stat.h>
-+
++char _dn_expand ();
  int
  main ()
  {
 -return getprpwnam ();
-+struct stat64 st64; exit(fstat64(0,&st64));
++return _dn_expand ();
    ;
    return 0;
  }
@@ -55128,142 +55335,104 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  ac_cv_lib_security_getprpwnam=yes
--else
++if ac_fn_c_try_link "$LINENO"; then :
++  ac_cv_lib_resolv__dn_expand=yes
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	ac_cv_lib_security_getprpwnam=no
-+if ac_fn_c_try_link "$LINENO"; then :
-+  ac_cv_func_fstat64=yes
++  ac_cv_lib_resolv__dn_expand=no
  fi
-+rm -f core conftest.err conftest.$ac_objext \
-+    conftest$ac_exeext conftest.$ac_ext
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fstat64" >&5
-+$as_echo "$ac_cv_func_fstat64" >&6; }
-+  if test x$ac_cv_func_fstat64 = xyes ; then
- 
+-
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
--LIBS=$ac_check_lib_save_LIBS
-+$as_echo "#define HAVE_FSTAT64 1" >>confdefs.h
-+
-+  fi
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
+ LIBS=$ac_check_lib_save_LIBS
  fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_security_getprpwnam" >&5
 -$as_echo "$ac_cv_lib_security_getprpwnam" >&6; }
 -if test "x$ac_cv_lib_security_getprpwnam" = x""yes; then
- 
+-
 -		LIBS="-lsecurity $LIBS"
-+#################################################
-+# Check whether struct stat has timestamps with sub-second resolution.
-+#
- 
-+samba_cv_stat_hires=no
-+ac_fn_c_check_member "$LINENO" "struct stat" "st_mtim.tv_nsec" "ac_cv_member_struct_stat_st_mtim_tv_nsec" "$ac_includes_default"
-+if test "x$ac_cv_member_struct_stat_st_mtim_tv_nsec" = x""yes; then :
- 
+-
+-
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_GETPRPWNAM 1
-+cat >>confdefs.h <<_ACEOF
-+#define HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC 1
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv__dn_expand" >&5
++$as_echo "$ac_cv_lib_resolv__dn_expand" >&6; }
++if test "x$ac_cv_lib_resolv__dn_expand" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_LIBRESOLV 1
  _ACEOF
  
-+# Linux, Solaris
-+	samba_cv_stat_hires=yes
-+fi
- 
-+ac_fn_c_check_member "$LINENO" "struct stat" "st_mtimensec" "ac_cv_member_struct_stat_st_mtimensec" "$ac_includes_default"
-+if test "x$ac_cv_member_struct_stat_st_mtimensec" = x""yes; then :
- 
+-
+-
 -else
-+cat >>confdefs.h <<_ACEOF
-+#define HAVE_STRUCT_STAT_ST_MTIMENSEC 1
-+_ACEOF
- 
-+# BSD, if defined _POSIX_SOURCE
-+	samba_cv_stat_hires=yes
-+fi
- 
+-
+-
 -			# getprpwnam was not found in libsecurity
 -			# nothing to do here by default
 -			true
-+ac_fn_c_check_member "$LINENO" "struct stat" "st_mtimespec.tv_nsec" "ac_cv_member_struct_stat_st_mtimespec_tv_nsec" "$ac_includes_default"
-+if test "x$ac_cv_member_struct_stat_st_mtimespec_tv_nsec" = x""yes; then :
- 
-+cat >>confdefs.h <<_ACEOF
-+#define HAVE_STRUCT_STAT_ST_MTIMESPEC_TV_NSEC 1
-+_ACEOF
- 
-+# BSD, if not defined _POSIX_SOURCE
-+	samba_cv_stat_hires=yes
- fi
- 
+-
+-
+-fi
+-
 -	  ;;
 -        esac
-+ac_fn_c_check_member "$LINENO" "struct stat" "st_mtime_n" "ac_cv_member_struct_stat_st_mtime_n" "$ac_includes_default"
-+if test "x$ac_cv_member_struct_stat_st_mtime_n" = x""yes; then :
-+
-+cat >>confdefs.h <<_ACEOF
-+#define HAVE_STRUCT_STAT_ST_MTIME_N 1
-+_ACEOF
++  LIBS="-lresolv $LIBS"
  
-+# AIX
-+	samba_cv_stat_hires=yes
  fi
 -done
  
-+ac_fn_c_check_member "$LINENO" "struct stat" "st_umtime" "ac_cv_member_struct_stat_st_umtime" "$ac_includes_default"
-+if test "x$ac_cv_member_struct_stat_st_umtime" = x""yes; then :
- 
-+cat >>confdefs.h <<_ACEOF
-+#define HAVE_STRUCT_STAT_ST_UMTIME 1
-+_ACEOF
- 
-+# Tru64
-+	samba_cv_stat_hires=yes
-+fi
- 
+-
+-
+-
 -for ac_func in getprpwnam
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
 -$as_echo_n "checking for $ac_func... " >&6; }
 -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
--  $as_echo_n "(cached) " >&6
--else
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __dn_expand in -lresolv" >&5
++$as_echo_n "checking for __dn_expand in -lresolv... " >&6; }
++if test "${ac_cv_lib_resolv___dn_expand+set}" = set; then :
+   $as_echo_n "(cached) " >&6
+ else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
++  ac_check_lib_save_LIBS=$LIBS
++LIBS="-lresolv  $LIBS"
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
 -/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
 -   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
 -#define $ac_func innocuous_$ac_func
- 
+-
 -/* System header to define __stub macros and hopefully few prototypes,
 -    which can conflict with char $ac_func (); below.
 -    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
 -    <limits.h> exists even on freestanding compilers.  */
-+if test x"$samba_cv_stat_hires" = x"yes" ; then
- 
+-
 -#ifdef __STDC__
 -# include <limits.h>
 -#else
 -# include <assert.h>
 -#endif
-+$as_echo "#define HAVE_STAT_HIRES_TIMESTAMPS 1" >>confdefs.h
- 
+-
 -#undef $ac_func
-+fi
  
--/* Override any GCC internal prototype to avoid an error.
--   Use char because int might match the return type of a GCC
--   builtin and then its argument prototype would still apply.  */
--#ifdef __cplusplus
--extern "C"
--#endif
+ /* Override any GCC internal prototype to avoid an error.
+    Use char because int might match the return type of a GCC
+@@ -49213,100 +16221,79 @@
+ #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
@@ -55271,19 +55440,16 @@
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
 -#endif
-+# recent FreeBSD, NetBSD have creation timestamps called birthtime:
-+ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtimespec.tv_nsec" "ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" "$ac_includes_default"
-+if test "x$ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" = x""yes; then :
- 
--int
--main ()
--{
+-
++char __dn_expand ();
+ int
+ main ()
+ {
 -return $ac_func ();
--  ;
--  return 0;
--}
-+cat >>confdefs.h <<_ACEOF
-+#define HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC 1
++return __dn_expand ();
+   ;
+   return 0;
+ }
  _ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
@@ -55307,16 +55473,22 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  eval "$as_ac_var=yes"
--else
++if ac_fn_c_try_link "$LINENO"; then :
++  ac_cv_lib_resolv___dn_expand=yes
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
- 
+-
 -	eval "$as_ac_var=no"
--fi
- 
++  ac_cv_lib_resolv___dn_expand=no
+ fi
+-
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
  fi
 -ac_res=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
@@ -55325,83 +55497,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
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv___dn_expand" >&5
++$as_echo "$ac_cv_lib_resolv___dn_expand" >&6; }
++if test "x$ac_cv_lib_resolv___dn_expand" = x""yes; then :
+   cat >>confdefs.h <<_ACEOF
 -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
--_ACEOF
++#define HAVE_LIBRESOLV 1
+ _ACEOF
  
 -        # getprpwnam was found in libc or existing $LIBS
-+ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtime" "ac_cv_member_struct_stat_st_birthtime" "$ac_includes_default"
-+if test "x$ac_cv_member_struct_stat_st_birthtime" = x""yes; then :
-+
-+cat >>confdefs.h <<_ACEOF
-+#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
-+_ACEOF
++  LIBS="-lresolv $LIBS"
  
-+ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtimensec" "ac_cv_member_struct_stat_st_birthtimensec" "$ac_includes_default"
-+if test "x$ac_cv_member_struct_stat_st_birthtimensec" = x""yes; then :
++fi
  
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_GETPRPWNAM 1
-+cat >>confdefs.h <<_ACEOF
-+#define HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC 1
++
++#
++# Check for the functions putprpwnam, set_auth_parameters,
++# getspnam, bigcrypt and getprpwnam in -lsec and -lsecurity
++# Needed for OSF1 and HPUX.
++#
++
++
++  for ac_func in putprpwnam
++do :
++  ac_fn_c_check_func "$LINENO" "putprpwnam" "ac_cv_func_putprpwnam"
++if test "x$ac_cv_func_putprpwnam" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_PUTPRPWNAM 1
  _ACEOF
  
++        # putprpwnam was found in libc or existing $LIBS
++
++
++$as_echo "#define HAVE_PUTPRPWNAM 1" >>confdefs.h
++
  
-+fi
  
--else
-+fi
+ else
  
 -        # getprpwnam was not found, try adding libsec
--	case " $LIBS " in
++        # putprpwnam was not found, try adding libsecurity
+ 	case " $LIBS " in
 -          *\ -lsec\ *)
++          *\ -lsecurity\ *)
  
 -		    # getprpwnam was not found and we already had libsec
--		    # nothing to do here by default
--		    true
++		    # putprpwnam was not found and we already had libsecurity
+ 		    # nothing to do here by default
+ 		    true
  
--	    ;;
--          *)
+ 	    ;;
+           *)
 -	    # getprpwnam was not found, try adding libsec
 -	    { $as_echo "$as_me:$LINENO: checking for getprpwnam in -lsec" >&5
 -$as_echo_n "checking for getprpwnam in -lsec... " >&6; }
 -if test "${ac_cv_lib_sec_getprpwnam+set}" = set; then
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether there is DOS flags support in the stat struct" >&5
-+$as_echo_n "checking whether there is DOS flags support in the stat struct... " >&6; }
-+if test "${samba_cv_stat_dos_flags+set}" = set; then :
++	    # putprpwnam was not found, try adding libsecurity
++	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for putprpwnam in -lsecurity" >&5
++$as_echo_n "checking for putprpwnam in -lsecurity... " >&6; }
++if test "${ac_cv_lib_security_putprpwnam+set}" = set; then :
    $as_echo_n "(cached) " >&6
  else
--  ac_check_lib_save_LIBS=$LIBS
+   ac_check_lib_save_LIBS=$LIBS
 -LIBS="-lsec  $LIBS"
 -cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
++LIBS="-lsecurity  $LIBS"
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
  
--/* Override any GCC internal prototype to avoid an error.
--   Use char because int might match the return type of a GCC
--   builtin and then its argument prototype would still apply.  */
--#ifdef __cplusplus
--extern "C"
--#endif
+ /* Override any GCC internal prototype to avoid an error.
+@@ -49315,66 +16302,39 @@
+ #ifdef __cplusplus
+ extern "C"
+ #endif
 -char getprpwnam ();
-+	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h.  */
-+#include <sys/stat.h>
++char putprpwnam ();
  int
  main ()
  {
 -return getprpwnam ();
-+
-+		int a = UF_DOS_ARCHIVE;
-+		int h = UF_DOS_HIDDEN;
-+		int r = UF_DOS_RO;
-+		int s = UF_DOS_SYSTEM;
-+		int i = UF_DOS_NOINDEX;
-+		int f = UF_DOS_FLAGS;
-+
++return putprpwnam ();
    ;
    return 0;
  }
@@ -55428,80 +55609,68 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  ac_cv_lib_sec_getprpwnam=yes
-+if ac_fn_c_try_compile "$LINENO"; then :
-+  samba_cv_stat_dos_flags=yes
++if ac_fn_c_try_link "$LINENO"; then :
++  ac_cv_lib_security_putprpwnam=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	ac_cv_lib_sec_getprpwnam=no
-+  samba_cv_stat_dos_flags=no
++  ac_cv_lib_security_putprpwnam=no
  fi
-+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- 
+-
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
--LIBS=$ac_check_lib_save_LIBS
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
+ LIBS=$ac_check_lib_save_LIBS
  fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_sec_getprpwnam" >&5
 -$as_echo "$ac_cv_lib_sec_getprpwnam" >&6; }
 -if test "x$ac_cv_lib_sec_getprpwnam" = x""yes; then
--
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_security_putprpwnam" >&5
++$as_echo "$ac_cv_lib_security_putprpwnam" >&6; }
++if test "x$ac_cv_lib_security_putprpwnam" = x""yes; then :
+ 
 -		LIBS="-lsec $LIBS"
--
--
++		LIBS="-lsecurity $LIBS"
+ 
+ 
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_GETPRPWNAM 1
 -_ACEOF
--
--
--
--else
--
--
++$as_echo "#define HAVE_PUTPRPWNAM 1" >>confdefs.h
+ 
+ 
+ 
+ else
+ 
+ 
 -			# getprpwnam was not found in libsec
--			# nothing to do here by default
--			true
--
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $samba_cv_stat_dos_flags" >&5
-+$as_echo "$samba_cv_stat_dos_flags" >&6; }
++			# putprpwnam was not found in libsecurity
+ 			# nothing to do here by default
+ 			true
  
--fi
-+if test x"$samba_cv_stat_dos_flags" = x"yes" ; then
+@@ -49389,233 +16349,43 @@
  
--	  ;;
--        esac
-+$as_echo "#define HAVE_STAT_DOS_FLAGS 1" >>confdefs.h
  
- fi
--done
  
 -
--
--
 -for ac_func in strsignal
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
 -$as_echo_n "checking for $ac_func... " >&6; }
 -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-+#####################################
-+# needed for SRV lookups
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dn_expand in -lresolv" >&5
-+$as_echo_n "checking for dn_expand in -lresolv... " >&6; }
-+if test "${ac_cv_lib_resolv_dn_expand+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
+-  $as_echo_n "(cached) " >&6
+-else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+  ac_check_lib_save_LIBS=$LIBS
-+LIBS="-lresolv  $LIBS"
-+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
+-/* end confdefs.h.  */
 -/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
 -   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
 -#define $ac_func innocuous_$ac_func
@@ -55518,13 +55687,13 @@
 -#endif
 -
 -#undef $ac_func
- 
- /* Override any GCC internal prototype to avoid an error.
-    Use char because int might match the return type of a GCC
-@@ -49427,85 +16131,43 @@
- #ifdef __cplusplus
- extern "C"
- #endif
+-
+-/* Override any GCC internal prototype to avoid an error.
+-   Use char because int might match the return type of a GCC
+-   builtin and then its argument prototype would still apply.  */
+-#ifdef __cplusplus
+-extern "C"
+-#endif
 -char $ac_func ();
 -/* The GNU C library defines this for functions which it implements
 -    to always fail with ENOSYS.  Some functions are actually named
@@ -55533,16 +55702,14 @@
 -choke me
 -#endif
 -
-+char dn_expand ();
- int
- main ()
- {
+-int
+-main ()
+-{
 -return $ac_func ();
-+return dn_expand ();
-   ;
-   return 0;
- }
- _ACEOF
+-  ;
+-  return 0;
+-}
+-_ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -55565,23 +55732,17 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  eval "$as_ac_var=yes"
-+if ac_fn_c_try_link "$LINENO"; then :
-+  ac_cv_lib_resolv_dn_expand=yes
- else
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	eval "$as_ac_var=no"
-+  ac_cv_lib_resolv_dn_expand=no
- fi
+-fi
 -
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
-+rm -f core conftest.err conftest.$ac_objext \
-+    conftest$ac_exeext conftest.$ac_ext
-+LIBS=$ac_check_lib_save_LIBS
- fi
+-fi
 -ac_res=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
@@ -55589,20 +55750,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 :
++  for ac_func in putprpwnam
++do :
++  ac_fn_c_check_func "$LINENO" "putprpwnam" "ac_cv_func_putprpwnam"
++if test "x$ac_cv_func_putprpwnam" = x""yes; then :
    cat >>confdefs.h <<_ACEOF
 -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-+#define HAVE_LIBRESOLV 1
++#define HAVE_PUTPRPWNAM 1
  _ACEOF
  
 -fi
 -done
-+  LIBS="-lresolv $LIBS"
+-
++        # putprpwnam was found in libc or existing $LIBS
  
-+fi
- 
 -############################################
 -# Check if we have libattr
 -case "$host_os" in
@@ -55610,38 +55771,31 @@
 -	{ $as_echo "$as_me:$LINENO: checking for library containing getproplist" >&5
 -$as_echo_n "checking for library containing getproplist... " >&6; }
 -if test "${ac_cv_search_getproplist+set}" = set; then
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _dn_expand in -lresolv" >&5
-+$as_echo_n "checking for _dn_expand in -lresolv... " >&6; }
-+if test "${ac_cv_lib_resolv__dn_expand+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
+-  $as_echo_n "(cached) " >&6
+-else
 -  ac_func_search_save_LIBS=$LIBS
 -cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+  ac_check_lib_save_LIBS=$LIBS
-+LIBS="-lresolv  $LIBS"
-+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
+-/* end confdefs.h.  */
  
- /* Override any GCC internal prototype to avoid an error.
-@@ -49514,108 +16176,44 @@
- #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 getproplist ();
-+char _dn_expand ();
- int
- main ()
- {
+-int
+-main ()
+-{
 -return getproplist ();
-+return _dn_expand ();
-   ;
-   return 0;
- }
- _ACEOF
+-  ;
+-  return 0;
+-}
+-_ACEOF
 -for ac_lib in '' proplist; do
 -  if test -z "$ac_lib"; then
 -    ac_res="none required"
@@ -55674,10 +55828,11 @@
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
--
++$as_echo "#define HAVE_PUTPRPWNAM 1" >>confdefs.h
+ 
+ 
 -fi
--
+ 
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext
@@ -55687,47 +55842,42 @@
 -done
 -if test "${ac_cv_search_getproplist+set}" = set; then
 -  :
-+if ac_fn_c_try_link "$LINENO"; then :
-+  ac_cv_lib_resolv__dn_expand=yes
  else
 -  ac_cv_search_getproplist=no
 -fi
 -rm conftest.$ac_ext
 -LIBS=$ac_func_search_save_LIBS
-+  ac_cv_lib_resolv__dn_expand=no
- fi
+-fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_getproplist" >&5
 -$as_echo "$ac_cv_search_getproplist" >&6; }
 -ac_res=$ac_cv_search_getproplist
 -if test "$ac_res" != no; then
 -  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
 -
-+rm -f core conftest.err conftest.$ac_objext \
-+    conftest$ac_exeext conftest.$ac_ext
-+LIBS=$ac_check_lib_save_LIBS
- fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv__dn_expand" >&5
-+$as_echo "$ac_cv_lib_resolv__dn_expand" >&6; }
-+if test "x$ac_cv_lib_resolv__dn_expand" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define HAVE_LIBRESOLV 1
-+_ACEOF
+-fi
+-
+-
  
-+  LIBS="-lresolv $LIBS"
++        # putprpwnam was not found, try adding libsec
++	case " $LIBS " in
++          *\ -lsec\ *)
  
-+fi
++		    # putprpwnam was not found and we already had libsec
++		    # nothing to do here by default
++		    true
  
--
--
 -for ac_func in getproplist fgetproplist setproplist fsetproplist
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
 -$as_echo_n "checking for $ac_func... " >&6; }
 -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __dn_expand in -lresolv" >&5
-+$as_echo_n "checking for __dn_expand in -lresolv... " >&6; }
-+if test "${ac_cv_lib_resolv___dn_expand+set}" = set; then :
++	    ;;
++          *)
++	    # 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
 -  cat >conftest.$ac_ext <<_ACEOF
@@ -55736,7 +55886,7 @@
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
 +  ac_check_lib_save_LIBS=$LIBS
-+LIBS="-lresolv  $LIBS"
++LIBS="-lsec  $LIBS"
 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
 -/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
@@ -55758,7 +55908,7 @@
  
  /* Override any GCC internal prototype to avoid an error.
     Use char because int might match the return type of a GCC
-@@ -49623,103 +16221,80 @@
+@@ -49623,204 +16393,91 @@
  #ifdef __cplusplus
  extern "C"
  #endif
@@ -55770,12 +55920,12 @@
 -choke me
 -#endif
 -
-+char __dn_expand ();
++char putprpwnam ();
  int
  main ()
  {
 -return $ac_func ();
-+return __dn_expand ();
++return putprpwnam ();
    ;
    return 0;
  }
@@ -55803,13 +55953,13 @@
 -       }; then
 -  eval "$as_ac_var=yes"
 +if ac_fn_c_try_link "$LINENO"; then :
-+  ac_cv_lib_resolv___dn_expand=yes
++  ac_cv_lib_sec_putprpwnam=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	eval "$as_ac_var=no"
-+  ac_cv_lib_resolv___dn_expand=no
++  ac_cv_lib_sec_putprpwnam=no
  fi
 -
 -rm -rf conftest.dSYM
@@ -55826,38 +55976,18 @@
 -as_val=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv___dn_expand" >&5
-+$as_echo "$ac_cv_lib_resolv___dn_expand" >&6; }
-+if test "x$ac_cv_lib_resolv___dn_expand" = x""yes; then :
-   cat >>confdefs.h <<_ACEOF
+-  cat >>confdefs.h <<_ACEOF
 -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-+#define HAVE_LIBRESOLV 1
- _ACEOF
+-_ACEOF
++{ $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="-lresolv $LIBS"
-+
- fi
+-fi
 -done
++		LIBS="-lsec $LIBS"
  
  
-+#
-+# Check for the functions putprpwnam, set_auth_parameters,
-+# getspnam, bigcrypt and getprpwnam in -lsec and -lsecurity
-+# Needed for OSF1 and HPUX.
-+#
-+
-+
-+  for ac_func in putprpwnam
-+do :
-+  ac_fn_c_check_func "$LINENO" "putprpwnam" "ac_cv_func_putprpwnam"
-+if test "x$ac_cv_func_putprpwnam" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define HAVE_PUTPRPWNAM 1
-+_ACEOF
-+
-+        # putprpwnam was found in libc or existing $LIBS
-+
-+
 +$as_echo "#define HAVE_PUTPRPWNAM 1" >>confdefs.h
  
  
@@ -55879,44 +56009,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.  */
-+        # putprpwnam was not found, try adding libsecurity
-+	case " $LIBS " in
-+          *\ -lsecurity\ *)
- 
+-
 -#ifdef __STDC__
 -# include <limits.h>
 -#else
 -# include <assert.h>
 -#endif
-+		    # putprpwnam was not found and we already had libsecurity
-+		    # nothing to do here by default
-+		    true
- 
+-
 -#undef $ac_func
-+	    ;;
-+          *)
-+	    # putprpwnam was not found, try adding libsecurity
-+	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for putprpwnam in -lsecurity" >&5
-+$as_echo_n "checking for putprpwnam in -lsecurity... " >&6; }
-+if test "${ac_cv_lib_security_putprpwnam+set}" = set; then :
-+  $as_echo_n "(cached) " >&6
-+else
-+  ac_check_lib_save_LIBS=$LIBS
-+LIBS="-lsecurity  $LIBS"
-+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h.  */
  
- /* Override any GCC internal prototype to avoid an error.
-    Use char because int might match the return type of a GCC
-@@ -49727,183 +16302,89 @@
- #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
@@ -55924,17 +56036,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
@@ -55957,22 +56067,23 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  eval "$as_ac_var=yes"
-+if ac_fn_c_try_link "$LINENO"; then :
-+  ac_cv_lib_security_putprpwnam=yes
- else
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
++			# putprpwnam was not found in libsec
++			# nothing to do here by default
++			true
++
+ 
 -	eval "$as_ac_var=no"
-+  ac_cv_lib_security_putprpwnam=no
  fi
--
+ 
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
-+rm -f core conftest.err conftest.$ac_objext \
-+    conftest$ac_exeext conftest.$ac_ext
-+LIBS=$ac_check_lib_save_LIBS
++	  ;;
++        esac
++
  fi
 -ac_res=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
@@ -55981,20 +56092,27 @@
 -as_val=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
--  cat >>confdefs.h <<_ACEOF
--#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
--_ACEOF
-+{ $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 :
++done
 +
-+		LIBS="-lsecurity $LIBS"
 +
 +
-+$as_echo "#define HAVE_PUTPRPWNAM 1" >>confdefs.h
++
++  for ac_func in set_auth_parameters
++do :
++  ac_fn_c_check_func "$LINENO" "set_auth_parameters" "ac_cv_func_set_auth_parameters"
++if test "x$ac_cv_func_set_auth_parameters" = x""yes; then :
+   cat >>confdefs.h <<_ACEOF
+-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
++#define HAVE_SET_AUTH_PARAMETERS 1
+ _ACEOF
  
 -fi
 -done
++        # set_auth_parameters was found in libc or existing $LIBS
++
++
++$as_echo "#define HAVE_SET_AUTH_PARAMETERS 1" >>confdefs.h
++
  
  
 -for ac_func in sizeof_proplist_entry
@@ -56019,24 +56137,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.  */
++        # set_auth_parameters was not found, try adding libsecurity
++	case " $LIBS " in
++          *\ -lsecurity\ *)
  
 -#ifdef __STDC__
 -# include <limits.h>
 -#else
 -# include <assert.h>
 -#endif
-+			# putprpwnam was not found in libsecurity
-+			# nothing to do here by default
-+			true
++		    # set_auth_parameters was not found and we already had libsecurity
++		    # nothing to do here by default
++		    true
  
 -#undef $ac_func
++	    ;;
++          *)
++	    # set_auth_parameters was not found, try adding libsecurity
++	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for set_auth_parameters in -lsecurity" >&5
++$as_echo_n "checking for set_auth_parameters in -lsecurity... " >&6; }
++if test "${ac_cv_lib_security_set_auth_parameters+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  ac_check_lib_save_LIBS=$LIBS
++LIBS="-lsecurity  $LIBS"
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
  
--/* Override any GCC internal prototype to avoid an error.
--   Use char because int might match the return type of a GCC
--   builtin and then its argument prototype would still apply.  */
--#ifdef __cplusplus
--extern "C"
--#endif
+ /* Override any GCC internal prototype to avoid an error.
+    Use char because int might match the return type of a GCC
+@@ -49828,82 +16485,89 @@
+ #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
@@ -56044,16 +56177,17 @@
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
 -#endif
-+fi
- 
--int
--main ()
--{
+-
++char set_auth_parameters ();
+ int
+ main ()
+ {
 -return $ac_func ();
--  ;
--  return 0;
--}
--_ACEOF
++return set_auth_parameters ();
+   ;
+   return 0;
+ }
+ _ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -56076,20 +56210,46 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  eval "$as_ac_var=yes"
--else
++if ac_fn_c_try_link "$LINENO"; then :
++  ac_cv_lib_security_set_auth_parameters=yes
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+	  ;;
-+        esac
++  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_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"
++
++
++$as_echo "#define HAVE_SET_AUTH_PARAMETERS 1" >>confdefs.h
++
++
++
++else
++
++
++			# set_auth_parameters was not found in libsecurity
++			# nothing to do here by default
++			true
++
  
 -	eval "$as_ac_var=no"
  fi
-+done
  
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
--fi
++	  ;;
++        esac
++
+ fi
 -ac_res=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
@@ -56097,20 +56257,22 @@
 -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
++
++  for ac_func in set_auth_parameters
 +do :
-+  ac_fn_c_check_func "$LINENO" "putprpwnam" "ac_cv_func_putprpwnam"
-+if test "x$ac_cv_func_putprpwnam" = 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 `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-+#define HAVE_PUTPRPWNAM 1
++#define HAVE_SET_AUTH_PARAMETERS 1
  _ACEOF
  
 -fi
 -done
-+        # putprpwnam was found in libc or existing $LIBS
++        # set_auth_parameters was found in libc or existing $LIBS
  
 -  ;;
 -  *)
@@ -56118,26 +56280,26 @@
 -$as_echo_n "checking for library containing getxattr... " >&6; }
 -if test "${ac_cv_search_getxattr+set}" = set; then
 +
-+$as_echo "#define HAVE_PUTPRPWNAM 1" >>confdefs.h
++$as_echo "#define HAVE_SET_AUTH_PARAMETERS 1" >>confdefs.h
 +
 +
 +
 +else
 +
-+        # putprpwnam was not found, try adding libsec
++        # set_auth_parameters was not found, try adding libsec
 +	case " $LIBS " in
 +          *\ -lsec\ *)
 +
-+		    # putprpwnam was not found and we already had libsec
++		    # set_auth_parameters was not found and we already had libsec
 +		    # nothing to do here by default
 +		    true
 +
 +	    ;;
 +          *)
-+	    # 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 :
++	    # set_auth_parameters was not found, try adding libsec
++	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for set_auth_parameters in -lsec" >&5
++$as_echo_n "checking for set_auth_parameters in -lsec... " >&6; }
++if test "${ac_cv_lib_sec_set_auth_parameters+set}" = set; then :
    $as_echo_n "(cached) " >&6
  else
 -  ac_func_search_save_LIBS=$LIBS
@@ -56152,17 +56314,17 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -49912,109 +16393,91 @@
+@@ -49912,109 +16576,92 @@
  #ifdef __cplusplus
  extern "C"
  #endif
 -char getxattr ();
-+char putprpwnam ();
++char set_auth_parameters ();
  int
  main ()
  {
 -return getxattr ();
-+return putprpwnam ();
++return set_auth_parameters ();
    ;
    return 0;
  }
@@ -56197,24 +56359,24 @@
 -       }; then
 -  ac_cv_search_getxattr=$ac_res
 +if ac_fn_c_try_link "$LINENO"; then :
-+  ac_cv_lib_sec_putprpwnam=yes
++  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_putprpwnam=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_sec_putprpwnam" >&5
-+$as_echo "$ac_cv_lib_sec_putprpwnam" >&6; }
-+if test "x$ac_cv_lib_sec_putprpwnam" = x""yes; then :
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sec_set_auth_parameters" >&5
++$as_echo "$ac_cv_lib_sec_set_auth_parameters" >&6; }
++if test "x$ac_cv_lib_sec_set_auth_parameters" = x""yes; then :
 +
 +		LIBS="-lsec $LIBS"
 +
 +
-+$as_echo "#define HAVE_PUTPRPWNAM 1" >>confdefs.h
++$as_echo "#define HAVE_SET_AUTH_PARAMETERS 1" >>confdefs.h
  
  
 -fi
@@ -56235,7 +56397,7 @@
 -LIBS=$ac_func_search_save_LIBS
 +
 +
-+			# putprpwnam was not found in libsec
++			# set_auth_parameters was not found in libsec
 +			# nothing to do here by default
 +			true
 +
@@ -56254,23 +56416,24 @@
 +done
 +
 +
+ 
++# UnixWare 7.x has its getspnam in -lgen
 +
-+
-+  for ac_func in set_auth_parameters
++  for ac_func in getspnam
 +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 :
++  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 HAVE_SET_AUTH_PARAMETERS 1
++#define HAVE_GETSPNAM 1
 +_ACEOF
  
-+        # set_auth_parameters was found in libc or existing $LIBS
++        # getspnam was found in libc or existing $LIBS
  
  
-+$as_echo "#define HAVE_SET_AUTH_PARAMETERS 1" >>confdefs.h
++$as_echo "#define HAVE_GETSPNAM 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`
@@ -56293,36 +56456,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 libsecurity
++        # getspnam was not found, try adding libgen
 +	case " $LIBS " in
-+          *\ -lsecurity\ *)
++          *\ -lgen\ *)
  
 -#ifdef __STDC__
 -# include <limits.h>
 -#else
 -# include <assert.h>
 -#endif
-+		    # set_auth_parameters was not found and we already had libsecurity
++		    # getspnam was not found and we already had libgen
 +		    # nothing to do here by default
 +		    true
  
 -#undef $ac_func
 +	    ;;
 +          *)
-+	    # set_auth_parameters was not found, try adding libsecurity
-+	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for set_auth_parameters in -lsecurity" >&5
-+$as_echo_n "checking for set_auth_parameters in -lsecurity... " >&6; }
-+if test "${ac_cv_lib_security_set_auth_parameters+set}" = set; then :
++	    # 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
-@@ -50022,105 +16485,90 @@
+@@ -50022,65 +16669,47 @@
  #ifdef __cplusplus
  extern "C"
  #endif
@@ -56334,12 +56497,12 @@
 -choke me
 -#endif
 -
-+char set_auth_parameters ();
++char getspnam ();
  int
  main ()
  {
 -return $ac_func ();
-+return set_auth_parameters ();
++return getspnam ();
    ;
    return 0;
  }
@@ -56367,33 +56530,33 @@
 -       }; then
 -  eval "$as_ac_var=yes"
 +if ac_fn_c_try_link "$LINENO"; then :
-+  ac_cv_lib_security_set_auth_parameters=yes
++  ac_cv_lib_gen_getspnam=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	eval "$as_ac_var=no"
-+  ac_cv_lib_security_set_auth_parameters=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_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_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_SET_AUTH_PARAMETERS 1" >>confdefs.h
++$as_echo "#define HAVE_GETSPNAM 1" >>confdefs.h
 +
 +
 +
 +else
 +
 +
-+			# set_auth_parameters was not found in libsecurity
++			# getspnam was not found in libgen
 +			# nothing to do here by default
 +			true
 +
@@ -56418,24 +56581,25 @@
  
  fi
  done
+@@ -50088,39 +16717,43 @@
  
  
  
-+  for ac_func in set_auth_parameters
++  for ac_func in getspnam
 +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 :
++  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 HAVE_SET_AUTH_PARAMETERS 1
++#define HAVE_GETSPNAM 1
 +_ACEOF
 +
-+        # set_auth_parameters was found in libc or existing $LIBS
++        # getspnam was found in libc or existing $LIBS
 +
++
++$as_echo "#define HAVE_GETSPNAM 1" >>confdefs.h
  
-+$as_echo "#define HAVE_SET_AUTH_PARAMETERS 1" >>confdefs.h
  
  
- 
 -for ac_func in getea fgetea lgetea listea flistea llistea
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
@@ -56458,36 +56622,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
++        # getspnam 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
++		    # getspnam 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 :
++	    # getspnam was not found, try adding libsecurity
++	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getspnam in -lsecurity" >&5
++$as_echo_n "checking for getspnam in -lsecurity... " >&6; }
++if test "${ac_cv_lib_security_getspnam+set}" = set; then :
 +  $as_echo_n "(cached) " >&6
 +else
 +  ac_check_lib_save_LIBS=$LIBS
-+LIBS="-lsec  $LIBS"
++LIBS="-lsecurity  $LIBS"
 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 +/* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
     Use char because int might match the return type of a GCC
-@@ -50128,105 +16576,92 @@
+@@ -50128,105 +16761,90 @@
  #ifdef __cplusplus
  extern "C"
  #endif
@@ -56499,12 +56663,12 @@
 -choke me
 -#endif
 -
-+char set_auth_parameters ();
++char getspnam ();
  int
  main ()
  {
 -return $ac_func ();
-+return set_auth_parameters ();
++return getspnam ();
    ;
    return 0;
  }
@@ -56532,33 +56696,33 @@
 -       }; 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_getspnam=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	eval "$as_ac_var=no"
-+  ac_cv_lib_sec_set_auth_parameters=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_set_auth_parameters" >&5
-+$as_echo "$ac_cv_lib_sec_set_auth_parameters" >&6; }
-+if test "x$ac_cv_lib_sec_set_auth_parameters" = x""yes; then :
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_security_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_SET_AUTH_PARAMETERS 1" >>confdefs.h
++$as_echo "#define HAVE_GETSPNAM 1" >>confdefs.h
 +
 +
 +
 +else
 +
 +
-+			# set_auth_parameters was not found in libsec
++			# getspnam was not found in libsecurity
 +			# nothing to do here by default
 +			true
 +
@@ -56586,8 +56750,6 @@
  
  
  
-+# 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"
@@ -56595,10 +56757,10 @@
 +  cat >>confdefs.h <<_ACEOF
 +#define HAVE_GETSPNAM 1
 +_ACEOF
-+
+ 
 +        # getspnam was found in libc or existing $LIBS
 +
- 
++
 +$as_echo "#define HAVE_GETSPNAM 1" >>confdefs.h
  
  
@@ -56625,36 +56787,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
++        # getspnam 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
++		    # getspnam was not found and we already had libsec
 +		    # nothing to do here by default
 +		    true
  
 -#undef $ac_func
 +	    ;;
 +          *)
-+	    # getspnam was not found, try adding 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 :
++	    # 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="-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
-@@ -50234,103 +16669,91 @@
+@@ -50234,103 +16852,91 @@
  #ifdef __cplusplus
  extern "C"
  #endif
@@ -56699,21 +56861,21 @@
 -       }; then
 -  eval "$as_ac_var=yes"
 +if ac_fn_c_try_link "$LINENO"; then :
-+  ac_cv_lib_gen_getspnam=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_gen_getspnam=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_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_getspnam" >&5
++$as_echo "$ac_cv_lib_sec_getspnam" >&6; }
++if test "x$ac_cv_lib_sec_getspnam" = x""yes; then :
 +
-+		LIBS="-lgen $LIBS"
++		LIBS="-lsec $LIBS"
 +
 +
 +$as_echo "#define HAVE_GETSPNAM 1" >>confdefs.h
@@ -56723,7 +56885,7 @@
 +else
 +
 +
-+			# getspnam was not found in libgen
++			# getspnam was not found in libsec
 +			# nothing to do here by default
 +			true
 +
@@ -56750,21 +56912,21 @@
 +
 +
 +
-+  for ac_func in getspnam
++  for ac_func in bigcrypt
 +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" "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_GETSPNAM 1
++#define HAVE_BIGCRYPT 1
  _ACEOF
  
 -fi
 -done
-+        # getspnam was found in libc or existing $LIBS
++        # bigcrypt was found in libc or existing $LIBS
  
  
-+$as_echo "#define HAVE_GETSPNAM 1" >>confdefs.h
++$as_echo "#define HAVE_BIGCRYPT 1" >>confdefs.h
  
  
  
@@ -56790,7 +56952,7 @@
 -    which can conflict with char $ac_func (); below.
 -    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
 -    <limits.h> exists even on freestanding compilers.  */
-+        # getspnam was not found, try adding libsecurity
++        # bigcrypt was not found, try adding libsecurity
 +	case " $LIBS " in
 +          *\ -lsecurity\ *)
  
@@ -56799,17 +56961,17 @@
 -#else
 -# include <assert.h>
 -#endif
-+		    # getspnam was not found and we already had libsecurity
++		    # bigcrypt 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 :
++	    # 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
@@ -56819,7 +56981,7 @@
  
  /* Override any GCC internal prototype to avoid an error.
     Use char because int might match the return type of a GCC
-@@ -50338,102 +16761,90 @@
+@@ -50338,102 +16944,90 @@
  #ifdef __cplusplus
  extern "C"
  #endif
@@ -56831,12 +56993,12 @@
 -choke me
 -#endif
 -
-+char getspnam ();
++char bigcrypt ();
  int
  main ()
  {
 -return $ac_func ();
-+return getspnam ();
++return bigcrypt ();
    ;
    return 0;
  }
@@ -56864,31 +57026,31 @@
 -       }; then
 -  eval "$as_ac_var=yes"
 +if ac_fn_c_try_link "$LINENO"; then :
-+  ac_cv_lib_security_getspnam=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_security_getspnam=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_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_security_bigcrypt" >&5
++$as_echo "$ac_cv_lib_security_bigcrypt" >&6; }
++if test "x$ac_cv_lib_security_bigcrypt" = x""yes; then :
 +
 +		LIBS="-lsecurity $LIBS"
 +
 +
-+$as_echo "#define HAVE_GETSPNAM 1" >>confdefs.h
++$as_echo "#define HAVE_BIGCRYPT 1" >>confdefs.h
 +
 +
 +
 +else
 +
 +
-+			# getspnam was not found in libsecurity
++			# bigcrypt was not found in libsecurity
 +			# nothing to do here by default
 +			true
 +
@@ -56914,22 +57076,22 @@
 +
 +
 +
-+  for ac_func in getspnam
++  for ac_func in bigcrypt
 +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" "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_GETSPNAM 1
++#define HAVE_BIGCRYPT 1
  _ACEOF
  
 -fi
 -done
-+        # getspnam was found in libc or existing $LIBS
++        # bigcrypt was found in libc or existing $LIBS
++
  
++$as_echo "#define HAVE_BIGCRYPT 1" >>confdefs.h
  
-+$as_echo "#define HAVE_GETSPNAM 1" >>confdefs.h
-+
  
  
 -for ac_func in setxattr lsetxattr fsetxattr
@@ -56954,7 +57116,7 @@
 -    which can conflict with char $ac_func (); below.
 -    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
 -    <limits.h> exists even on freestanding compilers.  */
-+        # getspnam was not found, try adding libsec
++        # bigcrypt was not found, try adding libsec
 +	case " $LIBS " in
 +          *\ -lsec\ *)
  
@@ -56963,17 +57125,17 @@
 -#else
 -# include <assert.h>
 -#endif
-+		    # getspnam was not found and we already had libsec
++		    # bigcrypt was not found and we already had libsec
 +		    # nothing to do here by default
 +		    true
  
 -#undef $ac_func
 +	    ;;
 +          *)
-+	    # getspnam was not found, try adding libsec
-+	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getspnam in -lsec" >&5
-+$as_echo_n "checking for getspnam in -lsec... " >&6; }
-+if test "${ac_cv_lib_sec_getspnam+set}" = set; then :
++	    # 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
@@ -56983,7 +57145,7 @@
  
  /* Override any GCC internal prototype to avoid an error.
     Use char because int might match the return type of a GCC
-@@ -50441,103 +16852,91 @@
+@@ -50441,207 +17035,91 @@
  #ifdef __cplusplus
  extern "C"
  #endif
@@ -56995,12 +57157,12 @@
 -choke me
 -#endif
 -
-+char getspnam ();
++char bigcrypt ();
  int
  main ()
  {
 -return $ac_func ();
-+return getspnam ();
++return bigcrypt ();
    ;
    return 0;
  }
@@ -57028,44 +57190,21 @@
 -       }; then
 -  eval "$as_ac_var=yes"
 +if ac_fn_c_try_link "$LINENO"; then :
-+  ac_cv_lib_sec_getspnam=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_sec_getspnam=no
-+fi
-+rm -f core conftest.err conftest.$ac_objext \
-+    conftest$ac_exeext conftest.$ac_ext
-+LIBS=$ac_check_lib_save_LIBS
-+fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sec_getspnam" >&5
-+$as_echo "$ac_cv_lib_sec_getspnam" >&6; }
-+if test "x$ac_cv_lib_sec_getspnam" = x""yes; then :
-+
-+		LIBS="-lsec $LIBS"
-+
-+
-+$as_echo "#define HAVE_GETSPNAM 1" >>confdefs.h
-+
-+
-+
-+else
-+
-+
-+			# getspnam was not found in libsec
-+			# nothing to do here by default
-+			true
-+
- 
+-
 -	eval "$as_ac_var=no"
++  ac_cv_lib_sec_bigcrypt=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
-+
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
  fi
 -ac_res=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
@@ -57074,38 +57213,21 @@
 -as_val=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+done
-+
-+
-+
-+
-+  for ac_func in bigcrypt
-+do :
-+  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
+-  cat >>confdefs.h <<_ACEOF
 -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-+#define HAVE_BIGCRYPT 1
- _ACEOF
+-_ACEOF
++{ $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 :
  
 -fi
 -done
-+        # bigcrypt was found in libc or existing $LIBS
-+
-+
-+$as_echo "#define HAVE_BIGCRYPT 1" >>confdefs.h
-+
++		LIBS="-lsec $LIBS"
  
  
-+else
++$as_echo "#define HAVE_BIGCRYPT 1" >>confdefs.h
  
-+        # bigcrypt was not found, try adding libsecurity
-+	case " $LIBS " in
-+          *\ -lsecurity\ *)
  
-+		    # bigcrypt was not found and we already had libsecurity
-+		    # nothing to do here by default
-+		    true
  
 -for ac_func in attr_get attr_list attr_set attr_remove
 -do
@@ -57113,46 +57235,40 @@
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
 -$as_echo_n "checking for $ac_func... " >&6; }
 -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-+	    ;;
-+          *)
-+	    # bigcrypt was not found, try adding libsecurity
-+	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bigcrypt in -lsecurity" >&5
-+$as_echo_n "checking for bigcrypt in -lsecurity... " >&6; }
-+if test "${ac_cv_lib_security_bigcrypt+set}" = set; then :
-   $as_echo_n "(cached) " >&6
+-  $as_echo_n "(cached) " >&6
  else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+  ac_check_lib_save_LIBS=$LIBS
-+LIBS="-lsecurity  $LIBS"
-+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
+-/* end confdefs.h.  */
 -/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
 -   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
 -#define $ac_func innocuous_$ac_func
--
+ 
 -/* System header to define __stub macros and hopefully few prototypes,
 -    which can conflict with char $ac_func (); below.
 -    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
 -    <limits.h> exists even on freestanding compilers.  */
--
+ 
 -#ifdef __STDC__
 -# include <limits.h>
 -#else
 -# include <assert.h>
 -#endif
--
++			# bigcrypt was not found in libsec
++			# nothing to do here by default
++			true
+ 
 -#undef $ac_func
  
- /* Override any GCC internal prototype to avoid an error.
-    Use char because int might match the return type of a GCC
-@@ -50545,103 +16944,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
@@ -57160,17 +57276,16 @@
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
 -#endif
--
-+char bigcrypt ();
- int
- main ()
- {
++fi
+ 
+-int
+-main ()
+-{
 -return $ac_func ();
-+return bigcrypt ();
-   ;
-   return 0;
- }
- _ACEOF
+-  ;
+-  return 0;
+-}
+-_ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -57193,46 +57308,20 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  eval "$as_ac_var=yes"
-+if ac_fn_c_try_link "$LINENO"; then :
-+  ac_cv_lib_security_bigcrypt=yes
- else
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+  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_security_bigcrypt" >&5
-+$as_echo "$ac_cv_lib_security_bigcrypt" >&6; }
-+if test "x$ac_cv_lib_security_bigcrypt" = x""yes; then :
-+
-+		LIBS="-lsecurity $LIBS"
-+
-+
-+$as_echo "#define HAVE_BIGCRYPT 1" >>confdefs.h
-+
-+
-+
-+else
-+
-+
-+			# bigcrypt was not found in libsecurity
-+			# nothing to do here by default
-+			true
-+
++	  ;;
++        esac
  
 -	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
-+	  ;;
-+        esac
-+
- fi
+-fi
 -ac_res=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
@@ -57240,25 +57329,24 @@
 -as_val=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+done
 +
 +
 +
-+  for ac_func in bigcrypt
++  for ac_func in getprpwnam
 +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" "getprpwnam" "ac_cv_func_getprpwnam"
++if test "x$ac_cv_func_getprpwnam" = x""yes; then :
    cat >>confdefs.h <<_ACEOF
 -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-+#define HAVE_BIGCRYPT 1
++#define HAVE_GETPRPWNAM 1
  _ACEOF
  
 -fi
 -done
-+        # bigcrypt was found in libc or existing $LIBS
++        # getprpwnam was found in libc or existing $LIBS
  
  
-+$as_echo "#define HAVE_BIGCRYPT 1" >>confdefs.h
++$as_echo "#define HAVE_GETPRPWNAM 1" >>confdefs.h
  
  
  
@@ -57284,36 +57372,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 libsec
++        # getprpwnam was not found, try adding libsecurity
 +	case " $LIBS " in
-+          *\ -lsec\ *)
++          *\ -lsecurity\ *)
  
 -#ifdef __STDC__
 -# include <limits.h>
 -#else
 -# include <assert.h>
 -#endif
-+		    # bigcrypt was not found and we already had libsec
++		    # getprpwnam was not found and we already had libsecurity
 +		    # nothing to do here by default
 +		    true
  
 -#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 :
++	    # 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
-@@ -50649,107 +17035,91 @@
+@@ -50649,107 +17127,90 @@
  #ifdef __cplusplus
  extern "C"
  #endif
@@ -57325,12 +57413,12 @@
 -choke me
 -#endif
 -
-+char bigcrypt ();
++char getprpwnam ();
  int
  main ()
  {
 -return $ac_func ();
-+return bigcrypt ();
++return getprpwnam ();
    ;
    return 0;
  }
@@ -57358,31 +57446,31 @@
 -       }; then
 -  eval "$as_ac_var=yes"
 +if ac_fn_c_try_link "$LINENO"; then :
-+  ac_cv_lib_sec_bigcrypt=yes
++  ac_cv_lib_security_getprpwnam=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+  ac_cv_lib_sec_bigcrypt=no
++  ac_cv_lib_security_getprpwnam=no
 +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_getprpwnam" >&5
++$as_echo "$ac_cv_lib_security_getprpwnam" >&6; }
++if test "x$ac_cv_lib_security_getprpwnam" = x""yes; then :
 +
-+		LIBS="-lsec $LIBS"
++		LIBS="-lsecurity $LIBS"
 +
 +
-+$as_echo "#define HAVE_BIGCRYPT 1" >>confdefs.h
++$as_echo "#define HAVE_GETPRPWNAM 1" >>confdefs.h
 +
 +
 +
 +else
 +
 +
-+			# bigcrypt was not found in libsec
++			# getprpwnam was not found in libsecurity
 +			# nothing to do here by default
 +			true
 +
@@ -57408,7 +57496,6 @@
 +
 +
 +
-+
 +  for ac_func in getprpwnam
 +do :
 +  ac_fn_c_check_func "$LINENO" "getprpwnam" "ac_cv_func_getprpwnam"
@@ -57455,36 +57542,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
++        # getprpwnam 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
++		    # 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 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 :
++	    # 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="-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
-@@ -50757,190 +17127,90 @@
+@@ -50757,190 +17218,77 @@
  #ifdef __cplusplus
  extern "C"
  #endif
@@ -57529,7 +57616,7 @@
 -       }; then
 -  eval "$as_ac_var=yes"
 +if ac_fn_c_try_link "$LINENO"; then :
-+  ac_cv_lib_security_getprpwnam=yes
++  ac_cv_lib_sec_getprpwnam=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
@@ -57540,7 +57627,7 @@
 -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_security_getprpwnam=no
++  ac_cv_lib_sec_getprpwnam=no
  fi
 -ac_res=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
@@ -57561,9 +57648,9 @@
 -
 -  ;;
 -esac
-+{ $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_getprpwnam" >&5
++$as_echo "$ac_cv_lib_sec_getprpwnam" >&6; }
++if test "x$ac_cv_lib_sec_getprpwnam" = x""yes; then :
  
 -########################################################
 -# Do xattr functions take additional options like on Darwin?
@@ -57573,7 +57660,7 @@
 -if test "${smb_attr_cv_xattr_add_opt+set}" = set; then
 -  $as_echo_n "(cached) " >&6
 -else
-+		LIBS="-lsecurity $LIBS"
++		LIBS="-lsec $LIBS"
  
 -		old_LIBS=$LIBS
 -		LIBS="$LIBS $ACL_LIBS"
@@ -57629,7 +57716,7 @@
 -fi
  
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-+			# getprpwnam was not found in libsecurity
++			# getprpwnam was not found in libsec
 +			# nothing to do here by default
 +			true
 +
@@ -57655,186 +57742,23 @@
  
 -cat >>confdefs.h <<\_ACEOF
 -#define BROKEN_EXTATTR 1
-+
-+  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
+-_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
-@@ -50948,102 +17218,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
--#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
++  cat >>confdefs.h <<_ACEOF
 +#define HAVE_STRSIGNAL 1
- _ACEOF
++_ACEOF
  
- fi
- done
++fi
++done
  
  
--
--
--for ac_func in extattr_get_fd extattr_get_file extattr_get_link
+-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
@@ -57876,7 +57800,7 @@
  
  /* Override any GCC internal prototype to avoid an error.
     Use char because int might match the return type of a GCC
-@@ -51051,62 +17296,53 @@
+@@ -50948,62 +17296,53 @@
  #ifdef __cplusplus
  extern "C"
  #endif
@@ -57975,7 +57899,7 @@
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
  _ACEOF
-@@ -51114,39 +17350,40 @@
+@@ -51011,39 +17350,40 @@
  fi
  done
  
@@ -58003,7 +57927,7 @@
 +fi
 +done
  
--for ac_func in extattr_list_fd extattr_list_file extattr_list_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
@@ -58043,7 +57967,7 @@
  
  /* Override any GCC internal prototype to avoid an error.
     Use char because int might match the return type of a GCC
-@@ -51154,62 +17391,118 @@
+@@ -51051,62 +17391,53 @@
  #ifdef __cplusplus
  extern "C"
  #endif
@@ -58087,6 +58011,9 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  eval "$as_ac_var=yes"
+-else
+-  $as_echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
 +for ac_lib in '' attr; do
 +  if test -z "$ac_lib"; then
 +    ac_res="none required"
@@ -58104,37 +58031,89 @@
 +fi
 +done
 +if test "${ac_cv_search_getxattr+set}" = set; then :
-+
- else
--  $as_echo "$as_me: failed program was:" >&5
--sed 's/^/| /' conftest.$ac_ext >&5
+ 
+-	eval "$as_ac_var=no"
++else
 +  ac_cv_search_getxattr=no
 +fi
 +rm conftest.$ac_ext
 +LIBS=$ac_func_search_save_LIBS
-+fi
+ fi
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getxattr" >&5
 +$as_echo "$ac_cv_search_getxattr" >&6; }
 +ac_res=$ac_cv_search_getxattr
 +if test "$ac_res" != no; then :
 +  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+ 
+-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
+@@ -51114,102 +17445,64 @@
+ 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 getea fgetea lgetea listea flistea llistea
++do :
++  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
++ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
++eval as_val=\$$as_ac_var
++   if test "x$as_val" = x""yes; then :
 +  cat >>confdefs.h <<_ACEOF
 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-+_ACEOF
-+
+ _ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
+-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+-#define $ac_func innocuous_$ac_func
+-
+-/* System header to define __stub macros and hopefully few prototypes,
+-    which can conflict with char $ac_func (); below.
+-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+-    <limits.h> exists even on freestanding compilers.  */
+ 
+-#ifdef __STDC__
+-# include <limits.h>
+-#else
+-# include <assert.h>
+-#endif
 +fi
 +done
-+
-+	for ac_func in getea fgetea lgetea listea flistea llistea
+ 
+-#undef $ac_func
++	for ac_func in removeea fremoveea lremoveea setea fsetea lsetea
 +do :
 +  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
@@ -58143,11 +58122,31 @@
 +  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
-+
-+	for ac_func in removeea fremoveea lremoveea setea fsetea lsetea
+ 
+-int
+-main ()
+-{
+-return $ac_func ();
+-  ;
+-  return 0;
+-}
++	for ac_func in flistxattr removexattr lremovexattr fremovexattr
 +do :
 +  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
@@ -58155,13 +58154,38 @@
 +   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
 +
-+	for ac_func in flistxattr removexattr lremovexattr fremovexattr
++	for ac_func in setxattr lsetxattr fsetxattr
 +do :
 +  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
@@ -58184,19 +58208,6 @@
 -   if test "x$as_val" = x""yes; then
 +done
 +
-+	for ac_func in setxattr lsetxattr fsetxattr
-+do :
-+  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-+eval as_val=\$$as_ac_var
-+   if test "x$as_val" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-+_ACEOF
-+
-+fi
-+done
-+
 +	for ac_func in attr_get attr_list attr_set attr_remove
 +do :
 +  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
@@ -58350,16 +58361,12 @@
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $smb_attr_cv_xattr_add_opt" >&5
 +$as_echo "$smb_attr_cv_xattr_add_opt" >&6; }
 +	if test x"$smb_attr_cv_xattr_add_opt" = x"yes"; then
- 
--	eval "$as_ac_var=no"
++
 +$as_echo "#define XATTR_ADD_OPT 1" >>confdefs.h
 +
 +	fi
- fi
- 
--rm -rf conftest.dSYM
--rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
--      conftest$ac_exeext conftest.$ac_ext
++fi
++
 +# Check if we have extattr
 +case "$host_os" in
 +  *freebsd4* | *dragonfly* )
@@ -58377,15 +58384,9 @@
 +  cat >>confdefs.h <<_ACEOF
 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 +_ACEOF
-+
+ 
+-	eval "$as_ac_var=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
 +done
 +
 +    for ac_func in extattr_get_fd extattr_get_file extattr_get_link
@@ -58397,8 +58398,18 @@
 +  cat >>confdefs.h <<_ACEOF
 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 +_ACEOF
-+
-+fi
+ 
+-rm -rf conftest.dSYM
+-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+-      conftest$ac_exeext conftest.$ac_ext
+ fi
+-ac_res=`eval 'as_val=${'$as_ac_var'}
+-		 $as_echo "$as_val"'`
+-	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+-$as_echo "$ac_res" >&6; }
+-as_val=`eval 'as_val=${'$as_ac_var'}
+-		 $as_echo "$as_val"'`
+-   if test "x$as_val" = x""yes; then
 +done
 +
 +    for ac_func in extattr_list_fd extattr_list_file extattr_list_link
@@ -59376,18 +59387,11 @@
 -$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_fn_error "Unable to find libtalloc" "$LINENO" 5
  		  else
  			enable_external_libtalloc=no
  		  fi
  
- else
+-else
 -	LIBTALLOC_CFLAGS=$pkg_cv_LIBTALLOC_CFLAGS
 -	LIBTALLOC_LIBS=$pkg_cv_LIBTALLOC_LIBS
 -        { $as_echo "$as_me:$LINENO: result: yes" >&5
@@ -59840,7 +59844,13 @@
 -{
 -static int test_array [1 - 2 * !(((long int) (sizeof (void *))) <= $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;
 -}
@@ -59864,7 +59874,7 @@
 -	 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
 +	LIBTALLOC_CFLAGS=$pkg_cv_LIBTALLOC_CFLAGS
@@ -61150,13 +61160,13 @@
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
 +$as_echo "#define HAVE_LONGLONG 1" >>confdefs.h
  
--fi
 +    ac_fn_c_check_type "$LINENO" "intptr_t" "ac_cv_type_intptr_t" "$ac_includes_default"
 +if test "x$ac_cv_type_intptr_t" = x""yes; then :
  
+-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
@@ -61257,11 +61267,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
@@ -62680,21 +62690,21 @@
  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 -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
+ 
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
-+rm -f core conftest.err conftest.$ac_objext \
-+    conftest$ac_exeext conftest.$ac_ext
  
- 
+-
 -    { $as_echo "$as_me:$LINENO: checking for CLOCK_PROCESS_CPUTIME_ID" >&5
 +    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CLOCK_PROCESS_CPUTIME_ID" >&5
  $as_echo_n "checking for CLOCK_PROCESS_CPUTIME_ID... " >&6; }
@@ -62747,21 +62757,21 @@
  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 -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
+ 
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
-+rm -f core conftest.err conftest.$ac_objext \
-+    conftest$ac_exeext conftest.$ac_ext
  
- 
+-
 -    { $as_echo "$as_me:$LINENO: checking for CLOCK_REALTIME" >&5
 +    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CLOCK_REALTIME" >&5
  $as_echo_n "checking for CLOCK_REALTIME... " >&6; }
@@ -62814,8 +62824,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; }
@@ -62962,21 +62972,21 @@
  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 -f core conftest.err conftest.$ac_objext \
-+    conftest$ac_exeext conftest.$ac_ext
- 
+-
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
  
--
+ 
 -    { $as_echo "$as_me:$LINENO: checking for CLOCK_PROCESS_CPUTIME_ID" >&5
 +    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CLOCK_PROCESS_CPUTIME_ID" >&5
  $as_echo_n "checking for CLOCK_PROCESS_CPUTIME_ID... " >&6; }
@@ -63029,21 +63039,21 @@
  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 -f core conftest.err conftest.$ac_objext \
-+    conftest$ac_exeext conftest.$ac_ext
- 
+-
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
  
--
+ 
 -    { $as_echo "$as_me:$LINENO: checking for CLOCK_REALTIME" >&5
 +    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CLOCK_REALTIME" >&5
  $as_echo_n "checking for CLOCK_REALTIME... " >&6; }
@@ -63096,8 +63106,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; }
@@ -63210,10 +63220,10 @@
 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
  #include <sys/types.h>
- #include <utime.h>
- int
- main ()
- {
+-#include <utime.h>
+-int
+-main ()
+-{
 -struct utimbuf tbuf;  tbuf.actime = 0; tbuf.modtime = 1; exit(utime("foo.c",&tbuf));
 -  ;
 -  return 0;
@@ -63312,9 +63322,10 @@
 -choke me
 -#endif
 -
--int
--main ()
--{
++#include <utime.h>
+ int
+ main ()
+ {
 -return $ac_func ();
 +struct utimbuf tbuf;  tbuf.actime = 0; tbuf.modtime = 1; exit(utime("foo.c",&tbuf));
    ;
@@ -63351,9 +63362,9 @@
 -
 -	eval "$as_ac_var=no"
 +  samba_cv_HAVE_UTIMBUF=no
+ fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 +fi
-+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
 +{ $as_echo "$as_me:${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
@@ -64899,11 +64910,10 @@
  /* end confdefs.h.  */
  
  #include <sys/types.h>
-@@ -58255,331 +21635,69 @@
- #include <signal.h>
+@@ -58256,330 +21636,68 @@
  #ifndef F_NOTIFY
  #define F_NOTIFY 1026
--#endif
+ #endif
 -main() {
 -       	exit(fcntl(open("/tmp", O_RDONLY), F_NOTIFY, 0) == -1 ?  1 : 0);
 -}
@@ -65167,7 +65177,6 @@
 -return $ac_func ();
 -  ;
 -  return 0;
-+#endif
 +main() {
 +       	exit(fcntl(open("/tmp", O_RDONLY), F_NOTIFY, 0) == -1 ?  1 : 0);
  }
@@ -66186,10 +66195,11 @@
  /* end confdefs.h.  */
  
  #include <time.h>      /* needed by Tru64 */
-@@ -59528,470 +22128,158 @@
+@@ -59527,471 +22127,159 @@
+ 	dm_init_service(&version);
  	/* IRIX 6.4 expects events to be a pointer. */
  	DMEV_ISSET(DM_EVENT_READ, events);
- 
+-
 -  ;
 -  return 0;
 -}
@@ -66528,6 +66538,7 @@
 -$as_echo_n "checking for sys/capability.h... " >&6; }
 -if test "${ac_cv_header_sys_capability_h+set}" = set; then
 -  $as_echo_n "(cached) " >&6
++
 +  ;
 +  return 0;
 +}
@@ -66562,19 +66573,19 @@
 -fi
 +		{ $as_echo "$as_me:${as_lineno-$LINENO}: DMAPI support not present" >&5
 +$as_echo "$as_me: DMAPI support not present" >&6;}
- 
++
 +	# DMAPI detection failure actions end
 +    else
 +	# DMAPI detection success actions start
  
  
--if test x"$samba_cv_HAVE_SYS_CAPABILITY_H" = x"yes"; then
 +$as_echo "#define USE_DMAPI 1" >>confdefs.h
  
--    ac_save_LIBS=$LIBS
+-if test x"$samba_cv_HAVE_SYS_CAPABILITY_H" = x"yes"; then
 +		{ $as_echo "$as_me:${as_lineno-$LINENO}: Found DMAPI support in $samba_dmapi_libs" >&5
 +$as_echo "$as_me: Found DMAPI support in $samba_dmapi_libs" >&6;}
-+
+ 
+-    ac_save_LIBS=$LIBS
 +	# DMAPI detection success actions end
 +    fi
  
@@ -68267,7 +68278,8 @@
  else
  
 -if test "$cross_compiling" = yes; then
--  samba_cv_HAVE_FCNTL_LOCK=cross
++if test "$cross_compiling" = yes; then :
+   samba_cv_HAVE_FCNTL_LOCK=cross
 -else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
@@ -68299,8 +68311,6 @@
 -  ac_status=$?
 -  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
 -  (exit $ac_status); }; }; then
-+if test "$cross_compiling" = yes; then :
-+  samba_cv_HAVE_FCNTL_LOCK=cross
 +else
 +  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 +/* end confdefs.h.  */
@@ -70088,7 +70098,7 @@
  int
  main ()
  {
- int val = LBER_OPT_LOG_PRINT_FN;
+-int val = LBER_OPT_LOG_PRINT_FN;
 -  ;
 -  return 0;
 -}
@@ -70111,6 +70121,7 @@
 -	 test -z "$ac_c_werror_flag" ||
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
++int val = LBER_OPT_LOG_PRINT_FN;
 +  ;
 +  return 0;
 +}
@@ -72376,14 +72387,13 @@
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
--  ac_cv_func_ext_krb5_set_default_in_tkt_etypes=yes
++if ac_fn_c_try_link "$LINENO"; then :
+   ac_cv_func_ext_krb5_set_default_in_tkt_etypes=yes
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	ac_cv_func_ext_krb5_set_default_in_tkt_etypes=no
-+if ac_fn_c_try_link "$LINENO"; then :
-+  ac_cv_func_ext_krb5_set_default_in_tkt_etypes=yes
 +else
 +  ac_cv_func_ext_krb5_set_default_in_tkt_etypes=no
  fi
@@ -75868,15 +75878,15 @@
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	ac_cv_have_decl_krb5_auth_con_set_req_cksumtype=no
--fi
--
--rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 +  ac_have_decl=0
  fi
+ 
+-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+-fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_krb5_auth_con_set_req_cksumtype" >&5
 -$as_echo "$ac_cv_have_decl_krb5_auth_con_set_req_cksumtype" >&6; }
 -if test "x$ac_cv_have_decl_krb5_auth_con_set_req_cksumtype" = x""yes; then
- 
+-
  cat >>confdefs.h <<_ACEOF
 -#define HAVE_DECL_KRB5_AUTH_CON_SET_REQ_CKSUMTYPE 1
 -_ACEOF
@@ -78887,12 +78897,11 @@
    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
+-$as_echo "no" >&6; }
 -
+-fi
 -
+-
 -#################################################
 -# check for cifs.upcall support
 -
@@ -79033,8 +79042,10 @@
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
 -$as_echo "$ac_res" >&6; }
--
--fi
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
+ 
+ fi
 -as_val=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
@@ -80309,7 +80320,7 @@
  $as_echo "${samba_cv_TRY_SYS_QUOTAS}" >&6; }
      ;;
    esac
--else
+ else
 -  { $as_echo "$as_me:$LINENO: result: ${samba_cv_TRY_SYS_QUOTAS}" >&5
 -$as_echo "${samba_cv_TRY_SYS_QUOTAS}" >&6; }
 -
@@ -80660,7 +80671,6 @@
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
 -$as_echo "$ac_res" >&6; }
-+else
 +  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${samba_cv_TRY_SYS_QUOTAS}" >&5
 +$as_echo "${samba_cv_TRY_SYS_QUOTAS}" >&6; }
  
@@ -83838,14 +83848,14 @@
 +#include <tdb.h>
 +#include <ctdb.h>
 +#include <ctdb_private.h>
++
++"
++if test "x$ac_cv_type_struct_ctdb_control_tcp_addr" = x""yes; then :
  
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_STRUCT_CTDB_CONTROL_TCP_ADDR 1
 -_ACEOF
-+"
-+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
  
  
@@ -85702,10 +85712,11 @@
  /* end confdefs.h.  */
  \
  #include <sys/types.h>
-@@ -79929,81 +33326,46 @@
+@@ -79928,82 +33325,47 @@
+ 	hdr.trl_cnt = 0;
  	hdtrl.iov_base = NULL;
  	hdtrl.iov_len = 0;
- 	ret = sendfile(fromfd, tofd, offset, total, &hdr, &nwritten, 0);
+-	ret = sendfile(fromfd, tofd, offset, total, &hdr, &nwritten, 0);
 -
 -  ;
 -  return 0;
@@ -85732,6 +85743,7 @@
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
++	ret = sendfile(fromfd, tofd, offset, total, &hdr, &nwritten, 0);
 +
 +  ;
 +  return 0;
@@ -88708,7 +88720,7 @@
 -    { $as_echo "$as_me:$LINENO: result: yes" >&5
 +    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  $as_echo "yes" >&6; }
--    BUILD_INIPARSER='$(INIPARSER_OBJ)'
+     BUILD_INIPARSER='$(INIPARSER_OBJ)'
 -	INIPARSERLIBS=""
 -    FLAGS1="$FLAGS1 -I\$(srcdir)/iniparser/src"
 -else
@@ -88943,7 +88955,6 @@
 -$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
-+    BUILD_INIPARSER='$(INIPARSER_OBJ)'
 +	INIPARSERLIBS=""
 +    FLAGS1="$FLAGS1 -I\$(srcdir)/iniparser/src"
  else
@@ -92061,7 +92072,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_dirsort"
-@@ -86698,11 +37989,11 @@
+@@ -86698,16 +37989,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_DIRSORT_OBJ)"
  
  
@@ -92075,16 +92086,51 @@
  $as_echo "not" >&6; }
  	fi
  
-@@ -86724,7 +38015,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
+@@ -86719,12 +38010,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"
+@@ -86735,11 +38024,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
+ 
+@@ -86761,7 +38050,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
-@@ -86736,12 +38027,10 @@
+@@ -86773,12 +38062,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -92099,7 +92145,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules perfcount_onefs"
-@@ -86752,16 +38041,16 @@
+@@ -86789,16 +38076,16 @@
  		PERFCOUNT_STATIC="$PERFCOUNT_STATIC \$(PERFCOUNT_ONEFS)"
  
  
@@ -92119,7 +92165,7 @@
  $as_echo_n "checking how to build perfcount_test... " >&6; }
  	if test "$MODULE_perfcount_test"; then
  		DEST=$MODULE_perfcount_test
-@@ -86773,12 +38062,10 @@
+@@ -86810,12 +38097,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -92134,7 +92180,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules perfcount_test"
-@@ -86789,11 +38076,11 @@
+@@ -86826,11 +38111,11 @@
  		PERFCOUNT_STATIC="$PERFCOUNT_STATIC \$(PERFCOUNT_TEST)"
  
  
@@ -92148,7 +92194,7 @@
  $as_echo "not" >&6; }
  	fi
  
-@@ -86814,7 +38101,7 @@
+@@ -86851,7 +38136,7 @@
  
  
  
@@ -92157,7 +92203,7 @@
  $as_echo_n "checking how to build gpext_registry... " >&6; }
  	if test "$MODULE_gpext_registry"; then
  		DEST=$MODULE_gpext_registry
-@@ -86826,12 +38113,10 @@
+@@ -86863,12 +38148,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -92172,7 +92218,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules gpext_registry"
-@@ -86842,16 +38127,16 @@
+@@ -86879,16 +38162,16 @@
  		GPEXT_STATIC="$GPEXT_STATIC libgpo/gpext/registry.o"
  
  
@@ -92192,7 +92238,7 @@
  $as_echo_n "checking how to build gpext_scripts... " >&6; }
  	if test "$MODULE_gpext_scripts"; then
  		DEST=$MODULE_gpext_scripts
-@@ -86863,12 +38148,10 @@
+@@ -86900,12 +38183,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -92207,7 +92253,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules gpext_scripts"
-@@ -86879,16 +38162,16 @@
+@@ -86916,16 +38197,16 @@
  		GPEXT_STATIC="$GPEXT_STATIC libgpo/gpext/scripts.o"
  
  
@@ -92227,7 +92273,7 @@
  $as_echo_n "checking how to build gpext_security... " >&6; }
  	if test "$MODULE_gpext_security"; then
  		DEST=$MODULE_gpext_security
-@@ -86900,12 +38183,10 @@
+@@ -86937,12 +38218,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -92242,7 +92288,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules gpext_security"
-@@ -86916,11 +38197,11 @@
+@@ -86953,11 +38232,11 @@
  		GPEXT_STATIC="$GPEXT_STATIC libgpo/gpext/security.o"
  
  
@@ -92256,7 +92302,7 @@
  $as_echo "not" >&6; }
  	fi
  
-@@ -86956,18 +38237,16 @@
+@@ -86993,18 +38272,16 @@
  #################################################
  # If run from the build farm, enable NASTY hacks
  #################################################
@@ -92279,7 +92325,7 @@
  $as_echo "no" >&6; }
  fi
  
-@@ -86984,11 +38263,11 @@
+@@ -87021,11 +38298,11 @@
      rt_signal_lease_works=yes
      rt_signal_aio_works=yes
  
@@ -92294,7 +92340,7 @@
  $as_echo "cross" >&6; }
  
  	    # cross compiling, I hope you know what you are doing
-@@ -86996,11 +38275,7 @@
+@@ -87033,11 +38310,7 @@
  
  
  else
@@ -92307,7 +92353,7 @@
  /* end confdefs.h.  */
  
  #include <sys/types.h>
-@@ -87059,41 +38334,16 @@
+@@ -87096,41 +38369,16 @@
  }
  
  _ACEOF
@@ -92353,7 +92399,7 @@
  /* end confdefs.h.  */
  
  int
-@@ -87104,61 +38354,31 @@
+@@ -87141,61 +38389,31 @@
    return 0;
  }
  _ACEOF
@@ -92422,7 +92468,7 @@
  $as_echo "no" >&6; }
  	    case "$ac_status" in
  		1|11|101|111)  rt_signal_lease_ok=no ;;
-@@ -87172,13 +38392,9 @@
+@@ -87209,13 +38427,9 @@
  
  	    # no RT_SIGNAL bug, we are golden
  
@@ -92438,7 +92484,7 @@
  /* end confdefs.h.  */
  
  int
-@@ -87189,65 +38405,39 @@
+@@ -87226,65 +38440,39 @@
    return 0;
  }
  _ACEOF
@@ -92513,7 +92559,7 @@
    enableval=$enable_merged_build;  enable_merged_build=$enableval
  else
     enable_merged_build=auto
-@@ -87256,9 +38446,7 @@
+@@ -87293,9 +38481,7 @@
  
  if test x"$enable_merged_build" = x"yes" -a \
  	x"$merged_build_possible" = x"no" ; then
@@ -92524,7 +92570,7 @@
  fi
  
  
-@@ -87281,9 +38469,9 @@
+@@ -87318,9 +38504,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
@@ -92536,7 +92582,7 @@
    $as_echo_n "(cached) " >&6
  else
    case $PYTHON in
-@@ -87296,14 +38484,14 @@
+@@ -87333,14 +38519,14 @@
  do
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
@@ -92554,7 +92600,7 @@
  IFS=$as_save_IFS
  
    ;;
-@@ -87311,10 +38499,10 @@
+@@ -87348,10 +38534,10 @@
  fi
  PYTHON=$ac_cv_path_PYTHON
  if test -n "$PYTHON"; then
@@ -92567,7 +92613,7 @@
  $as_echo "no" >&6; }
  fi
  
-@@ -87325,9 +38513,9 @@
+@@ -87362,9 +38548,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
@@ -92579,7 +92625,7 @@
    $as_echo_n "(cached) " >&6
  else
    case $PYTHON in
-@@ -87340,14 +38528,14 @@
+@@ -87377,14 +38563,14 @@
  do
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
@@ -92597,7 +92643,7 @@
  IFS=$as_save_IFS
  
    ;;
-@@ -87355,10 +38543,10 @@
+@@ -87392,10 +38578,10 @@
  fi
  PYTHON=$ac_cv_path_PYTHON
  if test -n "$PYTHON"; then
@@ -92610,7 +92656,7 @@
  $as_echo "no" >&6; }
  fi
  
-@@ -87366,7 +38554,7 @@
+@@ -87403,7 +38589,7 @@
  	fi
  	if test -z "$PYTHON"; then
  		working_python=no
@@ -92619,7 +92665,7 @@
  $as_echo "$as_me: WARNING: No python found" >&2;}
  	fi
  
-@@ -87377,9 +38565,9 @@
+@@ -87414,9 +38600,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
@@ -92631,7 +92677,7 @@
    $as_echo_n "(cached) " >&6
  else
    case $PYTHON_CONFIG in
-@@ -87392,14 +38580,14 @@
+@@ -87429,14 +38615,14 @@
  do
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
@@ -92649,7 +92695,7 @@
  IFS=$as_save_IFS
  
    ;;
-@@ -87407,10 +38595,10 @@
+@@ -87444,10 +38630,10 @@
  fi
  PYTHON_CONFIG=$ac_cv_path_PYTHON_CONFIG
  if test -n "$PYTHON_CONFIG"; then
@@ -92662,7 +92708,7 @@
  $as_echo "no" >&6; }
  fi
  
-@@ -87421,9 +38609,9 @@
+@@ -87458,9 +38644,9 @@
  	else
  		# Extract the first word of "python[$PYTHON_VER]-config", so it can be a program name with args.
  set dummy python$PYTHON_VER-config; ac_word=$2
@@ -92674,7 +92720,7 @@
    $as_echo_n "(cached) " >&6
  else
    case $PYTHON_CONFIG in
-@@ -87436,14 +38624,14 @@
+@@ -87473,14 +38659,14 @@
  do
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
@@ -92692,7 +92738,7 @@
  IFS=$as_save_IFS
  
    ;;
-@@ -87451,10 +38639,10 @@
+@@ -87488,10 +38674,10 @@
  fi
  PYTHON_CONFIG=$ac_cv_path_PYTHON_CONFIG
  if test -n "$PYTHON_CONFIG"; then
@@ -92705,7 +92751,7 @@
  $as_echo "no" >&6; }
  fi
  
-@@ -87462,7 +38650,7 @@
+@@ -87499,7 +38685,7 @@
  	fi
  
  	if test -z "$PYTHON_CONFIG"; then
@@ -92714,7 +92760,7 @@
  $as_echo "$as_me: WARNING: No python-config found" >&2;}
  	else
  
-@@ -87472,11 +38660,7 @@
+@@ -87509,11 +38695,7 @@
  		LIBS="$LIBS `$PYTHON_CONFIG --ldflags`"
  		CFLAGS="$CFLAGS `$PYTHON_CONFIG --includes`"
  
@@ -92727,7 +92773,7 @@
  /* end confdefs.h.  */
  
                                  #undef HAVE_UINTPTR_T
-@@ -87493,42 +38677,15 @@
+@@ -87530,42 +38712,15 @@
    return 0;
  }
  _ACEOF
@@ -92773,7 +92819,7 @@
  		LIBS="$ac_save_LIBS"
  		CFLAGS="$ac_save_CFLAGS"
  	fi
-@@ -87540,11 +38697,7 @@
+@@ -87577,11 +38732,7 @@
  		LIBS="$LIBS `$PYTHON_CONFIG --ldflags`"
  		CFLAGS="$CFLAGS `$PYTHON_CONFIG --cflags`"
  
@@ -92786,7 +92832,7 @@
  /* end confdefs.h.  */
  
                                  #undef HAVE_UINTPTR_T
-@@ -87561,42 +38714,15 @@
+@@ -87598,42 +38749,15 @@
    return 0;
  }
  _ACEOF
@@ -92832,7 +92878,7 @@
  		LIBS="$ac_save_LIBS"
  		CFLAGS="$ac_save_CFLAGS"
  	fi
-@@ -87611,11 +38737,7 @@
+@@ -87648,11 +38772,7 @@
  		LIBS="$LIBS `echo -n -L${base}/lib " "; $PYTHON_CONFIG --ldflags`"
  		CFLAGS="$CFLAGS `$PYTHON_CONFIG --includes`"
  
@@ -92845,7 +92891,7 @@
  /* end confdefs.h.  */
  
                                  #undef HAVE_UINTPTR_T
-@@ -87632,42 +38754,15 @@
+@@ -87669,42 +38789,15 @@
    return 0;
  }
  _ACEOF
@@ -92891,7 +92937,7 @@
  		LIBS="$ac_save_LIBS"
  		CFLAGS="$ac_save_CFLAGS"
  	fi
-@@ -87679,11 +38774,7 @@
+@@ -87716,11 +38809,7 @@
  		LIBS="$LIBS `echo -n -L${base}/lib " "; $PYTHON_CONFIG --ldflags`"
  		CFLAGS="$CFLAGS `$PYTHON_CONFIG --cflags`"
  
@@ -92904,7 +92950,7 @@
  /* end confdefs.h.  */
  
                                  #undef HAVE_UINTPTR_T
-@@ -87700,42 +38791,15 @@
+@@ -87737,42 +38826,15 @@
    return 0;
  }
  _ACEOF
@@ -92950,7 +92996,7 @@
  		LIBS="$ac_save_LIBS"
  		CFLAGS="$ac_save_CFLAGS"
  	fi
-@@ -87765,11 +38829,7 @@
+@@ -87802,11 +38864,7 @@
  		LIBS="$LIBS $DISTUTILS_LDFLAGS"
  		CFLAGS="$CFLAGS $DISTUTILS_CFLAGS"
  
@@ -92963,7 +93009,7 @@
  /* end confdefs.h.  */
  
                                  #undef HAVE_UINTPTR_T
-@@ -87786,64 +38846,37 @@
+@@ -87823,64 +38881,37 @@
    return 0;
  }
  _ACEOF
@@ -93036,7 +93082,7 @@
  $as_echo "$merged_build_possible" >&6; }
  
  	# Enable merged build automatically if possible, when in developer mode
-@@ -87899,9 +38932,9 @@
+@@ -87936,9 +38967,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
@@ -93048,7 +93094,7 @@
    $as_echo_n "(cached) " >&6
  else
    case $PYTHON in
-@@ -87914,14 +38947,14 @@
+@@ -87951,14 +38982,14 @@
  do
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
@@ -93066,7 +93112,7 @@
  IFS=$as_save_IFS
  
    ;;
-@@ -87929,10 +38962,10 @@
+@@ -87966,10 +38997,10 @@
  fi
  PYTHON=$ac_cv_path_PYTHON
  if test -n "$PYTHON"; then
@@ -93079,7 +93125,7 @@
  $as_echo "no" >&6; }
  fi
  
-@@ -87943,9 +38976,9 @@
+@@ -87980,9 +39011,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
@@ -93091,7 +93137,7 @@
    $as_echo_n "(cached) " >&6
  else
    case $PYTHON in
-@@ -87958,14 +38991,14 @@
+@@ -87995,14 +39026,14 @@
  do
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
@@ -93109,7 +93155,7 @@
  IFS=$as_save_IFS
  
    ;;
-@@ -87973,10 +39006,10 @@
+@@ -88010,10 +39041,10 @@
  fi
  PYTHON=$ac_cv_path_PYTHON
  if test -n "$PYTHON"; then
@@ -93122,7 +93168,7 @@
  $as_echo "no" >&6; }
  fi
  
-@@ -87984,7 +39017,7 @@
+@@ -88021,7 +39052,7 @@
  	fi
  	if test -z "$PYTHON"; then
  		working_python=no
@@ -93131,7 +93177,7 @@
  $as_echo "$as_me: WARNING: No python found" >&2;}
  	fi
  
-@@ -87995,9 +39028,9 @@
+@@ -88032,9 +39063,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
@@ -93143,7 +93189,7 @@
    $as_echo_n "(cached) " >&6
  else
    case $PYTHON_CONFIG in
-@@ -88010,14 +39043,14 @@
+@@ -88047,14 +39078,14 @@
  do
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
@@ -93161,7 +93207,7 @@
  IFS=$as_save_IFS
  
    ;;
-@@ -88025,10 +39058,10 @@
+@@ -88062,10 +39093,10 @@
  fi
  PYTHON_CONFIG=$ac_cv_path_PYTHON_CONFIG
  if test -n "$PYTHON_CONFIG"; then
@@ -93174,7 +93220,7 @@
  $as_echo "no" >&6; }
  fi
  
-@@ -88039,9 +39072,9 @@
+@@ -88076,9 +39107,9 @@
  	else
  		# Extract the first word of "python[$PYTHON_VER]-config", so it can be a program name with args.
  set dummy python$PYTHON_VER-config; ac_word=$2
@@ -93186,7 +93232,7 @@
    $as_echo_n "(cached) " >&6
  else
    case $PYTHON_CONFIG in
-@@ -88054,14 +39087,14 @@
+@@ -88091,14 +39122,14 @@
  do
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
@@ -93204,7 +93250,7 @@
  IFS=$as_save_IFS
  
    ;;
-@@ -88069,10 +39102,10 @@
+@@ -88106,10 +39137,10 @@
  fi
  PYTHON_CONFIG=$ac_cv_path_PYTHON_CONFIG
  if test -n "$PYTHON_CONFIG"; then
@@ -93217,7 +93263,7 @@
  $as_echo "no" >&6; }
  fi
  
-@@ -88080,7 +39113,7 @@
+@@ -88117,7 +39148,7 @@
  	fi
  
  	if test -z "$PYTHON_CONFIG"; then
@@ -93226,7 +93272,7 @@
  $as_echo "$as_me: WARNING: No python-config found" >&2;}
  	else
  
-@@ -88090,11 +39123,7 @@
+@@ -88127,11 +39158,7 @@
  		LIBS="$LIBS `$PYTHON_CONFIG --ldflags`"
  		CFLAGS="$CFLAGS `$PYTHON_CONFIG --includes`"
  
@@ -93239,7 +93285,7 @@
  /* end confdefs.h.  */
  
                                  #undef HAVE_UINTPTR_T
-@@ -88111,42 +39140,15 @@
+@@ -88148,42 +39175,15 @@
    return 0;
  }
  _ACEOF
@@ -93285,7 +93331,7 @@
  		LIBS="$ac_save_LIBS"
  		CFLAGS="$ac_save_CFLAGS"
  	fi
-@@ -88158,11 +39160,7 @@
+@@ -88195,11 +39195,7 @@
  		LIBS="$LIBS `$PYTHON_CONFIG --ldflags`"
  		CFLAGS="$CFLAGS `$PYTHON_CONFIG --cflags`"
  
@@ -93298,7 +93344,7 @@
  /* end confdefs.h.  */
  
                                  #undef HAVE_UINTPTR_T
-@@ -88179,42 +39177,15 @@
+@@ -88216,42 +39212,15 @@
    return 0;
  }
  _ACEOF
@@ -93344,7 +93390,7 @@
  		LIBS="$ac_save_LIBS"
  		CFLAGS="$ac_save_CFLAGS"
  	fi
-@@ -88229,11 +39200,7 @@
+@@ -88266,11 +39235,7 @@
  		LIBS="$LIBS `echo -n -L${base}/lib " "; $PYTHON_CONFIG --ldflags`"
  		CFLAGS="$CFLAGS `$PYTHON_CONFIG --includes`"
  
@@ -93357,7 +93403,7 @@
  /* end confdefs.h.  */
  
                                  #undef HAVE_UINTPTR_T
-@@ -88250,42 +39217,15 @@
+@@ -88287,42 +39252,15 @@
    return 0;
  }
  _ACEOF
@@ -93403,7 +93449,7 @@
  		LIBS="$ac_save_LIBS"
  		CFLAGS="$ac_save_CFLAGS"
  	fi
-@@ -88297,11 +39237,7 @@
+@@ -88334,11 +39272,7 @@
  		LIBS="$LIBS `echo -n -L${base}/lib " "; $PYTHON_CONFIG --ldflags`"
  		CFLAGS="$CFLAGS `$PYTHON_CONFIG --cflags`"
  
@@ -93416,7 +93462,7 @@
  /* end confdefs.h.  */
  
                                  #undef HAVE_UINTPTR_T
-@@ -88318,42 +39254,15 @@
+@@ -88355,42 +39289,15 @@
    return 0;
  }
  _ACEOF
@@ -93462,7 +93508,7 @@
  		LIBS="$ac_save_LIBS"
  		CFLAGS="$ac_save_CFLAGS"
  	fi
-@@ -88383,11 +39292,7 @@
+@@ -88420,11 +39327,7 @@
  		LIBS="$LIBS $DISTUTILS_LDFLAGS"
  		CFLAGS="$CFLAGS $DISTUTILS_CFLAGS"
  
@@ -93475,7 +93521,7 @@
  /* end confdefs.h.  */
  
                                  #undef HAVE_UINTPTR_T
-@@ -88404,52 +39309,25 @@
+@@ -88441,52 +39344,25 @@
    return 0;
  }
  _ACEOF
@@ -93533,7 +93579,7 @@
  $as_echo "yes" >&6; }
  
  
-@@ -88477,20 +39355,18 @@
+@@ -88514,20 +39390,18 @@
  
  
  	else
@@ -93558,7 +93604,7 @@
  $as_echo "$pythondir" >&6; }
  
  
-@@ -88505,553 +39381,133 @@
+@@ -88542,553 +39416,133 @@
  
  
  
@@ -94199,7 +94245,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -89069,63 +39525,32 @@
+@@ -89106,63 +39560,32 @@
    return 0;
  }
  _ACEOF
@@ -94274,7 +94320,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -89143,43 +39568,18 @@
+@@ -89180,43 +39603,18 @@
    return 0;
  }
  _ACEOF
@@ -94324,7 +94370,7 @@
    TERMLIBS="-lreadline $TERMLIBS"
         EXTERNAL_READLINE=yes
         break
-@@ -89193,11 +39593,11 @@
+@@ -89230,11 +39628,11 @@
  
      ;;
    no)
@@ -94338,7 +94384,7 @@
  $as_echo "yes" >&6; }
  
      # Needed for AC_CHECK_HEADERS and AC_CHECK_LIB to look at
-@@ -89209,151 +39609,12 @@
+@@ -89246,151 +39644,12 @@
      LDFLAGS="-L$with_readline/lib $LDFLAGS"
      CPPFLAGS="-I$with_readline/include $CPPFLAGS"
  
@@ -94496,7 +94542,7 @@
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
-@@ -89362,151 +39623,12 @@
+@@ -89399,151 +39658,12 @@
  
  done
  
@@ -94653,7 +94699,7 @@
  _ACEOF
  
  fi
-@@ -89514,168 +39636,26 @@
+@@ -89551,168 +39671,26 @@
  done
  
  
@@ -94831,7 +94877,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -89693,63 +39673,32 @@
+@@ -89730,63 +39708,32 @@
    return 0;
  }
  _ACEOF
@@ -94906,7 +94952,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -89767,43 +39716,18 @@
+@@ -89804,43 +39751,18 @@
    return 0;
  }
  _ACEOF
@@ -94956,7 +95002,7 @@
    TERMLDFLAGS="-L$with_readline/lib"
         TERMCPPFLAGS="-I$with_readline/include"
         LDFLAGS="-L$with_readline/lib $LDFLAGS"
-@@ -89823,7 +39747,7 @@
+@@ -89860,7 +39782,7 @@
      ;;
    esac
  else
@@ -94965,7 +95011,7 @@
  $as_echo "no" >&6; }
  
  fi
-@@ -89832,18 +39756,14 @@
+@@ -89869,18 +39791,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.
@@ -94987,7 +95033,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -89856,142 +39776,53 @@
+@@ -89893,142 +39811,53 @@
  int
  main ()
  {
@@ -95161,7 +95207,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -90009,60 +39840,31 @@
+@@ -90046,60 +39875,31 @@
    return 0;
  }
  _ACEOF
@@ -95232,7 +95278,7 @@
  
  
  MAKE_SETTINGS="$MAKE_SETTINGS
-@@ -90117,7 +39919,7 @@
+@@ -90154,7 +39954,7 @@
  ###################################
  "
  
@@ -95241,7 +95287,7 @@
  $as_echo "no" >&6; }
  fi
  
-@@ -90126,102 +39928,9 @@
+@@ -90163,102 +39963,9 @@
  
  
  
@@ -95346,7 +95392,7 @@
  else
  
  cat >>confdefs.h <<_ACEOF
-@@ -90230,102 +39939,9 @@
+@@ -90267,102 +39974,9 @@
  
  fi
  
@@ -95451,7 +95497,7 @@
  else
  
  cat >>confdefs.h <<_ACEOF
-@@ -90335,151 +39951,12 @@
+@@ -90372,151 +39986,12 @@
  fi
  
  
@@ -95607,7 +95653,7 @@
  _ACEOF
  
  else
-@@ -90489,151 +39966,12 @@
+@@ -90526,151 +40001,12 @@
  done
  
  
@@ -95763,7 +95809,7 @@
  _ACEOF
  
  else
-@@ -90643,29 +39981,6 @@
+@@ -90680,29 +40016,6 @@
  done
  
  
@@ -95793,7 +95839,7 @@
  for ac_header in 				\
  	crypt.h					\
  	curses.h				\
-@@ -90691,147 +40006,11 @@
+@@ -90728,147 +40041,11 @@
  	netinet6/in6.h				\
  	libintl.h
  
@@ -95946,7 +95992,7 @@
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
-@@ -90841,42 +40020,6 @@
+@@ -90878,42 +40055,6 @@
  done
  
  
@@ -95989,7 +96035,7 @@
  for ac_func in 				\
  	atexit					\
  	cgetent					\
-@@ -90909,271 +40052,65 @@
+@@ -90946,271 +40087,65 @@
  	warn					\
  	errx					\
  	warnx					\
@@ -96298,7 +96344,7 @@
  _ACEOF
  
  fi
-@@ -91189,11 +40126,11 @@
+@@ -91226,11 +40161,11 @@
  #define $ac_tr_func 1
  _ACEOF
  
@@ -96312,7 +96358,7 @@
  $as_echo "no" >&6; }
  	;;
  esac
-@@ -91203,17 +40140,13 @@
+@@ -91240,17 +40175,13 @@
  
  
  
@@ -96333,7 +96379,7 @@
  /* end confdefs.h.  */
  #ifdef HAVE_SYS_BSWAP_H
  #include <sys/bswap.h>
-@@ -91226,140 +40159,25 @@
+@@ -91263,140 +40194,25 @@
    return 0;
  }
  _ACEOF
@@ -96483,7 +96529,7 @@
  _ACEOF
  
  fi
-@@ -91375,11 +40193,11 @@
+@@ -91412,11 +40228,11 @@
  #define $ac_tr_func 1
  _ACEOF
  
@@ -96497,7 +96543,7 @@
  $as_echo "no" >&6; }
  	;;
  esac
-@@ -91390,25 +40208,21 @@
+@@ -91427,25 +40243,21 @@
  
  
  
@@ -96527,7 +96573,7 @@
    ac_cv_struct_winsize=yes; break
  fi
  rm -f conftest*
-@@ -91418,63 +40232,45 @@
+@@ -91455,63 +40267,45 @@
  
  if test "$ac_cv_struct_winsize" = "yes"; then
  
@@ -96602,7 +96648,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <signal.h>
-@@ -91487,35 +40283,14 @@
+@@ -91524,35 +40318,14 @@
    return 0;
  }
  _ACEOF
@@ -96641,7 +96687,7 @@
  $as_echo "$ac_cv_type_signal" >&6; }
  
  cat >>confdefs.h <<_ACEOF
-@@ -91525,9 +40300,7 @@
+@@ -91562,9 +40335,7 @@
  
  if test "$ac_cv_type_signal" = "void" ; then
  
@@ -96652,7 +96698,7 @@
  
  fi
  
-@@ -91558,18 +40331,14 @@
+@@ -91595,18 +40366,14 @@
  
  
  
@@ -96674,7 +96720,7 @@
  /* end confdefs.h.  */
  #ifdef HAVE_SYS_TYPES_H
  #include <sys/types.h>
-@@ -91586,44 +40355,15 @@
+@@ -91623,44 +40390,15 @@
    return 0;
  }
  _ACEOF
@@ -96724,7 +96770,7 @@
  /* end confdefs.h.  */
  extern int h_errno;
  int foo(void) { return h_errno; }
-@@ -91635,44 +40375,19 @@
+@@ -91672,44 +40410,19 @@
    return 0;
  }
  _ACEOF
@@ -96774,7 +96820,7 @@
  $as_echo "$ac_foo" >&6; }
  if test "$ac_foo" = yes; then
  
-@@ -91680,81 +40395,23 @@
+@@ -91717,81 +40430,23 @@
  #define HAVE_H_ERRNO 1
  _ACEOF
  
@@ -96862,7 +96908,7 @@
  fi
  
  
-@@ -91770,151 +40427,12 @@
+@@ -91807,151 +40462,12 @@
  
  
  
@@ -97019,7 +97065,7 @@
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
-@@ -91926,23 +40444,17 @@
+@@ -91963,23 +40479,17 @@
  
  
  
@@ -97046,7 +97092,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -91960,54 +40472,28 @@
+@@ -91997,54 +40507,28 @@
    return 0;
  }
  _ACEOF
@@ -97108,7 +97154,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_LIBUTIL 1
  _ACEOF
-@@ -92024,7 +40510,6 @@
+@@ -92061,7 +40545,6 @@
  fi
  
  
@@ -97116,7 +97162,7 @@
  	MAKE_SETTINGS="$MAKE_SETTINGS
  OPENPTY_ENABLE = YES
  "
-@@ -92044,23 +40529,17 @@
+@@ -92081,23 +40564,17 @@
  
  
  
@@ -97143,7 +97189,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -92078,54 +40557,28 @@
+@@ -92115,54 +40592,28 @@
    return 0;
  }
  _ACEOF
@@ -97205,7 +97251,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_LIBINTL 1
  _ACEOF
-@@ -92142,7 +40595,6 @@
+@@ -92179,7 +40630,6 @@
  fi
  
  
@@ -97213,7 +97259,7 @@
  	MAKE_SETTINGS="$MAKE_SETTINGS
  INTL_ENABLE = YES
  "
-@@ -92166,150 +40618,12 @@
+@@ -92203,150 +40653,12 @@
  
  
  
@@ -97369,7 +97415,7 @@
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
-@@ -92319,22 +40633,9 @@
+@@ -92356,22 +40668,9 @@
  done
  
  
@@ -97394,7 +97440,7 @@
  #ifdef HAVE_SYS_TYPES_H
  #include <sys/types.h>
  #endif
-@@ -92345,46 +40646,10 @@
+@@ -92382,46 +40681,10 @@
  #include <arpa/nameser.h>
  #endif
  
@@ -97444,7 +97490,7 @@
  _ACEOF
  
  fi
-@@ -92396,9 +40661,9 @@
+@@ -92433,9 +40696,9 @@
  
  
  
@@ -97456,7 +97502,7 @@
    $as_echo_n "(cached) " >&6
  else
  
-@@ -92413,11 +40678,7 @@
+@@ -92450,11 +40713,7 @@
  		*) ac_lib="-l$ac_lib" ;;
  		esac
  		LIBS=" $ac_lib  $ac_save_LIBS"
@@ -97469,7 +97515,7 @@
  /* end confdefs.h.  */
  
  #include <stdio.h>
-@@ -92439,148 +40700,31 @@
+@@ -92476,148 +40735,31 @@
  {
  res_search(0,0,0,0,0)
    ;
@@ -97639,7 +97685,7 @@
  _ACEOF
  
  fi
-@@ -92600,13 +40744,13 @@
+@@ -92637,13 +40779,13 @@
  #define $ac_tr_func 1
  _ACEOF
  
@@ -97655,7 +97701,7 @@
  $as_echo "no" >&6; }
  	;;
  	*)
-@@ -92620,7 +40764,7 @@
+@@ -92657,7 +40799,7 @@
  #define $ac_tr_lib 1
  _ACEOF
  
@@ -97664,7 +97710,7 @@
  $as_echo "yes, in $ac_res" >&6; }
  	;;
  esac
-@@ -92635,9 +40779,9 @@
+@@ -92672,9 +40814,9 @@
  
  
  
@@ -97676,7 +97722,7 @@
    $as_echo_n "(cached) " >&6
  else
  
-@@ -92652,11 +40796,7 @@
+@@ -92689,11 +40831,7 @@
  		*) ac_lib="-l$ac_lib" ;;
  		esac
  		LIBS=" $ac_lib  $ac_save_LIBS"
@@ -97689,7 +97735,7 @@
  /* end confdefs.h.  */
  
  #include <stdio.h>
-@@ -92681,38 +40821,11 @@
+@@ -92718,38 +40856,11 @@
    return 0;
  }
  _ACEOF
@@ -97731,7 +97777,7 @@
  	done
  	eval "ac_cv_funclib_res_nsearch=\${ac_cv_funclib_res_nsearch-no}"
  	LIBS="$ac_save_LIBS"
-@@ -92724,102 +40837,12 @@
+@@ -92761,102 +40872,12 @@
  eval "ac_res=\$ac_cv_funclib_res_nsearch"
  
  if false; then
@@ -97839,7 +97885,7 @@
  _ACEOF
  
  fi
-@@ -92839,13 +40862,13 @@
+@@ -92876,13 +40897,13 @@
  #define $ac_tr_func 1
  _ACEOF
  
@@ -97855,7 +97901,7 @@
  $as_echo "no" >&6; }
  	;;
  	*)
-@@ -92859,7 +40882,7 @@
+@@ -92896,7 +40917,7 @@
  #define $ac_tr_lib 1
  _ACEOF
  
@@ -97864,7 +97910,7 @@
  $as_echo "yes, in $ac_res" >&6; }
  	;;
  esac
-@@ -92874,9 +40897,9 @@
+@@ -92911,9 +40932,9 @@
  
  
  
@@ -97876,7 +97922,7 @@
    $as_echo_n "(cached) " >&6
  else
  
-@@ -92891,11 +40914,7 @@
+@@ -92928,11 +40949,7 @@
  		*) ac_lib="-l$ac_lib" ;;
  		esac
  		LIBS=" $ac_lib  $ac_save_LIBS"
@@ -97889,7 +97935,7 @@
  /* end confdefs.h.  */
  
  #include <stdio.h>
-@@ -92920,38 +40939,11 @@
+@@ -92957,38 +40974,11 @@
    return 0;
  }
  _ACEOF
@@ -97931,7 +97977,7 @@
  	done
  	eval "ac_cv_funclib_res_ndestroy=\${ac_cv_funclib_res_ndestroy-no}"
  	LIBS="$ac_save_LIBS"
-@@ -92963,102 +40955,12 @@
+@@ -93000,102 +40990,12 @@
  eval "ac_res=\$ac_cv_funclib_res_ndestroy"
  
  if false; then
@@ -98039,7 +98085,7 @@
  _ACEOF
  
  fi
-@@ -93078,13 +40980,13 @@
+@@ -93115,13 +41015,13 @@
  #define $ac_tr_func 1
  _ACEOF
  
@@ -98055,7 +98101,7 @@
  $as_echo "no" >&6; }
  	;;
  	*)
-@@ -93098,7 +41000,7 @@
+@@ -93135,7 +41035,7 @@
  #define $ac_tr_lib 1
  _ACEOF
  
@@ -98064,7 +98110,7 @@
  $as_echo "yes, in $ac_res" >&6; }
  	;;
  esac
-@@ -93112,9 +41014,9 @@
+@@ -93149,9 +41049,9 @@
  
  
  
@@ -98076,7 +98122,7 @@
    $as_echo_n "(cached) " >&6
  else
  
-@@ -93129,11 +41031,7 @@
+@@ -93166,11 +41066,7 @@
  		*) ac_lib="-l$ac_lib" ;;
  		esac
  		LIBS=" $ac_lib  $ac_save_LIBS"
@@ -98089,7 +98135,7 @@
  /* end confdefs.h.  */
  
  #ifdef HAVE_DNS_H
-@@ -93148,38 +41046,11 @@
+@@ -93185,38 +41081,11 @@
    return 0;
  }
  _ACEOF
@@ -98131,7 +98177,7 @@
  	done
  	eval "ac_cv_funclib_dns_search=\${ac_cv_funclib_dns_search-no}"
  	LIBS="$ac_save_LIBS"
-@@ -93191,102 +41062,12 @@
+@@ -93228,102 +41097,12 @@
  eval "ac_res=\$ac_cv_funclib_dns_search"
  
  if false; then
@@ -98239,7 +98285,7 @@
  _ACEOF
  
  fi
-@@ -93306,13 +41087,13 @@
+@@ -93343,13 +41122,13 @@
  #define $ac_tr_func 1
  _ACEOF
  
@@ -98255,7 +98301,7 @@
  $as_echo "no" >&6; }
  	;;
  	*)
-@@ -93326,7 +41107,7 @@
+@@ -93363,7 +41142,7 @@
  #define $ac_tr_lib 1
  _ACEOF
  
@@ -98264,7 +98310,7 @@
  $as_echo "yes, in $ac_res" >&6; }
  	;;
  esac
-@@ -93338,9 +41119,9 @@
+@@ -93375,9 +41154,9 @@
  
  
  
@@ -98276,7 +98322,7 @@
    $as_echo_n "(cached) " >&6
  else
  
-@@ -93355,11 +41136,7 @@
+@@ -93392,11 +41171,7 @@
  		*) ac_lib="-l$ac_lib" ;;
  		esac
  		LIBS=" $ac_lib  $ac_save_LIBS"
@@ -98289,7 +98335,7 @@
  /* end confdefs.h.  */
  
  #include <stdio.h>
-@@ -93384,38 +41161,11 @@
+@@ -93421,38 +41196,11 @@
    return 0;
  }
  _ACEOF
@@ -98331,7 +98377,7 @@
  	done
  	eval "ac_cv_funclib_dn_expand=\${ac_cv_funclib_dn_expand-no}"
  	LIBS="$ac_save_LIBS"
-@@ -93427,102 +41177,12 @@
+@@ -93464,102 +41212,12 @@
  eval "ac_res=\$ac_cv_funclib_dn_expand"
  
  if false; then
@@ -98439,7 +98485,7 @@
  _ACEOF
  
  fi
-@@ -93542,13 +41202,13 @@
+@@ -93579,13 +41237,13 @@
  #define $ac_tr_func 1
  _ACEOF
  
@@ -98455,7 +98501,7 @@
  $as_echo "no" >&6; }
  	;;
  	*)
-@@ -93562,7 +41222,7 @@
+@@ -93599,7 +41257,7 @@
  #define $ac_tr_lib 1
  _ACEOF
  
@@ -98464,7 +98510,7 @@
  $as_echo "yes, in $ac_res" >&6; }
  	;;
  esac
-@@ -93574,18 +41234,14 @@
+@@ -93611,18 +41269,14 @@
  
  
  
@@ -98486,7 +98532,7 @@
  /* end confdefs.h.  */
  #include <stdio.h>
  #ifdef HAVE_SYS_TYPES_H
-@@ -93609,44 +41265,15 @@
+@@ -93646,44 +41300,15 @@
    return 0;
  }
  _ACEOF
@@ -98536,7 +98582,7 @@
  /* end confdefs.h.  */
  extern int _res;
  int foo(void) { return _res; }
-@@ -93658,44 +41285,19 @@
+@@ -93695,44 +41320,19 @@
    return 0;
  }
  _ACEOF
@@ -98586,7 +98632,7 @@
  $as_echo "$ac_foo" >&6; }
  if test "$ac_foo" = yes; then
  
-@@ -93703,18 +41305,7 @@
+@@ -93740,18 +41340,7 @@
  #define HAVE__RES 1
  _ACEOF
  
@@ -98606,7 +98652,7 @@
  #ifdef HAVE_SYS_TYPES_H
  #include <sys/types.h>
  #endif
-@@ -93727,64 +41318,17 @@
+@@ -93764,64 +41353,17 @@
  #ifdef HAVE_RESOLV_H
  #include <resolv.h>
  #endif
@@ -98676,7 +98722,7 @@
  fi
  
  
-@@ -93850,9 +41394,9 @@
+@@ -93887,9 +41429,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
@@ -98688,7 +98734,7 @@
    $as_echo_n "(cached) " >&6
  else
    if test -n "$LEX"; then
-@@ -93863,24 +41407,24 @@
+@@ -93900,24 +41442,24 @@
  do
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
@@ -98718,7 +98764,7 @@
  $as_echo "no" >&6; }
  fi
  
-@@ -93909,20 +41453,20 @@
+@@ -93946,20 +41488,20 @@
    return ! yylex () + ! yywrap ();
  }
  _ACEOF
@@ -98746,7 +98792,7 @@
    $as_echo_n "(cached) " >&6
  else
  
-@@ -93931,19 +41475,17 @@
+@@ -93968,19 +41510,17 @@
  elif test -f lexyy.c; then
    ac_cv_prog_lex_root=lexyy
  else
@@ -98770,7 +98816,7 @@
    $as_echo_n "(cached) " >&6
  else
  
-@@ -93951,55 +41493,29 @@
+@@ -93988,55 +41528,29 @@
      ac_cv_lib_lex='none needed'
      for ac_lib in '' -lfl -ll; do
        LIBS="$ac_lib $ac_save_LIBS"
@@ -98834,7 +98880,7 @@
    $as_echo_n "(cached) " >&6
  else
    # POSIX says lex can declare yytext either as a pointer or an array; the
-@@ -94008,52 +41524,24 @@
+@@ -94045,52 +41559,24 @@
  ac_cv_prog_lex_yytext_pointer=no
  ac_save_LIBS=$LIBS
  LIBS="$LEXLIB $ac_save_LIBS"
@@ -98894,7 +98940,7 @@
  
  fi
  rm -f conftest.l $LEX_OUTPUT_ROOT.c
-@@ -94063,9 +41551,9 @@
+@@ -94100,9 +41586,9 @@
  if test x"$LEX_BASENAME" = x"flex"; then
  	# "flex 2.5.33"
  	FLEX_VERSION=`$LEX --version | cut -d ' ' -f2`
@@ -98906,7 +98952,7 @@
  $as_echo "$FLEX_VERSION" >&6; }
  	FLEX_MAJOR=`echo $FLEX_VERSION | cut -d '.' -f1`
  	FLEX_MINOR=`echo $FLEX_VERSION | cut -d '.' -f2`
-@@ -94078,9 +41566,9 @@
+@@ -94115,9 +41601,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
@@ -98918,7 +98964,7 @@
    $as_echo_n "(cached) " >&6
  else
    if test -n "$YACC"; then
-@@ -94091,24 +41579,24 @@
+@@ -94128,24 +41614,24 @@
  do
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
@@ -98948,7 +98994,7 @@
  $as_echo "no" >&6; }
  fi
  
-@@ -94121,9 +41609,9 @@
+@@ -94158,9 +41644,9 @@
  if test x"$YACC_BASENAME" = x"bison -y"; then
  	# bison (GNU Bison) 2.3
  	BISON_VERSION=`$YACC --version | head -1 | cut -d ' ' -f4`
@@ -98960,7 +99006,7 @@
  $as_echo "$BISON_VERSION" >&6; }
  	BISON_MAJOR=`echo $BISON_VERSION | cut -d '.' -f1`
  	BISON_MINOR=`echo $BISON_VERSION | cut -d '.' -f2`
-@@ -94131,7 +41619,7 @@
+@@ -94168,7 +41654,7 @@
  	YACC_VERSION="bison-$BISON_MAJOR.$BISON_MINOR"
  fi
  
@@ -98969,7 +99015,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
-@@ -94147,7 +41635,7 @@
+@@ -94184,7 +41670,7 @@
  	LEX=false
  	YACC=false
  fi
@@ -98978,7 +99024,7 @@
  $as_echo "$LEX_YACC" >&6; }
  
  # Portions of heimdal kerberos are unpacked into source/heimdal
-@@ -94155,21 +41643,15 @@
+@@ -94192,21 +41678,15 @@
  
  # if we ever get to using a host kerberos, we might add conditionals here
  
@@ -99003,7 +99049,7 @@
  
  HAVE_GSSAPI=YES
  
-@@ -94249,193 +41731,48 @@
+@@ -94286,193 +41766,48 @@
  SMB_INFO_ENABLES="$SMB_INFO_ENABLES
  \$enabled{\"HEIMDAL_ROKEN_PROGNAME\"} = \"YES\";"
  
@@ -99225,7 +99271,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -94453,46 +41790,15 @@
+@@ -94490,46 +41825,15 @@
    return 0;
  }
  _ACEOF
@@ -99276,7 +99322,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -94510,65 +41816,32 @@
+@@ -94547,65 +41851,32 @@
    return 0;
  }
  _ACEOF
@@ -99350,7 +99396,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.  */
-@@ -94609,43 +41882,18 @@
+@@ -94646,43 +41917,18 @@
    return 0;
  }
  _ACEOF
@@ -99400,7 +99446,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_BACKTRACE 1
  _ACEOF
-@@ -94653,7 +41901,6 @@
+@@ -94690,7 +41936,6 @@
  fi
  
  
@@ -99408,7 +99454,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
-@@ -94739,102 +41986,12 @@
+@@ -94776,102 +42021,12 @@
  
  
  
@@ -99516,7 +99562,7 @@
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
  _ACEOF
-@@ -94843,102 +42000,12 @@
+@@ -94880,102 +42035,12 @@
  done
  
  
@@ -99623,7 +99669,7 @@
  _ACEOF
  
  fi
-@@ -94947,153 +42014,14 @@
+@@ -94984,153 +42049,14 @@
  
  #################################################
  # these tests are taken from the GNU fileutils package
@@ -99783,7 +99829,7 @@
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
-@@ -95103,65 +42031,16 @@
+@@ -95140,65 +42066,16 @@
  done
  
  
@@ -99854,7 +99900,7 @@
  _ACEOF
  
  fi
-@@ -95174,19 +42053,15 @@
+@@ -95211,19 +42088,15 @@
  # Test for statvfs64.
  if test $space = no; then
    # SVR4
@@ -99878,7 +99924,7 @@
  /* end confdefs.h.  */
  
  #if defined(HAVE_UNISTD_H)
-@@ -95200,51 +42075,22 @@
+@@ -95237,51 +42110,22 @@
      exit (statvfs64 (".", &fsd));
    }
  _ACEOF
@@ -99936,7 +99982,7 @@
  
    fi
  fi
-@@ -95257,16 +42103,12 @@
+@@ -95294,16 +42138,12 @@
  # is what it gets when this test fails.
  if test $space = no; then
    # SVR4
@@ -99956,7 +100002,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <sys/statvfs.h>
-@@ -95278,64 +42120,33 @@
+@@ -95315,64 +42155,33 @@
    return 0;
  }
  _ACEOF
@@ -100030,7 +100076,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <sys/statvfs.h>
-@@ -95347,59 +42158,32 @@
+@@ -95384,59 +42193,32 @@
    return 0;
  }
  _ACEOF
@@ -100098,7 +100144,7 @@
  /* end confdefs.h.  */
  
  #include <sys/param.h>
-@@ -95412,71 +42196,38 @@
+@@ -95449,71 +42231,38 @@
      exit (statfs (".", &fsd, sizeof (struct statfs)));
    }
  _ACEOF
@@ -100180,7 +100226,7 @@
  /* end confdefs.h.  */
  
  #ifdef HAVE_SYS_PARAM_H
-@@ -95495,71 +42246,38 @@
+@@ -95532,71 +42281,38 @@
    exit (statfs (".", &fsd));
    }
  _ACEOF
@@ -100262,7 +100308,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <sys/statfs.h>
-@@ -95569,71 +42287,38 @@
+@@ -95606,71 +42322,38 @@
    exit (statfs (".", &fsd, sizeof fsd, 0));
    }
  _ACEOF
@@ -100344,7 +100390,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #ifdef HAVE_SYS_PARAM_H
-@@ -95649,71 +42334,38 @@
+@@ -95686,71 +42369,38 @@
    exit (statfs (".", &fsd));
    }
  _ACEOF
@@ -100426,7 +100472,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #ifdef HAVE_SYS_PARAM_H
-@@ -95733,201 +42385,33 @@
+@@ -95770,201 +42420,33 @@
    exit (statfs (".", &fsd) != 1);
    }
  _ACEOF
@@ -100651,7 +100697,7 @@
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
-@@ -95936,19 +42420,15 @@
+@@ -95973,19 +42455,15 @@
  
  done
  
@@ -100674,7 +100720,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -95966,46 +42446,15 @@
+@@ -96003,46 +42481,15 @@
    return 0;
  }
  _ACEOF
@@ -100725,7 +100771,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -96023,65 +42472,32 @@
+@@ -96060,65 +42507,32 @@
    return 0;
  }
  _ACEOF
@@ -100799,7 +100845,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.  */
-@@ -96122,50 +42538,24 @@
+@@ -96159,50 +42573,24 @@
    return 0;
  }
  _ACEOF
@@ -100856,7 +100902,7 @@
  MAKE_SETTINGS="$MAKE_SETTINGS
  XATTR_LIBS = ${XATTR_LIBS}
  XATTR_CFLAGS = ${XATTR_CFLAGS}
-@@ -96175,18 +42565,14 @@
+@@ -96212,18 +42600,14 @@
  
  
  if test x"$ac_cv_func_ext_flistxattr" = x"yes"; then
@@ -100878,7 +100924,7 @@
  /* end confdefs.h.  */
  
  	 	#include <sys/types.h>
-@@ -96209,48 +42595,23 @@
+@@ -96246,48 +42630,23 @@
    return 0;
  }
  _ACEOF
@@ -100932,7 +100978,7 @@
  
  
  	MAKE_SETTINGS="$MAKE_SETTINGS
-@@ -96262,20 +42623,16 @@
+@@ -96299,20 +42658,16 @@
  fi
  
  
@@ -100957,7 +101003,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <sys/capability.h>
-@@ -96290,117 +42647,55 @@
+@@ -96327,117 +42682,55 @@
  }
  
  _ACEOF
@@ -101091,7 +101137,7 @@
  
  fi
  
-@@ -96408,7 +42703,7 @@
+@@ -96445,7 +42738,7 @@
  INCLUDED_POPT=auto
  
  # Check whether --with-included-popt was given.
@@ -101100,7 +101146,7 @@
    withval=$with_included_popt;  INCLUDED_POPT=$withval
  fi
  
-@@ -96417,169 +42712,26 @@
+@@ -96454,169 +42747,26 @@
  
  
  if test x"$INCLUDED_POPT" != x"yes"; then
@@ -101278,7 +101324,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -96597,43 +42749,18 @@
+@@ -96634,43 +42784,18 @@
    return 0;
  }
  _ACEOF
@@ -101328,7 +101374,7 @@
     POPT_LIBS="-lpopt"
  fi
  
-@@ -96645,9 +42772,9 @@
+@@ -96682,9 +42807,9 @@
  	fi
  fi
  
@@ -101340,7 +101386,7 @@
  $as_echo "$INCLUDED_POPT" >&6; }
  if test x"$INCLUDED_POPT" != x"no"; then
  			poptdir=""
-@@ -96661,156 +42788,16 @@
+@@ -96698,156 +42823,16 @@
  		fi
  	done
          if test x"$poptdir" = "x"; then
@@ -101504,7 +101550,7 @@
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
-@@ -96849,12 +42836,10 @@
+@@ -96886,12 +42871,10 @@
  LOOK_DIRS="/usr /usr/local /sw"
  
  # Check whether --with-libiconv was given.
@@ -101519,7 +101565,7 @@
    else
       if test "$withval" != "yes" ; then
  
-@@ -96866,26 +42851,20 @@
+@@ -96903,26 +42886,20 @@
  	LIBS=-liconv
  
  
@@ -101554,7 +101600,7 @@
  /* end confdefs.h.  */
  #include <stdlib.h>
  #include <giconv.h>
-@@ -96898,33 +42877,10 @@
+@@ -96935,33 +42912,10 @@
  }
  
  _ACEOF
@@ -101591,7 +101637,7 @@
  
  		ICONV_FOUND=yes;
  		ICONV_CPPFLAGS="$CPPFLAGS"
-@@ -96932,29 +42888,17 @@
+@@ -96969,29 +42923,17 @@
  		ICONV_LDFLAGS="$LDFLAGS"
  
  else
@@ -101626,7 +101672,7 @@
  /* end confdefs.h.  */
  #include <stdlib.h>
  #include <iconv.h>
-@@ -96967,33 +42911,10 @@
+@@ -97004,33 +42946,10 @@
  }
  
  _ACEOF
@@ -101663,7 +101709,7 @@
  
  		ICONV_FOUND=yes;
  		ICONV_CPPFLAGS="$CPPFLAGS"
-@@ -97001,28 +42922,17 @@
+@@ -97038,28 +42957,17 @@
  		ICONV_LDFLAGS="$LDFLAGS"
  
  else
@@ -101698,7 +101744,7 @@
  /* end confdefs.h.  */
  #include <stdlib.h>
  #include <giconv.h>
-@@ -97035,33 +42945,10 @@
+@@ -97072,33 +42980,10 @@
  }
  
  _ACEOF
@@ -101735,7 +101781,7 @@
  
  		ICONV_FOUND=yes;
  		ICONV_CPPFLAGS="$CPPFLAGS"
-@@ -97069,31 +42956,22 @@
+@@ -97106,31 +42991,22 @@
  		ICONV_LDFLAGS="$LDFLAGS"
  
  else
@@ -101773,7 +101819,7 @@
  	CPPFLAGS="$save_CPPFLAGS"
  	LDFLAGS="$save_LDFLAGS"
  	LIBS="$save_LIBS"
-@@ -97106,17 +42984,13 @@
+@@ -97143,17 +43019,13 @@
  
  if test x$ICONV_FOUND = xno; then
  
@@ -101795,7 +101841,7 @@
  /* end confdefs.h.  */
  #include <stdlib.h>
  #include <iconv.h>
-@@ -97129,49 +43003,20 @@
+@@ -97166,49 +43038,20 @@
  }
  
  _ACEOF
@@ -101851,7 +101897,7 @@
  fi
  
  for i in $LOOK_DIRS ; do
-@@ -97188,24 +43033,20 @@
+@@ -97225,24 +43068,20 @@
  	LIBS=-liconv
  
  
@@ -101883,7 +101929,7 @@
  /* end confdefs.h.  */
  #include <stdlib.h>
  #include <giconv.h>
-@@ -97218,33 +43059,10 @@
+@@ -97255,33 +43094,10 @@
  }
  
  _ACEOF
@@ -101920,7 +101966,7 @@
  
  		ICONV_FOUND=yes
  		ICONV_CPPFLAGS="$CPPFLAGS"
-@@ -97252,27 +43070,17 @@
+@@ -97289,27 +43105,17 @@
  		ICONV_LDFLAGS="$LDFLAGS"
  
  else
@@ -101952,7 +101998,7 @@
  /* end confdefs.h.  */
  #include <stdlib.h>
  #include <iconv.h>
-@@ -97285,33 +43093,10 @@
+@@ -97322,33 +43128,10 @@
  }
  
  _ACEOF
@@ -101989,7 +102035,7 @@
  
  		ICONV_FOUND=yes
  		ICONV_CPPFLAGS="$CPPFLAGS"
-@@ -97319,26 +43104,17 @@
+@@ -97356,26 +43139,17 @@
  		ICONV_LDFLAGS="$LDFLAGS"
  
  else
@@ -102021,7 +102067,7 @@
  /* end confdefs.h.  */
  #include <stdlib.h>
  #include <giconv.h>
-@@ -97350,304 +43126,92 @@
+@@ -97387,304 +43161,92 @@
     return 0;
  }
  
@@ -102393,7 +102439,7 @@
  _ACEOF
  
  fi
-@@ -97726,151 +43290,12 @@
+@@ -97763,151 +43325,12 @@
  
  
  
@@ -102549,7 +102595,7 @@
  _ACEOF
  
  fi
-@@ -97880,23 +43305,17 @@
+@@ -97917,23 +43340,17 @@
  
  
  
@@ -102576,7 +102622,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -97914,54 +43333,28 @@
+@@ -97951,54 +43368,28 @@
    return 0;
  }
  _ACEOF
@@ -102638,7 +102684,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_LIBZ 1
  _ACEOF
-@@ -97977,18 +43370,13 @@
+@@ -98014,18 +43405,13 @@
  
  fi
  
@@ -102660,7 +102706,7 @@
  /* end confdefs.h.  */
  
  		#include <zlib.h>
-@@ -98006,40 +43394,19 @@
+@@ -98043,40 +43429,19 @@
    return 0;
  }
  _ACEOF
@@ -102703,7 +102749,7 @@
  $as_echo "$samba_cv_zlib_1_2_3" >&6; }
  
  if test x"$ac_cv_header_zlib_h" = x"yes" -a \
-@@ -98098,9 +43465,9 @@
+@@ -98135,9 +43500,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
@@ -102715,7 +102761,7 @@
    $as_echo_n "(cached) " >&6
  else
    case $PKG_CONFIG in
-@@ -98113,14 +43480,14 @@
+@@ -98150,14 +43515,14 @@
  do
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
@@ -102733,7 +102779,7 @@
  IFS=$as_save_IFS
  
    test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
-@@ -98129,10 +43496,10 @@
+@@ -98166,10 +43531,10 @@
  fi
  PKG_CONFIG=$ac_cv_path_PKG_CONFIG
  if test -n "$PKG_CONFIG"; then
@@ -102746,7 +102792,7 @@
  $as_echo "no" >&6; }
  fi
  
-@@ -98148,52 +43515,27 @@
+@@ -98185,52 +43550,27 @@
  	else
  		SAMBA_PKG_CONFIG_MIN_VERSION="0.9.0"
  		if $PKG_CONFIG --atleast-pkgconfig-version $SAMBA_PKG_CONFIG_MIN_VERSION; then
@@ -102806,7 +102852,7 @@
  
  	MAKE_SETTINGS="$MAKE_SETTINGS
  LIBTALLOC_ENABLE = YES
-@@ -98201,22 +43543,16 @@
+@@ -98238,22 +43578,16 @@
  SMB_INFO_ENABLES="$SMB_INFO_ENABLES
  \$enabled{\"LIBTALLOC\"} = \"YES\";"
  
@@ -102833,7 +102879,7 @@
  				CFLAGS="$OLD_CFLAGS"
  
  				ac_cv_LIBTALLOC_libs_only_other="`$PKG_CONFIG --libs-only-other 'talloc >= 2.0.0'` `$PKG_CONFIG --libs-only-L 'talloc >= 2.0.0'`"
-@@ -98277,7 +43613,7 @@
+@@ -98314,7 +43648,7 @@
  				ac_cv_LIBTALLOC_found=yes
  
  			else
@@ -102842,7 +102888,7 @@
  $as_echo "no" >&6; }
  				$PKG_CONFIG --errors-to-stdout --print-errors 'talloc >= 2.0.0'
  				ac_cv_LIBTALLOC_found=no
-@@ -98311,9 +43647,9 @@
+@@ -98348,9 +43682,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
@@ -102854,7 +102900,7 @@
    $as_echo_n "(cached) " >&6
  else
    case $PKG_CONFIG in
-@@ -98326,14 +43662,14 @@
+@@ -98363,14 +43697,14 @@
  do
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
@@ -102872,7 +102918,7 @@
  IFS=$as_save_IFS
  
    test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
-@@ -98342,10 +43678,10 @@
+@@ -98379,10 +43713,10 @@
  fi
  PKG_CONFIG=$ac_cv_path_PKG_CONFIG
  if test -n "$PKG_CONFIG"; then
@@ -102885,7 +102931,7 @@
  $as_echo "no" >&6; }
  fi
  
-@@ -98361,52 +43697,27 @@
+@@ -98398,52 +43732,27 @@
  	else
  		SAMBA_PKG_CONFIG_MIN_VERSION="0.9.0"
  		if $PKG_CONFIG --atleast-pkgconfig-version $SAMBA_PKG_CONFIG_MIN_VERSION; then
@@ -102945,7 +102991,7 @@
  
  	MAKE_SETTINGS="$MAKE_SETTINGS
  LIBTDB_ENABLE = YES
-@@ -98414,22 +43725,16 @@
+@@ -98451,22 +43760,16 @@
  SMB_INFO_ENABLES="$SMB_INFO_ENABLES
  \$enabled{\"LIBTDB\"} = \"YES\";"
  
@@ -102972,7 +103018,7 @@
  				CFLAGS="$OLD_CFLAGS"
  
  				ac_cv_LIBTDB_libs_only_other="`$PKG_CONFIG --libs-only-other 'tdb >= 1.1.7'` `$PKG_CONFIG --libs-only-L 'tdb >= 1.1.7'`"
-@@ -98490,7 +43795,7 @@
+@@ -98527,7 +43830,7 @@
  				ac_cv_LIBTDB_found=yes
  
  			else
@@ -102981,7 +103027,7 @@
  $as_echo "no" >&6; }
  				$PKG_CONFIG --errors-to-stdout --print-errors 'tdb >= 1.1.7'
  				ac_cv_LIBTDB_found=no
-@@ -98515,9 +43820,7 @@
+@@ -98552,9 +43855,7 @@
  	fi
  done
  if test x"$tdbdir" = "x"; then
@@ -102992,7 +103038,7 @@
  fi
  TDB_OBJ="common/tdb.o common/dump.o common/transaction.o common/error.o common/traverse.o"
  TDB_OBJ="$TDB_OBJ common/freelist.o common/freelistcheck.o common/io.o common/lock.o common/open.o common/check.o"
-@@ -98530,104 +43833,12 @@
+@@ -98567,104 +43868,12 @@
  TDB_CFLAGS="-I$tdbdir/include"
  
  
@@ -103102,7 +103148,7 @@
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
  _ACEOF
-@@ -98635,151 +43846,12 @@
+@@ -98672,151 +43881,12 @@
  fi
  done
  
@@ -103259,7 +103305,7 @@
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
-@@ -98790,17 +43862,13 @@
+@@ -98827,17 +43897,13 @@
  
  
  
@@ -103280,7 +103326,7 @@
  /* end confdefs.h.  */
  #include <unistd.h>
  int
-@@ -98811,56 +43879,29 @@
+@@ -98848,56 +43914,29 @@
    return 0;
  }
  _ACEOF
@@ -103344,7 +103390,7 @@
  /* end confdefs.h.  */
  #include <unistd.h>
  int
-@@ -98871,41 +43912,18 @@
+@@ -98908,41 +43947,18 @@
    return 0;
  }
  _ACEOF
@@ -103390,7 +103436,7 @@
  
   fi
  
-@@ -98936,9 +43954,9 @@
+@@ -98973,9 +43989,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
@@ -103402,7 +103448,7 @@
    $as_echo_n "(cached) " >&6
  else
    case $PKG_CONFIG in
-@@ -98951,14 +43969,14 @@
+@@ -98988,14 +44004,14 @@
  do
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
@@ -103420,7 +103466,7 @@
  IFS=$as_save_IFS
  
    test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
-@@ -98967,10 +43985,10 @@
+@@ -99004,10 +44020,10 @@
  fi
  PKG_CONFIG=$ac_cv_path_PKG_CONFIG
  if test -n "$PKG_CONFIG"; then
@@ -103433,7 +103479,7 @@
  $as_echo "no" >&6; }
  fi
  
-@@ -98986,52 +44004,27 @@
+@@ -99023,52 +44039,27 @@
  	else
  		SAMBA_PKG_CONFIG_MIN_VERSION="0.9.0"
  		if $PKG_CONFIG --atleast-pkgconfig-version $SAMBA_PKG_CONFIG_MIN_VERSION; then
@@ -103493,7 +103539,7 @@
  
  	MAKE_SETTINGS="$MAKE_SETTINGS
  LIBTEVENT_ENABLE = YES
-@@ -99039,22 +44032,16 @@
+@@ -99076,22 +44067,16 @@
  SMB_INFO_ENABLES="$SMB_INFO_ENABLES
  \$enabled{\"LIBTEVENT\"} = \"YES\";"
  
@@ -103520,7 +103566,7 @@
  				CFLAGS="$OLD_CFLAGS"
  
  				ac_cv_LIBTEVENT_libs_only_other="`$PKG_CONFIG --libs-only-other 'tevent = 0.9.8'` `$PKG_CONFIG --libs-only-L 'tevent = 0.9.8'`"
-@@ -99115,7 +44102,7 @@
+@@ -99152,7 +44137,7 @@
  				ac_cv_LIBTEVENT_found=yes
  
  			else
@@ -103529,7 +103575,7 @@
  $as_echo "no" >&6; }
  				$PKG_CONFIG --errors-to-stdout --print-errors 'tevent = 0.9.8'
  				ac_cv_LIBTEVENT_found=no
-@@ -99136,281 +44123,50 @@
+@@ -99173,281 +44158,50 @@
  
  if test x"$teventdir" = "x"; then
  	teventdir=""
@@ -103842,7 +103888,7 @@
  _ACEOF
  
  fi
-@@ -99419,9 +44175,7 @@
+@@ -99456,9 +44210,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"
  
@@ -103853,7 +103899,7 @@
  
  fi
  
-@@ -99477,9 +44231,9 @@
+@@ -99514,9 +44266,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
@@ -103865,7 +103911,7 @@
    $as_echo_n "(cached) " >&6
  else
    case $PKG_CONFIG in
-@@ -99492,14 +44246,14 @@
+@@ -99529,14 +44281,14 @@
  do
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
@@ -103883,7 +103929,7 @@
  IFS=$as_save_IFS
  
    test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
-@@ -99508,10 +44262,10 @@
+@@ -99545,10 +44297,10 @@
  fi
  PKG_CONFIG=$ac_cv_path_PKG_CONFIG
  if test -n "$PKG_CONFIG"; then
@@ -103896,7 +103942,7 @@
  $as_echo "no" >&6; }
  fi
  
-@@ -99527,52 +44281,27 @@
+@@ -99564,52 +44316,27 @@
  	else
  		SAMBA_PKG_CONFIG_MIN_VERSION="0.9.0"
  		if $PKG_CONFIG --atleast-pkgconfig-version $SAMBA_PKG_CONFIG_MIN_VERSION; then
@@ -103956,7 +104002,7 @@
  
  	MAKE_SETTINGS="$MAKE_SETTINGS
  LIBLDB_ENABLE = YES
-@@ -99580,22 +44309,16 @@
+@@ -99617,22 +44344,16 @@
  SMB_INFO_ENABLES="$SMB_INFO_ENABLES
  \$enabled{\"LIBLDB\"} = \"YES\";"
  
@@ -103983,7 +104029,7 @@
  				CFLAGS="$OLD_CFLAGS"
  
  				ac_cv_LIBLDB_libs_only_other="`$PKG_CONFIG --libs-only-other 'ldb = 0.9.7'` `$PKG_CONFIG --libs-only-L 'ldb = 0.9.7'`"
-@@ -99656,7 +44379,7 @@
+@@ -99693,7 +44414,7 @@
  				ac_cv_LIBLDB_found=yes
  
  			else
@@ -103992,7 +104038,7 @@
  $as_echo "no" >&6; }
  				$PKG_CONFIG --errors-to-stdout --print-errors 'ldb = 0.9.7'
  				ac_cv_LIBLDB_found=no
-@@ -99702,12 +44425,12 @@
+@@ -99739,12 +44460,12 @@
  
  SQLITE3_LIBS=""
  with_sqlite3_support=no
@@ -104007,7 +104053,7 @@
    withval=$with_sqlite3;  case "$withval" in
      yes|no|auto)
  	with_sqlite3_support=$withval
-@@ -99716,157 +44439,18 @@
+@@ -99753,157 +44474,18 @@
  fi
  
  
@@ -104171,7 +104217,7 @@
  _ACEOF
  
  fi
-@@ -99876,11 +44460,9 @@
+@@ -99913,11 +44495,9 @@
  
    if test x"$ac_cv_header_sqlite3_h" != x"yes"; then
  	if test x"$with_sqlite3_support" = x"yes"; then
@@ -104185,7 +104231,7 @@
  $as_echo "$as_me: WARNING: sqlite3.h is needed for SQLITE3 support" >&2;}
  	fi
  
-@@ -99895,23 +44477,17 @@
+@@ -99932,23 +44512,17 @@
    # now see if we can find the sqlite3 libs in standard paths
  
  
@@ -104212,7 +104258,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -99929,54 +44505,28 @@
+@@ -99966,54 +44540,28 @@
    return 0;
  }
  _ACEOF
@@ -104274,7 +104320,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_LIBSQLITE3 1
  _ACEOF
-@@ -99992,21 +44542,16 @@
+@@ -100029,21 +44577,16 @@
  
  fi
  
@@ -104300,7 +104346,7 @@
  $as_echo "yes" >&6; }
      with_sqlite3_support=yes
  
-@@ -100018,11 +44563,9 @@
+@@ -100055,11 +44598,9 @@
  
    else
      if test x"$with_sqlite3_support" = x"yes"; then
@@ -104314,7 +104360,7 @@
  $as_echo "$as_me: WARNING: libsqlite3 is needed for SQLITE3 support" >&2;}
      fi
  
-@@ -100092,7 +44635,7 @@
+@@ -100129,7 +44670,7 @@
  
  use_gnutls=auto
  # Check whether --enable-gnutls was given.
@@ -104323,7 +104369,7 @@
    enableval=$enable_gnutls; if test x$enable_gnutls = xno; then
          use_gnutls=no
      fi
-@@ -100106,9 +44649,9 @@
+@@ -100143,9 +44684,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
@@ -104335,7 +104381,7 @@
    $as_echo_n "(cached) " >&6
  else
    case $PKG_CONFIG in
-@@ -100121,14 +44664,14 @@
+@@ -100158,14 +44699,14 @@
  do
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
@@ -104353,7 +104399,7 @@
  IFS=$as_save_IFS
  
    test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
-@@ -100137,10 +44680,10 @@
+@@ -100174,10 +44715,10 @@
  fi
  PKG_CONFIG=$ac_cv_path_PKG_CONFIG
  if test -n "$PKG_CONFIG"; then
@@ -104366,7 +104412,7 @@
  $as_echo "no" >&6; }
  fi
  
-@@ -100156,52 +44699,27 @@
+@@ -100193,52 +44734,27 @@
  	else
  		SAMBA_PKG_CONFIG_MIN_VERSION="0.9.0"
  		if $PKG_CONFIG --atleast-pkgconfig-version $SAMBA_PKG_CONFIG_MIN_VERSION; then
@@ -104426,7 +104472,7 @@
  
  	MAKE_SETTINGS="$MAKE_SETTINGS
  GNUTLS_ENABLE = YES
-@@ -100209,22 +44727,16 @@
+@@ -100246,22 +44762,16 @@
  SMB_INFO_ENABLES="$SMB_INFO_ENABLES
  \$enabled{\"GNUTLS\"} = \"YES\";"
  
@@ -104453,7 +104499,7 @@
  				CFLAGS="$OLD_CFLAGS"
  
  				ac_cv_GNUTLS_libs_only_other="`$PKG_CONFIG --libs-only-other 'gnutls >= 1.4.0'` `$PKG_CONFIG --libs-only-L 'gnutls >= 1.4.0'`"
-@@ -100285,7 +44797,7 @@
+@@ -100322,7 +44832,7 @@
  				ac_cv_GNUTLS_found=yes
  
  			else
@@ -104462,7 +104508,7 @@
  $as_echo "no" >&6; }
  				$PKG_CONFIG --errors-to-stdout --print-errors 'gnutls >= 1.4.0'
  				ac_cv_GNUTLS_found=no
-@@ -100305,151 +44817,12 @@
+@@ -100342,151 +44852,12 @@
  fi
  
  if test x$use_gnutls = xauto; then
@@ -104619,7 +104665,7 @@
  _ACEOF
  
  fi
-@@ -100458,23 +44831,17 @@
+@@ -100495,23 +44866,17 @@
  
  
  
@@ -104646,7 +104692,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -100492,580 +44859,116 @@
+@@ -100529,580 +44894,116 @@
    return 0;
  }
  _ACEOF
@@ -105306,7 +105352,7 @@
  _ACEOF
  
  fi
-@@ -101074,23 +44977,17 @@
+@@ -101111,23 +45012,17 @@
  
  
  
@@ -105333,7 +105379,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -101108,54 +45005,28 @@
+@@ -101145,54 +45040,28 @@
    return 0;
  }
  _ACEOF
@@ -105395,7 +105441,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_LIBGCRYPT 1
  _ACEOF
-@@ -101171,7 +45042,6 @@
+@@ -101208,7 +45077,6 @@
  
  fi
  
@@ -105403,7 +105449,7 @@
  MAKE_SETTINGS="$MAKE_SETTINGS
  GCRYPT_LIBS = $GCRYPT_LIBS
  GCRYPT_CFLAGS =
-@@ -101188,7 +45058,7 @@
+@@ -101225,7 +45093,7 @@
  
  use_netapi=auto
  # Check whether --enable-netapi was given.
@@ -105412,7 +105458,7 @@
    enableval=$enable_netapi; if test x$enable_netapi = xno; then
          use_netapi=no
      fi
-@@ -101210,151 +45080,12 @@
+@@ -101247,151 +45115,12 @@
  \$enabled{\"TORTURE_LIBNETAPI\"} = \"NO\";"
  
  if test x$use_netapi != xno; then
@@ -105569,7 +105615,7 @@
  _ACEOF
  
  fi
-@@ -101363,23 +45094,17 @@
+@@ -101400,23 +45129,17 @@
  
  
  
@@ -105596,7 +105642,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -101397,54 +45122,28 @@
+@@ -101434,54 +45157,28 @@
    return 0;
  }
  _ACEOF
@@ -105658,7 +105704,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_LIBNETAPI 1
  _ACEOF
-@@ -101461,24 +45160,17 @@
+@@ -101498,24 +45195,17 @@
  fi
  
  
@@ -105686,7 +105732,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -101496,54 +45188,28 @@
+@@ -101533,54 +45223,28 @@
    return 0;
  }
  _ACEOF
@@ -105748,7 +105794,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_LIBNETAPI 1
  _ACEOF
-@@ -101560,24 +45226,17 @@
+@@ -101597,24 +45261,17 @@
  fi
  
  
@@ -105776,7 +105822,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -101595,54 +45254,28 @@
+@@ -101632,54 +45289,28 @@
    return 0;
  }
  _ACEOF
@@ -105838,7 +105884,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_LIBNETAPI 1
  _ACEOF
-@@ -101659,24 +45292,17 @@
+@@ -101696,24 +45327,17 @@
  fi
  
  
@@ -105866,7 +105912,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -101694,54 +45320,28 @@
+@@ -101731,54 +45355,28 @@
    return 0;
  }
  _ACEOF
@@ -105928,7 +105974,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_LIBNETAPI 1
  _ACEOF
-@@ -101758,24 +45358,17 @@
+@@ -101795,24 +45393,17 @@
  fi
  
  
@@ -105956,7 +106002,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -101793,54 +45386,28 @@
+@@ -101830,54 +45421,28 @@
    return 0;
  }
  _ACEOF
@@ -106018,7 +106064,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_LIBNETAPI 1
  _ACEOF
-@@ -101855,12 +45422,9 @@
+@@ -101892,12 +45457,9 @@
  
  
  fi
@@ -106032,7 +106078,7 @@
  
  
  	MAKE_SETTINGS="$MAKE_SETTINGS
-@@ -101878,9 +45442,7 @@
+@@ -101915,9 +45477,7 @@
  
  	else
  		if test x$use_netapi != xauto; then
@@ -106043,7 +106089,7 @@
  		fi
  	fi
  
-@@ -101921,19 +45483,17 @@
+@@ -101958,19 +45518,17 @@
  
  #################################################
  # check for pthread support
@@ -106067,7 +106113,7 @@
  		fi
  
  	MAKE_SETTINGS="$MAKE_SETTINGS
-@@ -101951,12 +45511,12 @@
+@@ -101988,12 +45546,12 @@
  
  	;;
  	*)
@@ -106082,7 +106128,7 @@
  $as_echo "no" >&6; }
  
  fi
-@@ -101972,274 +45532,45 @@
+@@ -102009,274 +45567,45 @@
  
  
  
@@ -106370,7 +106416,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -102257,54 +45588,28 @@
+@@ -102294,54 +45623,28 @@
    return 0;
  }
  _ACEOF
@@ -106432,7 +106478,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_LIBSETPROCTITLE 1
  _ACEOF
-@@ -102320,15 +45625,14 @@
+@@ -102357,15 +45660,14 @@
  
  fi
  
@@ -106450,7 +106496,7 @@
  $as_echo "yes" >&6; }
  
  	MAKE_SETTINGS="$MAKE_SETTINGS
-@@ -102338,22 +45642,20 @@
+@@ -102375,22 +45677,20 @@
  \$enabled{\"SETPROCTITLE\"} = \"YES\";"
  
  
@@ -106477,7 +106523,7 @@
  $as_echo "no" >&6; }
  
  fi
-@@ -102371,238 +45673,68 @@
+@@ -102408,238 +45708,68 @@
  
  
  
@@ -106746,7 +106792,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -102620,46 +45752,15 @@
+@@ -102657,46 +45787,15 @@
    return 0;
  }
  _ACEOF
@@ -106797,7 +106843,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -102677,65 +45778,32 @@
+@@ -102714,65 +45813,32 @@
    return 0;
  }
  _ACEOF
@@ -106871,7 +106917,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.  */
-@@ -102776,50 +45844,24 @@
+@@ -102813,50 +45879,24 @@
    return 0;
  }
  _ACEOF
@@ -106928,7 +106974,7 @@
  MAKE_SETTINGS="$MAKE_SETTINGS
  BLKID_LIBS = ${BLKID_LIBS}
  BLKID_CFLAGS = ${BLKID_CFLAGS}
-@@ -102830,9 +45872,7 @@
+@@ -102867,9 +45907,7 @@
  
  if test x"$ac_cv_func_ext_blkid_get_cache" = x"yes"; then
  
@@ -106939,7 +106985,7 @@
  
  
  	MAKE_SETTINGS="$MAKE_SETTINGS
-@@ -102860,102 +45900,12 @@
+@@ -102897,102 +45935,12 @@
  
  fi
  
@@ -107046,7 +107092,7 @@
  _ACEOF
  
  fi
-@@ -102965,151 +45915,12 @@
+@@ -103002,151 +45950,12 @@
  ###############################
  # start SMB_EXT_LIB_PAM
  # check for security/pam_appl.h and -lpam
@@ -107202,7 +107248,7 @@
  _ACEOF
  
  fi
-@@ -103118,23 +45929,17 @@
+@@ -103155,23 +45964,17 @@
  
  
  
@@ -107229,7 +107275,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -103152,54 +45957,28 @@
+@@ -103189,54 +45992,28 @@
    return 0;
  }
  _ACEOF
@@ -107291,7 +107337,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_LIBPAM 1
  _ACEOF
-@@ -103214,7 +45993,6 @@
+@@ -103251,7 +46028,6 @@
  
  
  fi
@@ -107299,7 +107345,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
-@@ -103240,23 +46018,17 @@
+@@ -103277,23 +46053,17 @@
  # test for where we get crypt() from
  
  
@@ -107326,7 +107372,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -103274,54 +46046,28 @@
+@@ -103311,54 +46081,28 @@
    return 0;
  }
  _ACEOF
@@ -107388,7 +107434,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_LIBCRYPT 1
  _ACEOF
-@@ -103337,7 +46083,6 @@
+@@ -103374,7 +46118,6 @@
  
  fi
  
@@ -107396,7 +107442,7 @@
  	MAKE_SETTINGS="$MAKE_SETTINGS
  CRYPT_ENABLE = YES
  "
-@@ -103354,102 +46099,12 @@
+@@ -103391,102 +46134,12 @@
  
  
  
@@ -107504,7 +107550,7 @@
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
  _ACEOF
-@@ -103458,151 +46113,12 @@
+@@ -103495,151 +46148,12 @@
  done
  
  
@@ -107660,7 +107706,7 @@
  _ACEOF
  
  fi
-@@ -103611,23 +46127,17 @@
+@@ -103648,23 +46162,17 @@
  
  
  
@@ -107687,7 +107733,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -103645,54 +46155,28 @@
+@@ -103682,54 +46190,28 @@
    return 0;
  }
  _ACEOF
@@ -107749,7 +107795,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_LIBSASL2 1
  _ACEOF
-@@ -103708,7 +46192,6 @@
+@@ -103745,7 +46227,6 @@
  
  fi
  
@@ -107757,7 +107803,7 @@
  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
-@@ -103754,312 +46237,88 @@
+@@ -103791,312 +46272,88 @@
              ac_new_flags="$ac_new_flags$s$i";
          else
              ac_new_flags="$ac_new_flags$s$l $i";
@@ -108127,7 +108173,7 @@
  /* end confdefs.h.  */
  #include <asm/unistd.h>
  int
-@@ -104070,41 +46329,18 @@
+@@ -104107,41 +46364,18 @@
    return 0;
  }
  _ACEOF
@@ -108173,7 +108219,7 @@
  
   fi
  
-@@ -104148,17 +46384,13 @@
+@@ -104185,17 +46419,13 @@
  fi
  
  
@@ -108194,7 +108240,7 @@
  /* end confdefs.h.  */
  #include <fcntl.h>
  int
-@@ -104169,56 +46401,29 @@
+@@ -104206,56 +46436,29 @@
    return 0;
  }
  _ACEOF
@@ -108258,7 +108304,7 @@
  /* end confdefs.h.  */
  #include <signal.h>
  int
-@@ -104229,41 +46434,18 @@
+@@ -104266,41 +46469,18 @@
    return 0;
  }
  _ACEOF
@@ -108304,7 +108350,7 @@
  
   fi
  
-@@ -104287,151 +46469,12 @@
+@@ -104324,151 +46504,12 @@
  
  fi
  
@@ -108461,7 +108507,7 @@
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
-@@ -104745,151 +46788,12 @@
+@@ -104782,151 +46823,12 @@
  
  
  
@@ -108617,7 +108663,7 @@
  _ACEOF
  
  fi
-@@ -104899,23 +46803,17 @@
+@@ -104936,23 +46838,17 @@
  
  
  
@@ -108644,7 +108690,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -104933,54 +46831,28 @@
+@@ -104970,54 +46866,28 @@
    return 0;
  }
  _ACEOF
@@ -108706,7 +108752,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_LIBZ 1
  _ACEOF
-@@ -104996,18 +46868,13 @@
+@@ -105033,18 +46903,13 @@
  
  fi
  
@@ -108728,7 +108774,7 @@
  /* end confdefs.h.  */
  
  		#include <zlib.h>
-@@ -105025,40 +46892,19 @@
+@@ -105062,40 +46927,19 @@
    return 0;
  }
  _ACEOF
@@ -108771,7 +108817,7 @@
  $as_echo "$samba_cv_zlib_1_2_3" >&6; }
  
  if test x"$ac_cv_header_zlib_h" = x"yes" -a \
-@@ -105080,7 +46926,7 @@
+@@ -105117,7 +46961,7 @@
  
  
  # Check whether --enable-dmalloc was given.
@@ -108780,7 +108826,7 @@
    enableval=$enable_dmalloc;
  fi
  
-@@ -105088,14 +46934,10 @@
+@@ -105125,14 +46969,10 @@
  if test "x$enable_dmalloc" = xyes
  then
  
@@ -108797,7 +108843,7 @@
  
  	LIBS="$LIBS -ldmalloc"
  fi
-@@ -105193,87 +47035,54 @@
+@@ -105230,87 +47070,54 @@
  #################################################
  # Display summary of libraries detected
  
@@ -108901,7 +108947,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
-@@ -105332,13 +47141,13 @@
+@@ -105369,13 +47176,13 @@
      case $ac_val in #(
      *${as_nl}*)
        case $ac_var in #(
@@ -108917,7 +108963,7 @@
        esac ;;
      esac
    done
-@@ -105346,8 +47155,8 @@
+@@ -105383,8 +47190,8 @@
    (set) 2>&1 |
      case $as_nl`(ac_space=' '; set) 2>&1` in #(
      *${as_nl}ac_space=\ *)
@@ -108928,7 +108974,7 @@
        sed -n \
  	"s/'/'\\\\''/g;
  	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
-@@ -105370,11 +47179,11 @@
+@@ -105407,11 +47214,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" &&
@@ -108942,7 +108988,7 @@
  $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
    fi
  fi
-@@ -105394,8 +47203,8 @@
+@@ -105431,8 +47238,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.
@@ -108953,7 +108999,7 @@
  done
  LIBOBJS=$ac_libobjs
  
-@@ -105419,9 +47228,10 @@
+@@ -105456,9 +47263,10 @@
  ac_write_fail=0
  ac_clean_files_save=$ac_clean_files
  ac_clean_files="$ac_clean_files $CONFIG_STATUS"
@@ -108966,7 +109012,7 @@
  #! $SHELL
  # Generated by $as_me.
  # Run this file to recreate the current configuration.
-@@ -105431,17 +47241,18 @@
+@@ -105468,17 +47276,18 @@
  debug=false
  ac_cs_recheck=false
  ac_cs_silent=false
@@ -108992,7 +109038,7 @@
    emulate sh
    NULLCMD=:
    # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
-@@ -105449,23 +47260,15 @@
+@@ -105486,23 +47295,15 @@
    alias -g '${1+"$@"}'='"$@"'
    setopt NO_GLOB_SUBST
  else
@@ -109021,7 +109067,7 @@
  as_nl='
  '
  export as_nl
-@@ -105473,7 +47276,13 @@
+@@ -105510,7 +47311,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
@@ -109036,7 +109082,7 @@
    as_echo='printf %s\n'
    as_echo_n='printf %s'
  else
-@@ -105484,7 +47293,7 @@
+@@ -105521,7 +47328,7 @@
      as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
      as_echo_n_body='eval
        arg=$1;
@@ -109045,7 +109091,7 @@
        *"$as_nl"*)
  	expr "X$arg" : "X\\(.*\\)$as_nl";
  	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
-@@ -105507,13 +47316,6 @@
+@@ -105544,13 +47351,6 @@
    }
  fi
  
@@ -109059,7 +109105,7 @@
  
  # IFS
  # We need space, tab and new line, in precisely that order.  Quoting is
-@@ -105523,15 +47325,15 @@
+@@ -105560,15 +47360,15 @@
  IFS=" ""	$as_nl"
  
  # Find who we are.  Look in the path if we contain no directory separator.
@@ -109078,7 +109124,7 @@
  IFS=$as_save_IFS
  
       ;;
-@@ -105543,12 +47345,16 @@
+@@ -105580,12 +47380,16 @@
  fi
  if test ! -f "$as_myself"; then
    $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
@@ -109099,7 +109145,7 @@
  done
  PS1='$ '
  PS2='> '
-@@ -105560,7 +47366,89 @@
+@@ -105597,7 +47401,89 @@
  LANGUAGE=C
  export LANGUAGE
  
@@ -109190,7 +109236,7 @@
  if expr a : '\(a\)' >/dev/null 2>&1 &&
     test "X`expr 00001 : '.*\(...\)'`" = X001; then
    as_expr=expr
-@@ -105574,8 +47462,12 @@
+@@ -105611,8 +47497,12 @@
    as_basename=false
  fi
  
@@ -109204,7 +109250,7 @@
  as_me=`$as_basename -- "$0" ||
  $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
  	 X"$0" : 'X\(//\)$' \| \
-@@ -105595,76 +47487,25 @@
+@@ -105632,76 +47522,25 @@
  	  }
  	  s/.*/./; q'`
  
@@ -109292,7 +109338,7 @@
  
  rm -f conf$$ conf$$.exe conf$$.file
  if test -d conf$$.dir; then
-@@ -105693,8 +47534,56 @@
+@@ -105730,8 +47569,56 @@
  rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
  rmdir conf$$.dir 2>/dev/null
  
@@ -109350,7 +109396,7 @@
  else
    test -d ./-p && rmdir ./-p
    as_mkdir_p=false
-@@ -105713,10 +47602,10 @@
+@@ -105750,10 +47637,10 @@
        if test -d "$1"; then
  	test -d "$1/.";
        else
@@ -109363,7 +109409,7 @@
  	???[sx]*):;;*)false;;esac;fi
      '\'' sh
    '
-@@ -105731,13 +47620,19 @@
+@@ -105768,13 +47655,19 @@
  
  
  exec 6>&1
@@ -109385,7 +109431,7 @@
  
    CONFIG_FILES    = $CONFIG_FILES
    CONFIG_HEADERS  = $CONFIG_HEADERS
-@@ -105769,13 +47664,15 @@
+@@ -105806,13 +47699,15 @@
  
  cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
  ac_cs_usage="\
@@ -109404,7 +109450,7 @@
    -q, --quiet, --silent
                     do not print progress messages
    -d, --debug      don't remove temporary files
-@@ -105794,16 +47691,17 @@
+@@ -105831,16 +47726,17 @@
  Configuration commands:
  $config_commands
  
@@ -109426,7 +109472,7 @@
  This config.status script is free software; the Free Software Foundation
  gives unlimited permission to copy, distribute and modify it."
  
-@@ -105838,6 +47736,8 @@
+@@ -105875,6 +47771,8 @@
      ac_cs_recheck=: ;;
    --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
      $as_echo "$ac_cs_version"; exit ;;
@@ -109435,7 +109481,7 @@
    --debug | --debu | --deb | --de | --d | -d )
      debug=: ;;
    --file | --fil | --fi | --f )
-@@ -105845,20 +47745,19 @@
+@@ -105882,20 +47780,19 @@
      case $ac_optarg in
      *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
      esac
@@ -109460,7 +109506,7 @@
    --help | --hel | -h )
      $as_echo "$ac_cs_usage"; exit ;;
    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
-@@ -105866,11 +47765,10 @@
+@@ -105903,11 +47800,10 @@
      ac_cs_silent=: ;;
  
    # This is an error.
@@ -109475,7 +109521,7 @@
       ac_need_defaults=false ;;
  
    esac
-@@ -105963,9 +47861,7 @@
+@@ -106000,9 +47896,7 @@
      "pkgconfig/smbsharemodes.pc") CONFIG_FILES="$CONFIG_FILES pkgconfig/smbsharemodes.pc" ;;
      "../examples/libsmbclient/Makefile.internal") CONFIG_FILES="$CONFIG_FILES ../examples/libsmbclient/Makefile.internal" ;;
  
@@ -109486,7 +109532,7 @@
    esac
  done
  
-@@ -105992,7 +47888,7 @@
+@@ -106029,7 +47923,7 @@
    trap 'exit_status=$?
    { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
  ' 0
@@ -109495,7 +109541,7 @@
  }
  # Create a (secure) tmp directory for tmp files.
  
-@@ -106003,11 +47899,7 @@
+@@ -106040,11 +47934,7 @@
  {
    tmp=./conf$$-$RANDOM
    (umask 077 && mkdir "$tmp")
@@ -109508,7 +109554,7 @@
  
  # Set up the scripts for CONFIG_FILES section.
  # No need to generate them if there are no CONFIG_FILES.
-@@ -106015,10 +47907,16 @@
+@@ -106052,10 +47942,16 @@
  if test -n "$CONFIG_FILES"; then
  
  
@@ -109528,7 +109574,7 @@
  else
    ac_cs_awk_cr=$ac_cr
  fi
-@@ -106032,24 +47930,18 @@
+@@ -106069,24 +47965,18 @@
    echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
    echo "_ACEOF"
  } >conf$$subs.sh ||
@@ -109556,7 +109602,7 @@
    else
      ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
    fi
-@@ -106071,7 +47963,7 @@
+@@ -106108,7 +47998,7 @@
  t delim
  :nl
  h
@@ -109565,7 +109611,7 @@
  t more1
  s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
  p
-@@ -106085,7 +47977,7 @@
+@@ -106122,7 +48012,7 @@
  t nl
  :delim
  h
@@ -109574,7 +109620,7 @@
  t more2
  s/["\\]/\\&/g; s/^/"/; s/$/"/
  p
-@@ -106138,9 +48030,7 @@
+@@ -106175,9 +48065,7 @@
  else
    cat
  fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
@@ -109585,7 +109631,7 @@
  _ACEOF
  
  # VPATH may cause trouble with some makes, so we remove $(srcdir),
-@@ -106181,9 +48071,7 @@
+@@ -106218,9 +48106,7 @@
    if test -z "$ac_t"; then
      break
    elif $ac_last_try; then
@@ -109596,7 +109642,7 @@
    else
      ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
    fi
-@@ -106268,9 +48156,7 @@
+@@ -106305,9 +48191,7 @@
  _ACAWK
  _ACEOF
  cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
@@ -109607,7 +109653,7 @@
  fi # test -n "$CONFIG_HEADERS"
  
  
-@@ -106283,9 +48169,7 @@
+@@ -106320,9 +48204,7 @@
    esac
    case $ac_mode$ac_tag in
    :[FHL]*:*);;
@@ -109618,7 +109664,7 @@
    :[FH]-) ac_tag=-:-;;
    :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
    esac
-@@ -106313,12 +48197,10 @@
+@@ -106350,12 +48232,10 @@
  	   [\\/$]*) false;;
  	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
  	   esac ||
@@ -109633,7 +109679,7 @@
      done
  
      # Let's still pretend it is `configure' which instantiates (i.e., don't
-@@ -106329,7 +48211,7 @@
+@@ -106366,7 +48246,7 @@
  	`' by configure.'
      if test x"$ac_file" != x-; then
        configure_input="$ac_file.  $configure_input"
@@ -109642,7 +109688,7 @@
  $as_echo "$as_me: creating $ac_file" >&6;}
      fi
      # Neutralize special characters interpreted by sed in replacement strings.
-@@ -106342,9 +48224,7 @@
+@@ -106379,9 +48259,7 @@
  
      case $ac_tag in
      *:-:* | *:-) cat >"$tmp/stdin" \
@@ -109653,7 +109699,7 @@
      esac
      ;;
    esac
-@@ -106372,47 +48252,7 @@
+@@ -106409,47 +48287,7 @@
  	    q
  	  }
  	  s/.*/./; q'`
@@ -109702,7 +109748,7 @@
    ac_builddir=.
  
  case "$ac_dir" in
-@@ -106464,7 +48304,6 @@
+@@ -106501,7 +48339,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=
@@ -109710,7 +109756,7 @@
  ac_sed_dataroot='
  /datarootdir/ {
    p
-@@ -106474,12 +48313,11 @@
+@@ -106511,12 +48348,11 @@
  /@docdir@/p
  /@infodir@/p
  /@localedir@/p
@@ -109725,7 +109771,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
-@@ -106489,7 +48327,7 @@
+@@ -106526,7 +48362,7 @@
    s&@infodir@&$infodir&g
    s&@localedir@&$localedir&g
    s&@mandir@&$mandir&g
@@ -109734,7 +109780,7 @@
  esac
  _ACEOF
  
-@@ -106517,14 +48355,12 @@
+@@ -106554,14 +48390,12 @@
  $ac_datarootdir_hack
  "
  eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
@@ -109751,7 +109797,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;}
-@@ -106534,9 +48370,7 @@
+@@ -106571,9 +48405,7 @@
    -) cat "$tmp/out" && rm -f "$tmp/out";;
    *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
    esac \
@@ -109762,7 +109808,7 @@
   ;;
    :H)
    #
-@@ -106547,29 +48381,23 @@
+@@ -106584,29 +48416,23 @@
        $as_echo "/* $configure_input  */" \
        && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
      } >"$tmp/config.h" \
@@ -109797,7 +109843,7 @@
  $as_echo "$as_me: executing $ac_file commands" >&6;}
   ;;
    esac
-@@ -106595,15 +48423,12 @@
+@@ -106632,15 +48458,12 @@
  done # for ac_tag
  
  
@@ -109815,7 +109861,7 @@
  
  
  # configure is writing to config.log, and then calls config.status.
-@@ -106624,10 +48449,10 @@
+@@ -106661,10 +48484,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.
@@ -109828,7 +109874,7 @@
  $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
  fi
  
-@@ -106638,8 +48463,8 @@
+@@ -106675,8 +48498,8 @@
  # Print very concise instructions on building/use
  if test "x$enable_dmalloc" = xyes
  then




More information about the Pkg-samba-maint mailing list